自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(13)
  • 收藏
  • 关注

原创 erlang中的冒号 分号 和 句号

I think erlang beginners like I can be confused about the commas, semicolons and periods used in the end of lines. Here is an explanation when you should use which. [url]http://stackoverflow.co...

2012-11-26 12:00:22 733

学习hadoop之基于protocol buffers的 RPC

现在版本的hadoop各种server、client RPC端通信协议的实现是基于google的protocol buffers的,如果对这个不熟悉,读code的时候会比较痛苦一些,所以花了些时间学习了一下,然后仿照写了个比较简单的例子,麻雀虽小,五脏俱全,看懂了我这个或许对你读hadoop的code有帮助! :) 我现在实现一个简单的server-client方式的calculator,c...

2012-11-15 23:23:21 157

原创 使用ExtJS做动画效果

这是个动画效果的例子,作出一个小球弹跳然后静止. 先是一个div: 它的css: #ball { border-radius: 50px; width: 100px; height: 100px; background-color: red; position: absolute; y: 50px; x: 100px; } 然后ExtJS代码: [c...

2012-11-15 15:11:06 178

原创 ExtJs Event Delegation

Event handlers are a common cause of memory leaks and can cause performance degradation when not managed carefully. The more event handlers we create the more likely we are to introduce such problems,...

2012-11-15 14:06:28 126

原创 ExtJS 的event handler的scope

[code="javascript"] var button = Ext.create('Ext.button.Button', { text: 'My Test Button', listeners: { click: function(button, e, options){ alert(this.text); } }...

2012-11-14 22:00:57 140

原创 Ext.bind() 方法

[code="javascript"] var cat = { sound: 'miaow', speak: function(){ alert(this.sound); } }; var dog = { sound: 'woof', speak: function(){ alert(this.sound); } }; cat.speak(); // alerts 'mi...

2012-11-14 21:54:37 781

原创 extjs mixin example

[code="javascript"] //1. Define our simple mixin class called HasCamera with a single //method called takePhoto: Ext.define('HasCamera', { takePhoto: function(){ alert('Say Cheese! .... Click!'); ...

2012-11-14 17:29:06 198

原创 Hadoop Version Graph

可以到这里看全文: http://cloudblog.8kmiles.com/2012/01/19/apache-hadoop-version-timeline/ 有感于hadoop版本的混乱,看到了这篇文章讲解其发展路线,甚好。但是,注意原文是在2012年一月份写的,所以最新的肯定没在上面,谁要是能再总结一下就好了。 [img]http://dl.iteye.com/upl...

2012-11-14 11:47:08 130

原创 Google Protocol Buffers

[url]http://blog.jeoygin.org/2011/09/rpc-framework-protocol-buffers.html[/url] 这是我在网上找到的关于PB的比较好的一个文章.其他的博客都只讲了PB作为序列化的功能,在其用作RPC方面鲜有讲到,这篇给出了一个使用第三方基于PB的RPC实现的一个例子。 就像作者说的: protocol buffers并没...

2012-11-09 11:01:18 90

原创 erlang程序解释:冒泡排序

原code参见[url]http://en.literateprograms.org/Bubble_sort_(Erlang)[/url] 虽然原文有解释,可能还是不太好理解erlang写得这么间断晦涩的程序。 [code="erlang"] 1 % Copyright (c) 2012 the authors listed at the following URL, and/or...

2012-11-07 18:10:11 346

原创 stack with min operation

How would you design a stack which, in addition to push and pop, also has a function min which returns the minimum element? Push, pop and min should all operate in O(1) time. [code="java"] pub...

2012-11-06 23:37:05 120

原创 Rotation of String

Problem: Assume you have a method isSubstring which checks if one word is a substring of another. Given two strings, s1 and s2, write code to check if s2 is a rotation of s1 using only one call t...

2012-11-06 23:29:24 134

原创 算法:去除字符串中的重复字母

问题:去除字符串中的重复字符,不能使用额外空间(1或者2个变量除外)。 很简单的练手题,但是发现很难写正确。 [code="java"] public class DuplicateChar { //return length of the final string public static int removeDuplicateChar(char []str){ ...

2012-11-06 22:50:13 967

空空如也

空空如也

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

TA关注的人

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