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]);
# ๊ฐ์ข… ์„ค์ •
Preferences > Settings - User > ์•„๋ž˜ ๋‚ด์šฉ ์ €์žฅ
------------------------------------------------------------
{
"font_face":"Bitstream Vera Sans Mono", // ํฐํŠธ
"font_size":11, // ํฐํŠธ ์‚ฌ์ด์ฆˆ
"ignored_packages":
[
"Vintage"
],