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
std::vector<std::string> explode(std::string str, char delim = ' ') { | |
std::vector<std::string> result; | |
std::stringstream stream(str); | |
std::string buffer = ""; | |
while (std::getline(stream, buffer, delim)) { | |
result.push_back(buffer); | |
} | |
return result; | |
} |
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 | |
class Timer { | |
public static $time = array(); | |
public static $last; | |
public static function start($name = NULL) { | |
static $i = 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
/** | |
* @param string | |
* @param string | |
* @return bool | |
*/ | |
function issCheck($dir, $out) { | |
if (!file_exists($out)) { | |
return TRUE; | |
} | |
$time = filemtime($out); |
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
@gradient-x($left, $right: $left) { | |
background-image: -o-linear-gradient(left,$left,$right); | |
background-image: -ms-linear-gradient(left,$left,$right); | |
background-image: -moz-linear-gradient(left,$left,$right); | |
background-image: -webkit-gradient(linear,left top,right top,color-stop(0,$left),color-stop(1,$right)); | |
$ie: 'progid:DXImageTransform.Microsoft.gradient(startColorStr=' . iergba($left) . ',EndColorStr=' . iergba($right) . ',GradientType=1)'; | |
%filter: $ie; | |
-ms-filter: $ie; | |
} |
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 | |
class Timer { | |
public static $time = array(); | |
public static $last; | |
public static function start($name = NULL) { | |
static $i = 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
<?php | |
use \Nette\Diagnostics\Debugger; | |
/** | |
* Nette\Diagnostics\Debugger::barDump shortcut. | |
* @author Jáchym Toušek | |
* @param mixed $value | |
*/ | |
function bd($value) |
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 | |
namespace App; | |
class UserStorage extends \Nette\Http\UserStorage | |
{ | |
/** Log-out reason */ | |
const IDENTITY_CHANGED = 16; |
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 | |
namespace App; | |
class UserFormFactory extends \Nette\Object | |
{ | |
/**@var \Model\UserRepository */ | |
private $userRepository; |
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
/** | |
* Display error message. | |
*/ | |
Nette.addError = function(elem, message) { | |
var el = $(elem); | |
el.closest('.control-group').addClass('error'); | |
el.closest('.controls').children('.help-inline').remove(); | |
el.closest('.controls').append(' ', $('<p>', { | |
text: message, | |
'class': 'help-inline' |
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 | |
/** | |
* This file is part of the Kdyby (http://www.kdyby.org) | |
* | |
* Copyright (c) 2008 Filip Procházka ([email protected]) | |
* | |
* For the full copyright and license information, please view the file license.txt that was distributed with this source code. | |
*/ |
OlderNewer