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.
count split inversions |
39 lines
of
Ruby
|
866 Bytes |
Show |
Edit |
Expand |
1
2
3
4
5
6
7
8
9 |
def sort_and_count(array)
mid = array.length / 2
left = array[0...mid]
right = array[mid..-1]
if array.count <= 1
return 0, arr... |
|
aaa |
27 lines
of
C
|
659 Bytes |
Show |
Edit |
Expand |
1
2
3
4
5
6
7 |
<pre><code class="c">
xstRegFM.stFmStatus.field.bmECCErrFlag = 1;
if(xstRegFM.stECCCtrl.field.bmPipeOn)
{
while(!xstRegFM.stFmSt... |
|
python |
6 lines
of
Python
|
121 Bytes |
Show |
Edit |
Expand |
1
2
3
4
5
6 |
def main():
print("Hello, World!")
if __name__ == "__main__":
main()http://coderay.rubychan.de/rays/8954 |
|
9to5 |
11 lines
of
CSS
|
84 Bytes |
Show |
Edit |
Expand |
1
2
3
4
5
6
7
8
9
10
11 |
p {
color: blue;
}
#toto {
color: pink;
}
.toto {
color: yellow;
} |
|
Node sample |
12 lines
of
Clojure
by
Alex
|
554 Bytes |
Show |
Edit |
Expand |
1
2
3
4 |
function getTextFromTextNode(range, textNode) {
if (range.startContainer.equals(textNode) && range.startOffset > 0) {
if (range.endContainer.equals(textNode)) {
... |
|
PHP Magento |
12 lines
of
PHP
|
236 Bytes |
Show |
Edit |
Expand |
1
2
3
4
5
6
7
8
9 |
$user = User::create(array('name' => 'Tito', 'state' => 'VA'));
$user = User::find_by_name('Tito');
$user->name = 'Tito Jr';
$user->save()... |
|
Test |
35 lines
of
XML
|
1.37 KB |
Show |
Edit |
Expand |
1
2
3
4
5
6
7
8
9 |
location / {
try_files $uri @prerender;
}
location @prerender {
#proxy_set_header X-Prerender-Token YOUR_TOKEN;
set $prerender 0;
if ($htt... |
|
aaa |
5 lines
of
XML
|
120 Bytes |
Show |
Edit |
Expand |
1
2
3
4
5 |
<proc>
<cmd>DoWebLinkSupport</cmd>
<msgtype>response</msgtype>
<method>DoRegisterFromSite</method>
</proc>
|
|
JSON |
8 lines
of
JSON
by
TOF
|
86 Bytes |
Show |
Edit |
Expand |
1
2
3
4
5
6
7
8 |
{
"key1" : "value1",
"key2" : [
1,
2,
3
]
} |
|
Title |
30 lines
of
Java
by
Stefan
|
506 Bytes |
Show |
Edit |
Expand |
1
2
3
4
5
6
7
8
9 |
final class MonoJust<T>
extends Mono<T>
implements Fuseable.ScalarCallable<T>, Fuseable {
final T value;
MonoJust(T value) {
this.value = Objects.requireNonNull(value, "value");
}... |
|