Welcome! This page is using CodeRay 1.1.2.
We currently have
3055 rays
in the database.
You can add a
New Ray
or browse the posted rays by pages.
test |
3 lines
of
JSON
|
123 Bytes |
Show |
Edit |
Expand |
1
2
3 |
{"data":{"img_thumb":"jpg", "img_main":"jpg", "img_zoom":false, "nextIdx":3, "thumb":1},
"images":[{"id":1}, {"id":2}]]
} |
|
Ruby-chan |
34 lines
of
Ruby
by
Me
|
813 Bytes |
Show |
Edit |
Expand |
1
2
3
4
5
6
7 |
class Array
def merge_sort
return self if self.length <= 1
middle = (self.length / 2).to_i
left = self[0..middle-1].merge_sort
right = self[middle..self.length-1].merge_sor... |
|
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>
... |
|
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 |
@cookies={},
@env=
{"rack.version"=>[1, 2],
"rack.input"=>
"rack.errors"=>
... |
|
puppet iptables |
19 lines
of
Python
|
330 Bytes |
Show |
Edit |
Expand |
1
2
3
4
5
6
7
8
9
10
11
12
13 |
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... |
|