Skip to content

Instantly share code, notes, and snippets.

@zion830
zion830 / learnyounode-official-answer.md
Last active February 25, 2019 06:11
[NodeSchool] learnyounode 도전과제 소스코드

learnyounode 공식풀이

정답을 맞췄을 때 출력되는 공식 해답

STEP 2

    var result = 0

    for (var i = 2; i < process.argv.length; i++) {
      result += Number(process.argv[i])
@zion830
zion830 / how-to-npm-study.md
Created February 25, 2019 09:55
[NodeSchool] how-to-npm 소스코드

how-to-npm 스터디

STEP 1

how-to-npm verify

STEP 2

npm init
@zion830
zion830 / node-todo-study1.md
Last active February 27, 2019 05:20
구름EDU TODO 앱 코스 스터디

Node.js로 TODO 앱 만들기 스터디

Node.js를 설치하고 프로젝트를 실행한다.

Node.js 설치

터미널에 아래의 명령어를 입력한다.

sudo apt-get update
sudo apt-get install nodejs
@zion830
zion830 / node-express-step-by-step.md
Last active March 6, 2019 09:32
express로 간단한 웹 앱 만들기 단계별 코드

STEP 1

var express = require('express');
var app = express(); // express 객체를 반환

STEP 2

var express = require('express');
var app = express(); // express 객체를 반환
@zion830
zion830 / node-express-step-by-step2.md
Last active March 8, 2019 09:26
node.js 를 이용한 웹앱 제작 실습 단계별 코드

간단한 TODO 앱 만들기

사용하는 npm

  • express
  • body-parser
  • jade (생코에선 jade지만 지금은 pug로 이름 변경, 선택)
  • supervisor (선택)

express-generator 사용 없이 빈프로젝트에서 시작.

@zion830
zion830 / install_python.md
Last active March 25, 2019 12:03
파이썬 설치하기

Python 설치하기

다음 수업(3.28)부터는 Python 교육이 시작됩니다.

수업 당일 날 설치를 진행하면 시간이 많이 지체되기 때문에 아래 가이드에 따라 미리 파이썬을 설치해주세요.

1. 파이썬 설치 파일 다운받기

설치 링크에서 Download Python 3.7.2 클릭

2. .exe 파일 실행

@zion830
zion830 / Area.java
Last active November 25, 2019 15:49
NHN OPEN TALK DAY 문제풀이
package project;
public class Area {
private int num; // 지역 번호
private int x; // 중심의 x 좌표
private int y; // 중심의 y 좌표
private int radius; // 반지름
private enum Location {
ANOTHER_LOCATION, INSIDE, OUTSIDE
@zion830
zion830 / EndianConverter.kt
Last active October 14, 2019 17:35
big-endian, little-endian 변환하는 예제
import kotlin.experimental.and
object EndianConverter {
fun printConvertResult(testValue: Array<Long>) {
for (number in testValue) {
println("Input Value : 0x${Integer.toHexString(number.toInt())}")
val littleEndianArray = convertEndianSystem(number)
val littleEndianIntValue = bytesToInt(littleEndianArray)
@zion830
zion830 / Adder.java
Last active October 14, 2019 17:35
전가산기, 반가산기 만들어보기
public class Adder {
public boolean[] byteadder(boolean[] byteA, boolean[] byteB) {
boolean[] answer = new boolean[9];
boolean carry = false;
for (int i = 0; i < answer.length - 1; i++) {
boolean[] value = fulladder(byteA[i], byteB[i], carry);
answer[i] = value[1];
carry = value[0];
@zion830
zion830 / Register.java
Last active November 25, 2019 17:57
캐시메모리 시나리오 1, 시나리오 2
public class Register {
private Integer r1 = null;
private Integer r2 = null;
public Integer getR1() {
return r1;
}
public void setR1(Integer r1) {
this.r1 = r1;