Questions tagged as 'if'

1
answer

How to select a switch / case statement with each click on the button

I would like to make a list of A-Z . One detail, is based on breaking / dividing this list (gem) alphabet into parts: Although my difficulty is in, after being clicked on the button, the same bring the list like this: First click...
asked by 14.04.2016 / 02:38
1
answer

Error writing IF and Else in jquery [duplicate]

I'm starting to venture into the development world now and hit a question when using IF and Else. The code below is OK <select id="course_list" > <?php $my_query = new WP_Query('tribe_events_cat=petroleo-e-gas'); ?>...
asked by 27.08.2015 / 09:54
1
answer

Problem with IF / ELSE and variables

I started to study Python very soon, and created the following code: gene = open("AY365046.1.txt","r") g=0; a=0; c=0; t=0; gene.readline() for line in gene: line = line.lower() for char in line: if char == "g": g...
asked by 14.08.2015 / 10:04
1
answer

How to return a boolean on the button

I have a button and I want it to be clicked when I return true to if of another class, but I did not find any method how I do it. Button b = new Button(); Another class: public static ObservableList getObs(ObservableL...
asked by 09.05.2015 / 19:58
1
answer

C ++ if select object

I'm doing a program for arduino written in C ++ to turn on and off leds when a button is pressed. I created a class Led and put the methods in it, now I wrote an if that checks when a button is pressed, however I want it when the if verify that...
asked by 03.08.2014 / 22:40
1
answer

Help: Valuing a char array of a struct within an if

I'm trying to set the value of a char vector of a struct inside an if, but without success ... A struct itself: struct ficha { char nome[31], classificacao[31], telefone[21]; float altura, peso, imc; }paciente1, pa...
asked by 15.07.2014 / 23:36
2
answers

My if is not working as expected

$mt = $conn->query("SELECT entry_type FROM myTable")->fetchAll(); foreach ($mt as $FB) { if ($FB['entry_type'] == 'pagina'){ echo '<meta property="og:type" content="website">'; } else{ echo '<meta property="og:type" cont...
asked by 25.09.2018 / 23:21
0
answers

How to reduce the instruction block inserted inside an if conditional structure in python?

Hello, I'm developing a program that calculates and sizes wall-beams. It basically works with security checks (request less than or equal to resistance), when one of these checks is not met, the program will alert the user to the error and then...
asked by 14.08.2018 / 23:15
7
answers

How does this if / else work with "?" and ":"?

I am studying JavaScript and I have doubts about the different ways of doing if / else . For example, this: foo ? foo : foo How exactly does it work?     
asked by 08.02.2014 / 18:15
1
answer

Return message from else

I'm doing a very simple example using Django. In my view I have the following: def index(request,idade): string = ''' {% if idoso >= 65 %} Você já é idoso {% else %} Você não é idoso {...
asked by 29.05.2018 / 15:30