Welcome! This page is using CodeRay 1.1.2.

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

Page 1, 10 entries

React 1 line of JavaScript by - 108 Bytes Show Edit Expand
1
{ "note": { "to": "Tove", "from": "Jani", "heading": "Reminder", "body": "Don't forget me this weekend!" } }
dsf 3 lines of C 81 Bytes Show Edit Expand
1
2
3
class User < ActiveRecord::Base
  attr_accessible :first_name, :last_name
end
js 3 lines of JavaScript by taro 82 Bytes Show Edit Expand
1
2
3
function mailTemplate(name) {
  console.log(`hi ${name} ,  `); 
}
s 5 lines of Python 87 Bytes Show Edit Expand
1
2
3
4
5
def explore(u, n):
    if n < N_e:
        return R_plus
    else:
        return u
Geb example 4 lines of Ruby 148 Bytes Show Edit Expand
1
2
3
4
assert $("p", 0).text() == "a"
assert $("p", 2).text() == "c"
assert $("p", 0..1)*.text() == ["a", "b"]
assert $("p", 1..2)*.text() == ["b", "c"]
yaml list 4 lines of YAML by iao 46 Bytes Show Edit Expand
1
2
3
4
--- # abc
a b c
--- # defghijk
def gh ijkio
test 5 lines of Java by asdf 169 Bytes Show Edit Expand
1
2
3
4
5
private int x; // this is fine
private Color color; // this too

private int   x;      // permitted, but future edits
private Color color;  // may leave it unaligned
bkj 25 lines of C 643 Bytes Show Edit Expand
1
2
3
4
5
6
MODULE_LICENSE("Dual BSD/GPL");
MODULE_AUTHOR("Macken");
MODULE_DESCRIPTION("SW2");

static int mygpio_open(struct inode*, struct file*);
static int mygpio_release(struct inode *inode, struct ...
Test JS with callout 36 lines of JavaScript by Yo 1.08 KB Show Edit Expand
1
2
3
4
5
6
7
8
9
10
11
/**
 *  Add language indicator to code snippets
 */

// ace.config.set(
//     "basePath", 
//     "https://cdn.jsdelivr.net/npm/ace-builds@1.4.12/src-noconflict/"
// )

$(function () {
 ...
Ruby 13 lines of Ruby by Luka 312 Bytes Show Edit Expand
1
2
3
4
5
6
7
8
9
# Your Gemfile
gem "rest-client"

# Console or Model
resource = RestClient::Resource.new(
    "localhost:3000/api/v1/distance_and_bearing",
    payload: {
    api_key: YOUR_API_KEY,
    pay...

Page 1, 10 entries