안녕하세요 애구마님! 6-7) 7:50 쯤에 이미지의 사이즈를 지정해주기 위해 frame() 작성하시는 부분에 질문이 있습니다. bigBanner의 이미지 사이즈 지정 시 AsyncImage(url:URL(string:bigBanner)) { image in image .resizable() .cornerRadius(10) .aspectRatio(contentMode: .fit) // 여기서 사이즈 지정 .frame(width: 300, height: 525) } poster의 이미지 사이즈 지정 시 AsyncImage(url: url) { image in image .resizable() } placeholder: { ProgressView() .tint(Color.white) } // 여기서 사이즈 지정 .frame(width: 100, height: 175) 첫 번째 AsyncImage를 작성하셨을 때 이미지 사이즈는 image에서 직접적으로 작성하셨는데 두번째 포스터들의 이미지 사이즈를 작성하실 때는 placeholder 아래쪽에 작성하신 이유가 궁금합니다. 답변 부탁드립니다. 감사합니다 :)
import win32com.client import os import shutil # 캐시 디렉토리 경로 cache_dir = os.path.join(os.getenv('LOCALAPPDATA'), 'Temp', 'gen_py') # 캐시 디렉토리 삭제 if os.path.exists(cache_dir): shutil.rmtree(cache_dir) # 캐시 재생성 및 한글 객체 생성 hwp = win32com.client.gencache.EnsureDispatch("hwpframe.hwpobject") hwp.XHwpWindows.Item(0).Visible = True hwp.RegisterModule("FilePathCheckDLL", "FilePathCheckerModule") # 문서 시작 위치로 커서 이동 hwp.MovePos(2) # 문서 시작으로 커서 이동 # 표 생성: 행(5), 열(3) act = hwp.CreateAction("TableCreate") pset = act.CreateSet() act.GetDefault(pset) pset.SetItem("Cols", 3) pset.SetItem("Rows", 5) act.Execute(pset) 이게 실행코드고 오류는 --------------------------------------------------------------------------- ModuleNotFoundError Traceback (most recent call last) File ~\AppData\Roaming\Python\Python312\site-packages\win32com\client\gencache.py:255, in GetModuleForCLSID(clsid) 254 try: --> 255 __import__(sub_mod_name) 256 except ImportError: ModuleNotFoundError: No module named 'win32com.gen_py.7D2B6F3C-1D95-4E0C-BF5A-5EE564186FBCx0x1x0.IDHwpAction' During handling of the above exception, another exception occurred: FileNotFoundError Traceback (most recent call last) Cell In[3], line 21 18 hwp.MovePos(2) # 문서 시작으로 커서 이동 20 # 표 생성: 행(5), 열(3) ---> 21 act = hwp.CreateAction("TableCreate") 22 pset = act.CreateSet() 23 act.GetDefault(pset) File ~\AppData\Local\Temp\gen_py\3.12\7D2B6F3C-1D95-4E0C-BF5A-5EE564186FBCx0x1x0\IHwpObject.py:106, in IHwpObject.CreateAction(self, actidstr) 103 ret = self._oleobj_.InvokeTypes(10031, LCID, 1, (9, 0), ((8, 1),),actidstr 104 ) 105 if ret is not None: --> 106 ret = Dispatch(ret, 'CreateAction', None) 107 return ret File ~\AppData\Roaming\Python\Python312\site-packages\win32com\client\__init__.py:119, in Dispatch(dispatch, userName, resultCLSID, typeinfo, UnicodeToString, clsctx) 117 assert UnicodeToString is None, "this is deprecated and will go away" 118 dispatch, userName = dynamic._GetGoodDispatchAndUserName(dispatch, userName, clsctx) --> 119 return __WrapDispatch(dispatch, userName, resultCLSID, typeinfo, clsctx=clsctx) File ~\AppData\Roaming\Python\Python312\site-packages\win32com\client\__init__.py:47, in __WrapDispatch(dispatch, userName, resultCLSID, typeinfo, UnicodeToString, clsctx, WrapperClass) 43 from . import gencache 45 # Attempt to load generated module support 46 # This may load the module, and make it available ---> 47 klass = gencache.GetClassForCLSID(resultCLSID) 48 if klass is not None: 49 return klass(dispatch) File ~\AppData\Roaming\Python\Python312\site-packages\win32com\client\gencache.py:200, in GetClassForCLSID(clsid) 198 if CLSIDToClass.HasClass(clsid): 199 return CLSIDToClass.GetClass(clsid) --> 200 mod = GetModuleForCLSID(clsid) 201 if mod is None: 202 return None File ~\AppData\Roaming\Python\Python312\site-packages\win32com\client\gencache.py:264, in GetModuleForCLSID(clsid) 261 info = demandGeneratedTypeLibraries[info] 262 from . import makepy --> 264 makepy.GenerateChildFromTypeLibSpec(sub_mod, info) 265 # Generate does an import... 266 mod = sys.modules[sub_mod_name] File ~\AppData\Roaming\Python\Python312\site-packages\win32com\client\makepy.py:377, in GenerateChildFromTypeLibSpec(child, typelibInfo, verboseLevel, progressInstance, bUnicodeToString) 374 progress.LogBeginGenerate(dir_path_name) 376 gen = genpy.Generator(typelib, info.dll, progress) --> 377 gen.generate_child(child, dir_path_name) 378 progress.SetDescription("Importing module") 379 importlib.invalidate_caches() File ~\AppData\Roaming\Python\Python312\site-packages\win32com\client\genpy.py:1363, in Generator.generate_child(self, child, dir) 1361 out_name = os.path.join(dir, an_item.python_name) + ".py" 1362 worked = False -> 1363 self.file = self.open_writer(out_name) 1364 try: 1365 if oleitem is not None: File ~\AppData\Roaming\Python\Python312\site-packages\win32com\client\genpy.py:1049, in Generator.open_writer(self, filename, encoding) 1039 def open_writer(self, filename, encoding="mbcs"): 1040 # A place to put code to open a file with the appropriate encoding. 1041 # Does *not* set self.file - just opens and returns a file. (...) 1046 # don't step on each others' toes. 1047 # Could be a classmethod one day... 1048 temp_filename = self.get_temp_filename(filename) -> 1049 return open(temp_filename, "wt", encoding=encoding) FileNotFoundError: [Errno 2] No such file or directory: 'C:\\Users\\lemon\\AppData\\Local\\Temp\\gen_py\\3.12\\7D2B6F3C-1D95-4E0C-BF5A-5EE564186FBCx0x1x0\\IDHwpAction.py.7700.temp' 이렇게 나오는데 해결할 수 있는 방법 있을까요?
궁금한 점이 있습니다. 지금까지는 다음과 같이 app.use 안에 요청 처리를 위한 미들웨어를 작성했는데, app.use((req, res, next) => { console.log("모든 요청에 실행하고 싶어요"); next(); }); 다음과 같이 app.use에 다운받은 미들웨어를 장착하는 건 "이 파일에서 특정 미들웨어를 사용하겠다"는 의도로 사용하는 건가요?? 아니면 둘 다 같은 동작을 하는건데 제가 둘을 다르다고 생각하는 걸까요? app.use(morgan("dev")); app.use(cookieParser()); app.use(express.json()); app.use(express.urlencoded({ extended: true })); 추가로, 위 미들웨어들로 인해 req 이나 res 객체에서 편하게 .cookie 나 .body 를 사용할 수 있게 되는데 그럼 미들웨어 내에서 미들웨어를 사용하는 건가요 🤔 🤔 ?
- 학습 관련 질문을 남겨주세요. 상세히 작성하면 더 좋아요! - 먼저 유사한 질문이 있었는지 검색해보세요. - 서로 예의를 지키며 존중하는 문화를 만들어가요. - 잠깐! 인프런 서비스 운영 관련 문의는 1:1 문의하기를 이용해주세요. 자두나무 문제에 대한 설명에서 .이 문제가 탑다운 dp란 설명에서 ' 이 재귀적인 DP는 필요한 부분의 배열만을 만든다는 것이 특징입니다. ' [출처] [알고리즘 강의] 7주차. DP, 동적계획법, 다이나믹프로그래밍 | 작성자 큰돌 라는 문장이 이해가 가지 않습니다. 필요한 부분의 배열만을 만든다는게 정확히 무슨말인가요? 또한, 탑다운 dp와 버텀업dp 위에서 아래로 간다 /아래에서 위로간다 라는 말이 완벽하게 이해가 가지 않습니다.
현재 강의에는 StatComponent로 해서 공통적으로 Npc와 플레이어의 Stat을 관리해주고있는데 경험치총량과 경험치량을 StatComponent에 추가로 만들어놓는다고 할때 Npc의 죽음에있어서 플레이어의 경험치를 올리는 기능을 구현한다면 델리게이트를 사용해 몬스터의 죽음을 알린뒤에 경험치를 올리는 로직을 처리함에 있어서 플레이어의 경험치를 올리는 함수를 호출하는 과정에 있어서 형변환을 통해 결국 의존성이 발생하는 것 같아서 질문드립니다. 의존성을 없애는 최적의 방법은 어떻게 하는게 좋을까요? 또 만약 결국 형변환을 통해서 Npc의 cpp 코드에서 플레이어의 함수를 부른다면 플레이어의 헤더를 추가해서 부르는 것이 아니라 언리얼에 제공되는 현재 빙의된 플레이어를 불러서 플레이어의 함수를 부를수 있는 방법이 있을까요?
BGR 회로의 low-voltage Reference 개선해보기 강의에서 R5의 저항 변수를 BGR_RES로 설정하고 스윕했을 때 1.38V에 가까운 저항값을 어떻게 알 수 있나요? 영상 15분 16초 내용 입니다! 1.38V에 가까운 저항 값이 무엇인지 나오게(?)하는 방법이 있나요? 아니면 범위를 좁혀 나가서 구해야하나요?
CUDA 프로그래밍 (5) - C/C++/GPU 병렬 컴퓨팅 - 아토믹 연산 atomic op
"hist - shared.cu"의 다음 부분에서 질문있습니다. if(threadIdx.x < HIST_SIZE) { atomicAdd(&(hist[threadIdx.x]), s_hist[threadIdx.x]); } threadIdx.x는 0~31로 모두 다르기 때문에 병렬 연산이긴 해도, global memory에 있는 hist 배열의 서로 다른부분으로 write가 이루어진다고 생각했습니다. 따라서 서로 겹치는 위치가 없어서 atomic한 연산이 필요없을거라 생각했는데, atomic 연산이 없으면 결과가 이상하게 나오더라구요.. 혹시 왜 그런지 알 수 있을까요? 양질의 강의 제공해주셔서 감사합니다!
package Practice; import java.util.Scanner; public class class13 { public static void main(String[] args) { Scanner scanner = new Scanner(System.in); int maxCount = 10; String[] productNames = new String[maxCount]; int[] productPrice = new int[maxCount]; int productCount = 0; while (true) { System.out.print("1. 상품 등록 | 2. 상품 목록 | 3. 종료\n메뉴룰 선택하세요:"); int menu = scanner.nextInt(); scanner.nextLine(); if (menu == 1) { if (productCount >= maxCount) { System.out.println("더 이상 상품을 등록할 수 없습니다."); continue; } System.out.print("상품 이름을 입력하세요:"); productNames[productCount] =scanner.nextLine(); System.out.print("상품 가격을 입력하세요:"); productPrice[productCount] = scanner.nextInt(); productCount++; } else if (menu == 2) { if (productCount == 0) { System.out.println("등록된 상품이 없습니다."); continue; } for (int i = 0; i < productCount; i++) { System.out.println(productNames[i] + ": " + productPrice[i] + "원"); } } else if (menu == 3) { System.out.println("프로그램을 종료합니다"); break; } else { System.out.println("잘못된 메뉴를 선택하셨습니다"); } } } } 요 코드에서 맨 마지막 else문에 continue; 는 없어도 되나요?
2024년 8월 현재 강의들으며 실습하다 막히는 분들 참고용으로 제 소스 공유합니다. 막혔던 부분 커뮤니티에 해결방법 공유해주신 분들 덕분에 실습 잘 하고 있습니다. 모두 감사합니다^^ +++ OAuth2.0 실습 소스 +++ https://github.com/hhmkorea/studySpringBoot/tree/main/security1 +++ JWT 실습 소스 +++ https://github.com/hhmkorea/studySpringBoot/tree/main/jwt ##### 막힌 부분 뚫어준 커뮤니티 글 출처 ##### 1. BycryptPasswordEncoder 주입시 순환참조 문제 해결!! (9강) : https://www.inflearn.com/questions/476829 페이스북 로그인 버튼 만든 뒤 error 발생하던 문제 해결!! (10강) : https://www.inflearn.com/community/questions/1049529 3. SecurityConfig 최신 버전에 맞게 수정!! (20강~22강) : https://www.inflearn.com/questions/1335544 authenticationManager() 문제 해결!! (24강) : https://www.inflearn.com/community/questions/1145565 authenticationManager 값이 null로 나오는 문제 해결!! (25강) : https://www.inflearn.com/questions/1266285 >>> 24강 강의 실습 전 준비할 것 : 회원가입 구현 <<< 아래 소스에 회원가입 구현 부분 추가 한다. 소스명 : JwtApplication. java ... @Bean BCryptPasswordEncoder passwordEncoder() { return new BCryptPasswordEncoder(); } ... 소스명 : RestApiController. java ... @PostMapping("join") public String join(@RequestBody User user) { user.setPassword(bCryptPasswordEncoder.encode(user.getPassword())); user.setRoles("USER"); // 권한은 기본으로 USER로 설정합니다. ---> security 최신 버전에서는 권한 적용시 ROLE_ 쓰지 않음. userRepository.save(user); return "회원가입완료"; } ... application.yml 파일 수정해서 테이블을 새로 만든다. ddl-auto: create 로 수정하고 서버 재시작 postman으로 회원가입 테스트하기.
두가지 질문이 있습니다. 저는 J랑 F가 제자리에 있을 때는 카운트 안 하고 이동할 때마다 증가해서 J가 아예 빠져나오는 것을 카운트해야된다고 생각하였는데 제가 잘못 생각하는걸까요..? #### #JF# # . . # # . . # #### -------------------------- # J F # # 1 . # # 2 . # 이렇게 탈출했다고 생각하였습니다. 3 2. 불이 몇개 이상이다라는 조건이 없는데 한개만 가능하다라는 조건이 없기때문에 여러개가 가능하다고 생각을 해줘야되나요?? 이 문제는 생각보다 친절하지 않은 문제같은데 제 생각이 맞을까요ㅠ
L3 스위치도 host가 맞나요?? 1번이 맞다면 궁금한 점이 생겼는데요. L3 스위치는 distibution 스위치로 사용할 수 있는 것으로 알고 있습니다. 그런데 뒤에 강의에서 distibution 스위치는 L2 스위치라고 나오는데 L2 스위치는 또 호스트는 아니라고 하셨고.. 너무 헷갈리네요. distribution 스위치중 L3 스위치 역할을 하는 스위치가 존재하고 이 경우 distribution 스위치를 L2가 아닌 L3 스위치로 보고 호스트라고 이해하면 될까요?