Thread pools on the JVM should usually be divided into the following three categories:
- CPU-bound
- Blocking IO
- Non-blocking IO polling
Each of these categories has a different optimal configuration and usage pattern.
(in-package :next) | |
(defparenstatic scroll-half-page-down | |
(ps:chain window (scroll-by 0 (/ (ps:@ window inner-height) 2)))) | |
(defparenstatic scroll-half-page-up | |
(ps:chain window (scroll-by 0 (/ (ps:@ window inner-height) -2)))) | |
(defparenstatic scroll-page-down | |
(ps:chain window (scroll-by 0 (ps:@ window inner-height)))) | |
(defparenstatic scroll-page-up | |
(ps:chain window (scroll-by 0 (- (ps:@ window inner-height))))) |
import argparse | |
import youtube_dl | |
import ffmpy | |
samples_per_video = 10 | |
game_dic = {} | |
def save_frame(url, time, game_name): | |
if game_name not in game_dic.keys(): | |
game_dic[game_name] = 0 |
Author: Chris Lattner
#!/usr/bin/env lumo | |
(ns spacedl.spacedl | |
(:require [cljs.nodejs :as node] | |
[clojure.pprint :refer [pprint]] | |
[clojure.string :as string :refer [join split starts-with?]] | |
[cljs.core :refer [*command-line-args*]])) | |
(node/enable-util-print!) | |
(.on js/process "uncaughtException" #(js/console.error %)) |
# LVDB - LLOOGG Memory DB | |
# Copyriht (C) 2009 Salvatore Sanfilippo <[email protected]> | |
# All Rights Reserved | |
# TODO | |
# - cron with cleanup of timedout clients, automatic dump | |
# - the dump should use array startsearch to write it line by line | |
# and may just use gets to read element by element and load the whole state. | |
# - 'help','stopserver','saveandstopserver','save','load','reset','keys' commands. | |
# - ttl with milliseconds resolution 'ttl a 1000'. Check ttl in dump! |
A list of commonly asked questions, design decisions, reasons why Clojure is the way it is as they were answered directly by Rich (even when from many years ago, those answers are pretty much valid today!). Feel free to point friends and colleagues here next time they ask (again). Answers are pasted verbatim (I've made small adjustments for readibility, but never changed a sentence) from mailing lists, articles, chats.
How to use:
This is a guide that I wrote to improve the default security of my website https://fortran.io , which has a certificate from LetsEncrypt. I'm choosing to improve HTTPS security and transparency without consideration for legacy browser support.
I would recommend these steps only if you have a specific need for information security, privacy, and trust with your users, and/or maintain a separate secure.example.com domain which won't mess up your main site. If you've been thinking about hosting a site on Tor, then this might be a good option, too.
The best resources that I've found for explaining these steps are https://https.cio.gov , https://certificate-transparency.org , and https://twitter.com/konklone
class Callback { | |
constructor(f) { | |
// this.run = f | |
this.run = callback => { | |
try { | |
f(callback) | |
} catch (ex) { | |
callback(ex, null) | |
} |
# You will need fswatch installed (available in homebrew and friends) | |
# The command below will run tests and wait until fswatch writes something. | |
# The --stale flag will only run stale entries, it requires Elixir v1.3. | |
fswatch lib/ test/ | mix test --stale --listen-on-stdin |