Questions tagged as 'if'

1
answer

How to make a negation condition with instanceof, without affecting the order of precedence?

I hope the question does not seem strange, but I can clearly explain what I mean. I know that for checks, sometimes you have to be careful about the question of operator precedence or the conditions added in an if. My question is: Which is th...
asked by 18.10.2015 / 00:26
1
answer

Doubt about conditional (if) in function

I have a set of 300 and few spreadsheets in which we have to create a function with 3 arguments: the directory where the spreadsheets are, the variable that will be analyzed and the amount of files to analyze. In the case in question we have...
asked by 10.11.2014 / 19:46
1
answer

Javascript toggle or if / else on Adobe Edge Animate

I use Adobe Edge Animate for simple animations at work. I could not make one of them work and I played a trick. Now I want to know how to do it right. I have a button. When clicked, it should give play on the timeline from start to finish. If...
asked by 06.10.2015 / 00:57
2
answers

IF syntax within an ECHO

I'm having a syntax problem when trying to put a if inside a echo in PHP. Check out the code: foreach($resultadoBusca as $escrever){ echo "<tr><td>" . $escrever['cod_votoran'] . "</td> <td>" . u...
asked by 24.10.2014 / 10:37
4
answers

If else with functions

It is possible to use a if-else with functions "function ();" example: if (a > 1){function Save();} else {function NoSave();} I just need to know if functions loaded in head work within if-else in scripts within...
asked by 26.02.2015 / 14:46
3
answers

Conditions in Javascript

I recently discovered that it is possible that you can save the result of a condition (such as a if ) to a variable: var x = (1 > 2); // false var y = (2 > 1); // true See the JSFiddle: link What is this feature called?...
asked by 04.07.2014 / 18:51
3
answers

Comparison of char in C

I need to find out if each element in a linked list is a vowel or not. How can I fix my code? int BuscaNv(LISTA* resp){ NO* atual = resp->inicio; while(atual){ if(atual->letra == 'a' || 'e' || 'i' || 'o' || 'u'){ pri...
asked by 04.09.2017 / 14:01
3
answers

Logical operator || in C # does not work [closed]

I'm trying to do an exercise where in a range of 0-30 I want to know which numbers are divisible by 3 or 4. Working with a if for each situation works. But if I try to use the logical operator || does not work. It is part of the co...
asked by 19.04.2017 / 17:27
3
answers

What is the logic behind this function?

Why the result of L1 is: [2, 3, 4] instead of [3, 4]? def remove_dups(L1, L2): for e in L1: if e in L2: L1.remove(e) L1 = [1, 2, 3, 4] L2 = [1, 2, 5, 6] remove_dups(L1, L2) print(L1) I tested it in Python Tut...
asked by 02.04.2018 / 16:53
3
answers

Compare dates in Python

Good afternoon!     I need to solve the following scenario in python: I have one or more .txt files in a folder, but I want to return only the files that have the modification date according to the date I want (initial and final), but I'm not ab...
asked by 05.09.2018 / 15:18