Posts by Denis Rudnei de Souza • 3,686 points
100 posts
-
3
votes1
answer74
viewsQ: What is the meaning of the word Soundness in the context of programming languages?
I always see that term when I’m reading about type systems, I’d like to know: What is its meaning within the context of programming languages? What it means a language has a type system Sound? What…
-
6
votes1
answer382
viewsA: What is and what is a Bloom Filter for?
Bloom filter is a data structure created in 1970 by Burton Howard Bloom (hence the name Bloom filter) It is a probabilistic structure with the following properties: Has space efficiency Allows false…
algorithmanswered Denis Rudnei de Souza 3,686 -
4
votes1
answer100
viewsQ: What is Monomorphization?
I was reading that posting and I came across that term monomorphization I’d like to know: What is its meaning? When this process occurs? What performance gain/loss is obtained by this process?…
-
7
votes1
answer1248
viewsQ: What is Microsoft’s MAUI?
I read that Microsoft’s MAUI is an evolution of Xamarin.Forms. I would like to know: What changes from the old version to this? What platforms are supported? How the migration between Xamarin.Forms…
-
10
votes1
answer237
viewsQ: What is Prototype Pollution?
I use a tool that performs security checks on the packages of my project, it indicated me that one of the packages is susceptible to Prototype Pollution, would like to know: What exactly is…
-
0
votes1
answer143
viewsA: Graphql: I cannot stop the Node execution and return the Error (Business Error)
Mutation can only return something in the format that was set within your schema, when you bump into an error, the return will be null and next to it a list of errors that occurred, will have the…
-
1
votes1
answer106
viewsA: Vue NUXT.JS, multiplies functions in asyncData
Only the first one works because you’re giving the return in the first function, after that point what comes after is not executed. You can use the await like you did in the first job and then give…
-
9
votes1
answer191
viewsQ: What is Borrow Checker?
I was reading a little bit about Rust and I came across that term, I’d like to know: What is Borrow Checker? Is there any connection with Counting? What would be the translation for this term in…
-
1
votes1
answer479
viewsA: How to copy multiple files from one folder to another using Fs.copy
You can use the following code: const util = require('util'); const fs = require('fs'); const path = require('path'); const copyFilePromise = util.promisify(fs.copyFile); function copyFiles(srcDir,…
-
3
votes3
answers252
viewsA: Dependencies Nodejs
NPM Unpublish Policy This document describes your options when trying to unsubscribe a package published in the public record. The registration data is immutable, that is, once published, a package…
-
13
votes1
answer286
viewsQ: What are Zero Cost Abstractions?
I was reading about Rust and I saw that one of its advantages is to own Zero Cost Abstractions, I would like to know: What are Zero Cost Abstractions? It is something that the programmer needs to…
-
7
votes2
answers99
viewsQ: Javascript . NET Zip() method
I was reading that question and I noticed there’s no method Zip in Javascript, I would like to know how to implement a method that works the same way or if there is some other function that does the…
-
5
votes2
answers421
viewsA: How to apply conditions in this string template?
I was able to do it this way: const fields = { address: 'Endereço', name: 'Nome' } const messages = { required: field => `${Object.keys(fields).includes(field) ? fields[field] : ''} é obrigatório…
-
0
votes1
answer79
viewsA: How to add two values within a v-select?
Your items should be an array containing the values that will be displayed in the list Can be an array of Objects or array of strings. When using Objects, will look for a text and value field. This…
-
4
votes1
answer119
viewsA: Get quantity of items from a ul
You can fetch the element and use the property children that returns all his child items, the result has the property length that has the amount. I did as much for the element as for the children,…
-
0
votes1
answer88
viewsA: Regular Expressions with Javascript (CPF MASK)
Your code has some running problems, the most serious is not assigning the value to the field, only a Return will not change the value, so I put cpf.value = resultado, the second is related to…
javascriptanswered Denis Rudnei de Souza 3,686 -
2
votes2
answers130
viewsA: Result Undefined when calling function in calculator
You defined 3 arguments in the function, but when calling it did not provide them, so it does not work, just need to provide the data to work: var num1 = parseInt(prompt("Digite um número: ")) var…
-
0
votes1
answer40
viewsA: Do not correctly sum data coming from window.prompt
You need to convert the result of window.prompt for an integer, the result comes as a string. Do partInt() to be able to perform the conversion, soon after the sum works correctly. var veiculos = []…
javascriptanswered Denis Rudnei de Souza 3,686 -
7
votes3
answers455
viewsQ: What is Google One Tap?
Browsing some sites, I saw a pop-up saying I can login using my google account: I wonder what exactly he is. I got to that website however it does not have many details of its functioning and how I…
-
2
votes1
answer828
viewsA: window.onload property interferes with loading several scripts?
With window.onload you can only use a function, when calling again with a new function the old one will no longer be executed when the event occurs, in your case only the last one would be executed…
-
1
votes1
answer356
viewsA: I’m trying to print the result using Xios
The problem is that the request is done asynchronously, hence the code that displays the text is executed before the request is processed, you would have to perform the command inside the thenor use…
-
0
votes1
answer132
viewsA: Return search HQL JAVA
According to the documentation the shape made to indicate the absence of result is the launch of a Noresultexception. In this case you will need to use a block try-catch to detect a return with no…
-
0
votes3
answers91
viewsA: Variables are automatically executed when declared?
You are saving in the variable the function return setInterval, you can store the function this way: let interval = setInterval And then you run calling the function name plus the parentheses…
javascriptanswered Denis Rudnei de Souza 3,686 -
5
votes3
answers883
viewsA: Allow Select PDF only in JS
You can use it this way: <input type="file" accept="application/pdf"> Here has a list of file types and code mime that you can use, if you want to use more than one, you can separate with |…
-
0
votes2
answers636
viewsA: Materialize Autocomplete does not load values
The problem is in the format of the attribute data, it is not a list, it is an object with the values defined as "texto exibido: url para ícone", as documented: You can use null as the second…
-
1
votes2
answers609
viewsA: Error starting Apache Tomcat 9
I searched the error invalid LOC header (bad signature) Stack Overflow and I found that question The problem is caused by a jar corrupted, you can resolve by removing the jar in question, the…
apacheanswered Denis Rudnei de Souza 3,686 -
2
votes1
answer578
viewsA: search for data in a python json
I did it in a very similar way to yours, the only difference is the definition of a variable for the control It is defined as False, if found will be set to True, then in the end just do the check,…
pythonanswered Denis Rudnei de Souza 3,686 -
1
votes2
answers1179
viewsA: How to make the Spring MVC Responseentity return in a new page?
I got the report to open in another tab, your code will look like this: <!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org"…
-
6
votes1
answer5735
viewsA: How to use ternary operator in Flutter/Dart
You can do it like this: Comparison ? Value if true : False value; Ex.: void main() { for (int i = 0; i < 5; i++) { var result = i % 2 == 0 ? print("$i - par") : print("$i - impar"); } }…
-
4
votes1
answer608
viewsA: How to save JSON data to hard disk? (or access it with javascript)
You can use the following function: var dados = ["mizuk","programação","animes"]; function baixarArquivo(name) { var link = document.createElement('a'); link.href =…
-
2
votes1
answer584
viewsA: How to create routes in tables with Vuejs?
You can add a link inside the td and make a bind with the url The line where the link is would look like this: <td> <a :href="'http://www.google.com/?search&q=' +…
vue.jsanswered Denis Rudnei de Souza 3,686 -
1
votes1
answer845
viewsA: Copy text to clipboard using Vuejs?
Can easily adapt to Vuejs var vue = new Vue({ el: "#app", methods: { copy: function() { var copyTextarea = this.$refs.copiar copyTextarea.select(); try { var successful =…
-
6
votes2
answers1882
viewsA: How to create a. trusted desktop file on Linux?
This happens because the shortcut does not have run permissions, it is valid for both Gnome and KDE for what I know You can assign execution permission with chmod and with the +x parameter Ex.:…
-
1
votes1
answer1236
viewsA: File field with Jquery
The error is at the time you invoke the function, if you call it in the event click, the file doesn’t exist yet, so much so that the browser’s file selection window doesn’t even open, you have to…
jqueryanswered Denis Rudnei de Souza 3,686 -
0
votes3
answers1299
viewsA: How to check if the file is an Input type="file" image
You can use the attribute type of the file, it will return the type in the format image/png, just check if it contains the text image Ex.: var file = document.getElementById('file'); function test()…
-
1
votes1
answer216
viewsA: True return function returns false in a Vue expression
You forgot to give return in his method dataDiferenca and in computed value dataqualquer var vue = new Vue({ el: '#app', computed: { dataqualquer () { const data = this.dataDiferenca("05/02/2018")…
-
3
votes1
answer120
viewsA: How to submit this ajax request?
How to write the AJAX request as it was sent in the image? Your code has two errors, the first is not closing the quotes, and the second is not passing an array, so it is not equal to the image, to…
-
1
votes1
answer156
viewsA: Can I export a JAR file with only Kotlin classes, without any Java class?
You can define a class with the method main recognized by Intellij in two ways: object MainClass { @JvmStatic fun main(args: Array<String>) { println("Sou uma classe com um main definido") } }…
-
1
votes4
answers1982
viewsA: How do I validate the radio input of my code?
I saw that you are using several if-lse to perform exactly the same thing, as there is no variation, I decided to use the function each, which receives a function such as callback to be applied in…
-
3
votes1
answer295
viewsA: non Static method write cannot be referenced from a Static context
Your mistake is in: private void gravarNoArquivo(String texto) { try { OutputStreamWriter outputStreamWriter = new OutputStreamWriter(openFileOutput("anotacao.txt", Context.MODE_PRIVATE));…
-
1
votes1
answer135
viewsA: Problems with Ajax
I did some tests and I believe I found the problem The problem lies within your if, when finding the fields to fill in with the result of the ajax request. In the if you use:…
-
2
votes1
answer270
viewsA: How to capture the closing event in a Stage?
You can call the method setOnCloseRequest of your Stage, this way you can perform an action as soon as the user clicks the button to close the window. Ex.: public class Teste extends Application {…
-
1
votes4
answers943
viewsA: Adjust one td css only
You can use :first-child to take the first element inside the tr td:first-child > img { width: 50px; } <table border="2"> <tbody> <tr> <td><img class="imgpadrao"…
-
7
votes2
answers1472
viewsA: How to use Javascript to lock a keyboard key and display alert in the field about the recommended key?
You can link an event in the input Example: document.querySelector('input').addEventListener('keypress', function(evt) { if (evt.key == ',') { evt.preventDefault() alert('Tecla inválida'); } });…
javascriptanswered Denis Rudnei de Souza 3,686 -
2
votes1
answer205
viewsQ: Reason for Incompatibleclasschangeerror
I recently noticed some error messages in my code, the message that appears is this: Exception in thread "Thread-3" java.lang.Incompatibleclasschangeerror The strange thing is that it only happens…
-
2
votes1
answer1068
viewsA: How to return the values of an arraylist in Java
Your second if is inside the first, the way it is he never saw to list the items of his ArrayList Your code should be like this: import java.util.Scanner; import java.util.ArrayList; public class…
javaanswered Denis Rudnei de Souza 3,686 -
0
votes1
answer74
viewsA: Ajax does not return values on mobile device
The problem is in your URL, the host is set to localhost, and the port 8080, as it is running on the mobile the browser will not be able to find the information. You can remove the…
-
1
votes1
answer819
viewsA: Invalid syntax message without any apparent error
Error is on line 12, you did not close parentheses of print function: The right thing would be: import os def rename_files(): #(1) pegue os nomes dos arquivos da pasta file_list =…
-
3
votes1
answer1624
viewsA: How to create a Javafx Window without the three standard buttons (Minimize, Maximize and Close)?
You can define the style using the method initStyle() who receives a Stagestyle of your Stage. Ex.: public class HelloWorld extends Application { @Override public void start(Stage stage) { Text text…
javafxanswered Denis Rudnei de Souza 3,686 -
0
votes2
answers51
viewsA: How to make html transferable between computers without losing hyperlink and images?
The real problem is that you use absolute paths to map your resources in Html, I recommend using relative paths, so when switching machines the problem will not exist In your case, if the HTML file…
htmlanswered Denis Rudnei de Souza 3,686