Welcome! This page is using CodeRay 1.1.2.

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

Page 108, 10 entries

sss 8 lines of C 265 Bytes Show Edit Expand
1
2
3
4
5
6
if (x == 0) return(32);
n = 0;
if (x <= 0x0000FFFF) {n = n +16; x = x <<16;}
if (x <= 0x00FFFFFF) {n = n + 8; x = x << 8;}
if (x <= 0x0FFFFFFF) {n = n + 4; x = x << 4;}
if (x <= 0x3FFFFFFF) {n...
method_missing example 76 lines of Ruby by Hugo Corbucci 1.74 KB Show Edit Expand
1
2
3
4
5
6
7
require 'timeout'
class TimeoutWrapper
  def initialize(timeout_in_seconds, target)
    @timeout = timeout_in_seconds
    @target = target
  end
  def respond_to?(symbol, include_private=fals...
Alireza 6 lines of C by Alireza 197 Bytes Show Edit Expand
1
2
3
4
5
6
ThisType::Value ThisType::genericData ( const ValueRole & role ) const
{
  if ( role == ToolTipRole )
    return Value::fromValue( "Generic tooltip" );
  return ParentType::genericData( role );
};
Test 6 lines of C++ by Test 197 Bytes Show Edit Expand
1
2
3
4
5
6
ThisType::Value ThisType::genericData ( const ValueRole & role ) const
{
  if ( role == ToolTipRole )
    return Value::fromValue( "Generic tooltip" );
  return ParentType::genericData( role );
};
1 1 line of Python by 2 29 Bytes Show Edit Expand
1
from modis import texterraapi
asd 25 lines of C++ by asd 301 Bytes Show Edit Expand
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#include<iostream>
using namespace std;
void lolo(int &a)
{
  a = 3;
}
void lol(int* a)
{
  *a = 44;
}
int main()
{
  int a = 5;
  int* b = &a;
  *b = 6;
  cout<<a<<endl;
  lolo(a);...
config file 13 lines of diff 115 Bytes Show Edit Expand
1
2
3
4
5
6
7
8
9
10
11
12
13
[groups]
admin = user_name
devel = other_user_name 

[repo_1:/]
@admin = rw
@devel = r

[/]
* = r


kkk
kruskal 43 lines of Ruby by AndrewCap 1.22 KB Show Edit Expand
1
2
3
4
5
6
7
8
9
10
require 'pp'
require 'benchmark'

def file 
  @file ||= File.readlines("edges.txt")
end

def has_cycles(edge)
  node_one, node_two = edge[:from], edge[:to]  
  @minimum_spanning_tree.each ...
kruskal 43 lines of Ruby by AndrewCap 1.22 KB Show Edit Expand
1
2
3
4
5
6
7
8
9
10
require 'pp'
require 'benchmark'

def file 
  @file ||= File.readlines("edges.txt")
end

def has_cycles(edge)
  node_one, node_two = edge[:from], edge[:to]  
  @minimum_spanning_tree.each ...
prim 75 lines of Ruby by AndrewCap 2.31 KB Show Edit Expand
1
2
3
4
5
6
7
8
9
10
11
12
13
require 'pp'
require 'benchmark'

def file 
  @file ||= File.readlines("edges.txt")
end

def header 
  @header ||= file.take(1)[0]
end

def number_of_nodes
  @number_of_nodes ||= header...

Page 108, 10 entries