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
stack do | |
cool_paras | |
end | |
def cool_paras | |
para "im a cool para" | |
para "and im okay" | |
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
Shoes.app do | |
@variable = "im a string and im okay!" | |
para @variable | |
dialog do | |
para @variable.inspect | |
end | |
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
require "my_script" | |
Shoes.app do | |
button "run my_script" do | |
Thread.new do | |
call_method_in_script | |
end | |
end | |
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
def rozdel(s) | |
vyraz_bez_hlavy = s[(s.index('(')+1)..-2] | |
zavorky = 0 | |
result = [] | |
i = 0 | |
while i < vyraz_bez_hlavy.size do | |
if vyraz_bez_hlavy[i].chr == '(' | |
zavorky += 1 | |
elsif vyraz_bez_hlavy[i].chr == ')' | |
zavorky -= 1 |
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
$LOAD_PATH.unshift(RAILS_ROOT + '/vendor/plugins/cucumber/lib') if File.directory?(RAILS_ROOT + '/vendor/plugins/cucumber/lib') | |
begin | |
require 'cucumber/rake/task' | |
Cucumber::Rake::Task.new(:features) do |t| | |
t.fork = true | |
t.cucumber_opts = ['--format', (ENV['CUCUMBER_FORMAT'] || 'pretty'), '--language', 'cz'] | |
end | |
task :features => 'db:test:prepare' |
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
#simple addition to Integer to help user friendly multithreading. Will execute block in separate threads selftimes. will not wait for each thread to finish, possible update on that. | |
#example: | |
# 3.co_times do |i| | |
# puts "i" | |
# end | |
##=> 0 2 1 | |
# 5.co_times do | |
# something | |
# 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
--- | |
:index: 15 | |
:history: | |
- - - :remove | |
- h1 | |
- 1 | |
- - :place | |
- h2 | |
- 1 | |
- - :remove |
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
delta(q0,a,q1). delta(q0,a,q3). delta(q1,b,q0). | |
delta(q1,c,q1). delta(q2,a,q0). delta(q2,a,q1). | |
delta(q2,c,q3). delta(q3,b,q3). delta(q3,c,q2). | |
%% koncove stavy | |
final(q1). final(q2). | |
%% definice vypoctu KNA | |
comp(Q,nil,Q). |
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
9. | |
1 ?- depends(icewm, Package). | |
2 ?- depends(icewm, Package), package(Package, _, Section). | |
4 ?- provides(Package, editor). | |
10. | |
5 ?- depends(Package, base_passwd), package(Package, optional, _). | |
8 ?- provides(Package, www_browser), package(Package, _, editors). | |
6 ?- conflicts(Package, ConflictingPackage), package(ConflictingPackage, optional, _), depends(ConflictingPackage, perl). | |
11. | |
webtool(Package) :- package(Package, _, web). |
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
%% udelat 6, 7, 8, 12 | |
%% http://vychodil.inf.upol.cz/courses/cs2pp/practice1.html | |
%% databaze zakladnich faktu o nekterych kocicich plemenech | |
%% udaje: jmeno, velikost, povaha, hlucnost, srst */ | |
kocka(devon_rex, mala, klidna, ticha, hrubosrsta). | |
kocka(kartouzska, velka, aktivni, ticha, kratkosrsta). | |
kocka(korat, mala, aktivni, ticha, kratkosrsta). | |
kocka(mau, mala, aktivni, ticha, kratkosrsta). | |
kocka(perska, mala, klidna, ticha, dlouhosrsta). |