Does java have a using clause?
I've seen reference in some C# posted questions to a "using" clause. Does java have the equivalent? ...
I've seen reference in some C# posted questions to a "using" clause. Does java have the equivalent? ...
I'm not sure if this even exists or not, so I figured I would tap the wisdom of others.. I was wondering if there are any Java libraries out there that can be used to validate a SQL query's syntax. I know that there are many deviations from common SQL spec, so it would probably only work against something like SQL:2006, but that would ...
The other day I was working on project, and ran into a weird bug. I called a function, and it was only returning the first character from the string which it should have been returning. After trying a hundred different things, refactoring my code, stepping through the code in the debugger many times, and even having a co-worker look into...
EDIT: This question is more about language engineering than C++ itself. I used C++ as an example to show what I wanted, mostly because I use it daily. I didn't want to know how it works on C++ but open a discussion on how it could be done. That's not the way it works right now, that's the way I wish it could be done, and that would brea...
Hi, I'm currently generating SQL insert statements from more than one tables, and in the generated data I need to use a CASE statement, like this: select 'INSERT INTO TABLE1 (f1, f2, f3, f4 ...) values (' ||t.f1||',' ||CASE WHEN t.f2 > 0 THEN '1' ELSE '0' END CASE from table2 t , table...
If I have two dates (ex. '8/18/2008' and '9/26/2008') what is the best way to get the difference measured in days? ...
Given a database field named "widget_ids", containing data like "67/797/124/" or "45/", where the numbers are slash separated widget_ids... how would you make an update statement with SQL that would say: "if the widget_ids of the row with id X contains the text "somenumber/" do nothing, otherwise append "somenumber/" to it's current valu...
What is the difference between declaring a method in a base type "virtual" and then overriding it in a child type using the "override" keyword as opposed to simply using the "new" keyword when declaring the matching method in the child type? ...
What Javascript libraries can you recommend for syntax highlighting <code> blocks in HTML? (One suggestion per answer please). ...
I've read some of the recent language vs. language questions with interest... Perl vs. Python, Python vs. Java, Can one language be better than another? One thing I've noticed is that a lot of us have very superficial reasons for disliking languages. We notice these things at first glance and they turn us off. We shun what are probabl...
Quite often in ANSI C code I can see parenthesis sorrounding a single return value. Like this:- int foo(int x) { if (x) return (-1); else return (0); } Why use () around the return value in those cases? Any ideas? I can see no reason for that. ...
You know the ones that make you go WTH and are easily spotted by a coworker just passing by? Please keep it one gotcha per answer to simplify voting. ...
Let me apologize in advance for the simplicity of this question (I heard Jeff's podcast and his concern that the quality of the questions will be "dumbed down"), but I'm stuck. I'm using AquaData to hit my Informix DB. There are quirky little nuances between MS SQL and Informix SQL. Anyway, I'm trying to do a simple nested expression ...
I would like to use VB9 but am not sure what syntax to use to say that I want a variable to be statically typed as in C#'s: var foo = new Whatever(); In previous versions of VB: Dim foo = New Whatever() created a dynamically typed variable. Is there a way to get static typing without actually writing the type in VB9? ...
I am creating some build scripts that interact with Perforce and I would like to mark for delete a few files. What exactly is the P4 syntax using the command line? ...
I need a complete Object Pascal syntax (preferably Delphi 2009). Some of the syntax is given by the help files, but not all information is provided. So I started collecting loose bits of information. Recently I added these to a more or less complete syntax description (EBNF like). Although it looks extensive, there are still bugs and I'...
Is it possible to check a bash script syntax without executing it? Using Perl, I can run perl -c 'script name', is there any equivalent command for bash scripts? Thanks. ...
I have a stored procedure with the following header: FUNCTION SaveShipment (p_user_id IN INTEGER, p_transaction_id IN INTEGER, p_vehicle_code IN VARCHAR2 DEFAULT NULL, p_seals IN VARCHAR2 DEFAULT NULL) RETURN INTEGER; And I am having trouble running it from TOAD's Editor. I cannot run it as part of a select from dual statement becaus...
We're all familiar with the pre- and post-increment operators, e.g. c++; // c = c + 1 ++c; // ditto and the "combined operators" which extend this principle: c += 5; // c = c + 5 s .= ", world"; // s = s . ", world"; e.g. PHP I've often had a need for a 'post-combined operator', which would allow: s =. "Hello "; // ...
I am trying to match floating-point decimal numbers with a regular expression. There may or may not be a number before the decimal, and the decimal may or may not be present, and if it is present it may or may not have digits after it. (For this application, a leading +/- or a trailing "E123" is not allowed). I have written this regex...