一、C#下的单例模式 C#实现单例模式首先要看C# in Depth的一章Implementing the Singleton Pattern in C# 下面是链接:http://csharpindepth.com/Articles/General/Singleton.aspx介绍了Lazy和不L ...
分类:
编程语言 时间:
2017-07-11 17:49:06
阅读次数:
263
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 l ...
分类:
其他好文 时间:
2017-07-11 11:08:51
阅读次数:
191
Given a nested list of integers, return the sum of all integers in the list weighted by their depth. Each element is either an integer, or a list -- w ...
分类:
其他好文 时间:
2017-07-10 10:17:45
阅读次数:
156
先来看一张网上广为流传的《杀戮地带2》典型的Deferred Shading的G-Buffer组织: 这里补充解释下几个点: 不存Position,而由depth和屏幕像素坐标反推出来。參考:http://www.derschmale.com/2014/01/26/reconstructing-po ...
分类:
其他好文 时间:
2017-07-08 11:25:08
阅读次数:
234
今天主要回顾一下几个搜索 DFS ——Depth First Search BFS ——Breadth First Search A* 迭代优先搜索 DFS ——Depth First Search BFS ——Breadth First Search A* 迭代优先搜索 今天DFS和BFS的实现就 ...
分类:
编程语言 时间:
2017-07-07 14:16:51
阅读次数:
166
查看磁盘空间使用情况:df -h 查看根目录下,第一层目录所占空间情况:du -h --max-depth=1 / 找出根目录下大于2000M的文件:find / -size +2000M 找出已删除,但是仍被进程占用的文件:lsof |grep deleted 根据上一步查出来的进程id来查看进程 ...
分类:
系统相关 时间:
2017-07-06 18:50:04
阅读次数:
223
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 l ...
分类:
其他好文 时间:
2017-07-02 10:24:30
阅读次数:
111
1 import sys 2 import multiprocessing 3 import re 4 import os 5 import urllib.request as lib 6 7 def craw_links( url,depth,keyword,processed): 8 ''' u... ...
分类:
编程语言 时间:
2017-06-29 23:58:02
阅读次数:
440
非常easy的题目。只是还是认为要说一下。最小深度。非常快想到bfs,层序遍历嘛。本科的时候实在是没写过多少代码,一開始竟然想不到怎么保存一层的信息。后来想到能够压入一个特殊的对象,每次到达这个对象就知道是一层了。我用的是空指针。认为这个适用性还是不错的。一层的节点入队结束后,应该压入一个NULL。 ...
分类:
其他好文 时间:
2017-06-29 10:02:53
阅读次数:
120
xtion用openni2_launch openni2.launch就可以打开,但是在使用过程中有一些定制性问题: 首先弄清openni2_launch 中一些topic都是什么意思 http://wiki.ros.org/depth_image_proc 关于depthmap是米制还是毫米制: ...
分类:
其他好文 时间:
2017-06-27 20:54:36
阅读次数:
221