- Некорректная обработка чисел больше размерности
int
. Например,9999999999999999999=-1981284353
. IndexOutOfRangeException
в случае пустого ввода и в случае если оператор умножения или сложения находятся в начале:+2
,*2
.- Программа не покрыта тестами.
- Дублирование логики в
switch - case
. Символьный тип элементарно перевести в число, а блок с проверкой от'0'
до'9'
заменяется одной строчкой. То же самое относится к операторам'*'
и'+'
.
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
chcp 65001 | |
mkdir Kochurkins | |
cd Kochurkins | |
git init | |
git checkout --orphan @I36@ | |
git commit -m "Татьяна : Birth F" --date "01/01/1970 00:00:00" --author "Татьяна <>" --allow-empty | |
git checkout --orphan @I35@ | |
git commit -m "Степан Голобоков : Birth M" --date "01/01/1970 00:00:00" --author "Степан Голобоков <>" --allow-empty | |
git checkout --orphan @I33@ |
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
class Program | |
{ | |
class Animal | |
{ | |
} | |
class Cat : Animal | |
{ | |
public void Meow() | |
{ |
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
echo off | |
:LOOP | |
"C:\Windows\Microsoft.NET\Framework\v4.0.30319\csc.exe" "QuineSnake.cs" | |
"QuineSnake.exe" > "QuineSnake.cs" | |
type "QuineSnake.cs" | |
goto LOOP | |
:END |
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
using System; | |
public class C { | |
public const int C1Type = 1; | |
public const int C2Type = 2; | |
public const int C3Type = 3; | |
public const int C4Type = 4; | |
public abstract class Base | |
{ |
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
using MathNet.Numerics.LinearAlgebra.Double; | |
using MathNet.Numerics.LinearAlgebra.Generic; | |
public class PolynomialRegression | |
{ | |
private int _order; | |
private Vector<double> _coefs; | |
/// <summary> | |
/// Calculates polynom regression for xData = [x1, x2, ... , xn] and yData = [y1, y2, ... , yn]. |
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
using System; | |
class Program | |
{ | |
static void Main() | |
{ | |
int validTimeCount = 0; | |
for (int hour = 0; hour < 24; hour++) | |
{ |
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
; R E SH I | |
; E S L I | |
; S I L E N | |
; Обявление уникальных букв | |
(declare-const R Int) | |
(declare-const E Int) | |
(declare-const SH Int) | |
(declare-const I Int) |
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
List<IToken> codeTokens = new List<IToken>(); | |
List<IToken> commentTokens = new List<IToken>(); | |
Lexer preprocessorLexer = new CSharpLexer(new AntlrInputStream(sourceCode)); | |
// Collect all tokens with lexer (CSharpLexer.g4). | |
var tokens = preprocessorLexer.GetAllTokens(); | |
var directiveTokens = new List<IToken>(); | |
var directiveTokenSource = new ListTokenSource(directiveTokens); | |
var directiveTokenStream = new CommonTokenStream(directiveTokenSource, CSharpLexer.DIRECTIVE); | |
CSharpPreprocessorParser preprocessorParser = new CSharpPreprocessorParser(directiveTokenStream); |
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
//------------------------------------------------------------------------------ | |
// <auto-generated> | |
// This code was generated by a tool. | |
// ANTLR Version: 4.9.3 | |
// | |
// Changes to this file may cause incorrect behavior and will be lost if | |
// the code is regenerated. | |
// </auto-generated> | |
//------------------------------------------------------------------------------ |