Posts by Roknauta • 2,811 points
221 posts
-
1
votes0
answers30
viewsQ: Delete some elements from a list and concatenate attributes
Good afternoon, I have a list of Pessoa where class is like this: public class Pessoa { private String nome; private String idade; } I set up the list like this: List<Pessoa> pessoas = new…
-
0
votes0
answers37
viewsQ: Error while trying to create index
I’m trying to create an index by command: declare cont integer; tabela varchar2(100) := 'DECLARACAO_IMPORTACAO'; coluna varchar2(100) := 'DESPACHANTE_FK'; indice varchar2(100) :=…
-
0
votes0
answers33
viewsQ: Problems migrating Java 11 with CXF
I am migrating my application that is on Java 8 and CXF 2.7.10. I upgraded the Java version to 11 and CXF to the latest version. However, when generating WSDL the results are different. Another…
-
0
votes2
answers389
viewsA: How to display user name initials without their connectors?
Talk buddy, you need to check somehow if it is a connector, I made an example but there are other ways to do, see that in my case I test if the initial starts in lowercase: String nome = "Jose da…
-
-1
votes1
answer129
viewsQ: Regex to return the line
Knowing that \n is a line break, have any do the reverse? I am using the Sublime as editor and my text is like this: 1, 2, 3, Turn into: 1,2,3, Is there any regex or other means to do so?…
-
0
votes1
answer48
viewsQ: Handling object only in methods
When I create an instance of a class I can access its attributes only when I’m inside a method, why? In the example below I can give a set in the method main() but not within the class, why? public…
-
0
votes0
answers80
viewsQ: Run a main method in a web project
I’m using the Intellij and I’m with a web project and with the Wildfly already configured in the options Run. I created a class with the main method for testing in this same project and I want to…
-
2
votes1
answer64
viewsQ: Difference of use of immutable object in method argument or outside it
If I have the following String of which it was created: String s1 = "Primeira String"; When using the method: s1.toUpperCase(); nothing happens because an instance has been created and has not been…
-
-2
votes4
answers177
viewsQ: Count(*) returning null
I have this query: SELECT COUNT(*) FROM USER_IND_COLUMNS WHERE TABLE_NAME = UPPER('TABLE') AND COLUMN_NAME IN (UPPER('ANO'),UPPER('MES'),UPPER('DIA'),UPPER('HORA')) GROUP BY INDEX_NAME HAVING…
-
1
votes2
answers1201
viewsQ: Display a message on command output
I am running this PL/SQL and in case the condition falls on else, how to display the message to the user? declare cont integer; tabela varchar2(100) := 'PESSOA'; coluna varchar2(100) := 'NOME';…
-
4
votes1
answer441
viewsQ: Populate Array args parameters without exiting Eclipse
I have parameters that are passed when running the . jar of my code, in args, as in this example: public static void main(String[] args) { final File diretorio = new File(args[0]); final String…
-
0
votes1
answer173
viewsQ: Use variable in a run
I’m creating the pl sequinte: declare cont integer; tabela varchar2(100) := 'TABLE_TESTE'; col varchar2(100) := 'TESTE'; begin SELECT COUNT(*) into cont FROM USER_TAB_COLUMNS WHERE TABLE_NAME =…
-
1
votes2
answers254
viewsQ: Fill Map without duplicating records
I own a List of an object A. In this object, I have 2 attributes: Long and a BigDecimal. How can I create a Map where the key will be Long and value will be the BigDecimal, using a lambda? The…
-
0
votes1
answer45
viewsQ: Joins with daughter entities
I have a parent entity called OCR, this has 2 that are specialization(inheritance): OCR_A, OCR_B. My hql needs to contemplate the 2, IE, I need to give Join in the 2. I start like this: select o…
-
5
votes2
answers4327
viewsA: How to compare the value of a variable to a string in the shell script
The syntax of your if is incorrect, the right is: if [ "$V1" = "sim" ]; then ....
-
1
votes1
answer109
viewsQ: Get Constraint and drop name next
I have a constraint UNIQUE in the PERSON table and is from the field CPF. To get the name of this contraint I use the query: SELECT UC.CONSTRAINT_NAME FROM USER_CONSTRAINTS UC INNER JOIN…
-
0
votes1
answer264
viewsQ: Call method in bean if condition is true
I created this confirm: <script type="text/javascript" language="javascript"> function salvarAntes(){ var r=confirm("Deseja confirmar?"); if(r){ return true; } else { return false; } }…
-
1
votes1
answer105
viewsQ: Mount an ALTER TABLE script
I have this select that returns me the name of the tables that interest me: SELECT TABLE_NAME FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME LIKE '%_AUD' AND COLUMN_NAME = 'REVTYPE' GROUP BY…
-
0
votes1
answer295
viewsQ: Select to pick up 2-column Constraint
I have a PERSON table in it that has the field A and B that form a UNIQUE. I rotate this select to return the name of the constraint: SELECT DISTINCT COL.CONSTRAINT_NAME FROM…
-
1
votes1
answer163
viewsQ: Validate a text with regex
I have the following code: final String msgRegex = "Produto [a-Z0-9À-ú, ]*"; final String msg = "Produto Soja"; if (msg.equals(msgRegex)) { System.out.println("Verdadeiro"); } else {…
-
0
votes1
answer59
views -
0
votes1
answer59
views -
0
votes1
answer64
viewsA: Wrong time recording
I was using version 6.06 of mysql-connector. Once I had read about some extra settings that had to be done and at the time recommended the version that was 5.1.44. When I remember this situation I…
-
0
votes1
answer64
viewsQ: Wrong time recording
I own these 3 classes as a model. Object: import java.io.Serializable; import java.util.List; import javax.persistence.CascadeType; import javax.persistence.Column; import javax.persistence.Entity;…
-
0
votes2
answers49
viewsQ: Correct display of Radionbuttons
I’m trying to implement a JRadioButton but after entering the 2 in the form, only one is displayed, someone help please ? package com.roknauta.fasttracker.utils; import java.awt.Component; import…
-
1
votes1
answer188
viewsQ: Rename worksheet tab
I’m having trouble renaming an Excell file tab. I’m debugging and after it gives the set the new name.. i can see the new name changed in the execution but in practice the file itself is not…
-
1
votes1
answer371
viewsQ: Encoding problems on the eclipse console
When reading the contents of a file to print the same on the eclipse console, I have a sharp word and it is coming out like this on the console: é um teste The correct thing to show is: é um teste…
-
0
votes1
answer58
viewsQ: Print all 0
I declared the following variable: int sequencia = 000000000; At the time of printing, is printing only a 0. Does anyone know how to print all 0 (zeros) ? How do I auto-increment to the point that…
-
1
votes2
answers1127
viewsQ: Regex only at first occurrence
I’m wearing the sublime and would like to do a mass replace. My texts are in this pattern: ABC ("Teste regex I would like to remove the space after the ABC and it should stay that way: ABC("Teste…
-
0
votes1
answer454
viewsQ: Get way of the project
I have a project JSF and would like to return the project path in a String. This path has to take the folder webapp as root. How I do ?
-
0
votes0
answers44
viewsQ: Cast problem
I have the following classes: public class Hotran { @Getter @Setter private String codEmpresa; @Getter @Setter private String nomeEmpresa; @Getter @Setter private Long voo; @Getter @Setter private…
-
0
votes0
answers23
viewsQ: Wrong format on String to Date conversion
I have the following date in format String: 12-12-2017 I’m trying to pass this figure to java.util.Date. I’m trying like this: SimpleDateFormat formatter = new SimpleDateFormat("dd-MM-yyyy"); final…
-
0
votes0
answers260
viewsQ: "Expected an operand but found const" when trying to run a Javascript script using Scriptengine
I’m trying to execute a method javascript from a project java. The logic I used I picked up on the internet and the same is so: final String javascript =…
-
0
votes1
answer29
viewsA: Remove gradient
The solution was simple, it was enough to change the gradiend for Solid: <shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle"> <solid…
-
0
votes1
answer29
viewsQ: Remove gradient
In my side_nav_bar the staining is defined as gradient: <shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle"> <gradient android:angle="135"…
-
1
votes1
answer143
viewsQ: List file excluding first letter
I have a file called 1arquivo and I list him normally with the command ls. How can I use ls deleting the first letter to return me only arquivo. It has to be a generic solution because I will have…
-
1
votes2
answers466
viewsQ: Check empty directories and pick up command output
I own a folder called work and inside it I have 2 folders: p1 and p2. How can I know if the folders p1 and p2 are empty ? I have the following command find . -type f -printf "%T@ %p\n" | sort -nr |…
-
1
votes1
answer190
viewsA: Show in Autocomplete the attribute of a specific user
Analyzing your code, it’s as follows: Your completeMethod is wrong because it triggers gestaoUsuariosBean.completarUsuario when it should trigger completarProfessor. Soon it will bring users.…
-
3
votes4
answers943
viewsQ: Adjust one td css only
I have a table: <table border="2"> <tbody> <tr> <td><img class="imgpadrao" src="xxxxx" alt=""></td> <td> Recebido </td> </tr> </tbody>…
-
0
votes1
answer63
viewsQ: Delete Constraint after taking its name
I’m spinning the next query to obtain the name of 2 constraints: select TC.Constraint_Name from information_schema.table_constraints TC inner join information_schema.constraint_column_usage CC on…
-
0
votes2
answers1349
viewsQ: Query to list number of occurrences
I am trying to list how many CATEGORIES each PERSON has but I only want to return if PERSON has more than one CATEGORY. My query is like this and does not return anything. And I know there are cases…
-
1
votes3
answers102
viewsQ: Replace command output with a custom message
I am creating a script where at the end of it I run a command that displays a very large output of information. Is it possible to override this output? That is, instead of showing the default output…
-
0
votes1
answer172
viewsQ: After registration, datatable is not updated
I have a problem where after registering my datatable is not updated. My button: <p:commandButton value="#{msg['salvar']}" action="#{encomendaController.salvar}"…
-
0
votes1
answer207
viewsQ: String problem in oracle
I am making a condition to add a field in the database, IE, will only add if the condition is equal to 0. The problem is that in my instruction execute immediate He says the word PRIMARIO is…
-
1
votes1
answer246
viewsA: Jsf&primefaces CSS problem
Come on, you can use css classes instead of using style, use the styleClass. Ex: styleClass="barra-navegacao" To change a component’s css, see the documentation for the shutdown and overwrite it.…
-
0
votes2
answers75
viewsA: Return a case sensitive record
The solution was to pass the UPPER in the name of the Constraint: select count(*) from all_cons_columns where constraint_name = UPPER('FK_od8ou6g1l9t7iufcp3o0to189');…
-
4
votes2
answers75
viewsQ: Return a case sensitive record
I own a constraint in the bank that is all with your name capitalized. As I do a count to find the same one using the UPPER? 'Cause I want to pass the where a tiny name to return. This one of mine…
-
5
votes1
answer167
viewsQ: Locate line that starts with negation of the expression
I have a text file with many lines. It is possible for me to find the first line that does not match the regex? Example, I want to make a regex that shows me the first line that doesn’t start with…
-
0
votes0
answers40
viewsQ: Component Poll does not call the method
I’m wanting to call a method periodically but the listner of poll does not call the desired method. Below my codes: <p:poll interval="10"…
-
1
votes2
answers1283
viewsQ: Delete contents including folders
I am trying to delete the contents of a folder but I have the following problem: Using the command del it erases only files and folders get (you have to delete the folders too). Using the command rd…