http://blog.chinaunix.net/uid-7553302-id-183648.html1 shell 的$! ,$?, $$,$@$n $1 the first parameter,$2 the second...$# The number of command-lin...
分类:
系统相关 时间:
2015-02-14 12:17:56
阅读次数:
202
storm-hdfs 这个插件支持 Rotation Actions 这个功能,官方文档解释是这样的,
### File Rotation Actions
Both the HDFS bolt and Trident State implementation allow you to register any number of `RotationAction`s.
What...
分类:
其他好文 时间:
2015-02-14 11:02:20
阅读次数:
185
求树上点权积为立方数的路径数。显然,分解质因数后,若所有的质因子出现的次数都%3==0,则该数是立方数。于是在模意义下暴力统计即可。当然,为了不MLE/TLE,我们不能存一个30长度的数组,而要压成一个long long。存储状态用map即可,貌似哈希表可以随便卡掉……?手动开栈……当然这样有可能M...
分类:
其他好文 时间:
2015-02-14 09:49:12
阅读次数:
132
在重启nginx时报错误。wangkongming@ThinkPad-T410 ~ $ sudo /usr/sbin/nginx -s reloadnginx: [error] invalid PID number "" in "/run/nginx.pid"google一番,下面是解决办法ngin...
分类:
其他好文 时间:
2015-02-14 09:48:37
阅读次数:
113
从SQL Server2005开始,提供了4个排名函数,分别是:ROW_NUMBER、RANK、DENSE_RANK和NTILE。ROW_NUMBER用于按行进行编号,RANK和DENSE_RANK用于按指定顺序排名,NTILE用于对数据进行分组。...
分类:
数据库 时间:
2015-02-14 06:34:34
阅读次数:
323
题目1004:Median时间限制:1 秒内存限制:32 兆特殊判题:否提交:14162解决:3887题目描述: Given an increasing sequence S of N integers, the median is the number at the middle position...
分类:
其他好文 时间:
2015-02-14 01:04:14
阅读次数:
219
第五章 整合异步脚本1、脚本如果按常规方式加载Number(new Date())){};setTimeout(vstart,0);}(3)使用script的defer属性,没有setTimeout()好。(4)保持CSS和JS的执行顺序浏览器是按照样式表的在页面中列出的顺序应用它们的,而与下载顺序...
分类:
Web程序 时间:
2015-02-14 00:56:41
阅读次数:
271
Given an array of integers, every element appears three times
except for one. Find that single one.
题意:有一个数组,只有一个数出现一次,其他的都出现三次,找出一次的数
思路:首先我们想到是每次把每一位二进制上1的个数都mod3,然后就能找出一个的了,但是这样空间太大了,所以我们想能记录...
分类:
其他好文 时间:
2015-02-13 22:31:19
阅读次数:
279
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 leaf node.
这道题是求一个二叉树的深度。题目中对深度的定义是:从根节点到叶节点依次经...
分类:
其他好文 时间:
2015-02-13 21:15:47
阅读次数:
156
题目Given two words word1 and word2, find the minimum number of steps required to convert word1 to word2. (each operation is counted as 1 step.)You have the following 3 operations permitted on a word:a)...
分类:
其他好文 时间:
2015-02-13 19:59:56
阅读次数:
155