Skip to content

Instantly share code, notes, and snippets.

@dataPulverizer
dataPulverizer / ctseq.md
Last active May 6, 2022 11:09
Introduction to programming with compile time sequences in D

Introduction

Compile time sequences in D are insane, not insane "crazy" but insanely interesting. One of the selling points of D is that it takes compile time programming in C++ to another level, where templates in C++ were a 'happy?' accident, in D they were purposely built into the language along with other generic and meta-programming tools. To highlight this aspect of the D language, we will implement a selection of templates to manipulate compile time sequences of types, only the text function from the standard library in the std.conv module will be imported which is for concatenating text, we will build everything else including AliasSeq and Nothing from the std.meta module which they are easy one-liners.

This article builds on the concepts of a

@jewelsea
jewelsea / TableWrappedHeaders.java
Last active July 11, 2024 18:46
JavaFX sample tableview with wrapped headers.
import javafx.application.Application;
import javafx.beans.property.SimpleStringProperty;
import javafx.collections.FXCollections;
import javafx.geometry.Pos;
import javafx.scene.Scene;
import javafx.scene.control.*;
import javafx.scene.control.cell.PropertyValueFactory;
import javafx.scene.layout.Pane;
import javafx.scene.layout.StackPane;
import javafx.scene.layout.VBox;