2009年8月 的存档

世界第一忽悠王——奥巴马获胜演讲全文

如果还有人对美国是否凡事都有可能存疑,还有人怀疑美国奠基者的梦想在我们所处的时代是否依然鲜活,还有人质疑我们的民主制度的力量,那么今晚,这些问题都有了答案.

这是设在学校和教堂的投票站前排起的前所未见的长队给出的答案;是等了三四个小时的选民所给出的答案,其中许多人都是有生以来第一次投票,因为他们认定这一次肯定会不一样,认为自己的声音会是这次大选有别于以往之所在.

这是所有美国人民共同给出的答案–无论老少贫富,无论是民主党还是共和党,无论是黑人、白人、拉美裔、亚裔、原住民,是同性恋者还是异性恋者、残疾人还是健全人–我们从来不是”红州”和”蓝州”的对立阵营,我们是美利坚合众国这个整体,永远都是.

长久以来,很多人一再受到告诫,要对我们所能取得的成绩极尽讽刺、担忧和怀疑之能事,但这个答案让这些人伸出手来把握历史,再次让它朝向美好明天的希望延伸.

已经过去了这么长时间,但今晚,由于我们在今天、在这场大选中、在这个具有决定性的时刻所做的,美国已经迎来了变革.

我刚刚接到了麦凯恩参议员极具风度的致电.他在这场大选中经过了长时间的努力奋斗,而他为自己所深爱的这个国家奋斗的时间更长、过程更艰辛.他为美国做出了我们大多数人难以想像的牺牲,我们的生活也因这位勇敢无私的领袖所做出的贡献而变得更美好.我向他和佩林州长所取得的成绩表示祝贺,我也期待着与他们一起在未来的岁月中为复兴这个国家的希望而共同努力.

我要感谢我在这次旅程中的伙伴–已当选美国

Flex Alert 组件结果处理实例

在使用Alert组件的时候,如何处理Alert提示框之后的CloseEvent呢?在这里提供了一种有别于官方已有样例的方案,例子如下:
其中有两点值得注意:一,通过evt.target可以获取当前点击组件的ID;二,CloseEvent的属性detail可以识别用户点击的按钮为yes or no^_^

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
<!--l version="1.0" encoding="utf-8-->
 
		Application
		{
			background-color:#FFFFFF;
			theme-color:#FFFFFF;
			font-family:"MS YaHei";
			font-size:12;
		}
 
		<![CDATA[
			import mx.events.CloseEvent;
			import mx.controls.Alert;
			public var temp_btn=new Button();
 
			private function clickHandler(evt:MouseEvent):void
			{
				temp_btn=Button(evt.target);
				if (temp_btn.label == "点一点")
				{
					Alert.yesLabel="是呀";
					Alert.noLabel="不了";
					Alert.show("确实要点我吗?", "提示", 3, this, alertHandler);
				}
			}
 
			private function alertHandler(evt:CloseEvent):void
			{
				if (evt.detail == Alert.YES)
				{
					temp_btn.label="别点我了!^_^"
				}
			}
		]]>

附上例子的运行结果:

未来影响中国的10大技术

    我们所推荐的,均是在目前或者更长的时间内,对企业管理产生重要影响的技术和产品.首先,这些技术具有革命性的创新,有广阔的应用前景;其次,能够帮助企业创造新的商业模式,开创新市场;第三,改善业务流程.
    No.1 RFID
    概念:非接触式的自动识别技术,即射频识别,俗称电子标签.
    典型应用:物流和供应管理、生产制造和装配、航空行李处理、邮件和快运包裹处理、门禁控制和电子门票.
    案例:沃尔玛在每个托盘上安装电子标签,货物的信息会在传输带上被读取,并与后台信息做匹配,从而知道谁收的货物,是由哪个订单发生的.货品补充比条形码提高3倍.
    优势股:微软、甲骨文、三星
    No.2 3G
    概念:第三代数字通信技术,可处理图像、音乐、视频流等多媒体形式.
    典型应用:可视会议、手机电视、移动商务、远程监控、无线支付.
    案例:美国AMEC公司通过3G网络接受客户报修单,每年节省的服务和维修响应时间达到325个小时,并且降低了相应的劳动力和交通成本.
    优势股:华为、中兴、西门子
    No.3 IPTV
    概念:交互式网络电视,是融合有线电视网、互联网、多媒体、通信的新技术.
    典型应用:电视上网、直播电视、电子商务、网络游戏、远程办公.
    案例:深圳某房地产商在新项目发布会上,利用IPTV技术推出全球鉴赏会,让加拿大、香港、台湾等异地的买家通过互联网远程直播,进行实时交流.
    优势股:UT斯达康、上海文广
    No.4 VOIP
    概念:基于互联网传输的语音技术.
    典型应用:网络会议、大型呼叫中心、集成语音与技术共享、离岸外包运营.
    案例:国内某企业在总部和各分部,以及呼叫中心建立了VOIP系统,使销售到客服等流程得到相应简化,管理效率大大提升,办公通讯成本下降30~50%.
    优势股:Avaya公司、阿尔卡特
    No.5 数据挖掘
    概念:从海量的信息中,挖掘出具有潜在价值数据的信息技术.
    典型应用:划分客户群体、识别消费行为、数据库营销、客户流失分析、捕捉盗用行为.
    案例:自动数据挖掘工具带给沃尔玛一个意外的发现:与尿布一起购买最多的是啤酒.原因是美国男人为小孩买尿布时,往往会随手带回两瓶啤酒.根据这个发现,沃尔玛将尿布和啤酒摆放在一起,销量双双增长.
    优势股:SAS公司、东软
    No.6 LED
    概念:LED即发光二极管技术.
    典型应用:电子器件显示、光纤维数据传输.
    案例:三星、索尼等企业将采用LED技术的液晶电视,作为突破成本瓶颈的主打产品.LED在手机中应用也较为广泛,一部彩屏手机大约需要10~12颗LED.
    优势股:飞利浦、健隆、亿光电子
    No.7 电子支付
    概念:通过电子终端向银行业金融机构发出支付指令,实现货币支付与资金转移.
    典型应用:电子商务、网上银行、电视购物.
    案例:个人用户通过支付宝与企业进行交易,日交易额约3000万元.
    优势股:支付宝、汇付天下
    No.8 闪存
    概念:半导体存储芯片.
    典型应用:数据存储、数据传输.
    案例:苹果新型MP3放弃硬盘而采用闪存后,令生产微硬盘的希捷等厂商股价大跌.
    优势股:朗科、三星、英特尔
    No.9 “中国芯”
    概念:中国企业自主研发的CPU,以及应用于通信和家电产品的多媒体芯片.
    典型应用:CPU、数字多媒体处理、图像输入.
    案例:中星微电子自主研发的”星光中国芯”,已经占领计算机图像输入芯片全球市场60%以上的份额.星光手机彩信处理芯片也被广泛地应用.
    优势股:中星微电子、龙芯、众志
    No.10 数字电视
    概念:利用数字技术对电视信号进行处理、传输、存储、记录、接收及控制的系统.
    典型应用:视频点播、远程教学和医疗、股票交易、信息查询.

案例:除PC外,清华同方将数字电视作为另一主营业务,围绕产业链共成立11家公司.在机顶盒与数字娱乐领域,清华同方已开始获利.
优势股:清华同方、创维、德州仪器、中数传媒

Google用户体验设计原则(真的很棒^_^)

偶然在Google发现了他们的用户体验设计原则(附:原文如下),因此翻译作一下记录。

1.以人为本 —他们的生活、他们的工作和他们的梦想

2.珍惜每一毫秒的时间

3.简洁也是一种力量

4.吸引新手、诱惑专家

5.敢于创新

6.放眼世界的设计

7.今天的计划和明天的业务

8.让人眼前一亮,又不会心有旁骛。

9.不辜负人民的信任

10.添加人情味

虽然每家公司都有自己的设计原则,但是殊途同归,所以在这里就不多做描述了。

原文如下:

1. Focus on people – their lives, their work, their dreams.

The Google User Experience team works to discover people’s actual needs, including needs they can’t always articulate. Armed with that information, Google can create products that solve real-world problems and spark the creativity of all kinds of people. Improving people’s lives, not just easing step-by-step tasks, is our goal.

Above all, a well-designed Google product is useful in daily life. It doesn’t try to impress users with its whizbang technology or visual style – though it might have both. It doesn’t strong-arm people to use features they don’t want – but it does provide a natural growth path for those who are interested. It doesn’t intrude on people’s lives – but it does open doors for users who want to explore the world’s information, work more quickly and creatively, and share ideas with their friends or the world.

2. Every millisecond counts.

Nothing is more valuable than people’s time. Google pages load quickly, thanks to slim code and carefully selected image files. The most essential features and text are placed in the easiest-to-find locations. Unnecessary clicks, typing, steps, and other actions are eliminated. Google products ask for information only once and include smart defaults. Tasks are streamlined.

Speed is a boon to users. It is also a competitive advantage that Google doesn’t sacrifice without good reason.

3. Simplicity is powerful.

Simplicity fuels many elements of good design, including ease of use, speed, visual appeal, and accessibility. But simplicity starts with the design of a product’s fundamental functions. Google doesn’t set out to create feature-rich products; our best designs include only the features that people need to accomplish their goals. Ideally, even products that require large feature sets and complex visual designs appear to be simple as well as powerful.

Google teams think twice before sacrificing simplicity in pursuit of a less important feature. Our hope is to evolve products in new directions instead of just adding more features.

4. Engage beginners and attract experts.

Designing for many people doesn’t mean designing for the lowest common denominator. The best Google designs appear quite simple on the surface but include powerful features that are easily accessible to those users who want them. Our intent is to invite beginners with a great initial experience while also attracting power users whose excitement and expertise will draw others to the product.

A well-designed Google product lets new users jump in, offers help when necessary, and ensures that users can make simple and intuitive use of the product’s most valuable features. Progressive disclosure of advanced features encourages people to expand their usage of the product. Whenever appropriate, Google offers smart features that entice people with complex online lives – for instance, people who share data across several devices and computers, work online and off, and crave storage space.

5. Dare to innovate.

Design consistency builds a trusted foundation for Google products, makes users comfortable, and speeds their work. But it is the element of imagination that transforms designs from ho-hum to delightful.

Google encourages innovative, risk-taking designs whenever they serve the needs of users. Our teams encourage new ideas to come out and play. Instead of just matching the features of existing products, Google wants to change the game.

6. Design for the world.

The World Wide Web has opened all the resources of the Internet to people everywhere. For example, many users are exploring Google products while strolling with a mobile device, not sitting at a desk with a personal computer. Our goal is to design products that are contextually relevant and available through the medium and methods that make sense to users. Google supports slower connections and older browsers when possible, and Google allows people to choose how they view information (screen size, font size) and how they enter information (smart query parsing). The User Experience team researches the fundamental differences in user experiences throughout the world and works to design the right products for each audience, device, and culture. Simple translation, or “graceful degradation” of a feature set, isn’t sufficient to meet people’s needs.

Google is also committed to improving the accessibility of its products. Our desire for simple and inclusive products, and Google’s mission to make the world’s information universally accessible, demand products that support assistive technologies and provide a useful and enjoyable experience for everyone, including those with physical and cognitive limitations.

7. Plan for today’s and tomorrow’s business.

Those Google products that make money strive to do so in a way that is helpful to users. To reach that lofty goal, designers work with product teams to ensure that business considerations integrate seamlessly with the goals of users. Teams work to make sure ads are relevant, useful, and clearly identifiable as ads. Google also takes care to protect the interests of advertisers and others who depend on Google for their livelihood.

Google never tries to increase revenue from a product if it would mean reducing the number of Google users in the future. If a profitable design doesn’t please users, it’s time to go back to the drawing board. Not every product has to make money, and none should be bad for business.

8. Delight the eye without distracting the mind.

If people looked at a Google product and said “Wow, that’s beautiful!” the User Experience team would cheer. A positive first impression makes users comfortable, assures them that the product is reliable and professional, and encourages people to make the product their own.

A minimalist aesthetic makes sense for most Google products because a clean, clutter-free design loads quickly and doesn’t distract users from their goals. Visually appealing images, color, and fonts are balanced against the needs for speed, scannable text, and easy navigation. Still, “simple elegance” is not the best fit for every product. Audience and cultural context matter. A Google product’s visual design should please its users and improve usability for them.

9. Be worthy of people’s trust.

Good design can go a long way to earn the trust of the people who use Google products. Establishing Google’s reliability starts with the basics – for example, making sure the interface is efficient and professional, actions are easily reversed, ads are clearly identified, terminology is consistent, and users are never unhappily surprised. In addition, Google products open themselves to the world by including links to competitors and encouraging user contributions such as community maps or iGoogle gadgets.

A greater challenge is to make sure that Google demonstrates respect for users’ right to own and control their own data. Google is transparent about how it uses information and never shares data outside Google without a user’s explicit consent. Our products warn users about such dangers as insecure connections, different privacy policies on other websites, actions that may make users vulnerable to spam, or the possibility that data shared outside Google may be stored elsewhere. Google is reassuring but truthful about data sharing so that users can make informed choices. The larger Google becomes, the more essential it is to live up to our “Don’t be evil” motto.

10. Add a human touch.

Google includes a wide range of personalities, and our designs have personality, too. Text and design elements are friendly, quirky, and smart – and not boring, close-minded, or arrogant. Google text talks directly to people and offers the same practical, informal assistance that anyone would offer to a neighbor who asked a question. And Google doesn’t let fun or personality interfere with other elements of a design, especially when people’s livelihood, or their ability to find vital information, is at stake.

Google doesn’t know everything, and no design is perfect. Our products ask for feedback, and Google acts on that feedback. When practicing these design principles, the Google User Experience team seeks the best possible balance in the time available for each product. Then the cycle of iteration, innovation, and improvement continues.

美丽是一门技艺—-Flex CSS

对于Flex CSS,Adobe推荐使用CamelCase格式命名选择器和样式属性。例如
.mystyle
{
    font:Arial;
    fontStyle:italic;
}
ComboBox
{
    Selection-color:#32cd32
}

关于CamelCase:
  也译作“骆驼拼写法”。CamelCase在英语中,是指通过单词起首大写方式进行复合词拼写的方法。该拼写方法使得复合词连续没有空格,但组成复合词的每个子单词起首字母大写,由此易于分辨复合词的组成.

Flex常用的CSS选择器

一、Class选择器

Class选择器名称由”.”起始,接以选择器名称。通过将组件的styleName属性设置为选择器名称,Class选择器定义的样式将被显式地指定给要修饰的组件。

二、Type选择器

Type选择器为指定类型的组件应用其定义的样式。Type选择器的名称为某类组件类型,如Button、ComboBox等

三、Application选择器

Application选择器是典型的Type选择器,只不过由于Application容器的特殊而显得不同。作为Flex应用的顶级容器,以及容器子项继承样式的能力,开发者可以创建Application选择器样式,由此设定整个应用的标准外观属性。

但另一方面,我们可以设定的外观属性仅仅局限在那些特殊可继承的样式属性,对于那些不可继承的样式属性,即使在Application选择器样式中进行定义,也无法应用到整个应用中。

四、global选择器

使用global选择器,能够为那些不可继承的样式属性设定全局统一应用的样式。global选择器不同于Type选择器,并没有一个global类。也不同于Class选择器,开发者无需显式的设定组件的styleName属性为global.在global选择器中定义的样式,会自动应用到全局应用中。

CSS 優先級

自己画了个图,表述一下样式应用的优先级:

2009-08-26_162556

Flex-MDI例子完整可用版(含Demo源码)

了解了一下MDI这个用於开发多窗口组件的开源框架。觉得很不错。分享一下:

官方下载地址:http://code.google.com/p/flexmdi/

官方演示地址:http://www.returnundefined.com/flexmdi/explorer/

然后准备自己做一个例子,觉得官方的英文说明有点逻辑混乱,偷偷懒,直接搜索了国内的例子来看,发现个问题:搜到的例子有好几百个,但它们都是一样的,无限的复制粘贴……中国的互联网……

OK,如果我能够因此很轻易的学习到这个框架,那么依然非常感谢这些勤劳复制粘贴的蚂蚁大哥们~But,所有人都没提供完整的demo包,把它们写在页面上的代码弄下来,总是缺这缺那的报bug,很无语……只好自己解决咯,回到官网,仔细看了它们的Example,然后把那份在网上流传不息的Demo弄好了。放上来,希望可以帮到一些朋友~

2009-08-24_104253

请从此下载:MDIExample

总有一种力量让我们泪流满面【1999年新年献词】

载于1999年1月1日的《南方周末》,作为上世纪末最后一年的献年词,给了多少人以力量!

这是新年的第一天。这是我们与你见面的第777次。祝愿阳光打在你的脸上。

阳光打在你的脸上,温暖留在我们心里。这是冬天里平常的一天。北方的树叶已经落尽,南方的树叶还留在枝上,人们在大街上懒洋洋地走着,或者急匆匆地跑着,每个人都怀着自己的希望,每个人都握紧自己的心事。

本世纪最后的日历正在一页页减去,没有什么可以把人轻易打动。除了真实。人们有理想但也有幻象,人们得到过安慰也蒙受过羞辱,人们曾经不再相信别人也不再相信自己。好在岁月让我们深知“真”的宝贵——真实、真情、真理,它让我们离开凌空蹈虚的乌托邦险境,认清了虚伪和欺骗。尽管,“真实”有时让人难堪,但直面真实的民族是成熟的民族,直面真实的人群是坚强的人群。

没有什么可以轻易把人打动,除了正义的号角。当你面对蒙冤无助的弱者,当你面对专横跋扈的恶人,当你面对足以影响人们一生的社会不公,你就明白正义需要多少代价,正义需要多少勇气。

没有什么可以轻易把人打动,除了内心的爱。没有什么可以轻易把人打动,除了前进的脚步……

这是新年的第一天,就像平常一样,我们与你再次见面,为逝去的一年而感怀,为新来的一年作准备。祝愿阳光打在你的脸上。

阳光打在你的脸上,温暖留在我们心里。有一种力量,正从你的指尖悄悄袭来,有一种关怀,正从你的眼中轻轻放出。在这个时刻,我们无言以对,惟有祝福:让无力者有力,让悲观者前行,让往前走的继续走,让幸福的人儿更幸福;而我们,则不停为你加油。

我们不停为你加油。因为你的希望就是我们的希望,因为你的苦难就是我们的苦难。我们看着你举起锄头,我们看着你舞动镰刀,我们看着你挥汗如雨,我们看着你谷满粮仓。我们看着你流离失所,我们看着你痛哭流涕,我们看着你中流击水,我们看着你重建家园。我们看着你无奈下岗,我们看着你咬紧牙关,我们看着你风雨度过,我们看着你笑逐开……我们看着你,我们不停为你加油,因为我们就是你们的一部分。

总有一种力量它让我们泪流满面,总有一种力量它让我们抖擞精神,总有一种力量它驱使我们不断寻求“正义、爱心、良知”。这种力量来自于你,来自于你们中间的每一个人。

所以,在这样的时候,在这新年的第一天,我们要向你、向你身边的每一个人,说一声,“新年好”!祝愿阳光打在你的脸上。

因为有你,才有我们。

阳光打在你的脸上,温暖留在我们心里。为什么我们总是眼含着泪水,因为我们爱得深沉;为什么我们总是精神抖擞,因为我们爱得深沉;为什么我们总在不断寻求,因为我们爱得深沉。爱这个国家,还有她的人民,他们善良,他们正直,他们懂得互相关怀。

Flex开发的服装DIY配置器

这个FLEX小程序的实例是 Teknision , 有时候也许你会想设计一件能够彰显个性的shirt,借助FLEX构建的这个产品配置器或许可以满足你的要求。或许服装设计者更需要这样一套人性化的服装设计软件。Tekision构建的这个服装设计实例可以让用户自定义服装上的一些元素,例如服装正面的LOGO,背后的文字,服装的花样、颜色等等。如果你有足够的想象力,相信你也能构建一个更为有趣的产品配置器。

非常遗憾的是这只是一个DOME,AIRIA设想如果可以供用户自行上传图形来配置服装,那样或许可以得到更为广泛的引用。

源码下载:Flex_Configurator

Java从文件路径中获取文件名的几种方法

举例:String fName =” G:\Java_Source\navigation_tigra_menu\demo1\img\lev1_arrow.gif ”

方法一:

1
2
3
File tempFile =new File( fName.trim());
 
String fileName = tempFile.getName();

方法二:

1
2
3
String fName = fName.trim();
 
String fileName = fName.subString(fName.lastIndexOf("/")+1);

方法三:

1
2
3
4
5
String fName = fName.trim();
 
String temp[] = fName.split("\\\\"); /**split里面必须是正则表达式,"\\"的作用是对字符串转义*/
 
String fileName = temp[temp.length-1];

字符串处理,感觉像个游戏,挺好玩的~哈!

Channel.Connect.Flex Error:Failed error NetConnection.Call.Failed: HTTP: Status 404

之前写Flex+Java的程式总要同时打开两个IDE:Eclipse+Flex Builder,最近找到一个集成了J2EE的Flex Builder。具体功能简单而言就是,Java代码和Flex代码从此能够在这一个IDE里面编写了,详情如下图:(Flex代码将会是在flex_src中,Java部份则写在src中)

2009-08-19_140409

今天将一些原来分开在两个IDE的代码放一起,运行的时候突然遇到一个Error:[FaultEvent fault=[RPC Fault faultString="Send failed"    faultCode="Client.Error.MessageSend" faultDetail="Channel.Connect.Failed error NetConnection.Call.Failed: HTTP: Status 404: url: 'http://localhost:9998/WebContent/messagebroker/amf'"] messageId=”C25D6E12-4A22-9827-849A-C56BBBB434F4″ type=”fault” bubbles=false cancelable=true eventPhase=2]

一番努力,终于找到原因,原来是在使用RemoteObject的时候必须配置EndPoint,错误显示安装工程的配置在这个路径http://localhost:9998/WebContent/messagebroker/amf’没有读取到endpoint。解决方法,在工程上点右键,打开Properties,在下图位置,原本默认设置为WebContent的地方修改为项目名称:

2009-08-19_135839
当然了,如果不是通过Blaze DS实现的话,直接使用RemoteObject,则可以如下配置:
<mx:RemoteObject id=”firstRO” destination=”FirstJavaClassRemoteObject” fault=”faultEvent(event)” endpoint=”http://localhost:8080/FlexDemo/messagebroker/amf”/>