Suppose I want to declare and define a variable with an if condition block. Will this compile in all compilers?
What does the C standard say about this?
Hi!
I have multiple text fields on form and i want two of them should validate like If one of them is empty then say "Both fields are required". Additionally I have also other text fields on form and they are already validating on button click.
Can it be handled using Asp.Net CustomValidator ?
Let's not go so far as to say that I'm paranoid, but I've been spending hour after hour learning how to prevent SQL injections (and XSS for what it's worth).
What I'm wondering is that a SQL injection doesn't seem like it would do permanent harm to my database if I've made daily backups. Doesn't importing yesterday's copy of my tables just restore them and then I can be on my merry way?
Let's say I have this query:
select * from table1 r where r.x = 5
Does the speed of this query depend on the number of rows that are present in table1?
Let say i want to read the integers a, b and c from stdin (in one line, do not need to press return after each number). In c++, i would just do:
cin a b c;
How to do this in Python ?
I'm not a programmer, and/but after multiple email discussions and google searches confirmed the problem I'm describing, and after making changes in picasa preferences with no change in resolution loss (from say, 800kb original image to 235kb after export or upload), I'm at a dead end and thinking the answer may lie among you folks, even though I barely understand the language here.
Hi, I have mod_python installed on my server, but if I want to acceses a python script - let's say httü://site.com/something.py the script doesn't run, the download box "pops up"
Any solutions?
Is there any specific protocol for handling exceptions in public methods? Consider this eg.
public int someMethod()
{
try{
code that might throw an exception
}
catch(Exception e)
{
log the exception
}
}
Say that this method might throw an ArrayIndexOutOfBoundsException. So, is it correct to handle this Exception in the method itself (as in the example) or throw it and assume that the calling method will handle the Exception?
So why does almost every example I can find (including this question form about a year ago) say that a 404 header should be HTTP/1.0 404 Not Found when we've really been using HTTP 1.1 for over a decade? Is there any reason not to send HTTP/1.1 404 Not Found instead?
(Not that it matters all that much... I'm mostly just curious.)
I want to use URL such as /Image/sample.png
I create route, but it does not work, it say "The resource cannot be found"
What is the problem? (action GetImage is in controller home)
routes.MapRoute("Image",
"Image/{id}",
new { controller = "Home", action = "GetImage", id = "" });
Release notes say that ruby-debug is installed by default. I'm using rvm. In my rails app I figured something as simple as script/server --debugger would suffice, but it complains that the ruby-debug gem isn't installed, suggests using gem install ruby-debug, which of course doesn't work (building native extensions) and is contrary to the docs anyway.
Just wondering if anyone's had any luck using the built in ruby-debug in jruby 1.5 and what one needs to do in order run jruby in debug mode
Say, that i am clicking on one iphone app icon,when launched it will create one .app file.So is it possible to call one more iphone app from that app.Or can we do something in that .app file such that it will call another app.
Hello,
Lets say there is a form with a submit button. I found out that using javascript i can call the click() method for input elements in Firefox which would simulate the mouse click on that element.
But then, i got this question, can you detect if button was clicked with real computer mouse, or .click() method?
Thank you
Could someone give an example on how to use the shell function SHOpenFolderAndSelectItems from C#? I don't quite get how to use these kind of functions and couldn't find it on pinvoke.net... =/
Say I have three files called
X:\Pictures\a.jpg
X:\Pictures\s.jpg
X:\Pictures\d.jpg
I then want to open up the X:\Pictures folder with a.jpg, s.jpg and d.jpg selected.
I want to run multiple Google Chrome application windows logged into the same web site (Twitter.com, say), each with different credentials. Is this possible? If so, how?
My initial testing shows that multiple Chrome app windows are not sufficiently isolated to do this. Logging into the second account logs me into the second account in both windows, suggesting that they are sharing information just as two Chrome tabs might.
I'm trying to link my XPCOM extension against the 1.9.3a3pre SDK and I get the following:
error LNK2001: unresolved external symbol _moz_xmalloc
So, what lib do I need to link to? The documentation doesn't say.
This is on Windows right now, but I'll need it to build on Mac and Linux (32/64) as well.
Is there any tutorial on connecting .NET 4 Pipeline with Pipeline from some C\C++ programm?
For example how to get data from VLC Pipeline output ...
I mean VLC docs say that there command line args can eat name of pipe like
YUV video output
--yuv-file=<string>
How to give such name to pipe created in your .Net programm so to be able to give it to other programms or resive from other programms?
Hi, I am building a site which will require some very limited content management for a client. There are only a few areas of the site which will require the client to be able to update the content themselves.
Would it be better to create a very simple custom admin page for the client to log in and say add a news story etc or would it be best using a fully fledged CMS like Drupal etc which seems overkill to me.
instead of SELECT * FROM mytable, i would like to select all fields EXCEPT one (namely, the 'serialized' field, which stores a serialized object). this is because i think that losing that field will speed up my query by a lot. however, i have so many fields and am quite the lazy guy. is there a way to say...
`SELECT ALL_ROWS_EXCEPT(serialized) FROM mytable`
?
thanks!
I'm new to Git. Let's say Alice and Bob had been developing their project by using two Git repositories for each. And, Alice at certain times want to set up a new repository to manage their common progress. Do you think what is the best way to replace remote.origin.url in the configuration of Git?
to replace by git config --replace
to create new repos by git clone MAIN_REPOS
or any?
Is there a way to use jQuery (or generic javascript) to disable CSS inheritance on a block level? For example, if I am pulling in an external resource via javascript, say pastie.org, they will have their own CSS that my CSS overrides. I would like to place the embed code into its own container that has CSS inheritance disabled.
This is not my own CSS structure, so I can't rename IDs Classes or inline anything to make it work, the holy grail of inheritance blocking is my last resort.
I am curious learner of Java, I was thinking on one topic "CONSTANTS"
I have learnt that Java allows us to declare constants by using "Final" keyword.
My question is Java didnot introduce Constant(Const) Keyword. Since many people say it has come from C++, in C++ we have Const keyword
Is there any strong reason behind, Please share your thoughts on this.
is it possible to say output the current consumption of CPU and memory in ruby script ?rub
i am trying to find memory leaks in my jruby sript.
CPU usage keeps going up to 100% until it crashes.
I am attempting to to use python to gain some performance on a task that can be highly parallelized using http://docs.python.org/library/multiprocessing.
When looking at their library they say to use chunk size for very long iterables. Now, my iterable is not long, one of the dicts that it contains is huge: ~100000 entries, with tuples as keys and numpy arrays for values.
How would I set the chunksize to handle this and how can I transfer this data quickly?
Thank you.