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
| create table #CHANNEL( | |
| pk [int] IDENTITY(1,1) NOT NULL, | |
| ChannelNumber nvarchar(10) NULL, | |
| DisplayName nvarchar(10) NULL, | |
| ChannelID int NOT NULL, | |
| PRIMARY KEY CLUSTERED (pk ASC) | |
| ) |
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 <list> | |
| using namespace std; | |
| list<int> A ={ 3,7 }; | |
| list<int>::iterator elf1 = A.begin(); | |
| list<int>::iterator elf2 = ++A.begin(); | |
| void move_A_iterator( list<int>::iterator & it, int steps ) { | |
| while( steps-- ) { |
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 fs = require('fs'); | |
| var diff = 'a'.codePointAt(0) - 'A'.codePointAt(0); | |
| var N = 'z'.codePointAt(0) - 'a'.codePointAt(0); | |
| fs.readFile('E:\\javascript\\AdventOfCode\\13_input', 'utf8', function (err, _contents) | |
| { | |
| let contents = _contents.split`\n`.map(c=>c.split``); |
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> | |
| const int ArrSize = 44; | |
| struct ArrNode{ | |
| int size; | |
| ArrNode* prev; | |
| ArrNode* next; | |
| int arr[ArrSize] = { 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
| fs.readFile('07_input', 'utf8', function (err, _contents) { | |
| let contents = _contents.split`\n`; | |
| contents.splice(-1, 1); | |
| let nodes = new Map(); | |
| for (row of contents) { | |
| let from = row[5]; | |
| let to = row[36]; | |
| if (!nodes.get(from)) nodes.set(from, { edges: new Map() } ); |
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 diff = 'a'.codePointAt(0) - 'A'.codePointAt(0); | |
| var N = 'z'.codePointAt(0) - 'a'.codePointAt(0); | |
| fs.readFile('05_input', 'utf8', function (err, _contents) | |
| { | |
| max = 1111111; | |
| for (aa = 0; aa < N; ++aa) { | |
| l = String.fromCodePoint(aa + 'a'.codePointAt(0)); | |
| l2 = String.fromCodePoint(aa + 'A'.codePointAt(0)); | |
| contents = _contents.replace(new RegExp(l, 'g'), ''); |
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
| // might work with compiler optimilization turned on, but better when disabled | |
| #include <thread> | |
| #include <iostream> | |
| #include <string> | |
| #include <Windows.h> // for Sleep() | |
| typedef unsigned long long uint64; | |
| constexpr int CPU_N = 4; // the more the longer it will wait (reduce n), 99+ will break the array |
NewerOlder