Skip to content

Instantly share code, notes, and snippets.

View jayden-lee's full-sized avatar
🏠
Working from home

Jayden jayden-lee

🏠
Working from home
View GitHub Profile
@jayden-lee
jayden-lee / charconvert.java
Last active November 11, 2018 15:15
백준 알고리즘 1475번 방번호
int index = 0;
for (char ch : roomNumber.toCharArray()) {
index = (int) ch - 48;
// 숫자 사용 횟수를 증가시킨다.
number[index] += 1;
}
@jayden-lee
jayden-lee / mysql-select-limit-1.sql
Created October 6, 2018 16:03
[MySQL] SELECT 문에서 Limit 사용법
-- 데이터 10 개만 조회하기
SELECT title, content, writer FROM board LIMIT 10;
@jayden-lee
jayden-lee / Dependency.java
Last active October 7, 2018 06:05
Spring Framework Start
class A {
private B b = new B();
}
@jayden-lee
jayden-lee / MyConfiguration.java
Last active October 12, 2018 16:27
Spring 프로파일 구성
@Profile("production")
@Configuration
public class MyConfiguration {
// TODO
}
@jayden-lee
jayden-lee / Main.java
Created October 13, 2018 13:40
백준알고리즘 4963번: 섬의 개수
import java.util.Scanner;
/**
* 섬의 개수 문제<br>
* 알고리즘 분류 : 그래프 알고리즘, DFS
*
* @author gglee
*/
public class Main {
@jayden-lee
jayden-lee / HelloController.java
Last active October 14, 2018 14:53
Spring Boot with JSP
package com.jayden.demo.controller;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
@Controller
@RequestMapping("/hello")
public class HelloController {
@jayden-lee
jayden-lee / Main.java
Created October 16, 2018 14:49
백준알고리즘 2163번: 초콜릿 자르기
import java.util.Scanner;
/**
* 초콜릿 자르기 문제<br>
* 알고리즘 분류 : DP
*
* @author gglee
*/
public class Main {
@jayden-lee
jayden-lee / CreateString.java
Last active October 16, 2018 15:05
"" 또는 생성자를 이용한 Java 문자열 생성
String s1 = "Hello, gglee";
String s2 = new String("Hello, gglee");
@jayden-lee
jayden-lee / AbstractDuck.java
Last active October 17, 2018 04:54
Design Patterns : Strategy Pattern
public abstract class Duck {
FlyBehavior flyBehavior;
QuackBehavior quackBehavior;
public void performQuack() {
quackBehavior.quack();
}
public void performFly() {
@jayden-lee
jayden-lee / HelloController.java
Last active October 18, 2018 08:23
Spring Boot MockMvc Test
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
@Controller
@RequestMapping("/hello")
public class HelloController {
@GetMapping