Zend Framework 1.51 manual chm
今天在看Zend Framework 1.51 说明文件的时候,无意中发现所下载的文档包中还包含了制作chm的项目文件。既然这样为何不索性自己做一个chm文件,同时方便自己察看,还可以使用chm的检索功能。
自己对原始文件进行了一定的修正:
- 补上了遗漏的note.png图片。(chm用的是IE引擎,缺图后页面会很难看的)
- 参考framework官方网站说明的字体设定修改了chm中使用的字体。
为了方便其他网友的学习,索性把此chm文件一并上传一份。
有兴趣的可在此地址下载: zend_framework_manual_en.chm
第16届亚运会吉祥物
Zend Studio for Eclipse 支持 Ant
不清楚Zend Studio IDE for Eclipse为何不支持Ant? Ant对每一个开放者来说都是一个不可或缺的工具。其实Zend Studio for Eclipse是可以支持Ant功能,只不过IDE把此功能Disable罢了。
如何在Zend Studio for Eclipse 中开启ant功能呢? 步骤如下:
- 从File菜单中选择New->Other。
- 勾选Show All Wizards选项。
- 在Java的文件夹中选择“Java Project from Existing Ant Buildfile”,点击Next按钮。
- 当弹出的’Confirm Enablement’ 对话中,点击“OK”按钮来激活“Ant Development”,这样就可以让IDE开启了Ant功能。最后选择取消。现在和Eclispe 3.3版本中所包含Ant功能已经基本相同。
不过相信应该还有更方便的方法,Ant功能的开启可能只是某个配置文件的一个选项,应该修改此配置选项即可。有空时再做研究,现在就这样凑合着用用算了。
使用svn命令行递归的添加文件
由于在Linux下一直没有找到好的svn工具(类似于TortiseSVN的)。当然eSVN这些也不错,但就是使用上觉得还不是非常习惯。最终还是选择了svn原始的命令行工具来进行版本控制操作。
命令行的有些指令使用起来还是比较方便的。如svn checkout、svn commit这些命令基本上使不使用图形界面关系也不是很大。唯一比较麻烦的命令的就是svn add,因为新增加的文件会分步在不同的目录中,有些目录中的文件已经存在于受控的svn资料夹,而有些文件所在的目录都是新增的。简单的输入svn add只会把当前目录中的文件做添加的标记。而不会像Tortise那样以递归的方式把此目录包括子目录里所需添加的文件都进行标识,.如何实现类似TortoiseSVN的子目录递归式的添加?查了svn的资料,其实这种方式的实现是可以的,方法就是切换到需要添加文件的那个目录,输入svn add * –force , 使用–force参数可以忽略所添加的某些子目录已经在包含在版本控制中的错误。add目录原来就是支持递归方式的。最后再输入svn commit命令,所以新增的文件就会提交到版本库中了。
用YSlow来进行网页性能评估
YSlow是由Yahoo公司开发一个Firefox的插件,它和著名的FireBug插件集成在一起,对网页的性能(Performance)进行评估。可在Yahoo官方网站进行安装:https://addons.mozilla.org/en-US/firefox/addon/5369
包含了一下的功能:
- Performance report card
- HTTP/HTML summary
- List of components in the page
- Tools including JSLint
效果图:
Israel: Beyond the Headlines 1/3
A different kind of tour itinerary bypasses the historic bastions and leads instead into a landscape of olives and wine, art and artisan foods, laced with a touch of history
Whatever you imagine Israel to be, it probably isn’t the Israel Lin Arison wants people to know: a living, bubbling land of glassblowers, savvy chefs and worthy vintages. In this Israel, the Gaza Strip strife that dominates headlines seems a world away.
“Everyone who comes here says the same thing, that it feels so safe,” said Arison, who splits her time between Miami and Tel Aviv. “There’s normal life here. That’s the thing that’s so hard to get people to understand.”
As a first-time Israel visitor and non-Jew, I expect our tour will be insightful, instructive. “Enjoyable” isn’t on my list.
We check into our hotel in the upscale neighborhood of Herzliya. Though Herzliya hugs the Mediterranean Sea, this is no cramped and rocky sliver but a generous, sand-cushioned strand crowed with kite boarders, surfers, retirees, families.
A few minutes south, Tel Aviv awaits. The city is a mishmash-in places, a dingy, commercial hub. An arts center and wide, grassy boulevard look fresher. Endless coffee cafes-the three homegrown brands chased out a Starbucks incursion-feel like a welcome mat. Day and night, young women walk alone, often with cockapoos and Lhasas-not guard dogs.
The highlights of our Tel Aviv jaunt is Neve Tsedek. Founded in the late 1800s as a Jewish enclave in the sand dunes outside the crowed port town of Jaffa, Neve Tsedek became the foundation of Tel Aviv.Today Tel Aviv towers over the district’s few squares blocks-homes, shops, eateries, a performing arts space. The living room of one three-story house has been transformed into a sales space for antique linens; another homeowner sells second-hand toys, a third hand-blown glass bead jewelry.
Vocabulary:
- itinerary (n.) — 行程表,旅行路线
- a world away (idiom) — describing something that seems extremely far removed
- mishmash (n) — a badly organized mixture
- chase out (phr. v) — to get rid of someone or something
- welcome mat (idiom) — something that makes you feel you’ve been given a warm and friendly greeting upon arrival
- tower over (phr. v) —- to be much bigger and more successful than another things of the same type
- Gaza Strip (n. phr) — 加沙地带a coastal region between Israel, Egypt and the Mediterranean Sea; formerly occupied by Israel from 1967-1994, but under Palestinian rule since 1994
条状图的HTML实现
上次介绍使用了Google API来实现条状图(详见Google Chart API 自动生成图表),它使用的技术是动态生成Image图片的方式。
是否可以使用HTML和CSS? 这个当然没问题,具体实现说明请参考A List Apart: Accessible Data Visualization with Web Standards 网站的文章。
实现页面局部内容滚动
如何实现在有限的空间内显示更多的内容呢?其实很多页面的实现上都考虑了这样的一个问题。
如Thickbox的官方页面中就大量使用了这种技术,对页面的局部内容实现滚动,从而使页面上可以显示更多的内容。
那如何实现这样的滚动呢?其实很实现简单。步骤如下:
- 使用div标签来定义此区域的范围。
- 在CSS中对此区域定义宽和高。
- 在CSS中使用overflow属性来定义div的滚动。
现在我们来看一下如何定义overflow的属性,overflow的属性值可以为以下四种:
- overflow: auto – 这个属性会为所定义的区域添加一个滚动条(Scroll bar),包括水平、垂直或者两者都显示。不过只有当显示的数据内容超过定义的宽高时,滚动条才会显示。
- overflow: scroll – 这个属性会为所定义的区域添加一个滚动条(Scroll bar),但不管内容的多少,即使显示的内容很少,屏幕上也会显示一个Disable状态的滚动条。
- overflow: visible – 不剪切内容也不添加滚动条.
- overflow: hidden – 会对内容进行剪切,超过显示宽高的内容不会被显示。
可能常用的即时overflow:auto和overflow: scroll。当然此效果也可以使用iframe来实现,不过屏幕内容的刷新会是一个比较烦人的问题。
HTML:
<div class="scroll"> <p>This is a scrolling are created with the CSS property overflow.</p> <p><span style="color: red;">This is red color</span> Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh.</p> <p>This is a normal paragraph.<span style="font-weight: bold; font-size: 22px;">This is big bold text</span> </p> <p>This scrolling are can contain normal html like <a href="index.php">link</a></p> <p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh.</p> <p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh.</p> </div>
CSS:
div.scroll {
height: 200px;
width: 300px;
overflow: auto;
border: 1px solid #666;
background-color: #ccc;
padding: 8px;
}
Underwater Learning in Action
Student’s reef cleanup provides both environmental and educational benefits
At Barry University, they practice what they teach.
The students who pursue a Bachelor of Science degree in Sport Management with a concentration in diving industry are taught to protect the underwater environment. That’s how a group of students and staff end up cleaning Barracuda Reef off John U.Lloyd State Park, Florida.
The cleanup was organized by senior Katie Leiter, 22, a marine biology major with a minor in dive education. She and 14 others made two dives on the reef and carefully collected an assortment of trash, including fishing line, bottles and a dive ladder.
Giving back
By putting together the cleanup, Leiter fulfilled part of a project she is undertaking in her minor, one that enabled her to give back to the environment.
According to assistant professor Sharon Kegeles, Barry University’s facilitator of the sport management-diving industry program, the cleanup illustrated the type of leadership the Miami Shores school tries to instill in its diving students.
“If a person is looking to oversee a group of people in the water, like a divemaster, that person must be able to deal with all aspects of the dive,” Kegeles said. “As a scientific diver, Katie’s going to be overseeing other divers.
“To do something as a volunteer effort at the same time, that was what Katie wanted to do.”
One of the other things Leiter wanted to do was hold down expenses for the participants. So she solicited cash donations for the cost of the dive charter from the school of Natural Health Sciences and the athletics department.
Working with care
Removing the trash from the reef gave students a chance to put their education to use. Instead of simply pick up stuff and hacking away at fishing line, they pain stakingly removed the trash, just like a marine biologist or geologist conducting research would do.
“All the participants had to be trained in advance how to properly remove the line without damaging the reef,” Kegeles said.
Barry University is the only school that offers a four-year degree program in diving industry. The object is to not just learn about diving and become a better diver, but to also learn how to handle dive accidents and undertake rescues.
Combined with study in programs such as marine and environmental sciences, photography and international business, those who get a degree in diving industry can go on to careers in dive travel, underwater photography, running a dive boat or working for a company that makes scuba gear.
Variety and travel
Students with majors in other disciplines get a minor in diving education. They include marine biologists who want to conduct underwater research, premed students who want to specialize in hyperbaric medicine and broadcasters who want to do underwater filming.
Diving is done locally as well as in the Gulf of Mexico, the springs in northern Florida and at Caribbean island resort destinations. By traveling, Kegeles said, students learn about different dive operations and diving issues as well as how cultural differences influence diving.
Leiter was required to do a full immersion sernester internship in marine biology this past summer. Through her contacts in the diving industry, Kegeles was able to get Leiter an internship working with whale sharks at a whale shark research center in Honduras.
- Reef (n) — 礁,暗礁
- Concentration (n) — a university student’s main area of study
- Instill (v) — to put a feeling, idea or principle gradually into someone’s mind, so that it has a strong influence on the way they think or behave
- Divemaster (n)— 潜水长 a professional who is qualified to supervise diving operations, and is responsible for a safe dive for all divers, both underwater and at the surface.
- put (something) to use (v. phr) —to use something to the best advantage
- hack away at (phr. v) —to cut into pieces in a rough and violent way, often without aiming exactly
- painstakingly (adv) —in a way that shows you have taken a lot of care or made a lot of effort
- specialzied in (phr. v) —to spend most of your time studying one particualr subject
- contacts (n .pl) —people, especially in high positions, that can give you useful information or introductions which will help you at work or socially
- scuba (n) —水肺a portable breathing device that allows divers to breathe under water; an acronym for “self-contained underwater breathing apparatus”
- hyperbaric (adj) —高压的relating to pressures higher than normal atmospheric pressure
- full immersion (n. phr) —完全投入;全浸式intensive, complete involvement in one course of instrucition, to the exclusion of all others for some period of time
Actionsript 3.0中的数组
1. 包含两个字符串的数组
- ["boy", "girl"]
2. 数组中可以包含任意类型的数据,如字符串和数字等,设置可以包含另一个数组类型的数据
- ["boy", 1 , "girl" , 2]
- ["month end days", [31, 30, 28]]
3. 可以把数组赋值给一个数组变量
- var game:Array = ["EA", 175];
4. 使用new来创建数组变量
- new Array(14) // 创建包含14个空数据的数组。
- new Array(“sun”, “moon”, “earth”) //创建了包含3个字符串的数组,等同于["sun","month","earth"]。
5. 访问数组元素 []
var trees:Array = ["birch", "maple", "oak", "cedar"];
var firstTree:String = trees[0];
trees[0] = “oak2″;
6. 取得数组长度length
var trees:Array = ["birch", "maple", "oak", "cedar"];
var len:int = trees.length;
7. 往数组中添加元素
- var fruits:Array = ["apples", "oranges", "pears"]; fruits[3] = “tangerines”;
- var colors = ["green", "red", "blue"]; colors.length = 50;
- push( )方法,把新的元素添加到数组尾部。
- unshift( )方法,把新的元素添加数组首部。
- splice( )方法
- concat( )方法
8. 从数组中删除元素
- delete 操作符:var list = ["a", "b", "c"]; delete list[2];
- var toppings:Array = ["pepperoni", "tomatoes", "cheese"]; toppings.length = 2;
- splice( )
- pop( ) :和push( )相反。
- shift( ):和unshift( )相反。

