Posts by NilsonUehara • 3,105 points
111 posts
-
1
votes0
answers9
viewsQ: Permission to Joker Base
I need to grant access to a particular user to all databases that start with abc (abc1, abc2, abcTeste, etc...), but new databases can be created and did not want to have to do this manually. It…
mysqlasked NilsonUehara 3,105 -
1
votes1
answer593
viewsA: How to Get Specific Return Data from a JSON with Ionic 3
I made a modification so you can see how to turn the return into a JSON object and iterate each item of the array. submit(){ var email = this.data.email; var senha = this.data.senha; var link =…
-
0
votes2
answers113
viewsA: How to center a form without affecting the Abels?
I think defining margin: 0px auto in a container already solves. .container{ width:400px; margin: 0px auto } <div class="container"> <form> <div class="form-group"> <label…
-
1
votes3
answers155
viewsA: How to convert JSON to Object and find an id (No Array) - JAVA
JSONObject obj = new JSONObject(jsonProtocolo); JSONObject dados = obj.getJSONObject("_dados"); String numeroProtocolo = dados.getString("protocolo");
-
1
votes1
answer61
viewsA: Apache Tomcat mirroring - Work
Maybe what you need is Parallel Deployment tomcat’s. The principle is basically deploy versions of your application, e.g.: system##001.War system##002.War Once this is done, your user will continue…
-
0
votes2
answers364
viewsA: Datatable of the first faces does not update selection variable
Try making the selection through the datatable itself instead of the button. This way: <h:form id="frmComercio"> <p:dataTable id="tablComercio" var="comercio" value="#{comercioBean.tabela}"…
-
0
votes2
answers1363
viewsA: How to change the version of Cordova in Ionic?
npm install -g cordova@latest or npm install -g [email protected] -> where: x.x.x = version
-
4
votes1
answer10546
viewsA: How to get objects from a Json array using Jsonarray in java?
You need to take the array inside the object... Try this way: package br.com.uniondata.projetodetestes; import org.json.JSONArray; import org.json.JSONException; import org.json.JSONObject; /** * *…
-
2
votes1
answer1081
viewsA: Table in IONIC 2
Basically, that would be: home html.: <ion-header> <ion-navbar> <ion-title>Home</ion-title> </ion-navbar> </ion-header> <ion-content padding>…
-
1
votes1
answer584
viewsA: How to make an INNER JOIN with two tables in different Banks?
From what I understand, both banks are on the same server and are accessed by the same user. So try to make the connection without passing the database name and do Join like this: SELECT g1.*, g2.*…
-
5
votes1
answer4332
viewsA: How do JOIN in 4 tables or more?
Just use INNER JOIN (or LEFT JOIN) SELECT integrantes.id_integrante, integrantes_documento.nome_integrante, integrantes_endereco.cep_integrante, votos_uniforme.voto_uniforme1,…
-
2
votes2
answers156
viewsA: Select in the database using "like"
Your query is wrong. The correct one would be: String sql = "SELECT nameClient, userClient, descriptionClient, passwordClient, birtDate FROM Client WHERE userClient LIKE '?%';" Note: Your method…
-
1
votes1
answer856
viewsA: How to change the Ionic 3 loading screen
You need to edit the images icon.png and splash.png of the directory resources, as documented: https://ionicframework.com/docs/cli/cordova/resources/ After editing the images, run: ionic cordova…
-
1
votes1
answer34
viewsA: Code redundancy in my . xhtml JSF - Primefaces
I think the best way is to create a custom Component Link to the article…
-
5
votes5
answers8294
viewsA: Count characters while typing
Just take the length of your string. var str = "Betinho"; var n = str.length; console.log(n);…
-
1
votes2
answers361
viewsA: Apply filter to only part of image
Why not add two <div> with opacity on the image? <style> div{ position:absolute; top:0px; left:0px; height: 300px; width: 400px; } #imagem{ background-image:…
-
1
votes1
answer312
viewsQ: Show sql generated by JPA/Hibernate
Is there any way to show SQL generated by JPA/Hibernate without enabling the property <property name="hibernate.show_sql" value="true"/>? The difficulty is that I need to monitor only one…
-
5
votes3
answers860
viewsA: how to increment letters in php?
You can convert the character to ASCII, increment +1 and convert it back to character: echo ord("B"); //retorna 66 echo chr(ord("B")+1); //retorna "C"
-
0
votes3
answers1263
viewsA: How to make a field from a clickable table?
If you want to leave clickable only the name, the simplest would be to insert the tag a in it. echo "<tr>"; echo "<td><a href='http://listar_funcionarios.php?id=" .…
-
0
votes1
answer24
viewsA: Comparing a value of one table, with interval in another table
Create a new query (menu Criar > Design da Consulta) and in design mode (clique com o botão direito e selecione Modo SQL), Enter the code below: SELECT cliente.cep, cliente.*, preco.* FROM…
-
1
votes2
answers44
viewsA: Adjust string in HTML calculator
How did you change the * for x at the time of showing, you will need to reverse this before performing the calculation: $(".equal").click(function(){…
jqueryanswered NilsonUehara 3,105 -
10
votes2
answers861
viewsA: What is the best practice of styling an Email body?
See this article https://tableless.com.br/email-marketing-testes-css-inliner-parte-2/. Basically, it says that if you tag <style>...</style> in the header or body of your email, life’s…
-
2
votes2
answers496
viewsA: Combobox with 5 minute interval with PHP
$hora = '07:00:00'; echo "<select class='form-control' style='width:100px'>"; echo "<option value=''>$hora</option>"; for($i = 0; $i < 180; $i++){ $hora = date('H:i:s',…
phpanswered NilsonUehara 3,105 -
4
votes1
answer43
viewsA: How to check day of the week being 1,3,5
Use the like SELECT * FROM tabela WHERE campo LIKE "%5%"
-
1
votes3
answers1087
viewsA: How to put default value in time field in mysql?
You can leave the field as TIMESTAMP and at the time of using it, format to catch just the time. Ex: CREATE TABLE `suaTabela` ( `datahora` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE…
-
0
votes3
answers1087
viewsA: How to put default value in time field in mysql?
You can create a TRIGGER to insert the current time in your field: DELIMITER $$ CREATE TRIGGER horaatual BEFORE INSERT ON TIME FOR EACH ROW BEGIN SET NEW.hora=CURTIME(); END$$ DELIMITER ;…
-
6
votes1
answer2182
viewsA: How do I check for errors in Apache configuration before restarting?
apachectl configtest or httpd -t
-
4
votes2
answers128
viewsA: Make LI appear only on Mobile
You could create a css like this: @media (min-width: 320px) { .showMobile{ display:block; } } @media (min-width:480px) { .showMobile{ display:none; } } see working on Codepen…
-
1
votes2
answers646
viewsA: Push screens Ionic 3
Try to remove the navController and directly modify the variable rootPage export class MyApp { rootPage:any = LoginPage; constructor(private storage: Storage, platform: Platform, private statusBar:…
-
0
votes2
answers798
viewsA: Take value of variable in function return
From what I understand, you are having difficulty receiving the return in the variable imgthumb, because http.get runs asynchronously. For that, do: $scope.fetchData = function (param) { var url =…
-
3
votes1
answer212
viewsA: Angular asynchronous responses 4
Just put the treatment inside the return: this.loginprovider.validaLogin(user).subscribe(data => { this.response = data; if(!this.response.sucesso){…
-
3
votes2
answers2148
viewsA: CORS JAVA (ERROR)
A filter to release the CORS would be something like: @Override public void doFilter(ServletRequest req, ServletResponse res, FilterChain chain) throws IOException, ServletException {…
-
3
votes2
answers54
viewsA: What do I need to change in this method to work properly?
That one break is making the flow out of the for. Eliminate it!
javaanswered NilsonUehara 3,105 -
1
votes3
answers1055
viewsA: Java error - Square root calculation
The problem is that you are using the event KeyPressed. This event captures the pressed key, but at this point the text attribute of the component still has the old value. Use the event KeyReleased,…
-
2
votes2
answers3187
viewsA: Sensitive and global variables Ionic 3 and angular 4
Change your Appmodule object by adding the modifier static: export class AppModule { private static url: string = "http://199.169.0.9/ws/ListarEstados.ashx"; static getUrl(){ return this.url; } }…
-
1
votes1
answer874
viewsA: Calling method when closing dialog
In the Primefaces Dialog documentation (primefaces_user_guide.pdf) have an example: <p:dialog> <p:ajax event="close" listener="#{dialogBean.handleClose}" update="msg" /> //Content…
primefacesanswered NilsonUehara 3,105 -
2
votes2
answers56
viewsA: Error returning reply with search method
Your sql variable is wrong. Switch = baicep for = ? sql = "select * from pessoa inner join bairro where pesbaicep = ?";
-
0
votes3
answers192
viewsQ: Swap String content for "$"
I have a string with a content and I need to make a replaceAll, but the text to be replaced contains a "$" dollar sign and this causes the error Illegal group reference. Example: String texto="teste…
-
1
votes1
answer262
viewsQ: Publishing app in Apple Store
When I sent the app to the Apple Store, I received the email: Missing Info.plist key - This app Attempts to access Privacy-sensitive data without a Usage Description. The app’s Info.plist must…
-
0
votes0
answers29
viewsQ: Format Number with Globalization plugin
I’m trying to use the plugin cordova.plugin-globalization but I’m bumping into my little Javascript experience. xhtml: <div>{{ item.valor | formataValor }}</div> filter js.:…
-
0
votes2
answers2862
viewsA: Is it possible to create a title for the "select" tag without it being part of the options?
<select> <optgroup label="Swedish Cars"> <option value="volvo">Volvo</option> <option value="saab">Saab</option> </optgroup> <optgroup label="German…
-
0
votes4
answers676
viewsA: How to make a Select from two 1-N tables and return only one record from the second?
I think it helps you: select p.id_produto, p.nome_produto, p.preco, p.categoria, i.id_imagem, i.id_produto, i.nome_imagem, i.caminho from produto p left join imagem i on i.id_produto = p.id_produto…
mysqlanswered NilsonUehara 3,105 -
1
votes1
answer265
viewsA: Problem with the confirmDialog component of the primefaces
The call to the widget should be made with PF() as follows: <p:commandButton oncomplete="PF('confirmacaoExclusao').show()" />
-
1
votes2
answers222
viewsA: How to add a search bar to my home header (Ionic + Angularjs)
To filter your list, just use the filter <input type="text" placeholder="Filtrar" ng-model="filtro"> <a ng-repeat="lista in listas | filter:filtro:strict"> See more: Angulasjs Filter…
-
1
votes2
answers452
viewsA: Problem with Entitymanager and JPA
In your getentityManager method you have a finally{ em.close(); }. And that’s what’s closing your entityManager.
-
2
votes2
answers737
viewsA: Angular Controller does not render on my Index
Change your controller to: app.controller('TipoContatoOperadoraController', function($scope, $http){ $http.get('http://localhost:7215/api/estruturaOrganizacional/tiposContatoOperadora')…
-
2
votes1
answer271
viewsQ: Create Rest service versions
I am creating Rest services with Java (Jersey). This service tends to grow and evolve, and may undergo changes in existing routines, therefore, I believe that the best way would be to create…
-
1
votes1
answer19
viewsA: How in xhtml commandButton identify that an error was generated in Dao and keep the navigation on the same page?
Just return "" in your managedBean: public String confirma(){ Grupo grupo = grupoDao.consulta("ROLE_USER"); List<Grupo> grupos = new ArrayList<>(); try{ grupos.add(grupo);…
-
0
votes1
answer359
viewsQ: Dynamic authentication and permissions
I need to provide a number of features in a REST service, but security is dynamic. That is, an administrator can change permissions according to his will. In my research, I only found authentication…
-
3
votes1
answer738
viewsA: How to get quantity of items from an Arraylist?
The problem is that when the variable quantidadeN was defined, the size() was equal to 0. Use the collection proopy in your EL: #{notificacaoControle.listaNotificacoes.size()}…