Welcome! This page is using CodeRay 1.1.2.

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

Page 210, 10 entries

test 42 lines of Plain text 1.2 KB Show Edit Expand
1
2
3
4
5
6
7
8
require 'rubygems'
require 'coderay'

# output as HTML div (using inline CSS styles)
puts CodeRay.scan('puts "Hello, world!"', :ruby).div

# ...with line numbers
puts CodeRay.scan("5.times d...
test 5 lines of Ruby 100 Bytes Show Edit Expand
1
2
3
4
5
a = {:@cupcakes=>4, :waffles=>2, :cupcakes=>4}
b = "sample_variable"
some_method

new line added
Markdown with php 4 lines of PHP 212 Bytes Show Edit Expand
1
2
3
4
- When opening an array, if the array only has one or two elements and it fits
  within the 80 column limit, you may use inline array notation:

        $noises = array('cow' => 'moo', 'chicken'...
Gouano 5 lines of Java by Gouano 62 Bytes Show Edit Expand
1
2
3
4
5
public Gouano()
{
  Qm = new neuneu();
  Qr = new big();
}
Test 23 lines of C++ 927 Bytes Show Edit Expand
1
2
3
4
5
6
7
8
9
10
void GestViewport::updateViewportSize()
{
  int count = this->countViewport();
  
  if(count > 0)
  {
    for(int i = 0 ; i < count ; i++)
    {
      Viewport * viewport = this->lstViewport.at(i);
  ...
Mapper 16 lines of Java by Me 705 Bytes Show Edit Expand
1
2
3
4
public class WordCount {

   public static class Map extends MapReduceBase implements Mapper&amp;amp;amp;amp;lt;LongWritable, Text, Text, IntWritable&amp;amp;amp;amp;gt; {
     private final sta...
bookmarklet 1 line of JavaScript 286 Bytes Show Edit Expand
1
javascript:var%20b=document.body;var%20POSTEROUS___bookmarklet_domain='http://posterous.com';if(b&&!document.xmlVersion){void(z=document.createElement('script'));void(z.type='text/javascript');void...
Some Perl code highlighted as ruby 28 lines of Ruby by X 420 Bytes Show Edit Expand
1
2
3
4
5
6
7
8
9
10
11
12
13
#!/usr/bin/perl
use strict;
use warnings;

####################################
# some Perl code highlighted as ruby
####################################

use DBI;

my $dbh;

print "Hel...
xml 71 lines of XML 3.23 KB Show Edit Expand
1
2
3
4
5
6
7
8
<?xml version="1.0" encoding="UTF-8"?>
<!--
Test
-->
<Section key = "0">
   <SubSection key = "1"/>
</Section>
<Chapter Name="PBDI" Definition="Bluetooth devices inquiry" Software="Bxxx" Pro...
shell 5 lines of C 296 Bytes Show Edit Expand
1
2
3
4
# install rvm dans ~/.rvm
$ bash < <(curl -s https://rvm.beginrescueend.com/install/rvm)
# configuration des chemins d'accรจs aux binaires
$ echo '[[ -s "$HOME/.rvm/scripts/rvm" ]] && . "$HOME/.r...

Page 210, 10 entries