Questions tagged as 'array'

1
answer

Help in JavaScript contact list program

I have to make a simple JavaScript program that will show the user's contact list and will allow it to insert a new contact, as in the image below and the description of the problem is as follows: Each contact should have a first and last name T...
asked by 08.11.2018 / 18:51
3
answers

How to make the first two numbers of a Math.random sequence are not EQUAL

I made a lottery system in order to learn, I will not post the whole code here just the part that I am packed. It is as follows: The draw of the PC is a sequence of 6 numbers that I present in the DOM (it does not matter), so I want the first...
asked by 05.10.2014 / 07:02
0
answers

button always falls in the same condition

I have a code that adds things to the localStorage, everything works correctly, but the delete part does not work, I'll show the code and explain below. $(function () { var operacao = "A"; //"A"=Adição; "E"=Edição var tbClientes = localStorage...
asked by 13.11.2018 / 13:50
0
answers

Read entry and store specific information in C

I want to identify all 32 reserved words of C written in an entry that simulates a C code, but it is not storing all and I do not know what is wrong, obs stores only if it appears and what not the number of times it appears. Here is the code and...
asked by 08.11.2018 / 21:55
0
answers

Summation problems using vector

Well, I'm facing problems with a vector. The idea would be to go through the vector and add its values in a var. The problem: Enter 1000, it traverses and assigns 1000 to var. But when I re-type the value 500, it returns 2500. Here is the code:...
asked by 30.10.2018 / 14:11
1
answer

Retrieve values from an array of the next line in the previous row

I have an array in the format below: Array ( [0] => Array ( [A] => 000001001000003001 [B] => VLR REF COMPENSACAO DE VENDA CONFORME CO1 [C] => 1.1.2.01.020001 [D] => Z4 [E] =>...
asked by 26.10.2018 / 18:40
1
answer

Placing in alphabetical order an array of objects [duplicate]

I have an array of objects and I want to put them in alphabetical order but I'm not getting through the javascript, I'll put how the array is structured and the code to call the page var json = [ { "ID":"1", "TÍTULO":"Algum...
asked by 25.10.2018 / 18:42
2
answers

Mirror inputs with their values

Is it possible for jquery to understand the elements of an array value coming from the html? ps: I do not know if it is correct to say that in html there is an array. I am creating with html and jquery a dynamic input that is having the v...
asked by 30.01.2018 / 19:59
0
answers

Range of an Array in SWIFT

I have an array of bytes and I need to find out what range (startindex and endindex) a byte is or if it only has startindex ex: var Faixa1:Array<UInt16> = [2,4,6,8,10,11,12] var Faixa2:Array<UInt16> = [1,2] var Valor1:UInt16 =...
asked by 23.10.2018 / 21:19
0
answers

Store Struct data in a Vector

I'm trying to store data from a struct into a vector, except that I register 2 products to test, and when I call the show function in main it only shows the last product registered as if it had only read the last data inserted and replaced , but...
asked by 18.10.2018 / 15:17