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
;the easy way - pomoci co-dolist ktere obsahuje funkci barrier | |
(defvar c1 (make-array '(3 3) :initial-contents '((1 0 0) | |
(0 1 0) | |
(0 0 1)))) | |
(defvar c2 (make-array '(3 3) :initial-contents '((2 0 0) | |
(0 1 0) | |
(0 0 1)))) | |
(defvar c3 (make-array '(3 3) :initial-contents '((3 0 0) | |
(0 1 0) | |
(0 0 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
xydata := [[0,0],[1,9],[4,3],[6,10],[8,5],[9,3]]: | |
splajn := Spline(xydata, v): | |
polyn := PolynomialInterpolation(xydata, v): | |
Psplajn := plot(splajn, v=0..9, color=blue): | |
Ppolyn := plot(polyn, v=0..9): | |
Pxydata := pointplot(xydata): | |
plots[display]([Psplajn, Ppolyn, Pxydata], axes=framed); | |
bsplajn := BSplineCurve(xydata, v): | |
Pbsplajn := plot(bsplajn, v=0..9, color=cyan): | |
plots[display]([Psplajn, Ppolyn, Pbsplajn, Pxydata], axes=framed); |
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
%% X je manzelem Y | |
manzel(denis, rachel). | |
manzel(jan, petra). | |
manzel(libor, sona). | |
manzel(lukas, jana). | |
manzel(ota, bozena). | |
manzel(petr, lenka). | |
manzel(venceslav, hilda). | |
%% X je matkou Y |
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). |
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
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
--- | |
: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
#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
$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
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 |