Questions tagged as 'array'

1
answer

How do I return the number of lines that appear with a certain beginning?

I wanted to open a document and have it return to me the last number in a row containing '>' as a reference. That of all rows that have this '>' . or that it read the amount of '>' that existed in the file and return...
asked by 30.06.2014 / 17:10
1
answer

return from array_search () considered false condition

In my code, on the login screen, I search the BD for the number of blogs belonging to the same user, and put the ID of those blogs in an array, then assign it to a session variable (I want my code to allow the user later of logged in to access t...
asked by 06.04.2018 / 05:48
1
answer

Splitting string in C

I'm very new to C, but I have a lot of experience with python, I have a project that I need to get 3 numbers on the same line and make a vector with these 3 numbers in the input digit 3 1 37 I wanted you to form a vector [3,1,37] there...
asked by 04.10.2017 / 17:10
1
answer

Boolean Array for Integer

How can I transform a boolean array, boolean[] bits into its corresponding Integer ? I have a function that does exactly the opposite, but I did not understand it enough to be able to invert it. int input = 62; boolean[] bits...
asked by 31.08.2017 / 21:13
2
answers

How to report data in a vector

I can not report 10 student grades. import java.util.Scanner; public class exer { public static void main(String[] args){ Scanner scn = new Scanner(System.in); double[] N = new double[10]; int i; for(i=0;...
asked by 11.09.2017 / 08:31
1
answer

Capture only one element of an array

I have the following array , how could I store in a new array only the "product_id" of all "store_id"? array(2) { [0]=> array(2) { ["loja_id"]=> string(3) "286" [0]=> array(2) { [...
asked by 30.01.2018 / 17:19
1
answer

Float to Byte Array Conversion

How can I be converting from float or integer (if possible) to a byte array in Java. Let's say: float x=180 Theoretically you would need to create 1 array of bytes with 2 positions. Is there any way to 'automate' this?     
asked by 17.08.2017 / 21:01
1
answer

How to transform more than one vector into array using the php language?

I have a matriz_caminhos.txt file with 20 rows and 20 columns, I need to access it and get the data as an array. So far, I just got him to scan the file and return me 20 vectors. Follow the code: . <?php $ponteiro1...
asked by 24.03.2018 / 15:00
1
answer

How to save in a single vector, base classes and derivatives?

I have a C ++ job, and I need to write to a single vector, a base class, and two derivatives. How to make this vector?     
asked by 25.03.2018 / 03:59
2
answers

Put vectors in order. JAVA

I need to put 5 pesos in order from the smallest to the largest. Defining numbers first, for example: int vet [] = {3,4,2,8,7,1}; it runs right, but I need to do it this way: int vet [] = new int [5]; this way he is only taking 3 numbers as show...
asked by 13.08.2017 / 06:43