免責聲明

Disclaimer (免責聲明)
繼續閱覽代表您接受以上的免責聲明.
To continue reading means you accept the above disclaimer.

2011年12月29日 星期四

安全上網 Safe browsing tips, 上網安全嗎?

在試用OpenSuse, 搜尋到下列文章(2010.Jan.09發表的)

[ref]


覺得有道理, 摘譯如後, 提供參考

//=== Safe browsing(安全上網)
0. 別用無線網路進行關於錢的交易, 尤其是公共的WiFi熱點
1. 別太相信HTTPS/WPA2 雖然他們可能比HTTP/WPA or HTTP/WEP 安全一點
2. 在電腦中產生另一個safe-browing專用帳戶, 取消flash?, javascript?, 以及其他的addins
3. 別關掉防火牆
 ...

(詳細步驟 請參閱原文)

2011年12月25日 星期日

fstab, mtab

這兩個table頗像, 常搞混
fstab : filesystems table, 通常存在/etc/fstab or /etc/vfstab
mtab : mounted filesystems table, 通常存在/etc/mtab

根據wikipedia, 主要的差別在於mtab 只列出目前處於mounted狀態的裝置
而fstab 則列出所有可用的filesystems

有種說法 mtab 是 mount 這個命令參考fstab 執行後的結果 :
fstab -> mount -> mtab

那為何mtab中會出現 fstab中沒有的filesystem?

//===  摘錄
"... the main distinction being that the latter lists all available filesystems whereas the former lists only currently mounted ones ..."

fstab:
"... lists all available disks and disk partitions, and indicates how they are to be initialized or otherwise integrated into the overall system's file system..."

"... the options field simply contains a comma-separated list of options which will be passed directly to mount when it tries to mount the filesystem...."


[ref]
http://en.wikipedia.org/wiki/Mtab
http://en.wikipedia.org/wiki/Fstab

Windows 更新失敗該如何? 更新後 hyperV 跑不起來?

Windows 更新失敗, 出現 update error
[try]
  • safe Mode by F8
  • run cmd as admin
  • net stop cryptsvc
  • cd c:\windows\system32
  • ren catroot2 catroot3
  • reboot to normal mode
[ref]
http://social.technet.microsoft.com/Forums/en-US/itprovistasetup/thread/3a117c99-cac2-4383-b27c-64b50cf31bf8/

 //=== 更新後 hyperV 跑不起來? hyperV failed to start
[try]
  • run cmd as admin
  • Bcdedit /set {current} hypervisorlaunchtype auto
  • DEP/NoExecute : OptIn or OptOut?
或者試試 GUI tool,  EasyBCD

[ref]
http://social.technet.microsoft.com/forums/en-US/winserverhyperv/thread/ce2fbf98-91a4-413d-80aa-ed0cd5cc68d7



//=== Windows Server 2008 does not include the System Restore feature
[ref]
Microsoft Knowledgebase article 926185

2011年12月12日 星期一

Rgb, Argb, PArgb Bitmap

Windows 的Bitmap 含有三種容易混淆的格式 (PixelFormat)
Rgb: b-g-r (low memory address to high)
Argb: b-g-r-a
PArgb: pb-pg-pr-a

a=a/255f;
pb= a*b;
pg= a*g;
pr= a*r;


據說 PArgb 的Bitmap 畫起來比 Argb 快.



[ref]
http://www.codeproject.com/Tips/66909/Rendering-fast-with-GDI-What-to-do-and-what-not-to?display=Print

http://en.wikipedia.org/wiki/Premultiplied_alpha

2011年11月3日 星期四

bool 有多大?

bool 值 : 真或假 ,
基本上
一個bit 就足夠儲存
在硬碟/光碟/記憶體/... 佔掉 1 bit 的空間
在通信傳輸時佔掉 1/R 的時間,
R 是傳輸速率,
單位 bps(bits per second)

考量資料存取效率 通常 bool 會佔據byte的整數倍

在C# 中內建的 bool 佔 1 byte 而非 1 bit,
當要呼叫Windows Platform SDK 的API (C寫的函數) 時
若API參數型別為BOOL(佔4 bytes)
則從C#傳過來的1-byte bool 將會變成4-bytes BOOL
這就是一種 Marshal/Marshalling

那 bool 到底有多大?
1 bit
1 byte
4 bytes

還有2 bytes 的說法???

//=== 歷史
[ref] http://blogs.msdn.com/b/oldnewthing/archive/2004/12/22/329884.aspx

因為早期的 C 語言中 bool 並非內建型別, 所以後人就自己定了許多的 '布林'型別
1. BOOL (Windows 1.0 )
typedef int BOOL; //4 bytes

2. BOOLEAN (OS/2 NT team )
typedef BYTE BOOLEAN; // 1 byte

3. VARIANT_BOOL (Visual Basic folks)
typedef short VARIANT_BOOL;
#define VARIANT_TRUE ((VARIANT_BOOL)-1)
#define VARIANT_FALSE ((VARIANT_BOOL)0)


4. C++ 內建型別 bool , 1 byte ?

//=== 微軟
[ref] http://msdn.microsoft.com/en-us/library/tf4dy80a.aspx

Visual C++ 4.2, typedef int bool; //sizeof(bool) == 4
Visual C++ 5.0 之後, bool 變成 1 byte 的內建型別 //sizeof(bool) == 1

2011年10月14日 星期五

MathJax, MathML, and LaTex




懷念LaTex ? 或者揮不去的夢魘?

MathJax 讓使用者能夠在Html頁面中以LaTex語法加入方程式,
它也支援 MathML 語法.

得先引用 MathJax的javascript library,


0. config to set  in-line delimiter to $\$$

<script type="text/x-mathjax-config">
  MathJax.Hub.Config({tex2jax: {inlineMath: [['$\$$','$\$$'], ['\\(','\\)']]}});
</script>

1. 透過 http
<script type="text/javascript"
  src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML">
</script>

2. 或者透過https

<script type="text/javascript"
  src="https://d3eoax9i5htok0.cloudfront.net/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML">
</script>

當 $a \ne 0$, 方程式 \(ax^2 + bx + c = 0\) 有兩個解 :
$$x = {-b \pm \sqrt{b^2-4ac} \over 2a}.$$


[ref]
http://www.mathjax.org/docs/1.1/start.html

2011年10月7日 星期五

Ubuntu 基本工具

//=== 列出mounted filesystems
mount
mount -t 83

//===
列出 partition
sudo fdisk -l /dev/sda
sudo fdisk -l /dev/sdb


//=== GUI, Disk Usage Analyzer
Application -> Accessories -> Disk Usage Analyzer

2011年10月4日 星期二

Azure Cloud Try 1

//=== Create cloud project (VC# ->Windows  azure project)
New Windows Azure Project dialog ->  ASP.NET MVC 3 Web Role-> Internet Application

http://www.microsoft.com/windowsazure/learn/tutorials/getting-started-tutorial/3-add-a-cloud-project/
http://www.microsoft.com/windowsazure/learn/tutorials/getting-started-tutorial/6-create-a-hosted-service/

//===
Azure Emulator (Windows Azure SDK tools)
* compute emulator
* storage emulator
* need 1.3G bytes memory


RoadTrip example
http://www.microsoft.com/windowsazure/learn/tutorials/road-trip-tutorial/1-create-and-run-locally/


//=== Configuration
* Web.config
* ServiceConfiguration.cscfg
* ServiceDefinition.csdef
* Local emulator or Remote Cloud
* Sql Azure database or Storage
* Storage/Database/Cloud account
* ConnectionString for database/storage
* Certificate (self-signed certificate by VS2010?)

//===
* Windows Azure Management Portal
* Sql Azure Portal
* Remote Access/remote desktop settings?





//=== the 1st error
Failed to initialize Windows Azure storage emulator. Unable to start Development Storage. Failed to start Storage Emulator: the SQL Server instance ‘localhost\SQLExpress’ could not be found.   Please configure the SQL Server instance for Storage Emulator using the ‘DSInit’ utility in the Windows Azure SDK.

[try]
dsinit /sqlInstance:sqlexpress


http://social.msdn.microsoft.com/Forums/eu/windowsazuredevelopment/thread/6fafe385-8f1a-4add-b782-3c0761505695
http://www.c-sharpcorner.com/UploadFile/dhananjaycoder/5485/
http://social.technet.microsoft.com/wiki/contents/articles/sql-azure-connection-management.aspx 
http://go.microsoft.com/fwlink/?LinkId=224877



//=== Deploying a Windows Azure Application/Service
http://msdn.microsoft.com/en-us/library/gg433027.aspx

Package location
C:\Users\username\Documents\Visual Studio 2010\Projects\WindowsAzureProject1\WindowsAzureProject1\bin\Debug\app.publish

ServiceConfiguration.Cloud.cscfg
WindowsAzureProject1.cspkg



//=== Production and Staging deploy

  • Staging Deployment : http://<guid>.cloudapp.net
    where <guid> is a GUID automatically provided by Windows Azure and the GUID will change each time the application is deleted and re-deployed.
  • Production Deployment : http://<urlprefix>.cloudapp.net
    where <urlprefix> is the unique URL prefix specified when creating the hosted service.




//=== Delete a deployment as soon as it is not needed
***  If you do not "delete"  a deployment, billable charges will continue to accrue, even if your deployment is in the "Stopped" state.




 ~~~

A cloud on the azure sky.
蔚藍天空一朵雲

2011年9月22日 星期四

php on GAE

GAE: Google App Engine 的縮寫 

PHP: 本來是 Personal Home Page 的縮寫,
後來俺不知為了啥, 它就變成了PHP: Hypertext Preprocessor 的縮寫, 
這種縮寫稱為 Recursive Acronym ...

GAE 目前只支援 Python, Java , Go, 想要在GAE 上跑 php 
必須先將php 轉成Python 或 Java ?

在網路上找到Quercus (php engine in java , caucho.com 這家公司作的?) 
i.e.  php ->java -> GAE
....

[try]
照著[ http://raivoratsep.com/42/running-quercus-php-on-app-engine ]的步驟
使用MyEclipse成功的 在 local 端建立 myApp
瀏覽 http://localhost:8888 就會正確顯示 phpinfo; 

但是將war 上傳到GAE之後, 
瀏覽 http://myappid-xxxxx.blogspot.com, 
出現 HTTP Server Error 500, 
"
Error: Server Error
The server encountered an error and could not complete your request.
...
"

使用的程式庫版本為 appengine-java-sdk 1.5.3, quercus resin 4.0.22, MyEclipse9.1 ...


//===
[ http://www.webdigi.co.uk/blog/2009/run-php-on-the-google-app-engine ]
[ http://php-apps.appspot.com ]
均提供了phpOnGAE 的範例程式
試著將www.webdigi.co.uk 提供的war, 
修改appengine-web.xml 上傳到自己的app-id 
可正常顯示phpinfo ! 
有鬼?




[ref]
http://en.wikipedia.org/wiki/Recursive_acronym



2011年9月16日 星期五

Google App Engine Try

Google App Engine 目前支援3種語言 : Go, Java, 與 Python.
但是 Go 目前只能在Linux/Mac 的環境下跑 , 而且需要Python 2.5


[ref]  http://code.google.com/appengine/docs/go/gettingstarted/devenvironment.html
『...
 The Go SDK uses slightly modified versions of the development tools from the Python SDK,
and will run on any Intel-based Mac OS X or Linux computer with Python 2.5.
...

//===
Python  只聽過正妹的一次課
//=== 所以 只好試試 appengine-java
0. 下載Java6 (runtime or jdk?)
1. 下載Eclipse3.6 (Helio)
2. 透過Eclipse Software Update 下載 App Engine SDK
或者
單獨下載App Engine SDK(事後還要透過Eclipse -> Configure SDK->告訴Eclipse, App SDK裝在何處 )
3. 透過Eclipse 下載  Google Plugin for Eclipse


高人建議直接試用 MyEclipse (內含Java), 不過頗肥, 整個下載要超過900MBytes ...
 MyEclipse 目前最新版是9.1 , 基本上是把Eclipse 3.6及其相關的資源打包,
有個Configuration Center -> Software -> ...

循著 Getting Started [ http://code.google.com/appengine/docs/java/gettingstarted/installing.html ]
逐步走
  • Creating a Project
  • Using the Users Service
  • Using JSPs
  • Using the Datastore
  • Using Static Files
  • Uploading Your Application

終於得到個人的第一個 Google App
http://lottery-assistant.appspot.com/
雖然名稱叫 lottery-assistant
其實還是Google 提供的 guestbook  範例



//=== 許多人推崇的GWT
GWT (Google Web Toolkit) :  translate Java to [Html/Javascript + CSS]


//=== 過程中必須修改的組態檔
war/WEB-INF/web.xml
war/WEB-INF/appengine-web.xml
war/WEB-INF/logging.properties


//===  MyEclipse 的 Google Deploy  似乎還不太靈光 ?
To upload the app by Windows Command console,
appcfg.cmd update "C:\Users\username\Workspaces\MyEclipse 9\Guestbook\war"

..\appengine-java-sdk\bin\appcfg.cmd update war

-->
"C:\Users\eric\AppData\Local\MyEclipse\Common\plugins\com.google.appengine.eclipse.sdkbundle_1.5.3.r36v201108301710\appengine-java-sdk-1.5.3\bin\appcfg.cmd" update war


[ref]
//===
http://code.google.com/p/google-app-engine-samples/
http://code.google.com/appengine/docs/java/gettingstarted/installing.html
https://appengine.google.com/start
http://code.google.com/appengine/downloads.html
http://code.google.com/eclipse/docs/install-eclipse-3.6.html

單獨下載Google AppEngine SDK
http://googleappengine.googlecode.com/files/appengine-java-sdk-1.5.4.zip
//=== The Google Plugin for Eclipse, for Eclipse 3.6 (Helios):
http://dl.google.com/eclipse/plugin/3.6

2011年9月14日 星期三

露天拍賣 登入有問題?

明明覺得密碼沒打錯 卻沒能成功登入
跳出「請正確的點擊登入按鈕」的視窗
本以為久沒用 帳號/密碼記錯了
就按下忘記密碼 ...

露天不再以簡訊傳送驗證碼
改採讓用戶撥打一個臨時的號碼(0809053899?)
作為驗證 (本島免費?)

通過驗證後 即在網頁上顯示一組新密碼
貼上新密碼 還是不能成功登入 !


網搜...
原來顯示比例放大後((人得服老...)
露天拍賣的登入按鈕會跑位
所視非所得 ...

[try]
IE8 -> View -> Zoom -> 100%
或者IE8 視窗右下角將顯示比例調回 100%


[ref]
http://forum.ruten.com.tw/replylist.php?article=4934687

Google+ 的Post

在Google+ 的串流(Stream)上可以發表(Post) 文章/相片/影音...
Post 可以分享(Share) 給指定的圈子(Circle)或個人 [直接在Share的輸入盒中打入email]
可是指定的圈子/個人 並不會收到 email "notification" ...

網路上找了好久 終於發現原因
在Share時 必須要 "mention" , 對方才有可能收到email "notification" ,
那 如何 "mention" 對方呢?在Share的輸入時先打+號 再打入email ?

如果要 "mention"一整個circle呢 ?

*** 將滑鼠停在Share輸入盒中該circle/個人 直到 "Notify" 提示盒出現
打勾即可



『...
By submitting a public post, none of your contacts will receive email notifications.
...
If you want people of a certain circle get notified by email then while writing the message, pause the mouse on it and enable the option Notify Circle.
...



[ref]
http://www.nichewp.com/google-plus-secret-commands.html

2011年8月19日 星期五

Ubuntu的Virtual Machine 軟體

VMware, VirtualBox or Xen ...
瀏覽一些網路文章後 多數人認為VirtualBox最容易入手
相容性也比較好 ...


//===
[Q] How to install WindowsXP(guest OS) on Xen?
[Q] How to install Xen on Ubuntu(host OS)?
[Q] Can Xen and VirtualBox be installed on Ubuntu side-by-side?


//=== Digest from https://help.ubuntu.com/community/VirtualBox

VirtualBox can run all versions of Windows, Linux, and many other x86- and AMD/Intel-based 32- and 64-bit operating systems as either a host OS or as a guest OS.



//=== Digest from http://mediakey.dk/~cc/howto-install-windows-xp-vista-on-xen/
Requirements to install XP on Xen (on Debian Etch?)

 * CPU with either Intel’s Vanderpool (IVT – Intel Virtualization Technology) or AMD’s Pacifica Technology (AMD virtualization)
    * Windows iso-image



//=== Digest from https://help.ubuntu.com/community/Xen

『。。。
To be able to run most of the virtualization software, a new technology in hardware comes it is known as Intel-VT and for AMD machines it AMD-V
。。。
How to check whether your computer supports VT or not, run following command for Intel based processors:
grep vmx /proc/cpuinfo

For AMD based processors, run the following command:
grep svm /proc/cpuinfo
 
 
。。。 




To be able to use Xen on your Ubuntu you need to
  1. Compile Xen
  2. Compile a Dom0 Kernel which can work with Xen 。。。』



//=== Digest from http://jeremy.zawodny.com/blog/archives/010184.html 
『。。。
I was fed-up of the VMware bloat, it seems to add on far too many services which I just don't want or need.


If you're creating a bunch of linux systems to separate out services (dhcp, mail, web, etc) then xen might be the way to go.
Xen is not like the other things. Basically consider Xen to be a way to virtualize Linux servers on a Linux server;


also found that at this time most of the apps that I wanted on windows are working with Wine, so I stopped running VMs altogether. This all said, I stuck with VirtualBox primarily since it is free and it worked.


found VirtualBox's networking to be a nightmare

。。。』


[ref]
https://help.ubuntu.com/community/VirtualMachines
https://help.ubuntu.com/community/VirtualBox
https://help.ubuntu.com/community/Xen

http://jeremy.zawodny.com/blog/archives/010184.html
http://ubuntuforums.org/showthread.php?t=1145462

http://mediakey.dk/~cc/howto-install-windows-xp-vista-on-xen/





2011年8月18日 星期四

如何讓swf的背景變透明?

[Q] 如何讓swf的背景變透明?
[Q] How to make swf have transparent background?



[try]
Use the "Publish Settings" in Adobe Flash Professional

1.Choose File -> Publish Settings;
2.Select HTML;
3.Choose "Transparent Windowless" from the "Window Mode" menu;
4.Publish the document;

用IE8看起來有透明效果, 例如 Disclaimer , 還沒試過其他的瀏覽器 ...


//===  或者直接修改 swf 對應的 html code
加入 wmode 參數 , value 設成 "transparent"

<param name="wmode" value="transparent" /><param
name="bgcolor" value="#ffffff" />
...
<embed ...
wmode="transparent" />


[ref]
http://kb2.adobe.com/cps/142/tn_14201.html

如何在Blogger(blogspot.com) 發布Flash檔(.swf)

[Q] 如何在Blogger(blogspot.com) 發布Flash檔(.swf)?
[Q] 如何上傳Flash檔(.swf)到Blogger?

[Q] How to publish a flash swf file to Blogger(blogspot.com)?
[Q] How to upload a flash swf file to Blogger?

[try]
搜尋之後發現 Blogger 似乎尚未支援 swf 直接上傳?
有一些替代方案: google site, google doc, google page?
個人選擇了比較傳統的方式: 先將swf檔案上傳到某台web host(e.g. Bluehost)
再將對應swf的html code 貼到Blogger's Post 中

就可以得到像敝人這篇Disclaimer的結果...


[ref]
http://adding-flash.blogspot.com/

Disclaimer (免責聲明)



Disclaimer

2011年8月12日 星期五

如何判斷Office的版本?

[Q] Word 2007 的 About?
Word Options -> Resources -> About -> 12.0.6545.xxxx SP2 ...


//===
[Q] How does msi tell the version of MS Office?

[try]
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Office\X.0\Common\InstallRoot
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Office\12.0\Excel\InstallRoot\
[HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\excel.exe]
???[HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Installer\UserData\S-1-5-18\Components\9B905EB838DBFEE4991CF8E66F518BBF]


<Property Id="XXXINSTALLED">
      <RegistrySearch Id="DetectXXX" Root="HKLM" Key="SOFTWARE\Microsoft\Office\X.0\Common\InstallRoot Name="Path" Type="directory"/> 
</Property>
<Condition Message="component XXX is installed."><![CDATA[XXXINSTALLED]]></Condition>


<Property Id="XXXINSTALLED">
      <!-- has to know the Guid for componet XXX first-->
      <ComponentSearch Id="DetectXXX" Guid="{88888888-4444-4444-4444-CCCCCCCCCCCC}" Type="file"/>
 </Property>
<Condition Message="component XXX is installed."><![CDATA[XXXINSTALLED]]></Condition>

//=== http://stackoverflow.com/questions/3616532/wix-registrysearch-returns-a-wrong-installlocation
//=== http://stackoverflow.com/questions/650207/what-is-the-best-way-to-detect-if-excel-2003-is-installed
//===  http://stackoverflow.com/questions/244517/where-is-a-reliable-registry-key-to-find-install-location-of-excel-2007/

//=== http://www.add-in-express.com/creating-addins-blog/2010/02/08/register-office-addin-wix/

//=== http://stackoverflow.com/questions/532447/how-do-you-use-wix-to-deploy-vsto-3-0-addins

//=== http://msdn.microsoft.com/en-us/library/cc563937.aspx

2011年8月11日 星期四

Windows Search Service 選項設定

微軟的 Windows 2008 Server 作業系統中, 檔案及其內容的搜尋
主要依靠服務 Windows Search Service(簡稱 Search Service), 
另外有一個 Windows2003 server indexing service (簡稱 Indexing Service )
則是傳統的檔案索引服務

據建議 以使用Search Service為佳
除非 ...

至於早期的WinXP, Win2000 若想採用新的Search Service 則須另外安裝
Windows Desktop Search
[ Windows Search 4.0,  http://www.microsoft.com/windows/products/winfamily/desktopsearch/choose/windowssearch4.mspx ]

也就是說
Windows Desktop Search === Windows Search Service
Windows Classic Search === indexing service

Windows desktop search 當初是為了對抗Google desktop search 而推出的?
[ Google desktop search,  http://desktop.google.com/ , 有linux版本 ]

不過微軟的FAQ聲稱 Windows desktop search 可與其他的 desktop search產品共存 ...

[ http://www.microsoft.com/windows/products/winfamily/desktopsearch/technicalresources/techfaq.mspx ]
" Can I use a third-party desktop search product if my PC already has Windows Search built in? 

Yes, Windows Search is designed to be a good citizen and will function well in the presence of other indexers as will the operating system itself.
...
"



//=== Windows Search Service 的選項設定
Control panel -> Indexing options -> Modify -> Show all locations
-> e.g D: -> check enable indexing for all files/subfolders


//=== VisualStudio -> Find in files (classic/traditional search e.g *.txt, ...)



//===
[Q] How to know whether indexing is finished or not?


IFilter : Indexing filter, extracting text from pdf/.../ files to feed into search engine
IFilter is a COM


[ http://www.microsoft.com/windows/products/winfamily/desktopsearch/technicalresources/techfaq.mspx ]

2011年8月5日 星期五

Windows Installer 與 Dual-purpose package

//=== Windows Installer, Microsoft Installer, Microsoft Windows Installer (MSI)
Windows Installer 目前出到5.0 版

Windows Installer 用來安裝/管理/更新/升級/移除 所安裝的套裝軟體(msi package)
支援
  • component management.  
  • advertisement of applications and features ?
  • dual-purpose package ( Windows Installer 5.0 )
  • least privilege installation by proxy for unprivileged users ?



//===
Key path or Key file 的觀念比較像資料庫的key 
用來判斷一個component 是否有更新或異動


可以用Orca.exe 來檢視 msi 的內容


//=== Dual-purpose package
Windows Installer 5.0 允許在一個 msi package 中同時支援 perUser 與 perMachine的安裝機制
這樣的 msi package 稱做 dual-purpose package ;
這個機制則有一個令我混淆的名稱: single package authoring


Dual-purpose package 可以在 Windows 7 與 Windows Server 2008 R2 , 用Windows Installer 5.0 安裝,
Vista 以前的作業系統呢? Windows Installer 4.5以前的版本呢?

Per-user installation context: 當Windows Installer 5.0 安裝一個 dual-purpose package 時 ,  檔案與登錄(registry entries) 指到 per-user 的位置, 不會觸發 UAC credential prompt

Per-machine installation context: 當Windows Installer 5.0 安裝一個 dual-purpose package 時 , 檔案與登錄(registry entries) 指到 per-machine的位置, 會觸發 UAC credential prompt 以確認使用者是否有足夠的權限


***  用Windows Installer 4.5及以前的Installer 安裝 dual-purpose package 時 
Installer 將忽略 MSIINSTALLPERUSER ,  進入per-machine installation context
並觸發 UAC credential prompt ...



//=== 
" ... Once Windows Installer 5.0 installs an application, it uses the same installation context for all subsequent updates, repairs, or removal of the application."

A valid dual-purpose package must be able to pass validation by ICE105.



//=== dual-purpose package development guideline and example
...



[ref]
http://en.wikipedia.org/wiki/Windows_Installer#Key_paths
http://msdn.microsoft.com/en-us/library/cc185688(v=vs.85).aspx

dual-purpose msi package
http://msdn.microsoft.com/en-us/library/dd408068(v=vs.85).aspx
http://msdn.microsoft.com/en-us/library/dd770204(v=vs.85).aspx (example)


~~~

2011年8月1日 星期一

電腦送修

用了兩年的準系統桌機(desktop) 
近幾個月常常無法順利開機
總要先通電溫機一個小時甚至更久
才能成功啟動.
上月初某天 終於 怎麼開都開不起來
決定送回原廠檢修
把光碟 硬碟 RAM 拆下
百里迢迢的轉了四次車(公車a 捷運b 捷運c 公車d)
背著當年號稱迷你 如今卻嫌笨重的電腦
來到新興區域的企業總部
向櫃檯小姐報到
"請稍候"

 
在沙發區 遇到另一位帶著電腦來修的先生
機器都是黑色系 外型略有差異
症狀也是開不了機 ...

 
出來一位男性工程師 客氣冷靜的講解著送修的事宜

 
拆機費: NT$300 (如果不是空機? 需要維修人員拆解的話)
檢查費: NT$500
檢修時程: 更換主機板? 五~六個工作天
維修費用: 無人為損害? NT$1200 ~ 1500; 否則可能需NT$3000~ 3500

 
* 空機的定義 : 原來準系統配備的裝置, 包含主機板, 機殼, 電源, 散熱片及風扇
* 拆機費的定義: 移除非原來準系統配備的裝置 例如光碟/ 硬碟/ RAM 還有CPU
變回空機的狀態;
[ 為了省NT$300, 只好向該位工程師借螺絲起子 想把CPU 拆下,
得先拆散熱片(連著風扇) ; 以前沒拆過 拆不下來 窘!
多虧工程師指點 接著是CPU的卡鎨 ...
(發現CPU沒有pin腳, 進化成印在表面上的圓形金屬接點)
]

 
* 人為損害的定義 : 工程師提出一些說法 讓我覺得很模糊 個人的詮釋:
是否人為損害由維修方來認定 不過送修方可以決定要不要付費繼續修 
不願意修的話 原機退回 ...

 
* 拆機費及維修費的價格並未公告在其網頁中 ...

 

 

 
//===
兩個工作天後 接到電話通知 檢查結果無異常
可以開機 ...
聽從建議 先到x見門市 換了兩條 DDR2-800 DRAM (長板變成短板)
再次來到百里迢迢之外的沙發區
工程師在連著牆壁的展示桌上 用其DRAM/CPU 展示我的準系統可以開機
客氣冷靜的請我在維修單上簽名
請他用我新換的DRAM測試 他還是要我先簽名
並再次重新開機 確認螢幕有輸出 /鍵盤有反應
說簽完名後 我可以再用帶來的DRAM自行測試 ...
此時 注意到他用的DRAM是667MHz的
向他反應要跑800MHz 見我遲遲不簽名
他有點無奈的接過新換來的DRAM
先插一條 開機OK, 微微鬆了口氣
爽快的插入第二條 也可以正常開機
他恢復了冷靜的神情 擺出電梯小姐的姿勢
手肘90度 手掌45度斜上 展示著開機的BIOS畫面
...

簽完名後 拿出身上僅有的一張千元鈔
他收了錢及簽名單後 請我稍等 ...

這回的稍等有些久 所幸有沙發與冷氣
終於工程師拿了發票出來
可是沒有找我五百
我也冷靜客氣的說 "不好意思 您還要找我五百元"
他趕忙陪笑說不好意思 回辦公區 不算太慢的拿了張五百元給我
"請慢走" ...

背上電腦 走回大街 等公車 往民權大橋方向 車不少
傍晚陽光依然刺目

  
//=== 無法開機的原因猜測是 :
  • DRAM 接觸不良
  • DRAM 跑800MHz不穩
  • 啟動電容老化
  • 啟動按鈕接觸不良
...

2011年7月6日 星期三

LCD 發出酸味

13年的三隻鳥15" LCD螢幕 擺了兩年沒用 發出酸味
面板表面出現類似發霉的灰白色斑點  左上方出現皺紋三角形




//=== http://blog.yam.com/antlums23/category/1042809
"August 30, 2010
家裡的第一個液晶銀幕 14吋聯x光電的面板, ...
最近卻發現長了皺紋雖然還可以"使用", ....
想說是否面板表面那一層不良?沒想到一撕開整個房間臭氣沖天(?矽利康的酸味)
上網查資料聽說有毒性,二話不說就送到資源回收室去了, 
...
"

//=== http://pc.yvv.cn/diannao/74/2008-09/7743.html
酸味 如果有这种味道,一般是内部电容有过热或过压爆裂,电容的酸性气体溢出所致。


//=== 專業回收報廢LCD螢幕(螢幕無破損.無壓傷.無嚴重刮傷)
15吋:回收獎勵金250元? 此報價不含燈箱式LCD?




[ref]
http://blog.yam.com/antlums23/category/1042809
http://pc.yvv.cn/diannao/74/2008-09/7743.html

http://www.recycling-tw.com/price.html
http://www.recover.com.tw/
http://mypaper.pchome.com.tw/kuan0416/post/1322158506

2011年6月28日 星期二

WiX and WiXEdit

//=== WiX: Windows Installer XML toolset

  • Microsoft's open source software to create installer packages (.msi files) for Windows applications
  • a toolset that builds Windows installation packages from XML source code.
  • supports a command line environment that developers may integrate into their build processes to build MSI and MSM setup packages
  • 2010.12.03 WiX v3.5 Escrow Reset
  • The WiX toolset CodePlex project(wix.codeplex.com) stores the stable releases and Mercurial repository.

//=== WiXEdit
  • an editor for XML source files for the Windows Installer XML (WiX) toolset.
//=== ICE64
ICE64: The directory Folderx is in the user profile but is not listed in the RemoveFile table
--> add  RemoveFolder to the component corresponding to the Folderx

<Directory Id='IdFolderx' ... >
   <Component Id='IdFolderx'  ...>
      <RemoveFolder Id='IdFolderx' On='uninstall'/>
   </Component>
</Directory>



//=== error LGHT0267, ICE
"Found orphaned Component   'IdComponentX'. 
If this is a Product, every Component must have at least one parent Feature. 

To include a Component in a Module, you must include it
directly as a Component element of the Module element or
indirectly via ComponentRef, ComponentGroup, or ComponentGroupRef elements.
"

[sol]  add the Component 'IdComponentX' to the Default Feature by
right-clicking  "Default Feature" --> Select components to add




//=== warning LGHT1076, ICE91
ICE91: The file 'MYSHAREDADDIN1.DLL' will be installed to the per user directory 'IdFolderX' that doesn't vary based on ALLUSERS value. This file won't be copied to each user's profile even if a per machine installation is desired.


//=== error LGHT0204 , ICE38
ICE38: Component 'IdCompX' installs to user profile. It must use a registry key under HKCU as its KeyPath, not a file.

[sol]    Place an HKCU registry in front of file for a component.



//===
There is no need to run on a 64-bit development machine to create a 64-bit MSI file.
It is feasible to create a 64-bit MSI file on a 32-bit machine.






[ref]

2011年6月8日 星期三

Visual Studio 的縮排 Indent

//=== Visual Studio 2008
C# Format Document(縮排 整個文件) : CTL+ E+ D
C++ Format Selection(縮排 選取的部分) : CTL+ E+ F

//=== Visual Studio 2010
C# Format Document : CTL+ K then CTL+ D
C# Format Selection: CTL+ K then CTL+ F

C++ Format Selection : CTL+ K then CTL+ F

2011年5月15日 星期日

Bitdefender的產品比較

前兩年買的 bitdefender Antivirus Pro 到期了
偵測過幾個病毒
但桌面下方工作列上的圖示
一直有個驚嘆號

網路搜尋一些防毒軟體的評比
以[cost,perfomance]來看
似乎還是bitdefender為首選

沒辦法 ...

bitdefender 目前至少有三種版本
Antivirus Pro
Internet Security
Total Security

本以為 Total Security == Antivirus Pro + Internet Security
但看了比較表之後
[ http://www.bitdefender.com/world/solutions/antivirus-comparison.html ]

發現 Total Security > Internet Security > Antivirus Pro

Total Security 主要比 Internet Security 多了
* System tune-up
* Critical folder/file encryption
* File Shredder/File Vault


Internet Security 主要比 Antivirus Pro 多了
* Junk email stopping
* Parental control
* Firewall

下載Total security 試用後覺得卡卡的
系統反應變慢, 原來System tune-up 附了一些工具程式
還得手動run過才行?

所以是junk email stopping 與 firewall
造成系統反應變慢 ?

看來還不如回歸核心功能
買 Antivirus Pro 就好了
。。。

在線上購買的過程中發現
網路上有幾個網站都在賣
例如:
http://www.bdantivirus.com/ (it2g.com)
http://bitdefender.qcomgroup.com/ (qcomgroup.com)


想找bitdefender在地的經銷商 可參考以下連結
http://www.bitdefender.com/site/Partnership/allPartners/94/

不同經銷商的定價大同小異
想要省點錢 就得注意有無speical offer
limited time offer
或者 discount, coupon ...

在這些定價/折扣多元的背後
就是漸為人知的軟體 partner/affiliate 網路
跟保險行銷的模式有點像

為了一窺堂奧 也為了discount
加入某個affiliate 網路

右側及置底的gadget中
就有bitdefender的廣告
歡迎贊助選購 :)



[ref]
http://www.bitdefender.com/world/solutions/antivirus-comparison.html
http://www.bitdefender.com/site/Partnership/allPartners/94/

2011年5月4日 星期三

如何上傳.txt 檔案到google Doc?

[Q] How to upload .txt file to google Doc?

[try]
用之前下載的Library,
先試不將 .txt 轉換為 google Doc格式的 uri
http://docs.google.com/feeds/default/private/full?convert=false
失敗, 得到 HTTP 403

只好試  http://docs.google.com/feeds/default/private/full
成功, 得到 HTTP 201


難道 Google Doc 不允許 直接上傳.txt 檔案, 一定要轉成google document ?
可是人工登入google doc , 按下畫面上的 Upload 卻可以成功上傳.txt 檔案,
奇怪?







//=== the request i sent
POST http://docs.google.com/feeds/default/private/full?convert=false HTTP/1.1
Content-Type: text/plain
User-Agent: G-Upload File/GDataGAuthRequestFactory-CS-Version=1.0.0.0
Slug: ps0.txt
Authorization: GoogleLogin
auth=DQAAALMAAAA4JUnuWySTvjArqaoqeKYnB8JbSBdxxxxx-
ExBymsZ6XFxQ2mGZTndmKJCFCG49zY4v9AvosBeZtqA56yumfwVx9bQBi
WWRrfRgakaV2YGRpiwYR0uvyjUEL_KEro9InPnNNyo_qjve1S5UaSjbX7
qG8g66dgfWmpN82P34W2c7Ivv6qio6Bl-NqfxJZOtqcqbM-
LDIzq14lWVOiNb2aB3Kz--nxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
GData-Version: 3.0
Host: docs.google.com
Content-Length: 926
Expect: 100-continue
Proxy-Connection: Close
.....txt file contents
....

//=== the response i got
HTTP/1.1 403 Forbidden
Content-Type: application/vnd.google.gdata.error+xml
Date: Tue, 03 May 2011 14:10:33 GMT
Expires: Tue, 03 May 2011 14:10:33 GMT
Cache-Control: private, max-age=0
X-Content-Type-Options: nosniff
X-Frame-Options: SAMEORIGIN
X-XSS-Protection: 1; mode=block
Server: GSE
Transfer-Encoding: chunked
db

2011年4月29日 星期五

Google Doc 檔案上傳

[Q]  如何抑制上傳檔案轉換為Google Doc的格式?
[try]
0. API: 在Query Uri 加上 參數 convert=false
1. UI :  登入 Google Docs -> "Upload" -> Files/Basic -> 在對話盒中取消
選項 "Convert documents, presentations, spreadsheets, and drawings to the corresponding Google Docs formats"


在 try-and-error 的過程中 有些問題 在google的官方forum 不知如何快速找到對應的連結
直接google 所有網頁 發現cyberduck ( http://trac.cyberduck.ch/wiki/help/en/howto/googledocs  )
列出了許多想找的連結,
例如:

[Q] 如何上傳任意格式的檔案?
[try]
http://docs.google.com/support/bin/static.py?page=guide.cs&guide=1247871


[Q] 需要 Google Apps Premier Account (http://www.google.com/apps/intl/en/business/details.html)
才能上傳任意格式的檔案?


[Q] 不需要文件協同編輯 只想要單純的網路硬碟/儲存空間 ?
[try]
Google Storage 快速上手 ( http://trac.cyberduck.ch/wiki/help/en/howto/googlestorage )



//===  一般用戶的 檔案上傳大小限制
GoogleDocs -> Upload -> Basic...

"...    File types and size limits
Convert documents - up to 1 MB per file:
Microsoft Word (.doc, .docx), OpenDocument text (.odt), StarOffice text (.sxw)
Rich text (.rtf), Plain text (.txt), HTML (.htm, .html)

Convert presentations - up to 10 MB per file:
Microsoft PowerPoint (.ppt, .pps)

Convert spreadsheets - up to 20 MB per file:
Microsoft Excel (.xls, .xlsx) files, OpenDocument spreadsheets (.ods).
Comma-separated values (.csv)

Convert drawings - up to 2 MB per file:
Windows Metafile (.wmf)
 ...
Files that you don't convert (maximum 25 MB per file) will count toward your storage limit. ???
...

Convert text from PDF or image files - up to 2M per file:
Photos, scanned documents, screenshots, etc (.jpg, .gif, .png)
PDF files (.pdf)

Graphics are not converted — only text. For the best results, start with high-resolution image files.
Learn about OCR (optical character recognition)
...
"
[ref]
http://trac.cyberduck.ch/wiki/help/en/howto/googledocs

2011年4月26日 星期二

Google API's Auth (認證) 種類

Google API 至少有三種 authentication 機制
  • OAuth : 目前最新的 , 也是Google 推薦的
  • AuthSub :  Google proprietary, 已被融入OAuth, 不建議再使用
  • ClientLoginAuth : 最早的方式? 安全性比較低?

2011年4月22日 星期五

ExecRequest sample for Google Data API



從 http://code.google.com/p/google-gdata/downloads/list
下載 "Google Data API Setup (1.7.0.1).msi" 之後
試著要了解Google Doc 在取得文件資訊/上傳檔案的過程中,
authentication(認證)/authorization(授權)的機制

看了一些Sample projects, 發覺包了好幾層,
實在有點見林不見樹 ...

最後發現 "ExecRequest" 這個範例比較單純
只與Core Client(Google.Data.Client.dll) 這個library 有關
(source code 在\Google Data API SDK\Sources\Library\core 的目錄下)

ExecRequest <service> <cmd> <uri> <username> <password>

  • cmd 可以是 QUERY, UPDATE, INSERT, DELETE
  • uri 例子:
    https://docs.google.com/feeds/default/private/full/-/folder?max-results=100
    將Server上的 folder/collections 的資訊取出來

    https://docs.google.com/feeds/default/private/full?showfolders=true
    將Server上的 Documents/Files/folder/collections 的資訊取出來
  • service 必須要是對應的 ServiceName


ClientLogin ServiceName Table
Google APIService name
Google Analytics Data APIsanalytics
Google Apps APIs
(Domain Information & Management)
apps
Google Base Data APIgbase
Google Sites Data APIjotspot
Blogger Data APIblogger
Book Search Data APIprint
Calendar Data APIcl
Google Code Search Data APIcodesearch
Contacts Data APIcp
Documents List Data APIwritely
Finance Data APIfinance
Gmail Atom feedmail
Health Data APIhealth
weaver (H9 sandbox)
Maps Data APIslocal
Picasa Web Albums Data APIlh2
Sidewiki Data APIannotateweb
Spreadsheets Data APIwise
Webmaster Tools APIsitemaps
YouTube Data APIyoutube




[ref]

ClientLogin documentation, http://code.google.com/apis/accounts/docs/AuthForInstalledApps.html



FAQ, http://code.google.com/apis/gdata/faq.html

2011年4月21日 星期四

Google Data API / Google Data Protocol

開始學習 Google Data API / Google Data Protocol


//===  Developer's Guide Overview
http://code.google.com/apis/gdata/docs/developers-guide.html

 *** Many Google products, such as Calendar and Spreadsheets, provide APIs
based on the "Google Data Protocol".

Google Data protocol(GDP) Version 2.0 vs. Version 1.0
GDP v1.0 (obsolete?) was developed before the Atom Publishing Protocol was finalized.
GDP v2.0 is fully compliant with the AtomPub RFC 5023 standard.

GDP 2.0 includes support for:
  • HTTP ETags making better use of HTTP cache.
  • Partial Response and Partial Update (Experimental).


//=== .NET library for Google Data SDK(including Samples) 
http://code.google.com/p/google-gdata/downloads/list
download "Google Data API Setup (1.7.0.1).msi" from the above webpage




//=== Google Documents List Data API guide:
Google Doc 3.0 guide, http://code.google.com/apis/documents/docs/3.0/developers_guide_protocol.html
Google Doc 2.0 guide, http://code.google.com/apis/documents/docs/2.0/developers_guide_protocol.html


//=== Google Apps support forum
http://code.google.com/googleapps/support/

舊的 http://www.google.com/support/forum/p/apps-apis


//=== Google Doc forum
http://code.google.com/apis/documents/forum.html

舊的 https://groups.google.com/group/google-documents-list-api?pli=1


[others]
Official google doc blog?
http://googledocs.blogspot.com/

Unofficial tips for google?
http://googlesystem.blogspot.com/

Google Apps Developer Blog
http://googleappsdeveloper.blogspot.com/

2011年4月19日 星期二

IE9, 趕流行, 開開眼界

Demo of IE9 at beautyoftheweb.com

首先 amazing sites
右下方View by category -> 選擇Cool HTML5


10K apart 的入選作品中有個SunCal http://10k.aneventapart.com/Uploads/96/
結合了google map 與HTML5的canvas/geolocation?
呈現出太陽位置相對時間的變化
橘黃色的小圓圈代表太陽 移動上方的時間軸 就可清楚的看到太陽位置的變化
SunCal的原始網站: http://suncalc.net

 
[ref]
http://www.beautyoftheweb.com/
http://10k.aneventapart.com/

2011年4月13日 星期三

Flex3 / Flex4 components correspondence

Flex3: mx.controls.ComboBox spark.components.DropDownList (w/o editability)
Flex4: mx.controls.HorizontalList spark.components.List (with a HorizontalLayout)

Flex3:  mx.controls.ComboBox
Flex4: spark.components.DropDownList (w/o editability)

Flex3: mx.controls.HorizontalList
Flex4: spark.components.List (with a HorizontalLayout)

Flex3: mx.controls.HRule
Flex4: spark.primitives.Line
Flex3: mx.controls.VRule
Flex4: spark.primitives.Line

Flex3: mx.controls.Image
Flex4: spark.primitives.BitmapImage (w/o support for external images)

Flex3: mx.controls.LinkBar
Flex4: spark.components.ButtonBar (with a custom skin)
Flex3: mx.controls.ToggleButtonBar
Flex4: spark.components.ButtonBar

Flex3: mx.controls.LinkButton
Flex4: spark.components.Button (with a custom skin)

Flex3: mx.containers.ControlBar
Flex4: spark.components.Panel (with the controlBarContent property)
Flex3: mx.containers.ApplicationControlBar
Flex4: spark.components.Application (with the controlBarContent)

Flex3: mx.containers.Canvas
Flex4: spark.components.Group

Flex3: mx.containers.Tile
Flex4: spark.components.Group (with a TileLayout)
Flex3: mx.controls.TileList
Flex4: spark.components.List (with a TileLayout)

Flex3: mx.containers.HBox
Flex4 spark.components.HGroup
Flex3: mx.containers.VBox
Flex4: spark.components.VGroup

Flex3: mx.controls.VideoDisplay
Flex4: spark.components.VideoPlayer


[ref]
http://www.adobe.com/devnet/flex/articles/flex3and4_differences.html#_Namespaces_and_packages

Flex4 namespace

Digested from [ref]
  • MXML 2006: The legacy MXML language namespace used in previous versions of Flex. Flex 3 applications compiled using Flex 4 can continue using this namespace.
    URI: http://www.adobe.com/2006/mxml 
    Default Prefix: mx
  • MXML 2009: The new MXML language namespace. This is purely a language namespace,
    and does "not contain component tags"?.  URI: http://ns.adobe.com/mxml/2009 
    Default Prefix: fx
  • Spark: This namespace includes all of the new Spark components. It should be used in conjunction with the MXML 2009 language namespace. URI:  library://ns.adobe.com/flex/spark  ?
    Default Prefix: s
  • MX: This namespace includes all of the MX components. It should be used in conjunction with the MXML 2009 language namespace. URI: library://ns.adobe.com/flex/mx  ?
    Default Prefix: mx



[ref]
http://www.adobe.com/devnet/flex/articles/flex3and4_differences.html#_Namespaces_and_packages

Regasm and Gacutil

[Q] Where is regasm.exe ?

[try]
C:\>cd \windows
C:\Windows>cd Microsoft.net
C:\Windows\Microsoft.NET>cd frame*
C:\Windows\Microsoft.NET\Framework>cd v2.0*

C:\Windows\Microsoft.NET\Framework\v2.0.50727>regasm
     --> WoW6432Node(32bit app on 64bit system)

C:\Windows\Microsoft.NET\Framework64\v2.0.50727>regasm
    --> Normal registry for 64bit System



//===
[Q] Where is gacutil.exe?

[try]
C:\Program Files\Microsoft SDKs\Windows\v7.0>cd bin
C:\Program Files\Microsoft SDKs\Windows\v7.0\Bin>dir gac*

...
C:\Program Files\Microsoft SDKs\Windows\v6.0A\Bin>gacutil
or
C:\Program Files (x86)\Microsoft SDKs\Windows\v6.0A\Bin>gacutil
or
C:\Program Files\Microsoft SDKs\Windows\v7.0\Bin>gacutil /i d:\SharedAddIn2_anycpu.dll

...
Failure adding assembly to the cache: Invalid file or assembly name.  The name of
the file must be the name of the assembly plus .dll or .exe .
...

C:\Program Files\Microsoft SDKs\Windows\v7.0\Bin>d:
D:\>c:gacutil /i SharedAddIn2_anycpu.dll

//===
D:\>c:gacutil /i SharedAddIn2_anycpu.dll
...
Failure adding assembly to the cache: Invalid file or assembly name.  The namef the file must be the name of the assembly plus .dll or .exe .

D:\>c:gacutil /i SharedAddIn2.dll
...
Failure adding assembly to the cache:   The system cannot find the file specifid.

D:\>dir
...
04/12/2011  11:29 AM             8,192 SharedAddIn2_anycpu.dll
04/12/2011  11:21 AM             7,680 SharedAddIn2_x64.dll
             ...

D:\>copy SharedAddIn2_anycpu.dll SharedAddIn2.dll
        1 file(s) copied.


D:\>c:gacutil /i SharedAddIn2.dll
...
Failure adding assembly to the cache: Attempt to install an assembly without a strong name
...

--> need to rebuild SharedAddIn2.dll so that it is strong-named !

2011年4月12日 星期二

COM Shim and ComShim Wizard

//=== There are a series of articles explaining COM Shim :
Part1 : COM Shim Background / Installation / Startup example
 http://msdn.microsoft.com/en-us/library/aa159894(office.11).aspx (office2003)
 http://msdn.microsoft.com/en-us/library/bb508939.aspx (office2007)

"...
The Visual Studio Tools for Office(VSTO) loader is an unmanaged DLL that acts as a shim to load the .NET CLR and then your custom managed assembly.
A custom COM shim has exactly the same behavior.

If you use the VSTO loader, you can set Office macro security to High (or Very High in Office 2003), because a managed smart tag loaded by the VSTO loader is not subject to Office macro security checking at all.
..."


Part2 : ComShimWizard for VS2010
http://blogs.msdn.com/b/mshneer/archive/2010/03/19/com-shim-wizards-for-vs-2010.aspx

Part3 :  How to get a working 32-bit shim wizard to work with 64-bit of Office
http://blogs.msdn.com/b/mshneer/archive/2010/02/24/taking-com-shim-wizards-to-64-bit.aspx



//=== COMShim Wizard download
COMShim Wizard for Office2007 + VS2008/VS2005
http://www.microsoft.com/downloads/en/details.aspx?FamilyID=3e43bf08-5008-4bb6-aa85-93c1d902470e&DisplayLang=en


Older version download
COMShim Wizard for Office2003
http://www.microsoft.com/downloads/en/details.aspx?FamilyId=4C586367-C733-4C68-9971-373C180EC114&displaylang=en

.NET Framework version 1.1 for 64-bit operating systems

[Q] How to install .NET Framework version 1.1 for 64-bit operating systems?
[try]
To install .NET Framework 1.1,

To install .net1.1sp1,

[ref]
http://technet.microsoft.com/en-us/library/cc785813(WS.10).aspx

Shared addin deployment to 64bit office

[Q] How to deploy Shared AddIn to 64-bit Office2010?

[try]
Follow the steps in the article
http://blogs.msdn.com/b/vsto/archive/2010/04/09/deploying-com-add-ins-for-64-bit-office-using-visual-studio-saaid-khan-for-nathan-halstead.aspx

To develop Shared AddIn, COM Shim Wizard  is recommened by Microsoft's VSTO Team :
http://blogs.msdn.com/b/mshneer/archive/2010/02/24/taking-com-shim-wizards-to-64-bit.aspx

GAC

//=== GAC (Global Assembly Cache)

[Q] Where is GAC?
[try]
  • for .net 1.x, .net 2.x, .net 3.x :
    %windir%\assembly\...   --> e.g. C:\Windows\assembly
  • .net4.0 :
    %windir%\Microsoft.NET\assembly\... -> e.g. C:\Windows\Microsoft.NET\assembly\...

//=== .NET Framework
[Q] How to know which .NET Framework versions are installed?
[try]
  • check registry 
    HKEY_LOCAL_MACHINE\Software\Microsoft\.NETFramework
  • check %windir%\Microsoft.NET\Framework directory will have the directories
    v1.x , v2.x, ...


 //===
[Q] Where is gacutil.exe ?
[try]
install Windows SDK suitable for the targeting version of Windows and .net framework
e.g. for Win7 + .net3.5sp1 ,
download iso file from

 //=== Microsoft Windows SDK for Windows 7 and .NET Framework 3.5 SP1 (ISO)
File Name: GRMSDK_EN_DVD.iso
Chip: X86
CRC#: 0xCA4FE79D
SHA1: 0x8695F5E6810D84153181695DA78850988A923F4E
================================================
File Name: GRMSDKX_EN_DVD.iso
Chip: AMD64
CRC#: 0xB417A4F7
SHA1: 0x3393C98B8468CB3505557854922707510F8B65E1
================================================
File Name: GRMSDKIAI_EN_DVD.iso
Chip: Itanium
CRC#: 0x5E0E4BEA
SHA1: 0xAE454215585A044EBE593E9F71FF1A4BC03D56A8


  
[ref]

http://www.pcreview.co.uk/forums/which-net-framework-version-installed-t1346870.html

http://stackoverflow.com/questions/3397479/where-is-gacutil-exe

2011年4月10日 星期日

PDT(Php Development Tool) debugger setup

To get source-level debugging for php in PDT,
have to install Zend Debugger or XDebug Debugger.

//=== Zend Debugger Installation [ref: thierryb.net]:
UPDATE URL: http://downloads.zend.com/pdt
*** use "Help -> Install New Software"
instead of "Help -> Software Updates -> Find and Install"

* Zend Debugger Client:
 php.ini modification to make Zend Debugger client work with Mysql(only for PDT installed on MS Windows?)

* Zend Debugger Server:
download "Studio Web Debugger" from http://www.zend.com/products/studio/downloads


//=== Examples for PDT debug setting using Zend Debugger:

//=== phpinfo
PHP Version     5.3.2-1ubuntu4.7

//=== extension_dir  /usr/lib/php5/20090626+lfs   
put the extracted ZendDebugger.so under the extension_dir

//=== php.ini  edit (better back it up before editting)
sudo gedit /etc/php5/apache2/php.ini

set(or comment out) the following attributes:

* zend_debugger.allow_hosts
zend_debugger.allow_hosts=127.0.0.1/32, 192.168.0.0/16


; this is to see output while debugging
implicit_flush = On

* The output buffering functionality must be switched off to see debug output, too.
output_buffering = 0

[ Note: Remember that output buffering is necessary to allow you to send header (e.g. cookies) even after you sent body content.
Rrestore output_buffering to its original value when we get an error message like "Warning: Cannot modify header information - headers already sent",]


* Disable eAccelerator if it is installed and enabled:
eaccelerator.enable="0" (string or digit?)


* Disable the Xdebug extension by commenting out
;zend_extension=/usr/lib/php4/20020429/xdebug.so

* Disable DBG Debugger, too :
;extension=dbg.so
;extension=php_dbg.dll


* For linux, copy the following lines into the end of php.ini
[Zend]
zend_extension=/usr/lib/php5/20090626+lfs/ZendDebugger.so
zend_debugger.allow_hosts=<comma separated ip_addresses>
zend_debugger.expose_remotely=always

//=== restart web server
sudo /etc/init.d/apache2 restart


[ref]
http://www.thierryb.net/pdtwiki/index.php?title=Using_PDT_:_Installation_:_Installing_the_Zend_Debugger

https://bugs.eclipse.org/bugs/show_bug.cgi?id=269631

http://www.zend.com/en/community/pdt 
http://downloads.zend.com/pdt

Office2010 64bit Trouble

//===
Searching via google by "64bit Office runtime" will give us the
expectedly unexpected troubles for Office x64 ...

searching by "64bit word runtime" will lead us to the "runtime error 429"

//=== http://www.eggheadcafe.com/software/aspnet/36111953/word-2010-64-bit-and-runtime-error-429.aspx




//=== digest from
http://www.talkjcs.com/techsupport/system-requirements/91.html
『 ...
If there really is a requirement to use Office 2010 64-bit, the following procedure must be followed

    * Un-install all previous versions of Office
    * Un-install JCS
    * Un-install Microsoft Access Runtime
    * Install Office 2010 64-bit (this will fail if any 32-bit Office components remain)
    * Apply all updates to Office 2010
    * Re-install the latest version of JCS.
...



//=== http://www.eggheadcafe.com/software/aspnet/36111953/word-2010-64-bit-and-runtime-error-429.aspx

//=== http://social.msdn.microsoft.com/Forums/en-US/vsto/thread/25b4feb8-8b23-4b2d-b357-c2d1dcfe7154

mentioned two modes of Office installation:
  • locally installed or
  • virutally installed(remotely installed? installed on cloud?)


//=== http://www.add-in-express.com/forum/read.php?FID=5&TID=8251

2011年4月8日 星期五

在 Amazon購物無法使用PayPal 付費?

[Q] 在 Amazon購物無法使用PayPal 付費?

[try] 到目前為止 Amazon 仍要求信用卡或金融卡?(debit card) ,
如果不想直接從信用卡扣錢
希望用PayPal帳戶的餘額付費的話
只好向PayPal 申請 PayPal的debit card
但在美國沒有住居地的人 似乎還不能申請?




[ref]
http://www.ehow.com/how_6777409_use-paypal-amazon.html

http://www.webhostingtalk.com/showthread.php?t=289452

COM AddIn , Shared AddIn

[Q] COM AddIn 與 Shared AddIn 有何差異呢?

[try]
COM AddIn 是通稱 多年前就被發展出來

Shared AddIn 也是一種 COM AddIn
不過是在 .NET的架構下發展出來的
也有人稱作 managed COM AddIn ?


[ref]
http://msdn.microsoft.com/en-us/library/aa434078(office.12).aspx

Shared AddIn, VSTO AddIn, and Visual Studio AddIn

Visual Studio 有提供三種 AddIn project templates
  • Shared AddIn: for Office
  • VSTO AddIn: for Office
  • Visual Studio AddIn: for Visual Studio
簡單的說 Visual Studio AddIn 的 host application 是 Visual Studio 2005/2008/2010
而 VSTO AddIn 和 Shared AddIn 的 host application 是 Office

VSTO 的原文是 Visual Studio Tools for Office
和 Visual Studio AddIn 的確滿容易混淆的 ...

2011年4月7日 星期四

如何部署VSTO addin ?

[Q] 如何部署VSTO addin ?
微軟網站有段教學 video, http://msdn.microsoft.com/en-us/office/Video/bb851702

還有source code 可供下載
C#,
http://download.microsoft.com/download/7/b/d/7bd6a2d4-ac14-43f6-97bc-07a334257dde/CS-VSTO-DeployaVSTOAdd-in_cs.zip

VB,
http://download.microsoft.com/download/7/b/d/7bd6a2d4-ac14-43f6-97bc-07a334257dde/VB-VST0-DeployaVSTOAdd-in_vb.zip


2011年4月5日 星期二

VSTO(Visual Studio Tools for Office)


VSTO for Office2007 requires .net framework 3.5

Project types : document-level / application-level
document-level ThisDocument Actions Pane
application-level ThisAddIn Custom Task Pane

rdesktop (terminal server client) in Ubuntu

[Q] 在Ubuntu中 可以用rdesktop登入遠端的 WindowsXP/Windows Server ...
但是要如何切換全螢幕模式?


[try]
0. CTL+ALT+ ENTER (works for me)
1. ??? CTL+ALT+ Backspace / ALT+F1 / CTL+ALT+F1 to login to console mode to kill the process

2011年4月2日 星期六

HyperV vhd (虛擬硬碟) 種類

HyperV vhd (虛擬硬碟) 可分三種:
  • dynamically expanding : 動態擴增
  • fixed size: 固定容量
  • differencing: 根據另一個vhd(母碟: parent vhd) 衍生來的

之前一直沒去探究 differencing vhd 的用法
最近得高手指點
恍然大悟  differencing vhd 的用途 :

0. 產生 vm(Virtual machine) "vmbase", 先將 OS 灌起來 存成 base.vhd ,
    將 base.vhd 設成唯讀
 
1. 根據 base.vhd 衍生 base_update.vhd,  產生 vm "vmbase_update",
    將vmbase_update 與 base_update.vhd綁在一起,
    * 安裝 OS update
    將 base_update.vhd 設成唯讀
 
2. 根據 base_update.vhd 衍生 base_update_app0.vhd,  產生 vm "vmbase_update_app0",
    將vmbase_update_app0 與 base_update_app0.vhd綁在一起,
   * 不安裝其他應用程式
   (除了不是唯讀之外 , 基本上 base_update_app0.vhd 與 base_update.vhd 應該是等價的)
 
3. 根據 base_update.vhd 衍生 base_update_app1.vhd,  產生 vm "vmbase_update_app1",
    將vmbase_update_app1 與 base_update_app1.vhd綁在一起,
   * 安裝 應用程式app1
 
4. 比較 2,3 就可看出 應用程式app1 對系統的影響

...

  

2011年4月1日 星期五

如何縮減HyperV虛擬硬碟的大小

There are three actions for "Edit Disk" to HyperV's virtual hard disk :
  • compact : remove blank space to shrink/reduce size
  • convert : dynamic size to fixed size or vice versa?
  • expand : increase size

//===
可透過HyperV 右側的Actions 工作列
點選 "Edit Disk" -> 選擇想要縮/擴的 .vhd 檔案
->
  • compact : 將因檔案刪除所造成的空隙移除以縮減vhd大小
  • convert : 將vhd從動態容量轉為固定容量模式?
  • expand :  增加vhd 容量

2011年3月16日 星期三

Paypal sandbox example: Donation

想測試 paypal的 sandbox
必須要先登入 https://developer.paypal.com
而且之前要先設定好測試帳號( Test Account)
[可參考之前的短文 http://3hitek.blogspot.com/2011/03/developerpaypalcom.html]







Paypal sandbox example : Buy Now







如何在 developer.paypal.com 產生測試帳號

[Q] 如何在 developer.paypal.com 產生測試帳號 ?

[try]
* 用一個可以收的到信的email信箱到https://developer.paypal.com註冊,
開啟所謂的 "developer account"
* 用"developer account" 登入 https://developer.paypal.com,
產生測試帳號("test accounts")
目前的情況是"create preconfigred account" 只能先產生 Personal test account

* 用"test account" 登入 https://www.sandbox.paypal.com
再將Personal test account 升級成 "Premier test account"
還無法升級成"Business account" ?


* 可以產生多個test account (我只試到產生3個)
最好配合多機測試 (或用兩個不同的browser?)
不然測試帳號會搞混

2011年3月15日 星期二

Paypal 常見問題 - 帳戶種類與費用

//=== 帳戶種類

" ...
Personal:
Recommended for individuals who shop and pay online. We don't recommend that sellers open a Personal account to receive online payments.

Premier:
Recommended for casual sellers or non-businesses who wish to get paid online, and who also make online purchases.

Business:
Recommended for merchants who operate under a company/group name. It offers additional features such as allowing up to 200 employees limited access to your account and customer service email alias for customer issues to be routed for faster follow-ups.
" (摘錄自 https://www.paypal.com/cgi-bin/helpweb?cmd=_help)


* to use Paypal API requires business account.


//=== 費用
* no registration fee (註冊帳戶不用錢)
* charge on receiving payments/withdrawing money (收受貨款/提領存款要收手續費)
* no difference among charges on receiving payments for the 3 types of account. (how about withdrawal?)




[ref]
https://www.paypal.com/cgi-bin/helpweb?cmd=_help

[Paypal 繁體中文說明]
https://www.paypal.com/tw/cgi-bin/helpweb?cmd=_help

Paypal 的相關連結

[Help]
https://www.paypal.com/helpcenter/main.jsp
https://www.paypal.com/cgi-bin/helpweb?cmd=_help

[繁體Help]
https://www.paypal.com/tw/cgi-bin/helpweb?cmd=_help

[Paypal sandbox login]
https://developer.paypal.com
https://www.sandbox.paypal.com

* use a receivable email to open a "developer account" at https://developer.paypal.com
* log in https://developer.paypal.com to create test accounts
* log in https://www.sandbox.paypal.com using a "test account"


[Paypal buttons]
https://www.paypal.com/cgi-bin/webscr?cmd=_pdn_xclick_techview_outside

露天拍賣如何取消交易?

[Q] 露天拍賣如何取消交易?

前幾天想在露天買東西 想要用7/11取貨 以為有貨到付款
結果是純取貨;
點了馬上購買就馬上成交了 ...
而不是先選擇付款方式後 才進入真正下標的動作 ...

那就得取消交易
在露天搜尋好久 終於找到 如何取消交易的path :

買家要到我的拍賣 -> 購買清單->賣家與交易資料(查看匯款資料)裡點入->管理(提出取消交易)-> 選擇/填寫取消交易原因 -> 送出 -> 等待賣家同意 ...

我先收到「取消交易要求」已成功送出!(商品編號 1108012xxxxxxx )的email通知
隔天再收到 "拍賣交易取消成功" 的email通知

" ...
這筆拍賣交易已經成功取消。(商品編號:11080121xxxxxx)
請注意!! 您無法再評價對方,這筆交易相關的評價系統都會全部刪除。

.若在商品賣出後的14天內確認取消交易,系統將不會對賣家計收交易的成交手續費。
.若在商品賣出後的15天起才確認取消交易,賣家仍應支付已計入的成交手續費,
...
"

2011年3月13日 星期日

如何安裝Eclipse PDT (php 開發/除錯工具)?

[Q] 如何安裝Eclipse PDT (php 開發/除錯工具)?
[Q] How to install PDT(PHP development tools) for Eclipse in Ubuntu?

[try]
0. sudo apt-get install eclipse (eclipse 3.5, Galileo)
1. Open Eclipse by Applications->Programming->Eclipse
2. install PDT from Eclipse's Help menu


以下摘錄自 https://help.ubuntu.com/community/EclipsePDT

Install PHP Development Tools (PDT)

1. Open Eclipse and specify your workspace (Applications->Programming->Eclipse)
2. Help->Install New Software
3. Select the Galileo Update site
4. Select the PHP Development Tools (PDT) Feature
5. Install...



Galileo Update site : http://download.eclipse.org/releases/galileo/

[ref]
https://help.ubuntu.com/community/EclipsePDT

2011年3月11日 星期五

如何將 paypal 的“buy now” 按鈕 置於 Flex應用中?

[Q] How to place the paypal “buy now” button for html into Flex?
[Q] 如何將 paypal 的“buy now” 按鈕 置於 Flex應用中?

[try]
根據 http://blog.flexcommunity.net/?p=26 所給的例子 來嘗試 ,
該範例似乎是用Flex3的環境寫的
稍作修改如後 可在Flex4.1 順利執行




The reproduced example is placed in http://3hsite.info/flex/paypal0.html

[ref]
http://blog.flexcommunity.net/?p=26

Paypal 提供的 付費機制

許久沒看paypal的Developer link
為了試Flex Hero的購物車 再度造訪
Surprise !

Paypal developer network 已發展成獨立的網站
而且網域名稱 只有一個字母 x --> x.com

付費機制也變的多元, 針對不同應用環境
相關配套的 流程/程式庫/API/...
讓我眼花 !

瀏覽之後 覺得 Express Checkout 可能比較
適合Flex Hero的購物車範例

下載 Express Checkout 說明文件

https://www.x.com/docs/DOC-2763 (DM , 對developer 沒啥用處)


https://www.x.com/community/ppx/documentation#ec



....

2011年3月10日 星期四

How to install Flex SDK 4.5(Hero)

0. download Flex SDK Hero from
http://opensource.adobe.com/wiki/display/flexsdk/Hero

0.1. Adobe Flex SDK == Open Source Flex SDK + Adobe Add-ons
0.2. Milestone Builds

1. Extract All files from the downloaed zip file.


2. FlashBuilder -> Project -> Properties -> Flex Library compiler
-> configure Flex SDKs ...
2.1 leave the Default SDK to Flex 4.1
2.2. use a specific SDK : Flex Hero




* Hero: Flex SDK 4.5
* Burrito: Flash Builder (after flex builder 3?)

How to import fxpl/fxp in FlashBuilder?

[Q] How to import fxpl(shared lib)/fxp in FlashBuilder?

[try]
File -> import Flex Project(FXP)

or

File ->import -> FlashBuilder project


[ref]
http://help.adobe.com/en_US/flashbuilder/using/WSbde04e3d3e6474c4ef5411412477fbf920-8000.html

2011年3月9日 星期三

Reproduce "Flex Test Drive: Build an application in an hour" for php on my website hosted at bluehost

I have spent more than 10 hours to reproduce Adobe's "Flex Test Drive: Build an application in an hour" for php on my website hosted at bluehost :

http://3hsite.info/flex/TestDrive/flex1-debug/flex1.html

partially because i'm a tyro in Flex;
partially because that i try to locate Flex application/service and Zend lib different from the default configuration.

To make the change of location work , i'd got to edit amf_config.ini, gateway.php and php.ini ...
after some try-and-errors and repeated reading the instructions in the references,
finally i got it.


* amf_config.ini :
web_root
zend_path

* gateway.php:
$webroot = $_SERVER['DOCUMENT_ROOT'];
$configfile = "$dir/amf_config.ini";
$zenddir = $webroot. '/zend/library'; //shd match zend_path in amf_config.ini

* php.ini:
include_path should contain zend_path in amf_config.ini




[ref]
http://www.adobe.com/devnet/flex/testdrive/articles/1_build_a_flex_app.html

http://www.adobe.com/devnet/flex/testdrive/articles/1_build_a_flex_app2.html

http://www.adobe.com/devnet/flex/testdrive/articles/1_build_a_flex_app3.html

http://www.adobe.com/devnet/flex/testdrive/articles/1_build_a_flex_app4.html

2011年3月8日 星期二

traditional chinese input in Ubuntu

[Q] How to input traditional chinese in Ubuntu?
[Q] 如何在Ubuntu 輸入繁體中文?


[try]
"scim-chewing" is recommended although iBus is the built-in input method in Ubuntu 10.04(lucid).

0. System -> Administration -> Language Support
Click on Install/Remove Language

1. sudo apt-get install scim-chewing

2. Change the keyboard type to the desired one(e.g. HanYu Pinyin) via SCIM setup



* iBus tonepy(pinyin + 4/5 tones) will crash when browsing the candidates from the dropdown list by arrow keys
* iBus tonepy list both simplified/traditional chinese chars which make selection difficult.

[ref]
https://launchpad.net/ubuntu/lucid/i386/scim-chewing

2011年3月3日 星期四

Ubuntu的多國語言支援

//===
System -> Administration -> Language Support
Click on Install/Remove Language

keyboard input method system: none, ibus, lo-gtk, th-gtk, scim(need manually install)

personally prefer scim for traditional chinese input


//===
[Q] how to view big5 file in ubuntu?

[try]
gedit, open with proper Character Encoding

2011年3月1日 星期二

sudo and gksudo

[Q] What's the difference between sudo and gksudo?

[digest]
"gksu is a frontend to su and gksudo is a frontend to sudo. Their
primary purpose is to run graphical commands that need root without
the need to run an X terminal emulator and using su directly."


"gksudo puts up a graphical password prompt, and won't mess up GUI logons when used to run graphical apps.
sudo is basically just a terminal version of gksudo. It doesn't understand X apps ..."


still confused???

--> example
"Using sudo with a graphical application does not work 100% of the time if you open an app using Alt-F2 for example if you if you press Alt-F2 and type: ... "

*** try "sudo synaptic" and "gksu synaptic"


"
There's absolutely no difference in Ubuntu because...
oli@bert:~$ ls -l /usr/bin/gksudo
lrwxrwxrwx 1 root root 4 2010-09-27 18:23 /usr/bin/gksudo -> gksu
...
"


[ref]
http://ubuntu-ky.ubuntuforums.org/showthread.php?t=1130412
http://ubuntuforums.org/archive/index.php/t-312823.html
https://lists.ubuntu.com/archives/ubuntu-studio-users/2007-September/000472.html
http://askubuntu.com/questions/21033/what-is-the-difference-between-gksudo-and-gksu

Create a new site for Apache in Ubuntu

0. sudo cp /etc/apache2/sites-available/default /etc/apache2/sites-available/mysite
1. gksudo gedit /etc/apache2/sites-available/mysite

examples:
change the DocumentRoot to point to the new location. For example, /home/user/public_html/
change the Directory directive, replace to
change the ErrorLog and CustomLog directives ...

1.0 create folder /home/user/public_html
1.1 cp /var/www/index.html /home/user/public_html/

2. sudo a2dissite default && sudo a2ensite mysite

3. sudo /etc/init.d/apache2 restart



[ref]
https://help.ubuntu.com/community/ApacheMySQLPHP

Start/stop apache in Ubuntu

[try]
sudo /etc/init.d/apache2 stop/start/restart
or
sudo /usr/sbin/apache2ctl stop/start/restart



[Symptom]
apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1 for ServerName

[try]
create a file named "fqdn" under directory /etc/apache2/conf.d/
by, for example,
sudo nano /etc/apache2/conf.d/fqdn

add "ServerName localhost" to the above newly created file



[ref]
http://ubuntuforums.org/showthread.php?t=364242
https://help.ubuntu.com/community/ApacheMySQLPHP

How to install LAMP in Ubuntu?

[Q] How to install LAMP(Linux-Apache-Mysql-Php) in Ubuntu?

[try]
sudo apt-get install tasksel
sudo tasksel install lamp-server


or
sudo apt-get install apache2 php5-mysql libapache2-mod-php5 mysql-server


[Q] What's tasksel?

[digest]
"
Tasksel is a Debian/Ubuntu tool that installs multiple related packages as a co-ordinated "task" onto your system. ...
"

tasksel --list-task





[ref]
https://help.ubuntu.com/community/ApacheMySQLPHP
https://help.ubuntu.com/community/Tasksel

2011年2月23日 星期三

PChome smart pay 與 IE8

2011.02.23
最近在 pchome 購物 想使用 smartpay
按下去 結果 網頁稍閃即逝
又是 IE8 的安全性作祟嗎?

可是已經將 https://exxx.pchome.com.tw 加入信任的網站名單中了

-->

原來 Smart Pay 需要安裝 "新光銀行" 的ATM add-on
而我並未將新光銀行的網址
https://ixxx.skbank.com.tw 加入信任的網站名單中


2011.03.20
在 pchome 購物 使用 smartpay(即時付款)
又出現 網頁稍閃即逝的現象
這回出現的銀行網頁顯示是合作金庫
但網址是
https://payment.fesc.com.tw/fesnetPP/payPage.jsp
--> http://www.fesc.com.tw/ 財宏科技的webAtm 元件

[又是 IE8 的安全性作祟嗎?]
想成功安裝 財宏科技的webAtm 元件
先要依以下步驟取消一個安全性選項?

IE8的工具列:
工具->網際網路選項->{進階} ->安全性 -> 啟用記憶體保護以協助避免網路攻擊, 取消該選項,重新啟動IE後生效

*** 安裝成功後 記得恢復該安全性選項 重新啟動IE


[結論]
用SmartPay 免轉帳手續費 而且會比ATM轉帳方便
如果IE8 設定沒問題的話 ...

2011年2月14日 星期一

How to enable ActiveX control in IE8 ?

[try]
Tools -> Internet Options -> Security
-> Select a Zone first (Internet /Intranet/Trusted sites/Restricted sites)
-> press "Custom level"
-> ActiveX controls and plug-ins

2011年1月10日 星期一

NMBgMonitor 困擾, CPU 吃光了

BitDefender 最近常斷線
Skype 跑起來也有系統忙碌的警示
用taskmgr 檢查之後 發現了一些
頗陌生的processes

  • NMIndexingService.exe
  • NMBgMonitor.exe
  • NMIndexStoreSvr.exe

網路搜尋之後 發現是Nero7的程式


[try]
用services.msc 停掉相關的服務InCD, LightScribe, NMIndexing ...

到 C:\Program Files\Common Files\Ahead\Lib 目錄 將上列程式更名

2011年1月2日 星期日

CSS list-style 沒作用?

在 Blogspot http://3hinvest.blogspot.com
改變sidebar的ul(unordered list) style,
加入了以下的CSS

.sidebar ul {
margin:5px;
list-style:disc;
}

雖然條列項目有內縮 但是項目的"子彈"(bullet, 項目前的標誌小圖)
卻沒顯示出來 , 即使再加入

.sidebar ul li {
list-style:disc;
}
依然沒顯示出bullet

上網搜尋 發現了 list-style 這個屬性有好多個值
'list-style'
[ 'list-style-type' || 'list-style-position' || 'list-style-image' ] | inherit

其中'list-style-position' 的預設值是 outside ?
只要指定'list-style-position' 為inside, bullet 就會出現了

[example]
ul
{
list-style:disc inside url("/images/blueball.gif");
}

//===
tried to make bullet for ul(unordered list) shown on my another blog, http://3hinvest.blogspot.com
by modifying the blogspot template to

.sidebar ul {
margin:5px;
list-style:disc;
}

the indent takes effect, but the bullets do not show up even if
i added

.sidebar ul li {
list-style:disc;
}

after searching on internet, found that
the value of property 'list-style' has multiple ingredients
that can be set in order: list-style-type, list-style-position, list-style-image.

'list-style'
[ 'list-style-type' || 'list-style-position' || 'list-style-image' ] | inherit


If one of the values above is missing, e.g. "list-style:disc inside;", the default value for the missing property will be adopted.

The default value for 'list-style-position' seems outside?
After explicitly setting 'list-style-position' to 'inside' as follows

.sidebar ul {
margin:5px;
list-style:disc inside;
}

the bullets show up as expected.



[ref]
http://www.w3.org/TR/CSS2/propidx.html

Outlook accoung settings backup

[Q] How to back up Outlook account settings?
The import/export button in outlook does not export account settings.
We can do export for contacts/folders etc., but not account settings.

[try]
Copy the following files:

  • C:\Documents and Settings\username\Local Settings\Application Data\Microsoft\Outlook\xxx.pst
  • C:\Documents and Settings\username\Local Settings\Application Data\Microsoft\Outlook\xxx.dat
  • C:\Documents and Settings\username\Application Data\Microsoft\Outlook\xxx.xxx





//=== Some files in folder C:\Documents and Settings\username\Local Settings\Application Data\Microsoft\Outlook


  • Outcmd.dat - This file stores toolbar and menu settings.

  • Outlook.sharing.xml.obi
  • Outlook.xml.kfl
  • ?ProfileName.fav - This is your Favorites file that includes the settings for the Outlook Bar.
  • ProfileName.htm - This file stores the HTML AutoSignature.
  • ?ProfileName.rtf - This file stores the Rich Text Format AutoSignature.
  • ?ProfileName.txt - This file stores the Plain Text format AutoSignature.