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
#!/bin/bash | |
# | |
# 편의상 자동으로 child.sh을 만든다. | |
# | |
cat <<'EOF' > child.sh | |
#!/bin/bash | |
echo $(plus_fun $(($1 * $2)) ) | |
EOF | |
chmod +x child.sh |
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 <limits.h> | |
#include <stdio.h> | |
#include <stdlib.h> | |
/* | |
gcc zerosum.c -o zerosum -ansi -fno-asm -O2 -Wall -lm | |
*/ | |
void printBuf(int *buf, int num) | |
{ |
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
# | |
# ex3-1.R | |
# | |
# matrix exercise | |
# | |
Q <- matrix(c(50,60,80,100,150,200,30,40,70), nrow=3) | |
colnames(Q) <- c("5Kg", "10Kg", "15Kg") | |
rownames(Q) <- c("Shop A", "Shop B", "Shop C") | |
P <- matrix(c(10.60, 17.20, 22.50)) |
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
# | |
# ex 4-1 | |
# | |
a <- list(1, "abc", FALSE) | |
mode(a[[2]]) | |
typeof(a[[2]]) | |
# | |
# ex 4-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
// | |
// ViewController.swift | |
// | |
// Technical Q&A QA1702 | |
// How to capture video frames from the camera as images using AV Foundation on iOS | |
// | |
import UIKit | |
import AVFoundation | |
import CoreMedia |
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
#!/bin/bash | |
if [ -z "$2" ];then | |
echo "Usage: $(basename $0) <DIR1> <DIR2>" | |
echo " $(basename $0) /home/exercise/src /home/exercise/dst" | |
exit 1 | |
fi | |
DIR1=$1 | |
DIR2=$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
# Exercises at http://r-exercises.com/2016/02/14/mode-exercises/ | |
# 1. | |
mode(c('a', 'b', 'c')) | |
typeof(c('a', 'b', 'c')) | |
mode(3.32e16) | |
typeof(3.32e16) | |
mode(1/3) | |
typeof(1/3) | |
mode(sqrt(-2i)) |
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
Object.prototype.extendedValue = "extended"; | |
var obj1 = { | |
prop1: "value1", | |
prop2: "value2" | |
}; | |
var property; | |
for (property in obj1) { | |
console.log(property + ":" + obj1[property]); |
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
#!/bin/bash | |
# | |
# input 파일 형식 | |
# name value | |
# 공백은 무시 | |
# | |
# sort를 해서 같은 name끼리 먼저 모아준다. | |
# 이름이 변경되는 시점에 기존 name에 대한 sub total을 찍어준다. |
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
// npm i reflect-metadata --save | |
//import "reflect-metadata"; | |
import "core-js" // Using Symbol for ES5 target | |
@sealed | |
class Greeter { | |
@propertyDecorator | |
private _greeting: string; | |
constructor(message: string) { |
OlderNewer