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
public class WCC2012_23 { | |
Expression bestSolution = null | |
BigDecimal target = null | |
List list | |
enum Operation { | |
plus('+'), minus('-'), multiply('*'), div('/') | |
String symbol |
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
#!/usr/bin/env groovy | |
import java.util.regex.* | |
def inviteFileName = args[0] | |
def inviteFile = new File(inviteFileName) | |
def pattern = Pattern.compile('^ATTENDEE;CN=(.*);PARTSTAT=ACCEPTED:(.*)') | |
inviteFile.eachLine { line -> | |
def m = pattern.matcher(line) |
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.deluan.grails.util | |
import java.text.SimpleDateFormat | |
import com.grailsrocks.cacheheaders.DateFormatterThreadLocal | |
/** | |
* This class is used to force CacheHeadersService (from the cache-headers | |
* plugin) to generate http-dates in english. It MUST be used when the | |
* locale of your server is not English. | |
* <p/> |
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
class UtilFilters { | |
def filters = { | |
profiler(controller: '*', action: '*') { | |
before = { | |
request._timeBeforeRequest = System.currentTimeMillis() | |
} | |
after = { |
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/sh | |
# Author: Deluan (http://techbeats.deluan.com) | |
# Check if GRIFFON_HOME is set | |
if [ -z "$GRIFFON_HOME" -o ! -d "$GRIFFON_HOME" ]; then | |
echo "Error: GRIFFON_HOME not set" | |
exit 2 | |
fi | |
# Extract the default version and base path from GRIFFON_HOME |
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.deluan.gaelyk; | |
import org.springframework.beans.BeansException; | |
import org.springframework.context.ApplicationContext; | |
import org.springframework.context.ApplicationContextAware; | |
/** | |
* Wrapper to always return a reference to the Spring Application Context from | |
* within non-Spring enabled beans. Unlike Spring MVC's WebApplicationContextUtils | |
* we do not need a reference to the Servlet context for this. All we need is |
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
beans = { | |
log4jConfigurer(org.springframework.beans.factory.config.MethodInvokingFactoryBean) { | |
targetClass = "org.springframework.util.Log4jConfigurer" | |
targetMethod = "initLogging" | |
arguments = ["classpath:myapp/log4j.properties"] | |
} | |
... | |
} |