프로그래밍/개발메모
-
python Exception in thread / 쓰레드 사용중 황당한 에러프로그래밍/개발메모 2022. 8. 3. 22:26
# 코드 import threading, time def proc(res): print("start", res) time.sleep(3) print("end") t = threading.Thread(target=proc, args=("abc")) t.start() # 결과 PS C:\project\unity\MyQuant\python> python3 .\pg.py Exception in thread Thread-1 (proc): Traceback (most recent call last): File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.10_3.10.1520.0_x64__qbz5n2kfra8p0\lib\threading.py",..
-
라즈베리파이에서 c# 돌리기 dotnet 명령어프로그래밍/개발메모 2022. 5. 17. 18:51
출처: https://docs.microsoft.com/ko-kr/dotnet/iot/deployment Raspberry Pi에 .NET 앱 배포 Raspberry Pi에 .NET 앱을 배포하는 방법을 알아봅니다. docs.microsoft.com 빠르다곤 말할 수 없구요 명령어가 잘도는지 체크를 했는데 문제없이 잘돌아갔습니다. 먼저 스크립트로를 이용해 설치합니다. 스크립트가 변경될 수 있어서 본문제 적진 않겠습니다. 출처의 링크를 가서 봐주시구요 root 가 아닌 유저라도 설치는 가능한데 설치 경로가 ~/.dotnet 이 됩니다. 내용 더 내려가시면 .bashrc 에 path 등록하는 부분도 있으니 진행하시구요 source .bashrc 는 해도 안먹히는군요 저는 ssh 다시 들어가니 되네요 (의문의..
-
vue reactivityTransform $ref 사용할수 없을때 / '$ref' not defined프로그래밍/개발메모 2022. 5. 14. 17:14
출처: https://vueshowcase.com/question/vue-reactivity-transform-ref-not-defined vue reactivity transform $ref not defined vueshowcase.com 이 글을 보고 해결하였습니다. vite 필요한건 아니고 eslint 가 방해하는거 였군요 // .eslintrc.js module.exports = { // (생략) globals: { $ref: "readonly", $computed: "readonly", $shallowRef: "readonly", $customRef: "readonly", $toRef: "readonly", }, }; global 변수 등록 해서 해결했습니다..
-
node.js module (mjs 파일) 에서 json 파일 require 하는 방법프로그래밍/개발메모 2022. 5. 12. 13:41
module 은 require 대신 import ~ from 을 쓰는 형식이구요 이 형식에서는 require 가 없어서 json 파일을 가져올 수 가 없군요. 이럴때에는 이런 방법이 있습니다. import { createRequire } from "module"; const require = createRequire(import.meta.url); const config = require("./config.json"); require 함수를 import 하는 방법입니다. ㄷㄷㄷ 대신 이 require 는 소스는 가져올 수 없습니다. const abc = require("./abc.js"); 이런거 말이죠 import ~~ from 쓰면되니 굳이 이럴필요는 없겠지만요 json 읽을때만 사용하세요