Posts by Silvio Andorinha • 8,394 points
171 posts
-
4
votes1
answer553
viewsQ: What is the maximum limit of PHP/Mysql/Nginx in a request before giving error 504 Time-out Gateway
And if possible how can I extend this time for large queries/requests?
-
2
votes2
answers109
viewsQ: Array of string elements
How to transform this Object array from td's localidades = "<td style='white-space: nowrap;'>Sto.amaro</td><td style='white-space: nowrap;'>Osasco</td><td…
-
8
votes2
answers2260
viewsQ: Settings for javascript Alert
Are there other ways to change the Alert display? for example when using \n he breaks the line, I wonder if there are other commands of those that I can modify the text display, for example leave a…
javascriptasked Silvio Andorinha 8,394 -
4
votes2
answers10413
viewsA: Button spacing
Do the following, add this code to the CSS #buttonbar button{ margin:-2px; } The smaller the number closer to each other
-
2
votes2
answers746
viewsA: Browse List in Jquery (JSON)
You can use the $.each $.each(Seu_array_json.Detalhes.listVolumes,function(i, value){ console.log(value); // value = cada item da listVolumes });…
-
5
votes2
answers123
viewsA: Convert array to string again
Use the command split() along with the for() var string = bytesFromWords('teste soPT'); array_novo=[]; array_splitado=string.toString().split(','); for(i=0;i<array_splitado.length;i++) {…
javascriptanswered Silvio Andorinha 8,394 -
11
votes2
answers1260
viewsQ: Java future in Chrome - possible complications
According to this news from Techtudo Chrome will no longer support the NPAPI protocol used by java to communicate between java and Chrome I have many web programs that need java running, I wonder if…
-
2
votes1
answer116
viewsQ: Place checkbox on only two items - JSTREE
I would like to know how I do so that the us Child 1 and the Child 2 be of the checkbox type where I can check and uncheck? Note: but only these two us. Code Jsfiddle…
-
1
votes2
answers199
viewsA: List validation with jQuery
In this case below it only adds another task if it no longer exists var main = function(){ $('button').click(function(){ var tarefa = $('input[name=tarefa]').val(); var conferir = $('.item').text();…
-
7
votes1
answer13295
viewsQ: Send file directly to printer via CMD
Does anyone know how I can send a txt file (with EPL commands) manually directly to printer by cmd?
-
108
votes13
answers20263
viewsQ: What makes a language to be considered low/high level?
What makes a language to be considered high-level and other low-level?
-
5
votes1
answer1820
viewsQ: Print EPL code with javascript
I’m doing some testing with the printer Zebra GC420T using the language EPL to generate text and barcode. How can I javascript the printer print the following code? N q812 S2…
-
3
votes2
answers2689
viewsQ: Align text in the vertical center of a circle
How do I get the text inside the circle to be aligned in the vertical center as well? CSS .circle{ position: absolute; background: red; border-radius: 52px; width: 37px; right: 308px; height: 37px;…
-
6
votes2
answers110
viewsQ: index starting from right
Problem I wish when I did "asdhusaidhi asdhasuidhu".indexOf('s') he would return to me 17 concerning the latter s of the string, for example, it start searching from the right.. but instead, he…
javascriptasked Silvio Andorinha 8,394 -
3
votes3
answers54
viewsA: Adding Current class to the menu
Make the following change, it was not working because the tag <li> there is no attribute href and with the .children() he takes the child element that in this case would be the <a> that…
-
6
votes2
answers10690
viewsA: Display a Loader while processing ajax
You can do the following: $("div").html("<img src='imagem_gif_carregando.gif'>"); $.ajax({ url: url, type: 'GET', dataType: 'json', success: function(data) { $("div").html("Requisição…
-
3
votes1
answer4567
viewsQ: Find out if the scroll has reached the end of the DIV
How do I know the user rolled the scroll bar of a div to the end? using jquery. That’s all I’ve got so far scrollTop(); but I don’t know how this command can help me…
jqueryasked Silvio Andorinha 8,394 -
0
votes3
answers5927
viewsA: Group values from an array in PHP
I found a code that might help you $result = array(); foreach ($arr as $data) { $id = $data['prg_cod_barra']; if (isset($result[$id])) { $result[$id][] = $data; } else { $result[$id] = array($data);…
-
1
votes1
answer7085
viewsQ: "Provisional headers are Shown" slow request
When I make an AJAX request with $.post jQuery, while the request is made Chrome displays me a message Provisional headers are Shown and I feel that he stops the request while displaying this…
-
6
votes1
answer2185
viewsA: Insert cities into database
IBGE registration code https://ferreiramauricio.s3.amazonaws.com/files/resource/24/brasil.mysql.sql Copy everything from the CREATE TABLE cidades ( id integer NOT NULL AUTO_INCREMENT, nome…
-
1
votes1
answer105
viewsQ: Replace String in Mysql
I’m doing a query in a table. The field filiais returns the following value ["005","001"] I wanted to directly in the query turn this string(varchar) into: ['005','001'] With the simple quotes My…
mysqlasked Silvio Andorinha 8,394 -
4
votes4
answers4234
viewsA: Convert Mysql date (YYYY/mm/dd h:m:s) to dd/mm/yyyy
You can do this directly in the mysql query Using the DATE_FORMAT() Example SELECT *, DATE_FORMAT(data_cadastro,'%d/%m/%Y') AS data_formatada FROM sua_tabela…
-
0
votes1
answer657
viewsA: Save image in blob
I managed to solve the problem, I just needed to give a mysql_real_escape_string in the image code and send directly to the mysql database in the blob field
-
0
votes1
answer657
viewsQ: Save image in blob
How to write this image code to the blob? data:image/jpeg;base64,/9j/4AAQSkZJRgABAgAAAQABAAD/2wBDAAgGBgcGBQgHBwcKCggLDSkODQwMDRsUFR... I just took a piece of it 'cause it all wouldn’t fit in here.…
-
2
votes1
answer1439
viewsQ: Codeigniter to know if Insert worked?
Using codeigniter how can I know if the Insert into worked really? $novo_usuario=$this->db->query("INSERT INTO usuario (nome, email) VALUES ('pessoa','[email protected]')"); Via the variable…
-
2
votes2
answers7690
viewsA: Clear select and input fields
Just leave him marked with selected <select class="estados" name="estado"> <option value="" selected>UF</option> <option value="bla"></option> </select>…
htmlanswered Silvio Andorinha 8,394 -
5
votes3
answers10221
viewsQ: Identify browser and its version
I did several searches on different sites but I have not found a definitive solution and that for sure for all browsers I wonder how I can identify the browser and its version using PHP. For…
-
6
votes3
answers719
viewsQ: Adapt JS Code to IE8 and IE9
How can I make this code below work on IE8 and IE9, because it only works on 10 $("#input_file").change( function(event) { var tmppath = URL.createObjectURL(event.target.files[0]);…
-
9
votes5
answers6499
viewsQ: Save the binary content of an image in the database
How do I get the bytecode of an image at upload time to be able to store it in the mysql blob field without the need to save the image to ftp?
-
0
votes2
answers565
viewsA: Format String to insert into Mysql (TIMESTAMP)
You can use the strtotime $timestamp = strtotime("2014-11-25T14:13:35.000Z"); // 1416924815…
-
26
votes2
answers3291
viewsQ: Crop image with Javascript
I need to upload a photo and then put it in a modal for the user to make a proportional cutout 4/3 a short web search found this jQuery plugin jCrop. He seems to provide me with the coordinates to…
-
1
votes1
answer270
viewsQ: Javascript syntax error
I came across the following syntax error in javascript/jquery Uncaught Syntaxerror: Unexpected number and I’m using the plugin Number.prototype.formatMoney might have something related? Plugin…
-
1
votes1
answer1330
viewsQ: mysql error when importing tables
When I import from 44 tables mysql returns me the following error: #1062 - Duplicate entry '0000000001' for key 'PRIMARY' Does anyone know what it can be? and how to solve?…
mysqlasked Silvio Andorinha 8,394 -
1
votes1
answer746
viewsQ: Replace javascript does not work in general
Why when I do: "1.000.000,00".replace('.',''); he returns me: "1000.000,00" How do I make it work with all characters? that would be so: "1000000,00"…
javascriptasked Silvio Andorinha 8,394 -
2
votes2
answers1461
viewsA: list of a php survey
I made some changes to the code, first I take the values and then I pass them to html <?php include ("cabecalho.php"); $result = getAllUsuarios(); $nome = ""; $nomeQuestionario=""; $pergunta="";…
-
5
votes1
answer1434
viewsQ: htaccess for web.config
I switched my website to the platform Windows Azure and their server is IIS and my old one was Apache so the routes configured in htaccess are not working, need to know how to convert this:…
-
5
votes1
answer24335
viewsQ: Field date fills with current date automatically
How do I configure mysql in phpmyadmin so that when I insert a record the field data_lancamento automatically fill in the current date without me having to pass the date by php, someone knows? I saw…
-
0
votes1
answer1116
viewsQ: jQuery - accordion open item individually
How to configure the plugin accordion of jquery-ui so that when I click on some item it does not close the others, for example when I click it opens the clicked and closes the others but I want when…
-
6
votes1
answer277
viewsA: Javascript function that checks if the textarea scroll has been moved
In pure Javascript window.onload=function(){ document.getElementById('id').onscroll = function(){ alert('foi movido'); } } Or you can also use this command from jQuery - .scroll…
javascriptanswered Silvio Andorinha 8,394 -
2
votes3
answers233
viewsA: Add enumerator to a PHP table
Missing Enumerators in tag <ul style='list-style-type: decimal;'> echo "<ul style='list-style-type: decimal;'>"; while($exibe = mysql_fetch_array($qr)){ echo '<li…
-
5
votes3
answers657
viewsA: Save current time to a file . txt
Javascript is a language client-side and cannot interact with files in this way. You need some language server-side for example: php, Asp.net…
javascriptanswered Silvio Andorinha 8,394 -
-1
votes2
answers143
viewsA: Tabs with different PHP Query’s
Your code is unstructured, I think that solves your problem: <?php include("conectar.php"); echo '<div id="tabs-1">'; $sql = "select * from Tabelas where Campo1 and campo2"; $qr =…
phpanswered Silvio Andorinha 8,394 -
2
votes1
answer1899
viewsA: Access attribute of a JS object using the key of another attribute
Do the following use the eval, mount the string and after the eval for it to execute as code: var valor = eval("obj2."+obj1.id);
-
1
votes1
answer76
viewsQ: Mysql order by field date original value
I’m doing a query and I’m transforming the data no formato and then I want to use the data_vencimento original in order by but it doesn’t work code: SELECT *,DATE_FORMAT(data_vencimento,'%d/%m/%Y')…
mysqlasked Silvio Andorinha 8,394 -
3
votes2
answers8336
viewsA: How to center the <th> header of an HTML table with css?
As @bfavaretto said in commenting, fixing the html: Response in visualization here Also invalid to use id cabecalho for all the <th> switch to class: <table id="tabela"> <tr id =…
-
1
votes2
answers5325
viewsA: How to force the "change" event of an input select, even without choosing another value?
With pure javascript you can use the onchange() document.getElementById("cb").onchange(); The second problem is solved like this: $(this).show().attr('selected',true); // assim você seleciona o item…
-
0
votes1
answer57
viewsA: Unexpected character in Countdownjs
Here you used comma and the correct one would be point and comma var clock = document.getElementById("countdown-holder") // nessa linha , targetDate = new Date(2050, 00, 01); // Jan 1, 2050; //…
javascriptanswered Silvio Andorinha 8,394 -
7
votes5
answers145
viewsQ: Strange behavior in a possible way to comment
I have two functions /########### CARREGAR - LANÇAMENTO ###########/ var carregar_parametros=function(){ alert('asd'); } /########### CADASTRAR - LANÇAMENTO ###########/ var…
javascriptasked Silvio Andorinha 8,394 -
1
votes3
answers21331
viewsA: Insert image into database
You can save the image path, where it is in your ftp for example: foto_do_produto(varchar 100) - seu campo /images/produtos/prod50156.png - o valor do campo For more references and examples of other…
-
4
votes5
answers5625
viewsA: URL friendly with . htaccess
Try something like that RewriteEngine On RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^criacao-sites(.*)$ criacao_de_sites_e_lojas_virtuais.php…
htaccessanswered Silvio Andorinha 8,394