码迷,mamicode.com
首页 > 其他好文
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
dwr消息推送
闲来无事,把自己关于对dwr消息推送的实现过程描述一番。首先第一步,当然在工程中是加入dwr.jar了,接着在web.xml中配置以下代码 dwr-invoker org.directwebremoting.servlet.DwrServlet ...
分类:其他好文   时间:2014-06-04 19:27:40    阅读次数:324
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
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
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
表驱动法 -《代码大全》读书笔记
表驱动法是一种编程模式,从表里面查找信息而不是使用逻辑语句(if…else…switch),当是很简单的情况时,用逻辑语句很简单,但如果逻辑很复杂,再使用逻辑语句就很麻烦了。比如查找一年中每个月份的天数,如果用表驱动法,完全不需要写一堆if…else…语句,直接把每个月份的天数存到一个数组里就行了,...
分类:其他好文   时间:2014-06-04 19:31:30    阅读次数:394
qt实现搜索LAN设备
先看效果:代码上:Work.cpp#include #include #include #include #include "Work.h"#include "P2PSearchProtocol.h"#include MyQPushButton *pQPushButton;int main(int ...
分类:其他好文   时间:2014-06-04 19:32:54    阅读次数:591
Permutation Sequence
The set[1,2,3,…,n]contains a total ofn! unique permutations.By listing and labeling all of the permutations in order,We get the following sequence (ie...
分类:其他好文   时间:2014-06-04 19:56:17    阅读次数:347
Unique Paths II
Follow up for "Unique Paths":Now consider if some obstacles are added to the grids. How many unique paths would there be?An obstacle and empty space i...
分类:其他好文   时间:2014-06-04 19:54:55    阅读次数:258
Sqrt(x)
Implementint sqrt(int x).Compute and return the square root ofx.classSolution{public:intsqrt(intx){inti=0;intstep=1;while(step>0){while((i+step)>1);}r...
分类:其他好文   时间:2014-06-04 19:54:17    阅读次数:214
Climbing Stairs
You are climbing a stair case. It takesnsteps to reach to the top.Each time you can either climb 1 or 2 steps. In how many distinct ways can you climb...
分类:其他好文   时间:2014-06-04 19:53:34    阅读次数:173
Objective-C中的属性(property)
Objective-C中的属性(property)它组合了新的预编译指令和新的属性访问的语法,新的属性功能显著减少了必须编写的冗长代码的数量。下面我们来比较下面的代码//第一种声明方法-(void)setRainHandling:(float) rainHanding;-(float) rainHa...
分类:其他好文   时间:2014-06-04 20:00:10    阅读次数:255
云计算之路-阿里云上:什么是“黑色1秒”?
为了更好地分享我们解决“黑色1秒”问题的过程,在这篇博文中我们专门描述一下“黑色1秒”问题的表现。“黑色1秒”是我们使用阿里云以来继“黑色10秒”之后遭遇的最奇特、最诡异、最难以捉摸、最有戏剧性的问题。
分类:其他好文   时间:2014-06-04 19:59:31    阅读次数:230
<meta>标签的作用
所有浏览器都支持 标签。在 HTML 中, 标签没有结束标签;在 XHTML 中, 标签必须被正确地关闭。meta主要为分HTTP标头信息(HTTP-EQUIV)和页面描述信息(NAME)。http-equiv: 与content属性共同组成一个http头部字段,作为http头部的成分传递。nam....
分类:其他好文   时间:2014-06-04 19:58:19    阅读次数:266
[011]默认实参
在一般的函数定义中,都是定义类似的函数。int foo(int v1, int v2);在调用foo函数的时候,将实参传进去就可以使用foo了。但是,我们也可以直接在函数定义的时候就给形参赋值。如:int foo(int v1 = 1, int v2 = 2);这样定义之后,可以这样使用:foo()...
分类:其他好文   时间:2014-06-04 19:57:34    阅读次数:268
N-Queens
Then-queens puzzle is the problem of placingnqueens on ann×nchessboard such that no two queens attack each other.Given an integern, return all distinc...
分类:其他好文   时间:2014-06-04 20:00:47    阅读次数:206
5.29 diagramEditor中的save
public class DiagramEditor extends GraphicalEditorWithFlyoutPalette implementsIPersistableEditor{ public void doSave(IProgressMonitor monitor) { ...
分类:其他好文   时间:2014-06-04 20:04:59    阅读次数:397
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!