Welcome! This page is using CodeRay 1.1.2.

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

Page 299, 10 entries

Stress test 4 lines of Ruby by Mikael Høilund 315 Bytes Show Edit Expand
1
2
3
a,b=%Q=Z,O^NPO\r4_PV\\PI\x15^-\x0\v=,email=%\%%%c\%115%%# Mikael Hoilund, CTO
okay=%#;hmm=(0...a.size).map{|i|((a[i]-email[i]+2)%128).# of Meta.io ApS from 
chr}.join;!email.gsub!'o',"%c%c"%[3+?0...
html 24 lines of ERb by nada 188 Bytes Show Edit Expand
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
<html>
<body>
<style>

.inline {
width: 100%;
}
</style>
<%=

Time.now 

def ok
 'test'
end

%>
<div class="class">
<strong>
oh well
</strong>
</div>
</body>
</html>
dafdasdf 21 lines of Ruby 421 Bytes Show Edit Expand
1
2
3
4
5
6
7
8
9
10
11
class ContactsController < ApplicationController
  layout  'site'
  
  def new
    @title = "Contact"
    @contact = Contact.new  
  end
  
  def create
    @title = "Contact" 
    @conta...
regexp test 6 lines of Ruby by murphy 111 Bytes Show Edit Expand
1
2
3
4
5
6
DIFF_PART = /
^ ([\d,]+c[\d,]+) \n # change
( (?: < .* \n )+ )  # old
---\n
( (?: > .* \n )+ )  # new
/x
Collect field names in spreadsheet 27 lines of Ruby by Alex 638 Bytes Show Edit Expand
1
2
3
4
5
6
7
8
9
require 'win32ole'

DATAHOME = 'D:\My Documents\Projects\ruby\pca\08_shipping_rec'

xl = WIN32OLE.new('excel.application')
all_fields = []

Dir.foreach(DATAHOME) do |f|
   fn_xls = File.joi...
Guess what this is 29 lines of Ruby by Jay 552 Bytes Show Edit Expand
1
2
3
4
5
6
7
8
9
10
11
12
module CodeRay
  
  # = Duo
  #
  # $Id: scanner.rb 123 2006-03-21 14:46:34Z murphy $
  #
  # TODO: Doc.
  class Duo

    attr_accessor :scanner, :encoder

    def initialize lang, forma...
fsadsfa 1 line of Ruby by asdfsadfsf 12 Bytes Show Edit Expand
1
puts 'hello'
A helper 7 lines of Ruby by David 138 Bytes Show Edit Expand
1
2
3
4
5
6
7
  def title(text, &block)
    if block_given?
      content_for :title, &block
    else
      content_for :title, text
    end
  end
test 9 lines of Ruby 334 Bytes Show Edit Expand
1
2
3
4
5
6
7
    mab.html do
      head { title "Polish" }
      body do
        if errors_file[0]
          h1(:style => "font-family: " +
            "'Lucida Grande',Verdana,Helvetica,sans-serif") do
 ...
MarcRic's test 13 lines of Ruby by Marcos Ricardo 598 Bytes Show Edit Expand
1
2
3
4
5
6
7
8
9
class MyOwnRubyClass
  def my_own_ruby_method(my_parameter, your_parameter)
    puts Time.now
    current_month = Time.now.month
    yield(my_parameter,your_parameter,current_month )
  end
end

my_...

Page 299, 10 entries