I have added a 'cancelled' field to my model, is there a way to modify the model default query to something like cancelled=False ? without having to modify all my filter/exclude queries ?
I have an 'order' Model:
class Order(models.Model):
date_time=models.DateTimeField()
# other stuff
And I'm using Django ModelForm class to render a form, but I want to display date and time widgets separately. I've came up with this:
class Form(forms.ModelForm):
class Meta:
model = Order
exclude = ('date_time',)
date = forms.DateField()
time = forms.TimeField()
The problem is that I want to put these fields somewhere between 'other stuff'
may i know how to use javascript onChange on <input type="file"... so that when user selected files, onchange will call flash to return files size and decide what to do next
2nd. how to use javascript to exclude this check,if browser doesnt have flash feature
Hey guys!
I'm having trouble figuring out how to exclude /public/bin from this rewrite rule
RewriteCond %{REQUEST_URI} !firerift.php
RewriteRule ^(.*)$ firerift.php/$1 [L,QSA,NC]
Any help would be appreciated.
I've just installed a ZenTest to use autotest in my project. I use rspec and have an integration folder inside it. As I don't want all my integration tests run every single time I start autospec , so I'd like to somehow restrict autospec from running tests in that folder.
How do I exclude a chosen folder inside a /spec from running by autotest?
if my windows path looks like this:
c:\ruby\bin;c:\cygwin\bin
then when i go into cgywin and enter "ruby" it will execute the ruby from c:\ruby\bin, failing to find the ruby installed in my cygwin. I have to exclude that path so cygwin would execute the one from /usr/bin.
But i need those 2 paths, since i want to run ruby in windows too.
Anyway to have cygwin have its own path and not inherit those in windows?
thanks.
See the following SQL statement:
SELECT datediff("d", MAX(invoice.date), Now) As Date_Diff, MAX(invoice.date) AS max_invoice_date, customer.number AS customer_number
FROM invoice INNER JOIN customer ON invoice.customer_number = customer.number
GROUP BY customer.number
If the the following was added:
HAVING datediff("d", MAX(invoice.date), Now) > 365
would this simply exclude rows with Date_Diff <= 365?
What should be the effect of the HAVING clause here?
I have a file with local changes that should never sync back to the repository because it's for my local installation only. But if that same file is changed in the repo, I want those changes to update my local copy, anyway.
At the moment, the file in question always shows up in the list of changes when I want to check-in my changes, and I have to manually exclude it from the check-in. How do I make it so that I can just update, with the above restriction in place?
Thanks :)
Hi,
i've a Java project managed by Maven2. The scenario i'm trying to solve is the following:
in development mode i need to use some configuration files (for example, a hibernate.cfg.xml configured for the dev environment), while in production i need to exclude all the development specific files and configurations, and get instead some other ones for my production environment. How can i handle this situation?
Thanks
Is there any difference in (asymptotic) performance between
Orders.OrderBy(order => order.Date).First()
and
Orders.Where(order => order.Date == Orders.Max(x => x.Date));
i.e. will First() perform the OrderBy()? I'm guessing no. MSDN says enumerating the collection via foreach och GetEnumerator does but the phrasing does not exclude other extensions.
When I link Boost.Thread to my boost_test executable, it gives me
make[2]: *** No rule to make target `/usr/lib64/libboost_thread-mt.so', needed by `gogo/test/test_boost'. Stop.
when I make it. Here's the offending CMake code, what am I doing wrong?
add_executable(boost_test boost_test.cpp)
add_test(boost_test boost_test)
# Boost auto-links for MSVC, so we exclude it.
if(CMAKE_COMPILER_IS_GNUCXX)
target_link_libraries(test_boost #LINK_INTERFACE_LIBRARIES
${Boost_THREAD_LIBRARY}
)
endif()
I need to create Item in right context menu for all files except .zip
I thought that I'm able to use something like this:
HKEY_CLASSES_ROOT\*
and exclude only .zip somehow
is there any solution for this?
The following Spotlight query, correctly returns all archive and ISO files on my system:
kind:iso OR kind:archive
However, Spotlight treats .bin files as archives too and returns .bin files in the results as well.
How can I modify the above query and exclude files that end in bin from the result? I tried the following query but it is not working:
(kind:iso OR kind:archive) AND NOT name:*bin
Thanks in advance.
Hi, I'm importing a project into a svn repository using netbeans 6.8, and there's a whole subtree I don't want to import. Is there an efficient way to exclude it or will I just have to go file by file telling it to skip them ?
Thanks
I am using FindFirstChangeNotification API to monitor the changes happening in a particular folder.But how to exclude a particular file(present in the watching folder) change notification Only.
Server 1 is connected to Server 2 via SSH.
We know this:
I can execute a command such as
" ssh server2 "cp -rv /var/www /tmp" "
which will copy the entire /var/www dir to /tmp. However inside of /var/www we have the following structure(sample LS output below)
$ ls
/web1
/web2
/web3
file1.php
file2.php
file3.php
How can I execute a cp command that will exclude /web1, /web3, file1.php and file3.php (obviously just copying web2 and file2 is not an option since there are significantly more files than just 6)
Hello,
I am using a regular expression search to match up and replace some text. The text can span multiple lines (may or may not have line breaks).
Currently I have this:
$regex = "\<\?php eval.*?\>"
Get-ChildItem -exclude *.bak | Where-Object {$_.Attributes -ne "Directory"} |ForEach-Object {
$text = [string]::Join("`n", (Get-Content $_))
$text -replace $RegEx ,"REPLACED"}
Hey folks,
does anybody know how to change it ?
I mean from
target/test-classes ... target/classes .... maven dependencies
to
target/test-classes ... maven dependencies .... target/classes
It relates to this surefire-plugin feature request
It's because surefire-plugin cannot exclude resources from /target/classes ... it can only modify resources via <testResources> element that modifies /target/test-classes
i have a litle project for which i would like to remove all files outside of and not needed by the c:\windows operating system. therefore i need to create a list of what i want to keep i.e. boot.ini c:\windows etc and then delete everything else. i have seen examples using forFile, but i can be sure that extension will be on the machine. does anyone have any ideas how i can create the exclude list and then do the delete?
Can subsonic 3.0 be used with a winform app? Do I need to add any references to the system.web?
If it can be done, how can I exclude certain tables in the DB? Can I use the following whih I am using for subsonic 2.0
<providers>
<!--<clear/>-->
<add name="TEST" type="SubSonic.SqlDataProvider, SubSonic" connectionStringName="myString" includeTableList="CustomerReference" includeProcedureList=""/>
</providers>
I have an array...and I need to exclude all the items in this array of string from the masterList.customField as shown below
string[] excludeItem = {"a","b","c"};
CustomDTO[] masterList = service.LoadMasterList();
masterList.Where(c=> masterList.customField NOT IN excludeItem
How do I achieve the NOT IN part above?
I have a page where all inputs are assigned a behavior:
$("input").blur(function () {
and I need to exclude a checkbox that has a specific id:
<input type="checkbox" id="allButMe" onchange="billingSameChanged();" value="true"/>
thx
I have text with file names scattered throughout. The filenames appear in the text like this:
|test.txt|
|usr01.txt|
|usr02.txt|
|foo.txt|
I want to match the filenames that don't start with usr. I came up with (?<=\|).*\.txt(?=\|) to match the filenames, but it doesn't exclude the ones starting with usr. Is this possible with regular expressions?
Uncompressed, jQuery is 160KB in size. I did not see a way to exclude seldomly used parts of it like with jQuery UI. How can I reduce the (compressed and minified) file size of jQuery? I am quite concerned because dial-up lines and slow machines/browsers are very common among users of my site.