Skip to content

Instantly share code, notes, and snippets.

View jangsoopark's full-sized avatar
:octocat:
asdf

jangsoo park jangsoopark

:octocat:
asdf
View GitHub Profile
int my_fprintf(FILE* fp, char* str, ...)
{
va_list arg;
char *y;
int i, len = 0;
char *atr;
int num;
char arr[100];
char arrprint[100];
set nocompatible " vim을 기본으로 사용
set history=1000 " vi 편집기록을 1000개 까지 ~/.viminfo에 기록
set ruler " 현재 커서 위치를 하단에 출력
set nu " vim 에디터 좌측에 라인 수 출력
set background=dark " 배경색을 어두운 색으로 변경
set tabstop=3 " 탭 간격을 3으로 설정
set shiftwidth=3 " 들여쓰기 간격을 3으로 설정
set softtabstop=3 " 탭 삭제시 간격
set visualbell " 경고음 대신 화면에 표시 (깜빡임으로)
set cindent " C 언어 스타일의 들여쓰기
/*
* ksocket project test sample - tcp server
* BSD-style socket APIs for kernel 2.6 developers
*
* @2007, China
* @song.xian-guang@hotmail.com (MSN Accounts)
*
* This code is licenced under the GPL
* Feel free to contact me if any questions
*
#pragma once
template <class T>
class LeftistNode
{
private:
T data;
int shortest;
LeftistNode<T> *pLeft;
LeftistNode<T> *pRight;
@jangsoopark
jangsoopark / ll.c
Last active December 29, 2015 22:58
#include <stdio.h>
#include <stdlib.h>
struct A {
int num;
struct A* next;
};
//global variable
struct A *ptr = NULL; // for list tour
#pragma once
#include <utility>
#include "TreeNode.h"
#define ITERATIVE
template <typename K, typename E> class BST
{
#include <iostream>
inline bool isOdd(int num)
{
return num & 0x01;
}
inline bool numberCheck(int num1, int num2)
{
if (isOdd(num1) & isOdd(num2))
return true;
@jangsoopark
jangsoopark / ksocket.c
Last active October 13, 2016 16:35
ksocket (kerner socket library) reference : http://ksocket.sourceforge.net/
/*
* ksocket project
* BSD-style socket APIs for kernel 2.6 developers
*
* @2007-2008, China
* @song.xian-guang@hotmail.com (MSN Accounts)
*
* This code is licenced under the GPL
* Feel free to contact me if any questions
*
@jangsoopark
jangsoopark / cli.py
Created December 5, 2016 23:32
Python - Simple TCP chatting Server/Client
#!/usr/bin/python
# -*- coding: utf-8 -*-
'''
Created on 2013. 8. 5.
@author: kangstar
'''
from socket import *
from bs4 import BeautifulSoup
import requests
url = 'http://finance.naver.com/news/news_read.nhn?article_id=0003970730&office_id=008&mode=search&query=%BB%EF%BC%BA&page=1'
response = requests.get(url)
web_data = response.content