Skip to main content
3 votes
5 answers
249 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);...
user31651582's user avatar
0 votes
0 answers
28 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; } } ...
Kjell Rilbe's user avatar
  • 1,623
0 votes
1 answer
39 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 proccess to payment, I recive this error: in 5e15b4d1179cdfd15539bcc9dbefe763da3b3d2b_2.file.cart-summary-totals.tpl.php line ...
Raul A.'s user avatar
0 votes
1 answer
66 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. ...
Devesh Singh's user avatar
0 votes
0 answers
15 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 ...
user7269149's user avatar
3 votes
2 answers
184 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 ...
talentless's user avatar
0 votes
1 answer
73 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 ...
Richard Harrison's user avatar
0 votes
2 answers
153 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 ...
iliass's user avatar
  • 19
0 votes
1 answer
60 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....
ddjanke's user avatar
  • 121
1 vote
1 answer
140 views

Nullable Analysis On Generic Types

I would like to setup an extension method to check if an IEnumerable is null or contains any null values. And make use of the method in nullable enabled code. For example: private static List<...
innominate227's user avatar
0 votes
0 answers
62 views

KQL mv-expand and null data

I am writing some KQL queries in Azure Resource Graph. In the simplified example below I have 3 VMs I want to extract the datadisks info from. In the below code VM1 has 0 data disks, VM2 has 6 and VM3 ...
Mark's user avatar
  • 1
-1 votes
2 answers
80 views

MySQL returning a NULL in a query for a column where the column actually contains a valid value [duplicate]

I'm storing data in a temp table inside a stored procedure. I query the table with no where clause and I can see the data inserted is correct. I then attempt a query against that data with a where ...
Rick Scero's user avatar
1 vote
1 answer
25 views

Null checks for record constructor arguments in Groovy

We are in the Groovy universe. Let's say I have a record like follows: record Person(String firstName, String lastName, String city) {} What is the shortest way to make sure that none of the three ...
Natasha's user avatar
  • 906
3 votes
2 answers
110 views

What is the difference between "let myVar: MyType | null" and "let myVar = null as MyType|null"?

I want to declare a variable inside some function as type MyType|null and I want to initialize it to null. This doesn't work as expected: const myVar:MyType|null = null This works perfect: const ...
pailhead's user avatar
  • 5,527
0 votes
0 answers
53 views

Why the destructor pointer is null in construction vtable?

My code is below: class GrandParent { public: GrandParent() {} virtual ~GrandParent() {} int grandparent_data = 100; }; class Parent1 : virtual public GrandParent { public: Parent1() {}...
xxllxx666's user avatar
  • 373

15 30 50 per page
1
2 3 4 5
1091