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
| switch (expression) | |
| { | |
| case label1: | |
| statements1 | |
| break; | |
| case label2: | |
| statements2 | |
| break; | |
| default: | |
| statements_def |
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
| public function colorAverage($rect) | |
| { | |
| //$rect = array(x, y, w, h); | |
| $im = @imagecreatetruecolor($rect[2], $rect[3]); | |
| if (!$im) { return false; } | |
| imagecopy($im, $this->info, 0, 0, $rect[0], $rect[1], $rect[2], $rect[3]); | |
| $imgW = $rect[2]; | |
| $imgH = $rect[3]; |
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
| function isset () { | |
| // http://kevin.vanzonneveld.net | |
| // + original by: Kevin van Zonneveld (http://kevin.vanzonneveld.net) | |
| // + improved by: FremyCompany | |
| // + improved by: Onno Marsman | |
| // + improved by: Rafał Kukawski | |
| // * example 1: isset( undefined, true); | |
| // * returns 1: false | |
| // * example 2: isset( 'Kevin van Zonneveld' ); | |
| // * returns 2: true |
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
| function valida_cpf($cpf) {if (empty($cpf)) {return false; } $cpf = preg_replace("/[^0-9]/", "", $cpf); for ($i = 0; $i <= 9; $i++) {if (str_repeat($i, 11) == $cpf) {return false; } } for ($t = 9; $t < 11; $t++) {for ($d = 0, $c = 0; $c < $t; $c++) {$d += $cpf{$c} * (($t + 1) - $c); } $d = ((10 * $d) % 11) % 10; if ($cpf{$c} != $d) {return false; } } return true; } |
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
| function formataCEP($cep) | |
| { | |
| $valor = str_replace(array('.','-',','),'',trim($cep)); | |
| $tam = strlen($valor); | |
| if($tam == 8) | |
| { | |
| $p1 = substr($valor,0,5); | |
| $p2 = substr($valor,5,3); | |
| $resultado = $p1."-".$p2; | |
| } |
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
| SetEnvIf Host .*local.yetanothersite.* VAR_LOCAL_SITE | |
| SetEnvIf Host .*yetanothersitehomolog.com.br.* VAR_HOMOLOG_SITE | |
| SetEnvIf Host .*www.yetanothersite.com.br.* VAR_PROD_SITE | |
| Order Deny,Allow | |
| AuthUserFile /var/../.htpasswd | |
| AuthName "Authorized personnel only." | |
| AuthType Basic | |
| Require valid-user | |
| Allow from env=VAR_LOCAL_SITE |
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
| <!-- <iframe width="500" height="306" src="//www.youtube.com/embed/xpto?rel=0" frameborder="0" allowfullscreen></iframe> --> | |
| <div id="player"></div> | |
| <script>var ytVideoId = "xpto";</script>'; | |
| <script type="text/javascript"> | |
| var player; | |
| var timer1 = null; | |
| var video_length = 0; | |
| var video_percent_curr = 0; | |
| var video_percent_last = 0; |
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
| $log = $this->Model->getDataSource()->getLog(false, false); | |
| debug($log); |
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
| <VirtualHost 127.0.0.1> | |
| ServerAdmin webmaster@www.cake3.local.com.br | |
| DocumentRoot "C:/um/xampp/projetos/git/job0003_cakephp3" | |
| ServerName www.cake3.local.com.br | |
| ErrorLog "logs/www.cake3.local.com.br-error.log" | |
| CustomLog "logs/www.cake3.local.com.br-access.log" common | |
| <Directory "C:/um/xampp/projetos/git/job0003_cakephp3"> | |
| Options FollowSymLinks Indexes | |
| AllowOverride All | |
| Order deny,allow |
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
| - Ignores. | |
| .(rar$|gz$|zip$|exe$|pdf$|log$) | |
| - Text files. | |
| .(php$|ctp$|mustache$|js$|css$|scss$|htm$|html$|less$|md$|txt$|yml$|map$|htaccess$|rb$|) | |
| - No extension files. | |
| (LICENSE|COPYING|empty) | |
| - Languages files. |