第一种:使用命令修改(直接即时生效,重启失效) #ifconfig eth0 192.168.0.1 netmask 255.255.255.0 up 说明: eth0是第一个网卡,其他依次为eth1,eth* 192.168.0.1是给网卡配置的第一个网卡配置的ip地址 netmask 255.2...
分类:
系统相关 时间:
2014-07-16 21:36:35
阅读次数:
291
求最少去掉几个公交站使得从s到t的最短路径大于k。迭代加深搜索。#include #include #include using namespace std;#define maxn 60#define maxm 50000int n,m,K,cnt,up;int head[maxn],pre[ma...
分类:
其他好文 时间:
2014-07-14 09:29:57
阅读次数:
221
Given a linked list, determine if it has a cycle in it.
Follow up:
Can you solve it without using extra space?
/**
* Definition for singly-linked list.
* class ListNode {
* int val;
* ...
分类:
其他好文 时间:
2014-07-13 16:32:04
阅读次数:
152
DOWN操作:linux内核中,对信号量的DOWN操作有如下几种:
void down(struct semaphore *sem); //不可中断
int down_interruptible(struct semaphore *sem);//可中断
int down_killable(struct semaphore *sem);//睡眠的进程可以因为受到致命信号而被唤醒,中断获取信号量...
分类:
其他好文 时间:
2014-07-13 16:21:36
阅读次数:
501
Given a binary tree and a sum, determine if the tree has a root-to-leaf path such that adding up all the values along the path equals the given sum.
For example:
Given the below binary tree and sum
...
分类:
其他好文 时间:
2014-07-13 13:58:01
阅读次数:
184
SharePoint 2010 使得往你的网站添加对话框内容变得出乎意料的简单。内置的功能允许你从站点任何地方抽取内容,然后显示在模态对话框中,出现在页面的前端。...
分类:
其他好文 时间:
2014-07-12 22:09:41
阅读次数:
258
Just like normal variables, pointers can be declared constant. There are two different ways that pointers and const can be intermixed, and they are very easy to mix up.
To declare a const pointer, ...
分类:
其他好文 时间:
2014-07-12 21:20:23
阅读次数:
165
BUYING FEED
时间限制:3000 ms | 内存限制:65535 KB
难度:4
描述
Farmer John needs to travel to town to pick up K (1 D*K cents.
The county feed lot has N (1 location X_i (0 <
X_i John as much as F_i (1
A...
分类:
其他好文 时间:
2014-07-12 20:27:31
阅读次数:
263
Given an array of integers, find two numbers such that they add up to a specific target number.
The function twoSum should return indices of the two numbers such that they add up to the target, whe...
分类:
其他好文 时间:
2014-07-12 19:06:27
阅读次数:
204
前面我们看了key事件的处理流程,相信大家对此已经有了新的认识,这篇文章我打算带领大家来看看稍微复杂些的touch事件的处理流程。说它复杂是因为key事件本身就key down,up,long pressed这几种,而touch事件支持多指触摸,给人的感觉好像同时在发生多个touch事件一样,所.....
分类:
移动开发 时间:
2014-07-12 14:17:46
阅读次数:
366