Skip to content

Instantly share code, notes, and snippets.

@mambax
mambax / Dockerfile
Created April 16, 2021 04:13
nds-swe/exman-packer/Dockerfile
FROM openjdk:14-alpine
RUN apk update && apk upgrade && apk add --no-cache supervisor openssh nginx bash curl
CMD ["echo", "Empty Dockerfile, do task https://nds-swe.github.io/swdt/docs/tasks/client-server to get access later."]
import { Command } from '@colyseus/command';
import { Schema, type } from '@colyseus/schema/lib';
import debug0 from 'debug';
import { nanoid } from 'nanoid';
import { OnPlayColoredCardCommand } from '../../../server/src/frontiq/frontiq.commands';
import { FrontiqPlayer } from './frontiq.player';
import { FrontiqState } from './frontiq.state';
const debug = debug0('frontiq:card');
@mambax
mambax / 1 - promises.ts
Last active September 30, 2019 14:18
Interview
// What is wrong with this code snippet?
new Promise((resolve, reject) => {
throw new Error('error')
})
.then(console.log)
2018-10-01 17:13:22 [APP/PROC/WEB/0] OUT Access-Control-Allow-Origin: https://demo-gravity-gravity.scapp.io
2018-10-01 17:13:22 [APP/PROC/WEB/0] OUT Access-Control-Allow-Credentials: true
2018-10-01 17:13:22 [APP/PROC/WEB/0] OUT Access-Control-Allow-Methods: POST, GET, OPTIONS, DELETE, PUT
2018-10-01 17:13:22 [APP/PROC/WEB/0] OUT Access-Control-Allow-Headers: Content-Type, Accept, X-Requested-With, X-XHR-Logon, Access-Control-Allow-Headers, Authorization, remember-me, cookie, Set-Cookie, Origin, Referer
2018-10-01 17:13:22 [APP/PROC/WEB/0] OUT Access-Control-Expose-Headers: Access-Control-Allow-Origin
2018-10-01 17:13:22 [APP/PROC/WEB/0] OUT Date: Mon, 01 Oct 2018 15:13:22 GMT
2018-10-01 17:13:22 [APP/PROC/WEB/0] OUT ]
2018-10-01 17:13:22 [APP/PROC/WEB/0] OUT Content: {
2018-10-01 17:13:22 [APP/PROC/WEB/0] OUT {"hotspots":[{"id":109,"pageURL":"https://peachesindustriesgmbh.sharepoint.com/sites/gravity_version_1/SitePages/Homepage.aspx","lcid":"en","calloutContentType":2,"positionOfCallout":"right","contentOfC
public class GraphGymnastic extends Application {
final ExecutorService serv = Executors.newFixedThreadPool(2);
public static void main(String argv[]) {
launch(argv);
}
@Override public void start(Stage primaryStage) throws Exception {
//Setup UI
primaryStage.setTitle("Demo");
final List<Node> nodesInGraph = new ArrayList<>();
package com.company;
import javax.swing.*;
import java.awt.*;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.awt.event.KeyEvent;
import java.awt.event.KeyListener;
public class CBallMaze extends JFrame {
@Override public void start(Stage primaryStage) throws Exception {
try {
URL url = getClass().getResource("Application.fxml");
FXMLLoader loader = new FXMLLoader(url);
loader.impl_setStaticLoad(true);
Parent p = loader.<Parent>load();
stackPane.getChildren().add(p);
Exception in Application start method
Exception in thread "main" java.lang.RuntimeException: Exception in Application start method
at com.sun.javafx.application.LauncherImpl.launchApplication1(LauncherImpl.java:917)
at com.sun.javafx.application.LauncherImpl.lambda$launchApplication$152(LauncherImpl.java:182)
at com.sun.javafx.application.LauncherImpl$$Lambda$2/1531448569.run(Unknown Source)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.RuntimeException: javafx.fxml.LoadException:
/C:/Users/Dominik/Documents/fhnw/bath/svn/examples/fxmlloader/out/production/FxHeatMap/eu/hansolo/fx/heatmap/fxmlload/Application.fxml:20
at eu.hansolo.fx.heatmap.fxmlload.FXMLLoader.start(FXMLLoader.java:34)
@mambax
mambax / DialogButtonArea.java
Created June 1, 2015 12:02
DialogButtonArea
import javafx.application.Application;
import javafx.geometry.BoundingBox;
import javafx.geometry.Bounds;
import javafx.scene.Node;
import javafx.scene.control.Button;
import javafx.scene.control.ButtonType;
import javafx.scene.control.Dialog;
import javafx.scene.control.DialogPane;
import javafx.scene.control.Label;
import javafx.scene.control.TextArea;
import javafx.scene.control.Label;
import javafx.event.EventHandler;
import javafx.scene.control.TextField;
import javafx.event.ActionEvent;
public class InputListener implements EventHandler<ActionEvent> {
private TextField tallfelt;
private String teksten;