Welcome! This page is using CodeRay 1.1.2.

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

Page 257, 10 entries

Another Java 7 lines of Java 259 Bytes Show Edit Expand
1
2
3
4
5
public static void doSomething(String arg) {
    int idx = 1;
    String[] cases = new String[] {"uppercase","lowercase"};
    StringBuffer sb = new StringBuffer("Here it is: ");
    sb.append(...
Test 4 lines of Ruby 73 Bytes Show Edit Expand
1
2
3
4
  def new
    @user_id = @current_user.id
    @event = Event.new
  end
Testing Ruby Syntax 13 lines of Ruby 314 Bytes Show Edit Expand
1
2
3
4
5
6
7
module CommentsHelper
  def format_comment(content)
    simple_format(keep_spaces_at_beginning(h(content)))
  end
  
  def keep_spaces_at_beginning(content)
    content.split("\n").map do |li...
YAML TEST 3 lines of YAML 41 Bytes Show Edit Expand
1
2
3
test:
  test2:
   test3:          test4
Quick Syntax highlighting test 10 lines of Ruby by Deaner666 96 Bytes Show Edit Expand
1
2
3
4
5
6
7
8
9
10
def index

  inc = 0

  for post in @posts do
    inc += 1
    post.id = inc
  end

end
XML TEST 11 lines of ERb by TZA 499 Bytes Show Edit Expand
1
2
3
4
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
  <ns2:verifyRequest xmlns:ns2="http://project4.pl/cc/ws" ncd="false" txid="task-108592" checkLimit="true"
    ...
coderay in Wx::TextCtrl 15 lines of Ruby by pbr 490 Bytes Show Edit Expand
1
2
3
4
5
6
    # Puts CodeRay in to a Wx::TextCtrl
    # This colourizes the code
    # k Symbol, t (String|Symbol), ts (text.size|nil)
    def colourize k,t,ts
      if k and t
        c,c1=@ins_pt,ts+@...
Java 2 lines of Java 96 Bytes Show Edit Expand
1
2
 //remove persistor - otherwise the original gets overwritten
        hlpGroup.setPersistor(null);
Euclids Algorithm 37 lines of Ruby by chaitanya 740 Bytes Show Edit Expand
1
2
3
4
5
6
class Gcd
  #GCD(m,n)
  # Step 1 : Divide m/n and r is the remainder 0<=r<=n
  # Step 2   if r = 0 then n is the GCD of m,n
  # r !=0 then m =n and n =r go to step 1
  # m can be less than n t...
erwqr 1 line of Ruby 18 Bytes Show Edit Expand
1
linenumber="true" 

Page 257, 10 entries