When initializing a new Date object in JavaScript using the below call, I found out that the month argument counts starting from zero.
new Date(2010, 3, 1); // that's the 1st April 2010!
Why does the month argument start from 0? On the other hand, the day of the month argument (last one) is a number from 1 to 31. Are there good reasons for this?
Anyone had any success getting precompiled headers working with GCC? I have had no luck in my attempts and I haven't seen many good examples for how to set it up. I've tried on cygwin gcc 3.4.4 and using 4.0 on Ubuntu.
Background story: when a user selects a portion of text in a text field with her mouse (mark it up manually), and subsequently hits "alt" key, a certain function would trigger.
My questions are:
How can I trigger a function when a
user hits a key (in her keyboard)?
How can I preserve a portion of text selected, and use it as a
parameter for that function?
I've tried looking up online but haven't found any good answers, but i'd greatly appreciate links as well.
In a MySQL (5.1) database table there is data that represents:
how long a user takes to perform a task and
how many items the user handled during the task.
Would MySQL support correlating the data or do I need to use PHP/C# to calcuate?
Where would I find a good formula to calculate correlation (it's been a long time since I last did this)?
Good Afternoon,
I realise there is a command:
BACKUP DATABASE [DB Name] TO DISK [PATH]
Is it possible too backup to a remote location? - E.G. the web server rather than the database server?
Many Thanks,
Joel
One of the things that block objects, introduced in Snow Leopard, are good for is situations that would previously have been handled with callbacks. The syntax is much cleaner for passing context around. However, I haven't seen any information on the performance implications of using blocks in this manner. What, if any, performance pitfalls should I look out for when using blocks, particularly as a replacement for a C-style callback?
I have an interface named PropertyFilter which used to take a Propertyand decide if accepts it or not. And the world was good.
But now the interface changed, so that implementations may choose to add additional Propertys. For example a Customer property might get expanded into Name and Address properties.
I think it is obvious this is not a Filter anymore, but how would you call such a thing?
Any there any good libraries out there that extend System.Diagnostics.Trace?
Some of the features I am looking for.
Rolling logs
smtp
And "Use log4net" is not an answer. The reason being is that i don't want a reference to any third party assemblies.
I can't seem to find a good explanation of "Leader/Follower" pattern. All explanations either simply refer to it in the context of some problem, or are completely meaningless.
Can anyone explain to the the mechanics of how this pattern works, and why and how it improves performance over more traditional asynchronous IO models? Examples and links to diagrams are appreciated too.
Hello, I need to save objects - instances of classes - in my app like some filetype. How I can write own serializer/deserializer for it?
Or exist some easier way how to save objects to some filetype?
Using of io.serialization was commented as not so good solution for "real" app. Why?
We are in the process of switching from the C# Guid.NewGuid() random-ish guid generator to the sequential guid algorithm suggested in this post. While this seems to work well for MS SQL Server, I am unsure about the implications for Oracle databases, in which we store guids in a raw(16) field. Does anyone have any insight as to whether this algorithm would be good for creating sequential guids for Oracle as well as for MS SQL Server, or if a different variant should be used.
Thanks!
I've got a custom component that has children components dynamically added and removed to it depending on what button the user clicks. What I would like to do is trigger a transition effect that moves the child component onto the stage when it's added and then moves it off when it's removed.
Does anyone have a good example on how to accomplish this?
Edit: I figured it out and left my solution below. I hope it helps someone else!
In the good old days with IIS 6, it was possible to use the SEOLib to make a managed hook in the SMTP service that would run whenever a mail got delivered.
In Vista and W7 they stopped shipping SEOLib, so we can no longer develop for it.
What is the replacement for this functionality?
This post http://www.theserverside.net/tt/articles/showarticle.tss?id=Top5WSMistakes
encourages me to create the web service for business logic layer but many people use it in the data access layer.
I want to create a project where i want to access the same data repository from a desktop application, website and a cell phone.
What would you recommend me?
Is there any case it may be a good idea implement web services to both layers?
thanks.
This is a three part question.
One: Would using a
Dictionary<String,Object>
be a good way of saving data where it would be
Dictionary<Key,Value>
as the basis?
Two: What would be a better way without using app.settings or xml?
Three: How would you serialize this(Or the better solution) into a binary format that is compact and serializes quickly?
All the examples I have seen of neural networks are for a fixed set of inputs which works good for images and fixed length data. How do you deal with variable length data such sentances, queries or source code. Is there a way to encode variable length data into fixed length inputs and still get the generalization properties of neural networks?
Thanks
For creative-commons licensing (not good for code) there is this page http://creativecommons.org/license/ which can be used to assist in choosing a license is there something like this for GPL/BSD/APACHE/ect?
I know I can do
for (id obj in array)
{
if ([obj isKindOfClass:[Elephant class]])
[elephants addObject:obj];
}
but I feel there must be a more elegant way of doing this. I've looked at filtering arrays but can't come up with a good predicate. Thoughts?
Hi,
I plan to work with android . Please point me some good books and blogs/discussion/tutorials/ forums for getting vast and in depth knowledge quickly about this android technology.
We've got a C++ Project that currently uses Make on Linux to build. I'd like to automate it similar to a Java Project under CruiseControl.
1) Is there a project similar to CruiseControl for C++ projects?
OR
2) Is there a good "how-to" on using CruiseControl for C++ Projects?
Hello
My motivation for this question is really just to specify an image to be used in a user control via a dependency property for ImageSource. I'm hitting some pain points involving the management, access, and unit testing for this.
Is the resource editor a good tool to use to maintain images for the application?
What is the best way to translate the Bitmap from the editor to an ImageSource?
How can I grab the resource Filename from the editor?
Cheers,
Berryl
I am playing sound with OpenAL, and it seems to increase memory footprint dramatically for every little sound I play. It seems that OpenAL never frees memory itself and that playing a Source causes memory footprint to grow.
I couldn't find any good resources about OpenAL memory management, but I bet I must do a lot of stuff myself. Maybe someone knows a ressource for that?
whenever using a framework it's so good with a api reference so you could lookup the classes' methods and properties, which class they extend from and so on.
is there a api reference for codeigniter similar to yii's excellent api referenc?
http://www.yiiframework.com/doc/api/
thanks.
Does anyone know of any .NET genetic algorithm frameworks for evolving instructions sets in virtual machines to solve abstract problems? I would be particularly interested in a framework which allows virtual machines to self propagate within a pool and evolve against a fitness function determined by a data set with "good" outputs given expected inputs.