Datasets:

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
156df2fde6f4af9898f350b99615121c82757867
C#
luosandong/Lushu
/CommonDal/SqlGenerator.cs
2.984375
3
using System; using System.Collections.Generic; using System.Linq; using System.Reflection; using System.Text; namespace CommonDal { public interface ISqlGenerator { string Insert<T>(T model); string Update<T>(T model); string Get(Type type); string Delete<T>(T model); ...
ecfe6efae313ba423eab86ee475c68d08fe1a6b5
C#
IsaacGutierrez/SearchMyHome
/SearchMyHome/SearchMyHome/Models/Validators/EmailDuplicatedAttribute.cs
2.890625
3
using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.ComponentModel.DataAnnotations; using SearchMyHome.DataAccess; namespace SearchMyHome.Models.Validators { public class EmailDuplicatedAttribute:ValidationAttribute { private string _emailToValidate; ...
8c0c445dbcc46b36e264639cc8de25895af5ddc2
C#
SaschaDoe/HowToSoftwareDevelopment
/Katas/SumOfDigitsKata/SumOfDigitsKataTests/UnitTests/SumOfDigitsExtensionTests.cs
2.9375
3
using SumOfDigitsKata; using Xunit; namespace SumOfDigitsKataTests { public class SumOfDigitsExtensionTests { #region SumOfDigits [Fact] [Trait("Category", "Unit")] public void Zero() { Assert.Equal(0,0.SumOfDigits()); } [Fact] [Trai...
ba9e689e99e4fc43f7478de9422d715068ab4011
C#
kovacsgaborab/Telekocsi_Form
/Telekocsi_Form/Auto.cs
2.609375
3
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace Telekocsi_Form { class Auto { public string Indulas { get; set; } public string Cel { get; set; } public string Rendszam { get; set; } public string Tel...
dac15c67392d1ddb3b2181fd85576db0cd9c27d0
C#
Game-Folk/BrackeysJams2021.1
/BrackeysJam2021.1/Assets/Scripts/MonkeySpawner.cs
2.765625
3
using System.Collections; using System.Collections.Generic; using UnityEngine; public class MonkeySpawner : MonoBehaviour { [SerializeField] private bool spawnOnATimer = false; [SerializeField] private float secondsPerSpawn = 1f; [SerializeField] private int numToSpawn = 3; [SerializeField] private Ga...
5f4f8ead5844d00ce7a4b1c5f28d0107e2416a36
C#
nirdobovizki/MvvmMonkey
/MvvmMonkey.Wpf/MvvmMonkey.Wpf/ViewLocator.cs
2.59375
3
using System; using System.Collections.Generic; using System.Linq; using System.Reflection; using System.Text; using System.Threading.Tasks; using System.Windows; using System.Windows.Controls; namespace NirDobovizki.MvvmMonkey { public static class ViewLocator { public static void RegisterViews(Res...
fe0f3665c0a5309d478c371bc0c8598dbe807275
C#
kazenetu/WinHttpConnectJsonLib
/ASPdotNETCore2/Domain/Service/ServiceBase.cs
2.859375
3
namespace Domain.Service { /// <summary> /// サービスクラスのスーパークラス /// </summary> public class ServiceBase { #region クラス定数 /// <summary> /// 1ページあたりのレコード数 /// </summary> protected const int PageCount = 20; /// <summary> /// 更新結果 /// </summary> public enum UpdateResult { ...
b6941f78c46892e6cfc6c087bd125a1a68dbc58f
C#
Ivan-Dimitrov-bg/.Net-framework
/03.C# OOP/02.Defining Classes 2/DefineClass/Point3D.cs
4.21875
4
using System; struct Point3D { private static readonly Point3D pointZero = new Point3D(0, 0, 0); public double X { get; set; } public double Y { get; set; } public double Z { get; set; } public Point3D(double x, double y, double z) : this() { ...
9debf218eaa39d22d1d20e86e9f521e2ad76ba5f
C#
LalitAkRadadiya/trainingAssigment
/Web API - Hotel Management System/System/HMS.Entities/MapEntities.cs
2.515625
3
using AutoMapper; using HMS.Data.Model; using HMS.Entities.ViewModel; using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace HMS.Entities { class MapEntities { public KeyValuePair<Hotel, HotelViewModel> MapDealerViewModel() ...
855f17a050489028dcba6e716b4af94d8d80f892
C#
frogconn/Hospital
/DataAccessor/Accessor/PatientAccessor.cs
2.765625
3
using BLToolkit.Data; using BLToolkit.DataAccess; using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace DataAccess { public class PatientAccessor { public List<Patient> FindAll() { using (var db = new DbManager()) { ...
0cdda85a392d607d67a93263fda22cc8cc721a9f
C#
shendongnian/download4
/code9/1699260-48791400-166890526-2.cs
2.671875
3
using UnityEngine; public class FormShifting : MonoBehaviour { public GameObject myObject1; public GameObject myObject2; int high; void Update () { if (Input.GetKeyDown(KeyCode.UpArrow) && high == 0) { myObject1.SetActiv...
584b12685da758f76520137d3d81c19fe7834b93
C#
RadSt/Essentials
/Lesson8/Task3/Task3/Program.cs
2.921875
3
using System; namespace Task3 { internal class Program { private static void Main(string[] args) { Console.WriteLine("Введите кол-во часов"); var hours = Convert.ToInt32(Console.ReadLine()); var accauntant = new Accauntant(); if (accauntant.As...
b48bea07d3ae6e43814d9738d29f2d6d6d208a50
C#
maxmind/MaxMind-DB-Reader-dotnet
/MaxMind.Db/Metadata.cs
2.546875
3
#region using System; using System.Collections.Generic; #endregion namespace MaxMind.Db { /// <summary> /// Data about the database file itself /// </summary> public sealed class Metadata { /// <summary> /// Construct a metadata object. /// </summary> /// ...
1c349d7066209772f6cac9d2a697f87804ec25db
C#
adin10/MistralIntership-EmployeeManager
/EmployeeManager.Common/FileUploadHelper.cs
2.765625
3
using Microsoft.AspNetCore.Http; using System.IO; using System.Net.Http.Headers; using System.Threading.Tasks; namespace EmployeeManager.Common { public class FileUploadHelper { public static async Task<string> Upload(IFormFile file, string rootPath) { var folderName = Path.Combin...
64a2cca8dc3851e3487d13fd0579125ba380d6ba
C#
saerich/RaiderZ-Evolved-SDK
/CommonLibraryNET/0.9.6/Examples/Example_Cryptography.cs
2.875
3
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.IO; using System.Data; using System.Data.Common; using System.Security.Cryptography; using ComLib.Entities; using ComLib.Account; using ComLib; using ComLib.Cryptography; using ComLib.Application; namespace ComLib.Sam...
463725c27bee30aa0bceb5468c664f59decf4066
C#
funwie/Checkout.PaymentGateway
/src/PaymentGateway.Domain/ValueObjects/Address.cs
2.8125
3
using PaymentGateway.SeedWork; using System.Collections.Generic; namespace PaymentGateway.Domain.ValueObjects { public class Address : ValueObject<Address> { public string HouseNumber { get; } public string Line1 { get; } public string Line2 { get; } public string City { get; }...
97508efe634edb64ffe45ff44e76fd17b27bf06c
C#
marcussacana/MangaUnhost
/MangaUnhost/Styles.cs
2.515625
3
using System; using System.Drawing.Text; using System.Drawing.Drawing2D; using System.ComponentModel; using System.Windows.Forms; using System.Drawing; using System.Collections.Generic; #region Global Functions/ Subs/ Enums internal static class DrawHelpers { public static GraphicsPath RoundRectangle(Rectangle R...
82037de98facf53dc172f2ea57708624072fffbe
C#
denisb1/mono-studentska-praksa
/Day6/Day6.Service/CourseService.cs
2.734375
3
using System; using System.Collections.Generic; using System.Linq; using System.Linq.Expressions; using System.Threading.Tasks; using AutoMapper; using Day6.DAL; using Day6.Models.DTO; using Day6.Models.REST; using Day6.Repository; namespace Day6.Service { public class CourseService : IGenericService<CourseRest> { ...
b148c3a4505613004c0bd955661ebb9d42ac7d34
C#
davidwhitney/CodingGamePen
/CodingGamePenCore/ThereIsNoSpoon.cs
2.921875
3
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using CodeingGamePen.Fakes; using NUnit.Framework; namespace CodeingGamePen { [TestFixture(Explicit = true)] public class ThereIsNoSpoon { public static FakeConsole Console { get; se...
6f9c92a210718a4e77ed98069b25f07e33aecf60
C#
SenkoVlad/c_sharp_mysql
/Report.cs
2.625
3
using MySql.Data.MySqlClient; 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 Forms { public partial class Report : Form ...
c3d7cd3dd775d04b16c477961ef14be0d68b3b72
C#
CamdenBoBamden/FFDungeonGame
/Game/Components/Monster.cs
2.984375
3
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace Components { public class Monster : Character { public int XPDrop { get; set; } public int GoldDrop { get; set; } public Monster(string name, in...
a8ac53ffba33c544be44b4dd063c10b16f4a595a
C#
bmsimons/huecli
/Preferences.cs
2.96875
3
using System; using System.IO; using System.Text; using System.Runtime.InteropServices; namespace huecli { public class Preferences { public string PreferencesFile { get; set; } public string PreferencesString { get; set; } public FileStream fs { get; set; } public Preferences(...
3ede0a951f3b4e876bd2b13045f5bc611f63840b
C#
Avokadoen/shipwrecked
/Assets/ProjectAssets/Equipment/Common/Scripts/OABulletPool.cs
2.71875
3
using System.Collections.Generic; using System.Linq; using UnityEngine; public class OABulletPool : MonoBehaviour { [SerializeField] [Tooltip("Size of the pool")] [Range(1, 200)] private int size = 50; [SerializeField] [Tooltip("Max allowed size of the pool")] private int maxSize = 200; ...
177826da718e982be5328c5f020620d41cbc1dd2
C#
sjha8169/repos
/TwitterApiConsumer/TwitterApiConsumer.Base/Service/SampledStreamService.cs
2.640625
3
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using TwitterApiConsumer.Base.Store; using TwitterApiConsumer.Base.Client; using Newtonsoft.Json; using TwitterApiConsumer.Base.JsonObjects; using TwitterApiConsumer.Base.Model; using System.Text.Regular...
ffc35085238d5e133a9d52cc95af0a46fcd4df87
C#
mike1d1/algo-and-data-structures
/Sorting/Bubble.cs
4.03125
4
namespace Sorting { class Bubble { public static void Bubblesort(int[] arr) { for(int i = 0; i<arr.Length; i++) { for(int j = arr.Length-1; j>i; j--) { if(arr[j] < arr[j-1]) { ...
bb8f433aaf2f2ef5ab8950bc46f5de0e66f1a8e3
C#
Gab-km/Funcy
/Funcy/Future/MaybeTC.cs
2.734375
3
using System; using System.Collections; using System.Collections.Generic; using Funcy.Future.Computations; using Funcy.Patterns; namespace Funcy.Future { public abstract class MaybeTC<T> : IStructuralEquatable, IStructuralComparable, IComputableTC<MaybeTC, T> { public abstract bool IsSome { get; } ...
b250e882ebd3a30c7138bcd5b7be67c82a23c545
C#
Aeris94/LearningCsharp
/DelegatesAndEvents/GenericDelegates.cs
3.796875
4
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace Program { public delegate T2 Calc<T1, T2>(T1 a, T1 b); class Program { public static int RectArea(int a, int b) { return a * b; } publi...
8bad492ded3f08325afb0fe3caaf20bd5bce1df5
C#
leighmckenna/GDAPS1
/Abstraction/Abstraction/Drgn.cs
3.21875
3
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace Abstraction { public abstract class Drgn { protected Random rng; protected string name; public string Name { get { return name; } } protected int health; public int Health ...
cf52049e9876a3b49f84a7483f279b4b51b23199
C#
alagalia/CSharp-OOP-Advanced-New
/Generics/Generic/03.GenericBoxInteger/BoxInteger.cs
3.8125
4
namespace _03.GenericBoxInteger { using System; public class BoxInteger { public static void Main() { int n = int.Parse(Console.ReadLine()); for (int i = 0; i < n; i++) { var line = int.Parse(Console.ReadLine()); Console.W...
baf6cebdcc9caad9228a04d59e5929542df23aba
C#
jamdmasud/PharmacyDesktopApplication
/PharmacyDesktopApplication/UI/MedicineEditForm.cs
2.640625
3
using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Data.Entity.Migrations; using System.Drawing; using System.Globalization; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows.Forms; using PharmacyDesktopApplication.Entitie...
9116ee75a502261645646956a16567b283dff4a0
C#
brann0n/StendenKoffieMachine
/KoffieMachineBot/Program.cs
2.625
3
using Discord; using Discord.WebSocket; using System; using KoffieMachineBot.Modules; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using Discord.Commands; using Microsoft.Extensions.DependencyInjection; using System.Net.Http; using System.Reflection; namespace ...
f9ecff336287da18670ae793040bd221af49a39a
C#
piotr-pierzgalski/PrimeCounterAPI
/PrimeCounterAPI/Controllers/PrimeCounterController.cs
2.59375
3
using System.Threading.Tasks; using Commands.CreatePrimeCounter; using Commands.DeletePrimeCounter; using Commands.IncrementPrimeCounter; using MediatR; using Microsoft.AspNetCore.Mvc; using Queries.GetPrimeCounter; namespace PrimeCounterAPI.Controllers { [Route("api/[controller]")] [ApiController] public...
13d82dea1f10bdb7521660963c88b5716344eab2
C#
WojcikMikolaj/GraphsLibrary
/GraphLibrary/GraphExtenders/SpanningTreeExtenders/BoruvkaExtender.cs
2.875
3
using GraphLibrary.DataStructuresClasses; using GraphLibrary.ExceptionClasses; using System.Collections.Generic; namespace GraphLibrary.GraphExtenders.SpanningTreeExtenders { public static class BoruvkaExtender { public static (bool connected, Graph tree) Boruvka(this Graph g) { i...
7ef9924d2fa8596aa6b6bb1c7a7d867eec3c6d44
C#
vesopk/TechModuleExtended-Exercises
/SimpleArrayProcessing/MultiplyArrayOfDouble/MultiplyArrayOfDouble.cs
3.46875
3
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; class MultiplyArrayOfDouble { public static void Main() { var numbers = Console.ReadLine().Split(' ').Select(double.Parse).ToArray(); var numberToMultiply = double.Parse(Console...
9743f10e7fb2f98f026b4e8a82603b8a9b1c80bc
C#
horizongir/ode.net
/Ode.Net/Joints/JointFeedback.cs
2.796875
3
using Ode.Net.Native; using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace Ode.Net.Joints { /// <summary> /// Represents a data object that stores the feedback forces applied by /// a joint on its connected bodies. //...
6cc462f0568fa13e2fff11dfc4205c044107fd71
C#
robpocko/JobLogger
/JobLogger.API/Model/CodeBranchAPI.cs
2.578125
3
using JobLogger.DAL; using System.Collections.Generic; using System.Linq; namespace JobLogger.API.Model { public class CodeBranchAPI : APIBase { public string Name { get; set; } public List<CheckInAPI> BranchCheckIns { get; set; } public static CodeBranch To(CodeBranchAPI it...
fcf00e00da1ddb44272d37c0eaac6c0060a157d6
C#
gruntwurk/text-data-simplifier
/PageProfile.cs
2.765625
3
using System; using System.Collections.Generic; using System.Linq; using static GruntWurk.QuickLog; using static GruntWurk.NumberUtils; using static GruntWurk.StringUtils; namespace GruntWurk { /// <summary> /// Describes a paginated data file (aka a "line printer report"), including specifications for the pa...
464768490c596d27eaf6902c2606c688261a491a
C#
danbarua/Grasp
/Source/Grasp/Compilation/CalculationCycleException.cs
2.75
3
using System; using System.Collections.Generic; using System.Collections.ObjectModel; using System.Diagnostics.Contracts; using System.Linq; using System.Text; namespace Grasp.Compilation { /// <summary> /// Indicates a set of calculations contains a cycle /// </summary> public class CalculationCycleE...
7e64b3de91af43be77514ca702860cf7fbaf1239
C#
hboesendorfer/AgOpenGPS
/SourceCode/GPS/Forms/FormShiftPos.cs
2.53125
3
using System; using System.Windows.Forms; namespace AgOpenGPS { public partial class FormShiftPos : Form { //class variables private readonly FormGPS mf = null; public FormShiftPos(Form callingForm) { //get copy of the calling main form mf = callingForm...
0abf6382b8947ad74dab6640df2e7ae009a180b4
C#
Phamotx/Tag-game
/Tagged/Assets/Scripts/Controller.cs
2.546875
3
using System.Collections; using System.Collections.Generic; using UnityEngine; [RequireComponent(typeof(BoxCollider2D))] public class Controller : MonoBehaviour { [SerializeField] private LayerMask collisionLayer; const float widthOfSkin = 0.020f; [SerializeField] private int horizontalRayCount = 4...
eceafed551ea3ac1d8da3731b3ecd77d5c13d876
C#
juanramon89/rad
/PArticulo/PArticulo/Main.cs
2.9375
3
using System; using MySql.Data.MySqlClient; using System.Data; using Pserpis; namespace PArticulo { class MainClass { public static void Main (string[] args) { string connectionString = "Server=localhost;" + "Database=dbrepaso;" + "User Id=root;" + "Password=sistemas"; MySqlConnection m...
dcabecc631fd96257eae190c1155d5fd1bffed4a
C#
rachel2386/CodeLab1Final
/CodeLab1Final/Assets/GameManager.cs
2.75
3
using System; using System.Collections; using System.Collections.Generic; using TMPro; using UnityEngine; public class GameManager : MonoBehaviour { public int gameTimeInSeconds = 30; private float timeInSeconds; public static int gameState = 0; private int gameOverState = 1; private int winState...
a66696ee655cf4aa10f9b497ed27344ca6bd2177
C#
frobnic/0xA2Switch
/0xA2Switch/Program.cs
3.390625
3
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace _0xA2Switch { class Program { static void Main(string[] args) { char c; Console.Write("Bitte antworten Sie!!!"); c = Console.ReadKe...
3de9c015aa0e360b39f2ab9254609a1b70e0d523
C#
Ghasem313/GroupAssignments2
/GroupAssignment2/PlayingCard.cs
3.625
4
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace GroupAssignment2 { public enum PlayingCardColor { Clubs = 0, Diamonds, Hearts, Spades // Poker suit order, Spades highest } public enum PlayingCardValue { Two = 2, Three, Four...
0d27d7ac64e8baad0044e5479bea05af9d9b449e
C#
gregolsky/Glimpse.RavenDb
/Glimpse.RavenDb.Tests/JsonTests.cs
2.703125
3
using System; using System.Collections.Generic; using System.IO; using Xunit; namespace Glimpse.RavenDb.Tests { public class JsonTests { private RavenDbTab tab = new RavenDbTab(); [Fact] public void CanHandleNonJson() { var result = tab.ParseJsonResult("The server ...
c1644254be1fcf5417cc55a44bfee268f90d1d97
C#
EmPCoder/CSharpPlayground
/Arrays/ForeachProgram.cs
3.953125
4
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace Arrays { class ForeachProgram { //static void Main(string[] args) //{ // int[] nums = new int[10]; // // 0 -> 0 // // 1 -> 1 ...
21f82b6d646ac837951a78f9ef930ac84e6998c4
C#
RodrigoHBD/.NET-CORE-Plataforma-Omega
/MercadoLivreService/HttpClient/HttpClient.cs
2.53125
3
using System; using System.Collections.Generic; using System.ComponentModel.DataAnnotations; using System.Linq; using System.Threading.Tasks; namespace HttpClientLibrary { public class HttpClientLib { public static async Task<DataType> Get<DataType, ErrorType>(GetRequest req) { try { ...
dd10ac309252cfcea4fa6a0748268cc20fd5a839
C#
Lxp5970/z3s
/ZZZS/XS/xs/Common/MD5Helper.cs
2.96875
3
using System; using System.Collections.Generic; using System.Configuration; using System.IO; using System.Linq; using System.Security.Cryptography; using System.Text; using System.Threading.Tasks; namespace Common { public class MD5Helper { /// <summary> /// MD5加密 /// </summary> ...
872031549f10ca47a48e7e0585d96796dd542f5c
C#
CatherinePD/OOP-labs
/Lab7/Lab7/Exceptions/NegativeArgumentException.cs
2.921875
3
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace Lab7.Exceptions { public class NegativeArgumentException : ArgumentException { public NegativeArgumentException() :base("Аргумент не может быть меньше нуля") ...
11d733da970f54dd03a2330e0c8da093de4b1bdb
C#
bambom/URPACT
/Assets/ACT/Script/Action/Data/AnimSlot.cs
2.59375
3
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Xml.Serialization; using System.ComponentModel; namespace Data { [Serializable] public class AnimSlot { const String ANIM_CATEGORY = "动画设置"; String mAnimation = ""; [XmlAttribute("An...
1d2f7829865dcac2dcba087f5719b57f2c476028
C#
lyakyb/Reminderer
/Reminderer/Repositories/ScheduleRepository.cs
2.96875
3
using System; using System.Collections.Generic; using System.Data; using System.Linq; using System.Text; using System.Threading.Tasks; using Reminderer.Framework; using Reminderer.Models; namespace Reminderer.Repositories { public class ScheduleRepository : IScheduleRepository { private readonly IData...
460e56fe16d0e9ac43bd96ceb0f3e0710efcc643
C#
Pathoschild/smapi-mod-dump
/source/~Shockah/ProjectFluent/PublicAPI/IFluentApi.cs
2.59375
3
/************************************************* ** ** You're viewing a file in the SMAPI mod dump, which contains a copy of every open-source SMAPI mod ** for queries and analysis. ** ** This is *not* the original file, and not necessarily the latest version. ** Source repository: https://github.com/Shockah/Stardew-...
67160fcd386560acfd5319fd5fff5baf4702e0a8
C#
ArturoMora/SIGCOFOO
/INEEL.DataAccess.GEN/Repositories/CH/DetalleEvaluacionConductualesRepository.cs
2.640625
3
using INEEL.DataAccess.GEN.Contexts; using INEEL.DataAccess.GEN.Models.CH; using System; using System.Collections.Generic; using System.Data.Entity; using System.Linq; using System.Text; using System.Threading.Tasks; namespace INEEL.DataAccess.GEN.Repositories.CH { public class DetalleEvaluacionConductualesReposi...
8b5d67f7f969ac98d78889ab1c083b3fce7840e8
C#
slimi00/statbus
/src/nscreg.Server.Common/Models/DataSources/DataSourceVm.cs
2.5625
3
using System.Collections.Generic; using nscreg.Data.Entities; namespace nscreg.Server.Common.Models.DataSources { /// <summary> /// View data source model /// </summary> public class DataSourceVm { private DataSourceVm(DataSource item) { Id = item.Id; Name = ...
c636e638e585e9fa78e2ac89d33bfff062d83a11
C#
zhangsai521314/StudyLog4net
/StudyLog4net/Program.cs
2.6875
3
using System; using System.Collections.Generic; using System.Data; using System.Linq; using System.Reflection; using System.Text; namespace StudyLog4net_File { /// <summary> /// 此App.config是按日期分割日志,一天记录是一个文件 /// </summary> class Program { static void Main(string[] args) { ...
9dfcc2a187ac8d4db79e9fa1097f3297c3fa43b5
C#
savras/other-coding-problems
/leetcode/Easy/575. DistributeCandies.cs
3.421875
3
public class Solution { public int DistributeCandies(int[] candies) { var len = candies.Length; var half = len / 2; var hs = new HashSet<int>(); for(var i = 0; i < len; i++) { if(!hs.Contains(candies[i])){ hs.Add(candies[i]); } ...
e1d461e9b0df379a7255aa594951ca1542e6fe8e
C#
IvayloNikolov36/UrbanSolution
/UrbanSolution.Data/MigrationHelpers/ProcedureHelpers.cs
2.59375
3
namespace UrbanSolution.Data.MigrationHelpers { using Microsoft.EntityFrameworkCore.Migrations; public static class ProcedureHelpers { public static void CreateAssignUserToRoleProcedure(MigrationBuilder builder) { builder .Sql(@"CREATE PROC [dbo].AssignUserToRole @userId NV...
aeab0fc99d5d354b17bfd95c7e24a1c233f71b2d
C#
nebtrx/hypertimer
/HyperTimerTest/Program.cs
3.15625
3
using System; using System.Threading; using System.Timers; using System.Timers.Providers; namespace HyperTimerTest { class Program { private static TimeSpan _total; static void Main(string[] args) { HyperTimer .Configure() .Us...
c4a51e6da82491a4d7bef417645baf88e7329248
C#
neehouse/IISLogAnalyzerSiteExtension
/WebAnalytics/Models/Metrics/MetricParameter.cs
3.046875
3
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace WebAnalytics.Model.Metrics { public struct MetricParameter { //Interesting. The jsonConvert needs these variables to be public to serialize them successfully, if they are priva...
8cc003c940e6a8560b1bfe7fc942d5d9924d5c9d
C#
JonaJ23/WPF-projekt
/Store/RegisterWIndow.xaml.cs
2.765625
3
using System; using System.Collections.Generic; using System.Text; using System.Windows; using System.Windows.Controls; using System.Windows.Data; using System.Windows.Documents; using System.Windows.Input; using System.Windows.Media; using System.Windows.Media.Imaging; using System.Windows.Shapes; using DatabaseConne...
f914a0dd7d32089b4f2444cab9a503cbf189dc8d
C#
junyong-tsui/csharpexamples
/src/IISServer/MyAspxPage.cs
2.671875
3
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace IISServer { /// <summary> /// 我的aspx页面 /// </summary> public class MyAspxPage:IHttpHandler { /// <summary> /// /// </summary> /// <param na...
257ec4ae457ca73324edc3ae5f1cb4bdd65bcb19
C#
jayscope/GameWork.Core
/GameWork.Core.States/Event/EventStateTransition.cs
3.109375
3
using System; namespace GameWork.Core.States.Event { public abstract class EventStateTransition { internal event Action<string, object> EnterStateEvent; internal event Action<string> ExitStateEvent; /// <summary> /// Called when the transition is being Entered. /// Override and add yo...
4cb7cc70440f6ab33e024b5e68fc4555e04c24dc
C#
Killercodes/nExtensions
/Object/ObjectBase.cs
3.234375
3
public class ObjectBase { /* Person p = new Person(); p["FirstName"] = "addressline2"; p["AddressLine1"] = "bangalore"; p["AddressLine2"].dump(); */ private void Set(string propname,object value) { if(this.GetType().GetProperties().Where(_ => _.Name == propname).Any()) { var prop = this.GetType().G...
67ad5528cabf089238c364091cd66c3b72a1484f
C#
AlexanderSilvaB/BT-Designer
/Behavior Tree Designer/ParallelNode.cs
2.546875
3
using Behavior_Tree_Designer.Properties; using System; using System.Collections.Generic; using System.Drawing; using System.Linq; using System.Text; using System.Threading.Tasks; namespace Behavior_Tree_Designer { [Serializable] public class ParallelNode : Node { public ParallelNode() : base(NodeT...
0140b03b25d51c20db416bf43fb2c7bd8b839a09
C#
fadi426/ProfileApplicationAPI
/ProfileApplication/ProfileApplication/Models/Scraper/ImgScraper.cs
3.203125
3
using System; using System.Collections.Generic; using System.Linq; using HtmlAgilityPack; namespace ProfileApplication.Helpers.Scraper { public class ImgScraper : Scraper { public ImgScraper(string url, string className) { this.Url = url; this.ClassName = className; ...
abc26ccd9719262926db2401ec6a06eeadc03d5d
C#
zhenyaracheva/TelerikAcademy
/OOP/Homeworks/DefiningClassesPart1/GSMTaskMain/Call.cs
3.4375
3
namespace GSMTaskMain { using System; using System.Text; public class Call { private DateTime dateTimeCall; private Contact dialedPhoneNumber; private double duration; public Call(DateTime currentDateTime, Contact currentContact, double currentDuration) { ...
15375d7a592c262b0030df80dfdcb92834e85dcc
C#
LaurenDeveloper/SharedKernel
/src/Infrastructure/Caching/DistributedCacheHelper.cs
2.5625
3
using Microsoft.Extensions.Caching.Distributed; using SharedKernel.Application.Caching; using SharedKernel.Application.Serializers; using System; using System.Threading; using System.Threading.Tasks; namespace SharedKernel.Infrastructure.Caching { internal class DistributedCacheHelper : ICacheHelper { ...
8a32268af66da4bb6e07417e988cce71f6cd5fc5
C#
dmitrynovik/Boggle
/MORF.Solution/ArrayExtensions.cs
3.3125
3
using System; using System.Linq; namespace MORF.Solution { public static class ArrayExtensions { public static int[] GetMostCommonElements(this int[] array) { if (array == null) throw new ArgumentNullException("array"); var countedElements = array.GroupBy(a ...
480b930069b8ff2e9f8d65a7b2bbc12904958372
C#
jmbillings/KataGameOfLife
/GameOfLifeKata/StringGameOutput.cs
3.125
3
using System; using System.Text; namespace GameOfLifeKata { public class StringGameOutput : IGameOutput { public string OutputGameGrid(bool[,] gameGrid) { var gridStringBuilder = new StringBuilder(); for (var rowIndex = 0; rowIndex < gameGrid.GetLength(0); rowIndex++) ...
a7879fb3effc50b937fab0b81ce074190f24e9bf
C#
Greevis/WebroomsSyncApp
/RhsSync/clsRhsGuest.cs
2.828125
3
using System; using System.IO; using System.Text; namespace RhsSync { /// <summary> /// Summary description for clsRhsGuest. /// </summary> public class clsRhsGuest : clsBase { /// <summary> /// Initialiser /// </summary> public clsRhsGuest() { } #region Publicly Exposed Variables // public struc...
04c1b17d651fd7690c4a811f1efd158c7f39aab2
C#
InariFox/Sunlight
/Sunlight/Sunlight/Common/Timer.cs
3.46875
3
using System; namespace Sunlight.Common { class Timer { private int time; private DateTime dt; // 加算時間をセット(分) public void setTime(int time) { this.time = time; } // 時間計算 public void calcTime() { dt = DateTime.Now...
610a79f2fb611ea34048982942d87d4d1df8debd
C#
webmasterdevlin/ThemeConverter
/ThemeConverter/ColorCompiler/CategoryCollectionRecord.cs
2.859375
3
// Copyright (c) Microsoft Corporation. // Licensed under the MIT License. using System; using System.IO; using System.Collections.Generic; using System.Text; namespace ThemeConverter.ColorCompiler { /// <summary> /// Reads or writes a sequence of category records from a binary stream. /// A CategoryColl...
8eb478970142ec68c8ebc622b34dc89a2ee3ffeb
C#
OsmSharp/core
/src/OsmSharp/Extensions.cs
2.671875
3
// The MIT License (MIT) // Copyright (c) 2016 Ben Abelshausen // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Software without restriction, including without limitation the rights // to use, co...
9fbb8ef38f74b5e09aa1f2de3fc04816acd47615
C#
286studio/Sim286
/AVG/Assets/Naninovel/Editor/EditorResources.cs
2.578125
3
// Copyright 2017-2020 Elringus (Artyom Sovetnikov). All Rights Reserved. using System.Collections.Generic; using System.Linq; using System.Reflection; using UnityEditor; using UnityEngine; namespace Naninovel { /// <summary> /// Stores resource path to editor asset GUID map that is required by <s...
9776bffa5460b744c9e9db782b017e0f153f374f
C#
guilhermeCoutinho/Unity-Ballz
/Assets/Scripts/GamePlay/BallHolder.cs
2.734375
3
using System.Collections; using System.Collections.Generic; using UnityEngine; public class BallHolder : Singleton<BallHolder> { public GameObject ballPrefab; [Range (0,1)] public float fireRate; List<Ball> ballList = new List<Ball> (); List<Ball> ballsInPlay = new List<Ball> () ; bool waitingForFirstBallToA...
3591525270b494021ced2c714494bd8ee74fcccb
C#
valentinacomerci3/week5test
/Week5.LIbrettoADO/Repositories/RepositoryEsame.cs
3.0625
3
using System; using System.Collections.Generic; using System.Data; using System.Data.SqlClient; using System.Linq; using System.Text; using System.Threading.Tasks; using Week5.LibrettoADO.Entities; namespace Week5.LibrettoADO.Repositories { public class RepositoryEsame : IRepositoryEsame { const strin...
990f579216bcbd5ae21d87a257b0b030d707a434
C#
vietnh/Binhyencd
/RealMusic/Utils/StringHelper.cs
3.234375
3
using System.Globalization; using System.Linq; using System.Text; namespace RealMusic.Utils { public static class StringHelper { public static string RemoveDiacriticsAndLowerCase(this string str) { if (str == null) return null; var chars = from c in str....
5de966f81eb3411d216bea466f798ac5b223da90
C#
jackmott/image-evolver
/GameLogic/GifExport.cs
3.203125
3
using System; using System.IO; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using SixLabors.ImageSharp; using SixLabors.ImageSharp.Formats.Gif; using SixLabors.ImageSharp.PixelFormats; namespace GameLogic { /// <summary> /// Store a number of frames as <see cref="Color"/> arrays. Sup...
c4c7d45f1a57821b36231d9a55c4d9956e75a18c
C#
kkubli3246/BibleVerseStorage
/Services/Business/SercurityServices.cs
2.8125
3
using BibleVerseApplication.Models; using BibleVerseApplication.Services.Data; using System; using System.Collections.Generic; using System.Linq; using System.Web; namespace BibleVerseApplication.Services.Business { public class SercurityServices { //Adds a New Bible Verse to DB through the Security D...
73b33f4f4e0f0fe443c8d7c763f5b65cb41546a6
C#
Lesssnik/Labs
/3 semester/C#/4 lab/LINQHTML.cs
3.078125
3
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Xml; using System.Xml.Linq; using System.IO; using Rumyantsev.Lab2.Railroad; namespace Rumyantsev.Lab4.XMLAndSerialization { /// <summary> /// Save station`s timetable as html document /// </summary> cla...
fd44cadbb92f4ea2618a2a3a20f6b6a0ea314ad2
C#
syncore/ReflexAPI
/ReflexApi/ServerList.cs
2.625
3
namespace ReflexAPI { using System.Collections.Generic; using SteamData; /// <summary> /// Static class that holds an in-memory representation of the current server list and servers /// that failed to query. <remarks> Persist so multiple user requests do not initiate a new /// server list requ...
b403a4411dfe4027ff76b33ec26debd47081b3d5
C#
SimLoNo/BookingTest
/BookingTest_1/SQLCommands.cs
3.171875
3
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Data.SqlClient; namespace BookingTest_1 { class SQLCommands {//Opretter variabler til connectionstring og tider for checkin og checkud---------------------------- public str...
965a4a1d8124d7393bf5bf9361a2453105a8865f
C#
garywei944/Untitled-Tower-Defense
/Assets/Scripts/Defender/Bullet.cs
2.71875
3
using UnityEngine; namespace Sandbox.Gary { public class Bullet : MonoBehaviour { private Transform _mTarget; public float speed = 80f; public float damage = 20; public float explosionRadius; public void SetTarget(Transform target) { _mTarget = targ...
23b05dbc4c1e5ce3214d6a977cae81503941f16b
C#
bwr57/OSMPT
/OsmSharp.Tools/Math/VRP/Core/Routes/Symmetric/FixedSymmetricRoute.cs
2.921875
3
// OsmSharp - OpenStreetMap tools & library. // Copyright (C) 2012 Abelshausen Ben // // This file is part of OsmSharp. // // OsmSharp is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 2 of t...
8b853d413245775ed03d037e5486b90f6db122cd
C#
chinian-main/CSharpe
/Demo_GreedySnack/Demo_GreedySnack/SnackBody.cs
3.125
3
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace Demo_GreedySnack { enum E_SnakeBody_Type { Head, Body } class SnackBody:GameObject { private E_SnakeBody_Type type; public S...
d1cfe159f398ea55c53f0ebece918aed592c427d
C#
DarkWanderer/ClickHouse.Client
/ClickHouse.Client/Formats/PeekableStreamWrapper.cs
3.0625
3
using System; using System.IO; namespace ClickHouse.Client.Formats; /// <summary> /// Universal stream wrapper allowing to add 'PeekChar' support to streams with CanSeek=false /// Suggestions for better solution wanted /// </summary> internal class PeekableStreamWrapper : Stream, IDisposable { private readonly...
ec8bc0138eef8454530d789603b1c40ccf350256
C#
AmadejusV/Csharp10.08
/BarberShop/Controllers/BookingController.cs
2.6875
3
using BarberShop.Models; using Microsoft.AspNetCore.Mvc; using System; using System.Collections.Generic; using System.Linq; using System.Threading.Tasks; namespace BarberShop.Controllers { public class BookingController : Controller { public IActionResult Index() { Barber Aurimas =...
91f11c8544f592794cc4399fc832145514e4366e
C#
thezachcannon/BenefitsCalculator
/BenefitsCalculatorApi/Services/EmployeeService.cs
2.6875
3
using System.Collections.Generic; using System.Threading.Tasks; using BenefitsCalculatorApi.Domain.Models; using BenefitsCalculatorApi.Domain.Services; using BenefitsCalculatorApi.Domain.Repositories; using BenefitsCalculatorApi.Domain.Services.Communication; using System; namespace BenefitsCalculatorApi.Services { ...
6f250c2e29b2b10f1862d37985fc793935e1803e
C#
SandraMuller/TravelTech
/WebForm/Database/FakeDatabase.cs
2.640625
3
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using WebForm.Models; namespace WebForm.Database { class FakeDatabase { public List<Location> GetLocations() { var list = new List<Location>() { new L...
e2505a9faadc9397a497f15a814ce0ae070cc0c7
C#
Kryxzael/RoomShuffle
/Assets/RoomShuffle/Objects/Pickups/Weapon/WeaponPickupBase.cs
2.546875
3
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using UnityEngine; public abstract class WeaponPickupBase : PickupScript { public PickupBase DroppableWeaponPrefab; /// <summary> /// Gets the weapon to pick up /// </summary> /// ...
b93126a770467ca37715d2ae1144efcb9503888c
C#
lajohnston/LemballEditor
/app/models/Objects/RotatableObject.cs
2.828125
3
using System; using System.Collections.Generic; using System.Text; using System.Xml; using System.Windows.Forms; namespace LemballEditor.Model { public abstract class RotatableObject : LevelObject { /// <summary> /// /// </summary> public bool Rotated { get; private set; } ...
4f085f74d2868cd3c39bbd7fa92a4f0fc7cf973c
C#
davuxcom/Deferno
/Deferno/User.cs
2.5625
3
using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace Deferno { class User { public System.Windows.Controls.TreeViewItem TreeItem { get; set; } IRCLib.User u = null; public User(IRCLib.User user) { u = user; u.On...
b2767d79d316a36de70829c880159ce563207506
C#
danielpetisme/jhipster-net-sample-app-template
/src/JHipsterNetSampleApplication/Data/Extensions/DbSetExtensions.cs
2.734375
3
using System; using System.ComponentModel.DataAnnotations; using System.Linq; using System.Reflection; using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.ChangeTracking; namespace JHipsterNetSampleApplication.Data.Extensions { public static class DbSetExtensions { public static Entity...
2f60dafb8d0c1c0513e4c9ad1917ab24dab4d682
C#
mtremion/Package-Menu
/PackageMenu/Assets/Scripts/DataBase/DataBaseAdd.cs
2.671875
3
using System; using UnityEngine; using MySql.Data.MySqlClient; /// <summary> /// This class contains function(s) to add data(s) in base. /// </summary> public class DataBaseAdd : MonoBehaviour { #region Private Members DataBaseManager _dbManager = null; MySqlConnection _con = null; MySqlCommand _cmdSq...
d086b951dd5935b6f820dd306c50c160b31837ed
C#
steamb23/Ahheui-CSharp
/Ahheui/Storages/Stack.cs
3.03125
3
using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace SteamB23.Ahheui.Storages { public class Stack : IStorage { Stack<double> stack; public Stack() { stack = new Stack<double>(); } public Stack(IEnumerable<double> c...
3793972f3f8dab37c70308647faca3748c9d2ae2
C#
shendongnian/download4
/code8/1349562-36448031-115010517-4.cs
2.578125
3
public ActionResult ViewA() { var sizeChoicesFromDb = "40,41,42,43"; // get from db var myModel = new MyViewModel { SizeChoices = sizeChoicesFromDb .Split(',').ToList().ConvertAll(Int32.Parse) }; return View(myModel); }
c1b6f026c184bfb320a8020491ce8e8cc6c12e17
C#
shendongnian/download4
/first_version_download2/302138-43576239-143803054-2.cs
2.96875
3
private Expression<Func<Goods, bool>> LambdaConstructor (string propertyName, string inputText, Condition condition) { var item = Expression.Parameter(typeof(Goods), "item"); var prop = Expression.Property(item, propertyName); var propertyInfo = typeof(Goods).GetProperty(propertyName); var val...
4e33a123080ec9aac86ae892a932836343452e01
C#
hach-que/RedMeansGo
/RedMeansGo/Pathing/BoringPath.cs
2.90625
3
// // This source code is licensed in accordance with the licensing outlined // on the main Tychaia website (www.tychaia.com). Changes to the // license on the website apply retroactively. // using System; using System.Collections.Generic; using Microsoft.Xna.Framework; namespace RedMeansGo.Pathing { public class...
fae024a107e07c84cce98ad0779c39f2f6df7b6b
C#
hicknhack-software/Twofold.Net
/src/Twofold.Core/Compilation/Rules/CallRule.cs
2.515625
3
/* Twofold.Net * (C) Copyright 2016 HicknHack Software GmbH * * The original code can be found at: * https://github.com/hicknhack-software/Twofold.Net * * 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 co...
9fa48681def22d8106ed55e1cd0ce25deddf8bb2
C#
oscarcarlsson93/AcceleratedLearning
/MVC/Mvc02/Mvc02/Services/AuthService.cs
2.578125
3
using System; using System.Collections.Generic; using System.Threading.Tasks; using Microsoft.AspNetCore.Identity; using Microsoft.EntityFrameworkCore; using Mvc02.Models.ViewModels; namespace Mvc02.Services { public class AuthService { private readonly UserManager<IdentityUser> _userManager; ...