by

Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
    Scott Grogan
    @ninjascribble
    sweet
    ehee
    etetete
    aosenuthaoesunthaoeu
    Elrond
    @elrondshep
    
        <bean class="org.springframework.orm.jpa.support.PersistenceAnnotationBeanPostProcessor"/>
    
        <context:property-placeholder location="
            classpath:/properties/app.properties,
            classpath:/properties/jpa.properties,
            classpath:/properties/log4j.properties,
            classpath:/properties/encrypt.properties,
            classpath:/properties/db.properties,
            classpath:/properties/expression.properties,
            classpath:/properties/apiclient.properties,
            classpath:/properties/email.properties,
            classpath:/properties/job.properties"/>
    
        <bean id="dataSource" class="org.apache.commons.dbcp.BasicDataSource" destroy-method="close">
            <property name="driverClassName" value="${db.driverClass}" />
            <property name="url" value="${db.jdbcUrl}" />
            <property name="username" value="${db.username}" />
            <property name="password" value="${db.password}" />
             <property name="validationQuery" value="${db.validationQuery}" />
               <property name="removeAbandoned" value="true"/>
            <property name="initialSize" value="${db.connection.pool_size}"/>
               <property name="maxActive" value="${db.connection.max_pool_size}" />
       </bean>
    
        <bean id="entityManagerFactory" class="org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean">
            <property name="dataSource" ref="dataSource" />
            <property name="persistenceUnitName" value="${jpa.persistenceUnitName}" />
            <property name="jpaVendorAdapter"> 
                <bean class="org.springframework.orm.jpa.vendor.HibernateJpaVendorAdapter"> 
                    <property name="databasePlatform" value="${jpa.dialect}"/>
                    <property name="showSql" value="${jpa.showSQL}" />
                </bean>
            </property>
            <property name="jpaPropertyMap">
                <map>
                    <!-- Connection release fix -->
                    <entry key="hibernate.connection.release_mode" value="${jpa.release_mode}" />
                    <entry key="hibernate.dialect" value="${jpa.dialect}" />
                </map>
            </property>
        </bean>
    
        <!--
        JPA Specific:
    
        Use a local resource transaction manager (rather than JTA) as we will only ever be
        accessing the active database in one transaction.
        -->
        <bean id="transactionManager" class="org.springframework.orm.jpa.JpaTransactionManager">
            <property name="entityManagerFactory" ref="entityManagerFactory" />
        </bean>
    Ben McEldowney
    @bmceldowney
    wat
    Scott Grogan
    @ninjascribble
    wat wat?
    Ben McEldowney
    @bmceldowney
    this seems pretty l33t
    Scott Grogan
    @ninjascribble
    indeed
    Elrond
    @elrondshep
    db.driverClass=com.mysql.jdbc.Driver
    db.jdbcUrl=jdbc:mysql:replication://192.168.3.52,192.168.3.52/traceregister_demo?loadBalanceBlacklistTimeout=5000&loadBalanceConnectionGroup=ugc&loadBalanceEnableJMX=true&autoReconnect=true&autoReconnectForPools=true&useUnicode=true&characterEncoding=UTF-8
    db.username=
    db.password=
    db.validationQuery=select 1
    Scott Grogan
    @ninjascribble
    I'll get the rest of the team an invite as soon as I figure out what their usernames are ;)
    Elrond
    @elrondshep
    jpa.persistenceUnitName=trPU
    jpa.dialect=org.hibernate.dialect.MySQLDialect
    jpa.showSQL=false
    jpa.release_mode=after_transaction
    <?xml version="1.0" encoding="UTF-8"?>
    <persistence version="2.0"
        xmlns="http://java.sun.com/xml/ns/persistence"
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xsi:schemaLocation="http://java.sun.com/xml/ns/persistence
                            http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd">
    
        <persistence-unit name="trPU" transaction-type="RESOURCE_LOCAL"/>
    
    </persistence>
    Ben McEldowney
    @bmceldowney
    describe('_getExpirationPredicate', function () {
        it('should return truthy if a user has passed the expiration date', function (done) {
            user.getUsermeta().then(function (usermeta) {
                module._getExpirationPredicate(4)(usermeta[0]).should.not.be.ok();
    
                usermeta[0].meta_value = '2013-03-01 07:35:26';
                module._getExpirationPredicate(10)(usermeta[0]).should.be.ok();
    
                done();
            });
        });
    });
    Scott Grogan
    @ninjascribble
    Waow, so shiny
    Ben McEldowney
    @bmceldowney
    what's the best/easiest way to add a modal to wordpress? should I look at plugins?
    Elrond
    @elrondshep
    
            <dependency>
                <groupId>org.springframework</groupId>
                <artifactId>spring-jdbc</artifactId>
                <version>${spring.version}</version>
                <type>jar</type>
                <scope>compile</scope>
            </dependency>
            <dependency>
                <groupId>org.springframework</groupId>
                <artifactId>spring-orm</artifactId>
                <version>${spring.version}</version>
                <type>jar</type>
                <scope>compile</scope>
            </dependency>
            <dependency>
                <groupId>org.springframework</groupId>
                <artifactId>spring-tx</artifactId>
                <version>${spring.version}</version>
                <type>jar</type>
                <scope>compile</scope>
            </dependency>
    <tx:annotation-driven transaction-manager="transactionManager" order="10" />
    sudo launchctl unload /Library/LaunchDaemons/org.jenkins-ci.plist
    Daniel Harrie
    @dharrie
    Let's see, so...
    var http = require('http')
    var bl = require('bl')
    var results = []
    var count = 0
    
    function printResults () {
      for (var i = 0; i < 3; i++)
        console.log(results[i])
    }
    
    function httpGet (index) {
      http.get(process.argv[2 + index], function (response) {
        response.pipe(bl(function (err, data) {
          if (err)
            return console.error(err)
    
          results[index] = data.toString()
          count++
    
          if (count == 3) // yay! we are the last one!
            printResults()
        }))
      })
    }
    
    for (var i = 0; i < 3; i++)
      httpGet(i)
    Just for kicks, here's my version (I like it better, mostly)
    var http = require('http');
    var bl = require('bl');
    var urls = process.argv.splice(2, 5);
    var results = [];
    
    function checkCompletness() {
        var done = urls.every(function(url, index) {
            return !!results[index];
        });
    
        if (done) {
            results.forEach(function(result) {
                console.log(result);
            });
        }
    }
    
    urls.forEach(function(url, index) {
        http.get(url, function(response) {
            response.pipe(bl(function (err, data) {
                if (err)
                    return console.error(err);
                results[index] = data.toString();            
                checkCompletness();
            }));
        });
    });
    Yay, I broke it! ;)
    This message was deleted
    Daniel Harrie
    @dharrie
    Neat, it let me edit it until it worked. Leading spaces are important.