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
#foo | |
%span | |
Hello! |
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
st = gets.chomp | |
w = st.dup | |
correct = true | |
l = st.length | |
i=0 | |
while i<l | |
if w[i..i]=='z' | |
w[i..i]='T' | |
else | |
if (w[i..i] != 'a')and(w[i..i] !='b') |
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
def roundcornr(css_class, resizable=true,&block) | |
haml_tag :table, :class => "#{css_class}_table" do | |
haml_tag :tr do | |
haml_tag :td, :class => "#{css_class}_tl" | |
haml_tag :td, :class => "#{css_class}_t" | |
haml_tag :td, :class => "#{css_class}_tr" | |
end | |
haml_tag :tr do | |
haml_tag :td, :class => "#{css_class}_l" | |
haml_tag :td, :class => "#{css_class}_content" do |
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
def roundcornr_many(table_class, css_classes,&block) | |
haml_tag :table, :class => "#{table_class}_table" do | |
haml_tag :tr do | |
css_classes.map do |css_c| | |
rnd_class, contents_class, spacer_class = css_c | |
haml_tag :td, :class => "#{rnd_class}_tl" | |
haml_tag :td, :class => "#{rnd_class}_t" | |
haml_tag :td, :class => "#{rnd_class}_tr" | |
if spacer_class | |
haml_tag :td, :class => spacer_class |
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
=roundcornr :red_area, false do | |
=image_tag '/images/plate_opaque.png' | |
=image_tag '/images/plate_opaque.png' | |
=roundcornr_many :red_area, [ [ :red_area, :red_area_content, :test_spacer ],[ :red_area, nil, :test_spacer ],[ :red_area ] ] do |i| | |
- case i | |
- when 0 | |
=image_tag '/images/plate_opaque.png' | |
=image_tag '/images/plate_opaque.png' | |
=image_tag '/images/plate_opaque.png' |
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
#!/usr/bin/perl -w | |
use strict; | |
use HTTP::Request::Common; | |
use LWP::UserAgent; | |
use CGI qw(header -no_debug); | |
my $leprastaffurl = 'http://leprastuff.ru/index.php/upl/img'; | |
my $tinyurl = 'http://tinyurl.com/api-create.php'; | |
my $req = POST $leprastaffurl, | |
Content_Type => 'form-data', |
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. Нажатие по ссылке "skip the photo >>". (next) //Страница хона | |
2. Голосование за фото: | |
2.1. при нажатии на радио кнопку из HON (vote) //Страница хона | |
2.2. при нажатии на радио кнопку из фотоальбома (albvote) //Страница фотоальбома | |
3. Переход по ссылке из списка "All photos", или по ссылке на фото в статистике. (direct) | |
=============================================== |
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
return $self->rs("Questions")->search( | |
{ id => { 'NOT IN' => $user->games()->search_related('games_questions')->search_related('questions')->get_column('id')->as_query() } }, | |
{ order_by => \'RANDOM()', | |
rows => 1 | |
} | |
)->single(); |
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
13:58 savonarola@kub:~>telnet localhost 33333 | |
Trying 127.0.0.1... | |
Connected to localhost. | |
Escape character is '^]'. | |
POST /wiki/страница HTTP/1.1 | |
Host: ru.wikipedia.org | |
User-Agent: Mozilla/5.0 (X11; U; Linux i686; ru; rv:1.9b5) Gecko/2008050509 Firefox/3.0b5 | |
Accept: text/html | |
Connection: close | |
Content-Length: 10 |
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
module Main where | |
import Control.Monad | |
data ExprTree = Var Char | Op ExprTree Char ExprTree | |
readExprS :: ReadS ExprTree | |
readExprS ('(':s) = do | |
(l, op:s1 ) <- readExprS s |