Welcome! This page is using CodeRay 1.1.2.
We currently have
3061 rays
in the database.
You can add a
New Ray
or browse the posted rays by pages.
sddssd |
7 lines
of
Groovy (beta)
|
109 Bytes |
Show |
Edit |
Expand |
1
2
3
4
5
6
7 |
@RestController
class Hello {
@GetMapping("/")
String home() {
"Hello Postman!"
}
} |
|
Typescript |
37 lines
of
JavaScript
|
676 Bytes |
Show |
Edit |
Expand |
1
2
3
4
5
6
7
8
9
10
11 |
import * as React from 'react';
import Count from './Count';
interface Props {}
interface State {
count: number;
};
export default class Counter extends React.Component<Props, State... |
|
aaa |
6 lines
of
JSON
|
97 Bytes |
Show |
Edit |
Expand |
1
2
3
4
5
6 |
{"pill/type":"term",
"pill/query":"term key",
"pill/mode":"term mode key (optional)"}
|
|
Test Java |
149 lines
of
Java
|
3.55 KB |
Show |
Edit |
Expand |
1
2
3
4
5
6
7
8 |
public class ArrayExamples
{ public static void main(String[] args)
{ int[] list = {1, 2, 3, 4, 1, 2, 3};
findAndPrintPairs(list, 5);
bub... |
|
azeaze |
35 lines
of
PHP
|
1.62 KB |
Show |
Edit |
Expand |
1
2
3 |
$parameters:=New collection(\
New object("type";"bool";"name";"testb";"default";True);\
New object("type";"integer";"name";"rate";"label";"Your rating";"format";"rating";"default";5;"min";1... |
|
a |
38 lines
of
Ruby
|
794 Bytes |
Show |
Edit |
Expand |
1
2
3
4
5
6
7 |
class Bicycle
attr_reader :style, :size, :tape_color, :front_shock, :rear_shock
def initialize(**opts)
@style = opts[:style]
@size = opts[:size]
@tape_color = opts[:tape_colo... |
|
a |
10 lines
of
Ruby
|
231 Bytes |
Show |
Edit |
Expand |
1
2
3
4
5
6
7
8
9
10 |
class Bicycle
def default_tire_size
raise NotImplementedError,
"#{self.class} should have implemented..."
end
end
bent = RecumbentBike.new(size: "L")
|
|
a |
9 lines
of
Ruby
|
176 Bytes |
Show |
Edit |
Expand |
1
2
3
4
5
6
7
8
9 |
class Bicycle
def default_tire_size
raise NotImplementedError
end
end
bent = RecumbentBike.new(size: "L")
|
|
a |
8 lines
of
Ruby
|
179 Bytes |
Show |
Edit |
Expand |
1
2
3
4
5
6
7
8 |
class RecumbentBike < Bicycle
def default_chain
'10-speed'
end
end
bent = RecumbentBike.new(size: "L")
|
|
a |
14 lines
of
Ruby
|
314 Bytes |
Show |
Edit |
Expand |
1
2
3
4
5
6
7
8
9
10 |
road_bike = RoadBike.new(
size: 'M',
tape_color: 'red')
puts road_bike.tire_size
puts road_bike.chain
mountain_bike = MountainBike.new(
size: 'S',
front_sho... |
|