Posts by Carlos Mesquita Aguiar • 89 points
17 posts
-
1
votes3
answers345
viewsA: An array index error
In the Arrays.asList(vet) line. indexof(minor) the index was not finding the lowest value in the list and returned -1. Try the following code to make your ordering correct: import java.util.Arrays;…
-
1
votes2
answers302
viewsA: Combine arrays within array
Try it like this... <?php $arrayTable = array( 0 => array( 'idApiUm' => 123, 'title' => 'Teste' ), 1 => array ( 'idApiDois' => 765, 'title' => 'Título' ), 2 => array(…
-
1
votes1
answer1415
viewsA: python stopwords
How about you try the following: #!/usr/bin/env python # -*- coding: utf-8 -*- from nltk.corpus import stopwords import nltk nltk.download('stopwords') language = "french" for word in…
-
0
votes2
answers335
viewsA: Search for words in almost 1 million files
@Kevin Kouketsu, the best technique to be used for this scenario is the full-text search engine. There is a relational database that has this feature: Postgresql. There is also Solr and…
-
1
votes1
answer233
viewsA: Problem when creating a connection between PHP and Postgresql
To instantiate a PDO object you must do the following (the parameter after the password is the connection options http://php.net/manual/en/class.pdo.php) self::$pdo = new…
-
0
votes1
answer71
viewsA: How to Download SQL Server File using Servlet
Replace Fileoutputstream with Outputstream and enter the file Mime in the header. Below: try { response.setContentType("application/xml"); response.setHeader("Content-Disposition",…
-
-2
votes2
answers122
viewsA: Add accented characters within an array
Follow the answer man... <?php header('Content-Type: text/html; charset=utf-8'); $encoding = mb_internal_encoding(); $f_lambda = create_function('$a,$b', 'return array_key_exists($a,$b);');…
phpanswered Carlos Mesquita Aguiar 89 -
-1
votes2
answers501
viewsA: Is it possible to run 2 queries at the same time in Mysql? Stored Procedure
For your case, the simplest way is to do a subquery to recover all the ID (Primary Key) for you to update the correct record. See below how it would look: CREATE PROCEDURE modificaSalario2() BEGIN…
-
1
votes2
answers767
viewsA: how to create a vector vector?
You can also use HashMap. See code below: import java.util.HashMap; import java.util.Map; public class SingleObject { private static SingleObject instance; private static Map<String,Integer>…
-
1
votes1
answer484
viewsA: MYSQL numeric alpha code
The default AUTO INCREMENT in Mysql is always int! For your specific case, you will need to create a Function with the criteria you mention above. The column for storing the result is varchar(8).…
mysqlanswered Carlos Mesquita Aguiar 89 -
0
votes2
answers91
viewsA: Mysql to PDO conversion
Try in PDO the following: @$sql_usuario = $dbconn->prepare("SELECT * FROM usuario"); @$sql_usuario->execute(); @$Rows = $sql_usuario->fetchAll(PDO::FETCH_ASSOC);
-
-1
votes1
answer33
viewsA: How do I query the database 10 days ahead and 10 days behind the current date?
If you think to include current date plus 10 the function is DATE_ADD(date, INTERVAL value addunit). Do not need to include the signal: DATE_ADD(CURRENT_DATE(), INTERVAL 10 DAY)
-
-1
votes2
answers192
viewsA: Remove a CSV line by position - PHP
Try instead unset($meuArray[$remove]) do the following array_splice($meuArray, $remove , 1).
-
-1
votes1
answer265
viewsA: Delete Mysql data
Create an index with the date column, after that create a precedent with the command "delete from table Where data > '0000-00-00'" and, finally, put an event to call this precedent…
mysqlanswered Carlos Mesquita Aguiar 89 -
0
votes1
answer122
viewsA: WEB Service SOAP instantiating class
Run a test generating your wsdl account -> https://www.eclipse.org/webtools/community/education/web/t320/Generating_a_client_from_WSDL.pdf Follow step by step... If it works just take the code…
-
1
votes1
answer478
viewsA: How to view data (.log) in real time on an HTML page?
Speak David! You can make a javascript call that "will be" x in x seconds! The problem is that the latency to open a txt file, go through the lines and close that file and finally render the content…
-
0
votes2
answers52
viewsA: For better performance in the Postgresql database is it better to have the products divided into smaller tables?
I believe it is even better organized. In my view, you should create 4 tables: construction, development, block and apartment. The sold flag must be set to apartment. A Join among these tables you…