tomcat cluster start error on redhat

The error message is below:
=====================================================================
SEVERE: Unable to start cluster.
Continue reading

Posted in linux | Leave a comment

how to update name to comment in PDM

'******************************************************************************
'* File:     Comment2Name.vbs
'* Purpose:  把字段及表的name用comment来代替
'* Use:      打开PDM,运行本脚本(Ctrl+Shift+X)
'* Version:  1.0
'* Comment:  遍历PDM中的所有包,把数据表及字段的Name用comment来替换
'* Copyright (C) 2008 topsthink Inc.
'******************************************************************************

Option Explicit
ValidationMode = True
InteractiveMode = im_Abort
 
Dim mdl ' 定义当前的模型

'通过全局参数获得当前的模型
Set mdl = ActiveModel
If (mdl Is Nothing) Then
   MsgBox "没有选择模型,请选择一个模型并打开."
ElseIf Not mdl.IsKindOf(PdPDM.cls_Model) Then
   MsgBox "当前选择的不是一个物理模型(PDM)."
Else
   ProcessFolder mdl
End If
 
'--------------------------------------------------------------------------------
'功能函数
'--------------------------------------------------------------------------------
Private Sub ProcessFolder(folder)
   Dim Tab '定义数据表对象
   for each Tab in folder.tables
      if not tab.isShortcut then
         if tab.comment <> "" then tab.name = tab.comment&"(" &tab.name&")" '进行判断并赋值
         Dim col '定义列对象
         for each col in tab.columns
            if col.comment <> "" then
               On Error Resume Next '增加此句
               col.name = col.comment '进行判断并赋值
            end if
         next
      end if
   next
 
   '对子包进行递归,如果不使用递归只能取到第一个模型图内的表
   dim subfolder
   for each subfolder in folder.Packages
      ProcessFolder subfolder
   next
 
   'msgbox "完成把name用comment的内容name代替"
End Sub
Posted in java | Leave a comment

how to delete a record in solr

http://172.16.2.177:8080/solr/update/?stream.body=<delete><id>123</id></delete>&stream.contentType=text/xml;charset=utf-8&commit=true

Posted in java | Leave a comment

Another flex ant sample

<!--
     Copyright (c) 2007 FlexLib Contributors.  See:
     http://code.google.com/p/flexlib/wiki/ProjectContributors
 
     Permission is hereby granted, free of charge, to any person obtaining a copy of
     this software and associated documentation files (the "Software"), to deal in
     the Software without restriction, including without limitation the rights to
     use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
     of the Software, and to permit persons to whom the Software is furnished to do
     so, subject to the following conditions:
 
     The above copyright notice and this permission notice shall be included in all
     copies or substantial portions of the Software.
 
     THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
     IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
     FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
     AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
     LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
     OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
     SOFTWARE.
-->
<project name="flexlib" default="lib">
 
    <!-- Define variables/paths used in this build script -->
 
    <!-- Depending on the host os, fetch relevant prop file -->
    <condition property="platformSpecificPropertyFile" value="build.mac.properties">
        <os family="mac" />
    </condition>
    <condition property="platformSpecificPropertyFile" value="build.win.properties">
        <os family="windows" />
    </condition>
    <condition property="platformSpecificPropertyFile" value="build.unix.properties">
        <os family="unix" />
    </condition>
 
    <property file="./setup/config/${platformSpecificPropertyFile}" />
    <property file="./build.properties" />
 
    <!--
         Have you edit the properties file to make sure the paths are right on your system?
    -->
    <target name="properties">
        <fail unless="asdoc.exe">The "asdoc.exe" property must be set in ${build.dir}/build.properties.</fail>
        <fail unless="compc.exe">The "compc.exe" property must be set in ${build.dir}/build.properties.</fail>
        <fail unless="mxmlc.exe">The "mxmlc.exe" property must be set in ${build.dir}/build.properties.</fail>
    </target>
 
    <!-- Extension for ANT to allow for tasks like "for" and "propertyregex" -->
    <taskdef resource="net/sf/antcontrib/antlib.xml">
        <classpath>
            <pathelement location="${setup.lib}/ant-contrib-1.0b3.jar" />
        </classpath>
    </taskdef>
 
    <!-- Cleans project -->
    <target name="clean">
        <delete dir="${build}" />
        <delete dir="${dist}" />
    </target>
 
    <!-- creates buid/dist folders -->
    <target name="init">
        <mkdir dir="${build}" />
        <mkdir dir="${build.config}" />
        <mkdir dir="${dist}" />
        <mkdir dir="${dist.examples}" />
        <mkdir dir="${dist.docs}" />
    </target>
 
    <!-- Compile the unit tests for the library, placing the test runner .swf file
         in the bin directory. -->
    <target name="compileTests" depends="init">
        <copy tofile="${build.config}/tests-config.xml"
              file="${setup.config}/tests-config.template.xml"
              overwrite="true" />
        <replace file="${build.config}/tests-config.xml">
            <replacefilter token="@FLEX_LIBS_HOME@" value="${flexsdk.lib}" />
            <replacefilter token="@FLEX_BUILD_VERSION@" value="${flex.version}" />
        </replace>
        <exec executable="${mxmlc.exe}" dir="${basedir}">
            <arg line="'${tests.dir}/${testRunner.dir}/${testRunner.name}.mxml'" />
            <arg line="-o ${dist}/${testRunner.name}.swf" />
            <arg line="-load-config '${flexsdk.dir}/frameworks/flex-config.xml'" />
            <arg line="-load-config ${build.config}/tests-config.xml" />
        </exec>
    </target>
 
    <!--
         Runs the unit tests for the library in the stand-alone Flash Player
    -->
    <target name="test" depends="compileTests">
        <!--
             If/When we add support for determining the status of unit tests
             as part of the ANT build process, we need to change the spawn to
             "no" so that ANT waits until the test runner closes before
             proceeding.
        -->
        <exec executable="${flashDebugPlayer.exe}" spawn="yes">
            <arg line="${dist}/${testRunner.name}.swf" />
        </exec>
    </target>
 
    <!--
         Compile all of the classes under the "src" tree into a .swc file
    -->
    <target name="lib" depends="init">
        <copy tofile="${build.config}/flexlib-config.xml"
              file="${setup.config}/flexlib-config.template.xml"
              overwrite="true" />
        <replace file="${build.config}/flexlib-config.xml">
            <replacefilter token="@FLEX_SDK@" value="${flexsdk.dir}" />
            <replacefilter token="@FLEX_VERSION_3@" value="${flex.version3}" />
            <replacefilter token="@FLEX_VERSION_4@" value="${flex.version4}" />
 
        </replace>
        <exec executable="${compc.exe}" dir="${basedir}">
            <arg line="-o ${dist}/${library.name}.swc" />
            <arg line="-load-config '${flexsdk.dir}/frameworks/flex-config.xml'" />
            <arg line="-load-config ${build.config}/flexlib-config.xml" />
        </exec>
    </target>
 
    <target name="release-lib" depends="clean">
        <antcall target="lib" />
    </target>
 
    <!--
         Generate the example applications using the library
    -->
    <target name="examples_modified">
        <condition property="examplesFolder"
                   value="flex3"
                   else="flex4">
            <equals arg1="${flex.version3}" arg2="true" />
        </condition>
        <echo>Building ${examplesFolder} modified examples</echo>
        <copy tofile="${build.config}/examples-config.xml"
              file="${setup.config}/examples-config.template.xml"
              overwrite="true" />
        <replace file="${build.config}/examples-config.xml">
            <replacefilter token="@FLEX_LIBS_HOME@" value="${flexsdk.lib}" />
            <replacefilter token="@FLEX_BUILD_VERSION@" value="${flex.version}" />
        </replace>
        <!--
             Loop over all of the Sample applications in the examples directory,
             compile them, and place the resulting .swf next to the application
             .mxml file.
        -->
        <for param="file">
            <!-- Find the sample applications -->
            <fileset dir="${basedir}/examples">
                <!--
                     The modified selector will only select files that have been
                     modified since the examples target was last run. This means we
                     can update a single example, then run the examples target and
                     only the updated example will get recompiled.
                -->
                <modified />
                <include name="**/*_Sample.mxml" />
                <!--
                     For only building specific examples, comment out
                     the line above, and uncomment the line below and modify
                     as appropriate.
                -->
                <!-- include name="**/*_Sample.mxml" / -->
            </fileset>
 
            <sequential>
                <!-- Pull out the example name and folder -->
                <propertyregex property="exampleApplicationName"
                               override="yes"
                               input="@{file}"
                               regexp=".*${file.separator}(.*)_Sample.mxml"
                               replace="\1" />
                <propertyregex property="exampleFolderName"
                               override="yes"
                               input="@{file}"
                               regexp="(.*)${file.separator}(.*)_Sample.mxml"
                               replace="\1" />
                <exec executable="${mxmlc.exe}" dir="${basedir}">
                    <arg line="'@{file}'" />
                    <arg line="-o ${dist}/examples/${exampleApplicationName}_Sample.swf" />
                    <arg line="-load-config '${flexsdk.dir}/frameworks/flex-config.xml'" />
                    <arg line="-load-config ${build.config}/examples-config.xml" />
                </exec>
            </sequential>
        </for>
    </target>
 
    <!--
         Exactly the same as examples_modified, except we regenerate all example files,
         regardless of whether they've been modified since last run. This is almost line-for-line
         the same as the examples_modified target, so all comments have been removed for brevity.
    -->
    <target name="examples_all">
        <condition property="examplesFolder"
                   value="flex3"
                   else="flex4">
            <equals arg1="${flex.version3}" arg2="true" />
        </condition>
        <echo>Building all ${examplesFolder} examples</echo>
        <copy tofile="${build.config}/examples-config.xml"
              file="${setup.config}/examples-config.template.xml"
              overwrite="true" />
        <replace file="${build.config}/examples-config.xml">
            <replacefilter token="@FLEX_LIBS_HOME@" value="${flexsdk.lib}" />
            <replacefilter token="@FLEX_BUILD_VERSION@" value="${flex.version}" />
        </replace>
        <for param="file">
            <fileset dir="${basedir}/examples">
                <include name="**/${examplesFolder}/**/*_Sample.mxml" />
            </fileset>
 
            <sequential>
                <propertyregex property="exampleApplicationName"
                               override="yes"
                               input="@{file}"
                               regexp=".*${file.separator}(.*)_Sample.mxml"
                               replace="\1" />
                <propertyregex property="exampleFolderName"
                               override="yes"
                               input="@{file}"
                               regexp="(.*)${file.separator}(.*)_Sample.mxml"
                               replace="\1" />
                <exec executable="${mxmlc.exe}" dir="${basedir}">
                    <arg line="'@{file}'" />
                    <arg line="-o ${dist}/examples/${exampleApplicationName}_Sample.swf" />
                    <arg line="-load-config '${flexsdk.dir}/frameworks/flex-config.xml'" />
                    <arg line="-load-config ${build.config}/examples-config.xml" />
                </exec>
            </sequential>
        </for>
    </target>
 
    <!--
         Generate ASDoc output for the library
    -->
    <target name="docs" depends="init">
        <!-- Clean out the contents of the doc directory, without deleting "docs" -->
 
        <delete includeemptydirs="true">
            <fileset dir="${dist.docs}" includes="**/*" />
        </delete>
 
        <exec executable="${asdoc.exe}" spawn="no">
            <arg line="-define+=FLEX_TARGET_VERSION::flex4,${flex.version4} -define+=FLEX_TARGET_VERSION::flex3,${flex.version3}" />
            <!-- Place the documentation in the "docs" directory -->
            <arg line="-o '${dist.docs}'" />
 
            <!-- Specify the main source path as "src" -->
            <arg line="-sp '${src.dir}'" />
 
            <!-- Document all of the classes in the "src" tree -->
            <arg line="-ds '${src.dir}' " />
 
            <!-- Include the library name in the window title -->
            <arg line="-window-title '${library.name}' " />
 
            <arg line="-templates-path '${flexsdk.templates.dir}' " />
        </exec>
    </target>
 
    <!--
         When the ASDoc files are generated and imported into the SVN
         repository, the files need to have mime types set correctly so that
         you can open a web browser to the docs in the repository and
         have the HTML render correctly.  Failure to set the mime types will
         result in the doc source being displayed, rather than the docs being
         rendered.
 
         This target requires the ANT contrib library in order to run.
    -->
    <target name="fixDocMimeTypes">
        <!-- Loop over the files in the doc directory -->
        <for param="file">
            <!-- Include the following file types in the target directory as part of the loop -->
            <fileset dir="docs">
                <include name="**/*.html" />
                <include name="**/*.png" />
                <include name="**/*.jpg" />
                <include name="**/*.css" />
                <include name="**/*.js" />
                <include name="**/*.gif" />
            </fileset>
 
            <sequential>
                <!---
                     Determine the mime-type from the file extension.
                -->
                <property name="mime.type.html" value="text/html" />
                <property name="mime.type.png" value="image/png" />
                <property name="mime.type.jpg" value="image/jpeg" />
                <property name="mime.type.css" value="text/css" />
                <property name="mime.type.js" value="text/plain" />
                <property name="mime.type.gif" value="image/gif" />
 
                <!-- Extract the extension from the file name -->
                <propertyregex property="fileExtension"
                               override="yes"
                               input="@{file}"
                               regexp=".*${file.separator}([^\\]+)\.([a-zA-Z0-9]+)"
                               replace="\2" />
 
                <!-- Set the mime.type property based on the extension -->
                <propertycopy name="mime.type"
                              from="mime.type.${fileExtension}"
                              override="yes" />
 
                <!-- Sanity check...
                     <echo>@{file} is ${fileExtension} with mime type ${mime.type}</echo>
                -->
 
                <!-- Configure the mime type for the file -->
                <exec executable="${svn.exe}" spawn="no">
                    <arg line="propset svn:mime-type '${mime.type}' '@{file}'" />
                </exec>
            </sequential>
        </for>
    </target>
 
 
    <!--
         Generate a distribution based on the current source code.  Includes
         the source code, the documentation, the examples, and the binary .swc file.
    -->
    <target name="release" depends="clean, init, lib, examples_all, docs">
        <!-- Creates the .zip file in the bin directory -->
        <zip destfile="${dist}/${library.name}.zip">
            <fileset dir="${basedir}">
                <include name="bin/${library.name}.swc" />
                <include name="src/**" />
                <include name="docs/**" />
                <include name="examples/**" />
                <exclude name="**/*_Sample.swf" />
            </fileset>
        </zip>
    </target>
 
</project>
Posted in java | Leave a comment

flex ant file sample

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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
 
<project basedir="." name="Flex Ant Builder SSO Project"> 
 
        <!– 定义ant存放位置  –>
        <property name="ant.lib.dir" value="E:\FlexSDK\3.2.0/ant/lib"></property>
        <!– 定义Flex SDK存放位置  –>
        <property name="FLEX_HOME" value="E:\FlexSDK\3.2.0"></property>
 
        <!– 初始化时间格式,以便使用 –>
        <tstamp>
                <format pattern="yy.mm.dd" property="TODAY" />
        </tstamp>
 
        <!– 导入ant支持包 –>
        <path id="ant.classpath">
                <fileset dir="${ant.lib.dir}">
                        <include name="*.jar" />
                </fileset>
        </path>
 
        <!– 定义目标编译结果路径 –>
        <property name="dist.home" value="./dist"></property>
        <property name="dist.home.src" value="./dist/src"></property>
        <property name="dist.home.libs" value="./dist/libs"></property>
        <property name="dist.home.bin" value="./dist/bin"></property>
 
        <!– 定义源码路径  –>
        <property name="project.home" value="./"></property>
        <property name="project.home.src" value="./src"></property>
        <property name="project.home.libs" value="./libs"></property>
 
<!–=========================================== –>
<!– 初始化                                                                         –>
<!–     清除dist目录; 将源码复制过去.                                                                          –>
<!– ============================================ –>
        <target name="init">
                <taskdef classpathref="ant.classpath" resource="flexTasks.tasks" />
                <taskdef classpathref="ant.classpath" resource="confusion.tasks" />
                <taskdef classpathref="ant.classpath" resource="net/sf/antcontrib/antlib.xml" />
 
                <echo message="Flex SDK Home: ${FLEX_HOME}" />
                <delete dir="${dist.home}" />
                <mkdir dir="${dist.home}" />
                <copy todir="${dist.home.src}">
                        <fileset dir="${project.home.src}" />
                </copy>
 
                <copy todir="${dist.home.libs}">
                        <fileset dir="${project.home.libs}" />
                </copy>
        </target>
 
<!– ================================= –>
<!– 混淆代码                                                                     –>
<!– ======================================== –>
        <target name="confusion" depends="init">
                <echo message="star confusion code…" />
                <for param="file">
                        <path>
                                <fileset dir="${dist.home.src}">
                                        <include name="**/*.as" />
                                </fileset>
                        </path>
                        <sequential>
                                <confusion filename="@{file}" />
                                <echo message="@{file} is confusioned!!" />
                        </sequential>
                </for>
        </target>
 
<!– ========================================== –>
<!– 编译Flex Library Project项目                                                                                  –>
<!– ===================================== –>
        <target name="compileFLP" depends="confusion">
                <property name="project.name" value="Comman"></property>
                <echo message="star complie Flex Library Project…" />
                <echo message="build ${dist.home.bin}/${project.name}.swc" />
 
                <compc incremental="true" debug="false" output="${dist.home.bin}/${project.name}.swc">
                        <!– 指定Comman项目的源码目录 –>
                        <source-path path-element="${dist.home.src}" />
                        <!– 指定编译的文件列表 –>
                        <include-sources dir="${dist.home.src}">
                                <include name="**/*.as" />
                        </include-sources>
                        <!– 将Flex SDK 作为外部库进行引用 –>
                        <compiler.external-library-path dir="${FLEX_HOME}/frameworks">
                                <include name="**/*.swc" />
                        </compiler.external-library-path>
                        <!– 添加项目中的SWC包,请注意这里是外部 –>
                        <compiler.external-library-path dir="${dist.home.libs}">
                                <include name="**/*.swc" />
                        </compiler.external-library-path>
                </compc>
                <!– 删除缓存文件 –>
                <delete>
                        <fileset dir="${dist.home.bin}" includes="*.cache" />
                </delete>
                <echo message="complier Flex Library Project finished!" />
        </target>
 
<!– =============================== –>
<!– 优化SWC文件                                                                     –>
<!– =========================== –>
        <target name="optimizeSWC" depends="compileFLP">
                <echo message="star optimize SWC…" />
 
                <!– 定义一个优化操作模块 –>
                <macrodef name="optimize-rsl">
                        <attribute name="rsl-dir" />
                        <attribute name="swc-path" />
                        <sequential>
                                <propertyregex property="swc-name" select="\1" regexp="bin\\(.*).swc" input="@{swc-path}" override="yes" />
                                <propertyregex property="swc-dir" select="\1" regexp="(.*)\\(.*).swc" input="@{swc-path}" override="yes" />
 
                                <!– 从SWC中解压出SWF文件 –>
                                <unzip dest="@{rsl-dir}" src="${swc-dir}/${swc-name}.swc">
                                        <patternset>
                                                <include name="library.swf" />
                                        </patternset>
                                </unzip>
                                <!– 优化SWF文件 –>
                                <java failonerror="true" fork="true" jar="${FLEX_HOME}\lib\optimizer.jar">
                                        <jvmarg line="-ea -DAS3 -DAVMPLUS -Dflexlib=${FLEX_HOME}\frameworks -Xms32m -Xmx384m -Dsun.io.useCanonCaches=false" />
                                        <arg line="’@{rsl-dir}/library.swf’ –output ‘@{rsl-dir}/${swc-name}.swf’&#13;&#10;                        –keep-as3-metadata=’Bindable,Managed,ChangeEvent,NonCommittingChangeEvent,Transient,RemoteClass’ " />
                                </java>
                                <!– 重建描述文件 –>
                                <java failonerror="true" fork="true" jar="${FLEX_HOME}/lib/digest.jar">
                                        <jvmarg line="-ea -DAS3 -DAVMPLUS -Xms32m -Xmx384m -Dsun.io.useCanonCaches=false" />
                                        <arg line="–digest.rsl-file  @{rsl-dir}/${swc-name}.swf –digest.swc-path  @{rsl-dir}/${swc-name}.swc" />
                                </java>
                                <!– 清除解压出来的文件 –>
                                <delete>
                                        <fileset dir="@{rsl-dir}" includes="*.swf" />
                                </delete>
                        </sequential>
                </macrodef>
 
                <!– 优化所有SWC文件 –>
                <for param="file">
                        <path>
                                <fileset dir="${dist.home.bin}">
                                        <include name="*.swc" />
                                </fileset>
                        </path>
                        <sequential>
                                <!– 优化SWC –>
                                <optimize-rsl swc-path="@{file}" rsl-dir="${dist.home.bin}" />
                                <echo message="optimize @{file} success~!" />
                        </sequential>
                </for>
        </target>
 
<!– =========================================== –>
<!– 编译  Flex Action Script Project 项目                                                                  –>
<!– ============================================= –>
        <target name="compileASP" depends="confusion">
                <property name="compile.name" value="AntASP"></property>
                <echo message="start compile ${dist.home.src}/${compile.name}.as" />
                <mxmlc incremental="true" output="${dist.home.bin}/${compile.name}.swf" keep-generated-actionscript="false" actionscript-file-encoding="UTF-8" file="${dist.home.src}/${compile.name}.as">
                        <load-config filename="${FLEX_HOME}/frameworks/flex-config.xml" />
                        <source-path path-element="${FLEX_HOME}/frameworks" />
                        <source-path path-element="${dist.home.src}" />
                        <compiler.library-path dir="${FLEX_HOME}/frameworks" append="true">
                                <include name="libs" />
                                <include name="../bundles/{locale}" />
                        </compiler.library-path>
                </mxmlc>
                <echo message="clear cache file." />
                <delete>
                        <fileset dir="${dist.home.bin}" includes="*.cache" />
                </delete>
                <echo message="compile ${dist.home.src}/${compile.name}.as  ===&gt;&gt;  ${dist.home.bin}/${compile.name}.swf success!" />
        </target>
<!– ============================================ –>
<!– 编译Flex Project 项目                                                                                                  –>
<!– ========================================= –>
        <target name="compileFP" depends="confusion">
                <echo message="start compile Flex Project…" />
                <for param="file">
                        <path>
                                <fileset dir="${dist.home.src}">
                                        <include name="**/*.mxml" />
                                </fileset>
                        </path>
                        <sequential>
                                <!– 通过正则表达式取出modules中的模块文件,进行批量编译~! –>
                                <propertyregex property="compile.target.name" regexp="(.*)src(.*)(mxml)" input="@{file}" override="yes" replace="\1bin\2swf" />
                                <mxmlc incremental="true" debug="false" output="${compile.target.name}" file="@{file}">
                                        <load-config filename="${FLEX_HOME}/frameworks/flex-config.xml" />
                                        <static-link-runtime-shared-libraries>false</static-link-runtime-shared-libraries>
                                        <source-path path-element="${dist.home.src}" />
 
                                        <runtime-shared-library-path path-element="${FLEX_HOME}/frameworks/libs/framework.swc">
                                                <url rsl-url="../framework_3.2.0.3958.swz" />
                                                <url rsl-url="../framework_3.2.0.3958.swf" />
                                        </runtime-shared-library-path>
 
<!– 指定外部依赖库文件,这些库文件将不会编译进目标SWF中 –>
                                        <compiler.external-library-path dir="${dist.home.libs}">
                                                <include name="**/*.swc" />
                                        </compiler.external-library-path>
 
                                </mxmlc>
                                <!– 清除缓存文件 –>
                                <delete file="${compile.target.name}.cache" />
                                <echo message="Compiled @{file} =====&gt;&gt;   ${compile.target.name}" />
                                <echo message=" " />
                        </sequential>
                </for>
 
        </target>
</project>
Posted in java | Leave a comment

How to generate SecureCRT key file from .pem file

1、cat keypair.pem>amazonec2key

2、chmod 600 amazonec2key

3、ssh-keygen -p -f amazonec2key

4、ssh-keygen -e -f amazonec2key >> amazonec2key.pub

5、use amazonec2key.pub as secuCRT’s key file. Remember put the amazonec2key in the same location.

Posted in linux | Tagged , , | Leave a comment

Widget disposed too early with eclipse – ubuntu10.04

add:
-Dorg.eclipse.swt.browser.XULRunnerPath=/usr/lib/xulrunner
to you eclipse.ini

Posted in java | Tagged , , | Leave a comment

ttf-mscorefonts-installer update error – ubuntu10.04

try:
sudo aptitude purge ttf-mscorefonts-installer ubuntu-restricted-extras

Posted in java | Tagged , | Leave a comment

Flex draw

Posted in java | 2 Comments

Go to top function with slide effect

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
35
36
37
38
39
40
41
42
43
var goto_top_type = -1;
var goto_top_itv = 0;
 
function goto_top_timer()
{
  var y = goto_top_type == 1 ? document.documentElement.scrollTop : document.body.scrollTop;
  var moveby = 15;
 
  y -= Math.ceil(y * moveby / 100);
  if (y < 0) {
    y = 0;
  }
 
  if (goto_top_type == 1) {
    document.documentElement.scrollTop = y;
  }
  else {
    document.body.scrollTop = y;
  }
 
  if (y == 0) {
    clearInterval(goto_top_itv);
    goto_top_itv = 0;
  }
}
 
function goto_top()
{
  if (goto_top_itv == 0) {
    if (document.documentElement && document.documentElement.scrollTop) {
      goto_top_type = 1;
    }
    else if (document.body && document.body.scrollTop) {
      goto_top_type = 2;
    }
    else {
      goto_top_type = 0;
    }
    if (goto_top_type > 0) {
      goto_top_itv = setInterval('goto_top_timer()', 50);
    }
  }
}
Posted in javascript | Tagged , , , | Leave a comment