Questions tagged [null]

Null means *nothing* or *unknown*, depending on context. Please use the "sql-null" tag for SQL specific questions.

3,211 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
11votes
0answers
776views

Kotlin feature like Typescript Partial?

tl;dr; What's the easiest way to convert data class User(val organization: Organization) to data class UserNullable(val organization: Organization?) so I have both available as options? Long ...
user avatar
  • 15.9k
9votes
0answers
2kviews

Android - openContactPhotoInputStream returns NULL for all contact photo IDs

After upgrading to Android 4.0 ICS, my app, which contains a contact list with images, stopped loading images for those contacts. After debugging it seems the following line always returns NULL now. ...
user avatar
  • 7,435
7votes
1answer
284views

Newtonsoft.Json.JsonConvert.SerializeObject of BsonDocument containing null value fails with an InvalidCastException

The following test snippet demonstrates an InvalidCastException occurring in SerializeObject when an object value is null or even BsonNull.Value. If the value is changed to 42, serialization works ...
user avatar
  • 330
7votes
2answers
3kviews

Selenium + PHPUnit: sessionId should not be null; has this session been started yet?

I'm running Selenium RC with PHP. I run a simple login test, that completes successfully, but just before closing the browser, I get the following error: 23:50:09.969 INFO - Command request: ...
user avatar
  • 83
6votes
0answers
4kviews

Quicksight not showing months with no data (null?)

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 have ...
user avatar
6votes
0answers
2kviews

nw_dictionary_copy called with null dictionary

Swift 5, Xcode 10 Xcode is logging a weird error that's only happening when I'm doing something really specific: My app connects to an FTP server after clicking on the "login" button but if there's ...
user avatar
  • 1,545
6votes
1answer
990views

Orika no mapping of null elements in list

I have the following class: public class A{ List<AA> aaList; public A(List<AA> aaList){ this.aaList = aaList; } //getters and setters + default constructor ...
user avatar
6votes
1answer
2kviews

Recyclerview crashes when removing last item. NullPointerException: android.view.ViewGroup$LayoutParams android.view.View.getLayoutParams()

I have a recyclerview, that is populated using an arraylist. When I remove an item from the list, it works fine, until the last item gets removed. Below is the code found in my recyclerview adapter, ...
user avatar
  • 1,221
5votes
2answers
336views

SQL Server grouping consider null as equals to all values

In SQL Server, I'm trying to group matching rows by ids. Null is considered a wildcard. Explanation: What does matching rows mean? Matching rows means – just if all columns of two rows match. Match ...
user avatar
  • 151
5votes
0answers
616views

Swift 3 base64 decode return nil

Despite all the methods I found on the internet. But it works through online translators. For example, a method I tried: if let decodedData = NSData(base64Encoded: parts[1] as String, options:NSData....
user avatar
5votes
1answer
302views

Variable not holding value

I'm working through a book that is helping me learn C#, and one of the projects is something like one of those old games one is taught in elementary powerpoint lessons. This particular example uses a ...
user avatar
5votes
1answer
677views

How to ignore a JPA ManyToOne property with null value on merge after JAXB deserialization?

Example use case: class Address { @XMLTransient @ManyToOne(cascade={}) private Person person; } In my use case Address is serialized to XML via JAXB, modified in another system, deserialized from ...
user avatar
5votes
1answer
126views

Kotlin compiler can't figure out that variable is not nullable in do-while loop

I have the following method. Its logic is very simple, if right is set then call left while it has a value (not null). When I write it in the following way, it works. fun goNext(from: Node): Node? { ...
user avatar
  • 874
5votes
2answers
459views

Why is assigned a nil to singleton's static variable

What is the advantage of using this: + (CardPainter*) sharedPainter { static CardPainter* sp = nil; if (nil == sp) { sp = [[CardPainter alloc] init]; } return sp; } instead ...
user avatar
  • 51
4votes
1answer
149views

What is the correct way to specify a null column with sequelize-typescript?

I cannot see any documentation on how to specify the javascript type of NULL columns in sequelize-typescript. For example (the default @Column is allowNULL=true): @Column my_property?: string | null ...
user avatar
  • 3,813
4votes
0answers
1kviews

Serializing Optional with Jackson: NON_ABSENT vs. configureAbsentsAsNulls and NON_NULL

When you want to serialize Optional with Jackson in Java, you must register the module Jdk8Module. This way, you either get the contained value or null. Now if you also set serialization feature ...
user avatar
  • 41
4votes
0answers
846views

Spring trying to set audit fields on null object

Spring-data-mongodb is trying to add createdDate to a null object and fails to do so. How do I configure spring audit to ignore null objects so it does not try to add audit fields to it? I have an ...
user avatar
4votes
1answer
307views

Json.NET C#: JToken.Parent is always null

I'm working on a Json.NET serialisation system that relies heavily on custom converters, contract resolver, and attributes. The system aims to handle reference deserialisation, including mutual ...
user avatar
4votes
1answer
278views

internet explorer FileReader result is null for big files

In internet explorer, when I'm trying to upload bigger video files (70MB), the FileReader.onload this.result (in my code: event.target['result']) is null. reader.onload = function (event) { if ...
user avatar
  • 179
4votes
0answers
63views

Postgresql: HAVING statement that skips rows which are null or empty?

Is there any way to skip rows that are null or empty? I could use some help with sorting the output of a subtable. My having statement is returning an error I can’t fix. It returns the error: ERROR: ...
user avatar
4votes
1answer
158views

Unable to access table cell after converting it to dataTables

I am using dataTable from https://datatables.net/ for a large table displayed in my webpage. From js, I want to constantly update the table cells. But, when JS tries to set document.getElementById('...
user avatar
4votes
0answers
128views

PowerShell function changes content of array argument

Some background: When an empty pipeline is assigned to a variable, the value is [System.Management.Automation.Internal.AutomationNull]::Value as explained here https://stackoverflow.com/a/22365076/...
user avatar
  • 1,253
4votes
3answers
4kviews

Show NULL values in result table when SQL query is executed

I have a script that executes SQL files and prints the result in the console (for now). The problem is that I need to make difference between the NULL values and the empty strings that are returned in ...
user avatar
  • 1,581
4votes
1answer
4kviews

EF Core insert null value to nullable column that has default value

I am curious about specific scenario in SQL when using EF Core. For example there is a column that allows null and at the same time has defalut value, it is unusual situation but that is not the issue ...
user avatar
  • 1,821
4votes
0answers
158views

Dropwizard 4.0.1: query param value parsing without using any annotation

To be specified, my question is how I can make "null" query parameter value to null. For example, I wrote my resource like this. @GET public FooView bar(@QueryParam("city") String name) { if ...
user avatar
  • 41
4votes
0answers
208views

Passing Options Into DataTable F#

let dataTable = new DataTable("mytable") dataTable.Columns.Add("bool_option_column") //typeof<bool option> dataTable.Columns.Add("int_column") I have a boolean option column. How do I allow ...
user avatar
  • 41
4votes
0answers
663views

NullPointer Exception when I try to work with dataframe in pyspark

I am trying to work with a dataframe in ZEPPELIN, using the pyspark interpreter. I executed the following commands: First of all, I create a dataframe getting the table TABLE of my database: %...
user avatar
  • 1,733
4votes
0answers
805views

Blocked a frame with origin "null" from accessing a frame with origin "null". When saving files on the same folder on my computer

Hello I'm currently working on a popup excercise where two windows would exhcange some text with each other. The main page is as follows Name: ch08_examp5.htm <!DOCTYPE html> <html> &...
user avatar
4votes
0answers
946views

Hive null values in external table using OpenCSVSerde

I have an input file with an optional column (it may be missing). On top of the file an external hive table was created using OpenCSVSerde. My column(TAUSER) is at the 10th position considering the ...
user avatar
4votes
2answers
1kviews

Empty Textbox still saves data in SQL Server even columns in table are not allowed null

I am facing this issue, when I click save button when all textboxes are empty it shows stars labels on all of them. When I fill last textbox leaving all others empty, it saves data into database with ...
user avatar
4votes
1answer
476views

Ruby-DBI MSSQL - When I try to make a select sentence, I only get nils as a results

I want to execute a simple query using Ruby-DBI, but all the results are nil. The query should return 6 rows that I have inserted into the DB. My code: conn = DBI.connect("DBI:ODBC:myODBC", user, ...
user avatar
  • 41
4votes
1answer
1kviews

listenUsingRfcommWithServiceRecord(...) returns null

My Bluetooth Server crashes when trying to create a Bluetooth Server socket. I already googled a lot and found several answers that I tried, but nothing worked. I tried the code on several different ...
user avatar
  • 1,055
4votes
0answers
289views

How does MongoDb sort work with list, empty list and null values?

We are using MongoDB 2.4.9 locally on our Ubuntu 12.04 machine. We put the following queries into mongo console (db.a is an empty collection): > db.a.insert({'a': null}) > db.a.insert({'a': [...
user avatar
4votes
0answers
1kviews

Jackson JSON detecting null and throwing error

How do I detect null in the JSON payload and throw an error that null can't be set? Example: public class Foo { @JsonDeserialize(using = XMLGregorianCalendarDeserializer.class) ...
user avatar
  • 1,105
4votes
2answers
710views

Passing SQL null as a SQL statement parameter value using the PostgreSQL libpqtypes PQputf or PQexecf functions

My friends, I desire to use the PostgreSQL libpqtypes library with an existing DB from a C app. One SQL statement I must execute is an insert to a table with an int column that is nullable. It has a ...
user avatar
4votes
1answer
1kviews

How to express 'null' value from web service as real null or empty string instead of 'null' string

In my application, I am using JSF and Java Web Services. When any of my web-service functions return a null value, it is always expressed as a "null" string. As a consequence, I cannot use EL ...
user avatar
  • 8,900
4votes
3answers
1kviews

PHP variables randomly becomes NULL

For quite a while now we experience a very weird problem with our hosting server. Once a while (seems randomly) variables in PHP become NULLs. In general everything works perfectly fine, but once a ...
user avatar
4votes
0answers
2kviews

Using NULL with Hibernate Filter and HQL

I am using Hibernate filters as defined below: @FilterDef( name = "DeptFilter", parameters = { @ParamDef(name = "schoolCode", type = "string"), @...
user avatar
4votes
1answer
2kviews

Symfony2 - Query Builder LIKE null values

I'm trying to build a dynamic query in response to a custom search from users. I have an issue: when I'm building the query, I don't have the results because the SELECT LIKE column comparison doesn't ...
user avatar
4votes
1answer
450views

How to shrink ibd files with BLOB fields?

I have a big table with BLOB fields that contain many NULL values. I enabled Multiple Tablespaces and got a separate ibd file for each table. The physical size of this table is much more than the size ...
user avatar
4votes
1answer
3kviews

Android - Drawing an image from assets, something weird is happening

I am loading an image from the assets folder to draw on a google map view as an overlay. In my try-catch statement, I attempt to load the image, otherwise return null. What i don't understand is, ...
user avatar
  • 683
3votes
1answer
4kviews

Flutter: Unhandled Exception: Null check operator used on a null value

I am practicing with SQFLite database in flutter App. I want to create a database where user can add friend's name and mobile number. And after adding this information, that information list will be ...
user avatar
  • 1,617
3votes
0answers
92views

Nginx log full of `NULL` characters

I'm running Nginx in a Docker container, and my error log keeps filling up with NULL characters, so it looks like this: I had Nginx and PHP containers both set to output errors to error.log. When I ...
user avatar
  • 5,330
3votes
0answers
226views

Why do MySQL 8 IF and IFNULL return a BLOB result when testing a variable with value NULL?

Note: I have moved the essence of this question to here having learned some of what is happening but still wanting to understand. (In essence, ISNULL and COALESCE behave unusually when a variable is ...
user avatar
  • 3,946
3votes
0answers
251views

Find NULL pointer dereferences for function parameters using clang static analyzer

I want to automatically find bugs where a potential NULL pointer is dereferenced. In particular, I want to check that all function in my project correctly handle NULL as value for pointers. Here is a ...
user avatar
3votes
3answers
775views

Logical operator && in JavaScript and it's C# equivalent

In JavaScritp operator && can be used to invoke functions like this possibleNull && possibleNull.do() This executes do() method of the possibleNull object only of possibleNull object ...
user avatar
3votes
1answer
6kviews

How to fix The mapper function returned a null value." error in Java / RxJava2 Null?

I hava some problem with RxJava2 and a stream (Observable and Observer) Actually, my stream return an error The mapper function returned a null value. io.reactivex.internal.functions.ObjectHelper....
user avatar
3votes
0answers
768views

How can I get Zapier MySQL "update row" to update a value in a row with a Null value?

I have created a Zapier Zap to populate data from a SmartSheet to a MySQL database. I have it branching so if the row does not already exist in MySQL a new row is created. This part works fine. In my ...
user avatar
3votes
0answers
409views

location.hostname returns null or [Object%20object] in angular when building production mode

I have a problem with my angular app. when I try to build with --prod parameter (this means aot is turn to true) location.hostname I have in my code returns null and I cannot interact with my API. ...
user avatar
  • 76
3votes
1answer
286views

Replace fragment caused RecyclerView$ViewHolder.shouldIgnore()’ on a null object reference

I am using the android tv leanback sample here, https://github.com/googlesamples/androidtv-Leanback when I try to replace fragment in MainFragment like this getFragmentManager().beginTransaction()....
user avatar

15 30 50 per page
1
2 3 4 5
65