上一页 1 2 3 4 5 6 7 8 ··· 16 下一页
摘要: import os,shutil def copy_search_file(srcDir, desDir): ls = os.listdir(srcDir) for line in ls: filePath = os.path.join(srcDir, line) if os.path.isfile(filePath): ... 阅读全文
posted @ 2016-06-08 16:15 lasclocker 阅读(6452) 评论(0) 推荐(0) 编辑
摘要: #!/usr/bin/env python #encoding: utf-8 import datetime def dateDiffInHours(t1, t2): td = t2 - t1 return td.days * 24 + td.seconds/3600 + 1 if __name__ == '__main__': t1 ... 阅读全文
posted @ 2016-06-08 10:18 lasclocker 阅读(5604) 评论(0) 推荐(0) 编辑
摘要: 如果 想利用 shell 从 json 数据 中 解析出某个字段, 可以 利用 正则匹配, 比如 想 解析出 "spanId":"8461203268866670975" 这个字段,可以利用如下 shell 脚本: 比如文件test1.txt中的其中一条数据: {"uid":"300","timeS 阅读全文
posted @ 2016-05-29 14:40 lasclocker 阅读(37591) 评论(1) 推荐(0) 编辑
摘要: #!/b datebegin=`date -d "$datebegin +1 day " +%Y%m%d` sdate=`date -d "$sdate +1 day " +%Y%m%d` 使用方法: 其中 -- 是 hive sql 中的注释符号. 阅读全文
posted @ 2016-05-24 18:06 lasclocker 阅读(8206) 评论(0) 推荐(0) 编辑
摘要: 按照教程 Install hive on Mac with Homebrew ,在 mac 上安装 Hive 时, 最后执行 hive 命令后,出现错误: Exception in thread "main" java.lang.RuntimeException: java.lang.Runtime 阅读全文
posted @ 2016-04-21 10:13 lasclocker 阅读(2800) 评论(0) 推荐(0) 编辑
摘要: 1. 新建项目目录 scala-java-mix 2. 创建 src 目录及子目录: 3. 在目录 scala-java-mix 中创建 pom.xml文件,并添加下面内容到 pom.xml 文件 <?xml version="1.0" encoding="UTF-8"?> <project xml 阅读全文
posted @ 2016-04-20 13:24 lasclocker 阅读(2979) 评论(0) 推荐(0) 编辑
摘要: 利用 rm -rf 误删除文件夹, 恢复的办法(注意 要 提前备份或提交 其他新改变的代码, 否则执行下面的命令会让之前的新代码全部消失): 阅读全文
posted @ 2016-04-18 14:24 lasclocker 阅读(486) 评论(0) 推荐(0) 编辑
摘要: 一个 maven 项目有很多依赖,所以最后打出的 jar 一般会很多,且比较大,打成 jar 包的步骤 (注意pom.xml文件中打包类型不能是war包): 1. 把 pom.xml 中依赖的库打成 jar 包: 在工程 pom.xml 所在的目录下,执行命令: 所依赖的jar包会导出到目录 tar 阅读全文
posted @ 2016-04-15 21:17 lasclocker 阅读(1453) 评论(0) 推荐(0) 编辑
摘要: 在利用 Spring 对 thrift 进行集成时,出现错误: 解决办法: 把 eclipse 中其它工程关闭掉(或删除掉),重新运行程序,结果成功了。 阅读全文
posted @ 2016-04-11 17:54 lasclocker 阅读(363) 评论(0) 推荐(0) 编辑
摘要: 在利用 Spring 集成 thrift 时,报错如下: 解决办法: Spring 的 contextConfigLocation 配置下的 xml文件的主要内容如下: 通过检查xml文件,为了与 handler 的 ref 相对应,应该把上面的绿色的 extractAbstractServiceH 阅读全文
posted @ 2016-04-11 17:42 lasclocker 阅读(587) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 7 8 ··· 16 下一页