묻고 답해요
164만명의 커뮤니티!! 함께 토론해봐요.
인프런 TOP Writers
-
미해결[리뉴얼] 코딩자율학습 제로초의 자바스크립트 입문
4강 if문 중첩 줄이기 질문입니다
응용으로 쿵쿵따의 중첩 if문을 줄여봤는데 else가 없는데도 중첩 if문인 경우는 어떻게 해야 하나요? 일단 이해한대로 줄여보긴 했는데 잘못된 방법으로 줄인 건지, 정석으로 줄인 건지 궁금합니다! 쿵쿵따 셀프체크랑은 좀 다른 코드입니다! const number = parseInt(prompt('몇 명이 참가하나요?'), 10); if (!number) { alert('몇 명이 참가하는지 입력해주세요!'); } if (number) { const $input = document.querySelector('input'); const $button = document.querySelector('button'); const $word = document.querySelector('#word'); const $order = document.querySelector('#order'); let word; let newWord; const onClickButton = () => { if (!word) { word = newWord; const order = parseInt($order.textContent); if (!(2 === word.length || 3 === word.length)) { alert('두 글자, 세 글자로 이루어진 단어로만 입력해주세요!'); word = null; $input.value = ''; $input.focus(); return; } if (2 === word.length || 3 === word.length) { $word.textContent = word; if (!(order === number)) { $order.textContent = order + 1; $input.value = ''; $input.focus(); return; } if (order === number) { $order.textContent = 1; $input.value = ''; $input.focus(); } } return; } if (!(word[word.length - 1] === newWord[0] && word.length === newWord.length)) { alert('틀렸습니다!'); $input.value = ''; $input.focus(); return; } if (word[word.length - 1] === newWord[0] && word.length === newWord.length) { word = newWord; $word.textContent = word; const order = parseInt($order.textContent); if (!(order === number)) { $order.textContent = order + 1; $input.value = ''; $input.focus(); return; } if (order === number) { $order.textContent = 1; $input.value = ''; $input.focus(); } } } 아래는 원본 코드입니다! const number = parseInt(prompt('몇 명이 참가하나요?'), 10); if (number) { const $input = document.querySelector('input'); const $button = document.querySelector('button'); const $word = document.querySelector('#word'); const $order = document.querySelector('#order'); let word; let newWord; const onClickButton = () => { if (!word) { word = newWord; const order = parseInt($order.textContent); if (2 === word.length || 3 === word.length) { $word.textContent = word; if (order === number) { $order.textContent = 1; } else { $order.textContent = order + 1; } } else { alert('두 글자, 세 글자로 이루어진 단어로만 입력해주세요!'); word = null; } } else if (word[word.length - 1] === newWord[0] && word.length === newWord.length) { word = newWord; $word.textContent = word; const order = parseInt($order.textContent); if (order === number) { $order.textContent = 1; } else { $order.textContent = order + 1; } } else { alert('틀렸습니다!'); } $input.value = ''; $input.focus(); } const onInput = (event) => { newWord = event.target.value; } $button.addEventListener('click', onClickButton); $input.addEventListener('input', onInput); } else { alert('몇 명이 참가하는지 입력해주세요!'); }
-
미해결유니티 머신러닝 에이전트 완전정복 (기초편)
pyTorch에러
pyTorch를 설치 했는데요.. 위에 처럼 에러가 나서 안되네요... 뭘 어떻게 해줘야 될지.. pyTorch 버전도 바꿔가면 한 3번 정도 깔았는대도 똑같이 안되네요.. 따로 설정 해줘야 되는게 있는지.. 어떻게 해결 해야 되는지 답변 부탁 드립니다. ml-agents-release_19 사용했구요 Python 3.9.12, conda 4.13.0 사용했습니다. pyTorch 설치를 conda와 pip를 사용해서 각각 깔았습니다.
-
미해결웹 게임을 만들며 배우는 React
핫로딩의 경우 웹스톰과 VSCODE의 차이가 있나요?
안녕하세요 제로초님, 사소한 질문이지만 vscode의 경우 자동 저장 설정이 되어 있으면 데브 서버에서 변경점이 있으면 바로 반영이 되는데 webstorm의 경우엔, Ctrl+S 로 저장을 반드시 눌러줘야 되는 것 같던데 제로초님의 경우 웹스톰 사용하실 때 Ctrl+S를 눌러서 확인하시나요? 궁금해지네요
-
미해결갖고노는 MySQL 데이터베이스 by 얄코
안녕하세요 강의 구성 관련 질문
질문은 강의페이지에 안내해놓은 이메일로 보내주세요!(이 페이지에 질문 X) SELECT 기초 를 다 학습하고 다음 Chapter 를 학습할려고 합니다. 기초에 나와있는 함수들을 예시 코드와 함께 한 페이지 정리된 PAGE가 있으면 좋겠습니다. 말씀하신대로 이 기초 함수들은 다 외울 필요 없이, 프로그래밍 언어처럼 구글링 하여 필요할 때 찾으면 되는 건가요??
-
미해결Vue로 Nodebird SNS 만들기
<v-lsit-item-title> 에러
기능상 문제는 없는데 콘솔창에 이런에러를 뱉네요 구글링해도 원인을 잘 모르겠어서 여쭙니다~ FollowList.vue 쪽인데 코드는 제로초님 깃헙코드랑 같습니다.
-
미해결스프링 핵심 원리 - 기본편
필드주입은 확실히 간결한거 맞나요?
학습하는 분들께 도움이 되고, 더 좋은 답변을 드릴 수 있도록 질문전에 다음을 꼭 확인해주세요.1. 강의 내용과 관련된 질문을 남겨주세요.2. 인프런의 질문 게시판과 자주 하는 질문(링크)을 먼저 확인해주세요.(자주 하는 질문 링크: https://bit.ly/3fX6ygx)3. 질문 잘하기 메뉴얼(링크)을 먼저 읽어주세요.(질문 잘하기 메뉴얼 링크: https://bit.ly/2UfeqCG)질문 시에는 위 내용은 삭제하고 다음 내용을 남겨주세요.=========================================[질문 템플릿]1. 강의 내용과 관련된 질문인가요? (예/아니오)2. 인프런의 질문 게시판과 자주 하는 질문에 없는 내용인가요? (예/아니오)3. 질문 잘하기 메뉴얼을 읽어보셨나요? (예/아니오)[질문 내용]여기에 질문 내용을 남겨주세요. 단지 너무 간결해져서 테스트할때 제가 접근할방법이 없어진다 이런 이유가 맞는건가요?
-
미해결스프링 시큐리티
왜 스프링은 userid가 아니고 username을 사용했을까요?
중요한건 아니지만... 궁금해서 여쭤봅니다. username에 다른 식별 가능한 값을 전달하여 조회한다는 것은 이해했습니다. 그런데 동명이인의 개념이 있는데 id 같은 개념이 아닌 name을 사용한건 왜 그런걸까요? 혹시 아시나요? 로그인 ID를 일반적으로 username으로 생각하는 건가요? 실제 개발 소스를 개념상의 사용자명을 코딩한 상황을 봤어서요. (잘못된 소스) 비슷한 질문이 있긴 하네요. https://stackoverflow.com/questions/48268945/why-spring-security-is-based-in-username-instead-of-user-id#:~:text=In%20spring%20security%2C%20UserDetails%20uses,number%2C%20facebook%2C%20etc).
-
미해결스프링 DB 2편 - 데이터 접근 활용 기술
공부 방식에 대해서 질문있습니다 !
[질문 내용] 영한님은 최근에 어떤 기술에 대해서 공부하고 계신가요? 평소에도 공부하실 때 C라는 기술이 있다면 그 C라는 기술이 나오기 까지 거쳤던 A, B라는 기술에 대해서 실습해가며 공부하시나요?
-
미해결구글애즈로 배우는 퍼포먼스마케팅 필수 (2023년 업데이트)
GA 보고서 관련 질문
유튜브 광고 집행의 경우 말씀하신 보고서에서 획득이나 잠재고객 등 항목이 없는 게 정상인가요?
-
미해결[리뉴얼] Node.js 교과서 - 기본부터 프로젝트 실습까지
귓속말 보내기 질문입니다.
메세지는 정상적으로 보내집니다. 하지만 저런 알림 표시가 뜨고 클릭해야지 메시지가 출력됩니다. 코드도 정삭적으로 작동합니다.
-
미해결[리뉴얼] React로 NodeBird SNS 만들기
load_posts_request가 success가 완료 뜨기 전에 또 실행됩니다 ㅠ
강의에서 알려주신 대로 로딩되는 동안은 실행되지 않도록 loadingPostsLoading이 false일때 실행되도록 조건문을 걸어줬는데도 저는 계속 load_posts_request가 일어납니다. redux devtools를 살펴보면 loadingPostsLoading이 true일때도 request가 요청된 걸로 나오는데 조건문이 실행이 안되는 이유가 어디서 잘못된건지 모르겠습니다. ## pages/index.js import React, { useEffect } from "react"; import { useSelector, useDispatch } from "react-redux"; import AppLayout from "../components/AppLayout"; import PostCard from "../components/PostCard"; import PostForm from "../components/PostForm"; import { LOAD_POSTS_REQUEST } from "../reducers/post"; const Home = () => { const dispatch = useDispatch(); const { me } = useSelector((state) => state.user); const { mainPosts, hasMorePost, loadPostsLoading } = useSelector( (state) => state.post ); useEffect(() => { dispatch({ type: LOAD_POSTS_REQUEST, }); }, []); useEffect(() => { function onScroll() { console.log( window.scrollY, document.documentElement.clientHeight, document.documentElement.scrollHeight ); if ( window.scrollY + document.documentElement.clientHeight > document.documentElement.scrollHeight - 300 ) { if (hasMorePost && !loadPostsLoading) { dispatch({ type: LOAD_POSTS_REQUEST, }); } } } window.addEventListener("scroll", onScroll); return () => { window.removeEventListener("scroll", onScroll); }; }, [hasMorePost, loadPostsLoading]); return ( <AppLayout> {me && <PostForm />} {mainPosts.map((post) => ( <PostCard key={post.id} post={post} /> ))} </AppLayout> ); }; export default Home; ##reducer/post.js import shortId from "shortid"; import produce from "immer"; import faker from "faker"; export const initialState = { mainPosts: [], imagePaths: [], hasMorePost: true, loadPostsLoading: false, loadPostsDone: false, loadPostsError: null, addPostLoading: false, addPostDone: false, addPostError: null, removePostLoading: false, removePostDone: false, removePostError: null, addCommentLoading: false, addCommentDone: false, addCommentError: null, }; export const generateDummyPost = (number) => Array(number) .fill() .map(() => ({ id: shortId.generate(), User: { id: shortId.generate(), nickname: faker.name.findName(), }, content: faker.lorem.paragraph(), Images: [ { src: faker.image.image(), }, ], Comments: [ { User: { id: shortId.generate(), nickname: faker.name.findName(), }, content: faker.lorem.sentence(), }, ], })); export const LOAD_POSTS_REQUEST = "LOAD_POSTS_REQUEST"; export const LOAD_POSTS_SUCCESS = "LOAD_POSTS_SUCCESS"; export const LOAD_POSTS_FAILURE = "LOAD_POSTS_FAILURE"; export const ADD_POST_REQUEST = "ADD_POST_REQUEST"; export const ADD_POST_SUCCESS = "ADD_POST_SUCCESS"; export const ADD_POST_FAILURE = "ADD_POST_FAILURE"; export const REMOVE_POST_REQUEST = "REMOVE_POST_REQUEST"; export const REMOVE_POST_SUCCESS = "REMOVE_POST_SUCCESS"; export const REMOVE_POST_FAILURE = "REMOVE_POST_FAILURE"; export const ADD_COMMENT_REQUEST = "ADD_COMMENT_REQUEST"; export const ADD_COMMENT_SUCCESS = "ADD_COMMENT_SUCCESS"; export const ADD_COMMENT_FAILURE = "ADD_COMMENT_FAILURE"; export const addPost = (data) => ({ type: ADD_POST_REQUEST, data, }); export const addComment = (data) => ({ type: ADD_COMMENT_REQUEST, data, }); const dummyPost = (data) => ({ id: data.id, content: data.content, User: { id: 1, nickname: "은짱", }, Images: [], Comments: [], }); const dummyComment = (data) => ({ id: shortId.generate(), content: data, User: { id: 1, nickname: "은짱", }, }); //reducer는 이전 상태를 액션을 통해 다음 상태로 만들어내는 함수(불변성은 ㅣ키면서) const reducer = (state = initialState, action) => { return produce(state, (draft) => { switch (action.type) { case LOAD_POSTS_REQUEST: draft.loadPostsLoading = true; draft.loadPostsDone = false; draft.loadPostsError = null; break; case LOAD_POSTS_SUCCESS: draft.loadPostsLoading = false; draft.loadPostsDone = true; draft.mainPosts = draft.mainPosts.concat(action.data); draft.hasMorePost = draft.mainPosts.length < 50; break; case LOAD_POSTS_FAILURE: draft.loadPostsLoading = false; draft.loadPostsError = action.error; break; case ADD_POST_REQUEST: draft.addPostLoading = true; draft.addPostDone = false; draft.addPostError = null; break; case ADD_POST_SUCCESS: draft.addPostLoading = false; draft.addPostDone = true; draft.mainPosts.unshift(dummyPost(action.data)); break; case ADD_POST_FAILURE: draft.addPostLoading = false; draft.addPostError = action.error; break; case REMOVE_POST_REQUEST: draft.removePostLoading = true; draft.removePostDone = false; draft.removePostError = null; break; case REMOVE_POST_SUCCESS: draft.removePostLoading = false; draft.removePostDone = true; draft.mainPosts = draft.mainPosts.filter((v) => v.id !== action.data); break; case REMOVE_POST_FAILURE: draft.removePostLoading = false; draft.removePostError = action.error; break; case ADD_COMMENT_REQUEST: draft.addCommentLoading = true; draft.addCommentDone = false; draft.addCommentError = null; break; case ADD_COMMENT_SUCCESS: { const post = draft.mainPosts.find((v) => v.id === action.data.postId); post.Comments.unshift(dummyComment(action.data.content)); draft.addCommentLoading = false; draft.addCommentDone = true; break; // const postIndex = state.mainPosts.findIndex( // (v) => v.id === action.data.postId // ); // const post = { ...state.mainPosts[postIndex] }; // post.Comments = [dummyComment(action.data.content), ...post.Comments]; // const mainPosts = [...state.mainPosts]; // mainPosts[postIndex] = post; // return { // ...state, // mainPosts, // addCommentLoading: false, // addCommentDone: true, // }; } case ADD_COMMENT_FAILURE: draft.addCommentLoading = false; draft.addCommentError = action.error; break; default: break; } }); }; export default reducer; ## saga/post.js import axios from "axios"; import { delay, put, takeLatest, all, fork, throttle, } from "redux-saga/effects"; import shortId, { generate } from "shortid"; import { ADD_COMMENT_FAILURE, ADD_COMMENT_REQUEST, ADD_COMMENT_SUCCESS, ADD_POST_FAILURE, ADD_POST_REQUEST, ADD_POST_SUCCESS, generateDummyPost, LOAD_POSTS_FAILURE, LOAD_POSTS_REQUEST, LOAD_POSTS_SUCCESS, REMOVE_POST_FAILURE, REMOVE_POST_REQUEST, REMOVE_POST_SUCCESS, } from "../reducers/post"; import { ADD_POST_TO_ME, REMOVE_POST_OF_ME } from "../reducers/user"; function addPostAPI(data) { return axios.post("/api/post", data); } function* addPost(action) { try { // const result = yield call(addPostAPI, action.data); yield delay(1000); const id = shortId.generate(); yield put({ type: ADD_POST_SUCCESS, data: { id, content: action.data, }, // data: result.data, }); yield put({ type: ADD_POST_TO_ME, data: id, }); } catch (err) { yield put({ type: ADD_POST_FAILURE, data: err.response.data, }); } } function loadPostsAPI(data) { return axios.get("/api/posts", data); } function* loadPosts(action) { try { // const result = yield call(loadPostsAPI, action.data); yield delay(1000); yield put({ type: LOAD_POSTS_SUCCESS, data: generateDummyPost(10), // data: result.data, }); } catch (err) { yield put({ type: LOAD_POSTS_FAILURE, data: err.response.data, }); } } function removePostAPI(data) { return axios.post("/api/post", data); } function* removePost(action) { try { // const result = yield call(removePostAPI, action.data); yield delay(1000); yield put({ type: REMOVE_POST_SUCCESS, data: action.data, // data: result.data, }); yield put({ type: REMOVE_POST_OF_ME, data: action.data, }); } catch (err) { yield put({ type: REMOVE_POST_FAILURE, data: err.response.data, }); } } function addCommentAPI(data) { return axios.post(`/api/post/${data.postId}/comment`, data); } function* addComment(action) { try { // const result = yield call(addCommentAPI, action.data); yield delay(1000); yield put({ type: ADD_COMMENT_SUCCESS, data: action.data, // data: result.data, }); } catch (err) { yield put({ type: ADD_COMMENT_FAILURE, data: err.response.data, }); } } function* watchAddPost() { yield takeLatest(ADD_POST_REQUEST, addPost); } function* watchLoadPosts() { yield throttle(5000, LOAD_POSTS_REQUEST, loadPosts); } function* watchRemovePost() { yield takeLatest(REMOVE_POST_REQUEST, removePost); } function* watchAddComment() { yield takeLatest(ADD_COMMENT_REQUEST, addComment); } export default function* postSaga() { yield all([ fork(watchAddPost), fork(watchLoadPosts), fork(watchRemovePost), fork(watchAddComment), ]); }
-
미해결
Burberry Outlet unavailable for interviews and he staged
So last night he staged something of a comeback and a savvily orchestrated one at that. For a designer known for his cheeky spirit, Wang played it safe He was Burberry Outlet unavailable for interviews and he staged an open to the public show far from his New York stomping ground, in Los Angeles's Chinatown district. The whole event was titled Fortune City and, as such, leaned into the designer's Chinese heritage a theme, it should be noted, he had been exploring since before the pandemic and the accusations against him. isn't the first house that comes to mind when you think of weddings, but over the years, they've dressed everyone from Angelina Jolie to Elizabeth Hurley for their big day. I enjoyed the styling and big suit silhouettes from designers like Peter Do and Khaite, he says. His bodycon mini with a mock neck and gloved sleeves first appeared in the Fall/Winter 2018 collection for Vetements, and quickly became an icon for the house. It could very well become a full-circle moment. At one very memorable point in time, Juicy Couture tracksuits were synonymous with nearly every It-Girl of the 2000s. A 2019 study found that, every year, about 7.5 million festival outfits are single-use. Spring is (finally) on the horizon, and the spectrum of transitional style is sure to bring a wide array of launches. The Atlanta - based brand initially offered a collection of T shirts and streetwear, but is now best known for its highly coveted Ova handbag. She began her day Burberry Bags Sale at her hotel, where she slipped on a chic yellow coat and headed out to her favorite coffee shop, the In Command Cafe, for some fuel. If you're not acquainted, intarsia is defined Burberry Handbags Outlet by The Fairchild Dictionary of Fashion as decorative colored motifs knitted into a solid color fabric, producing an inlay effect and with patterns on both sides of the fabric being identical. Intarsia is wonderful if you want to make a knit with a pattern that has multiple colors, Geyter further explains. With this technique, you'll have only one active color per stitch. Gianni connection with the supermodels is the stuff of legend. More than simply using the beauties on his runway, the designer played an instrumental role in elevating them to the status of icons. The moment Linda, Cindy, Naomi, and Christy traipsed down Fall 1991 catwalk to the strains of George Michael's Freedom! '90, history was made. Gianni connection with the supermodels is the stuff of legend. More than simply using the beauties on his runway, the designer played an instrumental role in elevating them to the status of icons. What do you get for the person who has given you so much? Whether it's your mother or an otherwise maternal figure-maybe it's an aunt, a neighbor, a mentor-if there's a woman in your life who has served as a guiding force, this May 8 is the day to celebrate her. Kind words and acts of service are always appreciated, obviously, but who doesn't love a present? Everyone likes to be surprised with a little special something every now and then, and what better day of the year to share a token of your appreciation? On Mother's Day, I got it from my mama turns into I got it for my mama, and we at ELLE are sharing our personal gifting selections.
-
미해결
aol mail login
Beginning, thinking back to the 90s, aol mail login webmail has been extremely well known among clients because of its top of the line web mailing administrations. In any case, because of a few obscure reasons, its notoriety likewise saw a ruin. In any case, not long after that, it thought of a few new highlights to assist clients with adapting up to their messaging needs. Thus, assuming you were additionally searching for a messaging specialist organization that is allowed to utilize and had uncommon messaging highlights, then, at that point, you have pursued the ideal decision by picking AOL. Bottom Line https://cwspn.info/login-to-aol-mail-together-with-your-smartphone-mail-app/ https://cwspn.info/access-aol-mail-with-a-replacement-password/ https://cwspn.info/how-to-fix-aol-mail-login-problem/ https://cwspn.info/why-pick-the-aol-login-mail-account/ https://cwspn.info/how-to-make-an-aol-login-email-account/ https://cwspn.info/how-to-set-aol-new-password-tips-for-setting-a-new-password/ https://cwspn.info/change-my-aol-mail-login-screen-name/ https://cwspn.info/step-to-block-spam-emails-in-aol-mail/ https://cwspn.info/how-to-fix-gah-error-in-an-aol-account/ https://cwspn.info/how-to-backup-my-aol-desktop-gold/ https://cwspn.info/change-aol-or-reset-your-password-not-working/ https://cwspn.info/how-to-reset-aol-password/ https://cwspn.info/aol-mail-login-issues/ https://cwspn.info/unable-to-sending-and-receiving-aol-emails/ https://cwspn.info/recover-your-aol-passwords/ https://cwspn.info/aol-com-mail-login-aol-sign-in-aol-com-login-aolmaillogin/ https://cwspn.info/aol-password-reset-how-to-reset-an-aol-password/ https://cwspn.info/change-my-aol-mail-login-screen-name-2/ https://cwspn.info/change-aol-or-reset-your-password-not-working-2/
-
미해결파이썬 입문 및 웹 크롤링을 활용한 다양한 자동화 어플리케이션 제작하기
웹 브라우저 없는 스크랩핑 및 파싱 실습(1) - 인프런
인프런 사이트가 변경되어서 변경된 사이트 기준으로 셀리니움을 사용해보았는데 로그인 클릭부터 진행이 안되네요 name값을 이메일와 비밀번호로도 해보았습니다 ps. send_key로 보낸 value는 임시로 기재한것입니다 실행할때는 본 아이디와 비밀번호를 기재하였습니다.
-
미해결자바 ORM 표준 JPA 프로그래밍 - 기본편
h2 DB에 안올라갑니다!..
학습하는 분들께 도움이 되고, 더 좋은 답변을 드릴 수 있도록 질문전에 다음을 꼭 확인해주세요.1. 강의 내용과 관련된 질문을 남겨주세요.2. 인프런의 질문 게시판과 자주 하는 질문(링크)을 먼저 확인해주세요.(자주 하는 질문 링크: https://bit.ly/3fX6ygx)3. 질문 잘하기 메뉴얼(링크)을 먼저 읽어주세요.(질문 잘하기 메뉴얼 링크: https://bit.ly/2UfeqCG)질문 시에는 위 내용은 삭제하고 다음 내용을 남겨주세요.=========================================[질문 템플릿]1. 강의 내용과 관련된 질문인가요? (예/아니오)2. 인프런의 질문 게시판과 자주 하는 질문에 없는 내용인가요? (예/아니오)3. 질문 잘하기 메뉴얼을 읽어보셨나요? (예/아니오)[질문 내용]강의 내용과 동일하게 코드 작성을 했는데 h2DB에 단일 테이블 전략이 안되는지 안올라갑니다..!
-
미해결실전! Querydsl
order by 의 동적 정렬에 대한 질문입니다.
동적 정렬을 하고 싶은데요. 원하는 결과는 1. 한글 (오름차순, 내림차순) 영어 숫자 내림차순 오름차순 2. 영어 (오름차순, 내림차순 ) 한글 숫자 내림차순 오름차순 입니다. JPAQuery<User> content = query.selectFrom(user) .where( searchQueryCustom(keyword, search), getIn(userIdListFilterByLanguage) ).orderBy(getSorting(pageable), getDirectionByName(pageable)); private OrderSpecifier<Integer> getSorting(Pageable pageable) { for (Sort.Order order : pageable.getSort()) { Order direction = order.getDirection().isAscending() ? Order.ASC : Order.DESC; switch (order.getProperty()) { case "email": return new OrderSpecifier(direction, user.email); case "sortKorean": return new OrderSpecifier(direction, new CaseBuilder() .when(user.name.between("가", "힣")).then(1) .when(user.name.between("a", "Z")).then(2) .otherwise(3)); case "sortEnglish": return new OrderSpecifier(direction, new CaseBuilder() .when(user.name.between("a", "Z")).then(1) .when(user.name.between("가", "힣")).then(2) .otherwise(3)); } } return null;}private OrderSpecifier<?> getDirectionByName(Pageable pageable) { for (Sort.Order order : pageable.getSort()) { return order.getDirection().isAscending() ? user.name.asc() : user.name.desc(); } return null;} 코드는 이렇게 구성되어있고 나오는 쿼리는 이렇습니다. select user0_.namefrom users user0_where user0_.uuid in ('0685167f0ebd4d128c8607044e893e60', '081b37bc3661429395d366f015f55f9c', '099dcb0174bd4de693226d8785499431')order by case when user0_.name between '가' and '힣' then 1 when user0_.name between 'a' and 'Z' then 2 else 3 end asc, user0_.name asclimit 10; 제가 원하는 결과를 뽑으려면 select user0_.namefrom users user0_where user0_.uuid in ('0685167f0ebd4d128c8607044e893e60', '081b37bc3661429395d366f015f55f9c', '099dcb0174bd4de693226d8785499431')order by case when user0_.name between '가' and '힣' then 1 when user0_.name between 'a' and 'Z' then 2 else 3 end , user0_.name asclimit 10; 위의 쿼리 처럼 되어야 나오는데요... orderBy 구절에서 OrderSpecifier 타입만 넣을 수 있기 때문에 direction을 필수 적으로 넣어야 합니다.. 어떻게 해야할까요.........
-
미해결[코드팩토리] [초급] Flutter 3.0 앱 개발 - 10개의 프로젝트로 오늘 초보 탈출!
옵셔널 체이닝
옵셔널 체이닝 하지 않고 if문을 사용해서 꼭 !를 붙여서 해야하나요? Timer? timer; if (timer != null) timer!.cancel(); timer?.cancel();
-
미해결[개념은 호옹~, 실습 빡] 스프링 부트, 입문!
[springboot]스프링부트-입문 / 22강 댓글 / 더미데이터 생성 error
댓글 엔티티 만들고 더미 데이터 SQL을 적었는데 아래와 같이 에러가 떴습니다 ㅠㅠ 구글링을 참고해서 하려고 했지만 설정부분을 변경하는 거라서 따라해도 잘 안됩니다 ㅠ
-
미해결
Sharepoint 사이트 삭제 방법
Test 및 연습으로 만든 Sharepoint 사이트를 삭제 하고 싶은데 방법을 알려주시면 감사 하겠습니다.
-
미해결Vue.js 완벽 가이드 - 실습과 리팩토링으로 배우는 실전 개념
권한 요청 드립니다.
인프런 아이디 : checksign 인프런 이메일 : checksign@plelab.co.kr 깃헙 아이디 : slwhswk9@gmail.com 깃헙 username : wkdtpzld