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
<?xml version="1.0" encoding="UTF-8"?> | |
<project xmlns="http://maven.apache.org/POM/4.0.0" | |
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | |
<modelVersion>4.0.0</modelVersion> | |
<groupId>org.example</groupId> | |
<artifactId>graal-maven-1</artifactId> | |
<version>0.0.2</version> |
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
tasks.jar { | |
manifest { | |
attributes["Main-Class"] = "com.andmal.Main" | |
} | |
duplicatesStrategy = DuplicatesStrategy.EXCLUDE | |
from(sourceSets.main.get().output) | |
dependsOn(configurations.runtimeClasspath) | |
from({ | |
configurations.runtimeClasspath.get().filter { it.name.endsWith("jar") }.map { zipTree(it) } | |
}) |
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
public record Point(int x, int y) { | |
public static final class Builder { | |
private int x; | |
private int y; | |
public Builder(Point point) { | |
this.x = point.x(); | |
this.y = point.y(); | |
} | |
public Builder x(int x) { | |
this.x = x; |
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
;;; initfile --- Summary: | |
;;; Commentary: | |
;; Emacs 25.1 and newer tested | |
;;; Code: | |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | |
;; Configuration/Customization: | |
;; Defines global variables that are later used to customize and set | |
;; up packages. | |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
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
//Canvas API - An itsy bitsy taste of the massive functionality in the Canvas object. | |
// Basic Methods for Fills and Strokes: | |
ctx.globalCompositeOperation - Controls how bit blitting is performed, default is "source-over". | |
ctx.globalAlpha - Sets the global alpha channel. | |
ctx.imageSmoothingEnabled - Enables/disables image smoothing. | |
ctx.scale() - Scales image rendering in x,y axes. | |
ctx.translate() - Translates the rendering. |
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
# Build our minimal JRE using jlink | |
FROM openjdk:17-oraclelinux8 as builder | |
USER root | |
RUN jlink \ | |
--module-path "$JAVA_HOME/jmods" \ | |
--add-modules java.compiler,java.sql,java.naming,java.management,java.instrument,java.rmi,java.desktop,jdk.internal.vm.compiler.management,java.xml.crypto,java.scripting,java.security.jgss,jdk.httpserver,java.net.http,jdk.naming.dns,jdk.crypto.cryptoki,jdk.unsupported \ | |
--verbose \ |
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.ast.scripts.db | |
import groovy.sql.Sql | |
import org.ofbiz.core.entity.TransactionFactory | |
import org.ofbiz.core.entity.ConnectionFactory | |
import java.sql.Connection | |
Connection connection = TransactionFactory.getConnection("defaultDS") | |
Connection connection2 = ConnectionFactory.getConnection("defaultDS") |
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
Get-Item -Path env: | |
Get-Item -Path env:JAVA_HOME | |
# Job | |
Get-Job -State Started | |
Get-Job -Name "ja*" | |
# SET | |
Set-Item -Path env:JAVA_HOME -Value "C:\Users\andrii\java" |
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
Gatherer<URI, ?, String> mapToCOntents = gatherers.mapCOncurrent(16, uri -> { | |
try { | |
return fetch(uri); | |
} catch(IOEsception e) { | |
throw new UncheckedIOEsception(e); | |
}; | |
String result = Stream.of(uris) | |
.gather(mapToContents) |
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
## GET request | |
GET / HTTP/1.1 | |
User-agent: curl/2000 | |
Host: example.com | |
## GET response | |
HTTP/1.1 200 OK | |
Server: example-server/1.1 | |
Content-Length: 5 | |
Content-Type: plain/text |
NewerOlder