using System;namespace ZhuaJiu { class ZhuaJiu { public static void Main() { string[] person; int personNum; ...
分类:
其他好文 时间:
2014-07-18 23:37:48
阅读次数:
234
What would happen if we compile and run this code ?void main(){ // Option A. char str1[] = "example"; str1[1] = 'a'; // Option B. ...
分类:
其他好文 时间:
2014-07-18 23:24:50
阅读次数:
222
#include
#define uchar unsigned char
#define uint unsigned int
sbit led1=P1^0;
uchar num;
void main()
{
TMOD=0X01;
//设置定时器0为工作方式1(M1M0为01)
TH0=(65536-45872)/256;
//装处初值11.0592M晶振定时50ms数为458...
分类:
其他好文 时间:
2014-07-18 23:08:30
阅读次数:
684
#include
#include
using namespace std;
void hello()
{
cout<<"hello kitty"<<endl;
}
int main()
{
std::thread t(hello);
t.join();
return 0;
}...
分类:
编程语言 时间:
2014-07-18 23:03:18
阅读次数:
343
MSDN上的解释:
在指定位置并且用指定的 Brush 和
Font 对象绘制指定的文本字符串。
public void DrawString(
string s,
Font font,
Brush brush,
float x,
float y
)
MSDN上的实例:
public void DrawStringFloat(PaintEvent...
分类:
其他好文 时间:
2014-07-18 23:02:27
阅读次数:
1126
1.iter_swap
描述:将两个 ForwardIterator 所指的对象对调
源码:
//version 1
template
inline void __iter_swap(ForwardIterator1 a, ForwardIterator2 b, T*) {
T tmp = *a;
*a = *b;
*b = tmp;
}
//version 2
template...
分类:
其他好文 时间:
2014-07-18 21:32:42
阅读次数:
244
在上位机上用串口调试助手发送一个字符X,单片机收到字符后返回给上位机“I get X”,串口波特率设为9600bps。
#include
#define uchar unsigned char
unsigned char flag,a,i;
uchar code table[]="I get";
void init()
{
TMOD=0x20; //设定T1定时器的工作模式2
...
分类:
其他好文 时间:
2014-07-18 21:23:22
阅读次数:
193
先来看段儿代码: protected void Page_Load(object sender, EventArgs e){#if DEBUG Response.Write("Debug Information! ");#endif Response.Write("Normal Informatio...
分类:
其他好文 时间:
2014-07-18 21:10:56
阅读次数:
140
1、- (void)applicationWillResignActive:(UIApplication *)application说明:当应用程序将要入非活动状态执行,在此期间,应用程序不接收消息或事件,比如来电话了2、- (void)applicationDidBecomeActive:(UIA...
分类:
移动开发 时间:
2014-07-17 12:52:13
阅读次数:
227
【程序员编程艺术】学习记录1:左旋转字符串之指针翻转法
题目:左旋转字符串
定义字符串的左旋转操作:把字符串前面的若干个字符移动到字符串的尾部,如把字符串abcdef左旋转2位得到字符串cdefab。请实现字符串左旋转的函数,要求对长度为n的字符串操作的时间复杂度为O(n),空间复杂度为O(n)
思路一、暴力移位法
//暴力移位法
void leftshiftone(char *s, ...
分类:
其他好文 时间:
2014-07-17 11:06:47
阅读次数:
216