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
PASS | |
f("I am learning Go!") = | |
map[string]int{"I":1, "am":1, "learning":1, "Go!":1} | |
PASS | |
f("The quick brown fox jumped over the lazy dog.") = | |
map[string]int{"brown":1, "over":1, "lazy":1, "dog.":1, "The":1, "quick":1, "fox":1, "jumped":1, "the":1} | |
PASS | |
f("I ate a donut. Then I ate another donut.") = | |
map[string]int{"I":2, "ate":2, "a":1, "donut.":2, "Then":1, "another":1} | |
PASS |
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 main | |
import ( | |
"net" | |
"os" | |
"fmt" | |
) | |
func main() { | |
// if script running without argument, give usage information |
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
# add this function on your .bashrc file to echoed Go version | |
function go_version { | |
version=$(go version) | |
regex="(go[0-9].[0-9].[0-9])" | |
if [[ $version =~ $regex ]]; then | |
echo ${BASH_REMATCH[1]} | |
fi | |
} | |
# and add to your PS1, for example |
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
/* | |
Usage: | |
viewPager.setPageTransformer(true, new CardTransformer(0.7f)); | |
*/ | |
public class CardTransformer implements PageTransformer { | |
private final float scalingStart; | |
public CardTransformer(float scalingStart) { | |
super(); |
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
[Desktop Entry] | |
Version=0.1 | |
Name=Processing | |
Comment=Processing | |
Exec=/path/to/exec/processing | |
Icon=/path/to/exec/lib/icon/some.png | |
Terminal=false | |
Type=Application | |
Categories=Application; |
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 lang="en"> | |
<head> | |
<meta charset="utf-8"> | |
<meta http-equiv="X-UA-Compatible" content="IE=edge"> | |
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no"> | |
<title>Wisdom - Startup Quote API</title> | |
<!-- Bootstrap --> | |
<link href="//maxcdn.bootstrapcdn.com/bootstrap/3.3.2/css/bootstrap.min.css" rel="stylesheet"> |
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
# The graph title | |
set title "Request time benchmark by pyk at github" | |
# legend/key | |
set key right top | |
# label x & y axis | |
set xlabel "requests" | |
set ylabel "ttime (ms)" |