Antes de abrir um novo tópico verifique se já não existe um outro tópico aberto com o mesmo assunto/dúvida. Verifique antes também possíveis soluções para as suas dúvidas no Google.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import sublime, sublime_plugin | |
BLOCKLEN = 1 | |
class TypeFileOutCommand(sublime_plugin.TextCommand): | |
def nextchar(self): | |
if self.body: | |
totype = [] | |
while 1: | |
try: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Person { | |
public $name; | |
public $job; | |
public $year; | |
} | |
$person = new Person; | |
$person->name = 'Alexandre'; | |
$person->job = 'Batedor de código fonte'; | |
$person->year = new DateTime('2013'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class FluentCache extends \ArrayObject | |
{ | |
private $cache; | |
public function __construct(\Doctrine\Common\Cache\Cache $cache, array $data = array()) | |
{ | |
$this->cache = $cache; | |
parent::__construct($data, static::ARRAY_AS_PROPS); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
use FooBar\Test\Mock; | |
// In the sample below, $mock expects the method "sayHelloTo" to be called one time | |
// with the parameter $name equals "Alexandre" and return "Hello Alexandre" | |
$mock = (new Mock('NamespaceVendor\\ClassName'))([ | |
'sayHelloTo' => function($name="Alexandre") { | |
return "Hello Alexandre"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
x=0; | |
repositories=( | |
"Cli" | |
"Config" | |
"Data" | |
"ed" | |
"Foundation" | |
"Framework" | |
"Http" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
BIND=127.0.0.1:9000 | |
USER=www-data | |
PHP_FCGI_CHILDREN=1 | |
PHP_FCGI_MAX_REQUESTS=1000 | |
PHP_CGI=/usr/bin/php-cgi | |
PHP_CGI_NAME=`basename $PHP_CGI` | |
PHP_CGI_ARGS="- USER=$USER PATH=/usr/bin PHP_FCGI_CHILDREN=$PHP_FCGI_CHILDREN PHP_FCGI_MAX_REQUESTS=$PHP_FCGI_MAX_REQUESTS $PHP_CGI -b $BIND" | |
RETVAL=0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$teste = array( | |
array("foo" => "a", "bar" => "b", "timestamp" => 123456), | |
array("foo" => "a", "bar" => "b", "timestamp" => 987654), | |
array("foo" => "a", "bar" => "b", "timestamp" => 654789), | |
array("foo" => "a", "bar" => "b", "timestamp" => 456123) | |
); | |
function sortTimestamp($a, $b) { |