Skip to content

Instantly share code, notes, and snippets.

View dashorst's full-sized avatar

Martijn Dashorst dashorst

View GitHub Profile
@dashorst
dashorst / App.html
Created December 4, 2022 15:43
ReactJS ToDo application rewritten in Wicket Java and HTML
<html xmlns:wicket="http://wicket.apache.org">
<body>
<h1 wicket:id="title" class="text-center mb-4"></h1>
<form wicket:id="formTodoForm">
<label wicket:id="formTodoLabel"><b>Add Todo</b></label>
<input type="text" wicket:id="textField" class="input" placeholder="Add new todo" />
<button wicket:id="submit" type="submit">Submit</button>
</form>
<div>
<ul>
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary for WicketStuff Core Parent 9.6.0:
[INFO]
[INFO] WicketStuff Core Parent ............................ SUCCESS [ 0.419 s]
[INFO] Wicketstuff Offline Mode Parent .................... SUCCESS [ 0.126 s]
[INFO] Wicketstuff Offline Mode ........................... SUCCESS [ 29.179 s]
[INFO] Wicketstuff Offline Mode Examples .................. SUCCESS [ 14.117 s]
[INFO] Wicketstuff Nashorn Parent ......................... SUCCESS [ 0.171 s]
[INFO] Wicketstuff Nashorn ................................ SUCCESS [ 50.412 s]
[INFO] Wicketstuff Nashorn Examples ....................... SUCCESS [ 11.837 s]
@dashorst
dashorst / toolchains.xml
Created November 19, 2021 13:37
Toolchains.xml example
<?xml version="1.0" encoding="UTF8"?>
<toolchains>
<toolchain>
<type>jdk</type>
<provides>
<version>11</version>
<vendor>adoptium</vendor>
</provides>
<configuration>
<jdkHome>/home/username/.sdkman/candidates/java/11.0.12-tem</jdkHome>
@dashorst
dashorst / wicket-rfc-0001.txt
Last active February 15, 2021 06:23
Apache Wicket is an open source Java component oriented web application framework. This document specifies modernization to the way Wicket handles PageParameters in the processing of requests and the lifecycle of Page components, based on the specifications done for JAX-RS (JSR-311 and JSR-339).
Please see https://github.com/dashorst/wicket-rfcs/blob/master/wicket-rfc-0001.txt for the RFC.
Please comment either inline in the github repository, or reply to the message
thread on the dev@wicket.apache.org mailing list.
@dashorst
dashorst / pom.xml
Created April 2, 2020 12:02
Example of automatically downloading Eclipse settings using Maven
<plugin>
<groupId>org.eclipse.scout</groupId>
<artifactId>eclipse-settings-maven-plugin</artifactId>
<version>3.0.3</version>
<configuration>
<downloadSources>true</downloadSources>
<downloadJavadoc>false</downloadJavadoc>
<additionalConfig>
<file>
<name>.settings/edu.umd.cs.findbugs.plugin.eclipse.prefs</name>
@dashorst
dashorst / A.java
Last active August 23, 2019 14:07
private class JPA {
public List<Lichting> lichtingenVan(Onderwijssoort eenOnderwijssoort, Schooljaar vanafSchooljaar,
Schooljaar totSchooljaar, int eenLeerjaar) {
CriteriaBuilder cb = em.getCriteriaBuilder();
CriteriaQuery<Lichting> cq = cb.createQuery(Lichting.class);
Root<Lichting> l = cq.from(Lichting.class);
Subquery<Long> sq = cq.subquery(Long.class);
Root<LichtingSchooljaar> ls = sq.from(LichtingSchooljaar.class);
@dashorst
dashorst / boemisho.py
Created February 15, 2019 10:43
BOEM IS HO!
from turtle import Turtle, Screen
# Dit is het BOEM IS HO! spelletje
#
# Je kan de turtle van speler 1 (de blauwe schildpad) besturen met
# de A en S toetsen.
#
# Na een tijdje wordt je achterna gezeten door een monster die je
# probeert op te eten. Probeer dat monster dus voor te blijven!
#

Announcing Apache Wicket 8: Write Less, Achieve More

The Apache Wicket project announces the 8th major release of the open source Java web framework servicing websites and applications across the globe for over a decade. With this release Wicket embraces Java 8 idioms fully, allowing the use of lambda expressions in all the right places. With Wicket 8 you can write fewer, faster and more maintainable code.

A Careful Application of Java 8

While previous versions of Wicket work well with Java 8 and beyond, the Wicket API was not optimized to make full use of Java 8 idioms. After careful consideration and trying many paths to adopt new ways of combining Java 8 and Wicket, we finally settled on the current API.

Java 8’s new idioms and types have been applied throughout Wicket’s API. Learn more about the details below.

public interface BootstrapAction
{
BootstrapAction confirm(String text, SerializableRunnable action);
BootstrapAction label(String label);
BootstrapAction icon(FontAwesomeIcon icon);
BootstrapAction iconPre(String icon);
@dashorst
dashorst / gist:6351377
Created August 27, 2013 09:10
Thread dump of hung eclipse using jboss tools and trying to configure validation settings in Preferences
jstack 76650
2013-08-27 10:28:10
Full thread dump Java HotSpot(TM) 64-Bit Server VM (23.25-b01 mixed mode):
"Thread-86" daemon prio=5 tid=0x000000011a066000 nid=0x17c2b runnable [0x0000000000000000]
java.lang.Thread.State: RUNNABLE
"Attach Listener" daemon prio=5 tid=0x0000000119a7c000 nid=0x18307 waiting on condition [0x0000000000000000]
java.lang.Thread.State: RUNNABLE