Posts by Silvio Andorinha • 8,394 points
171 posts
-
2
votes3
answers33562
viewsQ: Update records from one table using values from another table
I need to update a table with the value of another table and there are many records so why I’m doing it this way, but my query is not working: UPDATE produtos SET produtos.fornecedor =…
mysqlasked Silvio Andorinha 8,394 -
5
votes3
answers19465
viewsQ: Convert string to MYSQL integer
What command can I use to convert string to integer in mysql? for example: I am making the following list of tables: SELECT mov . * , prod.produto, prod.unidade, prod.icms, prod.ipi, prod.codigo…
-
10
votes2
answers1100
viewsQ: What is the difference between Meter and Progress in HTML5?
What is the difference of these two html tags, only the appearance(layout,color) is different? <meter min="0" max="100" value="22"></meter> <progress value="22" max="100">…
-
6
votes5
answers23456
viewsQ: Add character in the middle of a string
Problem How to add character in the middle of a javascript string? For example: var string = "aacc"; // eu quero colocar as letras bb no meio da aa e cc I want the string be of such value aabbcc How…
-
9
votes2
answers4878
viewsQ: Javascript function does not wait for another to start
Problem My role is not waiting for the other to be finished so it can continue, for example: Example: function buscando_dados(){ $.post('ajax.php',{},function(dados){ alert(dados); }); } function…
-
1
votes2
answers2979
viewsQ: View column quantities in each table
How do I get phpmyadmin to show me this: --- tabelas --- usuarios(5) clientes(20) admins(2) for example using some mysql command or even some phpmyadmin functionality?…
-
0
votes2
answers3832
viewsA: How to capture microphone audio using HTML5 Audio API?
You can take a look at HTML Media Capture and its API. Ericsson laboratories already achieved this, see: here (Note: Note that the device element and Apis are not available in any browser, however,…
-
1
votes4
answers1502
viewsA: Divs floats in a container with height auto
I made some changes CSS: #container{ width:620px; // aumentei para 620 height:AUTO; border:1px #FF0000 solid; } .caixas{ width:200px; height:200px; border:1px #00FF00 solid; display:inline-block; //…
-
-1
votes2
answers266
viewsA: Help to write code
The IF is wrong missed the keys try so: if(MEDIA >=6){ printf ("Alunos aprovados com media: ", MEDIA); } else{ printf ("Alunos reprovados com media: ", MEDIA); }…
canswered Silvio Andorinha 8,394 -
2
votes1
answer360
viewsA: Divs being added on top of each other
What’s happening is that when you exhibit one you forget to disappear the other two in the example below I used the .hide() at a glance here Code $( "#dadosTecnicos" ).click(function() { $(…
-
-1
votes1
answer428
viewsQ: Mysql temporary table
How to assign an update to a temporary table in my case I do an update right at the beginning, create a temporary table and then a Rigger(trigger) in this trigger I try to assign the values changed…
-
0
votes3
answers980
viewsA: Run jQuery on onclick button
Can be by quotation marks try using simple quotation marks like this: <input type="button" id="btnteste" onclick="$('#IDdoTextBox').spectrum('set', $('IDdoCampo').val());" />…
-
-3
votes2
answers141
viewsQ: Uninstall browser by console
I’m trying to use the remote delete navigator;. He even returns to me true but nothing happens in javascript to uninstall the Chrome browser. For some reason it’s not working, someone could help me?…
-
6
votes1
answer2170
viewsQ: What does 1e+24 Chrome console mean?
I noticed that when I type in Chrome console 1000000000000000000000000 he returns me 1e+24. And when I type 1000000000000000009901591 he also returns to me 1e+24 whereas 1000000000000000000000000 is…
-
4
votes4
answers43355
viewsQ: Check if string has only numbers
Which command can I use to know if inside a string only has numbers.. For example, I’m using the prompt: var quantidade=prompt('Quantidade de entrada de produtos(somente números)'); I would like to…
-
4
votes2
answers11882
viewsA: Calling function with onclick
So try, dear friend document.getElementById("btSoyouzm").addEventListener("click", buscaImagem, false); function buscaImagem(){ alert("teste do onclick") } Documentation : addeventlistener…
-
2
votes3
answers982
viewsA: Operation in PHP. Multiplication using percentage
Try it like this, following the formula to figure out the percentage is: (numero1/100) * a porcentagem que você quer descobrir valor = 10; multiplicado = 10*2; porcentagem = (multiplicado/100)*60;…
phpanswered Silvio Andorinha 8,394 -
8
votes5
answers35057
viewsA: How to define the border color of a table without CSS?
So use bordercolor of the tag 'table': <table widths="30;60" cellpadding="1.5" border="1" bordercolor=red> <tr> <td> <p >Data:</p> </td> <td…
htmlanswered Silvio Andorinha 8,394 -
1
votes1
answer724
viewsQ: Notification Chrome
Does anyone know or ever used this Chrome notification and knows how it works? because when I try to use webKitNotifications.createHTMLNotification() he of error ReferenceError: webKitNotifications…
-
3
votes2
answers433
viewsA: Function to clear html
In javascript you can use: document.body.innerHTML = '';
-
1
votes2
answers10718
viewsQ: Search the entire database
Is it possible to query or is there a phpmyadmin tool that does this: Query the entire database for example: I have the value 23600 and I want him to find that value in the entire bank independent…
-
0
votes2
answers163
viewsA: Fittext Resize only works after resizing page in jQuery Mobile
Already tried mobile from jQuery built in 'remissive VCLIQUE' 300ms commit characteristic delay. Using this, you can omit the Fastclick usage. Because Fastclick does the same thing by eliminating…
-
9
votes2
answers148
viewsQ: Why does the Chrome console return 8 when I type 010?
You could tell me why when I type on the console 010 and press enter it returns to me 8 ? and if I type 0100 he returns me 64.
-
0
votes4
answers1039
viewsA: Error while displaying video html
Solution <source src="<?php echo base_url('/assets/videos/teste.mp4'); ?>" type='video/mp4; codecs="avc1.42E01E, mp4a.40.2"' /> a bar before the Assets in the video path…
-
2
votes2
answers17667
viewsA: How to send string variables as parameter to call Ajax?
Use $.post documentation: https://api.jquery.com/jQuery.post/ jQuery var foo = "bar"; var bar = "foo"; $.post('meu_script.php',{ parametro_qualquer_nome1:foo, parametro_qualquer_nome2:bar…
-
3
votes2
answers107
viewsQ: Simple calculation between string and integer
How to stop it from happening? asd = "10" novo=asd/2; console.log(novo) // e ele me retorna 5 Whereas asd is a string and cannot be debt and treated as whole.…
-
-1
votes2
answers5750
viewsA: How to catch a json on an external server with Javascript?
That’s what I was able to find -> You can do it like this: function insertReply(content) { document.getElementById('output').innerHTML = content; } // create script element var script =…
-
2
votes5
answers363
viewsA: What does ? and : within an expression?
It’s called IF TERNARY for example: var maior = (parseFloat(campo1) > parseFloat(campo2)? campo1 : campo2); is the same as maior=""; if((parseFloat(campo1) > parseFloat(campo2)) {…
-
1
votes1
answer186
viewsQ: Message about dppx and dpi on the Chrome console
When I enter the internal system I’m doing here at the company I go to the console and a strange message appears: Consider using 'dppx' Units Instead of 'dpi', as in CSS 'dpi' Means…
-
7
votes4
answers182
viewsA: Error javascript if
Asd is a value boleanus and cannot be treated as a string try the following: var asd=true; if(asd==true){ alert('funcionou'); } or var asd=true; if(asd){ alert('funcionou'); }…
-
4
votes4
answers182
viewsQ: Error javascript if
I’m not able to make a condition with if for example: asd=true; if(asd=='true'){ alert('funcionou'); } but it seems that somehow it is not getting into the if…
-
7
votes4
answers9544
viewsA: How to display parts of a page only after loading the entire content of the site?
Use the DEFER HTML <div id="hiddenDiv" style="display: none;"> <!-- qualquer coisa aqui --> </div> JAVASCRIPT <script type="text/javascript" DEFER="DEFER">…
javascriptanswered Silvio Andorinha 8,394 -
1
votes2
answers160
viewsA: INSERT INTO Does not send data to database
Utilize quotation marks in the insertion variables: $sql = ($con, "INSERT INTO Entregas (dia, cliente, toalhetes, higienico, bidons) VALUES ('$dia', '$cliente','$toalhetes', '$higienico',…
-
1
votes4
answers515
viewsA: Error with simple calculation in javascript
you need to turn into whole so use the function parseInt first for example: num1 = parseInt($("#num1").val()); // exemplo 2 num2 = parseInt($("#num2").val()); // exemplo 50 result = num1+num2;…
javascriptanswered Silvio Andorinha 8,394 -
2
votes4
answers515
viewsQ: Error with simple calculation in javascript
I’m having trouble making an account using javascript: javascript num1 = $("#num1").val(); // exemplo 2 num2 = $("#num2").val(); // exemplo 50 result = num1+num2; This code results in 250 instead of…
javascriptasked Silvio Andorinha 8,394 -
1
votes3
answers2432
viewsA: List months by year in mysql
tries to use this logic or even the code $query=mysql_query("SELECT data, DATE_FORMAT(data,'%Y') as ano FROM tbl_noticias GROUP BY YEAR(data)"); $anos_meses=""; while ($row_anos =…
-
0
votes7
answers175
viewsA: Contact Form
Try it this way if(strlen($_POST["phone"])==9 && is_numeric($_POST["phone"])){ echo 'Número valido'; }else{ echo 'Número inválido'; }
-
-2
votes4
answers599
viewsA: Is there a problem omitting the semicolon in a php tag with only one expression
After any instruction, it is necessary to use a ; for the interpreter to recognize that certain instruction ends there. After ; the interpreter processes the instruction by displaying it in the…
phpanswered Silvio Andorinha 8,394 -
1
votes7
answers6999
viewsA: Split() integer with Javascript
Solution You first need to turn the int/double into string for example: Valor = 19.90; MyArray = String(Valor).split("."); alert(MyArray[0]) // 19 alert(MyArray[1]) // 9 que no decimal é a mesma…
-
1
votes4
answers1002
viewsA: How to reset the hour and decrease a day of a DATETIME?
Try the following code: $date = date_create('2000-01-20 01:00:00'); date_sub($date, date_interval_create_from_date_string('1 days')); echo date_format($date, 'Y-m-d'); Response based on first…
-
1
votes2
answers1050
viewsA: Event that identifies when the browser is resized.
You can do the following: jQuery $(function(){ width_inicial=window.innerWidth; heigth_inicial=window.innerHeight; setInterval(function(){ if(window.innerWidth!=width_inicial ||…
-
0
votes6
answers708
viewsA: How to count the number of clients that returned from one year to the next through SQL?
You need to search by year using the YEAR which serves to extract the year in string format for you to compare, and give a group by in Client for example: SELECT count(*) FROM Servicos WHERE…
-
16
votes2
answers1842
viewsQ: What is the Unicode (BOM) signature?
I noticed that sometimes Dreamweaver puts assinatura unicode (BOM) on some php’s pages, I have to remove most of the time so that there is no spacing on the display page and I’m not sure what it’s…
-
1
votes1
answer1338
viewsQ: Animation library c#
In c# there is some kind of jquery-like library in the sense of making animations effects with form elements like making a text move from one side to the other and etc?
-
4
votes2
answers405
viewsQ: How to make a constant object in Javascript
How do I declare a constant object in Javascript? For example: /* meu código */ object_teste = {valor:5} /* console navegador */ object_teste.valor=10; console.log(object_teste.valor) // aqui ele me…
-
174
votes6
answers5796
viewsQ: How is computer randomization generated?
Doubts How computer randomization is done? What algorithm or mathematical basis does the computer use to generate those numbers? For example: No Javascript utilizo o Math.random() it returns me…
-
4
votes3
answers6755
viewsQ: How do I receive the $_GET value of a URL in Codeigniter
I am sending a value get through a link for example: <a href="/admin/editar_user/5">Editar</a> And there in the method of my controller calling the view I get: public function…
-
-2
votes2
answers559
viewsQ: Error query php/codeigniter
I am using the code below to make a query in the database, but it is giving the following error: PHP Error was encountered Severity: Notice Message: Undefined Property: Admin::$db Filename:…
-
8
votes3
answers2600
viewsA: Align text within <select> in Firefox
try using the padding-top and padding-bottom for example jsFiddle CSS select { padding-top:10px; padding-bottom:10px; width: 200px; } documentation: w3schools…
-
0
votes4
answers2192
viewsA: How to insert a string containing the *character in the mysql database
Try sending the character char * instead of the character itself for example: INSERT INTO tabela (id_radio) VALUES ("23".CHAR(42)."4567")