16,349 questions
0
votes
0
answers
47
views
How to tell if a `NULL` value means "no data" or "no such sensor" in wildcard queries in Apache IoTDB?
I'm confused about NULL handling in Apache IoTDB 2.0.6 Tree Model. When using wildcard queries across multiple devices, missing timeseries show as NULL - but this looks identical to intentionally ...
-4
votes
4
answers
278
views
Why can't a string_view be used as a condition expression?
In C++, pointers and optional's can both be used as the condition expression in an if statement:
auto *ptr = get_ptr();
if (ptr) { std::cout << "Yay, can use ptr!\n"; }
else { ...
3
votes
2
answers
163
views
Powershell Issue with change Password
I have a PowerShell script to change local Admin Password and output it in csv.
I am getting the error message:
Export-Csv : Cannot bind argument to parameter 'InputObject' because it is null.
At G:\...
2
votes
2
answers
171
views
How to simplify checking whether a reference variable is null?
I wrote a method that returns a reference to a variable (ref return), and sometimes the returned reference can be null. After calling this method I have to check if the reference is null, and I am ...
8
votes
3
answers
1k
views
Why does is.na(NULL) returns logical(0) and not FALSE?
I have a bug in one of my packages that I do not understand. I have an if() statement that checks for NA. In one case, the vector returned is NULL.
Why is is.na(NULL) returning an empty logical vector ...
0
votes
4
answers
109
views
Query a column which can be NULL and values, and only choose the largest value if possible [closed]
I have a table TB and a column fd, in which can be NULL or a string. Now I want to pull out the rows from TB on the condition of fd with the largest value. If only NULL in fd, then those rows with fd ...
0
votes
0
answers
18
views
How to properly handle consecutive NULL values in time series data?
I'm processing stock tick-by-tick quote data in DolphinDB and encountering numerous NULL values (caused by imbalanced bid/ask quotes). I've tried several methods to fill these NULL values, but none ...
-2
votes
1
answer
190
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 ...
15
votes
2
answers
854
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
145
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
158
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
...
Best practices
1
vote
4
replies
122
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
293
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
45
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; }
}
...
1
vote
1
answer
102
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 ...