Linked List CycleGiven a linked list, determine if it has a cycle in it.Follow up:Can you solve it without using extra space?算法思路1:快慢指针,当两个指针相遇,则表示有环,...
分类:
其他好文 时间:
2014-07-19 18:38:30
阅读次数:
198
Linux用不惯的很大一个原因是终端下编译。主要是平时Win下也不怎么用终端。最近刚刚发现Gedit可以添加外部工具,运行Shell命令。这不就行了,我TM之前怎么没想到呢。从终端中狂按Up-Down解脱了。然后Win下Notepad++ Linux下Gedit 基本一样嘛。(gedit工具)一键编...
分类:
系统相关 时间:
2014-07-19 18:11:20
阅读次数:
224
只是简单说明一下原理,其它的自己探索吧:)一、两个域名:www.domain.com和img.domain.com二、在www域名的服务器中上传文件:up.html save.phpif(@$_GET['action']=="ok"){ $picname="upfile/".rand...
分类:
Web程序 时间:
2014-07-19 17:19:36
阅读次数:
237
After following many outdated and incomplete instructions for setting up a web development environment on a Mac (back in March 2012), and spending a l...
分类:
其他好文 时间:
2014-07-19 15:00:41
阅读次数:
730
唔 神题一道 大家感受一下1873. GOV ChroniclesTime limit: 0.5 secondMemory limit: 64 MBA chilly autumn night. Well wrapped up in a coat, a man is rapidly walking a...
分类:
其他好文 时间:
2014-07-19 14:37:18
阅读次数:
415
Double 四舍五入保留小数:
/**
* @example roundUpNumber(20.47, 0) = 20.5, roundUpNumber(20.449, 1) = 20.45 * @description round up double number * @param Double d * @param Integer index * @return *...
分类:
其他好文 时间:
2014-07-19 08:08:55
阅读次数:
219
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.Fo...
分类:
其他好文 时间:
2014-07-18 18:28:44
阅读次数:
231
DescriptionRailway tickets were difficult to buy around the Lunar New Year in China, so we must get up early and join a long queue…The Lunar New Year ...
分类:
其他好文 时间:
2014-07-18 18:17:12
阅读次数:
280
这个题目主要是设置显示开/光及光标设置
这个地方与上一个题目没有多大的区别。
#include
#define uchar unsigned char
#define uint unsigned int
uchar code table[]="GOOD GOOD STUDY!";
uchar code table1[]="DAY DAY UP ^_^!";
sbit lcden=P3...
分类:
其他好文 时间:
2014-07-18 18:11:09
阅读次数:
245
通常应用程序在处理触摸事件时一般会用到motionevent.getAction()来判断上报的触摸点是ACTION_DOWN、ACTION_MOVE或ACTION_UP,然后做出移动、缩放等处理逻辑。每一个触摸点属性是在哪里定义的呢?是驱动上报就标记了每个点的触摸属性吗?
直接给结论:对于触摸点的属性,在InputReader中的dispatchTouches()函数中定义,而不是驱动给的。
...
分类:
移动开发 时间:
2014-07-18 18:08:59
阅读次数:
320