1 /** 2 * Definition for singly-linked list. 3 * public class ListNode { 4 * int val; 5 * ListNode next; 6 * ListNode(int x) { 7 * ...
分类:
编程语言 时间:
2014-07-16 17:45:41
阅读次数:
226
上一篇我们初步学习了JavaScript Promises,本篇将介绍Promise如何优雅地进行错误处理以及提升操作node.js风格1的异步方法的逼格,没错就是使用promisify2。异步编程中的错误处理人性的、理想的也正如很多编程语言中已经实现的错误处理方式应该是这样:try { va...
分类:
编程语言 时间:
2014-07-16 17:45:17
阅读次数:
214
说明:
使用CentOS系统,进行nodejs安装,nodejs版本-v0.8.7。
1,先下载nodejs:
# wget http://nodejs.org/dist/v0.8.7/node-v0.8.7.tar.gz
2,解压文件
# tar xvf node-v0.8.7.tar.gz
3,进入解压目录
# c...
分类:
Web程序 时间:
2014-07-16 17:35:25
阅读次数:
206
Node.js configure error: No acceptable C compiler found!
Please make sure you have a C compiler installed on your system and/or
consider adjusting the CC environment variable if you ...
分类:
Web程序 时间:
2014-07-16 17:32:10
阅读次数:
952
J - MANAGER(2.4.5)
Time Limit:1000MS Memory Limit:10000KB 64bit IO Format:%I64d
& %I64u
Submit Status
Description
One of the programming paradigm in parallel processing is th...
分类:
其他好文 时间:
2014-07-16 17:30:45
阅读次数:
213
题目分析见这里
class Solution:
# @param head, a ListNode
# @return a list node
def detectCycle(self, head):
if None == head or None == head.next:
return None
pfast = ...
分类:
编程语言 时间:
2014-07-16 17:18:53
阅读次数:
248
Shoemaker's Problem
Shoemaker has N jobs (orders from customers) which he must make. Shoemaker can work on only one job in each day. For each ith job, it is known the integer Ti (1i<=1000...
分类:
其他好文 时间:
2014-07-16 17:12:33
阅读次数:
274
[LeetCode]Populating Next Right Pointers in Each Node...
分类:
其他好文 时间:
2014-07-16 11:29:23
阅读次数:
143
Arbitrage
Problem Description
Arbitrage is the use of discrepancies in currency exchange rates to transform one unit of a currency into more than one unit of the same currency. For example, ...
分类:
其他好文 时间:
2014-07-16 10:05:49
阅读次数:
260
Description
Are you interested in pets? There is a very famous pets shop in the center of the ACM city. There are totally m pets in the shop, numbered from 1 to m. One day, there are n customers in...
分类:
其他好文 时间:
2014-07-16 09:17:29
阅读次数:
325