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 |
|---|---|---|---|---|---|---|
139ed14018b74e745cd16b882d50b4f47380adec | C# | yavorvasilev/CSharp-Advanced | /FunctionalProgrammingExercises/07PredicateForNames/PredicateForNames.cs | 3.515625 | 4 | namespace _07PredicateForNames
{
using System;
using System.Linq;
public class PredicateForNames
{
public static void Main()
{
var numberOfLetters = int.Parse(Console.ReadLine());
var inputNames = Console.ReadLine().Split();
Action<string[]> printNa... |
22be5ff222c773fb62e546c7a7910b400d5e7d63 | C# | bfriesen/garply | /src/garply/List.cs | 2.890625 | 3 | using System.Text;
namespace Garply
{
internal struct List
{
public readonly Value Head;
public readonly int TailIndex;
internal List(Value head, int tailIndex)
{
Head = head;
TailIndex = tailIndex;
}
public bool IsEmpty => Head.Type ==... |
b46f55849b60f04bb9c36e44d8ff38051efc4e6a | C# | 18877761327/UnityStudio | /UnityStudio/Assets/Examples/AStar/Scripts/AStarPoint.cs | 2.640625 | 3 | using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class AStarPoint
{
public int X;
public int Y;
public float F;
/// <summary>
/// 开始节点到自身节点的距离
/// </summary>
public float G;
/// <summary>
/// 自身节点到结束节点的距离
/// </summary>
public float H;
... |
6c9486d05c413d3933cb751977d463eff8cc7c21 | C# | AsbjornHenriksen/CiiMac2.0 | /CiiMac2.0/Host/Program.cs | 2.65625 | 3 | using BusinessLogic.Controllers;
using Model;
using Service;
using System;
using System.Collections.Generic;
using System.Net;
using System.ServiceModel.Web;
using System.Timers;
namespace Host
{
class Program
{
static UpdateDatabaseCtr updateDatabaseCtr;
static void Main(string[] args)
... |
4f79de2a1996cdd99998a618b4b787f665b3d316 | C# | marhoily/Accountant | /Accountant/Core/Accounting.Calculation/MoneyBag.cs | 3.125 | 3 | using System;
using System.Collections.Generic;
using System.Linq;
using NewModel.Accounting.Core;
namespace NewModel.Accounting.Calculation
{
public sealed class MoneyBag : List<Money>
{
public MoneyBag() {}
public MoneyBag(IEnumerable<Money> money)
: base(money)
{
... |
290b30a6a5a05c57ca71df8fbec005977822cdb5 | C# | sychoi3/WarnerMediaAPI | /WarnerMedia/Resources/Response/PagedResponse.cs | 2.84375 | 3 | using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
namespace WarnerMedia.Resources.Response
{
public class PagedResponse<T>
{
public int count { get; set; }
public int totalPages { get; set; }
public int pageSize { get; set; }
//pub... |
ee70ab3700c972f89e5bd53dc838b813735e029a | C# | shendongnian/download4 | /first_version_download2/390508-33823534-104567080-2.cs | 2.5625 | 3 | string xmlAsString;
using (var xmlWebClient = new WebClient())
{
xmlWebClient.Encoding = Encoding.UTF8;
xmlAsString = xmlWebClient.DownloadString(url);
}
XmlDocument currentXml = new XmlDocument();
currentXml.Load(xmlAsString);
|
386520d91818d16c3ed63718c51d743d3d108b9c | C# | SiP001/Hello | /Hello/DateTimeMethod.cs | 3.75 | 4 | namespace Hello
{
using System;
using System.Globalization;
class DateTimeMethod
{
public int MonthsSince(DateTime date)
{
int months = (((DateTime.Now.Year - date.Year) * 12) + (DateTime.Now.Month - date.Month));
return months;
}
public int Years... |
0f05e0536611d702b132bf687407908679967e5f | C# | pervinpashazade/Code-Academy-Winform-Final-Project | /LibraryFinalTask/Forms/ReportsForm.cs | 2.578125 | 3 | using LibraryFinalTask.Data;
using LibraryFinalTask.Models;
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 LibraryFinalTask.Forms
{
publi... |
a32392c27cbfb024215ae84b94eaada5e237c470 | C# | Acerinth/MaliDronovi | /DronePositioningSimulator/DronePositioningSimulator/frmIzlaz.cs | 2.546875 | 3 | using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using System.Windows.Media;
namespace DronePositioningSimulator
{
public partial class frmIzlaz : Fo... |
0457f4af311cde187864fd76071297ec72e26763 | C# | CreativeModeOverlay/CreativeModeProject | /Assets/BaseProject/Scripts/Application/DesktopUI/Components/Widgets/DragAndDrop/DragAndDropVisualizer.cs | 2.578125 | 3 | using System;
using System.Collections.Generic;
using DG.Tweening;
using UniRx;
using UnityEngine;
namespace CreativeMode
{
public class DragAndDropVisualizer : MonoBehaviour
{
public GenericText itemPrefab;
public RectTransform root;
private readonly List<DragAndDropInstance>... |
d5b96180a1cae0fd8068790d4de5794c48913bb7 | C# | cosminprunaru/CSharpHackerRank | /Override II/Motorcycle.cs | 3.375 | 3 | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Override_II
{
class Motorcycle : Bicycle
{
public Motorcycle()
{
Console.WriteLine("Hello, I am a motorcycle, I am {0}", define_me());
String t... |
4e4a0d0d6e06629477844e1c414b8551751ad8af | C# | Shaurr/PartikelGame | /Assets/Scripts/EnemyTwo.cs | 2.515625 | 3 | using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class EnemyTwo : EnemieController {
protected GameObject player;
// initializes
public override void Initialize() {
type = 1;
gc = FindObjectOfType<GameController>();
player = gc.GetCurrentPlay... |
d632733f5a8aa7118fd36cfa9f9b54bab5d5b851 | C# | kasparkallas/CodingBat | /CodingBat/Warmup2.cs | 3.9375 | 4 | using System;
namespace CodingBat
{
public class Warmup2
{
/// <summary>
/// Given a string and a non-negative int n, return a larger string that is n copies of the original string.
///
/// stringTimes("Hi", 2) → "HiHi"
/// stringTimes("Hi", 3) → "HiHiHi"
/// s... |
8df37c0c4adb57105856a49b418d3f78610934d6 | C# | PacktPublishing/Learn-C-With-Visual-Studio-2017-and-Console-Programs | /Lesson26IfElseWithMethod/Lesson26IfElseWithMethod/Lesson26IfElseWithMethod/Program.cs | 3.375 | 3 | using static System.Console;
class Program
{
static void Main()
{
string text = "hello";
string texToFind = "sd";
if (text.Contains(texToFind))
WriteLine($"{texToFind} found in {text}");
else
WriteLine($"{texToFind} not found in {text}");
}
} |
286fabdd65dec4c343d6780f6d4ddb07f9cba4ed | C# | saper150/smutna-biedronka | /Services/MongoService.cs | 2.65625 | 3 | using System;
using MongoDB.Driver;
using Microsoft.Extensions.Configuration;
using LanguageExt;
using LanguageExt.DataTypes.Serialisation;
public interface Try<T> {
Either<Exception, U> Try<U>(Func<T, U> action);
event Action<bool> databaseStatusChange;
bool IsOnline { get; }
}
class TryMongoService : T... |
95d3a24fb9228636f9fa29d237ffb31158e96bef | C# | radomirKrastev/OOP | /Old Exams/14 April 2019/Skeleton/MortalEngines/Entities/Models/Fighter.cs | 3.109375 | 3 | namespace MortalEngines.Entities.Models
{
using System.Text;
using Contracts;
public class Fighter : BaseMachine, IFighter
{
private const double InitialHealthPoints = 200;
private bool aggressiveMode = true;
public Fighter(string name, double attackPoints, double defencePoin... |
4fde9207760276b88acddd05366bfee1f7ca5a9a | C# | cahue129/DataStructures | /SinglyLinkedList/SinglyLinkedList/Program.cs | 3.78125 | 4 | using System;
namespace SinglyLinkedList
{
public class Node {
public string data;
public Node next;
public Node() {
this.data = null;
this.next = null;
}
public Node(string data) {
this.data = data;
this.next ... |
95468adfcadc6d12c4478036939299fa4a4d43d0 | C# | ChrisDill/Raylib-cs | /Examples/Shapes/ColorsPalette.cs | 2.578125 | 3 | /*******************************************************************************************
*
* raylib [shapes] example - Colors palette
*
* This example has been created using raylib 2.5 (www.raylib.com)
* raylib is licensed under an unmodified zlib/libpng license (View raylib.h for details)
*
* Copyright (c)... |
cb3717f5f6f2e98d05f2c2f6701e069eea36be51 | C# | KajulNisha-21/demo | /CustomAuthorize.cs | 2.609375 | 3 | using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Mvc.Filters;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
namespace Webapi_Microservices_Docker
{
public class CustomAuthorize:ActionFilterAttribute
{
public CustomAuthorize():base()
... |
786cc50244edd092c07ca0267e9a8687dbdd10b6 | C# | szymszer/CSteganography | /CSteganography/Form1.cs | 2.578125 | 3 | using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using System.Collections;
using System.IO;
namespace CSteganography
{
public partial class Form1... |
d0a2b5ba5188c1ae83e474f35e21a62956e51c3a | C# | huashi0103/CSharpTest | /CSharpTest/Program.cs | 2.828125 | 3 | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.IO;
using System.Globalization;
using System.Text.RegularExpressions;
using WinDraw;
using System.Diagnostics;
using System.Threading;
using System.Net.NetworkInformation;
using System.Threading.Tasks;
using System.Data.... |
924961468c0aad709d4bfcd0510092db0944bbfd | C# | OwenVanRijn/1.1-Programmeren | /week2/ProgrammerenWeek2/Opdracht2/Program.cs | 3.296875 | 3 | using System;
namespace Opdracht_
{
class Program
{
static void Main(string[] args)
{
double[] getallen = new double[3];
double result;
string input;
for (int i = 0; i < 3; i++)
{
Console.Write("Geef get... |
06074ee88174d366306254010952f35c3c464b99 | C# | ParallelTask/DesignPatterns | /ChainOfResponsibilityPattern/ChainOfResponsibilityPattern/Factory/Program.cs | 3.25 | 3 | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ChainOfResponsibilityPattern.Factory
{
// When using a factory your code is still actually responsible for creating objects.
// By DI you outsource that responsibility to another clas... |
05cd9e57cd53a12ddaf8a31f4908a8f2347496ff | C# | keke8273/PrismSample | /QBR.Infrastructure/ValidationRules/GenericRangeCheck.cs | 3.125 | 3 | using System;
using System.ComponentModel;
using System.Globalization;
using System.Windows.Controls;
namespace QBR.Infrastructure.ValidationRules
{
public class GenericRangeCheck<T> : ValidationRule where T: IComparable
{
public T Max { get; set; }
public T Min { get; set; }
public o... |
c5d2316c58536886ed50bbce21164ba092780029 | C# | daveac99/CycleFinder | /CycleFinder/Models/Wave.cs | 2.71875 | 3 | using System;
using System.Collections.Generic;
namespace CycleFinder.Models
{
public class Wave
{
public Wave(double period, double amplitude, string colour = "black")
{
Period = period; //years
Amplitude = amplitude;
Colour = colour;
}
p... |
98318653bf63f5a5ee67009c8faf1de3613628a0 | C# | ligaz/MicroModels | /Source/MicroModels/Description/ReflectPropertyDescriptor.cs | 2.59375 | 3 | using System;
using System.Globalization;
using System.Reflection;
namespace MicroModels.Description
{
internal class ReflectPropertyDescriptor : PropertyDescriptor
{
private readonly MethodInfo getMethod;
private readonly MethodInfo setMethod;
private readonly Type propertyType;
... |
5046615711afd811c6adc4f36ba079006af8129c | C# | dotnet/runtime | /src/installer/tests/Assets/TestProjects/HammerServiceApp/Program.cs | 2.796875 | 3 | using System;
using System.Reflection;
namespace hammer
{
class Program
{
static void Main(string[] args)
{
var asm = Assembly.Load("Location, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null");
var location = asm.GetType("GPS.Location");
var city = loc... |
619090fcfa6fed69bd73f4de32d9ff926567f89c | C# | WadeJr/fun-and-random | /TCP/Client/client.cs | 2.8125 | 3 | using SimpleTCP;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using System.Threading;
using System.Net;
using System.Net.Sockets;
using System.IO;
n... |
ad4afd551f7b5966544ebfade077370f40ae2798 | C# | Ivan1Kot/1410b | /Assets/Scripts/GamePlay/Enemy/EnemyMoveManager.cs | 2.609375 | 3 | using System.Collections.Generic;
using UnityEngine;
public class EnemyMoveManager : MonoBehaviour
{
#region Fields
#region Serialize Fields
[SerializeField] private InvisiblePoint[] pointsQueueInic;
#endregion
#region Private Fields
private Queue<InvisiblePoint> points;
private Invi... |
59c94214e539ba27d5041fa15b180ac03e414de9 | C# | vijit99/CSharp_Assignment-1 | /CSharp_1_Assignement/CSharp_1_Assignement/Q6.cs | 3.34375 | 3 | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace CSharp_1_Assignement
{
class Q6
{
static void Main()
{
Console.WriteLine("Enter the temperature in Fahrenheit");
float f = 0.0f;
f =... |
7bb62e7d9e58524b31c5110bdfd68fa66775e475 | C# | spencerkittleson/GitHubIssueCloseRate | /GitHubIssueCloseRate/Data/GitHubIssuesRepository.cs | 2.765625 | 3 | using GitHubIssueCloseRate.Entities;
using GitHubIssueCloseRate.Interfaces;
using RestSharp;
using System;
using System.Collections.Generic;
using System.Threading.Tasks;
namespace GitHubIssueCloseRate.Data {
public class GitHubIssuesRepository : IGitHubIssueRepository {
private RestClient client;
... |
5486406fdee4e9fad5bcbe3ff43400046ec78dd0 | C# | JoseHenriqueRG/Abstract_Factory | /Models/Sofa.cs | 3.21875 | 3 | using Abstract_Factory.Interfaces;
using System;
namespace Abstract_Factory.Models
{
public class Sofa : ISofa
{
public Sofa(string modelo)
{
Montar(modelo);
}
public string Info { get; private set; }
public void Montar(string modelo)
{
... |
5f1b797a19558768efe26bfad082cfd4604a2843 | C# | dotnet/dotnet-api-docs | /snippets/csharp/System.Xml.Serialization/XmlAttributeEventArgs/ObjectBeingDeserialized/source.cs | 2.859375 | 3 | using System;
using System.IO;
using System.Xml;
using System.Xml.Serialization;
public class Sample
{
// <Snippet1>
private void serializer_UnknownAttribute(
object sender, XmlAttributeEventArgs e)
{
System.Xml.XmlAttribute attr = e.Attr;
Console.WriteLine("Unknown Attribute Name and Value:" +
attr.Na... |
4ade93876e26a07b3591ada349b704932f6fc6ee | C# | soomker/Task5PizzaWorking | /Task5PiZZaApp/Engineer.cs | 3.25 | 3 | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.IO;
using System.Threading;
namespace Task5PiZZaApp
{
class Engineer
{
public string Name { get; private set; }
public string Surname { get; private set;}
p... |
233d2400ad37db962ec23b02b31419f652e14367 | C# | downwithfooduci/mdp | /Assets/Scripts/Enzyme/ParticleGenerator.cs | 2.828125 | 3 | using UnityEngine;
using System.Collections;
/**
* script used to generate particles in the enzyme game
*/
public class ParticleGenerator : MonoBehaviour
{
// variables to hold all the different types of particles that can spawn
public GameObject parentCylCyl; //!< this represents two cylinders stuck together
... |
55f94d4561b11c8b000da71a7ace056b60aaf12b | C# | AnastasiyaKrasnova/OldFaker | /OldFaker/Faker/Plugin.cs | 2.90625 | 3 | using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using System.IO;
namespace Faker
{
class Plugin
{
public List<IGenerator> Plugins;
private string pluginPath;
public Plugin()
{
Plugins = new List<IGenerator>();
pluginPath = Path.Combine(Directory.GetCu... |
ad72212d5977a4104220cd30901c164c8e19f882 | C# | vonwolfgang/C_sharp-Lessons | /6/6/Program.cs | 3.484375 | 3 | using System;
namespace _6
{
class Program
{
static void Main(string[] args)
{
// STRİNG TANIMLAMA FELAN
string nick = "anonymous";
// string ifadeler böle tanımlanır
foreach (var item in nick)
{
... |
c26ebb63184e347cc3a016a01bb70880f4edb03d | C# | rajandhaliwal80/InheritenceDemo | /InheritenceDemo/Person.cs | 3.90625 | 4 | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace InheritenceDemo
{
/// <summary>
/// This is the person class
///
/// </summary>
class Person
{
//private instance variable(feilds)
private string _name... |
6768557ff41b152b519117f9cb1f709ac3d56c1c | C# | Techcraft7/GenesisEdit | /GenesisEdit/Compiler/Sprite.cs | 2.53125 | 3 | using System;
using System.Collections.Generic;
using System.Drawing;
using System.Linq;
using System.Runtime.Remoting;
using System.Text;
using System.Threading.Tasks;
namespace GenesisEdit.Compiler
{
internal class Sprite : INameable
{
private string name = null;
public byte Palette = 1;
public string Name ... |
6e3db1519c3c2e89bf1fd7c4de53d03a7bb842ed | C# | MattWindsor91/roslyn | /concepts/code/ExpressionUtils/ExpressionUtils/NBE.cs | 2.90625 | 3 | using System;
using System.Collections.Generic;
using System.Linq;
using System.Linq.Expressions;
using System.Text;
using System.Threading.Tasks;
// https://dlr.codeplex.com/
// An implementation of Normalization by Evaluation, based on Typeful Normalization by Evaluation, Danvy, Keller & Puesch
// http://www.cs.... |
ade1539550e40635cd816f5f2400d16bb2c98a93 | C# | Tefferson/apa-api | /ApaApi/ApaApi/configurations/SigningConfiguration.cs | 2.546875 | 3 | using Microsoft.IdentityModel.Tokens;
using System.Security.Cryptography;
namespace ApaApi.configurations
{
/// <summary>
/// Disponibiliza a configuração da assinatura
/// </summary>
public class SigningConfiguration
{
/// <summary>
/// A chave de segurança
/// </summary>
... |
3d5eb63f47607b60381f0e622fb9f9a4ba9d8d4b | C# | NooartSkyline/GitCodecommit | /Windows_APP/Test_datetime/Test_datetime/Form1.cs | 2.796875 | 3 | using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Globalization;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace Test_datetime
{
public partial class Form1 : Form
{
... |
5c09741e8b198400c7c59cc0e6388c09886848e3 | C# | barimahyaw/PointOS | /PointOS.BusinessLogic/ProductCategoryBusiness.cs | 2.65625 | 3 | using PointOS.BusinessLogic.Interfaces;
using PointOS.Common.DTO.Request;
using PointOS.Common.DTO.Response;
using PointOS.DataAccess;
using PointOS.DataAccess.Entities;
using System;
using System.Linq;
using System.Threading.Tasks;
namespace PointOS.BusinessLogic
{
public class ProductCategoryBusiness : IProduct... |
b7bfdcfe9f918206928954af660d5f9bd0e66b66 | C# | lucassilva996/WebApi-Lanches | /WebApi-Lanches/Controllers/LanchesController.cs | 2.640625 | 3 | using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using Microsoft.EntityFrameworkCore;
using WebApi_Lanches.Data;
using WebApi_Lanches.Models;
namespace WebApi_Lanches.Controllers
{
[Route("api/[control... |
aefc15d4549443c94fe714d7781d274e54b3d577 | C# | shruti2898/Day-16-and-17 | /Algorithm Programs/P3_InsertionSort.cs | 4.03125 | 4 | using System;
using System.IO;
namespace DataStructure
{
class P3_InsertionSort
{
public void insertionSort()
{
// Input text file path
string file = @"C:\Users\Mehta\Desktop\Bridgelab\DataStructurePrograms\DataStructure\input.txt";
// Reading comma-s... |
f242722d0c65ec47723fea3c522b2d3a0bbb9581 | C# | brendanSapience/AAE-MetaBot--Level-2 | /MyApp4Lib/RestUtils.cs | 2.796875 | 3 | using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Text;
using System.Threading.Tasks;
namespace MyApp4Lib
{
public class RestUtils
{
public String CallRestGETNoAuth(String URL)
{
System.Net.HttpWebRequest httpWebRequest = (HttpWebReq... |
c52411c585a132662115e7424bf989ee6e8f8d43 | C# | asaale/EotE_GMTool | /EotE_GMTool/Objects/Characters/Species/Twilek.cs | 2.953125 | 3 | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace EotE_GMTool.Objects.Characters.Species {
[Serializable]
public class Twilek : Species {
public Twilek()
{
StartingXp = 100;
StartingWoundThreshold = 10;
StartingS... |
46740d372b5d8868316ca8ecbcfdcf0d5268f901 | C# | exiton3/TestSolution | /ConsoleApplication2/Program.cs | 3.671875 | 4 | using System.Collections.Generic;
using System.Linq;
using static System.Console;
namespace ConsoleApplication2
{
internal class Program
{
private static void Main(string[] args)
{
var cards = new List<Card>
{
new Card {Start = "Melburn", End = "Cologne"... |
dcf90406bf824644392e77b37ad992dbe3ce0f01 | C# | onartz/AmbitourSocketServerService | /ObjetsMetiers/Server.cs | 2.890625 | 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.Xml;
using System.Xml.Serialization;
using System.IO;
using SocketServer;
namespace AmbitourSocketServerService.ObjetsMetiers
{
// State object fo... |
dacae8a8cd2f4ab1887c8b37362223b91f63bbce | C# | Mato-ra/JsonSerializer | /JsonSerializer/JsonSerializer/JsonSerializer.cs | 2.78125 | 3 | using System;
using System.Collections.Generic;
using System.Text;
using System.IO;
using System.Linq;
namespace JsonSerializer
{
public static partial class Json
{
public static string ReadJsonFile(string path)
{
if (!File.Exists(path))
{
... |
156376dd740240faf188cb140a4a7ee5f3a1a822 | C# | mnitchie/MaintenanceTracker-Services | /MaintenanceTracker/Controllers/CarModelController.cs | 2.578125 | 3 | using EdmundsApiSDK;
using MaintenanceTracker.Models;
using System.Linq;
using System.Threading.Tasks;
using System.Web.Http;
namespace MaintenanceTracker.Controllers
{
public class CarModelController : ApiController
{
private IEdmunds _edmundsRepository;
public CarModelController( IEdmunds edmundsRepository )... |
da24addc3fd6190a308493dbcccd36223e3a25ab | C# | jibedoubleve/ioc-training | /src/Services/MyService.cs | 2.625 | 3 | using Ioc.Infrastructure;
using System;
namespace Ioc.Services
{
public class MyService
{
#region Fields
private readonly BasicLogService Log = new BasicLogService();
#endregion Fields
#region Methods
public void SomeBehaviour()
{
Log.Warning("Ke... |
1e8488e9e39ff070b2ce38e369c5bb6c4f92c1d9 | C# | ricardoborges/NPortugol2 | /src/NPortugol2.Tests/Dyn/Args/LoadArgsTestCase.cs | 2.65625 | 3 | using NPortugol2.Compiler;
using NUnit.Framework;
namespace NPortugol2.Tests.Dyn.Args
{
[TestFixture]
public class LoadArgsTestCase
{
[Test]
public void Should_Load_Args()
{
var result = new NPCompiler()
.CompileMethod("funcao inteiro soma(inteiro x) ret... |
021dc50f5fac40c0a82f4238f27517d02cf1dd4d | C# | kyulee2/Algorithm | /DifferentWaystoAddParentheses/t1.cs | 3.671875 | 4 | /*
Given a string of numbers and operators, return all possible results from computing all the different possible ways to group numbers and operators. The valid operators are +, - and *.
Example 1:
Input: "2-1-1"
Output: [0, 2]
Explanation:
((2-1)-1) = 0
(2-(1-1)) = 2
Example 2:
Input: "2*3-4*5"
Output: [-34, -14,... |
f72affe1d6d983166383e0f9c35a7bc12f3dcfd0 | C# | xavy88/WebAPI-CRM | /CRMAPI/Repository/DepartmentRepository.cs | 3.046875 | 3 | using CRMAPI.Data;
using CRMAPI.Models;
using CRMAPI.Repository.IRepository;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
namespace CRMAPI.Repository
{
public class DepartmentRepository : IDepartmentRepository
{
private readonly ApplicationDbContext ... |
1591f2e2e7e252231e10d7455ab8323c316862d8 | C# | aws/aws-tools-for-powershell | /generator/AWSPSGeneratorLib/Writers/IndentedTextWriter.cs | 3.1875 | 3 | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.IO;
namespace AWSPowerShellGenerator.Writers
{
public class IndentedTextWriter : TextWriter
{
#region Private members
private bool _justSawNewline = true;
private TextWriter _writer;
... |
a45a01ffceb7a84b460bca36678a981591d56e62 | C# | JoshuaKong4/LinkedList | /joshuaselectsort/joshuaselectsort/list.cs | 3.5 | 4 | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace joshuaselectsort
{
class List
{
int smallestindex = 0;
int sortedindex = 0;
public int count = 0;
public int[] Array = new int[40];
public List... |
b4db8bf917b94b312186bd3947c8d774306de0f2 | C# | PNNL-Comp-Mass-Spec/MultiAlign | /src/Library/MultiAlignCore/IO/MTDB/MTSMassTagDatabaseLoader.cs | 2.65625 | 3 | #region
using System.Data;
using System.Data.SqlClient;
using FeatureAlignment.Algorithms.Options;
using MultiAlignCore.Algorithms.Options;
#endregion
namespace MultiAlignCore.IO.MTDB
{
/// <summary>
/// Access the mass tag system for downloading mass tag database information.
/// </summary... |
ac7f2cbad6db53b4ae7ab79b8f1c74a358143455 | C# | firebellys/countly-sdk-dotnet | /Entities/Device.cs | 2.671875 | 3 | /*
Copyright (c) 2012, 2013, 2014, 2015 Countly
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, ... |
aea13067f54dfceae1bca34384a1e75922aff61c | C# | letalumil/JsonAssertions | /JsonAssertions.Tests/AssertJsonTests.cs | 2.859375 | 3 | using NUnit.Framework;
namespace JsonAssertions.Tests
{
[TestFixture]
public class AssertJsonTests
{
[Test]
public void AreEquals_EqualJsonStrings_Success()
{
AssertJson.AreEquals("{name:'value'}", "{name:'value'}");
}
[Test]
public void AreEqua... |
b0104a4c41b72dc41ee1d04750bf7a4803af7889 | C# | shelbygrice/CSharpLibrary | /0.04_Conditionals_ReadLine/Program.cs | 3.796875 | 4 | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace _0._04_Conditionals_ReadLine
{
class Program
{
static void Main(string[] args)
{
Console.WriteLine("How are you feeling today from 1-5?");
strin... |
9317e81e4c9e4469d4c2f4773fee40a12ae56790 | C# | GregWickham/Echo | /SimpleNLG/RealizerSchema Extensions/WordElement.cs | 2.71875 | 3 | using System.Xml.Serialization;
namespace SimpleNLG
{
public partial class WordElement
{
public WordElement Copy() => (WordElement)MemberwiseClone();
public WordElement CopyWithoutSpec()
{
WordElement result = Copy();
result.Base = null;
... |
aa0840ce76dcfe6a38bc83d8a19767657642747f | C# | ArkadiuszChorian/RunR | /RunR/TextBlockWriter.cs | 2.8125 | 3 | using System.IO;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Threading;
namespace Archersoft.RunR
{
public class TextBlockWriter : TextWriter
{
private static readonly Dispatcher Dispatcher = Application.Current.Dispatcher;
private readonly Tex... |
3f0596327151ac69a9b5642f5bfbc8c8edb92321 | C# | castroi/EuroImport | /EuroImport/JsonReader.cs | 2.671875 | 3 | using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Net;
using System.Text;
namespace EuroImport
{
public class JsonReader
{
public Dictionary<string, string> Read(string url)
{
using (WebClient wc = new WebClient ... |
876a54fcb150412d990ea519df1b72eab02953d1 | C# | Dmitry-Ischenko/GB-Algorithms-basics | /Lesson1/task2/Program.cs | 3.65625 | 4 | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace task2
{
class Program
{
static void Main(string[] args)
{
//Выполнил Ищенко Дмитрий
//2. Найти максимальное из четырех чисел. Массивы не использ... |
d738e86cae5fcd3bfbdf61b06db648fe6f7c6481 | C# | lanaolshanska/CargoExpress | /Source/DeliveryWebApplication/Delivery.Website/Delivery.Validators/DriverValidator/DriverValidator.cs | 2.828125 | 3 | using Delivery.BL.Contracts;
using Delivery.Models;
using Delivery.Models.DTO;
using FluentValidation;
namespace Delivery.Validators
{
public class DriverValidator : BaseValidator<DriverModel, Driver>
{
public DriverValidator(IDriverService driverService) : base(driverService)
{
Ru... |
de15d38f2926a598ce710edf31b29f81b92e2fb2 | C# | Neikice/LGFrame | /Assets/Scripts/LGFrame/BehaviorTree/BTDecorators/Timer_DelayNode.cs | 2.5625 | 3 | using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UniRx;
namespace LGFrame.BehaviorTree.Decorate
{
/// <summary>
/// 延迟执行修饰的Node,结果立即返回Success或Failure
/// </summary>
public class Timer_DelayNode : BTDecorator
{
public float DelayTime;
... |
fc07bef7a9411ed29084fcc760e175c30d3c1b7b | C# | tonngw/leetcode | /csharp/0179-largest-number.cs | 3.390625 | 3 | public class Solution {
public string LargestNumber(int[] nums)
{
if(nums.All(_ => _ == 0)) return "0";
var s = nums.Select(_ => _.ToString()).ToList();
s.Sort((a, b) => (b+a).CompareTo(a+b));
return string.Concat(s);
}
} |
3a10c254bc668a001f764c272a918e19645f9bc4 | C# | davideastmond/csharpdelegateexample | /InfoObtained.cs | 2.5625 | 3 | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace CSharpDelegates
{
public class InfoObtained
{
public event GetInfo OnInfoObtained;
public object p_sender;
public string p_EventArgs;
public InfoObtain... |
48a0ba973dd3d1dc4c67411681cbedc3d8a84314 | C# | KOKOS317/RestaurantHelper | /CatelDemo/Services/Logic/AuthorizationChecker.cs | 2.671875 | 3 | using System.Collections.Generic;
using System.Linq;
using RestaurantHelper.DAL;
using RestaurantHelper.Models;
namespace RestaurantHelper.Services.Logic
{
class AuthorizationChecker
{
private readonly UnitOfWork _unitOfWork = UnitOfWork.GetInstance();
private IEnumerable<User> _users;
private Us... |
513cf01b533a39e67f868020f2b514be59cc033b | C# | Lawo/ember-plus-sharp | /Lawo.EmberPlusSharp/Ember/FieldPath`2.cs | 2.515625 | 3 | ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// <copyright>Copyright 2012-2017 Lawo AG (http://www.lawo.com).</copyright>
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at http:/... |
f94fd063f7225d2d6cfbe7350a1f36aa989e78f1 | C# | istoneshi/Dapper.UnitOfWork | /src/Dapper.UnitOfWork/Dapper.UnitOfWork/UnitOfWork.cs | 2.921875 | 3 | using System;
using System.Data;
namespace Dapper.UnitOfWork
{
public interface IUnitOfWork : IDisposable
{
void Commit();
T Query<T>(IQuery<T> query);
void Execute(ICommand command);
T Execute<T>(ICommand<T> command);
void Rollback();
}
public class UnitOfWor... |
0ac81fdeb9a87a1bf59226c2c300f19c276e5bc0 | C# | elangovana/hacker-projects | /AE.HackerRank.Samples.Tests/CoursePopularityTest.cs | 2.609375 | 3 | //using System;
//using System.Collections.Generic;
//using System.Linq;
//using NUnit.Framework;
//namespace AE.HackerRank.Samples.Tests
//{
// [TestFixture]
// public class CoursePopularityTest
// {
// [TestCase("A", "CSC1")]
// public void Should(string iuser, string expectedRecomdedCourses)... |
9751b6154c655c0c66ad7b262b2d0657cfa54475 | C# | neotys-rd/rest-design-api | /model/CloseProjectParams.cs | 2.515625 | 3 | using Neotys.CommonAPI.Utils;
using System;
/*
* Copyright (c) 2016, Neotys
* All rights reserved.
*/
namespace Neotys.DesignAPI.Model
{
/// <summary>
/// CloseProject is the method sent to the Design API Server.
///
/// @author lcharlois
///
/// </summary>
public class CloseProjectParams :... |
0a7d0c4770af02712c916df4fba9f045d8375e0b | C# | credfeto/GallerySync | /src/Credfeto.Gallery.Image/ImageHelpers.cs | 3.015625 | 3 | using System;
using System.Diagnostics.Contracts;
using SixLabors.ImageSharp;
using SixLabors.ImageSharp.Formats;
using SixLabors.ImageSharp.PixelFormats;
using SixLabors.ImageSharp.Processing;
namespace Credfeto.Gallery.Image;
internal static class ImageHelpers
{
public static bool IsValidJpegImage(byte[] bytes... |
ab019277c8a836882777acc27f1fb3fb03cfad97 | C# | undrfined/undrClient | /back/MiNET/Blocks/Button.cs | 2.578125 | 3 | using System.Numerics;
using MiNET.Utils;
using MiNET.Worlds;
namespace MiNET.Blocks
{
public abstract class Button : Block
{
public int TickRate { get; set; }
protected Button(byte id) : base(id)
{
IsSolid = false;
IsTransparent = true;
BlastResistance = 2.5f;
Hardness = 0.5f;
}
public overr... |
3a9524f91977cd200a32df185cecb16090a7e54c | C# | webmaster442/BookGen | /Libs/BookGen.Gui/Palette.cs | 3.140625 | 3 | using Spectre.Console;
namespace BookGen.Gui;
internal class Palette
{
private readonly Color[] _colors;
private int _index;
public Palette()
{
Random rnd = new Random(2);
_colors = Generate(rnd, 32);
_index = 0;
}
private static Color[] Generate(Random rnd, int coun... |
550e6838c826401b57f6acd55479bbb1c77758eb | C# | 0xF6/Fluent.Sudo | /Fluent.sudo/Platforms/MacOS.cs | 2.546875 | 3 | namespace Fluent.sudo.Platforms
{
using System;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Linq.Expressions;
using System.Threading.Tasks;
using Etc;
using Microsoft.Extensions.Logging;
using MoreLinq;
public class MacOS : ICommandExe... |
3e0af63bc4cfba4a20254c18a43f6ee0665c96b0 | C# | Syngon/java-menace-master | /java-menace/java-menace/Movement/CollisionManager.cs | 2.796875 | 3 | using System.Collections.Generic;
using System.Linq;
using System.Numerics;
using Windows.System;
namespace java_menace.Movement
{
class CollisionManager
{
private List<Collider> Colliders;
private Dictionary<VirtualKey, VirtualKey> ReverseKey;
public CollisionManager()
{
... |
286bea169c7359b2d8e276926e2cad85959c8fa3 | C# | JamesFitz2304/Crossword-Generator | /CrosswordGenerator/GenerationManager/Generation.cs | 2.875 | 3 | using System;
using System.Collections.Generic;
using CrosswordGenerator.Generator.Models;
namespace CrosswordGenerator.GenerationManager
{
public class Generation
{
public LetterBlock[,] Blocks;
public readonly IList<PlacedWord> PlacedWords;
public readonly IList<string> UnplacedWords... |
b1ea2c2057384ae6b44f1b54ae03e6f058c279f2 | C# | MangoNotation/MangoObjectNotation | /MangoObjectNotation/Parsing/PMethods.cs | 3.5625 | 4 | using System;
using System.Collections.Generic;
using System.Text;
namespace MangoObjectNotation.Parsing
{
static class PMethods
{
public static string[] Tear(string text)
{
//Tear string into string[] where each member is one character of string
//"dog" -> "d","o","g"
... |
b5d69cfaf44d236bb7f42327847d59f197c3e26e | C# | MarcioOlv95/CrudFuncionarios | /Business/Services/FuncionarioService.cs | 2.703125 | 3 | using Business.Interfaces;
using Business.Models.Validations;
using CrudFuncionarios.Models;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Business.Services
{
public class FuncionarioService : IFuncionarioService
{
private... |
9dbb46961ec154008ef83a55300002b40a3a26da | C# | Mike-Wazowski/PKRY-Server | /PKRY.Messages/Message.cs | 2.734375 | 3 | namespace PKRY.Messages
{
public class Message
{
public string Content
{
get;
set;
}
public string Username
{
get;
set;
}
public Message() { }
public Message(string username, string content)
... |
b156e1c4e8100c6c8229dc19c0c3f81fcee5d2f7 | C# | ashurja/BreakOut | /Assets/Scrits/Paddle.cs | 2.6875 | 3 | // Jamshed Ashurov
// 03/15/18
// This is the script that moves and clamps the paddle
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class Paddle : MonoBehaviour {
public float paddleSpeed = 1f;
private Vector3 playerPos = new Vector3 (0, -9.5f, 0);
// Update is cal... |
1edef581b37410fd6bf37e3cd17336c09bc67ff7 | C# | jquentin/ArtUnfrozen | /Okja/Assets/TigglyUtils/RandomUtils/SpawnAreaMonoBehaviour.cs | 3.015625 | 3 | using UnityEngine;
using System.Collections;
using System.Collections.Generic;
/// <summary>
/// Class implementing the SpawnArea interface, that is also a MonoBehaviour.
/// Using this class to declare a variable in a script will allow Unity Editor to
/// expose the variable, leaving you free to select an instance o... |
c9492f6a4d9a999b1c90017549b62c2b41473891 | C# | julyvz/5PFFE | /1ActivationKeys/Program.cs | 3.515625 | 4 | using System;
namespace _1ActivationKeys
{
class Program
{
static void Main(string[] args)
{
string rawKey = Console.ReadLine();
string input = Console.ReadLine();
while (input != "Generate")
{
string[] tokens = input.Split(">>>... |
b7ccf3a7bd4a86f67b8ac8e86b06feacffd4dc54 | C# | Bassman2/TheTVDBWebApi | /Src/TheTVDBWebApiShare/TVDBWeb.Awards.cs | 2.640625 | 3 | namespace TheTVDBWebApi
{
public partial class TVDBWeb
{
/// <summary>
/// Returns a list of award base records.
/// </summary>
/// <param name="cancellationToken">A cancellation token that can be used by other objects or threads to receive notice of cancellation.</param>
... |
e3a4a6eb093e1f7554f3298f58886192fdef8f11 | C# | randymcbride/LevelingUp | /DesignPatterns/Command/Classes/CommandQueue.cs | 3.34375 | 3 | using System.Collections.Generic;
namespace DesignPatterns.Command.Classes
{
public class CommandQueue
{
private Queue<ICommand> commands = new Queue<ICommand>();
private bool processing;
public static int FailureLimit = 4;
public int TotalAttempts { get; private set; }
public int FailCount { get; privat... |
8935a72b2ff2912eab89a85f8e751d02935a36b8 | C# | superjacobl/SpookVooper | /SpookVooper/VoopAI/Game/Entities.cs | 2.84375 | 3 | using System;
using System.Collections.Generic;
using System.Text;
namespace SpookVooper.VoopAIService.Game
{
public class GameEntity
{
public string _name;
public string _adjective;
public bool dead = false;
public virtual int GetXP()
{
return (int)(baseUn... |
310919635b79b7137c9d11add8b113b41ca498e4 | C# | Reatir/RandomGenerator | /RandomGenerator/RandomGenerator/Views/Random number generator.cs | 2.859375 | 3 | using RandomGenerator.Models;
using RandomGenerator.Presenters;
using RandomGenerator.Views;
using System;
using System.Windows.Forms;
namespace RandomGenerator
{
public partial class RandomNumberGeneratorView : Form
{
public PresenterRandomNumberGenerator _Presenter { get; set; }
public Ra... |
2ede2091acc8116e6b2604105eda4e986eb52fbd | C# | kerecsenlaci/ClientRegistry | /ClientRegistry/ViewModel/LoginVM.cs | 2.734375 | 3 | using CRegistry.Dal;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Security.Cryptography;
using System.Text;
using System.Threading.Tasks;
namespace ClientRegistry
{
public class LoginVM
{
DataManager context = new DataManager();
public User AuthenticateUser {... |
1d032b898df934d635fc091e5b09fcd58517d86e | C# | joeiren/smarths | /SmartHaiShu.WcfService/OpenDataLogic/BikeLocationLogic.cs | 2.53125 | 3 | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using SmartHaisuModel;
namespace SmartHaiShu.WcfService.OpenDataLogic
{
/// <summary>
/// 自行车分布点位
/// </summary>
public class BikeLocationLogic
{
/// <summary>
/// 记录数
/// </summary>
... |
9561e25bcefa9025f291b13d9559753bca1a8364 | C# | BasicLich/Hooks | /Assets/Scripts/State Machine/StateMachine.cs | 2.890625 | 3 | using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class StateMachine : MonoBehaviour
{
public State state;
private void Start()
{
if (this.state != null)
{
this.state.Enter();
}
}
public void Update()
{
if(this.s... |
aa749b1590af09a69c0e310ee3c961961b737a3b | C# | PlumpMath/DesignPattern-Projects | /AbstractFactoryPattern/AbstractEmployees/AbstractFactory.cs | 2.84375 | 3 | namespace AbstractFactoryPattern.AbstractEmployees
{
/// <summary>
/// The 'AbstractFactory' abstract class
/// </summary>
abstract class AbstractFactory
{
public abstract AbstractEmployeeA CreateEmployeeA();
public abstract AbstractEmployeeB CreateEmployeeB();
}
} |
821279b1d5857a6b2565d53c1e8fe6b5d0bfc73e | C# | claupcv/Internship | /claupcv/2017/mai/Curs09mai/Curs09mai/Program.cs | 3.4375 | 3 | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Curs09mai
{
class Program
{
static void Main(string[] args)
{
var array = new[] {1, 2, 3, 4, 5, 6, 7};
var queryEven = array.Where((int elem ) => { return elem % 2 != 0});
in... |
8b7e5396f2a09e353dd3ec851bf17a7fbe475a33 | C# | NanishiTakana/StudyDelivarable | /Naruhodo/Chapter15/15-1/15-1/Program.cs | 3.234375 | 3 | using System;
namespace _15_1
{
class Program
{
static void Main(string[] args)
{
var array = new int[5]
{
1,2,2,2,4
};
try
{
Console.WriteLine(array[5]);
}
catch(Ex... |
923133649197d4540feff8cd66f6c37ee86b9210 | C# | dalkumar500/badge | /CHALLENGE_3BADGE/ProgramUI.cs | 3.40625 | 3 | using Library;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace CHALLENGE_3BADGE
{
class ProgramUI
{
private BadgeRepository _badgeRepo = new BadgeRepository();
//Method that Runs/Start the Application
publi... |
6942cb393eba7d4f075b30703d1a8602dc77442f | C# | Matthijsvanspelde/Project-S2 | /SocialNetwork.Logic/FriendRequestLogic.cs | 2.59375 | 3 | using SocialNetwork.DAL.IRepositories;
using SocialNetwork.Logic.ILogic;
using SocialNetwork.Models;
using System.Collections.Generic;
namespace SocialNetwork.Logic
{
public class FriendRequestLogic : IFriendRequestLogic
{
private readonly IFriendRequestRepository _FriendRequestRepository;
pu... |
7f9059fcd0e0ff9640247d33e37d71c3c6ff5fe5 | C# | riswey/ArduinoController | /Arduino/Parameters.cs | 2.921875 | 3 | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Arduino
{
class ParameterState
{
public float p { get; set; }
public float i { get; set; }
public float d { get; set; }
public int pulse_delay { get; se... |