Hi,
What is the best approach in using a timer. Use a System.Timer.Timer class or use a single Thread in a non-terminating loop with a Thread.Sleep statement?
Thanks in advance
What is going on?
Is this a result of a programming class assignment or someting?
Find the list at Wikipedia (older revision, somone removed them as non-notable)
http://en.wikipedia.org/w/index.php?title=Comparison_of_File_synchronization_software&oldid=361345181
When doing a search in active record I'm looking for record's that do not have an archived bit set to true.
Some of the archived bits are null (which are not archived) others have archived set to false.
Obviously,
Project.all(:conditions => {:archived => false})
misses the projects with the archived bits with null values. How can all non-archived projects be selected wtih active record?
My fonts of choice usually default to text figures which is one reason I like them. However, for tables or headings I'd like to specify that lining figures should be used. Is there a way to do so in CSS?
(To appease the search:
old-style numerals, text figures, non-lining figures, medieval numerals
lining numerals, titling figures)
Hey,
How can i redirect a subdomain call to a folder?
So when the site, sub.domain.com is requested I want to redirect it to show the content of domain.com/sub/
The server is configured to add every request to the domain, but i get a 404 page everytime i do a non-defined subdomain call (witch is trivial, because theres nothing defined)
So the question is:
How to solve this, with .htaccess?
I have a model like this:
class MyModel(models.Model):
REGULAR = 1
PREMIUM = 2
STATUS_CHOICES = ((REGULAR, "regular"), (PREMIUM, "premium"))
name = models.CharField(max_length=30)
status = models.IntegerField(choices = STATUS_CHOICES, default = REGULAR)
class MyForm(forms.ModelForm):
class Meta:
model = models.MyModel
In a view I initialize one field and try to make it non-editable:
myform = MyForm(initial = {'status': requested_status})
myform.fields['status'].editable = False
But the user can still change that field.
What's the real way to accomplish what I'm after?
I need to implement the following scenario in a REST service implemented in WCF:
the user submits a binary file and a set of parameters
the server consumes the file, does some clever work and generates a binary output file
the user retrieves that binary result file
and all that is done in a single operation from the client perspective.
It's pretty easy in a non-REST service. How do I do that in a REST service? Where do I get started?
Hi:
Is there any alternative to non-ISO gcc specific extension __attribute__ on 64-bit kernels ?
Three types that i've noticed are: function attributes, type attributes and variable attributes.
eg.
i'd like to avoid using __attribute__((__packed__)) for structures passed over the network, even though some gcc based code do use it.
Any suggestions or pointers on how to entirely avoid __attribute__ usage in C systems/kernel code ?
thanks
Saifi.
The folloqing is the excpetion I am getting
The null value cannot be assigned to a member with type System.Int32 which is a non-nullable value type.
below is my LINQ Statement where QuestionId is the primary key in my table
var questionViewsData = from questionViews in objDc.SC_QuestionsViews
join questions in objDc.SC_Questions
on questionViews.QuestionId equals questions.QuestionId into qs
from questions in qs.DefaultIfEmpty()
where questionViews.CreatedDate.Date == new DateTime(2010, 4,27)
select new
{
Selected =(questions == null ?-1:questions.QuestionId),
QuestioinTitle = questions.Title,
VotesCount = questions.VotesCount
};
Let me know how to resolve this
Probably an easy regex question.
How do I remove all non-digts except leading + from a phone number?
i.e.
012-3456 = 0123456
+1 (234) 56789 = +123456789
Hi, for a certain project, I need some way to parse XML and get data from it. So I wonder, which one of built-in parsers is the fastest?
Also, it would be nice of the parser could accept a XML string as input - I have my own implementation of thread-safe working with files and I don't want some nasty non-thread-safe libraries to make my efforts useless.
I'm a novice ...in that i've taken a few courses n poured through bunches of cool flash widgets, components and techniques. now it's time for my own website ... I do graphic design n really want to use some of the ready mades for convenience and economy...r there similar non flash products?
Is there a way to use jQuery.html() and not loose the scripts and styles? or any other non-jQuery way?
I'm trying to output the full HTML of the page the user is on. Is this even possible?
I need to Install a software, and this software only can run in the Windows Server system. But I don't have Windows Server, I have Ubuntu Server.
I want install a virtual machine Windows on this Ubuntu Server, but it non GUI, how can I install it?
I know that in Objective-C you should never retain your delegates because it may cause a retain-cycle, however, how do you know the difference between a delegate and a non-delegate object ? Can't it be said that just sending a message to any object is delegating work to that object ?
At
/questions/2000777/allocation-of-memory-in-variable-length-tables
NealB mentioned LE routines to allocate/deallocate memory in a non-CICS COBOL program.
I'd very much like to know how this is done: how the LE routine is called. (I'm familiar with the LINKAGE SECTION and with SET ADDRESS.)
Since I have no access to an IBM mainframe at the moment - meaning no access to online documentation - some code snippets could enlighten me.
I need a regular expression to validate string with one or more of these characters:
a-z
A-Z
'
àòèéùì
simple white space
FOR EXAMPLE these string are valide:
D' argon calabrò
maryòn l' Ancol
these string are NOT valide:
hello38239
my_house
work [tab] with me
I tryed this:
re.match(r"^[a-zA-Z 'òàèéìù]+$", self.cleaned_data['title'].strip())
It seems to work in my python shell but in Django I get this error:
SyntaxError at /home/
("Non-ASCII character '\\xc3' ...
Why ?
Hi,
I'd like to know how people decide whether to define a method as static. I'm aware that a method can only be defined as static if it doesn't require access to instance fields. So lets say we have a method that does not access instance fields, do you always define such a method as static, or only if you need to call it statically (without a reference to an instance).
Perhaps another way of asking the same question, is whether you use static or non-static as the default?
Thanks,
Don
I imagine that there are different combination, just looking for an affirmation. Or, are we developers really that english-centric?
If I were in japan, using a word processor on some computer, would ctrl-s save?
Are there keyboards where ctrl-s doesn't even exist (non-english keyboards)? Most of what I've seen usually has latin + [insert language here] characters, usually overridden on the normal qwerty keyboard.
Hi,
I want to be able to validate a XML against a XSD and generate user readable errors, for example, including XSD documentation tag.
I just wanted to know if C# provides this in a easy, elegant and non-painful way, otherwise I'll parse down the error and find the node within XSD.
Does anyone have any idea of a service provider that provides In App Purchase with subscription model. I checked Urban Airship which has solution built around non-consumable approach and iLime is not available yet. Any pointers in the right direction would be appreciated.
Hi,
I have the following member of class foo.
foo &foo::bar()
{
return this;
}
But I am getting compiler errors. What stupid thing am I doing wrong?
Compiler error (gcc): error: invalid initialization of non-const reference of type 'foo&' from a temporary of type 'foo* const'
Just found the MIG Base 64 utility but its over 6 years old since its last release. It would appear to be quicker than the Apache commons equivalent but I have yet to confirm by writing up an actual test. Has anyone verified its correctness which is always a worry. If someone takes a look at the methods, please note i a referring to the non fast methods which make assumptions trading possible correctness for pure speed.