This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// http://mybatis.googlecode.com/svn/trunk/src/test/java/org/apache/ibatis/submitted/sptests/SPTest.java | |
Class.forName("org.hsqldb.jdbcDriver"); | |
conn = DriverManager.getConnection("jdbc:hsqldb:mem:sptest", "sa", ""); | |
Reader reader = Resources.getResourceAsReader("org/apache/ibatis/submitted/sptests/CreateDB.sql"); | |
ScriptRunner runner = new ScriptRunner(conn); | |
runner.setDelimiter("]"); | |
runner.setLogWriter(null); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Lefalet shortcuts for common tile providers - is it worth adding such 1.5kb to Leaflet core? | |
L.TileLayer.Common = L.TileLayer.extend({ | |
initialize: function (options) { | |
L.TileLayer.prototype.initialize.call(this, this.url, options); | |
} | |
}); | |
(function () { | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
abstract class MyBaseGebTest extends GebReportingTest { | |
SessionFactory sessionFactory = ApplicationHolder.application.mainContext.sessionFactory | |
def inTransaction(closure) { | |
inNewSession { | |
TransactionRunner.getInstance().runInNewTransaction(closure) | |
} | |
} | |
def inNewSession(closure) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# | |
# Copyright (C) 2013, Roberto C. Morano <rcmova@gmail.com> | |
# | |
# This software is free software; you can redistribute it and/or modify | |
# it under the terms of the GNU General Public License as published by | |
# the Free Software Foundation; either version 2 of the License, or | |
# (at your option) any later version. | |
# | |
# This software is distributed in the hope that it will be useful, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# | |
# Copyright (C) 2013, Roberto C. Morano <rcmova@gmail.com> | |
# | |
# This software is free software; you can redistribute it and/or modify | |
# it under the terms of the GNU General Public License as published by | |
# the Free Software Foundation; either version 2 of the License, or | |
# (at your option) any later version. | |
# | |
# This software is distributed in the hope that it will be useful, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//grails-app/conf/BootStrap.groovy | |
import org.vertx.java.platform.PlatformLocator | |
class BootStrap { | |
def vertxPlatformManager | |
def init = { servletContext -> | |
vertxPlatformManager = PlatformLocator.factory.createPlatformManager() | |
URL[] classpath = [new File('./src/verticles').toURI().toURL()] | |
vertxPlatformManager.deployVerticle( |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding: utf-8 -*- | |
from selenium import webdriver | |
from selenium.webdriver.support import ui | |
from selenium.common.exceptions import NoSuchElementException, TimeoutException | |
def create_browser(): | |
profile = webdriver.FirefoxProfile() | |
profile.set_preference('permissions.default.image', 2) | |
profile.update_preferences() | |
return webdriver.Firefox(profile) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.danveloper.springboot | |
import org.springframework.beans.factory.annotation.Autowired | |
import org.springframework.boot.SpringApplication | |
import org.springframework.boot.autoconfigure.EnableAutoConfiguration | |
import org.springframework.context.ApplicationContext | |
import org.springframework.context.annotation.Bean | |
import org.springframework.context.annotation.Configuration | |
import org.springframework.integration.dsl.groovy.IntegrationContext | |
import org.springframework.integration.dsl.groovy.builder.AbstractIntegrationBuilderModuleSupport |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.alkalinezoo.transform | |
import java.lang.annotation.Target | |
import java.lang.annotation.ElementType | |
import java.lang.annotation.Retention | |
import java.lang.annotation.RetentionPolicy | |
import org.codehaus.groovy.transform.GroovyASTTransformationClass | |
/** | |
* Simple annotation that when used on a class adds two new fields of type {@code java.util.Date} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
task(console, dependsOn: 'classes', type: JavaExec) { | |
main = 'groovy.ui.Console' | |
classpath = sourceSets.main.runtimeClasspath | |
} |
OlderNewer