Welcome! This page is using CodeRay 1.1.2.

We currently have 3054 rays in the database.
You can add a New Ray or browse the posted rays by pages.

Page 57, 10 entries

test 4 lines of Ruby 84 Bytes Show Edit Expand
1
2
3
4

  def test_obstaja_ena_instanca
    assert_equal @igra, TopovskiNapad.instance
  end
a 11 lines of JSON 176 Bytes Show Edit Expand
1
2
3
4
5
6
7
8
9
10
11
{
  iss: "myKronoz Auth 1.0",
  sub: 4564356,
  name: 'John Doe',
  role: 'user',
  exp: 1458902744,
  context: {
    lang: "en_UK",
    tz: "Pacific/Pago_Pago"
  }
}
html 11 lines of HTML by Jack He 489 Bytes Show Edit Expand
1
2
3
<button id="alert-content" class="btn btn-primary" type="button">自定义内容的alert</button>
<button id="alert-title-content" class="btn btn-primary" type="button">自定义标题和内容的alert</button>
<button id="co...
şdasdasdasd 13 lines of Ruby 214 Bytes Show Edit Expand
1
2
3
4
5
6
7
8
9
10
11
class TopovskiNapad

  SVETLOBNA_HITROST = 299792458

  attr_accessor :stevilo_strelov
  attr_accessor :razdalja_do_tarce
  attr_accessor :hitrost
  attr_accessor :kot

  def initialize
    ...
test 3 lines of Ruby 43 Bytes Show Edit Expand
1
2
3
  def reset
    @stevilo_strelov = 0
  end
test 5 lines of Ruby 112 Bytes Show Edit Expand
1
2
3
4
5
  def test_reset
    @igra.stevilo_strelov = 12
    @igra.reset
    assert_equal @igra.stevilo_strelov, 0
  end
test 4 lines of Ruby 90 Bytes Show Edit Expand
1
2
3
4
  def strel
    razdalja_strela = izracun_razdalje_strela
    @stevilo_strelov += 1
  end
test 7 lines of Ruby 174 Bytes Show Edit Expand
1
2
3
4
5
6
7
  def test_izvedba_strela
    zacetek = @igra.stevilo_strelov
    @igra.hitrost = 1
    @igra.kot = 1
    @igra.strel
    assert_equal @igra.stevilo_strelov, zacetek+1
  end
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...

Page 57, 10 entries