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 |
|---|---|---|---|---|---|---|
953326bc9a7a5f36d59eef37b32791720f22ba45 | C# | jiansun-sj/ProcessControlService | /ProcessControlService.ResourceFactory/DBUtil/SqlServerUtil.cs | 2.90625 | 3 | using System;
using System.Data;
using System.Data.SqlClient;
using log4net;
namespace ProcessControlService.ResourceFactory.DBUtil
{
/// <summary>
///SQLSERVERHelper 的摘要说明
/// </summary>
public class SqlServerUtil
{
private static readonly ILog LOG = LogManager.GetLogger(typeof(SqlServe... |
05dcb352615d73eaf1ae2824b35377f0e87c0433 | C# | Bobbar/PhoneDirectoryWPF | /PhoneDirectoryWPF/Helpers/UserPrompts.cs | 2.53125 | 3 | using MaterialDesignThemes.Wpf;
using PhoneDirectoryWPF.UI;
using System.Linq;
using System.Threading.Tasks;
using System.Windows;
using System;
using System.Collections.Generic;
namespace PhoneDirectoryWPF.Helpers
{
public static class UserPrompts
{
public async static Task PopupMessage(string messag... |
2aaf5b95d8148c85ed743b8a5af5130bea42d328 | C# | Atlacomm/CHIP-8 | /CHIP-8.Emulator/Emulation/Emulator.cs | 2.75 | 3 | using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Threading;
using System.Windows.Forms;
using static CHIP8.Program;
namespace CHIP8.Emulation
{
class Emulator
{
// Font
static readonly char[] CHARS = { '0', '1', '2', '3', '4', '5', '6', '7... |
d49cbcfd0b7c468ac643bb770485ae775f414a7e | C# | mikewodarczyk/DiscriminatedUnionCompilerBug | /DiscriminatedUnion.Test/BasicOneOfTest.cs | 2.84375 | 3 | using Microsoft.VisualStudio.TestTools.UnitTesting;
#nullable enable
namespace DiscriminatedUnion.Test
{
[TestClass]
public class BasicOneOfTest
{
[TestMethod]
public void TestClassAOrClassB()
{
ClassA obja = new ClassA(1);
ClassB objb = new ClassB("xyzzy");... |
629bdfb931292dc5dc12ee1b9a13a147897dc0be | C# | greggsjh/DesignPatterns | /CoreObjects/AdapterPattern/MallardDuck.cs | 3.03125 | 3 | namespace DesignPatterns.CoreObjects.AdapterPattern
{
public class MallardDuck : IDuck
{
public string Fly()
{
return "I'm flying";
}
public string Quack()
{
return "Quack";
}
}
} |
5692c03d7b20dd42bc544d65b05bfa751216510f | C# | Alekseyya/Codeabbey | /Task_1/Program.cs | 3.21875 | 3 | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
//Входные данные содержат в первой строке N - общее количество пар, которые нужно посчитать.
//Последующие N строк содержат по одной паре целых чисел каждая.
//Ответ должен содержать результаты, разделен... |
922e344c88e2155e83ec76997ead645e0b672503 | C# | tsgardiner/IN710gardits1 | /Week5/PCBuilder/CustomPCBuilder/CustomPCBuilder/CPU.cs | 2.921875 | 3 | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace CustomPCBuilder
{
public abstract class CPU : Component
{
protected string cores;
protected double ghz;
public override string ToString()
{
... |
ed99b598d0ec2ea6d90c11ed5dc0dc82143a172e | C# | steenstrup/ScoutPatrolPoster | /Program.cs | 3.046875 | 3 | using System.Collections.Generic;
using System.Drawing;
using System.IO;
using System.Linq;
namespace ScoutPatrolPoster
{
public class Spejder
{
public string name;
public string PathToImage;
}
public class Patrulje
{
public Patrulje()
{
spejder = new... |
af990c66275411f9a03e776b8b74996b260d2450 | C# | MatthiasSchilder/DotSpatial | /Source/Core/DotSpatial.Data/BufferedBinaryReader.cs | 2.890625 | 3 | // Copyright (c) DotSpatial Team. All rights reserved.
// Licensed under the MIT license. See License.txt file in the project root for full license information.
using System;
using System.IO;
namespace DotSpatial.Data
{
/// <summary>
/// The buffered binary reader was originally designed by Ted Dunsford to ma... |
64f956d1a28c627fa44546c0c703c8fb8b1c563f | C# | JulenBordonaba/AI | /Assets/Scripts/Pathfinding/BinaryPile.cs | 3.03125 | 3 | using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using System;
namespace AI
{
[System.Serializable]
[SerializeField]
public class BinaryPile<T> where T : IConvertible
{
[SerializeField]
private List<T> list;
private SortingOrder _s... |
73b2a75256c40c423cbf9ddbdae77c8aa6f658a9 | C# | IvanPavlov90/EPAM-XT-2021 | /Task 8/UsersAndAwards(Framework)/UsersAndAwards(Framework)/Menu.cs | 2.890625 | 3 | using System;
using System.Collections.Generic;
using EPAM.AwardsAndUsers.Common.Dependencies;
using EPAM.AwardsAndUsers.Common.Entities;
namespace EPAM.AwardsAndUsers
{
public class Menu
{
private enum Actions
{
AddUser = 1,
AddAward = 2,
RemoveUser = 3,
... |
3e411c4082057b6ba64dda937b21add9e703ecdd | C# | VyacheslavTretyak/01_SystemProg | /ListOfProcess/ListOfProcess.cs | 2.703125 | 3 | using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Diagnostics;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace ListOfProcess
{
public partial class ListOf... |
0e0406e8d12271254cad9ea17e16f6916e9a9fe4 | C# | jhonnycrespo/solid | /DependencyInversion/correct/NotificationSystem3.cs | 2.71875 | 3 | // Now, we can use dependency injection so that we can make it
// loosely coupled. There are 3 types to DI, Constructor injection,
// Property injection and method injection.
namespace DependencyInversion.correct
{
// Property Injection
public class Notification3
{
private IMessenger _messenger;
... |
97269db98aebec144dba36a111affb3ce5b7f049 | C# | sobne/Nkit | /src/Nkit/Nkit/Net/WebClientUtils.cs | 2.75 | 3 | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Net;
namespace Nkit.Net
{
public class WebClientUtils
{
public WebClient c = null;
public WebClientUtils()
{
c = new WebClient();
}
public void DownloadFile(st... |
a425aa560a50e29468e1ad7bb0cd2a64a7a0a118 | C# | TheCrunchy/NationCommands | /NationsPlugin/RepRequest.cs | 2.828125 | 3 | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace NationsPlugin
{
public class RepRequest
{
//i wrote this with the intention to do specific amounts of rep but that shit didnt work out well
public Dictionary<String, in... |
fdd89fc856728ae0493e5dd55a0661535ecc1967 | C# | Idony/CILkulator | /Calc/Calc/SingleCalculators/delx.cs | 3.03125 | 3 | using System;
namespace Calc.SingleCalculators
{
class Delx : ISingleOperation
{
public double Calculation(double firstArgument)
{
if (firstArgument == 0)
{
throw new ArgumentException("Ошибка вводимых данных", "firstArgument");
}
... |
6d2af26f101f42d85ae3e9baf1477ccab79d3a96 | C# | s00190968/Labsheet6 | /Book/CoffeeTableBook.cs | 3.03125 | 3 | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Book
{
class CoffeeTableBook : Book
{
public CoffeeTableBook(string ISBN, string title, string author, decimal price) : base(ISBN, title, author, price)
{
... |
a4d0c22b3378a9c0c478c90af659efb188053ea6 | C# | djayd/auto-crud | /Firebend.AutoCrud.ChangeTracking/Interfaces/IChangeTrackingService.cs | 2.625 | 3 | using System;
using System.Threading;
using System.Threading.Tasks;
using Firebend.AutoCrud.Core.Interfaces.Models;
using Firebend.AutoCrud.Core.Models.DomainEvents;
namespace Firebend.AutoCrud.ChangeTracking.Interfaces
{
/// <summary>
/// Encapsulates logic for tracking Add, Update, Delete operations on entit... |
a7be5d8044747cb6dc24959efda14acacbf53023 | C# | hoangnam1997/Winform---Coffee-management | /Source Code/Quan Ly Quan An/Quan Ly Quan An/Quan Ly Quan An/DTO/MonANvaSLmaDTO.cs | 2.578125 | 3 | using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Quan_Ly_Quan_An.DTO
{
public class MonANvaSLmaDTO
{
private string mAMA;
private string tENMA;
private float gIA;
private string mALO... |
bb6a50403e6dc98318f40fd0cc4e757796e8480e | C# | shendongnian/download4 | /first_version_download2/80140-5182371-11044277-2.cs | 2.96875 | 3 | DateTime start = new DateTime(2011, 3, 3, 0, 0, 0);
DateTime earlyEnd = new DateTime(2011, 3, 3, 23, 59, 59);
Console.WriteLine((earlyEnd - start).TotalSeconds); // prints 86399
DateTime lateEnd = new DateTime(2011, 3, 4, 0, 0, 0);
Console.WriteLine((lateEnd - start).TotalSeconds); // prints 86... |
37a10356f3d72599472a254e2621af9c19a47052 | C# | jpdykstra/user-portal | /JPD.Demo.UserPortal/JPD.Demo.Service.Business/UserLogic.cs | 2.671875 | 3 | using JPD.Demo.Service.Entities;
using JPD.Demo.Service.Interfaces;
using System.Collections.Generic;
namespace JPD.Demo.Service.Business
{
public class UserLogic : IUserLogic
{
private readonly IUserData _userData;
public UserLogic(IUserData userData)
{
_userData = userDa... |
79912ae9bf2c58cda36f1d17b4496f8266f10b38 | C# | hwcazy/HealthRecordsEmpty | /WeiXinYY/Models/LogHelp.cs | 2.890625 | 3 | using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Web;
namespace WeiXinYY.Models
{
public class LogHelp
{
/// <summary>
/// 写入日志到文本文件 ; action 动作,ruMessage 日志内容入参,chuMessage 日志内容出参,time 时间
/// </summary>
/... |
52d55fce60570bdf1a4c8d006e08a0c5ab56fbae | C# | Shaqakd/Task2-4019CEM | /4019CEM Shaquille Delahaye Task 2/Assets/Scripts/Menu.cs | 2.8125 | 3 | using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
using TMPro;
public class Menu : MonoBehaviour
{
public List<BodyPartChanger> bodyPartChangers = new List<BodyPartChanger>();
public TMP_InputField CDesign;
public void RandomizeCharacter()
... |
8895bd69d27c5d9bfb70dd874fb8f3229fb7b67e | C# | dharmatech/AbstractAlgebraCs | /pinter-16-C-1/Program.cs | 3.1875 | 3 | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using AbstractAlgebraMathSet;
using AbstractAlgebraGroup;
using AbstractAlgebraGapPerm;
using static System.Console;
namespace pinter_16_C_1
{
class Program
{
static void Main(string[]... |
991701c1004393f5ab95099f05597e134a34a11e | C# | ldorval/AdventOfCode2020 | /Day01/Day01Test.cs | 2.84375 | 3 | using System;
using System.Collections.Generic;
using FluentAssertions;
using NUnit.Framework;
namespace AdventOfCode2020.Day01
{
public class Day01Test
{
private List<int> expenses = new List<int> {1721, 979, 366, 299, 675, 1456};
[Test]
public void ExamplePart1()
{
... |
a09533c572446f76ad44fa90a2668c87934cd23d | C# | LHurtz/CCDTicTacToe | /TicTacToe/Providers/LogReader.cs | 3.25 | 3 | using System.Collections.Generic;
using System.IO;
namespace TicTacToe.Providers
{
internal static class LogReader
{
public static List<(int x, int y)> ReadReplayFile(string fileName)
{
var fileLines = File.ReadAllLines(fileName);
var coordinates = ParseCoordinatesFrom... |
341d6afe6cab7e994cf4fb50c8939e06c110a308 | C# | autostep/AutoStep | /src/AutoStep/Language/Interaction/InteractionConstantSet.cs | 3.421875 | 3 | using System;
using System.Collections.Generic;
using System.Globalization;
namespace AutoStep.Language.Interaction
{
/// <summary>
/// Defines a set of available constant values (e.g. TAB, ESC, NEWLINE) that can be referenced
/// in the interaction language.
/// </summary>
public class Interactio... |
c3d83fc10696da84a8fe7fa7714b4da3acbbb36b | C# | dark-mine/backend | /ApiServer/Lib/Engine/BaseEngine.cs | 2.65625 | 3 | using Newtonsoft.Json;
using System.Net.Http;
using System.Threading.Tasks;
namespace ApiServer.Lib.Engine
{
public class BaseEngine
{
protected static async Task<T> MakeRequest<T>(string apiKey, string requestString) where T : class
{
using (var client = new HttpClient())
{
client.DefaultRequestHeade... |
9e8635bae0b706b4b89b9c46f4284e158b861272 | C# | ljh5432/OVEN | /2. 프로그래밍 언어 활용/ConsoleApp1/HomeWork.cs | 3.640625 | 4 | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ConsoleApp1
{
class HomeWork
{
static void Main(string[] args)
{
int cnt = 0;
int minus = 0;
Boolean value = false;
... |
afef732b4492ecca814c80f4e6456ccc40860d2c | C# | mtikoian/School | /BAIST/BAIS3110/ababcock1BAIS3110Authentication/ababcock1BAIS3110Authentication/DemonstrateRoles.aspx.cs | 2.53125 | 3 | using System;
using System.Collections.Generic;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Security.Principal;
namespace ababcock1BAIS3110Authentication
{
public partial class DemonstrateRoles : System.Web.UI.Page
{
protected void Page_Load(object sender, E... |
0e260f71561d60dbd449aad9c2bff6bbb1181f39 | C# | byte-stack/Asp-Core-Web-API-with-Azure-AD-Swagger-WebApp | /DataServices/Data/EBSContext.cs | 2.671875 | 3 | using WebAPI.DataServices.Table;
using Microsoft.EntityFrameworkCore;
namespace WebAPI.DataServices.Data
{
/// <summary>
/// DB context class for binding the DB objects
/// </summary>
public class EBSContext : DbContext
{
public EBSContext(DbContextOptions<EBSContext> options) : base(opti... |
7d38b4f41cf24030e6c0bec29dabb72027c4ed1d | C# | ShaneGH/SqlDsl | /SqlDsl/Utils/ISqlSyntaxUtils.cs | 2.71875 | 3 | using System;
using System.Collections.Generic;
using System.Linq;
using System.Linq.Expressions;
using System.Reflection;
using SqlDsl.Mapper;
using SqlDsl.SqlExpressions;
namespace SqlDsl.SqlBuilders
{
/// <summary>
/// Extension methods for ISqlSyntax
/// </summary>
public static class ISqlSyntaxUti... |
85feb1d42cd0ebbd38bb0c992f81fae7af857236 | C# | moriazat/ctci | /Tests/DataStructuresTests/StackTest.cs | 3.453125 | 3 | using System;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using CrackingTheCodingInterview.TestHelpers;
namespace CrackingTheCodingInterview.DataStructures.Tests
{
[TestClass]
public class StackTest
{
[TestMethod]
public void Push_PushingToEmptyStack_PutsTheItemOnTopOfTheStack()
{
Stack<int> sut =... |
3e3cf0f4e0bc8c0b40d3c4d38f08a8add8fdc69a | C# | mithun-Das/C-Sharp-Basic | /Dynamictest/Dynamictest/Program.cs | 3.34375 | 3 | using System;
namespace Dynamictest
{
class Student
{
public int Id;
public void CalculateResult()
{
}
}
class Program
{
static void Main(string[] args)
{
var x = 1;
//x = "Hello world";
dynamic y = 1;
... |
c2f75247820c77a8d7f4c4304d7cfe4c9b7d01f5 | C# | ComicFansCollection/RolerFileToolkit | /RolerFileToolkit/Roler.Toolkit.File.Mobi/Entity/ExthHeader/ExthRecord.cs | 3 | 3 | namespace Roler.Toolkit.File.Mobi.Entity
{
public class ExthRecord
{
/// <summary>
/// Gets or sets the Exth Record type. Just a number identifying what's stored in the record.
/// </summary>
public ExthRecordType Type { get; set; }
/// <summary>
/// Gets or set... |
b2ca11f33c3f77d669a2a1482d1abb09c42d58ed | C# | atheeermmh/RainbowSchoolProject | /Program.cs | 3.515625 | 4 | using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Reflection;
using System.Text;
using System.Threading.Tasks;
namespace Rainbow
{
class teacher
{
public int id { get; set; }
public string name { get; set; }
public int class1 { get; set; ... |
e49ef3491591ceaac9e382b30175823c425ac4c9 | C# | swtorpotato/swtor-caster | /SwtorCaster/Core/Services/Images/MappedImageService.cs | 2.6875 | 3 | namespace SwtorCaster.Core.Services.Images
{
using System;
using System.Collections.Generic;
using System.IO;
using System.IO.Compression;
using System.Linq;
using System.Reflection;
using Newtonsoft.Json;
public class MappedImageService : IImageService
{
private readonly st... |
474520779db36525a70ecaba4f2ba0eca0c2da98 | C# | Oxigen2/Oxigen | /app/OxigenIILogExchanger/LogFlattener.cs | 2.875 | 3 | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using OxigenIIAdvertising.LogStats;
namespace OxigenIIAdvertising.LogExchanger
{
public static class LogFlattener
{
/// <summary>
/// Flattens a List of Advert click/impression
/// </summary>
/// <param name="ad... |
14a65bcb28f96ee9f42bdc944a469772be51da22 | C# | liyuwanglyw/Morse-Star | /test2/Assets/01.Scenes/主线/AXYDormitoryInside/AlphaChange.cs | 2.71875 | 3 | using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class AlphaChange : MonoBehaviour
{
public string state;//state0:left->right state1:right->left
public float left;
public float right;
public float ChangeSpeed;
public Color color1;
public float startAlpha... |
d748d7c142d8537cb7d0cf93ed8990ae29ab5cc0 | C# | DES505-AMZ/TeamAMZ | /DES505 Project/Assets/Scripts/TannoySystem.cs | 2.578125 | 3 | using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class TannoySystem :Singleton<TannoySystem>
{
public AudioClip[] clipsGameover;
public AudioClip[] clipsRandom;
public AudioClip[] clipsKnockPackage;
public AudioClip[] clipsPhotoFound;
public AudioClip[] clipsPo... |
87d88afc1ff4004c76bebbfb9584df864da4c574 | C# | harimano/DeckofCardsCSharp | /Program.cs | 3.890625 | 4 | using System;
using System.Collections.Generic;
using System.Linq;
namespace DeckOfCards
{
class Card
{
public string stringVal;
public string Suit;
public int Val;
public Card(string stringValue,string suit,int val)
{
stringVal = stringValue;
Su... |
21edad95b5642296d4b2d00cfbac6f84a6fe8cbb | C# | huzefa515253/Airbus | /Project/JsonResult.cs | 2.796875 | 3 | using Newtonsoft.Json;
using Newtonsoft.Json.Serialization;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Text;
using System.Web;
using System.Web.Mvc;
namespace Project
{
public class CustomJsonResult : ActionResult
{
/// <summary>
/// Initi... |
2c550fd1417440c4a2e2824a53cc5e2caf6ce807 | C# | michasacuer/Typin | /src/Typin/Typin.Tests/UtilitiesTests/TextUtilsTests.cs | 2.96875 | 3 | namespace Typin.Tests.UtilitiesTests
{
using System;
using FluentAssertions;
using Typin.Utilities;
using Xunit;
using Xunit.Abstractions;
public class TextUtilsTests
{
private readonly ITestOutputHelper _output;
public TextUtilsTests(ITestOutputHelper output)
{
... |
6e0668f4b8cc19ac8bdfe95926653e68af2341ae | C# | valoni/NetCoreMQTTExampleDapperConfig | /Storage/Repositories/Implementation/WhitelistRepository.cs | 2.5625 | 3 | // --------------------------------------------------------------------------------------------------------------------
// <copyright file="WhitelistRepository.cs" company="Haemmer Electronics">
// Copyright (c) 2020 All rights reserved.
// </copyright>
// <summary>
// An implementation supporting the reposit... |
59c34b9ab6152ed88a8514ab0f5de50260307834 | C# | oelsnerc/Csharp | /MMC-Ideas/MMC-PlayList/Form1.cs | 2.859375 | 3 | //********************************************************************
// Form1 - This is a simple .Net application to create m3u song lists
// it is a sample of handling file names & Drag and Drop
// (c) Nov 2009 MMC
//********************************************************************
using System;
us... |
3929c040240e699d3a1134a5c8f9c228e9a34d0c | C# | IrshadGitAus/StrategyPatternDemo | /StrategyPatternExample/Core/Services/NoDelete.cs | 2.59375 | 3 | using StrategyPatternExample.Core.Interfaces;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace StrategyPatternExample.Core.Services
{
public class NoDelete : IDeleteStrategy
{
public void DeleteExtraFiles(string srcDir, strin... |
882883737377d55926fabbb478d2f397d543c639 | C# | Alex150Rus/CarGameMobile | /Assets/_Root/Scripts/Game/TapeBackground/Background.cs | 2.703125 | 3 | using UnityEngine;
namespace Game.TapeBackground
{
internal sealed class Background: MonoBehaviour
{
[SerializeField] private float _leftBorder;
[SerializeField] private float _rightBorder;
[SerializeField] private float _relativeSpeedRate;
public void Move(float value)
... |
9cf7d6955f6fee8728feef24cbf9dae98cbf87dd | C# | fulviocanducci/AppWebConfig | /Web/Models/RepositoryCredit.cs | 2.796875 | 3 | using System;
using Dal;
using System.Collections.Generic;
using System.Data.SqlClient;
namespace Web.Models
{
public class RepositoryCredit : IRepositoryCredit
{
public IConnection Connection { get; }
public RepositoryCredit(IConnection connection)
{
Connection = connecti... |
e56abdd9f877d60016562186a4c5ca62255d1f39 | C# | JacobBenge/csharp-apps | /INFO2200/JBAssignment5/JBAssignment5/JBModelEntity.cs | 2.8125 | 3 | using System;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Data.Entity;
using System.Linq;
namespace JBAssignment5
{
public class JBModelEntity : DbContext
{
// Your context has been configured to use a 'JBModelEntity' connection string f... |
08cabb8babf55c071a115caf1a072c8f050eec4f | C# | Apostall107/ITVDN-Csh-Essential-Hometasks | /EssentialI_ITVDN_13/Ex2/Matrix.cs | 3.046875 | 3 | using System;
using System.Collections.Generic;
using System.Text;
using System.Threading;
namespace EssentialI_ITVDN_13
{
class Matrix
{
#region Fields
Random rnd; // = new Random((int)DateTime.Now.Ticks);
static object block = new object();
char[] alphabet = { 'A', 'B', ... |
87968ae2a515ad346bf038030259433c598f231b | C# | guangyw/LeetCode_CSharp | /LongestIncreasingSubsequence.cs | 3.71875 | 4 | using System.Collections.Generic;
using System.Linq;
namespace LeetCode
{
public static class LongestIncreasingSubsequence
{
public static int FindLongestIncreasingSubsequence(int[] nums)
{
if (nums.Length <= 1)
return nums.Length;
var maxSubS... |
56db9f5e86254d745509d0695992385a8959afe1 | C# | vasylboliuk/algorithms-codewars-csharp | /TestsAlgoritmsFromCodeWars/7kyu/TestsDigitsExplosion.cs | 2.8125 | 3 | using System;
using AlgoritmsFromCodeWars;
using NUnit.Framework;
using Assert = Microsoft.VisualStudio.TestTools.UnitTesting.Assert;
namespace TestsAlgoritmsFromCodeWars
{
[TestFixture]
public class TestsDigitsExplosion
{
[TestCase("", "")]
[TestCase("0", "")]
[TestCase("1", "1")]... |
482c8e62caacc9faca53c3a8d029eed434b7e234 | C# | Mehni/kNumbers | /Numbers/PawnColumnWorkers/PawnColumnWorker_AnimalWildness.cs | 2.6875 | 3 | namespace Numbers
{
using RimWorld;
using Verse;
public class PawnColumnWorker_AnimalWildness : PawnColumnWorker_Text
{
public override int Compare(Pawn a, Pawn b)
=> (a.AnimalOrWildMan() || b.AnimalOrWildMan())
? GetValue(a).CompareTo(GetValue(b))
:... |
cf8cc7887981e560e377e5ffb9b8eb5f3c0e93db | C# | kennethgerrits/algorithms-and-data-structures | /Week1/Utils/Models/GenericHashItem.cs | 3.0625 | 3 | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Alg1.Practica.Utils.Models
{
public class HashItem<K,V>
{
public K Key;
public V Value;
public bool IsDeleted;
public HashItem(K key, V value)
{... |
5ee0fe37e45dff3ef2561913c00654b2665c2ca9 | C# | alfred-khairy/the-quest | /TheQuest/Enemies/Enemey.cs | 3.53125 | 4 | using System;
using System.Drawing;
namespace TheQuest.Enemies
{
public abstract class Enemey : Mover
{
private const int NearPlayerDistance = 25;
private int _hitPoints;
public int HitPoints => _hitPoints;
/// <summary>
/// Properties return true if enemy object ha... |
614db0b018d83ceb4e018e3df5f28b4cf5213959 | C# | IyadShobaki/BubbleSort | /BubbleSort/Program.cs | 4.0625 | 4 | using System;
namespace BubbleSort
{
class Program
{
static void Main(string[] args)
{
int[] arrayOfInt = { 20, 35, -15, 7, 55, 1, -22 };
//In bubble sort algorithm, as the algorithm progresses, it partition the array into
//a sorted partition and an unsort... |
29a3151181b1210ff260f3326cec219f8d283ae0 | C# | DevWouter/oslo-csharp | /TournamentPlanner/TeamTournament.cs | 3.09375 | 3 | namespace TournamentPlanner
{
class TeamTournament : Tournament
{
public TeamTournament(string name) : base(initialFunds: 7500)
{
Name = name;
}
protected override void AddPlayer(IRival player)
{
bool isTeam = player is TeamRival;
if ... |
ad652f49c495cb2a0c2b704a5ab7f8b307801905 | C# | DigitalMomentum/Covid-Near.Me | /Create Sitemap/Create Sitemap/Program.cs | 2.671875 | 3 | using System;
using System.Collections.Generic;
using System.Globalization;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Xml.Linq;
using Create_Sitemap.Models;
using Newtonsoft.Json;
namespace Create_Sitemap {
class Program {
static string domain = "https://www.... |
1c1fae6ffff4ababaf25687a5c474794dd72d173 | C# | lalarukh1/intro | /code/Examples/StudentInfo.cs | 3.453125 | 3 | using System;
namespace myapp
{
class StudentInfo
{
String firstName;
String secondName;
String age;
String courseName;
String teachName;
static void getStudentInfo(out String firstName, out String secondName, out String age)
{
Co... |
88404d803f5295516c2354fe3e94bd77effc8aec | C# | luntiklaelite/ws15 | /lodki/lodki/DbModel.cs | 2.609375 | 3 | namespace lodki
{
using MySql.Data.EntityFramework;
using System;
using System.ComponentModel.DataAnnotations;
using System.Data.Entity;
using System.Linq;
[DbConfigurationType(typeof(MySqlEFConfiguration))]
public class DbModel : DbContext
{
static DbModel instance;
pu... |
be23c2baf09b8e511f8d2e1591b428beb71085d0 | C# | ThomasBarnekow/CodeSnippets | /CodeSnippets.Tests/Security/TimestampingTests.cs | 2.515625 | 3 | using System;
using System.Net.Http;
using System.Net.Http.Headers;
using System.Security.Cryptography;
using System.Security.Cryptography.Pkcs;
using System.Threading.Tasks;
using Xunit;
namespace CodeSnippets.Tests.Security
{
public class TimestampingTests
{
[Fact]
public void CanUseTimeStam... |
0266d23fa0e6fddff51dc52d329761c87af52b39 | C# | guyhai/B18-Ex04 | /Ex04.Menus.Interfaces/MenuItem.cs | 2.765625 | 3 | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Ex04.Menus.Interfaces
{
public abstract class MenuItem
{
private string m_Title = "";
private int m_Identifier = 0;
internal abstract void Selected();
... |
d6ba19941263616c22ca79f4480bd0b2fd0a072a | C# | Analogy-LogViewer/Analogy.LogViewer.RSSReader | /Analogy.LogViewer.RSSReader/Core/EventArgs.cs | 2.5625 | 3 | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Analogy.LogViewer.RSSReader.Core
{
public class Args : EventArgs
{
public Args()
{
}
}
public class LogArgs : EventArgs
{
public string M... |
89ff1b74a55e74671952ab2bf7839f815f93b130 | C# | kaikecarlos/PersonaEditor | /PersonaEditorLib/Sprite/TMXHelper.cs | 2.859375 | 3 | using AuxiliaryLibraries.Extensions;
using AuxiliaryLibraries.Media;
using System;
using System.Collections.Generic;
using System.Drawing;
using System.IO;
namespace PersonaEditorLib.Sprite
{
public static class TMXHelper
{
static Dictionary<TMXPixelFormatEnum, PixelFormat> PS2ToAuxdic = new Dictionar... |
8ca71224c4ee731c009e40a3afdee23545180e0f | C# | shendongnian/download4 | /code3/419103-9321405-21166802-2.cs | 2.578125 | 3 | void RunTransaction(Action<IDbCommand> action)
{
using(var cnn=GetConnection)
cnn.Open();
using(var trans=cnn.BeginTransaction())
{
var command=cnn.CreateCommand();
action(command);
trans.Commit();
}
}
|
9ceca7cfb4e8068aa4b27366801d0172955bb68d | C# | marianoalarcon/SistemaPedidos | /PedidosProject/Productos.cs | 3.53125 | 4 | using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace PedidosProject
{
class Productos
{
// Atributos privados por defecto.
int id;
string productName;
double price;
// Getters and... |
04301c52cb2091c87e2e6757e1a47c714af94ae6 | C# | ReindertKorver/HCloud2.0 | /HCloud/Entities/Rapport.cs | 2.640625 | 3 | using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
namespace HCloud.Entities
{
public class Rapport
{
public int ID { get; set; }
public List<Therapy> Therapies { get; set; }
public decimal GetTotalCosts()
{
decimal TotalPrice = 0;
... |
51e9712e96a67e9ef34b39f7265d32c50fa59ae8 | C# | xil/automerge | /MergeLib/ThreeWayMerge.cs | 2.875 | 3 | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using MergeLib.Properties;
using System.Runtime.CompilerServices;
[assembly: InternalsVisibleTo("MergeLibTest")]
namespace MergeLib
{
/// <summary>
/// MergeLib main class
/// </summary>
... |
c7af989debeb3f47f45f5e135f5b82f8c55e5a84 | C# | JoseTomasTocino/BetterImageOverlay | /BetterImageOverlay/BetterImageOverlay.cs | 2.53125 | 3 | using ICities;
using UnityEngine;
using System;
using System.IO;
using ColossalFramework;
using ColossalFramework.Plugins;
namespace BetterImageOverlay
{
public class BetterImageOverlay : IUserMod
{
public string Description
{
get { return "Overlays an image (located at [Steam Skyl... |
04034b0d5c1349d28916d6c174af28189fdb13f9 | C# | av-work/courses | /07 - Lesson - Async await/Threads3_011_ReaderWriterLockSlim/Program.cs | 3.5 | 4 | using System;
using System.Threading;
namespace Threads3_011_ReaderWriterLockSlim
{
/// <summary>
/// • When one thread is writing to the data,
/// all other threads requesting access are blocked.
/// • When one thread is reading from the data,
/// other threads requesting read access are allowed ... |
8cfbfa441f5b258fe0b5c986bbf3f73ba7dc2c73 | C# | IcebearMAC/Assignemnt7 | /Assignment7/Assignment7/Exercises/Colors/ColorExercises.cs | 3.171875 | 3 | using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using Assignment7.Models;
using Assignment7.Repositories;
namespace Assignment7.Exercises.Colors
{
public static class ColorExercises
{
private static ColorRepository db = new ColorRepository();
public const ... |
2067f98a63f196907edade7b381066763b37a168 | C# | selmernoid/BotSystem | /src/BotSystem/BotSystem/Managers/PostProcessingManager.cs | 2.734375 | 3 | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using DataContract;
namespace BotSystem {
public class PostProcessingManager {
// public static User GetUser(DataContext db, string username) {
// var user =
// db.... |
f5a3031523275de2139894d41fa4ab7aed145b6a | C# | Thundermount/CharaForDesktop | /CongaDancing/SpriteAnimation.cs | 3.4375 | 3 | using System.Collections;
using System.Drawing;
namespace SpriteCanvas
{
public class SpriteAnimation : IEnumerable
{
public readonly string Name;
private Image[] _images;
public bool Loop = true;
public int Length { get
{
return _images.Length;
... |
303c9720218f6da39e6dc4eefca34504b0a9d764 | C# | OlegGlizerin/TemepratureDataRetreiver | /TemperatureRetreiver/Program.cs | 3.125 | 3 | using Service;
using Service.Interfaces;
using Service.PubSub;
using System;
using System.IO;
using TemperatureRetreiver.Validations;
namespace TemperatureRetreiver
{
public class Program
{
public static IAmazonService _amazonService;
public static IDateValidation _dateValidation;
pub... |
2035e4b839466ce5f27b80172b1538149ebdc6f8 | C# | shendongnian/download4 | /first_version_download2/121885-8577667-19284252-2.cs | 3.328125 | 3 | public static bool Test<T>()
{
var valid = true;
var members = typeof(T).GetProperties().Where(c => c.CanRead).Select(c => c.GetGetMethod());
foreach (var member in members)
{
if (!member.IsVirtual)
{
Console.WriteLine("Member " + member.Name + "." + member.Name + " is not virtual");
... |
addeee060cb527c3a3255d3512c0bdafa3af9bfa | C# | SenneRosaer/CSharp | /Calculator/Calculator/Form1.cs | 3.203125 | 3 | using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace Calculator
{
public partial class Calculator : Form
{
string i... |
a881a2989f3deb7d280c4bcf2523c3669e504880 | C# | cmiletzky/Mini-Project-Windows | /DalObject/cloning.cs | 2.765625 | 3 | using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using System.Text;
using System.Threading.Tasks;
using DO;
using DS;
namespace Dal
{
/// <summary>
/// class for holding all the cloning function
///
/// </summary>
static class cloning
{
//int... |
4f358968dc7947e001aa3e4651cd29fc6f9cf4d0 | C# | steffanyS/SoftUni_Methods_Exercises | /12_MasterNumber/12_MasterNumber/MasterNumbers.cs | 4.34375 | 4 | using System;
using System.Collections.Generic;
namespace _12_MasterNumber
{
class MasterNumbers
{
//A master number is an integer that holds the following properties:
//Is symmetric(palindrome)
//Its sum of digits is divisible by 7
//Holds at least one even digit
publi... |
00d549203fbeaa631bf337e9f41de118ca68d853 | C# | Lukejkw/Fixer-IO-Sharp | /UnitTests/FixerIOClientTests.cs | 2.921875 | 3 | using Fixer_IO_Sharp;
using NUnit.Framework;
using System;
namespace UnitTests
{
[TestFixture]
public class FixerIOClientTests
{
[Test]
public void Ctor_CanCreateClient()
{
Assert.DoesNotThrow(() => new FixerIOClient());
}
[Test]
public void Bas... |
aaf4ffefd66b9444d53587fa4207550adcf14059 | C# | mikependon/DotNet-ORM-Cookbook | /ORM Cookbook/Recipes.Dapper/Pagination/PaginationScenario.cs | 2.71875 | 3 | using Dapper;
using Dapper.Contrib.Extensions;
using Recipes.Dapper.Models;
using Recipes.Pagination;
using System;
using System.Collections.Generic;
using System.Linq;
namespace Recipes.Dapper.Pagination
{
public class PaginationScenario : ScenarioBase, IPaginationScenario<EmployeeSimple>
{
public Pa... |
5ea0e90460ef2bf4d096a35a516ce3cd53d9f7be | C# | VD-15/CS2010_Groop3 | /Takeover/Takeover/Assets/Scripts/TileOccupierController.cs | 2.75 | 3 | using System.Collections;
using System.Collections.Generic;
using UnityEngine;
//Represents an object that can occupy a space on the map and block movement
public class TileOccupierController : MonoBehaviour
{
public Vector2Int Location { get; private set; }
private MapController map;
private void Start()
{
th... |
62f0d8da8c5fce1ee2f4c308e1a02d1a4e7c978e | C# | kraskoo/CssAnimationSerializer | /CssSerialization/Models/Factories/SyntaxParticularityFactory.cs | 2.953125 | 3 | namespace Models.Factories
{
using System;
using Enums;
public class SyntaxParticularityFactory
{
public static string GetSynSyntaxParticularityCssString(SyntaxParticularityType type)
{
switch (type)
{
case SyntaxParticularityType.OpenBrace:
... |
bce434dd64e86784ae15db234d8e20d859805ee1 | C# | nlhans/SimShift | /SimShift/SimShift/Models/Ets2Aero.cs | 2.53125 | 3 | using System;
namespace SimShift.Models
{
public class Ets2Aero
{
public double CalculateTorque(double speed)
{
var t = 3550.0 / 41964;
var trq =t*0.0837217043 * Math.Exp(0.0002886324 * Math.Abs(speed * 200));
trq *= 2*9000;
return trq;
}... |
f8852325b8a5a35a69b564d8c84340eb93ce56c9 | C# | BeisiXiong/HiP-Forms | /Sources/HiPMobile/Helpers/Settings.cs | 2.625 | 3 | // Helpers/Settings.cs
using Plugin.Settings;
using Plugin.Settings.Abstractions;
namespace PaderbornUniversity.SILab.Hip.Mobile.Shared.Helpers
{
/// <summary>
/// This is the Settings static class that can be used in your Core solution or in any
/// of your client applications. All settings are laid out the sa... |
924f1ce39d65edeaf93797f321aba3db230f360b | C# | dacallender/SSWL-Auto-Report-Emailer | /SiriusScientific.Core/Containers/ObservableContainer.cs | 3.078125 | 3 | using System.Collections.ObjectModel;
namespace SiriusScientific.Core.Containers
{
public class ObservableContainer<T> : ObservableCollection<T>
{
public ObservableContainer()
{
CurrentPointer = 0;
}
public object NextValue()
{
if ( CurrentPointer >= this.Count )
{
CurrentPointer--;
r... |
88337af72e78f79a80579cc917c98dcb21a7f233 | C# | thecriderman/TangramApp | /Controls/Pages/TouchMenuPage.cs | 2.8125 | 3 | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows.Controls;
using System.Windows;
using System.Runtime.Serialization;
namespace TangramApp1._35.Controls.Pages
{
/// <summary>
/// Base class for our newfangled menu system.
/// </summary>
public c... |
e01363c6daa6dfe7284022e8ebac9cac4b19760c | C# | NX-Solutions/NXCare | /src/NXCare.Domain/Interfaces/Repositories/Base/IBaseRepository.cs | 2.671875 | 3 | using System;
using System.Collections.Generic;
using System.Linq;
using System.Linq.Expressions;
using System.Threading;
using System.Threading.Tasks;
using NXCare.Domain.Interfaces.Entities;
namespace NXCare.Domain.Interfaces.Repositories.Base
{
public interface IBaseRepository<TEntity, TKey> where TEntity : IB... |
0fc63548cac3705f1aa45fd0f3730db7ea5690d9 | C# | weixianggoh/PathFinding | /Assets/Scripts/leaderboard.cs | 2.59375 | 3 | using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.Networking;
public class leaderboard : MonoBehaviour {
void Start () {
string url = "http://127.0.0.1/PathFinding/index.php?var1=value2&var2=value2";
WWW www = new WWW(url);
StartCoroutine(WaitForRequest(www));... |
d7076fe754d07eccf5973ae34354611e5871a205 | C# | jvaldiviab/Met-Alberti | /Met Alberti/Alberti.cs | 2.765625 | 3 | using System;
namespace Met_Alberti
{
class Alberti
{
// Texto Claro
private string _strMcla;
public string Mcla
{
get { return _strMcla; }
set { _strMcla = value; }
}
// Llave
private string _strLlave;
public string Ll... |
bfc2c9779077292ca10c80c8c46823b612add093 | C# | DIdo94/RentCars | /Reposotories/Extensions/ExpressionExtensions.cs | 2.65625 | 3 | using System;
using System.Linq;
using System.Linq.Expressions;
namespace Reposotories.Extensions
{
public static class ExpressionExtensions
{
public static Expression<Func<TDelegate, bool>> AddCondition<TDelegate>(this Expression<TDelegate> left, Expression<TDelegate> right)
{
Inv... |
82389b0c3b4440fdbd14da705b728b1eb91affa0 | C# | henfreire/sistema-eleitoral | /UrnaEletronica2/UrnaEletronica/Eleicoes/PrefeitoUI.cs | 2.5625 | 3 | using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace UrnaEletronica.Eleicoes
{
public partial class PrefeitoUI : Form
{
private int... |
6ef4b36ddbed5896a2b3570673f7ff1de1a1dd98 | C# | mohammedh123/Lumen | /Lumen/Lumen/Particle System/OrbitingParticle.cs | 2.640625 | 3 | using System;
using Lumen.Entities;
using Lumen.Light_System;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
namespace Lumen.Particle_System
{
internal class OrbitingParticle : Particle, ILightProvider
{
private readonly Texture2D _texture;
private readonly Vector2 _tex... |
82fb41ca21c1b9d1133f0e30e4d3a08b19896762 | C# | lipusal/VJI | /Tenis/Assets/Scripts/Game/Score/ScoreManager.cs | 2.515625 | 3 | using System;
using System.Collections.Generic;
using System.Linq;
using FrameLord;
using Game.GameManager;
using Game.Score;
using Game.UI;
using UnityEngine;
/// <summary>
/// Singleton that tracks score and exports methods related to score decisions.
/// </summary>
public class ScoreManager
{
/// <summary>
... |
0f7525227a8a8b9cb8fe0ec5b82719b9871f6aa3 | C# | 3Dsamples/UnityToonShader_code1 | /Assets/unity-anchor-master/Cargo/Helpers/ObjHelper.cs | 3.15625 | 3 | using UnityEngine;
namespace Exodrifter.Anchor
{
public static class ObjHelper
{
/// <summary>
/// Exports a mesh into the OBJ format.
/// </summary>
/// <param name="obj">The mesh.</param>
/// <returns>The mesh as an OBJ string.</returns>
public static string ExportObj(Mesh mesh)
{
string ret = ""... |
65512c641ca1a8ddaa53a62c1e3e0a142820a3e4 | C# | shayded-exe/EmailListDeduper | /EmailListDeduper/View Models/ViewModelBase.cs | 2.53125 | 3 | using System;
using System.Collections;
using System.Collections.Generic;
using System.Collections.Concurrent;
using System.Linq;
using System.Threading.Tasks;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using System.Runtime.CompilerServices;
using System.Windows.Input;
namespace EmailLi... |
d3f4a66391f05e299f957f5c41c2c49916ed3957 | C# | rootasjey/citations365 | /Citations 365/Citations 365/Models/Author.cs | 2.765625 | 3 | using System;
using System.ComponentModel;
namespace citations365.Models {
public class Author : INotifyPropertyChanged {
private string _Name { get; set; }
private string _Link { get; set; }
private string _ImageLink { get; set; }
public string Name {
get {
... |
d471c73f6e1b5acfb3641ed73427678947b05416 | C# | Shade-University/SemPrace_ITEJA_ICSHP | /SemPrace_ITEJA_ICSHP/Services/RichTextBoxFormatter.cs | 2.859375 | 3 | using System.Collections.Generic;
using System.IO;
using System.Text.RegularExpressions;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Media;
namespace GUI.Services
{
public static class RichTextBoxFormatter //Helps to format code
{
public static void LoadRichText... |
c323749a95e868c0da4a8a255250312dc53a7912 | C# | snperry89/CSharpFundamentals | /00_Challenges/W1D3_Conditions_Loops.cs | 3.75 | 4 | using Microsoft.VisualStudio.TestTools.UnitTesting;
using System;
using System.Collections.Generic;
namespace _00_Challenges
{
[TestClass]
public class W1D3_Conditions_Loops
{
[TestMethod]
public void Part1()
//Print every letter of the word "Supercalifragilisticexpialidocious" to ... |
9e0094f9b241b13bc383ec6f69b52ec113fa8fe4 | C# | amarish-kumar/slackish-v2 | /Features/Profiles/UserApiModel.cs | 2.5625 | 3 | using Slackish.Data.Model;
namespace Slackish.Features.Profiles
{
public class UserApiModel
{
public int Id { get; set; }
public int TenantId { get; set; }
public string Name { get; set; }
public string Password { get; set; }
public string Email { get; set; }
pu... |
e812b2d821c6ba2c4e4b53f511b77437e9cbb100 | C# | shendongnian/download4 | /first_version_download2/76917-4932748-10500010-2.cs | 2.671875 | 3 | int maxFrames=32;
ImageMagickObject.MagickImage imgLarge = new ImageMagickObject.MagickImage();
// first extract all frames from gif to single png files
for(int frame=0; frame<maxFrames;frame++)
{
object[] o = new object[] { String.Format(strOrig+"[{0}]", frame)
, String.Fo... |