自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(200)
  • 资源 (1)
  • 收藏
  • 关注

转载 Emacs安装和设置tabbar

点击打开链接Emacs是用Buffer来组织编辑区域的,一个Buffer就代表一个文件或者一个临时编辑区域,我们可以用一些函数来切换到前一个或后一个Buffer,也可以列出所有的Buffer来进行选择。一些现代编辑器都支持一种特性,那就是Tab,用标签来列出所有的文件并可以方便地在文件之间切换,直观而方便。万能的Emacs当然也可以做到这个。增加标签特性需要tabbar

2014-01-03 00:09:51 1504

原创 Clojure Github 项目收藏

1.  clojure-bloghttps://github.com/baoliang/clojure-blog

2013-12-30 19:59:56 683

转载 Android滑动菜单特效实现

转载请注明出处:http://blog.csdn.net/guolin_blog/article/details/8714621人人客户端有一个特效还是挺吸引人的,在主界面手指向右滑动,就可以将菜单展示出来,而主界面会被隐藏大部分,但是仍有左侧的一小部分同菜单一起展示。据说人人客户端的这个特效是从facebook客户端模仿来的,至于facebook是不是又从其它地方模仿来的就不

2013-12-23 23:49:52 723

转载 Eclipse上GIT插件EGIT使用手册

出处:点击打开链接看到大家在讨论github的使用,我用的也不多,偶尔clone一些好的源代码而已。我用的是Eclipse的插件EGit,全部操作直接在eclispe里就可以完成了,哈哈,我比较懒,官网上教的那些git clone 什么的高深操作我也不会,感觉egit还是比较好用的,所以上网搜了一个关于egit的详细操作的帖子,现在搬过来和大家一起分享一下。我找到的这个帖子的地址是:http:

2013-12-22 21:26:19 698

转载 编写你的第一个垃圾收集器

原文链接: Bob Nystrom   翻译: 伯乐在线 - deathmonkey译文链接: http://blog.jobbole.com/53376/本文由 伯乐在线 - deathmonkey 翻译自 Bob Nystrom。欢迎加入技术翻译小组。转载请参见文章末尾处的要求。伯乐在线补充:本文作者 Bob Nystrom 是 Google Dart

2013-12-22 09:53:08 509

转载 cocos2d-x 2x 菜鸟编塔防 01 准备工作

点击打开链接一.前言最近在学习2dx,看了几个源码,手很是痒痒,下面跟我一下编写一个类似保卫大萝卜的塔防游戏吧。二.不废话开始编代码。我用的cocos2d-x 的版本是2.04 ,编辑器是vs2010.首先创建一个工程,我们取名字叫“TDgame”。之后我们添加几个常用到的模块。 1.动画管理器,Ani

2013-12-16 19:37:22 632

原创 CODE 147: Evaluate Reverse Polish Notation

Evaluate the value of an arithmetic expression in Reverse Polish Notation.Valid operators are +, -, *, /. Each operand may be an integer or another expression.Some examples: ["2", "1", "+",

2013-11-28 22:23:01 600

原创 CODE 146: Max Points on a Line

Given n points on a 2D plane, find the maximum number of points that lie on the same straight line. public int maxPoints(Point[] points) { // IMPORTANT: Please reset any member data you declared

2013-11-28 22:16:20 655

原创 CODE 144: Insertion Sort List

Sort a linked list using insertion sort. public ListNode insertionSortList(ListNode head) { // IMPORTANT: Please reset any member data you declared, as // the same Solution instance will be reus

2013-11-27 19:56:56 421

原创 CODE 145: Sort List

Sort a linked list in O(n log n) time using constant space complexity. public ListNode sortList(ListNode head) { // IMPORTANT: Please reset any member data you declared, as // the same Solutio

2013-11-26 22:35:50 594

转载 PS制作图片圆角教程

点击打开链接最近新做了一个模板的LOGO,为了让其更具美观和平滑型因此需要把图片角部修改为圆角,PS新手不防学习一下。1.打开PhotoShop,并找开要处理的图片;2.使用工具栏中的"矩形"工具,并对其如下设置:在写有"注意"字样的地方,这个按钮表示用此工具建立路径,路径的作用也就是为了我们 [ 3.转换成选区(快捷键:Ctrl+Enter) ]

2013-11-26 22:34:42 946

转载 CODE 143:LRU Cache

Design and implement a data structure for Least Recently Used (LRU) cache. It should support the following operations: get and set.get(key) - Get the value (will always be positive) of the key if

2013-11-26 21:38:45 426

原创 CODE 142: Binary Tree Postorder Traversal

Given a binary tree, return the postorder traversal of its nodes' values.For example:Given binary tree {1,#,2,3}, 1 \ 2 / 3return [3,2,1]. public ArrayList pos

2013-11-25 22:37:26 463

原创 CODE 141: Binary Tree Preorder Traversal

Given a binary tree, return the preorder traversal of its nodes' values.For example:Given binary tree {1,#,2,3}, 1 \ 2 / 3return [1,2,3].Note: Recursive soluti

2013-11-25 22:15:33 469

原创 CODE 140: Reorder List

Given a singly linked list L: L0→L1→…→Ln-1→Ln,reorder it to: L0→Ln→L1→Ln-1→L2→Ln-2→…You must do this in-place without altering the nodes' values.For example,Given {1,2,3,4}, reorder it to {1,4

2013-11-25 20:37:24 440

转载 CODE 139: Linked List Cycle II

Given a linked list, return the node where the cycle begins. If there is no cycle, return null.Follow up:Can you solve it without using extra space?点击打开链接 public ListNode detectCycle(ListNod

2013-11-24 22:01:49 600

原创 CODE 138: Linked List Cycle

Given a linked list, determine if it has a cycle in it.Follow up:Can you solve it without using extra space? public boolean hasCycle(ListNode head) { // IMPORTANT: Please reset any

2013-11-24 16:07:29 495

原创 CODE 137: Word Break II

Given a string s and a dictionary of words dict, add spaces in s to construct a sentence where each word is a valid dictionary word.Return all such possible sentences.For example, givens = "

2013-11-24 15:50:21 637

原创 CODE 136: Word Break

Given a string s and a dictionary of words dict, determine if s can be segmented into a space-separated sequence of one or more dictionary words.For example, givens = "leetcode",dict = ["leet"

2013-11-23 21:22:58 893

原创 CODE 135: Copy List with Random Pointer

A linked list is given such that each node contains an additional random pointer which could point to any node in the list or null.Return a deep copy of the list. public RandomListNode copyRan

2013-11-23 18:11:06 638

转载 CODE 134: Single Number II

Given an array of integers, every element appears three times except for one. Find that single one.Note:Your algorithm should have a linear runtime complexity. Could you implement it without usi

2013-11-23 17:49:40 538

原创 CODE 133: Single Number

Given an array of integers, every element appears twice except for one. Find that single one.Note:Your algorithm should have a linear runtime complexity. Could you implement it without using ext

2013-11-23 16:52:37 564

原创 CODE 132: Candy

There are N children standing in a line. Each child is assigned a rating value.You are giving candies to these children subjected to the following requirements:Each child must have at least on

2013-11-23 16:49:20 638

原创 CODE 131: Gas Station

There are N gas stations along a circular route, where the amount of gas at station i is gas[i].You have a car with an unlimited gas tank and it costs cost[i] of gas to travel from station i to

2013-11-22 22:14:51 567

原创 CODE 6: Word Ladder II

Given two words (start and end), and a dictionary, find all shortest transformation sequence(s) from start to end, such that:Only one letter can be changed at a timeEach intermediate word must exi

2013-11-19 23:01:13 838

原创 CODE 130: Clone Graph

Clone an undirected graph. Each node in the graph contains a label and a list of its neighbors.OJ's undirected graph serialization:Nodes are labeled uniquely.We use # as a separator for ea

2013-11-18 23:51:32 689

原创 CODE 41: Reverse Linked List II

Reverse a linked list from position m to n. Do it in-place and in one-pass.For example:Given 1->2->3->4->5->NULL, m = 2 and n = 4,return 1->4->3->2->5->NULL.Note:Given m, n satisfy t

2013-11-17 14:46:58 439

原创 CODE 42: Subsets II

Given a collection of integers that might contain duplicates, S, return all possible subsets.Note:Elements in a subset must be in non-descending order.The solution set must not contain dupli

2013-11-17 14:32:57 613

原创 CODE 51: Search in Rotated Sorted Array II

Follow up for "Search in Rotated Sorted Array":What if duplicates are allowed?Would this affect the run-time complexity? How and why?Write a function to determine if a given target is in the

2013-11-17 14:13:20 648

原创 CODE 53: Remove Duplicates from Sorted Array II

Follow up for "Remove Duplicates":What if duplicates are allowed at most twice?For example,Given sorted array A = [1,1,1,2,2,3],Your function should return length = 5, and A is now [1,1,2,2,

2013-11-17 14:06:58 616

原创 CODE 74: Spiral Matrix II

Given an integer n, generate a square matrix filled with elements from 1 to n2 in spiral order.For example,Given n = 3,You should return the following matrix:[ [ 1, 2, 3 ], [ 8, 9, 4 ], [

2013-11-16 21:13:34 637

原创 CODE 129: Two Sum

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, whe

2013-11-16 20:47:11 771

原创 CODE 128: 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)). public double findMedianSortedAr

2013-11-15 22:15:27 462

原创 CODE 127: Longest Substring Without Repeating Characters

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. Fo

2013-11-14 20:50:35 629

原创 CODE 126: Add Two Numbers

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 link

2013-11-14 20:39:12 627

原创 CODE 125: Longest Palindromic Substring

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. public String lon

2013-11-14 20:13:23 661

原创 CODE 124: ZigZag Conversion

The string "PAYPALISHIRING" is written in a zigzag pattern on a given number of rows like this: (you may want to display this pattern in a fixed font for better legibility)P A H NA P L S I

2013-11-13 22:45:29 561

原创 CODE 123: Reverse Integer

Reverse digits of an integer.Example1: x = 123, return 321Example2: x = -123, return -321click to show spoilers.Have you thought about this?Here are some good questions to ask before coding.

2013-11-12 21:24:02 705

原创 CODE 122: String to Integer (atoi)

Implement atoi to convert a string to an integer.Hint: Carefully consider all possible input cases. If you want a challenge, please do not see below and ask yourself what are the possible input ca

2013-11-12 21:04:14 666

原创 CODE 121: Palindrome Number

Determine whether an integer is a palindrome. Do this without extra space.click to show spoilers.Some hints:Could negative integers be palindromes? (ie, -1)If you are thinking of convertin

2013-11-12 20:46:15 682

空空如也

空空如也

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

TA关注的人

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