고수가 되는 파이썬 : 동시성과 병렬성 문법 배우기 Feat. 멀티스레딩 vs 멀티프로세싱 (Inflearn Original)
안녕하세요 선생님. 동기화가 안되어서 Ending value가 2가 나오는 현상에 대해서 질문이 있습니다. 분명히 logging.info("Thread %s: finishing update", n)까지 실행이 3번되었는데 self.value가 3이 안나오는 이유가 궁금합니다. 수업에서 설명해주신거같은데 아직 이해가 잘 안된거같습니다. 동시에 함수가 실행되어서 나타나는 현상인가요?
안녕하세요! 스프링 빈의 역할이 무엇인지 잘 모르겠습니다..! 빈 자체의 개념이 이해가 안가서 서치를 좀 해보니 " 매번 클라이언트에서 요청이 올 때마다 각 로직을 담당하는 오브젝트를 새로 만들어서 사용한다고 생각해보자 요청 한 번에 5개의 오브젝트가 새로 만들어지고 초당 500개의 요청이 들어오면, 초당 2500개의 새로운 오브젝트가 생성된다. 서버가 감당하기 힘들다." 그래서 빈이 필요하다 라는 말을 봤는데 그 필요성은 알겠으나 정확하게 빈이 무엇인지 모르겠습니다 또한 왜 new로 선언하면 빈이 되지 못하는건가요?
com.example.chatting_video을 이름 바꾸는 것도 알려주세요. example 대신에 제 아이디 tkhpsch 쓰고 싶은데 안되네요. 어떻게 성공했는지 알고 싶어요. Log.d에서 Log 임포트가 안되는데요? package com.example.chatting_video import android.content.Intent import androidx.appcompat.app.AppCompatActivity import android.os.Bundle import com.google.firebase.auth.FirebaseAuth import kotlinx.android.synthetic.main.activity_main.* import android.util.Log as Log import kotlinx.android.synthetic.main.activity_main.login_button_main as login_button_main class MainActivity : AppCompatActivity() { private lateinit var auth : FirebaseAuth // ... private val TAG : String = MainActivity:: class . java . simpleName override fun onCreate (savedInstanceState: Bundle?) { super .onCreate(savedInstanceState) setContentView(R.layout. activity_main ) auth = FirebaseAuth.getInstance() auth .createUserWithEmailAndPassword( "tkhpsch@gmail.com" , "123123" ) .addOnCompleteListener( this ) { task -> if (task. isSuccessful ) { // Sign in success, update UI with the signed-in user's information Log.d( TAG , " 성공 " ) } else { Log.d( TAG , " 실패 " ) } } login_button_main.setOnClickListener { val intent = Intent( this, LoginActivity:: class . java ) startActivity(intent) } } } 04/26 10:18:54: Launching 'app' on Pixel_3a_API_30_x86. Install successfully finished in 630 ms. $ adb shell am start -n "com.example.chatting_video/com.example.chatting_video.MainActivity" -a android.intent.action.MAIN -c android.intent.category.LAUNCHER Connected to process 11589 on device 'Pixel_3a_API_30_x86 [emulator-5554]'. Capturing and displaying logcat messages from application. This behavior can be disabled in the "Logcat output" section of the "Debugger" settings page. D/NetworkSecurityConfig: No Network Security Config specified, using platform default D/NetworkSecurityConfig: No Network Security Config specified, using platform default W/ComponentDiscovery: Class com.google.firebase.dynamicloading.DynamicLoadingRegistrar is not an found. I/FirebaseApp: Device unlocked: initializing all Firebase APIs for app [DEFAULT] I/DynamiteModule: Considering local module com.google.android.gms.measurement.dynamite:48 and remote module com.google.android.gms.measurement.dynamite:13 Selected local version of com.google.android.gms.measurement.dynamite I/FirebaseInitProvider: FirebaseApp initialization successful D/libEGL: loaded /vendor/lib/egl/libEGL_emulation.so D/libEGL: loaded /vendor/lib/egl/libGLESv1_CM_emulation.so D/libEGL: loaded /vendor/lib/egl/libGLESv2_emulation.so I/FirebaseAuth: [FirebaseAuth:] Preparing to create service connection to fallback implementation V/FA: onActivityCreated W/.chatting_vide: Accessing hidden method Landroid/view/View;->computeFitSystemWindows(Landroid/graphics/Rect;Landroid/graphics/Rect;)Z (greylist, reflection, allowed) W/.chatting_vide: Accessing hidden method Landroid/view/ViewGroup;->makeOptionalFitsSystemWindows()V (greylist, reflection, allowed) V/FA: App measurement collection enabled V/FA: App measurement enabled for app package, google app id: com.example.chatting_video, 1:29337236477:android:aa8b18060dba662ba25f94 I/FA: App measurement initialized, version: 39065 To enable debug logging run: adb shell setprop log.tag.FA VERBOSE To enable faster debug mode event logging run: adb shell setprop debug.firebase.analytics.app com.example.chatting_video D/FA: Debug-level message logging enabled V/FA: Connecting to remote service V/FA: Connection attempt already in progress V/FA: Connection attempt already in progress V/FA: Activity resumed, time: 16001157 I/FA: Tag Manager is not found and thus will not be used D/HostConnection: HostConnection::get() New Host Connection established 0xefdad110, tid 11639 D/HostConnection: HostComposition ext ANDROID_EMU_CHECKSUM_HELPER_v1 ANDROID_EMU_native_sync_v2 ANDROID_EMU_native_sync_v3 ANDROID_EMU_native_sync_v4 ANDROID_EMU_dma_v1 ANDROID_EMU_direct_mem ANDROID_EMU_host_composition_v1 ANDROID_EMU_host_composition_v2 ANDROID_EMU_vulkan ANDROID_EMU_deferred_vulkan_commands ANDROID_EMU_vulkan_null_optional_strings ANDROID_EMU_vulkan_create_resources_with_requirements ANDROID_EMU_YUV_Cache ANDROID_EMU_async_unmap_buffer ANDROID_EMU_vulkan_ignored_handles ANDROID_EMU_vulkan_free_memory_sync ANDROID_EMU_vulkan_shader_float16_int8 ANDROID_EMU_vulkan_async_queue_submit GL_OES_EGL_image_external_essl3 GL_OES_vertex_array_object GL_KHR_texture_compression_astc_ldr ANDROID_EMU_host_side_tracing ANDROID_EMU_async_frame_commands ANDROID_EMU_gles_max_version_3_0 W/OpenGLRenderer: Failed to choose config with EGL_SWAP_BEHAVIOR_PRESERVED, retrying without... D/EGL_emulation: eglCreateContext: 0xefdaca80: maj 3 min 0 rcv 3 D/EGL_emulation: eglMakeCurrent: 0xefdaca80: ver 3 0 (tinfo 0xf00fa290) (first time) V/FA: Connection attempt already in progress V/FA: Connection attempt already in progress I/Gralloc4: mapper 4.x is not supported D/HostConnection: createUnique: call D/HostConnection: HostConnection::get() New Host Connection established 0xefdac770, tid 11639 D/goldfish-address-space: allocate: Ask for block of size 0x100 D/goldfish-address-space: allocate: ioctl allocate returned offset 0x3fdef0000 size 0x2000 D/HostConnection: HostComposition ext ANDROID_EMU_CHECKSUM_HELPER_v1 ANDROID_EMU_native_sync_v2 ANDROID_EMU_native_sync_v3 ANDROID_EMU_native_sync_v4 ANDROID_EMU_dma_v1 ANDROID_EMU_direct_mem ANDROID_EMU_host_composition_v1 ANDROID_EMU_host_composition_v2 ANDROID_EMU_vulkan ANDROID_EMU_deferred_vulkan_commands ANDROID_EMU_vulkan_null_optional_strings ANDROID_EMU_vulkan_create_resources_with_requirements ANDROID_EMU_YUV_Cache ANDROID_EMU_async_unmap_buffer ANDROID_EMU_vulkan_ignored_handles ANDROID_EMU_vulkan_free_memory_sync ANDROID_EMU_vulkan_shader_float16_int8 ANDROID_EMU_vulkan_async_queue_submit GL_OES_EGL_image_external_essl3 GL_OES_vertex_array_object GL_KHR_texture_compression_astc_ldr ANDROID_EMU_host_side_tracing ANDROID_EMU_async_frame_commands ANDROID_EMU_gles_max_version_3_0 W/System: Ignoring header X-Firebase-Locale because its value was null. D/FA: Connected to remote service V/FA: Processing queued up service tasks: 5 D/MainActivity: 실패 V/FA: Inactivity, disconnecting from the service
Tehorem 4.d A has a pivot position in every row. 에서 [0 ... 0 b] 인 형태가 하나라도 있으면 해가 없으니까 모든 row에 pivot position 을 가진다고 했는데 만약 b가 0인 경우면 free variable을 가진 상태로 해가 있을 수 있는 것 같은데 그게 안되는 이유를 모르겠습니다
아직 root 폴더에서 npm install 하는 단계입니다. 에러를 구글링하다보니 windows-build-tools 를 설치해야한다고해서, 관리자권한으로 powershell 실행해서 잘 설치했는데 해결되지 않아서요..ㅠㅠ 어떻게 해야할지 알려주실 수 있을까요? ++ 에러메시지 아래 추천으로 npm config set python 을 실행해봤지만 해결되지 않았습니다. node-pre-gyp WARN Using needle for node-pre-gyp https download node-pre-gyp WARN Tried to download(404): https://github.com/kelektiv/node.bcrypt.js/releases/download/v3.0.8/bcrypt_lib-v3.0.8-node-v83-win32-x64-unknown.tar.gz node-pre-gyp WARN Pre-built binaries not found for bcrypt@3.0.8 and node@14.16.0 (node-v83 ABI, unknown) (falling back to source compile with node-gyp) gyp ERR! find Python gyp ERR! find Python Python is not set from command line or npm configuration gyp ERR! find Python Python is not set from environment variable PYTHON gyp ERR! find Python checking if "python" can be used gyp ERR! find Python - "python" is not in PATH or produced an error gyp ERR! find Python checking if "python2" can be used gyp ERR! find Python - "python2" is not in PATH or produced an error gyp ERR! find Python checking if "python3" can be used gyp ERR! find Python - "python3" is not in PATH or produced an error gyp ERR! find Python checking if the py launcher can be used to find Python 2 gyp ERR! find Python - "py.exe" is not in PATH or produced an error gyp ERR! find Python checking if Python is C:\Python27\python.exe gyp ERR! find Python - "C:\Python27\python.exe" could not be run gyp ERR! find Python checking if Python is C:\Python37\python.exe gyp ERR! find Python - "C:\Python37\python.exe" could not be run gyp ERR! find Python gyp ERR! find Python ********************************************************** gyp ERR! find Python You need to install the latest version of Python. gyp ERR! find Python Node-gyp should be able to find and use Python. If not, gyp ERR! find Python you can try one of the following options: gyp ERR! find Python - Use the switch --python="C:\Path\To\python.exe" gyp ERR! find Python (accepted by both node-gyp and npm) gyp ERR! find Python - Set the environment variable PYTHON gyp ERR! find Python - Set the npm configuration variable python: gyp ERR! find Python npm config set python "C:\Path\To\python.exe" gyp ERR! find Python For more information consult the documentation at: gyp ERR! find Python https://github.com/nodejs/node-gyp#installation gyp ERR! find Python ********************************************************** gyp ERR! find Python gyp ERR! configure error gyp ERR! stack Error: Could not find any Python installation to use gyp ERR! stack at PythonFinder.fail (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\find-python.js:307:47) gyp ERR! stack at PythonFinder.runChecks (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\find-python.js:136:21) gyp ERR! stack at PythonFinder.<anonymous> (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\find-python.js:225:16) gyp ERR! stack at PythonFinder.execFileCallback (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\find-python.js:271:16) gyp ERR! stack at exithandler (child_process.js:315:5) gyp ERR! stack at ChildProcess.errorhandler (child_process.js:327:5) gyp ERR! stack at ChildProcess.emit (events.js:315:20) gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:275:12) gyp ERR! stack at onErrorNT (internal/child_process.js:465:16) gyp ERR! stack at processTicksAndRejections (internal/process/task_queues.js:80:21) gyp ERR! System Windows_NT 10.0.19042 gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "configure" "--fallback-to-build" "--module=C:\\김하영\\STUDY\\react\\react_study_2\\boilerplate-mern-stack-master\\node_modules\\bcrypt\\lib\\binding\\bcrypt_lib.node" "--module_name=bcrypt_lib" "--module_path=C:\\김하영\\STUDY\\react\\react_study_2\\boilerplate-mern-stack-master\\node_modules\\bcrypt\\lib\\binding" "--napi_version=7" "--node_abi_napi=napi" "--napi_build_version=0" "--node_napi_label=node-v83" gyp ERR! cwd C:\김하영\STUDY\react\react_study_2\boilerplate-mern-stack-master\node_modules\bcrypt gyp ERR! node -v v14.16.0 gyp ERR! node-gyp -v v5.1.0 gyp ERR! not ok node-pre-gyp ERR! build error node-pre-gyp ERR! stack Error: Failed to execute 'C:\Program Files\nodejs\node.exe C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js configure --fallback-to-build --module=C:\김하영\STUDY\react\react_study_2\boilerplate-mern-stack-master\node_modules\bcrypt\lib\binding\bcrypt_lib.node --module_name=bcrypt_lib --module_path=C:\김하영\STUDY\react\react_study_2\boilerplate-mern-stack-master\node_modules\bcrypt\lib\binding --napi_version=7 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v83' (1) node-pre-gyp ERR! stack at ChildProcess.<anonymous> (C:\김하영\STUDY\react\react_study_2\boilerplate-mern-stack-master\node_modules\node-pre-gyp\lib\util\compile.js:83:29) node-pre-gyp ERR! stack at ChildProcess.emit (events.js:315:20) node-pre-gyp ERR! stack at maybeClose (internal/child_process.js:1048:16) node-pre-gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:288:5) node-pre-gyp ERR! System Windows_NT 10.0.19042 node-pre-gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\김하영\\STUDY\\react\\react_study_2\\boilerplate-mern-stack-master\\node_modules\\node-pre-gyp\\bin\\node-pre-gyp" "install" "--fallback-to-build" node-pre-gyp ERR! cwd C:\김하영\STUDY\react\react_study_2\boilerplate-mern-stack-master\node_modules\bcrypt node-pre-gyp ERR! node -v v14.16.0 node-pre-gyp ERR! node-pre-gyp -v v0.14.0 node-pre-gyp ERR! not ok Failed to execute 'C:\Program Files\nodejs\node.exe C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js configure --fallback-to-build --module=C:\김하영\STUDY\react\react_study_2\boilerplate-mern-stack-master\node_modules\bcrypt\lib\binding\bcrypt_lib.node --module_name=bcrypt_lib --module_path=C:\김하 영\STUDY\react\react_study_2\boilerplate-mern-stack-master\node_modules\bcrypt\lib\binding --napi_version=7 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v83' (1) npm WARN react-redux@5.1.2 requires a peer of react@^0.14.0 || ^15.0.0-0 || ^16.0.0-0 but none is installed. You must install peer dependencies yourself. npm WARN react-redux@5.1.2 requires a peer of redux@^2.0.0 || ^3.0.0 || ^4.0.0-0 but none is installed. You must install peer dependencies yourself. npm WARN react-boiler-plate@1.0.0 No repository field. npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.12 (node_modules\fsevents): npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.12: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"}) npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! bcrypt@3.0.8 install: `node-pre-gyp install --fallback-to-build` npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the bcrypt@3.0.8 install script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above. npm ERR! A complete log of this run can be found in: npm ERR! C:\Users\jerem\AppData\Roaming\npm-cache\_logs\2021-04-26T00_37_15_758Z-debug.log
파일처리에 관해서 전혀 몰라서 여쭤봅니다. freopen 함수에서 모드는 "rt"로 하셨는데요. "r"의 기본이 테스트 모드가 맞나요? 그러므로 이문제에서 "rt"를 쓰나 "r"을 쓰나 결과는 같은거죠? 바이너리 파일을 다룰 때 "rb", "wb"로 명확하게 지정해주는 것이 필요하다면 기본적인 텍스트 파일에서는 "rt" / "r", "wt", "w" 크게 구분없이 이용해도 되는건가요?
강의에서 swr로 각 컴포넌트마다 호출하면 props를 쓰지 않아도 된다고 하셨는데, 컴포넌트마다 userData같은 똑같은 데이터를 각 컴포넌트마다 swr로 여러번 호출하는 것 보다 부모 컴포넌트에서 한번만 호출하고 props로 전달해주는 것이 최적화나 서버에 더 도움이 되지 않나요?
제가 이 강의를 통해서 웹 사이트를 제작하는 과정에 있습니다 지금 구현하고자 하는 페이지가 디비에 등록된 방 (방에 대한 정보 : 위치, 지정날짜, 인원 등등)을 고객이 방에 대한 정보에 대해 입력을 하고 입력한 방과 일치하는 방만을 화면에 뿌려주는 작업을 하고 있습니다. (야놀자에서 방을 예약할 때 자신이 이용하고자 하는 숙소의 위치나 체크인 체크아웃 날짜를 입력했을 때 해당 방만을 보여주는 페이지라고 생각하시면 됩니다!) 그런데 방 조회 로직에서 조금 어려움을 겪고 있습니다ㅠㅠㅠㅠ axios 통신을 통해 .get 부분에 조건문을 달아주면 될 것 같은데 코딩 경험이 많지가 않아서 어떻게 로직을 구현해야 할지 조금 감이 안 잡힙니다 강사님에게 조언을 요청하고자 질문을 남겨봅니다!
안녕하세요~ 4분 21초 쯤에 cin으로 문자열을 입력받고 그것을 출력할 때 cout << myString<<endl; 이런식으로 출력을 하더라구요 제가 궁금한 것은 만약 int형 배열이 있다고 치면 int a[] = {1, 2,3}; 이후에 cout << a << endl; 시 a[0]의 주소값이 나오는데 myString은 주소가 아닌 문자열 그 자체가 나오는 이유를 알 수 있을까요?
강의영상에 나오는 비쥬얼스튜디오 6.0 을 설치하려는데 설치과정에서 경로설정부분에 The specified location is invalud. please choose another. 이라는 오류가뜹니다. vmware환경에서도 되지않고 아닌 본컴퓨터 환경에서도 되지 않습니다. 어떻게해야하나요..? 이후 강의영상에서도 비쥬얼스튜디오를 다루며 실습을 이어나가나요?
안녕하세요, 강사님! 강의를 복습하다가 궁금증이 생겨 질문 남깁니다. 조회된 엔티티는 영속화되며 1차 캐시에 저장이 되고 특별한 이벤트?! (EntityManager.clear() 또는 Transation이 종료 등등..)로 1차 캐시 내용이 없어진다고 이해하고 있습니다. 이렇게 이해한 내용 토대로 QueryDsl을 사용해도 1차 캐시를 사용하겠지라는 생각과는 다르게 동작하여 개념이 혼돈되고 있습니다. 아래 사진을 참고하시면 첫번째 쿼리를 실행후 그다음 쿼리 실행시 1차 캐시된 엔티티를 찾아 반환해 줘야하는데 다시 DB에 쿼리를 날려 결과를 가지고왔습니다. 제가 어떤 부분을 잘못 이해하고 있는 걸까요?
commission, balance =withdraw_naght(blance,500) print ( "수수료는 {0} 원이며, 잔액은 {1} 원 입니다." .format (commission, balance)) 수수료는 100원 이며 , 잔액은 400원 입니다. 라고 문구가 뜨는걸 볼수 있는데 출금 금액을 1000원 이라고 입력을 하니 잔액이 -100원이라고 뜨는데 수수료 포함하여 잔액이 부족할 경우 출금이 완료되지 않았습니다. 라는 문구를 어떻게 하면 만들어 낼수가 있나요 .. 아무리 해도 오류만 나고 만드는 방법을 모르겠습니다.
js나 css가 이 페이지에서는 전혀 부를 필요가 없는 애인데 전체를 다 번들해서 불러오는 게 일반적인가요? 엔트리 하나 더 만들고 아웃풋2 만들어서 쓰나 했는데 htmlWebpackPlug을 보면... 그냥 번들한 거 죄다 불러오는 거 같아서 이러면 성능상에 문제가 생기거나 하지 않을지 걱정됩니다