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
// let input = `4 2 | |
// 4 2 | |
// 3 1` | |
// .trim() | |
// .split("\n"); | |
// input 파싱 | |
// let input = require("fs").readFileSync("/dev/stdin").trim().split("\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
// input 파싱 | |
let input = require("fs").readFileSync("/dev/stdin").toString().split("\n"); | |
let requestLessonCount = Number(input[0]); | |
if (requestLessonCount === 0) { | |
return console.log(0); | |
} | |
let inputSchedual = new Array(requestLessonCount); | |
let dailyIncome = new Array(10000).fill(0); |
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 targets = document.querySelectorAll(".fade-class"); | |
const options = { root: null, threshold: 0.1, rootMargin: "-0px" }; | |
const observer = new IntersectionObserver(function (entries, observer) { | |
entries.forEach((entry) => { | |
const container = entry.target; | |
if (entry.isIntersecting) { | |
container.classList.add("fade-in"); | |
} else { | |
container.classList.remove("fade-in"); | |
} |
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
//스크롤 연동 fade-in fade-out | |
$(window).on("load", function () { | |
function fade() { | |
let animation_height = $(window).innerHeight() * 0.5; | |
let ratio = Math.round((1 / animation_height) * 10000) / 10000; | |
$(".fade").each(function () { | |
let objectTop = $(this).offset().top; | |
let windowBottom = $(window).scrollTop() + $(window).innerHeight(); | |
if (objectTop < windowBottom) { | |
if (objectTop < windowBottom - animation_height) { |
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 path = require("path"); | |
const HtmlWebpackPlugin = require("html-webpack-plugin"); | |
module.exports = { | |
entry: "./src/index.tsx", | |
mode: "development", | |
devtool: "inline-source-map", // <- source map를 위한 코드 | |
devServer: { | |
contentBase: "./dist", // | |
historyApiFallback: true, // <- dev-server를 위한 코드 |
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 path = require("path"); | |
const HtmlWebpackPlugin = require("html-webpack-plugin"); | |
module.exports = { | |
entry: "./src/index.tsx", | |
mode: "development", | |
devServer: { | |
contentBase: "./dist", // <- 추가된 부분 | |
hot: true, // <- HMR 설정 | |
}, |
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 path = require("path"); | |
const HtmlWebpackPlugin = require("html-webpack-plugin"); | |
module.exports = { | |
entry: "./src/index.tsx", | |
mode: "development", | |
module: { | |
rules: [ | |
{ | |
test: /\.css$/i, |
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 path = require("path"); | |
module.exports = { | |
entry: "./src/index.tsx", | |
mode: "development", | |
output: { | |
filename: "bundle.js", | |
path: path.resolve(__dirname, "dist"), | |
}, | |
module: { |
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 path = require("path"); | |
module.exports = { | |
entry: "./src/index.tsx", | |
mode: "development", | |
output: { | |
filename: "bundle.js", | |
path: path.resolve(__dirname, "dist"), | |
}, | |
module: { |