Welcome! This page is using CodeRay 1.1.2.

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

Page 257, 10 entries

asfas 7 lines of C++ 63 Bytes Show Edit Expand
1
2
3
4
5
6
7


using namespace std;

int main(){
cout << "asdfasdf";
}
How to set default encoding for print 92 lines of Python 3.8 KB Show Edit Expand
1
2
3
4
5
# -*- coding: utf-8 -*
#---------------------------------------------------------------------------{{{
# Copyright 2010 B. Kroon <bart@tarmack.eu>.
#
# Licensed under the Apache License, Versio...
test 10 lines of Ruby 218 Bytes Show Edit Expand
1
2
3
4
5
6
7
8
  # GET /venues/1
  # GET /venues/1.xml
  def show
    @venue = Venue.find(params[:id])

    respond_to do |format|
      format.html # show.html.erb
      format.xml  { render :xml => @venu...
WPF clock 130 lines of Ruby by Edd Morgan 4.92 KB Show Edit Expand
1
2
3
4
5
6
7
8
require 'WindowsBase'
require 'PresentationFramework'
require 'PresentationCore'
require 'System.Core, Version=3.5.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'

class Clock

    CL...
bounce.rb 22 lines of Ruby by Jimmy Schementi 748 Bytes Show Edit Expand
1
2
3
4
5
6
7
8
9
class Bouncer
  def initialize xvelocity, yvelocity, canvas
    @xvelocity = xvelocity
    @yvelocity = yvelocity
    @canvas = canvas
  end

  def update target
    if (Canvas.get_left(tar...
ruby bounce 22 lines of Ruby by jimmy schementi 797 Bytes Show Edit Expand
1
2
3
4
5
6
7
8
# create a ton of random sized, colored, and stroked rectangles

include System::Windows::Shapes
include System::Windows::Media
include System::Windows::Controls

canvas.children.clear
color...
Intelligent diff highlighting 147 lines of diff by murphy 4.91 KB Show Edit Expand
1
2
3
4
Index: lib/coderay/encoders/html.rb
===================================================================
--- lib/coderay/encoders/html.rb  (revision 200)
+++ lib/coderay/encoders/html.rb  (revision...
Inline diff highlighting 9 lines of diff by murphy < github 380 Bytes Show Edit Expand
1
2
3
4
5
@@ -140,7 +140,7 @@ module ActiveSupport
 
         private
           def thread_local_key
-            @thread_local_key ||= "#{self.class.name.underscore}_local_cache_#{self.object_id}".gsub...
wrong yaml testing 3 lines of YAML 35 Bytes Show Edit Expand
1
2
3
go:
  for:
      nesting: "whoa!"
~20 lines of Ruby 1 line of Java by Letícia 33 Bytes Show Edit Expand
1
if (comp instanceof JdbTextField)

Page 257, 10 entries