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
# Evan describes this sexy prompt as: "a skinny, topless prompt" | |
local ret_status="%(?:%{$fg_bold[green]%}➜ :%{$fg_bold[red]%}➜ %s)%{$reset_color%}" | |
local dir_str="%{$fg[cyan]%}%2~%{$reset_color%}" | |
PROMPT='${ret_status} %m :: ${dir_str} %B»%b %{$reset_color%}' |
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
// This is a bad comparison as the data gets written back to the source array, | |
// so in-place has an advantage here. | |
// Compile with | |
// | |
// clang++ --std=c++11 -stdlib=libstdc++ -static -lstdc++ test.cpp | |
// On my machine it prints: | |
// When running unoptimized: |
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
(ns clj-loaded-dice.core) | |
(defn make-loaded-dice | |
"Create the data structure for the loaded dice." | |
[& probabilities] | |
(let [total-probability (apply + probabilities)] | |
(->> | |
;; normalize the probabilities to sum up to 1 | |
(map #(/ % total-probability) probabilities) |
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
using System; | |
using System.Threading; | |
using System.IO; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Text; | |
using System.Threading.Tasks; | |
/// <summary> | |
/// |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<script src="https://d3js.org/d3.v4.min.js"></script> | |
<script src="https://d3js.org/d3-color.v1.min.js"></script> | |
<script src="https://d3js.org/d3-dispatch.v1.min.js"></script> | |
<script src="https://d3js.org/d3-ease.v1.min.js"></script> | |
<script src="https://d3js.org/d3-interpolate.v1.min.js"></script> |
OlderNewer