Excel图表转成图片

摘要: 关于excel 图表转成图片知识点:excel生成的图表不是图片尝试. 通过Java调用POI接口挺难把excel生成的图表转成图片导出来ps. 其它生成图表的工具,如jfreechart,参考链接:http://www.open-open.com/lib/view/open136599741582... 阅读全文
posted @ 2014-04-17 16:57 王健男 阅读(3170) 评论(1) 推荐(0) 编辑

hadoop —— MapReduce:统计访问所有独立IP个数 、 统计网站子目录访问次数 、 统计每个IP访问的子目录数

摘要: 背景:基于网站访问日志分析下面是解答的代码,希望讨论指正:1. 统计独立ip数目,相当于在wordcount的Map基础上统计计数Reduce处理的行数代码:package example;import java.io.IOException;import java.util.StringTokenizer;import org.apache.hadoop.conf.Configuration;import org.apache.hadoop.fs.Path;import org.apache.hadoop.io.IntWritable;import org.apache.hadoop.io. 阅读全文
posted @ 2014-03-31 10:17 王健男 阅读(2293) 评论(1) 推荐(0) 编辑

Java -D命令对应的代码中获取-D后面的参数 和 多个参数时-D命令的使用

摘要: 1. Java代码:public class TestDPara { public static void main(String[] args) { String flag = System.getProperty("Para"); System.err.println(flag); }}2. cmd命令:java -DPara=sdfdsfdsfdsfsd TestDPara执行命令后输出:sdfdsfdsfdsfsd注意:-D和Para之间不能有空格3. 使用多个参数,如Para、Para1public class TestDPa... 阅读全文
posted @ 2014-03-26 20:53 王健男 阅读(15329) 评论(0) 推荐(1) 编辑

hadoop —— teragen & terasort

摘要: 这两个类所在目录:hadoop-examples-0.20.2-cdh3u6.jar 中: 代码:TeraGen.java:/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses th... 阅读全文
posted @ 2014-03-23 18:32 王健男 阅读(3864) 评论(0) 推荐(0) 编辑

C# 计时器 以“天时分秒毫秒”形式动态增加显示

摘要: 参考:http://zhidao.baidu.com/link?url=j-jxQJenrO54BSKJ_IkXWbhdDqbVLUyyenjjSGs8G0xdisgBZ0EMhzyWgARSFct6rTP5BaabDacbTOvoxhijg_代码:一、新建一个WindowsFormsApplication工程在Design设计区中,从ToolBox拖了四个控件:两个Buttion、一个Label、一个Timer,下面是Form1.cs中自动生成的对应的初始化代码partial class Form1{ ... ... private System.Windows.... 阅读全文
posted @ 2014-03-17 11:04 王健男 阅读(1626) 评论(0) 推荐(0) 编辑

Python —— 批量替换指定目录下的所有文件中指定字符串

摘要: 参考:http://blog.csdn.net/zcwfengbingdongguke/article/details/13951527代码:#!/usr/bin/pythonimport osimport re#list filesdef listFiles(dirPath): fileList=[] for root,dirs,files in os.walk(dirPath): for fileObj in files: fileList.append(os.path.join(root,fileObj)) return fileLi... 阅读全文
posted @ 2014-03-14 19:12 王健男 阅读(7103) 评论(0) 推荐(0) 编辑

hadoop —— eclipse插件安装配置

摘要: 安装:1. 将hadoop-core-0.20.2-cdh3u6/contrib/eclipse-plugin/hadoop-eclipse-plugin-0.20.2-cdh3u6.jar拷贝到eclipse的插件目录plugins下2. 重启eclipse,可以打开视图:windows->open perspective->other->map/reduce配置:3. 打开视图:windows->show view->other-> map/reduce Locations4. 蓝色大象那右键编辑(Edit),配置参数: General选项卡: Loca 阅读全文
posted @ 2014-03-12 12:19 王健男 阅读(466) 评论(0) 推荐(0) 编辑

hadoop —— MapReduce例子 (求平均值)

摘要: 参考:http://eric-gcm.iteye.com/blog/1807468math.txt:张三 88李四 99王五 66赵六 77china.txt:张三 78李四 89王五 96赵六 67english.txt:张三 80李四 82王五 84赵六 86JAVA代码:import java.io.IOException;import java.util.Iterator;import java.util.StringTokenizer;import org.apache.hadoop.conf.Configura... 阅读全文
posted @ 2014-03-09 19:26 王健男 阅读(2406) 评论(0) 推荐(0) 编辑

hadoop —— MapReduce例子 (数据排序)

摘要: 参考:http://eric-gcm.iteye.com/blog/1807468file1.txt:232654321575665223file2.txt:59562265092file3.txt:26546JAVA代码:import java.io.IOException;import org.apache.hadoop.conf.Configuration;import org.apache.hadoop.fs.Path;import org.apache.hadoop.io.IntWritable;import org.apache.hadoop.io.Text;import org. 阅读全文
posted @ 2014-03-09 18:59 王健男 阅读(2084) 评论(0) 推荐(0) 编辑

hadoop —— MapReduce例子 (数据去重)

摘要: 参考:http://eric-gcm.iteye.com/blog/1807468例子1:概要:数据去重描述:将file1.txt、file2.txt中的数据合并到一个文件中的同时去掉重复的内容file1:2012-3-1 a2012-3-2 b2012-3-3 c2012-3-4 d2012-3-5 a2012-3-6 b2012-3-7 c2012-3-3 cfile2:2012-3-1 b2012-3-2 a2012-3-3 b2012-3-4 d2012-3-5 a2012-3-6 c2012-3-7 d2012-3-3 c代码:Dedup.javaimport java.io.IOE 阅读全文
posted @ 2014-03-09 18:02 王健男 阅读(2668) 评论(0) 推荐(0) 编辑