Resultados da pesquisa a pedido "is-empty"

1 a resposta

ValueError ao verificar se a variável é None ou numpy.array

Gostaria de verificar se a variável é None ou numpy.array. Eu implementeicheck_a função para fazer isso. def check_a(a): if not a: print "please initialize a" a = None check_a(a) a = np.array([1,2]) check_a(a)Mas, esse código gera ValueError. ...

2 a resposta

execute a tarefa Ant se DUAS condições forem atendidas

O de cimaformig [/questions/tagged/ant] script implementa<strong>if</strong> dir_is_empty <strong>then</strong> git-clone <strong>else</strong> git-fetch usando as instruções principais do Ant-1.7.1: <target name="update" depends="git.clone, ...

4 a resposta

Verifique se a matriz está vazia ou nula

Gostaria de saber como verificar se uma matriz está vazia ou nula no jQuery. Eu tenteiarray.length === 0 mas não funcionou. Também não gerou nenhum erro. Este é o código: var album_text = new Array(); ...

14 a resposta

Como verificar se um arquivo está vazio no Bash?

Eu tenho um arquivo chamado diff.txt. Deseja verificar se está vazio. Fiz algo assim, mas não consegui fazê-lo funciona if [ -s diff.txt ] then touch empty.txt rm full.txt else touch full.txt rm emtpy.txt fi