Welcome! This page is using CodeRay 1.1.2.

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

Page 265, 10 entries

RegExps in JavaScript 1 line of JavaScript by murphy < giles 53 Bytes Show Edit Expand
1
var vals = lines[i].replace(/^\s+/, "").split(/\s+/);
asdf 39 lines of Ruby 934 Bytes Show Edit Expand
1
2
3
4
5
6
7
8
9
# config/environment.rb
config.gem "cancan"

# models/ability.rb
class Ability
  <b style="color:black;background-color:#ffff66">include CanCan</b>::Ability
  
  def initialize(user)
    us...
output "hello world" in php 3 lines of PHP by Snake 32 Bytes Show Edit Expand
1
2
3
<?php
echo "hello world 1";
?>
C++ 17 lines of C++ 124 Bytes Show Edit Expand
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#if defined(xxxx)
...

class A{
public:
 A()
 {
  int b = "asdf";
  return true;
 }
};


#else
...
#endif

Simple Ruby 38 lines of Ruby by crackerjack 541 Bytes Show Edit Expand
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
require 'rubygems'
require 'sinatra'
require 'haml'

require 'whois'

get '/' do
  haml :index
end

# whois
get '/whois' do
  haml :whois
end

post '/whois' do
  @host = params[:hos...
Javascript 3 lines of JavaScript 48 Bytes Show Edit Expand
1
2
3
function hello() {
    alert('Hello World');
}
Java Hello-World 6 lines of Java 107 Bytes Show Edit Expand
1
2
3
4
5
6
public class Test {
  public void main(String[] args) {

    System.out.println("Hello, world");
  }
}
Fick dich 3 lines of PHP by wcho 24 Bytes Show Edit Expand
1
2
3
<?php
  echo 'sex';
?>
Ruby regexp tests 33 lines of Ruby by murphy < jacius 585 Bytes Show Edit Expand
1
2
3
4
5
6
7
8
9
10
11
%r<this is a valid regexp>e.to_s
# That's right.
 
%r(this one is valid, but...()
it actually closes right here:)i.inspect
# Tricky.
 
%r[this is valid too]x.clone
# Correct.
 
%r.and thi...
SQL test 15 lines of SQL by anonymous 812 Bytes Show Edit Expand
1
2
3
IF( WEEKDAY( DATE_ADD( NOW( ) , INTERVAL +10 HOUR ) ) >3, (
  YEARWEEK( FROM_UNIXTIME( orddateshipped ) ) = YEARWEEK( DATE_ADD( NOW( ) , INTERVAL +10 HOUR ) )
  AND WEEKDAY( FROM_UNIXTIME( orddat...

Page 265, 10 entries