發表文章

目前顯示的是 2017的文章

Makefile的賦值運算符(=, :=, +=, ?=)

Makefile的賦值運算符(=, :=, +=, ?=) 總結: = 是最基本的賦值 := 會覆蓋變數之前的值 ?= 變數為空時才給值,不然則維持之前的值 += 將值附加到變數的後面 另外 =, :=這兩賦值運算符號在網路上查詢,常常會看到這種說法: = 在執行時擴展(values within it are recursively expanded when the variable is used, not when it's declared) := 在定義時擴展(values within it are expanded at declaration time) 而白話一點的說法如下範例所示   1. =   make會將整個makefile展開後,才決定變數的值。也就是说,變數的值會是整個Makefile中最後被指定的值。看例子: x = hello y = $(x) world! x = hi all: @echo $(y)   在上例中,輸出結果將會是 hi world! ,而不是 hello world!   2. :=   變數的值在Makefile展開途中就會被給定,而不是整個Makefile展開後的最终值。 x := hello y := $(x) world! x := hi all: @echo $(y)   輸出結果 ====> hello world!

Excel 工作表密碼保護的解除方法

當開啟一個 Excel工作表,進入後要看工作表上的公式如何運作,才發現工作表受到密碼保護,上網搜尋了一下破解方法,試過很多種方法都太麻煩,最後終於找到最簡單的破解方法,借此分享,希望用的到的人不必再一一去試。 Excel 工作表密碼保護的解除方法 利用 VBA 巨集程式破解法: 1:打開該文件,切換到“檢視”選項,點擊“巨集”→“錄製巨集”,出現“錄製巨集”窗口,在“巨集名稱”隨意輸入一名稱(假設:ABC),點擊“確定”退出; 2:再點擊“巨集”→“檢視巨集”,選擇“巨集名稱”下的“ABC”並點擊右邊的“編輯”,會自動打開“Microsoft Visual Basic”編輯器,用以下的內容完全替換右側窗口中的所有編碼: Sub  ABC( )    Dim i As Integer, j As Integer, k As Integer    Dim l As Integer, m As Integer, n As Integer    Dim i1 As Integer, i2 As Integer, i3 As Integer    Dim i4 As Integer, i5 As Integer, i6 As Integer    On Error Resume Next    For i = 65 To 66: For j = 65 To 66: For k = 65 To 66       For l = 65 To 66: For m = 65 To 66: For i1 = 65 To 66          For i2 = 65 To 66: For i3 = 65 To 66: For i4 = 65 To 66             For i5 = 65 To 66: For i6 = 65 To 66: For n = 32 To 126                ActiveSheet.Unprotect Chr(i) & Chr(j) & Chr(k) & _                Chr(l) & Chr(m) & Chr(i1) & Chr(i2) & Chr(i3) & _                

USB 相關

USB 相關     先記錄,再研究 1. USB Host 簡介     http://pollos-blog.blogspot.tw/2015/08/usb-host.html 2. USB Video Class 簡介     http://pollos-blog.blogspot.tw/2014/10/usb-video-class.html 3. USB PTP/MTP 簡介     http://pollos-blog.blogspot.tw/2014/10/usb-ptpmtp.html 4. RS232 over USB 簡介     http://pollos-blog.blogspot.tw/2014/10/rs232-over-usb.html 5. USB Mass Storage Class 簡介     http://pollos-blog.blogspot.tw/2014/10/usb-mass-storage-class.html 6. USB 簡介     USB 簡介[1]    http://pollos-blog.blogspot.tw/2014/07/usb-1.html     USB 簡介[2]    http://pollos-blog.blogspot.tw/2014/07/usb-2.html     USB 簡介[3]    http://pollos-blog.blogspot.tw/2014/07/usb-3.html     USB 簡介[4]    http://pollos-blog.blogspot.tw/2014/07/usb-4.html     USB 簡介[5]    http://pollos-blog.blogspot.tw/2014/07/usb-5.html     USB 簡介[6]    http://pollos-blog.blogspot.tw/2014/07/usb-6.html     USB 簡介[7] - Zero Length Packet    http://pollos-blog.blogspot.tw/2014/08/usb-7.html     USB 簡介[8]

monitor tar-progress in linux using pv command

tar cf - /folder-with-big-files -P | pv -s $(du -sb /folder-with-big-files | awk '{print $1}') | gzip > big-files.tar.gz 4.69GB 0:04:50 [16.3MB/s] [==========================> ] 78% ETA 0:01:21 $ pv big-files.tar.gz | tar xjf - -C target_directory reference:         http://www.tecmint.com/monitor-copy-backup-tar-progress-in-linux-using-pv-command/

distcc

distcc is a tool for speeding up compilation of source code by using distributed computing over a computer network. 此工具就是可以把編譯進行分散式的處理,相當方便快速。 利用 3 台 pc 實現 distcc ... 1. 先安裝好 apt-get install distcc 2. 在每台 pc 時,開啟 distcc daemon server     # distccd --daemon --allow 127.0.0.1 --allow 10.100.90.0/24 3.   time make -j10 CC="distcc arm-arago-linux-gnueabi-gcc" CROSS_COMPILE=arm-arago-linux-gnueabi- ARCH=arm uImage real 1m48.143s user 5m55.716s sys 0m12.236s  export DISTCC_HOSTS="localhost 10.100.90.232 10.100.90.240"  time make -j10 CC="distcc arm-arago-linux-gnueabi-gcc" CROSS_COMPILE=arm-arago-linux-gnueabi- ARCH=arm uImage real 1m4.804s user 2m45.832s sys 0m8.844s  export DISTCC_HOSTS="--randomize localhost 10.100.90.232 10.100.90.240,cpp,lzo"  time distcc-pump make -j16 CC="distcc arm-arago-linux-gnueabi-gcc" CROSS_COMPILE=arm-arago-linux-gnueabi- ARCH=arm uImage real 0m59.147s user 2

Windows Installer Errors 2738 and 2739

2738, Could not access VBScript run time for custom action. 2739, Could not access JScript run time for custom action. VBScript 1. regedit,刪除機碼 "HKCU\SOFTWARE\Classes\Wow6432Node\CLSID\{B54F3741-5B07-11CF-A4B0-00AA004A55E8}" 2. 用Administrator的身份啟動命令提示字元,然後執行以下指令: 64-bit version of Windows: cd c:\windows\syswow64 regsvr32 vbscript.dll 32-bit version of Windows: cd c:\windows\system32 regsvr32 vbscript.dll JScript 1. regedit,刪除機碼 "HKCU\SOFTWARE\Classes\Wow6432Node\CLSID\{F414C260-6AC0-11CF-B6D1-00AA00BBBB58}" 2. 用Administrator的身份啟動命令提示字元,然後執行以下指令: 64-bit version of Windows: cd c:\windows\syswow64 regsvr32 jscript.dll 32-bit version of Windows: cd c:\windows\system32 regsvr32 jscript.dll referencd: https://tw.answers.yahoo.com/question/index?qid=20100713110248AAGkno2   https://blogs.msdn.microsoft.com/heaths/2007/05/31/windows-installer-errors-2738-and-2739-with-script-custom-actions/   http://boyilee.blogspot.tw