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 |
|---|---|---|---|---|---|---|
101ea6f7b526895e7e23c9b9fd754cc00dc09a8e | C# | John3/GPGT-Support | /AccompanyingDisk/MazeRunnerAdvanced/mazerunner/EGSystems/Utilities/egs_String.cs | 2.734375 | 3 | //------------------------------------------------------
// Copyright 2000-2006, GarageGames.com, Inc.
// Written or Modified by Ed Maurina, Hall Of Worlds, LLC
//------------------------------------------------------
echo("\n\c3--------- Loading GPGT String Utilities ---------");
function rldstrings() {
exec("./egs_St... |
ddf7c72840755cdf74025dae56574db5b219030a | C# | luismdcp/PROMPT11-01-VMEssentials.luismdcp | /Sessao 5/Sessao5Practica/Sessao5Practica/Program.cs | 3.390625 | 3 | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace Sessao5Practica
{
class Program
{
public struct Book
{
public string Title { get; set; }
public string Author { get; set; }
public DateTime PublishDate { get; set... |
1b20304a2eff887624e7c835c056a9e0d33631e0 | C# | mzamp27/source | /repos/Pragimcsharp/Pragimcsharp/Program2.cs | 3.578125 | 4 | using System;
using System.Collections.Generic;
//FOUR PILLARS OF OBJECT ORIENTATED PROGRAMMING
//1. ABSTRACTION
//2. ENCAPSULATION
//3. INHERITANCE
//4. POLYMORPHISM
//All lessons in this section have 2 parts that need to be uncommented because of created classes
//public class Program2
//{
// public static ... |
9a45fea09d87cc2ce5b527a803fd96e4cea7465e | C# | darklord1993/SnakesAndMazes | /PCG Project/Assets/Plugins/Vexe/Runtime/Examples/Scripts/Attributes/PopupsExample.cs | 2.890625 | 3 | using System.Linq;
namespace Vexe.Runtime.Types.Examples
{
public class PopupsExample : BetterBehaviour
{
[Popup("String1", "String2", "String3")]
public string strings;
// populate from the method GetFactors - which should return a string[]
// (access modifier on the method doesn't matter)
// also use a... |
38bd92b0033c469040f037b5e36ed8ff7d312076 | C# | kwozniak/PatronageWP | /PatronageWP/ViewModels/AddPlaceViewModel.cs | 2.578125 | 3 | using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Windows.UI.Popups;
using PatronageWP.Common;
using PatronageWP.Entity;
using PatronageWP.Services;
namespace PatronageWP.ViewModels
{
class AddPlaceViewModel : Obs... |
b518fc0dfb868c2120029a1878a6e277184bb646 | C# | ferrazeduardo/Asp.net_Core_Ecommerce | /Controllers/AccountController.cs | 2.765625 | 3 | using System.Threading.Tasks;
using Ecommerce.ViewModels;
using Microsoft.AspNetCore.Identity;
using Microsoft.AspNetCore.Mvc;
using Ecommerce.Models;
namespace Ecommerce.Controllers
{
public class AccountController : Controller
{
private readonly UserManager<ApplicationUser> _userManager;
pr... |
e3c68fc0ed64d5ce08cb868c226d3bf6dd26b488 | C# | stanislavstoyanov99/Unity-Projects | /CommandPattern/Assets/Scripts/PawnUnit.cs | 2.671875 | 3 | using UnityEngine;
public class PawnUnit : Unit
{
public int Distance;
public override int GetMoveCells(Vector3Int[] result, Gameboard board)
{
int count = 0;
for (int y = -Distance; y <= Distance; ++y)
{
for (int x = -Distance; x <= Distance; ++x)
... |
26a354a5ba35de716e92616d455c732fecdb7037 | C# | buckslice/zomboat | /Assets/Game/Scripts/AnimatedTexture.cs | 2.578125 | 3 | using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class AnimatedTexture : MonoBehaviour {
public Sprite[] textures;
public float animationFrequency = 0.0f;
private float animationTime = 0.0f;
private int currentTexture = 0;
// Use this for initialization
vo... |
1e80c4783c03409746a9f499af8bcfe26bc58008 | C# | WildGenie/object-assets | /src/ObjectManager/Object.Ultima.Game/World/Data/CustomHousePlane.cs | 2.625 | 3 | using OA.Ultima.Core.Network;
namespace OA.Ultima.World.Data
{
public class CustomHousePlane
{
public readonly int Index;
public readonly bool IsFloor;
public readonly byte[] ItemData;
public CustomHousePlane(PacketReader reader)
{
var data = re... |
b72ac9e15911d2979724afb5440ea7f2ed533da1 | C# | SergeySeliverstov/PhD | /DecisionMethods/PixelsRestore.cs | 2.578125 | 3 | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Tools;
namespace DecisionMethods
{
public class PixelsRestore : PixelsRestoreBase
{
public static int[,] FindPixels(int[,] bytes, bool[,] mask, int m, double n)
{
byte[][,] channelBytes = ne... |
36e8c4e633a262f31accc8b65f842483d48e7c5f | C# | pBarsky/Tetris-WinForms | /TetrisConsoleApp/Bricks/BeamBrick.cs | 2.78125 | 3 | using System;
using GameEngine.AbstractClasses;
using GameEngine.Utilities;
namespace GameEngine.Bricks
{
internal class BeamBrick : Brick
{
public BeamBrick(int size = 3, int x = 0, int y = 0) : base(size, x, y)
{
for (int i = 0; i < size; i++)
{
Shape[... |
ee342575cee1eae43064760e0d0e26ae1bd4f87a | C# | Advance-Technologies-Foundation/clio | /clio/Command/GetPkgListCommand.cs | 2.640625 | 3 | using System;
using System.Collections.Generic;
using System.Linq;
using Clio.Common;
using Clio.Package;
using CommandLine;
namespace Clio.Command
{
#region Class: PkgListOptions
[Verb("get-pkg-list", Aliases = new[] { "packages" }, HelpText = "Get environments packages")]
public class PkgListOptions : Environm... |
be47aaa83a2aa36ea598fc4390644f1423b0074a | C# | Kawser-nerd/CLCDSA | /Source Codes/AtCoder/arc073/C/1257518.cs | 3.421875 | 3 | using System;
using System.Collections.Generic;
using System.Linq;
namespace AtCoder
{
class Program
{
static IO io = new IO();
static void Main(string[] args)
{
io.Read();
int N = io.Int();
List<Item> items = new List<Item>();
... |
eff31aee8f66d1d7c3d3303cbacc0e1460e8dc5d | C# | tuanbacyen/SVGH | /SVGH/frmChiTietBHC.cs | 2.515625 | 3 | using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace SVGH
{
public partial class frmChiTietBHC : Form
{
#region
... |
75bf7434a48cd73581a337dee5c23788690e6ce0 | C# | seulim/Hackathon2016 | /Hackathon2016/ImageFilterTest/ExBitmap.cs | 2.71875 | 3 | /*
* The Following Code was developed by Dewald Esterhuizen
* View Documentation at: http://softwarebydefault.com
* Licensed under Ms-PL
*/
using System;
using System.Collections.Generic;
using System.Drawing;
using System.Drawing.Drawing2D;
using System.Drawing.Imaging;
using System.Linq;
using System... |
62211ae3424b0f3162736bb34dab20fa194b01da | C# | jianyuyanyu/ImageSharp | /src/ImageSharp/Formats/Webp/WebpEncoder.cs | 2.59375 | 3 | // Copyright (c) Six Labors.
// Licensed under the Six Labors Split License.
using SixLabors.ImageSharp.Advanced;
namespace SixLabors.ImageSharp.Formats.Webp;
/// <summary>
/// Image encoder for writing an image to a stream in the Webp format.
/// </summary>
public sealed class WebpEncoder : ImageEncoder
{
/// <... |
133acec3071ab2e36cb8280f5f1bb0c58557b14e | C# | Tacktel/bataille-game | /Shared/Card.cs | 3.65625 | 4 | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Coinche
{
public enum CardSuit
{
Spades,
Hearts,
Diamonds,
Clubs
}
public enum CardRank
{
Ace = 14,
/*Two = 2, Three = 3, Fo... |
ad78196f123e662d0ef1e635df09e1146d9ee5cd | C# | jakubstepien/SWP-CarService | /CarRepair.Db/Repositories/ClientRepository.cs | 3.09375 | 3 | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace CarRepair.Db
{
public class ClientRepository : IDisposable
{
CarDb db = new CarDb();
public string AddUser(string name, string surname, string phone)
{
... |
0658678af09190c24130bd51a9d239f33fe49131 | C# | nskr/Lab2 | /lab2-sharp-master/TestPerson.cs | 3.28125 | 3 | using System;
namespace Labs2
{
class TestPerson
{
public void TestPersonProps()
{
Person pers1 = new Person();
pers1.Fam = "Петров";
pers1.Age = 21;
pers1.Salary = 1000;
Console.WriteLine("Фам={0}, возраст={1}, статус={2}", pers1.Fam... |
cb790acefb138b7a44f116351b102759af8d72e3 | C# | rhysstever/FantasySim | /Assets/Scripts/Zombie.cs | 2.609375 | 3 | using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class Zombie : Vehicle
{
// A list of all humans in the scene
public List<GameObject> humans;
// The closest human (and its distance)
// that the zombie will seek
public GameObject closestHuman;
float distToHuman;
public ov... |
eb25d82e848e8f5c85ce4fd36f81ce835e5e6818 | C# | PacktPublishing/Full-Stack-Development-with-React-and-ASP.NET-Core-2 | /Section 4/Read/Villainy/Controllers/VillainsController.cs | 3.015625 | 3 | using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Mvc;
namespace Villainy.Controllers
{
[Route("api/[controller]")]
public class VillainsController : Controller
{
private static List<Villain> Villains = new List<Villain>(){ ne... |
fd228f1781beb95de5d8e67feb4906c598b209c0 | C# | RobertDeKoning/InterfaceImplementationsTest | /InterfaceImplementationsTest/Implementations/ValidationFactory.cs | 3.015625 | 3 | using InterfaceImplementationsTest.Enums;
using InterfaceImplementationsTest.Interfaces;
using System;
namespace InterfaceImplementationsTest.Implementations
{
public class ValidationFactory : IValidationFactory
{
public T CreateValidator<T>() where T : IValidator, new()
{
return (... |
9fdf829410037782a299d5d14ffbf6e2faf99730 | C# | saa14/Ed-Fi-LearningStandards-Client | /src/EdFi.Admin.LearningStandards.Tests/Utilities/ConsoleStringListWriter.cs | 2.609375 | 3 | // SPDX-License-Identifier: Apache-2.0
// Licensed to the Ed-Fi Alliance under one or more agreements.
// The Ed-Fi Alliance licenses this file to you under the Apache License, Version 2.0.
// See the LICENSE and NOTICES files in the project root for more information.
using System;
using System.Collections.Generic;
u... |
1ab9680c69148afc4a5692136e07b0dddaf1b73a | C# | MrDenius/ModUpdater | /ModUpdater/Jsons/ProgramConfig.cs | 2.84375 | 3 | using System;
using System.Collections.Generic;
using System.IO;
using System.Net;
using System.Threading;
using System.Threading.Tasks;
namespace ModUpdater.Jsons
{
public class ProgramConfig
{
public string NewBuildVersion { get; set; }
public List<FileInfo> NewFiles { get; set; }
p... |
80807a8ca54b20894cff05cf17e00f2e4b140b1d | C# | shendongnian/download4 | /code9/1609584-45129017-151705698-2.cs | 2.546875 | 3 | public void btnStart_Click(object sender, EventArgs e)
{
if (int.TryParse(txtBoxInput.Text, out test))
tmrCountdown.Start();
else {
if (txtBoxInput.CanFocus)
txtBoxInput.Focus();
MessageBox.Show($"'{txtBoxInput.Text}' is not a valid integer value",
... |
eae06c2d44eaf73240e8d9612c71b650aef208b3 | C# | JokeCiCi/StockInfoDownload | /StockInfoDownload/AppCode/Dal/Stock5MinInfoManager.cs | 2.609375 | 3 | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data.SqlClient;
using System.Data;
using Model;
using DBUtility;
namespace Dal
{
class Stock5MinInfoManager
{
#region BasicMethod
/// <summary>
/// 是否存在该记录
/// </summary>
... |
c693ccf2046c5ac986639004ae0025b8dcd4abce | C# | BULQI/TBKMath-Release | /TBKMath/PseudoRandom.cs | 3.046875 | 3 | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Troschuetz.Random;
namespace TBKMath
{
class PseudoRandom
{
}
static class DiscreteDistribution
{
private static Troschuetz.Random.Generators.MT19937Generator mt;
static DiscreteDistributi... |
03238a197d9e75c0224eb55a765cc3fd9fb3d4d3 | C# | hanhn-dev/design-patterns | /Strategy/Cash.cs | 2.53125 | 3 | using System;
namespace DesignPatterns.Strategy
{
public class Cash : Payment
{
public override void Process()
{
Console.WriteLine("Using Cash");
}
}
} |
8ab4c9df8b95d5e72cf10c0e2640f403f02289c6 | C# | StanwaySoftware/BattleShips | /Battleships/Models/Ship.cs | 2.640625 | 3 | using System.Collections.Generic;
using System.Drawing;
using System.Linq;
namespace Battleships.Models
{
public class Ship
{
public string Type { get; set; }
public int Size { get; set; }
public HashSet<Point> PointsHit { get; set; }
public bool Afloat
{
ge... |
0dc9bca1f9209cc76dafef40ca4d3e3d36acd81e | C# | yoru132/twinsanity-editor | /Twinsanity/Items/DynamicSceneryDataMB.cs | 2.53125 | 3 | using System.Collections.Generic;
using System.IO;
using System;
namespace Twinsanity
{
public sealed class DynamicSceneryDataMB : TwinsItem
{
public uint Header1;
public List<DynamicSceneryModel> Models;
private int DataSize;
public DynamicSceneryDataMB()
{
... |
eab0da4369fe847c139f5a0743318fb76a040285 | C# | mareklinka/aoc-2019 | /csharp/12/UnitTest1.cs | 3 | 3 | using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Linq;
using Xunit;
using Xunit.Abstractions;
namespace _12
{
public class UnitTest1
{
private readonly ITestOutputHelper _output;
public UnitTest1(ITestOutputHelper output)
{
... |
9f196722d5a44e489061b6282bccafa9ed4fa935 | C# | rune15/IguanaMesh | /IguanaGH/IPrimitivesGH/IHyperboloidOneSheetGH.cs | 2.546875 | 3 | /*
* <IguanaMesh>
Copyright (C) < 2020 > < Seiichi Suzuki >
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 or later of the License.
This program is distribut... |
830d19b13e487b5db2c9a40aa98fc0a1963e2ab8 | C# | Rohitprabha/Inheritance | /Inheritance/Program.cs | 3.84375 | 4 | using System;
namespace Inheritance
{
class Vehicle // base class (parent)
{
public string brand = "Yamaha"; // Vehicle field
public void sound() // Vehicle method
{
Console.WriteLine("Duur, Du... |
31746a9266980dbbb0532f641bd8ba0890b7b07f | C# | adisekar/Algorithms | /Algorithms/DFS/MaxLenConcatenatedStringWithUniqueChar.cs | 3.609375 | 4 | using System;
using System.Collections.Generic;
using System.Text;
namespace Algorithms.DFS
{
public class MaxLenConcatenatedStringWithUniqueChar
{
public int MaxLength(IList<string> arr)
{
int[] res = new int[1];
MaxLen(arr, 0, "", res);
return res[0];
... |
e5a148fc2e98cdf8ea458866448beb5fc7956a6a | C# | EdRW/Space_Invaders | /SpaceInvaders/Composite/GameObjectComposite.cs | 2.625 | 3 | using System;
using System.Diagnostics;
namespace SpaceInvaders
{
public abstract class GameObjectComposite : GameObject
{
public DLink poHeadChild;
public int numChildren;
public GameObjectComposite(GameObject.Name name, BoxSprite.Name boxSpriteName)
: base(name, Sprite.N... |
84a1f99644c8cb99a1073995bb5f16dc84c7523d | C# | SeanWH/FanFictionArchiver | /SWH.Extensions/Types/DateTimeExtensions.cs | 3.03125 | 3 | // FILE: DateTimeExtensions.cs
// PROJECT: SWH.Extensions
// SOLUTION: FanFictionArchiver
// -------------------------------------------
// AUTHOR: Sean Hennessey
// DATE CREATED: 2021-05-17
// DATE MODIFIED: 2021-05-17
namespace SWH.Extensions.Types
{
using System;
public static class DateTimeExtensions
... |
0909806493a1808bae123b711280b21b53a029cc | C# | UGTU/Old-School | /UGTU/Tools/danalyser/danalyser/Analysers/DfmAnalysers/LexicalAnalyser.cs | 2.796875 | 3 | using System;
using System.Collections.Generic;
using System.Text;
using System.IO;
namespace DelphiAnalyser.Analysers.DfmAnalysers
{
public class LexicalAnalyser
{
// Состояние
private States state;
// Текущий анализ
private FileInfo file;
private string source, curre... |
5667972855414bce363af2ef56a3c1bb15312ea2 | C# | DADIU-2019-Team-4/MiniGameProduction02 | /Assets/Scripts/Controllers/ViolaController.cs | 2.546875 | 3 | using System;
using UnityEngine;
public class ViolaController : MonoBehaviour
{
// Keeps track of all functionality in regards to Viola.
private BallController BallController;
//private ScoreController ScoreController;
private Animator ViolaAnimator;
//private Hand leftHand;
//private Hand r... |
c03361d353fd9fa24831a8fea143358f229f3866 | C# | GitHubOfShiNian/Practice | /ConsolePractice/Base.cs | 2.921875 | 3 | using System;
namespace ConsolePractice
{
public abstract class Base
{
public void Write()
{
Console.WriteLine("This is Base.Write");
}
public void One()
{
}
delegate void two();
public delegate void SendShortMessage(SendShortMessage... |
0facb33ec45856fc388f4910df136cd81a10b798 | C# | manishkotta/upc-tagging | /CommonEntities/CommonUtilities/Result.cs | 3.125 | 3 | using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
namespace Common.CommonUtilities
{
public class Result<T> : Result
{
public Result(T value, bool isSuccessed, string errorMessage) : base(isSuccessed, errorMessage)
{
this.Value = value... |
5525d8c0e35ef88193e68e5d02d0665dec4b4f76 | C# | jwChung/ArticleHarbor-WebAPIDemo | /test/DomainModelUnitTest/Queries/InClausePredicateTest.cs | 2.5625 | 3 | namespace ArticleHarbor.DomainModel.Queries
{
using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using Ploeh.AutoFixture.Xunit;
using Xunit;
public class InClausePredicateTest : IdiomaticTest<InClausePredicate>
{
[Test]
public vo... |
123afd1439df991665e545d336e19b07874f7307 | C# | GyokayAli/University-Projects | /UNI2/COMP1551 - Application & Web Development/Weekly Uploads/BraveBasketOfFruit/BraveBasketOfFruit/Default.aspx.cs | 3.484375 | 3 | using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
// author ag306
// HOME PAGE
/* Application that takes 3 inputs from user (Fruit name, Fruit weight and Fruit calories per gram).
* Calculates the total calories of chosen fruit... |
b4bb6d0b3369648409456aaa58e003aa7994c8c7 | C# | shendongnian/download4 | /first_version_download2/126442-8952926-20242138-4.cs | 2.578125 | 3 | public class User {
public string Name { get; set; }
private ObservableCollection<Project> _projects = new ObservableCollection<Project>();
public ObservableCollection<Project> Projects { get { return _projects; } }
public User() {
Projects.CollectionChanged += O... |
d0ce1ef23bea9dc2e26c750a8c146a8dcc67d54f | C# | shendongnian/download4 | /latest_version_download2/98568-18913268-47672012-2.cs | 2.921875 | 3 | List<string> tNames= new List<string>(); // fill it with some table names
List<string> columnNames = new List<string>() { "special" };
// ...
IEnumerable<DataRow> tableRows = con.GetSchema("Tables").AsEnumerable()
.Where(r => tNames.Contains(r.Field<string>("TABLE_NAME"), StringComparer.OrdinalIg... |
5bff3d25e1a379756ad8af8af67e4ab6cd091031 | C# | a-thompson/StudyConnection-Games | /Student.cs | 3.59375 | 4 | using System;
using System.Collections.Generic;
using System.Text;
namespace Study
{
public class Student
{
public Student()
{
grades = new List<Score>();
grades.Add(new Score());
}
public Student(String theUser, List<Score> theGrades)
... |
ed09b1bdfeec4537a7ba86769667c66c83bccc3e | C# | hrimar/SoftUni-Programming-Fundamentals-may2017 | /08.DictionariesLambdaExpressionsLINQ/Lab06FoldAndSum/Lab06FoldAndSum.cs | 3.484375 | 3 | using System;
using System.Collections.Generic;
using System.Linq;
namespace Lab06FoldAndSum
{
class Lab06FoldAndSum
{
static void Main()
{
var nums = Console.ReadLine().Split().Select(int.Parse).ToArray();
var k = nums.Length / 4;
var leftArray = nums.Take(... |
0434eac8078b91668d8c66b21c596b05c8723d30 | C# | lukaselmer/student-thesis-flip | /code/trunk/ProjectFlip/ProjectFlip.Services.Test/GravatarServiceTest.cs | 2.640625 | 3 | using System.Linq;
using Microsoft.VisualStudio.TestTools.UnitTesting;
namespace ProjectFlip.Services.Test
{
/// <summary>
///This is a test class for GravatarServiceTest and is intended
///to contain all GravatarServiceTest Unit Tests
///</summary>
[TestClass]
public class Grava... |
3fb043268c3effe3812098197f71922ba0dffddd | C# | vovasazonov/exercise_multiplayer | /MultiplayerClient/Assets/Scripts/Network/GameEventHandlers/CharacterEnemyAttackedEventHandler.cs | 2.65625 | 3 | using System.Collections.Generic;
using System.Linq;
using Models.Characters;
namespace Network.GameEventHandlers
{
public class CharacterEnemyAttackedEventHandler : IGameEventHandler
{
private readonly ICharacterModel _characterModel;
private readonly ITrackableDictionary<int, ICharacterModel... |
48cb13d7b2694a2974f8df3f5f12ae2ae9ff22dc | C# | Qiliang/TCDMS | /05Services/TCSOFT.DMS.Document.Services/Extension.cs | 2.703125 | 3 | using System;
using System.Collections.Generic;
using System.Linq;
using System.Linq.Expressions;
using System.Reflection;
using System.Text;
using System.Threading.Tasks;
using TCSOFT.DMS.Document.DTO;
namespace TCSOFT.DMS.Document.Services
{
public static class Extension
{
public static IOrderedQue... |
387b35d54a137f49c9e313731b3d62c3c6c05578 | C# | maniserowicz/ProcentCqrs | /src/Common/System.Type.cs | 3.328125 | 3 | namespace System
{
public static class TypeExtensions
{
public static bool AssignableTo(this Type @this, Type other)
{
return other.IsAssignableFrom(@this);
}
public static bool AssignableTo<T>(this Type @this)
{
return @this.AssignableTo(typeof(T... |
27755c2b9b125603de8963595360fa1f93b79eba | C# | MrSmoke/dotflake | /src/DotFlake/IdGeneratorFactory.cs | 2.890625 | 3 | namespace DotFlake
{
using System;
using System.Collections.Generic;
using Exceptions;
using Generators;
using Microsoft.Extensions.Configuration;
public class IdGeneratorFactory : IIdGeneratorFactory
{
private readonly IServiceProvider _serviceProvider;
private readonly D... |
44913610c212e816842d0bb05f8ccd3c290991e0 | C# | mrindonesia/BasicLinkedList | /BasicLinkedList/BasicLinkedList/Classes/SingleLinkedList.cs | 3.6875 | 4 | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace BasicLinkedList
{
public class SingleLinkedList
{
internal Node Head;
}
internal class Node
{
internal int Data;
internal Node Next... |
917955b826c7adbf1f060b1c2dd3b3c81efe8b78 | C# | Delt06/differential-equations | /Methods/EulerMethod.cs | 3.046875 | 3 | using DEAssignment.Methods.Visitors;
namespace DEAssignment.Methods
{
public sealed class EulerMethod : ApproximatedMethod
{
public EulerMethod(RightSideFunction rightSideFunction) :
base(rightSideFunction)
{
}
protected override void AcceptVisitorInternal(IMethodV... |
69a33c0ef0b466ece870021276038f11b85f8e77 | C# | james-johnstone/Sagu | /Sagu.Services/Services/AreaService.cs | 2.78125 | 3 | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Sagu.DAL;
using System.Data.Entity;
namespace Sagu.Services
{
public class AreaService
{
public IEnumerable<DTO.Area> GetAreas()
{
using (var context = new Sagu... |
56a3c55332ddaba53e39ed91e838bc9091afced1 | C# | MariusUtheim/Relativity | /Visualization/Program.cs | 2.578125 | 3 | using System;
using GRaff;
namespace Relativity.Visualization
{
class MainClass
{
static SpacetimeDiagram diagram;
static StringModel stringModel;
public static void Main(string[] args)
{
Giraffe.Run(800, 800, gameStart);
}
public static void gameS... |
e839e9c4593e7114b47bd00e8d599702d1b2701d | C# | kovalove/NET2 | /ESchool/Extensions/MarkExtensions.cs | 2.578125 | 3 | using ESchool.Logic.DB;
using ESchool.Models;
namespace WebShop.Extensions
{
public static class MarkExtensions
{
public static MarkModel ToModel(this Mark mark)
{
if (mark == null)
return null;
return new MarkModel()
{
Name ... |
f8652998de1930a450f769cecf59c41356bf7c86 | C# | pydiprasanna/DeveloperTestExercise-master | /DeveloperTestExercise-master/FileData/Program.cs | 2.90625 | 3 | using System;
using System.Collections.Generic;
using System.Globalization;
using System.Linq;
using ThirdPartyTools;
namespace FileData
{
public static class Program
{
public static void Main(string[] args)
{
FileDetails objFileDetails = new FileDetails();
try
... |
9af6884a23b2b2898c5678a2063e181d3f274aac | C# | Farhankaioum/Asp.NetCoreWithDapper | /EmployeeManagement/Controllers/EmployeeController.cs | 2.609375 | 3 | using EmployeeManagement.Models;
using EmployeeManagement.Repository;
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Mvc.Rendering;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
namespace EmployeeManagement.Controllers
{
public class EmployeeController : Controller... |
3d916ab05a766ce330459c1c26cea31c09209167 | C# | 1stResponder/em-serializers | /EDXLSHARP/EDXLSharp.CIQLib/Address.cs | 2.6875 | 3 | // ———————————————————————–
// <copyright file="Address.cs" company="EDXLSharp">
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
// http://www.apache.org/licenses/LICENSE-2.0
//... |
998d6060667149e7ec9b99e93567891198447f93 | C# | JacobDanielMooney/JDM_TTT_Repo | /TTT_ClassLibrary/TTT_ClassLibrary/ComputerPlayer.cs | 3.21875 | 3 | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace TTT_ClassLibrary
{
public class ComputerPlayer : Player
{
MiniMax minimax = new MiniMax();
public ComputerPlayer()
{
identity = 'X';
}
public ComputerPlayer(cha... |
4e4e8855daec055060cc3cb2369bb6cd767e1961 | C# | Valduy/Game | /Assets/Scripts/ECS/Components/PositionComponent.cs | 2.53125 | 3 | using Assets.Scripts.Networking.Serializers;
using ECS.Core;
using ECS.Serialization.Attributes;
using ECS.Serialization.Converters;
using ECS.Serialization.Readers;
using ECS.Serialization.Writers;
using UnityEngine;
/// <summary>
/// Компонент, содержащий позицию <see cref="GameObject"/>, описываемого сущно... |
6dbb73e7e31cc966c2a5df0984f42f7709ec995d | C# | null511/SharpDx | /SharpDX/Core/Shaders/ShaderActionRegistry.cs | 3.0625 | 3 | using System;
using System.Collections.Generic;
namespace SharpDX.Core.Shaders
{
class ShaderActionRegistry
{
private IDictionary<Type, Action<IObject>> _actions;
public ShaderActionRegistry() {
_actions = new Dictionary<Type, Action<IObject>>();
}
... |
67b1d32c8b37308d24975f3006ca2345522ddddd | C# | HelveticaScenario/Headspring | /C#/BlogSoftware/FirstSteps/PhoBase.cs | 3.546875 | 4 | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace FirstSteps
{
public class PhoBase
{
//Maintains a collection of Post objects.
//You can start out initializing the array with about 5 fake posts (new Post(..... |
0b9fac81d79108623573a39516d1088b028d0980 | C# | fvideon/WMGateway | /WMGatewayUI/ReportTimer.cs | 2.90625 | 3 | using System;
using System.Collections;
using System.Diagnostics;
namespace UW.CSE.DISC
{
/// <summary>
/// Simple class to track timing of per-stream events/warnings for reporting.
/// </summary>
public class ReportTimer
{
private Hashtable timerHT;
public static TimeSpan ReportThreshold = Time... |
a02db35ca97db3c7fb6e51367b05389cd59f41f5 | C# | dchandhokcog/eicorecode | /EnvInt.Win32.FieldTech/EnvInt.Win32.FieldTech.Toolbox/Controls/ComponentCountControl.cs | 2.765625 | 3 | using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace EnvInt.Win32.FieldTech.Controls
{
public partial class ComponentCountControl : UserControl... |
7f37154702261eb9d139c44641948cfc1bbe76b8 | C# | mrlerdahl/CodeWars | /CodeWars/SquareEveryDigit.cs | 4.15625 | 4 | using System;
using System.Collections.Generic;
using System.Text;
namespace CodeWars
{
public class SquareEveryDigit
{
// Welcome. In this kata, you are asked to square every digit of a number.
// For example, if we run 9119 through the function, 811181 will come out, because 92 is 81 and 12 ... |
02a4bffe8aaa420ed02bb27db5ab00d94679a612 | C# | mtaulty/2DMappingExperiment | /App24/SurfaceChangeWatcher.cs | 2.546875 | 3 | namespace App24
{
using System;
using System.Collections.Generic;
using System.Linq;
using Windows.Perception.Spatial.Surfaces;
using SpatialSurfaceEntry = System.Collections.Generic.KeyValuePair<System.Guid, Windows.Perception.Spatial.Surfaces.SpatialSurfaceInfo>;
class SurfaceChangeWatcher
{
publ... |
8d97d7ab105302360d6b352069d42c8bf46534e6 | C# | BogdanHerciu/ReqM_project | /ReqM_Tool/ReqMTool/Class1.cs | 2.515625 | 3 | using System;
using System.Runtime.Serialization;
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.Xml;
using System.IO;
using System.Text.Regul... |
137875fd2a646ea98601fde5eaf41f5872898379 | C# | rayguo/GKDesignPattern | /State/work/after/EditablePerson/EditState.cs | 2.609375 | 3 | using System;
using System.Collections.Generic;
using System.Text;
namespace EditablePerson
{
public partial class Person
{
private class EditState : PersonState
{
public EditState(Person person) : base(person) { }
public override int Age
{
g... |
7c48070b5f7132992df4590f1a3fc9e825673a22 | C# | starrywing/INFO-6250-Web-dev-tools | /ShopServer/Controllers/ProductController.cs | 2.640625 | 3 | using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Mvc;
using ShopServer.Models;
using ShopServer.Models.Managers;
namespace ShopServer.Controllers
{
[Route("api/[controller]")]
[ApiController]
public class ProductController : Contr... |
574e297d8738f0cb3f2874d23a5852c0e2bd8abd | C# | seshupapolu/ExtensionMethods | /ExtensionMethods/Seshu.Playground.UnitTests/ExtensionMethods Test/EnumerableExtensionsTests.cs | 2.6875 | 3 | using Microsoft.VisualStudio.TestTools.UnitTesting;
using Seshu.Playground.Extensions;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Seshu.Playground.UnitTests.ExtensionMethods_Test
{
[TestClass]
public class EnumerableExtensions... |
78829ef9d6b3ce86eb822bfab6d3d9b36da0b2e6 | C# | mbalychev/Maintenance | /Maintenance/Repositories/EngineerService.cs | 2.796875 | 3 | using Data;
using Data.Entities;
using Maintenance.Entities;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Maintenance.Models.Employee;
using Microsoft.EntityFrameworkCore;
using System.Threading.Tasks;
using Maintenance.Models;
using Maintenance.Services;
namespace Maint... |
10c874fb0dcdf7e42ba32f60f35716de4bd59cd8 | C# | DanteX95X/ggj2018 | /Assets/Scripts/PlayerRotation.cs | 2.765625 | 3 | using UnityEngine;
using System.Collections;
public class PlayerRotation : MonoBehaviour
{
private int floorMask; // A layer mask so that a ray can be cast just at gameobjects on the floor layer.
private float camRayLength = 100f; // The length of the ray from the camera int... |
085372e3cf3cd2e4cafdbe087e0a3c90990d89be | C# | dogbiscuituk/TagScanner32767 | /TagScanner/Controllers/GridController.cs | 2.546875 | 3 | using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Linq;
using System.Reflection;
using TagScanner.Models;
namespace TagScanner.Controllers
{
public abstract class GridController
{
#region Lifetime Management
public GridController(Model model, Compon... |
4cedfa98a67bb91e77c39afd9e63143d1d7c1631 | C# | cat1116/CSHP220B_FinalProject | /CatApp/CatApp/MainWindow.xaml.cs | 2.53125 | 3 | using CatApp.Models;
using System;
using System.Collections.Generic;
using System.ComponentModel;
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.... |
024fb06262a7235e4690bb34398c0ee04a8403c6 | C# | garsonlab/LeetCodeTraining | /398.random-pick-index.cs | 3.296875 | 3 | /*
* @lc app=leetcode id=398 lang=csharp
*
* [398] Random Pick Index
Given an array of integers with possible duplicates, randomly output the index of a given target number. You can assume that the given target number must exist in the array.
Note:
The array size can be very large. Solution that uses too much ext... |
d850a7ed81f520938d549e75c10ca9d20cd36d95 | C# | green-fox-academy/Trueszky | /week-01/day-04/expressions-and-control-flow/coding-hours/CodingHours.cs | 3.09375 | 3 | using System;
namespace Trueszky
{
class Program
{
static void Main(string[] args)
{
// An average Green Fox attendee codes 6 hours daily
// The semester is 17 weeks long
//
// Print how many hours is spent with coding in a semester by an attendee... |
3dd5b2af363174d66533f1cd3dbd4c07ebfe24de | C# | Pavan699/Refactor_Line_Comparison | /Line_Comparison_Refactor/Length.cs | 4.34375 | 4 | using System;
using System.Collections.Generic;
using System.Text;
namespace Line_Comparison_Refactor
{
public class Length
{
//check method to calculate lengths of two lines
public static void check()
{
Console.WriteLine("Welcome To Line Comparison Computation Program");
... |
1b775f1b886fb966694bb66d6089a146b31a65a2 | C# | AcademyGio/Classi | /Classi/Program.cs | 3.171875 | 3 | using System; // posso omettere System quando mi riferisco a tipi contenuti
// nel namespace System
namespace Classi
{
class Program
{
static void Metodo()
{
}
static void Main(string[] args)
{
//Program ist = new Program();
/... |
c0ef12682bb82121ca62305ec72880d6da72d3a2 | C# | Tc2r1/Tetris | /Assets/Scripts/Grid.cs | 2.640625 | 3 | using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class Grid : MonoBehaviour {
// The Grid itself
public static int w = 10;
public static int h = 20;
public static Transform[,] grid = new Transform[w,h];
public GameManager gameManager;
private bool gameEnded;
public float... |
eabc096be4f2288b0a9f192ca238e68230fd6ef5 | C# | aaleksander/Sculptor2D | /Sculptor2D/DrawLibrary/Misc/Layer.cs | 2.8125 | 3 | /*
* Сделано в SharpDevelop.
* Пользователь: AnufrievAA
* Дата: 15.05.2014
* Время: 11:24
*
* Для изменения этого шаблона используйте Сервис | Настройка | Кодирование | Правка стандартных заголовков.
*/
using System;
using System.Collections.ObjectModel;
using DrawLibrary.Graphics;
using DrawLibrary.Serialize;... |
4448b4e4d8487366e8f41a6e6d32694fbb4b73cd | C# | Coulibaly343/InvoicesManager | /InvoicesManager.Core/Entities/User.cs | 2.703125 | 3 | using System.Collections.Generic;
namespace InvoicesManager.Core.Entities
{
public class User : BaseEntity
{
public string Name { get; private set; }
public string Surname { get; private set; }
public string Address { get; private set; }
public string Email { get; private set; ... |
aadfb21c8368c9049900e7914d4dc962d7d062be | C# | TheGoldenShark/SpellTrigger | /Spelltrigger/Assets/Scripts/EnemyMovement.cs | 2.78125 | 3 | using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class EnemyMovement : MonoBehaviour
{
public Transform playerTransform;
public Rigidbody2D rb;
public float speed;
private bool seen;
// Start is called before the first frame update
void Start()
... |
a6b74dae738be4dac2162e7f3757e4af295e659d | C# | GeorgiGradev/SoftwareUniversity | /01. Programming Basics/02.4. EXAM - Simple Operations and Calculations/Movie Profit/Program.cs | 3.703125 | 4 | using System;
namespace _01._Movie_Profit
{
class Program
{
static void Main(string[] args)
{
//1.Име на филм -текст
//2.Брой дни - цяло число в диапазона[1… 90]
//3.Брой билети - цяло число в диапазона[100… 100000]
//4.Цена на билет -реално числ... |
730ed28b952445f97766cf349f312bff06d77c67 | C# | tarunbatta/ipg | /core/crackingTheCodingInterview/c6q4.cs | 3.171875 | 3 | /*
Ants on a Triangle: There are three ants on different vertices of a triangle. What is the probability of
collision(between any two or all of them) if they start walking on the sides of the triangle? Assume
that each ant randomly picks a direction, with either direction being equally likely to be chosen, and
that th... |
280cecbd7503725b9ec51997dc8b1c244317a419 | C# | YamiPlacido/eProject-3 | /eProject3/eProject3/Functions/UserFunctions.cs | 2.6875 | 3 | using eProject3.Models;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
namespace eProject3.Functions
{
public class UserFunctions
{
private eProject3Context db = new eProject3Context();
public User GetByID(string userName)
{
return db.... |
b394c701e032724b15a7b012127be57bba2c3e14 | C# | ValeriaDaukshis/Spp_lab3_Assembly_browser | /AssemblyBrowserView/ViewModel.cs | 2.65625 | 3 | using System.ComponentModel;
using System.IO;
using System.Runtime.CompilerServices;
using System.Windows.Forms;
using System.Windows.Input;
using InfoCollector;
namespace AssemblyBrowserView
{
public class ViewModel : INotifyPropertyChanged
{
private string _filename;
private AssemblyResult _... |
43aa5cebda1c5885bc8e87e67d0b329988f7614a | C# | amir734jj/reservation-api | /Dal/Crud/ItemDal.cs | 2.609375 | 3 | using AgileObjects.AgileMapper;
using Dal.Abstracts;
using Dal.Interfaces;
using Microsoft.EntityFrameworkCore;
using Models.Entities;
namespace Dal.Crud
{
public class ItemDal : BasicCrudDalAbstract<Item>, IItemDal
{
private readonly EntityDbContext _dbContext;
private readonly IMapper _mappe... |
41266e6b536d9ba5c8ab36df35509bcae3a234ae | C# | rubygem/OrderedJobsKata | /OrderedJobs.Tests/SequenceImpl.cs | 3.125 | 3 | using System;
using System.Collections.Generic;
namespace OrderedJobs.Tests
{
public interface ISequence
{
String GetSequence(string[] instructions);
}
public class Sequence : ISequence
{
public String GetSequence(string[] instructions)
{
return S... |
12286a872fe78d8893286be9fcb846973a02ae2e | C# | tharindusandamal/c-sharp-advanced | /ImageSample/Program.cs | 2.734375 | 3 | using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Drawing;
using System.Drawing.Imaging;
using System.Windows.Media.Imaging;
namespace ImageSample
{
class Program
{
static void Main(string[] args)
{... |
bb16de81b6cf485f17e0dea1d60c1359e06c231c | C# | abdulbaruwa/baml | /server/Baml.Weather.Web/FetchManager/IWeatherApi.cs | 2.53125 | 3 | using System.Threading.Tasks;
using Baml.Weather.Web.Config;
using Baml.Weather.Web.Core.Models;
using Baml.Weather.Web.Interfaces;
using Newtonsoft.Json;
using Refit;
namespace Baml.Weather.Web.FetchManager
{
public interface IWeatherApi
{
Task<LocationWeather> GetWeatherForLocation(int locationId);
... |
b9757489d13c15960b0e4a8b9c9f09f3ceccbccd | C# | RT-Projects/RT.Util | /RT.Util.Core/NameGenerator.cs | 3.625 | 4 |
namespace RT.Util
{
/// <summary>Generates a sequence of short names starting with “a” through “z”, followed by two-letter names etc.</summary>
public sealed class NameGenerator
{
/// <summary>Constructor.</summary>
public NameGenerator() { _curname = ""; }
/// <summary>Generates ... |
b1cb8c04941facd3b28eb2d687f3d630b58dffb6 | C# | nikup/Library-IT-Olympiad | /Library/Library/FormTake.cs | 2.65625 | 3 | using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using Library.Data;
using System.IO;
namespace Library
{
public partial class FormTake : Form
{
int clientId;
... |
1dbd33b2217893341fe180cea98255c6f56557c6 | C# | RaphMad/WoWSettingsCleaner | /WoWSettingsCleaner/MainWindow.xaml.cs | 2.640625 | 3 | namespace WoWSettingsCleaner
{
using System;
using System.Windows;
using System.Windows.Documents;
using System.Windows.Media;
using Infrastructure;
using StructureMap;
using Tools;
using ViewModels;
/// <summary>
/// Interaction logic for MainWindow.xaml
/// </summary>
public part... |
48ba829163200753d3e5a048695bdd58a1420dbc | C# | mschulc/CodeWars_CSharp | /6 kyu/Christmas tree/Christmas tree/Christmas tree.cs | 3.5625 | 4 | using System.Text;
using System;
public class ChristmasTreeGenerator
{
public static string ChristmasTree(int height)
{
char star = '*';
char field = ' ';
StringBuilder tree = new StringBuilder();
if (height == 0)
{
return "";
}
else if (heig... |
fcd2965dc57c54bf55701b9730a050a0d5c72088 | C# | busraltun/CSharp_Calismalarim | /Proje2/proje2/ToDo_App/ToDo_App/Program.cs | 3.328125 | 3 | using System;
namespace ToDo_App
{
class Program
{
static void Main(string[] args)
{
while (true)
{
Console.WriteLine("Lütfen yapmak istediğiniz işlemi seçiniz :)");
Console.WriteLine("******************************************** ");
... |
942fb3b1467f663b20029abb882c8503875ec563 | C# | TMJ-Thabethe/Library-App-Practice-Version---3-Tier | /DAL/DataAccessLayer.cs | 2.703125 | 3 | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Data;
using System.Data.SqlClient;
namespace DAL
{
public class DataAccessLayer
{
static string connString = "Data Source = TMJ_Thabethe; Initial Catalog = LibraryDB; Integ... |
a6796aaff511ac6a13e70fedfa50cdb170c4f794 | C# | Charlesmaf/MarsRover | /MarsRover/Program.cs | 3.8125 | 4 | using System;
//The Rover has 2 sets of command inputs
// *(x,y ,E) = The rover's position x = x-coordinates | y = y-coordinates | E = Directions its facing
// *(L R M) = Movement of Rover
//List of Behaviours
// 1. Rover Must Spin Left (L)
// 2. Rover Must Spin Right (R)
// 3. Rover Must Move Forward (M)
... |
acf37574cb0fd9e7bfa4a751f76c617892996314 | C# | SwapnilShingade/ElectricityPlans | /ElectricPlansApi/UnitTests/PlanServiceTests.cs | 2.515625 | 3 | using DataAccessLayer;
using DataAccessLayer.Models;
using System;
using System.Collections.Generic;
using System.Text;
using Xunit;
using Moq;
using BusinessLayer;
using BusinessLayer.Models;
using AutoMapper;
using BusinessLayer.AutoMapper;
namespace UnitTests
{
public class PlanServiceTests
{
publi... |
98b886faf3830e3aad94f14c8c31882253cbd8c3 | C# | Matthew-Wuttke/IntermediatePortfolio | /Board.cs | 3.453125 | 3 | //Matthew Wuttke
using System;
using System.Collections.Generic;
using System.Text;
namespace IntermPortfolio
{
class Board
{
//datamembers
const int NUM_SQUARE = 9;
const char EMPTY = ' ';
static char[] m_Square = new char[NUM_SQUARE];
public Board()
... |