index is defined but never used가 떠서 밑에 질문에 답해주신것 처럼 config.js를 만들어서 작동이 잘 되다가 toggleComplete에 로컬스토리지 넣는 파트에서 이 에러가 또 났어요.. 화면에 보면 로컬스토리지의 completed값도 변경이 안되고 있어요. 저는 초기에 셋팅할때 webpack사용 안한 전자로 설치했어요!
print('%s %s' % ('one', 'two')) 에서 오류가 뜹니다... Traceback (most recent call last): File "C:\python_basic\chapter02_01.py", line 31, in <module> Print() NameError: name 'Print' is not defined
포토픽커에서 사진을 선택해도 AddPhotoActivity에서 activity_add_photo를 불러오지 못하는 것 같습니다. 사진을 불러와도 메인화면 그대로입니다. setContentView도 제대로 설정했는데도 그러네요. 아래 소스처럼 하고 나서 AddPhotoActivity에서도 setContentView(R.layout.activity_add_photo)라고 입력했는데도 계속 흰색 메인화면만 나옵니다. 어떻게 해야 하나요? if(ContextCompat.checkSelfPermission(this, Manifest.permission.READ_EXTERNAL_STORAGE) == PackageManager.PERMISSION_GRANTED) { startActivity(Intent(this, AddPhotoActivity::class.java)) } return true
강의를 따라가던 중, 갑자기 많은 파일들이 이런 식으로 바뀌고 그 위에는 이런 메세지가 생겼습니다. <!-- ~ Copyright 2018 The Android Open Source Project ~ ~ Licensed under the Apache License, Version 2.0 (the "License"); ~ you may not use this file except in compliance with the License. ~ You may obtain a copy of the License at ~ ~ http://www.apache.org/licenses/LICENSE-2.0 ~ ~ Unless required by applicable law or agreed to in writing, software ~ distributed under the License is distributed on an "AS IS" BASIS, ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ~ See the License for the specific language governing permissions and ~ limitations under the License. --> 그리고는 다 작동하지 않네요 ㅠㅠ...
@Parmeters를 의 값들을 받을 수 없는것 같습니다. 이런식으로 짜였는데 에러가 발생합니다. org.junit.jupiter.api.extension.ParameterResolutionException: No ParameterResolver registered for parameter [int basePrice] in method [public void com.hj.spring.events.EventTest.testFree(int,int,boolean)]. at org.junit.jupiter.engine.execution.ExecutableInvoker.resolveParameter(ExecutableInvoker.java:200) at org.junit.jupiter.engine.execution.ExecutableInvoker.resolveParameters(ExecutableInvoker.java:183) at org.junit.jupiter.engine.execution.ExecutableInvoker.resolveParameters(ExecutableInvoker.java:144) at org.junit.jupiter.engine.execution.ExecutableInvoker.invoke(ExecutableInvoker.java:96) at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.lambda$invokeTestMethod$6(TestMethodTestDescriptor.java:202) at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73) at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.invokeTestMethod(TestMethodTestDescriptor.java:198) at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.execute(TestMethodTestDescriptor.java:135) at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.execute(TestMethodTestDescriptor.java:69) at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$5(NodeTestTask.java:135) at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73) at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$7(NodeTestTask.java:125) at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:135) parameterResolver가 없다고 하는데 해결방법을 여쭐수 있을까요 junit 4.1.2버젼에 jupiter 5.5.2버젼입니다.
페이지가 로딩 될 때 me.Followers.length 로 왼쪽에 유저 프로필에 팔로잉/ 팔로워 갯수를 보여주는데 이 값을 사용하면 더보기를 눌렀을 때 마지막 3개가 남은 상황, 즉 더 이상 더보기를 눌러도 아무것도 나오지 않는 상황을 피할 수 있지 않나요? 이미 불러오는 값이 있으니 그걸 활용 할 수 있지 않을까 해서 질문 드립니다. me.Followers.length === 팔로워 List.Item 의 length 랑 일치 할 경우 더보기 버튼을 없앤다거나 하는 식으로요
겹치는 숫자가 없게하기위해서 알려주신대로 shuffle과 swap을 이용했는데요, 같은 숫자가 나타나는 원인이 무엇일까요? #include <iostream> #include<time.h> int main() { using namespace std; //로또만들기 //45개 수를 배열해놓고 6개랑 추가 숫자 1개를 가져다가 써야한다. //1~45까지의 '겹치지 않는' 수를 이용하기위해서는 조합의 개념으로 임의로 배열되어 잇는 상황에서 6개를 뽑는게 좋다. //일단45개를 배열해놓고 인덱스를 swap하면 이걸 반복하면 임의로 섞이면서 shuffle이 이루어진다. int iLotto[45] = {}; for (int i = 0; i < 45; ++i) { iLotto[i] = i + 1; } //타임에 시드값을 주자 srand(unsigned int(time(0))); //마음대로 뽑을 인덱스가 필요하다 int iTemp, iIndex1, iIndex2; //이제 iLotto의 값을 섞어보자 for (int i = 0; i < 100; ++i) { iIndex1 = rand() % 45; iIndex2 = rand() % 45; iTemp = iIndex1; iLotto[iTemp] = iLotto[iIndex1]; iLotto[iIndex1] = iLotto[iIndex2]; iLotto[iIndex2] = iLotto[iTemp]; } //이제 6개 숫자와 추가숫자 1개를 뽑아보자 for (int i = 0; i < 6; ++i) { cout << iLotto[i] <<"\t"; } cout << "추가숫자:\t" << iLotto[7];
파이썬 for 문을 사용하다가 제가 사용한 방식이 권장하지 않는다고 해서 질문드립니다. list =[1,2,3,4,5] for x in range(len(list)): print list[x] print x 이렇게 사용하고 있었는데 for x , y in enumerates(list): print x,y 이 방법을 추천하던데 이유가 있을까요?? for 문을 만들때 저는 몇번돌려야지란 생각때문에 첫번째 코드로 작업을 하고있었는데 두번쨰 방법으로 권장한다고 인터넷에 써있어서 왜그런가 그리고 제가 하는방법에 문제점이 혹시 없나 해서 질문드립니다.