Questions tagged [is-empty]

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

776 questions
2
votes
3 answers

What's the fastest way to see if a table has no rows in postgreSQL?

I have a bunch of tables that I'm iterating through, and some of them have no rows (i.e. just a table of headers with no data). ex: SELECT my_column FROM my_schema.my_table LIMIT 1 returns an empty result set. What is the absolute fastest way to…
singmotor
  • 3,930
  • 12
  • 45
  • 79
2
votes
1 answer

iBatis to myBatis conversion related issue

I have been trying to migrate from ibatis to mybatis. what is the converted equivalent to isEmpty tag of ibatis in mybatis for isNotEmpty it is is this is correct fot isEmpty tag
Madan Thunderfist
  • 193
  • 1
  • 2
  • 14
2
votes
1 answer

is if x <> empty the same as if not isempty(x)

Are these two snippets equivalent in VBScript? If x <> empty 'do something End if If not isempty(x) 'dosomething End if Context: I want to rewrite a condition from If ((Not IsEmpty( Var ) ) And ( Var <> "" ) ) Then to the less…
Some_Guy
  • 484
  • 6
  • 20
2
votes
3 answers

EditText getText() always returns empty string

I'm new to android programming and I think my biggest problem is that I can't really wrap my mind around all this inflating stuff. Can you help me with this one? I'm working on a form, the forms content is seperated into different pages. Before you…
kalu
  • 169
  • 1
  • 11
2
votes
1 answer

Using Empty vs "" to define or test a variable in VBscript

When declaring a variable to blank (before a loop for example), it is sometimes done as "" or Empty. Also, when checking the value, it is sometimes used with "(Not IsEmpty(variable))" and "variable <> Empty". Is it better to use one vs another and…
Yevgen
  • 767
  • 2
  • 9
  • 22
2
votes
1 answer

A list within a list is being passed as an empty list - Racket

I'm stuck with a little problem here. Say that I have a list of lists such as: (define x '(("1" "one" "two" "2" "three") ("2" "four" "five" "0" "six") ("3" "seven" "eight" "4" "nine") ("4" "ten" "eleven" "2"…
2
votes
2 answers

UISearchController table view results empty

I have been struggling a lot with this problem. Some posts deal with this problem but no solution has emerged in my case. Here is the problem: I would like to display some results with the UISearchController method. My original table view with a…
Trichophyton
  • 625
  • 5
  • 21
2
votes
2 answers

Why does a needless IF clause increase the performance?

I have a simple method: public function validateStringByPrefix(string $string, $prefix) { $valid = false; if (is_string($prefix)) { if (! empty($prefix) && strpos($string, $prefix) === 0) { $valid = true; } }…
automatix
  • 14,018
  • 26
  • 105
  • 230
2
votes
1 answer

"Automatic color" = "no color" for empty point data in SSRS report

I have a report in which I have some charts containing empty values. I want empty values to be shown as 0, which seems to work, when I set the empty line color equal to "Black" but the line color in the chart becomes see-through ("No Color") when…
Marcus
  • 437
  • 4
  • 9
2
votes
3 answers

empty() not working in cakephp

I have products table and want to select all products. This is what I have done $products = $this->Products->find('all', [ 'conditions' => [ 'status' => 1 ] ]); $this->set('products', $products); and print products if fetched and No…
Gaurav
  • 131
  • 12
2
votes
1 answer

Check if photo gallery is empty

I want to load photos from my photo gallery to my UIImageView using Swift. Now I want to check if the gallery is empty or not. What's the best way to do that?
mafioso
  • 1,630
  • 4
  • 25
  • 45
2
votes
1 answer

How to write if condition for empty tuple in swift?

I am stuck with if condition for this type of function return - ([(Range, Range)](), [(Range, Range)]()). I have function N1 returning this empty tuple in a certain condition. Then, in another…
VYT
  • 1,071
  • 19
  • 35
2
votes
1 answer

Return empty string if out of bounds

How would I get my program to return an empty set if a number out of bounds is entered? The class at the bottom is only a tester, so if someone were to change Jezebel to row 7, how would I keep it from crashing? Being that there are only six rows.…
john
  • 31
  • 5
2
votes
2 answers

what is equivalent to isEmpty() for integers?

Below is the script I have at the moment import java.util.Arrays; import java.util.Scanner; public class SeeWhatTo { public static void main(String args[]) { Scanner scan = new Scanner(System.in); //define scan int a =…
stratofortress
  • 453
  • 1
  • 9
  • 21
2
votes
1 answer

How do I count the number of blank lines in a text file?

import sys import os import glob directory_input = raw_input("path to base directory?") directory = directory_input for folder in glob.glob(os.path.join(directory,"savedrecs(*).txt")): a = 0 for file in glob.glob(os.path.join(folder,…