Questions tagged as 'array'

1
answer

Function strip () in python malfunction

I have a list in a file, where each line has a user agent (with "at the beginning and at the end of each line), which is used in a later part of a program, to perform automated tests using selenium. When I opened the list, I implemented that, fo...
asked by 10.04.2018 / 07:20
1
answer

URI Online Judge - 2163 - Python 3

I am having trouble solving the problem The Awakening of the Force of the URI.    Long ago, in a galaxy far, far away ...       Following the decline of the Empire, scrap yards are scattered all over the   universe searching for a saber...
asked by 02.04.2018 / 06:10
1
answer

Update values in an array while keeping elements already modified

I'm creating a game board, using an array of 2d array. During the game the players hit or miss and this has to be printed on the board. I would like to know how I can update the array without losing and that was printed previously. My first a...
asked by 06.04.2018 / 19:31
2
answers

How do I return only the largest value within a vector?

   It does not correctly check the largest. For each animal it shows the weight of the animal as the largest. #include <stdio.h> #include <stdlib.h> #include <string.h> #include <ctype.h> #define TAM_MIN 1 #define TAM...
asked by 30.03.2018 / 19:45
0
answers

Array x ArrayList

Yesterday I did a question on using a Two-Dimensional Array in a dynamic way, so I ended up receiving an answer to use an ArrayList , and this served perfectly for my case, but from that generated the doubt, when should I use one or the oth...
asked by 06.04.2018 / 15:08
0
answers

Count an array of a function?

How do I echo of the result count of the following function? public function get_Myinteresses() { global $db; $myInteresses = array(); $get_interids = $db->query(sprintf("SELECT * FROM inter_user_conn WHERE iduser = %s",...
asked by 31.03.2018 / 12:35
1
answer

How to pass the registration code as a function parameter?

I have to sort the salaries of a company's employees in a decreasing way. Entry, Enrollment, salary if you want to continue Exit: Salaries in descending order. The error that is appearing is the following:    [Warning] passing argum...
asked by 28.03.2018 / 22:14
1
answer

C # function in the controller to receive an array

I need to get an array of select and send to a function in the controller, but it always arrives as null, even sending the complete array. Here is the code: Controller: [AcceptVerbs(HttpVerbs.Get)] public ActionResult GetLocais(int [] idcT...
asked by 28.03.2018 / 22:18
0
answers

Traversing an object array in php using the foreach

I'm having trouble displaying the information in a simple table in html, I'm trying everything, the php code is this: <?php $header = true; echo '<html><body><table><meta http-equiv="Content-Type" content="text/html";...
asked by 04.04.2018 / 16:29
1
answer

How to iterate PHP array received as JSON? [duplicate]

I have the following JSON , which I create by JSON.stringify(dados method), and I pass via ajax to php : {"nome":"nome_da_pessoa", "registro":"registro_da_pessoa", "departamento":"_$oid/5aac50..."} When I get int...
asked by 26.03.2018 / 03:54