Questions tagged as 'if'

2
answers

If statement does not recognize the operator ||

I have a problem I have the following code. $model = new Crud(); $model->select = "a.idAplicacion, a.idPaciente, p.nombres, p.apellidos, a.peso"; $model->from = "aplicacion a JOIN paciente p ON a.idPaciente = p.idPaciente JOIN unidad...
asked by 15.11.2018 / 18:54
1
answer

Difference between ascii 160 and 32

my question originated when trying to compare 2 words of different origin, one of phpmyadmin and another of excel, that visually looked exact but when executing gave false the difference can be seen in sublime but then in which cas...
asked by 03.09.2018 / 16:21
2
answers

How do I do this program? [closed]

Enter a group of 20 people and only count those who are between 18 and 45 years old. The problem is that I do not know how to put the condition of counting ages between 18 and 45. int personas = 21; int edadDe18A45 = 0; int edad...
asked by 28.08.2018 / 21:49
1
answer

How can I compare 2 data from a datagridview

Hello friends, I'm trying to compare a grid record, 2 values. DataGridViewRow row = dgvList.Rows[idx]; if (row.Cells[3].Value.Equals(row.Cells[5].Value.ToString())) { var alta = Application.OpenForms.OfType<Alt...
asked by 15.07.2018 / 21:31
2
answers

Why does the if statement not work with the getElementById?

What I try to do is that every time I click on the button it shows me the following image. However, it does not work. In some websites they say it does not work because the route (img.jpg) is not correct as a condition, but I do not understand...
asked by 30.12.2017 / 02:15
1
answer

EXCEL recursivity

Good I have the following query, what I want to do is compare the absolute difference between two columns, where one column is full of data and the other lacks some, so the absolute difference of the column where it lacks the same data of the da...
asked by 27.12.2017 / 14:40
3
answers

How does recursion work?

Can someone tell me how the recursion works? Step by step if it is possible, I do not get to understand it, how the function can not be executed, as it takes new values until it reaches zero, there it will return 1 and again to the other functio...
asked by 09.12.2017 / 16:06
1
answer

How to create in JS a variable equivalent to a static variable in PHP?

function cambiarPropiedades(elemento){ if(typeof control === "undefined"){ control = true; //No puedo usar el operador var } if(control == true){ //Código a ejecutar control = false;...
asked by 26.11.2017 / 13:44
1
answer

Assign an intent to each item of a spinner

Good, I have a spinner with the following values: Teacher and Student, my question is, how do I do it so that if the person chose Professor of the spinner direct him to a activity , but if you chose Student from spinner add...
asked by 14.11.2017 / 06:04
1
answer

Execute If within a For Each

I'm doing a project using: Php, css, html, mariadb "mysql" I am trying to execute an If statement within a ForEach loop, but the "if" only executes in the first execution of the Foreach, in the rest everything is executed, except for the If....
asked by 25.09.2017 / 18:45