Posts by Geison Santos • 4,428 points
77 posts
-
0
votes1
answer133
viewsA: How to know which is the last item selected from a listview?
WHATEVER the value assigned to your variable ufSelecionado, 'Amazonas','Bahia','Ceará' or 'Amazonas','Bahia', the solution is simply: ufSelecionado = ufSelecionado.substring(0,…
-
4
votes3
answers1569
viewsA: Form completion with return of a json
Evaluating the code posted seems to me that you are making misuse or subusing Angularjs, thus losing the advantages of the framework. Example of this is in the code below where you use the model.…
-
1
votes1
answer633
viewsQ: Directive to restrict regular expression typing in Angularjs
I wrote a directive to inhibit typing from specifying a regex. However there are two bugs in this solution: In the first example the input must allow only numbers or point-followed numbers [.], or…
-
-1
votes1
answer709
viewsQ: Extract existing value between two regular expression tags
How to check from a regular expression whether there is a certain value between two strings, for example, tags <code> and </code>? I want, for example, to know if there is between the…
-
2
votes1
answer399
viewsQ: Capture Schedule component month manipulation event
When using the component Schedule of Primefaces it is possible to manipulate the events of the buttons that change the current calendar month, the buttons marked with the circle in the image below?…
-
0
votes2
answers402
viewsA: Pass ROWTYPE parameter with the EXECUTE command
In higher versions the version 8.3 it is possible to use the expression USING to provide parameters. This version, however, does not support this syntax. To use parameters properly it is recommended…
-
6
votes2
answers402
viewsQ: Pass ROWTYPE parameter with the EXECUTE command
I am developing a function in Postgres that aims to recover for each record of a query the result value of a check contained in a set of functions. Of these functions only one will return the…
-
2
votes1
answer486
viewsA: Several errors when compiling in Android Studio
Failed to include the closing of the parentheses and the semicolon when declaring the event OnClickListener. Below is the correction: button.setOnClickListener(new View.OnClickListener() { public…
-
1
votes2
answers430
viewsA: Webservice for Android app
The tables of the database of my application, for registration of user, etc., can be made in MYSQL and hosted on a server and access this data by the application? Yes, they can do it in Mysql. In…
-
0
votes1
answer123
viewsQ: Load layout with Preferencefragment in a Drawerlayout
I’m developing an app that uses DrawerLayout. The opening of each menu item is performed according to the code below: public class MainActivity extends AppCompatActivity implements…
-
0
votes1
answer509
viewsA: Floating context menu does not work in Listfragment
Well, messes happen all the time out there and I have to be part of that mess list. Joking aside, I’m going to report here the root of the problem so that it serves as a warning like "Don’t do…
-
0
votes1
answer509
viewsQ: Floating context menu does not work in Listfragment
I am developing an App that uses a Drawerlayout to present a side menu. One of the items presented by this menu is a Listfragment. In my Listview I want to exhibit a floating context menu. In the…
-
1
votes1
answer53
viewsQ: Link model information to a Listview correctly
To retrieve an object from my domain from the event AdapterView.OnItemLongClickListener linked to my Listview added to the Viewholder of the Adapter used by this a reference to my domain object.…
-
6
votes3
answers189
viewsQ: Handling items from an Action Bar outside the onCreateOptionsMenu()
I have an item in my Action Bar to display progress (a Progressbar) if a request is occurring. When the request occurs, I must show Progressbar and hide the other items, when the request ends, I…
-
1
votes1
answer172
viewsQ: Define which method is not serialized
I have a Rest service that returns as a response the object of a class that contains the following structure: public class LocalizacaoLinhaWrapper implements Serializable { ... private…
-
3
votes2
answers215
viewsQ: How to maintain a local file that is in conflict with the repository?
It is possible, when executing git pull, inform Git not to overwrite a local file that is in conflict with the repository? If so, how to do it? The file in question is already in the repository. It…
-
0
votes1
answer59
viewsQ: What is the best way and how to implement global data storage in an application?
In an application that has authentication, most of the time it is necessary to store information such as name, email and, depending on the case the ID of this user. This information can be used in…
androidasked Geison Santos 4,428 -
1
votes2
answers561
viewsA: How to avoid automatic closing in Dialogfragment?
To solve the reported problem I had to make small adjustments in the Logindialog class. The main change occurred in the method onCreateDialog() which now returns its value from…
-
1
votes2
answers561
viewsQ: How to avoid automatic closing in Dialogfragment?
I developed a login screen, as can be seen in the figure below, following the section "Creating a Custom Layout" of official documentation. The only problem I’m facing is that the dialog closes…
-
3
votes1
answer1208
viewsQ: Keep the field hint visible when typing
In some apps like the ones shown below, the hint is not hidden when starting to write inside the field. In Gmail, it seems that the fields Of and To do not use hint are a combination of layout +…
androidasked Geison Santos 4,428 -
1
votes2
answers109
viewsA: Cancel Asynctask when choosing another menu item with Navigation Drawer
This post aims to describe the adaptations that were made based on the response of @Piovezan used to solve my problem. In general I used in essence the solution posted by him here. However, I did…
-
0
votes2
answers109
viewsQ: Cancel Asynctask when choosing another menu item with Navigation Drawer
The Problem I’m developing an app that has a side navigation menu (Navigation Drawer) as shown below. Loading some items from this menu requires an Internet request. Here at this point everything…
-
0
votes2
answers294
viewsA: Error in update selectOneRadio
It seems to me that your problem is in this condition rendered="#{solicitacaoBolsasBacking.habilitaFiltroValor}" or to be more accurate in this method public void habilitarFiltrosValor() { if…
-
13
votes1
answer1179
viewsQ: Auto Deploy after Git Push
I use daily the Openshift to create and host applications in the clouds. One interesting thing I observe is as to the process of deploy applications hosted on this platform. deploy is preceded by…
-
10
votes3
answers694
viewsQ: What best practices when implementing requests?
When implementing calls to a webservice I have been working with the following scheme: I implement a class that extends AsynkTask and within the method doInBackground() make the call to my service.…
-
3
votes2
answers971
viewsQ: Problems using the Edittext.setError() method
When trying to use the method EditText.setError() the error message does not appear. The code below is used to validate the required fields: public class LoginActivity extends Activity { private…
androidasked Geison Santos 4,428 -
3
votes2
answers3054
viewsQ: Format CPF column with regular expression
In a table containing the column CPF I would like to format it in order to present the content properly. By appropriate way I refer to the format 999.999.999-99. It is possible to format this…
-
18
votes1
answer6209
viewsQ: Differences between getClass(). getResourceAsStream() and getClass(). getClassLoader(). getResourceAsStream()
In the need to load a resource in my project I came across these two methods. From the choice between one of the two arose some doubts about which I would like to share here. What is the motivation…
-
34
votes1
answer4521
viewsQ: Differences between <T> and <?>
What is the difference among the ratings <T> and <?> in Java? What motivation in the use of these resources and where each one is fundamental?…
-
21
votes4
answers1851
viewsQ: Infer class type from a generic
In the following class I want to assign the attribute clazz class type inferring it from the list given in the constructor. class Foo<T> { private Class<T> clazz; Foo(List<T> list)…
-
10
votes1
answer479
viewsQ: Validate array type attribute in an annotation
When using the annotation Ordem would like to make your attribute valores mandatory. By mandatory I mean that the value of your attribute should not accept an empty array, or an array with an empty…
-
3
votes4
answers5695
viewsQ: Get list of changed files in working directory (Working directory)
When the command is executed git diff in the terminal opens a window that shows the contents of the files with their changes. From there I can know which files have been changed. The problem with…
gitasked Geison Santos 4,428 -
1
votes1
answer74
viewsA: Correction in the presentation of the status bar created with the Airline plugin
Solving the reported problem consists of downloading the project sources Powerline and install them in the system, as the fonts of this project provide custom symbols. Let’s go to the steps:…
-
0
votes1
answer74
viewsQ: Correction in the presentation of the status bar created with the Airline plugin
I installed the plugin Airline in order to have a custom status bar in my editor, as seen in the figure below: However, my editor’s status bar is displaying the <, >> and <symbols. How…
-
14
votes2
answers5459
viewsQ: What are middleware in Nodejs?
What are middleware and how important it is for the Node platform?
-
7
votes1
answer341
viewsQ: Function Expression vs Function declaration
What is the definition for Function Expression and Function declaration? What are the main advantages of one in relation to the other?
-
2
votes1
answer141
viewsQ: Prevent multiple clicks on Android
I have a user registration screen where I avoid the possibility of multiple clicks to the sign up button through the method View.setEnabled(). Proceed as follows: in the method onClick(), from the…
androidasked Geison Santos 4,428 -
7
votes2
answers5978
viewsQ: Best practices when presenting Android loading screen
The best known and widespread approach to show the user that a request to the network is happening and make it wait until the end of this, has been through the use of the component ProgressDialog.…
-
1
votes3
answers4174
viewsA: Recover larger and shorter hours conditioned on dates
Another alternative, a little more verbose, to solve this problem is the use of a temporary table. Initially we recovered this table only with the minimum start date and maximum end date…
-
4
votes3
answers4174
viewsQ: Recover larger and shorter hours conditioned on dates
Inside a table containing the columns data_inicio, data_fim, hora_inicio, hora_fim need to identify within a set of records the following occurrences: the lowest start date, the highest end date,…
-
0
votes1
answer731
viewsA: Capture the change event in a p:selectOneenum type
Well, the capture of the change event in a component p:selectOneMenu does not differ in any way from the way in which it was implemented by the author of the question: it’s that simple. So, if there…
-
1
votes1
answer2983
viewsQ: Compare Working Directory file with remote repository file
How to compare a local file in Working Directory to an existing file in a remote repository, for example Github? I need to identify changes made to a local file compared to the version on Github. I…
-
0
votes1
answer731
viewsQ: Capture the change event in a p:selectOneenum type
I cannot capture the change event of the p:selectOneMenu component, whose upload source is an Enum. I registered in my view the Ajax change event, however the Listener method is not called. My view…
-
1
votes2
answers9765
viewsA: How can I use the UPDATE command between two tables?
Based on the vague idea I have of your tables I created a example to simulate your SQL statement. I created the tables with the following structure: STOCK (INT CODE, INT GROUP) EST_ADICIONAIS (INT…
-
14
votes2
answers13123
viewsQ: Identify if set of coordinates is within a radius on Android
I want to delimit a radius from a central coordinate (the red marker in the figure) and, from a set of coordinates (the green markers), check that these are within the area bounded by this radius.…
-
0
votes1
answer995
viewsA: Generate entities from tables with Jbosstools
"In the middle of the road there was a stone had a stone in the way had a stone in the middle of the road there was a stone[...]" Carlos Drummond de Andrade Joking aside, I found the reason I…
eclipseanswered Geison Santos 4,428 -
0
votes1
answer995
viewsQ: Generate entities from tables with Jbosstools
I created a JPA project and from the resource JPA Tools > Generate Entities from Tables I want to generate the entities related to each table of my database. I tried to follow a tutorial on the…
eclipseasked Geison Santos 4,428 -
12
votes1
answer10002
viewsQ: Differences between Natural Join and Inner Join
What characteristics differentiate a consultation performed with the use of Natural Join other with the use of Inner Join? Is there any question related to performance or any other condition that…
-
2
votes1
answer3770
viewsQ: List tables by foreign key in Mysql
How to identify, by means of an instruction SQL, the tables that relate to another, that is, the tables that have a foreign key that references another table? According to the dummy example, I need…
-
5
votes1
answer229
viewsQ: Loading old libraries to Requirejs
What’s the best way to set up old libraries that weren’t built using the AMD specification? I refer to libraries that have not been defined with instruction defines(). In this case, I am trying to…