null Questions

34

Solved

How do I determine if a variable is undefined or null? My code is as follows: var EmpName = $("div#esd-names div#name").attr('class'); if(EmpName == 'undefined'){ // DO SOMETHING }; &lt...
Baneful asked 15/4, 2010 at 18:12

9

Solved

How do I check a variable if it's null or undefined and what is the difference between the null and undefined? What is the difference between == and === (it's hard to search Google for "===" )?
Longinus asked 24/2, 2011 at 8:10

6

Solved

I ran into code similar to this today. SELECT AuditDomain, ObjectId, AuditSubdomain = CONVERT(VARCHAR(50), NULL), SubDomainObjectId = CONVERT(INT, NULL) FROM Audit It seems to imply that dat...
Drift asked 26/3, 2013 at 21:16

7

Solved

I quite often come across data that is structured something like this: employees <- list( list(id = 1, dept = "IT", age = 29, sportsteam = "softball"), list(id = 2, dept = "IT", age = 30...
Soapbox asked 4/4, 2014 at 18:15

16

Solved

Should you set all the objects to null (Nothing in VB.NET) once you have finished with them? I understand that in .NET it is essential to dispose of any instances of objects that implement the ID...
Centurion asked 5/8, 2008 at 20:14

11

Solved

Theoretically I can say that free(ptr); free(ptr); is a memory corruption since we are freeing the memory which has already been freed. But what if free(ptr); ptr=NULL; free(ptr); As the...
Subtle asked 21/12, 2009 at 7:43

3

Solved

I have a dataframe with "id" column and a column which has an array of struct. The schema: root |-- id: string (nullable = true) |-- desc: array (nullable = false) | |-- element: struc...
Grille asked 7/5, 2018 at 13:17

6

Solved

When using the Java 8 Optional class, there are two ways in which a value can be wrapped in an optional. String foobar = <value or null>; Optional.of(foobar); // May throw NullPointerExcepti...
Squally asked 29/7, 2015 at 9:30

10

If entity.getHistory() is null following code snippet: (getEntityManager() returns spring injected EntityManager, database field history type is: text or varchar2(2000) Query query = getEntityMan...
Paucity asked 21/11, 2011 at 11:38

9

Solved

When using integer columns is it better to have 0 or NULL to indicate no value. For example, if a table had a parent_id field and a particular entry had no parent, would you use 0 or NULL? I hav...
Softfinned asked 16/2, 2011 at 11:44

2

Solved

edit: Stupid. The problem was that I got a string with value 'null' How to compare for null in groovy correctly? I've got the following script println "row6: " + row[6] if(row[6] == null) { ...
Forficate asked 19/12, 2014 at 9:37

7

Solved

I have a lot of comparisons that I need to make between a value and its previous value. For Example: ReceivedBy and PreviousReceivedBy. I started with: WHERE ReceivedBy != PreviousReceivedBy B...
Nim asked 18/6, 2018 at 20:40

9

Solved

I'm having a problem where when I try to select the rows that have a NULL for a certain column, it returns an empty set. However, when I look at the table in phpMyAdmin, it says null for most of th...
Hayley asked 21/8, 2010 at 6:50

8

Solved

This code: SELECT JSON_EXTRACT('{"hello": null}', '$.hello') Returns null. However, this is not the MySQL native NULL. For example, this: SELECT COALESCE(JSON_EXTRACT('{"hello": null}', '$.hel...
Euterpe asked 13/6, 2016 at 17:21

7

Solved

I need to declare a type such that removes the undefined from its property types. Suppose we have: type Type1{ prop?: number; } type Type2{ prop: number | undefined; } type Type3{ prop: numb...
Demurral asked 29/10, 2018 at 16:34

10

Why does the second one of these produce an exception while the first one doesn't? string s = null; MessageBox.Show(s); MessageBox.Show(s.ToString()); Updated - the exception I can understand, t...
Kisumu asked 25/1, 2011 at 12:39

6

Solved

Spark 2.4 introduced new useful Spark SQL functions involving arrays, but I was a little bit puzzled when I found out that the result of select array_remove(array(1, 2, 3, null, 3), null) is null a...
Deluge asked 12/1, 2019 at 13:17

5

Solved

I have a simple post that works in a test app Controller Code public ActionResult Delete(string Id) { ... delete record ... } JavaScript function delAnnouncement(id) { $.ajax({ type: "POST"...
Vector asked 31/7, 2014 at 3:11

6

Solved

I've recently discovered that this: if (Foo() != null) { mymethod(); } can be rewritten as: Foo?.mymethod() Can the following be rewritten in a similar fashion? if (Foo == null) { throw new Exc...
Gehenna asked 17/2, 2016 at 23:44

6

I have a nested for ... in loop in Vue.js. What I'm trying to do is to skip elements if the value of the element is null. Here is the Vue template code: <ul> <li v-for="item in items...
Messina asked 24/3, 2016 at 16:48

2

Solved

I use Kotlin to Programm Android Apps. For null-pointer safety one needs to check if all references are non-null. However if only one is null then we should inform the user that something went wron...
Pour asked 7/10, 2018 at 14:15

1

My visual's x-axis is Date, aggregated by month, and the y-axis is total sales (sum of costs). For some months, I had no sales, but Quicksight ignores these and only shows me the months that do hav...

10

Solved

I have a function which I have written which basically looks like this: function getNextCard(searchTerms) { // Setup Some Variables // Do a bunch of logic to pick the next card based on termed ...
Verticillaster asked 23/6, 2016 at 0:53

5

Solved

I wish to model a value which can have two possible forms: absent, or a string. The natural way to do this is with Maybe String, or Optional<String>, or string option, etc. However, Go does ...
Washy asked 9/6, 2015 at 12:10

3

Uncaught (in promise) TypeError: Cannot convert undefined or null to object at Function.keys (<anonymous>) at companion-bubble.js:1465:19726 at Generator.next (<anonymous>) at Ln (c...
Hoffmann asked 13/12, 2022 at 5:49

© 2022 - 2024 — McMap. All rights reserved.