Questions tagged as 'array'

4
answers

C #: How to identify the first digit of each number in a vector to count how many numbers start the same?

Good day. I have this problem, I guess it's simple but I have not been able to solve it and I have one day in that, I have a program that accepts 10 numbers and enters them in a vector, but I need to know how many of these 10 start with th...
asked by 20.03.2018 / 01:00
3
answers

Difference between two php arrays?

I have two arrays: A1 and B1 . How do I compare them and find those records in the first array that have some difference from the second? $a1 = Array ( "0" => Array ( "Empresa" => "HHH", "P...
asked by 29.01.2016 / 21:12
1
answer

Know if a word is found in a string in php

I have the following code: $msg = 'Hola :1: quetal??, :2:'; $emoticones = array(':1:',':2:',':3:'); $cntidademoticon = explode(' ', $msg); foreach ($cntidademoticon as $string) { echo '<br>'.$string.'<br>'; } What I am looki...
asked by 19.08.2018 / 02:46
2
answers

Help with PHP array

I have an array with numbers and I have to check if they are ordered from lowest to highest. In case they are well ordered, show that they are ordered or not if they are not. The fact is that I have it almost but I get the following warning: No...
asked by 28.10.2018 / 18:17
3
answers

How to remove specific element from an array of objects? Javascript [duplicated]

Good headers, I have a problem, I hope you can guide me, in what way could you eliminate a specific element of an arrangement of objects like the following? array = [ {nom: "NOMBRE 1", tipo: "TIPO A"}, {nom: "NOMBRE 2", tipo: "TIPO B"}, {nom...
asked by 19.12.2017 / 13:33
3
answers

How to clone an Array in a new one?

I need to pass information from array to another, in short, I want to copy the values of arrayPrimero to arraySegundo , but that the values can be changed without modifying the other, and I do not know how to do, I get error....
asked by 09.11.2016 / 16:45
2
answers

C # - How to convert keyboard string data to Char?

Good community! I am new to the C # Language and I am doing a program where 3 phenotypes are created (ie 3 vectors, each size 4) where 2 are father and mother, of these 2 the child has to be generated (the 3rd vector) , the user will have to...
asked by 28.04.2017 / 03:41
2
answers

Declare arrangement of 0 = N = 2000000

The program crashed I need to declare an array of 2000000 elements, how do you declare it? Problem Write a program that given the list of N numbers determine in what position the element a0 (the first one on the list) remains after it...
asked by 23.05.2017 / 02:47
2
answers

Is it possible to initialize an array of x length assigning values in C ++?

I would like to know if it is possible to initialize an array by assigning values. Is the only way iterating with a for ? Something that is very easy in Javascript is to declare a variable assigning values, and also has the advantage...
asked by 28.05.2017 / 23:21
1
answer

Walk through the bootstrap table with jQuery text and value HTML5

I have a problem with jQuery . I'm going through a table of bootstrap with certain values, I need the values to be saved in an array, at this moment I'm going through the values separately, I do not know how I can go through all the values a...
asked by 03.05.2018 / 20:45