- 浏览: 16131 次
- 性别:
- 来自: 合肥
-
最新评论
请您先登录,才能继续操作
文章列表
oh-my-zsh + iterm2
1. 下载iterm2
MAC 自带的terminal功能稍微弱一点,因此我选择了iterm2,主要是看重了他的可分屏,高级功能
基本设置
启动hotkey window,这样在任何时候都可以唤出iterm2
Iterm -> Preference ->Keys ->hotkey
配色
使用了一款开源的配色方案,Solarized,下载完之后双击,就可以导入到iterm2中。
我选择的是 solarized light 主题
Profiles -> open profiles -> col ...
Centos 上面升级 gcc
转载
http://www.cnblogs.com/peterpanzsy/archive/2013/04/10/3006838.html
mark 一下
What is REST?
REST的全称是Representational State Transfer
首先它是一种架构的风格,这种架构针对Network-based Application,这种架构风格可以给我们的webapplication起到一个指导的作用,而不是强制的。
架构的设计有两种思路,一种是空空的一张白纸,然后往里面添加组件,另外一种是一个完整架构,然后通过添加各种约束来对架构进行优化和筛减。而REST则属于后者。
REST的特点:REST本身并不是要基于HTTP,只是HTTP的许多特性和REST的表述不谋而合。
资源,在REST的世界里,所有的事物被称为 ...
Given a string S, find the longest palindromic substring in S. You may assume that the maximum length of S is 1000, and there exists one unique longest palindromic substring.
这个题目是一个很常见的面试题,有暴力穷举法,最长前缀法,还有一个非常巧妙的方法,manacher's algorithm, 看到这个算法的时候,发现真的是太优美了,不得不佩服设计出这个算法的人。
本文参考了这篇文章:http://blog ...
公司最近切换到Vmware虚拟机下面工作,run junit test case 的时候突然报一个很奇怪的错误
java.lang.UnsatisfiedLinkError: no attach in java.library.path
查了一下,原因是没有将java加入到PATH环境变量
将%JAVA_HOME%\bin 加入到环境变量即可
Given a string, find the length of the longest substring without repeating characters. For example, the longest substring without repeating letters for "abcabcbb" is "abc", which the length is 3. For "bbbbb" the longest substring is "b", with the length of 1.
...
LeetCode Problem:链表相加
- 博客分类:
- 算法、数据结构
You are given two linked lists representing two non-negative numbers. The digits are stored in reverse order and each of their nodes contain a single digit. Add the two numbers and return it as a linked list.
Input: (2 -> 4 -> 3) + (5 -> 6 -> 4)Output: 7 -> 0 -> 8
思路:遍历链表即可。
...
Median of Two Sorted Arrays
There are two sorted arrays A and B of size m and n respectively. Find the median of the two sorted arrays. The overall run time complexity should be O(log (m+n)).
这个题目是非常有名的面试题,
注意leetcode上面对中位数的定义是:
如果合并之后的数组元素个数是奇数,那么中位数就是中间的那位
如果合并之后的数组元素个数是奇数,那么中位数是中间两位的平均数
解题 ...
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, where index1 must be less than index2. Please note that your returned answers (both index1 and index2) a ...
最近在做leetcode的题目,之后会把每个题目的程序发出来,以便做个记录,日后可以复习一下