Jia'nan's profile昭苏 - 非技术博客PhotosBlogListsMore Tools Help

昭苏 - 非技术博客

昭苏万物春风里
Photo 1 of 5
July 12

备忘录5

* HUMAN *

最近见到的人:好多超令人崇拜的学姐

-----------------
* READING *

正在读的图书资料:

技术类:
《正则表达式必知必会》
《Cocoa入门——使用Objective-C》
《Designing Interface》(Jenifer Tidwell著,O'Reilly出版)

非技术类:
《风俗论(中册)》 [法]伏尔泰 商务印书馆 【一个男人写给一个女人的七百万言大书第二册】
《西班牙史》[法]让-德科拉 商务印书馆

技术类杂志:《程序员》2009年7月号

原计划完成情况:
《Real OOP with REALbasic》Guyren G Howe著 (2009年5月24日完成)
ADC文档《Multiple User Environments (Mac OS X)》(2009年5月19日完成)
ADC文档《Mac OS X Notification Overview (Mac OS X)》(2009年5月20日完成)
《汇编语言(第2版) 》(2009年6月2日完成)
《风俗论(上册)》 [法]伏尔泰 商务印书馆 (2009年7月10日完成)
《程序员》2009年5月、6月号 完成

--------------
* WORK *

忙于下列项目
Optimism for Desktop v3.0
Optimism for Flex v1.0
Optimism for iPhone v1.0

--------------
* NOTES *

虽然刚到7月份,不过本年度的软件及开发工具补贴已经用光了。

http://www.3exware.com/home/article.asp?id=45
March 09

YY宣言(女士请进,男士们一边凉快去吧)

一、本人简介
出生日期:1984.6.6
出生地:黑龙江齐齐哈尔,曾居嫩江南畔十载,离江边不过半里之遥
户籍:上海静安,迁居苏州河左岸十数年,距河岸二三百步
实际籍贯:浙江宁波,一说慈溪,一说余姚,户口簿上竟随母系载齐齐哈尔
身高:站在冰封的海平面上时,头顶上瑟瑟发抖的苍蝇恰好处于海平1800毫米处
体重:毛重6万公克,略显骨感
相貌:初中时代曾被少量情窦初开的少女捧为帅哥,纠缠不已,目前已年老色衰,尚可供卡西莫多欣羡
职业:给员工打工的微型软件公司私营企业主,常以文人情怀来写代码,虽无法挥洒自如,却可自娱自乐兼养家糊口
爱好:读书,文史社科为主,总体上爱好不太确定,可以随需发展
其它:无犯罪前科,无前女友,更无前妻,亦无私生子
(本简介为不完全版,完全版涉及个人隐私不便公开。)

二、本人誓言
本人已发下毒誓,其大意为:不主动追求女生,如破此戒,定糟天罚,处罚方式为每日抄写“吾爱南无阿弥陀佛”九千九百九十九遍,直至往生西方极乐世界见到阿弥陀大佛为止。故此,请各位尊贵的小姐们自行抓捕,但谢绝使用暴力制伏。
(毒誓为不完全版,完全版涉及个人隐私不便公开。)

三、本人口味
性别:女,我知道没有发展出同性或双性倾向是我的错,因此烦请男士和双性人勿要打扰
出生日期:1984.6.6凌晨3时之前
身高:在本人2/3及以上又不比本人还高的,1米2以下的恕不接待,恋童是犯罪
体重:在本人体重的1/2到4/3之间,为防止遭受家庭暴力,吨位超过0.08的恕不接待
相貌:和本人站在一起,不像在给世界名著《陪衬人》拍电影版即可
职业:除拳击教练或选手、西医及“特殊职业”从业者外
其它:不限
(本人特此保留口味部分的最终解释权,若经修改,恕不另行通知。)

January 13

Macross系列的传统

简言之:
以歌声为武器,以会变形的小飞机、大飞船为装备,以外星怪人、怪物为主要对象,一面开现场演唱会,一面发展三角关系,一面作战的一组故事。

十大不可或缺的传统人设及剧情

1、喜欢天空的男主人公
(超时空要塞Macross,Macross Frontier,Macross Plus等)

2、喜欢唱歌的女主人公
(超时空要塞Macross,Macross 7及其OVA, Macross Frontier,Macross Plus等)

3、男主人公突遇急情不得不驾驶来路不明的战机,且首次驾驶时救了女主人公一命
(超时空要塞Macross,Macross Frontier)

4、男主人公与女主人公被困密室,一边YY,一边等待救援
(超时空要塞Macross,Macross 7, Macross Frontier)

5、Miss Macross评选
(超时空要塞Macross,Macross 7, Macross Frontier)

6、主人公开音乐会
(超时空要塞Macross,Macross 7, Macross Frontier)

7、一打仗就唱歌
(几乎全部)

8、女主人公在娘娘中餐馆帮忙或打工
(超时空要塞Macross,Macross Frontier)
娘娘主题歌歌词由中文、英文、Zentraedi文和日文(共计地球语三种,外星语一种)拼成,最完整的全文如下:好吃来来~美姑娘!娘娘~娘娘~你好娘! Gorgeous~Delicious~Deculture啊~~~おいしいニャー!

9、至少一名男主人公在骷髅中队担任飞行员
(超时空要塞Macross,Macross Frontier,Macross Zero)

10、由复杂的三角关系来推动剧情
1)超时空要塞Macross:林明美+一条辉vs.明美表哥(一女+二男)是为三角一组;一条辉+早濑未沙vs.明美(一男+二女)则为三角二组;最终结果(漫画or小说版):一条辉、早濑2012年在首次大规模移民船图上成婚,明美亦上此船(准备第三者插足?),明美表哥行踪不明。
2)Macross 7:米雷尼·吉那斯+热气·巴撒拉vs.贾姆林(一女+二男)三角组合,结果:至少到205X年为止结果不明。
3)Macross Frontier:早乙女アルト+雪莉露·诺姆vs兰华·李(一男+二女)三角组合,结果:尚在发展中,2060年之前看来不会有结果。
4)Macross Plus:谬芳容+勇·戴森vs.卡尔德·果阿·波曼(一女+二男)三角组合,结果:不明。
5)Macross Zero:工藤信+莎拉·诺姆vs.玛奥·诺姆(一男+二女)三角组合,结果:无果。

Yack Deculture!

Is a specific app running?

How to know whether an app is running in REALbasic? The common idea is looping through all processes and testing with the name of the app which you want to know if it's opened.

Windows
On Windows, we can do it via declares, the Win32 APIs we need to use are EnumProcesses, EnumProcessModules, GetModuleFileNameEx, etc. I wrote a function a few days ago. You can find the source code of it in Window1 of the RB project attached. I didn't implemented it in a very smart way. It gets the names of all processes, then tests to see if a specific app name can be found. It because I wanted to demonstrate how to list the paths of all processes. You may make some changes on it to exit the For loop when the app is found.

Mac OS X
On Mac, calling AppleScript functions seems the best way. You can loop through all process objects provided by the System Events application in a tell block. However, since AppleScript supports using keyword each or plural of class name to access all objects in the direct parameter of tell statement (in this case, it's the System Events application), so that the script can be simply written like this:

on run {appname}
tell application "System Events"
        if (name of each process) contains appname then
            return true
        else
            return false
        end if
    end tell
end run
OR:
on run {appname}
    tell application "System Events"
        if (name of processes) contains appname then
            return true
        else
            return false
        end if
    end tell
end run
 
On Leopard, AppleScript are updated to 2.0, many new features are introduced. As the result, it's able to test whether an app is running without launching it:
on run {appname}
    if application appname is running then
        return true
    else
        return false
    end if
end run
The code above doesn't work on Tiger and earlier.
 
To use an AppleScript, drag and drop the scpt file to your project, and call it by its name showed in the listbox of project panel, as calling a global function. The AppleScript will be compiled and embedded to app file you built. You will observe that the return value of any AppleScript you get in RB is a String, rather than the date type you expected. So you should compare it with "true" or "false", not a Boolean constant. Refer to the rbp I attached if my description isn't clear to you.

Attachment: IsProcRunning.zip

原载本人英文Blog

Some compression arithmetics implemented in RB.

I implemented some common compression arithmetics (LZ77, RLE and Huffman) in RB above a half year ago. I've referred to several open-source C/C++ projects/libraries. None of them has any limit of using, modification and issuance, so they can be used in any project for free.
Download them here
.

原载本人英文Blog

How to hide taskbar button of a window?

In REALbasic, some types of window show buttons on taskbar in default. However, you may want to hide the taskbar button in some cases. For example, you want to use a document window as a modeless dialog, or you want to use a plain box as a splash window or a customized tooptip/popup window (not like REALbasic, most Windows applications won't display buttons on taskbar for their splash windows, such as Word, Windows Live Mail or RealPlayer). Simply add the follow code to the Open event handle of the window.
 
#if TargetWin32 Then
  Declare Function SetWindowLong Lib "user32" Alias "SetWindowLongA" (ByVal hwnd As Int32, ByVal nIndex As Int32, ByVal dwNewLong As Int32) As Int32
  Const GWL_EXSTYLE = -20
  Const WS_EX_TOOLWINDOW = &H80
  Call SetWindowLong(Self.Handle,GWL_EXSTYLE,WS_EX_TOOLWINDOW)
#endif
 

原载本人英文Blog

 
December 11

REAL软件发布了REALbasic 2008 Release 5(多国语言版)

REAL软件发布了REALbasic 2008 Release 5(多国语言版)

继续专注于产品质量

美国德州奥斯汀(2008年12月9日) —Windows、Mac OS X和Linux开发者的跨平台开发环境REALbasic的创造者——从今日起开始发售REALbasic 2008 Release 5。这个版本添加了超过150处改建和几个新功能包括用彩色打印代码的能力和复制整个方法、属性和常量的能力,并使所有图形控件支持KeyUp事件等。此外,用户可以编写自己的工具来自动化完成整个程序生成过程了。

REALbasic 2008 Release 5也包含了对自动完成——REALbasic用户经常使用的功能的改进。自动完成现在支持命名空间,并能使用图标来标示列表中的项目。

关于REALbasic 2008 Release 5中的改进和新增功能的完整列表可以在产品下载页面 www.realsoftware.com/download找到。

关于 REALbasic

REALbasic是全功能的跨平台软件开发环境,适合创建各种类型的应用程序,从实用工具到企业级的软件,从桌面软件到控制台、服务器程序都能用它来开发。REALbasic的Windows和Mac平台的个人版售价为¥550元。REALbasic的Linux 版则免费提供。REALbasic专业版提供了交叉编译在内的众多高级功能,售价为¥1800元。REALbasic现在可以从REAL软件公司获得,请直接从www.realsoftware.com/download下载。

关于 REAL SQL Server

REAL SQL Server是跨平台多用户数据库服务器。REAL SQL Server为REALbasic提供了比其它数据库服务器更快速高效地创建安全、健壮的数据库应用程序的能力。专为REALbasic 2006及更高版本设计,更多信息以及有关REAL SQL Server的主要功能的列表可以在www.realsoftware.com/realsqlserver找到。

关于 REAL软件公司

跨平台开发工具REALbasic和REAL SQL Server的提供商REAL软件公司,为想要为Windows、Macintosh和Linux创建和发布跨平台软件的人们提供了高效易用的解决方案。 REAL软件公司于1996年创建于美国德克萨斯州首府奥斯汀市。更多信息请访问www.realsoftware.com或拨打 +1 512.328.7325。

欢迎在Macworld Expo上与REAL软件公司见面,1月6-9日,旧金山,#3428号展位。

 

Jia'nan Zhu

Occupation
Location
Interests
嗯...实际上我怀疑我的兴趣是工作和看书,欲望是创造些什么东西,下意识的打算是把所有认识的人都包养起来...

Windows Media Player