2013年3月31日 星期日

Windows 7 環境變數 TEMP、TMP 預設值

使用者變數 TEMP、TMP
%USERPROFILE%\AppData\Local\Temp
系統變數 TEMP、TMP
%SystemRoot%\TEMP

Unity 開啟錯誤 Creating directory












Creating directory
Creating directory Temp faled. Please ensure there is
enough disk space and you have permission setup
correctly.

Unity project 存在路徑含有中文會造成上述錯誤。路徑似乎只能有英文。

2013年3月29日 星期五

Dropbox Error - 設定 Ramdisk 後無法執行 Dropbox


Could't start Dropbox
This is usually because of a permissions error. Errors
can also be caused by your home folder being
stored on a network share.

將環境變數的 Temp 以及 Tmp 更改路徑至 Ramdisk 之後,執行 Dropbox 時會出現以上錯誤,很可能是因為 Dropbox 找不到 Ramdisk 碟內的 Tmp 目錄。

在 Ramdisk 內新增了 Tmp 目錄後,將環境變數的 Temp、Tmp 設定在 Ramdis/Tmp,但該 Ramdisk 設定的是不會在開關機時儲存、讀取映像檔,導致重新開機後 Ramdisk 內的 Tmp 目錄消失,造成 Dropbox 找不到該 Tmp 目錄。

解決方法很簡單,只要設定 Ramdisk 啟用時,自動產生 Tmp 目錄即可,下圖是 Primo Ramdisk 的設定。


若所使用的 Ramdisk 沒有提供此功能,可以自己寫一個批次檔(.bat),在 Ramdisk 下產生 Tmp 目錄,再將此批次檔放置 Windows 啟動裡即可在開機時自動產生此目錄。批次檔內容只要簡簡單單的下面兩行即可。
R:
mkdir Tmp
以上範例為 R 碟,若磁碟機代號為 T 則輸入 T: 以此類推。

2013年3月14日 星期四

asp.net 4.0 ReportViewer IE9 報表欄位寬度顯示問題

在 ASP.NET4.0 使用 ReportViewer 在 IE9 瀏覽時,報表內的表格欄寬,不會依照設計時所設定的寬度顯示。


在檢視 ReportViewer 所產生的 iframe 內,發現有一 <td width="100%" height="0/">,在某些瀏覽器下,該 <td> 會占據大量版面,導致原有的報表表格受到擠壓。


解決方法很簡單,只要在網頁內加上少許 CSS,讓該 <td> 無效即可。如下。
<style type="text/css">
    td[id*='oReportCell'] {width:100%; !important;}
</style>
並在 ReportViewer 屬性加上 AsyncRendering="false" 使 iframe 套用外層的 CSS 屬性
<rsweb:ReportViewer ID="ReportViewer1" runat="server" Font-Names="Verdana"
    Font-Size="8pt" Height="0px" ProcessingMode="Remote" Width="100%" AsyncRendering="false">
</rsweb:ReportViewer>

本文參考
ReportViewer doesn’t take full width in Internet Explorer

apktool - apk 反編譯 unpack 工具

簡介

apktool 是一款可以將包裝好的 apk 解開的 open source 工具,目前支援 windows 、 linux 、 osx

網站

Google code - apktool
https://code.google.com/p/android-apktool/

下載

https://code.google.com/p/android-apktool/downloads/list

需求

 JAVA JRE 1.6 (或以上?)

安裝

下載 apktool1.5.2.tar.bz2 (或更新版本) 、 apktool-install-windows-r05-ibot.tar.bz2 (或更新版本),各自解壓縮後得到 apktool.jar 、 aapt.exe 、 apktool.bat ,將這三個檔案放至 C:\Windows 目錄下即安裝完成。

使用

命令提示字元  cmd

  • 反編譯 unpack
    • apktool d test.apk testapkfolder
    • 將 test.apk 解開至 testapkfolder 資料夾
  • 編譯回 apk
    • apktool b testapkfolder
    • 將 testapkfolder 編譯回 apk
  • 說明
    • apktool
    • 直接輸入 apktool 即出現說明資訊

2013年3月6日 星期三

TortoiseSVN Server 架設教學

架設步驟

1. 下載並安裝 TortoiseSVN
2. 開啟 cmd 輸入以下指令(全部為一行)
sc create "svnservice" binpath="C:\Program Files\TortoiseSVN\bin\svnserve.exe --service --listen-port 8888 --listen-host 0.0.0.0 -r C:\SVNRepository" displayname= "SVNService" depend= Tcpip

指令解說

svnservice 為 windows 服務的真正名稱

binpath 輸入要執行的程式

C:\Program Files\TortoiseSVN\bin\svnserve.exe 是 TortoiseSVN 的 serv 執行檔路徑

後方帶的參數有 port、hostip、SVN資料夾路徑

SVNService 為 windwos 服務顯示的名稱