Questions tagged as 'array'

1
answer

Remove indices from array

How to remove indexes from an array? Original Array ["Torrada" => 4,"Cachorro quente" => 1] for [4,1]     
asked by 16.06.2018 / 04:56
1
answer

Print does not return table values

pokecatches = { ["Bulbasaur"] = {chance = 150, corpse = 5969}, ["Ivysaur"] = {chance = 275, corpse = 5982}, ["Venusaur"] = {chance = 400, corpse = 5962}, } print(table.maxn(pokecatches)) corpses = {} for x=1, table.maxn(pokecatches) do table.inse...
asked by 03.09.2014 / 04:24
2
answers

How to decode a JSON Array on Android

There was a need to decode a JSON Array like this: output: [ [{ }, { }], [{ }, { }] ] I was doing this in a way that decoded a Array like this: output: [{ }, { }, { }] Code of how you were doing: Meth...
asked by 09.09.2014 / 15:06
2
answers

Dictionary in C always returns "word not found"

I'm having problems with the code below. Although the user types an available word, the return is always palavra nao encontrada . #include <stdio.h> #include <stdbool.h> struct dicionario { char palavra[21]; cha...
asked by 30.08.2014 / 15:52
1
answer

Print vector disregarding repeated values

   Make an algorithm that reads a vector of 50 elements and prints the vector   disregarding the repeated values. The code is giving the correct output, but if I type a repeated number, the program asks for a new one until I enter one that d...
asked by 15.10.2014 / 17:38
1
answer

'Search in All' using LinqJs

I'm using linqJs When I try to get the id 5512 it returns null , but when I get the 124 , it works. $.Enumerable.From(structure).Where("$.id==5512").ToArray(); Object structure: [{ "id": 124, "text": "Pai"...
asked by 11.04.2017 / 22:51
2
answers

How to define custom name in array index in Javascript?

In PHP we can use: $validation = [ 200 => ['icon-check', 'The key match with the message!'], 400 => ['icon-close', 'The key doesn\'t match with the message!'], 403 => ['icon-close', 'Impossible to verify, the key or text can b...
asked by 27.01.2017 / 11:52
1
answer

Count vector elements and put links on the page

I want to make a script that counts how many vector indexes I have inside new Array . Example var array = new Array('001.html', '002.html', '003.html', '004.html', '005.html') .. and add them in the HTML document, right in th...
asked by 31.12.2016 / 15:04
2
answers

How to make an object in the ListView have an absolute position?

I have a listView with several items, I also have a searchView to make a filter on these items, being "clickable", starting another Activity. The problem is that the numbering of lisView items changes according to what I search in searchView....
asked by 30.12.2016 / 05:01
4
answers

How to insert a property into a javascript object?

I have the following javascript object: data2 = { "desColigada": "Empresa fulano de tal", "codMatricula": "00555454", "dataImpressao": "23/05/2016" }; I need to know how to insert this array into the above objec...
asked by 29.03.2017 / 21:03