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 |
4 lines
of
Ruby
|
73 Bytes |
Show |
Edit |
Expand |
1
2
3
4 |
def new
@user_id = @current_user.id
@event = Event.new
end |
|
Testing Ruby Syntax |
13 lines
of
Ruby
|
314 Bytes |
Show |
Edit |
Expand |
1
2
3
4
5
6
7 |
module CommentsHelper
def format_comment(content)
simple_format(keep_spaces_at_beginning(h(content)))
end
def keep_spaces_at_beginning(content)
content.split("\n").map do |li... |
|
YAML TEST |
3 lines
of
YAML
|
41 Bytes |
Show |
Edit |
Expand |
1
2
3 |
test:
test2:
test3: test4 |
|
Quick Syntax highlighting test |
10 lines
of
Ruby
by
Deaner666
|
96 Bytes |
Show |
Edit |
Expand |
1
2
3
4
5
6
7
8
9
10 |
def index
inc = 0
for post in @posts do
inc += 1
post.id = inc
end
end |
|
XML TEST |
11 lines
of
ERb
by
TZA
|
499 Bytes |
Show |
Edit |
Expand |
1
2
3
4 |
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<ns2:verifyRequest xmlns:ns2="http://project4.pl/cc/ws" ncd="false" txid="task-108592" checkLimit="true"
... |
|
coderay in Wx::TextCtrl |
15 lines
of
Ruby
by
pbr
|
490 Bytes |
Show |
Edit |
Expand |
1
2
3
4
5
6 |
def colourize k,t,ts
if k and t
c,c1=@ins_pt,ts+@... |
|
Java |
2 lines
of
Java
|
96 Bytes |
Show |
Edit |
Expand |
1
2 |
hlpGroup.setPersistor(null); |
|
Euclids Algorithm |
37 lines
of
Ruby
by
chaitanya
|
740 Bytes |
Show |
Edit |
Expand |
|
erwqr |
1 line
of
Ruby
|
18 Bytes |
Show |
Edit |
Expand |
|
factory test |
11 lines
of
Ruby
|
306 Bytes |
Show |
Edit |
Expand |
1
2
3
4
5
6
7 |
Factory.define :user do |f|
f.sequence(:username) { |n| "user#{n}" }
f.password "test"
f.password_confirmation { |u| u.password }
f.sequence(:email) { |n| "user#{n}@example.com" }
end
... |
|