This file contains 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
' перекодировка кириллицы в юникод | |
public function Win1251_ToUTF8(ByVal S) | |
dim Res, i, AscCode, Symb, b1, b2, utfc | |
Res = "" | |
for I = 1 to Len(S) | |
Symb = Mid(S, I, 1) | |
AscCode = Asc(Symb) | |
' кириллица кроме ё и Ё | |
if (AscCode >= 192) and (AscCode <= 255) then | |
Res = Res & "�" & Hex(AscCode + &H410 - 192) & ";" |
This file contains 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
EXECUTE BLOCK | |
/* RETURNS(tbl VARCHAR(31), cnt INTEGER) */ | |
AS | |
DECLARE VARIABLE rn VARCHAR(31); | |
DECLARE VARIABLE fn VARCHAR(31); | |
DECLARE VARIABLE id INTEGER; | |
DECLARE VARIABLE b INTEGER = 147000001; | |
DECLARE VARIABLE e INTEGER = 147000001; | |
DECLARE VARIABLE limit INTEGER; | |
DECLARE VARIABLE d INTEGER; |
This file contains 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
const execFile = require('child_process').execFile; | |
const tscDirs = [ | |
'/golden/ns/lib/gdmn-db', | |
'/golden/ns/lib/gdmn-orm', | |
]; | |
const dirs = [ | |
'/golden/gedemin', | |
'/golden/gedemin-public', |
This file contains 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
type Player<Club extends string> = { | |
club: Club, | |
name: string | |
}; | |
function createPlayer<Club extends string>(club: Club, name: string): Player<Club> { | |
return { club, name }; | |
} | |
const maradona = createPlayer('Dynamo Brest', 'Maradona'); |
This file contains 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
// Place your settings in this file to overwrite the default settings | |
{ | |
"editor.tabSize": 2, | |
"editor.detectIndentation": true, | |
"editor.fontSize": 12, | |
"editor.minimap.enabled": false, | |
"editor.autoClosingBrackets": "beforeWhitespace", | |
"editor.renderIndentGuides": false, | |
"editor.fontFamily": "Consolas, Operator Mono, Courier New, monospace", | |
"editor.find.autoFindInSelection": true, |
This file contains 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
// Available variables: | |
// - Machine | |
// - interpret | |
// - assign | |
// - send | |
// - sendParent | |
// - spawn | |
// - raise | |
// - actions |
This file contains 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 fetch from 'node-fetch'; | |
const abortController = new AbortController(); | |
const signal = abortController.signal; | |
process.stdin.on('readable', () => { | |
const s = process.stdin.read().toString() as string; | |
if (s.startsWith('abort')) { | |
console.log('aborting...'); | |
abortController.abort(); |
This file contains 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
// link to the article: | |
// https://dev.to/andreik/zod-validatsiia-i-vyvod-tipov-na-osnovanii-skhiemy-dannykh-4n3l | |
import { z } from "https://deno.land/x/zod/mod.ts"; | |
const Levels = ['J1', 'J2', 'J3', 'M1', 'M2', 'M3', 'S1', 'S2', 'S3'] as const; | |
const Skill = z.object({ | |
id: z.string().uuid(), | |
name: z.string().min(1).max(60) |