题目传送门 1 /* 2 题意:表达式转换 3 模拟:题目不难,也好理解题意,就是有坑!具体的看测试样例。。。 4 */ 5 #include 6 #include 7 #include 8 #include 9 #include 10 #include ...
分类:
其他好文 时间:
2015-05-19 18:29:02
阅读次数:
180
[Author]: kwu -- UDTF(User-Defined Table-Generating Functions) 用来解决 输入一行输出多行(On-to-many maping) 的需求,开发HIVE的UDTF自定义函数具体步骤如下:...
分类:
其他好文 时间:
2015-05-19 14:49:35
阅读次数:
5592
今天在看/etc/init.d/nginx脚本时,发现脚本中存在大量行为(点号 空格 文件名),甚是不解。比如文件开始的几行:
if [ -r /etc/default/nginx ]; then
. /etc/default/nginx
fi
. /lib/init/vars.sh
. /lib/lsb/init-functions
以往执行文件时...
分类:
系统相关 时间:
2015-05-19 10:33:30
阅读次数:
734
1 function MyObject(){ 2 // private variables and functions 3 var privateVariable = 10; 4 5 function privateFunction(){ 6 return false; ...
分类:
其他好文 时间:
2015-05-18 18:24:44
阅读次数:
86
Lecture4:Decomposition and abstraction through functions;introduction to recursion 函数分解抽象与递归Functions 函数
block up into modules 分解为模块
suppress detail 忽略细节
例子:鸡兔同笼 回文字符串 Fibonacci...
分类:
编程语言 时间:
2015-05-18 16:40:54
阅读次数:
142
一、echo命令(带参数-e)
catcolor.sh
#!/bin/bash
echo-e"\033[30mblack\033[0m"
echo-e"\033[31mred\033[0m"
echo-e"\033[32mgreen\033[0m"
echo-e"\033[33myellow\033[0m"
echo-e"\033[34mblue\033[0m"
echo-e"\033[35mpurple\033[0m"
echo-e"\033[36mcyan\033[0m"
echo-e"\0..
分类:
系统相关 时间:
2015-05-16 18:46:15
阅读次数:
192
题目大意思:
给定一个数的next值,问最小的k值,使得每次进行k次操作得到的数都是一样的。
将每个位置i记为点i
记circle[i]为从i出发出现环的环内元素,我们的任务就是求这些数的最小公倍数lcm,还要考虑‘6’型循环的情况,这个我们只需要求最大的多余长度之后对lcm向上取整就好了
#include
#include
#include
#include
using namespac...
分类:
其他好文 时间:
2015-05-15 10:48:34
阅读次数:
107
今天在公司,上午搞了一个小时,MySQL单实例启动脚本搞定。[root@mysql-6scripts]#cattest3.sh
#!/bin/bash
RETVAL=0
./etc/init.d/functions
basedir=/application/mysql-5.5.32/bin
datadir=/application/mysql-5.5.32/data
PSD=123.com
hostname=`hostname`
menu(){
cat<..
分类:
数据库 时间:
2015-05-13 06:30:29
阅读次数:
192
PostgreSQL帮助文档
9.8. Data Type Formatting Functions
The PostgreSQL
formatting functions provide a powerful set of tools for converting various data types
(date/time, integer, floating point, numeri...
分类:
数据库 时间:
2015-05-12 21:03:50
阅读次数:
471