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
var debug = process.env.NODE_ENV !== "production"; | |
var webpack = require('webpack'); | |
module.exports = { | |
context: __dirname, | |
devtool: debug ? "inline-sourcemap" : null, | |
entry: "./js/scripts.js", | |
output: { | |
path: __dirname + "/js", | |
filename: "scripts.min.js" |
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
; Postgres listen/notify in Clojure using http://impossibl.github.io/pgjdbc-ng/ | |
; in project.clj dependencies | |
; [com.impossibl.pgjdbc-ng/pgjdbc-ng "0.5"] | |
(ns pglisten.core | |
(:import [com.impossibl.postgres.jdbc PGDataSource] | |
[com.impossibl.postgres.api.jdbc PGNotificationListener])) |
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 <iostream> | |
#include <vector> | |
#include <sstream> | |
#include <set> | |
#include <cmath> | |
std::set<std::vector<int>> solve(int n) | |
{ | |
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
public static class SolrUpdater implements Runnable { | |
private final UpdateRequest req = new UpdateRequest(); | |
private final SolrServer solr; | |
private final BlockingQueue<String> strings; | |
private final AtomicLong id; | |
private final int batchSize = 100; | |
private volatile int batchedUpdates = 0; | |
public SolrUpdater(SolrServer solr, BlockingQueue<String> strings, | |
AtomicLong id) { |