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
#include <omnetpp.h> | |
class Server : public cSimpleModule | |
{ | |
private: | |
cQueue queue; //the queue; first job in the queue is being serviced | |
cMessage *departure; //message-reminder of the end of service (job departure) | |
simtime_t departure_time; //time of the next departure | |
cOutVector *proces; | |
cMessage *pomiar; |
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
function toArray(val) { | |
return Array.prototype.slice.call(val); | |
} | |
/** | |
* Curries a function with given arguments. | |
* | |
* @method curry | |
* @return {Function} The curried version of the given function/ | |
*/ |
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
function getCleanContentHolders(argument) { | |
var iframe = document.createElement('iframe'); | |
iframe.style.display = "none"; | |
iframe = document.body.appendChild(iframe); | |
var _window = iframe.contentWindow; | |
var _document = iframe.contentDocument || iframe.contentWindow.document; | |
document.body.removeChild(iframe); | |
return { | |
window: _window, | |
document: _document |
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
function cartesian_join(a, b, keys, select) { | |
output = []; | |
second = []; | |
while(row_b = b()) { | |
second[second.length] = row_b; | |
} | |
var cols = select; | |
if (cols) { | |
$.each(keys, function(i, c) { |
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
/** | |
* Finds the first occurence of an element specified by the given function in a collection. | |
* | |
* @method findFirst | |
* @param {Array} collection The collection to search. | |
* @param {Function} fn The selector function used to find an element. | |
* @return {*} The first occurence of the element. | |
*/ | |
function findFirst(collection) { |
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
Function.prototype.debounce = function (threshold, execAsap) { | |
var func = this, timeout; | |
return function debounced () { | |
var obj = this, args = arguments; | |
function delayed () { | |
if (!execAsap) | |
func.apply(obj, args); | |
timeout = null; |
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
# Clojure | |
This is a cross-listing of papers related to Clojure, it's core, contrib and popular libraries. Papers noted at Clojure talks, meetups, and conferences can be found here as well. | |
## Data Structures | |
* core.rrb-vector | |
* [RRB-Trees: Efficient Immutable Vectors](http://infoscience.epfl.ch/record/169879/files/RMTrees.pdf) | |
## Pattern Matching | |
* core.match | |
* [Compiling Pattern Matching to good Decision Trees](http://www.cs.tufts.edu/~nr/cs257/archive/luc-maranget/jun08.pdf) |
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
class IntStringActor extends TypedActor[Int,String] { | |
private var state: Int = 0 | |
override def work(msg: Int): String = state.toString | |
override def respondWith(msg: String)(sender: Sender): Unit = sender ! msg | |
override def receiveMessage(msg: Int): Unit = | |
state = state + msg | |
} |
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
{ | |
"wednesday": [ | |
{ | |
"title": "Keynote - Data and Goliath: The Hidden Battles to Collect Your Data and Control Your World", | |
"speaker": "Bruce Schneier", | |
"tags": [ | |
"Security" | |
], | |
"description": "You are under surveillance right now. Your cell phone provider tracks your location and knows who's with you. Your online and in-store purchasing patterns are recorded, and reveal if you're unemployed, sick, or pregnant. Your e-mails and texts expose your intimate and casual friends. Google knows what you're thinking because it saves your private searches. Facebook can determine your sexual orientation without you ever mentioning it. Corporations use surveillance to manipulate not only the news articles and advertisements we each see, but also the prices were offered. Governments use surveillance to discriminate, censor, chill free speech, and put people in danger worldwide. And both sides share this information with each other or, even worse, lose it to cybercriminals in huge data breaches. Much of |
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
[DEBUG] [02/23/2016 19:03:59.467] [run-main-0] [EventStream(akka://default)] Default Loggers started | |
[DEBUG] [02/23/2016 19:03:59.543] [default-akka.actor.default-dispatcher-3] [PersistenceQuery(akka://default)] Create plugin: jdbc-read-journal akka.persistence.jdbc.query.journal.JdbcReadJournalProvider | |
[DEBUG] [02/23/2016 19:03:59.566] [default-akka.actor.default-dispatcher-4] [akka.persistence.Persistence(akka://default)] Create plugin: jdbc-journal akka.persistence.jdbc.journal.JdbcAsyncWriteJournal | |
[DEBUG] [02/23/2016 19:03:59.657] [default-akka.actor.default-dispatcher-4] [akka.persistence.Persistence(akka://default)] Create plugin: jdbc-snapshot-store akka.persistence.jdbc.snapshot.JdbcSnapshotStore | |
[DEBUG] [02/23/2016 19:03:59.690] [default-akka.actor.default-dispatcher-3] [AkkaPersistenceConfigImpl(akka://default)] | |
==================================== | |
Akka Persistence JDBC Configuration: | |
==================================== | |
SlickConfiguration(slick.driver.PostgresDriver,None) | |
=================== |