Span Zhang(张友邦)的专栏 (分形艺术,摄影,软件开发,生活休闲)

天下风云出我辈,一入江湖岁月催。皇图霸业谈笑中,不胜人生一场醉。提剑跨骑挥鬼雨,白骨如山鸟惊飞。尘世如潮人如水,只叹江湖几人回。

2009年06月30日

原创 Ruby矢量和矩阵数学库:NArray

很棒的东东,特别是你需要处理一些数学矩阵运算的时候。它可以允许你创建任何维数的矩阵,并且提供了必要的数学运算支持。有一些demo可以学习,不难掌握。阅读全文>

发表于 @ 2009年06月30日 10:59:00|举报收藏

2009年06月27日

原创 圣淘沙闲逛,傻照两张!

今天去City Hall附近的一家餐馆(Seoul Garden)吃自助烤肉,感觉还不错。那个服务员长得很像董洁,但还是看得出是东南亚的美女类型。当时很想问她能不能给她照张像,但又觉得大庭广众之下要是遭到拒绝实在不是很好。而且她正在上班,risk相当高,就打消了这个念头。阅读全文>

发表于 @ 2009年06月27日 20:02:00|举报收藏

2009年06月26日

原创 新加坡Ruby开发者6月聚会


这次聚会在昨天晚上7点开始,9点左右结束。我从NTU坐德士过去,路上遇到heavy traffic,足足花了将近一个小时才到达位于Suntec City的Yahoo办公室。no way to bypass!

主要发言的是Sau Sheong (Ruby and the Cloud)和Jason Ong (Kiosks with Rails) 。Sau说的是Heroku的相关内容,基本上我在之前都没有听说过。不过我觉得Heroku是个不错的idea,在云里面用ruby开发的想法我之前也有过,但因为这是在赚开发者的钱,所以没有付诸实际行动。另外一个议题是Jason的一个rails应用,很有意思的是,做的居然是一个商店pos系统。客户端用的是firefox,操作系统用的是ubuntu。主要介绍了一些关于硬件和配置方面的事情。大家都觉得这个东西挺特别,因为比较具体,讨论起来也很方便。整个聚会的氛围很棒,大家都挺随意的分享和沟通。不过因为我的相机坏了,所以没有拍一张照片回来:(

我从Yahoo的办公室出来的时候是9点20。因为是头一次在晚阅读全文>

发表于 @ 2009年06月26日 10:21:00|举报收藏

2009年06月21日

原创 got something to write

today's father's day. wish all fathers in this world be happy, including me.and today's sunday. i went to the singapore international water festival. on the way to this great festival, i helped a pretty woman taking her little baby downstairs. the baby carriage was really heavy. and when i was gonna take it downstairs, the young mother asked me if i'm really sure i can do it or not. i just told her don't worry, i did such stuff for so many times before.there were 阅读全文>

发表于 @ 2009年06月21日 21:40:00|举报收藏

2009年06月05日

原创 Keep my blog updated

there's not so much stuff to say. just keep my blog updated.i went to boon lay to buy something yesterday night. and when i arrived there, it's nearly 7 pm. i planned to buy some books to read first. so i managed to get the bookstore for a quick browsing. ufortunately, i found nothing matches my requirements. so, i went out and headed for the FairPrice supermarket for a bottle of super glue. i need it to repair my shoes. and thanks god, i found it quickly. it cost me 2.79 S$.阅读全文>

发表于 @ 2009年06月05日 10:09:00|举报收藏

2009年05月25日

原创 dear diary - 25 may 2009

i woke up this morning at the new place i just rented. it's a common room with few furnitures. there's a single bed, a computer desk, a electric fan, two chairs and a wardrobe. really simple! next to my room, it's a carpark in layers. so, it's a little noisy. but that's not a big problem for me. i think i can stand for it, at least for the time being.this afternoon, i went to the finance office to visit Daphne Goh to collect my sallary cheque. she told me that my bank account numbe阅读全文>

发表于 @ 2009年05月25日 15:50:00|举报收藏

2009年05月21日

原创 It's been a long time ...

It's been a long time that I said nothing on my blog. Life is like a still pool to me. Everything's normal and there's no big ups and downs. I still find each day too short for all my thoughts I want to think, all the walks I want to take, all the books I want to read. As a matter of fact, I really want to say something, to my family, to my friends and to myself. But everything seems to be a bit pale and has no necessity to talk about when the word come to my throat...Well, to阅读全文>

发表于 @ 2009年05月21日 09:27:00|举报收藏

2009年04月04日

原创 清楚数据库中的全部数据并将ID归零


在开发阶段常常要做这样的事情,把数据库中的数据全部清除掉已重新填写正确的数据。

ActiveRecord::Base.connection.tables.each do |table|
  ActiveRecord::Base.connection.execute("truncate table #{table}")
end阅读全文>

发表于 @ 2009年04月04日 09:09:00|举报收藏

2009年02月23日

原创 Ruby on Rails开发带二级域名业务的应用


现在使用二级域名的情况非常的普遍,正好我们公司就需要。以下是开发环境:

OS: Microsoft Windows [版本 5.2.3790]
Ruby: ruby 1.8.6 (2007-09-24 patchlevel 111) [i386-mswin32]
Rails: Rails 2.0.2

接下来是做域名映射,修改Windows的hosts文件,让目标域名解析到我们的开发机器上。打开c:\Windows\System32\DRIVERS\etc\hosts文件,增添如下内容:

127.0.0.1   yourdomain.com

然后就是解决session跨域的问题,打开development.rb(部署的时候是production.rb),增加:

ActionController::Base.session_options[:session_domain] = '.yourdomain.com'阅读全文>

发表于 @ 2009年02月23日 11:55:00|举报收藏

2009年02月10日

原创 Ruby on Rails自动事务过滤器及相应的错误处理

这是写在ApplicationController里的处理代码。其中的set_notice只是将flash[:notice]设置一下,以便在error_notice页面显示。阅读全文>

发表于 @ 2009年02月10日 14:28:00|举报收藏

2009年02月09日

原创 Ruby: 用类名字创建类实例

obj = eval(class_name).new阅读全文>

发表于 @ 2009年02月09日 12:59:00|举报收藏

2008年12月12日

原创 CTO离我们有多远

寻找下一代CTO活动:http://cto.it168.com,有实力的、有兴趣的朋友都可去看看阅读全文>

发表于 @ 2008年12月12日 15:50:00|举报收藏

2008年09月20日

原创 关于线性分数变换(或Mobius变换)的代数和几何特性


本文转帖自: http://cgpad.com/SPAN/articles_show/303
阅读全文>

发表于 @ 2008年09月20日 16:28:00|举报收藏

2008年09月17日

转载 极限集分形的可视化 - 从Circle Inversion说起

极限集分形的可视化 - 从Circle Inversion说起阅读全文>

发表于 @ 2008年09月17日 12:57:00|举报收藏

2008年09月15日

原创 POV-Ray中使用declare递归定义Sierpinski结构

POV-Ray中使用declare递归定义Sierpinski结构阅读全文>

发表于 @ 2008年09月15日 18:42:00|举报收藏

用户操作
[即时聊天] [发私信] [加为好友]
张友邦
订阅我的博客
XML聚合  FeedSky
张友邦的公告
张友邦,男,微软认证专家,系统分析员,中国计算机学会会员,希赛网专业顾问,新加坡南洋理工大学助理研究员。1980年生于四川宜宾,2002年获得国防科技大学宇航科学与工程系学士学位。2003年底创业,后曾在多家公司担任CTO职务,拥有丰富的企业级应用设计开发经验。主要研究领域包括软件架构与设计、WEB RIA、流媒体与计算机图形图像,云计算及SOA,Business Forecasting,优化算法等。受国家自然科学基金资助,2001年发表国家级核心刊物学术论文一篇。国内最顶级分形艺术创作软件FerryMan Fractal作者,2006年初创建原创分形艺术专业网站CGPAD.COM。
文章分类
收藏
    链接
    ●CGPAD分形艺术
    ●Renderosity
    ●中国系统分析员CSAI名片
    存档
    Csdn Blog version 3.1a
    Copyright © 张友邦