This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import std.math; | |
| import std.conv; | |
| import dlib.image; | |
| void main(string[] args) | |
| { | |
| uint cubeSize = 256; | |
| if (args.length > 1) { | |
| cubeSize = args[1].to!uint; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* | |
| * dlib text rendering example | |
| * Based on the code by Oleg Baharev (aquaratixc) | |
| * https://lhs-blog.info/programming/dlang/dobavlyaem-tekst-na-izobrazheniya-v-dlib/ | |
| */ | |
| module main; | |
| import dlib.image; | |
| import dlib.math; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| module codding; | |
| /* | |
| * Demonstration of 'gnu' and 'codding' hash collision for CRC32 | |
| */ | |
| import std.range; | |
| uint crc32(R)(R range, uint inCrc = 0) if (isInputRange!R) | |
| { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Use Gists to store code you would like to remember later on | |
| console.log(window); // log the "window" object to the console |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| module main; | |
| import std.c.string; | |
| import std.zip; | |
| import std.stdint; | |
| // https://github.com/minexew/minexewgames-engine-public/blob/master/src/minexewgames/framework/stream.d | |
| import stream; | |
| class ZipMemberStream: InputStream |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| module i18n; | |
| import std.stdio; | |
| import std.conv; | |
| import std.format; | |
| import std.array; | |
| import std.process; | |
| import std.path; | |
| import std.file; | |
| import std.string; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import std.stdio; | |
| struct ListElement | |
| { | |
| ListElement* next = null; | |
| string datum; | |
| } | |
| ListElement* reverse(ListElement* head) | |
| { |