I have a method that does some work on a DataTable e.g. private void MyMethod(DataTable table) { if(table.Rows.Count > 0) { // do some work } } However, if the method receives a null datatable from the application it serves I get an 'Object reference
I have the following string: < \0\"\0E\0x\0t\0e\0n\0s\0i\0b\0i\0l\0i\0t\0y\0,\0v\0e\0r\0s\0i\0o\0n\0=\0\\\0\"\07\0.\00\0.\03\03\00\00\0.\00\0\\\0\"\0,\0p\0u\0b\0l\0i\0c\0K\0e\0y\0T\0o\0k\0e\0n\0=\0\\\0\"\0B\00\03\0F\05\0F\07\0F\01\0
DF1 is ID CompareID Distance 1 256 0 1 834 0 1 946 0 2 629 0 2 735 1 2 108 1 Expected output should be DF2 as below (Condition for generating DF2 -> In DF1, For any ID if 'Distance'==1, put the corresponding 'CompareID' into 'SimilarID' column, for '
I have declared a class named Member. I then assigned an array with Member type. When I try to put things into the array, it gives me this error: Exception in thread "main" java.lang.NullPointerException at HW2_2.main(HW2_2.java:15) This is my c
I get an error undefined method 'email' for nil:NilClass when I try to access a post with a comment from a user that has been deleted in the DB. I wonder: how can I remove the comments that has been created by users who no longer exists "on the fly&q
Sorry if it has some obvious solution, but I am trying to solve it for hours but could not find a solution. I use several ComboBoxes in my WindowsFormsApplication to relate ids with names. The problem is that when a user select an item from the combo
I'm trying to append a number of NULL characters '\0' to a string in PHP. $s = 'hello'; while(strlen($s) < 32) $s .= '\0'; However, PHP adds 2 characters (\ and 0), instead of escaping the character and adding NULL. Does anyone know to add a NULL cha
I've got a C# string extension method that should return an IEnumerable<int> of all the indexes of a substring within a string. It works perfectly for its intended purpose and the expected results are returned (as proven by one of my tests, although
I have an SSIS package I am using to load a Fixed Width flat file. I have put in all the column lengths and have two packages against similar files working correctly. The third however keeps throwing the following error: [Source 1 [16860]] Error: Dat
I have a function that receive a JObject, and in one case the Json that I receive are this: {} and I was trying to manage with this: public void GetSomeJson(JObject request) { if (request==JObject.Parse("{}")) throw new ArgumentNullException(&qu
I am having trouble with the (hashTable[bucket][size] == null). I was wondering how you could check to see that slot is null if null is not of type int. Any ideas/tips? public void add(int n){ int bucket = hashF(n); int p=0; int size = hashTable[0].l
I have to create a template function that searches an element in a map variable. If the element exists, the function must return it. Otherwise i must return NULL. template <class K, class E> E dictionary<K,E>::research(K key){ //map<K,E>
I've got the problem that the following code snip returns null: System.out.println(Logic.class.getResource("effects\\newball.wav")); I have a source folder in my project called effects. in this folder there's the referred file. I think there's a
I'm having an issue parsing data after reading a file. What I'm doing is reading a binary file in and need to create a list of attributes from the read file all of the data in the file is terminated with a null byte. What I'm trying to do is find eve
I have a ListView with each row containing a TextView. On user click, I'm getting the value of the TextView and storing it in a String variable, and the user is navigated to another activity where he / she needs to input some data on said TextView. I
If I have a table where each row is a customer booking, is it OK to have 2 foreign keys in this table: one which will be null and the other referencing the primary key approriate. The reason I have two tables with the foreign key constraint applied t
I wrote the following C program. int main() { int i = 3; char *q = "hello"; char *p = NULL; return 0; } When I compile and debug it with gdb, I get the following reg information.. gcc main.c -g gdb a.out info reg: cs 0x33 51 ss 0x2b 43 ds 0x0 0
I store OpenGL identifier in variables of the type GLuint. But I do not know to what value I should initialize these variables. I would like to initialize them to zero, but unfortunately that is a valid identifier for OpenGL. The variables must be in
I have this table Equipment Activity Table CREATE TABLE EqpActivityTBL ( EqpAct_ID INT PRIMARY KEY IDENTITY(1, 1), EqpAct_BorrowDateTime DATETIME, EqpAct_ReturnDateTime DATETIME, EqpAct_Room VARCHAR(50), SysUser_ID INT FOREIGN KEY REFERENCES SysUserT
We are building a service for uploading zip-files containing an ESRI-shapefile. The service should be able to read the shapefile and do stuff with its content. So I've built a class that unzips the zip-file to temporary folder (subfolder of System.ge
string a=NULL; it gives error. Why and how can I initialize string as NULL? but when I write string a="foo"; this it works fine.Actually to get an empty std::string, you just write std::string a; std::string's default constructor will give you a
I have the following code: SELECT q25, ( ( AVG( q1 ) + AVG( q2 ) + AVG( q3 ) ) /3 ) AS Overall FROM t_results WHERE brand = 'XYZ' AND DATE = 'MAY2012' GROUP BY q25 ORDER BY Overall DESC LIMIT 1 If there is no data found by the query phpmyadmin return
In Sybase and MSSqlServer TransactSQL, we have a function IsNull(columnName,valueForNull) to return a typed default value when a column value is null. How can I replicate this functionality in SQLite? Example in TransactSQL: select IsNull(MyColumn,-1
After showing a camera, my objects return null: Here's how I show my UIImagePickerController (I initialize it before): [self presentModalViewController:pickerOne animated:NO]; I add a object in my scrollView like this, UIImageView *overlay = [[UIImag
I use parameter objects to encapsulate the parameters that are passed to my business rules. The rule is created using a context parameter, which may then be modified, then at a later time the rule is executed. Some of the properties of this object ar
I have the this method: public function search($searchKey=null, $summary=null, $title=null, $authors=null, $paginationPage=0) { ... } And I'm trying to retrieve all parameters with this: $Class = new Search(); // Get parameters $ReflectionMethod = ne
I'm quite new to ObjC and its mutable arrays. This is driving me crazy ;-) I do the following: mColumns = [NSMutableArray array]; for( int i=0; i<5; i++ ) [mColumns addObject:[[MyColumn alloc] init]]; After that code my array "mColumns" conta
My MySQL database has carefully defined fields. Some fields, if there is a chance that they can be unknown, allow a NULL value. I'm writing a web-based CMS to handle the data in said database. Obviously, the post arrays from the HTML forms never cont
Is there any difference in performance between the operator IS NULL and the function ISNULL()?Looking into the MySQL manual, they seem to be synonyms really. MySQL manual on IS NULL MySQL manual on ISNULL() and even if they aren't, I would tend to tr
are these two the same things? for(int i=0; i<array.length; i++){ array[i] = null; } and array = null; A small snippet to show the difference: // declare a array variable that can hold a reference. String [] array; // make it null, to indicate it doe