原创 關於cocos2d-x用jsonbox解析數據

void JsonTest::Create() { JsonBox::Value v1; char *json = "{\"menu\":{\"id\":\"file\",\"value\":\"File\",\"popup\"

原创 C# 生成隨機數問題

Random產生隨機時需要設置種子。如果不設置默認應該是當前時間。(本人猜測)所以用一個for循環輸出10個隨機數時產生的都是相同的。所以用瞭如下方法:public static int getRandomNum(int start, i

原创 ubuntu12.04 配置java環境

1、添加源 danesh@python:~$sudo add-apt-repository ppa:webupd8team/java  2、安裝 danesh@python:~$sudo apt-get install oracle-ja

原创 winform mshtml 應用報錯問題

報錯內容: System.Reflection.TargetInvocationException: 調用的目標發生了異常。 ---> System.IO.FileLoadException: 未能加載文件或程序集“Microsoft.

原创 判斷藍牙設備是否爲手機

一個設備的device.getBluetoothClass().getMajorDeviceClass() == android.bluetooth.BluetoothClass.Device.Major.PHONE(就是512)就是手機

原创 ubuntu 12.04 配置nginx,mysql,php

聲明: 轉自http://imcn.me/html/y2012/11833.html 一、配置ngnix 1、安裝 sudo apt-get install nginx 2、啓動 sudo /etc/init.d/nginx start

原创 解決httpd: Could not reliably determine the server's fully qualified domain name

解決httpd: Could not reliably determine the server's fully qualified domain name 安裝完apache,重啓APACHE老出現httpd: Could not

原创 mysql漢字變問號問題:

在ubuntu上弄了個mysql-server。平常用着挺正常的,後來發現insert漢字select後竟然出來很多問號。然後開始google。 1、google上大多數說是更改配置文件,添加一行default-character-set

原创 window配置php環境,選用Apache服務器

聲明: 轉自:http://www.cnblogs.com/pharen/archive/2012/02/06/2340628.html 對原文做了些修改。 Windows下搭建PHP開發環境     PHP集成開發環境

原创 關於ubuntu12.04 LTS 設置靜態ip問題

1、配置靜態IP地址: # vim /etc/network/interfaces 原內容有如下4行: auto lo iface lo inet loopback auto eth0 iface eth0 inet dhcp

原创 ubuntu openssh 連接自動斷開問題

How to disable SSH timeout By default, most SSH servers are set to disconnect clients who has been inactive or

原创 關於ubuntu設置ssh遠程連接

1、首先安裝openssh-server sudo apt-get install openssh-server 2、安裝完成後啓動ssh sudo /etc/init.d/ssh start 3、查看是否啓動成功 ps -e|grep

原创 php中獲取mysql的漢字數據時顯示問號問題

上一篇剛剛寫到mysql存儲漢字變問號問題。用編碼方式解決了。 這個用php獲取mysql中漢字數據時又顯示一堆問號了。然後開始google。發現需要讓mysql的查詢加上編碼: mysql_query("SET NAMES UTF8")

原创 ubuntu 配置Android apk反解工具apktool和aapt

1、獲取apktool軟件包 wget https://android-apktool.googlecode.com/files/apktool1.5.2.tar.bz2 wget https://android-apktool.goog

原创 記錄一次Ubuntu服務器MySql數據目錄遷移操作

日常檢查服務器發現磁盤空間有些不足,大目錄主要集中在數據庫/var/lib/mysql 下。 一. 計劃先清理數據庫碎片 1. 查看MySql碎片佔用空間 SHOW TABLE STATUS LIKE '表名稱'; // DATA_FR