Skip to content

Instantly share code, notes, and snippets.

update bar set text = 'aaa', text2 = 'bbb' where id = 2043;
update bar set (text, text2) = ('aaa', 'bbb') where id = 2043;
update bar set text1 = 'aaa', text2 = 'bbb' where id = 2043;
update bar set (text1, text2) = ('aaa', 'bbb') where id = 2043;
@shiraji
shiraji / jdk_setting
Last active August 26, 2018 03:57
JDK export settings for Kontribution
export JAVA_HOME=`/usr/libexec/java_home -v "1.8"`
export JDK_16=`/usr/libexec/java_home -v "1.6"`
export JDK_17=`/usr/libexec/java_home -v "1.7"`
export JDK_18=`/usr/libexec/java_home -v "1.8"`
export JDK_9=`/usr/libexec/java_home -v "10"`
@shiraji
shiraji / ExtDebugTree.java
Last active May 19, 2018 00:33
ExtDebugTree
/*
* Copyright (C) 2015 Yoshinori Isogai
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
private val place = XmlPatterns.psiElement(XmlToken::class.java)
.withText(DUMMY_IDENTIFIER_TRIMMED)
.withParent(XmlPatterns.xmlText()
.withParent(XmlPatterns.psiElement(XmlTag::class.java)
.withName(RESOURCES_TAG_NAME)
)
)

Keybase proof

I hereby claim:

  • I am shiraji on github.
  • I am shiraji (https://keybase.io/shiraji) on keybase.
  • I have a public key ASD4HKt981CfrQZ0X25kUZNZwE2gEE3zPCWX1gXSvaYVwwo

To claim this, I am signing this object:

@Throws(Exception::class)
fun hour10minute10_answer115degree2() {
"10:10".let { time ->
GetClockHandsDegree(DegreeCalcService()).execute(time).let {
println("(degree-min (clock-degree (clock-str \"$time\")) -> ${it.value} == 115")
Assert.that(it.value == 115,
"$time actual:${it.value} expected:" + 115)
}
}
repositories {
mavenCentral()
}
apply plugin: 'jacoco'
// Specify latest jacoco, else use default
jacoco {
version '0.7.5.201505241946'
}
interface I {
fun foo()
}
object O : I {
override fun foo() {
println("Foo!!!")
}
}
@shiraji
shiraji / EnumAdapter.kt
Created January 19, 2017 09:44
Android-Orma EnumAdapter
@StaticTypeAdapter(targetType = Enum::class, serializedType = String::class)
class EnumAdapter {
companion object {
@JvmStatic
fun <T : Enum<T>> serialize(source: T): String {
return source.name
}
@JvmStatic
@shiraji
shiraji / README.md
Last active December 11, 2016 17:46

Kotlinで気持ちいい!と思ったけど、落選した項目