분류 전체보기
-
정규표현식 re.sub() - 특정 문자열 교체Python 2023. 4. 6. 07:11
re 파이썬 정규표현식(Regular Expression) 라이브러리 사용 방법 import re re.sub(패턴, 바꿀 문자열, 적용할 문자열) 바꿀 문자열을 ''로 설정함으로써 제거할 수 있다. 숫자를 문자열로 교체 0-9 사이의 문자를 'num'으로 변환한다. >>> s = 'windyday0728!!!' >>> re.sub('[0-9]','num',s) 'windydaynumnumnumnum!!!' 숫자만 제거 0-9 사이의 문자를 ''로 변환함으로써 제거한다. >>> s = 'windyday0728!!!' >>> re.sub('[0-9]','',s) 'windyday!!!' ^의 사용 >>> s = 'windyday0728!!!' >>> re.sub('[0-9]','@',s) # 숫자를 @로 ..
-
udev rules 심볼릭링크 설정 - USB 장치 포트 이름 고정하기Linux 2023. 3. 1. 19:26
udev /dev 디렉터리의 장치 노드를 관리하는 장치 관리자 (userspace /dev) udevadm 장치 제어, 테스트 등에 사용하는 장치 관리 명령어 option : info, control, monitor, test 등 udev rules 설정 장치의 port name을 특정 이름으로 고정시킴으로써 PC 재부팅 혹은 USB 재연결 시 장치 이름이 바뀌는 것을 방지한다. e.g. ttyUSB0 → ttyGPS rules 설정에 필요한 정보 Vendor ID, Product ID (Model ID), Serial number 등 설정 과정 1) ls 명령어를 이용해 /dev 디렉터리 내 tty로 시작하는 장치 목록을 조회한다. $ ls /dev/tty* /dev/tty /dev/tty0 /dev/..
-
cat 명령어 - 파일 내용 출력, 연결Linux 2023. 3. 1. 14:32
cat 터미널 창에 파일의 내용을 출력하거나, 다른 파일과 합치는(concatenate) 명령어 $ cat > new_file.txt hello world ^C > : 명령어 실행 후 파일의 내용(hello world)을 입력하고 ctrl+c(^C)를 눌러 입력 종료. new_file.txt가 없을 경우 새로 생성, 존재할 경우 기존 내용을 덮어 씀. $ cat >> new_file.txt programmed to work and not to feel ^C >> : 명령어 실행 후 파일의 내용(programmed…)을 입력하고 ctrl+c(^C)를 눌러 입력 종료. new_file.txt가 없을 경우 새로 생성, 존재할 경우 기존 내용 뒤에 이어 씀. $ cat new_file.txt hello worl..
-
osm_cartography - RViz에 오픈스트리트맵(OSM) 데이터 시각화하기ROS 2022. 12. 25. 17:31
osm_cartography 오픈스트리트맵(OpenStreetMap)에서 다운받은 데이터를 RViz에 띄워주는 ROS 패키지 (BSD Lisence) http://wiki.ros.org/osm_cartography osm_cartography - ROS Wiki melodic noetic Show EOL distros: EOL distros: fuerte groovy hydro indigo kinetic lunar fuerte: Documentation generated on January 02, 2014 at 11:33 AMgroovy: Documentation generated on October 06, 2014 at 03:04 AMhydro: Documentation generated on wiki..
-
Invalid Provisioning Profile Signature (Error 90165)iOS 2022. 4. 13. 13:39
앱 스토어에 제출하려고 아카이빙 했더니 이런 에러 메시지가 떴다. App Store Connect Operation Error Invalid Provisioning Profile Signature. The provisioning profile included in the bundle 'xxx' (Payload/xxx.app) cannot be used to submit apps to the iOS App Store until it has a valid signature from Apple. (Expired profile signing certificate.) For more information, visit the iOS Developer Portal. With error code STATE_ERROR...
-
TestFlight 내부 테스터 추가 안 되는 문제 (No Builds Available)iOS 2022. 4. 13. 13:23
내부 테스팅을 위해 빌드를 App Store Connect에 업로드 했더니 제출 준비는 완료됐다고 나오면서 내부 테스팅 그룹이 추가되질 않았다. 내부 테스팅 그룹에 들어가서 빌드를 추가해보려고 해도 사용할 수 있는 빌드가 없다(No Builds Available)고만 나오고... 찾아보니 수출 규정 준수(Export Compliance) 정보가 입력되지 않아서 그렇다고 한다. https://developer.apple.com/forums/thread/128891?page=2 No Builds Available internal testi… | Apple Developer Forums I had the same problem, but it was my first build ever being uploaded..
-
iOS WKWebView 파일 다운로드 및 파일 미리보기 (Objective-C)iOS 2022. 4. 10. 09:22
웹에서 파일 다운로드 url(pdf)이 넘어오면 파일을 다운받고, 미리보기로 보여주는 기능을 구현했다. 내가 받는 url는 이런 형태로 되어 있다. https://홈페이지주소/download.do?…&fileNm=%ED%8C%8C%EC%9D%BC%EC%9D%B4%EB%A6%84.pdf 저 fileNm의 뒷부분을 utf-8로 디코딩 해보면 '파일이름.pdf'로 나오는데, 이걸 파일 이름으로 저장할 때 사용하기 위해 아래 링크를 참고했다. https://byunsooblog.wordpress.com/2014/03/16/nsurl-%ED%8C%8C%EB%9D%BC%EB%AF%B8%ED%84%B0-%ED%8C%8C%EC%8B%B1%ED%95%98%EA%B8%B0/comment-page-1/ NSURL 파라미터 ..
-
iOS Firebase 푸시 알림이 안 오는 문제 (didFailToRegisterForRemoteNotificationsWithError null)iOS 2022. 4. 10. 08:38
https://firebase.google.com/docs/cloud-messaging/ios/client?hl=ko Apple 플랫폼에서 Firebase 클라우드 메시징 클라이언트 앱 설정 | Firebase Documentation Join Firebase at Google I/O online May 11-12, 2022. Register now 의견 보내기 Apple 플랫폼에서 Firebase 클라우드 메시징 클라이언트 앱 설정 Apple 클라이언트 앱의 경우 Firebase 클라우드 메시징 APN 인터페이스를 firebase.google.com 분명 위 문서에 나온대로 잘 따라했는데.. 몇 번을 다시해봐도 푸시 알림 권한 요청도 안 뜨고, 당연히 알림도 오지 않았다. 로그를 보니까 이런 메시지가 ..