Posts by Vintorisk • 364 points
19 posts
-
0
votes2
answers3394
viewsA: Exchanging images with onclick
Create a counter, increment and click to have a reference, add the path of the img you want in an Array. each input will correspond to an ex: indice 0 = img/gods/agni.jpg indice 1 =…
javascriptanswered Vintorisk 364 -
0
votes3
answers4541
viewsA: Syntax error in Python code. What is it?
Apos if and Else put : ,and when using input and the expected result is an integer, use the int function() Corrected: print("**************") print("Seja Bem Vindo") print("**************")…
-
0
votes1
answer30
viewsA: Doubt Mysql bank
To add the value2 column in the table : ALTER TABLE suatabela ADD value2 varchar(255) Once this is done, you can enter your data this way: Ex: INSERT INTO suatabela…
-
1
votes2
answers337
viewsA: detect repeated char in c++ string
To find the '(' and its position, go through the entire string, take each character compared to == '(', true case, the position is equal to the loop increment variable. code: for(int i =0;…
-
2
votes2
answers595
viewsA: List BD data using echo (PDO)
Try this <?php include("conexao.php"); $pdo = conectar(); $buscarusuario = $pdo->prepare("SELECT * FROM tab_clientes WHERE ID=:id"); $buscarusuario->bindValue(":id",2,PDO::PARAM_INT);…
-
1
votes1
answer459
viewsA: Update table with the highest value from another table in Mysql
Before you start, add 1 record to the worksio_more_caro table. You first need to know which is the highest salary, so use the function max(), Since this will find the name, and finally to update…
-
5
votes3
answers400
views -
-1
votes2
answers1100
viewsA: User limit in a PHP application
First, create a table with the following columns: |-----------------------------------| | IP varchar(15) | Views tinyint(1) | |-----------------------------------| Then, for each view, enter the IP…
-
2
votes2
answers5286
viewsA: Put the input data into a list
First Voce defines an array( s = [] ), then uses the append function to enter the entered data. s = [] for c in range(0,10): s.append ( int(input()) )
python-3.xanswered Vintorisk 364 -
1
votes2
answers381
viewsA: Optimization, speed in select, and PHP code
You can take n° of accounts, and use php Rand(). public function random($username) { $sql = "SELECT count(idx_user) FROM `viperusers`" ; $query = $this->_db->select($sql); $total_de_contas =…
-
1
votes2
answers2674
viewsA: Handler? What is this and what is it for in C/C++?
HANDLE can be anything from an integer index to a pointer to a resource in kernel space. The idea is that they provide an abstraction of a resource, so you don’t need to know much about the resource…
-
0
votes3
answers1916
viewsA: How to replace vowels with @
To replace vowels with '@', one traverses character array(str), for each character checks if it is equal to a vowel (str[i] == vowels[v]), assigning the @ in the vowel that is found( str[i] = '@' )…
-
0
votes4
answers7774
viewsA: Calling javascript function only once
After the first run, the value of the check variable will always be true, so it is possible to limit the number of calls from the function() to only 1. JS: var check = false; function suaFunção(){…
-
1
votes1
answer428
viewsA: PHP - Real Time Application
Follow the outline below in js and php. I don’t see the need to use socket or nodejs, when a simple request and a setInterval can solve your problem. Taken 5 seconds is called the Ssao() function,…
-
0
votes2
answers238
viewsA: Show Alert or mobile error message
In your HTML: <p id="erromsg" style="display:none"></p> In PHP if (mysqli_num_rows($querySelect) > 0) { $msg = "Alguém com esses dados já se cadastrou. Tente novamente";…
-
1
votes1
answer9962
viewsA: Converting int to string
printf(senha,"%s",passwd); "%s" should only be used if passwd were an array of characters(char[]) as an integer use "%d" However use the snprintf function, it avoids Segmentation fault, that 6 there…
-
-1
votes1
answer242
viewsA: Filter information in an XML using C
Voce can use to extract the information from the libxml library(http://www.xmlsoft.org/index.html) to extract the author’s name: #include <stdio.h> #include <string.h> #include…
-
0
votes2
answers2780
viewsA: Return PHP values via Ajax and display in HTML (separately)
In php, I put in an array the 3 variables(a,b,c),no js da pra saber pelo Indice qual é, variavel A é Indice = 0,so on. Done this Voce will manage to display each one separately. <?php // echo $a;…
-
1
votes1
answer395
viewsA: Merge a stack with a list
Corrected: struct noPilha{ float peso; int idMala; char cor[20]; struct pessoa donoMala; }; typedef struct noPilha Elem; struct noLista{ struct noPilha mala; struct noLista *ant; struct noLista…