<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 :: 首頁(yè) :: 新隨筆 :: 聯(lián)系 :: 聚合  :: 管理

    2012年2月22日

    今天興致來(lái)了,說(shuō)要在家搞搞平臺(tái)的東西,nnd,竟然遇到了莫名其妙的mysql亂碼問(wèn)題,其實(shí)不是mysql的問(wèn)題,是jdbc數(shù)據(jù)源的鏈接沒(méi)有指明字符集的問(wèn)題,記下來(lái)備用:<datasource jta="false" jndi-name="java:jboss/datasources/MySqlDS" pool-name="bdp" enabled="true" use-java-context="true" use-ccm="true">
                        <connection-url>jdbc:mysql://localhost:3306/bdp-dev?useUnicode=true&amp;characterEncoding=utf8</connection-url>
                        <driver>com.mysql</driver>
                        <pool>
                            <min-pool-size>10</min-pool-size>
                            <max-pool-size>100</max-pool-size>
                            <prefill>true</prefill>
                            <use-strict-min>false</use-strict-min>
                            <flush-strategy>FailingConnectionOnly</flush-strategy>
                        </pool>
                        <security>
                            <user-name>root</user-name>
                        </security>
                        <statement>
                            <prepared-statement-cache-size>32</prepared-statement-cache-size>
                            <share-prepared-statements>true</share-prepared-statements>
                        </statement>
                    </datasource>

    posted @ 2012-05-19 01:40 貝貝爸爸 閱讀(770) | 評(píng)論 (0)編輯 收藏

    今天在處理zTree的時(shí)候,無(wú)意間遇到一個(gè)很好的插件,可以將array對(duì)象轉(zhuǎn)換為json對(duì)象,真的很好用哦,呵呵。
    var thing = {plugin: 'jquery-json', version: 2.3};

    var encoded = $.toJSON( thing );
    // '{"plugin":"jquery-json","version":2.3}'
    var name = $.evalJSON( encoded ).plugin;
    // "jquery-json"
    var version = $.evalJSON(encoded).version;
    // 2.3
    像上面那樣用就行了,很容易進(jìn)行請(qǐng)求間的參數(shù)傳遞。
    項(xiàng)目地址為:http://code.google.com/p/jquery-json/

    posted @ 2012-05-10 13:45 貝貝爸爸 閱讀(1077) | 評(píng)論 (1)編輯 收藏

     cat /tmp/id_rsa.john.pub >> ~/.ssh/authorized_keys

    posted @ 2012-04-26 14:45 貝貝爸爸 閱讀(390) | 評(píng)論 (0)編輯 收藏

    nnd,今天搞了快2個(gè)小時(shí),總是無(wú)法解決ldap支持的其他屬性返回問(wèn)題,因?yàn)橹芭渲玫氖?.3.5版本,現(xiàn)在最新的版本是3.4.11,原來(lái)的配置竟然無(wú)法使用了,原來(lái)是因?yàn)樵黾臃?wù):
    <bean id="serviceRegistryDao" class="org.jasig.cas.services.InMemoryServiceRegistryDaoImpl">
    導(dǎo)致無(wú)法返回principal的其他屬性到客戶(hù)端,其實(shí)象這樣配置即可:<bean id="attributeRepository"
      class="org.jasig.services.persondir.support.ldap.LdapPersonAttributeDao">
      <property name="contextSource" ref="contextSource" />
      <property name="baseDN" value="ou=users,${ldap.basePath}" />
      <property name="requireAllQueryAttributes" value="true" />
      <!--
      Attribute mapping beetween principal (key) and LDAP (value) names
      used to perform the LDAP search.  By default, multiple search criteria
      are ANDed together.  Set the queryType property to change to OR.
      
    -->
      <property name="queryAttributeMapping">
        <map>
          <entry key="username" value="uid" />
        </map>
      </property>
     
      <property name="resultAttributeMapping">
        <map>
        <!-- Mapping beetween LDAP entry attributes (key) and Principal's (value) -->
        <entry key="name" value="userName"/>
        <entry key="uid" value="userId"/>
        </map>
      </property>
    </bean>

        <bean id="serviceRegistryDao" class="org.jasig.cas.services.InMemoryServiceRegistryDaoImpl">
            <property name="registeredServices">
                <list>
                    <bean class="org.jasig.cas.services.RegisteredServiceImpl">
                        <property name="id" value="0" />
                        <property name="name" value="HTTP" />
                        <property name="description" value="Only Allows HTTP Urls" />
                        <property name="serviceId" value="http://**" />
                        <property name="evaluationOrder" value="10000001" />
                        <property name="ignoreAttributes" value="true" />
                    </bean>
                                    ………………
                            </list>
                    </property>
            </bean>
    如上所示,其中注冊(cè)的服務(wù)registeredServices
    默認(rèn)是不允許返回其他屬性到客戶(hù)端的?。。。?!,真的是很坑爹啊,不過(guò),配置一下ignoreAttributes即可,也可以指定allowedAttributes
    如下:
    <property name="allowedAttributes">
        <list>
                <value><!-- your attribute key --></value>
        </list>
    </property>

    posted @ 2012-04-25 23:12 貝貝爸爸 閱讀(1330) | 評(píng)論 (0)編輯 收藏


    cat /boot/grub2/grub.cfg |grep Fedora
    grub2-set-default "Fedora Linux, with Linux 3.1.0-5.fc16.i686"
    grub2-editenv list
    grub2-mkconfig -o /boot/grub2/grub.cfg

    posted @ 2012-04-20 08:50 貝貝爸爸 閱讀(372) | 評(píng)論 (0)編輯 收藏

    #
    contrib / completion / git-completion.bash

    #
     Source the git bash completion file
    if [ -f ~/.git-completion.bash ]; then
        source ~/.git-completion.bash
        GIT_PS1_SHOWDIRTYSTATE=true
        PS1='[\u@\h:\W $(__git_ps1 "(%s)")]$ '
    fi

    posted @ 2012-04-04 09:26 貝貝爸爸 閱讀(847) | 評(píng)論 (0)編輯 收藏

    http://www.secondpersonplural.ca/jqgriddocs/index.htm

    posted @ 2012-03-29 05:05 貝貝爸爸 閱讀(195) | 評(píng)論 (0)編輯 收藏

    http://junv.sinaapp.com/1955.html

    posted @ 2012-03-21 17:22 貝貝爸爸 閱讀(280) | 評(píng)論 (0)編輯 收藏

    http://www.navicat.com/en/download/download.html
    NAVJ-W56S-3YUU-MVHV



    posted @ 2012-03-19 17:25 貝貝爸爸 閱讀(322) | 評(píng)論 (0)編輯 收藏

    今天調(diào)試了一天,所有的步驟都正確,可最后到了web下載,卻總是404錯(cuò)誤,好心zzq網(wǎng)友幫著一起定位和解決問(wèn)題,可依然沒(méi)有找到原因,偶爾的一個(gè)google搜索,發(fā)現(xiàn)是因?yàn)闆](méi)有sudo啟動(dòng)nginx。。。。
    真tmd扯淡了。

    posted @ 2012-03-18 20:13 貝貝爸爸 閱讀(361) | 評(píng)論 (0)編輯 收藏

    https://gist.github.com/2066974

    posted @ 2012-03-18 08:26 貝貝爸爸 閱讀(259) | 評(píng)論 (0)編輯 收藏

    系統(tǒng)環(huán)境
    CentOS6.2
    #step 1. download libevent https://github.com/downloads/libevent/libevent/libevent-2.0.17-stable.tar.gz
    $ ./configure
    $ make
    $ make verify   # (optional)
    $ sudo make install
    $ln -s /usr/local/lib/libevent-2.0.so.5 /usr/lib64/libevent-2.0.so.5
    #step 2. download FastDFS source package and unpack it,
    $ ./make.sh
    $ ./make.sh install
    #step 3. edit/modify the config file of tracker and storage
    #step 3.1.
    $ vim /etc/fdfs/tracker.conf
    ## base_path=??
    ## reserved_storage_space = 1GB
    #step 3.2
    $ vim /etc/fdfs/storage.conf
    ## base_path=/home/yuan/fastdfs/storage
    ## path(disk or mount point) count, default value is 1
    ## store_path_count=1
    ## store_path#, based 0, if store_path0 not exists, it's value is base_path
    ## the paths must be exist
    ## store_path0=/home/yuan/fastdfs0
    ## tracker_server=host:port
    #step 4 cp the start shell into /etc/init.d
    $ cd FastDFS
    $ cp init.d/fdfs_trackerd /etc/init.d
    $ cp init.d/fdfs_storaged /etc/init.d
    #step 5 mkdir the trackerd base path and storaged base path
    $ mkdir /home/yuan/fastdfs
    $ mkdir /home/yuan/fastdfs0
    #step 6 start trackerd service
    $/sbin/service fdfs_trackerd start
    ###$/sbin/service fdfs_trackerd status
    ###$fdfs_trackerd (pid 11441) is running...
    #step 7 start storaged service
    $/sbin/service fdfs_storaged start
    ###$/sbin/service fdfs_storaged status
    ###$fdfs_storaged (pid 11553) is running...
    #step 8. run test program
    #step 8.1. vim /etc/fdfs/client.conf
    ###base_path=/home/yuan/fastdfs
    ###tracker_server=192.168.0.197:22122
    #step 8.2 run test program
    $/usr/local/bin/fdfs_test /etc/fdfs/client.conf upload /usr/include/stdlib.h
    #step 9 monitor fdfs
    $/usr/local/bin/fdfs_monitor /etc/fdfs/client.conf

    posted @ 2012-03-17 16:38 貝貝爸爸 閱讀(765) | 評(píng)論 (0)編輯 收藏

    可能后面會(huì)遇到同一臺(tái)服務(wù)器,安裝多個(gè)jboss實(shí)例的問(wèn)題,那顯然的問(wèn)題可能就是端口沖突問(wèn)題,怎么辦?
    1、修改各個(gè)配置文件的端口配置
    2、最簡(jiǎn)單的方法是,啟動(dòng)是指明端口綁定步長(zhǎng),例如:-Djboss.socket.binding.port-offset=100

    posted @ 2012-03-04 20:40 貝貝爸爸 閱讀(463) | 評(píng)論 (0)編輯 收藏

    mvn deploy:deploy-file -Dfile=target/web-3.1.0-SNAPSHOT-api.jar -Durl=http://repo.yongtai.com.cn/nexus/content/repositories/snapshots/ -DrepositoryId=nexus-snapshots -DpomFile=pom.xml -Dpackaging=jar -Dclassifier=api

    posted @ 2012-02-22 12:02 貝貝爸爸 閱讀(225) | 評(píng)論 (0)編輯 收藏

    主站蜘蛛池模板: 亚洲色自偷自拍另类小说| 亚洲日本一区二区三区在线不卡| 亚洲视频无码高清在线| 欧洲精品免费一区二区三区| 无套内谢孕妇毛片免费看看| 亚洲人色婷婷成人网站在线观看| 亚洲精品NV久久久久久久久久| **一级毛片免费完整视| 亚洲国产综合AV在线观看| 久久亚洲中文字幕精品一区四| 成年女人免费v片| a毛片免费观看完整| 亚洲综合色区中文字幕| 亚洲精品无码永久中文字幕 | 久久久久亚洲精品无码蜜桃| 天堂在线免费观看中文版| 国产日韩一区二区三免费高清| 亚洲狠狠婷婷综合久久| 男男gay做爽爽的视频免费| 久久亚洲精品无码AV红樱桃| 亚洲码在线中文在线观看| 亚洲第一成人影院| 无码日韩精品一区二区免费| 中文字幕免费观看全部电影| 亚洲国产精品美女久久久久| 老司机亚洲精品影院在线观看| 91久久亚洲国产成人精品性色 | 亚洲香蕉免费有线视频| 67194成是人免费无码| 中文字幕免费在线| 97在线视频免费公开视频| 日本高清免费观看| 国产va免费观看| 亚洲国产精品无码久久久秋霞1 | 亚洲美女大bbbbbbbbb| 亚洲欧美日韩自偷自拍| 2020天堂在线亚洲精品专区| 黄色三级三级三级免费看| 激情无码亚洲一区二区三区| 一个人免费播放在线视频看片| 国产精品亚洲综合|