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 |
|---|---|---|---|---|---|---|
33b49824a1a3a2880cd254c8549eea22cd935f4b | C# | shendongnian/download4 | /code4/639058-15176150-36802048-2.cs | 2.53125 | 3 | public class Modelo<T>
{
// 1) note PROTECTED set on Id
public virtual int Id { get; protected set; }
public override bool Equals(object obj)
{
...
// 2) comparison is based on Id
return (this == obj || this.Id == specificOject.Id);
}
... |
ca7e6f68aa7b9317f736942b47490d8655b96d50 | C# | sgeorgiev24/SurveyMaker | /SurveyMaker/SurveyMaker.Services/Implementations/AnswerService.cs | 2.875 | 3 | namespace SurveyMaker.Services.Implementations
{
using Data;
using Microsoft.EntityFrameworkCore;
using System.Threading.Tasks;
public class AnswerService : IAnswerService
{
private readonly SurveyMakerDbContext db;
public AnswerService(SurveyMakerDbContext db)
{
... |
d01f56e7f3a135b5bf36c61329eedfad859dbd1d | C# | MaxKlaxxMiner/SokoWahn | /SokoWahn/SokoWahnLib/Rooms/Tasks/TaskListNormal.cs | 3.28125 | 3 | using System;
using System.Diagnostics;
// ReSharper disable UnusedMember.Global
namespace SokoWahnLib.Rooms
{
/// <summary>
/// einfachste Implementierung einer Aufgaben-Liste
/// </summary>
public sealed class TaskListNormal : TaskList
{
/// <summary>
/// merkt sich die Daten der Auf... |
35524016940704444a6baa77a62d1d21086eb4fd | C# | watalo0885/TRABAJANDOSOBREQUECOMO | /Interfood.Data1/Helpers.Logger/Logger.cs | 2.734375 | 3 | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Practices.EnterpriseLibrary.Logging;
using System.Xml;
namespace Helpers.Logger
{
[Serializable]
public class Logger
{
private static string exceptionTitle = "Exception";
private Guid ins... |
2234652bc164cbfaca1f0f5a46696f3fd0ad8ac0 | C# | CaptainHoldMyBeer/2048 | /ClassLibrary2048/ClassLibrary2048/Game.cs | 3.234375 | 3 | using System;
using System.Collections.Generic;
using System.Text;
namespace ClassLibrary2048
{
public class Game
{
private static Random _randomizer = new Random();
public static void Start()
{
var matrixToPlay = new Matrix(4);
PasteOnEmptySpace(matrixToPlay);
Console.Write(matrixToPlay.ToString(... |
db031f4c2ec56a535018a82dafad972dc791f2a8 | C# | Parfait18/Drink-Dispenser | /Drink.cs | 3.578125 | 4 | using System;
using System.Collections.Generic;
using System.Text;
namespace DrinkDispenser
{
/*
Ici Une classe abstrate pour garder toutes les boissons d'être d'un même type de base Drink */
public abstract class Drink
{
//le prix de la boisson
private double price;
... |
c3c2af8eca7614aecc60c631a1dd4f34cccd84cc | C# | NicollasDev/AulaStatic | /Conversor.cs | 2.8125 | 3 | //namespace Aula22Static
//{
//public static class Conversor
// {
// public static float CotacaoDolar = 5.23f;
//public static float ConverterDolarParaReal(float valor){
// return valor * CotacaoDolar;
// }
// public static float ConverterRealParaDolar(float valor){
// ... |
3679de395494dec12570c62ddb351d0a27d9c119 | C# | pSkubiszewski/Battleship-v-1.0 | /Battleship v 1.0/SearchForm.cs | 2.53125 | 3 | using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Diagnostics;
using System.Drawing;
using System.Linq;
using System.Net;
using System.Net.NetworkInformation;
using System.Net.Sockets;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
us... |
4b3010504ccc49a8b7270c8d63f80f46b7d82745 | C# | DooMLooRD/TPAProject | /ConsoleApplication/View/TreeViewConsole.cs | 2.890625 | 3 | using System.Collections.ObjectModel;
using ViewModels.TreeViewItems;
namespace ConsoleApplication.View
{
public class TreeViewConsole
{
public ObservableCollection<TreeViewItemConsole> HierarchicalDataCollection { get; set; }
public TreeViewConsole(ObservableCollection<TreeViewItemConsole> ... |
81d69416c61044360b2284a3dca308af993332fb | C# | shendongnian/download4 | /first_version_download2/261536-20879560-54746154-2.cs | 2.953125 | 3 | static byte[] RemoveJunk(byte[] input)
{
var end = Array.IndexOf(input, (byte)0);
Console.WriteLine(end);
if (end < 0)
return input;
var result = new byte[end];
Array.Copy(input, result, end);
return result;
}
|
73db5522371cacb35b478ceae8c0e3cccbc77311 | C# | aatifabdelmo1/AzureStorageTable | /CosmosServerSide/Program.cs | 2.703125 | 3 | using Microsoft.Azure.Cosmos;
using Microsoft.Azure.Cosmos.Scripts;
using System;
using System.IO;
using System.Threading.Tasks;
namespace CosmosServerSide
{
class Program
{
static void Main(string[] args)
{
Console.WriteLine("Hello World!");
string EndpointUri = "http... |
be1eb10b760eb13fba6260474f8fbdcc4b5a1363 | C# | CXYFramework/Travelling | /ForeignKeyAndIndexBuilder/Program.cs | 2.640625 | 3 | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Dapper;
using System.Data.SqlClient;
using System.Text.RegularExpressions;
using System.Configuration;
namespace ForeignKeyBuilder
{
class Program
{
static string sqlTable = "SELECT... |
2edd674f0996357244f618b86838d1dc569767d6 | C# | Danielku15/OpenApiQuery | /OpenApiQuery/Utils/ReflectionHelper.cs | 2.921875 | 3 | using System;
using System.Collections.Generic;
using System.Linq;
using System.Linq.Expressions;
using System.Reflection;
namespace OpenApiQuery.Utils
{
internal static class ReflectionHelper
{
public static MemberInfo GetMember<T, TRet>(Expression<Func<T, TRet>> expr)
{
return ((M... |
d78b327d416feca4cbfca39fea9e1dabbfd602fb | C# | i2e-haw-hamburg/trame.skeleton | /TrameSkeleton/Interface/IJoint.cs | 2.71875 | 3 | using System;
using System.Collections.Generic;
using Trame.Math;
namespace Trame.Interface
{
/// <summary>
/// I joint.
/// </summary>
public interface IJoint : IEquatable<IJoint>
{
/// <summary>
/// Gets the children.
/// </summary>
/// <returns>The children.</ret... |
cf0d5560d56d86b731365235ae683fd3ed35224c | C# | Leroikier/Private-fields-example | /Private-fiels-example/Private-fiels-example/Program.cs | 3.40625 | 3 | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Private_fiels_example
{
class Program
{
static void Main(string[] args)
{
//Eksempel på en bil som ikke bliver oprettet
try
{
... |
149dbbf312a155c0cfa2e31dca1f1cc099be268a | C# | Salman7905/TaazaaAssignments | /Assignment9/FileHandelingP/FileHandeling/FileHandler.cs | 3.359375 | 3 | using System;
using System.IO;
namespace FileHandelingP.FileHandeling
{
public class FileHandler
{
public void writeToFile(string s)
{
FileStream fileStream= new FileStream("Training.txt",FileMode.Create);
StreamWriter streamWriter = new StreamWriter(fileStream);
... |
5eea1d313339ef64ce2db0f741b089832c0451d5 | C# | PhuongKen/Assignment | /SpringHeroBank/controller/YYAccountController.cs | 3.078125 | 3 | using System;
using System.Collections.Generic;
using System.Transactions;
using MySql.Data.MySqlClient;
using SpringHeroBank;
using SpringHeroBank.entity;
using SpringHeroBank.model;
using SpringHeroBank.utility;
using SpringHeroBank.entity;
namespace SpringHeroBank.controller
{
public class YYAccountController
... |
890b69432fb4f1e55a40d9685b44d0240d380fab | C# | ntiany/test | /Threads/Program.cs | 3.4375 | 3 | using System;
using System.Threading;
namespace Threads
{
class Program
{
static void Main(string[] args)
{
Console.WriteLine("Main thread");
var thread = new ThreadStart(CallInsideSecondThread);
var newThread = new Thread(thread);
ne... |
db05f51880512b3336417981243a33eec6f84778 | C# | selmaohneh/DdfGuide | /DdfGuide.Test/Sorting/NumberDescendingSorterTests.cs | 2.515625 | 3 | using System.Linq;
using DdfGuide.Core.Sorting;
using Microsoft.VisualStudio.TestTools.UnitTesting;
namespace DdfGuide.Test.Sorting
{
[TestClass]
public class NumberDescendingSorterTests
{
[TestMethod]
public void TheSorterHasTheCorrectMode()
{
var sorter = new NumberDe... |
c3b92419f4248f928dd8bdcec50c93432586c282 | C# | anikonthenet/BILLING_SYSTEM | /DGControl/DG Control/DGControl.cs | 3 | 3 |
namespace DGControl
{
#region Refered Namespaces & Classes
using System;
using System.Windows.Forms;
using System.ComponentModel;
using System.Drawing;
#endregion
/// <summary>
/// This Class inherits from datagrid class.This Class Extends all exiting functionality & add row selection
/// on KeyUP & KeyDo... |
a0ab5c6fc36aafbd50d942d5f0d8fe43170f2de8 | C# | BeiMeng/GitApplication | /Util.Framework/Util.Webs.EasyUi/Grids/DataGrid.cs | 2.578125 | 3 | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Util.Webs.EasyUi.Base;
using Util.Webs.EasyUi.Configs;
namespace Util.Webs.EasyUi.Grids {
/// <summary>
/// 表格
/// </summary>
/// <typeparam name="T">表格类型</typeparam>
public abstract class DataGrid<T> : Com... |
9cf56e1051e71a00db71893035ee947060b0f1b3 | C# | sfinktah/vhddirector | /src/main/CSharp.cc/Registry.cs | 2.796875 | 3 | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Win32;
using System.Reflection;
namespace CSharp.cc.Registry
{
public class Key
{
public String KeyPath { get; set; }
public RegistryKey BaseRegistryKey { get; set; }
public RegistryK... |
8081e84f4ab36c1f3c8f851839337137014c65a8 | C# | amejiasc/Portafolio2019 | /DESARROLLO/NET/Hosteria/Hosteria.Negocio.Clases/Base.cs | 2.875 | 3 | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Hosteria.Negocio.Clases
{
public class Base
{
public string ToJson()
{
return Newtonsoft.Json.JsonConvert.SerializeObject(this);
}
public o... |
be5f13b57cb90955ae9df620c7f310c8095d7ad9 | C# | angelhernandezm/merchant | /Abstractions/Entities/IRomanNumber.cs | 2.84375 | 3 | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Merchant.Abstractions.Entities {
public interface IRomanNumber {
/// <summary>
/// Gets the symbols.
/// </summary>
/// <value>
/// The symbols.
/// </value>
IList<IRomanBase> S... |
c517ef6b5bdd21f44ee869f7241e46dc3d793faf | C# | toddcoder/Orange2 | /Orange.Library/Verbs/BinaryLessThanEqual.cs | 2.8125 | 3 | using Orange.Library.Managers;
namespace Orange.Library.Verbs
{
public class BinaryLessThanEqual : ComparisonVerb
{
public override ExpressionManager.VerbPrecedenceType Precedence => ExpressionManager.VerbPrecedenceType.LessThanEqual;
public override bool Compare(int comparison) => comparison <= 0;
publ... |
4046a195f258c22a9d63f6c69b1580e45440e775 | C# | spindlerm/WebAPI-EF | /CustomerService/Controllers/CustomerController.cs | 2.796875 | 3 | using System;
using System.Collections.Generic;
using System.Linq;
using Microsoft.AspNetCore.Mvc;
using Microsoft.Extensions.Logging;
using webapi.Models;
using Newtonsoft.Json;
namespace webapi.Controllers
{
[Produces("application/json")]
[Route("api/customers")]
public class CustomerController : Contro... |
c0c8218de2867f2202ab1cfcbb673837973a60fe | C# | lsanap05/dotNetCore | /eShopping/eShopping/Models/ModelClasses.cs | 2.9375 | 3 | using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Text;
namespace eShopping.Models
{
public class Category
{
[Key]
public int CategoryRowId { get; set; }
[Required(ErrorMessage=... |
5c583293c78828dc1397fb64005a18e72b576488 | C# | linq2db/linq2db.LINQPad | /Source/UI/Model/ModelBase.cs | 2.609375 | 3 | using System.ComponentModel;
namespace LinqToDB.LINQPad;
internal abstract partial class ModelBase : INotifyPropertyChanged
{
public event PropertyChangedEventHandler? PropertyChanged;
protected void OnPropertyChanged(PropertyChangedEventArgs args) => PropertyChanged?.Invoke(this, args);
#region Sample Simple P... |
54f3d02ed9e9c1af29a4e07fd0d39a190ab02df0 | C# | mattan212/LeetCode | /LeetCodeProjects/Problems081-090/Subsets2.cs | 3.34375 | 3 | using System.Collections.Generic;
using System.Linq;
namespace LeetCodeProjects
{
/// <summary>
/// https://leetcode.com/problems/subsets-ii/
/// </summary>
public class Subsets2
{
public class Solution
{
private HashSet<string> _seen = new HashSet<string>();
... |
664d69df3239844d4659cb6a5d31cbd42adb42d4 | C# | aepikhin/U_DENTAL | /DATOS/Medico.cs | 2.984375 | 3 | using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
namespace DATOS
{
public class Medico
{
private String dniMedico;
private String nombre;
private String apellido;
private Especialidad especialidad;
pri... |
e41ca962c085bce25dad8059f5b093f0905d4d13 | C# | nuc134r/LinearNetwork | /LinearNetwork/AI/NeuralNetwork.cs | 3.046875 | 3 | using System;
using System.Threading;
using System.Windows;
namespace LinearNetwork.AI
{
class NeuralNetwork
{
public NeuralNetwork(InitialParams @params, Action<string> logger, Action<LinearFunction> callback)
{
_params = @params;
_logger = logger;
_callbac... |
e6abc91d6381972878e2faadd51b848c69e3b2bb | C# | hexiaoweiff8/GOAP-1 | /Assets/Libraries/Anthill/Utils/AntColor.cs | 3.3125 | 3 | using UnityEngine;
namespace Anthill.Utils
{
public class AntColor
{
/// <summary>
/// Преобразует значение Color в Hex формат.
/// </summary>
/// <param name="aColor">Color значение.</param>
/// <returns>Возвращает Hex код цвета в формате string.</returns>
public static string ColorToHex(Color aColor)
... |
ba9b6d2b140f410e335f86c04640ef7ab215da61 | C# | georgeutsin/psychotaxi | /Assets/Scripts/Utils/GasLocationUtil.cs | 2.625 | 3 | using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class GasLocationUtil
{
public static void SetNextGasLocation(GameStateScriptableObject gameState, LevelDifficultyScriptableObject difficulty)
{
float timeLeft = difficulty.timeBetweenGas;
while (timeLeft > ... |
bf986ea30aae0a7b28cd69aee08e78e086acb8e8 | C# | DiscoPYF/arangodb-net-standard | /arangodb-net-standard/UserApi/Models/PutAccessLevelBody.cs | 2.53125 | 3 | namespace ArangoDBNetStandard.UserApi.Models
{
/// <summary>
/// Represents a request body to set database or collection access level.
/// </summary>
public class PutAccessLevelBody
{
/// <summary>
/// The access level to set.
/// Use "rw" to set the collection level access ... |
8c5fe69fdfb72549c51a696cd31491344d15c987 | C# | satheesh-krishnasamy/SecurityTestAssistant | /SecurityTestAssistant.Library/Testers/Implementation/HttpOnlyResponseCookieTester.cs | 2.65625 | 3 | namespace SecurityTestAssistant.Library.Testers.Implementation
{
using SecurityTestAssistant.Library.Config;
using SecurityTestAssistant.Library.Models;
using SecurityTestAssistant.Library.Net;
/// <summary>
/// To check whether the cookies in the HTTP response are set with the "HttpOnly" attribut... |
386686b7d072d4d8ff78633eb365a0e9aaf785b8 | C# | EmrePatan/MyInstagram-Project | /BusinessLayer/StoryManager.cs | 2.890625 | 3 | using DataAccessLayer.EntityFramework;
using Entities;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace BusinessLayer
{
public class StoryManager
{
Repository<Story> repo_Story = new Repository<Story>();
Repository<Us... |
1dea67b2d2b8d49c7a8ee70e04b69fb647b5b6f7 | C# | johnradke/NTextile | /Textile/States/ListFormatterState.cs | 2.640625 | 3 | #region License Statement
// Copyright (c) L.A.B.Soft. All rights reserved.
//
// The use and distribution terms for this software are covered by the
// Common Public License 1.0 (http://opensource.org/licenses/cpl.php)
// which can be found in the file CPL.TXT at the root of this distribution.
// By using this... |
cb987899814918f6dfb15bc7603f8dc2f78efb76 | C# | marxbautista/ExpRecHumITSOEH | /ModeloRH/MProfesion.cs | 3.0625 | 3 | using System;
using EntidadesRH;
using System.Configuration;
using System.Data.SqlClient;
using System.Collections.Generic;
namespace ModeloRH
{
public class MProfesion
{
public void insert(EProfesion profesion)
{
//
//Asegurarse de agregar la referencia System.Configur... |
09b9d5c6ab4749866eb7d0cc0d151645ff47bcb8 | C# | matrixitUser/wbEmulator | /brute-force/Form1.cs | 2.625 | 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;
using System.Threading;
using System.IO.Ports;
namespace wbEmulator
{
public partial class Form1 : ... |
d49460ce21abb235a0d520828bd45d51e756be0a | C# | bachduyhoang/TestFinal | /FacultyAssembly/FacultyDAO.cs | 2.859375 | 3 | using System;
using System.Collections.Generic;
using System.Data.SqlClient;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace FacultyAssembly
{
public class FacultyDAO
{
string connection = "server=se140692\\bachduyhoang;database=PE2021;uid=sa;pwd=123";
public Fac... |
d8842202d04d1af927264463a25dc726c4cffbb3 | C# | LeonardoMatrix/ListaDeExercicios | /Ex8/Ex8/Program.cs | 3.390625 | 3 | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Ex8
{
class Program
{
static void Main(string[] args)
{
String Aux;
Triangulo triangulo = new Triangulo();
Console.WriteLine("Info... |
f989b8253d943703ca484d9bfcbe120f0c6d5fbb | C# | izrik/NDeproxy | /BodyWriter.cs | 3.046875 | 3 | using System;
using System.Collections.Generic;
using System.IO;
using System.Text;
namespace NDeproxy
{
public class BodyWriter
{
static readonly Logger log = new Logger("BodyWriter");
public static void writeBody(object body, Stream outStream, bool chunked = false)
{
out... |
3a3a190c4188eb88d6ab1f1bcec5f6937df0f614 | C# | Alothar/DM | /DM/DM/Help/MostPlayedHeroWRConverter.cs | 2.5625 | 3 | using DM.JSON;
using System;
using System.Collections.Generic;
using System.Globalization;
using System.Text;
using Xamarin.Forms;
namespace DM.Help
{
class MostPlayedHeroWRConverter : IValueConverter
{
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
... |
a300eca7c836bf2426c8d792037dcbcd13bbb364 | C# | ragot05/compare-service.samples | /WebApplications/CompareServer.Domain/CompareLogs.cs | 2.6875 | 3 | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.IO;
namespace CompareServer.Domain
{
public class CompareLogs
{
public static DateTime GetEndDate(DateTime start, Range range)
{
switch (range)
{
case Ran... |
f3bfa62dd85a479a8eaad1c91b1eb83ad8900a4e | C# | Vlad-ole/C_sharp_Troelsen | /Chapter_12/Prog_1.cs | 3.5 | 4 | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
// Продемонстрировать применение класса ByTwos, реализующего интерфейс.
namespace Chapter_12
{
public interface ISeries
{
int GetNext(); // возвратить следующее по порядку число
... |
541d029dd5b16981f77c4f4cbced5f6fea080cff | C# | svenschmidt75/dotNETCore | /DSandAlg/CodingProblems/LeetCode/LC19/L19/Class1.cs | 3.328125 | 3 | #region
using NUnit.Framework;
#endregion
namespace L19
{
public class ListNode
{
public ListNode next;
public int val;
public ListNode(int val = 0, ListNode next = null)
{
this.val = val;
this.next = next;
}
}
public class Solution
... |
a76f7edb68225d58b991f234161a42448da2b894 | C# | sulmar/altkom-wcf | /08_FullDuplex/ChatService/ChatService.cs | 2.765625 | 3 | using IServices;
using System;
using System.Collections.Generic;
using System.Linq;
using System.ServiceModel;
using System.Text;
using System.Threading.Tasks;
namespace ChatService
{
[ServiceBehavior(ConcurrencyMode = ConcurrencyMode.Single, InstanceContextMode = InstanceContextMode.Single)]
public class Cha... |
7ad90dad6f7f18f76bc53c5697c9d268166cf4a4 | C# | shendongnian/download4 | /first_version_download2/510615-46883079-158913459-2.cs | 3.078125 | 3 | try
{
if (connection.State != ConnectionState.Open)
{
connection.Open();
}
SqlCommand command = new SqlCommand(sql, connection);
SqlDataReader reader = command.ExecuteReader();
while (reader.Read())
{
person... |
0c97b908712e333e11d50093f83aa489053cc4a1 | C# | blaza168/Csharp-school-project | /Shop.Database/Repositories/ProductRepository.cs | 3.1875 | 3 | using System;
using System.Collections.Generic;
using System.Linq;
using System.Linq.Expressions;
using System.Threading.Tasks;
using Shop.Database.Extensions;
using Shop.Domain.Models;
namespace Shop.Database.Repositories
{
public class ProductRepository
{
private readonly ApplicationDbContext _contex... |
4414b751b07331192701294917dd2e04fc4c8074 | C# | adrioja/TrabajoTOO | /capaPresentacion/FRecorrerPresupuesto.cs | 2.59375 | 3 | using modeloDominio;
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 capaPresentacion
{
/// <summary>
/// Formulario para visualizar t... |
0c4918f21b2f80ab0c0b00670bfcd3560e906bb3 | C# | WouterThys/MoneyScoop | /MoneyScoop/Utils/TimeSpanExtensions.cs | 2.9375 | 3 | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace MoneyScoop.Utils
{
public static class TimeSpanExtensions
{
public static TimeSpan RoundToNearestMinutes(this TimeSpan input, int minutes)
{
var totalMinute... |
b96f19a866b2e77cce0c231f98fc623b9c1b1285 | C# | owik100/Mood-FoodV2 | /PracaInzynierska/PracaInzynierska/Models/Entities/Product.cs | 2.671875 | 3 | using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Threading.Tasks;
namespace PracaInzynierska.Models.Entities
{
public class Product
{
public int ProductId { get; set; }
[Display(Name = "Nazwa")]
[Required(Error... |
4dc3a825a350df1d8c8a453654cb0adb93c6ca4f | C# | muratkizilgoz/CSharpOOP | /Polymorphism/Exercise4/Program.cs | 2.671875 | 3 | using System;
namespace Exercise4
{
class Program
{
static void Main(string[] args)
{
var sql = new SqlConnection("192.123231.1212Sql");
sql.OpenConnection();
sql.CloseConnection();
var oracle = new OracleConnection("oracle121.12.212... |
12da3190d5d0324640078f1c1dd83b479eedf20f | C# | TheMesias/.Net-Forms_17Exercises_UI | /WinApp_ListadoProgramas/FormVolumen.cs | 2.75 | 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 WinApp_ListadoProgramas
{
public partial class FormVolumen : Form
{
double alt... |
e01765d452a609b5f4eb764f5c688dfc5356d1f0 | C# | tddold/Telerik-Academy-Homeworks | /C# Part 1/02.Primitive Data Types and Variables/ComparingFloats/CompareFloatingPointNumbers.cs | 4.3125 | 4 | /*
Write a program that safely compares floating-point numbers (double) with precision eps = 0.000001.
Note: Two floating-point numbers a and b cannot be compared directly by a == b because of the nature of the floating-point arithmetic.
Therefore, we assume two numbers are equal if they are more closely to each othe... |
86c0bd7f989bc0db8a3eb8b11481368a200829d9 | C# | AlexanderKartashov/ood | /observer/WeatherStation/WeatherInfo.cs | 3 | 3 | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace WeatherStation
{
public class WeatherInfo
{
public double Temperature { get; set; }
public double Humidity { get; set; }
public double Pressure { get; set; }
public String StationNa... |
c9d69e3c0334e5c6d4a8bc0ea5821ed3f55e5360 | C# | Jokasta/CidadaoFiscal | /G2.CidadaoFiscal.Infra/Repositorio/EF/EnderecoEF.cs | 2.5625 | 3 | using G2.CidadaoFiscal.Core.Interfaces;
using G2.CidadaoFiscal.Core.Models;
using G2.CidadaoFiscal.Infra.Contexto;
using System;
using System.Collections.Generic;
using System.Data.Entity;
using System.Linq;
namespace G2.CidadaoFiscal.Infra.Repositorio.EF
{
public class EnderecoEF : IEnderecoEF
{
priv... |
38251b9edc0ca3fde4b6206d8ad3d638c1fdfbb5 | C# | jktulord/ProfitableFrontier | /Assets/Scripts/Models/PlayerModel/Stats/BuildLimit.cs | 2.625 | 3 | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Assets.Scripts.Models.PlayerModel.Stats
{
public class BuildLimit
{
public int Value;
public int Max;
public bool Spend(int value)
{
if (Va... |
2cff23d86580b1ee3127105d3a7d688254c15a06 | C# | sirius17/Content.Sync | /Content.Sync.Clarifi/SyncBot.cs | 2.5625 | 3 | using Content.Sync.Infrastructure;
using Newtonsoft.Json.Linq;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
namespace Content.Sync.Clarifi
{
public class SyncBot
{
public SyncBot(BotSettings settings, IWorkI... |
547cdfe0df65e3c86d96210664a79fa6055cd3e1 | C# | Johnni1208/the-rocket-league | /The-Rocket-League-Backend/src/Data/RocketRepository.cs | 2.953125 | 3 | using System.Collections.Generic;
using System.Threading.Tasks;
using Microsoft.EntityFrameworkCore;
using The_Rocket_League_Backend.Models;
namespace The_Rocket_League_Backend.Data{
public class RocketRepository : IRocketRepository{
private readonly DataContext context;
public RocketRepository(Da... |
ebdb7f3320c2e5ada4616eae41c223b444d080ce | C# | rodrigorila/WakeUp | /Assets/Scripts/RotateBetweenAngles.cs | 2.90625 | 3 | using UnityEngine;
using System.Collections;
public class RotateBetweenAngles : MonoBehaviour {
public enum RotationAxis {
X,
Y,
Z};
public RotationAxis RotateAboutAxis;
public float StartAngle;
public float EndAngle;
public float Speed; //degrees s^-1
private Quater... |
b597d8b3c9c7e22a3080cbd50bca6fc7caedc92c | C# | erinaldo/POS | /Reports/WpfApplication1/WpfApplication1/Models/Mapping/PortionMap.cs | 2.546875 | 3 | using System.ComponentModel.DataAnnotations.Schema;
using System.Data.Entity.ModelConfiguration;
namespace WpfApplication1.Models.Mapping
{
public class PortionMap : EntityTypeConfiguration<Portion>
{
public PortionMap()
{
// Primary Key
this.HasKey(t => t.Id);
... |
b89452a75053648c72134025477bca33fe38b1c9 | C# | nboyko75/ResumeParser | /Parser/PDFParser.cs | 3.0625 | 3 | using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using SelectPdf;
namespace ResumeParser.Parser
{
public class PDFParser
{
public PDFParser(bool showMsg = false)
{
showMessages = showMsg;
}
#region Fields
private bool show... |
59c9e08cdafa4a5e7b7433549b36a03612e8bf13 | C# | sevket-yilmaz/ScheduledTask | /ScheduledTask.Infrastructure/Task/MinutelyTask.cs | 2.875 | 3 | using System.Diagnostics;
using System.Threading;
using System.Timers;
namespace ScheduledTask.Infrastructure.Task
{
public abstract class MinutelyTask : IScheduledTask
{
public abstract int Interval { get; }
public virtual bool ItsTime { get; } = true;
public abstract void Run();
... |
ad2c0e0774dcf2b3a9abce7a5b9873de6d9bf848 | C# | CopperStarSystems/tdd-hello-nunit | /HelloNunit/HelloNunit.Tests/TestBase.cs | 2.5625 | 3 | // HelloNunit.HelloNunit.Tests.TestBase.cs
using Moq;
using NUnit.Framework;
namespace HelloNunit.Tests
{
[TestFixture]
public abstract class TestBase<T> where T : class
{
MockRepository mockRepository;
protected T SystemUnderTest { get; private set; }
protected Mock<T> CreateMoc... |
67a4bfc63bfa4ae5a055525e6aac7170d2abc0d5 | C# | chanhan/subao_bg | /Common/AFBAllianceComparer.cs | 2.734375 | 3 | using Models;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace Common
{
public class AFBAllianceComparer : IEqualityComparer<AFBAlliance>
{
public bool Equals(AFBAlliance x, AFBAlliance y) //比较x和y对象是否相同,按照地址比较
{
return x.AllianceID ... |
ba4f9fe5b1e5de7449eb0eb23b858419067cb28d | C# | jorgehenriquesouza/projetas | /Test.Database/Context/ProjetasContext.cs | 2.609375 | 3 | using System;
using System.Collections.Generic;
using System.Text;
using Microsoft.EntityFrameworkCore;
using Test.Database.Entities;
namespace Test.Database.Context
{
public class ProjetasContext : DbContext
{
public static string ConnectionString { get; set; }
public ProjetasContext() { }... |
b94721ee40248602880d41edfe20fb389041c97d | C# | Koushik-Sarker-Seemanto/HatcheryManagement | /MarketStore.cs | 2.90625 | 3 | using System;
using System.Collections.Generic;
namespace HatcheryManagement
{
class MarketStore
{
DbMarket dbMarket = DbMarket.GetInstance();
Repository repository = new Repository();
public int getRui()
{
return repository.GetAll<RuiFish>().Count;
}
... |
d3c47dafc66f3e2f451d67113bcfd8ab9992ccca | C# | superviktor/SolvedIssues | /SnackMachine.Domain/SnackMachineBoundedContext/Snack.cs | 2.53125 | 3 | using SnackMachine.Domain.Base;
namespace SnackMachine.Domain.SnackMachineBoundedContext
{
public class Snack : AggregateRoot
{
public static readonly Snack None = new Snack("None");
public static readonly Snack Chocolate = new Snack("Chocolate");
public static readonly Snack Soda = ne... |
b1b9d42e1782bcdb31bb85a945328f0eb9c500db | C# | AustinDavies/CodeAdvent2020 | /Day2/Program.cs | 3.28125 | 3 | using Day2.Interfaces;
using Day2.Models;
using Day2.Part1;
using Day2.Part2;
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Reflection;
namespace Day2
{
class Program
{
private static IPasswordPolicyValidator passwordPolicyValidator;
static vo... |
b63ce64de7ad9615c9564424ee0448230b28b5ac | C# | Xhyzi/GravityBat | /Assets/Scripts/Main/Level/Utils/HiddenPath.cs | 2.734375 | 3 | using GravityBat_Constants;
using UnityEngine;
using System.Collections;
using UnityEngine.Tilemaps;
/// <summary>
/// Script relacionado con los caminos ocultos.
/// Cuando el jugador colisione contra el camino oculto este se vuelve transparente, mostrandose.
/// </summary>
public class HiddenPath : MonoBehaviour
{
... |
0ddabb35132a2162f655c744e65a9b39c493839e | C# | qin-cyberpark/Greenspot.Stall | /Greenspot.Stall/Models/Entities/Setting/DateTimePeriod.cs | 2.515625 | 3 | using Newtonsoft.Json;
using System.Collections.Generic;
namespace Greenspot.Stall.Models.Settings
{
public partial class DateTimePeriod
{
//1-31
[JsonProperty("DaysOfMonth")]
public IList<string> DaysOfMonth { get; set; } = new List<string>();
//0-6 0 is Sunday, 6 is Saturday... |
0b64d3e3ce61a359d4dda13c58ae072a16d899af | C# | pingmeaschandru/LiveMeeting | /TW.Core/Threading/Parallel.cs | 2.65625 | 3 | using System;
using System.Threading;
namespace TW.Core.Threading
{
public sealed class Parallel
{
public delegate void ForLoopBody( int index );
private static int threadsCount = Environment.ProcessorCount;
private static readonly object sync = new Object( );
private static v... |
db3a08d8fd5f45e82fbb5b1466228526ff431d5e | C# | AbominableSandwish/GGJ2020 | /Assets/Scripts/GameManager.cs | 2.59375 | 3 | using System.Collections;
using System.Collections.Generic;
using System.Threading;
using UnityEditor.Experimental;
using UnityEngine;
using UnityEngine.UI;
public class GameManager : MonoBehaviour
{
[SerializeField] private GameObject Rooms;
[Header("Danger After Impact")]
[SerializeField] private GameO... |
b9808344e0e85fde6d7b05d2a13edb7158118ce6 | C# | jbosh/calculator | /Calculator 3/Tests.cs | 2.53125 | 3 | using System;
using Calculator.Grammar;
using System.Linq;
namespace Calculator
{
#if RUN_TESTS
static class Tests
{
public static void RunTests()
{
#region Constants
var Memory = new MemoryManager();
Memory.SetDefaultConstants();
Memory.Push();
Statement.Memory = Memory;
#endr... |
36db5764efeb7e9aca00276030ad47cf56cb70ef | C# | iwenli/Iwenli | /Iwenli/Web/Skin.cs | 2.625 | 3 | using System;
using System.Collections.Generic;
using System.Configuration;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Web;
using System.Xml;
namespace Iwenli.Web
{
/// <summary>
/// ISkin的默认实现
/// </summary>
public class Skin : Config, ISkin
{
#region... |
87e61b748b508c163d367d0695b4611fbc6a75e1 | C# | smoltis/designpatterns | /SimpleFactory/ClamPizza.cs | 2.75 | 3 | namespace SimpleFactory
{
public class ClamPizza : Pizza
{
public ClamPizza()
{
name = "Clam Pizza";
dough = "Crust";
sauce = "Marinara Sauce";
toppings.Add("Seafood");
}
}
} |
106297e86c584b3f24498fc047739b7737000d74 | C# | MilordMorfin/Clinic-CSharp-WinForms-MVP | /clinic/Clinic/Clinic/Classes/Doctor.cs | 3.1875 | 3 | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Clinic
{
public enum Hours
{
poranne,
popoludniowe,
wieczorowe
};
public class Doctor
{
#region Properties
public int Id { get; pri... |
22523ec51f7567a06c568a662864982cb43567b2 | C# | PlumpMath/designpatterns-39 | /ISPSample/BeforeISR/AcademicPerson.cs | 2.703125 | 3 | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace ISRSample
{
// EN : We have used the ready interface. All methods will be realized.
// TR : Hazır olan bir arayüzü kullandık. Tüm metodlar gerçekleştirilebilecektir.
class AcademicPerson : IPersonServi... |
0df027952843ad7c8f30d3b53133119d8a58bc00 | C# | volhadl/aqa | /CalculatorO/CalculatorO/IoManager.cs | 3.375 | 3 | using System;
using System.Collections.Generic;
using System.Text;
namespace CalculatorO
{
internal class IoManager
{
internal static string ReadOperand(string input)
{
Console.WriteLine(input);
string operand = Console.ReadLine();
return operand;
}
... |
4652e6e10cd92e59d5d11a4ee05bae1d90aef3ba | C# | code-n-share/LobsterInk.Adventure.API | /LobsterInk.Adventure.Tests.Unit/AdventureControllerTests.cs | 2.5625 | 3 | using LobsterInk.Adventure.API.Controllers;
using LobsterInk.Adventure.Application;
using Microsoft.AspNetCore.Mvc;
using Moq;
using System;
using System.Collections.Generic;
using System.Net;
using System.Threading.Tasks;
using Xunit;
namespace LobsterInk.Adventure.Tests.Unit
{
public class AdventureControllerTes... |
4c77f21fb1707be75d0860974a3b007abb8864bc | C# | frotie/TodoList | /DesktopTodo/ViewModels/TodoListViewModel.cs | 2.625 | 3 | using DesktopTodo.Models;
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace DesktopTodo.ViewModels
{
class TodoListViewModel : ViewModelBase, ITransient
{
public ObservableCollection<Todo... |
9c564ff1ca8ec8f0e4b780b2f1ab37e409df8e79 | C# | 223n/HiStudy | /MergeGridView2/MergeGridView2/MergeHeaderGridview.cs | 2.71875 | 3 | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using System.Drawing;
namespace MergeGridView2
{
public class MergeHeaderGridview : DataGridView
{
#region Const
/// <summary>
/// ヘッダの文字
... |
85284595a5537531fbb46fe77048ea9bb0d901c6 | C# | thalukanyomulaudzi/Golden_Connect | /Design370/Event_Types_View.cs | 2.546875 | 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;
using MySql.Data.MySqlClient;
namespace Design370
{
public partial class Event_Types_View : Form
... |
e702361906c9a1e21873bc229d46fade59ced4d0 | C# | TylerDev905/CheatEngine | /CodeDesigner.Library/CheatBlock.cs | 3.203125 | 3 | using CodeDesigner.Library.Enums;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Text.RegularExpressions;
using System.Threading.Tasks;
namespace CodeDesigner.Library
{
public class CheatBlock
{
public string Label { get; set; }
public List<C... |
8993b402baff6bcf1a567df84e67de8e9212b8f5 | C# | chrisfcarroll/ComponentAsService | /ComponentAsService/Pieces/AnythingCanBeAControllerFeatureProvider.cs | 2.78125 | 3 | using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using Microsoft.AspNetCore.Mvc.Controllers;
using Microsoft.Extensions.Logging;
namespace Component.As.Service.Pieces
{
public class AnythingCanBeAControllerFeatureProvider : ControllerFeatureProvider, ICollect... |
9a674cd1dc634a2843867cf2a0f6acd2d1d8d8dc | C# | ShatteredMind/ArenaGame | /UIManager/MainMenu.cs | 2.640625 | 3 | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework;
namespace UIManager
{
public sealed class MainMenu
{
#region Fields and properties
Texture2D backGround;
Texture2D... |
186ce37a08eeea4f4a07fd8b0a838273a695deb4 | C# | StephenCoreyWaller/ForumTwo.Oh | /Model/Thread.cs | 2.625 | 3 | //Model for thread that will hold a collection of posts
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
namespace ForumTwo.Model
{
public class Thread
{
public int Id { get; set; }
[Required]
public string Title { get; set; }
public... |
1973d9763f43666c117d9ec2a2c1309bd54f5e04 | C# | BoyanDimitrov77/DataStructure | /Advanced Data Structures/Problem1/Program.cs | 3.1875 | 3 | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Wintellect.PowerCollections;
namespace Problem1
{
public class PriorityQueue<T> where T :IComparable<T>
{
private OrderedBag<T> queue;
public PriorityQueue()
{
... |
c98256ad065c7a7d1bb3525f073472a9b46e559a | C# | AndreiMisiukevich/Task-manager | /BatteryWidjet/BatteryWidjet/BatteryWidjet/FormExtension.cs | 2.890625 | 3 | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using System.Drawing;
namespace PresentationLayer
{
internal static class FormExtension
{
public static void SetFormBackColor(this Form form, Color color)
... |
55d1adf93c78ba44f55cca99703706870f99b055 | C# | YuriyMiheev/Keysystems.Microservices | /Microservices/src/ContentTypeExtensions.cs | 2.796875 | 3 | using System;
using System.Collections.Generic;
using System.Linq;
using System.Net.Mime;
using System.Text;
namespace Microservices
{
/// <summary>
///
/// </summary>
public static class ContentTypeExtensions
{
private static List<string> textMimes = new List<string>()
{
null,
"",
"text/plain"... |
c8da9394ef59991755137ea7e3a9139d8c579462 | C# | OpenLocalizationTestOrg/ECMA2YamlTestRepo2 | /fulldocset/add/codesnippet/CSharp/66d5df9e-ce6f-4182-9856-_1.cs | 3.21875 | 3 | ToolStripControlHost dateTimePickerHost;
private void InitializeDateTimePickerHost()
{
// Create a new ToolStripControlHost, passing in a control.
dateTimePickerHost = new ToolStripControlHost(new DateTimePicker());
// Set the font on the ToolStripControlHost, this will affect the hosted control.
d... |
45b2459573576fe2146ec8b4c544391bc25472e9 | C# | melina-braco/SistemaDeGestion | /PROYECTO DESIGN DASHBOARD/Design Dashboard Modern/Clases/IntMail.cs | 2.53125 | 3 | using System;
using System.Collections.Generic;
using System.Linq;
using System.Net.Mail;
using System.Net.Mime;
using System.Text;
using System.Threading.Tasks;
namespace Design_Dashboard_Modern.Clases
{
class IntMail
{
private MailMessage msjeMail;
private string _destinatario;
pr... |
c05000d628b1905ea7c393e3a4e134497497ca80 | C# | Kristinn-Kristinsson/Labbar | /Uppgift8/MainWindow.xaml.cs | 2.5625 | 3 | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
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;... |
a4306aa05a70f8ed155c799077683d5a2d2d4fb1 | C# | Kathelyss/MasonAlgorithm | /MasonAlgorithm/MasonAlgorithm/Graph.cs | 3.46875 | 3 | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace MasonAlgorithm
{
/// <summary>
/// Класс, представляющий собой граф
/// </summary>
class Graph
{
/// <summary>
/// Список вершин графа
/// </summary>
public List<Vertex> ... |
b7551c45f34bdfdcb0e4efdaab29a597ef611080 | C# | Ghostzer/CheckUser | /F_LOGIN.cs | 2.84375 | 3 | using System;
using System.Windows.Forms;
namespace CheckUser
{
public partial class F_LOGIN : Form
{
public F_LOGIN()
{
InitializeComponent();
}
private void Btn_login_Click(object sender, EventArgs e)
{
if ((txt_nickname.Text == "") || (txt_p... |
18bdc62aa72ed0473c944344ba8d73d4f1d13f25 | C# | guftall/clrs-implement | /Algorithms/Program.cs | 3.34375 | 3 | using System;
using System.Collections;
using System.Collections.Generic;
using Algorithms.Sort;
namespace Algorithms
{
class Program
{
private static List<int> array;
static void Main(string[] args)
{
var start = DateTime.Now;
Console.WriteLine($"{start.ToStri... |
7bdf9f7907502eab01e5859cea29a939ac019fc3 | C# | mrowdy/SocketIt | /Assets/SocketIt/Assets/Scripts/Module.cs | 2.6875 | 3 | using UnityEngine;
using System.Collections.Generic;
namespace SocketIt
{
[AddComponentMenu("SocketIt/Module/Module")]
public class Module : MonoBehaviour
{
public delegate void ModuleEvent(Connection connection);
public event ModuleEvent OnConnect;
public event ModuleEvent OnDisco... |
49b4ced418ad735f15e880e0afb2970f37962076 | C# | yuvnith/Cast | /Reflection/FieldsRetrieval .cs | 3.625 | 4 | using System;
using System.Reflection;
namespace Reflection
{
public class FieldsRetrieval
{
public static int a=1;
public static string name="abcd";
public static void GetFields()
{
Type type = typeof(FieldsRetrieval);
FieldInfo[] fields = type... |
ce5e2377f4a19f2fd3d4f288a1263eeb3cfb420b | C# | makezonefablab/threejs4net | /ThreeJs4Net/Geometries/PolyhedronGeometry.cs | 2.9375 | 3 | using System.Collections.Generic;
using ThreeJs4Net.Core;
using ThreeJs4Net.Math;
namespace ThreeJs4Net.Geometries
{
public class PolyhedronGeometry : Geometry
{
public float Radius { get; }
public float Detail { get; }
public List<float> Vertices;
public List<int> Indices;
... |