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
znak kl.zkratka Alt+# HTML kód název | |
" ---------- Alt+34 " uvozovka/quote | |
# Ctrl+Alt+X Alt+35 mřížka/hash/sharp | |
$ Ctrl+Alt+ů Alt+36 dollar | |
& Ctrl+Alt+C Alt+38 & ampersand | |
' ---------- Alt+39 ' apostrof | |
* Ctrl+Alt+- Alt+42 hvězdička/asterisk | |
/ ---------- Alt+47 / lomítko/slash | |
: ---------- Alt+58 dvojtečka/colon |
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
// stripslashes | |
String.prototype.stripslashes = function(){ | |
return this.replace(/<.*?>/g, ''); | |
}; | |
String.prototype.htmlspecialchars = function(){ | |
var str = this.replace(/&/g, '&'); | |
str = str.replace(/</g, '<'); | |
str = str.replace(/>/g, '>'); | |
str = str.replace(/"/g, '"'); | |
return str; |
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
<? | |
class zipuj_helper | |
{ | |
protected $jmeno_zipu; | |
protected $root; | |
protected $zip; | |
public function __construct($root = ".", $jmeno_zipu = "zip.zip") | |
{ | |
$this->root = $root; | |
$this->jmeno_zipu = $jmeno_zipu; |
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
<? | |
$extract_dir = "./sprites/"; | |
$extract_file = "sprites.zip"; | |
$zip = new ZipArchive; | |
$res = $zip->open($extract_file); | |
if ($res === TRUE) { | |
$zip->extractTo($extract_dir); | |
$zip->close(); | |
echo "OK"; | |
} else { |
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
<? | |
function HumanReadableFilesize($size) { | |
// Adapted from: http://www.php.net/manual/en/function.filesize.php | |
$mod = 1024; | |
$units = explode(' ','B KB MB GB TB PB'); | |
for ($i = 0; $size > $mod; $i++) { | |
$size /= $mod; | |
} | |
return round($size, 2) . ' ' . $units[$i]; |
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
<? | |
$out = ''; | |
$fields = dibi::fetchAll("SHOW COLUMNS FROM web_application"); | |
foreach ($fields as $field) | |
{ | |
$out .= '"'.$field->Field.'";'; | |
} | |
$out = rtrim($out, ';'); | |
$out .= PHP_EOL; | |
foreach ($this->model->csvExport() as $index => $row) |
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
1/ | |
(function($){ | |
$.extend({ | |
jYoutube: function( url, size ){ | |
if(url === null){ return ""; } | |
size = (size === null) ? "big" : size; | |
var vid; | |
var results; | |
results = url.match("[\\?&]v=([^&#]*)"); | |
vid = ( results === null ) ? url : results[1]; |
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
<input onkeypress="return !isNaN(String.fromCharCode(event.charCode || event.keyCode))"> |
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
(function($) { | |
$.fn.extend({ | |
check : function() { | |
return this.filter(":radio, :checkbox").attr("checked", true); | |
}, | |
uncheck : function() { | |
return this.filter(":radio, :checkbox").removeAttr("checked"); | |
} | |
}); | |
}(jQuery)); |
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 | |
function dateRange( $first, $last, $step = '+1 day', $format = 'Y/m/d' ) { | |
$dates = array(); | |
$current = strtotime( $first ); | |
$last = strtotime( $last ); | |
while( $current <= $last ) { |
OlderNewer