Posts by Carlos André Ferrari • 720 points
8 posts
-
0
votes1
answer420
viewsA: In ZF2 how to set a value in a Zend Form Element Text in the view?
You must set this value in the controller: $form->setData(['valor' => 'meu valor']); And despite being a gambiarra, you can use this code above before the $form->prepare in the view. If you…
-
1
votes1
answer353
viewsA: How to execute a command via proc_open and not wait for the execution to finish?
Hello, I had a similar problem and I solved using a system of Queue and putting the script to run asynchronously. Take a look at the Gearman and see how simple it is to use:…
phpanswered Carlos André Ferrari 720 -
1
votes3
answers1664
viewsA: How to use a Cookie as an Array in Javascript?
Use the methods Join and split: var Foo = [1,2]; var cookieData = Foo.join(','); Foo = cookieData.split(',');…
-
9
votes3
answers12960
viewsA: What is the difference between double quotes and single quotes in Javascript?
There is no difference. The only advantage of using double quotes is that you can put single quotes inside the string or the opposite: var str = "Lorem 'ipsum' dolor"; var str = 'Lorem "ipsum"…
javascriptanswered Carlos André Ferrari 720 -
34
votes5
answers7848
viewsA: What is the difference of string vs string?
In the c# there is no difference, because, string is just a shortcut to System.String. See the full list of aliases: object: System.Object string: System.String bool: System.Boolean byte:…
-
1
votes2
answers147
viewsA: Can I disable SPDY in a Google App Engine HTTPS request?
In the Chrome you will have to do via command line: chrome.exe --use-spdy=off In the firefox, you can go on the settings screen by accessing about:config and adjust the configuration…
google-app-engineanswered Carlos André Ferrari 720 -
7
votes10
answers29077
viewsA: Scroll through an Array and check if any element is empty
The simplest solution to your problem is: $valido = (false === array_search(false , $instArray, false)); Example: http://phpfiddle.org/main/code/wuy-79m…
-
1
votes1
answer1008
viewsA: Split a table to optimize your page space
Use the array_chunk with foreach: $tabelas = array_chunk($quebra, 20, true) // 20 = numero de linhas por tabela. foreach ($tabelas as $tabela) { $dadosweb .= "<table>"; foreach ($tabela as…