Skip to content

Instantly share code, notes, and snippets.

@Gumball12
Gumball12 / swap.c
Last active October 13, 2019 05:09
swap fucntion
#include <stdio.h>
/**
* swap function
* @param xp pointer x
* @param yp pointer y
* */
void swap(long *xp, long *yp) {
// define temporary values
long temp0 = *xp;
@Gumball12
Gumball12 / index.c
Last active October 12, 2019 09:02
compute RTT values
/**
* compute RTT values
* (DevRTT, EstimatedRTT, TimeoutInterval)
* @author shj <https://github.com/Gumball12>
* */
// import module
#include <stdio.h>
#include <stdlib.h> // for absolute value function 'abs'
@Gumball12
Gumball12 / tcp-client.js
Created October 4, 2019 16:40
tcp/udp socket program
/**
* tcp socket programming (client-side)
* @author shj
*/
// import module
const net = require('net');
// create TCP socket
const client = new net.Socket();
@Gumball12
Gumball12 / integer-addition.c
Last active October 3, 2019 15:15
side effects of type conversion, integer addition
// cs-assignment 2-4 "Byte Manipulation - Integer Addition"
// @author shj
// import modules
#include <stdio.h>
#include <limits.h> // for get limits the values of various variable types
/**
* integer addition with unsigned short int type
* @param a first operand
@Gumball12
Gumball12 / index.c
Last active September 28, 2019 09:55
Bit-level operation
// cs-assignment 2-2 "Byte Manipulation - Byte Level Operation"
// @author shj
// import modules
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
#define STR_SIZE 10 // string size
#define TESTING_TIMES 30 // for unit-testing
@Gumball12
Gumball12 / README.md
Last active October 4, 2021 10:53
Byte converter implemented by C lang (random int, double, char, string => byte)

Byte Converter

random int, double, char, string => byte

flow chart

@Gumball12
Gumball12 / w1-1.cpp
Last active November 21, 2019 07:32
19-2h tutoring https://git.io/Je4r2
// https://rextester.com/KAY13591
// import modules
#include <iostream>
// define Character class
class Character {
private:
// declare fields
int x;
@Gumball12
Gumball12 / README.md
Last active September 24, 2019 07:52
학술정보검색 실습
  • ref는 언제나 꼭 달자 => 신뢰성 높아짐

    • 꼭 ref 달 때 아니라도 굉장히 유용한 정보들을 얻을 수 있을듯
  • ref 검색방법

    • 도서관 홈페이지 (없으면 원문복사신청)
      • 도서관의 통합검색 (개좋은듯)
      • 물론 해외 자료도 가능
    • 학술DB (RISS, NDSL, 국회도서관)
      • 도서관 홈페이지 통해서 가면 됨. 학교에서 구매한 유료자료 볼 수 있기 때문
  • 물론 구매안한 자료도 있기에, 원문복사신청

@Gumball12
Gumball12 / assignment-1.c
Last active September 22, 2019 13:03
CSAPP assignments
// import modules
#include <stdio.h>
#include <limits.h>
#include <stdlib.h>
// define Stack struct
struct Stack {
int* arr;
int top;
unsigned length;
@Gumball12
Gumball12 / README.md
Last active September 15, 2019 12:19
for traceroute assignment