Skip to main content

Questions tagged [null]

This tag should be used for questions where you are handling null variables or values.

4 votes
3 answers
165 views

I have a list with some nan values, out of which some are continuous, e.g.: list = [1, 2, 3, np.nan, np.nan, 6, 7, np.nan, 9, np.nan,np.nan,np.nan, 12] For some ...
Ranjan Kumar Sahu's user avatar
10 votes
3 answers
6k views

While introducing nullable reference types to our enterprise application's codebase, I found that we are often using LINQ on sequences of nullable reference types where we filter out the nulls using <...
Palec's user avatar
  • 201
3 votes
1 answer
1k views

At work we are using Xamarin.iOS for our apps. We frequently have to fight it's disadvantages, namely it's memory leak issues where strong cyclic references keep objects alive and prevent them from ...
Frederik Hoeft's user avatar
0 votes
1 answer
114 views

This is a follow-up question for Android app class serialization. The implementation of User class has been updated and the functionality of null string checking, ...
JimmyHu's user avatar
  • 7,575
2 votes
1 answer
192 views

I'm new to C# and would appreciate any feedback you might have on the following doubly-linked list implementation, particularly WRT the following language features: Exception handling Debug.Assert ...
Manningham's user avatar
9 votes
3 answers
3k views

Uncaught TypeError: document.getElementById(...) is null I have a single JavaScript file that is connected to multiple pages. The below snippet is a function that is used for a single page. The above ...
user avatar
14 votes
6 answers
3k views

I am working on a C# application and I want to support multiple themes, so I wrote a ThemeManager class that can check, load and apply a specific theme. A theme is ...
Frederik Hoeft's user avatar
2 votes
0 answers
378 views

There has been ongoing concern about the question of awaiting a task that could possibly be null, as when using null-coalescing operators. Consider the following: ...
Kyle Delaney's user avatar
3 votes
1 answer
117 views

I was working to upgrade some code to C# 8.0 and came across an interesting pattern with default parameters and non-nullable reference types. I'm working if it's clear enough to the caller. Given ...
Daniel A. White's user avatar
-2 votes
1 answer
144 views

How could I refactor this code to get it more cleaner: ...
Roxy'Pro's user avatar
  • 159
6 votes
5 answers
446 views

Because I often have to deal with two Variants that may or may not be Null, we need a null-safe equality test, so I came up with ...
this's user avatar
  • 2,039
6 votes
2 answers
21k views

I have a class LoanAccount that contains an attributes creationDate and loanAmount. I ...
Cristian Iacob's user avatar
2 votes
3 answers
2k views

Here is a shortest possible syntax for replacing whitespaces with null and throwing an exception where it is not allowed: ...
Dmitry Nogin's user avatar
  • 6,131
5 votes
2 answers
840 views

There is A LOT of information online stating that you should NEVER catch a NullPointerException. Generally I agree, but I am wondering about this one case. I have inherited code that requires me to ...
TCCV's user avatar
  • 169
6 votes
4 answers
3k views

I've found the following code invaluable in helping me 'handle' None values including "whitespace" characters that should be treated as None based on the situation. I have been using this code for ...
lb_so's user avatar
  • 61

15 30 50 per page
1
2 3 4 5
11