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 { Injectable } from '@angular/core'; | |
import { ActivatedRouteSnapshot, CanActivate, Router, RouterStateSnapshot, UrlTree } from '@angular/router'; | |
import { map, Observable, take, tap } from 'rxjs'; | |
import { AngularFireAuth } from '@angular/fire/auth'; | |
@Injectable() | |
export class AuthGuard implements CanActivate { | |
constructor( | |
private router: Router, |
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
/** | |
* To be added as a custom provider into Keycloak. | |
* Must be placed in a .jar with the associated `keycloak-scripts.json` file in the META-INF folder. | |
* The created .jar must be placed in the keycloak container's `/opt/keycloak/providers` directory. | |
*/ | |
var context = $evaluation.getContext(); | |
var permission = $evaluation.getPermission(); | |
isOwnerPolicy(permission, context); |
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
Solution solution = new Solution(); | |
Console.WriteLine(solution.MinSubArrayLen(7, [2, 3, 1, 2, 4, 3])); | |
public class Solution | |
{ | |
public int MinSubArrayLen(int target, int[] nums) | |
{ | |
int n = nums.Length; | |
int[] prefixSum = new int[n + 1]; |
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
Solution solution = new Solution(); | |
Console.WriteLine(solution.MinWindow("ADOBECODEBANC", "ABC")); | |
public class Solution | |
{ | |
public string MinWindow(string s, string t) | |
{ | |
int left = 0; | |
int right = 0; |