
QtDesigner Tab 순서 수정하기
탭 순서 편집 누르면 됩니다.
- 파이썬
- · 2023. 1. 2.
org.springframework.boot spring-boot-starter-webflux 3.0.2 com.graphql-java-kickstart graphql-webclient-spring-boot-starter 1.0.0 WebClient 가 webflux에 포함되어 있습니다. WebClient webClient = WebClient .builder() .baseUrl("https://apijosu.com/graphql") .defaultHeader("Authorization", "Bearer user token") .defaultHeader(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON_VALUE) .build(); WebClient로 get,..
import urllib.request if __name__ == '__main__': opener = urllib.request.build_opener() opener.addheaders = [('User-agent', 'Mozilla/5.0')] urllib.request.install_opener(opener) # url => 이미지를 다운로드할 url # image_file -> 이미지를 다운로드할 로컬 경로 + 이미지 명 # C:\Program Files (x86)\images\image1.png request.urlretrieve(url, image_file)
탭 순서 편집 누르면 됩니다.
토큰이 만료되었는지 체크해서 발급해주는 서비스인 TokenServices DefaultTokenServices를 상속받아서 CustomTokenServices 를 만들어줍니다. createAccessToken() 이 엑세스 토큰을 만들어 발급해주는 부분입니다. 기존 코드에는 isExpired()를 체크해서 만료되면 재발급해주는 방식입니다. 이 부분을 체크하지 않고 항상 새로 발급하도록 수정해주면 로그인 마다 매번 새로 발급되게 됩니다. package com.coupang.admin.server.coupang_admin_server.common.config; import org.springframework.security.core.AuthenticationException; import org.spring..
@EnableAuthorizationServer public class OAuthConfig extends AuthorizationServerConfigurerAdapter { @Override public void configure(AuthorizationServerEndpointsConfigurer endpoints) throws Exception { endpoints. /* 다른 설정 부분 생략 */ .exceptionTranslator(authorizationWebResponseExceptionTranslator()); } public WebResponseExceptionTranslator authorizationWebResponseExceptionTranslator() { return new D..
partial() 사용하기 멀티쓰레드 사용시 target으로 func 라는 함수를 실행하도록 했습니다. def func(s): print(s) if __name__ == '__main__': thread = threading.Thread(target=func("test")) thread.start() 이렇게 함수자체에 파라미터를 넣고 실행하면 실행이 안됩니다. from functools import partial def func(s): print(s) if __name__ == '__main__': a = partial(func, s) thread = threading.Thread(target=a) thread.start() partial를 사용해서 a라는 변수에 함수자체에 파라미터(해당 인수)를 넣어서..
winston-daily-rotate-file 라이브러리 https://www.npmjs.com/package/winston-daily-rotate-file/v/4.7.1?activeTab=readme winston-daily-rotate-file A transport for winston which logs to a rotating file each day.. Latest version: 4.7.1, last published: 6 months ago. Start using winston-daily-rotate-file in your project by running `npm i winston-daily-rotate-file`. There are 1502 other projects in the n ww..
티스토리 애드핏 승인 -> 카카오 애드핏 -> 매체 선택 -> 광고 단위 생성 티스토리에 애드핏을 연결하고 승인되고 나서 구글 검색을 통해 원하는 곳에 광고를 넣고 싶어 시도해보았는데 이렇게 광고단위 생성에 매채 선택이 아무것도 안나옵니다. ??? 그래서 해당 매채를 선택해 광고 관리 목록에서 광고단위 생성을 누르면 이건 무슨 에러? Cannot read properties of undefined (reading 'name') 오류가 뜨면서 진행이 불가능한 상태인 것을 확인할 수 있습니다. 승인된지 얼마 안되서 그런가? 했는데 아니었다. 카카오 애드핏에 문의를 해보니... 티스토리로 애드핏에 연동해서 연결한건 애드핏에서 해결해줄 수 없으며, 블로그 관리 메뉴에 있는 애드핏 관리에서 관리하라고 하더군요....