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 |
|---|---|---|---|---|---|---|
3bfdea56b12fe502cf61d1ef2473be0dc662acee | C# | r0lan2/MyTAsks | /Code/MyTasks.Extensions/WebControls/WebControlExtensions.cs | 2.75 | 3 | //INSTANT C# NOTE: Formerly VB project-level imports:
using System;
using System.Web.UI.WebControls;
using System.Web.UI;
namespace BigLamp.Extensions.WebControls
{
public static class WebControlExtensions
{
/// <summary>
/// Pop up warning asking user to confirm deleting.
/// </summa... |
98ef5f7854b0c968aeb98b3675c67267c51a3ae1 | C# | paniaq/tspprog3 | /BuscaminasGame/ScoreBoard.cs | 3.28125 | 3 | using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
namespace BuscaminasGame
{
public class ScoreBoard
{
private string currentDir;
private string fileName;
public ScoreBoard()
{
this.fileName = "/scoreBoard.scor... |
abd20d5949acb8ca182488611105d1ac61fc5b99 | C# | aaghorighor/irit | /Suftnet.Cos.Stripe/ServiceProvider/SubscriptionPlanProvider.cs | 2.703125 | 3 | namespace Suftnet.Cos.Stripe
{
using System;
using System.Collections.Generic;
using System.Linq;
using global::Stripe;
public class SubscriptionPlanProvider : ISubscriptionPlanProvider
{
private readonly PlanService _planService;
public Subscript... |
cd707472da0db1cf2c88f1f233e790cbf2042758 | C# | Christopher-Shi/Chris.DesignPatterns | /Chris.DesignPatterns.State/State/Success.cs | 2.53125 | 3 | namespace Chris.DesignPatterns.State.State
{
/// <summary>
/// 交易成功---相当于具体状态角色
/// </summary>
public sealed class Success : State
{
public void Process(Order order)
{
System.Console.WriteLine("订单结算");
order.TaskFinished = true;
}
}
} |
19a62ba284485aab4e6fd2c885024736f1d85748 | C# | spyshura/State-DesignPatterns-Auto | /States/FullTankState.cs | 3.078125 | 3 | using System;
using System.Collections.Generic;
using System.Text;
namespace State_Auto.States
{
class FullTankState : IState
{
private readonly Car _car;
public FullTankState(Car car)
{
_car = car;
}
public void FillTank()
{
Console.Wri... |
39f275237c101f9a3437a261ec482600930ea1b0 | C# | levimoshe770/ClientServerExam | /FileServer/ChangePassword.cs | 2.859375 | 3 | using DataLayer;
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 FileServer
{
public partial class ChangePassword : Form
{
pub... |
f6c6eb0b13880230a14a5670c967906dd4474319 | C# | PatrickRobin83/MetadataXMLGenerator | /ConsoleApp/MetaDataConsole/Models/MetaDataEntry.cs | 2.75 | 3 | /*
* -----------------------------------------------------------------------------
*
* Filename : MetaDataEntry.cs
* Date : 2020-02-05 15:42:44
* All rights reserved
*
* -----------------------------------------------------------------------------
* @author Patrick Robin <support@rietrob.de... |
57440ad1932f19788bd03a4c16a2093e4c138ee9 | C# | brehm/aruco-unity | /src/aruco_unity_package/Assets/ArucoUnity/Scripts/Plugin/Cv/Mat.cs | 2.546875 | 3 | using System.Runtime.InteropServices;
namespace ArucoUnity
{
/// \addtogroup aruco_unity_package
/// \{
namespace Plugin
{
public static partial class Cv
{
public static partial class Core
{
public class Mat : Utility.HandleCppPtr
{
// Constructor & Destructor
... |
1fab0a8d9a04818c166fc07c35c40605ab75e7a6 | C# | Milus84/Caterer-DB | /DataAccess/Repositories/BenutzerRepository.cs | 2.578125 | 3 | using DataAccess.Interfaces;
using DataAccess.Model;
using System.Collections.Generic;
using System.Linq;
using System;
using System.Data.Entity;
namespace DataAccess.Repositories
{
public class BenutzerRepository : IBenutzerRepository
{
protected ICatererContext Db { get; }
public BenutzerRe... |
1e14cadb8acfbf5cacdda5022c907f6f6d568858 | C# | AdeleHugues/Grapho | /DAL/DBAccess.cs | 2.6875 | 3 | using System;
using System.Collections.Generic;
using System.Configuration;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace DAL
{
public class DBAccess
{
/// <summary>
/// Retourne la châine de connexion à la base de données
/// </summary>
/// <par... |
99ec6dfa8e80fcaba38f4323f819216f722a2983 | C# | MironovaTatiana/Stream | /Stream/Program.cs | 3.296875 | 3 | using System;
using System.IO;
using System.Net;
using System.Net.Sockets;
using System.Threading.Tasks;
namespace Stream
{
/// <summary>
/// Сервер. Посылает файл Example1.txt клиенту
/// </summary>
class Program
{
static async Task Main(string[] args)
{
var localPort ... |
5201fde234312790994b73bc0830404a89c980f4 | C# | divikiran/Kayak | /Kayak/CustomControls/AirportSearch.cs | 2.546875 | 3 | using System;
using Xamarin.Forms;
namespace Kayak
{
public class AirportSearch : StackLayout
{
//public static BindableProperty NameTextProperty = BindableProperty.Create("NameText", typeof(string), typeof(AirportSearch), default(string));
//public string NameText
//{
// get { return (string)GetValue(NameT... |
fdf0127f9101d1f11d9b972518da96bc50e0020e | C# | mmikhey/SchedulerTask | /SchedulerTask/Operation.cs | 3.296875 | 3 | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace SchedulerTask
{
public interface IOperation
{
TimeSpan GetDuration();
void SetOperationInPlan(DateTime real_start_time, DateTime real_end_time, SingleEquipment real_equ... |
20e86dbba6ee25094e71586a42500ba9d7bcf164 | C# | nzhul/metaltrade | /Application.Data/UoWData.cs | 2.609375 | 3 | using Application.Data.Repositories;
using Application.Models;
using Application.Models.Articles;
using Application.Models.Pages;
using System;
using System.Collections.Generic;
using System.Data.Entity;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Application.Data
{
public class ... |
8976354c73f9dd15f86a33c241e7913f81a42733 | C# | PolinaVdovina/labworkCsharp4 | /TestCollections.cs | 2.9375 | 3 |
using System;
using System.Collections.Generic;
using System.Text;
namespace laba1
{
class TestCollections
{
private List<Team> teams;
private List<string> strs;
private Dictionary<Team, ResearchTeam> dic1;
private Dictionary<string, ResearchTeam> dic2;
public TestCol... |
e0e4386a3215a1846a0ba885cf84a13655cb57b6 | C# | fengjixuchui/hookbong | /HookBong.UI/HookBong.UI/MainWindow.cs | 2.578125 | 3 | using HookBong.Core;
using HookBong.Core.Utils;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Diagnostics;
using System.Drawing;
using System.Linq;
using System.Runtime.InteropServices;
using System.Text;
using System.Threading.Tasks;
using System.Windows.... |
7af19669cc2ccdc3ad366a3dd1f9037f43f658de | C# | moutainhigh/xcdv1 | /msk-print/snkBarCode/snkBarCode/CSVFileHelper.cs | 3.234375 | 3 | using System;
using System.Collections.Generic;
using System.Data;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace snkBarCode
{
public class CSVFileHelper
{
/// <summary>
/// 将DataTable中数据写入到CSV文件中
/// </summary... |
86f23b4e1818c0d4f5e6331a69cead493af4f100 | C# | shendongnian/download4 | /first_version_download2/542978-51088505-176596476-2.cs | 2.859375 | 3 | public IQueryable<T> MyQuery(DbContext<T> db)
{
return db.Table
.Where(p => p.reallycomplex)
....
...
.OrderBy(p => p.manythings);
}
|
a302b625a273c34f692ccc5f236242ed8ad62571 | C# | jciechowski/InterfaceVsDelegate | /InterfaceVsDelegate/StationRepository.cs | 2.90625 | 3 | using System.Collections.Generic;
namespace InterfaceVsDelegate
{
public interface IStationRepository
{
IReadOnlyCollection<Station> GetAllStations();
}
public class StationRepository : IStationRepository
{
public IReadOnlyCollection<Station> GetAllStations() => new List<Station>
... |
8624d6c23a7dceaa2add2d63f469aac96dd8ea41 | C# | kamikazekip/CompilerDesignPatters2 | /prahSC/CompilerClasses/CompilerListMaker.cs | 2.796875 | 3 | using prahSC.Nodes;
using prahSC.TokenizerClasses;
using prahSC.VirtualMachineClasses;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace prahSC.CompilerClasses
{
public class CompilerListMaker
{
private LinkedList<Token> recei... |
ce13ebd284352462834fb8cb26b663dc05f90d74 | C# | whoami15/c-sharp-projects | /FirstProject/components/Block.cs | 2.703125 | 3 | using OpenTK;
using OpenTK.Graphics.OpenGL;
using System;
using System.Collections.Generic;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace MainGame.components
{
class Block
{
Vector3 position;
public Block()
{
this.positi... |
5e57d7e3cf15c0100f2cc5f767cc1b038850d79c | C# | bmerlet/Sudoku | /Sudoku/Game/Cell.cs | 3.46875 | 3 | using System;
using System.Collections.Generic;
using System.Text;
namespace Sudoku.Game
{
/// <summary>
/// Cell of sudoku puzzle
/// </summary>
public class Cell
{
// Value of the cell (0-9), 0 means unmarked
public uint Value { get; private set; }
// If the cell is mark... |
536273843bb992df7dc860158a5d7767b627abd3 | C# | ilkera/algo | /leetcode/Pow/math_pow.linq | 3.21875 | 3 | <Query Kind="Program" />
/* Problem: Pow
Implement Math.Pow function
*/
void Main()
{
Console.WriteLine(MathUtils.Pow(2,3));
Console.WriteLine(MathUtils.Pow(2,5));
Console.WriteLine(MathUtils.Pow(3,4));
Console.WriteLine(MathUtils.Pow(3,-4));
Console.WriteLine(MathUtils.Pow(3,1));
Console.WriteLine(MathUtil... |
b7591cc2cb1af69324555b21715a81e969c69648 | C# | Snuger/Cshartp6ProfessionalSample | /Queue/kafka/Consumer/Sampke.Serialization.Consumer/Services/ConsumerService.cs | 2.796875 | 3 | using System;
using System.Collections.Generic;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
using Confluent.Kafka;
using Sampke.Kafka.Model;
using Microsoft.Extensions.Hosting;
namespace Sampke.Serialization.Consumer
{
class ConsumerService : BackgroundService
{
private r... |
b7d388dce832beb082af9c1c5571959f6a03624a | C# | IdleLands/IdleLandsRedux | /IdleLandsRedux.Common.Tests/DoubleExtensionsTests.cs | 2.75 | 3 | using NUnit.Framework;
using FluentAssertions;
using System;
using System.Diagnostics.CodeAnalysis;
namespace IdleLandsRedux.Common.Tests
{
[SuppressMessage("Gendarme.Rules.Performance", "UseStringEmptyRule", Justification = "FluentAssertions uses a default value, outside of our control.")]
[TestFixture]
public cl... |
15abd4bee5a0544a5f2cc88d1fa39dc225e250c2 | C# | EmanMH/SDTRConsulting | /Utilities/PasswordHelper.cs | 3.125 | 3 | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Web.Script.Serialization;
namespace Utilities
{
public class PasswordsHelper
{
private static string _salt =
"+cEW1883vVfV0nDe3cJnpR1mUyu+7Np66FYzc+Z8qXP4TnWMWO8... |
746601b2c13d20b8929ab2c20b32b9e1bb0a8f07 | C# | talktovik/LightweightCPP_lightweightCsharp | /Csharp/Working_with_files_and_folders/Program.cs | 3.28125 | 3 | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.IO;
namespace Working_with_files_and_folders
{
class Program
{
/// <summary>
/// This would be like for working with the directories.
/// </... |
a95d29d1e223bab964270a3b93e3ad93dc2b3780 | C# | Hesapkurdu/hk-financial-functions | /src/FinancialFunctions/Functions/Pmt.cs | 3 | 3 | using System;
using FinancialFunctions.Domain.Enums;
namespace FinancialFunctions.Functions
{
public class Pmt
{
/// <summary>
/// see Payment
/// </summary>
public double PaymentInternal(double rate, short numberPeriods, double presentValue,
double futureValue,... |
fa4f96ef22345c34a104e45df9134ac6aa6fbc80 | C# | rwjdk/codekata | /MS Code Challenge/SquareRemainders/SquareRemainders/SquareRemainders/Challenge.cs | 3.859375 | 4 | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace SquareRemainders
{
public class Challenge
{
/* Square Remainder Challenge
*
* Here's a challenge for the math lovers. Solving this challenge can be done in 4... |
b7b59d2088c5a0faa98541903eb81882b6b2fc62 | C# | MarcinSzyszka/MobileSecondHand | /Visual Studio/MobileSecondHand/src/MobileSecondHand.API.Services/CacheServices/ChatHubCacheService.cs | 2.765625 | 3 | using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Runtime.Caching;
using MobileSecondHand.API.Models.Chat;
namespace MobileSecondHand.API.Services.CacheServices
{
public class ChatHubCacheService : IChatHubCacheService
{
MemoryCache cache;
const string CONNECTED_US... |
2244b61d6dc2fb61a986a016060cb5508f90ffc7 | C# | iv4xr-project/labrecruits | /Unity/AIGym/Assets/Scripts/UI/UIConnectionBehaviour.cs | 2.734375 | 3 | /*
This program has been developed by students from the bachelor Computer Science
at Utrecht University within the Software and Game project course.
©Copyright Utrecht University (Department of Information and Computing Sciences)
*/
using System;
using System.Collections.Generic;
using System.Net;
using Sy... |
1b8aad441f33ee9dd0b625b98c6a93c958b13e07 | C# | Barbados87/BooksCatalog | /BooksCatalog/DAL/CatalogInitialiser.cs | 2.671875 | 3 | using System.Collections.Generic;
using System.Data.Entity;
using System.Data.Entity.Migrations;
using BooksCatalog.Models;
namespace BooksCatalog.DAL
{
public class CatalogInitialiser : DropCreateDatabaseIfModelChanges<CatalogContext>
{
protected override void Seed(CatalogContext context)
{
... |
2d88826291c80feb19e2705c649ea5a65a729b9f | C# | csluder/Windows | /bus pirate/bus pirate/I2C.cs | 2.515625 | 3 | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.IO.Ports;
namespace bus_pirate
{
class I2C
{
private const byte BitBangMode = 0x00;
private const byte Enter_I2C_Mode = 0x02;
private const byte RESET ... |
c9d13d8694f748cee89dffe15a70e28a3d6397f2 | C# | antero-lukkonen/SpectreWeather | /SpectreWeather.Factory.Spec/DefaultSpec.cs | 2.546875 | 3 | namespace SpectreWeather.Factory.Spec
{
using System.Collections.Generic;
using System.Linq;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using PublicModel;
[TestClass]
public class DefaultSpec
{
private static IEnumerable<ICurrentConditions> currentConditions;
[Cla... |
5f89a3ea93fa45063ff0dfc2d22ce0ee94819e71 | C# | namsoo5/unity3d | /Final/Assets/Script/AttackAreaActivator.cs | 2.59375 | 3 | using UnityEngine;
using System.Collections;
public class AttackAreaActivator : MonoBehaviour {
//공격판정컬라이더배열
Collider[] attackAreaColliders;
// Use this for initialization
void Start () {
//자식오브젝트에서attackarea스크립트가추가된오브젝트를찾는다
AttackArea[] attackAreas = GetComponentsInChildren<AttackArea>();
attackAreaCollider... |
ece7f521f4868c38b867d9dabffc1f71126b3f3a | C# | 18510911737/vchy_workbench | /vchy_api/VchyCalculator/Lexer/PhraseStorage.cs | 2.953125 | 3 | using System;
using System.Collections;
using System.Collections.Generic;
using System.Collections.Specialized;
using System.Text;
namespace VchyCalculator
{
public class PhraseStorage
{
/// <summary>
/// 分词结果保存
/// </summary>
public List<string> _strs = new List<string>();
... |
cd39b36eeed6a507ee3f3a81cc57eb26c90ea90c | C# | KristiyanGochev/TelerikHomework | /Programing/C#/C# - Part 2/II - 09 - Стрингове и текстообработка/24.ListOfWordsInAlpha/Program.cs | 3.640625 | 4 | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
//Write a program that reads a list of words, separated by spaces and prints the list in an alphabetical order.
namespace _24.ListOfWordsInAlpha
{
class Program
{
static void Main(stri... |
df26fe007c6518c6fbd7a44fcc9ab82abd9f4b0c | C# | SnowmanTackler/SamSeifert.ML | /SamSeifert.ML/Classifiers/ConfusionMatrix.cs | 2.953125 | 3 | using MathNet.Numerics.LinearAlgebra;
using System;
using System.Collections.Generic;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace SamSeifert.ML.Classifiers
{
public class ConfusionMatrix
{
/// <summary>
/// column number = actual,
... |
a9afacb82ffdb3315dd9747a8a0aaf870ad6f4fe | C# | arp2600/TopDownCar | /Assets/Scripts/SetCenterOfMass.cs | 2.640625 | 3 | using UnityEngine;
using System.Collections;
// Set the center of mass of a rigidbody2D
public class SetCenterOfMass : MonoBehaviour
{
public Vector2 _com; // The center of mass of the rigidbody
// Updated everytime a value is changed in the inspector
void OnValidate ()
{
rigidbody2D.centerOfMass = _com;
}
... |
3dd1eb24ce02a8aabcba97d45baef14df2ad22c4 | C# | AdriVanHoudt/School | /KdG12-13/.NET/Projects/Voorbeelden/E-ReaderSolution1/CA1/Program.cs | 3.328125 | 3 | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace CA1
{
class Program
{
static void Main(string[] args)
{
Book b1 = new Book("C# Language", "KdG", "C# is one of the programming languages designed for the Common Language Infrastructure."... |
12e0a5daa14ac8cd4a77664c3fa245d2e38672de | C# | ryanwentzel/DesignPatterns | /src/Core/Strategy/Compression/CompressionStrategyExample.cs | 3.3125 | 3 | using System;
using System.Linq;
using System.Text;
namespace DesignPatterns.Core.Strategy.Compression
{
public sealed class CompressionStrategyExample : Example
{
public CompressionStrategyExample()
: base("Strategy", "Compression via the Strategy pattern.")
{
}
... |
5fe2457b25843c9d46318f231b26fc4a6007bc6d | C# | jnoellsch/ektron-fluentapi | /Src/Ektron.SharedSource.FluentApi/Mapping/SmartFormAttributeMapper.cs | 2.625 | 3 | using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using System.Xml.Linq;
using System.Xml.XPath;
using Ektron.SharedSource.FluentApi.Mapping.Attributes;
namespace Ektron.SharedSource.FluentApi.Mapping
{
public static class SmartFormAttributeMappe... |
d3a8afb684d28046deddf8ae572ed46f37ce4258 | C# | karinakuroda/DirReduc | /VestasApp.Tests/ReductTests.cs | 2.75 | 3 | namespace VestasApp.Tests
{
using System;
using Xunit;
public class ReductTests
{
[Theory]
[InlineData(new object[] { "NORTH", "WEST", "SOUTH", "EAST" })]
[InlineData(new object[] { "NORTH", "WEST", "SOUTH", "EAST", "SOUTH" })]
public void DirReduc_WithValidArr... |
54d3ffc0d2f0e6441b895ca257f5698805ba2e52 | C# | dinhhung09138/CSharp-Design-Pattern | /AbstractFactoryPattern/AbstractFactoryPattern/Database/OleDBDatabase.cs | 2.515625 | 3 | using System;
using System.Collections.Generic;
using System.Text;
using System.Configuration;
using System.Data;
using System.Data.OleDb;
using System.Data.Common;
namespace AbstractFactoryPattern.Database
{
public class OleDBDatabase : Database
{
private DbConnection _Connection = null;
pr... |
6275e8f92b0dffaf1d6e59c7f241b0405a01b5da | C# | karmalmao/ASSESSMENTSpog | /AIE_Assessment_Exercise_03/Program.cs | 3.625 | 4 | /*
* Appendix1 - Exercise 3: FizzBuzz
*/
using System;
namespace AIE_Assessment_Exercise_03
{
class Program
{
static void Main(string[] args)
{
if (args.Length < 1)
{
args = new string[] { "16" };
}
int numberOfElements = int.... |
cfe9532c4994016e2f24db70489a075fb3c1fd5b | C# | aiical/DotHassServer | /DotHass.Repository/Collection/IDataCollection.cs | 2.671875 | 3 | using System;
using System.Collections.Generic;
namespace DotHass.Repository.Collection
{
public interface IDataCollection : IDictionary<string, object>, IDisposable
{
/// <summary>
///
/// </summary>
/// <typeparam name="T"></typeparam>
/// <param name="key"></param>
... |
a28672c9ac93b632ae848826f288918b1b7f020a | C# | pratikthanki/Benchy | /src/Benchy/Helpers/ValueProvider.cs | 2.9375 | 3 | using System;
using Microsoft.Extensions.Options;
namespace Benchy.Helpers
{
public interface IValueProvider
{
int GetRandomInt(int upperRange);
}
public class ValueProvider : IValueProvider
{
private readonly Random _random;
private readonly Configuration.Configuration _co... |
3bdd1ef79bcbf28793ffafdf5f5c1c28c279ca64 | C# | levonaramyan/CodeFights_Tasks | /Arcade/The Core/02. At the Crossroads/WillYou/Program.cs | 3.9375 | 4 | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
// Once Mary heard a famous song, and a line from it stuck in her head. That line was
// "Will you still love me when I'm no longer young and beautiful?". Mary believes that
// a person is loved if and ... |
5c1c6e4b32e31d2b71c3683dce4729492d60f506 | C# | DanielAviles8/ReposDeTec | /Tec/Assets/Scripts/Ejercicios2Parcial/Triangule.cs | 2.953125 | 3 | using UnityEngine;
public class Triangle : MonoBehaviour
{
private float side1, side2, side3;
private float ab, ac, bc;
public float x1, x2, x3;
public float y1, y2, y3;
private float height, theBase, perimeter, area;
private string triangleType;
private bool equilateral, isosceles, scalen... |
449d70da8e0bcdcf10a353af38d4570d1b5e8dce | C# | nguyentanhuyit/ShoeShopVersion2 | /Shoe/Shoe/Controllers/NewsletterController.cs | 2.578125 | 3 | using Microsoft.AspNetCore.Mvc;
using Shoe.Models.DBModels;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
namespace Shoe.Controllers
{
public class NewsletterController : Controller
{
private INewsletterService newsletterService;
public Newsle... |
f7bcb84d2d4db7e7142bce09edff2aee22aa8073 | C# | SNUGDC/snugdc-study-bouncy_ball | /Assets/Framework/DB.cs | 2.640625 | 3 | using System;
using System.Collections.Generic;
using UnityEngine;
namespace BB
{
public class DB : MonoBehaviour
{
public static DB _ { get; private set; }
[Serializable]
public struct SE_
{
public AudioClip Button;
public AudioClip Die;
public AudioClip Fanfare;
public AudioClip Jump;
publ... |
8f92564cba0d6f843d00cb688fda62061e6775c5 | C# | lmoreira1987/cm.dotnet | /cm.having-fun-with-code/Validate-Arithmetic-Expression/Program.cs | 3.359375 | 3 | using System;
using System.Collections;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Validate_Arithmetic_Expression
{
class Program
{
static void Main(string[] args)
{
// http://stackoverflow.com/... |
441035a9bb942f054fb51f95f013179cd881b2e4 | C# | bubdm/FluentArgs | /source/FluentArgs/Execution/PositionalArgumentStep.cs | 2.71875 | 3 | namespace FluentArgs.Execution
{
using System.Threading.Tasks;
using FluentArgs.Description;
using FluentArgs.Exceptions;
using FluentArgs.Extensions;
using FluentArgs.Reflection;
internal class PositionalArgumentStep : Step
{
public PositionalArgumentStep(Step previous, ... |
6bc1ed771652e10a9cff095bd7410033a74ff746 | C# | jesman/StockSharp | /Algo/Candles/CandleManagerContainer.cs | 2.53125 | 3 | #region S# License
/******************************************************************************************
NOTICE!!! This program and source code is owned and licensed by
StockSharp, LLC, www.stocksharp.com
Viewing or use of this code requires your acceptance of the license
agreement found at https://github.com/St... |
62f5d2a46ca8ae0528812ae2809a52b8c81c36ff | C# | milomacphail/BestHandV3 | /Card.cs | 3.328125 | 3 | using System;
using System.Collections.Generic;
using System.Text;
using System.Linq;
namespace BestHandV3
{
public class Card
{
public string[] SuitValues = { "Clubs", "Diamonds", "Hearts", "Spades" };
public string[] CardValues = { "Ace", "Jack", "Queen", "King" };
public int CardVa... |
6904c39bbf379f4d8a3b80f642aa93f839d94ad4 | C# | larsverp/circustrein | /Animal.cs | 3.046875 | 3 | namespace CircusTrein
{
public class Animal
{
public string AnimalName { get; set; }
public int AnimalPoints { get; set; }
public Eater Eater { get; set; }
public override string ToString()
{
return "Name: " + AnimalName + " | Type: " + Eater + " | Points: "... |
33f75b765a03d4f679a0d65464f0b05c2859b1cf | C# | wheelie33/TDD_Authentication | /Tdd_Authentication/LoginController.cs | 3.21875 | 3 | using System;
namespace Tdd_Authentication
{
public class LoginController
{
IAuthenticationService _authenticationService;
public LoginController(IAuthenticationService authenticationService)
{
_authenticationService = authenticationService;
}
publ... |
9cfa5d4deea34ef3cdc5a3fe4b879573e076ac3e | C# | hgirish/IssueTrackerApi | /IssueTrackerApi/Models/IssuesState.cs | 2.71875 | 3 | using System;
using System.Collections.Generic;
using System.Linq;
using IssueTrackerApi.Infrastructure;
using WebApiContrib.CollectionJson;
using CJLink = WebApiContrib.CollectionJson.Link;
namespace IssueTrackerApi.Models
{
public class IssuesState : IReadDocument
{
public IssuesState()
{
... |
2c7ac84bf4e48601b3b9f33ea45be15a36f84579 | C# | rawbenny/ListViewSample | /ListViewSample/SpinnerAdapter.cs | 2.6875 | 3 | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Android.App;
using Android.Content;
using Android.OS;
using Android.Runtime;
using Android.Views;
using Android.Widget;
using Android.Graphics;
namespace ListViewSample
{
public class SpinnerAdapter<T>:BaseAdapter,ISpinner... |
24722b3eac3b3bdf135afefc15addb6f0675eede | C# | insightmind/MORR | /application/Modules/WebBrowser/Events/ButtonClickEvent.cs | 2.734375 | 3 | using System.Text.Json;
namespace MORR.Modules.WebBrowser.Events
{
/// <summary>
/// A button click user interaction
/// </summary>
public class ButtonClickEvent : WebBrowserEvent
{
private const string serializedButtonField = "buttonTitle";
private const string serializedHrefF... |
eb308aeaf4c713a16656f81ab3a7f6635bbea692 | C# | PMinkova/SoftUni-tasks-and-projects | /C# Advanced/02. Stacks and Queues - Exercise/P01_BasicStackOperations/BasicStackOperations.cs | 3.890625 | 4 | using System;
using System.Collections.Generic;
using System.Linq;
namespace P01_BasicStackOperations
{
class BasicStackOperations
{
static void Main(string[] args)
{
int[] splitedInput = Console.ReadLine()
.Split()
.Select(int.Parse)
... |
2c3d63093dda2a251da293f1c475655fe9aebc74 | C# | askalione/Structr | /tests/Structr.Tests.AspNetCore/TagHelpers/AppendClassTagHelperTests.cs | 2.515625 | 3 | using FluentAssertions;
using Structr.AspNetCore.TagHelpers;
using Structr.Tests.AspNetCore.TestUtils;
using System.Linq;
using Xunit;
namespace Structr.Tests.AspNetCore.TagHelpers
{
public class AppendClassTagHelperTests
{
[Theory]
[InlineData(true, "test-css-class")]
[InlineData(false... |
c6b41ad63337a38a6246be64ffcce2ad63d6a756 | C# | sergey-s-null/06s-CSharp-Labs | /Lab0614/Lab0614/BitArrayEx.cs | 3.453125 | 3 | using System;
using System.Collections;
using System.Collections.Generic;
using System.Runtime.CompilerServices;
using System.Text;
namespace Lab0614
{
public static class BitArrayEx
{
public static BitArray EquivalentClone(this BitArray first, BitArray second)
{
if (first.Length !... |
c160f87317354ea77562f49c08c269a0c7d49ffc | C# | tomo1560/StarryEyes | /StarryEyes.Anomaly/TwitterApi/DataModels/Streams/StreamMessage.cs | 2.953125 | 3 | using System;
using StarryEyes.Anomaly.Utils;
namespace StarryEyes.Anomaly.TwitterApi.DataModels.Streams
{
/// <summary>
/// Base class of stream message messages.
/// </summary>
public abstract class StreamMessage
{
private static readonly DateTime SerialTime = new DateTime(1970, 1, 1, 0,... |
4a4082cf3b83695346238712178788ed3535a1af | C# | angiediep/wwf-wpf-lv2010 | /Document/Last_CD/QuanLyThi/SOURCE/APPTier/StatHandlers/Type.cs | 2.828125 | 3 | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace StatHandlers
{
public class Type
{
private string m_Name;
public string Name
{
get { return m_Name; }
set { m_Name = value; }
}
priva... |
fbf5c0de8757a0b158be600b0b5e83395a281fd9 | C# | aghazadehm/Design-Pattern-Learning | /FactoryMethod/Program.cs | 3.09375 | 3 | using System;
namespace FactoryMethod
{
class Program
{
static void Main(string[] args)
{
var shapeFactory = new ShapeFactory();
var circle = shapeFactory.CreateShape(ShapeType.Circle);
var square = shapeFactory.CreateShape(ShapeType.Square);
va... |
91899de0055e3aac47d7c9b2cd1ad10732056451 | C# | evgeniiy28/testt | /testt/testt/Dinar/Program.cs | 2.96875 | 3 | using System;
namespace Exam
{
class Program
{
static void Main(string[] args)
{
BankAccount person1 = new BankAccount("Марат", 20000);
BankAccount person2 = new BankAccount("Денис", 30000);
person1.Transfer(person2);
Console.WriteLine(person2.mo... |
1f332e044bff17536492739f32bbf97e428a105a | C# | RegiSV2/PCExpertDDD | /src/PCExpert.Core.Tests.Utils/UtilsAssert.cs | 2.625 | 3 | using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using NUnit.Framework;
using PCExpert.DomainFramework;
using PCExpert.DomainFramework.Utils;
namespace PCExpert.Core.Tests.Utils
{
public static class UtilsAssert
{
private const string ThrownExceptionOfTypeMSg = "Thrown e... |
dabfb0df88a8e7e9c210259dddfa48994988b557 | C# | hornsbym/RomanConquestUnity | /Assets/Scripts/AI/GovernorBrain.cs | 3.125 | 3 | using System.Collections.Generic;
using UnityEngine;
/// <summary>
/// A more limited version of the standard Brain class.
/// TODO: Consider moving shared functionality to an abstract class.
/// </summary>
public class GovernorBrain : Brain
{
private Governor governor { get; set; }
public GovernorBrain(Gove... |
e57378b19e3c8fe30f0a52ad10cabed2700b2c34 | C# | denFete/Colorjunction-Buster | /GUI_Project/GameOver.xaml.cs | 2.515625 | 3 | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;... |
6193aea08a102cfd18b0ca1de64ee1f64511c5da | C# | shendongnian/download4 | /code8/1411841-38381604-122658390-6.cs | 3.59375 | 4 | private static void Serialize(List<object> objectsToSerialze, FileStream fs)
{
BinaryFormatter BF = new BinaryFormatter();
try
{
BF.Serialize(fs, objectsToSerialze);
Console.WriteLine("Successfully Serialized... |
90cabd23bd0046e58f82cbc1b928305ffedba0a1 | C# | wangyougui/appbox.clr | /appbox.Reporting/Definition/TableCell.cs | 2.5625 | 3 | using System;
using System.Xml;
namespace appbox.Reporting.RDL
{
///<summary>
/// TableCell definition and processing.
///</summary>
[Serializable]
internal class TableCell : ReportLink
{
/// <summary>
/// An element of the report layout (e.g. List, Textbox, Line).
/// T... |
82ebe439023c473d40244af913c0b583c7f3e38d | C# | BenShoshani/CSharp-4-In-a-row | /GameManager.cs | 2.984375 | 3 | using System;
namespace Logic
{
public class GameManager
{
private const int k_IndexFix = 1;
private const int k_NumOfShapesToWin = 4;
private readonly int r_NumberOfPlayers = 2;
private Board m_BoardGame; ////the board of the game
private Player[] m_Players... |
a312ce859e944a00d3f2fe96bb7d2b57fb2d74e3 | C# | atgithub20196/Echo | /Assets/Echo.cs | 2.625 | 3 | using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using System.Net.Sockets;
using UnityEngine.UI;
using System;
using System.Linq;
using System.Net;
using System.Text;
public class Echo : MonoBehaviour
{
// State object for receiving data from remote device.
public class StateOb... |
61e225fef91ce320d75d8d14f24f60d87662b9ed | C# | Yanta07/KURSACH | /CalculatorUnitTests/LexerTest.cs | 3.015625 | 3 | using System.IO;
using calculator.Parser;
using Microsoft.VisualStudio.TestTools.UnitTesting;
namespace CalculatorUnitTests
{
[TestClass]
public class LexerTest
{
[TestMethod]
public void TokenizerTest()
{
var testString = "2 + 3 - 4.5";
var tokenizer... |
60649e79449a6207e9f2f867011e207e8b81906b | C# | MyUncleSam/apiv2 | /Api/Arguments/WindowInteraction/EditboxKeyDownArgs.cs | 2.640625 | 3 | namespace AdiIRCAPIv2.Arguments.WindowInteraction
{
using System;
using System.Windows.Forms;
using Interfaces;
/// <summary>
/// Arguments class passed to the EditboxKeyDown event
/// </summary>
public class EditboxKeyDownArgs : EventArgs
{
private readonly IWindow window;... |
4ecf9d8583404055470d0f3d79474a97a60e064d | C# | VB6Hobbyst7/ManuPathLib | /ManuPathLib/PathMath.cs | 2.65625 | 3 | using System;
using System.Collections.Generic;
using System.Linq;
using System.Numerics;
using System.Text;
namespace ManuPath
{
public static class PathMath
{
public static (float? t, Vector2 point)[] IsRightRayIntersectsWithPrim(IPathPrimitive prim, Vector2 rayStart)
{
if (pri... |
57946ae7e98169391b49874aaea32f9b3730e9de | C# | ViktorMamyan/examples | /C#/Code/IO.DirectoryInfo.cs | 3.21875 | 3 | using System;
using System.IO;
namespace Code
{
class Program
{
static void Main(string[] args)
{
Console.WriteLine("Press key");
Console.ReadKey();
DirectoryInfo dir = new DirectoryInfo(@"C:\Windows");
Console.WriteLine("Folders:");
... |
550c24023620c285abe9781e6198334a533c63f5 | C# | aleshakay/Garage | /Garage/Car.cs | 2.9375 | 3 | using System;
using System.Collections.Generic;
using System.Text;
namespace Garage
{
class Car : Vehicle
{
public virtual void Driving()
{
Console.WriteLine($"I am driving now");
}
public virtual void Braking()
{
Console.WriteLine($"The car has... |
b64da86d7390ce56342ff7185392e71ee65b6d18 | C# | ethantang95/CodingChallenger | /CodingChallenger/Challenges/IntersectTwoArrays.cs | 3.1875 | 3 | using CodingChallenger.Framework;
using CodingChallenger.Framework.ChallengeInterface;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace CodingChallenger.Challenges {
/// <summary>
/// Hash tables
/// </summary>
[Challenge(Cha... |
6f4a3e57fb4b80529b2957f5910b2c7296db6aaa | C# | hayalpc/FirstXamarinProject | /FirstXamarinProject/FirstXamarinProject/Helpers/RestHelper.cs | 2.828125 | 3 | using Newtonsoft.Json;
using Newtonsoft.Json.Serialization;
using System;
using System.Collections.Generic;
using System.Net.Http;
using System.Net.Http.Headers;
using System.Text;
using System.Threading.Tasks;
namespace FirstXamarinProject.Helpers
{
public class RestHelper
{
HttpClient client;
... |
3cd532cf9e7bfec20e9891575119dd343cb66364 | C# | maikgr/TheRogueGem | /Assets/Scripts/Rooms/RoomFactory.cs | 2.953125 | 3 | using UnityEngine;
using System.Collections;
using System.Collections.Generic;
public class RoomFactory : MonoBehaviour {
/* Constants
* 0: LEFT
* 1: RIGHT
* 2: TOP
* 3: BOTTOM
* /
/* Room Types
* 0: Rand
* 01: Left, right
* 02, 12: top, left, right
* 03, 13: bot, left, right
* 23: top, bot
*/
pu... |
0c298f2a5b0e7dddc8b51f19c795f525e5badc8d | C# | uzabumuhire/OOP | /DoubleDispatch/Shapes/Polymorphic/Shape.cs | 2.734375 | 3 | namespace DoubleDispatch.Shapes.Polymorphic
{
using System;
public class Shape
{
public virtual void Draw()
{
Console.WriteLine("A shape is drawn.");
}
}
}
|
f78d55c5cec06618ba2cbf51a8ff781af9bf99b3 | C# | SongToSoft/AlgorithmsAndDataStructuresLibrary | /AlgorithmsAndDataStructuresLibrary/AlgorithmsAndDataStructuresLibrary/DiscreteMath/Graph/Edge.cs | 3.40625 | 3 | namespace AlgorithmsAndDataStructuresLibrary.DiscreteMath.Graph
{
public class Edge
{
private int m_Value;
private float m_Weight;
public Edge(int value, float weight = 1)
{
m_Value = value;
m_Weight = weight;
}
public int GetValue()
... |
02259fbad27a53ed6de50c444e3f7c4e7cd953cd | C# | khinek/Ch2 | /Yards.cs/Program.cs | 3.0625 | 3 | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace Yards.cs
{
class Program
{
static void Main(string[] args)
{
int length = 25, width = 42, area = length * width;
double squareyard = (length * width) / 9;
Console... |
996cd5bedd9155df4f7765c9a44fcec97f3d8ecf | C# | YGAR84/CSharpNSU | /BookShop/BookShop.Core/Discounts/Discount.cs | 3.140625 | 3 | using System;
namespace BookShop.Core.Discounts
{
public abstract class Discount
{
public int Id { get; set; }
public DateTime ExpireDate { get; set; }
public decimal DiscountPercentage { get; set; }
protected Discount() {}
protected Discount(DateTime expireDate, int discountPercentage)
{
ExpireDat... |
e85fa5796f7f480853d27217b1985dab64060f70 | C# | DaniilBoyko/Bank | /Bank/Bank/Models/Mapping/ModelMapping.cs | 3.078125 | 3 | using BLL.Interfaces.Entities.Account;
namespace Bank.Models.Mapping
{
/// <summary>
/// Class contents methods for mapping models from view models to business layer models.
/// </summary>
public static class ModelMapping
{
/// <summary>
/// Convert business layer account model to ... |
66c4a47de067f42d7ffe29bb64ce94f48e67082b | C# | cmchoicoder/CmChoi_BugTracker | /CmChoi_BugTracker/Controllers/HomeController.cs | 2.578125 | 3 | using CmChoi_BugTracker.Helpers;
using CmChoi_BugTracker.Models;
using Microsoft.AspNet.Identity;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
namespace CmChoi_BugTracker.Controllers
{
[Authorize]
public class HomeController : Controller
{
... |
08e30cdd7c98850e0f255e7817b5f6a60821efc6 | C# | esenti/advent-of-code-2017 | /12/1.cs | 3.484375 | 3 | using System;
using System.IO;
using System.Linq;
using System.Collections.Generic;
using System.Text.RegularExpressions;
namespace Aoc
{
class Node
{
public string Name;
public List<Node> Children;
public Node(string name) {
Name = name;
Children = new List<Nod... |
445240077783d745808b75db37d82cc295832464 | C# | apaige161/LoginApp | /API/Controllers/AccountController.cs | 2.953125 | 3 |
using System;
using System.Text;
using System.Security.Cryptography;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Mvc;
using Microsoft.EntityFrameworkCore;
using API.Entities;
using API.Data;
using API.DTOs;
using API.Interfaces;
namespace API.Controllers
{
public class AccountController : BaseApiCon... |
db00bea1664af0b5a5ed958e9526c012bf55c0a9 | C# | COP4331-Proj/Retaking-Olympos | /Retaking Olympos/Assets/Scripts/Gladiator.cs | 3.046875 | 3 | using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class Gladiator
{
private string gladiatorName;
private string gladiatorClass;
private int level;
private int health;
private int stamina;
private int power;
private int defense;
private... |
34c640f34c3e7910a025b00329bb82ad3277c7a6 | C# | sunnycase/fancy2d | /tools/FCYResPackageEditor/FCYResPackage.cs | 2.734375 | 3 | using System;
using System.Collections.Generic;
using System.Text;
using System.IO;
using System.Xml;
using zlib;
namespace FancyLib
{
/*
* FCY资源结构
* 文件头
* char[4] = "frp\0" // 文件标识
* uint = 1 // 文件版本
* uint // 资源索引位移(相对文件)
*
* 主数据区
*... |
ae95ff7c6306a50b5ea74dce335da205b23353fd | C# | IvanZheng/IFramework | /Src/Sample/Sample.CommandService/Controllers/ValuesController.cs | 2.578125 | 3 | using System.Threading.Tasks;
using System.Web.Http;
using IFramework.Infrastructure;
namespace Sample.CommandService.Controllers
{
public class ValuesController : ApiControllerBase
{
// GET api/<controller>
public ValuesController(IExceptionManager exceptionManager) : base(exceptionManager)... |
bba3b91408af05afadb4feb7afcb9a18b8f1832f | C# | MGODOY-BR/smartSpriteFX | /src/smartSpriteFX/smartSpriteFX.PictureEngine.Test/PictureTest.cs | 2.65625 | 3 | using System;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using smartSuite.smartSpriteFX.Pictures;
using System.Linq;
using System.Drawing;
namespace smartSuite.smartSpriteFX.PictureEngine.Test
{
[TestClass]
public class PictureTest
{
[TestInitialize]
public void Setup()
{
... |
940f2df637791b2b7da7ded4278ba7cf028f83f8 | C# | willemsevenster/frontforge.opendocx | /examples/DotNetCore.ConsoleApp.Basic/Program.cs | 2.765625 | 3 | using System.Diagnostics;
using System.IO;
namespace DotNetCore.ConsoleApp.Basic
{
internal class Program
{
#region static fields and constants
private const string FileNameBasicDoc1 = "basic-sample.docx";
#endregion
#region implementation
private static void Main(s... |
6623c9fde836aac871eebb004aa8ab2149e3fb36 | C# | Shor-van/Snake | /Snake/Screens/UIElements/Arrow.cs | 3.453125 | 3 | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace Snake.Screens.UIElements
{
//Handles the selection arrow
public class Arrow
{
ConsoleColor color; //The color of the arrow
int posX, posY; //The location on the screen
bool invert; //Wea... |
ecfa5b8148e9dc9dec537025ad2425551e53e038 | C# | shivaping/JobSearchV1 | /JobSearch/Models/Mapping/UserMap.cs | 2.75 | 3 | using System.ComponentModel.DataAnnotations.Schema;
using System.Data.Entity.ModelConfiguration;
namespace JobSearch.WebAPIHelper.Models.Mapping
{
public class UserMap : EntityTypeConfiguration<User>
{
public UserMap()
{
// Primary Key
this.HasKey(t => t.User_Id);
... |
23d198fec59e4c2f59c8501e1593dd1aaa457309 | C# | nagarajas/RestFileUploader | /Service/Controllers/UploadFileController.cs | 2.734375 | 3 | using System;
using System.Collections.Generic;
using System.Configuration;
using System.Linq;
using System.Net;
using System.Net.Http;
using System.Web;
using System.Web.Http;
using System.Threading.Tasks;
using System.IO;
namespace RestFileUploader.Service.Controllers
{
public class UploadFileController : ApiCo... |
e7e8f514c363003b0459418ca226344b19a0ac82 | C# | FraErriques/cvDb | /bk_/Backup1/Entity/FormatConverters/CharConversion.cs | 2.609375 | 3 | using System;
using System.Text;
namespace Entity.FormatConverters
{
public static class CharConversion
{
/// <summary>
/// simbolo= codice=0
///simbolo=☺ codice=1
///simbolo=☻ codice=2
///simbolo=♥ codice=3
///simbolo=♦ codice=4
///simbolo=♣ cod... |
5318ede267276041a89e01e273b1e48a5c95785a | C# | ultrma/WordAnalysis | /WordAnalysis.DataAccess/Helpers/FullTextSearchHelper.cs | 3.296875 | 3 | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace WordAnalysis.DataAccess.Helpers
{
public class FullTextSearchHelper
{
/// <summary>
/// This helper function returns formated text which will be used in SQL full text s... |