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 |
|---|---|---|---|---|---|---|
2a1523dad46368b235018aaa84bb8bf8fa572d48 | C# | willcurry/crypto-volume-bot | /WillCrypto/CoinTracker.cs | 2.6875 | 3 | using Discord;
using Discord.WebSocket;
using System;
using System.Threading;
using System.Threading.Tasks;
namespace WillCrypto
{
internal class CoinTracker
{
private Coin _initalCoin;
private Coin _lastCoin;
private Coin _updatedCoin;
private ISocketMessageChannel _channel;
... |
e17a54bf4a49df159bae2621715200d54058e8bd | C# | jakubaondrej/acr-akreditace | /InfoSystem/InfoSystem.Core/Redactions/RedactionService.cs | 2.734375 | 3 | using InfoSystem.Core.DataAbstraction;
using System;
using System.Collections.Generic;
using System.Text;
using System.Threading.Tasks;
namespace InfoSystem.Core.Redactions
{
public class RedactionService
{
private IRedactionRepository _redactionRepository;
public RedactionService(IRedactionRe... |
efe3f5befc40efcde5520b0e9724d51d6c43574d | C# | Charlaxy/SlackCatsWeb | /Bot.cs | 2.890625 | 3 | using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.Net;
using System.Text.RegularExpressions;
using System.Threading;
using System.Text;
namespace SlackCatsWeb
{
static class Bot
{
static Bot()
{
Log = new StringBuilder();
Log.AppendLin... |
0d677e3ec5166c9f05b64327924a63921c95259e | C# | gaoyixin1989/MonitorBusinessSystem | /DataAccess/Channels/Env/Fill/AirHour/TEnvFillAirHourAccess.cs | 2.53125 | 3 | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using i3.ValueObject.Channels.Env.Fill.AirHour;
using System.Data;
namespace i3.DataAccess.Channels.Env.Fill.AirHour
{
/// <summary>
/// 功能:环境空气填报(小时)
/// 创建日期:2013-06-27
/// 创建人:刘静楠
/// </summary>
public cla... |
6e2bb907286becf0c83d16478a6f8193e7cb5b17 | C# | GTRekter/Chamaeleon | /C# Programming III/Lab2/Samples/MemoryConcepts/Program.cs | 3.59375 | 4 | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace MemoryConcepts
{
class Program
{
static void Main(string[] args)
{
// Since p1 is not explicitly disposed, it will be cleaned up
// by the garbage collector when the program terminates
Person p1 = new Perso... |
7b723914affd6c481e497e50e31ec03b75ed17ca | C# | demonix/CertVerifier | /CertVerifierService/Task.cs | 2.59375 | 3 | using System.Diagnostics;
namespace CertVerifierService
{
public class Task
{
private readonly Stopwatch _timer = new Stopwatch();
private readonly object _taskData;
public Task(object taskData)
{
_taskData = taskData;
_timer.Start();
... |
16ea28eab8d5aebe46e1799662e48676c8e51684 | C# | lwq420332613/AdvancedCode | /02特性/MyAttribute/MyAttribute/Student.cs | 3.078125 | 3 | using MyAttribute.Extension;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace MyAttribute
{
/// <summary>
/// 这里是注释,除了让人看懂这里写的是什么,
/// 对运行没有任何影响
/// </summary>
//[Obsolete("请不要使用这个了,请使用什么来代替", true)]//影响编译器的运行
//[Seri... |
452c19e5e7446e14de587cf2a51866a6e6bf99cf | C# | Paul-Moura/Custom_Library | /SystemProperties.cs | 2.6875 | 3 | using System;
using System.IO;
using System.Linq;
using System.Net.NetworkInformation;
using System.Windows.Forms;
namespace Custom
{
public static class SystemProperties
{
public static string CommonApplicationData
{
get
{
var path = Path.Combine(Enviro... |
74619992b9dcff9bbc7e52041683c31f25bbd5d8 | C# | Arzana/DeJongUtils | /Utilities/Utilities/Core/IFullyDisposable.cs | 2.84375 | 3 | namespace DeJong.Utilities.Core
{
using System;
using System.Diagnostics.CodeAnalysis;
//
// Summary:
// Provides a mechanism for releasing unmanaged resources.To browse the .NET Framework
// source code for this type, see the Reference Source.
/// <summary>
/// Improves upon t... |
62d3c9168b1d5e5d80f644be2c89160078fd5fa3 | C# | MyDieu97/ISC_Back-end | /ISC_System_API/Controllers/StudentsController.cs | 2.515625 | 3 | using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using Microsoft.EntityFrameworkCore;
using ISC_System_API;
using ISC_System_API.Model;
using ISC_System_API.Respone;
namespace ISC_System_API.Controllers
{
... |
d0c60fc1aa7e2d63c6f1e6ebe44e5164175f7b62 | C# | rsampr/Frends.Community.AWS | /Frends.Community.AWS/Definitions.cs | 3 | 3 | using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using Amazon.SecurityToken.Model;
namespace Frends.Community.AWS
{
#region DownloadTask
/// <summary>
/// Input class, you can download whole directories or single files.
/// </summary>
[DisplayName("Input")]
public... |
52957bd7cb2fab974e520239ae1370883a92885d | C# | microsoftgraph/msgraph-cli | /src/generated/Models/TermsAndConditionsAcceptanceStatus.cs | 2.5625 | 3 | using Microsoft.Kiota.Abstractions.Serialization;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System;
namespace ApiSdk.Models {
/// <summary>
/// A termsAndConditionsAcceptanceStatus entity represents the acceptance status of a given Terms and Conditions (T&C) policy by a giv... |
a14a74cdcb5327648a398e371dba2efd43ce67a1 | C# | jenspettersson/Generation | /Generation.Excercise.Web/Generation.DiceGame.Tests/HighGuessTests.cs | 2.9375 | 3 | using System;
using System.Globalization;
using NUnit.Framework;
namespace Generation.DiceGame.Tests
{
[TestFixture]
public class HighGuessTests
{
[Test]
public void If_new_roll_is_higher_than_previous_roll_it_should_be_correct()
{
int previousRoll = 1;
int ... |
481ead350bb7e703de601e3b1e015669e362e003 | C# | shendongnian/download4 | /latest_version_download2/216149-46685038-158144414-6.cs | 2.78125 | 3 | void Main()
{
var states = new Subject<bool>();
IObservable<int> query =
states
.Select(state => state
? Observable
.Interval(TimeSpan.FromSeconds(2.0))
.StartWith(-1L)
.SelectMany(n =>
Observable.FromAsync(() => GetStatusAsync()))
... |
9e4ebac9a234ac92057a482a435c85e1ef9ea706 | C# | oivoodoo/RS485_Network_Demo_Library | /RS485_dll/Voodoo/Logs/LogFolderConverter.cs | 2.65625 | 3 | using System;
using System.Collections.Generic;
using System.IO;
using System.Text;
namespace Voodoo.Libraries.Logs
{
public class LogFolderConverter : log4net.Util.PatternConverter
{
///<summary>
///
/// Evaluate this pattern converter and write the output to a wr... |
5b0e1a31bb305845e01fca700390c52d0cf995eb | C# | tmbull/MyCollections | /MyCollections/BinarySearchTree.cs | 3.4375 | 3 | using System.Collections;
using System.Collections.Generic;
using System.Security.Cryptography;
namespace MyCollections
{
public class BinarySearchTree<T> : IEnumerable<T>
{
private class Node
{
public Node(T value, Node? left = null, Node? right = null)
{
... |
e8e4b21bc21a33fce3aaafe57111b6e9ce80f8de | C# | shendongnian/download4 | /code6/1113935-29211491-86467755-4.cs | 3.21875 | 3 | static string GetFirstKeyFromValue(Dictionary<string,string> dict, string val)
{
if(!dict.ContainsValue(val))
return null; //return null because nothing matched.
return dict.FirstOrDefault(kv => kv.Value.Equals(val)).Key;
}
|
92cc25138c31c9cea4697376de285576af415f9d | C# | glantzsimon/sharedlibrary | /SharedLibrary/Extensions/ReflectionExtensions.cs | 2.890625 | 3 | using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Reflection;
using K9.SharedLibrary.Attributes;
using K9.SharedLibrary.Models;
using Microsoft.Ajax.Utilities;
namespace K9.SharedLibrary.Exte... |
e5b3f1d646f6b9f758c848cdc1e44f105a0d2a6c | C# | umbersar/MazesForProgrammers | /MazesForProgrammers/Cell.cs | 3.640625 | 4 | using System;
using System.Collections.Generic;
using System.Text;
namespace MazesForProgrammers {
public class Cell {
public int Row { get; private set; }//x co-ordinate of the cell
public int Column { get; private set; }//y co-ordinate of the cell
public List<Cell> Links { get; private s... |
213c46202fc3cea70ad27df3dc84a46004d90f71 | C# | leonardoMeister/ControleEstoqueDao.DAO | /ProdutosDAO.cs | 2.828125 | 3 | using System;
using System.Collections.Generic;
using System.Text;
using System.Data.Common;
using System.Data;
namespace ControleEstoqueDao.DAO
{
public class Produtos
{
public int IdProduto { get; set; }
public string Nome { get; set; }
public int Status { get; set; }
public ... |
a2ad1f806c79fdb8c8777967a8a938b8f391ffac | C# | Luxic/PathFollowing | /PathFollowing/PathFollowing/PathFollow.cs | 3.203125 | 3 | using System.Collections.Generic;
namespace PathFollowing
{
public class PathFollow
{
#region Fields
char[,] matrix;
public string Letters = "";
public string PathAsCharacters = "";
List<Direction> Directions = new List<Direction>() {
new Direction() { x = 0, y = -1, c = (char)Chars.Ho... |
a9fb5e437ddfb52ab3c333c95b496ae5893b9d53 | C# | JaminTc/Mystuff | /FlooringProgram/FlooringProgram.Models/Orders.cs | 2.984375 | 3 | using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Security.Cryptography.X509Certificates;
using System.Text;
using System.Threading.Tasks;
using FlooringProgram.Models;
namespace FlooringProgram.Models
{
public class Orders
{
public int OrderNumber {... |
f0ebc2419da6ff5fb0c92cecee372d8bb0a13e6c | C# | pazhe/JiazheWeb | /Jiazhe.Web.DAL/Nhibernate/NHibernateDao.cs | 2.6875 | 3 | using NHibernate;
using NHibernate.Criterion;
using NHibernate.Linq;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Jiazhe.Web.DAL.Nhibernate
{
[Spring.Stereotype.Repository]
public class NHibernateDao<T> : IDAL.IdaoFather<T>
{... |
f3ca0ef0b3e18cfb13191a220d41102433aaff95 | C# | danthomas/RoslynTest | /TestCli/Tasks/GitCheckout.cs | 2.703125 | 3 | using CommandLineInterface;
namespace TestCli.Tasks
{
public class GitCheckout : ITask<GitCheckout.Args>
{
private readonly IConsole _console;
public GitCheckout(IConsole console)
{
_console = console;
}
public void Run(Args args)
{
_co... |
1024c381b64a3e6ec18f70e2d400bcde875b4f9a | C# | tafo/Geeks | /Geeks.Practices/Arrays/Basic/CountIntersection.cs | 3.6875 | 4 | using System;
using System.Diagnostics.CodeAnalysis;
using System.Linq;
using Geeks.Practices.Helper;
namespace Geeks.Practices.Arrays.Basic
{
/// <summary>
/// The title is "Intersection of two arrays"
///
/// Given two arrays A and B respectively of size N and M.
/// The task is to print the co... |
5787e365ca718e72f7133440dd107c8031deef44 | C# | shendongnian/download4 | /code3/518303-11923305-27892364-2.cs | 2.515625 | 3 | public class SQLDataAccessor<I, T> : IDataAccessorModel<I, T>
{
internal SQLDataAccessor(IResult<string> result)
{
_connectionString = "";
_result = result;
}
private readonly string _connectionString;
private IResult<string> _result;
... |
4d832ba8b7f59bb04563535b25d5a60524f3068c | C# | osipukr/Text-Editor | /App/MainForm.cs | 2.734375 | 3 | using System;
using System.ComponentModel;
using System.Drawing;
using System.Windows.Forms;
namespace App
{
public interface IMainForm
{
string Path { get; }
string Content { get; set; }
void SetSymbolCount(int count);
void SetWordCount(int count);
event EventHandler F... |
52a705f8305bedb8339f6e4902d365fade9e95ae | C# | jrwdexter/PulseAudio.Service | /PulseAudio.ServiceWrapper/Worker.cs | 2.546875 | 3 | using System;
using System.Diagnostics;
using System.IO;
using System.Threading;
using System.Threading.Tasks;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.Hosting;
using Microsoft.Extensions.Logging;
using Serilog;
namespace PulseAudio.ServiceWrapper
{
public class Worker : BackgroundServi... |
91357f9a14dd16392bfe0b2c517a62187ff2b6a9 | C# | SenkoVlad/PortableManager | /Backend/Data/Repositories/Implementation/TaskTypeRepository.cs | 2.546875 | 3 | using Microsoft.EntityFrameworkCore;
using PortableManager.Web.Server.Data.Repositories.Interface;
using PortableManager.Web.Server.Models;
using PortableManager.Web.Server.Models.Dto;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text.Json;
using System.Threading.Tasks;
using Task = ... |
983094f13cbd73249d3a1a0bc07880199a235e3b | C# | henkmollema/Dommel | /src/Dommel.Json/JsonObjectTypeHandler.cs | 2.5625 | 3 | using System;
using System.Data;
using System.Text.Json;
using System.Text.Json.Serialization;
using Dapper;
namespace Dommel.Json;
internal class JsonObjectTypeHandler : SqlMapper.ITypeHandler
{
private static readonly JsonSerializerOptions JsonOptions = new()
{
AllowTrailingCommas = true,
R... |
1c7874c7d375a2036eb82cf7d89c7d88d6f806f1 | C# | AbdelkhalekAmer/DesignPatterns | /StrategyPattern/Program.cs | 3.171875 | 3 | using System;
namespace StrategyPattern
{
class Program
{
static void Main(string[] args)
{
// Generate random customer in the service and get discount based on delegate passed by the client code.
Console.WriteLine(new CustomerPaymentService().CalculateDiscount((custome... |
d2f85ac5e5b8efd1c0a3797d455daa19db3ee028 | C# | woghd8503/Second_BitCamp | /_098_Polymorphism_Address/CompanyAddress.cs | 3.03125 | 3 | using _61_AddressClass;
using System;
using System.Collections.Generic;
using System.Text;
namespace _98_polymorphism_Address
{
class CompanyAddress : Address
{
public string Company { get; set; }
public string Job { get; set; }
public override void showInfo(int order)
{
base.showInfo(order);
Console... |
85fd3eb32dee279877cda94f88bc6134193e24d4 | C# | zizidzhelil/Recipes | /src/Cooking/Writers/Implementation/Writer.cs | 3.21875 | 3 | using System;
using System.Data;
using System.Text;
namespace Cooking.Writers.Implementation
{
public class Writer : IWriter
{
public void Write(DataTable reportData)
{
StringBuilder reportBuilder = new StringBuilder();
foreach (DataRow row in reportData.Rows)
... |
03a68a0f94062b627e572473f8d78ce9b7b0b59f | C# | shendongnian/download4 | /latest_version_download2/227938-50323960-173501002-2.cs | 2.734375 | 3 | JObject jsonObj= JObject.parse(strJSON);
JObject PKTDL=jsonObj["PKTDTL"] as JObject;
IList<string> keys = PKTDL.Properties().Select(p => p.Name).ToList(); // this gives column names
StringBuilder sb=new StringBuilder();
string headers="";
foreach(string key in keys)
{
headers+... |
b5c4a7804bf4dee18287b628472452fcb8888fb2 | C# | Diana-Tkacheva/Lab_1_sem3 | /Lab_5_sem3/LevDistance.cs | 3.75 | 4 | using System;
namespace Lab_5_sem3
{
public class LevDistance
{
public static int GetDistance(string source, string destination)
{
if (source == null || destination == null)
{
return -1;
}
int lenSrc = source.Length;
i... |
0a9783bab4abe400a7a58bcd4f706770461d997f | C# | watashi/AlgoSolution | /timus/ac/10/1068.cs | 2.703125 | 3 | //原来天皇的题目在这里有原型-_-b
//P.S. the sample is so hd
using System;
class Sum //1068. Sum
{
static void Main(string[] args)
{
int ans = 0;
int n = Int32.Parse(Console.ReadLine());
if (n >= 1)
{
for (int i = 1; i <= n; i++)
ans += i;
}
else
{
for (int i = 1; i >= n; i--)
ans += i;
}
Console.Wr... |
aa5fa67a14d0c7572b01ea82d9612a7e6b948552 | C# | DakEnviy/homm | /HOMM/Objects/Unit.cs | 3.03125 | 3 | using System.Collections.Generic;
using System.Linq;
using HOMM.BattleObjects;
namespace HOMM.Objects
{
public class Unit
{
private readonly string _name;
private readonly int _hitPoints;
private readonly int _attack;
private readonly int _defence;
private readonly (int,... |
dadab9e21e0156d5421aaf703a4258cbf5685082 | C# | dotyoda/Library | /Library/Presenters/LoginPresenter.cs | 2.875 | 3 | using Library.Models;
using Library.Views;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Library.Presenters
{
class LoginPresenter
{
public LoginPresenter(FrmLogin form)
{
this.form = form;
}
... |
cb7bb2cbc4a12c9bac12266ad4fc840fef53a73d | C# | itagile-csd/ngt-team-alex | /NerdGolfTracker/Operationen/Hilfe.cs | 2.609375 | 3 | using System.Collections.Generic;
using NerdGolfTracker.Befehle;
namespace NerdGolfTracker.Operationen
{
public class Hilfe : IOperation
{
private IBefehleListe _befehleListe;
public Hilfe(IBefehleListe befehleListe)
{
_befehleListe = befehleListe;
}
public ... |
52cfce70f5df68d7e06448fbce1b6c97551d0438 | C# | Delsus78/notebookcsharp | /TestStorage/TestStorage.cs | 2.578125 | 3 | using System;
using Logic;
using Storage;
using Xunit;
namespace TestStorage
{
public class TestStorage
{
/// <summary>
/// en on recupere le test des moyennes (ajoutant tout un tas de modules et d'unite + exams)
/// puis on test une sauvegarde entre temps (avec donc un ajo... |
2cd8fdd0d1166aeddc39adb004ee728e35dc4df2 | C# | mcteach21/FormationCSharpCDI | /WinFormsApp/Principale.cs | 2.609375 | 3 | using System;
using System.Windows.Forms;
namespace WinFormsApp
{
public partial class Principale : Form
{
public Principale()
{
//Méthode du designer pour 'dessin' Fenêtre..
//..Toujours en premier!!!
InitializeComponent();
//..code autre
... |
96a962b3b7be3e71e2bb317f4aea9ea7f98ddbb2 | C# | soopercool101/BrawlCrate | /BrawlLib/Internal/Windows/Controls/NumericInputBox.cs | 2.671875 | 3 | using System;
using System.ComponentModel;
using System.Globalization;
using System.Windows.Forms;
namespace BrawlLib.Internal.Windows.Controls
{
public class NumericInputBox : TextBox
{
public float _previousValue;
public float? _value;
[DesignerSerializationVisibility(DesignerSerial... |
fd27bef6b29374acf66fbf437da9fc4d80ad3248 | C# | JMPennington/Capstone | /com.WanderingTurtle/com.WanderingTurtle/BookingManager.cs | 2.921875 | 3 | using com.WanderingTurtle.Common;
using com.WanderingTurtle.DataAccess;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
namespace com.WanderingTurtle.BusinessLogic
{
//markup for data object to bind
[DataObject(true)]
public class BookingManager
{
... |
5f8e0614f1698d7dd28da51e3a0a2930ccd393d9 | C# | Quaggles/RyanQuagliataUnity | /Sirenix.OdinInspector.Attributes/Attributes/ShowIfAttribute.cs | 2.875 | 3 | //-----------------------------------------------------------------------// <copyright file="ShowIfAttribute.cs" company="Sirenix IVS"> // Copyright (c) Sirenix IVS. All rights reserved.// </copyright>//-----------------------------------------------------------------------
//-------------------------------------------... |
53f26756e8d6d36f4756bc9139e1ca85f3307bd2 | C# | stefism/Projects | /01 C# Basic/09VlojeniExercise/NewHouse/Program.cs | 3.71875 | 4 | using System;
namespace NewHouse
{
class Program
{
static void Main(string[] args)
{
string typeOfFlowers = Console.ReadLine();
double numberOfFlowers = double.Parse(Console.ReadLine());
double budget = double.Parse(Console.ReadLine());
double p... |
a1f92f58a4bccdcd48ad7237c2461f62f2557526 | C# | yasinatilkan60/Northwind-Backend | /NorthwindBackend/Core/Extensions/ClaimsPrincipalExtensions.cs | 3.1875 | 3 | using System;
using System.Collections.Generic;
using System.Security.Claims;
using System.Text;
using System.Linq;
namespace Core.Extensions
{
// Extension yazılacağı için public static yazılmıştır.
public static class ClaimsPrincipalExtensions
{
// Buradaki yaklaşım Claims Principal'ın (mevcut ... |
a7c5370b7a25021e0b6b4f8ba6b67b07c943b4f3 | C# | JoseRochaVidrio/SistemaCaritas | /Sistema Caritas/Almacen.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.Windows.Forms;
using System.IO;
using System.Data.SQLite;
using BarcodeLib;
namespace CaritasVentas
{
public partial class Almacen : Form
{
... |
36b4fc23ce47e365efcebac518e5de2d1120e974 | C# | fredatgithub/LinqToCsvLibrary | /LinqToCsvLibrary/CsvFile.cs | 2.59375 | 3 | using System;
using System.Collections.Concurrent;
using System.Collections.Generic;
using System.Globalization;
using System.IO;
using System.Linq;
using System.Linq.Expressions;
using System.Reflection;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
namespace LinqToCsvLibrary
{
public cl... |
f51a7393e8aae841c34c482852b6de291e73a74a | C# | fablecode/ygo-api | /src/Application/ygo.application/Commands/AddArchetype/AddArchetypeCommandValidator.cs | 3.15625 | 3 | using System;
using FluentValidation;
namespace ygo.application.Commands.AddArchetype
{
public class AddArchetypeCommandValidator : AbstractValidator<AddArchetypeCommand>
{
private const string LinkMustBeUriMessage = "Link '{PropertyValue}' must be a valid URI. eg: http://www.SomeWebSite.com.au";
... |
647f952b588538e3462bdac682db67c13e2953d3 | C# | itselhosayny/product-management-api | /ProductManagement.Domain/Validation/Result.cs | 2.5625 | 3 | namespace ProductManagement.Domain.Validation
{
public class Result
{
public Status Status { get; set; }
public string Error { get; set; }
public static Result Success()
{
return new Result { Status = Status.Success };
}
public static Result Failure(s... |
65311af4147c9123a621e52ac373b1c9e350a741 | C# | the-Dust/ASPKnowledgeBase | /DataAccess/Context/EfDbContext.cs | 2.65625 | 3 | using DataAccess.Entities;
using System;
using System.Collections.Generic;
using System.Data.Entity;
using System.Data.Entity.Migrations;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace DataAccess.Context
{
public class EfDbContext : DbContext
{
public EfDbContext() : bas... |
a9d4689fe4e7b0ee76fb909aefef8999e8a075c0 | C# | lbildzinkas/TrainTicketMachine | /TrainTicketMachine.Tests/TrieStationRepositoryTests.cs | 3 | 3 | using System.Collections.Generic;
using System.Linq;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using TrainTicketMachine.DataStructures;
using TrainTicketMachine.Repos;
namespace TrainTicketMachine.Tests
{
[TestClass]
public class TrieStationRepositoryTests
{
[TestMethod]
public v... |
86e480f8c851519c052d5a86896c8bdda28133c2 | C# | SquallB/Check_n_Cook | /Check_n_Cook/Model/DishType.cs | 3.625 | 4 | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Windows.Data.Json;
namespace Check_n_Cook.Model
{
/// <summary>
/// Represents to type of a dish (desert for exemple).
/// </summary>
public class DishType
{
/// <summa... |
4ec7f4dc9b49a12c5903f4ce678434e3324855ae | C# | shendongnian/download4 | /latest_version_download2/87456-47166059-160094937-1.cs | 3.3125 | 3 | I've added a couple of re-factorings:
1. DBNull is not seen as isnullorempty so added the (value as string)
2. Passing a datatable row[column] that was created dynamically at runtime (like: row["PropertyName"]) will not see this as a string with typeof(T) due to the fact that the column type base is object. So added ... |
db1dab3f313dc08e16cf6798ad51f0ba61ab6557 | C# | shendongnian/download4 | /first_version_download2/529107-49292082-168995156-2.cs | 2.59375 | 3 | public Task<HttpResponseMessage> UploadAsFormDataContent(string url, byte[] image)
{
MultipartFormDataContent form = new MultipartFormDataContent
{
{ new ByteArrayContent(image, 0, image.Length), "file", "pic.jpeg" }
};
HttpClient client = new HttpClient();
re... |
caeb73b97e6e1a0e2f9dfdc66a869f8004ba0858 | C# | KrastevIT/SoftUni | /02.Technology Fundamentals with C# - January 2019/Lab and Exercise/Methods - Lab/08 Math Power/Program.cs | 3.484375 | 3 | using System;
using System.Numerics;
namespace _08_Math_Power
{
class Program
{
static void Main(string[] args)
{
double number = double.Parse(Console.ReadLine());
int pow = int.Parse(Console.ReadLine());
PrintPowerNumber(number, pow);
}... |
92cf31381bf0ed6e4fbd94d63b4f5d13cbdbde65 | C# | tddold/Telerik-Academy | /ASP.NET Web Forms/01. Introduction-to-ASP.NET/01. Introduction to ASP.NET/01.Calculator(ASP.NET Web Forms)/Calculator.aspx.cs | 2.859375 | 3 | namespace _01.Calculator_ASP.NET_Web_Forms_
{
using System;
using System.Web.UI;
public partial class Calculator : Page
{
protected void Page_Load(object sender, EventArgs e)
{
this.btnSum.Text = "Sum";
}
protected void btnSum_Click(object sender, EventArgs... |
6808d789c8755df6fe4dd52f3fe95465d4dfdf72 | C# | dungnguyentien0409/competitive-programming | /C#/1103. Distribute Candies to People.cs | 3.234375 | 3 | /*
* Link: https://leetcode.com/problems/distribute-candies-to-people/submissions/
* Author: Dung Nguyen Tien (Chris)
*/
public class Solution {
public int[] DistributeCandies(int candies, int num_people) {
var res = new int[num_people];
int i = 0;
while(candies > 0) {
... |
9c44c5fc6efe849c7ab3f60f9b343a1cc607b434 | C# | Tenebrie/WebServer | /RPGEditor/Classes/Data/LocationSelector.cs | 2.65625 | 3 | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace RPGEditor
{
public class LocationSelectorEntry
{
public String Link { get; set; }
public Int32 Chance { get; set; }
public String Condition { get; set; }
... |
88cf8fe5fce5784304f593a555cfa906148c326d | C# | IanAWP/MRRCesiumTiler | /DecomposeTile/Generators/AbstractGenerator.cs | 2.640625 | 3 | using MapInfo.RasterEngine.IO;
using System;
using System.Collections.Generic;
using System.Threading;
using System.Threading.Tasks;
using Tiler;
namespace TileGen.Generators
{
public abstract class AbstractGenerator : IGenerator
{
public void GetJobSize(IRasterDataset dataset, int maxDesiredLevel, o... |
29ce361d6d0dfb6b4a166a234dc3be3c6faf7315 | C# | quocthang0507/ImageClassificationWebAppWithML.NET | /ImageClassification.Predict/Program.cs | 2.765625 | 3 | using ImageClassification.DataModels;
using Microsoft.ML;
using Microsoft.ML.Data;
using System;
using System.IO;
using System.Linq;
using System.Text;
namespace ImageClassification.Predict
{
internal class Program
{
private static void Main()
{
Console.OutputEncoding = Encoding.UT... |
1497a5dd0b0ba45d9ecd176d160eefc47058f302 | C# | hallhall/paralell | /Assets/Scripts/common/common.cs | 2.75 | 3 | using UnityEngine;
using System.Collections;
namespace common {
//共通メソッド
public static class common_method {
//タッチされたオブジェクトが指定の名前通りならtrue
public static bool is_touch(string _obj_name) {
if (Input.GetMouseButtonDown(0)) {
Vector3 _aTapPoint = Camera.main.... |
8251cf988b2153917b1cf9ede9a042a894ddbbb7 | C# | sysrpl/Bare.Game.Net | /Tests/Test02/Test02Window.cs | 2.515625 | 3 | using System;
using System.Runtime.InteropServices;
using Bare;
using Bare.Devices;
using Bare.Geometry;
using Bare.Graphics;
using static System.Console;
using static Bare.Game;
using static Bare.Interop.GLES20;
namespace Tests
{
public class Test02Window : Window
{
public static void Test()
... |
3a39ff96f0405aa4542b79eb33510764b9d5ce12 | C# | jia-von/entity-framework-code-first-migration | /CodeFirstPractice/Models/Shelves.cs | 2.796875 | 3 | using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Text;
namespace CodeFirstPractice.Models
{
[Table("Shelves")] // A table called “Shelves” with:
public partial class Shelves
{
// An int pri... |
bde9c726ec8eedf08959c41f90ec669d9fd03ad4 | C# | edom18/UnityGoalAgentSample | /Assets/GoalAgentSample/Scripts/AI/Goals/Brain.cs | 2.859375 | 3 | using UnityEngine;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
namespace AI
{
/// <summary>
/// ゴールを統括するルートゴール
/// </summary>
public class Brain<T> : CompositeGoal<T> where T : AIBase
{
// プランナー
private IPlanner _planner;
// 現在選択されているプラン
... |
b136afbc406fcac91a46d352492670f3399f522f | C# | UnclespaceGroup/ApiCosmetic_ver2 | /ApiCosmetic_ver2/Controllers/CountryController.cs | 2.671875 | 3 | using ApiCosmetic_ver2.Models.Context;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Net.Http;
using System.Web.Http;
namespace ApiCosmetic_ver2.Controllers
{
public class CountryController : ApiController
{
Context db = new Context();
p... |
9a8c8386f1d3ee9d322dba712e60a00a3b6e4e17 | C# | thexa4/projectera | /Project ERA/Project ERA/Data/AvatarBody.cs | 2.84375 | 3 | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using ERAUtils;
namespace ProjectERA.Data
{
internal class AvatarBody : IResetable
{
#region Private fields
private Byte _opacity, _graphicHue;
private Byte _skintoneId,
_hairtypeId, _hai... |
674d7f5f614725aa0778cbbd3e6862e803161228 | C# | BeastNaylor/Demic | /DemicTest/LocationTests.cs | 2.5625 | 3 | using Demic.Classes;
using Demic.Enums;
using System;
using Microsoft.VisualStudio.TestTools.UnitTesting;
namespace DemicTest
{
[TestClass]
public class LocationTests
{
[TestMethod]
public void CompareSameLocationWithDifferentDisease()
{
var locOne = new Location("TESTL... |
0d2cc68417d973214c0009f73a24dcde6dc57e98 | C# | formation-csharp/3.Heritage | /Heritage/Program.cs | 2.640625 | 3 | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Heritage
{
class Program
{
static void Main(string[] args)
{
Personne p1 = new Personne("Madani");
Stagiaire s1 = new Stagiaire("Chami");
... |
cf6bc6f65ce67846c280b2ad73c21013931c932c | C# | Tung-Neo/C--Lap02 | /Snippet 11.cs | 2.953125 | 3 | using System;
using System.Collections.Generic;
using System.Text;
namespace Sesson_4
{
class Snippet_11
{
static void code()
{
int num;
Console.WriteLine("Even Numbers");
for(num = 1; num <= 11; num++)
{
if((num % 2... |
277892ac947b46a2322b808b2e75fcaa4979c595 | C# | hamadakio/DesignPatterns | /Estrutural/Flyweight/Program.cs | 3.046875 | 3 | using System;
namespace Flyweight
{
class Program
{
static void Main(string[] args)
{
//Foco em reaproveitamento de objetos sem necessidade de instanciar varias vezes
Console.WriteLine("===# Flyweight #===");
FabricaFlyweight fabrica = new FabricaFlyweight()... |
bd2c6c53417639f71317ff690ba6c610c56d7394 | C# | stepaside/Nemo | /src/Nemo/Serialization/ObjectJsonSerializer.cs | 2.953125 | 3 | using System;
using System.Collections;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using Nemo.Collections.Extensions;
using Nemo.Utilities;
namespace Nemo.Serialization
{
public static class ObjectJsonSerializer
{
public static string ToJson<T>(this T data... |
136bb802f91dbcbf2e8fcdcea73f1bad3d6eaa46 | C# | mkbiltek/kids.bmi.ir | /Kids.BMI.ir/Kids.Utility/MarkupParser/MarkupTag.cs | 2.953125 | 3 | // #define TEST_KNOWN_INLINE_TAGS
using System;
using System.Collections.Generic;
using System.Collections.Specialized;
using System.Text.RegularExpressions;
namespace MarkupParser
{
/// <summary>
/// This class represents an individual tag element from the markup text.
/// </summary>
public class Mar... |
dcb5f5077160b6ce04d2abed6097eb32880c4107 | C# | ShunsukeH/AtCoder_Practice | /AGC032/AGC032A/Program.cs | 3.453125 | 3 | using System;
using System.Linq;
namespace ConsoleApp1
{
class Program
{
static void Main(string[] args)
{
int n = int.Parse(Console.ReadLine());
int[] b = Array.ConvertAll(Console.ReadLine().Split(' '), int.Parse);
int[] res = new int[n];
for (i... |
fff8d86e5a4e459deac9812edb9ac2a84d834422 | C# | vector-man/VisualRomSuite | /VRS.UI/Controls/WOutlookBar/Items.cs | 2.5625 | 3 | using System;
using System.Collections;
namespace VRS.UI.Controls.WOutlookBar
{
/// <summary>
/// Summary description for Item.
/// </summary>
public class Items : ArrayList
{
private Bar m_pBar = null;
public Items(Bar ownerBar) : base()
{
m_pBar = ownerBar;
}
#region function Add
public Ite... |
48f5eef65652e645eca2c2f6e3646c7a8e91c172 | C# | ksarioglu/Client | /Program.cs | 3.40625 | 3 | using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Security.Cryptography;
using System.Text;
using System.Threading.Tasks;
/* Client Code to consume web service to encrypt and has message content. Client decrypts encrypted massage in the code.
* Written by Kübra SARIOĞLU-... |
8127ea86000bde3c3dda89bcbb54dbda23962cb0 | C# | aloneguid/parquet-dotnet | /src/Parquet/Encodings/ParquetDictionaryEncoder.cs | 2.9375 | 3 | using System;
using System.Buffers;
using System.Collections.Generic;
using System.Linq;
namespace Parquet.Encodings {
static class ParquetDictionaryEncoder {
public static bool TryExtractDictionary(Type elementType,
Array data, int offset, int count,
out Array? dictionaryArray,
... |
5134cec2be3b7ff31fdf4a85b1e7abf17d113990 | C# | compjradm/Treinamvc | /JRCOM_TreinaDados/Model/ConBanco.cs | 2.75 | 3 | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Data;
using System.Windows.Forms;
namespace JRCOM_TreinaDados.Model
{
class ConBanco
{
private string servidor;
private string bancoDados;
priv... |
149c234229515e7cde33a5d7a594c7695fde29a9 | C# | carloscastro313/Programacion-2 | /GuiaDeEjerciciones_01/Ejercicio_16/Program.cs | 2.765625 | 3 | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Ejercicio_16Entidades;
namespace Ejercicio_16
{
class Program
{
static void Main(string[] args)
{
byte nota1;
byte nota2;
Alumno alumno1... |
cdaf245f00d3b430db00e12a945274f8d6e7173c | C# | YuukiTsuchida/UniUtils | /Assets/Scripts/IO/Writer.cs | 3.25 | 3 | using System.IO;
namespace UniUtil
{
namespace IO
{
/**
* <summary>
* 書き込み用FileStreamラッパークラス.
* </summary>
*/
public static class Writer
{
/// <summary>
/// ファイルストリームを作成する.
/// </summary>
/// <param na... |
133e1c86ec9158217950cebd486bf9de54620c5b | C# | mrkcass/SuffixTreeExplorer | /SuffixTree/csharsuffixtree/suffixtree/Node.cs | 3.125 | 3 | /* Node.cs
* To Do: add comments
*
*
* This is a suffix tree algorithm for .NET written in C#. Feel free to use it as you please!
* This code was derived from Mark Nelson's article located here: http://marknelson.us/1996/08/01/suffix-trees/
* Have Fun
*
* Zikomo A. Fields 2008
*
*/
using System.Collections.... |
fc0b0368e331738df8037802f733ef80e39df891 | C# | KirillPlotnikov/WpfApp | /Semestralka/MeetingCentre.cs | 3.15625 | 3 | using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.ComponentModel;
using System.Linq;
using System.Runtime.CompilerServices;
using System.Text;
using System.Threading.Tasks;
namespace Semestralka
{
public class MeetingCentre : INotifyPropertyChanged
{
... |
c6dc547475d549e5efbbbbbdcfa4f4ceaca361fe | C# | nguyenngocduybao/QLTVVer2 | /FirstVer29062018/QLTV/Data/DAO/TheDocGiaDAO.cs | 2.515625 | 3 | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Data.Dtos;
using Data.Model;
using Data.DTO;
namespace Data.DAO
{
public class TheDocGiaDAO
{
#region Instance
private static TheDocGiaDAO instance;
public static T... |
ff313e9a9003eec79c07012f870b305f4821ef39 | C# | Gnico10/is-LaSandwicheria | /La Sandwicheria/La Sandwicheria.Capa Transversal/Sesion.cs | 2.546875 | 3 | using La_Sandwicheria.Modelo.Dominio;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace La_Sandwicheria.Capa_Transversal
{
public class Sesion
{
public string Usuario { get; set; }
public string Contraseña { get; set;... |
bc6dd79da4eb45cb47978862ecd679d8ce2179c6 | C# | YorkCodeDojo/MarsLander-July2019 | /David_Gareth_cSharp/MarsLander/Rover.cs | 3.328125 | 3 | using System;
namespace MarsLander
{
public class Rover
{
public Coordinate Location { get; private set; }
public Direction Direction { get; private set; }
public Rover(Direction startDirection = default)
{
Direction = startDirection;
}
public void... |
ccceba66bc8ecf87052814f36d98dda0b9c7423a | C# | KeithVanderzanden/GuitarArranger | /GuitarArranger/GuitarArranger/Models/Note.cs | 3.125 | 3 | using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Text;
using System.Web;
namespace GuitarArranger.Models
{
public class Note
{
public List<Tone> Tones{ get; set; }
public List<TabTone> TabTones { get; set; }
... |
4aca69ab4ad0d371cde206a8e31a18f83dbdb958 | C# | GuillaumeCreusot/SaleVeau | /Fichier.cs | 3.03125 | 3 | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.IO;
namespace SaleVeau
{
public static class Fichier
{
/// <summary>
/// Obtenir le chemain d'accés du directory Save
/// </summary>
... |
2b2003d3b7e46fe78bce858e6a4ea52333a50abb | C# | TheTeamTeam/CourseProject | /CourseProject/CourseProject.Data/UnitsOfWork/UnitOfWork.cs | 2.8125 | 3 | using System;
namespace CourseProject.Data.UnitsOfWork
{
public class UnitOfWork : IUnitOfWork
{
private readonly IAdsHubDbContext dbContext;
public UnitOfWork(IAdsHubDbContext dbContext)
{
if (dbContext == null)
{
throw new ArgumentNullExceptio... |
1778576e03eb4974c0f0639bb15860550b8b3f72 | C# | ondfisk/C5.Concurrent | /C5.Concurrent/C5.Concurrent/IShared.cs | 3.140625 | 3 | using System;
namespace C5.Concurrent
{
/// <summary>
///
/// </summary>
/// <typeparam name="T"></typeparam>
public interface IShared<T>
{
/// <summary>
/// Atomically set this reduction variable to the given updated value if the current value equals the expected value.
... |
5e981563279ef7f05cc734352508f2cf87257e15 | C# | PedroDircksen/Triangulos | /Triangulos/ControladorTriangulo.cs | 3.078125 | 3 | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Triangulos
{
public class ControladorTriangulo
{
public bool Validar(Triangulo triangulo)
{
bool trianguloValido = true;
if(triangulo.lado1 > t... |
4cdb18068da43e4f4d6ba9ff2b3394c2582c9577 | C# | alexanderstrib/OperationalTransformation | /OperationalTransformation/Operations.cs | 3.25 | 3 | using System;
using System.Collections.Generic;
using OperationalTransformation.Builders;
namespace OperationalTransformation
{
public class Operations
{
private readonly OperationsTableBuilder _operationsTableBuilder;
public Operations()
{
_operationsTableBuilder = new OperationsTableBuilder(... |
1e4334e76dd7f284b447817ad45f8a2b74b5997c | C# | amris2000/MasterThesis | /MasterThesis/Models/NonLinearRate.cs | 2.78125 | 3 | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace MasterThesis
{
/* --- General information
* The contents of this file is not used within
* the masters thesis.
*/
public interface INonLinearRateModel
{
vo... |
dab34b379bef2bd5cb35be0bad6caae8bc1f3c31 | C# | dhon2407/LSW-alpha | /LittleSimWorld/Assets/Scripts/Inventory/Containers/Storage.cs | 2.578125 | 3 | using System.Collections.Generic;
using System.Linq;
using UnityEngine;
using UnityEngine.UI;
namespace InventorySystem
{
public abstract class Storage : MonoBehaviour
{
public abstract void Open(ItemList data);
public abstract void Close();
public ItemList Itemlist => GetItemlist();
... |
1e4bee31922eff121349ca6382e4a1c461b9d7e7 | C# | nofuture-git/31g | /trunk/Code/NoFuture/Util/NfConsole/InvokeCmdBase.cs | 2.734375 | 3 | using System.Diagnostics;
using System.Text;
using Newtonsoft.Json;
namespace NoFuture.Util.NfConsole
{
/// <summary>
/// A concrete implementation of the calling assembly side's
/// invocation of a command on a remote console.exe.
/// </summary>
public abstract class InvokeCmdBase
{
p... |
5d26b432338f06f478dc260d6e36e6e6c1e951a1 | C# | tomkennedycode/random-lyric-twitter-bot | /Services/YoutubeService.cs | 2.8125 | 3 | using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.Logging;
using yungleanlyrics.Interfaces;
using Google.Apis.Services;
using Google.Apis.YouTube.v3;
using Google.Apis.YouTube.v3.Data;
using System.Linq;
namespace yungleanlyrics.Services
{
public class YoutubeService : IYoutubeService
{
... |
ab183423c82b3cdb6ef9573de90fd3c1185b9c6b | C# | ZeroInfinite/hdinsight-storm-dotnet-event-correlation | /CorrelationTopology/CorrelationTopology/Spout.cs | 2.609375 | 3 | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.IO;
using System.Threading;
using Microsoft.SCP;
using Microsoft.SCP.Rpc.Generated;
namespace CorrelationTopology
{
public class Spout : ISCPSpout
{
//Context for this component
private Context c... |
79dbadaf71a68de0acf5211765ba4d99aca41b0f | C# | Emmabyrne36/ProjectEulerSolutions | /ProjectEuler/AlternativeSolutions.cs | 3.515625 | 4 | using System;
using System.Collections.Generic;
using System.Text;
namespace ProjectEuler
{
class AlternativeSolutions
{
#region ProjectEuler2
public static int Fib(int n)
{
return n <= 1 ? n : Fib(n - 1) + Fib(n - 2);
}
public static List<int> series = new... |
3711550d2fb4c4bb183da69dc1c77fcdabcf3630 | C# | Cactus-Blade/Cactus.Blade.Core | /Core/System.Int64/System.BitConverter/Int64.Int64BitsToDouble.cs | 3.390625 | 3 | using System;
public static partial class Extension
{
/// <summary>
/// Converts the specified 64-bit signed integer to a double-precision floating point number.
/// </summary>
/// <param name="value">The number to convert.</param>
/// <returns>A double-precision floating point number whose va... |
21eebb05e2dd3329d26b5c27c68df47a108b4ed4 | C# | Sethcbs/SwampTrollPortfolioProject | /PortfolioProjectFiles/PlantMonsterHealth.cs | 2.625 | 3 | using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class PlantMonsterHealth : MonoBehaviour
{
public int currentHealth;
public int maxHealth = 100;
public Animator animator;
public GameObject plant;
public float deathDelayTime;
private void Start()
{
... |
d8f56cae6caf540327db75bee8669851e2f5ec3a | C# | Rafigi/web-api-testing | /Example.Api/Middlewares/ExceptionMiddleware.cs | 2.75 | 3 | using System;
using System.Net;
using System.Threading.Tasks;
using Example.Api.Utils;
using Example.Common.Exceptions;
using Microsoft.AspNetCore.Http;
using Serilog;
namespace Example.Api.Middlewares
{
public class ExceptionMiddleware
{
private readonly RequestDelegate _next;
public Exceptio... |