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 228, 10 entries

test 9 lines of XML by test 205 Bytes Show Edit Expand
1
2
3
4
5
6
7
8
9
<?xml version="1.0"?>
<methodCall>
   <methodName>examples.getStateName</methodName>
   <params>
      <param>
         <value><i4>41</i4></value>
         </param>
      </params>
   </met...
test 5 lines of diff 44 Bytes Show Edit Expand
1
2
3
4
5
#!/bin/sh

for i in *; do
  echo $i
done
test 14 lines of Ruby 246 Bytes Show Edit Expand
1
2
3
4
5
6
7
8
9
10
11
# app/models/trinket.rb
class Trinket < ActiveRecord::Base
  searchable do
    text :name
    integer :code
  end
end

# vendor/extensions/customer/app/models/trinket.rb
class Trinket
  s...
Hello world 13 lines of PHP 214 Bytes Show Edit Expand
1
2
3
4
5
6
7
8
9
10
11
12
13
#!/usr/bin/perl
use strict;
use warnings;

print "Hello World!\n";

class Application {
   public function hello($msg) {
      echo 'Hello, '.$msg;
   }
}
$app = new Application();
$app...
ast 9 lines of Python 298 Bytes Show Edit Expand
1
2
3
4
5
6
7
8
>>> a, b = 1, 2

# The ast module gives us:

>>> import ast
>>> ast.dump(ast.parse('a, b = 1, 2'))
"Module(body=[Assign(targets=[Tuple(elts=[Name(id='a', ctx=Store()),\
 Name(id='b', ctx=Sto...
ast 8 lines of Python 295 Bytes Show Edit Expand
1
2
3
4
5
6
7
>>> a, b = 1, 2

# The ast module gives us:

>>> import ast
>>> ast.dump(ast.parse('a, b = 1, 2'))
"Module(body=[Assign(targets=[Tuple(elts=[Name(id='a', ctx=Store()), Name(id='b', ctx=Store(...
ast 8 lines of Python 293 Bytes Show Edit Expand
1
2
3
4
5
6
7
>>> a, b = 1, 2

# The ast module gives us:

>>> import ast
>>> ast.dump(ast.parse('a, b = 1, 2'))
"Module(body=[Assign(targets=[Tuple(elts=[Name(id='a', ctx=Store()), Name(id='b', ctx=Store(...
ast 7 lines of Python 271 Bytes Show Edit Expand
1
2
3
4
5
6
7
>>> a, b = 1, 2

# The ast module gives us:

>>> import ast
>>> ast.dump(ast.parse('a, b = 1, 2'))
"Module(body=[Assign(targets=[Tuple(elts=[Name(id='a', ctx=Store()), Name(id='b', ctx=Store(...
ast 10 lines of Python 335 Bytes Show Edit Expand
1
2
3
4
5
6
7
8
>>> a, b = 1, 2

# The ast module gives us:

>>> import ast
>>> ast.dump(ast.parse('a, b = 1, 2'))
"Module(body=[Assign(targets=[Tuple(elts=[Name(id='a', ctx=Store()),
                      ...
test 5 lines of Java 148 Bytes Show Edit Expand
1
2
3
4
5
List<String> languages = new LinkedList<String>();
languages.add("Java");
languages.add("Ruby");
languages.add("Python");
languages.add("Perl");

Page 228, 10 entries