What is the standard nowadays when one needs a thread safe collection (e.g. Set).
Do I synchronize it myself, or is there an inherently thread safe collection?
What's the best way to get a ul to start from 'x'?
The start tag is depricated and everything I have found on Google has used the :before pseudo class which doesn't work in IE6 or 7. Didn't have much luck when searching stack either.
Only thing I can think of is manually go through and number the lists myself and style accordingly?
Any help appreciated.
As I found out that I can use only numerical values in C++'s switch statements, I thought that there then must be some deeper difference between it and a bunch of if-else's.
Therefore I asked myself:
(How) does switch differ from if-elseif-elseif in terms of runtime speed, compile time optimization and general compilation? I'm mainly speaking of MSVC here.
Hi All
I'm looking for any website(s) devoted and/or related to Operating System Development, and would love for you to kindly share any links you may have.
I have searched myself, but keep winding up at the same old sites, and am wondering if there are others that just don't get noticed by the major search engines or something.
I've put this as a community wiki, simply because I don't think it's very fair to judge an answer based on a single link.
Thank you.
Today I asked myself how can I handle user input if the user have not to enter it...
A firstname and lastname is all he must enter. The adress he needs not to fill out.
Now I have to decide, is the missing data a user mistake or didn`t the user want to enter
data?
How can I deal with such a scenario?
From time to time, I find myself writing server code that produces JavaScript code as the output result.
I can point out why it is really bad:
Inextricable tie between server code and client code.
Can render client code un-reusable.
But sometimes, it just seems to make sense.
And isn't it kinda sorta interesting?
I guess the question is, is writing server code that produces JavaScript code a really bad practice, or "does everyone do it"?
I want to have a search engine for my website, is any of these web search engines(like Google,yahoo,etc) provide a free service? Or I should do it by myself
I have been looking it up and I just cant seem to wrap myself around the onCreate and Bundles. I understand that the onCreate is called when the program starts but its how the Bundles get passed around and how they are pertinent. Can anyone try to put this into plain english because I cant seem to find it well described.
Thanks
Android Code Style Guide defines "Android Code Style Rules".
To conform to these rules one have to change quite a number of settings of the Java Code Formatter (Window-Preferences-Java-Formatter) default profile (in Eclipse IDE).
Did anyone managed to configure the formatter to follow the "Android Code Style Rules" already?
PS: I've tried to do this myself but I've found that there are too many formatter options available, and most of them are not mentioned in the Code Style Guide :-(
I can implement the error function, erf, myself, but I'd prefer not to. Is there a python package with no external dependencies that contains an implementation of this function? I have found http://pylab.sourceforge.net/packages/included_functions.htmlthis but this seems to be part of some much larger package (and it's not even clear which one!).
I'm sorry if this is a naive question - I'm totally new to Python.
Are there any tools available that allow you to 'look' at any given application and show you which WinForm controls are being used in that application? I happen to have an app which I like the GUI of, and I want to use a similar structure in my own app. Instead of developing these controls myself, it may be easier to buy them, if only I can spot which are being used... Any suggestions?
can anyone plz provide me a simple working code snippet of codeigniter for uploading 2 images at once (through 2 different input field ofcourse). I need 2 images to be uploaded at once, or one after another. and both of the images need to be in different location.
I tried to make it myself by calling upload function twice but it returned last images with these extentions: *.jpg.jpg.
can anyone help
Hi all,
In considering several possible solutions to a recent task, I found myself considering how to get a php file that includes it's own MD5 hash. I ended up doing something else, but the question stayed with me.
Something along the lines of:
<?php
echo("Hello, my MD5 is [MD5 OF THIS FILE HERE]");
?>
Whatever placeholder you have in the file, the second you take its MD5 and insert it, you've changed it.
Hi,
I'm developing a Rails application with Rspec for unit testing.
Weeks ago, Rspec used to migrate the database to the last version automatically when executing 'rake spec', but now it doesn't do it automatically, I have to implement everything for myself.
This happens in test environment, because my development data doesn't desappear.
Is my fault? I didn't change anything, I think :)
Thanks in advance.
I just started using mysql and I just can see myself woking with strings!
I mean the compiler cant catch errors like this... and its just a mess!
is there a wrapper or some kind of class i can add that does something as simple as making a function that adds a table and asks for args?
I'm sure there is a tool like that but i cant find it or know its name.
plz help.
I want to be able to edit and delete resources myself, but not allow users of the application to do so.
Is there an easy way of doing this in Rails?
An incomplete solution would be just to remove the "delete" and "edit" buttons from the index view, but that doesn't disable their ability to do so via direct HTTP requests.
Running Rails 2.2.2 and ruby 1.8.7
How can I convert a integer to it's byte representation. I want to take an integer and return a vector that has contains 1's and 0's of the integers byte representation.
I'm having a heck of a time trying to do this myself so I'd thought I would ask to see if there was a built in library function that could help.
Thanks!
I recently came across this and would like to implement something similar. The basic approach is clear: I have to threshold the image and check if a virtual object collides with the remaining foreground.
Instead of implementing the physics myself, I'd like use an engine like Box2D. But how do I integrate the thresholded image into the physics engine so it is possible to interact with virtual objects?
I have a string in my database that represents an image. It looks like this:
0x89504E470D0A1A0A0000000D49484452000000F00000014008020000000D8A66040....
<truncated for brevity>
When I load it in from the database it comes in as a byte[]. How can I convert the string value to a byte array myself. (I am trying to remove the db for some testing code.)
In C# I find myself using a List, IList or IEnumerable 99% of the time. Is there a case when t would be better to use a HashTable (or Dictionary in 2.0 and above) over these?
What is the cleanest way of picking up a match variable form a substitution in Perl
I sometimes find myself writing
s/(something)// ;
my $x = $1 ;
then I realize that if the s/ / / fails $1 might be carrying over a value from a previous match. So I try
my $x = 'defaultvalue' ;
if ( s/(something)// )
{
$x = $1 ;
}
Is this the cleanest way of doing it?
I have a grouped table view that does not need to scroll. I'd like each cell to highlight as the user moves their finger down the screen and call didSelectRowAtIndexPath on release.
This behaviour can be seen done by apple in 'settings mail add account'?
I can't seem to replicate it myself, all I can get is the default, where the cell deselects as soon as the user moves their finger.
Hi,
I put several shapes (like Ellipse and Rectangle) on a Canvas.
Now, I want user to be able to drag & drop these shapes.
Is there some predefined functionality that I can use, or I should implement the drag & drop myself using the mouse events ?
Thanks !