Skip to content

Instantly share code, notes, and snippets.

View LectomT's full-sized avatar
🍺
not Drunken but Drinking

Lectom LectomT

🍺
not Drunken but Drinking
View GitHub Profile
"이 옵션은 트랜잭션에서 수행되는 메소드 성능 추적이나 특정 메소드에 대한 추적 작업을 사용자 정의로 구현하기 위해 사용한다.
package jennifer.base.profile;
public interface IAdapterCustomMethod
{
public Object start(int originHash, String originFullDescriptor, int hash, String fullDescriptor, Parameter parameter);
public void end(Object returnValue, Object stat, Throwable throwable);
}
@LectomT
LectomT / primeOf10001stC.py
Last active December 29, 2015 12:19
10001번째 소수. 체크로직을 이용.
import time
start = time.time()
def is_prime(v):
i = 2
while True:
if (v % i) == 0:
return False
elif (i * i) > v:
return True
@LectomT
LectomT / primeOf10001st.py
Last active December 29, 2015 10:28
10001번째 소수
import time
start = time.time()
import math
prime = [2]
count_prime = 1
number = 3
while count_prime < 10001:
for p in prime:
if (number % p ) == 0 :
@LectomT
LectomT / install message
Last active December 29, 2015 07:39
Try to install psycopg2 on MacOSX 10.9, Python 2.7.6, virtualenv 1.9.1
(env)lectom:env$ pip install psycopg2
Downloading/unpacking psycopg2
Downloading psycopg2-2.5.1.tar.gz (684kB): 684kB downloaded
Running setup.py egg_info for package psycopg2
Installing collected packages: psycopg2
Running setup.py install for psycopg2
building 'psycopg2._psycopg' extension
/usr/bin/clang -fno-strict-aliasing -fno-common -dynamic -arch i386 -arch x86_64 -g -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -DPSYCOPG_DEFAULT_PYDATETIME=1 -DPSYCOPG_VERSION="2.5.1 (dt dec pq3 ext)" -DPG_VERSION_HEX=0x090301 -DPSYCOPG_EXTENSIONS=1 -DPSYCOPG_NEW_BOOLEAN=1 -DHAVE_PQFREEMEM=1 -I/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -I. -I/Applications/Postgres93.app/Contents/MacOS/include -I/Applications/Postgres93.app/Contents/MacOS/include/postgresql/server -c psycopg/psycopgmodule.c -o build/temp.macosx-10.6-intel-2.7/psycopg/psycopgmodule.o
/usr/bin/clang -fno-strict-aliasing -fno-common -dynamic -arch i386 -arch x86_64 -g -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-pr
@LectomT
LectomT / quiz.io
Created October 27, 2013 08:34
Devon 2013 대안언어 축제 Quiz.io 문제는: https://gist.github.com/dahlia/e7ebd78da2ce363af308
Number json := method(self asString)
true json := method(self asString)
false json := method(self asString)
nil json := method("null")
Sequence json := method("\"" .. self asMutable replaceSeq("\\", "\\\\") replaceSeq("\"", "\\\"") .. "\"")
List json := method("[" .. self map(a, a json) join(",") .. "]")
Map json := method(
"{" .. self map(k, v, k json .. ":" .. v json) join(",") .. "}"
)
<!DOCTYPE html>
<html>
<head>
<title>First font size change</title>
</head>
<body>
<p style = "font-size: 8px"> Some text for you to make tiny! </p>
<p style = "font-size: 12px"> Some text for you to make normal size!</p>
<p style = "font-size: 44px"> Some text for you to make super big!</p>
</body>