Mxml组件的打开和关闭特效
openDuration="1000" openEasingFunction="Bounce.easeOut"
closeDuration="1000" closeEasingFunction="Bounce.easeIn"
//菜单透明效果
background-color:#000000;
background-alpha:0.1;
border-style:solid;
drop-shadow-color:#000000;
drop-shadow-enabled:yes;
//展开所有节点
private function expandAll():void{
//tree.expandChildrenOf(tree.selectedItem,true);
for each(var item:XML in tree.dataProvider){
tree.expandChildrenOf(item,true);
}
}
//关闭所有节点
private function closeAll():void{
tree.openItems=[];
}
//添加右键菜单
private var meunu1:ContextMenuItem;
private var meunu2:ContextMenuItem;
public function init():void{
meunu1=new ContextMenuItem("hello");
meunu2=new ContextMenuItem("word",true);
meunu1.addEventListener(ContextMenuEvent.MENU_ITEM_SELECT,menu1Handle);
meunu2.addEventListener(ContextMenuEvent.MENU_ITEM_SELECT,menu2Handle);
var menu:Conte ......
http://www.noupe.com/adobe/flex-developers-toolbox-free-components-themes-and-tutorials.html经典中的经典
http://www.efflex.org/EfflexExplorer.html堪称经典
http://mofeichen.javaeye.com/blog/466171里面有好多特效例子
http://www.marcusschiesser.de/?p=67 3D相册,还不错
http://www.switchonthecode.com/tutorials/getting-started-with-adobe-flex-and-away3d 3D旋转-有源码
http://actionscriptnotes.com/showcase/renju/Main.html flex 开发的五子棋,效果很好
http://dougmccune.com/blog/2008/02/26/examples-from-my-360flex-session-using-open-source-community-projects/
包括:VistaFlow效果、MP3Flow等其他
http://dougmccune.com/360Flex_ATL/FlexSpyEventListeners/flex图表和datagrid切换效果 ......
扩展Struts2--自定义String和XML格式的Result
struts2虽然继承了webwork优秀的MVC分离,可是有很多地方让人百思不得其解!最让人离谱的是,返回的结果集中居然没有String,xml这两种非常常用的类型。还是自己动手,丰衣足食:
第一种方式:使用“PlainText Result”
先看官方文档对plain text结果的定义:“A result that send the content out as
plain text. Usefull typically when needed to display the raw content of
a JSP or Html file for example.”这是一个纯扯蛋的说法。。。貌似感觉只能返回jsp页面似的,最起码他误导了我。
其实使用“PlainText Result” ,返回的结果是未进行格式和编码定义的字符串
。
什么意思?就类似于“FreeMarker Result” ,返回一个*.ftl格式的模板,你完全可以在*.ftl写string,那么结果就是string;也可以在里面写xml,那么结果就是xml。
举例如下:
<?
xml
version
=
"1.0"
encoding
=
"UTF-8"
?>
& ......
using System.IO;
#region 导入到XML
private void btnLeadInToXml_Click(object sender, EventArgs e)
{
this.openFileDialog1.Filter = "XML文件(*.xml)|*.xml";
if (this.openFileDialog1.ShowDialog() == DialogResult.OK)
{
string filename = this.openFileDialog1.FileName;
DataSet ds = new DataSet();
ds.ReadXml(filename);
......
Google XML Document Format Style Guide
Version 1.0
Copyright Google 2008
Introduction
This document provides a set of guidelines for general use when designing new XML document formats (and to some extent XML documents as well; see Section 11). Document formats usually include both formal parts (DTDs, schemas) and parts expressed in normative English prose.
These guidelines apply to new designs, and are not intended to force retroactive changes in existing designs. When participating in the creation of public or private document format designs, the guidelines may be helpful but should not control the group consensus.
This guide is meant for the design of XML that is to be generated and consumed by machines rather than human beings. Its rules are not applicable to formats such as XHTML (which should be formatted as much like HTML as possible) or ODF which are meant to express rich text. A document that includes embedded content in XHTML or ......
//输入一个数组,再修改这个数组所有元素,如何实现?
int main()
{
vector<int> a;
int i(0);
while(cin>>i)
a.push_back(i);
//////////////////////////////////////////////////////输出建立的数组:
cout << "得到的数组为:" << endl;
for(vector<int>::iterator p=a.begin();p!=a.end();p++)
cout << *p << " ";
cout << endl;
//////////////////////////////////////////////////////通过输入修改数组全部元素:
for(vector<int>::iterator p=a.begin();p!=a.end();p++){
int temp(0);
cin >> temp;
*p=temp;
}
cout << "修改后的数组为:" << endl;
for(vector<int>::iterator p=a.begin();p!=a.end();p++)
cout << *p << " ";
cout << endl;
}
//结果显示都为temp的初始化值0,因为Ctrl+Z后就无法cin所以无法修改元素。
//通过调用函数也无法实现 f ......