Link:http://oj.leetcode.com/problems/swap-nodes-in-pairs/Given a linked list,
swap every two adjacent nodes and return its head.For example,Given1->2-...
分类:
其他好文 时间:
2014-05-05 22:45:37
阅读次数:
331
<!doctypehtml>
<html>
<head>
<metacharset="utf-8"/>
<scripttype="text/javascript"src="jquery.js"></script>
</head>
<body>
<imgsrc="8fbf0884jw1drfmvfrhrhj.jpg"width="300"height="300"/>
<buttonid="btn1..
分类:
其他好文 时间:
2014-05-05 12:19:01
阅读次数:
300
#define PAGE_SIZE 4096
/* these are not to be changed without changing head.s etc */
#define LOW_MEM 0x100000
extern unsigned long HIGH_MEMORY;
#define PAGING_MEMORY (15*1024*1024)
#define PAGING_PAG...
分类:
系统相关 时间:
2014-05-04 18:15:51
阅读次数:
441
Logstash是一个完全开源的工具,他可以对你的日志进行收集、分析,并将其存储供以后使用(如,搜索),您可以使用它。说到搜索,logstash带有一个web界面,搜索和展示所有日志。kibana也是一个开源和免费的工具,他可以帮助您汇总、分析和搜索重要数据日志并提供友好的web界面..
分类:
其他好文 时间:
2014-05-04 17:21:14
阅读次数:
416
Sort a linked list using insertion
sort.思路:使用插入排序来对链表进行排序。只要注意链表的边界问题,其实关键就是交换链表的值,对链表指针是没有什么影响的。接下来说下具体步骤:1.判断head或者head->next是否为空;2.循环遍历,初始条件pCur=he...
分类:
其他好文 时间:
2014-05-04 10:01:57
阅读次数:
242
字符串hash模板,
本题是求,给定字符串s中至少出现m次的最长字符串长度,及此时起始位置的最大值
LA 4513 Stammering Aliens
//#pragma warning (disable: 4786)
//#pragma comment (linker, "/STACK:16777216")
//HEAD
#include
#include
#include
#inc...
分类:
其他好文 时间:
2014-05-04 09:52:37
阅读次数:
304
如何使用html网页和本地app进行传递数据呢?经过研究,发现还是有方法的,总结了一下,大致有一下几种方式
一、通过html页面打开Android本地的app
1、首先在编写一个简单的html页面
html>
head>
meta http-equiv="Content-Type" content="text/html; ch...
分类:
移动开发 时间:
2014-05-04 00:31:46
阅读次数:
376
给定一个单链表,只给出头指针h:
1、 如何判断是否存在环?
证明:
slow首次在A点进入环路时,fast一定在环中的B点某处。设此时slow距head长为x,B点距A点长度为y,环周长为s。因为fast和slow的步差为1,所以slow前行距离为y的时候,恰好会被fast在M点追上。因为y
//判断单链表是否有环
public static boolean hasCyc...
分类:
其他好文 时间:
2014-05-03 16:38:30
阅读次数:
325
#include
#include
#include
#include
#include
using namespace std;
#define N 20020
struct node{
int from, to, dou, nex;
}edge[N];
int head[N], edgenum;
void add(int u, int v,int dou){
node E={u,v,dou...
分类:
其他好文 时间:
2014-05-03 15:25:32
阅读次数:
340
Web服务的基本搭建和访问控制环境:web:[root@Web~]#ifconfig|head-2
eth0Linkencap:EthernetHWaddr52:54:01:AC:DE:C4
inetaddr:192.168.122.10Bcast:192.168.122.255Mask:255.255.255.0
[root@rh_1~]#yum-yinstallhttpdNDS:Linkencap:EthernetHWaddr52:54:02:AC:DE:C4
ineta..
分类:
Web程序 时间:
2014-05-03 15:17:05
阅读次数:
389