最近正在学习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
第一个问题:如何调用方法?关于模板中eval的使用{eval php
语句}比如:工作中遇到一个小问题,discuz的手机模板中,需要切换收藏和取消收藏。取消收藏,需要找到forum/viewthread.htm
、forum/viewthread_node.htm 模板,在viewthread_n...
分类:
其他好文 时间:
2014-05-26 23:17:50
阅读次数:
416
原题地址:https://oj.leetcode.com/problems/copy-list-with-random-pointer/题意:A
linked list is given such that each node contains an additional random pointe...
分类:
编程语言 时间:
2014-05-26 23:16:12
阅读次数:
368
如果你有PHP 开发经验,会习惯在修改PHP 脚本后直接刷新浏览器以观察结果,而你
在开发Node.js 实现的HTTP 应用时会发现,无论你修改了代码的哪一部份,都必须终止 Node.js 再重新运行才会奏效。这是因为Node.js
只有在第一次引用到某部份时才会去解析脚 本文件,以后都会直接访问...
分类:
Web程序 时间:
2014-05-26 22:47:12
阅读次数:
273
【7.4】 1 #include 2 #include 3 #include 4 using
namespace std; 5 #define MAXN 100 6 7 typedef struct node{ 8 char data; 9 node
*lchild;10 ...
分类:
其他好文 时间:
2014-05-23 03:26:20
阅读次数:
260
题目说: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
构建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