Skip to content

Instantly share code, notes, and snippets.

View wicksome's full-sized avatar
🪐
programming happily everyday

yeongjun.kim wicksome

🪐
programming happily everyday
View GitHub Profile
@wicksome
wicksome / DaemonThread.java
Created August 2, 2014 15:30
데몬 쓰레드 예제
public class DaemonThread implements Runnable {
public static void main(String[] args) {
Thread th = new Thread(new DaemonThread());
th.setDaemon(true);
th.start();
try {
Thread.sleep(1000);
} catch (InterruptedException e) {
e.printStackTrace();
@wicksome
wicksome / test.py
Created August 2, 2014 15:34
lab_test
print ("test")
temp = input("input : ")
print (temp)
# ctrl+k,I : gist 보내기
# ctrl+k,O : gist 불러오기
# ctrl+k,S : gist 업데이트
@wicksome
wicksome / extract_chart_1.py
Created August 2, 2014 16:30
BeautifulSoup로 웹 일부분 추출하기
# -*- coding: UTF-8 -*-
from bs4 import BeautifulSoup
import codecs
def get_html():
with codecs.open('melon_weekly.html', 'r', "utf-8") as f:
html = f.read()
return html
def extract_chart():
@wicksome
wicksome / Handler_1.java
Created August 21, 2014 07:25
handler_1
public class ThreadHandlerTest extends Activity {
TextView tvTest;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_test);
tvTest = (TextView) findViewById(R.id.tv_test);
@wicksome
wicksome / Handler_2.java
Last active August 29, 2015 14:05
더 간단한 코드
public class ThreadHandlerTest extends Activity {
TextView tvTest;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_test);
tvTest = (TextView) findViewById(R.id.tv_test);
@wicksome
wicksome / Handler_3.java
Last active August 29, 2015 14:05
분리된 클래스
public class ThreadHandlerTest extends Activity {
TextView tvTest;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_test);
tvTest = (TextView) findViewById(R.id.tv_test);
@wicksome
wicksome / factorial.py
Created August 21, 2014 16:18
파이썬 3 팩토리얼
def factorial(x):
if(x == 1):
return x
return x * factorial(x-1)
@wicksome
wicksome / GPSOnSecondThread.java
Last active August 29, 2015 14:05
안드로이드에서 gps 사용 코드, 데몬스레드 사용
import android.app.Activity;
import android.app.AlertDialog;
import android.content.Context;
import android.content.DialogInterface;
import android.content.Intent;
import android.location.Location;
import android.location.LocationListener;
import android.location.LocationManager;
import android.os.Bundle;
import android.os.Handler;
@wicksome
wicksome / NetworkExam.c
Last active August 29, 2015 14:08
네트워크 2014.11.05 수업 준비
#include <WinSock2.h>
#include <stdio.h>
int main(int argc, char **argv) {
WSADATA WSAData;
struct hostent *myent;
// B. 인터넷 주소를 가져오지 못할 경우 에러 처리.
if(argc != 2) {
printf("Usage : %s [ineternet address]\n", argv[0]);
@wicksome
wicksome / 서브라임텍스트 설정
Created February 23, 2015 20:30
sublimetext_setting
# 각종 설정
Preferences > Settings - User > 아래 내용 저장
------------------------------------------------------------
{
"font_face":"Bitstream Vera Sans Mono", // 폰트
"font_size":11, // 폰트 사이즈
"ignored_packages":
[
"Vintage"
],