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
root@pws1:~# emacs /etc/apt/sources.list | |
root@pws1:~# apt-get update | |
Ign cdrom://[Debian GNU/Linux 8 _Jessie_ - Official Snapshot amd64 LIVE/INSTALL Binary 20170116-23:16] jessie InRelease | |
Ign cdrom://[Debian GNU/Linux 8 _Jessie_ - Official Snapshot amd64 LIVE/INSTALL Binary 20170116-23:16] jessie Release.gpg | |
Ign cdrom://[Debian GNU/Linux 8 _Jessie_ - Official Snapshot amd64 LIVE/INSTALL Binary 20170116-23:16] jessie Release | |
Ign cdrom://[Debian GNU/Linux 8 _Jessie_ - Official Snapshot amd64 LIVE/INSTALL Binary 20170116-23:16] jessie/main amd64 Packages/DiffIndex | |
Ign cdrom://[Debian GNU/Linux 8 _Jessie_ - Official Snapshot amd64 LIVE/INSTALL Binary 20170116-23:16] jessie/main Translation-en_US | |
Ign cdrom://[Debian GNU/Linux 8 _Jessie_ - Official Snapshot amd64 LIVE/INSTALL Binary 20170116-23:16] jessie/main Translation-en | |
Get:1 http://debian.csie.ntu.edu.tw stretch InRelease [184 kB] | |
Get:2 http://security.debian.org stretch/updates InRelease [62.9 kB] |
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
root@pws1:~# apt-get install -f | |
Reading package lists... Done | |
Building dependency tree | |
Reading state information... Done | |
The following packages were automatically installed and are no longer required: | |
libalgorithm-c3-perl libarchive-extract-perl libcgi-fast-perl libcgi-pm-perl | |
libclass-c3-perl libclass-c3-xs-perl libcpan-meta-perl libdata-optlist-perl | |
libdata-section-perl libfcgi-perl libintl-perl liblog-message-perl | |
liblog-message-simple-perl libmodule-build-perl libmodule-pluggable-perl | |
libmodule-signature-perl libmro-compat-perl libpackage-constants-perl |
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
use std::env::args; | |
use std::iter::FromIterator; | |
use std::io::BufReader; | |
use std::fs::File; | |
use std::io::BufRead; | |
struct Runner; | |
trait Run { | |
fn run(&self, path: &str) -> std::io::Result<()> { |
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 python3 | |
from PIL import Image | |
import sys, colorsys, numpy as np | |
import matplotlib.pylab as mp | |
img = Image.open(sys.argv[1]) | |
pix = img.load() | |
w, h = img.size | |
rarr = np.zeros((w, h), 'int32') |
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
Define/Discuss about test criteria | |
* app launch time | |
Discuss current implementation, start loading/end loading. | |
* suspend/resume | |
Time: receiving "power button" event -> first frame | |
* Boot time | |
Time: initrc -> lock screen ready. (visually loaded) | |
* Scrolling response time | |
Time: receiving touch event -> first composition that reflects the scrolling. | |
* Long drag/Contineously scrolling. |
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
/** | |
* Definition for binary tree | |
* struct TreeNode { | |
* int val; | |
* TreeNode *left; | |
* TreeNode *right; | |
* TreeNode(int x) : val(x), left(NULL), right(NULL) {} | |
* }; | |
*/ | |
class Solution { |
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
revs :: [a] -> [a] | |
revs [] = [] | |
revs (x:xs) = (revs xs) ++ [x] | |
-- return a list that is consisted by | |
reverseAppend :: [a] -> [a] -> [a] | |
reverseAppend [] r = r | |
reverseAppend (x:xs) t = reverseAppend xs $ x:t | |
revs2 :: [a] -> [a] |
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
divisibleByList :: Int -> [Int] -> Bool | |
divisibleByList n l | length l == 0 = False | |
divisibleByList n l = if ( rem n $ head l ) == 0 | |
then True | |
else divisibleByList n $ tail l | |
getListPrime :: Int -> Int -> [Int] -> [Int] | |
getListPrime s n l | s == n = l | |
| otherwise = if divisibleByList s l | |
then getListPrime (s + 1) n l |
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 | |
# ./unzip-big5.py xxx.zip | |
import zipfile | |
import os.path | |
import os | |
import sys | |
zfile = zipfile.ZipFile(sys.argv[1]) | |
for big5name in zfile.namelist(): | |
name = big5name.decode('big5') |
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
# | |
# deb cdrom:[Debian GNU/Linux 7.2.0 _Wheezy_ - Official amd64 CD Binary-1 20131012-14:05]/ wheezy main | |
# deb cdrom:[Debian GNU/Linux 7.2.0 _Wheezy_ - Official amd64 CD Binary-1 20131012-14:05]/ wheezy main | |
deb http://debian.nctu.edu.tw/debian/ sid main | |
deb-src http://debian.nctu.edu.tw/debian/ sid main | |
deb http://debian.nctu.edu.tw/debian/ sid non-free |
NewerOlder