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
"test-.,.§$§)$)165".replace(/\D/g,''); //165 |
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 class FooBarApp extends DroidGap { | |
@Override | |
public void onCreate(Bundle savedInstanceState) { | |
super.onCreate(savedInstanceState); | |
super.setIntegerProperty("splashscreen", R.drawable.splash); | |
this.init(); | |
this.appView.clearCache(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
$func = new ReflectionFunction('myfunction'); | |
$filename = $func->getFileName(); | |
$start_line = $func->getStartLine() - 1; // it's actually - 1, otherwise you wont get the function() block | |
$end_line = $func->getEndLine(); | |
$length = $end_line - $start_line; | |
$source = file($filename); | |
$body = implode("", array_slice($source, $start_line, $length)); | |
print_r($body); |
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 object_to_array($base) { | |
$base = (array) $base; | |
foreach ($base as $key => $value) { | |
if (is_array($value) || is_object($value)) { | |
$base[$key] = object_to_array($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
SELECT | |
CASE | |
WHEN end_date > UNIX_TIMESTAMP() THEN 'run' | |
ELSE 'stop' | |
END AS status | |
FROM | |
foobar |
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
SELECT | |
fb.foo, | |
fb.bar | |
FROM | |
(SELECT @foobar:=0) switchable_var, | |
foobar fb | |
WHERE | |
fb.status = @foobar |