2016年11月14日 星期一

小米盒子國際板 apk

這幾天隨著小米盒子國際版發貨有一些討論 不曉得大家能不能來推薦一些好用的 App 呢? 以下先列上目前有裝的 想說集中起來討論這樣以後要爬文也比較方便 PS. 標綠色的表示 Google Play 載的到,其他需要找 apk 或第三方市集 # 音樂、影片
* KKBOX * Spotify * YouTube - 部分直播節目無法調 1080p * dailymotion * Twitch * VLC - 測試過可以直接連上 MacBook 的 Samba,播放很順暢 * MX Player - 支援硬解 * KODI - 支援 4K 的多媒體播放器 - 似乎連不上 MacBook 的 Samba # 影音劇集、動畫 * Netflix * 愛奇藝 * 千尋 Station - 沒有擋 IP 問題 - 沒有選單鍵似乎無法切換片源? * 蜜蜂視頻 - 擋 IP 問題相對比較少 * bilibili # 電視直播 - HDP 直播 - 電視家 2.0 # 其他 * Sideload Launcher: 集合顯示所有側載安裝的 apk - 操作有點頓,不知有無替代品 * ES 檔案瀏覽器 - 似乎連不上 MacBook 的 Samba - 用 SFTP 連 MacBook 播影片很卡 * 樂播投屏 - http://www.hpplay.com.cn/ - 第三方 AirPlay 支援 - 安裝後不需要開在前景也可以使用 AirPlay - 與一般支援 AirPlay 的影音棒相容性差不多,部分 App 不相容 * 沙發管家: 第三方市集 - http://www.shafa.com/ - 很多影視類 App 會因為 IP 無法播放 * NBA # Google Cast 支援 * KKBOX - iOS 版換首無法自動連續播放 * KKTV * 中華影視 * friDay 影音 * nPlayer (iOS) * Airflow (Windows/macOS): 投放本地影片 - http://airflowapp.com/ * ... 更多: https://www.google.com/cast/apps/ # AirPlay 支援 * KKBOX * 追劇瘋 * 千尋影視 * Tubio * nPlayer * ...

2016年11月10日 星期四

遇到Unsupported major.minor version 51.0如何解決

遇到sun/tools/javac/Main : Unsupported major.minor version 51.0 (unable to load class sun.tools.javac.Main)問題是因為Java版本不同造成,可依照下列表知道目前使用的版本,例如51.0,則用jdk1.7.0編譯即可。


JDK 編譯器版本

target 參數
十六進位 minor.major
十進位 minor.major
jdk1.1.8
不能帶 target 參數
00 03 00 2D
45.3
jdk1.2.2
不帶(默認為 -target 1.1)
00 03 00 2D
45.3
jdk1.2.2
-target 1.2
00 00   00 2E
46.0
jdk1.3.1_19
不帶(默認為 -target 1.1)
00 03 00 2D
45.3
jdk1.3.1_19
-target 1.3
00 00   00 2F
47.0
j2sdk1.4.2_10
不帶(默認為 -target 1.2)
00 00   00 2E
46.0
j2sdk1.4.2_10
-target 1.4
00 00   00 30
48.0
jdk1.5.0_11
不帶(默認為 -target 1.5)
00 00   00 31
49.0
jdk1.5.0_11
-target 1.4 -source 1.4
00 00   00 30
48.0
jdk1.6.0_01
不帶(默認為 -target 1.6)
00 00   00 32
50.0
jdk1.6.0_01
-target 1.5
00 00   00 31
49.0
jdk1.6.0_01
-target 1.4 -source 1.4
00 00   00 30
48.0
jdk1.7.0
不帶(默認為 -target 1.6)
00 00   00 32
50.0
jdk1.7.0
-target 1.7
00 00   00 33
51.0
jdk1.7.0
-target 1.4 -source 1.4
00 00   00 30
48.0
Apache Harmony 5.0M3
不帶(默認為 -target 1.2)
00 00   00 2E
46.0
Apache Harmony 5.0M3
-target 1.4
00 00   00 30
48.0

2016年11月8日 星期二

[Android] Backup / restore  nv item:

Backup nv item:

Adb root
Adb remount
Adb shell dd if=/dev/block/bootdevice/by-name/modemst1 of=/data/modemst1.bak
adb pull /data/modemst1.bak .
adb shell dd if=/dev/block/bootdevice/by-name/modemst2 of=/data/modemst2.bak
adb pull /data/modemst2.bak .

erase nv item:

fastboot erase modemst1
fastboot erase modemst2
fastboot erase fsg

restore nv item:

fastboot flash modemst1 modemst1.bak

fastboot flash modemst2 modemst2.bak

2016年11月7日 星期一

第三季最新已更新上市櫃損益彙總暨各項財務連結查詢開放,歡迎分享,每日自動更新

http://www.i-stock.com.tw/paperall_o

Ubuntu 檢測硬碟的方式

完全用 GNU/Linux 工作

檢測硬碟 S.M.A.R.T. 健康狀態

S.M.A.R.T. 是個用來檢測硬碟健康狀況的指標,




安裝 smartmontools

套件 smartmontools 包含了 smartctl, smartd,是個可以監控 ATA, SCSI 硬碟 (storage) SMART (Self-Monitoring, Analysis and Reporting Technology System) 狀態的工具。我們可以透過它來進階設定各種硬碟退化、錯誤警告的回報機制。
+

安裝文字介面的檢測工具 smartmontools。
+

   # Debian, Ubuntu
   $ sudo aptitude install smartmontools 

   # CentOS, RHEL, Fedora
   $ sudo yum install smartmontools

smartctl

smartctl 主要是用來進行一次性、暫時性的硬碟掃描,以下為常見的使用方法。
+

  1. 查看該媒體是否支援 SMART 檢測。
    +

    # - 啟用 (Enabled)。
    $ sudo smartctl -i /dev/sda
    smartctl 5.41 2011-06-09 r3365 [x86_64-linux-3.8.0-31-generic] (local build)
    Copyright (C) 2002-11 by Bruce Allen, http://smartmontools.sourceforge.net
    
    === START OF INFORMATION SECTION ===
    Device Model:     ST3500413AS
    Serial Number:    Z2AAMWCL
    LU WWN Device Id: 5 000c50 035f695b1
    Firmware Version: JC45
    User Capacity:    500,107,862,016 bytes [500 GB]
    Sector Size:      512 bytes logical/physical
    Device is:        Not in smartctl database [for details use: -P showall]
    ATA Version is:   8
    ATA Standard is:  ATA-8-ACS revision 4
    Local Time is:    Wed Oct 16 21:04:44 2013 CST
    SMART support is: Available - device has SMART capability.
    SMART support is: Enabled
    
    # - 停用 (Disabled)。
    $ sudo smartctl -i /dev/sda
    smartctl 5.41 2011-06-09 r3365 [x86_64-linux-3.8.0-31-generic] (local build)
    Copyright (C) 2002-11 by Bruce Allen, http://smartmontools.sourceforge.net
    
    === START OF INFORMATION SECTION ===
    Device Model:     ST3500413AS
    Serial Number:    Z2AAMWCL
    LU WWN Device Id: 5 000c50 035f695b1
    Firmware Version: JC45
    User Capacity:    500,107,862,016 bytes [500 GB]
    Sector Size:      512 bytes logical/physical
    Device is:        Not in smartctl database [for details use: -P showall]
    ATA Version is:   8
    ATA Standard is:  ATA-8-ACS revision 4
    Local Time is:    Wed Oct 16 21:05:36 2013 CST
    SMART support is: Available - device has SMART capability.
    SMART support is: Disabled
    
  2. 若尚未啟用 SMART,可以使用 -s 參數開啟它。
    +

    $ sudo smartctl -s on /dev/sda
    smartctl 5.41 2011-06-09 r3365 [x86_64-linux-3.8.0-31-generic] (local build)
    Copyright (C) 2002-11 by Bruce Allen, http://smartmontools.sourceforge.net
    
    === START OF ENABLE/DISABLE COMMANDS SECTION ===
    SMART Enabled.
    
  3. 支援 SMART 後我們可以使用 -H 參數來手動檢查硬碟、隨身硬碟的建康狀態。
    +

    # - 通過 (passed)。
    $ sudo smartctl -H /dev/sda
    smartctl 5.41 2011-06-09 r3365 [x86_64-linux-3.8.0-31-generic] (local build)
    Copyright (C) 2002-11 by Bruce Allen, http://smartmontools.sourceforge.net
    
    === START OF READ SMART DATA SECTION ===
    SMART overall-health self-assessment test result: PASSED
    
    # - 失敗 (failed)。
    $ sudo smartctl -H /dev/sda
    smartctl 5.41 2011-06-09 r3365 [x86_64-linux-3.8.0-31-generic] (local build)
    Copyright (C) 2002-11 by Bruce Allen, http://smartmontools.sourceforge.net
    
    === START OF READ SMART DATA SECTION ===
    SMART overall-health self-assessment test result: FAILED!
    Drive failure expected in less than 24 hours. SAVE ALL DATA.
    Failed Attributes:
    ID# ATTRIBUTE_NAME          FLAG     VALUE WORST THRESH TYPE      UPDATED  WHEN_FAILED RAW_VALUE
    5 Reallocated_Sector_Ct   0x0033   004   004   005    Pre-fail  Always   FAILING_NOW 1887
    

smartd

smartd 是個可以把 smartmontools 註冊成例行性服務 (Daemon) 並使用排程來監控的程式,以下為啟用的步驟。
+

  1. 啟用 smartd。
    +

    $ sudo vim /etc/default/smartmontools
    ...
    start_smartd=yes
    smartd_opts="--interval=1800"
    
  2. 備份設定檔。
    +

    $ sudo cp /etc/smartd.conf /etc/smartd.conf.ori
    
  3. 編輯設定檔。
    +

    $ sudo vi /etc/smartd.conf
    ......
    
    # 掃描所有的 ATA/SCSI 設備並將報告寄送給 root。
    DEVICESCAN -d removable -n standby -m root -M exec /usr/share/smartmontools/smartd-runner
    
    # 每日 02:00 快速檢查 sda,每週六 03:00 完整檢查 sda。
    /dev/sda -a -o on -S on -s (S/../.././02|L/../../6/03)
    
    # 每日 04:00 快速檢查 sdb,每週六 05:00 完整檢查 sdb。
    /dev/sdb -a -o on -S on -s (S/../.././04|L/../../6/05)
    
    # 監控 SMART 狀態
    /dev/sda -H -l error -l selftest -t -I 194
    /dev/sdb -H -l error -l selftest -t -I 194
    
    # 安靜的檢查,並只郵寄建康狀態給 admin@example.tw
    /dev/sda -H -C 0 -U 0 -m admin@example.tw
    /dev/sdb -H -C 0 -U 0 -m admin@example.tw
    ......
    
  4. 啟用服務
    $ sudo /etc/init.d/smartmontools start
    
  5. 觀看記錄檔 (log)。
    +

    $ less /var/log/syslog
    ......
    Oct 17 08:59:47 thinkpad-t410 smartd[11523]: smartd 5.41 2011-06-09 r3365 [x86_64-linux-3.2.0-4-amd64] (local build)
    Oct 17 08:59:47 thinkpad-t410 smartd[11523]: Copyright (C) 2002-11 by Bruce Allen, http://smartmontools.sourceforge.net
    Oct 17 08:59:47 thinkpad-t410 smartd[11523]: Opened configuration file /etc/smartd.conf
    Oct 17 08:59:47 thinkpad-t410 smartd[11523]: Drive: DEVICESCAN, implied '-a' Directive on line 21 of file /etc/smartd.conf
    Oct 17 08:59:47 thinkpad-t410 smartd[11523]: Configuration file /etc/smartd.conf was parsed, found DEVICESCAN, scanning devices
    Oct 17 08:59:47 thinkpad-t410 smartd[11523]: Device: /dev/sda, type changed from 'scsi' to 'sat'
    Oct 17 08:59:47 thinkpad-t410 smartd[11523]: Device: /dev/sda [SAT], opened
    ......
    Oct 17 08:59:47 thinkpad-t410 smartd[11523]: Device: /dev/sda [SAT], found in smartd database.
    Oct 17 08:59:48 thinkpad-t410 smartd[11523]: Device: /dev/sda [SAT], is SMART capable. Adding to "monitor" list.
    Oct 17 08:59:48 thinkpad-t410 smartd[11523]: Device: /dev/sda [SAT], state read from /var/lib/smartmontools/smartd.ST9320423AS-5VH55XKG.ata.state
    ......
    Oct 17 08:59:48 thinkpad-t410 smartd[11525]: smartd has fork()ed into background mode. New PID=11525.
    Oct 17 08:59:48 thinkpad-t410 smartd[11525]: file /var/run/smartd.pid written containing PID 11525
    

+

當 SMART 亮起紅燈時,請儘速備份並更換硬碟。這時可以先拿先前淘汰的舊硬碟墊擋,否則就趕緊買顆新的補上了! (若您的硬碟保固還沒過,那您可以換新硬碟了,恭喜!)
+


2016年11月4日 星期五

141221 journal

14/12/21
The vocabularies below are the word I don
t understand when I
m reading
the book.
1.
Interfere-
1.
It feels uncomfortable when unknown people interferes the co
nversation.
2.
I
don
t like my parents interfere me while I
m study
ing.
2.
Interpretation-
1.
The interpretation of etymology is very interesting.
2.
To interpret an idea you have to make it reasonable
first
.
3.
Regardless-
1.
Regardless, Jackson still wants to go to the concert.
2.
Regardless of knee injuries he still wants to fight with hi
s teammates to win the championship.
4.
Intimate-
1.
I have an intimate friend that she always
ha
s same thought like I do.
2.
He like
s
to use intimate ways to tell others the secret.
5.
Novices-
1.
He is a novice of English.
2.
I used to be a novice
of
in
handball.
6.
Assume-
1.
She assumed that she is the queen of this class.
2.
John assumed to be the leader in the group.
7.
Abstract-
1.
That pretty girl abstract
ed
me when I was play in
playing
the game.
2.
This abstract is hard to understand.
8.
Jargon-
1.
In school of medical
the medical school
, there are lots of jargons to learn.
2.
Th
e person always talks
a
lot of jargon in the ball game.
9.
Obscure-
1.
The building is obscure that everybody
is
afraid to go in.
2.
The teacher makes the sentence obscure to understand.
10.
Inflate
1.
The balloon was inflated by the pump.
2.
Ankle sprain cause the ankle to inflate
swell up.
11.
Reluctant
1.
The dog seems reluctant to take a bath.
2.
His GF is reluctant to eat the carrot.
12.
Ideological
1.
Ideologically he is the leader of the class.
13.
Aesthetic
1.
Aesthetically, the painting looks meaningful.
14.
Intent
1.
The boy intent to make the girl to kiss him.
2.
I intent to scare my mom.
15.
Concrete
1. The house was made by concrete and steel
2. His theory is not concrete.
ESL-LAB
Student credit cards are becoming more and more popular, an
d a number of Web sites
can provide information on comparing your options. With
these ideas in mind, what are
the advantages and disadvantages of using credit cards, par
ticularly for people your age
and in similar financial situations?
In my opinion, I think that student credit card is a goo
d way to help the teenagers to learn how to
manage their money. Thought it will be a difficult
to learn how to handle the money
class to learn,
but it can help us to experience the adults
world. And to learn to control our desire of buying th
ings.