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

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

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

    貝貝爸爸的程序人生

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

    2012年4月4日

    今天興致來了,說要在家搞搞平臺的東西,nnd,竟然遇到了莫名其妙的mysql亂碼問題,其實不是mysql的問題,是jdbc數據源的鏈接沒有指明字符集的問題,記下來備用:<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) | 評論 (0)編輯 收藏

    今天在處理zTree的時候,無意間遇到一個很好的插件,可以將array對象轉換為json對象,真的很好用哦,呵呵。
    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
    像上面那樣用就行了,很容易進行請求間的參數傳遞。
    項目地址為:http://code.google.com/p/jquery-json/

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

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

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

    nnd,今天搞了快2個小時,總是無法解決ldap支持的其他屬性返回問題,因為之前配置的是3.3.5版本,現在最新的版本是3.4.11,原來的配置竟然無法使用了,原來是因為增加服務:
    <bean id="serviceRegistryDao" class="org.jasig.cas.services.InMemoryServiceRegistryDaoImpl">
    導致無法返回principal的其他屬性到客戶端,其實象這樣配置即可:<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>
    如上所示,其中注冊的服務registeredServices
    默認是不允許返回其他屬性到客戶端的!!!!!,真的是很坑爹啊,不過,配置一下ignoreAttributes即可,也可以指定allowedAttributes
    如下:
    <property name="allowedAttributes">
        <list>
                <value><!-- your attribute key --></value>
        </list>
    </property>

    posted @ 2012-04-25 23:12 貝貝爸爸 閱讀(1329) | 評論 (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) | 評論 (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) | 評論 (0)編輯 收藏

    主站蜘蛛池模板: 免费99精品国产自在现线| 国产精品免费综合一区视频| 亚洲视屏在线观看| 在线观看无码的免费网站| 台湾一级毛片永久免费| 亚洲精品无码av中文字幕| 相泽亚洲一区中文字幕| 四虎在线成人免费网站| 小说区亚洲自拍另类| 久久精品国产精品亚洲艾草网| 成人免费午夜在线观看| 成人免费ā片在线观看| 亚洲国产精品综合久久20| 亚洲天堂中文字幕在线| 国产精品入口麻豆免费观看| 高潮毛片无遮挡高清免费 | 亚洲精品456在线播放| 国产婷婷高清在线观看免费| 一级毛片aaaaaa免费看| 国产成人高清亚洲一区久久| 久久精品国产亚洲AV高清热| 亚洲AⅤ视频一区二区三区| 亚洲第一成年网站视频| 亚洲av无码成h人动漫无遮挡| 女人18毛片水真多免费播放 | 国产成人免费手机在线观看视频 | 影音先锋在线免费观看| 精品亚洲永久免费精品| 亚洲爆乳无码一区二区三区| 美女被免费视频网站a国产| 91视频免费网址| 热久久这里是精品6免费观看 | 精品国产_亚洲人成在线| 综合自拍亚洲综合图不卡区| 亚洲人妻av伦理| 天天摸夜夜摸成人免费视频| 99精品视频免费在线观看| 中文字幕视频在线免费观看| 在线亚洲v日韩v| 亚洲精品国产av成拍色拍| 亚洲熟妇无码爱v在线观看|