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 defined('BASEPATH') OR exit('No direct script access allowed'); | |
if ( ! function_exists('timespan')) | |
{ | |
/** | |
* Timespan | |
* | |
* Returns a span of seconds in this format: | |
* 10 days 14 hours 36 minutes 47 seconds | |
* |
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 nFormatter(num, digits) { | |
var si = [ | |
{ value: 1, symbol: "" }, | |
{ value: 1E3, symbol: "k" }, | |
{ value: 1E6, symbol: "M" }, | |
{ value: 1E9, symbol: "G" }, | |
{ value: 1E12, symbol: "T" }, | |
{ value: 1E15, symbol: "P" }, | |
{ value: 1E18, symbol: "E" } | |
]; |
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 nFormatter(num, digits) { | |
var si = [ | |
{ value: 1, symbol: "" }, | |
{ value: 1E3, symbol: "k" }, | |
{ value: 1E6, symbol: "M" }, | |
{ value: 1E9, symbol: "G" }, | |
{ value: 1E12, symbol: "T" }, | |
{ value: 1E15, symbol: "P" }, | |
{ value: 1E18, symbol: "E" } | |
]; |
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
var tree = [ | |
{ "roleName" : "Humans", "roleId" : "role2", "children" : []}, | |
{ "roleName" : "Trees", "roleId" : "role2", "children" : []}, | |
{ "roleName" : "Animals", "roleId" : "role2", "children" : [ | |
{ "roleName" : "Cats", "roleId" : "role11", "children" : []}, | |
{ "roleName" : "Lions", "roleId" : "role11", "children" : []}, | |
{ "roleName" : "Dogs", "roleId" : "role11", "children" : [ | |
{ "roleName" : "Terrier", "roleId" : "role11", "children" : []}, | |
{ "roleName" : "Bulldog", "roleId" : "role11", "children" : []}, | |
{ "roleName" : "Cocker", "roleId" : "role11", "children" : []}, |
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 | |
$start = microtime(true); | |
// Script you want to test here | |
usleep(200000); // sleep 2 seconds | |
$end = microtime(true); | |
$r = round($end - $start,4); | |
echo '<strong>Execution Time</strong>: '.$r.' seconds<br />'; |
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 | |
include '../vendor/autoload.php'; | |
$classLoader = new \Doctrine\Common\ClassLoader('Entities', __DIR__); | |
$classLoader->register(); | |
$classLoader = new \Doctrine\Common\ClassLoader('Proxies', __DIR__); | |
$classLoader->register(); | |
// config | |
$config = new \Doctrine\ORM\Configuration(); |
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
nbproject | |
._* | |
.~lock.* | |
.buildpath | |
.DS_Store | |
.idea | |
.project | |
.settings | |
cache.properties | |
build |
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
nbproject | |
._* | |
.~lock.* | |
.buildpath | |
.DS_Store | |
.idea | |
.project | |
.settings | |
cache.properties | |
build |
NewerOlder