개발 아카이브/코드 저장소

    정규표현식 문법 공부하기

    본 포스트는 프로그래머스 정규표현식 강의를 참조하여 정리한 글입니다. 그래서 프로그래머스 강의에서 나오는 예제 코드와 같습니다. https://programmers.co.kr/learn/courses/11 정규표현식 문법 \d 숫자를 대표하는 글자들(d 는 digit의 약자) \D 숫자를 제외한 문자 \w 글자를 대표하는 글자들 (w는 word의 약자) \W 글자 대표 문자를 제외한 글자들 (특수문자, 공백 등) \s 공백 문자 (스페이스, 탭, 뉴라인) \S 공백 문자를 제외한 문자 + '하나 혹은 그 이상 연결된' 라는 뜻. - \d+ : 연결된 숫자들만 ['02', '123', '4567', '070', '9999', '9999', '010', '2454', '3457'] - \w+ : 연결된 글자..

    [Python]NHN 채용 공고 크롤링, 검색, 추출 코드

    다른 기업 채용사이트에 비해 NHN 채용사이트는 특정 키워드로 검색하는 기능이 없길래 심심해서 만들었습니다. 필수 라이브러리 requests BeautifulSoup 코드 import requests from bs4 import BeautifulSoup from datetime import datetime URL = 'https://recruit.nhn.com' param={'type':'company'} recruit_list = [] selected_recruits = [] # 채용공고 리스트 추출 print('>> 리스트 추출 중...') responce = requests.get(URL + '/ent/recruitings', params=param) html = BeautifulSoup(respo..

    하노이탑 코드 저장

    function hanoi(num, from, to ,other){ if(num == 0) return; hanoi(num-1, from, other, to); console.log(`${num}을 ${from}에서 ${to}로 보낸다`); hanoi(num-1, other, to, from); } hanoi(5,'A','B','C');

    [자바스크립트] 날짜 형식 yyyy-MM-dd로 변환

    function formatDate(date) { var d = new Date(date), month = '' + (d.getMonth() + 1), day = '' + d.getDate(), year = d.getFullYear(); if (month.length < 2) month = '0' + month; if (day.length < 2) day = '0' + day; return [year, month, day].join('-'); } 출처 : stackoverflow.com/questions/23593052/format-javascript-date-as-yyyy-mm-dd Format JavaScript date as yyyy-mm-dd I have a date with the format ..

    [자바스크립트] 날짜에 일수 더하기

    자바스크립트 AddDays 문자열로 이루어진 날짜에 더하고 싶은 일 수를 넣으면 그 날만큼 지난 날짜로 반환 매개변수 - date : 예시, '2020-10-15' 매개변수 - days : date에서 더하고 싶은 날짜 (음수 가능) 반환 : date에서 days만큼 더한 날짜 출력 function AddDays(date, days) { // date는 문자열로 받는다 ex, '2020-10-15' var result = new Date(date); result.setDate(result.getDate() + days); return result; }

    [자바스크립트] 변수에 빈값인지 체크하기

    자바스크립트 IsNullOrWhiteSpace 매개변수에 들어온 값이 undefined나 null인지 빈 string ("")인지 체크합니다 매개변수 : 빈값을 체크하고 싶은 내용 반환 : undefined 이거나 null 이거나 빈 string ("") 이면 true / 내용이 있으면 false // input값이 공백이거나 빈값이 있는지 없는지 체크 function IsNullOrWhiteSpace(input) { if (typeof input === 'undefined' || input === null) return true; return input.replace(/\s/g, '').length < 1; }

    [MSSQL] 테이블과 테이블 업데이트

    UPDATE TABLE1 SET T1.column1 = T2.column1 FROM TABLE1 T1 JOIN TABLE2 T2 ON T1.index = T2.index 테이블1과 테이블2의 index라는 컬럼으로 JOIN 하여 TABLE1의 column1에 TABLE2의 column1를 전부 업데이트 합니다.

    EXCEL TO JSON - Github

    Benzino / ExcelToJsonConverter https://github.com/Benzino/ExcelToJsonConverter Benzino/ExcelToJsonConverter A Unity plugin to convert Excel files to Json. Contribute to Benzino/ExcelToJsonConverter development by creating an account on GitHub. github.com