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
select f.constraint_name, f.table_name tabela_filha, p.table_name tabela_pai | |
from user_constraints f, user_constraints p | |
where f.constraint_type = 'R' | |
and f.r_constraint_name = p.constraint_name | |
-- constraint_type (http://docs.oracle.com/cd/B19306_01/server.102/b14237/statviews_1037.htm): | |
-- R -> Referential (FK) | |
-- C -> Check constraint on a table | |
-- P -> Primary Key | |
-- U -> Unique Key |
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
/* By default, required field labels are rendered with the "required" class */ | |
.required:after { | |
content: "*"; | |
} |
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 | |
$lista = array_map('unserialize', array_unique(array_map('serialize', $listaAtual))); |
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
SELECT round(DBMS_LOB.getlength(A.FILE)/1024) KB FROM MY_TABLE A |
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
select o.created,o.last_ddl_time | |
from user_objects o | |
where o.object_name='MY_VIEW' and o.object_type='VIEW'; |
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 | |
$q = Doctrine_Query::create() | |
->select('a.title as title') | |
->from('Article a') | |
->where('a.id = ?', $this->getId()); | |
->fetchOne()->title; |
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
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 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
tr:nth-child(2n+1){ background: #fff } | |
tr:nth-child(2n+0){ background: #ffffec } |
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 TimeoutException extends RuntimeException {} | |
class Timeout | |
{ | |
private $active; | |
public function set($seconds) | |
{ |
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 | |
$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-" |