This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'rubygems' | |
require 'sinatra' | |
require 'scruffy' | |
require 'md5' | |
get '/' do | |
'This is Grapher.' | |
end | |
get '/graph/?' do |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
~/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) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* 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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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> | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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> | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'octokit' | |
module Jekyll | |
class ProjectsIndex < Page | |
def initialize(site, base, projects_dir) | |
@site = site | |
@base = base | |
@dir = projects_dir | |
@name = 'index.html' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
photos.each do |photo| | |
photo.position = params[:photo].index(photo.id.to_s) | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sass::Engine::DEFAULT_OPTIONS[:load_paths].tap do |load_paths| | |
load_paths << "#{Rails.root}/app/assets/stylesheets" | |
load_paths << "#{Gem.loaded_specs['compass'].full_gem_path}/frameworks/compass/stylesheets" | |
load_paths << "#{Gem.loaded_specs['html5-boilerplate'].full_gem_path}/stylesheets" | |
load_paths << "#{Gem.loaded_specs['fancy-buttons'].full_gem_path}/lib/stylesheets" | |
end |
OlderNewer