Questions tagged as 'if'

2
answers

How to read what the user typed in a form?

The code looks like this: <form method="post" action="pagina.php"/> <?php $c= 1; $neg = 0; while($c <=3){ echo "Digite um numero: <input type='number' name='$num' min='1'/>"; if($num < $neg){...
asked by 29.09.2016 / 01:12
2
answers

Ternary operator performance

Recently I came across an assignment to a Boolean variable as follows: bool varTeste = (varEntrada == 100) ? true : false; I know this is the same as the code below: bool varTeste = (varEntrada == 100); The question is whether perform...
asked by 23.02.2018 / 15:29
1
answer

Back to the beginning of the code after an if or switch case in C

I have a question regarding if . I'm developing a college semester program and every time I need to use a if and at the end of if , I need to go back to the beginning of the program. I'm having a hard time doing this. Examp...
asked by 25.11.2015 / 23:26
1
answer

What is the cost of an update when it can not find the record?

I'm doing some SQL queries in my Delphi program and I had this doubt, what is the cost to the database engine when a UPDATE does not find the record according to the parameters of WHERE ? My question came from the need to make som...
asked by 09.03.2018 / 22:18
4
answers

JavaScript function with NaN error

Hello. I'm encountering a problem executing this formula, because the final answer is given as NaN. In a simplified way to explain the code, it works like this: there are two groups of three variables, and depending on the value you assign...
asked by 08.11.2017 / 21:54
1
answer

I do not understand a sorting resolution

The teacher asked for the following exercise: "Write a program that gets three scores (integers), sorts those scores using if statements and writes the three in ascending order on the screen. " I tried to do it my way alone but I ended up g...
asked by 28.10.2017 / 23:29
2
answers

If - Datatable condition

I need to compare a value of one of the fields of a DataTable , to accomplish a if condition, but I do not know how to do it. below: public partial class imp_orcamento : DevExpress.XtraReports.UI.XtraReport { Datatable_orcame...
asked by 08.08.2016 / 12:47
1
answer

Error: The condition has length 1 and only the first element will be used

I am writing a code in R but it reports the following error:    In if ((BWGmax * (1 - exp (-K * (MCisimulate - Xm))))> WG) {: the   condition has length > 1 and only the first element will be used. Can you help me? BWGmax <- 30 K...
asked by 06.02.2016 / 14:45
1
answer

if only execute else

Hello everyone, I have this function if it collects a variable coming from login.php and does a check to choose between two menus. But it does not matter the result inside the variable $permt it always chooses else. Someone can poi...
asked by 09.06.2016 / 02:23
1
answer

IF condition is true but does not execute related code [duplicate]

I have my program that displays a message and in the same message the user must enter a code. I'm trying to do the validation if he typed something or not, for that I use the code: AlertDialog.Builder alert = new AlertDialog.Builder(context)...
asked by 20.05.2015 / 19:29