Questions tagged as 'array'

1
answer

Scanning an entry by scanf does not move in the string beyond the blank space

I'm trying to make a program that reads a sentence, and then put each word initial in capital letters, if not already. The problem is that I type a sentence but it only returns the first word, nothing more. the word is with the first capital let...
asked by 06.03.2017 / 01:42
1
answer

Sort array php [duplicate]

I have array , where values are arrays . How can I order the first array , according to with a value that is in the second array ? Example: array(array(id=>5), array(id=>2), array(id=>1), array(id...
asked by 19.08.2016 / 11:36
1
answer

ArrayList repeating itself

I have an array that whenever I refresh my page, it doubles. I did some testing to see if it was not duplicating in JavaScript, but I did not find anything. This is JavaScript: <script src="https://ajax.googleapis.com/ajax/libs/jquery/3....
asked by 07.02.2017 / 19:45
2
answers

Push in JSON Object AngularJS

How do I add 1 item to a json object in angularJS. In case I have: {COD: 29, MOTIVO: "teste"} And I'd like you to stay: {COD: 29, MOTIVO: "teste", ID : 12345789} Home I tried the following: $scope.cadastroSolicitacao = function(...
asked by 10.02.2017 / 20:47
3
answers

Remove line from an array

How do I remove the line without getting whitespace? N7 G90 N8 G26 RA 10.840 N9 G54 G92 X115.00 Y25.00 N11 C5 N12 D14 N13 G42 G01 X76.3276 Y-19.86 Having to look like this: N7 G90 N8 G26 RA 10.840 N9 G54 G92 X115.00 Y25.00 N11 C5 N12 D1...
asked by 17.10.2016 / 14:18
2
answers

Insert a point in the penultimate item of the variable

I have a variable with the value "14013" and I'm trying to insert a dot to get the following value "140.13" in my loop. for (var i in teste) { for (var j in (teste2[teste[i]])) { valorFinal[j] = resultado1 + resultado2; //valor...
asked by 18.07.2016 / 01:59
1
answer

Accessing information from an object

How would I go about accessing Type and cm with this array? object(stdClass)#38 (3) { ["op"]=> string(1) "&" ["c"]=> array(1) { [0]=> object(stdClass)#32 (3) { ["type"]=> string(10) "co...
asked by 07.10.2016 / 16:23
1
answer

PHP Arrays and Strings Interface [closed]

Situation I have a page in PHP that does CNPJ searches and returns the values, but as it is not formatted, the results appear in ARRAY and STRINGS . Example array(23) { [0]=> string(18) "XX.XXX.XXX/XXXX-XX" [1]=&g...
asked by 05.04.2016 / 18:38
2
answers

Conversion from byte array to string when compiling revealing string in compiled code in C

I'm using the function below to do the conversion from byte array to string , but when parsing the compiled code I notice that string is shown clearly ( using a hex editor ) , which I do not want. char arr_code[] = {79, 99,...
asked by 16.09.2016 / 07:54
1
answer

Accessing data from an array

I have a half-beast problem here. I have the following array array(1) { [0]=> array(7) { ["id"]=> string(1) "6" ["produto"]=> string(1) "7" ["peso"]=> string(1) "1" ["comprimento"]=> string...
asked by 14.02.2016 / 02:50