煩惱歲月

          付出總是有回報的 take action follow your heart , or follow your head
          posts - 40, comments - 5, trackbacks - 0, articles - 4

          導(dǎo)航

          <2009年8月>
          2627282930311
          2345678
          9101112131415
          16171819202122
          23242526272829
          303112345

          常用鏈接

          留言簿(9)

          隨筆分類

          隨筆檔案

          文章分類

          文章檔案

          新聞檔案

          搜索

          •  

          最新評論

          閱讀排行榜

          評論排行榜

          2009年8月31日

          自動地可視化表示數(shù)據(jù)庫也可以讓您受益匪淺。實體關(guān)系圖(ERD)是實現(xiàn)數(shù)據(jù)庫可視化的最流行的圖示類型。大多數(shù)創(chuàng)建 ERD 的工具(例如,ERWinfor)都需要手動生成 ERD。雖然我將要示范的工具 SchemaSpy 無法與現(xiàn)存的一些更復(fù)雜的工具媲美,但是它能夠提供數(shù)據(jù)庫的高級 ERD 視圖 — 以及約束、關(guān)系等。而且,通過自動構(gòu)建來運行它,您就可以輕松地從您的版本控制庫中檢查數(shù)據(jù)定義語言(Data Definition Language,DDL)的最新顯示。

          Ant 腳本使用 SchemaSpy 工具來創(chuàng)建 Javadoc 格式的文件:

          結(jié)合使用 SchemaSpy、Ant 和 Javadoc

          <property name="reports.dir" value="${basedir}"/>
          <java jar="schemaSpy_3.1.1.jar"
            output="${reports.dir}/output.log"
            error="${reports.dir}/error.log"
            fork="true">
            <arg line="-t mysql"/>
            <arg line="-host localhost"/>
            <arg line="-port 3306"/>
            <arg line="-db brewery"/>
            <arg line="-u root"/>
            <arg line="-p sa"/>
            <arg line="-cp mysql-connector-java-5.0.5-bin.jar"/>
            <arg line="-o ${reports.dir}"/>
          </java>
          

           

          使用 java Ant 任務(wù)調(diào)用 SchemaSpy,傳遞了很多屬性:

          • -t 為數(shù)據(jù)庫類型(有效值為 mysqloradb2,等等。)
          • -host 為托管數(shù)據(jù)庫的計算機名。
          • -port 為數(shù)據(jù)庫 URL 的端口數(shù)。
          • -u 為數(shù)據(jù)庫用戶名。
          • -p 為數(shù)據(jù)庫密碼。
          • -cp 為類路徑(用于指示數(shù)據(jù)庫驅(qū)動程序 JAR 文件的位置)。
          • -o 為輸出目錄的位置。

          這些 SchemaSpy 的命令行屬性用于生成顯示 ERD 的 HTML 文件

          通過結(jié)合使用多種工具、作為構(gòu)建的一部分針對數(shù)據(jù)庫執(zhí)行 ERD 生成腳本,并調(diào)度 ERD 生成,您就可以在開發(fā)過程中輕松、快速地做出很多數(shù)據(jù)庫決策。

          另外,對于喜歡maven的同學(xué),SchemaSpy  也提供了plugin

          http://maven.wakaleo.com/mojo/maven-schemaspy-plugin/faq.html

          posted @ 2010-05-16 16:16 不需要解釋 閱讀(540) | 評論 (0)編輯 收藏

               參加工作也已經(jīng)5年多了,一直想回頭回想一下自己,然后動筆寫下來,一來是自己目前還可以記憶起一些事情,等自己將來老了,可以看看這些東西回憶回憶。二來也是想做一個總結(jié)。本來這個題目也可以叫做我的bmi5年,不過大家知道bmi的實在是少,而且現(xiàn)在這個公司已經(jīng)名義上不存在了。

               我是在2001年去沈陽讀書的,一直也是很喜歡沈陽的氣候和東北人的豪爽,東北爺們是真正可以拿心和你交朋友的,不過我實在不喜歡東北的飲食,覺得不細膩,另外南方還有我的女人在等我回去,要女人來東北,難度不是一般的大,所以在找工作的時候,我就下定決心一定要找南方的公司,最好廣州,深圳的,或者老家南昌的也是可以的。但是南方公司去東北招生的實在是少,除了華為,中興之外真的是少的可憐,盡管我們學(xué)校在沈陽也是數(shù)一數(shù)二的學(xué)校。

               在04年在10月份,我面試的第一家公司是東軟,沒有辦法,誰讓我們學(xué)校是東軟的最大股東尼(不知道現(xiàn)在是不是),面試的過程也還不錯,考試題也做的很順,東軟還提出我們下學(xué)期直接找一些外教來教我們?nèi)瘴模贿^當時東軟給出的薪水實在是低的可憐,只有1800元,而且還要自己負責住宿,自己當時也老大不小了,還有女人在讀書,是不是也是需要買些禮物的,而且沈陽和大連都不是我想去的地方,結(jié)果就直接沒有去報道。

               接下來的日子也就整天在校內(nèi)的招聘網(wǎng)站(白山黑水)上看帖子,看到了上海bmi的招聘廣告,一看是上海的公司,而且做的是遼寧網(wǎng)通的項目,感覺項目很大,可以學(xué)到不少東西,關(guān)鍵是上海的公司,項目做完了就可以去上海發(fā)展呢,而且當時女朋友也還在讀研究生,仔細的想想覺得這個公司還是比較適合自己,于是也開始做準備,接下來的事情都很順利,筆試,面試,當時有資格參加面試的,整個我們學(xué)校也就2個人,一個本科生,一個研究生,不過最后那個研究生也沒有過去。

               在遼寧項目的前期這段時間,估計也會我成長最快,也是最艱苦的時間,我后續(xù)的會詳細介紹到。我第一天上班就是去做release,也就是做發(fā)布和部署,在當時的項目中,我們并沒有像一些公司還有項目配置員這個角色,就是直接拉一個開發(fā)人員來負責做release,這個角色當時是在項目中最辛苦的一個,經(jīng)常是下午6點開始,然后編譯3-4個小時,到10點才可以編譯完成(比較順利的情況下),如果遇到編譯不過去的時候,還需要聯(lián)系開發(fā)人員進行修改,編譯之后在對照check list進行增量部署。

              在第一天上班,我就從上午10點過去,第2天凌晨3點半才下班,到4點才到學(xué)校宿舍睡覺,后續(xù)的1個月都是如此,現(xiàn)在回想起來,感覺當時真的是很辛苦,不過那段時間也開始熟習(xí)了不少東西,知道了基于模塊開發(fā),對ant,weblogic,oracle,plsql,linux,aix等的使用也開始非常熟習(xí)了。在這段時間里也開始熟習(xí)了公司的項目情況,開發(fā)人員,測試人員。

          posted @ 2010-05-04 00:06 不需要解釋 閱讀(306) | 評論 (0)編輯 收藏

              最近在看一些項目的代碼,總是發(fā)現(xiàn)很少項目提供出uml圖,或者就是提供uml圖的也有可能并沒有和代碼對應(yīng)上,如果有正確的uml圖,可以非常方便的為大家更好的理解代碼層次邏輯。其實我們可以使用使用UMLGraph來生成uml圖,直接使用java代碼來生成UMLGraph。對于大部分項目來說,我們一般使用maven和ant(還在使用ant,你out了)來作為項目的編譯工具。

              在maven中,我們可以在pom.xml增加:

              <reporting>
                  <plugins>
                  <plugin>
                  <groupId>org.apache.maven.plugins</groupId>
                  <artifactId>maven-javadoc-plugin</artifactId>
                  <version>2.6.1</version>
                  <configuration>
                    <doclet>org.umlgraph.doclet.UmlGraphDoc</doclet>
                    <!-- <docletPath>/path/to/UmlGraph.jar</docletPath> -->
                    <docletArtifact>
                      <groupId>org.umlgraph</groupId>
                      <artifactId>doclet</artifactId>
                      <version>5.1</version>
                    </docletArtifact>
                    <additionalparam>-views</additionalparam>
                    <useStandardDocletOptions>true</useStandardDocletOptions>
                  </configuration>
                  </plugin>
                  </plugins>
              </reporting>

          使用javadoc:aggregate 就可以生成出整個項目按照package的uml圖了。

          如果是使用ant,在build.xml中增加target

             <target name="genuml">
                  <property name="uml.dir" value="${basedir}/uml"/>
                  <property name="src.uml.dir" value="${src.dir}/uml"/>
                  <mkdir dir="${uml.dir}"/>
                  <path id="uml.source.path">
                     <pathelement path="${src.uml.dir}/"/>
                     <pathelement path="${src.java.dir}"/>
                  </path>
                  <javadoc sourcepathref="uml.source.path" packagenames="*" package="true">
                     <doclet name="org.umlgraph.doclet.UmlGraph" path="${basedir}/lib/UmlGraph.jar">
                         <param name="-d" value="${uml.dir}"/>
                     </doclet>
                  </javadoc>
                  <apply executable="dot" dest="${uml.dir}" parallel="false">
                      <arg value="-Tpng"/>
                      <arg value="-o"/>
                      <targetfile/>
                      <srcfile/>
                      <fileset dir="${uml.dir}" includes="*.dot"/>
                      <mapper type="glob" from="*.dot" to="*.png"/>
                  </apply>
              </target>

          注意:要正常使用 UMLGraph,您必須先安裝 Graphviz 工具,請自己google相關(guān)信息。

          posted @ 2010-04-19 23:59 不需要解釋 閱讀(1889) | 評論 (0)編輯 收藏

                 盡管工作了5年多了,現(xiàn)在能想起來的培訓(xùn)真的是少之又少,但是我想以后,我一定不會這樣說了,因為我參加了百支了!

                 百支對于我來說是一次清洗,洗掉以前的惡習(xí),洗掉以前的老思維,重新培養(yǎng)我丟掉已久的價值觀,重新找回往日的激情。來阿里之后,也一直在想一個問題,阿里和我以前公司有什么不同?或者說有什么特別的之處?其實這個問題有很簡單,就是阿里是一家有夢想的公司,一家有價值觀的公司,一家有親情,友情的公司,一家工作生活一體的公司,從中國來看,阿里是唯一一家大的公司,而且價值體系貫徹的這么好的公司,only one in china。

                百支培訓(xùn)了很多業(yè)務(wù)知識,傳統(tǒng)線,虛擬線,兄弟線,安全線,資金線,…學(xué)到了很多東西。

                百支的培訓(xùn),讓我開始結(jié)識了新的同學(xué),新的家人,新的伙伴,讓我們happly every day! 認真工作,快樂生活!

          posted @ 2010-04-16 21:48 不需要解釋 閱讀(420) | 評論 (0)編輯 收藏

             隨著網(wǎng)絡(luò)技術(shù)的發(fā)展,很多惡意程序往往按照常規(guī)方法無法徹底刪除。有沒有什么方法能夠在不安裝任何第三方工具的情況下,刪除它們呢?筆者經(jīng)過多年實踐,告訴大家一個秘密武器--關(guān)閉Explorer進程法。

            在服務(wù)器系統(tǒng)出現(xiàn)問題時,例如某個文件無法刪除,某個程序假死或者是系統(tǒng)沒有響應(yīng)都可以按CTRL+SHIFT+ESC,調(diào)出Windows任務(wù)管理器。接下來找到“進程”標簽,將“explorer.exe”進程關(guān)閉。接下來整個桌面就會消失,只剩下桌布了。然后通過Windows任務(wù)管理器的“文件”菜單下的“新建任務(wù)(運行)”打開“創(chuàng)建新任務(wù)”窗口,通過“瀏覽”按鈕找到要刪除文件所在目錄,在瀏覽窗口里直接刪除即可。99%都可以將這個頑固的文件刪除,刪除后繼續(xù)選擇“文件”菜單下的“新建任務(wù)(運行)”打開“創(chuàng)建新任務(wù)”窗口,在打開處輸入命令--explorer后回車,我們將返回到正常的桌面界面下。顯然,對付頑固文件,這個方法尤為簡單。

          posted @ 2009-11-10 16:19 不需要解釋 閱讀(236) | 評論 (0)編輯 收藏

              1、專注于構(gòu)建一個強有力的團隊,這一團隊能夠解決困難的問題,并為客戶創(chuàng)造真正的價值。
            2、領(lǐng)導(dǎo)者鼓舞;管理者授權(quán)。要同時成為優(yōu)秀的領(lǐng)導(dǎo)者和管理者,你需要就愿景進行溝通并理解其細節(jié)。
            3、對可能出現(xiàn)的障礙有所準備,防微杜漸,在這些障礙尚未壯大時就清除它們。
            4、花時間來仔細傾聽別人的意見,但不要過于擔心其他人的想法。
            5、專注于事實。
            6、充當一個衰減器,而不是放大器,為團隊提供穩(wěn)定性。
            7、永遠不要將不能解釋的事情歸咎為蓄意破壞。
            8、培養(yǎng)幽默意識來作為嚴肅認真的一種平衡:對工作一絲不茍,對自己輕松自如。
            9、除了工作,還應(yīng)該懂得享受生活,而且每年要讀25本書。
            10、相信你的直覺:如果你感覺不妙,那么很可能預(yù)感就會成真。

          posted @ 2009-11-08 03:10 不需要解釋 閱讀(234) | 評論 (0)編輯 收藏

          Productize software

          When talking about the productized software, people often think of Microsoft Office and Microsoft XP. Of course the Microsoft product series is very successful. They can provide excellent GUI, and good user experience.

          In China, there is a different picture for software products. Let me take Chinese software development companies for example. Most of the companies in China work on some projects, instead of specific products, When a company starts a new project, they need to invest lots of developers and money into the project. Sometimes, they also need to send a number of technicians to the customer site to do the development. In my opinion, there are two reasons.

          (1) The software is not very satisfactory enough to be a perfect product.

          (2) Chinese customers have lots of special requirements.

          Customer is GOD. We can not change the ideas of customer most of time. So, we need to improve our product. Then how to evaluate a software product's success? Because of various concerns, different users hold different opinions and will arrive at different conclusions.

          As for redevelopment and customization, the following should be more concerned:

          (1) Software scaffolding

          If the product provides scaffolding, the redevelopment people will quickly generate code (from database, UML, etc….). As we know, the Spring, Hibernate also provide some scaffolding.

          (2) Easy installation package

          Most of time, the installation gives the first impression to the customer. So it is very important.

          A simple installation must ensure everyone, even someone not very familiar with the application, can install the software.

          The installation log file also plays significant role. Sometimes, it’s possible for the customer’s environment to have some problem so that the installation runs unsuccessfully. In this situation, the customer can send the log file to the technicians for analysis.

          People who do not know about your product also can install easily according to wizard.

          (3) Lots of Examples

          The examples are the best teacher. Why most of java developer favor apache ant? The reason is that apache ant can provide lots of examples; you can find any task example in apache ant web site.

          Example not only provides assistance to the development but also the product redevelopment If your product provides lost of examples, the questions from customers will be reduced substantially.

          (4) Online documentation

          If the developer can find some on-line document, he will not worry about that the document in his hands is an old version. And of course, the product developer also can work more effectively. For example, if the document has some error, or need to be modified, he can fix it quickly.

          (5) Very good support

          If the customer has some problem when he use or customize, he can get easily the support.

          As for end-users, the following is very important.

          (1) Friendly GUI, operator easily

          (2) Collection client information online active, when some error happen.

          (3) Auto-update to new version.

          For customer, he does not need install some patch.

          (4) In a conspicuous place clearly marked version of the software, and contact method

          As for a kernel developer, he might think we need to provide:

          (1) OSGI framework or plug-in framework to facilitate the expansion

          (2) Standard software delivery process

          (3) Software quality control

          (4) A very good suite of documents.

          posted @ 2009-11-02 11:26 不需要解釋 閱讀(311) | 評論 (0)編輯 收藏

          Repositories are remote collections of projects from which Maven uses to populate the local repository of the build system. It is from this local repository that Maven calls it plugins and dependencies. Different remote repositories may contain different projects, and under the active profile they may be searched for a matching release or snapshot artifact.

          Example A.8. Repository Configuration in settings.xml

          <settings xmlns="http://maven.apache.org/POM/4.0.0"
            xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
            xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 
                                http://maven.apache.org/xsd/settings-1.0.0.xsd">
            ...
            <profiles>
              <profile>
                ...
                <repositories>
                  <repository>
                    <id>codehausSnapshots</id>
                    <name>Codehaus Snapshots</name>
                    <releases>
                      <enabled>false</enabled>
                      <updatePolicy>always</updatePolicy>
                      <checksumPolicy>warn</checksumPolicy>
                    </releases>
                    <snapshots>
                      <enabled>true</enabled>
                      <updatePolicy>never</updatePolicy>
                      <checksumPolicy>fail</checksumPolicy>
                    </snapshots>
                    <url>http://snapshots.maven.codehaus.org/maven2</url>
                    <layout>default</layout>
                  </repository>
                </repositories>
                <pluginRepositories>
                  ...
                </pluginRepositories>
                ...
              </profile>
            </profiles>
            ...
          </settings>
          
          releases, snapshots

          These are the policies for each type of artifact, Release or snapshot. With these two sets, a POM has the power to alter the policies for each type independent of the other within a single repository. For example, one may decide to enable only snapshot downloads, possibly for development purposes.

          enabled

          true or false for whether this repository is enabled for the respective type (releases or snapshots).

          updatePolicy

          This element specifies how often updates should attempt to occur. Maven will compare the local POMs timestamp to the remote. The choices are: always, daily (default), interval:X (where X is an integer in minutes) or never.

          checksumPolicy

          When Maven deploys files to the repository, it also deploys corresponding checksum files. Your options are to ignore, fail, or warn on missing or incorrect checksums.

          layout

          In the above description of repositories, it was mentioned that they all follow a common layout. This is mostly correct. Maven 2 has a default layout for its repositories; however, Maven 1.x had a different layout. Use this element to specify which if it is default or legacy. If you are upgrading from Maven 1 to Maven 2, and you want to use the same repository which was used in your Maven 1 build, list the layout as legacy

          posted @ 2009-11-02 11:25 不需要解釋 閱讀(2011) | 評論 (0)編輯 收藏

          there are lots tools about the java obfuscate. I know two.

          (1)proguard

          (2)yguard

          the proguard support ant, maven. I use maven as the project and build tools. so I want use the maven proguard plugin, but It is not easy to use. so I use yguard.

          in your pom.xml, you can  add:

              <plugin>
                      <groupId>net.sf.mgp</groupId>
                      <artifactId>maven-unclasses-plugin</artifactId>
                      <version>0.0.2</version>
                  </plugin>
                  <plugin>
            <artifactId>maven-antrun-plugin</artifactId>
            <dependencies>
              <dependency>
                <groupId>yguard</groupId>
                <artifactId>yguard</artifactId>
                <version>2.3.0</version>
                <scope>system</scope>
                <systemPath>lib/yguard.jar</systemPath>
              </dependency>
            </dependencies>
            <executions>
              <execution>
                <phase>package</phase>
                <configuration>
                  <tasks>
                    <property refid="maven.compile.classpath"
                      name="mvn.classpath"></property>
                    <!-- <echo message="Using Maven Classpath: ${mvn.classpath}" /> -->
                    <taskdef name="yguard"
                      classname="com.yworks.yguard.YGuardTask"/>
                    <yguard>
                      <!-- Input file and output file is the same. -->
                      <inoutpair
                        in="${project.build.directory}/${project.build.finalName}.${project.packaging}"
                        out="${project.build.directory}/${project.build.finalName}.jar"/>
                      <!-- Obfuscate classes plus string references. -->
                      <rename
                        logfile="${project.build.directory}/yguard.log.xml"
                        replaceClassNameStrings="true">
                        <!-- Keep the only class to be used for easy running and its public method main(). -->
                        <keep>
                            <class classes="public" methods="public">
                            <patternset>
                              <include name=”xx.xxx.xxx.util.ConnectionUtil"/>
                            </patternset>
                          </class>
                        </keep>
                      </rename>
                      <!-- There are some external libraries used - Maven knows details. -->
                      <externalclasses>
                        <pathelement path="${mvn.classpath}"/>
                      </externalclasses>
                    </yguard>
                  </tasks>
                </configuration>
                <goals>
                  <goal>run</goal>
                </goals>
              </execution>
            </executions>
          </plugin>


          It is very cool!!!.

          posted @ 2009-10-19 00:50 不需要解釋 閱讀(778) | 評論 (0)編輯 收藏

          有個大師說過一句話,有人的地方就有江湖,有江湖的地方就有斗爭。今天在java eys就看到了一場Resourcebundle引起的口角,集體見:

          http://www.javaeye.com/topic/6417?page=1.

          這個問題在jdk1.6已經(jīng)不存在

          clearCache
          public static final void clearCache()
          Removes all resource bundles from the cache that have been loaded using the caller's class loader.
          Since:
          1.6
          See Also:
          ResourceBundle.Control.getTimeToLive(String,Locale)

          clearCache
          public static final void clearCache(ClassLoader loader)
          Removes all resource bundles from the cache that have been loaded using the given class loader.
          Parameters:
          loader - the class loader
          Throws:
          NullPointerException - if loader is null
          Since:
          1.6
          See Also:
          ResourceBundle.Control.getTimeToLive(String,Locale)

           

          在1.5,1.4怎么辦呢:

             Class klass = ResourceBundle.getBundle("your.Bundle").getClass().getSuperclass();
             Field field = klass.getDeclaredField("cacheList");
             field.setAccessible(true);
             sun.misc.SoftCache cache = (sun.misc.SoftCache)field.get(null);
             cache.clear();
             field.setAccessible(false);

          這樣就可以清楚cache.

          posted @ 2009-10-17 17:23 不需要解釋 閱讀(350) | 評論 (0)編輯 收藏

          Build in properties
          • ${basedir} represents the directory containing pom.xml
          • ${version} equivalent to ${project.version} or ${pom.version}
          Pom/Project properties

          All elements in the pom.xml, can be referenced with the project. prefix or using pom. as prefix. This list is just an example of some commonly used elements.

          • ${project.build.directory} results in the path to your "target" dir, this is the same as ${pom.project.build.directory}
          • ${project.build.outputDirectory} results in the path to your "target/classes" dir
          • ${project.name} or ${pom.name} refers to the name of the project.
          • ${project.version} or ${pom.version} refers to the version of the project.
          • ${project.build.finalName} refers to the final name of the file created when the built project is packaged
          Local user settings

          Similarly, values in the user's settings.xml can be referenced using property names with settings. prefix.

          • ${settings.localRepository} refers to the path of the user's local repository.
          • ${maven.repo.local} also works for backward compatibility with maven1 ??
          Environment variables

          Environment variables can be referenced using the env prefix

          • ${env.M2_HOME} returns the Maven2 installation path.
          • ${java.home} specifies the path to the current JRE_HOME environment use with relative paths to get for example:
            <jvm>${java.home}../bin/java.exe</jvm>
            Java system properties

          All Java System Properties defined by the JVM.

          Custom properties in the POM

          User defined properties in the pom.xml.

          <project>
          ...
            <properties>
               <my.filter.value>hello</my.filter.value>
            </properties>
          ...
          </project>
          
          • ${my.filter.value} will result in hello if you inserted the above XML fragment in your pom.xml
          Parent Project variables

          How can parent project variables be accessed?

          You can use the prefix: ${parent.project}.

          For example, use ${parent.project.version} to retrieve parent version.

          A good way to determine possible variables is to have a look directly at the API. The above example was not working for me, maybe it was working that way with older releases of maven. I'm currently using Maven 2.2.1, and to access the Parent you can use ${project.parent}. This will return an org.apache.maven.project.MavenProject instance.

          Reflection Properties

          The pattern ${someX.someY.someZ} can simply sometimes mean getSomeX().getSomeY().getSomeZ(). Thus, properties such as ${project.build.directory} is translated to getProject().getBuild().getDirectory().

          posted @ 2009-10-11 23:01 不需要解釋 閱讀(1430) | 評論 (0)編輯 收藏

          今天是偉大的甘地的生日,剛好在印度出差也就享受了一天假期,不過如果我在國內(nèi)的話今天也是不上班了,因為今天是偉大祖國生日的第2天。

          今天繼續(xù)在搞weblogic和jetty的調(diào)試,發(fā)現(xiàn)一個問題,weblogic會對response中的內(nèi)容trim,jetty不會。估計是ebos中有一段代碼在response的out里面寫了一些空白進去,導(dǎo)致這個內(nèi)容到client端的時候就會解析不對。obj.responseXML會是空。

          另外,F(xiàn)iddler是監(jiān)控網(wǎng)絡(luò)連接的,一般的話它會監(jiān)控有線的那個,我在酒店是使用無線上網(wǎng),所以一開始找不到原因還以為是fiddler不支持無線方式的監(jiān)控,查看了一下配置才發(fā)現(xiàn)問題。

          最后實在沒有辦法直接寫死,好在我做的只是一個開發(fā)輔助工具,不需要考慮性能影響:

          var xmlData = obj.responseText.trim();
          //alert(xmlData);
          obj.responseXML.loadXML(xmlData);

          明天繼續(xù)完善程序,爭取在這個假期完成之前能完成大體,后續(xù)文檔補充。也算是功德一件了。

          posted @ 2009-10-03 03:31 不需要解釋 閱讀(258) | 評論 (0)編輯 收藏

               出國有很多好處也有很多壞處,這里就說一處好處,就是可以為自己的歷史課好好的補一補了。歷史以成敗論英雄,當權(quán)者一般都會去篡改歷史的,不過在長久看來,大家都不過是歷史的一粒沙塵,是無法改變歷史的,人只能創(chuàng)造歷史,無法修改歷史。在中國內(nèi)地的當代史就是一部篡改的歷史,所以這次出國就好好的補了補,在國外很多網(wǎng)站都可以訪問,使用google可以查任何你想要查的東西,不會過濾掉一些關(guān)鍵的信息。

                下面我就來說說我對近代一些人物的再認識吧:

               先說蔣先生,其實這個人的功勞應(yīng)該是很大的,我個人覺得比先祖的功勞要大,畢竟統(tǒng)一了中國,而且在臺灣也實現(xiàn)了一定程度的民主。尤其的是在8年抗戰(zhàn)的歷史上更是不能抹去的功績,歷史應(yīng)該給蔣先生一個公道。

               張學(xué)良,這個人的愛國程度超出我原來的影響,以前的歷史書上也是說張學(xué)良是千古功臣,但是說的很含糊,尤其是在D的豐功偉績下顯得不是偉大,張學(xué)良這個人不僅僅是愛國,而且這個人的心胸非常的大,他讓蔣先生關(guān)了后半輩子,看采訪他的是很,他也只是一笑而過,當然這個或者是他后來是基督教有關(guān)。

               蔣夫人,不愧是中國的第一夫人,如果有人問我中國的第一夫人是誰?很茫然,是胡夫人嗎?她做了一些啥?看看人家蔣夫人在抗戰(zhàn)時候做的事情,抗戰(zhàn)后方支援,美國國會演講,國際場合的外交,真的不愧是第一夫人,不過對這個,我了當代歷史說的就更加的少了。

              毛太祖,看他在建國后的人大會議上,儼然就是一個皇帝,雖然他本人非常的親民,而且一直也是愛民如子,不過他錯過了歷史給他的機會,如果他能學(xué)一下華盛頓,為中國留下一個比較完善的制度,我看今天的中國應(yīng)該會更加富強了。非常可惜,強人政治的時候沒有推進民主,在后強人政治就只是剩下了利益斗爭了。

              周公,周公年輕的時候非常有才華,非常懂得協(xié)調(diào)各方的關(guān)系,不過可能是太陶醉在協(xié)調(diào)者的角色上面,導(dǎo)致后期嚴重的邊緣化,他參加革命不必太祖晚,而且有很長一段時間地位還比毛祖高。后來的邊緣化導(dǎo)致不得不為了自保,手舉紅皮書,高喊毛主席萬歲來自保,甚至自己的養(yǎng)女,自己的第一任女朋友都眼睜睜的看著他們迫害致死,其下場可想而知。

              今天看一段網(wǎng)上錄像,說小平同志還跟過馮玉祥。歷史課本上貌似沒有這個。

          posted @ 2009-09-27 02:08 不需要解釋 閱讀(550) | 評論 (0)編輯 收藏

               大概在4年前,我還在沈陽做遼寧網(wǎng)通的boss項目,那個時候系統(tǒng)剛剛上線,問題成堆,尤其是一些單子由于程序或者是數(shù)據(jù)問題,出現(xiàn)異常,出現(xiàn)異常就必須去更正數(shù)據(jù),讓單子繼續(xù)走下去。那個時候公司有個強人,使用Python來做這個事情,說白了也是比較簡單,就是使用Python調(diào)用server端得ejb,修改數(shù)據(jù)然后提交到server上去。不過在那個時候懂一門動態(tài)語言在我看來非常的不簡單。

                goon,最近閑的無事,把同事的一個程序拿過來修改了一下,大概也是實現(xiàn)了這樣的一個邏輯,不過沒有使用Python,or Jython,使用的是java 程序員都很熟悉的Beanshell 語言來寫,并添加上了SWT,作為ui。這樣對公司大部分人就沒有什么難度了,直接可以寫java代碼,而且沒有Jython那樣格式的嚴格要求(很煩人)。

              先上一下圖:

          image

          結(jié)果后臺配置,就可以直接修改,查看server上的數(shù)據(jù),如果有問題的單子還可以通過這個來修改,非常cool。

          怎么做到這點呢:

          (1)通過java調(diào)用beanshell的方法,init 一個init.bsh, 在這個bsh里面寫上你自己的邏輯,比如lookup ejb,寫好一些方法,這樣使用者就直接可以調(diào)用了。

          (2)把一些服務(wù)器的配置寫到配置文件里面去。

          如果修擴展,也很簡單,直接修改一下配置文件,添加一些jar 并在init.bsh里面添加自己的邏輯就可以了。

          posted @ 2009-09-23 23:42 不需要解釋 閱讀(372) | 評論 (0)編輯 收藏

              昨天晚上就抵達了india的hyderabad,一個發(fā)展中的城市,在這個城市你可以看到90年代在珠三角的樣子,所以至少來講,india還是落后中國20年,當然我們中國也是和諧的比較厲害,這個我們還是需要承認的。

             到酒店一看,才知道原來這樣的地方也敢叫hotel,真是人有多大膽地就有多大產(chǎn)!不服不行啊。從公路上來看india的話,小車和bus比較多,當然更多的是那個三輪摩托他們叫auto,想多的多,而且有一些還是2個人開,非常好奇的是難道一個車還要2個人合伙?更奇怪的是india的bus的門貌似都不關(guān),不管是school bus還是company bus,都一樣不關(guān)門,開的飛快。也不知道他們的車做門做啥。可惜的是,這次出來沒有帶照相機,要不照照給大家看看。

             吉隆坡還是一個非常漂亮的city,如果坐飛機去這個城市的話,晚上到,飛機回經(jīng)過kul的上空,你可以看這個city的全景,可以看雙子塔,當然和上海市沒有的比。

             早上睡不著覺,就很早起來了,通過老板娘專線和老板娘通了電話叫車,就下樓等車去了,經(jīng)過一下樓就發(fā)現(xiàn)一個出租車往外面跑,叫也叫不住。(這個hotel沒有前臺,我也搞不清楚老板娘在那個地方,只能通過電話call she)。沒有辦法就在外面等,經(jīng)過等了1 hours才等到一個車,可憐吧,呵呵。在等的過程中我就在研究india的馬路上的車,大部分小車都比較低端,貌似那款鈴木(仿mini的)那款在這個城市還比較多。高端車就沒有看到,唯一比較高端的是在那個hotel一樓停車場的豐田的私欲。 說起hotel的一樓,india人的思維也比較奇詭,我們那邊的1樓都用來做商品(靠近馬路),這邊直接就做車庫,估計是不愿意搞地下車庫。

              office還是不錯,非常的大,而且有tea room,非常的不錯。中午去了一趟office的食堂,中午食堂:2個咖喱搞的湯(a little),一個雞蛋,還有一些油炸食品。吃不下,同事介紹說附近有一個shanghai chef,打個auto跑過去(taxi就打不到)才發(fā)現(xiàn),全是假冒的,一點也不是Chinese food。

              出差india,苦啊!

          posted @ 2009-08-31 20:11 不需要解釋 閱讀(244) | 評論 (0)編輯 收藏

          我實話告訴你們,我可是身經(jīng)百戰(zhàn)了.bbs我見的多了,哪個版我沒灌過?你們要知道, 一塌糊 涂的triangle,PIC,SEX版,那比你們不知道厲害到哪里去了,我在那談笑風(fēng)聲.你 們有一好就是無論在哪個版,什么話題都灌,但是灌來灌去的問題,都too simple, sometimes naive!你 們懂不懂呀?啊?所以說灌水啊,關(guān)鍵是要提高自己的知識水平.你 們啊,不要總想著弄個大坑,然后灌上十大,再把我羞辱一番……你們啊,naive!你們這 樣灌是不行地!~那你問我支持 不支持灌水,我說支持,我常來這裡灌,你說支持不支持?
          主站蜘蛛池模板: 习水县| 兴山县| 海门市| 新宾| 杭锦后旗| 电白县| 项城市| 云和县| 余江县| 仁化县| 广汉市| 景谷| 常宁市| 哈密市| 青阳县| 剑河县| 灵寿县| 泰顺县| 辉县市| 平顶山市| 霍州市| 洪洞县| 怀安县| 陵水| 望谟县| 达日县| 昭通市| 蓬莱市| 东乌珠穆沁旗| 会理县| 平乐县| 克什克腾旗| 龙南县| 侯马市| 大悟县| 伊金霍洛旗| 通海县| 乳源| 新巴尔虎左旗| 杭锦旗| 宁德市|