This file contains hidden or 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
package concurrency.pizza; | |
import org.slf4j.Logger; | |
import org.slf4j.LoggerFactory; | |
import java.util.Random; | |
class Bucket { | |
private final static Logger LOGGER = LoggerFactory.getLogger(Bucket.class); |
This file contains hidden or 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
#include <cstdio> | |
#include <mpi.h> | |
#include <algorithm> | |
#include <ctime> | |
#include <climits> | |
#define GRN "\x1B[32m" | |
#define RESET "\x1B[0m" | |
#define CYN "\x1B[36m" | |
#define RED "\033[31m" |
This file contains hidden or 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
#include <stdio.h> | |
#include <mpi.h> | |
#include <algorithm> | |
#include <ctime> | |
#define GRN "\x1B[32m" | |
#define RESET "\x1B[0m" | |
#define CYN "\x1B[36m" | |
#define MASTER_RANK 0 |
This file contains hidden or 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
#include <vector> | |
#include <cstdio> | |
#include <algorithm> | |
#include <ctime> | |
class Log { | |
public: | |
static void print(const char* strategy, long long int start, long long int end){ | |
printf("%s: %f seconds\n", strategy, (double)(end - start) / 1000000); | |
} |
This file contains hidden or 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
var through = require("through"); | |
var split = require("split"); | |
var fs = require("fs"); | |
var util = require("util"); | |
var combine = require("stream-combiner"); | |
var Readable = require("stream").Readable; | |
function MyReadable(dir) { | |
this._queue = [dir]; | |
Readable.call(this); |
This file contains hidden or 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
/** First argument should be a filename, second head, third tail **/ | |
var fs = require("fs"); | |
var split = require("split"); | |
var through = require("through"); | |
var concat = require("concat-stream"); | |
var filename = process.argv[2]; | |
var head = Math.abs(process.argv[3] || 1); | |
var tail = Math.abs(process.argv[4] || 1); |
This file contains hidden or 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
React.createBackboneComponent = function (spec, compname) { | |
return React.createClass(_.extend({ | |
// Assistants | |
serializeState: function () { | |
this.replaceState(this.serialize()); | |
}, | |
getModel: function () { | |
return this.props.model; | |
}, | |
el: function () { |
This file contains hidden or 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
<?php | |
namespace Majax\PortalBundle\Builder; | |
use Symfony\Bundle\DoctrineBundle\Registry; | |
class SiteListBuilder { | |
/** @var \Symfony\Bundle\DoctrineBundle\Registry */ | |
private $orm; | |
public function __construct($orm) |