일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
- Oracle
- ubuntu
- 부모창
- php
- yum
- replace
- Selectbox
- centos
- TextBox
- Postfix
- TPL
- Python
- docker
- jQuery
- JavaScript
- smarty
- Eclipse
- 문자열자르기
- SVN
- i18n
- install
- MySQL
- 일괄변경
- random
- 천단위
- 확장자
- 한글 깨짐
- mariadb
- RabbitMQ
- Today
- Total
목록분류 전체보기 (195)
wilson's story
윈도우의 PowerShell 에서 파일의 확장자를 일괄로 변경하고자 할 때 사용 PowerShell에서 해당 폴더 위치로 이동 확장자 .AAA를 .BBB로 변경할 때 get-childItem *.AAA -Recurse | Rename-Item -NewName { $_.Name -replace ".AAA", '.BBB' }
pyinstaller를 실행 할때 이유 없이 에러가 나는 경우 기존에 pyinstaller를 삭제하고 pip install https://github.com/pyinstaller/pyinstaller/archive/develop.tar.gz 재설치 하시면 됩니다 파일의 출처는 https://www.pyinstaller.org/downloads.html pyinstaller 버전 3 대는 오류가 있어서 이렇게 설치하면 됩니다
// 엔터값을 기준으로 배열로 만듬 String[] aa = test.split("\\r?\\n", -1); // aaList에 add가 되지 않는다 변경이 불가능하다 List aaList = Arrays.asList(aa); // bbList에 add 가능 List bbList = new ArrayList(Arrays.asList(aa));
Front 에서 드레그하여 내용들을 블럭화 되는 걸 막아 달라는 요청이 있을 수 있다 이럴때 사용하기 좋은 CSS 가 있다 .dragNo { -ms-user-select: none; -moz-user-select: none; -webkit-user-select: none; -khtml-user-select: none; user-select: none; } 이렇게 씌우면 드레그 하여 블럭이 되지 않는걸 확인 할 수 있다 swiper 플러그인으로 된 드레그는 정상 작동 된다
python 에서 스케줄을 적용할때는 보통 리눅스의 cron 을 사용하였다 좀더 편한 방법을 찾던중 파이썬내에서 스케줄을 제어 할 수 있는 라이브러리가 있었다 https://pypi.org/project/APScheduler/ pip install APScheduler from apscheduler.schedulers.background import BackgroundScheduler def schedulerJob(): # 실행할 프로세스 def backgroundScheduler(): scheduler = BackgroundScheduler(daemon=True) scheduler.start() scheduler.add_job(schedulerJob, 'cron', hour=9) # schedulerJ..
google Oauth 를 이용하여 Flask 에서 로그인 처리를 하려 할 때 사용합니다 1. googleAPI 등록 우선 googleAPI에 등록이 되어있야한다 https://console.developers.google.com/apis에 접속한다 좌측 메뉴에 OAuth 동의 화면으로 이동하여 신규 OAuth를 생성한다 개인적으로 내부 계정으로 사용할 예정이라 애플리케이션 유현은 내부로 설정 애플리케이션 이름은 편한 데로 작성 지원 이메일은 로그인한 계정이 작성되어있다 이대로 완료하면 OAuth 사용할 준비 완료 좌측에 사용자 인증 정보 메뉴로 들어가면 신규일 경우 생성된 키가 아무것도 없을 것이다 사용자 인증 정보 만들기 를 눌러 OAuth 클라이언트 ID를 생성한다 애플리케이션 유형은 하고 자 하는..
ubuntu18.04 버전 기준입니다 ubuntu18.04의 기본 python버전은 3.6으로 세팅되어있습니다 sudo apt-get install apache2 sudo apt-get install libapache2-mod-wsgi-py3 sudo a2enmod wsgi cd /etc/apache2/sites-available vi 000-default.conf ErrorLog /workspace/service/WebServer/log/error.log CustomLog /workspace/service/WebServer/log/access.log combined WSGIDaemonProcess WebServerApp threads=10 python-path=/workspace/service/WebS..
Ubuntu에서 conda를 설치하고 나면 사용자 앞에 (base) 라고 붙는 경우가 있다 이것은 기본적으로 conda 의 base env를 사용하겟다고 하는것인데 이것을 원치 않을 경우 conda config --set auto_activate_base False 이라고 적용후 사용자를 빠져나왔다가 다시 들어가면 (base) 가 사라져 있다 다시 (base)를 적용하고 싶다면 conda config --set auto_activate_base True 상태를 볼려면 conda config --show | grep auto_activate_base
여러개의 thread를 사용하면서 각각에서 반복문이 동작을 해야하는 경우 하단의 소스와 같이 사용하시면 됩니다 import threading def threadTest(val): while True: print(val) def processTest1(): test = "1" thread = threading.Thread(target=threadTest, args=(test,)) thread.start() def processTest2(): test = "2" thread = threading.Thread(target=threadTest, args=(test,)) thread.start() if __name__ == '__main__': processTest1() processTest2() 아래와 같이 사..
pycocotools는 mac, linux를 지원한다 anaconda 플러그인으로 설치하려 해도 window는 지원하지 않는다 https://anaconda.org/conda-forge/pycocotools Pycocotools :: Anaconda Cloud anaconda.org 윈도우에선 env terminal 에서 아래 처러 입력하면 설치가 된다 pip install git+https://github.com/philferriere/cocoapi.git#egg=pycocotools^&subdirectory=PythonAPI pip install git+https://github.com/philferriere/cocoapi.git#egg=pycocotools^&subdirectory=PythonAPI..