加载中
Linux 进程后台运行的方法

当用户注销(logout)或者网络断开时,终端会收到 HUP(hangup)信号从而关闭其所有子进程。因此,我们的解决办法就有两种途径:要么让进程忽略 HUP 信号,要么让进程运行在新的会话里从而成...

2018/01/28 17:10
27
hadoop 平台运行mapreduce代码

WordCount是写hadoop mapreduce入门级程序,会写wordcount的话,基本上80%的mapreduce就懂了。 mapreduce分为map过程和reduce过程,用户可以根据自己的业务自定义map过程和reduce过程。 以w...

2018/01/14 19:36
17
leetcode -- Balanced Binary Tree

Balanced Binary Tree Given a binary tree, determine if it is height-balanced. For this problem, a height-balanced binary tree is defined as a binary tree in which the depth of t...

2018/01/12 20:44
7
leetcode -- Maximum Depth of Binary Tree

Maximum Depth of Binary Tree 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...

2018/01/12 20:24
12
在ubuntu16.06 64位上编译hadoop2.7.5

首先要下载hadoop源码包,并放在linux目录中进行解压。解压后可以看到文件目录的结构: leiline@master:~/Documents/CompileHadoop/hadoop-2.7.5-src$ ll total 220 drwxr-xr-x 19 leiline ...

2018/01/07 16:02
24
linux 文件压缩命令

zip 压缩一个目录 zip -r archive_name.zip directory_to_compress 解压一个zip文档 unzip archive_name.zip tar tar只是一个打包工具,并不负责压缩 打包一个目录 tar -cvf archive_name....

2018/01/03 10:53
14
leetcode -- single number

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

2017/12/29 10:48
16
linux 查看文件个数

linux并没有直接查看文件夹中文件个数的命令,因此需要通过一些手段来操作。 统计某文件夹下文件的个数 ls -l | grep "^-" | wc -l 统计某文件夹下目录的个数 ls -l | grep "^d" | wc -l 统...

2017/12/28 16:17
111
leetcode -- Path Sum

Path Sum Given a binary tree and a sum, determine if the tree has a root-to-leaf path such that adding up all the values along the path equals the given sum. For example: Given ...

2017/12/26 10:44
8
leetcode -- Symmetric Tree

Symmetric Tree Given a binary tree, check whether it is a mirror of itself (ie, symmetric around its center). For example, this binary tree [1,2,2,3,4,4,3] is symmetric: 1 ...

2017/12/25 16:53
7
tips for pandas

写了一些代码用到了pandas,总结pandas的一些用法。

2017/12/25 14:06
6
leetcode -- climbing stairs

Climbing Stairs You are climbing a stair case. It takes n steps to reach to the top. Each time you can either climb 1 or 2 steps. In how many distinct ways can you climb to the ...

2017/12/19 11:41
5
leetcode -- Sqrt(x)

Sqrt(x) Implement int sqrt(int x). Compute and return the square root of x. x is guaranteed to be a non-negative integer. Example 1: Input: 4 Output: 2 Example 2: Input: 8 Ou...

2017/12/19 11:06
4
ubuntu 设置root密码

新安装完的ubuntu系统是没有设置root密码的,因此每次开机root密码都是随机的。在切换到root账户上是比较不方便的,因此需要对 root 设置密码。 sudo passwd root [sudo] password for you :...

2017/12/18 11:45
5
Java中,&&, &, |, || 之间的区别

逻辑运算中有两个问题,按位与/或 以及 逻辑与/或。 按位与/或 使用单字符(&或|) 按位操作符用来操作证书基本数据类型中的单个“比特” (bit),即二进制。按位操作符会对两个参数中对应的位...

2017/12/15 13:47
8
leetcode -- Maximum Subarray

Maximum Subarray Find the contiguous subarray within an array (containing at least one number) which has the largest sum. For example, given the array [-2,1,-3,4,-1,2,1,-5,4], ...

2017/11/17 20:58
6
leetcode -- Search Insert Position

Search Insert Position Given a sorted array and a target value, return the index if the target is found. If not, return the index where it would be if it were inserted in order....

2017/11/12 13:19
6
leetcode -- Implemenrt strStr()

Implement strStr() Return the index of the first occurrence of needle in haystack, or -1 if needle is not part of haystack. Example 1: Input: haystack = "hello", needle = "ll" O...

2017/11/12 12:28
8
leetcode -- Remove Element

Remove Element Given an array and a value, remove all instances of that value in-place and return the new length. Do not allocate extra space for another array, you must do this...

2017/11/12 10:41
4
leetcode -- Remove Duplicates from Sorted Array

Remove Duplicates from Sorted Array Given a sorted array, remove the duplicates in-place such that each element appear only once and return the new length. Do not allocate extra...

2017/11/12 10:06
4

没有更多内容

加载失败,请刷新页面

返回顶部
顶部