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
import com.fasterxml.jackson.core.JsonGenerator | |
import com.fasterxml.jackson.databind.JavaType | |
import com.fasterxml.jackson.databind.ObjectMapper | |
import com.fasterxml.jackson.databind.SequenceWriter | |
import com.fasterxml.jackson.databind.SerializationFeature | |
import com.fasterxml.jackson.databind.SerializerProvider | |
import com.fasterxml.jackson.databind.annotation.JsonAppend | |
import com.fasterxml.jackson.databind.annotation.JsonSerialize | |
import com.fasterxml.jackson.databind.cfg.MapperConfig | |
import com.fasterxml.jackson.databind.introspect.AnnotatedClass |
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
import com.github.benmanes.caffeine.cache.CacheLoader | |
import com.github.benmanes.caffeine.cache.LoadingCache | |
import com.github.benmanes.caffeine.cache.Caffeine | |
import com.github.benmanes.caffeine.cache.RemovalCause | |
static def threadName() { | |
"${Thread.currentThread().name}}" | |
} | |
LoadingCache<Integer, Integer> cache = Caffeine.newBuilder() |
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
import groovy.sql.Sql | |
import groovy.transform.Canonical | |
import groovy.transform.Field | |
Sql casinoDb = Sql.newInstance('jdbc:oracle:thin:@host1:1521/testdb1', 'uname', 'passwd') | |
Sql ewDb = Sql.newInstance('jdbc:oracle:thin:@host2:1521/testdb' , 'uname', 'passwd') | |
def sourceDataSql = new File('/some/file/path.sql').text | |
@Canonical |
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.panbet.tree | |
import groovy.transform.ToString | |
import spock.lang.Shared | |
import spock.lang.Specification | |
/** | |
* Simple example of deep-first and breath-first tree traversal | |
* Sample tree | |
* <pre> |
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.panbet.tree | |
import org.apache.commons.io.IOCase | |
import org.apache.commons.io.monitor.FileAlterationListener | |
import org.apache.commons.io.monitor.FileAlterationMonitor | |
import org.apache.commons.io.monitor.FileAlterationObserver | |
import static org.apache.commons.io.filefilter.FileFilterUtils.* | |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<configuration scan="true" scanPeriod="30 seconds" debug="true"> | |
<property name="FILE_LOG_PATTERN" | |
value="%d{dd/MM HH:mm:ss:SS} %level [%thread] %logger{10} [%file:%line] %msg%n"/> | |
<property name="LOG_PATH" | |
value="#[[$logPrefix$]]#" /> | |
<!-- APPLICATION LOGGING--> |
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
import groovy.text.SimpleTemplateEngine | |
import java.lang.reflect.Method | |
def classFQN = args.length > 0? args[0]: System.exit(1) | |
Class<?> clazz = Class.forName(classFQN, false, getClass().getClassLoader()) | |
class BuilderTemplateWrapper { | |
final Class<?> clazz |
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
#EXTM3U | |
#EXTINF:2061, Норма современного языка | |
http://audio.vgtrk.com/listen?id=1359030 | |
#EXTINF:2539, Языковые изменения и проблемы орфографии | |
http://audio.vgtrk.com/listen?id=1360215 | |
#EXTINF:2105, Латиница и кириллица: соперники или союзники? | |
http://audio.vgtrk.com/listen?id=1360846 | |
#EXTINF:2223, Паронимы | |
http://audio.vgtrk.com/listen?id=1362651 | |
#EXTINF:2035, Омонимы |
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
interface DemoInterface { | |
HelloMsg sayHelloImpl(AddresseeRequest request); | |
@RequestMapping(value = "/hello") | |
default HelloMsg sayHello(@RequestBody AddresseeRequest request) { | |
return sayHelloImpl(request); | |
} | |
} | |
@RestController |
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
#EXTM3U | |
#EXTINF:1874, Metro-Goldwyn-Mayer | |
http://audio.vgtrk.com/listen?id=810182 | |
#EXTINF:1427, Xerox | |
http://audio.vgtrk.com/listen?id=810233 | |
#EXTINF:1491, Versace | |
http://audio.vgtrk.com/listen?id=810269 | |
#EXTINF:1463, Siemens | |
http://audio.vgtrk.com/listen?id=810321 | |
#EXTINF:1374, Хоккей |