Welcome! This page is using CodeRay 1.1.2.
We currently have
3067 rays
in the database.
You can add a
New Ray
or browse the posted rays by pages.
| String#[] |
26 lines
of
Ruby
|
718 Bytes |
Show |
Edit |
Expand |
1
2
3
4
5
6
7
8
9 |
a = "hello there"
a[1]
a[2, 3]
a[2..3]
a[-3, 2]
a[7..-2]
a[-4..-2... |
|
| 55 |
1 line
of
Python
|
18 Bytes |
Show |
Edit |
Expand |
|
|
| XML |
7 lines
of
XML
|
210 Bytes |
Show |
Edit |
Expand |
1
2
3
4
5
6 |
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="a.debug"
android:versionCode="1"
android:versionName="1.0.0" >
... |
|
| abcd |
1 line
of
Java
|
9 Bytes |
Show |
Edit |
Expand |
|
|
| xxxxx |
15 lines
of
SQL
by
ddd
|
440 Bytes |
Show |
Edit |
Expand |
1
2
3
4
5
6
7
8 |
declare @guid varchar(50)
declare cur cursor for select guid from 业务表名
open cur
fetch next from cur into @guid
while @@fetch_status = 0
begin
delete SYS_INST_PRCS where taskid = @guid
... |
|
| xxx |
12 lines
of
Ruby
by
xx
|
315 Bytes |
Show |
Edit |
Expand |
1
2
3
4
5
6
7
8
9 |
initial =
ui = SomeInteractor.new
ui.go! initial
ui.click_button 'View Nutritionist'
ui.click_button 'Schedule Appointment'
ui.click_button 'Fill Skinfold Sites'
ui.field(:id => 'ABS').... |
|
| test |
3 lines
of
Ruby
by
s
|
29 Bytes |
Show |
Edit |
Expand |
1
2
3 |
def binbin
puts "try"
end |
|
| h |
1 line
of
Plain text
|
3 Bytes |
Show |
Edit |
Expand |
|
|
| PHP test |
12 lines
of
PHP
by
tester
|
126 Bytes |
Show |
Edit |
Expand |
1
2
3
4
5
6
7
8
9
10
11
12 |
<?php
function codeRay(){
$test = 1;
$test = "test2";
if($test == true){
return true;
} else {
return false;}
} |
|
| s |
17 lines
of
Ruby
|
456 Bytes |
Show |
Edit |
Expand |
1
2
3
4
5
6
7
8 |
module CheckedAttributes
def self.included(base)
base.extend ClassMethods
end
module ClassMethods
def attr_checked(attribute, &validation)
define_method "#{attribute}="... |
|