摘要: 实际中经常有一些任务需要定期执行,人工操作比较麻烦,如果定时执行将会省去很多人力,还可以在一些资源占用不多的时间段执行,linux下crontab命令就实现了这一便捷的功能,实现脚本的自动化运行。常用的crontab命令参数: crontab -l:列出定时任务文件的内容 cron... 阅读全文
posted @ 2015-07-10 16:08 evashi 阅读(203) 评论(0) 推荐(0) 编辑
摘要: 删除多个文件,不询问是否删除:rm -rf *.log (利用通配符)dos2unix 文件名:由于windows系统中文件的结束符和linux下文件的结束符不同,一些对语法要求较严格的脚本语言就会运行不了,如shell脚本语言,这是用本命令可将windows中文件格式转换成lin... 阅读全文
posted @ 2015-07-10 15:08 evashi 阅读(476) 评论(0) 推荐(0) 编辑
摘要: *本文参考了Pig官方文档以及已有的一些博客,并加上了自己的一些知识性的理解。目前正在持续更新中。*Pig作为一种处理大规模数据的高级查询语言,底层是转换成MapReduce实现的,可以作为MapReduce的一种脚本语言,大大简化了对数据操作的代码。**基本概念和用法**: 1.... 阅读全文
posted @ 2015-07-10 14:34 evashi 阅读(268) 评论(0) 推荐(0) 编辑
摘要: 最近项目中要读一些脚本程序,其中包含了Pig脚本,于是粗略学习了一下,并记录下来分享。本文主要参考Pig官方文档以及一些网上的博客资源,加上自己的一些个人理解,联想其他框架工具等编写。本文较基础,供初学者学习,目前持续更新中。欢迎交流~ 阅读全文
posted @ 2015-07-07 19:46 evashi 阅读(1516) 评论(0) 推荐(0) 编辑
摘要: Given an array S of n integers, are there elements a, b, c in S such that a + b + c = 0? Find all unique triplets in the array which gives the su... 阅读全文
posted @ 2015-02-05 16:56 evashi 阅读(135) 评论(0) 推荐(0) 编辑
摘要: Reverse digits of an integer. Example1: x = 123, return 321 Example2: x = -123, return -321 此题看似简单,但有几种情况要注意:对于10这种数字的处理;对于溢出的处理。 溢出不意味着ans_bef... 阅读全文
posted @ 2015-02-04 17:38 evashi 阅读(141) 评论(0) 推荐(0) 编辑
摘要: Given a binary tree, check whether it is a mirror of itself (ie, symmetric around its center). For example, this binary tree is symmetric: 1... 阅读全文
posted @ 2015-02-04 14:07 evashi 阅读(112) 评论(0) 推荐(0) 编辑
摘要: 对Queue 进队出队的使用不是很了解,刷题时想要直接用,所以查了一下。平时用的话用add 和remove 即可。 Queue 是接口。 LinkedList 实现了Queue接口,可当做Queue使用。 Queue list=new LinkedList(); 进队: boolean ad... 阅读全文
posted @ 2015-02-04 12:28 evashi 阅读(371) 评论(0) 推荐(0) 编辑
摘要: Compare two version numbers version1 and version1. If version1 > version2 return 1, if version1 Integer.parseInt(splits2[i])) { ... 阅读全文
posted @ 2015-02-02 19:14 evashi 阅读(126) 评论(0) 推荐(0) 编辑
摘要: You are given an n x n 2D matrix representing an image. Rotate the image by 90 degrees (clockwise). Follow up: Could you do this in-place? 开始做的时... 阅读全文
posted @ 2015-01-30 09:39 evashi 阅读(132) 评论(0) 推荐(0) 编辑