Questions tagged as 'array'

1
answer

Capturing elements by tag and inserting inside an array

Well, I'm mounting a merry-go-round on a test project, and I had a question, how can I, with vanillaJS , capture certain elements by tag , and put them within array ? The idea would be more accurately, to capture according to t...
asked by 20.03.2017 / 12:49
1
answer

JS - display elements on the screen from an object

I need to mount a questionnaire on the screen with questions and alternatives brought from a database, it is possible to mount the screen with label and radiobuttons without putting a foreach in html , but using Jav...
asked by 01.12.2016 / 15:11
1
answer

Input values in array

I have the following code that reads a 10x10 array: public class t151 { static final int n = 10; public static void main (String[] args){ int A[][] = new int [n][n]; int i,j; for (i=0; i < n; i++){...
asked by 04.11.2016 / 00:34
1
answer

How to replace the contents of an array?

I have a div (mosaic of users) that inside it has a array (javascript) with photos of users (data coming from the bank). The number of user photos must be less than or equal to 15. If array has less than 15 users (photos), i...
asked by 01.11.2016 / 14:31
1
answer

Problem with empty Array with mysql and nodejs

This is the action that is activated when loading the page: In it I get the following array as result. My problem is, when I have no records the ARRAY returns empty, I can not pass a parameter to the INPUT. Ex: input (value="# {data [0] [0]...
asked by 23.12.2016 / 14:42
1
answer

How to do a checkbox ternary check with PHP?

I am doing this check in a <select> field and everything is working fine but I would like to do the same check in a <checkbox> that can have several possibilities, then need to work with arrays so I do not know how to...
asked by 02.01.2016 / 16:03
1
answer

Difficulty in handling the query

Personal I have the following query: SELECT p.ra, p.nomealuno, qa.respostaaluno, q.respostacorreta FROM prova p INNER JOIN questoes_aluno qa ON qa.idprova = p.id INNER JOIN questao q ON q.id = qa.idquestao AND q.iddisciplina = 46 ORDER BY p.i...
asked by 06.12.2016 / 21:07
1
answer

Know how many positions were filled in a vector in C

I can not display the filled positions in C. I need to get back which positions are missing to be filled and those that are filled. ex: "So far there are 3 registered students, thus allowing the insertion of a maximum of 7 more students." #...
asked by 09.11.2016 / 19:43
1
answer

Structure Array coming from mysql with PDO (organize)

Good evening, I'm having a difficulty with arrays where I'd like them to stay in order so I can use them as follows. In my database I have many images that I call with this code below. <?php $image_search = 00001::conect_sql(); $image_s...
asked by 09.10.2016 / 00:48
2
answers

Vector in C- Program received signal, Segementation fault

Hello, I made a function that checks if a number is present in a vector. THE function receives as parameters the vector, the value to be verified and the number of elements in it. E returns 1 (one) if the element exists in the vector or zero if...
asked by 16.11.2016 / 18:21