Questions tagged [is-empty]

Questions about items that can be described as empty or having no data value

776 questions
4
votes
2 answers

Checking if char is empty

I have a small problem converting code from java to C++ I am trying to check if a 2d array is set ,this is my java code for(int area_y = y -1 ;area_y > 0 ;area_y--) { for(int area_x = 0 ;area_x < x; area_x++) { …
LegendaryLaggy
  • 455
  • 1
  • 6
  • 16
4
votes
1 answer

Check if there are any array values set PHP

What's the best/easiest way to check if an array has any values set? I set the keys myself, no matter what so I can't go based on the keys. My code will show what I'm doing, and want to do: $array = array( "Birthday" =>…
Dylan Cross
  • 5,918
  • 22
  • 77
  • 118
4
votes
2 answers

Make a SELECT by field is empty?

I need to know how to make a comparison in a SELECT for a field that has to be empty. I'm trying to select some fields from bkpf, with the field stblg as empty. I've done it in this way: SELECT c~kunnr a~belnr d~spart c~bldat c~waers a~hwaer…
Eva Dias
  • 1,709
  • 9
  • 36
  • 67
3
votes
4 answers

How to determine if a variable is an empty object, empty array or empty string?

I have an object whose keys can have have values which can be object, string or array. const obj = { key1: 'asdf', key2: {}, key3: ['a','b','c'], key4: [], key5: '', } I have to filter all the keys which are empty i.e empty objects, empty…
Chandrika
  • 101
  • 1
  • 1
  • 9
3
votes
3 answers

Why does Tcl expr consider some number as "empty" while it's really not empty?

Problem Statement I'm importing a set of coordinate from an unknown source, which I don't have privilege to look into. set yMin [lindex [lindex $bbox 0] 1] puts "yMin: <$yMin>" It works normally. yMin: <-6.149999999999999e-02> The brackets are…
Zureas
  • 53
  • 5
3
votes
1 answer

Check if an input field is empty or not is not working properly in Cypress tests

I got 2 step definitions in Cypress that check if an input field is empty or not (depends on how I build the sentence I setup with RegEx). First my problem was, that cypress said the test failed because the input field is empty while it was not. My…
EXTSY
  • 59
  • 1
  • 6
3
votes
1 answer

Getting "The method isEmpty() is undefined for the type Optional" Error in Java File

My Eclipse Java compiler doesn't recognize the isEmpty method in my code. I understand that isEmpty is from Java 1.6, but I'm using 1.8. I've also tried importing org.apache.commons.lang.StringUtils, but that doesn't work. What am I…
Josh Zepeda
  • 63
  • 2
  • 8
3
votes
4 answers

Check "emptiness" of list containing empty vectors (which R does not recognise as empty list)

I have a list that is the result of a row selection in a data frame. The issue is that sometimes there is no row to select and it returns a list in this form: a non-empty list with no actual content. L <- list(combattech = character(0), damage =…
Jan
  • 4,974
  • 3
  • 26
  • 43
3
votes
1 answer

Is there something like is_empty_but_has_virtual_functions?

I would like to craft an "interface"/mix-in class (template), and ensure nobody thinks that adding a member to this class template is a good idea, I'd like to static_assert on this condition. Unfortunately, std::is_empty does not allow virtual…
rubenvb
  • 74,642
  • 33
  • 187
  • 332
3
votes
4 answers

C# empty property

What's the preferred way to implement IsEmpty statement for your own container-like class? It could be a simple method bool IsEmpty() or you could have some gettable property IsEmpty / Empty. I understand it's probably a matter a personal choice,…
Yippie-Ki-Yay
  • 22,026
  • 26
  • 90
  • 148
3
votes
2 answers

Empty structs in C

http://c0x.coding-guidelines.com/6.7.2.1.html: 1401 If the struct-declaration-list contains no named members, the behavior is undefined. Does this mean that the following is illegal? struct C { }; Or what does it mean? I used a Convention=>C Ada…
porton
  • 5,214
  • 11
  • 47
  • 95
3
votes
1 answer

How to detect whether a git merge would result in an empty commit, given two arbitrary commits?

If I use LibGit2Sharp's "Diff" feature to compare two branch commits, the diff has changes regardless of the order in which I compare them. var newBranch = repository.Branches[currentBranchName]; var oldBranch = repository.Branches[name]; var patch…
Triynko
  • 18,766
  • 21
  • 107
  • 173
3
votes
1 answer

How to handle empty strings with `datenum`

I have a comma-separated text file I am reading in and parsing using textscan. Two of the fields are the date and time of day. I am able to convert both fields to fractional days using datenum, with the intention to sum the two resulting vectors. My…
David K
  • 1,296
  • 18
  • 39
3
votes
2 answers

Can I use IsEmpty to refer to a different sheet and hide a column?

Is it possible to use IsEmpty to refer to a cell on a different sheet from where the macro is being fired from? Also, is it possible to hide the queried column if the result of that query is True? Here's what I've built so far: My first version…
3
votes
2 answers

InDesign CS6 Socket return Empty

I have this code (InDesign CS6), and it's not working as expected. I'm using Mac OS and I need to make the code compatible with Windows and Mac. Trying to get a text/JSON over my localhost, and the socket return an empty string:- function…
Arepie
  • 31
  • 2