反正总是有人要赢,那为什么不能是我呢~[问题描述]Implement strStr().Returns a pointer to the first occurrence of needle in haystack, ornullif needle is not part of haystack.[...
分类:
其他好文 时间:
2014-08-15 14:14:58
阅读次数:
197
一步步写 CMOS 驱动模块
Let's implement a char driver to access the system CMOS.
首先仅仅是创建设备模块,最简单的,类似于前面hello world模块一样的东东,从最简单的框架慢慢搭
/*************************************************...
分类:
其他好文 时间:
2014-08-15 12:54:54
阅读次数:
302
OpenStackRabbitMQ集群管理手册目录第1章引言...11.1目的...11.2说明...11.3MQ..11.4概念...11.5MQ特点...21.6工作流程...21.7系统环境...3第2章RabbitMQ部署...42.1系统环境基本配置...42.2RabbitMA配置...42.3RabbitMQ集群配置...6第3章RabbitMQ集群验证...93.1Nova配置MQHA...
分类:
其他好文 时间:
2014-08-15 02:46:27
阅读次数:
459
Android异步消息处理线程,该线程一直处于无限循环之中,每次从Message Queue中读取消息,然后回调消息处理的方法,Handler的HandlerMessage中处理消息。如果消息队列为空,该线程就挂,等待消息队列中有消息进来,就唤醒线程。1.Android异步线程内部结构 在线程...
分类:
移动开发 时间:
2014-08-15 01:17:06
阅读次数:
404
Problem Description
The new founded Balkan Investment Group Bank (BIG-Bank) opened a new office in Bucharest, equipped with a modern computing environment provided by IBM Romania, and using modern in...
分类:
其他好文 时间:
2014-08-14 23:56:36
阅读次数:
520
因为有 “用户上传脚本,动态运行”的需求,所以要动态地import用户上传的模块
所以写了个函数动态地import
# -*- coding: utf-8 -*-
import os
import sys
import os.path
import Queue
import commands
def test(rootDir):
#判断传入的路径下是否有“__ini...
分类:
编程语言 时间:
2014-08-14 20:52:29
阅读次数:
259
#define _INTSIZEOF(n) ( (sizeof(n) + sizeof(int) - 1) & ~(sizeof(int) - 1) )The above macro simply aligns the size ofnto the nearest greater-or-equa.....
分类:
其他好文 时间:
2014-08-14 20:11:19
阅读次数:
282
原题:
Implement pow(x, n).
思路:递归计算pow。
class Solution {
public:
double pow(double x, int n) {
long long int mid = n/2;
int d = n%2;
if(n==0) return 1;
if(n==1) return ...
分类:
其他好文 时间:
2014-08-14 16:54:38
阅读次数:
229
原题:
Implement int sqrt(int x).
Compute and return the square root of x.
==============================以下为引用====================================
牛顿迭代法
为了方便理解,就先以本题为例:
计算x2 = n的解,令f(...
分类:
其他好文 时间:
2014-08-14 16:51:18
阅读次数:
263
题意:一共有四个方向,从’@‘出发,找能到达‘.’的个数, #是不能通过的.
策略:广搜。
这道题属于最简单的bfs了。
代码:
#include
#include
#include
using std::queue;
bool vis[25][25];
char s[25][25];
int n, m;
int ans = 0;
struct node{
int x, y;
};
no...
分类:
其他好文 时间:
2014-08-13 22:31:17
阅读次数:
301