This file contains hidden or 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
| /* | |
| * Copyright (c) 2013 Calvin Rien | |
| * | |
| * Based on the JSON parser by Patrick van Bergen | |
| * http://techblog.procurios.nl/k/618/news/view/14605/14863/How-do-I-write-my-own-parser-for-JSON.html | |
| * | |
| * Simplified it so that it doesn't throw exceptions | |
| * and can be used in Unity iPhone with maximum code stripping. | |
| * | |
| * Permission is hereby granted, free of charge, to any person obtaining |
This file contains hidden or 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 | |
| $qs = Doctrine_Query::create() | |
| ->from('MyTable1 m') | |
| ->leftJoin('m.MyTable2 p'); | |
| $res = $qs->execute(); | |
| $qs->free(); |
This file contains hidden or 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 | |
| $str = '13++56-461.79/27--14-abc'; | |
| $filter = filter_var($str,FILTER_SANITIZE_NUMBER_INT); | |
| $onlyDigitsFilterVar = str_replace(array('+', '-'), '', $filter); | |
| $onlyDigitsRegexp1 = preg_replace('/[^\d]/', '', $str); | |
| $onlyDigitsRegexp2 = preg_replace('/[^[:digit:]]/', '', $str); // http://www.php.net/manual/en/regexp.reference.character-classes.php | |
| var_dump($filter); // string(19) "13++56-4617927--14-" |
This file contains hidden or 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 | |
| $q = Doctrine_Query::create() | |
| ->select('a.title as title') | |
| ->from('Article a') | |
| ->where('a.id = ?', $this->getId()); | |
| ->fetchOne()->title; |
This file contains hidden or 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
| $ curl -u user:pass -d status='Hello from shell' http://twitter.com/statuses/update.xml |
This file contains hidden or 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
| /* By default, required field labels are rendered with the "required" class */ | |
| .required:after { | |
| content: "*"; | |
| } |
This file contains hidden or 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 | |
| $lista = array_map('unserialize', array_unique(array_map('serialize', $listaAtual))); |
This file contains hidden or 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
| NLS_LANG <lang> - character set, language and territory | |
| TNS_ADMIN <path> - path to tnsnames.ora file | |
| PATH <path> - add location of the Oracle client |
This file contains hidden or 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
| $ curl --data-binary @README.md -H 'Content-Type:text/plain' https://api.github.com/markdown/raw |
This file contains hidden or 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
| acme_generate_image_service: | |
| class: Acme\Component\GenerateImageConsumer | |
| arguments: | |
| - @logger |