Questions tagged as 'condiciones'

1
answer

Do I need to create a grid with random numbers from a while loop?

I need to create a grid of 8 elements with the name of the items, the quantity and the price with random numbers, I have done this but I do not know how to form the grid. <?php $i = 0; while ($i == 8) { $i = rand(1,100); echo $i."<br&g...
asked by 15.04.2018 / 09:05
1
answer

Compare "id" of two related objects

Maybe the question is simple for you. I use the Bidon and Buy models, which are related, when I show the detail of the drum suppose with ID: 1, in the I am showing the last purchases that are made with that drum, what I can not get is tha...
asked by 26.02.2017 / 08:33
1
answer

how can I add an if with a button

hi I try to change the value with a button that is already predetermined, I've been trying with an if and with a function of some condition suggène <html> <head> <meta charset="UTF-8"/> <title>prueba<...
asked by 02.01.2019 / 22:45
1
answer

Bash "file.sh" error in if extracting cat output to a variable and comparing it in if

When extracting the variable, everything is correct, but it does not compare it to me, any help? camMode= sudo cat data.txt; echo "$camMode"; if [ "$camMode" == "True" ]; then echo Mode is true fi if [ "$camMode" == "False" ]; the...
asked by 27.12.2018 / 13:40
0
answers

C # - Problem when performing a condition (IF) correctly on cells of a DataGridView

I'm doing a checador program where I have a table in DataGridView and scan with a barcode reader to fill TextBox , when it detects some code that matches what has been inserted increases in 1 the value in the Captured column...
asked by 21.12.2018 / 02:42
1
answer

How to do a little Christmas in PHP?

I have this code that this pine generates me But I want it to come out like this: <html> <body> <h2>Pinos Examen</h2> <form action="examenpinos.php" method="post"> Cantidad de nivel:<br>...
asked by 18.12.2018 / 23:37
1
answer

Help with mysql query with different conditional if php

I need to perform a mysql query with conditional if from php. The idea is to pass the query variable, by the query where not to be doing a different one for each time it is consulted. These are the php conditions: $WHERE = ""; if ($fecha_in...
asked by 16.12.2018 / 01:09
0
answers

Create an array by iterating the rows of a table of pandas with conditions. Python

I'm creating a table with pandas where the first two columns are created with numpy arrays: age = np.random.randint(20,85,size=400) possible_genders = ['male','female'] gender = [np.random.choice(possible_genders) for i in range(400)] the...
asked by 09.12.2018 / 19:58
1
answer

How to validate a 404 on a page with an if

I am using the following code for($pagina=50;$pagina<60;$pagina++){ $data = file_get_contents("http://www.pagina.net/?p=".$pagina); if ( preg_match('|<h2 class="titulo">(.*?)</h2>|is' , $data , $cap ) ) { echo '<br>...
asked by 03.12.2018 / 13:17
1
answer

Switch case to compare strings [duplicated]

I have a question about the use of the control structure switch since I'm just learning C ++. Can you evaluate catacler chains in a switch ? According to me you can only integer values: #include <cstdlib> #include <iost...
asked by 27.10.2018 / 05:55