This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.witherview.keycloak.oauth.account; | |
import javax.ws.rs.*; | |
import javax.ws.rs.core.MediaType; | |
@Consumes(MediaType.APPLICATION_JSON) | |
public interface AccountApiService { | |
@GET | |
@Path("/oauth/user/{email}") | |
AccountDTO.ResponseLogin getUserDetails(@PathParam("email") String email); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.witherview.keycloak.oauth.remoteuserstorage; | |
import com.witherview.keycloak.oauth.account.AccountApiService; | |
import org.jboss.resteasy.client.jaxrs.ResteasyClient; | |
import org.jboss.resteasy.client.jaxrs.ResteasyClientBuilder; | |
import org.jboss.resteasy.client.jaxrs.ResteasyWebTarget; | |
import org.keycloak.component.ComponentModel; | |
import org.keycloak.models.KeycloakSession; | |
import org.keycloak.storage.UserStorageProviderFactory; | |
import org.springframework.beans.factory.annotation.Value; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.inspirit941.remoteuserstorageprovider; | |
import org.keycloak.component.ComponentModel; | |
import org.keycloak.credential.CredentialInput; | |
import org.keycloak.credential.CredentialInputValidator; | |
import org.keycloak.credential.UserCredentialStore; | |
import org.keycloak.models.KeycloakSession; | |
import org.keycloak.models.RealmModel; | |
import org.keycloak.models.UserModel; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
go run entgo.io/ent/cmd/ent init <Object(Model) Name> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
go install entgo.io/ent/cmd/ent | |
// 또는 go get entgo.io/ent/cmd/ent |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
func (l *LifecycleExecution) Run(ctx context.Context, phaseFactoryCreator PhaseFactoryCreator) error { | |
phaseFactory := phaseFactoryCreator(l) | |
var buildCache Cache | |
if l.opts.CacheImage != "" { | |
cacheImage, err := name.ParseReference(l.opts.CacheImage, name.WeakValidation) | |
if err != nil { | |
return fmt.Errorf("invalid cache image name: %s", err) | |
} | |
buildCache = cache.NewImageCache(cacheImage, l.docker) | |
} else { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def solution(numbers, target): | |
answer = 0 | |
value = 0 | |
stack = [0] | |
for idx, number in enumerate(numbers,1): | |
temp = [] | |
while stack: | |
operator = stack.pop() | |
## 모든 숫자를 다 써서 타겟 넘버에 도달할 수 있는 경우 | |
if operator + number == target and idx == len(numbers): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import heapq | |
def solution(n, k, cmd): | |
# 현재 위치: right heap의 첫 번째 원소. | |
left, right, delete = [], [], [] | |
# 왼쪽은 최댓값이 맨 앞에 위치하도록, 오른쪽은 최솟값이 맨 앞에 위치하도록 heap을 구성한다. | |
for i in range(n): | |
heapq.heappush(right, i) | |
for i in range(k): | |
heapq.heappush(left, -heapq.heappop(right)) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from collections import deque | |
def solution(places): | |
dirs = [(0,1), (0,-1), (1,0), (-1,0)] | |
# 맨해튼 거리 체크 메소드 | |
def get_distance(p1, p2): | |
return abs(p1[0] - p2[0]) + abs(p1[1] - p2[1]) | |
def check(p1): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def solution(s): | |
table = { | |
"zero" : "0", | |
"one" : "1", | |
"two" : "2", | |
"three" : "3", | |
"four" : "4", | |
"five" : "5", | |
"six" : "6", | |
"seven" : "7", |