Welcome! This page is using CodeRay 1.1.2.
We currently have
3066 rays
in the database.
You can add a
New Ray
or browse the posted rays by pages.
test |
39 lines
of
C
|
782 Bytes |
Show |
Edit |
Expand |
1
2
3
4
5
6
7
8
9
10 |
class TopovskiNapad
SVETLOBNA_HITROST = 299792458
attr_accessor :razdalja_do_tarce
attr_accessor :hitrost
attr_accessor :kot
def initialize
@razdalja_do_tarce = Random.rand(... |
|
test |
6 lines
of
Ruby
|
211 Bytes |
Show |
Edit |
Expand |
1
2
3
4
5 |
def test_izracunana_razdalja
@igra.hitrost = 1
@igra.kot = 1
@igra.razdalja_do_tarce = 1
assert_equal ((1 ** 2 * (Math.sin(2 * 1 * Math::PI / 180) ))/10), @igra.izracun_razdalje... |
|
test |
35 lines
of
Ruby
|
645 Bytes |
Show |
Edit |
Expand |
1
2
3
4
5
6
7
8
9
10 |
class TopovskiNapad
SVETLOBNA_HITROST = 299792458
attr_accessor :razdalja_do_tarce
attr_accessor :hitrost
attr_accessor :kot
def initialize
@razdalja_do_tarce = Random.rand(... |
|
test |
32 lines
of
Ruby
|
891 Bytes |
Show |
Edit |
Expand |
1
2
3
4
5 |
def test_vnos_kota_prebran
@igra.instance_eval do
def preberi_vnos
return "3"
end |
|
test |
23 lines
of
Ruby
|
414 Bytes |
Show |
Edit |
Expand |
1
2
3
4
5
6
7
8
9
10
11 |
class TopovskiNapad
attr_accessor :razdalja_do_tarce
attr_accessor :hitrost
def initialize
@razdalja_do_tarce = Random.rand(10...1000)
end
def vnesi_hitrost
hitrost = ... |
|
test |
31 lines
of
Ruby
|
911 Bytes |
Show |
Edit |
Expand |
1
2
3
4
5 |
def test_vnos_hitrosti_prebran
@igra.instance_eval do
def preberi_vnos
return "22"
end |
|
test |
9 lines
of
Ruby
|
141 Bytes |
Show |
Edit |
Expand |
1
2
3
4
5
6
7
8
9 |
class TopovskiNapad
attr_accessor :razdalja_do_tarce
def initialize
@razdalja_do_tarce = Random.rand(10...1000)
end
end
|
|
test |
9 lines
of
Ruby
|
244 Bytes |
Show |
Edit |
Expand |
1
2
3
4
5
6
7
8 |
def test_nastavi_nakljucno_vrednost_razdalje
refute_empty @igra.razdalja_do_tarce
end
def test_nakljucna_razdalja_je_razlicna
igra2 = TopovskiNapad.new
refute_equal @igra.r... |
|
ini-file |
40 lines
of
Python
|
1.11 KB |
Show |
Edit |
Expand |
|
Woops |
4 lines
of
Clojure
by
the other guy
|
52 Bytes |
Show |
Edit |
Expand |
1
2
3
4 |
(defn bad-adder []
(+ 1)
(+ 2 2)
(+ 3 3 3)) |
|