하나는 "NullPointerException: Cannot invoke "String.length()" because "<parameter1>" is null" 이런 에러인거 같은데....대체 어디서 잘못된걸까요. 에러가 여러개 인건가요? FAILURE: Build completed with 2 failures. 1: Task failed with an exception. ----------- * What went wrong: Execution failed for task ':app:checkDebugAarMetadata'. > A failure occurred while executing com.android.build.gradle.internal.tasks.CheckAarMetadataWorkAction > 5 issues were found when checking AAR metadata: * Try: > Run with --info or --debug option to get more log output. > Run with --scan to get full insights. * Exception is: org.gradle.api.tasks.TaskExecutionException: Execution failed for task ':app:checkDebugAarMetadata'. Caused by: org.gradle.workers.internal.DefaultWorkerExecutor$WorkExecutionException: A failure occurred while executing com.android.build.gradle.internal.tasks.CheckAarMetadataWorkAction Caused by: java.lang.RuntimeException: 5 issues were found when checking AAR metadata: 1. Dependency 'androidx.appcompat:appcompat-resources:1.7.0' requires libraries and applications that depend on it to compile against version 34 or later of the Android APIs. :app is currently compiled against android-33. Also, the maximum recommended compile SDK version for Android Gradle plugin 8.0.0 is 33. Recommended action: Update this project's version of the Android Gradle plugin to one that supports 34, then update this project to use compileSdk of at least 34. Note that updating a library or application's compileSdk (which allows newer APIs to be used) can be done separately from updating targetSdk (which opts the app in to new runtime behavior) and minSdk (which determines which devices the app can be installed on). 2. Dependency 'androidx.appcompat:appcompat:1.7.0' requires libraries and applications that depend on it to compile against version 34 or later of the Android APIs. :app is currently compiled against android-33. Also, the maximum recommended compile SDK version for Android Gradle plugin 8.0.0 is 33. Recommended action: Update this project's version of the Android Gradle plugin to one that supports 34, then update this project to use compileSdk of at least 34. Note that updating a library or application's compileSdk (which allows newer APIs to be used) can be done separately from updating targetSdk (which opts the app in to new runtime behavior) and minSdk (which determines which devices the app can be installed on). 3. Dependency 'androidx.core:core-ktx:1.13.0' requires libraries and applications that depend on it to compile against version 34 or later of the Android APIs. :app is currently compiled against android-33. Also, the maximum recommended compile SDK version for Android Gradle plugin 8.0.0 is 33. Recommended action: Update this project's version of the Android Gradle plugin to one that supports 34, then update this project to use compileSdk of at least 34. Note that updating a library or application's compileSdk (which allows newer APIs to be used) can be done separately from updating targetSdk (which opts the app in to new runtime behavior) and minSdk (which determines which devices the app can be installed on). 4. Dependency 'androidx.core:core:1.13.0' requires libraries and applications that depend on it to compile against version 34 or later of the Android APIs. :app is currently compiled against android-33. Also, the maximum recommended compile SDK version for Android Gradle plugin 8.0.0 is 33. Recommended action: Update this project's version of the Android Gradle plugin to one that supports 34, then update this project to use compileSdk of at least 34. Note that updating a library or application's compileSdk (which allows newer APIs to be used) can be done separately from updating targetSdk (which opts the app in to new runtime behavior) and minSdk (which determines which devices the app can be installed on). 5. Dependency 'androidx.annotation:annotation-experimental:1.4.0' requires libraries and applications that depend on it to compile against version 34 or later of the Android APIs. :app is currently compiled against android-33. Also, the maximum recommended compile SDK version for Android Gradle plugin 8.0.0 is 33. Recommended action: Update this project's version of the Android Gradle plugin to one that supports 34, then update this project to use compileSdk of at least 34. Note that updating a library or application's compileSdk (which allows newer APIs to be used) can be done separately from updating targetSdk (which opts the app in to new runtime behavior) and minSdk (which determines which devices the app can be installed on). ============================================================================== 2: Task failed with an exception. ----------- * What went wrong: Execution failed for task ':app:mergeExtDexDebug'. > Could not resolve all files for configuration ':app:debugRuntimeClasspath'. > Failed to transform appcompat-resources-1.7.0.aar (androidx.appcompat:appcompat-resources:1.7.0) to match attributes {artifactType=android-dex, asm-transformed-variant=NONE, dexing-enable-desugaring=true, dexing-enable-jacoco-instrumentation=false, dexing-is-debuggable=true, dexing-min-sdk=24, org.gradle.category=library, org.gradle.dependency.bundling=external, org.gradle.libraryelements=aar, org.gradle.status=release, org.gradle.usage=java-runtime}. > Execution failed for DexingNoClasspathTransform: C:\Users\abc14\.gradle\caches\transforms-3\c494794d48d9429ce3837ff3d9162578\transformed\appcompat-resources-1.7.0-runtime.jar. > Error while dexing. > Failed to transform appcompat-1.7.0.aar (androidx.appcompat:appcompat:1.7.0) to match attributes {artifactType=android-dex, asm-transformed-variant=NONE, dexing-enable-desugaring=true, dexing-enable-jacoco-instrumentation=false, dexing-is-debuggable=true, dexing-min-sdk=24, org.gradle.category=library, org.gradle.dependency.bundling=external, org.gradle.libraryelements=aar, org.gradle.status=release, org.gradle.usage=java-runtime}. > Execution failed for DexingNoClasspathTransform: C:\Users\abc14\.gradle\caches\transforms-3\d251d80cfc588f74172158875c7b2196\transformed\appcompat-1.7.0-runtime.jar. > Error while dexing. * Try: > Run with --info or --debug option to get more log output. > Run with --scan to get full insights. * Exception is: org.gradle.api.tasks.TaskExecutionException: Execution failed for task ':app:mergeExtDexDebug'. Caused by: java.lang.NullPointerException: Cannot invoke "String.length()" because "<parameter1>" is null Caused by: java.util.concurrent.ExecutionException: com.android.tools.r8.utils.P0: java.lang.NullPointerException: Cannot invoke "String.length()" because "<parameter1>" is null Caused by: [CIRCULAR REFERENCE: java.lang.NullPointerException: Cannot invoke "String.length()" because "<parameter1>" is null] Cause 2: org.gradle.api.internal.artifacts.transform.TransformException: Failed to transform appcompat-1.7.0.aar (androidx.appcompat:appcompat:1.7.0) to match attributes {artifactType=android-dex, asm-transformed-variant=NONE, dexing-enable-desugaring=true, dexing-enable-jacoco-instrumentation=false, dexing-is-debuggable=true, dexing-min-sdk=24, org.gradle.category=library, org.gradle.dependency.bundling=external, org.gradle.libraryelements=aar, org.gradle.status=release, org.gradle.usage=java-runtime}. Caused by: org.gradle.api.internal.artifacts.transform.TransformException: Execution failed for DexingNoClasspathTransform: C:\Users\abc14\.gradle\caches\transforms-3\d251d80cfc588f74172158875c7b2196\transformed\appcompat-1.7.0-runtime.jar. Caused by: com.android.builder.dexing.DexArchiveBuilderException: Error while dexing. at com.android.builder.dexing.D8DexArchiveBuilder.getExceptionToRethrow(D8DexArchiveBuilder.java:189) Caused by: com.android.tools.r8.CompilationFailedException: Compilation failed to complete, origin: C:\Users\abc14\.gradle\caches\transforms-3\d251d80cfc588f74172158875c7b2196\transformed\appcompat-1.7.0-runtime.jar:androidx/appcompat/app/ActionBarDrawerToggle$1.class Caused by: java.lang.NullPointerException: Cannot invoke "String.length()" because "<parameter1>" is null Suppressed: java.lang.RuntimeException: java.util.concurrent.ExecutionException: com.android.tools.r8.utils.P0: java.lang.NullPointerException: Cannot invoke "String.length()" because "<parameter1>" is null Caused by: java.util.concurrent.ExecutionException: com.android.tools.r8.utils.P0: java.lang.NullPointerException: Cannot invoke "String.length()" because "<parameter1>" is null Caused by: com.android.tools.r8.utils.P0: java.lang.NullPointerException: Cannot invoke "String.length()" because "<parameter1>" is null Caused by: [CIRCULAR REFERENCE: java.lang.NullPointerException: Cannot invoke "String.length()" because "<parameter1>" is null]
안녕하세요~ arr[5] 설명해주실 때 case 1: int arr[5] -> 5개 들고있다고 선언! case 2: arr[5] -> 6번째 값 하면서 case 2 예시로 arr = { 1,2,3,4,5, 6 } 을 들어주셨는데 arr[5] -> 6번째 값이면 6번째에 있는 6이 아닌가요? 7이라고 설명하셨는데 실수하신건지 제가 이해를 잘 못했는지 궁금해서 질문드립니다!
학습하는 분들께 도움이 되고, 더 좋은 답변을 드릴 수 있도록 질문전에 다음을 꼭 확인해주세요. 1. 강의 내용과 관련된 질문을 남겨주세요. 2. 인프런의 질문 게시판과 자주 하는 질문(링크)을 먼저 확인해주세요. (자주 하는 질문 링크: https://bit.ly/3fX6ygx) 3. 질문 잘하기 메뉴얼(링크)을 먼저 읽어주세요. (질문 잘하기 메뉴얼 링크: https://bit.ly/2UfeqCG) 질문 시에는 위 내용은 삭제하고 다음 내용을 남겨주세요. ========================================= [질문 템플릿] 1. 강의 내용과 관련된 질문인가요? (예/아니오) 2. 인프런의 질문 게시판과 자주 하는 질문에 없는 내용인가요? (예/아니오) 3. 질문 잘하기 메뉴얼을 읽어보셨나요? (예/아니오) [질문 내용] 여기에 질문 내용을 남겨주세요. public List<Item> findAll(){ return new ArrayList<>(store.values()); } 이게 강의 내용의 코드인데 이런식이 아니고 말씀하신 컬렉션으로 그대로 반환해준다는게 어떤 방식인지 궁금합니다. 그런식으로도 한번 짜보고싶어서요..
강의를 다 듣고나서 공식문서를 다시 보다, 문득 궁금한점이 생겨 질문 남겨봅니다. 예를 들어 강의에서 작성하는 다음 코드가 있었는데, def show @article = Article.find(params[:id]) end 이때 article 앞에 @을 추가하여 instance 변수로 만드는 이유가 있나요? instance 변수로 만들었다는 것은, 동일한 class 내의 다른 method에서 참조가 가능해지는데…?이는 좋지 못하다고 생각됩니다만? 혹 이렇게 선언하는 이유가 있을까요? Spring진영으로 생각하면 다음과 같은 코드를 작성하는 느낌인데?? public class ArticleQueryApiV1 { private ArticleDto article; @GetMapping("/articles") public ResponseEntity<BaseResponse<ArticleDto>> show() { ArticleDto article = articleQueryUseCase.lookupFirst() this.article = article; // 이 부분을 어떠한 이유에서 수행하는??? return ResponseEntity.ok().body(new BaseResponse<>(articles)); } } Spring만 공부해왔던 저에게는 다소 생소한 "코드"라 생각되어 질문 남겨봅니다!!!
안녕하세요, 1-L 문제 이분탐색으로 풀어보았는데요. lower_bound함수는 목표값을 찾지 못하면 해당 벡터 끝 다음 이터레이터 즉 코드상 arr.end()를 반환하니 lower_bound 실행 후 arr.end()인지 아닌지만 체크해주면 값을 찾았다로 생각했습니다. 그러나 실행시켜보니 조건문에 추가로 &&*it == goal를 적어주어야 성공이고 밑에 첨부한 링크와 같이 이 과정을 생략한다면 틀렸습니다라고 나옵니다. 이유를 알 수 있을까요? http://boj.kr/7f90a9926f17477394e238b900523acc
응답 결과 리소스를 캐시해서 사용해도 되야 캐시 기능을 편하게 사용할 수 있다. GET의 경우 만약 요청 메세지가 같다면 굳이 통신까지 사용해서 서버에서 응답을 받을 것이 아니라 이전 응답에 의한 응답 메세지가 캐싱되어있다면 캐시에서 꺼내올 수 있을 것이다. 이러한 방식을 완전 캐시 히트 (Full Cache Hit) 라고 한다. 캐시를 활용하여 서버와의 최소한의 통신만 하는 조건부 요청 이 가능하다. 만약 캐시를 이용할 수 있는 GET요청이지만 이전 요청과 요청조건이 다르다면 서버와의 최소한의 통신으로 응답이 같을 건지 확인하고 같을 것이라면 캐시에서 이전 응답을 꺼내오는 것이다. POST를 생각해보자. POST는 body message를 처리한다고 했다. 즉 GET과 달리 body message가 추가된다. 아래는 "만약 POST작업을 캐싱한다면"의 예시이다. 캐시는 key:value 구조를 가진다. 만약 url을 key로 사용한다면 body message가 달라질 경우 동일한 작업이 보장되지 않는다. /api/submit: POST /api/submit {"username": "user1", "password": "pass1"} /api/submit: POST /api/submit {"username": "user2", "password": "pass2"} 보통 HTTP 캐시는 요청을 구분하는 주요 키로 URL을 사용한다. POST 요청의 본문은 URL과는 별도로 고유한 캐시 키를 구성해야 하며, 이는 복잡성과 추가적인 관리를 필요로 한다. 즉 GET보다 POST가 다뤄야할 변수가 많기에 상태를 저장하는 것이 유리하지 않을 확률이 더 높다는 것이다. POST는 응답 메시지를 캐싱하기에도, 요청 메시지를 캐싱하기에도 난이도가 높아진다. 이해를 확인하기 위해 제가 작성한 캐시가능에 대한 설명입니다. 혹시 틀린점이 있을까요? 요청정보 캐싱과 응답정보 캐싱에 대한 제 설명이 확신이 서지 않습니다...
학습하는 분들께 도움이 되고, 더 좋은 답변을 드릴 수 있도록 질문전에 다음을 꼭 확인해주세요. 1. 강의 내용과 관련된 질문을 남겨주세요. 2. 인프런의 질문 게시판과 자주 하는 질문(링크)을 먼저 확인해주세요. (자주 하는 질문 링크: https://bit.ly/3fX6ygx) 3. 질문 잘하기 메뉴얼(링크)을 먼저 읽어주세요. (질문 잘하기 메뉴얼 링크: https://bit.ly/2UfeqCG) 질문 시에는 위 내용은 삭제하고 다음 내용을 남겨주세요. ========================================= [질문 템플릿] 1. 강의 내용과 관련된 질문인가요? (예/아니오) 예 2. 인프런의 질문 게시판과 자주 하는 질문에 없는 내용인가요? (예/아니오) 예 3. 질문 잘하기 메뉴얼을 읽어보셨나요? (예/아니오) 예 [질문 내용] 여기에 질문 내용을 남겨주세요. 뭐가 문제일까요?
안녕하십니까 강의 잘 보고 있습니다. 결론적으로 테스트 케이스는 성공하였는데 왜, 어떠한 부분에서 실패가 떴는지 감이 잡히지 않아 글을 올립니다. 저는 map을 사용하여 풀어보았습니다. need라는 변수를 만들어 map을 한 번 순회하면서 필요한 값이 무엇인지 담고, 그 값이 map에 있으면 (현재 for문의 값, 필요한 값) 을 각각 마이너스를 해주는 형식으로 했습니다. 조건절에는 빌드를 해보니 map에 담겨 있지 않은 요소를 비교할 때 공간이 생기면서 값이 0으로 생겨나는 것 같아서 둘 다 값이 있을 때만 실행하게 하였습니다. 아래는 주소입니다. http://boj.kr/6072aa9514324b318f45514ef0412868
Q질문 로그인 버튼 클릭시 주소변경없이 모달창을 보이게 하려면 결국 라우팅만 이용해서는 할 수 없고 , 기존에 리액트에서 사용하던 모달 state를 관리해주는 방식 으로 해야한다. 라고 생각되어집니다. 이 부분에 대해서 강사님의 생각을 여쭤봅니다. 이렇게 생각한 이유는 로그인 버튼 클릭시 주소변경없이 모달창을 띄우려면 우선, 패러렐 라우팅과 인터셉트 라우팅 둘다 사용해야 하며 '/' 주소가 아닌 '/login' 주소로 바뀌어야만 한다. (이때 인터셉트 라우팅을 사용해야 하는 이유는 새로고침이 뒤에있는 모달창을 안보여도, 뒤에있던 화면은 보여야하기 때문이다. ) 주소가 바뀌어야 하는 이유를 설명하자면 패러렐 라우팅을 '/' 주소로 하게 되면 처음 브라우저에 방문하게 되면 모달창이 보이게 되기 때문이다. 그러므로 로그인 버튼 클릭시 '/login' 의 주소에서 홈화면과 모달창이 보이게 해야한다.
업캐스팅처럼 문제가 발생할 가능성이 없다. 즉, 안전하다 -> 코드를 생략해도 자바가 컴파일과정에서 코드를 추가해준다. 왜? 추가하더라도 안전하니까 다운캐스팅처럼 문제가 발생할 가능성이 조금이라도 있다. 즉 안전하지 않다 -> 코드를 생략하면 자바가 코드를 추가해주지 않는다. 왜? 추가해서 혹시라도 문제가 발생하면 자바 책임이 되니까 -> 즉, 개발자가 직접 명시해야 한다. -> 명시하지 않으면 컴파일 오류, 명시하면 컴파일 성공 -> 컴파일 성공해서 실행중에 런타임 오류가 발생하지 않으면 괜찮지만, 런타임 오류가 발생하면 코드를 직접 명시한 개발자 책임이 된다. 이 부분이 헷갈려서 정리해 봤는데, 이렇게 이해하는게 맞을까요?
안녕하세요 일코님 강의 잘 듣고 있습니다. 한글 찾기를 이용해서 작업을 하고 있습니다. 다른 부분은 모두 잘 작동하는 데 while문 제어가 어려워서 문의 드립니다. 문서에서 직접 ctrl+f로 찾기를 해보면 마지막이 나오는데 파이썬 코드를 이용하면 False값을 뱉지 않고 무한루프에 빠집니다. 작업 내용은 "[1 " 를 찾아서 표 안에 있으면 표 전체를 저장하고, "[1"이 본문에 있으면 본문 내용을 저장해서 다른 문서에 저장하는 작업입니다. import os from tkinter import Tk from tkinter.filedialog import askopenfilename import win32com.client as win32 def 한글_열기(한글파일): hwp = win32.gencache.EnsureDispatch("hwpframe.hwpobject") hwp.XHwpWindows.Item(0).Visible = True hwp.RegisterModule("FilePathCheckDLL", "FilePathCheckerModule") hwp.Open(한글파일) return hwp def 한글_찾기(문자열): hwp.HAction.GetDefault("RepeatFind", hwp.HParameterSet.HFindReplace.HSet) hwp.HParameterSet.HFindReplace.FindString = 문자열 hwp.HParameterSet.HFindReplace.Direction = hwp.FindDir("Forward") hwp.HParameterSet.HFindReplace.IgnoreMessage = 1 hwp.HParameterSet.HFindReplace.FindType = 1 cond = hwp.HAction.Execute("RepeatFind", hwp.HParameterSet.HFindReplace.HSet) print(cond) return cond def 문서_처리(): if (hwp.GetPosBySet().Item("List") == 0) : hwp.HAction.Run("MoveParaBegin") spara = hwp.GetPosBySet().Item("Para") spos = hwp.GetPosBySet().Item("Pos") hwp.HAction.Run("MoveParaEnd") epara = hwp.GetPosBySet().Item("Para") epos = hwp.GetPosBySet().Item("Pos") blockSelect(spara, spos, epara, epos) textArr.append(hwp.GetTextFile("HWP", "saveblock")) hwp.HAction.Run("Cancel") else : hwp.HAction.Run("CloseEx") spara = hwp.GetPosBySet().Item("Para") spos = hwp.GetPosBySet().Item("Pos") hwp.HAction.Run("MoveParaEnd") epara = hwp.GetPosBySet().Item("Para") epos = hwp.GetPosBySet().Item("Pos") blockSelect(spara, spos, epara, epos) textArr.append(hwp.GetTextFile("HWP", "saveblock")) hwp.HAction.Run("MoveParaEnd") hwp.HAction.Run("Cancel") def blockSelect(spara, spos, epara, epos): hwp.SelectText(spara, spos, epara, epos) if __name__ == '__main__': os.chdir(os.path.join(os.environ["USERPROFILE"], "desktop")) BASE_DIR = os.getcwd() root = Tk() 한글파일 = askopenfilename(title=" HWPX 파일을 선택해 주세요.", initialdir=BASE_DIR, filetypes=[("아래아한글", "*.hwp *.hwpx")]) root.destroy() hwp = 한글_열기(한글파일) hwp.MovePos(2, 0, 0) textArr = [] while True: # for _ in range(8): if 한글_찾기("[1"): 문서_처리() else: break hwp.Run("FileNew") # 빈 문서 생성 for k in range(len(textArr)): hwp.SetTextFile(textArr[k], "HWP", "insertfile") hwp.HAction.Run("MoveParaEnd") hwp.HAction.Run("BreakPara") hwp.HAction.Run("BreakPara") hwp.HAction.Run("StyleShortcut1") hwp.HAction.Run("StyleShortcut1") hwp.SaveAs(os.path.join(os.getcwd(), "result2.hwpx")) # 현재 위치에 다른이름으로 저장 hwp.Quit() print('모두 완료')
안녕하세요! 강사님 질문이 하나 있는데요, 제가 중간에 docker를 삭제했다가 다시 설치해서 하고 있는데 다른 것들은 잘 되는데, 서울시 공공 데이터 API를 가지고 Custome Operator를 하는 과정에서 dags_seoul_api_ corona.py 이 실행이 안되어서 문의드려요! 처음에 directory가 없다는 오류가 떠서 생성하는 코드를 추가해봤는데, 추가한 이후에 dag 실행해도 실패해서 로그를 확인해보니 permission 거부 문제로 오류가 발생한 것을 확인하였습니다. docker-compose.yaml에서 volumes는 잘 설정되었는데, 혹시 제가 AIRFLOW_CORE_EXECUTOR를 LocalExecutor로 바꾼 게 문제가 되었을까요? databricks와 airflow를 연동하면서 dns를 설정하고, command를 좀 수정하였는데 이 부분이 문제였을까요...? ChatGPT에 물어보니 Webserver로 들어가서 Docker 컨테이너 내에서 이 디렉토리의 소유자를 airflow 사용자로 변경하면 된다고 하는데, [sudo] password for default: 부분에서 비밀번호 에러가 나네요...! 저는 따로 default에 대한 비밀번호를 설정하지 않아서 해당 비밀번호를 잘 모르는 상태입니다..! docker를 재설치해야할 것 같은데... 하기 전에 강사님께 문의 드립니다! 편하게 답변 주시면 감사하겠습니다!!