Posts by Guerra • 8,533 points
116 posts
-
3
votes1
answer2818
viewsA: How to make a payment system via boleto?
Daniel, with the opensource project boletophp you can generate billets from almost every bank, if I’m not mistaken in the project is more for billets without registration, but with some…
-
1
votes1
answer55
viewsA: Create dynamic border on an image after marking a checkbox
The ideal would be to see how is generating the HTML of the images but the idea is, let’s assume that the "value" of the checkbox that has $image, is the same "id" of the image. That is to say Then…
-
0
votes1
answer157
viewsA: Date position for Google Gantt chart
Opa define this in your options: var options = { axes: { x: { 0: {side: 'top'} } }, avoidOverlappingGridLines: false }; That will solve :)…
-
1
votes1
answer38
viewsA: How to prevent Highchart from connecting the ends of the series?
Your lines are connected by the order you are going through and not by the "range" between one and the other. So your array you were passing some points that came before this "first" there,…
highchartsanswered Guerra 8,533 -
3
votes2
answers516
viewsA: Authentication using Codeigniter
Let’s assume that your controller file calls "user.php" Would look like this: <form id="login" method="post" action="http://www.seudominio.com.br/index.php/user/login/">…
-
2
votes2
answers32
viewsA: How to expand an array_shift beyond the amount of indexes?
I don’t know if I got it right, but array_shift removes the right first item? I imagine something like that will solve your problem: $cores = ["primary", "secondary", "tertiary", "quaternary"];…
-
6
votes2
answers982
views -
0
votes1
answer4528
viewsA: how to decrypt md5 and sha1?
Both MD5 and SHA1 are encryption that are not decryptable. The correct way to use is: When something is encrypted in md5 or sha1 it will generate a 128 bit HASH and will usually have 32 hexadecimal…
-
2
votes1
answer115
viewsA: Query in 3 tables and comparisons with sql
You must respect the normal database rules. Primeira Forma Normal (ou 1FN) requer que todos os valores de colunas em uma tabela sejam atômicos (exemplo: um número é um átomo, enquanto uma lista ou…
-
1
votes1
answer833
viewsA: Play and Pause button in image animation using Javascript in HTML
<style type='text/css'> #animation img{ display: none; } #animation img:first-child{ display: block; } </style> <script type='text/javascript'> //<![CDATA[ function…
-
3
votes1
answer56
viewsA: Improvement in Chat application
This practice you are applying makes the application unusable as it will be holding the php to have a message, allowing a great chance to give timeout. The best play in this case would be using…
-
0
votes3
answers1267
viewsA: Is there an alternative method to window.print()?
Try this solution: window.frames["printf"].focus(); window.frames["printf"].print(); But with source code it is easier to identify the problem.
-
2
votes3
answers346
viewsA: .serialize() only lines marked with checkbox
It would have to be something like this: $('#form input[type=checkbox]:checked').serialize()
-
1
votes1
answer687
viewsA: Error while trying to execute Insert PDO function - PHP
The syntax of Insert is: INSERT INTO TABELA (CAMPO1, CAMPO2, CAMPO3) VALUES (VALOR_CAMPO1, VALOR_CAMPO2...) But in this row you use the id that returned from the last query to list the columns:…
-
2
votes3
answers436
viewsA: What is the purpose of array_map to accept infinite array parameters after callback?
I believe this is because when you create the call back function you can use infinite parameters so the array_map allows as many parameters as possible, as long as it is compatible with your…
-
1
votes2
answers870
viewsA: How best to reuse code between modules
Basically there are two ways, defining as a service or putting it in its root scope. The ideal is to create a service so as not to pollute its "root" scope. You can create a service and make it…
-
11
votes1
answer1440
viewsA: What is Spring MVC?
Spring MVC is a JAVA framework that implements the Pattern MVC design. Its main features can be viewed here Among them exist: Addiction injection Aspect-oriented programming including Spring…
-
3
votes3
answers2804
viewsA: Comparing an array element with a string
The problem there is that within the first execution it checks: a > 1 ? But at the first run it will never be greater than 1, just like you put Else. It always falls into Else. It’s right to…
-
2
votes1
answer614
viewsA: Sliding divs for content
I recommend using this component: Slick is easy to use follows an example: <html> <head> <title>My Now Amazing Webpage</title> <link rel="stylesheet" type="text/css"…
-
1
votes1
answer751
viewsA: How to create content on a page that is within iframe using innerHTML
Try this: First put id in iframe: <iframe name="frameConteudo" id="frameConteudo" class="frameConteudo" src="listaAluno.html" scrolling="no"></iframe> Then call it that:…
-
1
votes3
answers15395
viewsA: Google MAPS API location from the address
Yes, I recommend reading the API documentation and viewing the examples. I didn’t know anything about the API either, but using the examples I managed to implement something like this very quickly.…
-
1
votes1
answer765
viewsA: How to import data (Inserts) to a model (.MWB) in the Workbench?
It is possible to dump your database by Workbench you have to click with the right button on the base and ask to export but this process is time consuming. I recommend using command line: You told q…
-
0
votes1
answer193
views -
1
votes2
answers529
viewsA: Load page without loading music player
Oops, in your case you would have to do an ajax that would give the refresh on the page less in the player. Only solution. If pressing F5 has no way to escape, you could use something with lazyload…
-
1
votes1
answer161
viewsA: Script does not work with external host
For this you will need to use google api, take a look at the documentation: https://developers.google.com/picker/docs/ The google example itself: <!DOCTYPE html> <html…
-
3
votes2
answers720
viewsA: Store query content in an array
You have to see its architecture but theoretically if your listItensObra returns the array already does so: $resultado = $itemObra->listarItensObra($_GET['id'], 0); But it is not indicated to use…
-
2
votes1
answer225
viewsA: Select Count with Union
select count(*) as quantidade_ballet, (select count(*) from alunos where datamatricula>='2015-01-01%' and datamatricula<='2015-09-04%' and (indjazz=1 and indballet=0)) as quantidade_jazz,…
-
2
votes2
answers1439
viewsA: How to export query to CSV with each column in a cell?
That code must do the magic: SELECT order_id,product_name,qty FROM orders INTO OUTFILE '/tmp/arquivo.csv' FIELDS TERMINATED BY ',' ENCLOSED BY '"' LINES TERMINATED BY '\n'; I searched this link:…
-
6
votes1
answer854
viewsA: mysql + PHP - use or not use mysqli_close()
Connections that are not persistent close themselves at the end of the script in the theory you don’t need to close it. But if your script takes too long to run, it is interesting that you close the…
-
0
votes2
answers967
viewsA: Error caused by line break in append
You can use the n: $('#teste').append('<div class="qualquer">\n<div class="subdivs">\nconteudo da subdiv\n</div>\n<div class="subdivs">\nconteudo da…
-
4
votes6
answers650
viewsA: How to extract a variable from within a function
The variables created within the function exist only in this scope, that is within the function. To access them both inside and outside, they must be created outside the function within the general…
-
1
votes2
answers2013
viewsA: Modal Bootstrap > While Loop > Open Modal Item
I imagine by what I understood that when clicking on the links you should make an ajax request to the url in case for the single.php from there take the return that should be a preferred html and…
-
6
votes2
answers855
viewsA: Update from change in select
It can be used in many ways, I suggest 2: First place the function call directly in the element event like this: <select onchange="funcaoJavascript()"> <option…
-
2
votes1
answer1088
viewsA: search product/property with autocomplete and fill content dynamically with php and mysql
I haven’t read all your code, But theoretically you should return in your ajax the result that should be displayed in the window of the exchange of this line of code:…
-
2
votes1
answer793
viewsA: add values from one table and put the result in another
try this: INSERT INTO accounts values (select account_id as id, SUM(pontos) from players group by account_id);
-
2
votes3
answers566
viewsA: Call construction class
In this case you are forcing the typing of the parameter to a class of type "Class". The advantage is that you guarantee data type and can work better with polymorphism and ensure system integrity.…
-
0
votes2
answers124
viewsA: Multi CEP Sender - Magento
From what I understand you need a customized shipping method. Try to create yours, take a look at this wiki of the Gento who helped me a lot. here…
-
2
votes1
answer74
viewsA: Limit to one click per person
Opa use esse javascript: var createCookie = function(name, value, days) { var expires; if (days) { var date = new Date(); date.setTime(date.getTime() + (days * 24 * 60 * 60 * 1000)); expires = ";…
-
1
votes2
answers367
viewsA: Pass jquery variable in filename - as if it were get
Opa inside Translator.js you can capture the value by using jquery thus: Declare your script like this: <script src='app.translator.js' lang='pt_BR' parametro='teste'></script> var…
-
1
votes1
answer194
views -
0
votes1
answer108
viewsA: Create "dependent" attributes in Magento
There is no such thing as dependent attributes, what happens is a combination of products available for example: You will create in Magento the size attribute, and you will define it with the…
-
0
votes3
answers800
viewsA: List every month in an intevalo, or in the query or in the programming?
You want a date interval ? SELECT DATE_FORMAT(dt_validade, '%m-%y') as mesAno, count(*) as qtde FROM tabela WHERE dt_validade > '{$today}' OR dt_validade = NULL OR dt_validade = '' GROUP BY…
-
3
votes4
answers410
viewsA: Problems sending data via _GET
If you are using jquery to send the form try sending it this way: $('form').serialize();
-
7
votes1
answer1799
viewsA: Maze Program, how to solve?
Let’s think together so you already know more or less how to get to some logic. The biggest challenge for programmers is to find a logical and simple way to solve everyday problems. Let’s assume…
answered Guerra 8,533 -
3
votes1
answer215
viewsA: Slider Jquery - Photo Gallery -PHP
Exactly the way you want to kind of pick up and already get out using I don’t know any. You’ll probably have to take a more or less similar and customize. I suggest some. Jssor < this is very…
-
1
votes1
answer808
viewsQ: Convert string to WE8MSWIN1252
Starting working with PHP+Oracle, and I’m having trouble encoding the strings in WE8MSWIN1252 format for oracle. Does anyone have more information?
-
3
votes8
answers26648
viewsA: How to backup Mysql Database Diaries?
There are a thousand ways. Take a look at this opensource project that can solve your problem: http://sourceforge.net/projects/automysqlbackup/ Or read this blog that suggests 10 different ways.…
-
0
votes3
answers1778
viewsA: How to select rows from table A that are referenced in a column of table B?
select * from a where FIND_IN_SET(a.id, SELECT REPLACE(B.lines_id, ';', ',') AS ids FROM table_eshop B ); …
-
1
votes4
answers8540
viewsA: How to let bootstrap tab active after clicking on pagination?
Friend you can implement this function: function getURLParameter(name) { return decodeURI( (RegExp(name + '=' + '(.+?)(&|$)').exec(location.search)||[,null])[1] ); } That will capture…
-
3
votes3
answers8451
viewsA: Problem with uploading large files in PHP
Configure this information in your PHP.ini: upload_max_filesize 10M post_max_size 10M max_input_time 300 max_execution_time 300 Then set the constants in your code: ini_set('upload_max_filesize',…