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
| #include <wchar.h> | |
| int main() | |
| { | |
| mbstate_t mbstate; | |
| wchar_t const wcs[] = "\U00000055\U0000006E\U00000069\U00000063\U0000006F\U00000064\U00000065"; | |
| wchar_t const* wcsptr = wcs; | |
| char mbs[256]; | |
| memset(&mbstate, 0, sizeof mbstate); |
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
| namespace trillek { | |
| namespace util { | |
| namespace logging { | |
| namespace detail { | |
| std::unique_ptr<logger> global_logger; | |
| } | |
| } | |
| } | |
| } |
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
| int wcsArrayAdd(wchar_t ***array, int *cur_size, wchar_t *item) | |
| { | |
| int new_size = (*cur_size) + 1; | |
| size_t len = wcslen(item); | |
| wchar_t *tmp1 = NULL; | |
| wchar_t **tmp2 = NULL; | |
| /* alloc memory for item */ | |
| tmp1 = malloc((len + 1) * sizeof(wchar_t)); | |
| if (tmp1 == NULL) { | |
| return ERROR_MEMORY; |
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
| The built in firmware of the Trillek computer could: | |
| 1) Do a quick check of how much RAM the computer has. | |
| 2) Search for devices and store their info in RAM. | |
| 3) Set up a monitor and keyboard, getting by default the monitor and keyboard with the lowest slot number. | |
| In future, it could try to get from NVRAM which monitor and keyboard to use. | |
| 4) Print basic information about the computer such as total RAM, CPU speed, number of devices found and | |
| hardware info. | |
| 5) If there is a floppy drive with a floppy disk, try to boot from it. It there are many, it would use the | |
| floppy drive with the lowest slot. |
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
| set nocompatible | |
| set number | |
| set tildeop | |
| " Windows GUI options | |
| set guioptions-=m | |
| set guioptions-=T | |
| set guioptions-=r | |
| set guioptions-=L | |
| set guifont=Source_Code_Pro_Bold:h11b |
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
| var irc = require('irc'); | |
| var readline = require('readline'); | |
| var util = require('util'); | |
| var config = { | |
| channels: ['#project-trillek'], | |
| server: 'irc.freenode.net', | |
| botName: 'mroutbot' | |
| }; |
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
| from itertools import * | |
| colours = 'WUR' | |
| def f(c): | |
| return 'o:{' + str(c) + '}' | |
| def g(c): | |
| return c.lower() |
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
| BIS: the Better Instruction Set | |
| REGISTERS | |
| --------- | |
| sixteen 32-bit general-purpose registers, numbered 0-15 | |
| one 16-bit status register | |
| four 16-bit arithmetic condition registers, numbered 0-3 | |
| INSTRUCTION FORMAT LEGEND |
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
| BIS: the Better Instruction Set | |
| REGISTERS | |
| --------- | |
| sixteen 32-bit general-purpose registers, numbered 0-15 | |
| one 16-bit status register | |
| four 16-bit arithmetic condition registers, numbered 0-3 | |
| INSTRUCTION FORMAT LEGEND |
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
| class renderer { | |
| public: | |
| enum class action { | |
| view_add, view_remove, view_activate, | |
| model_matrix_add, model_matrix_remove, | |
| vb_add, vb_remove, | |
| }; | |
| private: | |
| static std::atomic<std::queue<std::pair<action, entity_id>>*> global_queue; |