Skip to content

Instantly share code, notes, and snippets.

I enjoy

Taeho Kim dittos

I enjoy
Block or report user

Report or block dittos

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View generic.ts
interface X<T> {
// m(o: T): void; // is ok
(o: T): void;
class A {
f: X<this>;
class B extends A {
dittos /
Created Sep 3, 2018
Saving lazy-loaded entity with IdClass throws TypeMismatchException
package org.sapzil;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.Id;
import javax.persistence.IdClass;
import javax.persistence.ManyToOne;
dittos / Application.kt
Last active Nov 2, 2017
Kotlin data class + JPA
View Application.kt
package org.sapzil
import org.springframework.boot.autoconfigure.SpringBootApplication
open class Application
View gist:0abf8b6dc79d08d6700e9c04b87dfc7f
def sizeOf[T](x:T, y:T): (Long, Long) = {
val buf = new ByteArrayOutputStream
val oos = new ObjectOutputStream(buf)
val initSize = buf.size
val size = buf.size - initSize
import sys
from ctypes import *
from math import isfinite
1) 수식을 파이썬 바이트코드로 컴파일
수식이 바이트코드로 컴파일 될 때 constant folding이 돼서 너무 간단해져 버리지 않도록 함
lineno table에서 연속된 두 바이트코드의 실제 코드상 라인 번호가 255 이상 차이나면 최적화하지 않는 것을 이용
dittos /
Last active Dec 6, 2015
Possibility of React + GWT?
import static react.ReactDOM.*;
class TodoList extends ReactComponent {
public static final ReactProp<List<TodoItem>> ITEMS = ReactProp.create();
public static ReactElement.Builder<TodoList> builder() {
return ReactElement.builder(TodoList.class);
public ReactElement render() {
View Task
  • 쓰레드가 N개인 쓰레드 풀이 있습니다.
  • 들어오는 태스크에는 Key가 있어서, Key가 같은 태스크끼리는 들어오는 순서대로 실행되어야 합니다.


Pool Size = 4
dittos / Relay
Last active Aug 29, 2015
Relay Internals
View Relay
dittos /
Last active Aug 29, 2015
@Code_60: Sorting
import sys
from wand.image import Image
from wand.color import Color
from wand.drawing import Drawing
with Image(filename=sys.argv[1]) as img:
pixels = []
for row in img:
for col in row:
dittos / IconButton.rsx
Last active Aug 29, 2015
React Component Container Format
View IconButton.rsx
name: IconButton
required: true
type: string
description: A button text.
example: Click Me!
required: true
type: string
You can’t perform that action at this time.