Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
72 changes: 72 additions & 0 deletions 김동연/ex1/book-edit.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
<!doctype html>
<html>
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<script src="https://cdn.tailwindcss.com"></script>
<title>Bookmark Manager</title>
</head>

<body class="bg-gray-100">
<!-- 네비게이션 바 -->
<nav class="bg-white border-b border-gray-200">
<div class="max-w-screen-xl mx-auto px-4 py-4 flex justify-between items-center">
<a href="./book-edit.html" class="flex items-center space-x-1 rounded">
<img src="https://www.hanafn.com:8002/assets/img/ko/info/img-hana-symbol.png" class="h-9 pt-2" alt="Flowbite Logo" />
<span class="self-center text-2xl font-semibold px-3 py-3 text-black-500">Digital-Hana</span>
</a>
<div class="flex space-x-8 items-center">
<a href="https://github.com/commaengddongyeon/test11" class="text-gray-900 hover:text-blue-700">GitHub Repo</a>
<a href="../ex1/register.html" class="text-gray-900 hover:text-blue-700">SignUp</a>
<span class="text-gray-900">|</span>
<a href="#" class="text-gray-900 hover:text-blue-700">SignIn</a>
</div>
</div>
</nav>

<!-- 메인섹터 -->
<div class="flex max-w-screen-xl mx-auto mt-8 px-4 space-x-6">

<!-- 북마크 검색 -->
<div class="w-1/3 bg-gray-50 p-6 rounded-lg shadow-lg">
<div class="border border-gray-200 p-4 rounded-md">
<!-- 검색창 -->
<input type="text" placeholder="https://naver.com" class="w-full p-2 mb-4 border border-gray-300 rounded-md focus:ring-2 focus:ring-blue-400 outline-none">
<div class="flex items-center mb-4">
<input id="auto-delete" type="checkbox" class="h-4 w-5 text-blue-600 border-gray-300 rounded focus:ring-2 focus:ring-blue-500">
<label for="auto-delete" class="ml-2 text-sm text-gray-700">이동 시 자동 삭제</label>
</div>

<!-- 리로드 -->
<div class="flex space-x-4">
<button class="w-1/2 p-2 bg-gray-200 rounded-lg flex justify-center items-center">
<svg class="h-5 w-5" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 19H5a2 2 0 01-2-2V7a2 2 0 012-2h5m14 8h-8m0 0l4-4m-4 4l4 4"></path>
</svg>
</button>

<!-- 추가 버튼 -->
<button class="w-1/2 p-2 bg-gray-200 rounded-md flex justify-center items-center">
<svg class="h-5 w-5" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M5 12h14m-7-7v14"></path>
</svg>
</button>

</div>
</div>
</div>
<!-- ADD BOOK 버튼 -->
<div class="flex-1 bg-white p-6 rounded-lg shadow-lg">
<button class="bg-gray-800 text-white font-bold py-2 px-6 rounded-lg">
Add Book
</button>
</div>
</div>

<!-- Footer -->
<footer class="mt-16 text-center text-gray-500">
<p>© Hanaro 2024 Kim-DongYeon</p>
</footer>

</body>
</html>
125 changes: 125 additions & 0 deletions 김동연/ex1/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,125 @@
<!doctype html>
<html>
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<script src="https://cdn.tailwindcss.com"></script>
<title>MY BookMark</title>
</head>
<body>
<!-- 네비게이션 바 -->
<nav class="bg-white border-b border-gray-200">
<div class="max-w-screen-xl mx-auto px-4 py-4 flex justify-between items-center">
<a href="./book-edit.html" class="flex items-center space-x-1 rounded">
<img src="https://www.hanafn.com:8002/assets/img/ko/info/img-hana-symbol.png" class="h-9 pt-2" alt="Flowbite Logo" />
<span class="self-center text-2xl font-semibold px-3 py-3 text-black-500">Digital-Hana</span>
</a>
<div class="flex space-x-8 items-center">
<a href="https://github.com/commaengddongyeon/test11" class="text-gray-900 hover:text-blue-700">GitHub Repo</a>
<img src="https://cdn-icons-png.flaticon.com/512/1361/1361876.png" alt="User Avatar" class="h-10 w-10 rounded-full">
</div>
</div>
</nav>
<!-- 메인 -->
<section class="max-w-screen-xl mx-auto mt-8 p-4">
<div class="grid grid-cols-2 gap-8">

<!-- Bookmarks -->
<div class="bg-white p-4 rounded-lg shadow-md">
<h2 class="text-xl font-bold mb-4">BookMark</h2>
<div class="space-y-4">

<!-- 카드1 -->
<div class="flex items-center bg-gray-100 p-4 rounded-md shadow">
<img src="https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcSumEnA4kC-FwpmPOBziyV9BYTanrxOZmOwiA&s" alt="Logo" class="h-10 mr-4">
<div class="flex-grow">
<h3 class="text-lg font-semibold">BookMark B...</h3>
<p class="text-gray-500 text-sm">나만의 북마크</p>
</div>
<button class="text-gray-600">
<svg class="h-6 w-6" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M6 18L18 6M6 6l12 12"></path>
</svg>
</button>
</div>

<!--카드2 -->
<div class="flex items-center bg-gray-100 p-4 rounded-md shadow">
<img src="https://i.namu.wiki/i/p_1IEyQ8rYenO9YgAFp_LHIAW46kn6DXT0VKmZ_jKNijvYth9DieYZuJX_E_H_4GkCER_sVKhMqSyQYoW94JKA.svg" alt="Logo" class="h-10 mr-4">
<div class="flex-grow">
<h3 class="text-lg font-semibold">네이버</h3>
<p class="text-gray-500 text-sm">네이버 메인에서 다양한 경험을</p>
</div>
<button class="text-gray-600">
<svg class="h-6 w-6" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M6 18L18 6M6 6l12 12"></path>
</svg>
</button>
</div>

<!--카드3-->
<div class="flex items-center bg-gray-100 p-4 rounded-md shadow">
<img src="https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcQaxjjhD2-y8CkDcJ_5bQ_2lEG_9NJb7sjjrA&s" alt="Logo" class="h-10 mr-4">
<div class="flex-grow">
<h3 class="text-lg font-semibold">Kakao</h3>
<p class="text-gray-500 text-sm">기술과 사람으로 더 나 세상을</p>
</div>
<button class="text-gray-600">
<svg class="h-6 w-6" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M6 18L18 6M6 6l12 12"></path>
</svg>
</button>
</div>

<!-- ADD버튼 -->
<button class="bg-teal-700 text-white font-bold py-2 px-6 rounded-lg">
Add Book
</button>

</div>
</div>


<!-- Study Bookmarks -->
<div class="bg-white p-4 rounded-lg shadow-md">
<h2 class="text-xl font-bold mb-4">Study</h2>
<div class="space-y-4">

<!-- 카드1 -->
<div class="flex items-center bg-gray-100 p-4 rounded-md shadow">
<img src="https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcTU-mspyndicMBTk-KdKp96OZiaD2rkYLYzFQ&sg" alt="Logo" class="h-10 mr-4">
<div class="flex-grow">
<h3 class="text-lg font-semibold">Tailwind CSS</h3>
<p class="text-gray-500 text-sm">Tailwind CSS is a util</p>
</div>
<button class="text-gray-600">
<svg class="h-6 w-6" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M6 18L18 6M6 6l12 12"></path>
</svg>
</button>
</div>

<!-- 카드2 -->
<div class="flex items-center bg-gray-100 p-4 rounded-md shadow">
<img src="https://static-00.iconduck.com/assets.00/nextjs-icon-2048x1234-pqycciiu.png" alt="Logo" class="h-10 mr-4">
<div class="flex-grow">
<h3 class="text-lg font-semibold">Next JS</h3>
<p class="text-gray-500 text-sm">Generated by create</p>
</div>
<button class="text-gray-600">
<svg class="h-6 w-6" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M6 18L18 6M6 6l12 12"></path>
</svg>
</button>
</div>

<!-- ADD버튼 -->
<button class="bg-teal-700 text-white font-bold py-2 px-6 rounded-lg">
Add Book
</button>

</div>


</body>
</html>
66 changes: 66 additions & 0 deletions 김동연/ex1/register.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
<!doctype html>
<html>
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<script src="https://cdn.tailwindcss.com"></script>
<title>CREATE ACCOUNT</title>
</head>
<body>
<!-- 네비게이션 바 -->
<nav class="bg-white border-b border-gray-200">
<div class="max-w-screen-xl mx-auto px-4 py-4 flex justify-between items-center">
<a href="./book-edit.html" class="flex items-center space-x-1 rounded">
<img src="https://www.hanafn.com:8002/assets/img/ko/info/img-hana-symbol.png" class="h-9 pt-2" alt="Flowbite Logo" />
<span class="self-center text-2xl font-semibold px-3 py-3 text-black-500">Digital-Hana</span>
</a>
<div class="flex space-x-8 items-center">
<a href="https://github.com/commaengddongyeon/test11" class="text-gray-900 hover:text-blue-700">GitHub Repo</a>
<a href="../ex1/register.html" class="text-gray-900 hover:text-blue-700">SignUp</a>
<span class="text-gray-900">|</span>
<a href="#" class="text-gray-900 hover:text-blue-700">SignIn</a>
</div>
</div>
</nav>

<!-- 가입 섹터 -->
<section class="bg-gray-50 shadow-lg ">
<div class="flex flex-col items-center justify-center px-6 py-8 ">
<a href="#" class="flex items-center mb-6 text-2xl font-semibold text-gray-900 dark:text-white">
<img class="w-8 h-8 mr-2" src="https://www.hanafn.com:8002/assets/img/ko/info/img-hana-symbol.png" alt="logo">
Create account
</a>
<!-- 가입폼 -->
<div class="w-full bg-white rounded-md shadow-lg dark:border md:mt-0 sm:max-w-md xl:p-0 dark:bg-gray-800">
<div class="p-6 space-y-4 md:space-y-6 sm:p-8">
<form class="space-y-4 md:space-y-6" action="#">
<div>
<label for="nickName" class="block mb-2 text-sm font-semibold text-gray-900">Your NickName</label>
<input type="nickName" name="nickName" id="nickName" placeholder="nickname" class="bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-primary-600 focus:border-primary-600 block w-full p-2.5" required="">
</div>
<div>
<label for="email" class="block mb-2 text-sm font-semibold text-gray-900">Your email</label>
<input type="email" name="email" id="email" placeholder="@hanaro.com" class="bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-primary-600 focus:border-primary-600 block w-full p-2.5" required="">
</div>
<div>
<label for="password" class="block mb-2 text-sm font-semibold text-gray-900">Password</label>
<input type="password" name="password" id="password" placeholder="********" class="bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-primary-600 focus:border-primary-600 block w-full p-2.5" required="">
</div>
<div>
<label for="confirm-password" class="block mb-2 text-sm font-semibold text-gray-900">Confirm password</label>
<input type="confirm-password" name="confirm-password" id="confirm-password" placeholder="********" class="bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-primary-600 focus:border-primary-600 block w-full p-2.5"required="">
</div>

<!-- 등록버튼 -->
<button class="bg-gray-100 text-gray-700 font-semibold py-2 px-6 rounded-md hover:bg-gray-200">
<a href="../ex1/index.html">Register </a>
</button>
</form>
</div>
</div>
</div>
</section>


</body>
</html>
8 changes: 8 additions & 0 deletions 김동연/ex10.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,11 @@ import { ArrayList } from './ex10';
console.log('🚀 ArrayList:', ArrayList);

// 여기에 테스트코드를 작성하세요.
const alist = new ArrayList([1, 2]);
// alist.add(3);
// alist.add(5,1);

alist.set(1, 300);
alist.get(2);


30 changes: 27 additions & 3 deletions 김동연/ex10.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,11 +61,35 @@ class Collection<T> {
return this instanceof Queue;
}
}

class Stack<T> extends Collection<T> {}
class Queue<T> extends Collection<T> {}




// ArrayList 클래스를 작성하세요.
class ArrayList<T> extends Collection<T> {}
class ArrayList<T> extends Collection<T> {
add(value: T, index?: number): void {

}

// 특정 인덱스에 value 대입
set(index: number, value: T): void {
if (index >= this.length || index < 0) {
throw new Error("범위를 벗어났습니다.");
}
this._arr[index] = value;
}

// 특정 인덱스 값 가져오기
get(index: number): T {
if (index >= this.length || index < 0) {
throw new Error("범위를 벗어났습니다");
}
return this._arr[index];
}

}



export { Stack, Queue, ArrayList };
32 changes: 29 additions & 3 deletions 김동연/ex2.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,30 @@
// range 함수를 작성하세요.
const range = (start, end, step = start > end ? -1 : 1) => { };
const range = (start, end, step = start > end ? -1 : 1) => {
const result = [];

module.exports = { range };
if(step === 0 || start === end){ // start값과 end 값이 같다면
return [start];
}
if((start > end && step > 0) || (start < end && step < 0)){
return [];
}
if(end === undefined){ // 만약 end 값이 비어 있다면
if(start > 0){
end = start;
start = 1;
}
else if(start < 0){
end = -1;
}
else{
return [0];
}
}

// 소수점 연산을 위해 EPSILON값 추가
for(let i = start; (step > 0) ? i < end + (Number.EPSILON * 100) : i >= end - (Number.EPSILON * 100); i += step){
result.push(Math.round((i + Number.EPSILON) * 100) / 100);
}
return result;
};

module.exports = { range };
12 changes: 8 additions & 4 deletions 김동연/ex2.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,24 +23,28 @@ assert.deepStrictEqual(range(0, -3), [0, -1, -2, -3]);
assert.deepStrictEqual(range(5, 1), [5, 4, 3, 2, 1]);
assert.deepStrictEqual(range(10, 1, -2), [10, 8, 6, 4, 2]);

assert.deepStrictEqual(range(5), [1, 2, 3, 4, 5]);
assert.deepStrictEqual(range(0), [0]);
assert.deepStrictEqual(range(5), [1, 2, 3, 4, 5]);
assert.deepStrictEqual(range(0), [0]);
assert.deepStrictEqual(range(0, 0), [0]);
assert.deepStrictEqual(range(2, 1, -5), [2]);
assert.deepStrictEqual(range(0, -1, -5), [0]);
assert.deepStrictEqual(range(-5), [-5, -4, -3, -2, -1]);
assert.deepStrictEqual(range(-5), [-5, -4, -3, -2, -1]);
assert.deepStrictEqual(
range(50),
Array.from({ length: 50 }, (_, i) => i + 1)
);

assert.deepStrictEqual(
range(1, 150, 3),
Array.from({ length: 50 }, (_, i) => i * 3 + 1)
);


assert.deepStrictEqual(
range(1, 2, 0.1),
[1, 1.1, 1.2, 1.3, 1.4, 1.5, 1.6, 1.7, 1.8, 1.9, 2]
);
); // 소수점 처리

console.log(range(1, 2, 0.1));


9 changes: 8 additions & 1 deletion 김동연/ex3.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
Array.prototype.sortBy = function (sortProp = '') {
return this;
const commands = sortProp.split(',').map(item => item.split(':'));
return this.slice().sort((a, b) => {
for (const [key, order] of commands) {
if (a[key] > b[key]) return order === 'desc' ? -1 : 1;
if (a[key] < b[key]) return order === 'desc' ? 1 : -1;
}
return 0;
});
};
Loading