16,361 questions
- Bountied 0
- Unanswered
- Frequent
- Score
- Trending
- Week
- Month
- Unanswered (my tags)
-2
votes
1
answer
176
views
Updating a table with CASE
In this example I wanted to replace every NULL value in the Quantity column with the mean of the column. I'm using CASE here to achieve that but what ends up happening is instead of replacing NULL ...
14
votes
2
answers
792
views
Is there a way to have an implicit conversion operator from `null` without specifying the type of `null`?
I have a struct that I allow implicit conversion from string or StringBuilder.
public ref struct StringParam
{
private string s;
private StringBuilder sb;
public static implicit operator ...
3
votes
1
answer
133
views
what does assignment to $null do in ($var=$null="...")
I saw in a script this kind of command:
Write-Verbose -Message ($var=$null="foo=$(<some computation>)")
<do something more with $var>
What is the point of assigning the string ...
1
vote
2
answers
118
views
Unity gameobject destroyed and returns "null" but still returns "obj == null" as false
I have a class for lists called UniqueListWithActions<T> with the constructor method
public UniqueListWithActions(List<T> _list)
{
list = _list;
}
list is declared as
...
-7
votes
1
answer
74
views
BigQuery: How to replace 0 values with NULL in a column? [closed]
I’m trying to clean a BigQuery weather dataset where missing values were entered as 0. My UPDATE query to replace 0 with NULL is throwing an error. How can I correctly convert these zeroes to null ...
Best practices
1
vote
4
replies
119
views
What's the recommended way to handle situations where references are possibly null, but if they're null the program is fundamentally flawed anyway?
Imagine I have a field with signature static string[]? foodItems that is initialized to null. During the course if the program I will assign a value to that field, and sometime later I will ...
3
votes
5
answers
270
views
Why does strlen(NULL) cause a compile-time warning, while my custom ft_strlen(NULL) only crashes at runtime?
I'm trying to reimplement the standard strlen function in C, and I'm closely replicating its behavior. I defined my function based on standard C declaration for strlen:
size_t ft_strlen(const char *s);...
0
votes
0
answers
38
views
Annotation to tell null-checking a property is not null?
Consider this code (C# 12/.NET 8):
class Content
{
public string Value { get; set; }
}
class Something
{
public bool IsOK { get; set; }
public Content? TheContent { get; set; }
}
...
0
votes
0
answers
73
views
How can I fix error Notice: Trying to access array offset on value of type null in Prestashop 1.7.8.11
I'm configuring Prestashop 1.7.8.11 and when I click in the checkout for process to payment, I get this error:
in 5e15b4d1179cdfd15539bcc9dbefe763da3b3d2b_2.file.cart-summary-totals.tpl.php line 77
at ...
0
votes
1
answer
85
views
ActivityRecognitionClient.requestActivityUpdates succeeds, but BroadcastReceiver never receives updates (Android 15)
Problem
I call ActivityRecognitionClient.requestActivityUpdates and get success, but my BroadcastReceiver never gets any intents. No activity logs appear even after moving with the device for 30–60s.
...
0
votes
0
answers
23
views
Tableau geojson map not showing with null rows
In Tableau I have a geojson file that has coordinates for a building and all the rooms inside. I also have occupancy data for each room every half hour period. I have joined the data sources in ...
3
votes
2
answers
196
views
C macro to compute array length that returns 0 for NULL
I am writing hardcoded calls of functions that takes array(s) in parameter, e.g.
int foo(size_t length, const int array[/* length */]);
In order to avoid the error-prone process of keeping track of ...
0
votes
1
answer
75
views
Null exception in XAML [closed]
This isn't so much a problem, but rather an annoyance... I've put together a conditional class to show different views dependent on which radio button is selected. It works as expected, but I can't ...
0
votes
2
answers
163
views
How can I call free and set the pointer to NULL inside a function correctly and why?
I am confused about &str[0], which is equal to str.
If I can do str = NULL, why can’t I do &str[0] = NULL or why does it not work?
Also, since free(str) and free(&str[0]) both work to free ...
0
votes
1
answer
81
views
PostgreSQL `null` value in JSON column not filtered by `IS NOT NULL` as expected
(PostgreSQL version: 15.10)
I am trying to query a table with a nullable json-type column. Here is the simplified table description:
db=> \d tablename
Table "public....