自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

  • 博客(83)
  • 资源 (41)
  • 收藏
  • 关注

原创 pyserial & arduino

首先,执行easy_install pyserial。python程序,向串口写一个数字。import serials = serial.Serial()s.port = 3s.baudrate = 9600s.stopbits = 1s.open()#print sprint s.readline().strip()s.write('10')p...

2014-02-21 16:04:41 650

原创 rpi wifi

/etc/network/interfaces---------auto lo iface lo inet loopbackiface eth0 inet dhcp auto wlan0allow-hotplug wlan0iface wlan0 inet dhcp  wpa-conf /etc/wpa_supplicant/wpa_supplicant...

2013-11-19 17:10:16 156

原创 gae+web.py

gae(1.7.2)不知道什么时候起不再内置web.py(0.37)了,怎么办 ,搜半天无果。仔细看文档,看错误日志!先把web.py的包放到engineapp目录下,然后 main.pyimport weburls = ( '/(.*)/', 'redirect', "/.*", "hello")app = web.application(...

2012-10-11 01:12:07 148

原创 shell note

行for循环for i in `seq -w 0 23`; do for j in `seq -w 0 5 59`; do echo 20120917$i$j; done done 日期时间左补零leftpad=`echo $1 | sed 's/^/0/g' | sed -r 's/.+(..)$/\1/g'` 凑时间,凑整点TIME=`date '+%s' -d ...

2012-09-18 15:00:48 120

原创 写PHP遇到的问题

 1.php -r "echo 0 == 'test';"  竟然打印出1,===返回false不知道跟版本有没关系PHP 5.3.0 (cli) (built: Mar  1 2012 14:53:55) Copyright (c) 1997-2009 The PHP GroupZend Engine v2.3.0, Copyright (c) 1998-2009...

2012-08-24 10:24:25 98

原创 arduino 控制 360度舵机

串口连接(波特率115200),, 正传;. 反转;/ 停止 http://arduino.cc/en/Reference/ServoWriteMicroseconds  #include <Servo.h> Servo servo1;void setup() { Serial.begin(115200); Serial.pri...

2012-08-12 09:32:18 6679

stickOS & cui32stem

http://www.seeedstudio.com/depot/customize-your-grove-kit-p-931.html?cPath=138http://cpustick.com/stickos.htm 基于PIC的控制系统,内置StickOS,支持串口连接直接basic编程(这个比arduinoIDE响应快速得多,而且能看到源码),兼容arduino 闪个...

2012-07-21 22:10:58 101

not hadoop but map/reduce

map/reduce 是很通用的,并非只有在hadoop上才能使用,不要被限制。处理已排序的列表,在内存和计算的消耗上都是很低的。 Mapper package mapreduce;import java.util.ArrayList;import java.util.List;import java.util.Map;import java.util.Tree...

2012-06-26 11:18:42 75

storm overview

  600X750 storm storm storm storm storm

2012-06-13 09:44:50 115

hadoop cdh 安装笔记

 3https://ccp.cloudera.com/display/CDHDOC/CDH3+Installationhttps://ccp.cloudera.com/display/CDHDOC/HBase+Installationhttps://ccp.cloudera.com/display/CDHDOC/ZooKeeper+Installationhttps://c...

2012-06-11 16:52:21 116

原创 C & SDL

无聊等放假,自娱自乐。复习C,学习使用SDL。eclipse cdt + cygwin + sdl教程: http://lazyfoo.net/SDL_tutorials/index.php 教程很棒,碰到的唯一的问题,不需要加mingw32链接参数   #include <stdio.h>#include <stdlib.h>...

2012-01-17 16:44:56 101

原创 sql: case when

 表主要结构:a { id, type, data }b { id, b_type, a_id, data } 当b.b_type为0时,b.a_id对应于a.id;当b.b_type为1时,b.a_id对应a.type。。。 以下语句用于查看重复数据, #极其没效率的 in版本select * from a_bwhere a_id in (se...

2011-12-26 14:13:21 92

原创 arduino 控制舵机

关于 Arduino  http://item.taobao.com/item.htm?id=6804680647http://item.taobao.com/item.htm?id=4328931317 DFRobot 的板越来越糙了(比别家散货还是好些的),倒是不影响使用。如果很注重外观可以考虑iteadStudio的板 http://itead.taobao.com/,...

2011-12-08 00:18:56 1433

原创 R note

图像由15~32行的代码绘制而成  图像由68~86行的代码绘制而成 summary(cars)table(cars$speed)plot(cars$speed, cars$dist, xlab = expression(speed^" of cars"), ylab = expression(dist^" of cars"))Me <- ta...

2011-11-28 17:01:17 123

原创 Avro1.5.4

Avro API又变了 囧 版本1.5.4  import java.io.File;import java.io.FileInputStream;import java.io.FileOutputStream;import java.io.IOException;import org.apache.avro.Schema;import org.apache.a...

2011-10-09 11:03:55 93

原创 build up a server by shell on the ground

所谓服务器,大致也就是这个样子了。接下来还需要实现一个协议,待续写这个东西的初衷,是为了解决任务的调度问题。任务依赖资源,任务也会产生资源。client在server上注册“interesting some resources”;client产生资源后,给server “resource ready”通知,server转发 notify给所有的关注者 直接可运行的示例脚本见附件,我...

2011-04-13 17:44:31 93

原创 hadoop乱码

 文件存入hadoop出现乱码,尤其是在windows下的cygwin环境测试时候 囧  建议使用如下配置,而不是去改hadoop源码: hadoop-env.shexport HADOOP_OPTS="-server -Dfile.encoding=utf-8 -Duser.language=zh" mapred-site.xml<property&gt...

2011-03-07 19:12:12 228

原创 the first meet with Processing

一个强大的东西 http://processing.org/Processing是一个用于生成图像、动画、交互的开源编程语言。。。   void setup() { size(width, height); background(256, 256, 256); stroke(0, 128, 0); smooth(); frameRate(24)...

2011-03-05 01:26:35 76

Partitioner, SortComparator and GroupingComparator in Hadoop

hadoop 0.20.2 api里面,作业被重新定义到了类 org.apache.hadoop.mapreduce.Job。它有3个特别的方法:job.setPartitionerClass(Partitioner p);job.setSortComparatorClass(RawComparator c);job.setGroupingComparatorClass(RawCo...

2010-08-24 22:41:26 67

原创 字节序

socket通信 字节序总是个问题 囧 public class Utils { public static byte[] long2Bytes(long l, boolean highLow) { byte[] b = new byte[8]; for (int i = 0; i < 8; i++) { int move = highLow ? 56 -...

2010-08-20 15:13:43 99

原创 RawComparator

RawComparator用于 Writable对象的比较,例如:Job.setSortComparatorClass(Class <? extends RowComparator>);Job.setGroupingComparatorClass(Class <? extends RowComparator>);  能作为Key的 Writable有...

2010-08-09 18:21:50 141

原创 map/reduce template

import java.io.IOException;import org.apache.hadoop.conf.Configuration;import org.apache.hadoop.conf.Configured;import org.apache.hadoop.fs.Path;import org.apache.hadoop.io.LongWritable;im...

2010-08-09 17:30:26 73

原创 CXF

Java > service CXF 不支持 RPC/encoding 风格. RPC/literal 是WS-l BP 中定义的, 唯一一种能够用于互操作的.CXF 有多种运行方式, 以下描述, 依赖 Servlet容器和 spring 的运行方式. JAX-WS = JAX-RPC 2.0  web.xml<context-param>...

2010-06-22 14:04:42 101

原创 maven about

缺少jar 很是麻烦, 要么添加repository,要么手工从本地install 一个示例:  mvn install:install-file -Dfile=./hadoop-lzo-0.4.12.jar -DgroupId=org.apache.hadoop -DartifactId=hadoop-lzo -Dversion=0.4.12 -Dpackaging=jar...

2010-06-09 14:45:25 87

原创 hadoop.20.2 new api

0.20版本的API发生了较大变化,新的类层次组织在包 org.apache.hadoop.mapreduce下。 package hi;import java.io.IOException;import org.apache.hadoop.fs.Path;import org.apache.hadoop.io.LongWritable;import org.apa...

2010-06-08 21:08:32 65

hadoop project 学习总结

hadoop 项目源自于google的几篇论文 http://labs.google.com/papers/gfs.htmlhttp://labs.google.com/papers/mapreduce.htmlhttp://labs.google.com/papers/bigtable.htmlhttp://labs.google.com/papers/chubby.html...

2009-09-04 18:40:19 138

我的架构领悟

架构是个啥?  动手 实际操作 真实的决策过程 好的设计都是多次干同样的事情,之后才有的。快速原型,多试多错!!!抛弃历史好难,原型易抛  to be continue...

2009-05-22 21:30:23 62

原创 了解Web服务规范 阅读笔记

 developerWorks 中国 > SOA and Web services > 了解web服务规范   不同的 web服务 消息格式定义SOAP, REST, XML-RPC  web服务 规范基本:    SOAP, WSDL, UDDI扩展:    WS...

2009-04-03 11:06:54 185

用正则表达式切URL

String url = "http://www.iteye.com/news/6328-infoworld-ibm-is-negotiating-the-acquisition-of-sun";Pattern pattern = Pattern.compile("^(?:(?:http|https)://)?(?:([\\w-\\.]+)\\.)?([\\w-]+)\\.(com|net...

2009-03-19 12:20:51 355

自定义OutputFormat

自定义一个OutputFormat,用于输出<Text, MapWritable>格式的数据 MapWritable的内容是 [Text: LongWritable]输出格式 [url    url2:times2,url3:times3,...] 参考TextOutputFormat,修改简化之 public class TextAndMapW...

2009-03-12 09:49:21 216

换个思路想问题

原始数据格式   url:uid,times 目标输出  url1:url2,url3 由原始格式生成以下两种格式url:uid1,uid2,uid3,...uid:url1,url2,url3,...然后,把第二条填入第一条,就是结果 --- --- ---问题是。。。hadoop一次出不了多重结果。。。 囧  解决方法,把每条uid:url1,url2,ur...

2009-03-06 12:48:07 113

数据切分

String initData = "N.O.\t1,2,3,4,5,6,7,8,9";String[] items = initData.split("[\\s]");for (int i = 1; i < items.length; i++) { Object[] head = ArrayUtils.subarray(items, 1, i); Object[] t...

2009-03-06 12:17:31 76

一个巨常用的reduce

public class CommaSeparateStringReduce extends MapReduceBase implements Reducer<Text, Text, Text, Text> { @Override public void reduce(Text key, Iterator<Text> values, OutputCollec...

2009-03-06 12:03:39 102

reading the jboss code

org.jboss.system jboss 提供的 MBean 类型 use scala, trait it! make it more clearly :-)  http://docs.jboss.org/jbossweb/3.0.x/class-loader-howto.html 

2009-02-04 13:08:53 59

RegExp 备忘

import java.util.regex.* str = 'aabfooaabfooabfoob'pattern = /a+/println Pattern.compile(pattern).matcher(str).replaceAll('-');println str.replaceAll(pattern, '-')  如果把+ 换成* 会怎样?  ...

2009-01-22 18:21:32 60

jboss微内核

基于JMX,易于管理、便于扩展、热部署、模块化。4,microkernel5,microcontainer,提供了对pojo的支持 wiki什么是微内核 http://www.jboss.org/community/docs/DOC-10671 什么是微容器 http://www.jboss.org/community/docs/DOC-10668 JBos...

2009-01-15 23:06:04 84

关于DAO

DAO很麻烦!它为什么那么麻烦呢? DAO定义存取数据的接口。也就是说,不管你是从关系数据库、LDAP、或者别的什么数据源取数据,调用的方法都是一样的,切换到其他数据源容易多了。 所以,DAO的一个重要作用,首先是隐藏!!!隐藏不同数据源的差异。差异包括特定的数据源、特定的API、特定的异常。 API容易隐藏,包装起来也容易。更麻烦的是异常,异常通常是一棵挺不小的树,对应到...

2009-01-09 18:51:41 113

原创 fashion Cloud Computing

时髦的云计算 到底是个啥?我的理解是 原来我们只托管机器 现在还托管应用和数据  分布式、并行……,用户 关心这个么? 基础设施提供商 > 软件提供商 > 最终用户 基础设施包括:硬件,操作提供,软件运行环境,。。。 云应该是在软件提供商左边,由基础设施提供商提供的,对最终用户不可见的 ...

2008-12-19 14:53:51 58

tab page step-by-step

[size=xx-large;][b]Preface[/b] [/size][b][i]prototype[/i] [/b]& [i][b]script.aculo.us[/b] [b][/b][/i][b]are so powerful[i][b] [/b][/i][/b][b][/b][b][b][si...

2008-12-15 16:21:47 109

jsp复习

JSP是jEE的一部分 Servlet的另一种表现形式 很基础!很重要!复习之  使用隐含对象<%= request.getContextPath() %><br /><%= session.getId() %><br /><% session.setAttribute("a1", "one"); %>&

2008-10-24 16:09:44 62

c sharp 3.0 Design Patterns

C# 3.0 设计模式,O'Reilly 2007年出版

2009-03-03

Programming_Clojure

pragmatic系列 pdf格式 英文版 pragmatic系列 pdf格式 英文版 pragmatic系列 pdf格式 英文版

2009-03-02

C# 3.0 Cookbook

O'Reilly 第三版, 针对C# 3.0,.NET 3.5 完全修订

2009-02-26

programming C# 3.0

O'Reilly 第五版, 涵盖VS2008、LINQ、.NET 3.5 以及更多内容

2009-02-26

Learning Ruby

O'Reilly, May 2007 出版

2009-02-26

Ruby Cookbook

O'Reilly, July 2006 出版

2009-02-26

JUnit Recipes

JUnit Recipes, pdf格式, manning出版 JUnit Recipes, pdf格式, manning出版 JUnit Recipes, pdf格式, manning出版

2009-02-04

JMX_in_action

jmx in action, manning, 2003年出版

2009-01-19

JMX官方文档 - 概览,入门,规范

JDK1.6, JMX的官方文档 Overview, Tutorial and Spec

2009-01-15

Better_Faster_Lighter_Java

O'Reilly 更好、更快、更轻的Java ^-^ enjoy it

2009-01-07

Data_Crunching

pragmatic系列 pdf格式 英文版 pragmatic系列 pdf格式 英文版 pragmatic系列 pdf格式 英文版

2008-12-29

Mastering_Dojo

pragmatic系列 pdf格式 英文版 pragmatic系列 pdf格式 英文版 pragmatic系列 pdf格式 英文版

2008-12-15

Prototype_and_script.aculo.us

pragmatic系列 pdf格式 英文版 pragmatic系列 pdf格式 英文版 pragmatic系列 pdf格式 英文版

2008-12-14

Groovy_Recipes

pragmatic系列 pdf格式 英文版 pragmatic系列 pdf格式 英文版 pragmatic系列 pdf格式 英文版

2008-12-12

Programming_Erlang

pragmatic系列 pdf格式 英文版 pragmatic系列 pdf格式 英文版 pragmatic系列 pdf格式 英文版

2008-12-12

Programming_Groovy

pragmatic系列 pdf格式 英文版 pragmatic系列 pdf格式 英文版 pragmatic系列 pdf格式 英文版

2008-12-12

Advance_Rails_Reciples

pragmatic系列 pdf格式 英文版 pragmatic系列 pdf格式 英文版 pragmatic系列 pdf格式 英文版

2008-12-12

FXRuby-Create_and_Mean_GUIs_with_Ruby

pragmatic系列 pdf格式 英文版 pragmatic系列 pdf格式 英文版 pragmatic系列 pdf格式 英文版

2008-12-12

Scripted_GUI_Testing_with_Ruby

pragmatic系列 pdf格式 英文版 pragmatic系列 pdf格式 英文版 pragmatic系列 pdf格式 英文版

2008-12-12

Everyday_Scripting_With_Ruby

pragmatic系列 pdf格式 英文版 pragmatic系列 pdf格式 英文版 pragmatic系列 pdf格式 英文版

2008-12-12

junit in action 2nd edtion

junit in action 第二版 manning出版

2011-05-25

MTK-MMI实力培训教程

MMI实力培训教程 pdf完整版 MTK开发必备!!!

2010-06-10

Scalable Internet Architectures

SAMS Jul.2006出版 完整版 chm格式

2009-05-14

Rails Recipes

pragmatic系列 pdf格式 英文版 pragmatic系列 pdf格式 英文版 pragmatic系列 pdf格式 英文版

2009-05-06

Professional_Spring

Professional Java Development with the Spring Framework

2009-03-02

Effective_Java_中文版

高效java,中文版,实用经典, 侯捷译 高效java,中文版,实用经典, 侯捷译 高效java,中文版,实用经典, 侯捷译

2009-03-02

Effective_Java

高效java 第二版,英文版,实用经典 高效java 第二版,英文版,实用经典 高效java 第二版,英文版,实用经典

2009-03-02

Art_of_Java_Web_Development

Art_of_Java_Web_Development, 关于web架构和设计、框架、最佳实践

2009-03-02

Linux_Systems_Programming

Linux_Systems_Programming, O'Reilly 2007年出版

2009-03-02

Understanding_the_Linux_Kernel

Understanding_the_Linux_Kernel, 第二版, O'Reilly 2002年出版

2009-03-02

modern_compiler_implementation_in_java

modern_compiler_implementation_in_java, 现代编译原理java实现, 好像是虎书的java版

2009-03-02

XDoclet in Action

XDoclet in Action, 代码生成工具

2009-03-02

Eclipse_Modeling_Framework_A_Developers_Guide

Eclipse_Modeling_Framework_A_Developers_Guide EMF——eclipse的模型驱动开发框架

2009-03-02

Expert One on One-J2EE Design And Development

Expert One on One, spring, 不是新书但是思想依然闪光

2009-03-02

ant_the_definitive_guide

ant_the_definitive_guide, O'Reilly 2005年出版

2009-03-02

C++ Cookbook

C++ Cookbook, O'Reilly 2005年出版

2009-03-02

SCJP_Java6

SCJP Java6, java 认证辅导

2009-03-02

SCWCD_Exam_Study_Kit

SCWCD Exam Study Kit - Java Web Component Developer Certification, manning, 2005年出版

2009-03-02

Groovy_in_Action

Groovy in Action, MANNING, 2007年出版

2009-03-02

The_Definitive_ANTLR_Reference

The Definitive ANTLR Reference, pdf格式, manning出版 JUnit Recipes, pdf格式, manning出版 JUnit Recipes, pdf格式, manning出版

2009-03-02

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除