Questions tagged as 'null'

6
answers

What does NULL actually mean?

Many people talk about what is NULL, but after all, what is its true meaning?     
asked by 02.10.2015 / 18:46
5
answers

How to test null values in JavaScript

I found the following code, and I got the impression that it did not make much sense. function (data) { if (data != null && data !== undefined) { // codigo } } From here, three different scenarios can happen: Th...
asked by 25.02.2014 / 22:34
2
answers

What is the difference between "NULL", "\ 0" and 0?

Both are worth zero. Can I always use the 3 interchangeably?     
asked by 16.01.2017 / 11:51
4
answers

Should I initialize strings (or objects in general) with null?

I have noticed that a common practice among programmers is to initialize an attribute of a class with null . Is this a good practice or not? Is there any difference between initializing with null or not initializing "at all"? Exampl...
asked by 15.01.2016 / 14:28
2
answers

What is the purpose of the = operator in MySQL?

SELECT * FROM 'client' WHERE avatar <=> NULL This returned the only two items you have in the database, both for <=> and = . Another test I did was with <=> , which returns all items that the =...
asked by 09.06.2017 / 21:46
4
answers

Avoiding the error "Can not read property 'c' of undefined"

Considering the following code: var a = {}; if (a.b.c !== undefined) { console.log("definido!"); } else { console.log("indefinido!"); } Is there any way to check each property without having to test one by one? What I...
asked by 20.02.2017 / 19:20
3
answers

Why in so many ways check if a value is NULL? How to standardize?

There are certain things that still do not come into my head in relation to PHP. Because there is the is_null function, when we can simply compare the values through a comparison operator. Such as $variable === NULL ? And why...
asked by 24.02.2015 / 13:14
1
answer

Access null pointer is not generating error

Testing the code below, I noticed strange behavior. It is working when it should not. The correct thing, in my view, was to give a segmentation fault and abort, but it looks like the compiler is doing some magic to fix the code. What happens?...
asked by 09.08.2016 / 17:37
2
answers

Do I need to assign null to a variable after use?

Is there a need to assign null to the object after its use? In the example below right after using the list I have a method that takes a long time to run. Do I need to assign null to the list to optimize the application? priva...
asked by 20.01.2017 / 17:35
3
answers

Check if int is "null" in C #

In C # it is not possible to assign null to an integer value ( int , not int? ). However, how can I tell if an integer value ( int ) has not yet had an assigned value (being int )? int? valor; if (valor == nul...
asked by 15.08.2017 / 17:10