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 |
|---|---|---|---|---|---|---|
4308d460a48c48c3b5e9c23c4b1d6c636c922c60 | C# | shendongnian/download4 | /first_version_download2/374669-32256687-98377146-2.cs | 2.734375 | 3 | class BackgroundWorkerExample
{
private BackgroundWorker _backgroundWorker;
public Program()
{
_backgroundWorker = new BackgroundWorker();
_backgroundWorker.DoWork += BackgroundWorker_DoWork;
_backgroundWorker.RunWorkerCompleted += BackgroundWorker_RunWorkerCompleted;
}
private void button1_Click(... |
c32fa2f2a75a9c41a6bd8042331dcea110a745bf | C# | StPeteFrank/numberpicker2practice | /Program.cs | 3.78125 | 4 | using System;
namespace numberpicker2practice
{
class Program
{
static void Main(string[] args)
{
var minimum = 0;
var maximum = 100;
var guess = maximum / 2;
var guessing = true;
Console.WriteLine(guess);
while (guessing)
{
Console.WriteL... |
3584dbac4e55f79702c8c6051ce899a9fdb0566b | C# | w2Mac/CHashTest | /pitest.cs | 3.796875 | 4 | using System;
namespace UserInput
{
public class SeptaClass
{
public static void Main(string[] args)
{
string userInput1;
string userInput2;
int a;
int b;
Console.Write("Please give a number as 1st variable: ");
userInput1 = Console.ReadLine();
/* Converts to integer type */
a ... |
cb73bb4b935573d5840b6f1fcea75c1fb0ebe953 | C# | walidulhasan/TestService | /TestService/CustomValidation/uparCase.cs | 3.078125 | 3 | using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Text.RegularExpressions;
using System.Web;
namespace TestService.CustomValidation
{
public class UpperCaseAttribute : ValidationAttribute
{
//UpperCase
protected overrid... |
78fcd5fe3ac29747b135c103ab8e1b9a70f907bf | C# | Wumpus-Team-Chi/Wumpus-Code | /HuntTheWumpus/HighScore.cs | 3.453125 | 3 | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace HuntTheWumpus
{
class HighScore
{
private int playerScore;
public HighScore(int score)
{
playerScore = score;
}
pub... |
f9e9f036ff85c05643d523008d0ea53950190cc2 | C# | PNNL-Comp-Mass-Spec/Informed-Proteomics | /InformedProteomics.TopDown/Scoring/FlipScoringGraphEdge.cs | 2.6875 | 3 | using System;
using InformedProteomics.Backend.Data.Sequence;
using InformedProteomics.Backend.Data.Spectrometry;
using InformedProteomics.Scoring.GeneratingFunction;
using InformedProteomics.TopDown.Scoring.FlipScoring;
namespace InformedProteomics.TopDown.Scoring
{
/// <summary>
/// Scoring graph e... |
22fc4be5843c569217ceebb8c3b46464a9305f12 | C# | steveavl46/AdvantageLaser | /AdvantageLaserData/Data/BusObjects/DataAccess/CouponDataAccess.cs | 2.625 | 3 | using AdvLaser.AdvLaserObjects;
using System;
using System.Collections.Generic;
using System.Data;
using System.Data.SqlClient;
using System.Linq;
using System.Text;
namespace AdvLaser.AdvLaserDataAccess
{
public static class CouponDataAccess
{
public static Coupon GetOne(int aCouponKey)
{
... |
810620e20e95457882ecf765e37e40473620ad62 | C# | protokopf/-CS-Sheduler | /OrganizerCore/Model/ModelCore.cs | 2.59375 | 3 | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace OrganizerCore.Model
{
public class ModelCore : IDisposable
{
public interface IModelBaseCommunicator
{
void PushPackagesList(List<Pac... |
f34f16ea2713a405463ef8a23f49de1902f4c8a8 | C# | BrianZell/TaskActions | /Src/IDT.TaskActions/BackoffInterval.cs | 3.125 | 3 | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace IDT.TaskActions
{
/// <summary>
/// TimeSpan = smaller of (resetInterval * (count ^ scalingFactor)) or maxInterval
/// </summary>
public class BackoffInterval : IInt... |
44cfab5b183c000a4e14fa5a938d8631bd5fd1f7 | C# | gildasiocardoso/the-best-on-linq | /MakingLinqEasyTheBestOnLinq/FormMain.cs | 3.1875 | 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 MakingLinqEasyTheBestOnLinq
{
/// <summary>
/// LINQ Demonstration - feel... |
c88eb7075636a3d3ba9a4b3625553b8e74d0f5d5 | C# | iknowDavenMC/SuperFlash | /COMP476Proj/COMP476Proj/IntelligenceComponent/Pathfinding/AStar.cs | 3.15625 | 3 | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework;
namespace COMP476Proj
{
/// <summary>
/// Static class to run the A* algorithm
/// </summary>
public static class AStar
{
/// <summary>
/// Helper clas... |
d23d521944959020f8ed850d309409824d512fe5 | C# | YasakaShun/test_csharp | /dokushu/dokushu/Test6.cs | 3.265625 | 3 | using System;
using System.Collections.Generic;
namespace dokushu
{
class Test6
{
public static void Exec2()
{
var dic = new Dictionary<string, string>()
{
["lettuce"] = "レタス",
["spinach"] = "ほうれんそう",
["cucumber"] = "きゅうり"... |
f9bab12d02b932aaeb5923a3ca225e02405d14a9 | C# | nureyev/Pixel-Sprite-Generator-CSharp | /Pixel-Sprite-Generator-CSharp/Window1.xaml.cs | 2.59375 | 3 | using Pixel_Sprite_Generator.SpriteGen;
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.Me... |
b19a5fb4239a74601d708e354d976cddd45e9634 | C# | Horusiath/UTorri | /UTorri/TorrentJobProperties.cs | 2.578125 | 3 | using System;
using System.Linq;
using System.Collections.Generic;
using Newtonsoft.Json;
namespace UTorri
{
/// <summary>
/// Torrent task properties class.
/// </summary>
public class TorrentJobProperties : RequestResult
{
private IDictionary<string, string> _changedValues;
/// <... |
1747bfa24a4edd02267dac29510e232cb7fbf787 | C# | stoyanov7/SoftwareUniversity | /C#Development/C#OOPBasics/DefiningClasses-Lab/01.BankAccount/01.BankAccount/StartUp.cs | 2.890625 | 3 | namespace _01.BankAccount
{
using System;
public class StartUp
{
public static void Main(string[] args)
{
var bankAccount = new BankAccount();
bankAccount.ID = 1;
bankAccount.Balance = 15;
Console.WriteLine($"Account {bankAccount... |
10c10bfbd1a10d09839df500a3664035c9b357cc | C# | CloudNStoyan/homework | /ConsoleApp1/BinaryToDecimal/Program.cs | 3.953125 | 4 | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace BinaryToDecimal
{
class Program
{
static void Main(string[] args)
{
//Using loops write a program that converts a binary integer number to its decimal form.... |
3f0db0e278316e99da527147c00e1604c4fa7d3d | C# | nick0000100/ScheduleNeo | /Models/RegisterUserModel.cs | 2.640625 | 3 | using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
namespace scheduleNEO.Models
{
public class RegisterUserModel : BaseEntity
{
[Required]
[MinLength(2)]
[RegularExpression(@"^[A-Za-z0-9]+$", ErrorMessage="No special characters.")]
[Disp... |
3a5ba596f4659c5af3e77bc4c510d3b2e7daeb5e | C# | undejavue/SITbusiness | /NotifyServer/ServerCore.cs | 2.828125 | 3 | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Net;
using System.Net.Sockets;
using System.Threading;
using System.Diagnostics;
namespace NotifyServer
{
public class NotifyServerCore
{
private TcpListener listenerLocal;
private Thread listene... |
79a75be88cac805489f1301d935521b4a0967c59 | C# | appsafeleads/iugu-net-standard | /iugu.net.standard/Response/ErrorResponseMessage.cs | 2.703125 | 3 | using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Text.RegularExpressions;
using System.Threading.Tasks;
namespace iugu.net.standard.Response
{
public class ErrorResponseMessage
{
public int StatusCode ... |
14f864296b30d384dff9ff2ef48b5c6914c2baa0 | C# | alexandra26arkhipenko/Day-8 | /NET.W.2017.Arkhipenko.8/ConsoleApp/Sort/SortByName.cs | 3.109375 | 3 | using System.Collections;
using System.Collections.Generic;
using Books;
namespace ConsoleApp
{
public class SortByName : IComparer<Book>
{
public int Compare(Book lhs, Book rhs)
{
if (ReferenceEquals(lhs, null))
{
return 1;
}
if ... |
5bd8911e03b89573ccb2093e6ff3b139171cb0df | C# | jecus/CasWeb | /BusinessLayer/Repositiry/AircraftRepository.cs | 2.59375 | 3 | using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using BusinessLayer.Repositiry.Interfaces;
using BusinessLayer.Views;
using Entity.Extentions;
using Entity.Infrastructure;
using Microsoft.EntityFrameworkCore;
namespace BusinessLayer.Repositiry
{
public class AircraftRepository : IA... |
1df6ad1afd6b3e1ff8c70f7cd59cb9e087dc28ab | C# | JorgeCarlosVicenteSuarez/Battleships | /BattleShips.Logic.Tests/ShipTests.cs | 2.671875 | 3 | namespace BattleShips.Logic.Tests
{
using NUnit.Framework;
[TestFixture]
public class ShipTests
{
[Test]
public void ShipNotSunkWhenCreated()
{
var destroyer = new Destroyer();
var battleship = new Battleship();
Assert.IsFalse(destroyer.Sunk... |
7a972ecdb31f8d2210b273c8c79ce1328a4baa46 | C# | duyhuytdh/SendEmail | /SendMail/SendMail/Util/TempHtmlReader.cs | 2.703125 | 3 | using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Web;
using System;
using System.IO;
using System.Diagnostics;
using System.Configuration;
namespace SendMail.Util
{
public static class TempHtmlReader
{
public static string tempEmail(strin... |
40a13e6b79dd1b0eb2a54ebe0b5ffa764fa65dc7 | C# | Miliverse/Chapter_11 | /Chapter_11/Program.cs | 2.984375 | 3 | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Media;
using System.Threading;
using System.IO;
using System.Diagnostics;
using System.Runtime.InteropServices;
namespace Chapter_11
{
public static class Game
{
//Establish... |
b51ec8f654fcbf62646ef54be7579148b2890813 | C# | Michael-Libois/fnuc | /DAL/Repository/UserRepo.cs | 2.953125 | 3 | using Common.interfaces;
using DAL.Context;
using DAL.Entities;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace DAL.Repository
{
public class UserRepo : Irepository<User>
{
private DatabaseContext dbContext;
public U... |
0a5e3909e67a8317d5a7aa7f193d08de6d070312 | C# | fredatgithub/SpiceSharp | /SpiceSharp/Components/Distributed/VoltageDelays/VoltageDelay.cs | 2.671875 | 3 | using SpiceSharp.Attributes;
using SpiceSharp.Components.VoltageDelays;
using SpiceSharp.ParameterSets;
using System;
namespace SpiceSharp.Components
{
/// <summary>
/// A component that will drive an output to a delayed input voltage.
/// </summary>
/// <seealso cref="Component" />
/// <seealso c... |
60e3f97a57035b7980883fb4e3c8dbed66d7c936 | C# | broplz/MyTD | /Assets/Scripts/Enemy.cs | 2.5625 | 3 | using System;
using System.Collections;
using TMPro;
using UnityEngine;
public class Enemy : MonoBehaviour
{
private int target = 0;
private GameObject[] wayPoints;
[SerializeField] private float navigation;
[SerializeField] private int health;
[SerializeField] private float speed = 0.1f;
private... |
fba779ca874bd261f31b399b082547d2215adb3d | C# | lvyitian/BaristaCore | /src/BaristaLabs.BaristaCore.Extensions/Blob.cs | 3.09375 | 3 | namespace BaristaLabs.BaristaCore
{
using System;
using System.Collections.Generic;
using System.Text;
/// <summary>
/// Represents a file-like object of immutable, raw data.
/// </summary>
/// <see cref="https://developer.mozilla.org/en-US/docs/Web/API/Blob"/>
public class Blob
{
... |
5d3dc545dabd429dbc81503538fe2d4d9a4cd2e0 | C# | abaula/DistanceBtwCities | /WebApi/DistanceBtwCities.WebApi/Caching/CacheManager.cs | 2.78125 | 3 | using System;
using System.Linq;
using System.Net.Http;
using System.Net.Http.Headers;
using System.Runtime.Caching;
namespace DistanceBtwCities.WebApi.Caching
{
internal class CacheManager : ICacheManager
{
private readonly ICacheSettingsManager _cacheSettingsManager;
private static readonly ... |
67f5dbb46deb2baa8b74f255237ff24eca514778 | C# | markfrance/Recording-Monitor | /packages/MSharp.Framework.2.1.0.629/src/Data/Engine/Cache.cs | 2.828125 | 3 | using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Web;
namespace MSharp.Framework.Data
{
enum CacheContainerStrategy
{
Universal,
PerHttpRequest
}
/// <summary>
/// Provides a cache of objects retrieved fro... |
11a61e41e17b2255afd05ce2efefc549912aade9 | C# | alfaproject/Supay.Irc | /Supay.Irc/Messages/Replies/IrcX/KnockReplyMessage.cs | 2.84375 | 3 | using System;
using System.Collections.Generic;
namespace Supay.Irc.Messages
{
/// <summary>
/// A reply to a <see cref="KnockMessage" />.
/// </summary>
[Serializable]
public class KnockReplyMessage : NumericMessage
{
/// <summary>
/// Creates a new instance of ... |
4e5ea02163948b397139d7e52bee2ec4ca939583 | C# | kamila-ropela/DocSystem | /DocSystem/DatabaseFiles/Helper/DocumentationTable.cs | 2.71875 | 3 | using DocSystem.Models;
using System;
using System.Collections.Generic;
namespace DocSystem.DatabaseFiles.Helper
{
public static class DocumentationTable
{
public static List<Documentation> GetDocByDisease(string disease,int pid)
{
return Properties.dbContext.GetDocumentationDb($@"... |
c88cf6e6f4425265a0756497cb94dfc7b6061b13 | C# | shendongnian/download4 | /code11/1963862-59756137-213011581-14.cs | 2.796875 | 3 | class MainWindowViewModel : IDialogViewModelProvider
{
public void ShowFileAlreadyExistsDialog()
{
// Create the IDialogViewModel for the File Exists dialog
var dialogTitleBarIcon = new BitmapImage(new Uri("../../logo.ico", UriKind.Relative));
if (titleBarIcon.CanFreeze)
... |
99489082f97a389755a21f34285ea108348cea9b | C# | MatthiasSchilder/DotSpatial | /Source/Core/DotSpatial.NTSExtension/Voronoi/VNode.cs | 2.6875 | 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;
namespace DotSpatial.NTSExtension.Voronoi
{
/// <summary>
/// The VNode.
/// </summary>
internal abstract class VNode
{
... |
dc314c63f7ae4e32a8113445ab91e910db56cf46 | C# | npolyak/NP.LinearAlgebra | /MainTest/DimensionsUtils.cs | 3.171875 | 3 | using NP.Utilities;
using System;
using System.Collections.Generic;
using System.Linq;
namespace MainTest
{
public static class DimensionsUtils
{
public static Func<int, bool> DimensionCondition = (i) => i > 0;
public static string DimensionsToStr(this IEnumerable<int> dimensions)
{
... |
037c13ada852ccf7c2d9e54acd27c3e94bd95c15 | C# | msruzy/digimon-linkz-client | /System.Xml/System/Xml/Serialization/XmlSchemas.cs | 2.796875 | 3 | using System;
using System.Collections;
using System.Collections.Generic;
using System.Globalization;
using System.Xml.Schema;
namespace System.Xml.Serialization
{
/// <summary>Represents the collection of XML schemas.</summary>
public class XmlSchemas : CollectionBase, IEnumerable<XmlSchema>, IEnumerable
... |
c0b3911eedaa16367098a39c9c3d2ccacfb84994 | C# | Nick-Semenyk/BSU.ASP15.01.Day8.Semenyk | /Matrix/Matrix/Matrix.cs | 3.15625 | 3 | using System;
using System.CodeDom;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.CSharp.RuntimeBinder;
using static System.Math;
namespace Matrix
{
public abstract class Matrix<T> : IEnumerable<T>
{
public int Size { get; protected s... |
51da4aae49441738b037a403fe410feec9d3bf81 | C# | YoeriVD/ADCSBDEMOS | /ADCSBDEMOS/Chapter 5/TaskParallelLibraryDemos.cs | 3.296875 | 3 | using System;
using System.Collections.Generic;
using System.Threading;
using System.Threading.Tasks;
namespace ADCSBDEMOS.Chapter_5
{
internal class TaskParallelLibraryDemos
{
public event EventHandler SomeEvent;
public void Run()
{
//ParallelDemo();
Tasks();
... |
21cd546c8676c49cec64c78c1bda967048acb857 | C# | GwennyB/Lab04-TicTacToe | /Lab04_TicTacToe/Classes/Board.cs | 3.765625 | 4 | using System;
using System.Collections.Generic;
using System.Text;
namespace Lab04_TicTacToe.Classes
{
public class Board
{
/// <summary>
/// Tic Tac Toe Gameboard states
/// </summary>
public string[,] GameBoard = new string[,]
{
{"1", "2", "3"},
{"4", "5", "6"},
{"7", "8", ... |
a5bb5727b14689d55678279298f620fd01e91dda | C# | dkhodko/Att_1 | /1_28_3/3_1_28.cs | 3.671875 | 4 | using System;
namespace _3_1_28
{
enum SimpleColor
{
Black,
White,
Gray,
Red,
Orange,
Yellow,
Green,
Blue
}
class Program
{
static bool IsPointAboveParabolaY(double x, double y, double x0, double y0, double a)
{
... |
60a5ba44ed16add8e135ec2d59b80a11a5f583de | C# | Bhitt/Hash_Tables | /Unique_Morse_Code_Words/Solution1.cs | 3.84375 | 4 | /*
Solution 1
1) Enter the morse code letter representations into a hashmap for quick lookup
2) Keep a hashset for the transformations built from each word
3) Use a stringbuilder when creating transformations for fast appends
4) Foreach word in words
Map each character to its morse code representation. Appen... |
4d6098bc17fad83d4937281e2eb008d6432d2917 | C# | briang123/Vidly | /Vidly/App_Start/MappingProfile.cs | 2.5625 | 3 | using AutoMapper;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using Vidly.Dtos;
using Vidly.Models;
namespace Vidly
{
public class MappingProfile : Profile
{
//commented out block is for latest version of AutoMapper vs. v4.1
//public static void Run()
... |
b88ef0fc9dc81afda3bdd736c9d01c65f87ddd5d | C# | RachanaReddy47/AspMVC | /AspMVC/Models/DBOperations.cs | 2.65625 | 3 | using System;
using System.Collections.Generic;
using System.Data.Entity.Infrastructure;
using System.Data.SqlClient;
using System.Linq;
using System.Web;
namespace AspMVC.Models
{
public class DBOperations
{
static DemoEntities D = new DemoEntities();
public static string InsertEmp(EMPDATA... |
78981015ee07c5d8f0fe293e6c2e891f06109a71 | C# | Bikeman868/OwinFramework.Authorization | /OwinFramework.Authorization.Core/DataContracts/Permission.cs | 2.71875 | 3 | namespace OwinFramework.Authorization.Core.DataContracts
{
/// <summary>
/// The database representation of a permission that is tested
/// by the application software before allowing access to
/// restricted features.
/// </summary>
public class Permission
{
/// <summary>
... |
79abdfbfeb9c51639ee195ed6d6b4560969768f7 | C# | ser910/uwp | /NetGames/Tank/GameObject/Tank.cs | 2.734375 | 3 | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using TankGame.Map;
namespace TankGame.GameObject
{
public class Tank : GameObject
{
public Tank(double X, double Y, double Speed = 1, double Health = 1, Direction Direction = Direction.... |
b5dda7727c8f0cd80ee43fe0d30d9583160b2957 | C# | Krypton091/MG_SE256 | /SE256_RazorFinal_MattG/Models/SongModel.cs | 2.546875 | 3 | using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Threading.Tasks;
namespace SE256_RazorFinal_MattG.Models
{
public class SongModel
{
[Required]
public int Song_ID { get; set; } //primary key
[Required, StringL... |
7eaca46a1f68e8fbdc439796d73d53d6724cba35 | C# | sakapon/AtCoder-Contests | /CSharp/Contests2022/ABC234/E.cs | 3.40625 | 3 | using System;
using System.Collections.Generic;
using System.Linq;
class E
{
static void Main() => Console.WriteLine(Solve());
static object Solve()
{
var x = long.Parse(Console.ReadLine());
var nums = new List<long>();
for (int k = 1; k <= 18; k++)
{
var ks = Enumerable.Range(0, k).ToA... |
5801061bc12a175486e5e1e96bc99eca0fa31194 | C# | lucypero/BehaviorTreeCS | /BehaviorTreeCS/Components/Actions/PopFromStack.cs | 2.859375 | 3 | using System;
using System.Collections.Generic;
namespace BehaviorTreeCS {
public class PopFromStack : Action {
string stackKey;
string stackValKey;
public PopFromStack(string stackKey, string stackValKey) {
this.stackKey = stackKey;
this.stackValKey = stackValKey;... |
6d1bb8b9e67311eb97ce3ce6880c586a431783f7 | C# | georgipyaramov/HighQualityProgrammingCode | /UnitTesting/TestSchoolSystem/SchoolTest.cs | 3.078125 | 3 | namespace TestSchoolSystem
{
using System;
using System.Collections.Generic;
using System.Reflection;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using SchoolSystem;
[TestClass]
public class SchoolTest
{
[TestMethod]
public void AddNewStudent_AddOneStudent()
... |
c04f91f1700761164f122d09682e52e2a3e78660 | C# | DippingBird/MultilayerPerceptron | /MultilayerPerceptron/RememberingMultilayerPerceptron.cs | 2.859375 | 3 | using System.Collections.Generic;
using System;
namespace MultilayerPerceptron
{
/// <summary>
/// Additionally saves the previous gradient
/// </summary>
internal abstract class RememberingMultilayerPerceptron : GeneralMultilayerPerceptron
{
protected Matrix[] previousWeightGradients;
... |
d0204327c453117c135ec53767fc2042b994d598 | C# | MallikarjunaPavuluri/C-Events-DelegatesAndLambdas | /Delegates.cs | 3.3125 | 3 | using System;
namespace Hotel
{
public delegate void MyAction<T>(T a,T b);
public delegate int Price(int t);
public class Room
{
public static int Cost(int days)
{
return days * 50;
}
public static int Discount(int days)
{
return days * 10;... |
314769ce2ec63f82091354344cd95c3d20f2858c | C# | Vinicius-Brito-Costa/ShootaGun | /UI - Scene/UIBar.cs | 2.59375 | 3 | using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
[AddComponentMenu("UIEssentials/Bar")]
public class UIBar : MonoBehaviour
{
public string name;
Image bar;
float originalValue, currentValue;
void Awake()
{
bar = GetComponen... |
bb8afe7ce61b680e862ad715eac00fcf01367d7f | C# | salutdev/ProblemSolving | /ConsoleApplication/NumberTheory/SieveOfEratosthenes.cs | 3.703125 | 4 | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ConsoleApplication1.NumberTheory
{
public class SieveOfEratosthenes
{
public void Find()
{
int n = 10000;
bool[] nums = new bool[n + 1];
... |
eef3347e0444edde17c2e97498d0d2aa11d82bd0 | C# | alexandre1000a/HackaCity | /Cejen/Cejen.Client/ClientBase.cs | 2.59375 | 3 | using System.Net;
using Newtonsoft.Json;
namespace Cejen.Client
{
public class ClientBase
{
private readonly WebClient _client;
private readonly string _value;
public ClientBase()
{
const string url = "http://www.precodoscombustiveis.com.br/mapa/atualiza?swlat=-20.... |
e2fc6bc75c603fa1e22674f28fc01e3f1882b643 | C# | emiliobs/AppDivisasMVVM2 | /AppDivisasMVVMApi/AppDivisasMVVMApi/ViewModels/MainViewModel.cs | 2.625 | 3 | using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.ComponentModel;
using System.Dynamic;
using System.Linq;
using System.Net.Http;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Input;... |
86e217dcee776d34c3937e76a8c5347811a0c1ab | C# | DarkDestry/Cauldron | /Cauldron/IPC/Command.cs | 2.734375 | 3 | using System;
using System.Diagnostics.SymbolStore;
using System.Security.Cryptography;
using System.Text.Json;
using System.Text.Json.Serialization;
namespace Cauldron.IPC
{
public abstract class Command
{
[JsonPropertyName("command")]
public CommandType IpcCommand { get; }
... |
3f29fd8bbe04cda5b67841d9863366e1380c4153 | C# | byronqiji/HeartMonitor | /HeartModel/StateMachine/RunningHeart.cs | 2.71875 | 3 | using System;
using System.Runtime.CompilerServices;
using System.Threading;
using HeartModel.StateMachine.RunningMachine;
[assembly: InternalsVisibleTo("HeartMVC.Tests")] // 添加友元,用于单元测试
namespace HeartModel.StateMachine
{
/// <summary>
/// 心跳运行状态
/// </summary>
[Serializable]
public class Runnin... |
e1545360ebc7e55419da7540dbcf11943ebea64a | C# | rBaun/DesignPatternsCSharp | /DesignPatterns/1. SOLID Principles/InterfaceSegregation.cs | 3.578125 | 4 | using System;
using System.Collections.Generic;
using System.Text;
namespace DesignPatterns.SOLID_Principles
{
/**
* The idea is to keep the interfaces segregated.
* This is done by making interfaces, where there is
* only the functionality needed in each interface.
*
* So basically, don... |
60d89b2a61f32086d7bc50c0e779cabc59ad8746 | C# | tsvetelina-e-y/Unwe_DotNet | /2_exercise/7_task/Program.cs | 3.25 | 3 | using System;
namespace _7_task
{
class Program
{
static void Main(string[] args)
{
Console.WriteLine("Radius");
int radius = int.Parse(Console.ReadLine());
Console.WriteLine($"P = {Math.Round(Math.PI * radius * 2, 2)}");
Console.WriteLine($"S =... |
a7ffa6838286761f4db38b14e1e415ef50b6be48 | C# | salileo/WallpaperManager | /WallpaperManager/BackgroundSetter.cs | 2.609375 | 3 | using System;
using System.Collections.Generic;
using System.Drawing;
using System.IO;
using System.Runtime.InteropServices;
using System.Windows;
using System.Windows.Forms;
using System.Windows.Media;
using System.Windows.Media.Imaging;
namespace WallpaperManager
{
class BackgroundSetter
{
[DllImpor... |
60a1aa1f0668f08849cf72baca2c3987ba991188 | C# | monpl/com.monpl.ui | /Runtime/UIManager.cs | 2.53125 | 3 | using Cysharp.Threading.Tasks;
using UnityEngine;
namespace Monpl.UI
{
public class UIManager : MonoBehaviour
{
private static UIManager _instance;
public static UIManager Instance
{
get
{
if (_instance != null)
return _instan... |
a24e770c11a32aa4233732cd7e6491f4be96b661 | C# | romanrakus/SLMM | /SLMM/Common/Logging/LazyLogger.cs | 2.859375 | 3 | using System;
using SLMM.Common.Extensions;
namespace SLMM.Common.Logging
{
internal class LazyLogger : ILogger
{
private readonly Lazy<ILogger> _logger;
public LazyLogger(Func<ILogger> factory)
{
Ensure.NotNull(factory, nameof(factory));
_logger = new Lazy<ILog... |
306ebdfc3843f43ebbf55c39a8c87a4f8674e799 | C# | YR1044/SyncTrayzor | /src/SyncTrayzor/Services/Ipc/IpcCommsClient.cs | 2.875 | 3 | using System;
using System.IO.Pipes;
using System.Text;
namespace SyncTrayzor.Services.Ipc
{
public class UnknownIpcCommandException : Exception
{
public UnknownIpcCommandException(string message)
: base(message)
{
}
}
public interface IIpcCommsClient
{
... |
fbd6e9120dd2bd18ef81e8c9aa3ba2f20481a76a | C# | am11/pcre-net | /src/PCRE.NET.Tests/PcreNet/ReplaceTests.cs | 2.65625 | 3 | using System.Globalization;
using NUnit.Framework;
namespace PCRE.Tests.PcreNet
{
[TestFixture]
public class ReplaceTests
{
[Test]
public void should_replace_matches_with_callback()
{
var re = new PcreRegex(@"a+", PcreOptions.IgnoreCase);
var result = re.Rep... |
5f8aef1771c7b571d33616f9ec0e3b7d583668ff | C# | Sakthipriya123/NewsTracker | /Auction Project/Auction Project/API/AuctionController.cs | 2.640625 | 3 | using Auction_Project.Models;
using Auction_Project.Services;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Net.Http;
using System.Web.Http;
namespace Auction_Project.API
{
public class AuctionController : ApiController
{
private IAuctionService _au... |
a46fb136c287c2d594aeebc4b2d793e351b527b5 | C# | kibedy/CharGenWpf | /CharGenWpf/MyConverter.cs | 2.6875 | 3 | using System;
using System.Collections.Generic;
using System.Globalization;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Data;
namespace CharGenWpf
{
public class MyConverter:IValueConverter
{
public object Convert(object value, Type targetType, object param... |
c3470330ab71bbbb8c825da6b6418f4be6f648a0 | C# | CesarHLR/POO | /Parametros/Program.cs | 3.609375 | 4 | using System;
namespace Parametros
{
class Equipo
{
public string nombre;
public Equipo()
{
nombre="Real Madrid";
}
//Año de fundacion del equipo con parametrio in
//Esta vacio porque el año de fundacion no cambia
public void Añ... |
c03c35b53958472345f8a5b2e14e88832e659d62 | C# | ProteoWizard/pwiz | /pwiz_tools/Bumbershoot/idpicker/Util/STL_Containers/RBTree.cs | 2.765625 | 3 | /*=====================================================================
File: RBTree.cs
Summary: Implementation of the RBTree class.
Author: Joannes Vermorel (joannes@vermorel.com)
Last Modified: 2002-07-13
Acknowledgement: Brian Berns (code improvements)
Copyright 2003 Joa... |
78eb5179f06d236ec58210252f67e374d4454bd1 | C# | BrentMon/NUnitTest | /UnitTestProject2/02_PageObjectsAndFeatures/02_Object Repository/PageObjects_Amazon.cs | 2.578125 | 3 | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using NUnit.Framework;
using OpenQA.Selenium;
//using OpenQA.Selenium.IE;
using OpenQA.Selenium.Support.UI;
namespace UnitTestProject2
{
class AmazonObjects
{
public st... |
8df04af330133ee5f58cb2ceb3d6121d9f12f0ae | C# | foo4foo/hci_projekat | /hci/Models/Software.cs | 2.859375 | 3 | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace hci.Models
{
public class Software
{
private string dbID;
public string DbId
{
get { return dbID; }
set { dbID = value; }
}
... |
c9d6f28ae9aa2a3ffef2a1e26a37fe882b8c53f3 | C# | LapkoMax/GameAchievements | /AngularWeb/MediatRComands/Genre/GetGenreCommand.cs | 2.609375 | 3 | using AutoMapper;
using DataAccess.Repository;
using Entities.DataTransferObjects;
using MediatR;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading;
using System.Threading.Tasks;
namespace AngularWeb.MediatRComands.Genre
{
public class GetGenreCommand : IRequest<GenreDto>
... |
5f2007046c4049d22dbb58b47c72124c7b180583 | C# | rizidorio/CEP_Version1 | /CEP/CEP/MainPage.xaml.cs | 2.765625 | 3 | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Xamarin.Forms;
using CEP.Servico.Modelo;
using CEP.Servico;
namespace CEP
{
public partial class MainPage : ContentPage
{
public MainPage()
{
InitializeCompone... |
75c8ace6d39259ce9a1f25853927213a5fce4b44 | C# | LXShades/plantgenerator | /Assets/Scripts/Generators/GenPetal.cs | 2.5625 | 3 | using System.Collections;
using System.Collections.Generic;
using UnityEngine;
[System.Serializable]
public class GenPetal : GenMesh
{
Vector3 start;
Vector3 direction;
float radius;
AnimationCurve outline;
int numLengthVertices = 0;
public GenPetal(Vector3 start, Vector3 direction, float rad... |
03048019c5d2723410124cb10190d3c09570643c | C# | esciranka/xklementm | /Game/Assets/Level1/Scripts/ChangeInstruction.cs | 2.515625 | 3 | using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
public class ChangeInstruction : MonoBehaviour
{
Text text;
Text bigText;
// List<string> instructionsBigText = new List<string>();
List<string> instructions = new List<string>();
int index;
//... |
01408a77400f74ef4c98206b49415b6e6f68611c | C# | FourHyphen/MyTrimmingNew | /MyTrimmingNew/AuxiliaryLine/AuxiliaryLineCommandList.cs | 3.078125 | 3 | using System.Collections.Generic;
namespace MyTrimmingNew.AuxiliaryLine
{
class AuxiliaryLineCommandList
{
private List<AuxiliaryLineCommand> CommandList { get; set; }
private int CommandListIndex { get; set; }
public AuxiliaryLineCommandList()
{
CommandList = new... |
f8c4e5759104c5c1573016def892c184870c3297 | C# | georgethejournalist/dirigent | /src/Dirigent.Common/Tools.cs | 2.671875 | 3 | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Dirigent.Common;
namespace Dirigent.Common
{
public class Tools
{
public static ILaunchPlan FindPlanByName(IEnumerable<ILaunchPlan> planRepo, string planName)
{
// find plan in the repository
ILaunchPlan plan;
t... |
647720b717fc351452992066ca3e790b9b4bed29 | C# | nvntuan123/ManageAppleStore | /ManageAppleStore_DAO/EmployeeOfTypesDAO.cs | 2.609375 | 3 | using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data.SqlClient;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using ManageAppleStore_DTO;
namespace ManageAppleStore_DAO
{
public class EmployeeOfTypesDAO
{
public static BindingList<Employe... |
b33ae794aced818d4f8885359e9866b9e19f187e | C# | tanujgyan/LeetCode | /LeetCode/AQs/SearchRotatedArray.cs | 3.3125 | 3 | using System;
using System.Collections.Generic;
using System.Text;
namespace LeetCode.Amazon_Interview_Questions
{
class SearchRotatedArray
{
int pivot = -1;
int answer = -1;
Dictionary<string, int> cache = new Dictionary<string, int>();
public int Search(int[] nums, int target... |
a6504902e7453f2f30e8f21ab619785468e9313a | C# | FlayaN/B3Utils | /Server/Api/Controllers/AwardsController.cs | 2.640625 | 3 | using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Mvc;
using Api.Models.Database;
using Api.Models.ViewModels;
using Api.Infrastructure;
namespace Api.Controllers
{
[Route("api/v1/[controller]")]
public class AwardsControlle... |
ffb55f864fc12a2308b0adfc2e9a36a4bdee1f50 | C# | ElhamAbdelMged/test | /TechnicalTaskInvoice/Models/SQLItem.cs | 2.546875 | 3 | using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
namespace TechnicalTaskInvoice.Models
{
public class SQLItem : IItemRepository
{
private readonly AppDbContext context;
public SQLItem(AppDbContext context)
{
this.context = con... |
8cbe434a813306570656d8d29d93e4cbee2b8e21 | C# | genceredon/CSharpMasters | /HomeworkOne/AddOperation.cs | 4.09375 | 4 | using System;
namespace HomeworkOne
{
public partial class Program
{
/// <summary>
/// Adds the two numbers.
/// </summary>
/// <returns></returns>
public static void AddTwoNumbers()
{
Console.WriteLine("Inside AddTwoNumbers method");
... |
e3fb4eb2c9b0e76ecb9b2ae95020af0b91a6f545 | C# | umbersar/ToyDB | /ToyDB/SQLBatch.cs | 2.875 | 3 | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using static ToyDB.AST_Helper;
namespace ToyDB {
public class SQLBatch : Node {
List<Statement> _statements;
public List<Statement> Statements { get => _statements; set => _statemen... |
d7010eb176a822ecabf1425d1ef333afd4526684 | C# | EvgeniyaDubrovskaya/slenium-training | /LiteCardTests/LiteCardTests/pages/ProductPage.cs | 2.734375 | 3 | using OpenQA.Selenium;
using OpenQA.Selenium.Support.UI;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace LiteCardTests.pages
{
class ProductPage: Page
{
public ProductPage(IWebDriver driver) : base(driver) { }
inter... |
2eae69afc6331c265d7a6f082eb57cb13c403b8c | C# | simonrozsival/racing-simulation | /src/Racing.CircuitGenerator/WaypointsGenerator.cs | 3.0625 | 3 | using Racing.Mathematics;
using System;
using System.Collections.Generic;
using System.Linq;
using static System.Math;
namespace Racing.CircuitGenerator
{
internal sealed class WaypointsGenerator
{
private readonly int min;
private readonly int max;
private readonly Random random;
... |
8c221574565b92c7a888a18f26c697d9ac66b19a | C# | rodwestmoreland/1150 | /SDLessonsB/06_InheritenceClasses/People/Customer.cs | 2.53125 | 3 | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace _06_InheritenceClasses.People
{
public class Customer:User
{
public int CustId { get; set; }
public Customer(string email):base(email)
{
... |
c7757be8e17c212bc561c6b5b8b1ae15adbe1aea | C# | ahsanGoheer/Chess-Consortium-Manager | /BusinessLogicLayer/Manager.cs | 3 | 3 | using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Data;
using System.Text;
using System.Threading.Tasks;
using DataLayer;
namespace BusinessLogicLayer
{
public class Manager //Facade controller as Singleton.
{
//Attributes.
private static... |
8c4032a7d795c5b08cf1456e2caa593b6c77b092 | C# | aiyanhe/yanhe | /030-练习/Program.cs | 3.890625 | 4 | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace _030_练习
{
class Program
{
static void Main(string[] args)
{
//1:编写一个程序,对输入的4个整数,求出其中的最大值和最小值,并显示出来;
//Console.WriteLine("请输入4个整数");
... |
fd2ae69dde183bd8025424cdb3c4822c997de6b4 | C# | Brayconn/PixelModdingFramework | /PixelModdingFramework/Rendering.cs | 2.828125 | 3 | using System;
using System.Collections.Generic;
using System.Drawing;
using System.Drawing.Drawing2D;
using System.Drawing.Imaging;
namespace PixelModdingFramework
{
public static partial class Rendering
{
public const int TilesetWidth = 16;
public const int TilesetHeight = 16;
#re... |
dee3ad3b48a852e3d2aa143b3ef015ef804d34f3 | C# | ghstahl/ASPNET4_InMemoryIdentity | /src/P5.IdentityServer3.Common/ScopeComparer.cs | 2.640625 | 3 | using System;
using System.Collections.Generic;
using IdentityServer3.Core.Models;
namespace P5.IdentityServer3.Common
{
public class ScopeComparer : IEqualityComparer<Scope>
{
private StringComparison StringComparisonType { get; set; }
public static ScopeComparer OrdinalIgnoreCase
{
... |
fbafca5dfbe0b42d82bbf9de713a5982757bd3e9 | C# | PavelDobranov/TelerikAcademy | /02-CSharp-Part-Two/07-ExceptionHandling/02.EnterNumbers/EnterNumbers.cs | 4.125 | 4 | // Problem 2. Enter numbers
// Write a method ReadNumber(int start, int end) that enters an integer number in a given range [start…end].
// If an invalid number or non-number text is entered, the method should throw an exception.
// Using this method write a program that enters 10 numbers: a1, a2, … a10, such that 1 <... |
6219bb9edfd13f5a06b8f2b2ca8bc542c34ea907 | C# | StanislavIT044/SoftUniCSharp | /C#OOP/TasksDuringTheHolidays/ExamProblem(exercise)/Core/Controller.cs | 3.125 | 3 | using SpaceStation.Core.Contracts;
using SpaceStation.Models.Astronauts;
using SpaceStation.Models.Astronauts.Contracts;
using SpaceStation.Models.Mission;
using SpaceStation.Models.Planets;
using SpaceStation.Repositories;
using SpaceStation.Repositories.Contracts;
using System;
using System.Collections.Generic;
usin... |
c0cec04fc78e1332ebf82a441ceb92bd6804b1e2 | C# | funtechhackday/xrtd | /Assets/02.Scripts/Debug/DebugPanel.cs | 2.546875 | 3 | using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
public class DebugPanel : MonoBehaviour
{
#region Singleton
public static DebugPanel inst;
private void Awake()
{
if (inst == null)
inst = this;
}
#endregion
public Te... |
5177cdf97dd47db6556e6e3a0e517774bfc9a279 | C# | AHIRU2/MapAction | /Assets/Scripts/TimingGaugeController.cs | 2.6875 | 3 | using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
using DG.Tweening;
public class TimingGaugeController : MonoBehaviour
{
[SerializeField]
private Slider slider;
[SerializeField]
private float pointerDuration;
private Tween tween;
// Start i... |
01322eef9b447105c42cedba34c51c23de86ba7d | C# | 2881099/dotnetGen_demo | /src/cd.db/DAL/Build/Testtypeinfo.cs | 2.53125 | 3 | using System;
using System.Collections.Generic;
using System.Linq;
using System.Data;
using System.Threading.Tasks;
using MySql.Data.MySqlClient;
using cd.Model;
namespace cd.DAL {
public partial class Testtypeinfo : IDAL {
#region transact-sql define
public string Table { get { return TSQL.Table; } }
public ... |
9ca8f35a3676ef1bf20ee4ee3485b270900b2d75 | C# | iliqnk/OOP_HOMEWORKS | /DefiningClasses/02.LaptopShop/LaptopShop.cs | 3.09375 | 3 | using System;
namespace _02.LaptopShop
{
class LaptopShop
{
static void Main()
{
Laptop basicLaptopInfo = new Laptop("HP 250 G2", 699.00M);
Laptop fullLaptopInfo = new Laptop("Lenovo Yoga 2 Pro", 2259.00M, "Lenovo",
"Intel Core i5-4210U (2-core, 1.70 - 2... |
8dc0a675c237141cb502b9b17999418d47c7e2c4 | C# | Raksha2711/B2BAPI | /Core/ApiResponse/InfoMessage.cs | 2.8125 | 3 | using System;
using System.Collections.Generic;
using System.Text;
namespace Core.ApiResponse
{
public class InfoMessage
{
public InfoMessage()
: this(string.Empty, string.Empty)
{
}
public InfoMessage(string message)
: this("", message)
{
... |
5989fafdd490621cd93f54dce0c92018f8be2484 | C# | bleissem/ReflectionMapper | /src/ReflectionMapper/MapConfig.cs | 2.65625 | 3 | using AutoMapper;
using System;
using System.Collections.Generic;
using System.Text;
namespace ReflectionMapper
{
/// <summary>
/// Maps with configuration when Reading or Saving
/// </summary>
/// <typeparam name="MapTo"></typeparam>
/// <typeparam name="MapFrom"></typeparam>
public abstract ... |
6db95fd8a7c09b450cf7154ba5913138099212cb | C# | MateuszSierpinski/Malform-Checker | /Test/Save.cs | 2.953125 | 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 Test
{
class Save:Form1
{
public DataTable SaveFile(DataTable table,char delimiter)
{
using ... |
5aa9ee3a1fb19234dfb228385f18deb2c6e539a2 | C# | AbdulmajidAlnouri/Open-Projects | /C#/Kaggle Project/Neural Network API/Genetic Neural Network API/Genetic Neural Network API/Utilities/Extenstions.cs | 3.65625 | 4 | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace Genetic_Neural_Network_API.Utilities
{
public static class Extensions
{
public static T RandomElement<T>(this IEnumerable<T> iEnumerable)
{
T result;
//Get a random index to... |
aa6bcc7880f2c4baaf675bc03264903b8ef251b8 | C# | jwbnw/SmuTutoringApp | /smuTutoringDataApp/Classes/dataTables.cs | 3.03125 | 3 | using System;
using System.Data;
using System.Windows;
namespace smuTutoringDataApp
{
public class dataTables
{
public static DataTable masterDataTable { get; set; }
//*************************************************
//Method Name: CreateTable
//Description: This met... |