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
-(BOOL)textField:(UITextField *)textField shouldChangeCharactersInRange:(NSRange)range replacementString:(NSString *)string | |
{ | |
if (textField == self.amountInput) { | |
if (string.length == 0) { | |
return YES; // backspace | |
} | |
NSNumberFormatter* numberFormatter = [[NSNumberFormatter alloc] init]; | |
[numberFormatter setFormatterBehavior: NSNumberFormatterBehavior10_4]; | |
[numberFormatter setNumberStyle: NSNumberFormatterDecimalStyle]; |
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 | |
$array = array_filter(array('yx', 'y', 'z')); | |
$exists = count(array_filter($array, function($item) { | |
return substr($item, 0, 1) === 'x'; | |
})) > 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 | |
$keys = array( | |
'scheme', | |
'user', | |
'pass', | |
'host', | |
'port', | |
'path', | |
'query', |
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 | |
function mb_str_split($string,$string_length=1) { | |
if(mb_strlen($string) > $string_length || !$string_length) { | |
do { | |
$c = mb_strlen($string); | |
$parts[] = mb_substr($string,0,$string_length); | |
$string = mb_substr($string,$string_length); | |
}while(!empty($string)); | |
} else { |
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
export PS1="\u:\W $ " | |
#GIT bash by HABR (modified by Dundee) | |
export PSORIG="$PS1" | |
function GITBRANCH() { | |
BRANCH="$(git branch 2>/dev/null | grep '*' | cut -d" " -f2-)" | |
if [ -n "$BRANCH" ] ; then | |
export PS1="\u:\W " | |
export PS1=$PS1$(echo -en "\[\033[00;37m\]$BRANCH \[\033[00m\]") |
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
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC1HU7tOnkxGkEG417gQUGBpIudcaRHRNIymYwRLaYdjYLmgC5ds0aMO1i71Qh/p/AT9877DaDmXZKHQgesypc9Zjcrlz4mTA4WI8oMu14yXU8uoMJg4IJ7VM4ig5ywADUf452y/HDdxRh1XEpAp8tbCGtFYJIUj6KV7sCRl/yTIwzEr29bSQKOh8qJrY2NcCZmwEyP2p8SqZsGQBmZWdWzeVvtxDZRZWOjcUixLvJAsPAIAWL3Bgjonb/TKj+YyIOfjbEZ+ZXceucgjvTnqEaCxeCx/OgKM+bjPjNYwjjxtBRqmHzrZcE7LeLUFCSC9z8dj6SW5MGNcGN4zlQIZr+N [email protected] |
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
package fm; | |
import org.openqa.selenium.WebElement; | |
import org.openqa.selenium.By; | |
import org.openqa.selenium.WebDriver; | |
import static org.junit.Assert.*; | |
public class HomepageTest { | |
@Test |
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
curvyCorners({ | |
tl: { radius: 5 }, | |
tr: { radius: 5 }, | |
bl: { radius: 5 }, | |
br: { radius: 5 }, | |
antiAlias: true | |
}, '.box,.items,#footer .up,.grey-box,#navigation ul'); | |
curvyCorners({ | |
tl: { radius: 20 }, |
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 Proj; | |
use Nette\Debug, | |
Nette\Environment, | |
PDO, | |
NotORM, | |
NotOrmPanel, | |
NotORM_Structure_Convention; |
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 Tools; | |
use Nette\Debug; | |
use Nette\Environment; | |
use Nette\Finder; | |
/** | |
* Shows exceptions thrown in CLI mode in browser. |