Letter | Phonetic letter |
---|---|
A | Alpha |
B | Bravo |
C | Charlie |
D | Delta |
E | Echo |
F | Foxtrot |
G | Golf |
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
function min(array) { | |
if (Array.isArray(array)) { | |
return Math.min.apply(null, array.filter(isFinite)); | |
} | |
throw { | |
name: "Illegal argument", | |
message: "Argument must be an array" | |
} | |
} |
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
""" | |
Copyright (c) 2012 Anthony Wu, twitter.com/anthonywu | |
Permission is hereby granted, free of charge, to any person obtaining | |
a copy of this software and associated documentation files (the | |
"Software"), to deal in the Software without restriction, including | |
without limitation the rights to use, copy, modify, merge, publish, | |
distribute, sublicense, and/or sell copies of the Software, and to | |
permit persons to whom the Software is furnished to do so, subject to | |
the following conditions: |
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 com.evernote; | |
import java.util.ArrayList; | |
import java.util.Collections; | |
import java.util.HashMap; | |
import java.util.List; | |
import java.util.Map; | |
import java.util.PriorityQueue; | |
import java.util.Queue; |
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 <algorithm> | |
#include <string> | |
#include <iostream> | |
using namespace std; | |
int main() { | |
// create alphabet (lowercase) | |
char letters[26]; | |
for (int i = 0; i < 26; i++) { | |
letters[i] = 'a' + i; |
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
#!/usr/bin/env python | |
import os | |
import random | |
import zipfile | |
def is_zipfile(f): | |
return os.path.isfile(f) and os.path.splitext(f)[1].lower() == ".zip" |
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 com.lchau; | |
public class Permutations { | |
public static void main(String[] args) { | |
String str = "Hello, world"; | |
Permutations.permute(0, str.length() - 1, str.toCharArray()); | |
} | |
private static boolean match(int i, int j, char[] chars) { |
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
<!DOCTYPE html> | |
<html xmlns:xlink="http://www.w3.org/1999/xlink"> | |
<head> | |
<title>D3: Crosshair</title> | |
<style type="text/css"> | |
svg { | |
font: 11px sans-serif; | |
} | |
.line .crosshair { |
Example of a D3js time series graph with X,Y crosshairs and a threshold line. Just copy the drawLineGraph function and call it with your data. The data shoud be an array of two element arrays. Something like:
var data = [
[new Date(2014, 01, 10), 404],
[new Date(2014, 01, 11), 123],
[new Date(2014, 01, 12), 666]
];
var warnLine = { lineValue: 200, label: 'my important threshold' };
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
// https://raw.githubusercontent.com/eligrey/FileSaver.js/master/FileSaver.js | |
/* FileSaver.js | |
* A saveAs() FileSaver implementation. | |
* 2014-08-29 | |
* | |
* By Eli Grey, http://eligrey.com | |
* License: X11/MIT | |
* See https://github.com/eligrey/FileSaver.js/blob/master/LICENSE.md | |
*/ |