原创 導入android-support-v7-appcompat出現問題: android:Widget.Material.ActionButton

搭建最新的android環境,import android-support-v7-appcompat 出現如下問題: [2014-12-03 11:49:13 - android-support-v7-appcompat] E:\my p

原创 xml解析(tinyXml使用)

#include "myXml.h" #include #include #include "tinyxml.h" using namespace std; //用下列字符串作爲xml文件的初始內容: int CMyXml::creat

原创 完美解決qt(4.8.4) 中文路徑問題

 在main函數的起始處寫上如下代碼就可以順利解決(QFileDialog::getOpenFileName(this,tr("Load a file"), "~");)中文路徑問題: //“UTF-8”替換爲你所用系統的編碼格式,wi

原创 qt csdn專欄

http://blog.csdn.net/qter_wd007

原创 QT中MainWindow的佈局設置

原文地址:QT中MainWindow的佈局設置作者:梧桐下的約定此篇日誌來自CSDN  ---mygod343434 Question1: 爲什麼添加的控件顯示不出或者堆成了一堆, 佈局了也顯示不出? Answer:從QT Assist

原创 cpu佔用率統計

命令行參數:此exe名 應用程序名(如:360se.exe) //#include #include #include #include #include #include #include #define MY_PROCESS_ERR

原创 android 常用api示例

獲取當前日期時間,並格式化: 調用long System.currentTimeMillis()方法,可以取得從1970年1月1日開始經過的毫秒數 SimpleDateFormat dateFormat = new SimpleDat

原创 Cocos2D-X 資料

http://mobile.51cto.com/iphone-330533.htm   http://cn.cocos2d-x.org/   http://cn.cocos2d-x.org/article/index?type=coc

原创 qt 中文國際化

假設我們已經建好一個工程,且可以運行出基本的界面。1、打開項目工程文件QTDemo.pro,添加如下語句:TRANSLATIONS += en.ts zh_CN.ts zh_TW.ts2、然後在命令行窗口中輸入以下命令:lupdate 

原创 獲取listview中的子元素view, 設置textview的圖標:setCompoundDrawables使用, view.textView.getHeight()爲0

(只能獲取當前可見的子元素view) int firstVisableIndex = listView.getFirstVisiblePosition();  int index = busstations.indexOf(target

原创 git@osc使用

E:\github> git clone https://git.oschina.net/sanrenxingcode/JustSleep.git  //下載項目倉庫 Cloning into 'JustSleep'... Userna

原创 ubuntu下編譯android vlc出現:possibly undefined macro: AC_PROG_LIBTOOL please use m4_pattern_allow

possibly undefined macro: AC_PROG_LIBTOOL   If this token and others are legitimate, please use m4_pattern_allow.   Se

原创 無法定位程序輸入點?realllocate@.…

    問題原因: 機器上安裝了多個qt版本,或安裝了一個版本的不同編譯版本(如mingw,cl), 調試時與debug下的exe運行時連接目錄不一致 解決方法: 複製正確版本的動態庫到exe所在目錄  

原创 utf-8與gbk相互轉換c++實現

#include #include #include using namespace std;   string UTF8ToGBK(const std::string& strUTF8)  {      int len = Mult

原创 windows 無窗口進程間消息通…

主進程源碼: #include #include #include #include TCHAR g_ShareMemCMD[] = "testipc/buf"; const int g_ShareMemSize = 512; int