This file contains hidden or 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
setup_placeholders = (function() { | |
$.support.placeholder = false; | |
test = document.createElement('input'); | |
if('placeholder' in test) { | |
$.support.placeholder = true; | |
return function() {} | |
} else { | |
return function(){ |
This file contains hidden or 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
import org.gradle.api.plugins.jetty.internal.JettyPluginWebAppContext | |
apply plugin: "jetty" | |
def newResourceCollection(File... resources) { | |
shell = new GroovyShell(JettyPluginWebAppContext.class.classLoader) | |
shell.setProperty("resources", resources as String[]) | |
return shell.evaluate(file("resource_collection.groovy")) | |
} |
This file contains hidden or 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
import java.sql.CallableStatement; | |
import java.sql.PreparedStatement; | |
import java.sql.ResultSet; | |
import java.sql.SQLException; | |
import org.apache.ibatis.type.BaseTypeHandler; | |
import org.apache.ibatis.type.JdbcType; | |
import org.apache.ibatis.type.MappedJdbcTypes; | |
import org.apache.ibatis.type.MappedTypes; |
This file contains hidden or 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
def wait_to_done(progress, wait_time=120, mesg=""): | |
import time | |
for i in range(wait_time): | |
if mesg != "": | |
print "%s" % mesg, progress.getState() | |
if "failed" == progress.getState(): | |
return 0 | |
if i > 7: | |
# a work around for stuck wlst script | |
edit() |
This file contains hidden or 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
<?xml version="1.0" encoding="UTF-8"?> | |
<Configure class="org.eclipse.jetty.webapp.WebAppContext"> | |
<New class="org.eclipse.jetty.plus.jndi.Resource" id="DSTestll"> | |
<Arg /> | |
<Arg>jdbc/mysqlDScall</Arg> | |
<Arg> | |
<Call id="dsbyfact" class="com.alibaba.druid.pool.DruidDataSourceFactory" | |
name="createDataSource"> | |
<Arg> | |
<Map> |
This file contains hidden or 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
public class SpringThucydidesJUnitStories extends ThucydidesJUnitStories { | |
@Override | |
public InjectableStepsFactory stepsFactory() { | |
return SpringAutowiringThucydidesStepFactory.withStepsFromPackage(getRootPackage(), configuration()).andClassLoader(getClassLoader()); | |
} | |
public static class SpringAutowiringThucydidesStepFactory extends ThucydidesStepFactory { | |
private static volatile ConfigurableApplicationContext ctx; |
This file contains hidden or 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
@ControllerAdvice | |
public class CustomResponseEntityExceptionHandler extends ResponseEntityExceptionHandler { | |
@Override | |
protected ResponseEntity<Object> handleMethodArgumentNotValid(MethodArgumentNotValidException ex, HttpHeaders headers, HttpStatus status, WebRequest request) { | |
List<FieldError> fieldErrors = ex.getBindingResult().getFieldErrors(); | |
List<ObjectError> globalErrors = ex.getBindingResult().getGlobalErrors(); | |
List<String> errors = new ArrayList<>(fieldErrors.size() + globalErrors.size()); | |
String error; | |
for (FieldError fieldError : fieldErrors) { |
This file contains hidden or 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 spullara.util.concurrent; | |
import org.junit.BeforeClass; | |
import org.junit.Test; | |
import java.util.ArrayList; | |
import java.util.Arrays; | |
import java.util.List; | |
import java.util.concurrent.*; | |
import java.util.concurrent.atomic.AtomicBoolean; |
This file contains hidden or 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 beans | |
import org.springframework.core.io.ClassPathResource | |
// load configuration from the classpath | |
def url = new ClassPathResource('beans/simple.config').URL; | |
def config = new ConfigSlurper().parse(url); | |
beans { |
This file contains hidden or 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
<scheme name="Eclectide Monokai" version="142" parent_scheme="Default"> | |
<colors> | |
<option name="ADDED_LINES_COLOR" value="295622" /> | |
<option name="ANNOTATIONS_COLOR" value="b2c0c6" /> | |
<option name="CARET_COLOR" value="bbbbbb" /> | |
<option name="CARET_ROW_COLOR" value="" /> | |
<option name="CONSOLE_BACKGROUND_KEY" value="1c1c1c" /> | |
<option name="FILESTATUS_ADDED" value="629755" /> | |
<option name="FILESTATUS_DELETED" value="6c6c6c" /> | |
<option name="FILESTATUS_IDEA_FILESTATUS_DELETED_FROM_FILE_SYSTEM" value="6c6c6c" /> |
OlderNewer