Fork me on GitHub

Welcome! This page is using CodeRay 1.0.0 (beta).

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

Page 1, 10 entries

docstring 7 lines of Python 229 Bytes Show Edit Expand
1
2
3
4
5
6
def addMaps(self, maps):
    """
    Add list/tuple <maps> mappings to the <display>.  These determine what
    scalars will appear along what axes. See makeMaps, below.
    """
    for map in...
whatever 8 lines of Ruby 143 Bytes Show Edit Expand
1
2
3
4
5
6
7
8
def foo(num)
  #Verifica se o código é válido
  if num > 0 and num < 10
    puts “wrong code”
  end
  
  return num += @delta
end
test 11 lines of PHP 113 Bytes Show Edit Expand
1
2
3
4
5
6
7
8
9
10
11
namespace Foo
{
class Bar
{
    public function fooBar($a, $b = null)
    {
        die($a);
    }
}

}
asd 7 lines of JSON 161 Bytes Show Edit Expand
1
2
3
4
5
6
7
{
    "_id": ObjectId("4f26e7ce8225195a3d956e98"),
    "appid": 8888,
    "model": null,
    "times": 11,
    "when": ISODate("2012-01-30T00:00:00Z")
    }
test 3 lines of C by eknoop 45 Bytes Show Edit Expand
1
2
3
sdlkghsklgdfjgsd
</code>
sdglkhasdlghasldjf
sdzfg 34 lines of CSS 1.51 KB Show Edit Expand
1
2
3
4
5
6
7
8
.CodeRay {
  background-color: #232323;
  border: 1px solid black;
  font-family: 'Courier New', 'Terminal', monospace;
  color: #E6E0DB;
  padding: 3px 5px;
  overflow: auto;
  font-size: 1...
HELP! 26 lines of Ruby by Fayimora 541 Bytes Show Edit Expand
1
2
3
4
5
#application_helper.rb
def coderay(text)
      text.gsub(/\<code( lang="(.+?)")?\>(.+?)\<\/code\>/m) do
        content_tag("notextile", CodeRay.scan($3, $2).div(:css => :class))
        # Code...
bum 46 lines of Plain text 1.33 KB Show Edit Expand
1
2
3
4
5
6
7
8
9
10
11
12
13
user www-data;
worker_processes  4;

error_log  /opt/nginx/logs/error.log;
pid        /var/run/nginx.pid;

events {
    worker_connections  8192;
    use epoll;
}

http {
    passenger_...
Unique Characters in a String 47 lines of Java by Fayimora 1.06 KB Show Edit Expand
1
2
3
4
5
6
7
8
class C1_1
{
  public static void main(String[] args)
  {
    System.out.println(isUnique("fayimora"));
    System.out.println(isUnique("fayi"));
    System.out.println(isUnique("aaaaaaaa"));
    Syst...
nthtn 11 lines of HAML by blah 247 Bytes Show Edit Expand
1
2
3
4
5
6
!!!
%html
  %head
    %meta{:charset => 'utf-8'}
    <!-- Always force latest IE rendering engine (even in intranet) & Chrome Frame -->
    %meta{:content => 'IE=edge,chrome=1', :http-equiv='X...

Page 1, 10 entries