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
#!/bin/bash | |
# | |
# Usage: sudo ./mount-raspbian-image <imagename> | |
# | |
if [ -z "$1" ] | |
then | |
echo "Usage: sudo ./mount-raspbian-image <imagename>" | |
exit | |
fi |
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
%% Math %% | |
si = @(x) sin(x) ./ x; % cardinal sine without pi multiplied argument | |
hsin = @(x) 0.5*(1.0 - cos(x)); % haversed sine | |
hcos = @(x) 0.5*(1.0 + cos(x)); % haversed cosine | |
sigm = @(x,k) 0.5*tanh(0.5*k*x) + 0.5; % sigmoid function to (exp(-kx)+1)^-1 |
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
// ref: https://groups.google.com/forum/#!topic/android-developers/M-g3LqIY_xM | |
private String getProperty(String name, String defaultValue) { | |
ArrayList<String> processList = new ArrayList<String>(); | |
String line; | |
Pattern pattern = Pattern.compile("\\[(.+)\\]: \\[(.+)\\]"); | |
Matcher m; | |
try { | |
Process p = Runtime.getRuntime().exec("getprop"); |
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
{ | |
"anytime" : [ | |
"Hey there sexy!", | |
"I hope your day is as nice as your face!", | |
"Have you been working out?", | |
"I'm lucky to be your mirror!", | |
"The Force is strong with you", | |
"If I could high five you... I would!", | |
"On a scale from 1 to 10, you're an 15!", | |
"Being awesome is hard, but you'll manage", |
OlderNewer