07 六月, 2010
Posted by: asd In: 科技新知| 軟體使用 ()
到 dos 下,切換至 VirtualBox\app32
下command
CODE:
-
VBoxManage setextradata YourUbuntuName "VBoxInternal/Devices/pcnet/0/LUN#0/Config/ssh/Protocol" TCP
-
VBoxManage setextradata YourUbuntuName "VBoxInternal/Devices/pcnet/0/LUN#0/Config/ssh/HostPort" 2222
-
VBoxManage setextradata YourUbuntuName "VBoxInternal/Devices/pcnet/0/LUN#0/Config/ssh/GuestPort" 22
YourUbuntuName 為安裝時的自訂系統名稱
重啟VirtualBox,用 putty 連上 127.0.0.1 : 2222
1. 直接下載已編譯好的binary檔 QT binaries for windows,若要安裝其它較高版本 for vs2008,可到 qt-msvc-installer下載。
2. 解壓縮後,在環境變數User Variables加入 QTDIR=C:\Qt-4.4.3 及Path=C:\Qt-4.4.3\bin;.........
3. 安裝 QT for vs2008 addin
4. 在C:\Qt-4.4.3目錄下製作兩個文字檔「configure.cache」、「.qmake.cache」,這兩個檔是build source code產生的
configure.cache
CODE:
-
-platform
-
win32-msvc2008
-
-debug-and-release
-
-platform win32-msvc2008 -debug-and-release
.qmake.cache
CODE:
-
QMAKE_QT_VERSION_OVERRIDE = 4
-
OBJECTS_DIR = tmp\obj\debug_shared
-
MOC_DIR = tmp\moc\debug_shared
-
RCC_DIR = tmp\rcc\debug_shared
-
sql-plugins += sqlite
-
styles += windows plastique cleanlooks motif cde
-
imageformat-plugins += gif tiff jpeg
-
CONFIG += dist-config large-config medium-config minimal-config small-config full-config build_all debug incremental create_prl link_prl depend_includepath QTDIR_build
-
QT_BUILD_PARTS = libs tools examples demos docs translations
-
QMAKESPEC = C:\Qt-4.4.3\mkspecs\win32-msvc2008
-
ARCH = windows
-
QT_BUILD_TREE = C:\Qt-4.4.3
-
QT_SOURCE_TREE = C:\Qt-4.4.3
-
QMAKE_MOC = $$QT_BUILD_TREE\bin\moc.exe
-
QMAKE_UIC = $$QT_BUILD_TREE\bin\uic.exe
-
QMAKE_UIC3 = $$QT_BUILD_TREE\bin\uic3.exe
-
QMAKE_RCC = $$QT_BUILD_TREE\bin\rcc.exe
-
QMAKE_DUMPCPP = $$QT_BUILD_TREE\bin\dumpcpp.exe
-
QMAKE_INCDIR_QT = $$QT_BUILD_TREE\include
-
QMAKE_LIBDIR_QT = $$QT_BUILD_TREE\lib
登入webhostingpad ftp 時,顯示「421 Sorry, cleartext sessions are not accepted on this server」
修改 flashfxp 內的選項 Connection Type 為 FTP using Explicit SSL (Auth TLS),再次登入即可。

也可以用 curl 上傳
CODE:
-
@echo off
-
SET FILE=%1
-
IF NOT DEFINED FILE GOTO USAGE
-
echo "uploading the file %FILE%, please wait..."
-
curl --progress-bar -g -k --ftp-ssl -3 -T%FILE% -uuser:passwd ftp://123.111.1.1
-
EXIT /B 0
-
:USAGE
-
ECHO Usage: upload.exe file
CODE:
-
System.Text.Encoding utf_8 = System.Text.Encoding.UTF8;
-
-
// This is our Unicode string:
-
string s_unicode = "abcéabc";
-
-
// Convert a string to utf-8 bytes.
-
byte[] utf8Bytes = System.Text.Encoding.UTF8.GetBytes(s_unicode);
-
-
// Convert utf-8 bytes to a string.
-
string s_unicode2 = System.Text.Encoding.UTF8.GetString(utf8Bytes);
-
-
MessageBox.Show(s_unicode2);
reference : C# to convert from utf-8 bytes to string and back