Posts by Lucas Pletsch • 787 points
88 posts
-
1
votes2
answers467
viewsA: How to Tab the Cursor in Vs Code?
What solved was more or less that below, that @Rebecanonato spoke: "You can also open the keybindings.json file, in the Command Palette (Ctrl+Shift+P), search for Preferences: Open Keyboard…
visual-studio-codeanswered Lucas Pletsch 787 -
2
votes2
answers467
viewsQ: How to Tab the Cursor in Vs Code?
I have Windows 10 and I use Vs Code. I want to tab my cursor, but when I press the tab key, what happens is that the cursor starts to select the first item of the terminal header (and is navigating…
visual-studio-codeasked Lucas Pletsch 787 -
0
votes1
answer53
viewsA: <input>: "required" is not set, yet the completion is required
I restarted everything and it worked, without moving anything
-
-3
votes1
answer53
viewsQ: <input>: "required" is not set, yet the completion is required
I have an input type url within a form, and I have not set the "required" attribute of it, and even then field completion is being required. I also tried: required="false" and required=false, and…
-
0
votes2
answers154
viewsQ: Promise async/await not resolved
I am doing . map() in an array, to do a Mongoose/Mongodb query with each element of this array and returns another array with the results. However, after this process, I try to access the new array…
-
0
votes1
answer181
viewsQ: .find() from Mongoose returns nothing when it should
I’m trying to make an appointment with Mongodb with Mongoose. The parameter is a $in with an array whose only value is a regular expression that selects the object if the attribute "url" has the…
-
0
votes1
answer323
viewsQ: How to pass several parameters to query in Mongoose?
I want to do a Mongodb search with Mongoose (Nodejs), where I want the objects whose url attribute that is a string contains within it at least 1 of the values I have in an array. How could I do…
-
0
votes0
answers30
viewsQ: Object attribute can be filled with function call? Javascript
I’m trying to turn a file. js in module so I can access it in another .js. So this file I want to export needs to be it integer an object, right? Example: File "database" module.exports = {…
-
0
votes1
answer202
viewsQ: How do I use variable value outside of your callback? Javascript
I’m trying to get the HTML of any URL (Google for example), to use it in my front end. First, I try my server.js Node with Express to get this HTML through the "request module":…
-
1
votes2
answers269
viewsQ: How to call and get via GET an external HTML page using Axios?
I am trying to get any external html page via an Axios.get(), passing the url of the page in question as parameter: axios.get("http://www.google.com") .then(resp => { retorno = resp.body }) Only…
-
0
votes1
answer99
viewsQ: How to get only specific page elements via Xios.get()?
With the Axios.get method from the Axios.js library I can get an entire HTML page, right? Example: axios.get('http://www.umaurl.com') .then(resp => { console.log(resp) }) But now, if I just want…
-
0
votes1
answer87
viewsQ: "Document" can be accessed in a separate HTML Javascript file?
I have an HTML with a linked Javascript file. In Javascript I try to access an element of this HTML through Document.getElementById("meuId") and is returning Null. That should happen? In Javascript:…
-
0
votes1
answer558
viewsQ: Nothing happens when running Java project in Intellij
I’m trying to run a project in Java but going to "Run" -> "Run" or Alt+Shift+F10 and nothing happens. The terminal doesn’t show anything, even though it has System.out on main. Only my colleagues…
-
-2
votes2
answers640
viewsA: Change text color with :Hover, but does not work CSS3
I know. I’m changing the text color of <li>. But the text in there is <a>. So it was like this: li { position: relative; padding: 10px 5px; margin: 5px; float: left; list-style-type:…
-
-2
votes2
answers640
viewsQ: Change text color with :Hover, but does not work CSS3
I’m using the pseudo-class :hover to change the style of an element <li>, when I move the mouse over. The background-color works, but the color of the text does not. I have no idea why. It…
-
3
votes1
answer85
viewsQ: Object access bracket notation does not accept String object
I am trying to call a function which is a property of an object, passing a parameter to it. For this I use bracket notation plus this: (parâmetro). Thus: afraid[day](num.toString()) But returns…
-
0
votes1
answer24
viewsQ: How to interfere in the execution of a function called by event callback
i have a web application here that has "mouseouver" Software. The callback function called by it is being executed recursively through a setTimeOut(): /*........*/ item.addEventListener("mouseover",…
-
2
votes1
answer94
viewsQ: Function Listener being fired without Event having occurred, Javascript
In my code, I am having add an eventListener for each HTML element of the class "animation". For this I use "addeventlistener", passing the changeBar function as Listener, to be triggered in case of…
-
0
votes2
answers114
viewsQ: Width defined in css appears as Undefined for Javascript
The problem is this: 1-I created a div and defined its style by its class, in css. Including width. 2- In javascript I try to search to change the value of this width, via "myDiv.style.width", but…
-
-1
votes1
answer26
viewsQ: Video tag controls are not working
I put a tag and the attribute "Controls" in my html. The video screen appears, and the controls also, but nothing happens when pressing the buttons of the controls. I click and they don’t even…
-
0
votes1
answer143
viewsA: Recursive function returning Undefined in Javascript with Node
The point is that apparently Javascript on Node does not let a function have Return only on if and not Else. The function worked correctly when I put the recursive call as Return of Else of if…
-
0
votes1
answer143
viewsQ: Recursive function returning Undefined in Javascript with Node
The recursive function below stops running when it arrives at "if (Sorted) " and the condition is true, as it should. Only it doesn’t matter what I put in to return, she doesn’t return. If I do…
-
3
votes2
answers192
viewsQ: Am I required to set the size of a Linkedlist in Java?
Since the LinkedList in Java is a double chained list, I understand that I could insert an element in any index I wanted, right? Or wrong? For example, I create a list and use the method add(indice,…
-
3
votes1
answer508
viewsQ: How to know if there is an element in a List index without error?
I’m trying to give a get() in the indices of a ArrayList, so that if there is something in those positions, I add that value with something else. Only if there is no such index, I would add it.…
-
2
votes2
answers1284
viewsQ: Foreach with lambda which returns the sum of iterated items
I’m trying to iterate on a List calling for produtos of objects called Produto, using the forEach, to obtain the sum of the values of these products using the lambda function of the forEach. But I…
-
0
votes1
answer119
viewsQ: Hibernate does not find Hibernate.cfg.xml
. When indicating the configuration file to Hibernate, I tried the wrong relative path before ". cgf) (.. /.. /main/Resources/Hibernate.cgf.xml). But now corrected, the absolute and Hibernate path…
-
0
votes1
answer533
viewsQ: Do I need to include classes mapped in persistence.xml? Java-Eclipse-Maven-Hibernate-H2database
I’m trying to set up a Maven project in Eclipse with Hibernate and H2 Database. So I’m trying to understand the persistence.xml settings, which I had to create. One question is: do I need to include…
-
1
votes1
answer237
viewsQ: Java: Error while recovering data from Resultset, even though query is correct
My problem is this: I am making a Java application integrated with the H2 database. I do a query via PreparedStatement and saved in a ResultSet. So far so good, no Exception is generated. In the…
-
0
votes1
answer72
viewsQ: Resultset object is null after Try-catch. Java
I did a query in my database and it worked, but I’m not able to use the Resultset of this query. I debugged and found that it has a correct content, but it gets null after Try catch where it is…
-
-2
votes1
answer611
viewsQ: How to check if a field of an array of chars is empty in Java?
I am trying to check whether a particular position of an array of chars actually contains some character. I tried it two ways: char[] arr = new char[10]; if(arr[0] == null){ } And also: char[] arr =…
-
-1
votes1
answer213
viewsQ: Composite primary key definition syntax in the H2 Database engine
I am trying to define a primary key composed of two columns when creating a table in the H2 Database Engine (http://www.h2database.com/html/main.html), but I couldn’t find the syntax in the manual.…
-
2
votes1
answer226
viewsQ: Netbeans Java Error: "error: Diamond Operator is not supported in -source 1.5"
I’m trying to use a List of Lists in Java in Netbeans for the first time: List<List<String>> listao = new ArrayList<>(); But it presents a compilation error on the line where I…
-
0
votes1
answer66
viewsA: Canvas is not appearing
The canvas style "display" was missing as "block". It was None. I simply added this line to the function formaCanvas(res), right after the frame variable is filled with the canvas element:…
-
-1
votes1
answer255
viewsQ: Change the style, "display" attribute, of a canvas in Javascript
I have a Javascript function that takes an empty canvas and fills it. Only that, as in a first moment I do not want to display the canvas, I set her style in the display attribute as "None". Now, I…
-
-1
votes1
answer66
viewsQ: Canvas is not appearing
I have a menu of buttons being displayed, and when I click on one of them, some operations happen and then a canvas with text should be displayed. Turns out, these operations all happen, but…
-
0
votes0
answers68
viewsQ: Array sent via Json for Javascript comes null on it
I have an application where, a Javascript I have a function that performs an Ajax call to the file . php handle. The . php handles the function buscaConta(p) like: makes a SELECT in the Mysql…
-
3
votes2
answers38
viewsQ: Generate a string that contains only the numbers of another string in php
I made the following function in php that takes a string, and returns a new string containing only the numbers of the received string. I’m just not able to concatenate each number to this new…
-
0
votes1
answer618
viewsQ: Syntaxerror: Unexpected token: string literal -Javascript
I’m having this error in the following function: function formaQueryConta(cpf){ var numConta= jsonDtContasCliente[(document.getElementById("listaContas").value)-1]; console.log(typeof(cpf)); //Diz…
javascriptasked Lucas Pletsch 787 -
0
votes2
answers200
viewsQ: Nothing happens when calling . php file via Ajax call in pure Javascript
I am creating Mysql server persistence for a web application of mine. For this I am using the xampp and phpmyadmin. I created a database in phpMyAdmin and in my application, in a javascript I have…
-
1
votes1
answer267
viewsQ: Parseint() is returning Nan
My code is this: arrayCods = lista.split(","); var i_rem = document.getElementById('listaUsuarios').value; //Até aqui tudo bem, a i_rem contém um valor numérico extraído do html. i_rem =…
-
1
votes3
answers856
viewsA: Convert a number array to a single String in php
In the implode function, I put the empty delimiter and it worked: $resultado = implode('', $result);
-
0
votes3
answers856
viewsQ: Convert a number array to a single String in php
as I transform an array of numbers into a single string in php? In the code below the variable $result is the array of numbers, and I tried to convert it to a single string with the function…
-
0
votes1
answer155
viewsQ: How to print on screen or console, a string array in php
I’ve been going through the documentation, but it’s unclear how I do it. I have an array of strings: $remetente = $con->real_escape_string($_REQUEST['rem']); $arrai= array(); $remetenteArray[] =…
-
0
votes0
answers756
viewsQ: "A reference to a non-static member must be relative to the specific object" when calling class c++ method itself
I have a class where, within a non-static method, I want to make a call to another non-static one as well. However, by doing so, Visual Studio already gives this warning: "A reference to a…
-
4
votes1
answer306
viewsQ: Send two triangles to a Vertex Shader. Opengl, C++, GLSL
I am learning in college graphic processing with Opengl at C++. We are using the GLFW and GLEW libraries. My program consists of creating two triangles in different parts of the window. I created an…
-
0
votes0
answers23
viewsQ: Javascript command to close browser window
There is a command that can be used in a Javascript that terminates the browser process in which it is running?
javascriptasked Lucas Pletsch 787 -
1
votes1
answer751
viewsQ: Set as Pattern values with two decimal places in input Html5
I have a numerical input, and I would like it to be valid only by Pattern, values with . xx (point plus two decimal places). My code: <div> <label for="valorTr> Valor: </label>…
html5asked Lucas Pletsch 787 -
4
votes1
answer153
viewsQ: Search localStorage Json object list for your key name
I know that the browser localStorage stores data in the key-value format, and that I can recover the Json objects saved there through the key. Now what I need to do is retrieve all the records whose…
-
1
votes1
answer608
viewsQ: Adding values to a deserialized JSON object attribute in Javascript
My problem is this: I am retrieving a Json object from localStorage via Javascript, and I wanted to add a value to one of these attributes, and then save the d evolta object in Storage location.…
-
3
votes1
answer14930
viewsA: Uncaught Syntaxerror: Unexpected token u in JSON at position 0
The problem was this: there was already an element in html with id="name". So when giving a var nome = document.getElementById('nome'); I was looking for another element of the document, not the…