Skip to content

Instantly share code, notes, and snippets.

View JeonghunLee's full-sized avatar
🤗
I may be slow to respond.

JeongHun (James) Lee JeonghunLee

🤗
I may be slow to respond.
View GitHub Profile
#include <stdio.h>
#include <stdlib.h>
typedef struct ListElmt_ {
void * data;
struct ListElmt_ *next;
}ListElmt;
typedef struct List_ {
#include <stdio.h>
/*
refer to
https://en.wikipedia.org/wiki/Breadth-first_search
*/
#define MAX_VERTEX 30
int visit[MAX_VERTEX]={0};
int map[MAX_VERTEX][MAX_VERTEX]={0};
#include <stdio.h>
/*
refer to
http://www.thecrazyprogrammer.com/2014/03/depth-first-search-dfs-traversal-of-a-graph.html
*/
#define MAX_MAPSIZE 50
#define SET_UNDIRECTIED_GRAPH
int map[MAX_MAPSIZE][MAX_MAPSIZE]={0}; //
/*
Quick sort example 3
*/
#include <stdio.h>
//SETTING QUICK SORT, PIVOT POSITION
#define PIVOT_LEFT
//#define PIVOT_RIGHT
#include <stdio.h>
#define MAX 50
int a[] = { 99, 11, 29, 44, 17, 55, 63, 05, 22, 42, 15, 12 ,21 };
int b[MAX];
int merge_merging(int src[], int dst[], int start, int mid, int end)
{
#include <stdio.h>
//refer to https://ko.wikipedia.org/wiki/%ED%9E%99_%EC%A0%95%EB%A0%AC
#define heap_parent(n) ((n-1)/2)
#define heap_left(n) ((2*n)+1)
#define heap_right(n) ((2*n)+2)
typedef enum{
SET_HEAPNULL=0,
SET_UPHEAP,
#include <stdio.h>
//http://stackoverflow.com/questions/101439/the-most-efficient-way-to-implement-an-integer-based-power-function-powint-int
/*
all exponential values (e.g.5) was chaged to 2 system
* check even or odd
<----------------------->
2^3 2^2 2^1 2^0
0b 1 0 1 0 : 10
/*
  Refer to https://github.com/meyerd/flex-bison-example
  Definitions
C코드 삽입시 %{, }% 기호
*/
%option noyywrap // flex
%{
#include <stdio.h>

[공통] 마크다운 markdown 작성법

1. 마크다운에 관하여

1.1. 마크다운이란?

**Markdown**은 텍스트 기반의 마크업언어로 2004년 존그루버에 의해 만들어졌으며 쉽게 쓰고 읽을 수 있으며 HTML로 변환이 가능하다. 특수기호와 문자를 이용한 매우 간단한 구조의 문법을 사용하여 웹에서도 보다 빠르게 컨텐츠를 작성하고 보다 직관적으로 인식할 수 있다. 마크다운이 최근 각광받기 시작한 이유는 깃헙(https://github.com) 덕분이다. 깃헙의 저장소Repository에 관한 정보를 기록하는 README.md는 깃헙을 사용하는 사람이라면 누구나 가장 먼저 접하게 되는 마크다운 문서였다. 마크다운을 통해서 설치방법, 소스코드 설명, 이슈 등을 간단하게 기록하고 가독성을 높일 수 있다는 강점이 부각되면서 점점 여러 곳으로 퍼져가게 된다.

1.2. 마크다운의 장-단점

1.2.1. 장점

1. Execute make first. This will result in a netlinkKernel.ko output among many others.
2. Execute $ gcc netlinkUser.c -o netlinkUser
3. Insert kernel module by :$ sudo insmod netlinkKernel.ko
4. Run ./netlinkUser to see message and run dmesg to see debug messages
5. Remove module by : $ sudo rmmod netlinkKernel
6. Finally make clean to remove output files.