Posts by Natan • 306 points
11 posts
-
0
votes1
answer24
viewsA: Page loads without query finish - Nodejs + Mysql
I believe you are using express. But if you are using another framework, the result is the same. You call "res.render" before the callback returns. Although the call for "res.render" came at the…
-
7
votes12
answers79762
viewsA: Formatting Brazilian currency in Javascript
I may be late, but I will post here how to format coins in nodejs. num .toFixed(2) // casas decimais .replace('.', ',') .replace(/(\d)(?=(\d{3})+(?!\d))/g, '$1.') I hope I’ve helped.…
javascriptanswered Natan 306 -
0
votes1
answer68
viewsA: Display load icon whenever you click a link
In your Webviewclient, implement the onPageStarted and onPageFinished methods in this way: @Override public void onPageStarted(WebView view, String url, Bitmap favicon) { super.onPageStarted(view,…
-
0
votes1
answer56
viewsA: MMN ranking query
I do not intend for this answer to solve 100% your problem, but I believe that what you should do, for the purposes of registration, is to keep an exclusive table for invitations. Your invitation…
-
4
votes3
answers8565
viewsA: Compare 2 arrays and save the difference between them in the database?
I believe that the solutions of @Lexandre-cavaloti how much of @carvbru can be used, depending on the requirement, for me it was not very clear which of the answers applies the question. Anyway, I…
-
0
votes2
answers544
viewsA: On-demand paging with PHP POST button and method using PDO
Your problem is in understanding SQL, more specifically about the "LIMIT" clause. See how it works in the link: https://www.w3schools.com/php/php_mysql_select_limit.asp To work the way you need to,…
-
1
votes2
answers44
viewsA: direct with htaccess
Try the following: RewriteEngine on RewriteCond %{HTTP_HOST} ^seusite.com$ [OR] RewriteCond %{HTTP_HOST} ^www.seusite.com$ RewriteRule ^(.*)$ http://www.seusite.com/site [R=301,L]…
-
0
votes3
answers834
viewsA: sending email with nodemailer
I use the library nodemailer-smtp-transport along with the lib nodemailer. The submission script I use in my projects is this one: const nodemailer = require("nodemailer"), smtpTransport =…
-
2
votes2
answers1383
viewsA: Authentication of user registration by email in Node.js
Your doubt is a little vague as to where you are. Registration in the database was performed? Can send e-mail? I am assuming that you have a record in the database and can send emails. Do the…
-
1
votes1
answer166
viewsQ: Bound Service using Intentservice
I am creating an Intentservice with Binder, so I can communicate with that service from an Activity public class MyService extends IntentService { private ChatManager chatManager; private final…
-
1
votes0
answers51
viewsQ: Client Socket.io acknowledgement for server
I know it is possible to use callback functions in socket.io, an example is found in the link http://socket.io/docs EXAMPLE Client socket.emit('ferret', 'tobi', function (data) { console.log(data);…