最近正在学习Node,在图书馆借了基本关于Node的书,同时在网上查阅资料,颇有收获,但是整体感觉对Node的理解还是停留在一个很模棱两可的状态。比如Node中的模块,平时练习就接触到那么几个,其他的一些模块暂时只会在学习的时候接触到,不常用便就荒废了。正所谓好记心不如烂笔头,多做笔记还是更有利于理...
原题地址:https://oj.leetcode.com/problems/populating-next-right-pointers-in-each-node/题意:
1 / \ 2 3 / \ / \ 4 5 6 7变为: ...
分类:
编程语言 时间:
2014-05-26 23:43:29
阅读次数:
332
在添加数据的时候有时因为数据条件不符合而页面的数据要重新输入比较麻烦,所以要做数据回显功能根据提供domain里的基本数据类写个类CustomerFormBean
.java 1 package cn.itcast.Controller; 2 3 import java.util.Date; 4 ....
分类:
其他好文 时间:
2014-05-26 23:24:12
阅读次数:
383
第一个问题:如何调用方法?关于模板中eval的使用{eval php
语句}比如:工作中遇到一个小问题,discuz的手机模板中,需要切换收藏和取消收藏。取消收藏,需要找到forum/viewthread.htm
、forum/viewthread_node.htm 模板,在viewthread_n...
分类:
其他好文 时间:
2014-05-26 23:17:50
阅读次数:
416
题目说:Try to do this in one pass
只用一遍遍历的话,p1先走n节点,p2再走,等到p1到达链表尾的时候p2正好在倒数第n+1个上面鸟
/**
* Definition for singly-linked list.
* struct ListNode {
* int val;
* ListNode *next;
* ListNode...
分类:
其他好文 时间:
2014-05-23 01:52:29
阅读次数:
331
1 创建Ring 代码详细分析
在OpenStack_Swift——Ring组织架构中我们详细分析了Ring的具体工作过程,下面就Ring中增加设备,删除设备,已经重新平衡的实现过程作详细的介绍。
首先看RingBuilder类 def __init__(self, part_power, replicas, min_part_hours):
#why 最大 2**32
...
分类:
其他好文 时间:
2014-05-23 01:50:35
阅读次数:
406
第一、initWithNibName这个方法是在controller的类在IB中创建,但是通过Xcode实例化controller的时候用的.
第二、initWithCoder 是一个类在IB中创建但在xocde中被实例化时被调用的.比如,通过IB创建一个controller的nib文件,然后在xcode中通过 initWithNibName来实例化这个controller,那么这个cont...
分类:
其他好文 时间:
2014-05-23 00:48:18
阅读次数:
424
构建node扩展的方法:
1,安装node.js 版本为0.10.24.msi
2,安装node-gyp, npm install -g node-gyp
3,构建 hello工程
cd 到 node-gyp-hello\src
node-gyp configure
node-gyp build
构建node-webkit扩展的方法:
1,安装node.js 版本为0.10...
分类:
编程语言 时间:
2014-05-22 23:38:12
阅读次数:
377
在DAG中DFS中顶点的出栈顺序即逆拓扑序。
def topological_sort( graph ):
is_visit = dict( ( node, False ) for node in graph )
li = []
def dfs( graph, start_node ):
for end_node in...
分类:
编程语言 时间:
2014-05-22 23:12:10
阅读次数:
487
Given a binary tree, find its maximum depth.The
maximum depth is the number of nodes along the longest path from the root node
down to the farthest le...
分类:
其他好文 时间:
2014-05-22 16:05:56
阅读次数:
239