Posts by Diego Soares • 403 points
28 posts
-
1
votes1
answer1198
viewsQ: Return an array of a function in javascript
I’m trying to return an array of a function to assign to a modelin Angularjs. However the return of the function is undefined, but when I give one console.log before returning the array is correct.…
-
1
votes1
answer1182
viewsQ: Send an ajax post request to PHP
I am trying to send a text that is typed via ajax to a php page that will make a query using this text that is received. I want to know how to send the variable value nmCliente for the php page. I…
-
0
votes3
answers159
viewsA: Read values from a Json structure using Jquery
I managed to solve by creating the following structure: $.getJSON('../caminho/do/json', function (data) { var clientes = JSON.parse(data); console.log(clientes['clientes'][0]['nmEntidade']); });…
-
1
votes3
answers159
viewsQ: Read values from a Json structure using Jquery
I’m trying to read the data that is received via php and I need to read these values separately. Return is an object json, when I show on console using command console.log(data) and the following…
-
1
votes1
answer14
viewsQ: Add fields on page as selected option in a select options menu
I am creating a form and I want that as the option selected in the menu a different html code is shown on the screen. I’m using jquery to add the new fields. But each option selected the new fields…
jqueryasked Diego Soares 403 -
-1
votes1
answer1329
viewsQ: How to order an Arraylist in ascending order by date
I need to order a ArrayList in ascending order by date. For I keep adding values out of order in it. In my ArrayList has only two fields in each element: data and valor. Does anyone know any method…
javaasked Diego Soares 403 -
0
votes1
answer925
viewsQ: How to convert a Json file to a list of objects in Java?
I am trying to read the data from a. json file and store them in a ArrayList<> of objects, but an error is occurring that I do not know what it means. Sale class - To store the data that will…
-
0
votes3
answers1344
viewsA: Convert String to double in Java
I got it solved! I added this line of code line = line.replaceAll("[\"R$ ]", ""); right after reading a line from the file to remove all the special characters.
-
1
votes3
answers1344
viewsQ: Convert String to double in Java
I am reading data from an external file with CSV format. However this data is coming in CSV format String. There is a price field that I need to turn into double for handling purposes. Class…
-
0
votes1
answer1723
viewsQ: Send a POST request with java
I need to submit a POST request to the following address which is an Amazon API: https://ikd29r1hsl.execute-api.us-west-1.amazonaws.com/prod/contaazul/grade And in this request a JSON has to be…
-
1
votes2
answers4982
viewsQ: How to count the number of records of a selection in a table
I made a selection of all the results of a table. What I need is to show the amount of these results. In my case, I need to show you how many different specialties there are SELECT "especialidade"…
sqlasked Diego Soares 403 -
1
votes0
answers116
viewsQ: I can’t extend a Jframe class in Eclipse
I am trying to extend a class of Jframe to create a window, but in eclipse appears the following error: configure build path -Open the Java build path Property page of project "Chat" The code would…
javaasked Diego Soares 403 -
1
votes1
answer7190
viewsQ: How to Manipulate Arraylist of Java Objects
The program consists of adding students and for each student adding subjects and for each discipline adding grades. In the end the program must return all the students and their disciplines, and for…
javaasked Diego Soares 403 -
0
votes1
answer1068
viewsQ: How to return the values of an arraylist in Java
I am unable to return the values of the arraylist. I created a Student class with some methods. In another class I create an arraylist of the type Student and add values. However when I show nothing…
javaasked Diego Soares 403 -
1
votes1
answer3516
viewsQ: Sort a matrix in C
I’m trying to sort an array in C. The logic I used would be to create an array size, copy the values there, sort the values and then copy them to the array again. To do this I use a function that…
casked Diego Soares 403 -
2
votes1
answer2487
viewsQ: How to make a method return a string in Java
I want to create a program that reads the name and age of a person and compares the ages and finally shows the name of the older person. My reasoning was to compare which is the highest and return…
-
2
votes2
answers1641
viewsQ: Pass pointer pointer as argument for a function
I want to create an array using pointer pointer, but I’m having difficulty passing the parameters. First I dynamically allocate the matrix using a function. And then I read. The program compiled,…
-
1
votes0
answers86
viewsQ: Error in passing Java parameter
I’m starting to learn Java and I’m having a problem with a simple code I did. It is a program that reads a text input and then prints on the screen, but when trying to compile this error occurs here…
javaasked Diego Soares 403 -
1
votes1
answer339
viewsQ: How to print the value of a button in a text box using javascript
I am trying to make a calculator in Javascript and I want to click on a button the value is displayed on the screen. Another question is how do I concatenate the name of id of button with the…
javascriptasked Diego Soares 403 -
0
votes2
answers744
viewsQ: Hide one div and show another by clicking on a javascript-only button
I’m trying to make a quiz and I want it to appear one question at a time. I used the css property display: none; to hide, and created a javascript function that takes as parameter the id of the div…
javascriptasked Diego Soares 403 -
0
votes1
answer34
viewsA: How to apply the Hover effect to an element immediately before?
Do you want to apply the effect on the image or button? If you want the effect on the button just replace img for button. Would that be your question? img:hover { transform: scale(1.5); }…
-
5
votes2
answers7180
viewsQ: Get the value of radio input with javascript
I’m trying to ask a quiz of questions and I’d like to take the value of input radio, which are the answer options. Any tips on how to do this using javascript only? <form> <h3>1. Which…
javascriptasked Diego Soares 403 -
0
votes0
answers798
viewsQ: Storing answers to a quiz with javascript
I am trying to create a quiz and would like to know how I create a function to store the answers using javascript. I can store in an array and then compare if they are right? <!DOCTYPE html>…
-
1
votes6
answers1851
viewsA: Interlink two strings into one vector
Oops! the error is in the indexes you are passing in arrays S1 and s2. At each loop a letter is left behind. To fix this you must assign a different index for each variable S1 and s2. Follow the…
-
1
votes1
answer588
viewsQ: Add a different image in a div to each loop using javascript
I need to add a different image in a div. I used a for to make this loop. Is there any manipulation that I can do in the img tag that I am adding so that each loop is changed the name of the image?…
-
4
votes3
answers5803
viewsQ: Draw numbers without repeating in javascript
I need to draw 16 numbers and store them in an array, but there can be no repeat numbers. Follow the code. var numero = []; function numero_aleatorio () { for(i=0;i<16;i++) {…
javascriptasked Diego Soares 403 -
0
votes1
answer606
viewsQ: Assign a numeric value to an html class using jquery
I’m trying to make a memory game and for this I need to assign values to the div where they will be stored to compare if the selected figures are equal. I tried this way (as code below) but it is…
-
0
votes3
answers173
viewsA: How to capture the numbers for a single line array?
You need to make dynamic allocation so that the size of the array is defined by the user. Use the "malloc".