blob_id large_stringlengths 40 40 | language large_stringclasses 1
value | repo_name large_stringlengths 5 119 | path large_stringlengths 4 271 | score float64 2.52 4.84 | int_score int64 3 5 | text stringlengths 26 4.09M |
|---|---|---|---|---|---|---|
b1a9d669e2b21122f68ea2773fe4ba1d7da8d449 | C# | alexhock/CA | /CAImageSegmentation/CA.cs | 3.046875 | 3 | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace CAImageSegmentation
{
class CA
{
float maxIntensity = -1.0f;
float threshold = -1.0f;
Func<float, float, float, float, float> stateTransitionFunc;
int n... |
64d34fccd53cb61d9fc6a1d80508e4a43b41d8b4 | C# | thangozil/SocialNetwork_Backend | /Api/Models/Auth/RegisterDto.cs | 2.59375 | 3 | using System;
using FluentValidation;
namespace Api.Models.Auth
{
public class RegisterDto
{
public string Email { get; set; }
public string Password { get; set; }
}
public class RegisterDtoValidator : AbstractValidator<RegisterDto>
{
public RegisterDtoValidator()
... |
6a8a0c87185bec4e595ef9c34e2c9c35be830f0f | C# | hulusionel/TicTacToe_Unity | /Assets/Scripts/Main.cs | 2.625 | 3 | using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
public class Main : MonoBehaviour
{
public static int sayi;
public Board mBoard;
public Text mCursor; //mouse imlecinin text'i
public Image mWinner;
private bool mxTurn = true;
private in... |
42f10d629dd8979b59a935554799e35bffe79554 | C# | epsilone/FishAdventure | /Prototype/Paddle_Prototype/Paddle/Paddle_Server/GameTimer.cs | 2.71875 | 3 | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Runtime.InteropServices;
namespace PaddleServer
{
public class GameTimer
{
[DllImport("kernel32.dll", CharSet = CharSet.Auto, ExactSpelling = true)]
public static extern long GetTickCount();
... |
7de75e7110a8800dc97ba64fb0134cc4586dcd71 | C# | gabriellima09/CoreDomain | /src/CoreDomain.Tests/Models/MyCustomValueObject.cs | 2.890625 | 3 | using System;
using System.Collections.Generic;
namespace CoreDomain.Tests.Models
{
public class MyCustomValueObject : ValueObject
{
public MyCustomValueObject(int foo, string bar)
{
Foo = foo;
Bar = bar ?? throw new ArgumentNullException(nameof(bar));
}
... |
98ee7905511fce66bae4218bbc73a0b7f7375f95 | C# | BackupTheBerlios/pwmds | /pwmds/MDS/GUI/DataProcess.cs | 2.53125 | 3 | using System;
using System.Collections.Generic;
using System.Collections;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
namespace MDS.GUI
{
public partial class DataProcess : Form
{
public static int MODIFY = 0,
... |
6fe418de05eae078ea0496f8a73cb8b880915c7b | C# | Momongaka/Practice | /Practice/OneOffs/OddEven.cs | 3.734375 | 4 | namespace Practice
{
public class OddEven
{
static Text text = new Text();
public static void Check()
{
text.TextEd("\nWelcome to Odd or Even\n");
var numChoice = text.AskForInt("Enter a number");
string state = IsEven(numChoice) ? "even" : "odd";
... |
4c7ffaefb81a135dc15dc006927dba9e31f28253 | C# | c-stauffer/LCWCdroid | /LCWCdroid/LCWCdroid/Incident.cs | 2.546875 | 3 | using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.ComponentModel;
using System.Linq;
using System.Runtime.CompilerServices;
namespace LCWCdroid
{
/*
The RSS doesn't classify into Fire/Medical/Traffic
The description is semi-colon delimited into
... |
060dd4993a6472e37490114160b2d92448445332 | C# | Caaakey/3D-Tower-Defence_2020_3_10f_newer | /Assets/Scripts/Managers/SpawnManager.cs | 2.625 | 3 | using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class SpawnManager : MonoBehaviour
{
public static SpawnManager Get { get; private set; } = null;
// readonly ?
// 이 객체는 수정되어지지 않는다. 읽기 전용
[SerializeField] private Enemy[] Prefabs; // 적 개체 프리팹
[Seri... |
56e08af8d5413593de18813db974fab073556054 | C# | ramkishore07s/Neon-Runner | /Assets/Ground/GameBoard.cs | 2.9375 | 3 | using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class GameBoard
{
private int turns, length;
private int[,] board;
private System.Random random = new System.Random();
public const int PATH = 0, FULL_OBSTACLE = 1, JUMP_OBSTACLE = 2, SLIDE_OBSTACLE =... |
07477d4091d8c63204fc9ef9259675038cc0e641 | C# | SasanumaTohru/AccountingSystem | /会計システム/Domain/BusinessObject/会計伝票/仕訳.cs | 2.765625 | 3 | namespace AccountingSystem.Domain.BusinessObject.会計伝票
{
public class 仕訳
{
private 勘定科目.科目 m_勘定科目;
private PrimitiveObject.必須文字列 m_摘要;
private PrimitiveObject.金額 m_金額;
private 貸借.区分 m_貸借区分;
/// <summary>
///
/// </summary>
/// <param nam... |
d516fc5d1da6b1ba37d5bd34ee7d7ae2a43a8efd | C# | yankri/CodeEval | /Odd numbers/Odd numbers/Program.cs | 3.546875 | 4 | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Odd_numbers
{
class Program
{
static void Main(string[] args)
{
//Print the odd numbers from 1 to 99, one number per line.
for (int... |
23d224f8580a2348f55015e6e0aab3e773857b4e | C# | ricardo55/programasnet | /Tarea03/ProyectoBancario/Program.cs | 2.890625 | 3 | using System;
using ProyectoBancario.clases;
using System.IO;
namespace ProyectoBancario
{
class Program
{
static void Main1(string[] args)
{
/*
//Creamos instancia de la clase y reservamos espacio de memoria
CuentaBancaria miCuenta;
... |
63c723f445cd1c2c5dc2994cddfab3299c291f35 | C# | 15831944/PlasticMes | /Web/App_Code/Entity.cs | 2.515625 | 3 | using System;
using System.Collections.Generic;
using System.Web;
/// <summary>
/// Entity 的摘要说明
/// </summary>
public class Entity
{
private List<string> _Name = new List<string>();
public List<string> Name
{
get { return _Name; }
set { _Name = value; }
}
private List<string> _Va... |
9cc14d30a8e18b4796d61ef3beab4386652344e8 | C# | Ale-Acevedo/AET334F-Final | /GameScriptFinalProject/Assets/MyScripts/VolumeController.cs | 2.640625 | 3 | using UnityEngine;
using UnityEngine.UI;
// Written by Presley
// Class to adjust audiosources based on settings volume sliders
// Referenced ChrisVernerStudio tutorial: https://www.youtube.com/watch?v=s-Y4e0mNuwI
public class VolumeController : MonoBehaviour
{
private AudioSource musicAudio;
private AudioSour... |
472d0f7f2935379c24cd38459d1b62961e9c0850 | C# | JorisLambooij/ascendancy | /Ascendancy/Assets/Scripts/World/Terrain/Generation/TerrainTypeEqualization.cs | 2.765625 | 3 | using System.Collections;
using System.Linq;
using System.Collections.Generic;
using UnityEngine;
public class TerrainTypeEqualization : TerrainOperation
{
public override void TileOperation(int x, int y)
{
Tile me = originalTilemap[x, y];
if (me.terrainType == TerrainType.NONE)
re... |
9b09c60178f650f2a864783b1a4090a659e2b5b2 | C# | Cossplay/MyTwit | /DAL/Repositories/TwitRepository.cs | 2.984375 | 3 | using DAL.Interfaces;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using DAL.Entities;
using MySql.Data.MySqlClient;
namespace DAL.Repositories
{
public class TwitRepository : ITwitRepository
{
private static string CONNECTION_STRI... |
d5dfa82e3fc3c5101125c7f43cb16d88ab16fde2 | C# | lauraGBaro/EjercicioCursos | /EjercicioCodeFirstCursos/Views/Shared/Helpers/ImageTagHelper.cs | 2.703125 | 3 | using Microsoft.AspNetCore.Razor.TagHelpers;
using System;
using System.Threading.Tasks;
namespace EjercicioCodeFirstCursos.Views.Shared.Helpers
{
[HtmlTargetElement("img", Attributes = FotoAttributeBytes)]
public class ImageTagHelper : TagHelper
{
private const string FotoAttributeBytes = "bytes-foto";
[Html... |
b1882548850d90db3eb7492ae40eeae0e3e0611e | C# | anselmomgois/ControleEstoque | /Informatiz.ControleEstoque.AcessoDados/Classes/Bairro.cs | 2.53125 | 3 | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using AmgSistemas.Framework.AcessoDados;
using frmUtil = AmgSistemas.Framework.Utilitarios;
using System.Data;
namespace Informatiz.ControleEstoque.AcessoDados.Classes
{
public class Bairro
{
#region "Consultas"
... |
cb683c61f8714534fe904f4206bcfb6500fb3f15 | C# | VictorSardellaro/ChallengeDataAccess | /Screens/PostScreen/CreatePostScreen.cs | 3.140625 | 3 | using System;
using Blog.Models;
using Blog.Repositories;
namespace Blog.Screens.PostScreens
{
public static class CreatePostScreen
{
public static void Load()
{
Console.Clear();
System.Console.WriteLine("Novo Post");
System.Console.WriteLine("--------------... |
e07639aeb8de515ad5be48c4c6756f0657d8c876 | C# | aydarkin/OOP-laba4 | /OOP-laba4/TreeViewObserver.cs | 2.984375 | 3 | using OOP_laba4.Figures;
using System.Collections.Generic;
using System.Windows.Forms;
namespace OOP_laba4
{
class TreeViewObserver : TreeView, IObserver
{
public Storage<Figure> Figures;
public TreeViewObserver() : base()
{
CheckBoxes = true;
}
List<IObser... |
bba4cf99dbe569ce171351cca0f28513c6f0dcc8 | C# | theellowship/Unity-Source-Engine-Importer | /Assets/Core/MathUtils.cs | 2.71875 | 3 | using System;
using System.Collections.Generic;
using System.Globalization;
using System.Linq;
using System.Linq.Expressions;
using System.Reflection;
using System.Text.RegularExpressions;
using JetBrains.Annotations;
using UnityEngine;
enum Angle
{
PITCH = 0, // up / down
YAW, // left / right
ROLL ... |
84018c21d39d756b0dd83910760f30941dda3a82 | C# | LeoVen/Alura | /C#/Collections/Collections/LinkedLists.cs | 3.453125 | 3 | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Collections
{
class LinkedLists
{
public static void LinkedListTest()
{
LinkedList<int> list = new LinkedList<int>();
LinkedListNode<int> node ... |
a0dc834ce3691fadaefe5e9c338ee235695a3abf | C# | ruizhang84/MSPeakArea | /NUnitTest/FFTTest.cs | 2.671875 | 3 | using FFTW.NET;
using MSPeakArea.Algorithm;
using NUnit.Framework;
using System;
using System.Numerics;
namespace NUnitTest
{
public class FFTTest
{
[SetUp]
public void Setup()
{
}
[Test]
public void test1()
{
Complex[] input = { 1.0, 1.0, 1.... |
11ecd93b541c73b43f24b0b93d9acae3eda3f76a | C# | lubakka/CSharp | /ArraySort/Program.cs | 3.515625 | 4 | using System;
namespace ArraySort
{
class Program
{
static void Main(string[] args)
{
string[] beers =
{
"Zagorka", "Ariana", "Shumensko", "Astika",
"Kamenitza", "Bolyarka", "Amstel"
};
Array.Sort(beers);
... |
e99a74271236c2bfe48538e3202daa60e41b2521 | C# | Leownhart/Curso-de-C- | /Exercicio_01/Exercicio_01/Exer_01.cs | 3.921875 | 4 | using System;
namespace Exercicios_Fix
{
class Exer_01
{
static void Main(string[] args)
{
/* Faça um programa para ler dois valores inteiros, e depois mostrar na tela a soma
* desses valores com uma mensagem explicativa.*/
int n1, n2, n3, soma;
... |
2b6a3a085ac6cbe1671d45ad4ebd5bbcbe16dab8 | C# | Deuk-Hoi/Csharp_Training | /Delegate_Lamda/Delegate_Lamda/Student.cs | 3.71875 | 4 | using System;
using System.Collections.Generic;
using System.Text;
namespace Delegate_Lamda
{
class Student
{
public string Name { get; set; }
public double Score { get; set; }
public Student(string Name, double Score)
{
this.Name = Name;
this.Score = S... |
da05ad4ced0fdfe240ce9ec528cc6c6f2d65b54d | C# | Mark-Cooper-Janssen-Vooles/clean_code_mosh | /CleanCode/CleanCode/CleanCode/SwitchStatements/MonthlyStatement.cs | 3.359375 | 3 | using System;
namespace CleanCode.SwitchStatements
{
public class Customer
{
public CustomerType Type { get; set; }
public MonthlyStatement GenerateStatement(MonthlyUsage monthlyUsage)
{
var statement = new MonthlyStatement();
switch (Type)
... |
1576bba08c6fb90567ecdb10c635486d3e369d13 | C# | toshinomi/WebBrowser | /formWebBrowser.cs | 2.65625 | 3 | using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace WebBrowser
{
/// <summary>
/// FormWebBrowserのロジック
/// </summary>
public parti... |
5a366c5c2983e10754fc6b8c735f9edff1a16fd9 | C# | OfficeDev/Interop-TestSuites | /ExchangeMAPI/Source/Common/Common/ExchangeMapiClient/RopMessages/FolderROPs/RopGetSearchCriteria.cs | 2.53125 | 3 | namespace Microsoft.Protocols.TestSuites.Common
{
using System;
using System.Runtime.InteropServices;
/// <summary>
/// RopGetSearchCriteria request buffer structure.
/// </summary>
[StructLayout(LayoutKind.Sequential, Pack = 1)]
public struct RopGetSearchCriteriaRequest : ISeriali... |
41b52bd6a028bcb63bb7b646f349b5195eb43aab | C# | wongn27/Recipe | /Recipe.Web/Server/Controllers/IngredientController.cs | 2.890625 | 3 | using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Mvc;
using Microsoft.EntityFrameworkCore;
using Recipe.Web.Data;
using Recipe.Web.Data.Models;
namespace Recipe.Web.Server.Controllers
{
[Route("api/ingredientController")]
[ApiControlle... |
99dd1264242b061d80a44423932a9bf72cbc1c26 | C# | DuCalixte/Selenium.Actions | /Selenium.Actions/Selenium.Actions/Mouse.cs | 2.6875 | 3 | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using OpenQA.Selenium;
using OpenQA.Selenium.Internal;
using OpenQA.Selenium.Support.UI;
namespace Selenium.Actions
{
public static class Mouse
{
#region Click on objects
public static void Click(this IWebEl... |
37b159b2953100b838cd3a85e54612ca7d9c0098 | C# | stefanmielke/DataCore | /DataCore.Test/QueryTestJoins.cs | 2.578125 | 3 | using DataCore.Test.Models;
using NUnit.Framework;
namespace DataCore.Test
{
[TestFixture]
public class QueryTestJoins
{
[Test]
public void CanGenerateInnerJoin()
{
var data = new Query<TestClass>(new Translator());
data.Join<TestClass2>((t, t2) => t.Id == ... |
4aa8b163831602930bd17586b36130f0816af5f7 | C# | KiselevAndrey/SnowBattle | /Assets/Scripts/Gate.cs | 2.703125 | 3 | using System;
using UnityEngine;
public class Gate : MonoBehaviour
{
static public Action<int> GoalMe;
private void OnCollisionEnter(Collision collision)
{
// если это шайба
if (collision.gameObject.CompareTag("Puck"))
{
string name = gameObject.name; // узнаю свое им... |
4deb42af6a43d15bdd023fb9604d69cc816246f7 | C# | JohanLarsson/FilterBox | /FilterBox/Foo.cs | 2.625 | 3 | namespace FilterBox
{
public class Foo
{
public Foo(string name)
{
Name = name;
}
public string Name { get; }
public override string ToString()
{
return $"{Name}";
}
}
} |
f540d7ac5ac6391c1e321646d675fc97cc0041e8 | C# | xescrp/breinstormin | /breinstormin/breinstormin.tools/cryptography/RijndaelSimple.cs | 3.28125 | 3 |
using System;
using System.IO;
using System.Text;
using System.Security.Cryptography;
namespace breinstormin.tools.cryptograpthy
{
public class RijndaelSimple
{
internal const string cookiepassphrase = "Coo5ki@se";
public const string passphrase = "Pas5pr@se";
public const string salt... |
ed6c8f68ca0332a417c100afe12b0cad22aaefe3 | C# | oshea00/AspNetCoreIdentity | /identiity/Infrastructure/LocationClaimsProvider.cs | 2.546875 | 3 | using Microsoft.AspNetCore.Authentication;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Security.Claims;
using System.Threading.Tasks;
namespace identiity.Infrastructure
{
public class LocationClaimsProvider : IClaimsTransformation
{
public Task<ClaimsPrincipal> Tran... |
98b14173bc55b5ce24d1df432c4c6507ffa880e8 | C# | spaceorc/codingame2017-coders-of-the-caribbean | /Game/State/TurnState.cs | 2.90625 | 3 | using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Runtime.CompilerServices;
using Game.Entities;
namespace Game.State
{
public class TurnState
{
public readonly List<Barrel> barrels = new List<Barrel>();
public readonly List<Ship> myShips =... |
25d4aa7c0a2147e8b126b3036b257a6fb19a6f04 | C# | fabbrodan/DartGame | /Game.cs | 3.0625 | 3 | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace DartGame
{
class Game
{
private List<Player> PlayerList;
public Game()
{
PlayerList = new List<Player>();
}
public void AddPlayer(... |
72ce9a62f6b45409a2bd182a458f1bb8c13b786a | C# | artfuldev/LinqAn.Google | /src/LinqAn.Google/Dimensions/ScreenResolution.cs | 2.671875 | 3 | using System.ComponentModel;
namespace LinqAn.Google.Dimensions
{
/// <summary>
/// The screen resolution of users' screens. For example: 1024x738.
/// </summary>
[Description("The screen resolution of users' screens. For example: 1024x738.")]
public class ScreenResolution: Dimension
{
/// <summary>
/// In... |
dce381c38674239033ddb89dbfc8fc04bf4e44c0 | C# | mwaitzman/pinpoint | /Pinpoint.Plugin.EncodeDecode/Base64Handler.cs | 3.03125 | 3 | using System;
using System.Text;
using System.Text.RegularExpressions;
namespace Pinpoint.Plugin.EncodeDecode
{
public class Base64Handler: IEncodeDecodeHandler
{
private readonly Regex _decodeRegex = new Regex(@"^[A-Za-z0-9\-\+\={0,2}]+$");
public string Encode(string stringToEncode)
... |
50cbde189d3626e0ceb3a36527975142c4f0274b | C# | ChenPufeng/jwt-security-token-handler-asymmetric | /Repositores/RepositoryBase.cs | 2.6875 | 3 | using System;
using System.Collections.Generic;
using System.Linq;
using System.Linq.Expressions;
using System.Reflection;
using System.Threading.Tasks;
using jwt_security_token_handler_asymmetric.Abstraction;
using Microsoft.EntityFrameworkCore;
namespace jwt_security_token_handler_asymmetric.Repositores
{
public a... |
505c0f474647cd767e003b0a1b861db4404c22e7 | C# | sukhanov/bakery | /Bakery/Bakery.Web/Mappers/ProductMapper.cs | 2.5625 | 3 | using Bakery.Common;
using Bakery.Services.Models;
using Bakery.Web.Models;
namespace Bakery.Web.Mappers
{
public static class ProductMapper
{
public static WebProductModel ProductModel2WebProductModel(ProductModel source)
{
var target = new WebProductModel
{
... |
078d03cb8888957d422f0269781268080e9c7d14 | C# | nmt-hitu/infinitescrolling-januscontrol | /InfiniteScrolling/InfiniteScrollingDialog.cs | 2.671875 | 3 | using System;
using System.Data;
using System.Data.SqlClient;
using System.Windows.Forms;
namespace InfiniteScrolling
{
public partial class InfiniteScrollingDialog : Form
{
SqlConnection connection = new SqlConnection("Data Source=172.16.1.30;Initial Catalog=BOSS_Development;User Id=boss_dev; Passwor... |
80a43571a4d4c349665afecfdd6fbda13799842e | C# | green-fox-academy/mirekjiranek | /week-04/Day-1/Testing/Apples/Apple.cs | 3.078125 | 3 | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Apples
{
public class Apple
{
//List<int> IntList = new List<int>();
public string GetApple()
{
return "apple";
}
public int Sum(in... |
7d3cd4b2cfdaecb7a021bd378845de77f513f2ef | C# | westonforbes/FORBES | /PROCESS_TIME/PROCESS_TIME.cs | 2.640625 | 3 | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace FORBES.PROCESS_TIME_NAMESPACE
{
public class PROCESS_TIME
{
public DateTime START_TIME { get; private set; }
public DateTime STOP_TIME { get; private set; }
pub... |
9bf3252bb853ecfd19427a126afdedfd3194618b | C# | igorpenyak/SnakeDefenderGame | /SnakeDefender/SnakeDefender.ConsoleUI/GameStart.cs | 2.921875 | 3 | using System;
using SnakeDefender.Helpers;
namespace SnakeDefender.ConsoleUI
{
class GameStart
{
#region Private Fields
private static GameSettings _gameSettings;
private static ResultAnalysis _resultsAnalysis;
private static RandomGenerator _randomGenerator;
... |
53bcb4f79ba9352bdc65830f6fa1d6b30b7df558 | C# | dj3mu/HamnetMonitoring | /SnmpAbstractionTests/OidDatabaseTests.cs | 2.640625 | 3 | using Microsoft.EntityFrameworkCore;
using NUnit.Framework;
using SemVersion;
using SnmpAbstraction;
using System.IO;
using System.Linq;
namespace Tests
{
/// <summary>
/// Tests for the OID database.
/// </summary>
public class OidDatabaseTests
{
/// <summary>
/// The address to us... |
da012205d39a69964745ae23b8f5ef22638eee0b | C# | OSRS/Oncor_Base | /Osrs.Oncor.Excel/Osrs.Oncor.Excel/NumericTypes.cs | 2.640625 | 3 | using System;
using System.Collections.Generic;
namespace Osrs.Oncor.Excel
{
public class NumericTypes : HashSet<Type>
{
public static bool IsNumeric(Type typeUnderTest)
{
NumericTypes test = new NumericTypes
{
typeof(decimal),
... |
faa30364ec4eb06def9367941d31a3a231ee7954 | C# | BenVanZyl/SnowStorm | /src/SnowStorm/RunningAs.cs | 3.109375 | 3 | using System;
using System.Linq;
namespace SnowStorm
{
public static class RunningAs
{
private static bool? _unitTest = null;
/// <summary>
/// If true then the code is running as a unit test.
/// </summary>
public static bool UnitTest
{
get
... |
fe38363e589d5eca4f79fc4d4a9334b5e087d27d | C# | LEvginiaV/CSharp_lessons | /CutWhiteSpace/CutWhiteSpace/Program.cs | 3.515625 | 4 | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace CutWhiteSpace
{
class Program
{
public static void Main()
{
Console.WriteLine(RemoveStartSpaces("a"));
Console.WriteLine(RemoveStartSpaces(" b")... |
d65904381ae20cc310cfb558bd8c249137932184 | C# | akhadake14/CustomObjectComparer_Tavisca_Machine_Test | /ObjectComparer.Tests/ComparerFixture.cs | 2.8125 | 3 | using System;
using System.Collections.Generic;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using ObjectComparer.Tests.TestClasses;
namespace ObjectComparer.Tests
{
[TestClass]
public class ComparerFixture
{
// static readonly IComparerFactory comparerFactory = new ComparerFactory();
... |
908a4e434d121a160189e075e09d23ba3c671e83 | C# | fiahil/MyMediaPlayer | /MyWmp/Models/Library.cs | 2.734375 | 3 |
using System.Collections.ObjectModel;
using System.IO;
using System.Linq;
namespace MyWmp.Models
{
class Library
{
private static Library instance_;
public static Library Instance
{
get { return instance_ ?? (instance_ = new Library()); }
}
public Playlis... |
6707bad1514b950c65dfc921017383c55d77ce6e | C# | louislewis2/innovation | /src/Innovation.ServiceBus.InProcess/Extensions/DictionaryExtensions.cs | 2.9375 | 3 | namespace System.Collections.Generic
{
public static class DictionaryExtensions
{
public static void TryAdd<T, K>(this Dictionary<T, K> dictionary, T key, K value)
{
if (!dictionary.ContainsKey(key))
{
dictionary.Add(key, value);
}
}
... |
47ab6b850ed2d16624485c4006882028d0018f20 | C# | softearth/FacialRecognitionBridge | /FaceClassifier/Normalisation/BlockwiseNormaliser.cs | 3.328125 | 3 | using System;
using System.Linq;
using Common;
namespace FaceClassifier.Normalisation
{
public sealed class BlockwiseNormaliser
{
private readonly int _blockSize;
public BlockwiseNormaliser(int blockSize)
{
if (blockSize <= 0)
throw new ArgumentOutOfRangeException(nameof(blockSize));
_blockSize = b... |
2ec204d21d2ac559171c4bec346abc711decbf54 | C# | 365848719/MyDesignPattern | /Scz.DesignPattern.Singleton/SingleDemo.cs | 2.65625 | 3 | using System;
using System.Collections.Generic;
using System.Text;
namespace Scz.DesignPattern.Singleton
{
/// <summary>
/// 使用内部类+静态构造函数实现延迟初始化
/// </summary>
public class SingleDemo
{
public static SingleDemo GetInstance()
{
return Nested.Instanc... |
be0294bf88be4e20214d6e2e95709a795fb45e8c | C# | dqtoy/Robots-Strikes-back | /Assets/Script/Script base de données/FirebaseManager.cs | 2.71875 | 3 | using UnityEngine;
namespace SimpleFirebaseUnity
{
public class FirebaseManager : MonoBehaviour
{
private static FirebaseManager _instance;
private static object _lock = new object();
#region INSTANCE_LOGICS
public static FirebaseManager Instance
{
... |
0a95b71e33701b097c635486f274ec1d571c0b4a | C# | micro9000/presentations | /Patterns/Current/BehavioralPatternsTests/Command/CommandTests.cs | 2.703125 | 3 | // Copyright Information
// =============================
// BehavioralPatternsTests - CommandTests.cs
// All samples copyright Philip Japikse
// http://www.skimedic.com 20/06/2017
// See License.txt for more information
// =============================
using System.Text;
using BehavioralPatterns.Command;
using Xunit;... |
af7fbe26b22cb35315dbacc67862f97e71171ea7 | C# | Archisto/towncastle | /Towncastle/Assets/Code/Building/ObjectCatalog.cs | 2.59375 | 3 | using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
using Random = UnityEngine.Random;
public class ObjectCatalog : MonoBehaviour
{
private const int FavoriteHexMeshCount = 10;
#pragma warning disable 0649
[SerializeField]
private HexMeshSc... |
e769a4c51a46b7a1956223aab842991513d07c20 | C# | uagg/SoftwareUniversity | /2. Tech Module/Programming Fundamentals/8. Array and list algorithms/Exercise1/SmallestElementInArray/SmallestElementInArray/Program.cs | 3.40625 | 3 | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace SmallestElementInArray
{
class Program
{
static void Main(string[] args)
{
var listOfIntegers = Console.ReadLine().Split(' ').Select(int.Parse).ToList();
... |
9ce5e5e9ca9d292c96efb239d76cbfd6342060cc | C# | Hadi-Fooladi/Utilities | /Http/TimeOutHandler.cs | 2.78125 | 3 | using System;
using System.Net.Http;
using System.Threading;
using System.Threading.Tasks;
namespace HaFT.Utilities.Http
{
public class TimeOutHandler : DelegatingHandler
{
private readonly TimeSpan _timeOut;
public TimeOutHandler(TimeSpan timeOut) => _timeOut = timeOut;
protected override async Task<HttpRe... |
bb3f3837a51f09261fa7b96ead160d609852a59b | C# | Yxbcvn410/LibreUTAU | /LibreUTAU/Core/Audio/Build/NoteCacheProvider.cs | 2.53125 | 3 | using System.IO;
using LibreUtau.Core.ResamplerDriver;
namespace LibreUtau.Core.Audio.Build {
public static class NoteCacheProvider {
private static string UCacheDir = "";
private static int maxCachedNotes = 10000;
public static void SetCacheDir(string cacheDir) {
if (Director... |
b722b8787f7106c700d187864c2e2c658fb84baf | C# | MaximIs-88/MyTracker | /src/MyTracker/Controllers/TasksApiController.cs | 2.75 | 3 | using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
using MyTracker.Data;
namespace MyTracker.Controllers
{
public class TaskDto
{
public int Id { get; set; }
public string TaskName { get; set; }
}
[Produces("application/json")]
[Route("api/taskUpdate")]
... |
c52c38d828c7400506f9c1d11bbbe9ffc0920690 | C# | Viniciusadm/CSharp | /Loja/Entities/ItemDoPedido.cs | 2.90625 | 3 | namespace Loja.Entities {
public class ItemDoPedido {
public int Quantidade { get; private set; }
public double Preço { get; private set; }
public Produto Produto { get; private set; }
public ItemDoPedido(int quantidade, Produto produto) {
this.Quantidade = quantidade;
... |
f88f7af5a567e0f75dbc97a4233586dca8967b76 | C# | kghobadi/Global-Game-Jam-2019 | /Assets/Scripts/General/HouseManager.cs | 2.65625 | 3 | using System.Collections;
using System.Collections.Generic;
using UnityEngine;
//THIS IS MARIE KONDO
public class HouseManager : MonoBehaviour
{
public List<GameObject> rooms = new List<GameObject>();//NOT PREFABS!
public Vector3 pos1, pos2;
void Awake()
{
Shuffle();
//roomIndex = -1... |
3f67d27a39d2217e61e41ec63c3abe63d02829b2 | C# | george-polevoy/TrivialAst | /TrivialAst.Model/AstUnsupported.cs | 2.59375 | 3 | namespace TrivialAst.Model
{
public class AstUnsupported : AstNode
{
public string Explanation { get; set; }
public AstUnsupported(string explanation)
{
Explanation = explanation;
}
public override T Accept<T>(IAstVisitor<T> visitor)
{
... |
e399eab5c5e81f48d4fb5810abf40cf6c828c575 | C# | Alkhan797/BG3ItemExtractor | /StatDataLibrary/Services/StatsFileService.cs | 2.953125 | 3 | using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text.RegularExpressions;
using StatDataLibrary.GameObjects;
namespace StatDataLibrary.Services
{
/// <summary>
/// Service to read and write from the unpacked Stats folder extracted from Baldur's Gate 3 Shared.pak... |
90998fa3d0999e797f0be37c42ab4afdbe6df115 | C# | juanibalaguer/ProyectoFinalAPI | /TerrasoleCabañas/Model/Pedido.cs | 2.703125 | 3 | using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
namespace TerrasoleCabañas.Model
{
public enum estadoPedido
{
Borrador = 0, // El inquilino está armando un pedido
Confirmado = 1,
EnPreparacion = 2,
Entregado = 3
}
public clas... |
0a99d195749b27d12620fd07bf5d2fd5affaee63 | C# | abemby/ContactAddressBook | /CAB.ClassLibrary/AddressBook.cs | 3.375 | 3 | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using CAB.Interface;
namespace CAB.ClassLibrary
{
public class AddressBook : IAddressBook
{
#region " Properties / Data Member "
ILogger _iLogger;
public Countrie... |
496e1bcc8ded36f44eaf50246193b6eeb299da86 | C# | bingliangchan/AuditService | /src/App.Common/Utility/Guard.cs | 3.078125 | 3 | using FluentValidation;
using FluentValidation.Results;
namespace App.Common.Utility
{
public static class Guard
{
public static void NotNull<T>(T value, string name = null) where T : class
{
if (value == null)
throw new ValidationException(new[] { new ValidationFa... |
995482d356e373d6c1e0904e1dadd39d9e82ee09 | C# | AlexShkor/cqrs-pocker-app-example | /src/Poker/Platform/Output/ConsoleWrapper.cs | 2.84375 | 3 | using System;
namespace Poker.Platform.Output
{
public class ConsoleWrapper : IOutputWriter, IInputReader
{
public void Init(Action<string> callback)
{
}
public void Write(string format, params object[] args)
{
Console.Write(format, args);
}
... |
d734237ec001cb45e5491f6bf48481608e2bcf80 | C# | BTDev/MPZelda | /Assets/RoomTest/scripts/playerController.cs | 2.578125 | 3 | using UnityEngine;
using System.Collections;
public class playerController : MonoBehaviour {
public Vector2 position;
public bool isControllable = true;
private Animator animator;
void move(int direction)
{
if (direction == 0)
{
position.y -= 0.2f;
}
... |
e4c3fa433b993832aa6b5f5dbd6bcf929a3418cf | C# | Vphyre/Noteleks_Skeleton_Hunter | /Assets/Scripts/General/PlayerStats.cs | 2.953125 | 3 | using UnityEngine;
public class PlayerStats : MonoBehaviour
{
private int points = 0;
public int _points
{
get{return this.points; }
set{this.points = value; }
}
[SerializeField] private int life = 100;
public int _life
{
get {return this.life; }
set {this.li... |
46b1449f3dda302ceb52a9080351f93986c190a7 | C# | BookerSoftwareInc/saule | /Tests/ApiResourceTests.cs | 2.6875 | 3 | using Saule;
using Xunit;
namespace Tests
{
public class ApiResourceTests
{
private class TestNamingResource : ApiResource
{ }
private class TestNamingResource2 : ApiResource
{ }
private class DisallowIdAttr : ApiResource
{
public DisallowIdAttr()
... |
a87b64f8cfbd142a4ecec4ecfc5e50a3622e3154 | C# | shendongnian/download4 | /code4/705868-56698636-200097901-1.cs | 2.53125 | 3 | e.Control.KeyPress -= new KeyPressEventHandler(Column18qty_KeyPress);
if (dgvProduct.CurrentCell.ColumnIndex == 18) //dgvtxtQty
{
TextBox tb = e.Control as TextBox;
if (tb != null)
{
... |
26caed031e5451c1dfd4d280606ddf18661a0290 | C# | AllenRepo/concepts | /async-await/async-await.console/Program.cs | 2.921875 | 3 | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace async_await.console
{
public class Program
{
static void Main(string[] args)
{
WaitAsync().Wait();
}
static async Task WaitAsync()
... |
b8ab45b5ea283501ba7622f6a41779bca56e75bb | C# | Yarpii/fivemtestserver | /FivemTest/enums/Emote.cs | 2.546875 | 3 | using System;
using System.CodeDom;
using System.Collections.Generic;
using System.Linq;
using System.Security.Policy;
using System.Text;
using System.Threading.Tasks;
namespace FivemTest
{
public static class Emote
{
private static readonly Dictionary<string, string> emotes = new Dictionary<string, s... |
20bf38bdc9ad835d65fcdbdc60a109bf6192f174 | C# | iremgulten/CSharp101Patikasi | /PROJE2_ToDo/Program.cs | 3.640625 | 4 | using System;
namespace PROJE2_ToDo
{
class Program
{
static Board board = new Board();
public static int selection = 0;
static void Main(string[] args)
{
while(selection != 5)
{
Menu();
if (selection < 0 && selec... |
b1c90216b5db105e608ecc22c7afb2afc9d9d2f9 | C# | sachiwhite/sample-client | /sampleserver/Infrastructure/MockTimestampsConverter.cs | 2.640625 | 3 | using System;
using System.Collections.Generic;
namespace sampleserver.Infrastructure
{
public class MockTimestampsConverter : ITimestampsConverter
{
public List<double> ConvertTimestamps(List<DateTime> timestampsToConvert)
{
List<double> convertedTimestamps = new List<double>();
... |
a6c1cb9bfb894d870d0220a651ea6ed03a6c9e9a | C# | Jimy054/Pharmasy | /Pharmacy/DB/Connection.cs | 2.59375 | 3 | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using MySql.Data.MySqlClient;
using System.Windows.Forms;
namespace Pharmacy.DB
{
class Connection
{
public static MySqlConnection MakeConnection()
{
MySqlConnection... |
09762960eb2eadd6aff35e41127b8e94b300eee5 | C# | cgddrd/GoAber | /src/ASP.NET/GoAber/GoAber/Services/ActivityDataService.cs | 2.578125 | 3 | using GoAber.Models;
using GoAber.Models.ViewModels;
using System;
using System.Collections.Generic;
using System.Data.Entity;
using System.Linq;
using System.Web;
namespace GoAber.Services
{
/// <summary>
/// ActivityDataService
///
/// Provides covinence methods used by multiple controllers who wis... |
4de4d787e8ae39f0a7f6366754d638cdfdaf22a7 | C# | KasatkinaMariya/Autocomplete | /Tests/Validation/CorrectnessValidator.cs | 2.671875 | 3 | using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Autocompletter;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using Tests.ProvidingInput;
namespace Tests.Validation
{
class CorrectnessValidator : ValidatorBase
{
public override void Validate... |
68cf5dd8e9391ec65a942b9b33ef91558d20b446 | C# | VijiKrishna3/100_Days_of_Coding | /Day 057 - Easy/Program.cs | 3.828125 | 4 | using System;
using System.Linq;
namespace _100daysCoding
{
class ProgramDay57
{
static void Main(string[] args)
{
Console.WriteLine("Write the stock prices in chronological order: ");
var ins = Console.ReadLine().Split(' ').ToList();
var arr = (from entry i... |
a26a2ee8e511d08c42a1aa39c6c4c8d00bdbd714 | C# | okiwa86/suwonit | /3기/디자인패턴/최현주/SourceCode/Observer_Pattern/Blog.cs | 3.40625 | 3 | using System.Collections;
using System.Collections.Generic;
using UnityEngine;
namespace ObserverPattern.ex3
{
/// <summary>
/// Concrete Subject (구체적인 관찰 대상자)
/// Subject(Blog)는 Observer를 관리하며 등록/해지 메소드를 가지고 있다.
/// </summary>
public class Blog : ISubject
{
private List<IObserver> ob... |
cf7c4319c8e900a227259f61fceece08c80aae08 | C# | tafo/Geeks | /Geeks.Practices/Arrays/Basic/SumTriangle.cs | 3.765625 | 4 | using System;
using System.Collections.Generic;
using System.Diagnostics.CodeAnalysis;
using System.Linq;
using Geeks.Practices.Helper;
namespace Geeks.Practices.Arrays.Basic
{
/// <summary>
/// The title is "Sum Triangle for given array"
///
/// Given a array, write a program to construct a triangle... |
a9fd49c6bebcb75181f775a0ff07e846d9d81214 | C# | PhoenixMobileUserGroup/01.08.19_XamarinEssentials | /XamarinEssentialsDemonstration/XamarinEssentialsDemonstration/ViewModels/GyroscopeViewModel.cs | 2.65625 | 3 | using System.Threading.Tasks;
using Xamarin.Essentials;
namespace XamarinEssentialsDemonstration.ViewModels
{
public class GyroscopeViewModel : ViewModelBase
{
public float AngularVelocityX { get; set; }
public float AngularVelocityY { get; set; }
public float AngularVelocityZ { get; s... |
694d55734220e1702fbc639a277b0ead0fa98b6c | C# | tonyredondo/TWCore2 | /src/TWCore/Net/IpHelper.cs | 2.84375 | 3 | /*
Copyright 2015-2018 Daniel Adrian Redondo Suarez
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to i... |
3654b497ec62ab0f0a12c1cc661e02ec8797acf2 | C# | HamedMousavi/DesktopAppStore | /DomainModel/Repository/Sql/Products.cs | 2.703125 | 3 | using System;
using System.Collections.Generic;
using DomainModel.Entities;
using System.Data.SqlClient;
using System.Data;
namespace DomainModel.Repository.Sql
{
public class Products
{
public static GeneralDatabaseList GetByCategory(string cultureId, int? categoryId, int? parentId, int... |
dfd1f7cda10c313164bda58cb269818b63032e3f | C# | SaberX3/DunStrange-Unity3D | /Assets/game/script/ShadowControl.cs | 2.609375 | 3 | using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class ShadowControl : MonoBehaviour
{
public static ShadowControl instance;
public GameObject shadowprefab;
public int shadowNum;
public Queue<GameObject> usableprojects = new Queue<GameObject>();
void Awake()
... |
48207a10fc713468f512833013bfcddad2188fce | C# | UltraMessaging/UMExamples | /event_q_src/dotnet/event_q_src.cs | 2.5625 | 3 | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using com.latencybusters.lbm;
namespace EventQsrc
{
class EventQsrc
{
static void Main(string[] args)
{
LBMContext ctx = null; /* Context object: container for UM "ins... |
15695e5d3d5f970f178b328c59cfbd6b96c0cd8a | C# | tonyambrus/UAML | /unity/Assets/UAML/Scripts/UX/DependencyProperty.cs | 2.734375 | 3 | using System;
using System.Collections.Generic;
using System.Reflection;
using Uaml.Internal;
namespace Uaml.UX
{
public class DependencyProperty
{
public string Name { get; private set; }
public Type PropertyType { get; private set; }
public Type OwnerType { get; private set; }
... |
abe2cfb2a497d66d19c37480501d496e868c755d | C# | joyozz/Bing.NetCore | /src/Bing.Extensions.Swashbuckle/Attributes/SwaggerResponseHeaderAttribute.cs | 2.78125 | 3 | using System;
namespace Bing.Extensions.Swashbuckle.Attributes
{
/// <summary>
/// Swagger响应请求头,用于标识接口响应请求头参数信息
/// </summary>
[AttributeUsage(AttributeTargets.Method,AllowMultiple = true)]
public class SwaggerResponseHeaderAttribute:Attribute
{
/// <summary>
/// 状态码
//... |
f9f26697814609cedf20bec1cade75eb440b4720 | C# | Sunoone/WhackAMole | /WhackAMoleProject/Assets/Scripts/Score/ScoreTracker.cs | 2.59375 | 3 | using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
public class ScoreTracker : MonoBehaviour
{
#pragma warning disable 649
[SerializeField]
private Text _scoreDisplay;
#pragma warning restore 649
public float Score { get; private set; }
public void R... |
d71c1401f80b8ff3c7a0c4b706f98c715a8b43b2 | C# | nivishree/Phase-2-gui | /BedConfiguration-final/DischargePatientModuleLib/DischargePatientViewModel.cs | 2.65625 | 3 | using MVVMUtilityLib;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Net.Http;
using System.Net.Http.Headers;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using System.Windows.Input;
namespace DischargePatientModuleLib
{
... |
3804767fefd6aa25131780ffe021c3062ea21086 | C# | yavoryankov83/C_Sharp_Programming_Basics | /Loops/Trailing0InN/Trailing0InN.cs | 3.609375 | 4 | using System;
using System.Numerics;
class Trailing0InN
{
static void Main(string[] args)
{
int n = int.Parse(Console.ReadLine());
BigInteger factorial = 1;
int zeros = 0;
for (int i = 1; i <= n; i++)
{
factorial *= i;
}
while(factorial % 1... |
7a6a244380280bf4078740f02e9f5ac931a0142a | C# | VTanchereau/ContactManager | /ExercicesPOO/Validateurs/ValidateurPhoneNumber.cs | 2.703125 | 3 | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Text.RegularExpressions;
using System.Threading.Tasks;
namespace ExercicesPOO.Validateurs
{
class ValidateurPhoneNumber : Validateur
{
public override bool Validate(String str)
{
String pa... |
b3ae1b2127d6a4f600002e2a0b15768fd9e7fbea | C# | victerr/Examen | /10b/Ficheros y Directorios/ComandanteNorton/Explorador.cs | 3.34375 | 3 | using System;
using System.IO;
namespace ComandanteNorton
{
class Explorador
{
int lineaInicial;
int lineaFinal;
int lineaActual;
string[] listaFicheros;
public Explorador()
{
lineaInicial = 0;
lineaFinal = 23;
}
public ... |
cbb7b8abef03dedbb77eaed5c06e3addc3a415fc | C# | FanZhangSX/XEProgrammingExercise | /XEProgrammingExercise.Test/TestProductsOfTerminal.cs | 2.6875 | 3 | using System;
using System.Collections.Generic;
using System.Text;
using NUnit.Framework;
using XEProgrammingExercise.Terminal;
namespace XEProgrammingExercise.Test
{
class TestProductsOfTerminal
{
ProductsOfTerminal terminal = null;
[SetUp]
public void Setup()
{
te... |
0a18bb95b8bf717947f7ec6ff374a623282cc04c | C# | aquamoth/Mantex.Flow4 | /Mantex.Flow4.Entities/ScanlineBuilder.cs | 2.5625 | 3 | using Flow4.Entities.Base;
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Flow4.Entities
{
public class ScanlineBuilder : Builder<IScanline>, IScanline, IPoolable
{
public byte[] Pixels { get; priv... |
ed717718d5b50fe70bdf398451cadb0c44961533 | C# | Rohan12UC21/WU-APP | /UpdateHistory/Models/SeedData.cs | 2.546875 | 3 | using Microsoft.EntityFrameworkCore;
using Microsoft.Extensions.DependencyInjection;
using System;
using System.Collections.Generic;
using System.Linq;
namespace UpdateHistory.Models
{
public static class SeedData
{
public static void Initialize(IServiceProvider serviceProvider, List<bool> selServers)... |