Welcome! This page is using CodeRay 1.1.2.

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

Page 107, 10 entries

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...
Test 5 lines of Java by Tester 202 Bytes Show Edit Expand
1
2
3
4
private ProposalUserAccess GetUserProposalAccess(int proposalId)
{
   var proposalAccess = _proposalAccessManager.GetUserProposalPermission(EmployeeNumber, proposalId);
   return proposalAccess;...

Page 107, 10 entries