-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.html
565 lines (504 loc) · 20.3 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta name="description" content="">
<meta name="author" content="">
<title>Resume - Start Bootstrap Theme</title>
<!-- Bootstrap core CSS -->
<link href="vendor/bootstrap/css/bootstrap.min.css" rel="stylesheet">
<!-- Custom fonts for this template -->
<link href="https://fonts.googleapis.com/css?family=Saira+Extra+Condensed:500,700" rel="stylesheet">
<link href="https://fonts.googleapis.com/css?family=Muli:400,400i,800,800i" rel="stylesheet">
<link href="vendor/fontawesome-free/css/all.min.css" rel="stylesheet">
<!-- Custom styles for this template -->
<link href="css/resume.min.css" rel="stylesheet">
<script>
var resultVal = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
var reverVal = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
var incFlag = 0;
var decFlag = 0;
//document.form.textview.value = resultVal;
function keyHandler(e) {
var TABKEY = 9;
if (e.keyCode == TABKEY) {
this.value += " ";
if (e.preventDefault) {
e.preventDefault();
}
return false;
}
}
function checkNumberFieldLength1(elem) {
var flag = 0;
var num4flag = 0;
if (elem.value.length > 4) {
num4flag = 1;
elem.value = elem.value.slice(0, 4);
}
if (elem.value.length <= 4) {
document.form.textview.value = "";
flag = 0;
resultVal[0] = parseInt(elem.value / 1000);
resultVal[1] = parseInt((elem.value % 1000) / 100);
resultVal[2] = parseInt((elem.value % 100) / 10);
resultVal[3] = parseInt(elem.value % 10);
for (var i = 0; i < resultVal.length; i++) {
if (resultVal[i] != -0) {
flag = 1;
}
if (flag == 1) {
document.form.textview.value += resultVal[i];
}
}
}
}
function checkNumberFieldLength2(elem) {
var flag = 0;
var num4flag = 0;
if (elem.value.length > 4) {
num4flag = 1;
elem.value = elem.value.slice(0, 4);
}
if (elem.value.length <= 4) {
document.form.textview.value = "";
flag = 0;
resultVal[4] = parseInt(elem.value / 1000);
resultVal[5] = parseInt((elem.value % 1000) / 100);
resultVal[6] = parseInt((elem.value % 100) / 10);
resultVal[7] = parseInt(elem.value % 10);
for (var i = 0; i < resultVal.length; i++) {
if (resultVal[i] != 0) {
flag = 1;
}
if (flag == 1) {
document.form.textview.value += resultVal[i];
}
}
}
}
function checkNumberFieldLength3(elem) {
var flag = 0;
var num4flag = 0;
if (elem.value.length > 4) {
num4flag = 1;
elem.value = elem.value.slice(0, 4);
}
if (elem.value.length <= 4) {
document.form.textview.value = "";
flag = 0;
resultVal[8] = parseInt(elem.value / 1000);
resultVal[9] = parseInt((elem.value % 1000) / 100);
resultVal[10] = parseInt((elem.value % 100) / 10);
resultVal[11] = parseInt(elem.value % 10);
for (var i = 0; i < resultVal.length; i++) {
if (resultVal[i] != 0) {
flag = 1;
}
if (flag == 1) {
document.form.textview.value += resultVal[i];
}
}
}
}
function checkNumberFieldLength4(elem) {
var flag = 0;
var num4flag = 0;
if (elem.value.length > 4) {
num4flag = 1;
elem.value = elem.value.slice(0, 4);
}
if (elem.value.length <= 4) {
document.form.textview.value = "";
flag = 0;
resultVal[12] = parseInt(elem.value / 1000);
resultVal[13] = parseInt((elem.value % 1000) / 100);
resultVal[14] = parseInt((elem.value % 100) / 10);
resultVal[15] = parseInt(elem.value % 10);
for (var i = 0; i < resultVal.length; i++) {
if (resultVal[i] != 0) {
flag = 1;
}
if (flag == 1) {
document.form.textview.value += resultVal[i];
}
}
}
}
function transToReadable(elem) {
var flag = 0;
var j = 10;
var k = 0;
//0으로 시작하면 받지 않아
if (elem.value == "") {
document.form.textview4.value = "";
document.form.textview3.value = "";
document.form.textview2.value = "";
document.form.textview1.value = "";
document.form.textview.value = "";
return;
}
if (elem.value[0] == 0 || !(elem.value[0] >= 0 && elem.value[0] <= 9)) {
document.form.textview.value = "숫자를 확인해주세요";
return;
}
elem.value = elem.value.replace(/,/gi, "");
for (var i = 0; i < elem.value.length; i++) {
if (elem.value[i] == '.') {
elem.value = elem.value.slice(0, i);
}
}
//16 이상의 숫자는 Banned
if (elem.value.length > resultVal.length) {
elem.value = elem.value.slice(0, resultVal.length);
}
if (elem.value.length <= resultVal.length) {
document.form.textview.value = "";
flag = 0;
//16-2 = 14
for (var i = 0; i < resultVal.length; i++) {
resultVal[i] = 0;
reverVal[i] = 0;
}
//53200
for (var i = elem.value.length; i > 0; i--) {
reverVal[i - 1] = parseInt((elem.value % j) / (j / 10));
j = j * 10;
}
//reverVal[0] = 5 -> resultVal[11] = 5
//reverVal[1] = 3 -> resultVal[12] = 3
//reverVal[2] = 2 -> resultVal[13] = 2
//reverVal[3] = 0 -> resultVal[14] = 0
//reverVal[4] = 0 -> resultVal[15] = 0
// 11부터 채워넣음
k = 0;
for (var i = resultVal.length - elem.value.length; i < resultVal.length; i++) {
resultVal[i] = reverVal[k];
k++;
}
//k=5
document.form.textview4.value = "";
document.form.textview3.value = "";
document.form.textview2.value = "";
document.form.textview1.value = "";
//16-5
var temp = 0;
for (var i = resultVal.length - elem.value.length; i < resultVal.length; i++) {
document.form.textview.value += reverVal[temp++];
//reverVal[resultVal.length-k-1] = resultVal[k];
if (parseInt(i / 4) == 3) {
document.form.textview4.value += resultVal[i];
}
else if (parseInt(i / 4) == 2) {
document.form.textview3.value += resultVal[i];
}
else if (parseInt(i / 4) == 1) {
document.form.textview2.value += resultVal[i];
}
else if (parseInt(i / 4) == 0) {
document.form.textview1.value += resultVal[i];
}
}
document.form.textview12.value = document.form.textview1.value;
document.form.textview22.value = document.form.textview2.value;
}
}
function c() {
document.form.textview.value = "";
document.form.textview1.value = "";
document.form.textview2.value = "";
document.form.textview3.value = "";
document.form.textview4.value = "";
for (var i = 0; i < resultVal.length; i++) {
resultVal[i] = 0;
}
}
function transtoText(elem) {
document.form.transtext.value = "";
elem.value = elem.value.slice(0, 500);
for (var i = 0; i < elem.value.length; i++) {
var tmpstr = "";
if (elem.value[i] >= '0' && elem.value[i] <= '9') {
while (1) {
if (i >= elem.value.length) {
break;
}
if (elem.value[i] == ',' || elem.value[i] == ' ') {
document.form.transtext.value += elem.value[i];
i++;
}
else if (elem.value[i] >= '0' && elem.value[i] <= '9') {
tmpstr += elem.value[i];
document.form.transtext.value += elem.value[i];
i++;
}
else {
i--;
break;
}
}
} else {
document.form.transtext.value += elem.value[i];
}
var output = "";
if (tmpstr != "") {
if (tmpstr.length >= 13) {
if (tmpstr.length == 16) {
output += tmpstr[tmpstr.length - 1 - 15];
output += tmpstr[tmpstr.length - 1 - 14];
output += tmpstr[tmpstr.length - 1 - 13];
output += tmpstr[tmpstr.length - 1 - 12];
} else if (tmpstr.length == 15) {
output += tmpstr[tmpstr.length - 1 - 14];
output += tmpstr[tmpstr.length - 1 - 13];
output += tmpstr[tmpstr.length - 1 - 12];
} else if (tmpstr.length == 14) {
output += tmpstr[tmpstr.length - 1 - 13];
output += tmpstr[tmpstr.length - 1 - 12];
} else if (tmpstr.length == 13) {
output += tmpstr[tmpstr.length - 1 - 12];
}
output += "조 ";
}
if (tmpstr.length >= 9) {
if (tmpstr.length >= 12) {
output += tmpstr[tmpstr.length - 1 - 11];
output += tmpstr[tmpstr.length - 1 - 10];
output += tmpstr[tmpstr.length - 1 - 9];
output += tmpstr[tmpstr.length - 1 - 8];
} else if (tmpstr.length == 11) {
output += tmpstr[tmpstr.length - 1 - 10];
output += tmpstr[tmpstr.length - 1 - 9];
output += tmpstr[tmpstr.length - 1 - 8];
} else if (tmpstr.length == 10) {
output += tmpstr[tmpstr.length - 1 - 9];
output += tmpstr[tmpstr.length - 1 - 8];
} else if (tmpstr.length == 9) {
output += tmpstr[tmpstr.length - 1 - 8];
}
output += "억 ";
}
if (tmpstr.length >= 5) {
if (tmpstr.length >= 8) {
output += tmpstr[tmpstr.length - 1 - 7];
output += tmpstr[tmpstr.length - 1 - 6];
output += tmpstr[tmpstr.length - 1 - 5];
output += tmpstr[tmpstr.length - 1 - 4];
} else if (tmpstr.length == 7) {
output += tmpstr[tmpstr.length - 1 - 6];
output += tmpstr[tmpstr.length - 1 - 5];
output += tmpstr[tmpstr.length - 1 - 4];
} else if (tmpstr.length == 6) {
output += tmpstr[tmpstr.length - 1 - 5];
output += tmpstr[tmpstr.length - 1 - 4];
} else if (tmpstr.length == 5) {
output += tmpstr[tmpstr.length - 1 - 4];
}
output += "만 ";
}
if (tmpstr.length >= 4) {
output += tmpstr[tmpstr.length - 1 - 3];
output += tmpstr[tmpstr.length - 1 - 2];
output += tmpstr[tmpstr.length - 1 - 1];
output += tmpstr[tmpstr.length - 1 - 0];
} else if (tmpstr.length == 3) {
output += tmpstr[tmpstr.length - 1 - 2];
output += tmpstr[tmpstr.length - 1 - 1];
output += tmpstr[tmpstr.length - 1 - 0];
} else if (tmpstr.length == 2) {
output += tmpstr[tmpstr.length - 1 - 1];
output += tmpstr[tmpstr.length - 1 - 0];
} else if (tmpstr.length == 1) {
output += tmpstr[tmpstr.length - 1 - 0];
}
document.form.transtext.value += "(" + output + ")";
}
}
return;
}
function myFunction() {
/* Get the text field */
var copyText = document.getElementById("textview");
/* Select the text field */
copyText.select();
copyText.setSelectionRange(0, 99999); /*For mobile devices*/
/* Copy the text inside the text field */
document.execCommand("copy");
/* Alert the copied text */
alert("Copied the text: " + copyText.value);
}
function output() {
var x = document.getElementById("").value;
document.getElementById("myTextarea").value = "Fifth Avenue, New York City";
}
</script>
</head>
<body id="page-top">
<nav class="navbar navbar-expand-lg navbar-dark bg-primary fixed-top" id="sideNav">
<a class="navbar-brand js-scroll-trigger" href="#page-top">
<span class="d-block d-lg-none">Fatfinger_KB</span>
<span class="d-none d-lg-block">
<img class="img-fluid img-profile rounded-circle mx-auto mb-2" src="fatfinger.jpg" alt="">
</span>
</a>
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarSupportedContent"
aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarSupportedContent">
<ul class="navbar-nav">
<li class="nav-item">
<a class="nav-link js-scroll-trigger" href="#about">Fat Finger란 무엇인가</a>
</li>
<li class="nav-item">
<a class="nav-link js-scroll-trigger" href="#experience">숫자변환기</a>
</li>
<li class="nav-item">
<a class="nav-link js-scroll-trigger" href="#intro">팀원 소개</a>
</li>
</ul>
</div>
</nav>
<div class="container-fluid p-0">
<section class="resume-section p-3 p-lg-5 d-flex align-items-center" id="about">
<div class="w-100">
<h1 class="mb-0">Fatfinger란<br>
<span class="text-primary">무엇인가</span></h1>
<div class="resume-item d-flex flex-column flex-md-row justify-content-between mb-5">
<div class="resume-content">
<h3 class="mb-0"><br>경제에 큰 영향을 주는 Fatfinger</h3>
<br>
<p> 팻 핑거(Fat finger)은 두꺼운 손가락이라는 뜻으로, 손가락이 두꺼워 숫자를 잘못 입력했다는 말에서 유래했습니다. <br>
증권사 혹은 은행 같이 큰 돈을 다루는 곳에서는 한 두자리 숫자에 매우 큰 영향을 받습니다. <br>
따라서 이런 실수를 방지하는 것이 매우 중요하기 때문에 저희는 숫자 입력 실수를 방지하는 숫자 변환기를 만들었습니다. <br><br>
관련 기사<br>
<a href="https://news.joins.com/article/22521112" target="_blank"> 증권사 무너뜨리는 '팻 핑거의' 저주</a> <br>
<a href="http://www.dt.co.kr/contents.html?article_no=2018042702101858033001" target="_blank"> 황당한 착오주문
'팻
핑거' 사례는</a>
</p>
</div>
</div>
</div>
</section>
<hr class="m-0">
<section class="resume-section p-3 p-lg-5 d-flex justify-content-center" id="experience">
<div class="w-100">
<h1 class="mb-0">그래서 만든<br>
<span class="text-primary">숫자 변환기</span>
</h1>
<div><br></div>
<h6 class="fatculator">
<div class="left">
<form name="form">
<br>
<p>
<label for="review">▼▼ 원하는 숫자를 단위에 맞게 입력해주세요 ▼▼ </label><br>
<input class="textview" id="textview1" id="textview1" placeholder="0" oninput="checkNumberFieldLength1(this);"
style="width:75px;height:60px;font-size:30px;">
<label for="textview1"> 조 </label>
<input class="textview" id="textview2" placeholder="0" oninput="checkNumberFieldLength2(this);" style="width:75px;height:60px;font-size:30px;">
<label for="textview2"> 억 </label>
<input class="textview" id="textview3" placeholder="0" oninput="checkNumberFieldLength3(this);" style="width:75px;height:60px;font-size:30px;">
<label for="textview3"> 만 </label>
<input class="textview" id="textview4" placeholder="0" oninput="checkNumberFieldLength4(this);" style="width:75px;height:60px;font-size:30px;">
</p>
<p>
<label for="review"> ▼▼변환된 결과 값 ▼▼ </label><br>
<input class="resulttextview" id="textview" style="width:800px;height:90px;font-size:40px;">
<input type="button" class="btn btn-primary btn-sm" value="리셋" onclick="c()">
<input type="button" class="btn btn-primary btn-sm" value="복사" onclick="myFunction()">
</p>
<h3 class="mb-0"><br>문서를 넣어서 변환 </h3><br>
<p>
<label for="review"> </label>
<input class="inputText" id="inputText" placeholder="문서를 넣어주세요" oninput="transtoText(this)" style="width:800px;height:70px;font-size:25px;">
</p>
<p>
<input class="transtext" id="transtext" style="width:800px;height:70px;font-size:25px;">
</p>
</form>
</div>
<div class="right">
<br>
<p>
<label for="review"> ▼▼ 확인하고 싶은 숫자 ▼▼</label><br>
<input class="resulttextview" id="textviewtrans" placeholder="조 단위까지 입력 가능" oninput="transToReadable(this)"
style="width:400px;height:60px;font-size:30px;">
</p>
</div>
</div>
</h6>
</section>
<hr class="m-0">
<section class="resume-section p-3 p-lg-5 d-flex justify-content-center" id="intro">
<div class="w-100">
<h2 class="mb-5">팀원 소개</h2>
<div class="resume-item d-flex flex-column flex-md-row justify-content-between mb-5">
<div class="resume-content">
<h3 class="mb-0">주성호</h3>
<div class="subheading mb-3">팀장 & 아이디어 제공 & 숫자변환기 제작</div>
<ul class="fa-ul mb-0">
<li>
<i class="fa-li fa fa-trophy text-warning"></i>
홍익대학교 컴퓨터공학과 3학년 재학</li>
<li>
<i class="fa-li fa fa-trophy text-warning"></i>
안드로이드 앱 개발 1년차</li>
<li>
<i class="fa-li fa fa-trophy text-warning"></i>
운동해서 돈버는 '머니핏' 앱 서비스 론칭</li>
<li>
<i class="fa-li fa fa-trophy text-warning"></i>
기술혁신형 창업 경진대회 우수상 수상</li>
<li>
<i class="fa-li fa fa-trophy text-warning"></i>
홍익대학교 HISU 창업경잔대회 최우수상 수상</li>
<li>
<i class="fa-li fa fa-trophy text-warning"></i>
홍익대학교 창업 아이디어 경진대회 2등 수상</li>
</ul>
<p><br>
Email : [email protected]
</p>
</div>
<div class="resume-date text-md-right">
<span class="text-primary">April 27, 1995</span>
</div>
</div>
<div class="resume-item d-flex flex-column flex-md-row justify-content-between mb-5">
<div class="resume-content">
<h3 class="mb-0">유현우</h3>
<div class="subheading mb-3">웹사이트 제작 & 아이디어 제공</div>
<ul class="fa-ul mb-0">
<li>
<i class="fa-li fa fa-trophy text-warning"></i>
홍익대학교 컴퓨터공학과 3학년 재학</li>
<li>
<i class="fa-li fa fa-trophy text-warning"></i>
홍익대학교 2019 교내 프로그래밍 경진 대회 공동 3위</li>
<li>
<i class="fa-li fa fa-trophy text-warning"></i>
홍익대학교 2B3E Lab 학부연구생</li>
</ul>
<p><br>
Email : [email protected]
</p>
</div>
<div class="resume-date text-md-right">
<span class="text-primary">April 25, 1995</span>
</div>
</div>
</div>
</section>
</div>
<!-- Bootstrap core JavaScript -->
<script src="vendor/jquery/jquery.min.js"></script>
<script src="vendor/bootstrap/js/bootstrap.bundle.min.js"></script>
<!-- Plugin JavaScript -->
<script src="vendor/jquery-easing/jquery.easing.min.js"></script>
<!-- Custom scripts for this template -->
<script src="js/resume.min.js"></script>
</body>
</html>