We have a REST API that works great. We're refactoring and deciding how to internally handle errors by the users of our API.
For example the user needs to specify the "movie" url parameter which should take the value of "1984", "Crash", or "Avatar". First we check to see if it has a valid value.
What would be the best approach if the...
I've got a document fragment with children that I want to loop over (when possible). This is causing an error "Cannot read property 'xxx' of null".
How do I test if this will be the case?
...
Hi. First of all, sorry about the title -- I couldn't figure out one that was short and clear enough.
Here's the issue: I have a list List<MyClass> list to which I always add newly-created instances of MyClass, like this: list.Add(new MyClass()). I don't add elements any other way.
However, then I iterate over the list with foreach and...
My colleague wrote the following stackoverflow question:
other stack overflow question on this topic
The question seems to have been misinterpreted and I want to find out the answer, so I'm starting this new question... hopefully a little more clear.
Basically, we have a REST API. Users of our API call our methods with parameters. Bu...
Using a ssrs 2005 matrix client side. I want to list the multiple addresses of one person, hence one row, multiple columns. The Column field is =Fields!StreetName.Value. The data details field is =First(Fields!StreetPrefix.Value) & " " & First(Fields!StreetName.Value). The datasource has a row for each address; however, some rows will ha...
how can i do the code
static string BuildMenu(List<Menu> menu, int? parentId)
{
foreach (var item in menu.Where(i => i.ParentMenu == parentId || i.ParentMenu.MenuId == parentId).ToList())
{
}
}
return BuildMenu(menuList,null);
so if parentId==null then return only records i =>...
I'm wondering about what the C++ standard says about code like this:
int* ptr = NULL;
int& ref = *ptr;
int* ptr2 = &ref;
In practice the result is that ptr2 is NULL but I'm wondering, is this just an implementation detail or is this well defined in the standard?
Under different circumstances a dereferencing of a NULL pointer should re...
I'm attempting to write an ASCII null character (nul) to a file from a Windows batch script without success. I initially tried using echo like this:
echo <Alt+2+5+6>
which seems like it should work (typing <Alt+2+5+6> in the command window does write a null character - or ^@ as it appears), but echo then outputs:
More?
and hangs un...
Hello!
I have a fact table that has a column with dates loaded from an MS Access source. The thing is, some of the values are NULL and the SSAS won't let me refer my DATE dimension to it.
Is it better to solve it at the SSIS stage or is there some solution at the SSAS?
Thank you very much for you help.
...
I have a <script> that contains this line:
var tbl = document.getElementById("<%= this.tblSelection.ClientID %>");
... but tbl always ends up being set to null.
The table is declared like this:
<asp:Table ID="tblSelection" runat="server" CellPadding="2" CellSpacing="0"
cols="1" style="position: absolute; top: 0%; right: 0%">
...
The always interesting issue of NULL Vs Blank is driving me bit crazy now.
I have two ESQL/C structures that represent two tables. I'm fetching a row from
one table in a cursor. Using the values of two fields from this fetch, I will retrieve
a row from another table. I know before hand the second fetch will definitely return one row.
N...
Item in the recordset rstImportData("Flat Size") is = Null
With that, given the following statement:
IIF(IsNull(rstImportData("Flat Size")), Null, cstr(rstImportData("Flat Size")))
Result: Throws error 94: Invalid use of Null
If I change the statement by removing the type conversion upon a false comparison:
IIF(IsNull(rstImportData(...
Here's my code:
<ComboBox Grid.Column="1" Grid.Row="9" ItemsSource="{Binding Path=PriorityEntries}" SelectedItem="{Binding Path=Priority,Mode=TwoWay}"/>
The comboBox is bound properly with PriorityEntries, and when i change the value of the comboBox the "set" of the bound property(Priority) is called setting it to what it needs to be....
Currently, I use a very conservative way to stop malfunctioing code. It is annoying at the time of a change when I have to change the checker parts as well.
if(ds==null||s==null||maxDs==null)
{
System.out.println("NULL in getDirs(ds[],s,maxDs)");
System.exit(9);
...
Is there a way I can check to see if a value is NULL/Nil before assigning it to a BOOL?
For example, I have a value in a NSDictionary that can be either TRUE/FALSE/NULL
mySTUser.current_user_following = [[results objectForKey:@"current_user_following"]boolValue];
When the value is NULL I get the following error
*** Terminating app ...
I have a very basic AJAX function in JQuery:
$.ajax({
url: "http://www.google.com",
dataType: "html",
success: function(data) {
alert(data);
}
});
But the data is always an empty string, no matter what url I go to... Why is that? I am running this locally at http://localhost:3000, and am using JQuery 1.4.2.
...
Stupid question:
In SQL, I know I can do
UPDATE TableA SET MyColumn=NULL
But, how do I enter NULL into a cell graphically? I tried entering 'null' and 'NULL' and '' (nothing/empty string) into the MySQL Query Browser with no success.
...
I have a component mapped using Hibernate. If all fields in the component in the database are null, the component itself is set to null by hibernate. This is the expected behavior and also what I need.
The problem I have, is that when I add a bag to that component, the bag is initialized to an empty list. This means the component has a ...
I am converting a javascript/php/ajax application to use jQuery to ensure compatibility with browsers other than Firefox.
I am having trouble passing true, false, and null values using jQuery's ajax function.
Javascript code:
$.ajax
(
{
url : <server_url>,
dataType: 'json',
type : 'POST',
success : re...
This seems like a lot of work; to check for null each time an object is used.
I have been advised that it is a good idea to check for null pointers so you don't have to spend time looking for where segmentation faults occur.
Just wondering what the community here thinks?
...