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
test1 <- read.csv("~/Dropbox/rcv/test1/total.csv") | |
plot(test1$centralized, | |
xaxt="n", | |
ylim=c(0,12500), | |
xlab="Number of Message", | |
ylab="Transfer Time(sec)", | |
type="l", | |
lty=1, | |
lwd=2) | |
axis(1,at=1:length(test1$msg),labels=test1$msg) |
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> | |
int main(void) | |
{ | |
int t,n,i,f0[41],f1[41]; | |
f0[0]=1; | |
f0[1]=0; | |
f1[1]=1; | |
f1[0]=0; | |
scanf("%d",&t); |
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
pm10 <- data.frame(read.csv("~/Develop/Java/CSN-System/pm10.csv")) | |
id_2200501 <- sqldf("SELECT * FROM pm10 WHERE id = 2200501") | |
id_2030601 <- sqldf("SELECT * FROM pm10 WHERE id = 2030601") | |
id_2000901 <- sqldf("SELECT * FROM pm10 WHERE id = 2000901") | |
id_2001001 <- sqldf("SELECT * FROM pm10 WHERE id = 2001001") | |
plot(id_2200501$value, xaxt="n", ylim=c(0,300), xlab="Time", ylab="PM10(ug/m^3)", type="l", lty=1, lwd=2) | |
lines(id_2030601$value, col="firebrick", lty=1, lwd=2) | |
lines(id_2000901$value, col="dodgerblue4", lty=1, lwd=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
void decToBin(int x) { | |
if(x == 1) | |
cout << x; | |
else { | |
decToBin(x/2); | |
cout << x%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
def factorial(n: Int): Int = { | |
def loop(acc: Int, n: Int): Int = | |
if (n == 0) acc | |
else loop(acc*n, n-1) | |
loop(1, n) | |
} |
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
# coding: utf-8 | |
from xlrd import open_workbook | |
wb = open_workbook('simple.xls') | |
for sheet in wb.sheets(): | |
print(u'Sheet:' + sheet.name) | |
print("Number of Sheets: " + str(wb.nsheets)) |
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
# coding: utf-8 | |
from xlwt import Workbook | |
book = Workbook() | |
sheet1 = book.add_sheet(u'Ex Sheet1') | |
sheet2 = book.add_sheet(u'Ex Sheet2') | |
sheet1.write(0,0, u'Name') | |
sheet1.write(0,1, u'Sex') |
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
//Arduino Sample Code for SHT1x Humidity and Temperature Sensor | |
//www.DFRobot.com | |
//Version 1.0 | |
#include <SHT1x.h> | |
// Specify data and clock connections and instantiate SHT1x object | |
#define dataPin 10 | |
#define clockPin 11 | |
SHT1x sht1x(dataPin, clockPin); |
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
float tempC; | |
int reading; | |
int tempPin = 0; | |
void setup() | |
{ | |
Serial.begin(9600); | |
analogReference(INTERNAL); | |
} | |
void loop() | |
{ |
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
package nfm.ex06 | |
/** | |
* Programming In Scala 2/e List 6.5 코드 | |
* 분수 Class | |
* @param n 분자 | |
* @param d 분모 | |
*/ | |
/* 스칼라에 있는 문법: Class에서 기본 생성자 선언 가능 |