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 265, 10 entries

SimpleTest 30 lines of C++ 1.25 KB Show Edit Expand
1
2
3
4
5
    // Create a new type
    Json::Value personSchema;
    personSchema["name"][Schema::Type] = Schema::String;
    personSchema["age"][Schema::Type] = Schema::Int;
    personSchema["hasPenis"]...
Some JS 5 lines of JSON by Jake 159 Bytes Show Edit Expand
1
2
3
4
5
if (typeof Array.prototype.contains !== 'function') {
  Array.prototype.contains = function(item, from) {
    return this.indexOf(item, from) != -1;
  };
}
javascript 2 lines of JavaScript 66 Bytes Show Edit Expand
1
2
$('#bd').resizable();
$('#bd').parent('.ui-wrapper').draggable();
caius test 94 lines of Ruby by kib2 2.96 KB Show Edit Expand
1
2
3
4
5


## See terrible article here http://caiustheory.com/ruby-shortcuts
## There's a few useful shorthand ways to create certain objects in Ruby,
## a couple of obvious ones are [] to create an Ar...
cscs test 4 lines of CSS by stjhimy 26 Bytes Show Edit Expand
1
2
3
4
input {
 width:90px;

}
test 4 lines of C++ by nob 89 Bytes Show Edit Expand
1
2
3
4
var hideFlashes = (function() {
  $("#flash_notice,
  flash_error").fadeOut(4000);
});
test 4 lines of Ruby by nob 89 Bytes Show Edit Expand
1
2
3
4
var hideFlashes = (function() {
  $("#flash_notice,
  flash_error").fadeOut(4000);
});
test 4 lines of JavaScript by nob 89 Bytes Show Edit Expand
1
2
3
4
var hideFlashes = (function() {
  $("#flash_notice,
  flash_error").fadeOut(4000);
});
test 4 lines of C by nob 89 Bytes Show Edit Expand
1
2
3
4
var hideFlashes = (function() {
  $("#flash_notice,
  flash_error").fadeOut(4000);
});
vvv 3 lines of Ruby 121 Bytes Show Edit Expand
1
2
3
 f = File.new("testfile")
   f.sysseek(-13, IO::SEEK_END)   #=> 53
   f.sysread(10)                  #=> "And so on."

Page 265, 10 entries