-
Shape
클래스- 상속을 위한 클래스
private
접근자를 갖는name
필드가 존재Shape
클래스를 상속받는 클래스는getArea
메서드를 반드시 구현해야만 함getArea
메서드는 도형의 넓이를 반환
-
Rect
클래스
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* tcp socket programming (client-side) | |
* @author shj | |
*/ | |
// import module | |
const net = require('net'); | |
// create TCP socket | |
const client = new net.Socket(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* 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' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
동물원(X) :- | |
척추(X). | |
포유류(X) :- | |
척추(X), | |
not(알깜(X)). | |
조류(X) :- | |
척추(X), | |
알깜(X), |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- | |
file upload client | |
@author shj | |
--> | |
<input type="file" /> | |
<button>업로드</button> | |
<script> | |
// append event handler |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict'; | |
// import modules | |
const _ = require('lodash'); | |
const aws = require('aws-sdk'); | |
const randomEmoji = require('random-emoji'); | |
// aws lambda | |
const lambda = new aws.Lambda({ | |
region: 'ap-northeast-2', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const express = require('express'); | |
// Constants | |
const PORT = 8000; | |
// App | |
const app = express(); | |
app.get('/', function (req, res) { | |
res.send('Master'); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// https://rextester.com/KAY13591 | |
// import modules | |
#include <iostream> | |
// define Character class | |
class Character { | |
private: | |
// declare fields | |
int x; |