Posts by João Neto • 2,676 points
92 posts
-
1
votes0
answers2050
viewsQ: Correct way to import a project that is on Github
I have a college project hosted at Github, at this link, but in the project I only pushed to Github from the entities files, which have been created so far, I did not push the entire project,…
-
0
votes2
answers794
views -
4
votes3
answers249
viewsQ: How do you make sure the person who used the system is really her?
At the university where we are studying, we are developing a system in Java EE to reduce bureaucracy in some enrollment processes, extinguishing forms and generating PDF forms that, instead of going…
-
4
votes2
answers594
viewsQ: Managing dependencies with Maven in an offline environment
I don’t know if what I’m going to ask is simple or complex, but it turns out that I started using Maven about two weeks ago in college, on a somewhat complex project of the Java EE discipline. I…
-
6
votes2
answers4918
viewsA: How to count how many times an item repeats in an Array with unknown size?
I think you can do so, create a method and pass by parameter the Array and the Item to be checked, if it is a String Array for example: public int contarRepeticoes(String[] array, String valor) {…
-
4
votes1
answer476
viewsA: Vestibular system using JAVA
Well, I’ve developed a solution that fits more or less what you want. The solution reads a vestibular.txt file with the attributes separated by comma, then a Student object is created for each line…
-
1
votes2
answers4842
viewsA: Bringing an Object for a Resultset
I’ve done something similar to what you need to do, you’ll get the following classes: Java carpet. Tapetebd.java. My example is assuming that Material and Form are also tables of your bank, in this…
-
4
votes1
answer1021
viewsA: How to perform a date check?
You can use this solution: public class VerificarData { public static void main(String[] args) { SimpleDateFormat sdf = new SimpleDateFormat("dd/MM/yyyy"); sdf.setLenient(false); String dataHoje =…
-
0
votes2
answers195
viewsQ: JDK Java EE 7 without Glassfish
I am trying to install JDK from Java Enterprise Edition and would like to know if you have any installation option without Glassfish 4, I want to use Tomcat and not Glassfish, so is there any way to…
-
1
votes0
answers85
viewsQ: Transactions on SQL Server, how do they work?
I’m having a hard time understanding this content in college and finding good materials to understand, could someone explain to me in a better way how transactions are specified and defined the…
-
2
votes4
answers2214
viewsQ: SQL query return total of days in a month on two dates
I have the following tables: staff: id_funcionario other information... historical: id_funcionario data_input dating I tried some querys but I couldn’t get what I wanted. What I need is, after the…
-
1
votes0
answers183
viewsQ: Sort table by an attribute that is not in the SQL Query
I have the following query in my PHP code: SELECT id, totaldias, totalferiados FROM dias WHERE MONTH(data) = '$mes' ORDER BY totaldias So far, so good. But I implemented in the system a percentage…
-
10
votes1
answer886
viewsQ: What is the difference between automata and grammars?
I am studying about compilers and relating programming languages. What is the difference between automata and grammars?
-
1
votes1
answer167
viewsA: Organization of codes generated by Windowbuilder
I found the solution, if someone prefers that the components are declared were from the constructor, can make the following configuration: In the eclipse go to the WINDOW tab > PREFERENCES >…
-
1
votes1
answer167
viewsQ: Organization of codes generated by Windowbuilder
I’m using Windowbuilder to draw the graphical interface, but there’s one thing that’s kind of boring about it, and that’s this. When I create a Jlabel for example, it declares the Jlabel inside the…
-
2
votes2
answers505
viewsQ: Passing Different Object Types to a Tablemodel
I’m starting to mess with Jtable but I’m having a doubt. I’m seeing this post here on another forum and my question is. In case it passes to the table template a list of book type: private…
-
9
votes1
answer15796
viewsQ: Mapping and getting mileage between two points
I’m developing a web application, and I’m getting two addresses for a text field, and I’m using to calculate the distance the Matrix API from Google Maps, until then beauty, but I also wanted to…
-
31
votes3
answers25678
viewsQ: What is a Java Bean and what is it for?
I’m starting to read about development java layered, and read something about the bean, an encapsulated class. But I couldn’t find any content that would really explain the purpose and an example.…
-
3
votes3
answers54929
viewsA: Create HTML table and display data using PHP
You can do it this way: //Aqui vai a sua query, e o resultado dela vou chamar de $resultado //Aqui verificamos se existe algum registro da query. if(mysql_num_rows($resultado)>0) { echo…
-
6
votes1
answer7351
viewsQ: How do I popular a Jtable?
I have a very simple java application, which connects to a database, in the console I type the query I want that is passed by parameter to the Query. Now I need to move all this to a graphical…
-
1
votes2
answers538
viewsA: Concatenate array of selected checkboxes to use as a search filter
Kind of gambiarra, but try this, you check, if the control variable $i is smaller than the size of the array, you can add the AND at the end, if the variable is equal to the size of the vector, it…
-
0
votes2
answers177
viewsA: Join 2 if’s Php
I don’t quite understand your question. But from what I understand I will try to do, if I’m wrong, edit your question adding more details. You will create an if to know if the date is filled in, and…
-
2
votes2
answers60
viewsA: Rescue BD Data Only Filled
That doesn’t work? while($exibe = mysql_fetch_array($resultadoQuery) { if($exibe[nome] != NULL) { echo "<p><b>Nome: </b>$mostrar[nome] -- $mostrar[funcao]</p> } EDIT: You…
-
1
votes2
answers1230
viewsQ: Form action for same page or different page?
In the creation of an HTML form with insertion in the database, the action from the form to the page itself or to another PHP script. I’m in doubt about which would be the best option. I always use…
-
9
votes2
answers2639
viewsQ: How to hide source code from PHP file?
I developed a system and the place where I work wants to distribute it to all the branches, I have no intention of charging for it while I work there, but if one day I leave yes. The system is made…
-
3
votes4
answers6030
views -
5
votes3
answers1785
viewsQ: How to deal with multiple queries?
I have a question related to good programming practices. How to deal with multiple queries on the same page in PHP. For example, the code: $qr = "SELECT historico.*, funcionarios.nome FROM historico…
-
0
votes4
answers145
viewsQ: How to define database tables?
I need to compute X hours worked for an X employee in month X. For example, John worked 20 days in January, 12 in February, and so on. To lost in relation to table, create a table only for dates? Or…
-
4
votes2
answers3023
viewsQ: Query in Mysql to return scheduled records for the next 30 days
I have a table called AGENDA, where I have the fields, ID, Location, Date. Do the insertion and selection inside the database already managed to do correctly. But I can’t select the date in…
-
2
votes1
answer197
viewsQ: Difference in onCreate(Bundle) parameter
I had a doubt here reading Ricardo Lecheta’s book, android, in which I saw no explanation neither in the book, nor found on the internet. Some examples use the onCreate function like this:…
-
1
votes3
answers3192
viewsA: Why so many folders with the name "Drawable" on Android?
It is good that you create several images, one for each folder, one with low resolution, an average, and so on. Because thus you will gain greater "elasticity" for the different sizes of gadgets and…
-
3
votes2
answers4482
viewsA: How to view locations near the current location of your Android Device
Try this: Location loc; ..... float radius = 50.0; // Raio em metros. float distance = loc.distanceTo(loc2); // recebe distância entre os dois pontos. if (distance < radius) then inside. //…
-
1
votes1
answer266
viewsA: Is it possible to take the Foursquare API to see the location of all establishments?
Yes, it is possible. Using Google Maps and the Google Places API, you can list all the establishments that are registered in it, dividing them by industry, by the distance of the user (using gps)…
-
0
votes2
answers283
viewsQ: How to make divisions in the software development process
We have a whole project architected on paper, drawings, sketches, what each part of the system will do, but how can we manage the team, define by which part of the code to start? By news feed or by…
project-managementasked João Neto 2,676 -
1
votes2
answers664
viewsQ: How to better define the minimum API for a project?
I started a project and had many problems because I chose version 2.3 as a base, now I am working on another application that will have to have: connection to online database, and save edition in…
-
5
votes1
answer1963
viewsQ: Automatic posts on facebook
I have a system where I use the cURL to login to a site. On this site I have a button to share facebook content, I want to do it automatically. That is, end the user’s work by logging into the site,…
-
-2
votes1
answer5564
viewsQ: How to fill out forms automatically with PHP?
How to create a script to fill forms, paste text, all automatically? There is a site where you have login and password, I want the Log script automatically and then post what was needed with the…
-
3
votes3
answers6724
viewsQ: How to set the size of layout buttons in version 2.2
For example if I have a Linearlayout that occupies all the space horizontally, if I have two buttons, for each occupy half of the screen, how do I do? Gridlayout doesn’t work in 2.2 right?
-
0
votes2
answers183
viewsQ: Make two items in a Listview change position
I’m creating a button called Up, to make an item in the listview go up, while the one above. But I’ve tried everything and it won’t, I don’t know if I’m wrong about logic. But I’ve tried it in two…
-
3
votes2
answers2488
viewsQ: Updating values in a Listview
I add the values that are within 3 arrays in the hashMap to insert into the listview: ArrayList<HashMap<String, String>> lista = new ArrayList<HashMap<String,String>>();…
-
1
votes2
answers1054
viewsQ: Keeping an item from a selected Listview when pressed
I’m developing a listview, and I need to leave a selected item when I click, and then take the position of that item, in order to do the inversion of two items, which is up with what is down for…
-
2
votes3
answers2371
viewsQ: Create a button in a Listview
I am making an application and at the end of the data inserts the user will view a summary with a listView. So far so good, but I want to create, right down after the listview, a finish button, but…