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
// cal Pix size with given visual angle and screen info. | |
var scr = { | |
xpixels: 1024, | |
ypixels: 768, | |
width: 360, //mm | |
height: 270, //mm | |
} | |
var ang2pix = function(screen, angle, distense){ | |
var targetWidth = angle.h * distense / (180 / 3.14); |
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
import Data.Char (toLower) | |
import qualified Data.Map as Map -- (insertWith, empty, member) | |
import qualified Data.Set as Set -- (fromList, toList, union, unions) | |
main :: IO () | |
main = do | |
fileStr <- readFile "big.txt" | |
let training = words $ toLower <$> fileStr | |
let knowledge = foldl (\m word -> Map.insertWith (+) word 1 m) Map.empty training |
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
<script type='tmpl' class='donation'> | |
<pre> | |
<code class="language-javascript"> | |
if(post.content.isHelpful){ | |
$("button#donate").click(); | |
}; | |
</code> | |
</pre> | |
<button | |
type="button" |
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
find . -type f -name *.java | wc |
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
;.inputrc | |
set completion-ignore-case on | |
;.screenrc | |
startup_message off | |
hardstatus on | |
hardstatus alwayslastline | |
hardstatus string "%{.bW}%-w%{.rY}%n %t%{-}%+w %=%{..G} %H(%l) %{..Y} %Y/%m/%d %c:%s " |
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
[ -f "$1.class" ] && rm $1.class | |
for file in $1.java | |
do | |
echo "Compiling $file........" | |
javac $file | |
done | |
if [ -f "$1.class" ] | |
then | |
echo "-----------OUTPUT-----------" | |
java $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
Show hidden characters
//Java.sublime-build | |
{ | |
"cmd": ["javac", "$file"], | |
"selector": "source.java", | |
"encoding": "cp936", | |
"variants": | |
[{ | |
"name": "Run", | |
"cmd": ["java", "$file_base_name"] | |
}] |
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
#!/usr/bin/python | |
from distutils.sysconfig import get_python_lib | |
print get_python_lib() |
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
cd adt-X/sdk/platform-tools/ | |
./adb shell | |
mount -o remount,rw -t yaffs2 /dev/block/mtdblock3 /system | |
cd /system/bin | |
# try | |
cat sh > su |
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
*#*#717717#*#* |