Skip to content

Instantly share code, notes, and snippets.

@hoijui
hoijui / oseg-git-branching-model-complex.mermaid
Created September 15, 2023 10:24
oseg-git-branching-model-complex.mermaid
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@hoijui
hoijui / XmlFastRoughAndPrettyFormatter.java
Created May 20, 2019 13:29
fast, stream-based XML pretty-printer (Java 8, LGPL v3+)
/*
* Copyright (C) 2019, Robin Vobruba <[email protected]>.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
@hoijui
hoijui / ByteBufferOutputStream.java
Created December 28, 2015 14:06
A Java OutputStream wrapping a ByteBuffer
/*
This is free and unencumbered software released into the public domain.
Anyone is free to copy, modify, publish, use, compile, sell, or
distribute this software, either in source code form or as a compiled
binary, for any purpose, commercial or non-commercial, and by any
means.
In jurisdictions that recognize copyright laws, the author or authors
of this software dedicate any and all copyright interest in the
@hoijui
hoijui / DatagramChannelDisconnectBug.java
Created December 28, 2015 11:19
JUnit test to demonstrate possible bug (blocking) with DatagramChannel#disconnect(), either in the implementation or the documentation
/*
* Public Domain
*/
import java.io.IOException;
import java.net.InetAddress;
import java.net.InetSocketAddress;
import java.net.SocketAddress;
import java.nio.ByteBuffer;
import java.nio.channels.DatagramChannel;
@hoijui
hoijui / DatagramChannelDisconnectBug.java
Created December 28, 2015 11:18
JUnit test to demonstrate possible bug (blocking) with DatagramChannel#disconnect(), either in the implementation or the documentation
/*
* Public Domain
* Author: Robin Vobruba <[email protected]>
*/
import java.io.IOException;
import java.net.InetAddress;
import java.net.InetSocketAddress;
import java.net.SocketAddress;
import java.nio.ByteBuffer;
Starting program: /home/userX/Projects/spring/installs/cmake/master/linux64/debug/spring
[Thread debugging using libthread_db enabled]
using default configuration source "/home/userX/.springrc"
[CMyMath::Init] CPU SSE mask: 888, flags:
SSE 1.0: 1, SSE 2.0: 1
SSE 3.0: 1, SSSE 3.0: 0
SSE 4.1: 0, SSE 4.2: 0
SSE 4.0A: 1, SSE 5.0A: 0
using streflop SSE FP-math mode, CPU supports SSE instructions
OS: Linux
950ed23e5875da59bef0f5c36caf689f9c3fdd81
[19:23] (II): ATask::remove AssistTask(257) Assisting(FactoryTask(108) Vehicle Plant(2080, 1928) Assisters: amount(1) [Group(7): amount(1) [Construction Kbot(2334, 1935)]] ) Group(7): amount(1) [Construction Kbot(2334, 1935)]
[19:23] (II): CTaskHandler::remove AssistTask(257) Assisting(FactoryTask(108) Vehicle Plant(2080, 1928) Assisters: amount(1) [Group(7): amount(1) [Construction Kbot(2334, 1935)]] ) Group(7): amount(1) [Construction Kbot(2334, 1935)]
[19:23] (II): CTaskHandler::remove FactoryTask(108) Vehicle Plant(2080, 1928) Assisters: amount(1) [Group(7): amount(1) [Construction Kbot(2334, 1935)]]
[19:23] (II): CUnitTable::remove unit(2080)
[19:23] (II): CE323AI::UnitDestroyed Shellshocker(1095, 2080)
[19:23] (II): CUnit::remove Shellshocker(1095, 2080)
[19:23] (II): CGroup::remove unit(1095)
[19:23] (II): CPathfinder::remove Group(21): amount(0)]