Skip to content

Instantly share code, notes, and snippets.

@rblaze
rblaze / bf.c
Last active December 11, 2015 07:08
Специальная олимпиада-2: Bellman-Ford algorithm как первый шаг Johnson algorithm Изначальная версия: haskell - 60 минут, C - две минуты. Данные для обработки: http://spark-public.s3.amazonaws.com/algo2/datasets/large.txt
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
const int infinity = 2147483647;
struct edge_t {
int v1;
int v2;
int cost;
@thefish
thefish / bootstrap-typeahead-objects-array.js
Created September 5, 2012 12:47
twitter bootstrap typeahead modified to work with array of key-value objects.
/* =============================================================
* bootstrap-typeahead.js v2.1.1
* http://twitter.github.com/bootstrap/javascript.html#typeahead
* =============================================================
* Copyright 2012 Twitter, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
@chris-taylor
chris-taylor / Module1.hs
Created June 13, 2012 13:44
Reader monad example
module Module1 where
import Control.Monad.Reader
data Config = Config { arg :: Int }
initialize :: IO Config
initialize = do
n <- getLine
return $ Config (read n)