Questions tagged as 'array'

3
answers

Function that returns the position of the smallest number in a vector

Simple ... I need to know the position of a value (the smallest value) within a vector, to find out the smallest value I'm using Math.min() but to print the result I need to know in which position the value is in the vector. It could be...
asked by 10.11.2016 / 19:08
1
answer

How to remove the first value inside an array?

I have the following array: array(3) { [0]=> string(22) "VALOR 1" [1]=> string(10) "VALOR 2" [2]=> string(14) "VALOR 3" } I need to show all values of this array but delete the first, which in this case is "VALUE 1". Ho...
asked by 22.03.2017 / 16:08
1
answer

I always want to delete the first index with each click of a button. How do I do?

Given what I've tried: <html> <body> <script> var nome = ['1', '2', '3', '4', '5', '6', '7', '8', '9']; var remover = nome.slice(0); function shuffle(array) { return (Math.round(Math.random()) - 1);...
asked by 18.03.2017 / 16:50
2
answers

Vector make a mysql query

Hello, I'm trying to make a query using vector, but as far as I've learned the sql command does not hold the vector of the form I'm doing so my result is empty. $idcliente=$_SESSION['id_cliente']; $loja=$_POST['loja']; $quant[0]=$_POST['quant'...
asked by 16.06.2016 / 15:04
1
answer

Go through array and find a character other than a number

The idea is to receive a 4-digit number and then perform a variety of accounts but there is an entry condition: If in the middle of the 4 digits is a character other than a number then I need to print it. No use of methods. I can not make...
asked by 20.11.2016 / 22:31
2
answers

Display report separated by date groups

I want to display a report separating results into date groups as shown below | REF. | NOME | DEBITO | ===================================== | X741852 | MARIA | 2.500 | | B890656 | EDUARDA | 500 | | | Data: 2...
asked by 13.01.2016 / 14:38
1
answer

mounting an array with php to p phpmailer

I'm trying to mount an array with the list of email addresses for phpmailer to send. But I'm having problems. No error is displayed, php simply does not send the emails. I am mounting the array like this: // Define os destinatário(s...
asked by 21.07.2016 / 21:01
1
answer

List returns only the last element

Hey guys, after a lot of work I got several xml tags to play in an Excel report. But when I populate the list with my object and step into the report only the last element is listed. I already made some System.out.println to show the elem...
asked by 06.05.2015 / 16:09
2
answers

How to do an ordered listing by letter?

I suppose I have a list of names in array in Javascript. But I'm looking for a suggestion box style, where you just press an alphabetic key inside the field and as soon as you get key word tips for the letter you typed in. Here is a simple...
asked by 30.03.2016 / 19:50
2
answers

PHP / Codeigniter - How to convert image to byte array? [closed]

I want to leave here registered my solution to this problem. $data = file_get_contents("/ImagePath/Image.jpg"); $array = array(); foreach(str_split($data) as $char){ array_push($array, ord($char)); }     
asked by 24.06.2015 / 16:35