forked from soulteary/forever-coolshell
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path34.html
executable file
·374 lines (348 loc) · 32.6 KB
/
34.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
<!DOCTYPE html><!--[if IE 8]>
<html id="ie8" dir="ltr" lang="zh-CN"
prefix="og: https://ogp.me/ns#" >
<![endif]--><!--[if !(IE 8) ]><!--><html dir="ltr" lang="zh-CN" prefix="og: https://ogp.me/ns#"><!--<![endif]--><head><meta charset="UTF-8"/><title>酷壳 – CoolShell.cn - Part 34</title><link rel="stylesheet" type="text/css" href="/assets/all.min.css"/><link rel="shortcut icon" href="/assets/favicon.png"/></head>
<body class="home blog paged paged-34 group-blog">
<div id="page" class="hfeed site">
<header id="masthead" role="banner">
<div id="cc_spacer"></div>
<div class="site-header">
<div class="site-branding">
<a class="home-link" href="/" title="酷 壳 – CoolShell" rel="home">
<h1 class="site-title">酷 壳 – CoolShell</h1>
<h2 class="site-description">享受编程和技术所带来的快乐 – Coding Your Ambition</h2>
</a>
</div>
</div>
</header>
<div class="container">
<div class="row">
</div>
</div>
<div id="content" class="site-content">
<div class="container">
<div class="row">
<div id="primary" class="content-area col-md-12" style="margin-top: 40px;">
<main id="main" class="site-main" role="main">
<article id="post-3429" class="post-content post-3429 post type-post status-publish format-standard hentry category-webdev category-misc tag-christmas tag-javascript tag-js1k">
<header class="entry-header">
<span class="screen-reader-text">程序员的圣诞节</span>
<h2 class="entry-title">
<a href="/articles/3429.html" rel="bookmark">程序员的圣诞节</a>
</h2>
<div class="entry-meta">
<h5 class="entry-date"><i class="fa fa-calendar-o"></i> <a href="/articles/3429.html" title="08:43" rel="bookmark"><time class="entry-date" datetime="2010-12-27T08:43:32+08:00" pubdate="">2010年12月27日 </time></a><span class="byline"><span class="sep"></span><i class="fa fa-user"></i>
<span class="author vcard"><a class="url fn n" href="/haoel" title="View all posts by 陈皓" rel="author">陈皓</a></span></span> <i class="fa fa-comments-o"></i><span class="screen-reader-text">评论 </span> <a href="/articles/3429.html#comments" class="comments-link">13 条评论</a> <i class="fa fa-users" style="margin-left:10px;"></i> 10,745 人阅读</h5>
</div>
</header>
<div class="entry-content">
<p>程序员Román Cortés用1021个字节写了一个<a style="font-weight: bold;" href="http://js1k.com/2010-xmas/demo/856" target="_blank">3D 的圣诞树</a>,很强大。(请使用Chrome浏览器查看),还记得<a href="/articles/2785.html" target="_blank">本站介绍的那个叫js1k.com的网站</a>吗?</p>
<p style="text-align: center;"><a title=" 3D Christmas tree" href="http://js1k.com/2010-xmas/demo/856" target="_blank"><img decoding="async" src="http://www.romancortes.com/ficheros/arbol_0.jpg" alt="Christmas Tree" hspace="38" vspace="30" width="434" height="339"/></a></p>
<p style="text-align: left;">其原理如下所示:</p>
<p style="text-align: left;"> <a href="/articles/3429.html#more-3429" class="more-link">…</a></p><a href="/articles/3429.html#more-3429" class="more-link">
</a><p class="read-more"><a href="/articles/3429.html#more-3429" class="more-link"></a><a class="btn btn-default" href="/articles/3429.html"> 阅读全文<span class="screen-reader-text"> Read More</span></a></p>
<p></p>
<div id="post-ratings-3429-loading" class="post-ratings-loading"><img src="https://coolshell.cn/wp-content/plugins/wp-postratings/images/loading.gif" width="16" height="16" class="post-ratings-image"/>Loading...</div>
</div>
<footer class="entry-footer">
</footer>
</article>
<article id="post-3421" class="post-content post-3421 post type-post status-publish format-standard hentry category-misc category-story tag-c tag-flash tag-html tag-java tag-svg">
<header class="entry-header">
<span class="screen-reader-text">流体力学的演示</span>
<h2 class="entry-title">
<a href="/articles/3421.html" rel="bookmark">流体力学的演示</a>
</h2>
<div class="entry-meta">
<h5 class="entry-date"><i class="fa fa-calendar-o"></i> <a href="/articles/3421.html" title="08:49" rel="bookmark"><time class="entry-date" datetime="2010-12-21T08:49:35+08:00" pubdate="">2010年12月21日 </time></a><span class="byline"><span class="sep"></span><i class="fa fa-user"></i>
<span class="author vcard"><a class="url fn n" href="/haoel" title="View all posts by 陈皓" rel="author">陈皓</a></span></span> <i class="fa fa-comments-o"></i><span class="screen-reader-text">评论 </span> <a href="/articles/3421.html#comments" class="comments-link">41 条评论</a> <i class="fa fa-users" style="margin-left:10px;"></i> 21,025 人阅读</h5>
</div>
</header>
<div class="entry-content">
<p>某人用Java搞了一个流体力学的演示。</p>
<p><a href="http://grantkot.com/MPM/Liquid.html" target="_blank">http://grantkot.com/MPM/Liquid.html</a></p>
<p><img decoding="async" loading="lazy" class="aligncenter size-full wp-image-3422" title="流体力学的演示" src="/uploads/2010/12/Liquid.jpg" alt="" width="522" height="308" srcset="" sizes="(max-width: 522px) 100vw, 522px"/></p>
<p>不过,这仅仅是个开始。某同学将其发布上了reddit.com,于是,全世界的同学们开始给力了——</p>
<p> <a href="/articles/3421.html#more-3421" class="more-link">…</a></p><a href="/articles/3421.html#more-3421" class="more-link">
</a><p class="read-more"><a href="/articles/3421.html#more-3421" class="more-link"></a><a class="btn btn-default" href="/articles/3421.html"> 阅读全文<span class="screen-reader-text"> Read More</span></a></p>
<p></p>
<div id="post-ratings-3421-loading" class="post-ratings-loading"><img src="https://coolshell.cn/wp-content/plugins/wp-postratings/images/loading.gif" width="16" height="16" class="post-ratings-image"/>Loading...</div>
</div>
<footer class="entry-footer">
</footer>
</article>
<article id="post-3363" class="post-content post-3363 post type-post status-publish format-standard hentry category-story tag-bittorrent tag-bram-cohen tag-doubletwist tag-dvd-jon tag-jon-lech-johansen tag-justin-frankel tag-napster tag-p2p tag-programmer tag-shawn-fanning tag-winamp tag-58">
<header class="entry-header">
<span class="screen-reader-text">偷了世界的程序员</span>
<h2 class="entry-title">
<a href="/articles/3363.html" rel="bookmark">偷了世界的程序员</a>
</h2>
<div class="entry-meta">
<h5 class="entry-date"><i class="fa fa-calendar-o"></i> <a href="/articles/3363.html" title="08:39" rel="bookmark"><time class="entry-date" datetime="2010-12-16T08:39:52+08:00" pubdate="">2010年12月16日 </time></a><span class="byline"><span class="sep"></span><i class="fa fa-user"></i>
<span class="author vcard"><a class="url fn n" href="/haoel" title="View all posts by 陈皓" rel="author">陈皓</a></span></span> <i class="fa fa-comments-o"></i><span class="screen-reader-text">评论 </span> <a href="/articles/3363.html#comments" class="comments-link">88 条评论</a> <i class="fa fa-users" style="margin-left:10px;"></i> 95,287 人阅读</h5>
</div>
</header>
<div class="entry-content">
<p>本文译自美国时代(time.com)的《<a href="http://www.time.com/time/specials/packages/printout/0,29239,2032304_2032746_2032903,00.html" target="_blank">The Men Who Stole the World</a>》,原作者:Lev Grossman。相当有传奇色彩,读起来很爽,翻译过来。译得不好,还请大家指正。本中的四个程序员可能并不是那么声名显赫,而且也很不老实,或许算不上成功,不过他们的确改变了世界。<strong>而本文有分析了互联网上P2P的那些事,相当的有参考价值</strong>。</p>
<p><em><span style="color: #993300;">2010年12月17日更新:修改了一些错误,理顺了一些语句。<br/>
2010年12月19日更新:增加了一些插图。 </span></em></p>
<p>————————正文————————</p>
<p>十年前,有四个年轻人改变了这个世界的运作方式。他们使用的并不是法律或是武器或是金钱,而是使用软件来改变世界。他们当时有着激进和极具破坏性的想法,并把这些想法付诸于代码,在Internet上以免费自由方式发布。这四个人,没有一个完成了大学学业,却奠定了今天我们习惯的数字媒体环境的基础。然后,因为各种原因,他们也迅速地消失在公众视野中。</p>
<p>1999年,美国东北大学的一个叫Shawn Fanning的一年级新生开发Napster,从此,成为了P2P文件共享和不需要大型机构或零售商就可以获得音乐的先锋和范例。《时代周刊》和《财富》把他放上了封面。那时,他在19岁。</p>
<p>就在同一年,一个挪威的只有十几岁的年轻人 Jon Lech Johansen,他和另两个今天都不为人知的程序员,写下了一个程序解密了商业的DVD,而他成为了全球盛名的“ DVD Jon.”,那年,他只有15岁。</p>
<p>而在1997年,Justin Frankel,一个亚利桑那州塞多纳的18岁的黑客,开发了一个免费的MP3播放器——WinAmp,其成为了Windows操作系统上装机必备的软件,并造就了主流数字音乐的革命。在他发布的第18个月内,1500万人下载了这个软件。而三年后,Frankel 开发了 Gnutella,一个P2P的文件共享协议,没有中心结点,不像 Napster,其不可能被关闭。目前有上百万人还在使用它。</p>
<p>2001年,Bram Cohen, 当年 26 岁,开发了一个P2P的文件传输共享协议—— BitTorrent,其以全新一流的架构全面优化了网络上大文件的共享和传输效率。 BitTorrent 也变成了整个Internet上发布大数据和文件的一个标准。</p>
<p> <a href="/articles/3363.html#more-3363" class="more-link">…</a></p><a href="/articles/3363.html#more-3363" class="more-link">
</a><p class="read-more"><a href="/articles/3363.html#more-3363" class="more-link"></a><a class="btn btn-default" href="/articles/3363.html"> 阅读全文<span class="screen-reader-text"> Read More</span></a></p>
<p></p>
<div id="post-ratings-3363-loading" class="post-ratings-loading"><img src="https://coolshell.cn/wp-content/plugins/wp-postratings/images/loading.gif" width="16" height="16" class="post-ratings-image"/>Loading...</div>
</div>
<footer class="entry-footer">
</footer>
</article>
<article id="post-3396" class="post-content post-3396 post type-post status-publish format-standard hentry category-misc tag-facebook">
<header class="entry-header">
<span class="screen-reader-text">Facebook全球关系网</span>
<h2 class="entry-title">
<a href="/articles/3396.html" rel="bookmark">Facebook全球关系网</a>
</h2>
<div class="entry-meta">
<h5 class="entry-date"><i class="fa fa-calendar-o"></i> <a href="/articles/3396.html" title="08:47" rel="bookmark"><time class="entry-date" datetime="2010-12-15T08:47:15+08:00" pubdate="">2010年12月15日 </time></a><span class="byline"><span class="sep"></span><i class="fa fa-user"></i>
<span class="author vcard"><a class="url fn n" href="/haoel" title="View all posts by 陈皓" rel="author">陈皓</a></span></span> <i class="fa fa-comments-o"></i><span class="screen-reader-text">评论 </span> <a href="/articles/3396.html#comments" class="comments-link">18 条评论</a> <i class="fa fa-users" style="margin-left:10px;"></i> 13,219 人阅读</h5>
</div>
</header>
<div class="entry-content">
<p><a href="https://www.facebook.com/paulgb">Paul Butler</a> 是Facebook的Data Infrastructure Engineering Team的一个实习生,他把Facebook 5亿用户的人际关系网给图示了出来(见下图,<a href="https://sphotos.ak.fbcdn.net/hphotos-ak-snc4/hs1382.snc4/163413_479288597199_9445547199_5658562_14158417_n.jpg" target="_blank">源图片</a>)挺赞的。从中我们可以看到,某些地方是一片漆黑……</p>
<p style="text-align: center;"><a href="https://coolshell.cn/wp-content/uploads/2010/12/Visualizing-Friendships-on-Facebook.png"><img decoding="async" loading="lazy" class="aligncenter size-large wp-image-3397" title="Visualizing Friendships on Facebook" src="/uploads/2010/12/Visualizing-Friendships-on-Facebook-1024x509.png" alt="Facebook 全球关系网" width="574" height="285" srcset=""/></a>Facebook全球关系网<br/>
(点击看大图,3.8M)</p>
<p style="text-align: left;">关于Paul是如何产生这个图的,你可以参看:<a href="https://www.facebook.com/notes/facebook-engineering/visualizing-friendships/469716398919" target="_blank">http://www.facebook.com/notes/facebook-engineering/visualizing-friendships/469716398919</a> (墙)</p>
<div id="post-ratings-3396-loading" class="post-ratings-loading"><img src="https://coolshell.cn/wp-content/plugins/wp-postratings/images/loading.gif" width="16" height="16" class="post-ratings-image"/>Loading...</div>
</div>
<footer class="entry-footer">
</footer>
</article>
<article id="post-3385" class="post-content post-3385 post type-post status-publish format-standard hentry category-misc category-proglanguage tag-programming-language">
<header class="entry-header">
<span class="screen-reader-text">编程语言流行度</span>
<h2 class="entry-title">
<a href="/articles/3385.html" rel="bookmark">编程语言流行度</a>
</h2>
<div class="entry-meta">
<h5 class="entry-date"><i class="fa fa-calendar-o"></i> <a href="/articles/3385.html" title="09:12" rel="bookmark"><time class="entry-date" datetime="2010-12-13T09:12:56+08:00" pubdate="">2010年12月13日 </time></a><span class="byline"><span class="sep"></span><i class="fa fa-user"></i>
<span class="author vcard"><a class="url fn n" href="/haoel" title="View all posts by 陈皓" rel="author">陈皓</a></span></span> <i class="fa fa-comments-o"></i><span class="screen-reader-text">评论 </span> <a href="/articles/3385.html#comments" class="comments-link">6 条评论</a> <i class="fa fa-users" style="margin-left:10px;"></i> 11,569 人阅读</h5>
</div>
</header>
<div class="entry-content">
<p>下面是一个关于编程语言流行度的图(以前本站也有一篇<a href="/articles/706.html" target="_blank">编程语言流行度的文章</a>)。其X轴是从Github中取来的数据(项目数),而Y轴是从StackOverflow取来的(tag数)。注意:Github提供了语言流行度:<a href="https://github.com/languages">https://github.com/languages</a>,而本图的原始数据在<a href="http://www.dataists.com/wp-content/uploads/2010/12/language_ranks1.csv" target="_blank">这里</a>。</p>
<figure id="attachment_3386" aria-describedby="caption-attachment-3386" style="width: 581px" class="wp-caption aligncenter"><a href="https://coolshell.cn/wp-content/uploads/2010/12/rank_scatter1.png"><img decoding="async" loading="lazy" class="size-large wp-image-3386 " title="编程语言流行度" src="/uploads/2010/12/rank_scatter1-1024x768.png" alt="" width="581" height="436" srcset="" sizes="(max-width: 581px) 100vw, 581px"/></a><figcaption id="caption-attachment-3386" class="wp-caption-text">编程语言流行度(点击看大图)</figcaption></figure>
<p>来源:<a href="http://www.dataists.com/2010/12/ranking-the-popularity-of-programming-langauges/" target="_blank">http://www.dataists.com/2010/12/ranking-the-popularity-of-programming-langauges/</a></p>
<div id="post-ratings-3385-loading" class="post-ratings-loading"><img src="https://coolshell.cn/wp-content/plugins/wp-postratings/images/loading.gif" width="16" height="16" class="post-ratings-image"/>Loading...</div>
</div>
<footer class="entry-footer">
</footer>
</article>
<article id="post-3356" class="post-content post-3356 post type-post status-publish format-standard hentry category-datebase category-misc tag-jhepwork tag-knime tag-orange tag-rapidminer tag-weka">
<header class="entry-header">
<span class="screen-reader-text">五个免费开源的数据挖掘软件</span>
<h2 class="entry-title">
<a href="/articles/3356.html" rel="bookmark">五个免费开源的数据挖掘软件</a>
</h2>
<div class="entry-meta">
<h5 class="entry-date"><i class="fa fa-calendar-o"></i> <a href="/articles/3356.html" title="08:41" rel="bookmark"><time class="entry-date" datetime="2010-12-13T08:41:11+08:00" pubdate="">2010年12月13日 </time></a><span class="byline"><span class="sep"></span><i class="fa fa-user"></i>
<span class="author vcard"><a class="url fn n" href="/haoel" title="View all posts by 陈皓" rel="author">陈皓</a></span></span> <i class="fa fa-comments-o"></i><span class="screen-reader-text">评论 </span> <a href="/articles/3356.html#comments" class="comments-link">19 条评论</a> <i class="fa fa-users" style="margin-left:10px;"></i> 33,844 人阅读</h5>
</div>
</header>
<div class="entry-content">
<p>在网上看到一篇文章介绍五个免费开源的数据挖掘软件,转过来。</p>
<h4>Orange</h4>
<p><a href="http://www.ailab.si/orange"><img decoding="async" id="BLOGGER_PHOTO_ID_5543415731299792802" class="alignleft" src="/uploads/2010/12/orange-data-mining-software.jpg" border="0" alt="" srcset=""/></a><a href="http://www.ailab.si/orange">Orange</a> 是一个基于组件的数据挖掘和机器学习软件套装,它的功能即友好,又很强大,快速而又多功能的可视化编程前端,以便浏览数据分析和可视化,基绑定了Python以进行脚本开发。它包含了完整的一系列的组件以进行数据预处理,并提供了数据帐目,过渡,建模,模式评估和勘探的功能。其由C++ 和 Python开发,它的图形库是由跨平台的Qt框架开发。</p>
<h4>RapidMiner</h4>
<p><a href="http://rapidminer.com/" target="_blank"><img decoding="async" id="BLOGGER_PHOTO_ID_5543415710727537026" class="alignleft" style="border: 0px initial initial;" src="/uploads/2010/12/data-mining-software-rapidminer.jpg" border="0" alt="" srcset=""/></a><a href="http://rapidminer.com/" target="_blank">RapidMiner</a>, 以前叫 YALE (Yet Another Learning Environment), 其是一个给机器学习和数据挖掘和分析的试验环境,同时用于研究了真实世界数据挖掘。它提供的实验由大量的算子组成,而这些算子由详细的XML 文件记录,并被RapidMiner图形化的用户接口表现出来。RapidMiner为主要的机器学习过程提供了超过500算子,并且,其结合了学习方案和Weka学习环境的属性评估器。它是一个独立的工具可以用来做数据分析,同样也是一个数据挖掘引擎可以用来集成到你的产品中。</p>
<p> <a href="/articles/3356.html#more-3356" class="more-link">…</a></p><a href="/articles/3356.html#more-3356" class="more-link">
</a><p class="read-more"><a href="/articles/3356.html#more-3356" class="more-link"></a><a class="btn btn-default" href="/articles/3356.html"> 阅读全文<span class="screen-reader-text"> Read More</span></a></p>
<p></p>
<div id="post-ratings-3356-loading" class="post-ratings-loading"><img src="https://coolshell.cn/wp-content/plugins/wp-postratings/images/loading.gif" width="16" height="16" class="post-ratings-image"/>Loading...</div>
</div>
<footer class="entry-footer">
</footer>
</article>
<article id="post-3345" class="post-content post-3345 post type-post status-publish format-standard hentry category-career category-funny tag-google tag-programmer tag-puzzle tag-58 tag-interview">
<header class="entry-header">
<span class="screen-reader-text">140个Google的面试题</span>
<h2 class="entry-title">
<a href="/articles/3345.html" rel="bookmark">140个Google的面试题</a>
</h2>
<div class="entry-meta">
<h5 class="entry-date"><i class="fa fa-calendar-o"></i> <a href="/articles/3345.html" title="08:44" rel="bookmark"><time class="entry-date" datetime="2010-12-02T08:44:24+08:00" pubdate="">2010年12月02日 </time></a><span class="byline"><span class="sep"></span><i class="fa fa-user"></i>
<span class="author vcard"><a class="url fn n" href="/haoel" title="View all posts by 陈皓" rel="author">陈皓</a></span></span> <i class="fa fa-comments-o"></i><span class="screen-reader-text">评论 </span> <a href="/articles/3345.html#comments" class="comments-link">27 条评论</a> <i class="fa fa-users" style="margin-left:10px;"></i> 87,379 人阅读</h5>
</div>
</header>
<div class="entry-content">
<p>来源:<a href="http://blog.seattleinterviewcoach.com/2009/02/140-google-interview-questions.html" target="_blank">http://blog.seattleinterviewcoach.com/2009/02/140-google-interview-questions.html</a>(墙)<br/>
<img decoding="async" loading="lazy" class="alignright size-medium wp-image-3349" title="Google 面试题 " src="/uploads/2010/12/googlequestion-300x225.jpg" alt="" width="210" height="158" srcset="" sizes="(max-width: 210px) 100vw, 210px"/></p>
<div>某猎头收集了140多个Google的面试题,都张到他的Blog中了,主要是下面这些职位的,因为被墙,且无任何敏感信息,所以,我原文搬过来了。</div>
<div>
<ul>
<li>Product Marketing Manager</li>
<li>Product Manager</li>
<li>Software Engineer</li>
<li>Software Engineer in Test</li>
<li>Quantitative Compensation Analyst</li>
<li>Engineering Manager</li>
<li>AdWords Associate</li>
</ul>
</div>
<p>这篇Blog例举了Google用来面试下面这几个职位的面试题。很多不是很容易回答,不过都比较经典与变态,是Google,Microsoft,Amazon之类的公司的风格。对于本文,我没有翻译,因为我相信,英文问题是最好的。不过对于有些问题,我做了一些注释,不一定对,但希望对你有帮助启发。对于一些问题,如果你百思不得其解,可以Google一下,StackOverflow或是Wikipedia上可能会给你非常全面的答案。</p>
<p> <a href="/articles/3345.html#more-3345" class="more-link">…</a></p><a href="/articles/3345.html#more-3345" class="more-link">
</a><p class="read-more"><a href="/articles/3345.html#more-3345" class="more-link"></a><a class="btn btn-default" href="/articles/3345.html"> 阅读全文<span class="screen-reader-text"> Read More</span></a></p>
<p></p>
<div id="post-ratings-3345-loading" class="post-ratings-loading"><img src="https://coolshell.cn/wp-content/plugins/wp-postratings/images/loading.gif" width="16" height="16" class="post-ratings-image"/>Loading...</div>
</div>
<footer class="entry-footer">
</footer>
</article>
<article id="post-3335" class="post-content post-3335 post type-post status-publish format-standard hentry category-misc category-proglanguage category-story tag-createarray tag-groovy">
<header class="entry-header">
<span class="screen-reader-text">Groovy是怎么实现createArray的</span>
<h2 class="entry-title">
<a href="/articles/3335.html" rel="bookmark">Groovy是怎么实现createArray的</a>
</h2>
<div class="entry-meta">
<h5 class="entry-date"><i class="fa fa-calendar-o"></i> <a href="/articles/3335.html" title="14:08" rel="bookmark"><time class="entry-date" datetime="2010-12-01T14:08:53+08:00" pubdate="">2010年12月01日 </time></a><span class="byline"><span class="sep"></span><i class="fa fa-user"></i>
<span class="author vcard"><a class="url fn n" href="/haoel" title="View all posts by 陈皓" rel="author">陈皓</a></span></span> <i class="fa fa-comments-o"></i><span class="screen-reader-text">评论 </span> <a href="/articles/3335.html#comments" class="comments-link">10 条评论</a> <i class="fa fa-users" style="margin-left:10px;"></i> 6,728 人阅读</h5>
</div>
</header>
<div class="entry-content">
<p><a href="http://groovy.codehaus.org/" target="_blank">Groovy</a>是一个基于 Java虚拟机的敏捷 动态语言。构建在强大的Java语言之上 并 添加了从Python,Ruby和Smalltalk等语言中学到的 诸多特征。为Java开发者提供了 现代最流行的编程语言特性,而且学习成本很低(几乎为零)。在以前的酷壳的<a rel="bookmark" href="/articles/2631.html">五大基于JVM的脚本语言</a>中也介绍过它。</p>
<p>下面,让我们看看他的一个createArray的实现,请大家前去围观下面的Groovy的trunk上的源码吧。真是很好很强大。</p>
<p><a href="http://svn.codehaus.org/groovy/trunk/groovy/groovy-core/src/main/org/codehaus/groovy/runtime/ArrayUtil.java" target="_blank">http://svn.codehaus.org/groovy/trunk/groovy/groovy-core/src/main/org/codehaus/groovy/runtime/ArrayUtil.java</a></p>
<p>这里摘上前几个createArray重载函数让大家看看,(一共有250个重载函数)</p>
<pre data-enlighter-language="java" class="EnlighterJSRAW">public class ArrayUtil {
... ...
... ...
public static Object[] createArray(Object arg0, Object arg1) {
return new Object[]{
arg0, arg1};
}
public static Object[] createArray(Object arg0, Object arg1, Object arg2) {
return new Object[]{
arg0, arg1, arg2};
}
public static Object[] createArray(Object arg0, Object arg1, Object arg2, Object arg3) {
return new Object[]{
arg0, arg1, arg2, arg3};
}
public static Object[] createArray(Object arg0, Object arg1, Object arg2, Object arg3, Object arg4) {
return new Object[]{
arg0, arg1, arg2, arg3, arg4};
}
public static Object[] createArray(Object arg0, Object arg1, Object arg2, Object arg3, Object arg4, Object arg5) {
return new Object[]{
arg0, arg1, arg2, arg3, arg4, arg5};
}
... ...
... ...
} </pre>
<p>这里给了一些<a href="http://groovy.329449.n5.nabble.com/Guys-any-explanations-about-this-td3285524.html#a3285676" target="_blank">解释</a>:</p>
<p> <a href="/articles/3335.html#more-3335" class="more-link">…</a></p><a href="/articles/3335.html#more-3335" class="more-link">
</a><p class="read-more"><a href="/articles/3335.html#more-3335" class="more-link"></a><a class="btn btn-default" href="/articles/3335.html"> 阅读全文<span class="screen-reader-text"> Read More</span></a></p>
<p></p>
<div id="post-ratings-3335-loading" class="post-ratings-loading"><img src="https://coolshell.cn/wp-content/plugins/wp-postratings/images/loading.gif" width="16" height="16" class="post-ratings-image"/>Loading...</div>
</div>
<footer class="entry-footer">
</footer>
</article>
<article id="post-3331" class="post-content post-3331 post type-post status-publish format-standard hentry category-misc category-story tag-beat-box tag-google tag-google-translate">
<header class="entry-header">
<span class="screen-reader-text">用Google Translate玩转beat box</span>
<h2 class="entry-title">
<a href="/articles/3331.html" rel="bookmark">用Google Translate玩转beat box</a>
</h2>
<div class="entry-meta">
<h5 class="entry-date"><i class="fa fa-calendar-o"></i> <a href="/articles/3331.html" title="10:21" rel="bookmark"><time class="entry-date" datetime="2010-12-01T10:21:44+08:00" pubdate="">2010年12月01日 </time></a><span class="byline"><span class="sep"></span><i class="fa fa-user"></i>
<span class="author vcard"><a class="url fn n" href="/haoel" title="View all posts by 陈皓" rel="author">陈皓</a></span></span> <i class="fa fa-comments-o"></i><span class="screen-reader-text">评论 </span> <a href="/articles/3331.html#comments" class="comments-link">11 条评论</a> <i class="fa fa-users" style="margin-left:10px;"></i> 10,120 人阅读</h5>
</div>
</header>
<div class="entry-content">
<p>在<a href="http://www.reddit.com/r/todayilearned/comments/ed39q/til_how_to_make_google_beatbox_for_you/" target="_blank">Reddit</a>上有人发布了怎么使用Google的翻译来玩beat box,很有趣,转过来。</p>
<p style="text-align: center;">
<img decoding="async" loading="lazy" title="Google 翻译 玩转 Beat box" src="/uploads/2010/12/google_beat_box.jpg" alt="" width="500" height="164" srcset=""/></p>
<p>下面是相关步骤:</p>
<p style="text-align: left; padding-left: 30px;">1) Go to <a href="https://translate.google.com/" target="_self">Google Translate</a></p>
<p style="text-align: left; padding-left: 30px;">2) 把翻译语言设置成从 German 翻译到 German。(德语)</p>
<p style="text-align: left; padding-left: 30px;">3) 拷贝粘贴这个字符串到translate中:<br/>
pv zk pv pv zk pv zk kz zk pv pv pv zk pv zk zk pzk pzk pvzkpkzvpvzk kkkkkk bsch</p>
<p style="text-align: left; padding-left: 30px;">4) 把声音开大,点击“朗读”,</p>
<p>另,如果你在Google里以 “Google beatbox” 作为关键词搜索,你会看到 Google Translate出现在最前面的搜索结果中。</p>
<div></div>
<div id="post-ratings-3331-loading" class="post-ratings-loading"><img src="https://coolshell.cn/wp-content/plugins/wp-postratings/images/loading.gif" width="16" height="16" class="post-ratings-image"/>Loading...</div>
</div>
<footer class="entry-footer">
</footer>
</article>
<article id="post-3320" class="post-content post-3320 post type-post status-publish format-standard hentry category-javadev category-misc category-progdesign tag-design-pattern tag-java tag-jdk">
<header class="entry-header">
<span class="screen-reader-text">JDK里的设计模式</span>
<h2 class="entry-title">
<a href="/articles/3320.html" rel="bookmark">JDK里的设计模式</a>
</h2>
<div class="entry-meta">
<h5 class="entry-date"><i class="fa fa-calendar-o"></i> <a href="/articles/3320.html" title="08:44" rel="bookmark"><time class="entry-date" datetime="2010-11-26T08:44:37+08:00" pubdate="">2010年11月26日 </time></a><span class="byline"><span class="sep"></span><i class="fa fa-user"></i>
<span class="author vcard"><a class="url fn n" href="/haoel" title="View all posts by 陈皓" rel="author">陈皓</a></span></span> <i class="fa fa-comments-o"></i><span class="screen-reader-text">评论 </span> <a href="/articles/3320.html#comments" class="comments-link">150 条评论</a> <i class="fa fa-users" style="margin-left:10px;"></i> 59,712 人阅读</h5>
</div>
</header>
<div class="entry-content">
<p>下面是JDK中有关23个经典设计模式的示例,在stakeoverflow也有相应的讨论:<br/>
<a href="http://stackoverflow.com/questions/1673841/examples-of-gof-design-patterns" target="_blank">http://stackoverflow.com/questions/1673841/examples-of-gof-design-patterns</a></p>
<h4><strong><span style="text-decoration: underline;">Structural(结构模式)</span></strong></h4>
<div><strong>Adapter:</strong><br/>
把一个接口或是类变成另外一种。<p></p>
<ul>
<li>java.util.Arrays#asList()</li>
<li>javax.swing.JTable(TableModel)</li>
<li>java.io.InputStreamReader(InputStream)</li>
<li>java.io.OutputStreamWriter(OutputStream)</li>
<li>javax.xml.bind.annotation.adapters.XmlAdapter#marshal()</li>
<li>javax.xml.bind.annotation.adapters.XmlAdapter#unmarshal()</li>
</ul>
<p><strong>Bridge:</strong><br/>
把抽象和实现解藕,于是接口和实现可在完全独立开来。</p>
<ul>
<li>AWT (提供了抽象层映射于实际的操作系统)</li>
<li>JDBC</li>
</ul>
<p><strong>Composite:</strong><br/>
让使用者把单独的对象和组合对象混用。</p>
<ul>
<li>javax.swing.JComponent#add(Component)</li>
<li>java.awt.Container#add(Component)</li>
<li>java.util.Map#putAll(Map)</li>
<li>java.util.List#addAll(Collection)</li>
<li>java.util.Set#addAll(Collection)</li>
</ul>
</div>
<p> <a href="/articles/3320.html#more-3320" class="more-link">…</a></p><a href="/articles/3320.html#more-3320" class="more-link">
</a><p class="read-more"><a href="/articles/3320.html#more-3320" class="more-link"></a><a class="btn btn-default" href="/articles/3320.html"> 阅读全文<span class="screen-reader-text"> Read More</span></a></p>
<p></p>
<div id="post-ratings-3320-loading" class="post-ratings-loading"><img src="https://coolshell.cn/wp-content/plugins/wp-postratings/images/loading.gif" width="16" height="16" class="post-ratings-image"/>Loading...</div>
</div>
<footer class="entry-footer">
</footer>
</article>
<nav class="navigation posts-navigation" role="navigation">
<h2 class="screen-reader-text">Posts navigation</h2>
<div class="nav-links">
<div class="row">
<div class="wp-pagenavi" role="navigation">
<span class="pages">第 34 / 74 页</span><a class="first" aria-label="First Page" href="/">« 首页</a><a class="previouspostslink" rel="prev" aria-label="上一页" href="/page/33.html">«</a><span class="extend">...</span><a class="smaller page" title="第 10 页" href="/page/10.html">10</a><a class="smaller page" title="第 20 页" href="/page/20.html">20</a><span class="extend">...</span><a class="page smaller" title="第 30 页" href="/page/30.html">30</a><a class="page smaller" title="第 31 页" href="/page/31.html">31</a><a class="page smaller" title="第 32 页" href="/page/32.html">32</a><a class="page smaller" title="第 33 页" href="/page/33.html">33</a><span aria-current="page" class="current">34</span><a class="page larger" title="第 35 页" href="/page/35.html">35</a><a class="page larger" title="第 36 页" href="/page/36.html">36</a><a class="page larger" title="第 37 页" href="/page/37.html">37</a><a class="page larger" title="第 38 页" href="/page/38.html">38</a><a class="page larger" title="第 39 页" href="/page/39.html">39</a><span class="extend">...</span><a class="larger page" title="第 50 页" href="/page/50.html">50</a><a class="larger page" title="第 60 页" href="/page/60.html">60</a><a class="larger page" title="第 70 页" href="/page/70.html">70</a><span class="extend">...</span><a class="nextpostslink" rel="next" aria-label="下一页" href="/page/35.html">»</a><a class="last" aria-label="Last Page" href="/page/74.html">末页 »</a>
</div>
</div>
</div>
</nav>
</main>
</div>
</div>
</div>
</div>
</div>
</body></html>