自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

APPLE的专栏

每天进步一点点

  • 博客(23)
  • 资源 (2)
  • 收藏
  • 关注

原创 Leetcode习题:Pow(x, n)

public class Solution { public double pow(double x, int n) { if(x == 0 || x == 1.0 || n == 1){ return x; }else if(n == 0){ return 1; }

2014-05-25 22:27:36 728

原创 Leetcode 习题: Merge k Sorted Lists

Merge k sorted linked lists and return it as one sorted list. Analyze and describe its complexity./** * Definition for singly-linked list. * public class ListNode { * int val;

2014-05-23 08:16:51 629

原创 Leetcode习题:Max Points On a Line

/** * Definition for a point. * class Point { * int x; * int y; * Point() { x = 0; y = 0; } * Point(int a, int b) { x = a; y = b; } * } */public class Solution {

2014-05-22 23:32:47 683

原创 Leetcode习题:Insertion Sort List

Insertion Sort List Total Accepted: 2832 Total Submissions: 11108My SubmissionsSort a linked list using insertion sort.public class Solution { public ListNode insertionSortList(ListN

2013-12-25 22:52:06 837

原创 Leetcode习题:Distinct Subsequences

Distinct Subsequences Total Accepted: 2790 Total Submissions: 12196My SubmissionsGiven a string S and a string T, count the number of distinct subsequences of T in S.A subsequence of a

2013-12-24 08:47:46 2157

原创 Leetcode习题:Unique Binary Search Trees

Unique Binary Search Trees AC Rate: 1802/5241My SubmissionsGiven n, how many structurally unique BST's (binary search trees) that store values 1...n?For example,Given n = 3, ther

2013-10-23 23:14:43 831

原创 Leetcode习题-Reverse Integer

Reverse Integer AC Rate: 2538/6177My SubmissionsReverse digits of an integer.Example1: x = 123, return 321Example2: x = -123, return -321click to show spoilers.Have you thoug

2013-10-23 22:45:34 1050

原创 Leetcode习题:3Sum

3Sum AC Rate: 1682/9966My SubmissionsGiven an array S of n integers, are there elements a, b, c in S such that a + b + c = 0? Find all unique triplets in the array which gives the

2013-10-20 19:42:15 759

原创 Leetcode习题:Convert Sorted List to Binary Search Tree

Convert Sorted List to Binary Search Tree AC Rate: 878/3476My SubmissionsGiven a singly linked list where elements are sorted in ascending order, convert it to a height balanced BST.

2013-10-10 22:13:34 2244

原创 Leetcode习题:Remove Nth Node From End of List

Remove Nth Node From End of List AC Rate: 1023/3385My SubmissionsGiven a linked list, remove the nth node from the end of list and return its head.For example, Given linked lis

2013-10-09 00:12:05 2999

原创 Leetcode习题:Divide Two Integers

Divide Two Integers AC Rate: 770/5289My SubmissionsDivide two integers without using multiplication, division and mod operator.提交了几次,看似简单的一道题,第一下提交发现忘考虑负数的情况……以后做题一定要想清楚。第二次提

2013-10-08 23:45:14 2396

原创 Leetcode习题: Two Sum

Two Sum AC Rate: 2001/9056My SubmissionsGiven an array of integers, find two numbers such that they add up to a specific target number.The function twoSum should return indic

2013-10-07 19:23:27 841

原创 Leetcode习题: SingleNumber II

Single Number II AC Rate: 323/1255My SubmissionsGiven an array of integers, every element appears three times except for one. Find that single one.Note:Your algorithm should have

2013-10-04 11:35:40 2772

原创 S4部署及使用

S4的部署及使用也是很方便的,具体可以参见 https://cwiki.apache.org/confluence/display/S4/S4+piper+walkthrough下面将简单摘录其中的一些内容。S4目前并没有发布的包,故需要自已下载源代码包去build。Install S41.下载代码。安装git后,使用该命令:     git clone https:/

2012-07-10 21:55:22 2667 1

原创 Gradle

准备写一个系列,分析S4由于S4中采用的不是maven,而是gradle,故此文将介绍一下gradle.//占个坑以后补,先看s4代码

2012-07-10 21:20:44 832

原创 Maven: NoClassDefFoundError: org/codehaus/plexus/classworlds/launcher/Launcher

想在mac本上把程序代码也checkout下来。本来先装的maven 3,但是同步过几次后出现了问题,因为maven3和maven2的配置文件要求好像有些不同,遂想重新装maven2。    安装maven时,因为只是需要将maven的包解压缩后放到相应的位置,再设定相应的几个环境变量如下:    M2_HOME=/usr/local/apache-maven/apache-maven-3

2012-03-11 10:17:30 16833

转载 MAC本上PATH设置

1 首先查看PATH命令:$PATH   2 如何设置PATH命令:echo "exportPATH=xxxxxx:$PATH" >>~/.bash_profile解释:把"export PATH=xxxxxx:$PATH"输出打印到~/.bash_profile中去。 3 Unix知识补充:~/.bash_profile介绍mac和linux终端一般用bash

2012-03-10 21:51:54 3914

原创 Mockito框架

项目中因为快要进入后期的单元测试,但是测试中存在一些问题,为解决这种相互调用依赖关系,带我的人给我推荐了可以去学习一下Mockito,确实挺有意思。简单来说,Mockito是一个流行的Mock框架。所谓Mock,就是在测试过程中,对于某些不容易构造或者不容易获取的对象,用一个虚拟的对象来创建以便测试的测试方法。Mockit的主页为:http://code.google.com/p/mock

2012-03-02 23:04:38 3132

转载 Apache Modules Book 阅读笔记 (一)

先记载一下今天看到别人讨论用Apache模块开发时的一句话,比喻得很有意思:    做一个能用的软件, 和做一个完善的系统差别很大。一个好的经济学的比喻: 你能做出比麦当劳更好吃的汉堡,但是你能不能做出比麦当劳更庞大的快餐行业。    开始进入正题了。上周已经在开始看代码了,这周才发现用的是apache模块开发,真是很惭愧,发现读代码时还是方法不到位,意识不强烈。    有一些好的学习

2012-02-28 23:38:50 1113

翻译 TestNG指南

今天突然收到通知,统一改用TestNG写测试用例,开始查这方面的资料,学习一下。    TestNG需要有自己的配置文件,最方便的办法即是从eclipse上直接下载一下插件。直接下载跟插件下载的地址都可以在http://testng.org/doc/download.html上找到。    http://www.mkyong.com/tutorials/testng-tutorials

2012-02-27 22:47:03 5289 2

原创 Java正则表达式

在识别数据流名称时由于想支持正则表达式的订阅流方式,在此接触了一些,作个记录。错误:Invalid escape sequence (valid ones are  \b  \t  \n  \f  \r  \"  \'  \\ )       报错主要是源于这一句: Pattern pattern = Pattern.compile("^\w+$");

2012-02-26 21:43:19 1143

原创 Junit单元测试

最近在写一模块的代码,不能再像原来一样不认真考虑测试了,因为看看Junit如何写单元测试,这里作一些笔记。1. 下载junit的包,并在工程中引用。不过还可以在eclipse工程中选择Junit的库。2. 关于使用Junit的目的。主要有四种:测试某个类的所有方法测试某个类的个别方法测试几个类中的全部方法测试几个类中的指定方法    摘自某参考资料。对此,我觉得我是想测试某个类

2012-02-26 21:31:00 661

原创 python文件处理

file object的属性: closed #标记文件是否已经关闭,由close()改写encoding  #文件编码mode  #打开模式name  #文件名newlines #文件中用到的换行模式,是一个tuple softspace  #这是一个布尔值在使用 print 语句时表示在打印另一个值之前,是否要先打印一个  空白符。若用类来模仿文件操作则必须提供这样一个

2008-07-10 21:08:00 856

Tracking human motion using multiple cameras

Tracking human motion using multiple cameras介绍跟目标跟踪算法的论文,值得一读

2007-10-28

ASP知识全(强烈推荐)

如果你是开始学习ASP,这个文档绝对是很具有参考价值,对于入门很有帮助,前面一部分是讲HTML,配有小例子,自己可以跟着它的慢慢去尝试,很容易上手的^_^

2007-08-10

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除