發表文章

Use 7z+*.BAT to backup at work

Following the previous post , I apply the application, 7z ( http://www.7-zip.org/ ), instead this time. The reason is obvious: sometimes our work environment might not allow us installing WinRar. The major differences are 7zip doesn't support auto-seed in parameter (in another word, 7zip will replace the file with the same file name because of using "a" in parameter). Therefore, I have to get the "seeds" from current time. 7zip will show the detail during the compressing process (i.e. print out every file name). Thus I use the command script to output the detail into a TXT file, log.txt.

One simple way to capture values in Word Table via Excel

There is one daily task from my colleague that she has to input a lot of values from Word files. The content of Word files is in simple form (table-like) format. However, the providers refused to provide in Excel files, which have further using possibility. So she would print out Word files in hard copy and input values into a fixed formatted Excel file.

綜所稅申報的甘苦談

圖片
這幾天都在嘗試用「金融憑證」進行網路綜所稅申報作業,用了我刻意去辦得金融憑證,卻始終無法成功,沒想到結論居然這麼「機車」! 明明告訴你要檢查是否為最新版的程式,檢查的結果也都是如此,但卻一直發生下面的問題「下載失敗,可能為網路連線狀況異常所致,請重新執行下載作業!!」。

Use RAR+*.BAT to backup at work

Just a note for the future when there is another need to use WinRAR to backup files at work. Next time I won't have to read RAR document again. (I will post the similar purpose script for using 7-Zip instead of WinRAR at my last work). Script as BAT: ECHO OFF SETLOCAL @ECHO BEGIN to backup files "C:\Program Files\WinRAR\rar.exe" a -m5 -ag{<file_prefix>}YYYYMMDD-NN "<target path>" "<source path>" @ECHO ZIP END ENDLOCAL

ASP.NET 2.0 - Give me table border back!!

Someone asked me about why tables in his pages will have no border just after upgrading from .NET 1.1 to .NET 2.0 without any code changing. It was easy (relatively) to find the root cause, but it took me some time to find a simplest solution for him. Problem description : WebControls DataGrid & Table will render without border even it is set in gridline/border property in the code. Analysis: After comparing the output HTML of .NET 1.1 & .NET 2.0, both will have a HTML table with correct border settings in HTML attribute Style: style="border-color:#000000; " But there is another HTML attribute named bordercolor set with right color as value in .NET 1.1: bordercolor="#000000" Therefore, the root cause is that there is no such attribute "bordercolor" in element “Table” according to HTML 4.01 speciation. Attribute “bordercolor” is one of the IE-ONLY attributes (from IE 3+), but IE6 does not recoginize CSS border-color . Thus, .NET 2.0 renders corr...

在Windows下自動備份Oracle資料

使用Oracle Client的公用程式,自動備份資料庫Schema的資料與procedures。 echo off SETLOCAL for /F "tokens=1-4 delims=/ " %%i in ('date /t') do ( set Year=%%i set Month=%%j set Day=%%k set DayOfWeek=%%l ) @echo Date:%DayOfWeek% set NLS_LANG=AMERICAN_AMERICA.AL32UTF8 EXP LoginUserName / YourPassword @ OracleTNS file= OutputPrefix_ %Year%%Month%%Day% owner= ExportSchemaName ENDLOCAL

ASP.NET 2.0 手扎-GridView,書上沒告訴你的事

翻到今年三月正式建構ASP.NET 2.0的系統時,參考同事的「 ASP.NET 2.0學習手冊」發現:怎麼會有些不容易發現的小地方,造成耗費不少時間找問題癥結,最後都是一些小小的地方,或許是「貼心的設計/預設值」,但卻與我直覺有一些差異,因此解了問題後特別記下筆記,供自己未來參考。分享之。