Posts by Renato Junior • 992 points
59 posts
-
0
votes2
answers65
viewsA: On the Javascript part, how do I convert a number? Nan’s It
Note that you are taking the element as a whole, not its value. var num1; // Neste exemplo, o num1 é o elemento <input type="number" name="cal1" id="cal1"> num1 =…
-
2
votes1
answer149
viewsQ: What is the virtual data structure for in Dbeaver or Mysql?
Viewing a Mysql tables by Dbeaver, I noticed a tab called Virtual. In it it is possible to create Virtual Columns, Virtual Foreign Keys, Virtual Unique Keys and Referências Virtuais. What is the…
-
1
votes1
answer223
viewsA: How to run a MERGE object list by returning the Update or Insert Id?
Cannot perform this operation. If inserted in a single SQL query you could "trust" that were inserted consecutively. One option would be to create a procedure that returns the updated or inserted…
-
3
votes2
answers803
viewsQ: SOAP request showing error
I’m trying to perform a SOAP request on http://www.ieptb.com.br/ws/serverTabelionatos.php. However I am not able to successfully complete the request. The only information you provide me is: Name:…
-
0
votes1
answer38
viewsA: SESSION is not loading $_SESSION[']
Try the following: session_destroy(); session_unset();
-
0
votes1
answer36
viewsA: My firefox does not render my Gina correctly
Something that might help is a CSS reset html, body, span, p, form, img, a, ul, ol, li, table, tr, td, div{ margin: 0; padding: 0; border:none; outline:none; list-style-type:none; } Note: this is a…
-
9
votes3
answers6427
viewsA: Style input type='number' to change arrows
Standard increment and decrement buttons have been disabled, and custom buttons have been placed instead: function mais(){ var atual = document.getElementById("total").value; var novo = atual -…
-
1
votes4
answers701
viewsA: How to create and use custom events
var evt = document.createEvent("Event"); evt.initEvent("myEvent",true,true); // parametro customizado evt.foo = "bar"; //registrar document.addEventListener("myEvent",myEventHandler,false);…
-
0
votes1
answer201
viewsQ: Arduino (C++) send variable to PHP page
I have the following code in C++ on Arduino int variavelemc; variavelemc = 10; And I have the following code in PHP $variavelemphp = $_POST['variavelemc']; How do I pass the variavelemc to the…
-
7
votes1
answer1984
viewsA: How to have two versions of php on the same Apache server?
Example in Linux Mint 18 Asumindo that Apache is installed, created the virtual host for both projects and added the required php Ppas. Let’s assume the site56.local project in php5.6 and the…
-
-1
votes1
answer61
viewsA: I wanted to put an Alert on my login screen
Place this code in PHP when you want Alert to be displayed: Echo "<script>alert('Menssagem');</script>";
-
3
votes1
answer603
viewsQ: How to upload using PHP image in link BLOB?
I’m using a Github (xkeshi/image-compressor) project that compresses images using Javascript. It generates a download of the compressed file with the following link for example…
-
-2
votes2
answers60
viewsA: I am creating a comment system in PHP, but in the conclusion of the work I came across the following error:
On the line: $insert = "INSERT INTO comentarios_tb nome, comentario" Missing one ;.
phpanswered Renato Junior 992 -
0
votes3
answers2456
viewsA: How do I know if I’m on an anonymous or normal Chrome page?
Try this simple code: var fs = window.RequestFileSystem || window.webkitRequestFileSystem; if (!fs) { console.log("check failed?"); } else { fs(window.TEMPORARY, 100, console.log.bind(console, "not…
-
1
votes2
answers1206
viewsA: Should placeholders contain examples or descriptions?
Providing an example of the required input helps a user to understand the field. However, incorporating the example as placeholder text causes problems, including: losing focus, confusion as to what…
-
0
votes1
answer142
viewsA: What is the function mysql_store_result() for?
It is used to transfer (fetch array) all the results of the consultation. mysqli::store_result() will transfer all the generated result, while, unlikemysqli::use_result() will transfer line by line.…
-
0
votes1
answer3044
viewsA: How to get the client IP in PHP?
Try this code: <?PHP function getUserIP() { $client = @$_SERVER['HTTP_CLIENT_IP']; $forward = @$_SERVER['HTTP_X_FORWARDED_FOR']; $remote = $_SERVER['REMOTE_ADDR']; if(filter_var($client,…
phpanswered Renato Junior 992 -
0
votes2
answers1179
viewsA: How to get a specific region from an iframe?
I believe that’s what you want: window.frames['iframe01'].document.body.innerHTML Or try this for Firefox or Chrome: window.frames[0].document.body.innerHTML You can also: Use a div and use Jquery…
-
1
votes2
answers170
viewsA: Avoid duplication in Mysql
Try to put the ID as the primary key, and the other values you do not want to be repeated use the attribute unique. Example of table creation with field Unique: CREATE TABLE Persons ( ID int NOT…
-
0
votes2
answers452
viewsA: How to send data from an HTML page to Mysql?
When entering data it is important to keep in mind the type of data you are entering. 1 is different from '1'. 1 is a numerical value, and '1' is a string (A string). Let’s assume the following…
-
0
votes2
answers6600
viewsA: What is and how to implement a Java Listener?
If we translate the word Listener into Portuguese we will have the word "Listener". Listener in Portuguese is defined as "He who hears". And now on schedule? We can define him as a listener too, why…
-
2
votes2
answers62
viewsA: censor a registered word in a database
Idea: Take the words that will be censored from the database, and pass these to an Array. With the generated Arrays, use the replace to replace. As we would do: Imagine we have the following table…
-
0
votes1
answer1755
viewsA: Uncaught Error: Call to Undefined Function mysql_query()
Do not use the function mysql, use the mysqli. We should not use functions of the "mysql" extension because its development has been discontinued; the extension will is already obsolete, that is,…
-
2
votes1
answer8090
viewsQ: What’s the difference between Varchar and Varchar2?
I have a question regarding the types of data in oracle: In Oracle, What is the difference between varchar and varchar2?
oracleasked Renato Junior 992 -
6
votes2
answers6436
viewsQ: Class, Superclass and Subclass
Regarding inheritance by code reuse in C# I have the following doubt: What’s the difference between classes, superclasses and subclasses? This changes something when doing code reuse? Additional…
-
0
votes2
answers933
viewsA: Sum/multiplication of dynamic and total inputs in R$
One suggestion is to use the input id to take input values, multiply them and use the following code to format: function numberWithCommas(x) { return x.toString().replace(/\B(?=(\d{3})+(?!\d))/g,…
-
0
votes4
answers380
viewsA: column-Count in css by breaking the line at the beginning of the column
You can use PHP. Pass the text to a variable. And use the command str_replace php, see the example below: $texto = "Linha de texto longo..." str_replace("<br>","",$texto); This way, you remove…
-
-3
votes1
answer202
viewsQ: Object Orientation in C# - Inheritance
In relation to Orientação Objeto in the C#, have the following doubt: What is the difference between the inheritance of code reuse, of builders, of abstract methods, of superclasses and of…
-
2
votes1
answer234
viewsA: To have a database in phpMyAdmin you need the database in Mysql?
It is necessary to understand that Phpmyadmin is not an SQL language, but an interface for handling the SQL language (In the case of Mysql). Mysql is something quite different, not the dashboard,…
-
0
votes2
answers1341
viewsA: HTML Show enlarged image by clicking
Here is the link from zoom plugin that can help you solve your problem. Here is the full image gallery The data has a lot of content, the best thing to do is to read the documentation.…
-
0
votes1
answer51
viewsQ: Database with many changes
Situation I’m making a system for a drug store. The Customer can enter the pharmacy and pick up products only from the gonad and pass directly to the cashier, or can pass the counter and pick up…
-
0
votes1
answer102
viewsA: performance in a select query
There are some researches that suggest that making the field explicit in a query makes the query faster, since the use of the * the database must search for existing tables and only then display…
-
0
votes2
answers110
viewsA: Delete multiple Rows using php and mysql checkbox
The input name is as sel[] , In other words, all inputs will come out with the same name. Try to put in the following checkbox snippet Name= sel[".$vid."] This way you’ll get the $_POST as the multi…
-
0
votes5
answers3455
viewsA: Change HTML document to PHP
To change just change the file extension, don’t forget to put the . php file on an Apache server (you can use xampp, wampp... for testing)
-
1
votes2
answers1365
viewsA: How to make paging in Sqlserver 2008 R2?
There are two ways to do this. Let’s assume that the query you will make is this: SELECT * FROM Orders WHERE OrderDate >= '1980-01-01' ORDER BY OrderDate In this case, Voce should determine the…
-
1
votes2
answers546
viewsA: Send form data to a URL
Use the <form method=get action=pagina.php(sem o resto do link)> And create inputs with name = fieldname Example: <input name=ADULT type=text>…
-
1
votes3
answers849
viewsA: How to make a flex container have the width of internal Ivs?
#container-de-caixas { display: table; width: 1158px; } #caixa-1 { width: 578px; } #caixa-2 { width: 386px; } #caixa-3 { width: 194px; } #caixa-1, #caixa-2, #caixa-3 { min-height: 210px;…
-
1
votes2
answers293
viewsA: Accentuation in the directory
One suggestion is to convert everything enters in the database (even rename the file name) in html entities, as follows the php code: $email = addslashes(htmlentities($_POST['email'],…
-
1
votes1
answer1218
viewsA: View pdf in another browser tab with php
Use this code, which will open the file in the browser itself. Preferably use Google Chrome. header("Content-type: application/pdf"); header("Content-Disposition: inline; filename=nome.pdf");…
-
0
votes2
answers714
viewsA: Indicate home page inside a folder on my site
The ideal would be to rename it to index, however will only work if your site is on an apache server, unlike.
htmlanswered Renato Junior 992 -
2
votes3
answers2526
viewsA: Download website with php
Downloading a website is not possible, but it is possible to get ready codes in many languages on Guithub. With respect to PHP code, it is necessary to understand that PHP is a Server Side language,…
-
0
votes3
answers2377
viewsA: Structure table day and times (schedule type)
The best way would be: id_dia(Primary key) -> int horario -> varchar(15) In id_dia you enter the day number of the corresponding week, and the working time. id_dia must be the number that…
-
4
votes2
answers8261
viewsA: Sending attachment with Phpmailer
Try this: if (isset($_FILES['uploaded_file']) && $_FILES['uploaded_file']['error'] == UPLOAD_ERR_OK) { $mail->AddAttachment($_FILES['uploaded_file']['tmp_name'],…
-
0
votes5
answers60507
viewsA: DISTINCT and GROUP BY, what is the difference between the two statements?
As far as I know (at least following the basics of database and not each manufacturer’s implementations), DISTINCT algorithms and GROUP BY are identical in their initial stages following first a…
-
0
votes4
answers216
viewsA: Create links with tags registered in the database
The best way is using a repetition system $sql = "select coluna from tabela"; $result = mysqli_query($conexao, $sql); while($dados = mysqli_fecth_array($result)) { echo "<a…
-
0
votes4
answers1118
viewsA: Automate click of button
Create a Javascript function, and call it with onload in the body <body onload="funcao()">
-
1
votes3
answers60
viewsA: Arrendondamento of javascript values
Divide the number by 10, round the result and multiply by 10 again: var number = 33; alert(Math.round(number / 10) * 10); With 500 is logic is similar In 500 it would look like this: var number =…
javascriptanswered Renato Junior 992 -
0
votes2
answers145
viewsA: Leaking memory in PHP
It is very common this happens when a query is made in the database and this is not closed, keeping it open consumes memory and network traffic. A solution in mysql database is to use:…
-
0
votes1
answer69
viewsA: Two Divs opening the same popup
I believe this will help you to assemble your code: <style> .dropdown { position: relative; display: inline-block; } .dropdown-content { display: none; position: absolute; background-color:…
-
1
votes1
answer1778
viewsA: Key Foreign Relationship Problem in Phpmyadmin - Wamp
A foreign key (FK) is a column or combination of columns used to establish and enforce a link between the data of two tables in order to control the data that can be stored in the foreign key table.…