Posts by Carlos Rocha • 1 point
426 posts
-
1
votes0
answers65
viewsQ: Plugin nicescroll error in Chorme
I’m having problems with the plugin nicescroll of JQuery in the Chrome I’m doing like this: <script type="text/javascript"…
jqueryasked Carlos Rocha 1 -
0
votes1
answer2095
viewsQ: Catch the index of the array in the foreach
I have the following class CarrinhoDao.php creating an array of objects from Carrinho.php that creates a class object Produto.php I’m making a foreach in the resulting array: <?php require_once…
-
3
votes1
answer1918
viewsQ: Add objects to the array
I got the dao down: <?php class CarrinhoDao { private $carrinhoDao = Array(); public function __construct() { } public function insereProduto($_produto) { $carrinhoDao[] = $_produto; print…
-
3
votes2
answers76
viewsQ: Error passing variable as double parameter
I have a function pesquisaPagamentos($pesquisa) I have a variable $pesquisa which is receiving the following amount: '2015-10-05','2015-10-01', with single quotes. It happens that the way this, when…
-
2
votes2
answers64
viewsQ: 1054 - Unknow colunm in on clause
what’s wrong with this consultation? SELECT clientes.idClientes, clientes.nome, clientes.bloqueado, planosclientes.idPlanos, planos.nome, enderecos.bairro, enderecos.cidade FROM planosclientes INNER…
-
0
votes1
answer1089
viewsQ: IF conditional within SQL query
I have the following appointment: $string = " SELECT DISTINCT(idClientes), nome FROM clientes WHERE idClientes IN ( SELECT idClientes FROM planosclientes WHERE idPlanosClientes IN ( SELECT…
-
-1
votes2
answers2784
viewsA: How to concatenate PHP variable with Mysql column?"
On second thought, I guess I won’t even need this. A Customer has a plan and undertakes to pay every day '15' for example. So on day '7'$ for example I want to take the list of the month. As only…
-
-1
votes2
answers2784
viewsQ: How to concatenate PHP variable with Mysql column?"
I have the following appointment: function retornaClientesDevedores ($mesReferencia, $dias) { require_once "PhpUtil.php"; $PhpUtil = new PhpUtil(); $string = "SELECT idClientes, nome FROM clientes…
-
2
votes1
answer171
viewsQ: Loop in Jquery autocomplete
I’m using this plugin - jquery autocomplete. I have a select option and the plugin dynamically creates a input type="text" and hides the select. Everything works! I would like to know how to make,…
-
0
votes0
answers108
viewsQ: Pick the string of a non-existent request
How to pick the string of a non-existent request? I am using . htaccess to redirect missing url requests (error 404). But I would like when the 404.php page was displayed, I would like to pick up…
-
4
votes1
answer562
viewsQ: Enable php error page
I’ve seen several attempts to enable error pages in apache/php but none worked here. have file .htaccess and in it I have the following lines: ErrorDocument 400 /index.php ErrorDocument 401 /401.php…
-
0
votes1
answer245
viewsQ: Popular type["text"] by select
I’m trying to popular a type["text"] through jquery and it’s not working! Form: <div> <label>Plano:</label> <select name="plano" id="plano" required> <?php echo…
-
2
votes2
answers282
viewsQ: How to work with jQuery autocomplete?
I’m using autocomplete from jQuery, but I’m having the following problem: In the first line of <select> I’d like the famous to appear "Escolha abaixo uma opção" <option value="">Escolha…
jqueryasked Carlos Rocha 1 -
1
votes1
answer66
viewsA: Help with function return!
I got! <?php function comparaArray($array1, $array2) { foreach ($array2 as $indice2=>$valor2) { foreach ($array1 as $indice1=>$valor1) { if($valor2[0] == $valor1[0]) { $array2[$indice2][2]…
phpanswered Carlos Rocha 1 -
0
votes1
answer66
viewsQ: Help with function return!
I have the function below that adds me an index on the second level of the array. Is working properly with for loop. <?php function comparaArray($array1, $array2) { for ($i = 0; $i <…
phpasked Carlos Rocha 1 -
4
votes2
answers475
viewsQ: Include extremes in BETWEEN and List missing values in SQL query
Next. Imagine I have in the bank in the paid months field the following releases: 2015-03, 2015-04, 2015-7, 2015-9. If we set a period for example: from 2015-02 to today (2015-9). Which months are…
-
0
votes1
answer1270
viewsQ: Fill select with Jquery
I am using the Jquery autocomplete and it is working noralmente. But, this populating a type text that contains only one field (txt itself) to fill. I would like a select to be filled instead of…
jqueryasked Carlos Rocha 1 -
5
votes2
answers305
viewsQ: How to model plots when you don’t know how many there are?
Usually, when it comes to payments in instalments, comes the idea of 12 installments. Then you soon create a table with 12 fields, one for each portion. But I am faced with the situation that the…
-
5
votes2
answers1455
viewsQ: How to create this rule in mysql
I have a field on my table: tipoEndereco char(1); But this field only receives two possible values, which are: 1-> i (Instalação) 2-> c (Cobrança) Because of that, I’m thinking, and I’d like…
-
1
votes1
answer317
viewsQ: How to convert TIMESTAMP/DATETIME to Gregoriancalendar?
How do I convert a TIMESTAMP or DATETIME mysql in a GregorianCalendar Java? Or a better idea? In class, the field dataCadastro is the type GregorianCalendar. I’m recording in the bank on the guy…
javaasked Carlos Rocha 1 -
2
votes1
answer957
viewsQ: How to use variables declared on other JSP pages after include?
I have a jsp page with only two includes in the whole code: <%@ include file = "../_global/prefixos.jsp" %> <%@ include file = "../_global/testaProfessor.jsp" %> In prefixos.jsp I have…
-
14
votes6
answers1655
viewsQ: Heritage and Polymorphism
I have the class Funcionario. private String nome; private int idade; public function vender (Funcionario f) { ... } I have the subclasses Gerente and Professor that inherit (extend) from…
-
0
votes2
answers387
viewsA: Problems with if Else in Servlet
insira o código aquiSee what you’re doing: RequestDispatcher rd; if (/*condicao*/) { arquivo.tarefa1 = 0; request.getSession().setAttribute("arquivo", arquivo); rd =…
-
7
votes1
answer120
viewsQ: Doubt with Servlet
Hello, I have a question with Servlet’s. Picture the picture: raiz / / formulario.jsp / Servlet / retornos / retorno.jsp The form sends to Servlet the data by post or get! After this submission,…
-
8
votes2
answers456
viewsQ: Error in include JSP
I have the following situation: Servlet instantiated at the root /Minhaservlet Jsp instantiated in a folder inside the root: /folder/file.jsp Inside that file I have the following <img…
-
3
votes1
answer1201
viewsQ: Error 404 directed/or not to the Servlet. Problems with Layout
I am studying java for web (EE) and would like to know if you could help solve a java problem! I have in my web.xml a call to the erro404.jsp file that is at the root of the site to filter out pages…