Posts by Roknauta • 2,811 points
221 posts
-
1
votes1
answer2925
viewsQ: Calling more than one script bat
I have a very boring situation and I could not find a solution, I have 2 scripts and the same are called through another, my problem is that it calls one and not the other, one starts one tomcat and…
-
2
votes1
answer1297
viewsA: Change color of commandButton?
Use the class .ui-button of primefaces, see in the example: .ui-button{ background: red !important; } The result: In this example I use an external . css file. You can check that this class is in…
-
0
votes1
answer56
viewsQ: Indentation with problems in Studio
I’m getting a lot of code indentation on Android Studio. My code is very ugly as it shows the image and I can’t indent it. I already changed the keymap for eclipse, netbeans and looks like nothing…
-
0
votes1
answer184
viewsA: How to change Growl’s position on the screen?
Use the absolute, try how it worked for me: .ui-growl { position: absolute; top: 20px; left: 40%; }
-
2
votes1
answer90
viewsQ: Insert 0 when you have 10 numbers
I have the following sequence: 3531399402 It has 10 numbers, with this regex I can list these occurrences: ^\d{10}$ I am using a text editor and I need to replace these occurrences and insert a 0…
-
0
votes1
answer28
viewsQ: Create condition in instruction
Hello, I have the following select: SELECT CONSTRAINT_NAME FROM user_cons_columns WHERE COLUMN_NAME = 'CANCELAMENTO' and table_name = 'NAVIO'; After picking the name the same goes to another query…
-
2
votes1
answer42
viewsQ: Code simplification
I have the following piece of code: <p:menuButton value="#{messages['relatorio']}"> <p:menuitem value="PDF" update="painelRelatorioResumoExpedicaoDesembarque" oncomplete="gerarRelatorio();"…
-
1
votes2
answers110
viewsQ: Adjust only one component
With this css I change all inputs of my autocomplete : .ui-autocomplete-multiple ul{ padding:0; background-color: red !important; } The problem is that I need to have only one screen and not all, as…
-
6
votes2
answers7324
viewsQ: What is a lock and what are its causes?
I often come across the term: Table x is with lock. What it means and what its causes?
-
1
votes1
answer632
viewsQ: Error in android xml page
I am very beginner on android and strictly following the example provided by my teacher and using a College PC I copied and pasted and had no problems, using my notebook I’m with the following…
-
3
votes1
answer1199
viewsQ: Select and do not return values containing xxx
I’m making the following select: SELECT TABLE_NAME FROM USER_TABLES ORDER BY TABLE_NAME; In this I have the name of the tables, the problem is that for each table I have a table_AUD, ex: PESSOA…
-
1
votes1
answer3392
viewsQ: Delete blank lines
I have a text that has a structure like this: AJUSTE_ESTOQUE AJUSTE_PRODUCAO AJUSTE_QUALIDADE AMOSTRA I made a regex (^\s*$) to locate these blank lines, how can I remove them so that each word is…
-
0
votes2
answers51
viewsA: Date range in other date range
If I understand correctly, what you want is this: SELECT * FROM `viagem` WHERE dataHoraSaida > '2017-01-01 00:00:00' AND dataHoraRetorno < '2017:01-09 00:00:00'
-
2
votes1
answer38
viewsQ: Correct creation of tables
Given my classes where Encomenda inherits from Objeto: @Entity @Table(name = "objeto") @XmlRootElement(name = "objeto") @XmlAccessorType(XmlAccessType.FIELD) @AllArgsConstructor @NoArgsConstructor…
-
1
votes1
answer45
viewsQ: 2 EL at the same value
My outputText is like this: <p:outputLabel id="codigoGrid" value="#{bean.loja eq null ? bean.codigo : bean.codigo bean.loja}" /> I am trying to make a tenacious condition but it does not…
primefacesasked Roknauta 2,811 -
0
votes2
answers1134
viewsA: Concurrentmodificationexception how to proceed?
I appreciate the comments but based on some I thought about this logic, I accept criticism if I made a mistake but now it is working once I order the lists to match the values correctly. I did in…
-
1
votes2
answers1134
viewsQ: Concurrentmodificationexception how to proceed?
I have the following method: private void houveAlteracao(Long id) { try { Objeto objeto = service.find(id); objeto.setEventos(JsfUtils.ordenarListaEventosPorHora(objeto.getEventos())); Objeto obj =…
-
0
votes1
answer179
viewsA: Change Dialog is not displaying data
I recommend you return the object itself instead of String, but look. In his method: public String preprarUpdate(Message message) { this.message = messageFacade.findMessage(message.getId()); return…
-
1
votes1
answer300
viewsA: Object is not updated
Thanks to everyone who tried to help but reading this Article of course for me, then so it worked: private void houveAlteracao(Long id) { try { Objeto objeto = service.find(id); final Objeto obj =…
-
3
votes1
answer300
viewsQ: Object is not updated
In my flow it’s like this: I already have an object stored in the database. When loading my page, these objects are searched in the database, treated to be displayed. Objects arrive in a List…
-
3
votes1
answer69
viewsQ: Requestcontext as null
I’m trying to update a component on the screen by RequestContext of primefaces. But there are 2 situations where the first one is I click on a link and the page give your refresh. The second…
-
2
votes1
answer166
viewsQ: Schedule job to run on the Wildfly server
I need to create a task runner where it will call a method from time to time. I saw an example and it was like this my implementation: public class Agendador { // Scheduler private final…
-
0
votes1
answer874
viewsQ: Calling method when closing dialog
This code is the showcase of the primefaces : <h:panelGrid columns="1" cellpadding="5"> <p:commandButton value="Basic" type="button" onclick="PF('dlg1').show();" /> <p:commandButton…
primefacesasked Roknauta 2,811 -
1
votes1
answer211
viewsQ: Update dialog component
I have the following dialog: <p:dialog header="#{encomendaController.objeto.id == null ? msg['cadastrando'] : msg['atualizando']} Encomenda" widgetVar="cadastroEdicao" minHeight="80"…
-
1
votes0
answers73
viewsQ: Incorrect date/time format
In my next code snippet: String horario = evento.getDataOcorrencia().concat(" ").concat(evento.getHoraOcorrencia()); horario = horario.replaceAll("/", "-"); SimpleDateFormat dateFormat = new…
-
0
votes2
answers1259
viewsQ: Sort Collection
I have a class called Object and within it possesses a Collection of Events, so to sum up: public class Objeto{ private Collection<Evento> eventos; } In the Event class, I have my attributes…
-
1
votes2
answers325
viewsQ: Match more than one condition in a junior
Is it possible to combine more than one condition in the first one? Example: boolean existe = pessoa tem 23 ou pessoa tem 22 ? true : false ; I’m trying but I can’t.…
-
1
votes1
answer2850
viewsA: Webservice Post Office - Tracking
I am implementing the same case and you can use this example that works perfectly: Just note that the code arrives as parameter and in the end I treat the xml. You can feel free to make your…
-
0
votes1
answer196
viewsA: updating by filling in information after using the autocomplete
You can use the ajax: <p:autoComplete id="cpf" value="#{cadastroServicoBean.servico.cliente}" size="13" required="true" dropdown="true" completeMethod="#{cadastroServicoBean.completaCliente}"…
-
0
votes1
answer50
viewsQ: References lost at persistence time
Below follow my entities and their relationships: Order: @Entity @Table(name = "encomenda") @XmlRootElement(name = "objeto") @XmlAccessorType(XmlAccessType.FIELD) public class Encomenda { @Getter…
-
1
votes1
answer259
viewsQ: Update message
I have the following screen: <?xml version='1.0' encoding='UTF-8' ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">…
-
0
votes1
answer65
viewsQ: Object is not completed
I have the following form from my page: <h:panelGrid columns="3"> <p:outputLabel value="Código" for="codigo"/> <p:inputText id="codigo" value="#{encomendaController.encomenda.codigo}"…
-
0
votes1
answer58
viewsQ: Remove n lines from a string
Given a String as template: <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"> <soapenv:Header> <X-OPNET-Transaction-Trace:X-OPNET-Transaction-Trace…
-
0
votes1
answer174
viewsQ: Setting for date and time field
I’m setting 2 attributes, one will be date and the other time: @Getter @Setter private Date dataOcorrencia; @Getter @Setter private Calendar horaOcorrencia; I wonder if it’s the best definition for…
-
4
votes2
answers214
viewsA: How to get the result of the gdialog menu selection in the Shell Script variable?
I took the liberty of changing your script to a more streamlined and readable mode, so: #!/bin/bash operacao="" echo "Digite o primeiro valor" read valor1 sleep 3 echo "" echo "Digite o segundo…
-
0
votes3
answers192
viewsA: Swap String content for "$"
Use the scape: public static void main(String[] args) { String texto="teste {{texto}} teste"; String trocar="_\\$_"; texto=texto.replaceAll("\\{\\{texto\\}\\}", trocar); System.out.println(texto); }…
-
1
votes2
answers939
viewsA: Use foreign key as primary key - Hibernate
To use the annotations of hibernate you need to define an attribute with the annotation @Id. That is premise. https://docs.jboss.org/hibernate/stable/annotations/reference/en/html_single/…
-
0
votes2
answers522
viewsA: Insert string in first column
Try it like this: cat /tmp/filtrado2.txt | sort | uniq -c | sort -nr | sed 's/1/1;/'
-
0
votes2
answers158
viewsQ: Query to return specific values
On my table IDENTIFICACAO_PESSOA I have a column called IDENTIFICADOR. This column receives CPF values. However, there are values there that do not correspond to CPF, that is, they are outside the…
-
4
votes7
answers185
viewsQ: Capture year outside the regex
I am working with a text file using the sublime I want to replace some strings where: I have several strings like this: EMISSAO="2016-04-18 00:00:00" I need a regex that captures where the year is…
-
1
votes3
answers175
viewsQ: Exclusion via regex
I have the following string: 2014-10-12 17:04:29.996 It’s a format timestamp and is wrong because after the hour there is the .996. To capture this stretch I used the regex : \d{4}-\d{2}-\d{2}…
-
0
votes1
answer100
viewsA: can’t change my object from a datatable - JSF with Primefaces
Change the notation @FacesConverter(forClass = Fabricante.class) by only: @Named public class FabricanteConverter implements Converter { Package: javax.inject.Named;…
-
3
votes1
answer3764
viewsQ: What is an Expression Language (EL)?
Widely used in JSF, the famous Expression Languages(EL’s) symbolised by #{}. I don’t know if other languages work the same. What do they mean ?
-
2
votes1
answer100
viewsQ: Effect of ajax on button
In the commandButton of primefaces we have u attribute ajax which may be true or false. What effect does it have on submission? I am making a silly example where the user type a name and triggers…
-
0
votes1
answer149
viewsA: Run Appimage background file on Ubuntu
You can use the upstart which is used to boot applications or at certain times of the system: # Start description "Start App" start on (net-device-up and local-filesystems) script…
-
2
votes1
answer882
viewsQ: Start Wildfly in debug mode
Start the Wildfly in the eclipse on-mode debug is simple. I want to start via command line by running the standalone.bat. So far so good, but I want to start in mode debug and under normal…
-
2
votes2
answers672
viewsQ: Script bat not run completely
I’m trying to make a script that builds my project maven and soon after carry out the deployment of the same in wildfly. I wore it perfectly on linux, only when trying to migrate to Windows I find…
-
0
votes2
answers2979
viewsA: Invert values from one vector to another vector
You fall into a situation where you may not know which numbers are typed so you can do so automatically: public static void main(String[] args) { int[] a = { 2, 3, 4, 5 }; for (int i = 0; i <…
-
1
votes1
answer1651
viewsA: How can I only extract PID from a process?
You can use the pgrep, for your case would look like this: pgrep -f $matança Source: https://stackoverflow.com/questions/8120304/getting-pids-from-ps-ef-grep-keyword…
-
2
votes5
answers1923
viewsA: Is it possible to update the first 100 lines in sql(server)?
WITH THE TOP: UPDATE top (100) tbl_venda SET produto=1 WHERE produto=3 Source: https://stackoverflow.com/questions/1198364/how-can-i-update-top-100-records-in-sql-server…