This file contains hidden or 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
| // 출처: https://stove99.tistory.com/46 [스토브 훌로구] | |
| String.prototype.string = function(len){var s = '', i = 0; while (i++ < len) { s += this; } return s;}; | |
| String.prototype.zf = function(len){return "0".string(len - this.length) + this;}; | |
| Number.prototype.zf = function(len){return this.toString().zf(len);}; | |
| Date.prototype.format = function(f) { | |
| if (!this.valueOf()) return " "; | |
| var weekName = ["일요일", "월요일", "화요일", "수요일", "목요일", "금요일", "토요일"]; | |
| var d = this; | |
This file contains hidden or 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
| // webstorm 다운로드 | |
| // https://www.jetbrains.com/webstorm/download/download-thanks.html | |
| // git 다운로드 | |
| // https://git-scm.com/download/win | |
| // node 다운로드 | |
| // https://nodejs.org/ko/ | |
| // chromium (.exe , path 연결) |
This file contains hidden or 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
| driver.takeScreenshot().then(function(data){ | |
| var base64Data = data.replace(/^data:image\/png;base64,/,"") | |
| fs.writeFile("파일명.png", base64Data, 'base64', function(err) { | |
| if(err) console.log(err); | |
| }); | |
| }); |
This file contains hidden or 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
| // npm install [email protected] | |
| // 셀레니움 오류로, 현재 promise 관련 메소드 (ex : then )가 동작하지 않음. => 과거 버전(3.6.0 을 사용) | |
| var fs = require("fs"); | |
| var webdriver = require("selenium-webdriver"),By = webdriver.By,until = webdriver.until; | |
| var capabilities = webdriver.Capabilities.ie(); | |
| capabilities.set("unexpectedAlertBehaviour", "accept"); | |
| capabilities.set("ignoreProtectedModeSettings", true); | |
| capabilities.set("ignoreZoomSetting", true); | |
| capabilities.set("CapabilityType.ACCEPT_SSL_CERTS", true); | |
| capabilities.set("InternetExplorerDriver.INTRODUCE_FLAKINESS_BY_IGNORING_SECURITY_DOMAINS", true); |
This file contains hidden or 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
| 삭제할 파일이 들어있는 폴더명: E:\sts-bundle | |
| 빈 폴더를 하나 생성: E:\empty(폴더명) | |
| 윈도-> 실행 -> cmd 창을 열어서 | |
| 1. 해당 디렉토리가 있는 곳으로 간다. E: | |
| 2. 아래와 같이 친다 | |
| robocopy E:\empty E:\sts-bundle /MIR |
This file contains hidden or 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
| function solution(n) { | |
| var answer = []; | |
| var hanoi = function(ring,from,by,to){ | |
| if(ring==1){ | |
| answer.push([from,to]); | |
| }else{ | |
| hanoi(ring-1,from,to,by); | |
| answer.push([from,to]); | |
| hanoi(ring-1,by,from,to); | |
| }; |
This file contains hidden or 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
| /** | |
| $(body).on("scrollEnd",function(){ | |
| // 스크롤이 끝날때 1번만 실행. | |
| }); | |
| */ | |
| var _jqExtend = {}; | |
| _jqExtend.scrollEndTimeout = null; | |
| _jqExtend.scrollEnd = { | |
| delegateType:"scroll", | |
| bindType:"scroll", |
This file contains hidden or 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
| window.console = window.console || {}; | |
| console.log = console.log || function(){}; | |
| console.error = console.error || function(){}; | |
| console.warn = console.warn || function(){}; |
This file contains hidden or 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
| <%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %> | |
| <!doctype html> | |
| <html lang="en"> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <meta http-equiv="X-UA-Compatible" content="IE=edge"> | |
| <title>Document</title> | |
| <script src="/com/js/lib/jquery-1.11.3.min.js"></script> | |
| </head> | |
| <body style="padding:0;margin:0;"> |
This file contains hidden or 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
| var data = [{name:"won","age:"35},{name:"seo",age:"39"},{name:"kim",age:"42"}]; | |
| for(human of data){ | |
| console.log( human.name ); // won , seo , kim | |
| }; | |
| // 참고 (for 기본구문) | |
| for(var i=0;i<data.length;i++){ | |
| console.log( data[i].name ); // won , seo , kim | |
| }; |