Create a new Automater flow
Add 'Service'. Service receives 'no input' in 'iTerm'. Add 'Run AppleScript'.
import javax.validation.Constraint; | |
import javax.validation.Payload; | |
import java.lang.annotation.*; | |
@Documented | |
@Constraint(validatedBy = ExampleConstraintValidator.class) | |
@Target({ElementType.FIELD}) | |
@Retention(RetentionPolicy.RUNTIME) | |
public @interface ExampleConstraint { |
var parser = document.createElement('a'); | |
parser.href = "http://example.com:3000/pathname/?search=test#hash"; | |
parser.protocol; // => "http:" | |
parser.hostname; // => "example.com" | |
parser.port; // => "3000" | |
parser.pathname; // => "/pathname/" | |
parser.search; // => "?search=test" | |
parser.hash; // => "#hash" | |
parser.host; // => "example.com:3000" |
Create a new Automater flow
Add 'Service'. Service receives 'no input' in 'iTerm'. Add 'Run AppleScript'.
def getPropertiesFrom(obj) { | |
obj.metaClass.properties.findAll { it.name != 'class' && it.name != 'metaClass' }.inject([:]) { acc, e -> acc[e.name] = e.getProperty(obj); acc } | |
} | |
class Foo { | |
int getBar() { 42; } | |
List getProperties() { [] } | |
} | |
def foo = new Foo(); | |
foo.properties; //=> [] |
package com.example; | |
import java.util.concurrent.CompletableFuture; | |
import java.util.concurrent.ExecutorService; | |
import java.util.concurrent.Executors; | |
public class Comp { | |
public static void main(String[] args) { |
import org.apache.commons.collections4.CollectionUtils; | |
import org.apache.commons.collections4.IteratorUtils; | |
import org.apache.commons.lang3.StringUtils; | |
import org.hibernate.query.criteria.internal.path.PluralAttributePath; | |
import org.springframework.data.domain.Page; | |
import org.springframework.data.domain.PageRequest; | |
import org.springframework.data.repository.support.PageableExecutionUtils; | |
import javax.persistence.EntityManager; | |
import javax.persistence.TypedQuery; |
import org.springframework.beans.BeansException; | |
import org.springframework.context.ApplicationContext; | |
import org.springframework.context.ApplicationContextAware; | |
import org.springframework.stereotype.Component; | |
@Component | |
public class ApplicationContextHolder implements ApplicationContextAware { | |
private static ApplicationContext applicationContext; |
package ...configuration; | |
import org.springframework.context.annotation.Configuration; | |
import org.springframework.context.annotation.Profile; | |
import org.springframework.scheduling.annotation.EnableAsync; | |
@Configuration | |
@EnableAsync | |
@Profile("!test") | |
public class AsyncConfiguration { |
# list Java processes | |
jcmd -l | |
# list running JVM's system properties or flags (select a 'pid' from above command's result list) | |
jcmd pid VM.system_properties | |
jcmd pid VM.flags |
package de.jonasgroeger; | |
import org.junit.jupiter.api.Test; | |
import org.springframework.scheduling.support.CronExpression; | |
import java.time.LocalDateTime; | |
import java.time.ZoneId; | |
class SpringCronExpressionTester { |