Hello,
I use 2 threads to act like a produce/consumer using double queue (http://www.codeproject.com/KB/threads/DoubleQueue.aspx). Sometimes in my 2nd thread, I get an object that is NULL but it should not be as I filled it in the first thread.
I tried this:
if(myObject.Data == null)
{
Console.WriteLine("Null Object") // <-- Breakpo...
I have a Stored Procedure as follows:
CREATE PROC [dbo].[Incidents]
(@SiteName varchar(200))
AS
SELECT
(
SELECT SUM(i.Logged)
FROM tbl_Sites s
INNER JOIN tbl_Incidents i
ON s.Location = i.Location
WHERE s.Sites = @SiteName AND i.[month] = DATEADD(mm, DATEDIFF(mm, 0, GetDate()) -1,0)
GROUP BY s.Site...
Hi all,
I have a question about case statements and nulls in a where clause.
I want to do the following:
Declare @someVar int = null
select column1 as a from
TestTable t
where column1 = case when @someVar is not null then @someVar else column1 end
Here is the problem:
Let's say @someVar is null. Let's also say that column1 from T...
Hi,
Can someone please provide me some solutions as i get null from an image when i tried to retrieve it from an url. It only happens to some images.
Here are my codes:
image = ImageOperations(this.getBaseContext(), "http://example.download/fairylando_sihc2nck_2.jpg", "image.JPEG");
LinearLayout filepanel = (LinearLayout) findView...
I have a getJSON call that is called back correctly, but the data variable is null. The python code posted below is executed by the getJSON call to the demandURL. Any ideas?
javascript:
var demandURL = "/demand/washington/";
$.getJSON(demandURL, function(data) {
console.log(data);
});
python:
data = {"demand_count":"one"}
json...
Note: This is homework/assignment feel not to answer if you don't want to.
Ok after some search and reading these:
http://stackoverflow.com/questions/425439/how-to-check-if-array-element-is-null-to-avoid-nullpointerexception-in-java
http://stackoverflow.com/questions/963936/gracefully-avoiding-nullpointerexception-in-java
http://c2.com...
Hello,
I'm working with Android 2.1 and have the following problem:
Using the method View.getDrawingCache() always returns null. getDrawingCache() should return a Bitmap, which is the presentation of View's content.
Example code:
public void onCreate(final Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setConten...
I would like to distinguish date at midnight (i.e. '12/05/2010 00:00:00') from date without time specified (i.e. '12/05/2010').
This value is provided by user, sometimes it is only date which is important, sometimes it is date and time and later the application is expected to show the time only when it was explicitly provided.
So for the...
In my current project it would be convenient to exclude empty strings from the domain, so that is an empty string is met wherever, it is treated as NULL, for example if I UPDATE [table] SET [Something]='', SQL Server should treat it as SET [Something]=NULL, so that in next SELECT a NULL is returned as [Something] value.
Should I use tri...
I have the following code:
private static LogLevel? _logLevel = null;
public static LogLevel LogLevel
{
get
{
if (!_logLevel.HasValue)
{
_logLevel = readLogLevelFromFile();
}
return _logLevel.Value;
}
}
private static LogLevel readLogLevelFromFile() { ... }
I get a ReSharper w...
There are three column in the datatable A,B and C. Now each column is type of decimal. Now I am doing like dt.Columns["A"].Expression="B+C"; to make addition of Column B's record and column C's record. Now if there is any value of B or C is null then addition of B and C will be null like B's value is 3 and C's value is null for first row...
I have a android app that is communicating with a server (written in java).
Between these two parts I have established a Socket connection and want to send data.
The problem I am having is that sometimes, for some users, the information that reaches the server is null.
This works (for all phones, all users):
Server:
int a = Integer....
I'm binding a DateTimePicker control to my dataset (which is linked to a database). However, unless the user changes the date on that control, the dataset seems to contain null for that entry (even though the Value entry of the control isn't null). I've done a bit of googling, and there's a lot of talk about people having troubles with...
Which approach is better to use:
BoundField.NullDisplayText isn't set. NULL-case is foreseen in SQL query, i.e. SELECT ISNULL(amount, 0) FROM table
or
BoundField.NullDisplayText is set, e.g. "0.00 %". NULL-case isn't foreseen in SQL query, i.e. SELECT amount FROM table
What do you think?
...
Hi!
I'm new to JSF, so this question might be strange. I have an inputText component's value bound to managed bean's property of type Float. I need to set property to null when inputText field is empty, not to 0 value. It's not done by default, so I added converter with the following method implemented:
public Object getAsObject(FacesC...
I want to test if an xml attribute is present. Given this:
XmlAttributeCollection PG_attrColl = SomeNodeorAnother.Attributes;
This first test works:
if (null != PG_attrColl["SomeAttribute"])
"GetNamedItem" is supposed to return null, but the following test throws an exception complaining about the null it returns.
if (null != P...
Comparable contract specifies that e.compareTo(null) must throw NullPointerException.
From the API:
Note that null is not an instance of any class, and e.compareTo(null) should throw a NullPointerException even though e.equals(null) returns false.
On the other hand, Comparator API mentions nothing about what needs to happen when c...
I know constructors don't "return" anything but for instance if I call CMyClass *object = new CMyClass() is there any way to make object to be NULL if the constructor fails? In my case I have some images that have to be loaded and if the file reading fails I'd like it to return null. Is there any way to do that?
Thanks in advance.
...
For what x is
The expression x IS NOT NULL is not equal to NOT(x IS NULL), as is the case in 2VL
(quote from this answer, which is quoting Fabian Pascal Practical Issues in Database Management - A Reference for the Thinking Practitioner -- near the end of that answer)
My guess is when x IS NULL is NULL, but I cannot guess when th...
I'm trying to use this api that lets you reference an exact text, but the getJson does not seem to be working, it's just returning null.
$.getJSON('http://api.biblia.com/v1/bible/content/KJV.json?key=MYAPIKEY=John+3:16-18&style=bibleTextOnly', function(data) {
alert(data);
});
I just took the key out, i've been testing it with m...