2013年9月30日 星期一

Windows search files bu access time

SearchMyFiles v2.40 - Alternative to 'Search For Files And Folders' module of Windows + Duplicates Search

2013年9月29日 星期日

ThinkPad Edge E135 Debian Linux 驅動

Linux 3.2.0-2-486 32-bit
Debian testing

 

溫度 Temperature Sensors
OK
// CPU
$ cat /sys/class/thermal/thermal_zone0/temp
//
$ sensors


CPU 頻率調整 Dynamic CPU Frequency
OK
$ cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_frequencies
1750000 1400000 875000
# cpufreq-set -c 0 -f 1400000


有線網路 Ethernet
OK



無線網路 Wireless
02:00.0 Network controller: Broadcom Corporation BCM43228 802.11a/b/g/n
02:00.0 0280: 14e4:4359

使用 wl 驅動

Install Broadcom wireless driver on Debian



觸控板 - 雙指滾動 Touchpad
OK


Webcam
OK
$ dmesg | grep Camera
[    3.209285] uvcvideo: Found UVC 1.00 device Integrated Camera (5986:0299)


音效 Sound Card
$ alsamixer
按 [F6] 選擇裝置,看看哪一個選項最多,即應為主裝置

$ cat /proc/asound/cards  # 列出裝置代號
 0 [Generic        ]: HDA-Intel - HD-Audio Generic
                      HD-Audio Generic at 0xf0b44000 irq 45
 1 [Generic_1      ]: HDA-Intel - HD-Audio Generic
                      HD-Audio Generic at 0xf0b40000 irq 16
29 [ThinkPadEC     ]: ThinkPad EC - ThinkPad Console Audio Control
                      ThinkPad Console Audio Control at EC reg 0x30, fw unknown

# 設定音效主裝置
$ vi /etc/asound.conf

$ vi ~/.asoundrc
pcm.!default {
    type hw
    card Generic_1
}

ctl.!default {
    type hw
    card Generic_1
}

$ speaker-test -c 2  # 聲音輸出測試

Advanced Linux Sound Architecture
ALSA - Debian Wiki


顯示晶片 Graphical

使用 xserver-xorg-video-ati 驅動

Debian 安裝 AMD 開源顯卡驅動

[    2.613552] [drm:radeon_pci_probe] *ERROR* radeon kernel modesetting for R600 or later requires firmware-linux-nonfree.
 
# apt-get install firmware-linux-nonfree


亮度 screen backlight
# vi /boot/grub/menu.lst
kernel          /boot/vmlinuz-3.2.0-2-486 root=/dev/sda1 ro quiet vga=0x323 thinkpad-acpi.brightness_enable=1 acpi_backlight=vendor

Kernel/Debugging/Backlight - Ubuntu Wiki
nvidia - Screen brightness control not working on Lenovo T530 - Ask Ubuntu
Backlight - ArchWiki



快捷鍵 hotkey
亮度功能調整好後,快捷鍵功能

音量調整功能無法作用,使用 xbindkeys 綁定

Linux 快捷鍵綁定





Installing Debian 7.0 (Wheezy) on a ThinkPad Edge E135 - ThinkWiki
Debian 7.1 on ThinkPad Edge E135 - ブログっぽい何か

Debian on Thinkpad Edge 11 (Edge E130)" | Vincent Bernat

InstallingDebianOn/Thinkpad/Edge-E130/wheezy - Debian Wiki


Debian HCL; Debian GNU/Linux device driver check & report
PCI IDWorks?VendorDeviceDriverKernel
10221510
Advanced Micro Devices [AMD]Family 14h Processor Root Complex

10029808YesAdvanced Micro Devices [AMD] nee ATIWrestler [Radeon HD 7340]radeonv3.1.0-
10021314
Advanced Micro Devices [AMD] nee ATIWrestler HDMI Audio [Radeon HD 6250/6310]

10221513
Advanced Micro Devices [AMD]Family 14h Processor Root Port

10221514
Advanced Micro Devices [AMD]Family 14h Processor Root Port

10221515
Advanced Micro Devices [AMD]Family 14h Processor Root Port

10227812
Advanced Micro Devices [AMD]FCH USB XHCI Controller

10227801
Advanced Micro Devices [AMD]FCH SATA Controller [AHCI mode]

10227807
Advanced Micro Devices [AMD]FCH USB OHCI Controller

10227808
Advanced Micro Devices [AMD]FCH USB EHCI Controller

10227807
Advanced Micro Devices [AMD]FCH USB OHCI Controller

10227808
Advanced Micro Devices [AMD]FCH USB EHCI Controller

1022780bYesAdvanced Micro Devices [AMD]FCH SMBus Controlleri2c-piix4v2.6.32-
1022780dYesAdvanced Micro Devices [AMD]FCH Azalia Controllersnd-hda-intelv3.0.0-
1022780e
Advanced Micro Devices [AMD]FCH LPC Bridge

1022780f
Advanced Micro Devices [AMD]FCH PCI Bridge

10227809
Advanced Micro Devices [AMD]FCH USB OHCI Controller

10221700
Advanced Micro Devices [AMD]Family 12h/14h Processor Function 0

10221701
Advanced Micro Devices [AMD]Family 12h/14h Processor Function 1

10221702
Advanced Micro Devices [AMD]Family 12h/14h Processor Function 2

10221703YesAdvanced Micro Devices [AMD]Family 12h/14h Processor Function 3k10tempv2.6.38-
10221704
Advanced Micro Devices [AMD]Family 12h/14h Processor Function 4

10221718
Advanced Micro Devices [AMD]Family 12h/14h Processor Function 6

10221716
Advanced Micro Devices [AMD]Family 12h/14h Processor Function 5

10221719
Advanced Micro Devices [AMD]Family 12h/14h Processor Function 7

14e44359
Broadcom CorporationBCM43228 802.11a/b/g/n

10ec8168YesRealtek Semiconductor Co., Ltd.RTL8111/8168 PCI Express Gigabit Ethernet controllerr8169v2.6.25-
10ec5209YesRealtek Semiconductor Co., Ltd.RTS5209 PCI Express Card Readerrts_pstorv3.0.0-

Install Broadcom wireless driver on Debian

許多 Broadcom 無線網路卡驅動程式可透過 firmware-b43-installer 及 b43fwcutter 自動下載安裝
# apt-get install firmware-b43-installer



Broadcom 43xx wireless devices 驅動方案及 firmware-b43-installer 使用方法
https://wiki.debian.org/bcm43xx


firmware-b43-installer Troubleshooting
https://help.ubuntu.com/community/BroadcomSTA(Wireless)


firmware-b43-installer 支援的 Broadcom 型號以及其他替代方案
http://wireless.kernel.org/en/users/Drivers/b43





Broadcom BCM43228 安裝 Broadcom-STA (wl) 驅動 (使用 moduel-assistant)
# lspci -n | grep 14e4
02:00.0 0280: 14e4:4359
# apt-get install module-assistant wireless-tools
# m-a a-i broadcom-sta
# echo blacklist brcm80211 >> /etc/modprobe.d/broadcom-sta-common.conf
# update-initramfs -u -k $(uname -r)
# modprobe -r b44 b43 b43legacy ssb brcm80211
# modprobe wl
HOW TO: Install Broadcom-STA (wl) driver in LMDE - Linux Mint Community

2013年9月26日 星期四

Chitin 幾丁質

幾丁質 Chitin:
甲蟲類、蝦蟹的外殼中含有幾丁質,成為外骨骼,所以可以舉起比自己重好幾倍的物體。


蝦蟹殼中的寶貝──幾丁質


巴西角蟬
頭上的球狀物體即為幾丁質所組成,周圍還有細鋼毛,可用來避免被捕食。


Bocydium globulare 巴西角蟬
http://headsup.boyslife.org/meet-the-brazilian-treehopper/

「巴西角蟬」頭頂地球儀 幾丁質球體具超能感應?


以昆蟲界力氣與重量比例來說:
糞金龜 Dung beetle (1141) > 獨角仙 Rhinoceros beetle (850) > 螞蟻 Ant (300倍)

糞金龜 Dung beetle

Sex games: dung beetle pulls 1141 times its own body weight



機器人外骨骼:
藉由模仿昆蟲的外骨骼,將動力機械包覆在人體外,可以使人增強動能。

第一個外骨骼動力服 Hardiman
http://insiderblog.hu/blogzine/2013/08/19/a-ge-sajat-vasembere/

可以使人輕鬆搬起彈頭的 HULC
http://blog.koldcast.tv/2010/koldcast-news/15-futuristic-weapons-that-will-certainly-make-a-mess/

未來行動輔助裝置—超越人體極限的機器人外骨骼 | PanSci 泛科學
The Army's New Bionic Exoskeleton Makes Soldiers Stronger And Faster - Business Insider

2013年9月25日 星期三

web sidebar

Sidr - A jQuery plugin for creating side menus
http://www.berriart.com/sidr/#getstarted


jPanelMenu | A jQuery Plugin
http://jpanelmenu.com/

HTML / CSS Frameworks

Pure
http://purecss.io/

Bootstrap
http://getbootstrap.com/

HTML KickStart
http://www.99lime.com/elements/

Semantic UI
http://semantic-ui.com/element.html


Mobile :
Lungo - HTML5 Cross-Device Framework
http://lungo.tapquo.com/




Reference :
bmark -title="18 Best CSS Frameworks for Accelerated Development | Code Geekz" http://codegeekz.com/css-frameworks-for-accelerated-development/

DRBD - 基於網路的 RAID-1 檔案系統層

DRBD can be understood as network based raid-1.


        +--------+
        |  文件系統 |
        +--------+
             |
             V
        +----------+
        |   塊設備層  |
        | (/dev/drbd1) |
        +----------+
         |            |
         |            |
         V           V
   +----------+  +-----------+
   |  本地硬盤   |   | 遠程主機硬盤 |
   | (/dev/hdb1)  |   | (/dev/hdb1)  |
   +----------+  +-----------+



Reference :
DRBD:What is DRBD
DRBD 使用手冊 - 寶貝煜煜 - ruild - 和訊博客

Tile 失物搜尋



* 電池約使用一年
* 不用充電、換電池,因為直接買一個新的 XD


* 使用藍牙 Bluetooth 4.0 作為訊號傳輸
* 支援 iOS7;目前不支援 Android (Bluetooth 4.0 關係)





Reference :
Tile - the world's largest lost and found

Inside iOS 7: iBeacons enhance apps' location awareness via Bluetooth LE

遠端安裝服務 Remote Installation Service,RIS

要遠端安裝 Windows 的那台電腦要有支援網路開機 (Boot from LAN) 另外還要架一台 RIS Server



RIS Server 步驟
1. 安裝一台Windows 2000 or Windows 2003 Server (P.S. 一定要是Server 不能是Professional)
2. 架設DNS Service
3. 架設DHCP Service
4. 架設Active Directory
5. 架設Remote Install Service
6. 放入Windows XP 安裝光碟 製作映像目錄
7. 調整參數
8. 終於可以遠端安裝了




Tags : 遠端重灌

Reference :
如何使用遠端安裝服務在遠端電腦上安裝 Windows Server 2003
電腦QA網 :: 討論區

2013年9月23日 星期一

python copy dictionary

dd = {'a': 1, 'b': 2}
aa = dd
aa['c'] = 3
print dd
bb = dd.copy()
bb['d'] = 4
print dd

python get dict by keys in dictionary

dd={'a': 1, 'b':2, 'c':3}
dict( (key,value) for (key,value) in dd.iteritems() if key in ('a','c') )




Reference :
Syntax for extracting multiple items from a dictionary - Python

sqlalchemy multi columns/fields primary key

Table(
    'table_name', metadata,
    Column('id', None, nullable=False),
    Column('email', None, nullable=False),
    PrimaryKeyConstraint('id', 'email'),
)
 
 
 
 
Reference :
python - Creating container relationship in declarative SQLAlchemy - Stack Overflow

2013年9月17日 星期二

python project install dependencies library

from setuptools import setup                                                

setup(
    name='project_name',
    install_requires=[
        'sqlalchemy',
    ] 
)


# python setup.py install

Unknown distribution option: 'install_requires'

from distutils.core import setup

from setuptools import setup

2013年9月15日 星期日

debian auto pair bluetooth mouse

檢視接收器是否存在
$ hcitool dev
 
掃描藍牙裝置 (裝置可能需按着 connect 按鍵三秒以上) 
$ hcitool scan

手動連結
# hidd --connect aa:bb:cc:dd:ee:ff
 
自動連結  
與藍牙裝置連線 (repair:重新建立裝置) (default PIN code might be '0000')
# bluez-simple-agent hci0 aa:bb:cc:dd:ee:ff [repair]
加入信任裝置
# bluez-test-device trusted aa:bb:cc:dd:ee:ff yes




Reference :
Ubuntu 12.04 persistent bluetooth pairing

2013年9月12日 星期四

php detect browser

if (preg_match("/(MSIE)[\/ ]?([0-9.]*)/", $_SERVER["HTTP_USER_AGENT"], $match))
{
    $browser['name'] = $match[1];
    $browser['version'] = $match[2];

    // IE 版本小於 8
    if((int)$browser['version'] <= 8)
    {  
        doSomething();                    
    }   
}




Reference :
How can I detect the browser with PHP or JavaScript? - Stack Overflow

javascript detect browser

if (navigator.userAgent.match(/msie/i) && navigator.userAgent.match(/msie [6|7|8]/i))
{
    doSomething();
}