Questions tagged as 'array'

1
answer

foreach running within 10 minutes

I have a foreach that has more than 4 thousand elements ... Is there any way to do this foreach and it loop 500 elements every 2 minutes ??     
asked by 03.02.2016 / 14:02
2
answers

How to find out the size of an array of characters?

#include <iostream> #include <string> #include <locale.h> #include <stdio.h> using std::cout; using std::cin; using std::endl; using std::string; int main(){ setlocale(LC_ALL,"Portuguese"); int n =0; cout...
asked by 20.02.2016 / 03:40
1
answer

find word within strings array

I'm using the following code: foreach ($lista_grupos as $key => $value) { if(strpos($lista_grupos[$key],'Tecnologia_da_Informacao')===true){ $admin = true; }else{ $admin = false; } } But it always returns fals...
asked by 10.11.2015 / 01:21
1
answer

Foreach remove duplicate images

I have code below that pulls the images of the products of the magento shopping cart, however it is displaying duplicate, ie when it lists the images it displays twice the same image. <?php $items = Mage::getSingleton('checkout/session...
asked by 10.11.2015 / 19:02
1
answer

Return CSS file classes using Regex and PHP

I have the following CSS: .icon-a{ background:black; color:white; } .icon-b{ backgroundwhite; color:black; } .icon-c{ background:blue; color:yellow; } I wanted a PHP script that could read the CSS file and re...
asked by 09.11.2015 / 14:58
1
answer

Dynamic Vector + Dynamic Allocation [closed]

Good afternoon, I would like to know how to create a dynamic vector in C to store the following information: Machine Status (On, Off, Broken) | state_time_status to display on screen, as if it were a table. Ex: linked | 120.000000 sec   ...
asked by 09.12.2015 / 20:21
1
answer

Read a vector up to a stop bit

I want to read an 8-bit binary vector backwards, and stop until I read the last 1 . For example: [00010101]
asked by 19.09.2015 / 14:49
1
answer

Same numbers in the key-value pair of an array, however random

Assuming I have an array like this: array(10, 11, 12, 13, 14, 15) I'm trying to make a way to get an array with the key-value pairs, but randomly without the pairs being equal. For example: Valid array( 10 => 14, 11 =&...
asked by 30.10.2015 / 22:13
1
answer

Mounting an Array CAKEPHP

Well, I need some help to set up an array of bad here. I got a ready calendar (bootstrap calendar) and am trying to implement it on my site with Cakephp. All right with the layout but at the time of searching the information in the database he e...
asked by 23.09.2015 / 18:35
1
answer

How to transform an array of char into UTF-8?

For example, I have a char cadeia[300]; . I put characters in it, now I want to turn it into UTF-8.     
asked by 30.08.2015 / 00:59