statement (4,261)


vb6 - How to use a mutex in Visual Basic

I have imported the kernel32 library so I have the createMutex function available but I am not quite sure of the various parameters and return values. This is classic Visual Basic, not Visual Basic.N…


How do you get leading wildcard full-text searches to work in SQL Server?

Note: I am using SQL's Full-text search capabilities, CONTAINS clauses and all-the*is the wildcard in full-text, % is for LIKE clauses only. I've read in several places now that "leading wildcard…


Best Debugging Tools for JavaScript/xulrunner Development

In the past few months I began my first serious JavaScript development, as I began developing XUL applications. I use Notepad++ as my editor, but I was pretty appalled to find(as far as I can tell)…


SQL Case Expression Syntax?

What is the complete and correct syntax for the SQL Case expression?…


language agnostic - How do you handle huge if-conditions?

It's something that's bugged me in every language I've used, I have an if statement but the conditional part has so many checks that I have to split it over multiple lines, use a nested if statement o…


C# loop-break vs. continue

In a C#(feel free to answer for other languages) loop, what's the difference between break and continue as a means to leave the structure of the loop, and go to the next iteration? Example: foreach(Da…


algorithm - Two marbles and a 100 story building

One of those classic programming interview questions... You are given two marbles, and told that they will break when dropped from some certain height(and presumably suffer no damage if dropped from…


Insert Update stored proc on SQL Server

I've written a stored proc that will do an update if a record exists, otherwise it will do an insert. It looks something like this: update myTable set [email protected], [email protected] where [email protected] if @@rowcount…


How can I test STDIN without blocking in Perl?

I'm writing my first Perl app-- an AOL Instant Messenger bot that talks to an Arduino microcontroller, which in turn controls a servo that will push the power button on our sysadmin's server, which…


Refactoring away labeled loops

After I was convinced that labeled breaks/continues are a total "nono" over here, I need help to remove the label out of my code. I have a square matrix and a vector that has the same length. The vec…





multiple how sql with example java else for select case