1、Nginx 简介 Nginx 作为一款面向性能设计的HTTP服务器,相较于Apache、lighttpd具有占有内存少,稳定性高等优势。其流行度越来越高,应用也越来越广泛,常见的应用有:网页服务器、反向代理服务器以及电子邮件(...
分类:
其他好文 时间:
2015-08-19 07:09:42
阅读次数:
176
96 Unique Binary Search Trees链接:https://leetcode.com/problems/unique-binary-search-trees/
问题描述:
Given n, how many structurally unique BST’s (binary search trees) that store values 1…n?For example,
G...
分类:
其他好文 时间:
2015-08-19 07:08:28
阅读次数:
126
题目链接:http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemId=4917
题意:每个单词都一些tips单词。先输入n个单词和他们的tips。然后m组查询,每次查询一些单词,按字典序输出这些单词的公有tips。
思路:对第i个单词,用vector数组g,g[i]来存这个单词的所有tips。对于所有单词建立字典树,在单...
分类:
其他好文 时间:
2015-08-19 07:09:08
阅读次数:
217
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=4292解法:拆人代码:#include
#include
#include
#include
#include
#include
#include <functiona...
分类:
其他好文 时间:
2015-08-19 07:07:30
阅读次数:
136
101 Symmetric Tree链接:https://leetcode.com/problems/symmetric-tree/
问题描述:
Given a binary tree, check whether it is a mirror of itself (ie, symmetric around its center).For example, this binary tree...
分类:
其他好文 时间:
2015-08-19 07:08:32
阅读次数:
143
题意:给一个字符串,含有大写字母或者问号’?’。一个字符串被定义为ugly,则能在字符串中找到三个连续的元音字符或者五个非元音字符;一个字符串被定义为nice,则它不是ugly的。现在问,可否改将所有’?’变成字符,使得字符串成为nice或ugly的,如果都可以,输出”47”,如果只能一个,输出”UGLY”或”NICE”。解法:对于是否可为ugly的情况,很简单,将每个’?’都变为元音,看是否存在3...
分类:
其他好文 时间:
2015-08-19 07:09:13
阅读次数:
175
129 Sum Root to Leaf Numbers链接:https://leetcode.com/problems/sum-root-to-leaf-numbers/
问题描述:
Given a binary tree containing digits from 0-9 only, each root-to-leaf path could represent a number.An...
分类:
其他好文 时间:
2015-08-19 07:08:42
阅读次数:
176
100 Same Tree链接:https://leetcode.com/problems/same-tree/
问题描述:
Given two binary trees, write a function to check if they are equal or not.Two binary trees are considered equal if they are structurall...
分类:
其他好文 时间:
2015-08-19 07:08:34
阅读次数:
146
晚上由于处理磁盘报警的需要,进行了日志压缩,在此次压缩中跟别使用了gzip和xz软件对文本进行了压缩,压缩的结果非常令人诧异。
出于对xz好奇的原因是因为在下载内核源代码时经常可以看到.xz格式的文件包,而且其大小比.gz和.bz2格式的文件都小一些。首先简单介绍一下gzip和xz:
gzip:GZIP最早由Jean-loup Gailly和Mark Adler...
分类:
其他好文 时间:
2015-08-19 07:08:54
阅读次数:
449
package com.dt.scala.list
object ListBuffer_Internals {
def main(args: Array[String]): Unit = {
val list = List(1,2,3,4,5,6,7,8,9)
increment(list)
increment_MoreEffective(list)
inc...
分类:
其他好文 时间:
2015-08-19 07:07:17
阅读次数:
205
卡特兰数又称卡塔兰数,英文名Catalan number,是组合数学中一个常出现在各种计数问题中出现的数列。由以比利时的数学家欧仁·查理·卡塔兰 (1814–1894)命名,其前几项为 : 1, 2, 5, 14, 42, 132, 429, 1430, 4862, 16796, 58786, .....
分类:
其他好文 时间:
2015-08-19 07:05:31
阅读次数:
164
【注】该系列文章以及使用到安装包/测试数据 可以在《倾情大奉送--Spark入门实战系列》获取1、 Spark运行架构1.1术语定义lApplication:Spark Application的概念和Hadoop MapReduce中的类似,指的是用户编写的Spark应用程序,包含了一个Driver...
分类:
其他好文 时间:
2015-08-19 07:06:38
阅读次数:
244
在 派生类的构造函数初始化列表中 调用 父类的带有参数的构造函数,是为了初始化从父类继承来的成员变量。因为这些变量无法直接初始化,只能采用这种方式初始化。而在qt中,MainWindow中的某成员变量(指向父组件的指针,假定为p)无法直接初始化,只能在初始化列表中调用QMainWindow(pare...
分类:
其他好文 时间:
2015-08-19 07:06:05
阅读次数:
190
Break Standard WeightTime Limit: 2 Seconds Memory Limit: 65536 KBThe balance was the first mass measuring instrument invented. In its traditional f...
分类:
其他好文 时间:
2015-08-19 07:04:24
阅读次数:
264
复杂声明。C语言常常因为声明的语法问题而受到人们的批评,特别是设计到函数指针的语法。C语言的语法力图使声明和使用相一致。对于简单的情况,C语言的这种做法很有效,但是,如果情况比较复杂,则容易让人混淆,原因在于,C语言的声明不能从左至右阅读,而且复杂的声明往往还使用了太多的圆括号。这里看两个声明:in...
分类:
其他好文 时间:
2015-08-19 07:03:53
阅读次数:
161
Hatsune MikuTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 262144/262144 K (Java/Others)Total Submission(s): 931Accepted Submission(s): 651Proble...
分类:
其他好文 时间:
2015-08-19 07:04:26
阅读次数:
137
实现一个算法删除链表中的某个结点,假定你只能访问这个这结点:输入:单向链表a->b->c->d->e中的结点c结果:不返回任何数据,但是该链表变为a->b->d->e分析:当结点为空或者是尾结点的时候,该算法实现不了。定义一个临时的next指针指向要删除结点的后续,n的data移动到next的dat...
分类:
其他好文 时间:
2015-08-19 07:03:37
阅读次数:
135