码迷,mamicode.com
首页 > 其他好文 > 日排行
Simplify Path
Given an absolute path for a file (Unix-style), simplify it.For example,path="/home/", =>"/home"path="/a/./b/../../c/", =>"/c"click to show corner cas...
分类:其他好文   时间:2014-06-04 19:32:14    阅读次数:270
Maximum Subarray
Find the contiguous subarray within an array (containing at least one number) which has the largest sum.For example, given the array[?2,1,?3,4,?1,2,1,...
分类:其他好文   时间:2014-06-04 19:30:13    阅读次数:230
Anagrams
Given an array of strings, return all groups of strings that are anagrams.Note: All inputs will be in lower-case.classSolution{public:vectoranagrams(v...
分类:其他好文   时间:2014-06-04 19:29:39    阅读次数:247
dwr消息推送
闲来无事,把自己关于对dwr消息推送的实现过程描述一番。首先第一步,当然在工程中是加入dwr.jar了,接着在web.xml中配置以下代码 dwr-invoker org.directwebremoting.servlet.DwrServlet ...
分类:其他好文   时间:2014-06-04 19:27:40    阅读次数:324
Spiral Matrix II
Given an integern, generate a square matrix filled with elements from 1 ton2in spiral order.For example,Givenn=3,You should return the following matri...
分类:其他好文   时间:2014-06-04 19:28:23    阅读次数:220
自己Cookie写的自动登录功能
sql表username password字段User类有 id username password等字段Service有一函数1 @Override2 3 public User findUser(String username) 4 {5 return userDao.findUser(...
分类:其他好文   时间:2014-06-04 19:26:59    阅读次数:425
牛的东西
恭喜,lanmp_wdcp 安装成功!lanmp_wdcp是一个集成nginx,apache,php,mysql等web应用环境 及wdcp管理系统的RPM安装包,比起编译包安装快速,简单,5分钟就可搞店 然后就可以通过wdcp后台管理服务器和网站,FTP,数据库等 使用方便,操作简单,安全,...
分类:其他好文   时间:2014-05-30 13:36:27    阅读次数:393
转:TLV 格式及编解码示例
TLV是一种可变格式,意思就是:Type类型, Lenght长度,Value值;Type和Length的长度固定,一般那是2、4个字节(这里统一采用4个字节);Value的长度有Length指定;编码方法:1. 将类型type用htonl转换为网络字节顺序,指针偏移+42. 将长度length用ht...
分类:其他好文   时间:2014-06-04 19:25:00    阅读次数:376
Add Binary
Given two binary strings, return their sum (also a binary string).For example,a ="11"b ="1"Return"100".classSolution{public:stringaddBinary(stringa,st...
分类:其他好文   时间:2014-06-04 19:23:09    阅读次数:235
Merge Two Sorted Lists
Merge two sorted linked lists and return it as a new list. The new list should be made by splicing together the nodes of the first two lists./***Defin...
分类:其他好文   时间:2014-06-04 19:23:45    阅读次数:243
Plus One
Given a non-negative number represented as an array of digits, plus one to the number.The digits are stored such that the most significant digit is at...
分类:其他好文   时间:2014-06-04 19:19:52    阅读次数:185
Super Mario(线段树离线区间k值)
以前见过这题,没做出来,知道是离线处理,这次仔细想了下,首先把出现的高度都map离散化一下,以离散化出来的数目g建树,把每个位置都开俩个vector,一个存以这个位置为L的询问,一个存以这个位置为R的询问。然后从1-g 进行更新,假如当前i是以第j个区间的开始位置,那么这时就可以询问一下 2 #i....
分类:其他好文   时间:2014-06-04 19:21:52    阅读次数:241
Remove Duplicates from Sorted List
Given a sorted linked list, delete all duplicates such that each element appear onlyonce.For example,Given1->1->2, return1->2.Given1->1->2->3->3, retu...
分类:其他好文   时间:2014-06-04 19:19:16    阅读次数:205
IIS7.0上传在大小限制
修改IIS7的上传文件大小限制的方法:1、打开IIS管理器,并定位于想要修改限制的网站2、双击右侧窗口中的asp图标3、展开最下面那个“限制属性”,将最下面的“最大请求实体主体限制”右边属性框内修改成你想要的值(注意:单位为“字节”),如1g则修改为10737418244、点击窗口右上角的应用,关闭...
分类:其他好文   时间:2014-06-04 19:17:53    阅读次数:268
【学生必备求职指南】好简历是怎样炼成的?毕业生简历实例点评版 转载
作为应届毕业生,简历中应当包括的重点内容基本出现,层次比较清晰,且对自己从事过的实践工作内容进行了较详尽的描述,同时有意识地给出了通过实践自己得到的收获。但总体篇幅过长,部分内容的逻辑性和展现方式有待改进。撰写简历主要原则:1、在能够突出展现自己的工作履历、技能和优势的前提下,尽可能缩短篇幅(一页最...
分类:其他好文   时间:2014-06-04 19:16:02    阅读次数:293
c# 注册表操作,创建,删除,修改,判断节点是否存在
用.NET下托管语言C#操作注册表,主要内容包括:注册表项的创建,打开与删除、键值的创建(设置值、修改),读取和删除、判断注册表项是否存在、判断键值是否存在。准备工作:1:要操作注册表,我们必须要引入必要的命名空间:C#代码usingMicrosoft.Win32;在这个命名空间里面包含了许多注册表...
分类:其他好文   时间:2014-06-04 19:16:35    阅读次数:233
Remove Duplicates from Sorted Array II
Follow up for "Remove Duplicates":What if duplicates are allowed at mosttwice?For example,Given sorted array A =[1,1,1,2,2,3],Your function should ret...
分类:其他好文   时间:2014-06-04 19:12:47    阅读次数:273
Quartz 2D--长方形和线条绘图
今天原本想模仿2048 游戏的。 但是在设计背景环境时,涉及到绘图的知识!于是就开始对绘图进行了一翻学习。 若想自己绘图必须 写自己的View(继承UICView);然后重写UIView 中的drawRect:rect 方法 -(void)drawRect:(CGRent)rect{ //...
分类:其他好文   时间:2014-06-04 19:09:33    阅读次数:243
Permutations
Given a collection of numbers, return all possible permutations.For example,[1,2,3]have the following permutations:[1,2,3],[1,3,2],[2,1,3],[2,3,1],[3,...
分类:其他好文   时间:2014-06-04 19:10:16    阅读次数:155
Permutations II
Given a collection of numbers that might contain duplicates, return all possible unique permutations.For example,[1,1,2]have the following unique perm...
分类:其他好文   时间:2014-06-04 19:10:54    阅读次数:240
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!