2016年6月18日 星期六

2016年5月18日 星期三

買動漫電話詐騙紀錄

目前收到買動漫的詐騙三次了,所以就打個文記錄一下吧

標準程序:
1. 購買商品確認
2. 是否已收到貨 或 是否親自收貨
3. 是否滿意
4. 對方查帳,發現要付12次款,是否要購買12次
--
本人接通記錄
第一次:
是否親收(是)
→詐騙掛斷

第二次:
是否要買12次(是)
→詐騙掛斷

第三次:
是否要購買12個(是)
請問要什麼時候寄出(現在)
→詐騙掛斷

是說對方表示我買了十二次的速吸艦
什麼時候才要到啊

2016年5月4日 星期三

2016.05.03 指南客運9069 南港展覽館→國道一號→桃園

公路公車國道客運9069路線
指南客運、中壢客運聯營
南港展覽館發 桃園行
南港車站、松山車站、行天宮、國道一號、大有路經由
指南客運 592-U6

2016年4月12日 星期二

2016.04.12 混合客運 南港→西門→迴龍→桃園

混合搭乘,從南港→桃園全程市區公車
臺北市區公車205 臺北客運670-FM 中華科技大學發 東園行 南港→中華路北站
新北市區公車635 三重客運295-XH 臺北發 迴龍行 中華路北站→捷運迴龍站
桃園市區公車BR 桃園客運079-FX 捷運迴龍站發 桃園行 捷運迴龍站→桃園

2016年3月15日 星期二

2016.03.14 中壢客運9009路線 市府轉運站→國道三號→桃園

公路公車國道客運9009路線
中壢客運619-U7
市府轉運站21:30發 國道三號經由 桃園行
市府轉運站→國泰駕訓班

2016年3月11日 星期五

$Windows.~BT 與 $Windows.~WS 強迫升級 Windows 10

最近在兩週內連續被強迫兩次下載了 Windows 10 的 image。其中一次還用了手機的4G下載……。為了免麻煩所以記錄一下如何移除好了

首先是移除這個更新。這個更新會使得電腦自動下載 Windows 10 的 image。
KB3035583
再來是在 cmd 中打不下列命令,這樣檔案就可以移除了
takeown /F C:\$Windows.~BT\* /R /A
icacls C:\$Windows.~BT\*.* /T /grant administrators:F
rmdir /S /Q C:\$Windows.~BT\

參考網頁:
小心電腦會自行下載龐大的Windows 10安裝檔,即使你沒預約升級! | iThome
Can I delete $Windows.~BT & $Windows.~WS folders?

2016年3月7日 星期一

Extracting all zip in a directory to separated folder according to zip's name

Two things to do.

1. download 7za.exe, which can be found in the package "7-Zip Extra: standalone console version, 7z DLL, Plugin for Far Manager" in this page.

2. Extract 7za.exe to the folder that contains the zip you want to unzip. Use the command to unzip.
7za x *.zip -o*

2016年2月19日 星期五

一些與hadoop有關的命令記錄

直接對同機台上另一個帳號下命令

su hdfs -c '~/hdfs/sbin/stop-dfs.sh'

使用hadoop streaming

bin/hadoop jar share/hadoop/tools/lib/hadoop-streaming-2.7.1.jar \
    -input /usr/ctfan/input01 \
    -output /usr/ctfan/output/folder \
    -mapper mapper.py \
    -reducer reducer.py \
    -file ~/ctfan/pyStreaming/mapper.py \
    -file ~/ctfan/pyStreaming/reducer.py

mapper.py

#!/usr/bin/env python
import sys
for line in sys.stdin:
    line = line.strip()
    words = line.split()
    for word in words:
        print '%s\t%s' % (word, 1)

reducer.py

#!/usr/bin/env python
from operator import itemgetter
import sys
current_word = None
current_count = 0
word = None
for line in sys.stdin:
    line = line.strip()
    word, count = line.split('\t', 1)
    try:
        count = int(count)
    except ValueError:
        continue

    if current_word == word:
        current_count += count
    else:
        if current_word:
            print '%s\t%s' % (current_word, current_count)
        current_count = count
        current_word = word

if current_word == word:
    print '%s\t%s' % (current_word, current_count)

單機測試streaming命令

echo 'a b c a b' | ./mapper.py | sort -k1,1 | ./reducer.py

參考網頁

hadoop官方文件
Michael G. Noll's Blog