Welcome! This page is using CodeRay 1.1.2.

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

Page 108, 10 entries

Quicksort 24 lines of Ruby by Me 500 Bytes Show Edit Expand
1
2
3
4
5
6
7
8
9
def quicksort(array)
  return array if array.length <= 1

  pivot_index = (array.length / 2).to_i
  pivot_value = array[pivot_index]
  array.delete_at(pivot_index)

  lesser = Array.new
  g...
test 3 lines of C by test 84 Bytes Show Edit Expand
1
2
3
:1:1:
    Syntax error on 'char'
    Perhaps you intended to use -XTemplateHaskell
Tests 11 lines of Ruby by Konrad 187 Bytes Show Edit Expand
1
2
3
4
5
6
7
8
9
10
11
class Person < ActiveRecord::Base
  attr_accessor :name, :age

  def salute?
    puts "Hello #{@name}"
    another_method param: :value
    name
  end
end

puts salute?? :a : :b
mkvmerge example tags XML 37 lines of XML 1.06 KB Show Edit Expand
1
2
3
4
5
6
7
8
9
<?xml version="1.0" encoding="ISO-8859-1"?>

<!DOCTYPE Tags SYSTEM "matroskatags.dtd">

<Tags>
  <Tag>
    <Targets>
      <!-- TrackUIDs and ChapterUIDs can occur more than once. -->
     ...
Simple for loop 1 line of C++ 43 Bytes Show Edit Expand
1
for (unsigned int i = 0; i < size; ++i) { }
RackTest 151 lines of Ruby by Mario Uher <uher.mario@gmail.com> 6.29 KB Show Edit Expand
1
2
3
4
5
6
7
#<ActionController::TestRequest:0x007fdf10b9b3c8
 @cookies={},
 @env=
  {"rack.version"=>[1, 2],
   "rack.input"=>#<StringIO:0x007fdf0cd90420>,
   "rack.errors"=>#<StringIO:0x007fdf11ec0200>,
...
puppet iptables 19 lines of Python 330 Bytes Show Edit Expand
1
2
3
4
5
6
7
8
9
10
11
12
13
# purge iptables rules
resources { "firewall":
  purge => true
}

Firewall {
  before  => Class['fw::post'],
  require => Class['fw::pre'],
}

class { ['fw::pre', 'fw::post']: }

firewa...
SQL 4 lines of SQL 530 Bytes Show Edit Expand
1
2
UPDATE PS_ADM_APPL_PROG SET EFFDT = '01-JAN-06' WHERE EMPLID = '020203649' AND ADM_APPL_NBR = '00013882' AND EFFDT = '03-JAN-06';
UPDATE PS_ADM_APPL_PLAN SET EFFDT = '01-JAN-06' WHERE EMPLID = '02...
test 126 lines of Ruby by michele 3.68 KB Show Edit Expand
1
2
3
4
5
6
7
8
9
10
11

class GuiTest < Gtk::Window

   def initialize
      super
      set_title "Test"
      init_ui
      set_default_size 180, 100
      set_border_width 5
      set_resizable false
      s...
GuitarWar 60 lines of PHP by Thiago 3.35 KB Show Edit Expand
1
2
3
4
<?php //Autenticação de usuário. ATENÇÃO: Não devem haver espaços antes ou depois de declarações 'header()' em PHP.
require_once('autoriza.php');
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 ...

Page 108, 10 entries