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 <iostream> | |
| #include <unordered_set> | |
| typedef std::unordered_set<int> int_set; | |
| enum AccessLevel : int | |
| { | |
| ADMIN, // Может регистрировать новых пользователей, давать роль админа или модератора другим пользователям, а также полностью останавливать чат | |
| MODERATOR, // Может банить пользователей, создавать других модераторов, а также полностью редактировать все сообщения | |
| BANNED, // Не может ничего, предполагается, что ни ADMIN, ни MODERATOR не станут BANNED |
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
| /* parseSudokuBoard() | |
| Reads the live DOM and returns a 9×9 array: | |
| – null for an empty cell | |
| – 1-9 for a filled cell | |
| */ | |
| function parseSudokuBoard() { | |
| const board = Array.from({ | |
| length: 9 | |
| }, () => Array(9).fill(null)); |
Below is a step‑by‑step, ordered list of the POSIX functions you normally call when you work with a Unix‑domain (AF_LOCAL / AF_UNIX) stream socket (SOCK_STREAM).
I split the list into two sections – one for the server side and one for the client side – because the order of calls differs slightly.
| # | Function (header) | What it does | Typical usage notes |
|---|---|---|---|
| 1 | socket(int domain, int type, int protocol) #include |
Creates a new socket descriptor. | domain = AF_LOCAL (or AF_UNIX), type = SOCK_STREAM, protocol = 0. |
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
| // ==UserScript== | |
| // @name TranslationChicken Character Colors + UI | |
| // @namespace https://translationchicken.com | |
| // @version 2.4.3 | |
| // @description Color dialogue lines with UI controls | |
| // @author Prostagma | |
| // @match https://translationchicken.com/* | |
| // @icon https://www.google.com/s2/favicons?sz=64&domain=translationchicken.com | |
| // @homepageURL https://gist.github.com/alekxeyuk/6961a1c5dc94566a3a1f19c08b4fe706 | |
| // @downloadURL https://gist.githubusercontent.com/alekxeyuk/6961a1c5dc94566a3a1f19c08b4fe706/raw/userscript.js |
OlderNewer