|
In SQL server if you have nullParam=NULL in a where clause, it always evaluates to false. This is counterintuitive and has caused me many errors. I do understand the IS NULL and IS NOT NULL keywords are the correct way to do it. But why does SQL server...
Started by Byron Whitlock on
, 10 posts
by 10 people.
Answer Snippets (Read the full thread at stackoverflow):
That NULL of NULL you think of “NULL” (string) then you probably want a different test of equality like
For non-null ....
Is null is comparing the state of the variable
Here I will hopefully clarify my position.
|
|
Hi,
Currently I am doing a very basic OrderBy in my statement.
SELECT * FROM tablename WHERE visible=1 ORDER BY position ASC, id DESC
The problem with this is that NULL entries for 'position' are treated as 0. Therefore all entries with position as NULL...
Started by JonB on
, 5 posts
by 5 people.
Answer Snippets (Read the full thread at stackoverflow):
position 's in the db.)
You can use the COALESCE function to check if the position index is NULLYou can swap out instances of NULL with a different value to sort them first (like 0 or -1) or last (a large number or a letter)...
|
|
I have some JavaScript objects such as this (it's psuedo so I know if syntax is wrong):
[{ "divid":"1","x1":"35","y1":"100","height":"150","width":"150" }, { "divid":"2","x1":"45","y1":"110","height":"150","width":"150" }, { "divid":"3","x1":"55","y1"...
Started by Joshua on
, 4 posts
by 4 people.
Answer Snippets (Read the full thread at stackoverflow):
An easy way to do this might be to absolute position some dynamically created divs and assign=what.offsetParent; while (parentEl!=null){ totaloffset=(offsettype=="left")? totaloffset+parentEl.offsetLeft.
|
Ask your Facebook Friends
|
Are there any drawbacks if you use setLayout(null) for say JFrame and use setBounds method to set the positions of components in that JFrame. GUI prospect.
Started by stillStudent on
, 3 posts
by 3 people.
Answer Snippets (Read the full thread at stackoverflow):
The only time I have ever had a reason to use a null layout to control the position through the....
Read managers to get your desired effect.
When the user resizes the JFrame, you'll be disappointed! Otherwise, a null layout is fine.
|
|
Hi everyone, I have some questions in C#
what are the differences between null comparisons null == value and value == null (value is a variable of any kind: int, string, float,...)
I heard that using prefix increment ++i instead of i++ in some case will...
Answer Snippets (Read the full thread at stackoverflow):
In one example x is null, in the other y is null
2: not in C#
3: use neither; int is never null; just return 2.2; - but historically , in C/C++ the null == val is preferred to avoid the mistype bug null = val ; in C....
|
|
I'm toying with the idea for my text input box of clicking on a div containing a selection of "tags" to add meta content. My text input has a width of 35, but I want it to be able to overflow.
I've searched and found methods to focus and position my caret...
Started by Saul on
, 3 posts
by 3 people.
Answer Snippets (Read the full thread at stackoverflow):
) { var elem = document.getElementById(elemId); if(elem != null) { if(elem.createTextRange) { var"); evt.initKeyEvent("keypress", true, true, null, false, false, false, false, 0, 32"); evt.initKeyEvent("keypress", true, true, null....
|
|
In the early days of C++ when it was bolted on top of C, you could not use NULL as it was defined as (void*)0. You could not assign NULL to any pointer other than void*, which made it kind of useless. Back in those days, it was accepted that you used ...
Started by camh on
, 17 posts
by 17 people.
Answer Snippets (Read the full thread at stackoverflow):
I prefer NULL because it documents ....
I think the standard guarantees that NULL == 0, so you can do either.
Here's Stroustrup's take on this: http://www.research.att.com/~bs/bs_faq2.html#null
That said, don't sweat the small stuff.
|
|
I've run into an odd problem with a legacy ASP application that uses Oracle 9i as its database. We recently had the DBA increase the size of a VARCHAR2 field from VARCHAR2(2000) to VARCHAR2(4000). The problem is that a NULL byte (ASCII: 0) is inserted...
Started by Tim Lowes on
, 4 posts
by 4 people.
Answer Snippets (Read the full thread at stackoverflow):
That will create a trace file on the server which will contain the bind value (so you can see whether the null.
|
|
Strncpy supposedly protects from buffer overflows. But if it prevents an overflow without null terminating, in all likelyhood a subsequent string operation is going to overflow. So to protect against this I find myself doing
strncpy( dest, src, LEN );...
Started by Timothy Pratley on
, 13 posts
by 13 people.
Answer Snippets (Read the full thread at stackoverflow):
:
/* copy N "visible" chars, adding a null in the position just beyond them */ #define MSTRNCPY( dst that specifies the maximum length of the target variable, ensure that all strings are null-terminated *sSrc, size_t count) { // No....
|
|
I've often wondered why languages with a null representing "no value" don't differentiate between the passive "I don't know what the value is" and the more assertive "There is no value." .
There have been several cases where I'd have liked to differentiate...
Started by A J Lane on
, 28 posts
by 28 people.
Answer Snippets (Read the full thread at stackoverflow):
Javascript actually has both null and undefined ( http....
It may help you with what you are trying to achieve .
In most programming languages null means "empty at the Null Object pattern .
In 'safe' blocks), "object? o" won't compile.
|