原创 Rounding to integer

The most basic form of rounding is to replace an arbitrary number by an integer. All the following rounding modes are

原创 rvalue and lvalue

In C++, the distinction is less simple. In C++, an lvalue expression yields an object or a function.However, some lvalu

原创 git 出錯

$ git status error: bad index file sha1 signature fatal: index file corrupt $ rm -f .git/index$ git reset

原创 ipa 圖片還原

for file in `ls Payload`; do  /Applications/Xcode.app/Contents/Developer/P

原创 ssl boost server

\//Generate a private key openssl genrsa -des3 -out server.key 1024 //Generate Certificate signing request openssl re

原创 Mysql 獲得時間

獲得當前時間 NOW() 獲得當天一日以後時間 NOW() + INTERVAL 1 DAY 獲得當前一月以後時間 DAY_ADD(NOW() , INTERVAL 1 MONTH)

原创 使用Libcef創建基於瀏覽器的應用程序(1)

原文地址: http://www.cnblogs.com/ngxianyu/archive/2013/12/08/3463775.html   作者:粘鍋鹹魚 很早之前看過關於豌豆莢的一片報道,說豌豆莢花了10個月的時間,使用c++重新

原创 error code 121:The semaphore timeout period has expired.

It may be a problem with the connection. Please make sure that you have connected  your hard disk correctly and set th

原创 hash命令:顯示、添加或清除哈希表

linux系統下的hash指令:   說明:linux系統下會有一個hash表,當你剛開機時這個hash表爲空,每當你執行過一條命令時,hash表會記錄下這條命令的路徑,就相當於緩存一樣。第一次執行命令shell解釋器默認的會從PA

原创 製作 OS X Mavericks 的全新安裝 U 盤

OS X Mavericks 已經發布,且好幾年前的老爺機都可以免費升級。如果再不升簡直是對不起蘋果的一片苦心。 雖然絕大部分用戶都會通過升級安裝的方式,保留原來電腦中的資料。但仍然有很多用戶可能想要全新安裝,或者一次下載之後給其他 Ma

原创 牛頓法計算開根數

package main import ( "fmt" "math" ) func Sqrt(x float64) float64 { z := float64(1) for i:= 1;i<10000

原创 C++ meta programming

inline void print_item (size_t const i, size_t const j) { std::cout << i << "x" << j << "=" << i * j << " "; } templ

原创 __typeof__

Another way to refer to the type of an expression is with typeof. The syntax of using of this keyword looks like sizeof

原创 vs2013,mysql connector

安裝版的mysql connector c++ 不能用來連接,只好重新編譯 需要下載mysql-connector-c++-1.1.3,mysql-connector-c-6.1.5-src,boost_1_55_0, cmake (1)

原创 make_shared() shared_prt()詳解區別

shared_ptr很好地消除了顯式的delete調用,如果讀者掌握了它的用法,可以肯定delete將會在你的編程字典中徹底消失 。 但這還不夠,因爲shared_ptr的構造還需要new調用,這導致了代碼中的某種不對稱性。雖然sh