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
# Script processing web/proxy server log in csv format | |
# @author Marek Aufart, [email protected] | |
#Example request: | |
# "$time_local","$remote_addr","$status","$request_length","$body_bytes_sent","$request_time","$connection","$pipe","$host","$request","$http_referer","$http_user_agent" | |
#0 06/Apr/2011:15:07:30 +0200 | |
#1 147.32.31.193 | |
#2 304 | |
#3 1000 | |
#4 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
####################################### | |
class Bucket | |
attr_accessor :capacity, :state, :finalstate | |
def fill() | |
@state = @capacity | |
self.clone | |
end | |
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
--//tabulka | |
CREATE TABLE `pkg` ( | |
`id` int(11) NOT NULL AUTO_INCREMENT, | |
`nazev` varchar(100) COLLATE utf8_czech_ci NOT NULL, | |
`verze` varchar(100) COLLATE utf8_czech_ci NOT NULL, | |
`stroj` varchar(100) COLLATE utf8_czech_ci NOT NULL, | |
PRIMARY KEY (`id`) | |
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci; | |
INSERT INTO `pkg` (`id`, `nazev`, `verze`, `stroj`) VALUES |
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
$urls = array( | |
'bookmark.png' => array('url'=>'javascript:alert(\'test\',\'test\')','popup'=>'false'), // not enabled yet | |
'digg.png' => array('url'=>'http://digg.com/submit?partner=addthis&url=%url%&title=%title%&bodytext=', 'popup'=>'750x450'), | |
'delicious.png' => array('url'=>'http://www.delicious.com/save?v=5&noui&jump=close&url=%url%&title=%title%', 'popup'=>'550x350'), | |
'email.png' => array('url'=>'mailto:?subject=Mrkněte na %url%', 'popup'=>'false'), | |
'facebook.png' => array('url'=>'http://www.facebook.com/sharer.php?u=%url%', 'popup'=>'500x350'), | |
'linkedin.png' => array('url'=>'http://www.linkedin.com/shareArticle?mini=true&url=%url%&title=%url%&ro=false&summary=&source=', 'popup'=>'500x350'), | |
'posterous.png' => array('url'=>'http://posterous.com/share?linkto=%url%', 'popup'=>'900x600'), | |
'print.png' => array('url'=>'javascript:window.print();', 'popup'=>'false'), | |
'reddit.png' => array('url'=>'http://www.reddit.com/login?dest=%2Fsubmit%3Furl=%url%&title=%url%', 'popup'=>'700x500'), |
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
<html> | |
<head> | |
<meta charset="utf-8"> | |
<title>F2P kyvadlo</title> | |
<script language="javascript" type="text/javascript" src="f2pkyvadlo/jquery.min.js"></script> | |
<script language="javascript" type="text/javascript" src="f2pkyvadlo/jquery.jqplot.min.js"></script> | |
<link rel="stylesheet" type="text/css" href="f2pkyvadlo/jquery.jqplot.css" /> | |
<script type="text/javascript"> | |
$(document).ready(function(){ |
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
//-------galerie-zobrazeni cesty----- | |
if (window.location.pathname.match(/galerie\/(.+)/)) { | |
var cesta = window.location.pathname.split("galerie/",2); | |
var kroky = cesta[1].split('/'); | |
var cesta_url = '/galerie'; | |
var t = '<a href="'+cesta_url+'">Galerie</a>'; | |
for(var i in kroky) { | |
if (kroky[i] != "") { | |
cesta_url += '/'+kroky[i]; | |
if (i == (kroky.length-2)) |
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
class Game | |
constructor: -> | |
@points = [] | |
list_points: -> | |
sousedi += " "+p[i].x+","+p[i].y for p in @points | |
alert(sousedi) | |
class Point | |
constructor: (x, y, game) -> | |
@x = x |
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 osekej($retezec, $delka) { | |
//vypise jenom zadany pocet znaku (od zacatku) | |
if (strlen($retezec) > $delka) | |
$konec = ".."; | |
else | |
$konec = ""; | |
return mb_substr($retezec, 0, $delka, 'UTF-8') . $konec; | |
} |
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
#shell | |
export DYLD_LIBRARY_PATH=/usr/local/mysql/lib/ | |
rails new NAZEV -d mysql -T #mysql a bez testu | |
#jinde | |
/usr/local/rvm/gems/ruby-1.9.2-p290/bin/bundle install | |
#rvm (c compiler not found) mac osx lion |
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 | |
/* | |
* Sifrovani posunem pismen | |
* [email protected] | |
*/ | |
//error_reporting(E_ALL); | |
$znaky = array('A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', | |
'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', |
OlderNewer