Posts by Bruno Spy • 587 points
32 posts
-
0
votes1
answer41
viewsA: AJAX jquery request generating an array with only one field loaded
I would iterate over the array by taking only the name and adding to a new array of names. As follows: var names = []; $.get('http://urlEmquestao', function(response){ for (var i = 0; i <…
-
9
votes2
answers253
viewsQ: Why is it good practice to generate unique user code?
Many enterprise systems use a customized unique identifier. You have the generation of id in the database and a custom code. When a customer search is done, the custom code (something like ZT2578B)…
-
1
votes2
answers123
viewsA: Doubt architecture deployment with Elasticsearch?
Elasticsearch is a real time search engine based on Lucene, naturally distributed, scalable and Rest server. It basically uses Lucene to do data indexing and makes it scalable through index…
-
0
votes3
answers140
viewsA: JPA+Hibernate: Error removing from an entity
Hello, consider doing it this way: public void removeById(Class<T> clazz, Long id) { try { Query query = em.createQuery("delete from " + clazz.getSimpleName() + " where id = :id ");…
-
0
votes1
answer54
viewsA: Intent on Fragment Activity Android
Hello, first you should add the internet permission on Androidmanifest.xml <uses-permission android:name="android.permission.INTERNET" /> Then you can call Intent by passing the URI Uri uri =…
-
2
votes1
answer150
viewsQ: Weak AI, concept and example in software development
Weak AI is about building software in a certain intelligent way. Can all computer-processed logic be considered weak AI? or only falls within this category those structures that we see or hear about…
-
1
votes1
answer754
views -
0
votes2
answers362
viewsA: POO JAVA - Doubt Exercise
public Date(int d, int m, int a) { this.dia=d; this.mes=m; this.ano=a; } This operator is used when we want to reference members of the class itself. Then according to the Exercise you must create a…
-
10
votes2
answers187
viewsQ: In which scenarios is Elasticsearch worth using?
In which scenarios Elasticsearch is indicated as a replacement for ER or NOSQL database searches. The main doubt is when I should use Elasticsearch, because I realize in my applications that a…
-
1
votes1
answer61
viewsA: Elasticsearch Inner with shop
Hello, Elasticsearch works with data collections. Therefore you do not have foreign key with strong referential integrity as in relational banks. In your case I would put the store id on Collection…
-
1
votes2
answers3107
viewsA: How to generate executable program . jar in VS Code?
Hello, you can use the command: jar cf jar-file input-file(s) Where input-file(s) are the classes you want in the jar. The visual code has a built-in terminal.
-
1
votes1
answer499
viewsA: Best way to store a JSON
The best way would be to convert to a javascript object. Most browsers support JSON.parse(), which is defined in ECMA-262 5th edition (the specification on which Javascript is based): var json =…
javascriptanswered Bruno Spy 587 -
2
votes1
answer790
viewsQ: What is the best way to work with java queues?
In which scenarios is a queue required? What is the advantage of using this algorithm?
-
0
votes0
answers348
viewsQ: Problem with debug in android studio
Hello, I was debugging the application normally on the device, I stopped the debug I made a correction and when I started the debug I got the following message: Debug port (8700) is busy, make sure…
-
1
votes3
answers514
views -
0
votes3
answers1008
viewsA: How to list objects in Javascript
First you must create an array and store the objects. Then to list the objects in the array you can use the console.log(array). If you want to see the contents of each object in isolation you can…
-
1
votes3
answers1279
viewsA: How do I view the JSON of the API?
Man, if I understand correctly you must be wanting to view the data returned in the correct API? You can use the.log(data) console to view. And to access each attribute of the vc objects you can use…
-
0
votes0
answers38
viewsQ: Location of the file where the data is saved in the Parse library
I’m doing maintenance on an android project that was developed using parse library to make the persistence layer. http://parseplatform.github.io/docs/android/guide/ I couldn’t find it in the API,…
-
0
votes2
answers267
viewsA: 404 in css file after spring mapping
Hello, when creating links to Sources it is good practice to use the context of the application. You can use jstl to insert the context dynamically, so you can write this link as follows: <link…
-
0
votes2
answers775
viewsA: How to save user session by logging in using Java +Angularjs
Hello, which mvc framework are you using? If Spring is very simple, see the example: public String salvarUsuarioNaSessao(@RequestParam Usuario usuario, HttpSession session){ // Seta na session…
-
0
votes3
answers218
viewsA: Problem with JS/Jquery/JSON/AJAX
Hello, when you use the @Requestmapping annotation to produce={"application/json"} you don’t need to write it down with @Respondebody. You also don’t need the return to be string type, you can…
-
2
votes1
answer111
viewsQ: Consult sqlite database created by core data
I’m studying core data on Ios. I created a template and entered some records. I would like to query these records using SQL in the "DB Browser for sqlite" program, but I don’t know where Xcode…
-
1
votes1
answer86
viewsQ: SSL configuration in Microsoft Azure for Java projects running on Tomcat
I need to make an HTTPS configuration in a java project on Azure. In the project I use spring security and Tomcat. I searched on many sites how to make the configuration but found different…
-
0
votes2
answers393
viewsA: Message to the user in Label with Jquery
Hello, have you considered using the plugin Jquery validate? This work is much simpler with it. Follow an example: $("#validaEmail").validate({ rules: { email: { required: true, email: true, remote:…
-
1
votes2
answers195
viewsA: How to convert a string with minutes/month/year to Timestamp?
Hello, using Jodatime, you can do more or less like this. public class TesteData { public static void main(String[] args) { String tempo = "10s"; //1 segundo String tempo2 = "30d"; //30 dias…
-
1
votes1
answer818
viewsA: How to take a screenshot save to the project folder and save the path to the Mysql database?
Hello, use getAbsolutePath method(). For example: String diretorio = outputfile.getAbsolutePath();
-
0
votes2
answers114
viewsA: Tableview does not update
Hello, I do not know if you have already solved, to update the table view use the reloadData method(). For example: self.minhatableView.reloadData()
-
1
votes1
answer65
views -
2
votes2
answers1673
viewsA: How to resolve this 'java.lang.Illegalargumentexception: Unknown Entity' when running this simple application?
Hello, I believe the problem is in the id generation strategy that in the entity is not defined. Try it like this: @Id @GeneratedValue(strategy=GenerationType.IDENTITY) private Long id;…
-
-1
votes6
answers4503
viewsA: If null, Nan, false and Undefined in Javascript
Hello, use typeof to check Undefined. For example: var variavel; if (typeof variavel === "undefined"){ console.log("sem valor atribuido"); }…
javascriptanswered Bruno Spy 587 -
1
votes1
answer68
viewsA: Hosting a small javaweb software on jelastic localweb
If your application is well structured it will not have any problem. To see if understood, vc wants to sell the software to different clients using the same correct Mysql base? If so, it is a matter…
-
0
votes1
answer73
viewsA: Connection to Hibernate, java.lang.Nullpointerexception error
Hello, in Hibernate.connection.url leave in the following format: jdbc:jtds:sqlserver://localhost:1433/fusion When the JTDS drive is used the correct syntax is to use :jtds after jdbc.