Posts by Giancarlo Abel Giulian • 3,999 points
173 posts
-
4
votes1
answer4499
viewsQ: Open modal with Javascript to select certificate and send to server
When we enter the page eCAC - Virtual Call Center and we click on Digital Certificate on the right side of the screen a modal is opened to select certain certificate that we configure in the system…
-
3
votes0
answers464
viewsQ: Postgresql Nosql and integration between relational and non-relational databases
I have been researching about Postgresql Nosql and found the concept of Key-Value Stores in some publications, also from HSTORE. I also researched the integration between Postgresql and the Spring…
-
1
votes1
answer1316
viewsA: Wildfly SSL certificate and connection
Solved, to access in a "secure" way, that is, without a certificate signed by a company that issues SSL certificates was included in the URL the https:// and not only localhost:8443/aplicacao. After…
-
0
votes1
answer1316
viewsQ: Wildfly SSL certificate and connection
I followed this answer to this question in the OS to configure SSL: how to configure ssl in wildfly 8.2.0 server? Before without this configuration the access in the door did not work 8443 which is…
-
0
votes2
answers873
viewsA: Apache Commons Email does not send email using Gmail
Solved, it was like this: Email email = new SimpleEmail(); email.setDebug(true); email.setHostName("smtp.gmail.com"); email.setSmtpPort(587); // email.setSSLOnConnect(true);…
-
1
votes1
answer328
viewsA: How to increment a value to a session?
Example: function addCart($product){ session_start(); $_SESSION['cart'][] = $product; } Don’t forget to use the session_start(), can even be out of function at the beginning of the PHP document…
phpanswered Giancarlo Abel Giulian 3,999 -
2
votes2
answers873
viewsQ: Apache Commons Email does not send email using Gmail
Click here to open the repository in Maven Repository for Apache Commons Email. I have the following code that receives from a form the recipient, subject and the message: @RequestMapping(value = {…
-
1
votes1
answer75
viewsQ: JSTL adding null option inside select element
I build a line <tr> using Angularjs and JSTL, and within this line I have an element select where it is travelled by using <c:forEach> over an enumerator to fill it when the user clicks…
-
0
votes2
answers734
viewsA: How to display formatted values in the chart
It was given the following solution but the post was removed, I’m posting again since it helped me, was the solution and thank you: Obs: The author of the reply if you want to publish again here I…
-
0
votes2
answers734
viewsQ: How to display formatted values in the chart
I use the following library to generate the graphs: http://www.chartjs.org I have the following function to format money with semicolon (taken from an answer here in the OS) which returns the value…
-
2
votes1
answer157
viewsA: Query Mysql confusing results
Use JOIN in this case, more reliable for what you want to do: SELECT s.atributo_servico1, s.atributo_servico2 FROM servicos s JOIN clientes c ON c.codigo = s.cliente WHERE c.nome LIKE "Claudio…
-
2
votes1
answer242
viewsA: Create a directive
You can before the closure of controller put, for example: .directive('ngSparkline', function() { return { restrict: 'A', template: '<div class="sparkline"></div>' } }); Or declare the…
-
15
votes2
answers2001
viewsQ: Documentation in software development
I would like to ask my question on the basis of in that matter on tests. There are different ways to document a software, the ones I’ve noticed the most are: Class documentation (developer comments…
-
5
votes1
answer1441
viewsA: Unique identifier of a Smartphone
Navigator You can use the device.uuid, click here to open the link on Universally Unique Identifier (UUID) var string = device.uuid; Useful Javascript libraries fingerprintJS: "Fingerprinting is a…
-
2
votes4
answers34297
viewsA: Take the highest value per category by also loading the ID
You can make a subselect for this. SELECT a.ID, a.CATEGORIA, (SELECT max(b.QUANTIDADE) FROM TABELA b WHERE b.CATEGORIA = a.CATEGORIA) AS QUANTIDADE FROM TABELA a GROUP BY a.CATEGORIA; Consider a…
-
3
votes3
answers1296
viewsA: How to use grid with ng-repeat in Angularjs?
Example of using grid with ng-repeat in Angularjs: <div ng-app="myApp" ng-controller="customersCtrl"> <table> <tr ng-repeat="x in names"> <td>{{ x.Name }}</td>…
angularjsanswered Giancarlo Abel Giulian 3,999 -
0
votes2
answers95
viewsA: Hashmap type attribute appears as Object
Problem solved, the Interface method has been changed staying this way: @Query("select new Map(extract(month from u.atributo1), coalesce(sum(u.atributo2), 0)) from #{#entityName} u where…
-
0
votes2
answers95
viewsQ: Hashmap type attribute appears as Object
I’m using the Spring framework and the repositories, and in one of the interfaces of one of these repositories I have, for example, a method like this: @Query("select extract(month from…
-
1
votes1
answer273
viewsA: How to install serves in eclipse Luna?
Download the package Eclipse IDE for Java EE Developers in which the Eclipse Java EE Developer Tools which contains server-specific components as well as the Views needed to create servers, change…
eclipseanswered Giancarlo Abel Giulian 3,999 -
3
votes1
answer726
viewsQ: Return values of all months of the year extracting by month
I’m with the following SELECT: SELECT coalesce(sum(vs.total), 0) FROM tabela_exemplo t WHERE extract(year from t.data_entrada) = extract(year from current_date) GROUP BY extract(month from…
-
2
votes1
answer67
viewsA: Maximum and minimum payment
GROUP BY clause missing in your SELECT. SELECT c.customerName, max(p.amount), min(p.amount) FROM customers c, payments p WHERE p.customerNumber = c.customerNumber GROUP BY c.customerNumber ORDER BY…
-
1
votes1
answer137
viewsA: One controller method works correctly and another similar returns error
I discovered the problem, in one of the controllers I have for example the following call mapped in the Requestmapping annotation: /modulo1/funcao1. In the other controller I have the call mapped…
-
4
votes3
answers463
viewsA: Add Array from multiple fields
Resolution: $length_array = count($_POST['valor']); $soma = 0; for ($i = 0; $i < $length_array; $i++){ $soma = $soma + $_POST['valor'][$i]; } echo 'A soma é: '.$soma; Or within the loop (for):…
phpanswered Giancarlo Abel Giulian 3,999 -
1
votes1
answer137
viewsQ: One controller method works correctly and another similar returns error
I have two Controller files and two JSP files with the same structure. In JSP I have the following structure for AJAX: $.ajax({ method: "POST", url: '/modulo1/funcao1', data: { 'atributo1':…
-
1
votes1
answer67
viewsA: You can make a code in PHP, when uploading the images, host them on the blogger’s server
You can use the Flickr API for this: https://www.flickr.com/services/developer Image Upload API link: https://www.flickr.com/services/api/upload.api.html Upload URL used for uploading images/photos:…
-
1
votes1
answer257
viewsA: Click on zoom button to show the whole country (Brazil) on Google Maps
HTML: <input type="button" value="Brasil" id="moveToBrasil" /><br> <div id="googleMap" style="width:500px;height:380px;"></div> Javascript: var map; function initialize() {…
-
3
votes3
answers2040
viewsA: Check if a record was deleted when running DELETE query
An equal = assignment operator means that the variable will receive a certain value. Two of a kind == condition operator. So the right thing is: if($result == True){ echo $emailDel.' as deleting…
-
0
votes0
answers50
viewsQ: Registration is not updated in the database
I have an application that takes the content of a given site and compares if it is different from the current one comparing to the record in the database and sends an email that had a change, in…
-
1
votes1
answer642
viewsQ: Angularjs with Single Page and Ng-View does not work properly
I am using the following material as a reference: http://tableless.com.br/criando-uma-aplicacao-single-page-com-angularjs/ I created the files with the structure presented in the material to learn…
-
4
votes1
answer1947
viewsQ: How to extract Array from JSON into an object’s List type attribute
I am using the Flickr API to get the information from the images, which returns the following JSON:…
-
1
votes0
answers73
viewsQ: Return content to client application with defined header
I have an application that returns JSON content from PHP to an HTML page, but I do this without defining the header, such as, for example : header('Content-Type: application/json');, that is, in the…
-
1
votes1
answer107
viewsQ: Offline Web application server and client application takes position
I wonder if there’s a way for a client application to take over when the server is down, like a Dropbox, for example, you can put a file, or a directory inside the folders that are synced through…
-
1
votes1
answer694
viewsQ: Spring JPA XML error
After I updated the Eclipse of the Luna version to the Mars version is returning error in the first line of the Spring JPA XML file, in the XML declaration: <?xml version="1.0"…
-
3
votes3
answers3518
viewsA: How to solve the problem "The main method was not found" in a Java class?
Example: public class Declaracao_Array { public static void main(String[] args) { } public static void metodo(){ } }
-
5
votes2
answers631
viewsA: Problem with Arraylist
You are defining that the list will contain variables of the type Integer while you are filling in with variables of the type String who are the names. If you will not add a value that type is…
-
1
votes0
answers153
viewsQ: How to remove the variable value with JSTL?
I am testing to clear a list of objects that is passed to JSP, and run the command below: <c:remove var="lista" scope="session" /> <c:out value="${lista}"></c:out> But when I call…
-
3
votes1
answer2195
viewsA: How to go back to an Activity already created without recreating it again?
You can use the constants that class Intent offers to developers. Example: Intent it = new Intent(Class1.this, Class2.class); it.setFlags(Intent.FLAG_ACTIVITY_NO_HISTORY); startActivity(it);…
androidanswered Giancarlo Abel Giulian 3,999 -
2
votes1
answer217
viewsQ: Client sending String[] instead of Bigdecimal to server when changing
When it’s a re-registration works peacefully, the problem is in the alteration. I own an object To who is the master, another object B which is a ArrayList and detail of the master To and finally,…
-
5
votes3
answers1474
viewsA: How to repeat columns up to "x" of times
A tip: organize your code, opening and closing the PHP tag several times can end up making you lose yourself. A hint is also to store HTML in a variable, and give echo at the end, or several echo…
-
1
votes1
answer2186
viewsA: How to release the data that are in the "date" folder of Android phone?
For applications in debug mode and rootless you can follow the commands to extract the AVD database: adb shell "run-as com.app chmod 666 /data/data/com.app/databases/data.db" adb pull…
-
2
votes1
answer53
viewsA: How to create tag event?
You can use the Select2 component to do this. Click here to open the link. Example: $(".js-example-basic-multiple").select2(); <select class="js-example-basic-multiple" multiple="multiple">…
-
3
votes4
answers570
viewsA: Extend x Superscript, what’s the difference?
Examples: Extend: class Pessoa { String nome; setNome(String nome) { this.nome = nome } getNome() { return this.nome } } class Funcionario extends Pessoa { /* Método getPis() ou setPis(String pis)…
-
2
votes2
answers730
viewsA: What better option to protect directories and files in a root folder?
Examples. Change file httpd.conf or apache2.conf. To block access to files with extension .conf and .log. <Files ~ "(.conf|.log)"> Order allow,deny Deny from all </Files> To block a…
-
0
votes2
answers207
viewsA: Problems in the return of a JSONP
Following example: $.ajax({ type: 'GET', url: url, async: false, contentType: "application/json", dataType: 'jsonp', complete: function(data) { console.log(data[0].atributo); } }); Or if you…
-
2
votes3
answers1605
viewsA: Can you access the bash on Android?
Complementing the answers already published here in the question, a legal way to use the adb is you setting as an environment variable. So you can use commands adb shell, adb devices, or any other…
-
2
votes0
answers1530
viewsQ: Apache does not load PHP module
I’m following this article to configure Apache and PHP: Installing and Configuring the PHP Development Environment - Part 2 I’ve set up the php.ini and httpd.conf besides the DLL php5apache2_4.dll…
-
4
votes1
answer190
viewsQ: Git repository replication on local machine and Github
There is a way to replicate a particular repository between Github and a local machine the team uses? In case of failure of Github servers the team uses the local server and as soon as Github…
-
2
votes2
answers237
viewsQ: Math account with exact precision returns different value in Javascript
I have the following mathematical operation, and what’s worse, this operation manipulates monetary values. 3898.95 / 3.0 If you do this operation on the calculator the result will be equal to:…
javascriptasked Giancarlo Abel Giulian 3,999 -
1
votes1
answer934
viewsA: What is the Dispatcherservlet function in Spring?
The work of DispatcherServlet is to take a requested URI and find the right combination of the handler (usually methods in the controller classes) and views (usually Jsps) that match to the form of…
-
4
votes1
answer3611
viewsA: Mysql Workbench does not start
How to find and report Mysql Workbench bugs: # Microsoft Windows shell> cd "C:\Program Files (x86)\MySQL\MySQL Workbench CE 6.3.4\" shell> MySQLWorkbench.exe -log-level=debug3 # OS X shell>…
mysql-workbenchanswered Giancarlo Abel Giulian 3,999