Questions about items that can be described as empty or having no data value
Questions tagged [is-empty]
776 questions
2
votes
2 answers
Is is the Boolean result of !empty($variable) and count($variable) always equal in PHP?
I need to replace the occurrences of
count($variable) with !empty($variable) in IF statements
so instead of
if(count($variable)){
}
I would like to use
if(!empty($variable)){
}
Is it safe to replace it always while ensuring that the result is…

perpetual_dream
- 1,046
- 5
- 18
- 51
2
votes
1 answer
plm fixed effects error - empty model in R - unbalanced data
I'm trying to conduct a fixed-effect model using R
fixed1<-plm(ITEMS_STARPU ~ TREAT_SUM, data=dataHyp1.i, index=c("PRACTICE"), model = "within")
and I keep getting the following error:
Error in plm.fit(formula, data, model, effect, random.method,…

Zeina Al Khaznachi
- 21
- 3
2
votes
2 answers
How does findstr "^" equate to an empty directory?
Batch files in Windows can be confusing at the best of times. How does
findstr "^"
equate to finding an empty folder, when ^ means the start of the line?
for /d /r %1 %%A in (.) do (
dir /ad /b "%%~fA" 2>nul | findstr "^" >nul || echo…

Ghoul Fool
- 6,249
- 10
- 67
- 125
2
votes
1 answer
How to distinguish empty struct from one char?
I'm trying to implement own functor and faced with empty capture lambdas. How to distinguish empty struct from one char? Is there are any "real" size at compile time? I want just ignore empty lambdas to prevent useless allocations.
struct…

kerrytazi
- 583
- 1
- 4
- 15
2
votes
3 answers
How to represent an empty / invalid java.nio.Path
How can one create a java.nio.Path that represents no path no matter the environment?
I cannot call Path.of() and guarantee the resulting path to point to an invalid file or directory.
What I'm looking for is if there is a safer way to…

ljleb
- 182
- 1
- 14
2
votes
2 answers
How to search for empty string/compare two strings in Robot Framework
I have read this question
How to test for blank text field when using robotframework-selenium?
as well as the two links to the Robot Framework documentation in the answers but I still don't get how to check if a variable is empty.
I want to do…
user10028942
2
votes
0 answers
Scrapy response code is 200, but response body is empty / null
On premise that the spider can work in a right way, parse function's normal, but I just found a little bunch of response body randomly null when response status code is 200, like 2 out of 10 are body-null. At the same time i use Chrome to check this…

changezyc
- 21
- 3
2
votes
4 answers
check for empty values in JavaScript for datatypes like Array, Object, String and Number
I need to check whether enter parameter is empty or not like php empty function works.
For example, if I have function with name isEmpty and I passed string as parameter to it then function will return true if string is empty else false and similar…

Mayur Shedage
- 1,027
- 2
- 11
- 19
2
votes
1 answer
Classic ASP/VBScript Client Side CreateObject( "ADODB.Recordset" ) returning empty
Looking for assistance troubleshooting/diagnosing an issue that is showing up with a Classic ASP/VBScript web application I am currently supporting. Over the past couple of weeks I've had users reporting issues in the app, troubleshooting with them…

Brad853
- 21
- 1
2
votes
2 answers
Remove empty columns by awk
I have a input file, which is tab delimited, but I want to remove all empty columns. Empty columns : $13=$14=$15=$84=$85=$86=$87=$88=$89=$91=$94
INPUT: tsv file with more than 90 columns
a b d e g...
a b d e g...
OUTPUT: tsv file without…

Vonton
- 2,872
- 4
- 20
- 27
2
votes
1 answer
Write multiple values to one cell - VBA
I am very new to VBA and am trying to determine how to store multiple values within one cell. For example, I first:
Scanned through each cell within a row to determine if it was blank. (A2:F3)
I then identified the column header for that blank…

ms_queen
- 81
- 1
- 7
2
votes
1 answer
In VBA, how can I set an Array to Empty?
Now, before you say it - I've read dozens of similar topics, and couldn't find a solution. I have a dynamic Variant array, which has to be completely cleared, so it is regarded as Empty during IsEmpty check. I tried Erase, but IsEmpty still returns…

J R
- 227
- 3
- 8
2
votes
1 answer
Empty string not equal to empty string in PHP ternary operator expression
Could someone explain me the following?
$a="";
$a="" ? "" : "muh";
echo $a;
// returns muh

PeMa
- 1,559
- 18
- 44
2
votes
4 answers
Simplify a long IF statement in PHP
Is there any simpler format for the following if statement below?
if((!empty($_SESSION['email'])) && (!empty($_SESSION['serial'])) && (!empty($_SESSION['name'])) && (!empty($_SESSION['number'])) && (!empty($_SESSION['institution'])) &&…

P. Lau
- 165
- 1
- 11
2
votes
1 answer
Javascript working with empty cells
I am working with Google Sheets. I want to build a custom function that adds 5 cells together. This code worked just fine:
function addData(a,b,c,d,e){
return a+b+c+d+e
}
When I put the values: 80,80,80,80,80...I appropriately get 400.
The…

Xaan2000
- 21
- 4