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
| алг | |
| нач | |
| | Решение Ax=b методом Гаусса с частичным выбором, нормировкой строки | |
| | и обратным ходом с делением на диагональ. Матрица Гильберта, b=1. | |
| | Вектор решения записывается в B. В конце выводятся нормы невязки. | |
| | параметры | |
| цел n | |
| вещ Eps | |
| n := 16 |
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
| using TAstTask = TExpectedTask<TExprPtr, TParserError, TLoc>; | |
| // factor ::= Number | Ident | '(' Expr ')' | 'fun' ... | |
| TAstTask factor(TTokenStream& s) { | |
| auto tok = co_await s.Next(); | |
| if (tok.Type == TToken::Number) | |
| co_return std::make_shared<TNumberExpr>(tok.Loc, tok.Value.i64); | |
| if (tok.Type == TToken::Identifier) | |
| co_return std::make_shared<TIdentExpr>(tok.Loc, tok.Name); | |
| if (tok.Type == TToken::Keyword && tok.Value == (int)TToken::Fun) |
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 <ydb/library/actors/core/actorsystem.h> | |
| #include <ydb/library/actors/core/executor_pool_basic.h> | |
| #include <ydb/library/actors/core/scheduler_basic.h> | |
| #include <ydb/library/actors/core/log.h> | |
| #include <ydb/library/actors/core/actor_bootstrapped.h> | |
| #include <ydb/library/actors/util/should_continue.h> | |
| #include <util/system/sigset.h> | |
| #include <util/generic/xrange.h> | |
| // rpi5 (4 cores, 16GB), actors=100, messages=1000000, batch size=1024 |
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 <algorithm> | |
| #include <fstream> | |
| #include <vector> | |
| #include <string> | |
| #include <iostream> | |
| #include <unordered_map> | |
| #include <assert.h> | |
| using namespace std; |
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
| <?php | |
| $im = imagecreatefrompng("vga-palette.png"); | |
| $sx = (int) 800 / 16; | |
| $sy = (int) 800 / 16; | |
| $ox = (int) ($sx / 2); | |
| $oy = (int) ($sx / 2); | |
| for($y = 0; $y < 16; $y++) { | |
| for($x = 0; $x < 16; $x++) { | |
| $rgb = imagecolorat($im, $sx*$x + $ox, $sy*$y + $oy); |
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 <stdio.h> | |
| int perevod(char *s) | |
| { | |
| int code[256]; | |
| int i = 0; | |
| int N = 0; | |
| for (i = 0;i < 256; i ++) { | |
| code[i] = 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
| #include <vector> | |
| #include <tbb/enumerable_thread_specific.h> | |
| class A; | |
| class B { | |
| public: | |
| //std::vector<std::vector<A> > b; // <- can be compiled both g++ and cl | |
| tbb::enumerable_thread_specific<std::vector<A> > b; // <- fails on cl | |
| ~B(); |