Today, in my work, I wrote something like that, in Perl:
my @x = qw( 1 2 3 4 5 );
splice(@x, 10);
and the error occurred:
splice () offset past end of array at ./x line X.
But on my personal laptop, there is no error like that. I...
I'm doing forEach in a array but this loop has an ajax request inside for each repetition and I need to wait until all the ajax are ready to continue ordering the array that is filled with these requests, this It's my code.
var g...
I have an array of objects like the following:
var nicknames = []
nicknames.push( {id:"100", name:"Juan"} , {id:"200", name:"Mateo"} );
How can I get the data of one of the objects in the nicknames array by supplying the name or the...
I found the following code:
char query[255];
sprintf(query, "SELECT NOMBRE, ");
switch (tipo)
{
case TIPO_1:
sprintf(query, "%s ID", query);
break;
case TIPO_2:
sprintf(query, "%s APELLIDO", query);
brea...
Lately I wanted to start thinking more than solutions, to be effective at the time of programming. And that is why I run into the following question, and as the title says:
What is the most efficient way to traverse an array in Java?
And...
I have a query and it is as follows.
My goal is to replace the values of all fruits to increase the price by 5%:
// precios originales
$precios = array (
"frutas" => array (
"manzanas" => 15,
"peras" => 5,
"naranjas" => 3...
I want to do this problem: link
Problem
Given a square matrix of size "n", you must do
that your program turns it 90 degrees to the right.
Original matrix
1 2
3 4
Matrix Rotated 90 ° to the right
3 1
4...
I am learning C and I understand perfectly the pointers and their relation with the arrays, but my problem comes with the character strings. We declare a string of characters like this:
char cadena[] = "Hola";
is equivalent to:
char caden...
In an array the name of the array is a pointer to the array. So in iArray and &iArray[0] you get the same value. What I do not understand very well, is that it is happening when I try to repeat this same with myvector ....