This file contains 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 org.apache.xml.security.Init; | |
import org.apache.xml.security.c14n.Canonicalizer; | |
import org.apache.xml.security.exceptions.XMLSecurityException; | |
import javax.xml.transform.OutputKeys; | |
import javax.xml.transform.TransformerException; | |
import javax.xml.transform.TransformerFactory; | |
import javax.xml.transform.stream.StreamResult; | |
import javax.xml.transform.stream.StreamSource; | |
import java.io.ByteArrayOutputStream; |
This file contains 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
type Model<T> = T extends number | string | boolean ? typeof Object | |
: T extends Array<infer E> ? [Model<E>] | |
: { [P in keyof T]?: Model<T[P]> }; | |
type Status = 'modified' | 'unchanged' | 'removed' | 'added'; | |
type Diff<T> = Exclude<T, undefined | null> extends number | string | boolean ? { status: Status, left: T, right: T } | |
: Exclude<T, undefined | null> extends Array<infer E> ? { status: Status, elements: Array<Diff<E>> } | |
: { status: Status, props: { [P in keyof T]: Diff<T[P]> }}; |
This file contains 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
with | |
people (id, name, father_id, mother_id) as ( | |
select 1, 'Abraham Simpson', null, null from dual | |
union | |
select 2, 'Mona Olsen', null, null from dual | |
union | |
select 3, 'Clancy Bouvier', null, null from dual | |
union | |
select 4, 'Jackie Gurney', null, null from dual | |
union |
This file contains 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
<script src="https://cdnjs.cloudflare.com/ajax/libs/oidc-client/1.11.5/oidc-client.js"></script> | |
<script>new Oidc.UserManager().signinPopupCallback()</script> |
This file contains 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 java.util.Objects; | |
import java.util.Optional; | |
import java.util.function.Consumer; | |
import java.util.function.Function; | |
public final class Either<Left, Right> { | |
public static <L, R> Either<L, R> ofLeft(L left) { | |
return new Either<>(Objects.requireNonNull(left), null); | |
} |
This file contains 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.github.kalgon; | |
import java.util.stream.IntStream; | |
import static com.github.kalgon.TreeView.*; | |
import static java.util.stream.Collectors.joining; | |
public final class Display { | |
public static void none(Object commit, int[] line) { |
This file contains 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 org.openqa.selenium.SearchContext; | |
import org.openqa.selenium.WebDriver; | |
import org.openqa.selenium.WebElement; | |
import org.openqa.selenium.support.FindBy; | |
import org.openqa.selenium.support.PageFactory; | |
import org.openqa.selenium.support.pagefactory.DefaultElementLocatorFactory; | |
import org.openqa.selenium.support.pagefactory.DefaultFieldDecorator; | |
import java.lang.reflect.Constructor; | |
import java.lang.reflect.Field; |
This file contains 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 net.bytebuddy.ByteBuddy; | |
import net.bytebuddy.asm.Advice; | |
import net.bytebuddy.description.modifier.FieldManifestation; | |
import net.bytebuddy.description.modifier.Visibility; | |
import net.bytebuddy.dynamic.DynamicType.Builder; | |
import net.bytebuddy.dynamic.loading.ClassLoadingStrategy; | |
import net.bytebuddy.dynamic.scaffold.subclass.ConstructorStrategy; | |
import net.bytebuddy.implementation.FieldAccessor; | |
import net.bytebuddy.implementation.Implementation; | |
import net.bytebuddy.implementation.MethodDelegation; |
This file contains 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 java.io.IOException; | |
import java.io.InputStream; | |
import java.io.Reader; | |
import java.io.StringReader; | |
public class StreamSeeker { | |
public static int seek(InputStream stream, byte[] bytes) throws IOException { | |
boolean[] checks = new boolean[bytes.length]; | |
for (int s = bytes.length, z = 0, i = 0, x; (x = stream.read()) != -1; z++, i = i == s - 1 ? 0 : i + 1) { |
This file contains 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 java.nio.ByteBuffer; | |
import java.util.Base64; | |
import java.util.UUID; | |
public enum UUID2Base64 { | |
BASIC(Base64.getEncoder(), Base64.getDecoder()), | |
MIME(Base64.getMimeEncoder(), Base64.getMimeDecoder()), | |
URL(Base64.getUrlEncoder(), Base64.getUrlDecoder()); |
NewerOlder