<rt id="bn8ez"></rt>
<label id="bn8ez"></label>

  • <span id="bn8ez"></span>

    <label id="bn8ez"><meter id="bn8ez"></meter></label>

    貝貝爸爸的程序人生

    關(guān)注Seam、BPM
    posts - 23, comments - 10, trackbacks - 0, articles - 32
      BlogJava :: 首頁 :: 新隨筆 :: 聯(lián)系 :: 聚合  :: 管理

    這篇文章獻(xiàn)給天下兒童的父母。
         老農(nóng)民的智慧和知識分子的尷尬:
        很多沒有上過學(xué)的老農(nóng)民培養(yǎng)出了優(yōu)秀的孩子,不少有知識、高學(xué)歷的城里人卻把孩子管出諸多毛病,甚至培養(yǎng)出問題孩子,為什么?老農(nóng)民沒知識但有智慧,城里人有知識但沒智慧。(知識不等于智慧。)
        智慧的老農(nóng)民三句話就培養(yǎng)出了好孩子:
        第一句話:“孩子,爸媽沒本事,你要靠自己了。”不包辦,把責(zé)任還給孩子,讓孩子擁有了責(zé)任心。
        第二句話:“孩子,做事先做人,一定不能做傷害別人的事情。”講德行,告訴孩子做人的標(biāo)準(zhǔn)。
        第三句話:“孩子,撒開手闖吧,實(shí)在不行,回家來還有口飯吃。”無私的愛,無盡的愛!
        看看一些城里人怎么把孩子教育出問題的:
        第一句話:“寶貝,你 好好學(xué)習(xí)就行了,其他的事情爸爸媽媽來辦!”剝奪了孩子負(fù)責(zé)任的權(quán)利,培養(yǎng)出了沒有責(zé)任心的孩子。
        第二句話:“寶貝,出去不能吃虧,別人打你一定要還手!”基本的做人準(zhǔn)則都沒有教對,可能培養(yǎng)出“缺德”的孩子。
        第三句話:“我告訴你,你要是再不好好學(xué)習(xí),長大沒飯吃別來找我!”有條件的愛,根本不是真愛。
        只要擁有智慧,每一位家長都能把孩子培養(yǎng)成才,而智慧與知識和學(xué)歷并不相關(guān)!

    posted @ 2011-08-06 22:47 貝貝爸爸 閱讀(272) | 評論 (0)編輯 收藏

    原文A successful Git branching model
    In this post I present the development model that I’ve introduced for all of my projects (both at work and private) about a year ago, and which has turned out to be very successful. I’ve been meaning to write about it for a while now, but I’ve never really found the time to do so thoroughly, until now. I won’t talk about any of the projects’ details, merely about the branching strategy and release management.
    這篇文章,將介紹所有一年前我工作中或者個人項(xiàng)目的開發(fā)模型,這個模型已經(jīng)被證明是十分有用的(successfull)。我老早就想寫一些關(guān)于這個模型的文章,但是總是抽不出時間。在這篇文章中,我將不會介紹項(xiàng)目的詳細(xì)情況,僅僅對分支的策略和發(fā)布管理作一個介紹。

    It focuses around Git as the tool for the versioning of all of our source code.
    我們將圍繞這使用Git作為所有項(xiàng)目源碼的版本控制工具。
    • 為何選擇GIT?
    For a thorough discussion on the pros and cons of Git compared to centralized source code control systems, see the web. There are plenty of flame wars going on there. As a developer, I prefer Git above all other tools around today. Git really changed the way developers think of merging and branching. From the classic CVS/Subversion world I came from, merging/branching has always been considered a bit scary (“beware of merge conflicts, they bite you!”) and something you only do every once in a while.
    關(guān)于Git作為集中的源碼控制系統(tǒng)的優(yōu)缺點(diǎn),可以查看一下鏈接,關(guān)于這個話題,有激烈的爭論。作為一個開發(fā)者,與其他版本控制工具相比,我更喜歡Git,Git真正的改變了開發(fā)者關(guān)于合并和分支的思考(think)。我曾經(jīng)也用過CVS、svn,分支和合并,真的很讓人頭疼(合并時產(chǎn)生的沖突),因此,有時你每次只能做一會工作(個人理解:因?yàn)閟vn這種版本控制庫只有一個服務(wù)倉庫,涉及公共資源,只能鎖定編輯)

    But with Git, these actions are extremely cheap and simple, and they are considered one of the core parts of your daily workflow, really. For example, in CVS/Subversion books, branching and merging is first discussed in the later chapters (for advanced users), while in every Git book, it’s already covered in chapter 3 (basics).
    但是對于Git來說,做這樣的工作(分支、合并),太簡單!它真的可以作為你日常工作流程中最核心的部分。例如,在有關(guān)CVS/svn的書籍中,分支和合并要放到最后一章才會闡述(針對高級用戶),然后在Git相關(guān)的書籍中,首先就先跟你闡述分支和合并(第3章)。

    Enough about the tools, let’s head onto the development model. The model that I’m going to present here is essentially no more than a set of procedures that every team member has to follow in order to come to a managed software development process.
    關(guān)于這個工具的介紹,我們不再贅述,現(xiàn)在我們回到開發(fā)模式的話題上來。這個模型,基本上和每個開發(fā)團(tuán)隊(duì)管理軟件開發(fā)流程是類似的。
    • 分布而集中
    The repository setup that we use and that works well with this branching model, is that with a central “truth” repo. Note that this repo is only considered to be the central one (since Git is a DVCS, there is no such thing as a central repo at a technical level). We will refer to this repo as origin, since this name is familiar to all Git users.
    我們使用這個分支模型很好工作的倉庫,是真正意義上的中央倉庫。這個倉庫是唯一的中央倉庫(因?yàn)镚it本身就是分布式版本控制系統(tǒng)DVCS,所以這沒有技術(shù)問題)。我們稱這樣一個中央倉庫為origin,所有Git用戶都知道origin這個名稱。
    Each developer pulls and pushes to origin. But besides the centralized push-pull relationships, each developer may also pull changes from other peers to form sub teams. For example, this might be useful to work together with two or more developers on a big new feature, before pushing the work in progress to origin prematurely. In the figure above, there are subteams of Alice and Bob, Alice and David, and Clair and David.
    每個開發(fā)者,都可以從origin獲得(pull)資源,同時也能推送(push)到origin。除此之外,每個開發(fā)者可以從其他開發(fā)者那里獲得資源,以此組建自己的一個小組。例如,當(dāng)我們要開發(fā)一個大的新功能時,我們將和其他人一起協(xié)作,在提交到中央倉庫origin之前,我們需要小組內(nèi)部能夠互相協(xié)作,這將是十分有用的。上圖中,Alice和Bob是一個小組,同時Alice和David是一個小組,Clair和David又是一個小組。
    Technically, this means nothing more than that Alice has defined a Git remote, named bob, pointing to Bob’s repository, and vice versa.
    從技術(shù)實(shí)現(xiàn)上講,這無非是在Alice的項(xiàng)目里,定義了一個指向Bot的遠(yuǎn)程鏈接而已(git remote add bob git@bobserver bob.git),反之也是一樣,如此簡單??!
    • 主要的分支
    At the core, the development model is greatly inspired by existing models out there. The central repo holds two main branches with an infinite lifetime:
    中央倉庫有2個主要的分支,這些分支將一直存在:
      • master
      • develop
    The master branch at origin should be familiar to every Git user. Parallel to the master branch, another branch exists called develop.
    中央倉庫的master分支已經(jīng)為所有Git用戶熟知,與master分支并行的另外一個分支,我們稱之為develop。
    We consider origin/master to be the main branch where the source code of HEAD always reflects a production-ready state.
    我們稱origin/master為主要分支,因?yàn)榉种У腍EAD指向的源碼總是反映了一個可以發(fā)布的產(chǎn)品狀態(tài)(production-ready)。

    We consider origin/develop to be the main branch where the source code of HEAD always reflects a state with the latest delivered development changes for the next release. Some would call this the “integration branch”. This is where any automatic nightly builds are built from.
    我們稱origin/develop為主要分支,因?yàn)榉种У腍EAD指向的源碼,總是反映了下次發(fā)布前最新提交的開發(fā)代碼。有些人稱之為“集成分支”(integration barnch),因?yàn)槲覀兊拿客碜詣訕?gòu)建都是基于此分支進(jìn)行的。(例如hudson,可以做自動構(gòu)建工作)。
    When the source code in the develop branch reaches a stable point and is ready to be released, all of the changes should be merged back into master somehow and then tagged with a release number. How this is done in detail will be discussed further on.
    當(dāng)develop分支的源碼穩(wěn)定并且準(zhǔn)備發(fā)布,所有的改變應(yīng)該合并(merge)到master分支,同時做一個發(fā)布版本的標(biāo)簽(tag),我們將在后面討論這個細(xì)節(jié)。
    Therefore, each time when changes are merged back into master, this is a new production release by definition. We tend to be very strict at this, so that theoretically, we could use a Git hook script to automatically build and roll-out our software to our production servers everytime there was a commit on master.
    因此,當(dāng)每一次將所有更改合并回master時,將會產(chǎn)生一個新的可以發(fā)布的產(chǎn)品狀態(tài)。我們往往對于這個操作的控制是比較嚴(yán)格的,每當(dāng)往master分支提交時,我們可以使用Git的hook來自動構(gòu)建和轉(zhuǎn)出到產(chǎn)品服務(wù)器上。
    • 輔助分支

    posted @ 2011-07-06 12:34 貝貝爸爸 閱讀(535) | 評論 (0)編輯 收藏

    首先,需要配置mail-service.xml
    <?xml version="1.0" encoding="UTF-8"?>
    <!-- $Id: mail-service.xml 62350 2007-04-15 16:50:12Z dimitris@jboss.org $ -->
    <server>

      
    <!-- ==================================================================== -->
      
    <!-- Mail Connection Factory                                              -->
      
    <!-- ==================================================================== -->

      
    <mbean code="org.jboss.mail.MailService"
             name
    ="jboss:service=Mail">
        
    <attribute name="JNDIName">java:/Mail</attribute>
        
    <attribute name="User">bpm</attribute>
        
    <attribute name="Password">*****</attribute>
        
    <attribute name="Configuration">
          
    <!-- A test configuration -->
          
    <configuration>
            
    <!-- Change to your mail server prototocol -->
            
    <property name="mail.store.protocol" value="pop3"/>
            
    <property name="mail.transport.protocol" value="smtp"/>

            
    <!-- Change to the user who will receive mail  -->
            
    <property name="mail.user" value="bpm"/>
            
    <property name="mail.smtp.auth" value="true"/>

            
    <!-- Change to the mail server  -->
            
    <property name="mail.pop3.host" value="**pop3服務(wù)器地址**"/>

            
    <!-- Change to the SMTP gateway server -->
            
    <property name="mail.smtp.host" value="***smtp服務(wù)器地址***"/>
            
            
    <!-- The mail server port -->
            
    <property name="mail.smtp.port" value="25"/>
            
            
    <!-- Change to the address mail will be from  -->
            
    <property name="mail.from" value="bpm@eontime.com.cn"/>

            
    <!-- Enable debugging output from the javamail classes -->
            
    <property name="mail.debug" value="false"/>
          
    </configuration>
        
    </attribute>
        
    <depends>jboss:service=Naming</depends>
      
    </mbean>

    </server>

    其次新建一個jsp頁面mail2.jsp,作為測試
    <%@page contentType="text/html"%>
    <%@ page import="javax.mail.*,javax.mail.internet.*, javax.activation.*, javax.naming.InitialContext" %> 
    <h3>Test JbsssMail DB</h3> 
    <%
    String toAddress
    =request.getParameter("MailTo");
    String fromAddress
    =request.getParameter("MailFrom");
    String subject
    =request.getParameter("MailSubject");
    String content
    =request.getParameter("MailContent");
    InitialContext ctx 
    = new InitialContext(); 
    Session sessions 
    = (Session) ctx.lookup("java:/Mail");
    if(toAddress!=null &&!toAddress.equals("")){ 
    try{
     MimeMessage msg 
    = new MimeMessage(sessions);
     msg.setFrom(
    new InternetAddress(fromAddress));
     msg.setRecipients(javax.mail.Message.RecipientType.TO,toAddress);
     msg.setSubject(subject);
     msg.setSentDate(
    new java.util.Date());
     Multipart multipt 
    = new MimeMultipart();
     MimeBodyPart msgbody 
    = new MimeBodyPart();
     msgbody.setContent(content,
    "text/plain");
     multipt.addBodyPart(msgbody);
     msg.setContent(multipt);
     Transport.send(msg);
     System.out.println(
    "SendMail OK!");
    }
    catch(MessagingException e)
    {
     e.printStackTrace();
    }
    }
    %> 
    <HTML>
    <BODY BGCOLOR="white">
    <form METHOD="POST" ACTION="mail2.jsp">
     
    <table CELLSPACING="0" CELLPADDING="3" BORDER="1" WIDTH="474">
        
    <tr>
          
    <td width="150"><div align="left">From :</small></td>
          
    <td width="324"><input TYPE="TEXT" name="MailFrom" value=""></td>
        
    </tr>
        
    <tr>
          
    <td width="150"><div align="left">To :</small></td>
          
    <td width="324"><input TYPE="TEXT" name="MailTo" value=""></td>
        
    </tr>
        
    <tr>
          
    <td width="150"><div align="left">Subject :</small></td>
          
    <td width="324"><input TYPE="TEXT" name="MailSubject" value=""></td>
        
    </tr>
        
    <tr>
          
    <td width="150"><div align="left">Content :</small></td>
          
    <td width="324"><TEXTAREA cols=50 name="MailContent" rows=8></TEXTAREA></td>
        
    </tr>
        
    <tr>
          
    <td></td>
          
    <td colspan="2" width="474"><input TYPE="Submit"></td>
        
    </tr>
     
    </table>
    </form>
    </BODY>
    </HTML>

    posted @ 2011-06-25 22:44 貝貝爸爸 閱讀(470) | 評論 (0)編輯 收藏

    git的分支處理模型,真的很爽,但關(guān)于如何對git的分支進(jìn)行管理?最近有網(wǎng)友給我提到了git flow,呵呵,按照我的理解,應(yīng)該是git的一個最佳實(shí)踐吧,原文A successful Git branching model對git的分支模型作了闡述,以下我對該文章進(jìn)行自己的翻譯和理解,聊以日后學(xué)習(xí),首先先看一下下面這個圖:
    git flow將git的分支主要分為2類:主要分支和支持分支
    • 主要分支
      • master:永遠(yuǎn)處在產(chǎn)品可以發(fā)布(production ready)狀態(tài)
      • develop: 當(dāng)前最新的開發(fā)狀態(tài)
    • 支持分支
      • Feature branches: 開發(fā)新的功能,從develop分支出來,完成開發(fā)、測試后,merge回develop。
      • Release branches: 準(zhǔn)備發(fā)布版本的分支,該分支只修復(fù)bug,完成后,merge回develop和master。
      • Hotfix branches: 來不及等待下個版本的發(fā)布,但又要馬上修復(fù)bug的情況,從master分支出來,完成開發(fā)、測試后,merge回master和develop。

    posted @ 2011-05-31 09:44 貝貝爸爸 閱讀(678) | 評論 (1)編輯 收藏

    由于最近在做的oryx-editor使用的是posgresql8.3.15,不能自動的使用yum install安裝了,因?yàn)楝F(xiàn)在源里面的版本是8.1,無法滿足項(xiàng)目要求,特安裝了postgresql8.3.15,只能源碼編譯安裝了。
    ----------------------------

    1、下載postgresql最新版:http://www.postgresql.org/ftp/source/

    wget http://wwwmaster.postgresql.org/redir/391/f/source/v8.3.15/postgresql-8.3.15.tar.gz

    2、解壓文件:
    tar zxvf postgresql-8.3.7.tar.gz
    cd postgresql-8.3.7

    3、配置:
    ./configure --prefix=/usr/local/pgsql

    4、編譯:
    make

    5、安裝:
    make install

    6、創(chuàng)建用戶組和用戶:
    groupadd postgres
    useradd -g postgres postgres

    7、創(chuàng)建數(shù)據(jù)庫庫文件存儲目錄、給postgres賦予權(quán)限:
    mkdir /usr/local/pgsql/data
    cd /usr/local/pgsql
    chown postgres.postgres data

    8、初始化數(shù)據(jù)庫目錄:
    切換用戶
       su - postgresql

    初始化數(shù)據(jù)
       /usr/local/pgsql/bin/initdb -D /usr/local/pgsql/data

    啟動數(shù)據(jù)庫
       /usr/local/pgsql/bin/postmaster -D /usr/local/pgsql/data

    9、配置監(jiān)聽地址和端口:
    vi /usr/local/pgsql/data/postgresql.conf
    取消以下兩行的注釋
       listen_addresses = '*'

       port = 5432

    10、允許遠(yuǎn)程連接:
    vi /usr/local/pgsql/data/pg_hba.conf
    添加
       host all all 192.168.1.0/24 trust 

       每項(xiàng)的具體意思在配置文件中有詳細(xì)說明
    配置iptables讓遠(yuǎn)程主機(jī)能訪問:
       vi /etc/sysconfig
       添加
          -A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 5432 -j ACCEPT
       service iptables restart

    11、讓postgresql數(shù)據(jù)庫隨系統(tǒng)啟動而啟動:
    將啟動腳本拷貝到/etc/init.d/目錄下,具體執(zhí)行如下命令:
    cd /etc/rc.d/init.d
    cp (第一步解壓的安裝文件目錄)/postgresql-8.3.7/contrib/start-scripts/linux postgresql
    chmod +x postgresql
    vi postgresql
       prefix=/usr/local/pgsql
       PGDATA="/usr/local/pgsql/data"
       PGUSER=postgres
       PGLOG="/var/log/pgsql.log"

       chkconfig --add postgresql
    啟動數(shù)據(jù)庫:
       service postgresql start

    配置完畢 。

    posted @ 2011-05-27 23:00 貝貝爸爸 閱讀(660) | 評論 (0)編輯 收藏

    僅列出標(biāo)題
    共8頁: 上一頁 1 2 3 4 5 6 7 8 下一頁 
    主站蜘蛛池模板: 黄色视屏在线免费播放| 亚洲成av人在片观看| 免费无码又爽又刺激一高潮| 亚洲欧美日韩自偷自拍| 精品亚洲成a人片在线观看少妇| 亚洲综合色自拍一区| 国产又大又黑又粗免费视频| 欧亚精品一区三区免费| 亚洲免费黄色网址| 日韩在线不卡免费视频一区| 高清永久免费观看| 四虎国产精品成人免费久久 | 你好老叔电影观看免费| 黄页网站在线免费观看| 亚洲经典千人经典日产| 亚洲国产精品免费在线观看| 久久亚洲精品中文字幕| 亚洲av无码一区二区三区乱子伦| 在线A亚洲老鸭窝天堂| 久久久久国产成人精品亚洲午夜| 伊在人亚洲香蕉精品区麻豆| 又黄又爽无遮挡免费视频| 日韩伦理片电影在线免费观看| 四虎成人免费网站在线| 我要看免费的毛片| 青草草在线视频永久免费| 大陆一级毛片免费视频观看i| 在线v片免费观看视频| 4虎永免费最新永久免费地址| www视频在线观看免费| 波多野结衣免费在线| 久久久久国色AV免费看图片 | 久久亚洲国产最新网站| 2019亚洲午夜无码天堂| 亚洲欧洲国产综合AV无码久久| 国产AV旡码专区亚洲AV苍井空| 亚洲成a∨人片在无码2023| 免费精品久久久久久中文字幕| 国产免费牲交视频免费播放| 日韩精品无码免费专区午夜不卡| 久久狠狠躁免费观看2020|