Skip to content

Instantly share code, notes, and snippets.

#ifndef __fine_linked_list_hpp__
#define __fine_linked_list_hpp__
#include "linked_list.hpp"
using namespace std;
template <typename T>
class fine_linked_list : public linked_list<T>
{
/*
* Copyright 1993-2006 NVIDIA Corporation. All rights reserved.
*
* NOTICE TO USER:
*
* This source code is subject to NVIDIA ownership rights under U.S. and
* international Copyright laws.
*
* This software and the information contained herein is PROPRIETARY and
* CONFIDENTIAL to NVIDIA and is being provided under the terms and
@grk
grk / main.c
Created February 7, 2011 09:55
~/Work/uni/padp/lists(master*) $ ./test
[==========] Running 5 tests from 1 test case.
[----------] Global test environment set-up.
[----------] 5 tests from linked_list_test
[ RUN ] linked_list_test.is_empty_initially
[ OK ] linked_list_test.is_empty_initially (0 ms)
[ RUN ] linked_list_test.add_element
[ OK ] linked_list_test.add_element (0 ms)
[ RUN ] linked_list_test.add_exisiting_element
[ OK ] linked_list_test.add_exisiting_element (0 ms)
#ifndef __semaphore_t_h__
#define __semaphore_t_h__
#ifdef __APPLE__
#include <mach/mach_init.h>
#include <mach/task.h>
#include <mach/semaphore.h>
class semaph_t
require 'thread'
class ReadWriteLock
def initialize
@critical_section = Mutex.new
@are_writers_finished = ConditionVariable.new
@are_readers_finished = ConditionVariable.new
@readers = 0
@writers = 0
@writer_locked = false
@grk
grk / grapher.rb
Created March 24, 2009 22:18
Graphs with Sinatra and Scruffy
require 'rubygems'
require 'sinatra'
require 'scruffy'
require 'md5'
get '/' do
'This is Grapher.'
end
get '/graph/?' do