Posts by Daniel • 3,168 points
87 posts
-
0
votes1
answer2250
viewsQ: Creating and changing users and permissions
I have run mongod with the default setting, ie I have not set nor the path, nor the door, nor activated the access control. C:\Program Files\MongoDB\Server\3.4\bin>mongod Trying "more advanced…
-
0
votes1
answer5482
viewsQ: How to export and import a database
I have mongodb installed on two different computers, where I am studying/developing applications. Usually at the end of the day, I send all the code to a Git server, but the database remains local.…
-
0
votes3
answers2538
viewsQ: How to install nodemon globally?
I’m trying to install the nodemon globally, using: npm install nodemon --global It seems to install normally, with two warnings for an optional module: npm WARN optional SKIPPING OPTIONAL…
-
4
votes1
answer3271
viewsQ: Is it possible to save the canvas as an image, and send it to the server?
Let’s say I have a code that looks like this: <html> <head> <style> .centralizado { position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%); } </style>…
-
6
votes1
answer940
viewsQ: How to split code into multiple modules?
I know that it is possible to separate functions into other files on Node, called modules, as follows: js server. var http = require("http"); var servidor = http.createServer(); var porta = 3000;…
-
1
votes1
answer316
viewsA: problem in resize.js function
I think the part of the error that answers your question you didn’t get to post: And that’s because it’s set locally in a function: // Quando selecionado as imagens $('#imagem').on('change',…
-
1
votes2
answers212
viewsA: Why of Null Pointer Exception in simple Java agenda program, and how to configure the function that returns an array of phones
Your code is a little messy - and to be honest, I think the diagram you passed is also incomplete. Anyway, the tip I give is that you try to separate the function of each class well. For example:…
-
4
votes1
answer561
viewsA: How to prevent popup blocking to return ajax post?
It seems that popup Blockers always try to bar when the popup is not the result of a user action. A possible solution is to remove its function window.open from within the OnSuccess and move to a…
javascriptanswered Daniel 3,168 -
1
votes2
answers470
viewsA: How to read the a . csv file and write to a list?
In this part: listaAtletas.add(new Account(accountHolder, accountNumber, accountBalance)); You seem to add a Account and not a Atleta. I think that there is a good part of the mistake. Other than…
-
2
votes2
answers590
viewsA: Saving result in txt file
Here’s a very simple way, based on Docs. Include these Imports: import java.nio.file.Files; import java.nio.file.Path; import java.nio.file.Paths; import java.nio.file.StandardOpenOption; Create…
-
0
votes1
answer45
viewsA: Image resizing
What’s missing from your question is how are you saving your image. It is possible that you are saving in .bmp? :) Follow your code, slightly altered to test different formats: using System.Drawing;…
-
3
votes3
answers3909
viewsA: How to install pytest in windows 10 - 64 bits, python3
If you don’t have the Python folder in your variáveis de ambiente, you need to go on prompt from command to Python folder. For example: C: Users danie Appdata Local Programs Python Python35-32…
-
3
votes1
answer6079
viewsQ: What is the head tag for in html?
I am reading a book which at a certain point says the following: "Now we need a place to place our templates - one way is to use an existing element in our HTML, preferably hidden. You can achieve…
-
7
votes2
answers930
views -
3
votes2
answers408
viewsA: Arduino serialporta with C#
You could read the serial port information with the ReadLine(), but you would need to create a Listener so that every time they had data available at the port, they were read. The suggestion is that…
-
7
votes2
answers7285
viewsQ: How to paste clipboard text into vim?
Researching the Cheat sheet of some places, I discovered how to see the transfer area (the Registers) no vim, :reg. However, I could not use these records, even using the commands demonstrated on…
-
1
votes1
answer450
viewsA: Is it possible to dynamically instantiate Arraylist in java?
It’s possible, only, the way you wrote, pessoa[] it’s just one Array, and Arrays do not grow dynamically as you would like: import java.util.ArrayList; public class MeuPequenoArray { public static…
-
3
votes1
answer93
viewsA: How can I view my instagram feed without caption
The problem is that in photos that have no caption, data.data[x].caption.text should be evaluating for null, invalidating the whole expression (and then not showing the images). My suggestion is…
-
2
votes1
answer416
viewsA: Concatenate instead of summing
Sergio has already given you a possible answer to your question. Probably your value is being read as String and therefore cannot be added to a inteiro unconverted. Change the line: var _som =…
javascriptanswered Daniel 3,168 -
3
votes1
answer460
viewsA: Spacing with Gridbaglayout
What you’re looking for is the Insets: cons.insets = new Insets(20, 20, 0, 0); Image example with Insets zeroed: The same image, only now using Insets: The weight, contrary to what you thought, it…
-
3
votes1
answer3777
viewsA: Resize image in java
I did a brief research on how to resize images in Java, and found that there is more than one way, and that usually means an exchange between performance and quality. In your case, the definition of…
-
5
votes1
answer1507
viewsA: Select Multiple Lines in Jtable in Java
To select multiple lines, you need to change the Listselectionmodel for MULTIPLE_INTERVAL_SELECTION: tblDados.setRowSelectionAllowed(true);…
-
4
votes1
answer651
viewsA: How to just send messages to other customers?
You send messages in this code: for (Clientes writer : Servidor.clientes) { PrintWriter out2 = new PrintWriter(writer.cliente.getOutputStream(), true); out2.write("teste:"+veioDoCliente+"\n");…
-
2
votes1
answer1007
viewsA: Java / Selenium - Store text in variable
I don’t know how the Selenium works, but apparently Ricardo has already answered the question of how to catch the CPF of the site. Now, to generate in your own application, in Java, you should…
-
4
votes1
answer8555
viewsA: Doubt in the relationship of Mysql Workbench tables
My suggestion is that you remove the entire table presence. You already have a table called pessoa_has_curso - I suggest you create a table called pessoa_has_aula, with FOREIGN KEYS of pessoa and of…
-
2
votes1
answer109
viewsA: Retrieve spatial data via an HTTP request via Google Maps URL
The @Bruno is correct! Giving a bypass in your proxy, the code ran normally! HttpURLConnection conn = (HttpURLConnection) url.openConnection(); I was wondering, though, if there was anything wrong…
-
2
votes2
answers71
viewsA: Problem with user inputs
Like Patrick said, without your full code you can’t know for sure what’s going on. But you can guess! I think you’re giving a enter where it should not, when entering the data. I rewrote part of…
-
4
votes1
answer1033
viewsA: slow remote Mysql database with java swing application
With the information you have given us so far, unfortunately it is not possible to find a "guilty" for your 15-second requests. However, we can list some basic ideas that should be considered when…
-
6
votes1
answer3655
viewsA: How to Encrypt with AES Algorithm using 128-192-256 keys in Java
I believe the problem with your code is only on the way out: System.out.println(((chaveAES.toString()).getBytes("UTF-8")).length); The toString() seems not to be implemented, and seems to return…
-
3
votes4
answers255
viewsA: How to read an input in the loop
Apart from the simple quotes, your code ran normally here. #include <stdio.h> int main () { int num; printf("Informe um número entre 0 e 10:\n"); scanf("%d",&num); while(num!=7) {…
-
1
votes1
answer114
viewsA: Doubts with conversion of variables
According to the website of Mozilla Foundation, the function parseInt(); should be written like this: parseInt(String, radix); // em português, base. So if you want nome in base 10, would have to…
-
3
votes1
answer124
viewsA: When concateno String add a ENTER
I cannot reproduce the error using the following code: import java.awt.BorderLayout; import java.awt.event.KeyEvent; import java.awt.event.KeyListener; import javax.swing.JFrame; import…
-
1
votes1
answer310
views -
4
votes1
answer446
viewsA: Monitoring Mysql database c/ Java application
If your goal is to receive data from multiple banks and store it in a central database, I suggest you use a Mysql resource, the Multi-source Replication. As indicated in this website, a Mysql…
-
2
votes1
answer713
viewsA: How to set a new (external) source for a Jtextpane
I can’t reproduce the problem through the code you presented. As pointed out by re22, it seems that the problem is exception treatment - your code works. Follow a sample (note that it is not exactly…
-
2
votes1
answer502
viewsA: Convert svg to png java
As told by Dener, it seems your problem is way to the file. I tested your program and it worked with full paths, but it didn’t work with the "/home". You can try changing the input to: String…
-
2
votes1
answer135
viewsA: Execute function x minutes after submitting form
As Israel said, maybe you should have a service running on the server, checking the new records in the database and sending the SMS at the scheduled time. Anyway, I was interested in your question…