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 |
|---|---|---|---|---|---|---|
2b949b18462e4b1024f220cea9677d7899d34b2d | C# | l-Korrra-l/OOP_4sem | /Lab_01/Lab_01/Form1.cs | 2.71875 | 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.Drawing;
namespace Lab_01
{
public partial class Calculator : Form
{
public... |
b75b0582612f14630a6261083916df19f57fdde8 | C# | paultyng/ObjectDiff | /ObjectDiff/ReadableDiffExtensions.cs | 2.84375 | 3 | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace ObjectDiff
{
public static class ReadableDiffExtensions
{
const string ReadablePropertySeparator = " - ";
const string ReadablePropertyValueSeparator = ": ";
public static string ReadableD... |
961b554f68a628c6389e96691177c27fe256b563 | C# | r-petrov/OOP-Course | /05.Lab/Skeleton/MassEffect/Engine/Commands/AttackCommand.cs | 2.984375 | 3 | using System;
using System.Linq;
using MassEffect.Exceptions;
namespace MassEffect.Engine.Commands
{
using MassEffect.Interfaces;
public class AttackCommand : Command
{
public AttackCommand(IGameEngine gameEngine)
: base(gameEngine)
{
}
public override void Ex... |
531f0ae83754bd1df85c45128a0a0364bd3db6a5 | C# | talwinder1508/HareAndTortoise | /SharedGameClasses/HareAndTortoiseGame.cs | 3.25 | 3 | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Diagnostics;
using System.Drawing;
using System.ComponentModel; // for BindingList.
namespace SharedGameClasses {
/// <summary>
/// Plays the game
/// </summary>
public class HareAndTortoiseGame {
... |
b8841d0040b5ac43079a27f928e4f1893debcf5f | C# | DmitryMaltsev/dotnet-courses-2020 | /Maltsev_DmitryTask_03/Task3/Program.cs | 3.671875 | 4 | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Task3
{
class Program
{
static void Main(string[] args)
{
Console.CursorVisible = false;
int[] Array = ArrayInput();
int SummIndex =... |
f1850f9a0d15b36e86960077a66d8c5545b2dec3 | C# | apranovich/ElasticUploadClient | /Upload/ValueHelpers.cs | 3.171875 | 3 | using System;
using System.Collections.Generic;
using System.Linq;
using ESDotNetClient.Model;
namespace ESDotNetClient
{
public static class ValueHelpers
{
static Random random = new Random();
public static User GenerateUser(string id)
{
return new User {
... |
f49b1f1bb5a2d68964891bb91355ad4bbdf7fb8b | C# | dsacdalan/leet-code | /LeetCode.Service/DeleteFromArray.cs | 3.03125 | 3 | namespace LeetCode.Service
{
public partial class Solution
{
public int RemoveDuplicates(int[] nums) {
if (nums.Length == 0) return 0;
var iter = 0;
for(int i = 1; i < nums.Length; i++)
{
if (nums[i] != nums[iter])
{
... |
81829f008964192940e3e3c1c684b3be1191024b | C# | Williams-Nisha/Group1-PetApp | /PetApp/Models/SeedData.cs | 2.796875 | 3 | using Microsoft.EntityFrameworkCore;
using Microsoft.Extensions.DependencyInjection;
using System;
using System.Linq;
namespace PetApp.Models
{
public static class SeedData
{
public static void Initialize(IServiceProvider serviceProvider)
{
using (var context = new PetAppContext(
... |
18322e50ff26be33ce96bd170d4a3a78a7dfe5e8 | C# | beyta/XamarinWaktuSolat | /WaktuSolat.Droid/WaktuSolat.Droid/MainActivity.cs | 2.75 | 3 | using Android.App;
using Android.OS;
using System.Net;
using System.IO;
using System;
using System.Json;
using System.Threading.Tasks;
using Android.Content;
using Android.Runtime;
using Android.Views;
using Android.Widget;
namespace WaktuSolat.Droid
{
[Activity(Label = "Waktu Solat", MainLauncher = true, Icon ... |
9426bd35f38b763d47d0e59d9b93c8bba17ac3fc | C# | shendongnian/download4 | /code2/289081-11167545-25900405-1.cs | 2.671875 | 3 | protected override void OnPreviewTextInput(TextCompositionEventArgs e)
{
char c = Convert.ToChar(e.Text);
if (Char.IsNumber(c))
e.Handled = false;
else
e.Handled = true;
base.OnPreviewTextInput(e);
... |
2bad43a0677942fbbfae24500e47252e84cdb3ba | C# | luiscelestino/AprendendoCSharp | /AprendendoCSharp/09D-Exercicio/Program.cs | 3.09375 | 3 | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace _09D_Exercicio
{
class Program
{
static void Main(string[] args)
{
double salario = 3300.0;
if (1900.0 <= salario && salario <= 2800.0)
... |
91c41fb7d06e9077e52ce1f4eab9b05d1692a2ca | C# | jerryrox/project-beats-game | /Configurations/EnvConfiguration.cs | 2.578125 | 3 | using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using Newtonsoft.Json;
namespace PBGame.Configurations
{
public class EnvConfiguration : IEnvConfiguration
{
public EnvType EnvironmentType { get; private set; }
public bool IsDevelopment => Environmen... |
3a9fbf9240b4bff8adb43dad0fe02690fded32e5 | C# | monishanandhakumar/.NET864 | /Day2/CsharpDAY2/Classes_and_Objects/PropertyEg.cs | 3.46875 | 3 | using System;
namespace Classes_and_Objects
{
// private variable of the class
class Mobile
{
//Read-Only Property or Accessor
public string MobileName { get; private set; }
public string Modelno { get; set; }
private int cost;
public int Cost
{
ge... |
3de18b1b1698bb2d9650d104f8771310e6d634eb | C# | AndetonAf/Desafio-WaProject-ECommerce.Dashboard | /WaProject.ECommerce.Dashboard.Data/Context.cs | 2.53125 | 3 | using Bogus;
using Microsoft.EntityFrameworkCore;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using WaProject.ECommerce.Dashboard.Data.Entities;
namespace WaProject.ECommerce.Dashboard.Data
{
public class DashboardContext : DbContext
{
public Dashbo... |
99cc0d1018446bd041ded88c0ea98e430c5fadab | C# | shendongnian/download4 | /first_version_download2/327863-27443884-79633879-10.cs | 2.625 | 3 | static void Main(string[] args)
{
var section = ConfigurationManager.GetSection("resources") as ResourceGroup;
foreach (ResourceItem item in section.Items)
{
Console.WriteLine(item.Title);
}
Console.ReadKey();
}
|
eb0ed4da6bca37098fd92f66476d8ebd40b87552 | C# | Vic0222/WeatherCheck | /src/WeatherCheck.Application/Features/Queries/CheckCurrentWeather/CheckCurrentWeatherHandler.cs | 2.515625 | 3 | using FluentValidation;
using MediatR;
using Microsoft.Extensions.Options;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
using WeatherCheck.Application.Options;
using WeatherCheck.Application.SeedWork.Exceptions;
using Weathe... |
42c0a6cc688e1ffe83d8767a9d094ce7a00664f0 | C# | OSRS/Oncor_OsrsLegacy | /Core/Osrs.Core/Osrs.Core/Runtime/MethodContract.cs | 2.65625 | 3 | //Copyright 2017 Open Science, Engineering, Research and Development Information Systems Open, LLC. (OSRS Open)
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
// http://www.apa... |
3ebbd4712fba67be3068a03d43f0f15ea760d3fa | C# | ajmortell/IHIGI | /Assets/SCRIPTS/Game/Desk/Computer/Mail/MailSections/ItemList.cs | 2.546875 | 3 | using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
using UnityEngine.EventSystems;
public class ItemList<MailItem>
{
MailItem[] items = new MailItem[1];
int count;
public void Add(MailItem item)
{
if (count == items.Length)
... |
2b9d3a202c17b904683d52da4a19268b856cab9e | C# | jsdanios/AsteroidMiner | /Asteroid Miner/Assets/Scripts/Item.cs | 2.59375 | 3 | using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class Item {
public enum ItemType {
//asteroids closest to star
Carbon,
Nitrogen,
Hydrogen,
Oxygen,
//silicate asteroids
//Oxygen,
Silicon,
//metallic a... |
c150d9126625bbe7714d2faa14bb353817e56973 | C# | monnster/Analytics | /Analytics.Core/Services/Impl/ParserService.cs | 2.59375 | 3 | using System;
using System.Collections.Generic;
using System.Data;
using System.Globalization;
using System.Linq;
using Analytics.Core.Data;
using Analytics.Core.Data.Entities;
using Analytics.Core.Data.Enums;
using Analytics.Core.Services.Interfaces;
using LinqToDB;
using NLog;
namespace Analytics.Core.Services.Impl... |
ad5bc005a141203dee2d1c5b9c98b9fe315b6393 | C# | simontruong/property-finder | /Services/SuburbHelper.cs | 2.71875 | 3 | using System.IO;
using System.Collections.Generic;
using System.Linq;
using HtmlAgilityPack;
public class SuburbHelper
{
public List<string> GetSuburbList(string filePath)
{
var suburbList = new List<string>();
var suburbLines = File.ReadAllLines(filePath);
foreach(var line in subur... |
daf95c90848afcaa153d2ec07ffa6584ca32cceb | C# | TheGameHackathon/team5 | /src/Services/GamesRepository.cs | 2.890625 | 3 | using System;
using System.Collections.Generic;
using thegame.Models;
namespace thegame.Services;
public class GamesRepository : IGamesRepository
{
private readonly IFieldGenerator _fieldGenerator;
private Dictionary<Guid, FloodFillGame> _activegames = new Dictionary<Guid, FloodFillGame>();
public GamesR... |
656f84a7f93f735442f6a058eab635c843792a52 | C# | NicDufour/Projet_Prog3_GestionDechets | /Properties/CheckNumber.cs | 3.28125 | 3 | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Projet_Gestion_Dechets.Properties
{
public static class CheckNumber
{
public static bool IsPair(Int32 n)
{
return (bool)((n & 1) == 1);//Retourn... |
b2defa3efbb2c240522118e3f6d7b01d7bb5db09 | C# | statiqdev/Statiq.Framework | /src/core/Statiq.Common/Events/AsyncEventHandler.cs | 2.65625 | 3 | using System;
using System.Threading.Tasks;
namespace Statiq.Common
{
/// <summary>
/// An asynchronous event handler.
/// </summary>
/// <typeparam name="TEvent">The type of event.</typeparam>
/// <param name="evt">The event instance.</param>
/// <returns>A task whose completion signals handl... |
36ecf092262e2ce11f9f43df49008ebaefcb3536 | C# | petr-kostelansky/tech-blog | /TechBlog.Core/Sitemap/SitemapGenerator.cs | 2.6875 | 3 | using System;
using System.Collections.Generic;
using System.Globalization;
using System.IO;
using System.Linq;
using System.Text;
using System.Text.RegularExpressions;
using System.Threading.Tasks;
using System.Xml;
using TechBlog.Contract.Models.Sitemaps;
namespace TechBlog.Core.Sitemap
{
public abstract class ... |
5ada642be5258fee7f34d8d8a434624cbe1b5561 | C# | NTVanGiang/Quiz | /Source/Server/Quiz.Entity/SubQuestion.cs | 2.671875 | 3 | using System;
using System.Data.SqlClient;
namespace Quiz.Entity
{
public class SubQuestion
{
private String id;
private String questionID;
private String content;
private String reportCount;
private String active;
//private String questionName;
public ... |
6866f76dca89e310cf4d5a3bfff41657a3e707bf | C# | doctav/SolvedProblems | /AppSolvedProblems/ConsoleApp1/Program.cs | 4.03125 | 4 | using System;
using System.Text;
namespace ConsoleApp1
{
class Program
{
static void Main(string[] args)
{
Console.WriteLine("Hello World! Here are some basic solved problems...\n");
SumOfThreeFromConsole();
GreastestOfFiveNumbers();
CirclePerime... |
5c005db7504bebfd8a3fe4ec254387ea834d5831 | C# | dendzamer/masterThesisWork | /Presentation/Read/ReadAlbum.cs | 3.09375 | 3 | using System;
using Domain.Interfaces;
using Domain.DTOs;
using Read.Enums;
using Read.Interfaces;
namespace Presentation.Read
{
public class ReadAlbum : IReader
{
private IAlbumDTO _album;
private bool _doneBool;
private Engine _engine;
private GetAllEngine _allEngine;
private AlbumFonogramEnum _izbor;
... |
871de6c3d8ef17a24a19295b59d47d550e2f4b5d | C# | Knsgf/SE-diff-throttling-WM- | /sparse_matrix.cs | 2.765625 | 3 | using System;
using System.Collections.Generic;
using System.Text;
using VRage.Utils;
namespace orbiter_SE
{
interface sparse_row_ref
{
double this[int column] { get; set; }
}
struct sparse_matrix
{
#region Row reference
private sealed class sparse_row: sparse_row_ref
... |
d2390f1f8b59347a7255c674101eabf36b3f1640 | C# | gregkalapos/HighPerformanceCodingInDotNet_Workshop | /Part3_MakeAppsFaster/01_Collections/Demo4_ListVsHashSet_BadHashCode/Program.cs | 3.296875 | 3 | using System;
using System.Collections.Generic;
using System.Diagnostics;
using BenchmarkDotNet.Attributes;
using BenchmarkDotNet.Running;
namespace Demo4_ListVsHashSet_BadHashCode
{
/// <summary>
/// This sample is the same as Demo3_ListVsHashSet_Lookup, but in this case the HashSet has a very inefficient GetHashC... |
f4ca1d5cf3125f4a6d4950dc1ec9cb183da44637 | C# | ltojong2222/ltojong2222.github.io | /ExplorableAreas/ExplorableAreas/Game.cs | 3.234375 | 3 | using System;
using System.Collections.Generic;
using static System.Console;
namespace ExplorableAreasI
{
class Game
{
List<Location> locations = new List<Location>();
Random random = new Random();
public Game()
{
Title = "Explore Time!";
Player.GetPlay... |
d88a7e92932401c42b8bf12aa063e602219b01dc | C# | shendongnian/download4 | /code5/821841-20216334-147471825-4.cs | 2.625 | 3 | using (HttpClient client = new HttpClient())
{
HttpResponseMessage response = await client.GetAsync(url);
string content = await response.Content.ReadAsStringAsync();
var statusCode = response.StatusCode;
}
|
dca6abea6aaf3dc947fc66bf1a09f9f142533c0c | C# | zdgeorgiev/TelerikAcademyProjects | /C#/C# II/SampleExam II/15. BombingCuboids/Bomb.cs | 2.84375 | 3 | using System;
public class Bomb
{
public int Width { get; set; }
public int Height { get; set; }
public int Depth { get; set; }
public int Power { get; set; }
public Bomb(int width, int height, int depth, int power)
{
this.Width = width;
this.Height = height;
this.Dept... |
f1d5342c0aa34bda26aae5465e16780fa46400eb | C# | InjectionMap/InjectionMap.Configuration | /src/InjectionMap.Configuration/MapElement.cs | 2.5625 | 3 | using System.Configuration;
namespace InjectionMap.Configuration
{
public class MapElement : ConfigurationElement
{
/// <summary>
/// The contract type that is used to mark the mapping
/// </summary>
[ConfigurationProperty("contract", IsKey = true, IsRequired = true)]
... |
717061e1164b82757e494e183117a5288240d22a | C# | nailya22225/Kurbangalieva_Nailya_11-708 | /2017/SPRING 2018/PS/semestr1/MyClass.cs | 3.34375 | 3 | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.IO;
using System.Collections;
namespace PS1
{
class Polinom
{
MyLinkedList<Syllable> syllables = new MyLinkedList<Syllable>() { };
//делает из строки массив коэффице... |
e886868e0b625ceaceb24e1c5af11019332afa8e | C# | rebider/ArenaFManagerAPI | /WitFX.MT4.Server/Implementation/ServerLogger.cs | 2.515625 | 3 | using System;
using System.Diagnostics;
using WitFX.Backend.Infrastructure.Logging;
using WitFX.MT4.Server.Implementation.Helpers;
namespace WitFX.MT4.Server.Implementation
{
internal sealed class ServerLogger
{
private readonly ILogger _logger;
private readonly string _prefix;
public... |
8b86c4408f93fd05f064c7c6534fec62e1b77b9d | C# | lp-isi/TP2 | /Business.Entities/Especialidad.cs | 2.734375 | 3 | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace Business.Entities
{
public class Especialidad : BusinessEntity
{
public Especialidad()
{
}
public Especialidad(string desc)
{
this.Descripcion = desc;
}
pu... |
dad83adb3ace308256cf45edfce8c5bff2fcceb9 | C# | byen1/365_Project_1 | /If2.cs | 3.1875 | 3 | /*
* CS365 Project 1
*
* Contributors:
* Austyn Simons
* Brandon Yen
* Charles Rizzo
*
* If2.cs creates an object of type If2 that has a Val property. The Val property gets the byte encoding of the following
* if commands: ifez, ifnz, ifmi, and ifpl.
*
*/
using System;
public class If2 : IInstruction{
int... |
ed92e7f270463e008fc1969086e44fe5cdddf525 | C# | Cristie/Open-XML-SDK | /src/DocumentFormat.OpenXml/Validation/Schema/CompositeParticleValidator.cs | 2.546875 | 3 | // Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
using System.Diagnostics;
namespace DocumentFormat.OpenXml.Validation.Schema
{
/// <summary>
/// Base class for composite particle - sequence, choice, all, gr... |
75ad23e8fd5af854fa5037019fa97d64c39c7f11 | C# | s7h/ConsoleBattleshipGame | /ConsoleBattleshipGame/GameSetup/BattlefieldSetter.cs | 3 | 3 | using ConsoleBattlefield.Exceptions;
using ConsoleBattlefield.Models;
using System;
using System.Collections.Generic;
using System.Linq;
namespace ConsoleBattlefield.GameSetup
{
public class BattlefieldSetter : IBattlefieldSetter
{
public bool CanPlaceShipsOnTheBattlefield(Ship[] ships, out ... |
97150f5cb7d13faec7c02ff6ecbfa00a6f8c83b1 | C# | Eduardoitt/Estructura-de-Datos | /Estructura/Unidad1/Tarea2/Tarea2/Program.cs | 3.671875 | 4 | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Tarea2
{
class Program
{
static void Main(string[] args)
{
//Escobedo Díaz Jesús Eduardo 16210519
//Unidad 1. Introducció... |
721cd42fc6e4fabc04d019e5892776035fe4e6e7 | C# | sbully/TP_ABC_Dev | /Devoldere.Gists.GistSerializer/Devoldere.Gists.GistSerializer/AppDataManager.cs | 2.640625 | 3 | using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.IO;
namespace MDevoldere.Tools.Serializer
{
public class AppDataManager<T>
{
string dirName;
public string BinPath { get; protected set; }
public string XmlPath { get; protected set; }
... |
20810d6eace193aa686d688d93ace721eb1e79b7 | C# | mhs294/Csharp | /ChessAI/ChessMove.CS | 2.890625 | 3 | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
// stores a move with detailed information
class ChessMove
{
// default constructor
public ChessMove()
{
move = NULL_MOVE;
}
// copy constructor
public ChessMove(ChessMove cm)
{
this.move = cm... |
4595af061c4904cdb366c66cd467e9c199f29e09 | C# | Pholith/ONI-Mods | /src/EmptyWorlds/PHO_STRINGS.cs | 2.953125 | 3 | namespace EmptyWorlds
{
public static class PHO_STRINGS
{
public static LocString SPACE_HOLE_NAME = "Holes";
public static LocString SPACE_HOLE_DESC = "This world is completely full of holes and emptiness everywhere.";
public static LocString E_NAME = "Emptera";
public static L... |
e1ef3cfa85445a9fb0f88d2766046455c5d9f874 | C# | dotnet/winforms | /src/System.Windows.Forms/src/System/Windows/Forms/AmbientProperties.cs | 2.59375 | 3 | // Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
using System.Drawing;
namespace System.Windows.Forms;
/// <summary>
/// Provides ambient property values to top-level controls.
/// NOTE: internally, this class does double duty... |
d249200cc320d07fa1b9a5d7c4754bcff77d9650 | C# | Tolkata99/Fundamentals-CSharp-II | /balance/COINS/Program.cs | 3.359375 | 3 | using System;
namespace COINS
{
class Program
{
static void Main(string[] args)
{
double change = double.Parse(Console.ReadLine());
double count = 0;
double changeInCoins = Math.Floor(change * 100);
while (changeInCoins != 0)
{
... |
1a3a53c4c68f4abad23810def40340e44dbc3962 | C# | yuddis/ToyotaReminderApp | /ToyotaDAL/DAL.cs | 2.515625 | 3 | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data;
using System.Data.OleDb;
namespace ToyotaDAL
{
public class DAL
{
// SALES DAL ---------------------------------------------------------------------------------------------------------------------
... |
d86e736fcd3e0871b96b2dbf00895324b3fee18f | C# | AidarovKiril/FundamentalsExtended2017 | /DataTypes - Exercises-06.06.2017/15.Calculator/Calculator.cs | 3.796875 | 4 | using System;
class Calculator
{
static void Main()
{
int leftOperand = int.Parse(Console.ReadLine());
char function = Console.ReadLine()[0];
int rightOperand = int.Parse(Console.ReadLine());
switch (function)
{
case '+':
Console.WriteLine(... |
3760de071835d3f7da8a2b1a17a581bd3964f6a5 | C# | crac2003/weather-api-test | /WeatherApiTest/Weather.Domain/Services/WeatherService.cs | 2.84375 | 3 | using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Weather.Domain.Models;
using Weather.Domain.Models.Requests;
namespace Weather.Domain.Services
{
public class WeatherService : IWeatherService
{
private readonly IWeatherDataProvider _weatherDataProv... |
9dc4d81588c9c09e7f9d28406cd00292f3dae5cf | C# | asizikov/repository-pattern-with-query | /src/ConsoleApplication2/Domain/SimpleFetchStrategy.cs | 2.90625 | 3 | using System;
using System.Linq;
namespace ConsoleApplication2.Domain
{
public class SimpleFetchStrategy<T> : IFetchStrategy<T> where T : class
{
private Func<IQueryable<T>, IQueryable<T>> Action { get; set; }
public SimpleFetchStrategy(Func<IQueryable<T>, IQueryable<T>> action)
... |
c94afd3788b93e80c8f2ffa6dee927f11010c108 | C# | terjetyl/CardGames | /CardGames/Round.cs | 3.671875 | 4 | using System;
using System.Collections.Generic;
using System.Linq;
namespace CardGames
{
public class Round
{
private readonly int _playerCount;
public Round(int playerCount)
{
_playerCount = playerCount;
}
private readonly List<Tuple<Player... |
13867a2cdf02a55d0974a62767c824ebaf68d9b5 | C# | DmitrijsRuskovs/Training01 | /csharp-basics/exercises/Arithmetic/SumAverageRunningInt1/Program.cs | 4.03125 | 4 | using System;
namespace SumAverageRunningInt
{
class Program
{
static void Main(string[] args)
{
long sum = 0;
const int lowerBound = 1;
const int upperBound = 100;
for (int number = lowerBound; number <= upperBound; ++number)
{
... |
d2a3675a543ee61756c9e9c823963646f2cf85b1 | C# | TD826/baseProject | /baseProject/Assets/Gacha/Script/CoinData.cs | 2.5625 | 3 | using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class CoinData : SingletonMonoBehaviour<CoinData>
{
private int coin;
private static int paidCoin;
// 無償コインのプロパティ
public int Coin
{
get
{
if(coin <= 0)
{
re... |
0a2397ab2da132da410b37838cb8b5f465933242 | C# | awebeer256/prog30493-1171_4655-spaceinvaders | /Assets/Script/EnemyBulletLogic.cs | 2.515625 | 3 | using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class EnemyBulletLogic : MonoBehaviour {
/*
* This class is designed to destory the enemybullet when it collides with anything
* will check to see if bullet hits: shields or Player
* if shield - destory whichever cube was hi... |
92900383539ecd5dad5291890506f6d585c4e96f | C# | BGCX261/zpoc3-svn-to-git | /trunk/ZPoC/FlowLib/Containers/PrivateMessage.cs | 2.546875 | 3 |
/*
*
* Copyright (C) 2009 Mattias Blomqvist, patr-blo at dsv dot su dot se
*
* This program 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 the License, or
* (at your option... |
6c4c679e21cf9e01ffa334ed84ad7efbeb260591 | C# | dotnet/runtime | /src/coreclr/tools/Common/Internal/Text/Utf8StringBuilder.cs | 3.015625 | 3 | // Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
using System;
using System.Text;
using System.Diagnostics;
namespace Internal.Text
{
public class Utf8StringBuilder
{
private byte[] _buffer = Array.Empty<byte>();
... |
7a878386862bd1397b47ec50022b453cc93f7262 | C# | jack2gs/melon | /com.melon.core/src/main/Com.Melon.Core/Domain/Entity.cs | 3.296875 | 3 | using Com.Melon.Core.Infrastructure;
using System;
namespace Com.Melon.Core.Domain
{
public abstract class Entity<T>: DomainObject, IEquatable<T>, IEntity
where T : Entity<T>
{
protected Entity(int id)
{
Id = id;
}
protected Entity():this(0)
... |
ab156c0abd7c73ac7a1d50bfafed96b922c50d70 | C# | antonkaster/Antonkaster.MqWorks | /MqConsole/Program.cs | 2.75 | 3 | using Antonkaster.MqWorks;
using Antonkaster.MqWorks.MqClient;
using Antonkaster.MqWorks.MqServer.BasicListener;
using Antonkaster.MqWorks.MqServer.BasicRpcServer;
using RabbitMQ.Client;
using System;
using System.Text;
namespace MqConsole
{
class Program
{
static void Main(string[] args)
{
... |
95abab4b4824fc7e38d7d8adf8642774f6b0bf65 | C# | mugatu9/NT_Terminal | /NT_Terminal/Interface.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;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace NT_Terminal
{
public partial class Interface : Form
{
... |
6a56d6f0500b18bf307e1304ae2c47bb66a10b6b | C# | Hostur/Games-Core | /Assets/_Scripts/MVVM/Controls/DataSource.cs | 2.96875 | 3 | using System;
using System.Collections.Generic;
namespace MVVM.Controls
{
public class DataSource<T>
{
public List<T> Data { get; private set; }
public T Active { get; private set; }
public void ViewSelection(int index)
{
if (index >= Data.Count)
throw new Exception("Invalid operat... |
f2500aca5d98dfbd0e5d5f9592ecec6e214353ac | C# | ICC3101-201810/movies-Vicentecorrea | /Lab/VistasLab/BuscarForm.cs | 2.53125 | 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 Lab;
namespace VistasLab
{
public partial class BuscarForm : Form
{
public event E... |
a70c78ae47666e923ebbdfc1a9d0bda2c96bd527 | C# | IbrahimNatchee/2DStarWars | /Assets/_Scripts/PlayerController.cs | 2.546875 | 3 | /*Source File name PlayerController
* Author's Name yours truly Ibrahim Natchee (Abraham)
* StudentID 300767752
* Date Last Modified 10/22/2016
* last modified by again Ibrahim Natchee
* program descirption is simply the controllers by what the plaayer is supposed to be acting on and how the mouse follows
* Revi... |
4740055db4242573c02dd10efd7f27618a77db8e | C# | MiguelAlen/PRG | /T1/ej6.6.1/PersonaInglesa.cs | 2.921875 | 3 | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ej6._6._1
{
public class PersonaInglesa:Persona
{
public void TomarTe()
{
Console.WriteLine("Estoy tomando té");
}
public new void Saludar()... |
e8d8f0c279bcdde3ebd6134d31312ba4ae0fde38 | C# | forsbergsskola-se/gp20-2021-0426-rest-gameserver-Jackoberto | /GitHubBrowser/Data/License.cs | 2.78125 | 3 | using System.Text;
namespace GitHubBrowser.Data
{
public class License : ILicense
{
public string Key { get; set; }
public string Name { get; set; }
public string SpdxId { get; set; }
public string Url { get; set; }
public string NodeId { get; set; }
public ove... |
11316d7826f0cd00b7d2fe4521dd80dc7faba0d8 | C# | drab0wl/CognitiveComplexityAnalyzer | /CognitiveComplexity/CognitiveComplexity/ExpressionSyntaxHelper.cs | 3.03125 | 3 | using Microsoft.CodeAnalysis.CSharp.Syntax;
using Microsoft.CodeAnalysis.CSharp;
using System.Collections.Generic;
using System.Linq;
namespace CognitiveComplexity
{
internal static class ExpressionSyntaxExtensions
{
public static IEnumerable<BinaryExpressionSyntax> FlattenBinaryExpression(this Expres... |
643c0ae9161fa2bd3fc12d6d2b207691a633b679 | C# | RajeevArora93/Projects | /ComparingElements/ComparingElements/DvdPriceComparator.cs | 2.984375 | 3 | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ComparingElements
{
public class DvdPriceComparator : IComparer<Dvd>
{
public int Compare(Dvd dvd1, Dvd dvd2)
{
if (dvd1.price < dvd2.price)
{
... |
1b833ba9332a0d7286a2b821d3ca5c4324ee1201 | C# | Miguel-Bit-Debug/Programacao-com-csharp | /aula36/aula36.cs | 3.15625 | 3 | using System;
public class Veiculo { // Base
public int velAtual;
private int velMax;
protected bool ligado;
public Veiculo(int velMax) {
velAtual = 0;
this.velMax = velMax;
ligado = false;
}
public bool getLigado() {
return ligado;
}
public int getVel... |
93883cfe4d6c1ce7b0538e24bf5319d85efb2998 | C# | Maumov/Simple_2D_RTS | /Assets/Scripts/Camera/CameraMovement.cs | 2.609375 | 3 | using UnityEngine;
using System.Collections;
using System.Security.Cryptography;
public class CameraMovement : MonoBehaviour {
public float MaxZoomIn = 1f;
public float MaxZoomOut = 10f;
public float ZoomSpeed = 0.5f;
public float XYSpeed = 10f;
Camera cam;
float vertical;
float horizontal;
float InOut;
Vec... |
77dc69a7bbb094f749a6e1c1004ed82cf4e794dd | C# | tpeczek/Lib.AspNetCore.ServerSentEvents | /Lib.AspNetCore.ServerSentEvents/IServerSentEventsClient.cs | 2.671875 | 3 | using System;
using System.Threading;
using System.Threading.Tasks;
using System.Security.Claims;
namespace Lib.AspNetCore.ServerSentEvents
{
/// <summary>
/// Contract for client listening for Server-Sent Events
/// </summary>
public interface IServerSentEventsClient
{
#region Properties
... |
456cf5b6e6a93dffbd6c6decb8e0f86c4f7d742a | C# | heldersepu/Swagger-Net-Test | /Swagger_Test/Controllers/CustomEnumerableController.cs | 2.859375 | 3 | using System;
using System.Collections;
using System.Collections.Generic;
using System.Web.Http;
namespace Swagger_Test.Controllers
{
public class CustomEnumerableController : ApiController
{
// GET: api/CustomEnumerable
public MyEnumerable Get()
{
var data = new MyEnumerab... |
1ab68c0674048114703d620fd3db3017e779f78a | C# | twifno/algorithm-puzzles | /leetcode/490-the-maze.cs | 3.5 | 4 | //https://leetcode.com/problems/the-maze/
//BFS
public class Solution {
class Point {
public int X;
public int Y;
public Point(int x, int y){
X = x;
Y = y;
}
}
public bool HasPath(int[][] maze, int[] start, int[] destination) {
int l0 = ... |
83b69bd2f638c512385ae561966109f26999fdfe | C# | renupetori/Ohjelmointia | /Funktio ja aliohjelma/Teht 1/Program.cs | 3.1875 | 3 | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Teht_1
{
class Program
{
public static void Main(string[] args)
{
Console.WriteLine("Syötä luku: ");
int luku = int.Parse(Console.ReadLine());
... |
bd67d290ab34a7c41fa81ab43a2622ed92b5f3ca | C# | ChrisMcMunn/Effective_Teamwork_Prototype | /Assets/Scripts/Character Customization/Head_Swap.cs | 2.515625 | 3 | using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class Head_Swap : MonoBehaviour
{
public GameObject HeadLeft;
public GameObject HeadRight;
public List<Sprite> Head = new List<Sprite>();
void Start()
{
gameObject.GetComponent<SpriteRenderer>().sprite ... |
cb482cca9993f4b228e7c57ae8c2ad346bc8f09d | C# | LostCodeStudios/SpaceHordes | /GameLibrary/Helpers/Input/PlayerIndexEventArgs.cs | 2.671875 | 3 | #region Using Statements
using Microsoft.Xna.Framework;
using System;
#endregion Using Statements
namespace GameLibrary.Input
{
/// <summary>
/// Custom event argument which includes the index of the player who triggered
/// the event.
/// </summary>
public class PlayerIndexEventArgs : EventArgs... |
45fbd1954c501696ef480293a565ca2f1ec8ca82 | C# | meikb/fightthelandlord | /FightTheLandLord/FightTheLandLord/Server.cs | 2.609375 | 3 | using System;
using System.Collections.Generic;
using System.Text;
using System.Net;
using System.Net.Sockets;
using System.IO;
using System.Threading;
namespace FightTheLandLord
{
public class Server
{
/// <summary>
/// 监听对象
/// </summary>
public TcpListener lis... |
1e1e7313b753138409f1cccc853728b9ccd2640d | C# | Spinit-AB/Spinit | /src/Spinit.Data.Export/Implementations/Csv/CsvFileExporter.cs | 2.546875 | 3 | using System.Collections.Generic;
using System.IO;
using System.Text;
using Spinit.IO.Factories;
namespace Spinit.Data.Export.Implementations.Csv
{
public class CsvFileExporter : CsvExporter, IFileExporter
{
private readonly IFileStreamFactory _fileStreamFactory;
public CsvFileExporter(IExpor... |
90e8d2e7f43619cd1785d016abdb6407c8a3cb1b | C# | MitkoZ/NewsWebsite | /NewsWebsite/Utils/ControllersExtensionMethods.cs | 2.859375 | 3 | using Microsoft.AspNetCore.Mvc;
using System.Security.Claims;
namespace NewsWebsite.Utils
{
public static class ControllersExtensionMethods
{
/// <summary>
/// A way to get the controller name without the "Controller" suffix
/// </summary>
/// <param name="controllerBase">The c... |
b36aaa74b6147da4e46b8de4033b8cab16a149c1 | C# | shendongnian/download4 | /latest_version_download2/170523-35306444-110487512-8.cs | 3.375 | 3 | public sealed class ObjectPool<T>
{
private readonly Queue<T> __objects;
public ObjectPool(IEnumerable<T> items)
{
__objects = new Queue<T>(items);
}
public T Get()
{
lock (__objects)
{
while (__objects.Count == ... |
a5e79ce1c81e62e00a666dda7c732a262fde743c | C# | osmel-techcm/k9erp-filemanagerapi | /fileManagerInfrastructure/Repositories/FileItemRepo.cs | 2.8125 | 3 | using fileManagerCore.Entities;
using fileManagerCore.Interfaces;
using fileManagerInfrastructure.Data;
using Microsoft.EntityFrameworkCore;
using System;
using System.Linq;
using System.Threading.Tasks;
namespace fileManagerInfrastructure.Repositories
{
public class FileItemRepo : IFileItemRepo
{
pri... |
0e0957dc433752329fb5e63a902c9492d9ba32da | C# | radicalgeek/DruidcraftCalendar | /DruidCraftCalendar/ElementDrawer.cs | 2.953125 | 3 | using System;
using SkiaSharp;
using Xamarin.Forms;
using SkiaSharp.Views.Forms;
namespace DruidCraftCalendar
{
public class ElementDrawer
{
public static CircleShape GetPegPointTemplate(SKImageInfo info)
{
var pegPoint = new CircleShape();
pegPoint.Radius = (info.Width... |
4632c98cb2abd6bed9131ff992c93c319b5369ee | C# | MohitJain02/RestfulApi | /src/Library.API/Helpers/RequestHeaderMatchesMediaTypeHeaderAttribute.cs | 2.828125 | 3 | using Microsoft.AspNetCore.Mvc.ActionConstraints;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
namespace Library.API.Helpers
{
[AttributeUsage(AttributeTargets.All, Inherited = true, AllowMultiple = true)]
public class RequestHeaderMatchesMediaTypeHeaderAttr... |
e35e5bd72794ba436ddbf4a98e574da166c19bb9 | C# | TheNephalim/Project_Euler | /Project_Euler_Problem_02/Program.cs | 3.78125 | 4 | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace Project_Euler_Problem_02 {
class Program {
static void Main(string[] args) {
Console.WriteLine(string.Format("The result is {0}.", Euler_Problem_02.GetEulerValue()));
}
}
public sta... |
a6188d96dc9c82ab9186f93a8299acae9a463ee4 | C# | AAstrup/Captain-of-the-Sea | /Assets/Scripts/Shop/Purchases/ShopIAPOfferComponent.cs | 2.53125 | 3 | using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
/// <summary>
/// Keeps references to elements that will have injected values
/// That is prices of the IAP and the buy button
/// </summary>
public class ShopIAPOfferComponent : MonoBehaviour {
pub... |
456c28be9830379feb4197f97d4bf81bf7e7b91c | C# | shendongnian/download4 | /code9/1639900-46339381-156651671-4.cs | 2.796875 | 3 | public class Cargo
{
[XmlAttribute]
public int Id { get; set; }
[XmlAttribute]
public string Name { get; set; }
}
[XmlRoot("A")]
public class A : List<Cargo>
{
}
class Program
{
static void Main(string[] args)
{
Xml... |
73d53bd1772d0b3bd54b8c23123f946355f923e0 | C# | Masuka606/Fuhrparkverwaltung | /Fuhrparkverwaltung/Fuhrparkverwaltung/Verwaltung.cs | 3.140625 | 3 | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Fuhrparkverwaltung
{
class Verwaltung
{
public static void AusgabeAllerDaten(List<Fahrzeug> alleFahrzeuge)
{
Console.WriteLine("\n\nEs... |
a5c09d4ab91bd554fa0faa1d87f0ca66ad13fe8e | C# | xiaomailong/Study | /V2/MMICommon/CommonUtil/Controls/Button/GDIButton.cs | 2.53125 | 3 | using System;
using System.Diagnostics;
using System.Drawing;
using CommonUtil.Util;
namespace CommonUtil.Controls.Button
{
/// <summary>
/// 类似 Button 的控件
/// </summary>
[Serializable]
[DebuggerDisplay("Text = {Text}")]
public class GDIButton : CommonInnerControlBase
{
/// <summa... |
ce00bfe85c4e20ff140360c5b345b97e0338834c | C# | danimsrocha/performance-aspnet-core-2.0 | /PerformanceApi/PerformanceApi/Controllers/ValuesController.cs | 2.796875 | 3 | using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Mvc;
using Microsoft.Extensions.Caching.Memory;
namespace PerformanceApi.Controllers
{
[Route("api/[controller]")]
public class ValuesController : Controller
{
private IMemor... |
e1932ee6780a89302edbb536474e2fa20cc97c44 | C# | knautilus/Fibo | /Fibo.Storage/DictionaryStorage.cs | 3.015625 | 3 | using System.Collections.Concurrent;
using System.Collections.Generic;
namespace Fibo.Storage
{
public class DictionaryStorage<TKey, TValue> : IStorage<TKey, TValue>
{
private readonly IDictionary<TKey, TValue> _storage = new ConcurrentDictionary<TKey, TValue>();
public TValue GetValue(TKey k... |
cd867ccda2bd8a81d8983a452847e34e84357bc7 | C# | mecozb/Regex | /Regex_TarihYakalama/Form1.cs | 2.921875 | 3 | using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Text.RegularExpressions;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace Regex_TarihYakalama
{
public partial class Form1 : F... |
439f17ef49a8861f193cc585ff61e7da5173e2ac | C# | shendongnian/download4 | /first_version_download2/44907-2566140-5246046-2.cs | 2.859375 | 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;
namespace DoubleBufferTest
{
public partial class Form1 : Form
{
pri... |
df826497b12990d5dd8b3e715bfc94b7578d9430 | C# | swishcloud/181107 | /Test181107.Core/MessagePayload.cs | 2.609375 | 3 | using System;
using System.Collections.Generic;
using System.Net.Sockets;
using System.Text;
namespace Test181107.Core
{
public abstract class MessagePayload
{
public Header Header { get; set; }
protected virtual byte[] ReceiveBatch(NetworkStream networkStream, int batchMaxLength)
... |
0b771cfc1d55cd75388ba14e2c0b0a57486824c8 | C# | nikita262001/Delivered | /C#Update (2 семестр)/Work8_LINQ/Work8_LINQ/Person.cs | 3.0625 | 3 | using System;
using System.Collections.Generic;
namespace Work8_LINQ
{
public class Person
{
string name;
string surname;
int yearOfBirth;
Dictionary<string, int> dictionary = new Dictionary<string, int>();
public string Name { get => name; set => name = value; }
... |
492a687861ca8f2034a5db8ed6b577d12c73f75b | C# | arturchique/OOPLabs | /laba4_1_oop/laba4_1_oop/laba4_1_oop/Program.cs | 3.875 | 4 | using System;
namespace laba4_1_oop
{
abstract class AbstractClass
{
protected int data;
public AbstractClass()
{
Console.WriteLine("Constructor of AbstractClass");
}
public abstract void Method();
}
class A : AbstractClass
{
... |
fe69cb394d6092f442a1806ba4f8e4035fa27d0b | C# | californiawz/Unity-Azure-Network-Engine | /Core/ReliableUdp/UdpPeerCollection.cs | 2.875 | 3 | using System.Collections.Generic;
namespace ReliableUdp
{
public class UdpPeerCollection
{
public int MaxPeers { get; set; }
private readonly Dictionary<UdpEndPoint, UdpPeer> peersDict;
private readonly Dictionary<long, UdpPeer> idPeersDict;
private readonly List<UdpPeer> peers;
publ... |
9279e1d7b3472c76d74cf9b438b2af13c17e5e6d | C# | Joshhortt/Csharp-From-Zero-To-Beginner | /Section-11-Advanced_Exercises/Hangman/hangmanstarter.cs | 3.515625 | 4 | // 64. Hangman part 1
using System;
using System.IO;
public class HangmanStarter
{
static public void Main ()
{
string[] words = File.ReadAllLines("words.txt");
string guess = "";
Random rnd = new Random();
int wordnum = rnd.Next(0, words.Length);
Console.Clear();
... |
45734028587da8661391fadbceb72cfb5d1aa570 | C# | JordanZaerr/ProjectEuler | /src/PokerHands/GameClasses/PlayerHand.cs | 3.328125 | 3 | using System.Collections.Generic;
using System.Linq;
using Shared;
namespace PokerHands
{
public class PlayerHand
{
public PlayerHand(IEnumerable<string> cards)
{
Cards = cards.Select(x => new Card(x)).OrderByDescending(x => x.Value).ToList();
}
public List<Card> ... |
8d070867de09496aefb09dea99bbe31bd52986bb | C# | newlifechou/ExProjects | /Examples_BBQ/Conv.cs | 2.6875 | 3 | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Examples_BBQ
{
public static class Conv
{
/// <summary>
/// from string to int
/// </summary>
/// <param name="number"></param>
/// <returns></r... |
1dab52d31b1591d48c95f5d9679dae0c1466dd31 | C# | vatoN1/Teretana | /DAL/DAOklase/OpremaDAO.cs | 2.921875 | 3 | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using MySql.Data.MySqlClient;
namespace DAL
{
partial class DAL
{
public class OpremaDAO : IDaoCrud<Oprema>
{
protected MySqlCommand c;
public long creat... |
0366031bbedce4f2212c54b6f81f19f3da411b58 | C# | OmarBessa/CXLight | /CXLight/Threading/Pool/PoolWorker.cs | 2.765625 | 3 | namespace CXLight.Threading.Pool
{
using System.Threading;
using CXLight.Exts;
public class PoolWorker
{
private readonly ManualResetEventSlim _mres;
public Thread Thread;
public PoolWorker()
{
_mres = new ManualResetEventSlim();
IsSpawned = fa... |
3f0a2e7117adee17643d84d0480b0d3930227943 | C# | chittai/AtCoder | /ABC/ABC115/C.cs | 3.375 | 3 | using System;
using System.Linq;
namespace ABC115
{
class C
{
static void Main(string[] args)
{
var NK = Console.ReadLine().Split().Select(int.Parse).ToArray();
var h = Enumerable.Repeat(0, NK[0]).Select(_ => int.Parse(Console.ReadLine())).ToArray();
h = h.Or... |