Questions about items that can be described as empty or having no data value
Questions tagged [is-empty]
776 questions
5
votes
6 answers
How to check a table is empty or not using javascript
So i have a script like this to make a 2x2 table by javascript
function createtable(){
var tbl = document.getElementById('x');
if (tbl.contains()==false){
tbl.setAttribute('border', '1');
var tbdy =…

Phạm Trí
- 61
- 1
- 1
- 4
5
votes
2 answers
How to test if a string variable in Robot Framework is empty?
How to test if a string variable in Robot Framework is empty?
My first naïve attempt looked like this:
Run Keyword If ${myVar}!=${EMPTY}
but it failed:
Evaluating expression '!=' failed: SyntaxError: unexpected EOF while parsing (, line 1)
I…
user10028942
5
votes
1 answer
Checking if object is empty doesn't work
I am testing the case if my object was empty, so intentionally I made a query that has no match in the database, which should evaluate my else if statement however I don't get any response in the console.
What am I doing wrong?
user.loginUser =…

July333
- 251
- 1
- 6
- 15
5
votes
3 answers
Elegant way to check if multiple strings are empty
How can I check if multiple strings are empty in an elegant way? This is how I currently do it:
//if one required field is empty, close the connection
if (registerRequest.Email == "") ||
(registerRequest.PhoneNumber == "")||
…

thelearner
- 1,440
- 3
- 27
- 58
5
votes
6 answers
Zero considered as empty in PHP
I've got a problem with an input field in my php form. It looks like:
I want to check whether the field is empty or not. But the problem is php considers 0 as…

Rafa cosquiere
- 73
- 1
- 9
5
votes
1 answer
How to pass an empty php variable in mongodb query
I want to create a dynamic mongodb query which insert each part of it's aggregation if the condition is true else don't inject that part.
For example I want to check if the time is between 1AM till 8AM If yes then pass in the defined array to the…

Mohammad_Hosseini
- 2,481
- 3
- 30
- 53
5
votes
1 answer
How to display Group Field metadata + Container div if it exists and display default text if fields are empty? [CMB2]
I'm no programmer so I'm clueless on solutions.
I have been using CMB2
for a Portfolio/Project custom post type.
I've incorporated a slideshow that uses Group Field metadata for each slide.
On the home page there are 2 posts labeled "Empty Project"…

KXXT
- 251
- 2
- 4
- 20
5
votes
3 answers
SUMIFS (not blank, and othe conditions)
I am trying to use SUMIFS to sum a couple of conditions. I want my sum range to be column A and my first criteria range is column B, the criteria is that column B has something in it or essentially it isn't blank/0. The next criteria is if column C…

ryan
- 79
- 1
- 2
- 8
5
votes
3 answers
Style empty textbox - CSS only solution
Update - Mar-24-2016
I wanted to generalize the concerns but looks like it has been comprehended to be specific, my bad. This answer is is 100% solution to the example I used earlier.
Please refer this CodePen
So the idea behind Style empty…

Sarbbottam
- 5,410
- 4
- 30
- 41
5
votes
1 answer
chokidar: onchange event for a file is possibly triggered to fast
We are watching for file changes using chokidar with nodejs on an Ubuntu server. It works pretty fine, but sometimes I think we have a problem with the way a file is saved when changed: in chokidar the "onchange" event is triggered, but when we read…

Ryo
- 123
- 1
- 5
5
votes
1 answer
How to check if a SciPy CSR matrix is empty (i.e. contains only zeroes)?
What is the canonical way to check if a SciPy CSR matrix is empty (i.e. contains only zeroes)?
I use nonzero():
def is_csr_matrix_only_zeroes(my_csr_matrix):
return(len(my_csr_matrix.nonzero()[0]) == 0)
from scipy.sparse import…

Franck Dernoncourt
- 77,520
- 72
- 342
- 501
5
votes
2 answers
Python Logging - How To Check If Logger Is Empty
I just implemented logging in my app, and I'd like to know if there's a method to check if a logger is empty or not.
What I have in mind is to set two handlers in my script:
One for console with level WARNING
One for file with level DEBUG
At the…

Enrico Gherardo
- 116
- 1
- 6
5
votes
1 answer
How can I check a dispatch queue is empty or not?
My condition is that when I scroll my tableview to the bottom or to the top, I need to do some reload, refresh job that will ask for new data from the server, but I want to check if the last job is done or not. If the last request is still working,…

林鼎棋
- 1,995
- 2
- 16
- 25
5
votes
3 answers
Should I use a Guid and Guid.Empty or a nullable Guid?
I have certain scenarios (e.g. a custom class to hold Sql parameters) in which a variable may or may not be required. Traditionally I have always defined these being of type Guid? and used myGuid.HasValue to check for a valid value before using.
Of…

immutabl
- 6,857
- 13
- 45
- 76
4
votes
5 answers
Do I need to check null on both sides of an OR condition?
Consider member variable:
String foo;
I only want to call setFoo if foo has not previously been set or currently is empty.
For this purpose, I am not sure if this is sufficient:
if(foo==null || foo.isEmpty()) {
setFoo(foo);
}
Or is it safer to…

Vladimir
- 41
- 2