紫風(fēng)亂寫

          除了他眼前的屏幕,這個人什么也沒看見。
          被周圍的電腦簇?fù)碇恢浪鶆?chuàng)造的現(xiàn)實,但又意識到那是虛幻。
          他已經(jīng)超越了技術(shù)。也超越了機(jī)器。
          posts - 62, comments - 93, trackbacks - 0, articles - 0
            BlogJava :: 首頁 :: 新隨筆 :: 聯(lián)系 :: 聚合  :: 管理

          2010年7月22日

          有這么一種神器,英文叫做reference card, 中文我不知道叫什么,就作用來說,可以叫做快捷鍵一頁紙,可以打印出來,放在案頭,然后可以隨時查閱。百度不容易找到,用谷歌的話可以使用reference card作為關(guān)鍵字查找。

          下面是幾個例子
          Eclipse 4.6: https://github.com/pellaton/eclipse-cheatsheet/raw/master/eclipse4.6/eclipse-shortcuts-4.6.0.pdf
          Intellij IDEA: https://resources.jetbrains.com/assets/products/intellij-idea/IntelliJIDEA_ReferenceCard.pdf
          Emacs: https://www.gnu.org/software/emacs/refcards/pdf/refcard.pdf
          Org-Mode: https://www.gnu.org/software/emacs/refcards/pdf/orgcard.pdf

          posted @ 2016-06-05 14:08 Justfly Shi 閱讀(530) | 評論 (0)編輯 收藏

               摘要: Emacs Tutorial中提到的快捷鍵以及自己找的一些快捷鍵  閱讀全文

          posted @ 2016-06-02 02:16 Justfly Shi 閱讀(345) | 評論 (0)編輯 收藏

          修改內(nèi)容:

          posted @ 2015-12-05 21:28 Justfly Shi 閱讀(1958) | 評論 (0)編輯 收藏


          修改內(nèi)容:

          • 添加BeanQuery.nested()方法,調(diào)用該方法后,具有同樣前綴的屬性或者別名會被放到一個Map中返回,詳情請看Allow format result into a map
          • BeanQuery.selectBean方法標(biāo)為@deprecated,并添加同一樣功能的方法,命名為BeanQuery.select

          posted @ 2015-12-05 20:48 Justfly Shi 閱讀(2840) | 評論 (0)編輯 收藏

               摘要: 在我看來,干活有兩種方式:

          1. 沒想清楚了,貿(mào)貿(mào)然開干,然后各處救火各種解決問題
          2. 想清楚了再開干,無驚無險,安然做完

          本文講講如何在設(shè)計中系統(tǒng)的思考以避免內(nèi)存溢出,并給出一個例子講解。  閱讀全文

          posted @ 2015-06-08 19:13 Justfly Shi 閱讀(3977) | 評論 (4)編輯 收藏

          5月初的時候,我發(fā)了一個帖子說要開始講單元測試,但是20多天過去了,為什么沒有更新呢?
          原因就是我在做視頻公開課,發(fā)現(xiàn)光文字表現(xiàn)的話比較費勁,所以我決定錄制視頻,做成公開課。

          第一個錄制的是JUnit技術(shù),課程地址:http://edu.csdn.net/course/detail/908 歡迎大家觀后留言探討哦。

          posted @ 2015-05-26 22:25 Justfly Shi 閱讀(1635) | 評論 (4)編輯 收藏

               摘要: 從04年開始,我就開始在項目實踐中使用單元測試。十幾年來,參與的項目基本上都或多或少的使用了單元測試,多的能有100%覆蓋率的要求,少的也要覆蓋主要代碼,發(fā)現(xiàn)這個實踐在提高軟件質(zhì)量和開發(fā)速度上還是很有好處的。在和朋友同事的交流中,發(fā)現(xiàn)有很多項目沒有使用單元測試,也有很多程序員不會寫單元測試,但是大家對這個都很有興趣。所以我想把自己掌握的關(guān)于單元測試的技能(架構(gòu)、設(shè)計和技術(shù))和實施策略分享一下。  閱讀全文

          posted @ 2015-05-05 00:33 Justfly Shi 閱讀(6046) | 評論 (4)編輯 收藏

          代碼地址:https://github.com/Jimmy-Shi/bean-query/tree/bean-query-1.1.1

          修改內(nèi)容:
          • 簡化用戶自定義轉(zhuǎn)換
          例子:
          List<String> bookNames=select(new DefaultSelector<String>() {
                @Override
                public String select(Object item) {
                  return ((Book)item).getName();
                }
              }).executeFrom(bookCollection);

          在Maven項目中引用:
          <dependency>
            <groupId>cn.jimmyshi</groupId>
            <artifactId>bean-query</artifactId>
            <version>1.1.1</version>
          </dependency>

          posted @ 2014-11-23 00:02 Justfly Shi 閱讀(1247) | 評論 (2)編輯 收藏

          Bean Query是一個開源的Java工具包,它復(fù)用Apache Commons BeanUtilsApache Commons CollectionsJava Hamcrest 來簡化對Bean(集合)的排序,過濾和轉(zhuǎn)換。

          項目地址:

          https://github.com/Jimmy-Shi/bean-query

          http://git.oschina.net/jimmyshi/bean-query

          修改內(nèi)容:

          • 支持用戶自定義排序
          • 支持用戶自定義轉(zhuǎn)換
          • 支持對一個對象進(jìn)行轉(zhuǎn)換和過濾
          • 提供了完整的使用說明文檔

          在Maven項目中引用:

          <dependency>
            <groupId>cn.jimmyshi</groupId>
            <artifactId>bean-query</artifactId>
            <version>1.1.0</version>
          </dependency>

          posted @ 2014-11-21 22:58 Justfly Shi 閱讀(8437) | 評論 (2)編輯 收藏

          修改內(nèi)容:
          在Maven項目中引用
          <dependency>
            <groupId>cn.jimmyshi</groupId>
            <artifactId>bean-query</artifactId>
            <version>1.0.1</version>
          </dependency>

          posted @ 2014-11-03 21:56 Justfly Shi 閱讀(5554) | 評論 (3)編輯 收藏

          BeanQuery 是一個把對象轉(zhuǎn)換為Map的Java工具庫。支持選擇Bean中的一些屬性,對結(jié)果進(jìn)行排序和按照條件查詢。不僅僅可以作用于頂層對象,也可以作用于子對象。更多詳細(xì)的介紹可以看我的博文: http://www.aygfsteel.com/justfly/archive/2014/10/26/419067.html

          我剛剛發(fā)布了版本1.0.0. 現(xiàn)在已經(jīng)在Sonatype OSS庫上了,2個小時后將會被同步到Maven中央庫上。

          Sonatype OSS 庫下載地址: https://oss.sonatype.org/content/groups/public/cn/jimmyshi/bean-query/1.0.0/

          Github上的代碼: https://github.com/Jimmy-Shi/bean-query/tree/bean-query-1.0.0

          在Maven項目中引用

          <dependency>
            <groupId>cn.jimmyshi</groupId>
            <artifactId>bean-query</artifactId>
            <version>1.0.0</version>
          </dependency>

          posted @ 2014-10-29 02:24 Justfly Shi 閱讀(4466) | 評論 (0)編輯 收藏

               摘要: BeanQuery 是一個把對象轉(zhuǎn)換為Map的Java工具庫。支持選擇Bean中的一些屬性,對結(jié)果進(jìn)行排序和按照條件查詢。不僅僅可以作用于頂層對象,也可以作用于子對象。

          BeanQuery的使用非常簡單也很直接  閱讀全文

          posted @ 2014-10-26 23:33 Justfly Shi 閱讀(5511) | 評論 (6)編輯 收藏

               摘要: 作為一個程序員,我們的日常工作之一就是看Log,從Log中發(fā)現(xiàn)自己所需要的信息,以及對Log做一些簡單的分析和統(tǒng)計。本文分享了我所使用的工具和方法。  閱讀全文

          posted @ 2014-09-17 23:00 Justfly Shi 閱讀(2803) | 評論 (6)編輯 收藏

               摘要: 本文介紹了在代碼中應(yīng)該在什么時候需要Log什么信息;使用何種級別的Log;如何Log異常信息;Log中的一些要點。另外也分析了靜態(tài)Logger變量和對象Logger變量的優(yōu)劣。  閱讀全文

          posted @ 2014-08-13 23:32 Justfly Shi 閱讀(25942) | 評論 (7)編輯 收藏

               摘要: 作為《Java程序員修煉之道》博文的第一個主題Logging,我計劃中按照如下三篇來寫: 1. Logback的簡單介紹和配置 2. 在Java代碼中如何使用SLF4J來寫日志以及寫日志的要點 3. 作為一個程序員,在日常工作中如何分析和挖掘Log。 這個是第一篇,簡單介紹一下Logback的配置,適用于開始配置和開始入門,適用于一般情況下的使用。  閱讀全文

          posted @ 2014-08-10 02:46 Justfly Shi 閱讀(19798) | 評論 (1)編輯 收藏

               摘要: 后來我意識到,我不能只抱怨,作為一個寫了10多年代碼,帶過項目、做過業(yè)務(wù)最終還是寫代碼, 有車有房有妻有娃的四有不太牛逼的程序員,我有責(zé)任幫助剛?cè)胄械摹⑷胄袝r間不短的,還沒車沒房的Java程序員們掌握一些基礎(chǔ)的東西。
          如果你掌握了這些基礎(chǔ)的東西的話,而且英語口語還湊合的話,歡迎來找我?guī)湍銉?nèi)部推薦工作,估計一萬多的月薪是不成問題的,至于30、40萬的年薪應(yīng)該也是有機(jī)會的。  閱讀全文

          posted @ 2014-08-03 01:18 Justfly Shi 閱讀(5176) | 評論 (13)編輯 收藏

          Sorry every body, I am so busy that I can not finish this article on time. I will try to finish this article after I have got a job. You can compare the 2 xml files in the attached zip file to get some idea.

          There are 2 files in the zip file:
          1. google.xml: The original google search plugin
          2. google-oracle.xml: The search plugin that only search the oracle.com web site.

          Usage
          1. Put the google-oracle.xml in your personal firefox searchplugin folder. In windows firefox version 4 it is {FIREFOX_HOME}\distribution\searchplugins
          2. Restart the firefox. Done

          Click here to download the search plugins

          posted @ 2011-04-18 00:13 Justfly Shi 閱讀(1919) | 評論 (6)編輯 收藏

          If after upgrading your eclipse STS plugin from 2.5.2 to 2.6.0, your grails projects can not be build, and when building it, it always warning that "Errors running builder 'Java Builder' on projec". That might be caused by the old 1.6 groovy compiler.  The solution is to edit the file "eclipse/configuration/org.eclipse.equinox.simpleconfigurator/bundles.info" and find the line for org.codehaus.groovy_1.6 and remove it. And then restart the eclipse. you can find that it should be fixed.

          Reference: http://docs.codehaus.org/display/GROOVY/Compiler+Switching+within+Groovy-Eclipse

          posted @ 2011-03-30 22:24 Justfly Shi 閱讀(1511) | 評論 (0)編輯 收藏

               摘要: 第一章 新的機(jī)會 第二章 對抗卡布福斯 第三章 “硅谷” 第四章 CD-ROM工廠 優(yōu)質(zhì)管理的四大要素 l 選擇正確的人 l 為他們分配正確的工作 l 保持他們的積極性 l 幫助團(tuán)隊凝聚起來并保持團(tuán)隊的凝聚力 (其他的一切都只是“文案”) 安全和變化 l 除非感到安全,否則人...  閱讀全文

          posted @ 2011-03-26 23:56 Justfly Shi 閱讀(339) | 評論 (0)編輯 收藏

          上周去一家大型網(wǎng)絡(luò)公司的內(nèi)部系統(tǒng)開發(fā)部門面試,該部門主要是為公司的各個部門開發(fā)工作中所需要用到的系統(tǒng),比如財務(wù),人事的一些小系統(tǒng)。面臨著:資源少,任務(wù)多,體現(xiàn)不出部門價值等問題。面試出來后想了幾點,發(fā)給他們了,另外也分享出來,希望對從事類似工作的同學(xué)們有用。
          1. 統(tǒng)一簡潔的頁面風(fēng)格和CSS
          因為是內(nèi)部系統(tǒng),所以頁面不需要太華麗和復(fù)雜的界面,所需要的是簡單易用。因為是都是sohu的內(nèi)部系統(tǒng),所以可以有統(tǒng)一的頁面風(fēng)格。
          統(tǒng)一頁面風(fēng)格帶來以下這些好處:
          a. 只需要采用一套CSS,而不需要在每個項目都進(jìn)行CSS的開發(fā)
          b. 能減少頁面設(shè)計的時間,頁面布局,功能區(qū)域設(shè)置能全部都統(tǒng)一起來
          c. 減低用戶對于新系統(tǒng)的學(xué)習(xí)曲線
          因為是內(nèi)部系統(tǒng),客戶端與服務(wù)器之間的連接速度能保證。因此可以采用簡潔的頁面風(fēng)格。
          簡潔的頁面能帶來以下好處:
          a. 減少頁面的開發(fā)難度,不用在一個頁面中堆積過非必要的數(shù)據(jù)。
          b. 方便任務(wù)分配
           
          2. 在做需求的時候同時完成靜態(tài)頁面的設(shè)計
          這條的好處是做頁面設(shè)計的時候能進(jìn)一步理解用戶的需求,也能同時從解決方案的角度來考慮問題,從用戶的角度來說,針對模型進(jìn)行思考能進(jìn)一步的引導(dǎo)他的需求。
          具體的做法就是
          a. 在一邊談需求一邊用紙畫出大概的頁面模型和用戶溝通,初步形成頁面功能的設(shè)計
          b. 談完需求之后盡快使用統(tǒng)一的CSS做出靜態(tài)的頁面。用頁面跳轉(zhuǎn)代替表單提交。
          c. 用靜態(tài)頁面組成的模型和用戶進(jìn)行初步溝通,在溝通過程中,如果時間不多的話在紙面上進(jìn)行修改再溝通,如果時間多的話,快速的修改靜態(tài)頁面,爭取盡可能多的把重點頁面和用戶達(dá)成一致。
          根據(jù)溝通結(jié)果把可以開始做的部分安排開發(fā)人員開始做,還不能確定的和客戶約好時間再進(jìn)行下一次溝通。
           
          3. 逐步建立可復(fù)用的代碼庫(功能組件)
          這一點說起來容易,做起來需要一定的額外代價,是一個部門內(nèi)部的積累。前提是第一條建議能夠比較好的實施。這里的代碼庫(功能組件)大到一個功能模塊(連接LDAP),小到一個頁面控件(多層次部門選擇下拉列表)。具體做法是
          a. 在項目開發(fā)中有意識的把可通用的組件單獨放到一個包里
          b. 項目結(jié)束后,花1到2天的時間整理成可復(fù)用的代碼
          c. 整理完之后再對相關(guān)技術(shù)人員進(jìn)行培訓(xùn)(這個很重要,有通用代碼而別人不知道=沒有通用代碼)
          d. 在以后的項目中,在復(fù)用的過程中進(jìn)行完善
          e. 盡量減少復(fù)制粘貼再修改
           
          4. 收集客戶部門使用系統(tǒng)后的效果,其結(jié)果可用于對上對外和對內(nèi)
          客戶部門應(yīng)該會有這樣的數(shù)據(jù),因為他們需要這些東西來說明他們上新系統(tǒng)的效果。本部門可以用這些數(shù)據(jù)來說明自己的貢獻(xiàn)以獲取公司的認(rèn)同甚至可以去爭取更多的資源
          IT或者運維部門應(yīng)該會有bug數(shù)量的和分布的統(tǒng)計數(shù)據(jù),如果沒有的話自己可以收集到達(dá)本部門的bug數(shù)量和分布的數(shù)據(jù),通過這些可以在以后的工作中有意識的避免這些bug
          通過這些數(shù)據(jù)可以在以后的需求分析過程中為客戶部門提供更容易使用的系統(tǒng)

          posted @ 2011-03-02 11:36 Justfly Shi 閱讀(883) | 評論 (0)編輯 收藏

               摘要: 軟件開發(fā)團(tuán)隊和測試團(tuán)隊之間的關(guān)系是復(fù)雜而有趣的,雙方有共同目標(biāo),又互相競爭。雙方的共同目標(biāo)在于減少軟件交付之后缺陷的嚴(yán)重程度和數(shù)量。雙方的利益競爭在于測試人員盡可能的發(fā)現(xiàn)軟件開發(fā)團(tuán)隊交付的軟件產(chǎn)品的缺陷。在這種情況下,減少無謂的內(nèi)耗,共同保證共同目標(biāo)的實現(xiàn),才可能實現(xiàn)雙方的共贏。但是在很多時候,軟件開發(fā)團(tuán)隊和測試人員之間總存在著一種緊張的關(guān)系,并因此無謂的添加了到達(dá)共同目標(biāo)的困難。

          在我經(jīng)歷過的一些開發(fā)過程中,多次因為與測試人員之間的頗為愉快的合作,實現(xiàn)了雙贏和共贏。總結(jié)出來幾點,拋磚引玉:
          1. 保持良好的心態(tài),提高對開發(fā)人員與測試人員之間關(guān)系的認(rèn)識
          2. 對于客戶想法的理解,開發(fā)團(tuán)隊與測試團(tuán)隊需要達(dá)成一致并且保持同步。
          3. 互相幫助,共同提高  閱讀全文

          posted @ 2010-10-24 05:07 Justfly Shi 閱讀(1806) | 評論 (0)編輯 收藏

          1. test if the command notify-send is installed
          notify-send "Hello"
          If the command is not found, install the required package following the tips
          2. vi notify.sh and input the below content into it.
          #!/bin/bash
          DISPLAY=:0.0 /usr/bin/notify-send -30000 "<b>Take a Break!</b>"
          3. chmod +x notify.sh
          4. crontab -e
          5. add the below content as a new line in the opened file. and then save it
          */45 * * * * /home/jimmy/notify.sh
          6. Done!

          posted @ 2010-09-28 15:49 Justfly Shi 閱讀(364) | 評論 (0)編輯 收藏

          It is only available for one session.
          using the below command before you run your query
          ALTER SESSION SET NLS_DATE_FORMAT = 'YYYY-MM-DD HH24:MI:SS';
          For more information, refer to the page http://www.oracle.com/technology/products/database/sql_developer/howtos/howto_policy_date_formats.html
          

          posted @ 2010-08-11 16:45 Justfly Shi 閱讀(365) | 評論 (0)編輯 收藏

          In Ubuntu, key F10 is used to open the first item of the menu bar, but If you use Emacs key binding in eclipse, F10 is used as the redo key. So you need to do the below change.

          Run gconf-editor, browse to /desktop/gnome/interface then scroll down to menubar_accel and delete the F10 value.

          From http://www.h4ck3r.net/2010/04/07/debugging-step-over-f10-eclipse-ubuntu/

          posted @ 2010-07-22 23:35 Justfly Shi 閱讀(334) | 評論 (0)編輯 收藏

          install jdk via Synaptic package manager, the name of it is sun-java6-jdk
          download the eclipse install file for Linux

          1.Extract the eclipse download and move to opt.

          tar xzf wtp-all-in-one-sdk-1.0-linux-gtk.tar.gz
          sudo mv eclipse /opt/eclipse
          cd /opt
          sudo chmod -R +r eclipse
          sudo chmod +x `sudo find eclipse -type d`

          2. Then create an eclipse executable in your path
          sudo touch /usr/bin/eclipse
          sudo chmod 755 /usr/bin/eclipse
          sudo vi /usr/bin/eclipse

          With this contents
          #!/bin/sh
          export ECLIPSE_HOME="/opt/eclipse"
          export GDK_NATIVE_WINDOWS=1

          $ECLIPSE_HOME/eclipse $*

          3 Then create a gnome menu item
          sudo vi /usr/share/applications/eclipse.desktop

          With this contents
          [Desktop Entry]
          Encoding=UTF-8
          Name=Eclipse
          Comment=Eclipse IDE
          Exec=eclipse
          Icon=/opt/eclipse/icon.xpm
          Terminal=false
          Type=Application
          Categories=GNOME;Application;Development;
          StartupNotify=true


          4 You now have a working eclipse. But run this command first to initialize the set up
          . /opt/eclipse/eclipse -clean

          Then from here on you can run from the menu item applications/programming/eclipse

          posted @ 2010-07-22 23:27 Justfly Shi 閱讀(340) | 評論 (0)編輯 收藏

          查找包含某字符串的所有文件
          grep -F 'aaa' -R ./

          如何指定輸出文件的某幾行
          想輸出多行用:
          sed -n '1,np' file
          跳著輸出用";"
          sed -n '1p;4p;7p;9p' file

          posted @ 2010-07-22 23:25 Justfly Shi 閱讀(275) | 評論 (0)編輯 收藏

          open System->Administration->Language support
          1. Install/Remove languages->check 'Chinese(Simplified)
          2. Keyboard input method system->ibus
          open System->Preferences->IBus Preferences->Input method->add "Chinese Pinyin"->move it to the top

          posted @ 2010-07-22 23:23 Justfly Shi 閱讀(422) | 評論 (0)編輯 收藏

          http://www.linuxsir.org/bbs/thread362467.html
          下面的這個已經(jīng)不再維護(hù)了。上面的這個好使。
          http://www.linuxsir.org/bbs/thread320802.html

          posted @ 2010-07-22 23:23 Justfly Shi 閱讀(563) | 評論 (2)編輯 收藏

          create or edit file /etc/hal/fdi/policy/mouse-wheel.fdi, change its content to below
          <?xml version="1.0" encoding="UTF-8"?>
          <match key="info.product" string="TPPS/2 IBM TrackPoint">
          <merge key="input.x11_options.EmulateWheel" type="string">true</merge>
          <merge key="input.x11_options.EmulateWheelButton" type="string">2</merge>
          <merge key="input.x11_options.XAxisMapping" type="string">6 7</merge>
          <merge key="input.x11_options.YAxisMapping" type="string">4 5</merge>
          <merge key="input.x11_options.ZAxsisMapping" type="string">4 5</merge>
          <merge key="input.x11_options.Emulate3Buttons" type="string">true</merge>
          </match>


          then run the below command

          sudo rm /var/cache/hald/fdi-cache
          sudo /etc/init.d/hal restart
          sudo /etc/init.d/gdm restart

          posted @ 2010-07-22 23:21 Justfly Shi 閱讀(393) | 評論 (0)編輯 收藏

          主站蜘蛛池模板: 石景山区| 株洲县| 和政县| 姚安县| 孝义市| 兰西县| 神农架林区| 杂多县| 汶川县| 佛山市| 洛宁县| 普陀区| 南涧| 那坡县| 承德县| 达孜县| 永安市| 泊头市| 同德县| 肇源县| 北海市| 邯郸市| 晋江市| 浦北县| 湟源县| 和田县| 苏尼特右旗| 永仁县| 轮台县| 榆中县| 饶阳县| 鄂温| 张家口市| 万全县| 门头沟区| 昌宁县| 新郑市| 开鲁县| 噶尔县| 铜陵市| 清苑县|