Questions tagged [nul]

NUL is the abbreviation for the null character in several character sets

NUL has a value of 0 and is often written as the escape sequence \0. It is used as a terminator in standard strings.

179 questions
3
votes
4 answers

Fill a bash array from a NUL separated input

I want to create a bash array from a NUL separated input (from stdin). Here's an example: ## Let define this for clarity $ hd() { hexdump -v -e '/1 "%02X "'; echo ;} $ echo -en "A B\0C\nD\0E\0" | hd 41 20 42 00 43 0A 44 00 45 00 So this is my…
vaab
  • 9,685
  • 7
  • 55
  • 60
2
votes
1 answer

read() stops after NUL character

I'm downloading files over HTTPS, I request the files through urllib2.Request and they come back as a socket._fileobject. I'd ideally like to stream this to file to avoid loading it into memory but I'm not sure how to do this. My problem is if I…
GP89
  • 6,600
  • 4
  • 36
  • 64
2
votes
2 answers

show query meta_key_value including null value

I am trying to do a simple query in WordPress ordered by a meta_value_num of a custom field, the problem is that not all the inputs have a value so it gives me a null value and it does not show very well in the query, it only shows the ones that…
2
votes
2 answers

Is there a way to deal with embedded nuls while reading in parquet files?

I have data scraped from the internet (hence varied encodings) and stored as parquet files. While processing it in R I use the arrow library. For the following code…
Akash21795
  • 61
  • 1
  • 12
2
votes
2 answers

Select Mysql with empty value on join

I have the following MySQL tables (create & insert): CREATE TABLE IF NOT EXISTS `department` ( `id` INT NOT NULL, `name` VARCHAR(45) NOT NULL, `father` INT NULL, PRIMARY KEY (`id`), INDEX `fk_department_department_idx` (`father` ASC)…
Fábio
  • 69
  • 2
  • 6
2
votes
1 answer

Why undefined plus undefined equals to Nan in Javascript

How to understand undefined and null much better console.log(undefined + 5) //NaN console.log(null + 5) //5 console.log(undefined + undefined) //NaN
I don't know
  • 104
  • 8
2
votes
1 answer

Null-terminated strings created with calloc?

I want to allocate memory for a string using calloc, I know that calloc fills the whole allocated memory with 0, but I also found out that they are different from \0 in some contexts. This whole discussion it's kind of confusing for a newbie (like…
B.Castarunza
  • 135
  • 12
2
votes
3 answers

C: Count positive/negative numbers and 0's in array

I'm trying to write a program in C to count the number of positive and negative numbers in an array as well as the number of zeroes. I have written the following code: int A[15], pos, neg, nul, i; [...] pos = 0; neg = 0; nul = 0; for (i = 0; i <=…
2
votes
0 answers

NUL Character is getting written to start and end of a file in CSV

I am trying to write some contents of text file to a csv file using spark databricks write package. However, i am getting NUL character getting added to start and end of each line Output :…
2
votes
2 answers

How to ignore Null values at the end of a string in Oracle?

I have a column nse_credit_rating with datatype VARCHAR2(18). It contains values of form 189.00-250.00. But some records have null values at the end of the string i.e even if the data relevant to me is of length 13 (189.00-250.00) but…
arjun gaur
  • 518
  • 1
  • 9
  • 25
2
votes
0 answers

Writing NUL characters to csv

I am trying to preserve data integrity while writing to a csv file and am having trouble writing null characters. The following code snippet produces a file with "Hello" with open('outfile..txt', 'wb') as f: row = ['Hello\x00World'] writer =…
M. Bloom
  • 43
  • 7
2
votes
3 answers

Using grep to find and delete files that are filled with zeros

I tried recovering a disk image from an NTFS hard drive that is 50% unreadable. And I guess a side effect of that is a lot of the files recovered have the correct filename and type, and take up the same file size as the original file, however…
2
votes
1 answer

Relation between calloc char array and null terminating character

This whole "debate" on the web about strncpy being safe vs unsafe is driving me crazy. I find some people saying strncpy is the "devil", which to me sounds like they lack the programming discipline. I get that there is no \0 character added to the…
ThatsRightJack
  • 721
  • 6
  • 29
2
votes
1 answer

Unable to get frame content, Uncaught DOMException: Blocked a frame with origin "null" from accessing a cross-origin frame

I'm trying to access html document from one of my frames with javascript, but I'm getting a Uncaught DOMException: Blocked a frame with origin "null" from accessing a cross-origin frame. error. This is the main page: …
Zbarcea Christian
  • 9,367
  • 22
  • 84
  • 137
2
votes
1 answer

Reading a TSV with specific encoding (initial two bytes and UTF-8 afterwards) and NUL after each character

I have an obscure TSV that I'm trying to read and apparently it starts with a identifier and has some NUL values embedded (it seems that it's one NUL after each genuine character). These are the first 100 bytes of the file (shortened with a hex…
takje
  • 2,630
  • 28
  • 47
1 2
3
11 12