// Example3.cpp : 定义控制台应用程序的入口点。//以特定单词为分界,求取字符串的左右子串#include "StdAfx.h"#include #include using namespace std;int main(void){ string str,str1,str2; in...
分类:
编程语言 时间:
2014-09-27 16:25:39
阅读次数:
216
1. 1和-1在内存中是如何表示的? 2. 给一个数加上负号在内存中会如何改变? 3.一个练习引发的思考。 先引入一个小工具,作用是将一个char转成二进制表示。 static?void?n2(unsigned?char?c)?{
????int?...
分类:
其他好文 时间:
2014-09-27 15:21:51
阅读次数:
212
source fromhttp://blog.csdn.net/steedhorse/article/details/333664// Test.cpp #include using namespace std; class Base { public: void f...
分类:
编程语言 时间:
2014-09-27 15:21:49
阅读次数:
207
将字符串翻转,如下:
输入:Hi Welcome to cricode
输出:cricode to Welcome Hi
#include
#include
#include
using std::cout;
using std::endl;
using std::string;
using std::stack;
void main()
{
string...
分类:
其他好文 时间:
2014-09-27 13:09:29
阅读次数:
175
按字典序选一个六组合。简单DFS#include #include #include using namespace std;int se[20];int ans[20];void dfs(int ps,int position,int k){ if(position>k){ if(ps==6){....
分类:
其他好文 时间:
2014-09-27 12:24:29
阅读次数:
207
/**
* 模拟按home键
* 程序退到后台运行
* @param context
*/
private void imitatePressHome(Context context)
{
Intent intent = new Intent(Intent.ACTION_MAIN);
intent.setF...
分类:
其他好文 时间:
2014-09-27 12:18:09
阅读次数:
132
代码 //执行SQL语句 public static void ExecSqlCommand() { DbHelper db = new DbHelper(); DbCommand command = db.GetSqlStringCommond("se...
分类:
数据库 时间:
2014-09-27 12:10:29
阅读次数:
211
1、首先在头文件里面声明DECLARE_SERIAL(CSelectionSerial)2、重写CObject的Serialize函数virtual void Serialize(CArchive& ar){ CObject::Serialize(ar); //关键代码 if(ar.Is...
分类:
其他好文 时间:
2014-09-27 12:09:59
阅读次数:
280
理解struct msghdr当我第一次看到他时,他看上去似乎是一个需要创建的巨大的结构。但是不要怕。其结构定义如下:struct msghdr { void *msg_name; socklen_t msg_namelen; struct iovec *msg_iov; size_t...
分类:
其他好文 时间:
2014-09-27 11:26:09
阅读次数:
345
当需要监控某一文件,FileSystemWatcher类提供了Created, Deleted,Rename等事件。 就拿FileSystemWatcher的Created事件来说,该事件类型是FileSystemEventHandler。public delgate void FileSystem...
分类:
其他好文 时间:
2014-09-27 10:19:39
阅读次数:
188