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 |
|---|---|---|---|---|---|---|
987abcc851fe984022013e2141f0f5e8184e95bb | C# | shendongnian/download4 | /first_version_download2/299430-31998685-97364867-2.cs | 3 | 3 | 'CREATE TWO PDFPTABLES
Dim tblNested1 As New PdfPTable(1)
Dim tblNested2 As New PdfPTable(3)
'CREATE CELLS WITH NO BORDER AND ADD THEM TO TABLE2
Dim cellNested1 = New PdfPCell(New Phrase("CELL1"))
cellNested1.Border = 0
tblNested2.AddCell(cellNested1)
Dim cellNested2 = New PdfPCel... |
cced536f9fd4d59d6826c3bc65acb3f3e8b8d85f | C# | awesomedotnetcore/Swifter | /Swifter.Data/Sql/AggregateFunction.cs | 2.859375 | 3 | namespace Swifter.Data.Sql
{
/// <summary>
/// 聚合函数列
/// </summary>
public abstract class AggregateFunction: ISelectColumn
{
/// <summary>
/// 聚合列
/// </summary>
public Column Column { get; }
/// <summary>
/// 别名
/// </summary>
public... |
4d846c0c581dc3081a65a9d444e9adabd3f63d38 | C# | phrender/Portfolio_Projects | /CSharpDesignPatterns/Composite/HtmlTag.cs | 3.4375 | 3 | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace CSharpDesignPatterns.Composite
{
public abstract class HtmlTag : HtmlNode
{
protected string m_strTagName = string.Empty;
protected List<HtmlNode> m_htmlElements = new ... |
2573f369c92ad4a7de931c83587cab02f4f09209 | C# | Barsonax/Neuralnetworkfromscratch | /NeuralNetwork/LabeledTrainingData.cs | 2.765625 | 3 | namespace NeuralNetwork
{
public class LabeledTrainingData
{
public byte[] Data { get; }
public float[] Label { get; }
public LabeledTrainingData(byte[] data, float[] label)
{
Data = new byte[data.Length];
for (var i = 0; i < data.Length; i++)
{
Data[i] = data[i];
}
Label = label;
}
}
... |
1cd47e117b4d22cc9800e21f939252d297848d86 | C# | jmskoczylas/NotesMicroservice | /src/Application/Handlers/GetNotesCountHandler.cs | 2.828125 | 3 | using Application.Requests;
using FluentResults;
using Infrastructure.Interfaces;
using MediatR;
using System;
using System.Threading;
using System.Threading.Tasks;
namespace Application.Handlers
{
/// <summary>
/// Handler for getting notes count.
/// </summary>
public class GetNotesCountHandler : IR... |
40645977a5e7317d0acda799471f55f2a0a87e4b | C# | mwhelan/Specify | /src/app/Specify/Configuration/ExecutableAttributes/EndTestCaseAttribute.cs | 2.609375 | 3 | using System;
using TestStack.BDDfy;
namespace Specify.Configuration.ExecutableAttributes
{
/// <summary>
/// Will run after every BDDfy method for each test case (scenario or example)
/// </summary>
public class EndTestCaseAttribute : ExecutableAttribute
{
public EndTestCaseAttribute() : ... |
5cd44f63470c515cf4c5a5e54552c59b8496c5bd | C# | amyniovi/PatternsSuck | /DecoratorPattern/Program.cs | 2.734375 | 3 | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace DecoratorPattern
{
class Program
{
static void Main(string[] args)
{
Frap myFrap = new CreamFrap();
Console.WriteLine("frap1: " + myFrap.GetDes... |
4c71e0336a17dc0bebf7446b14467d3aa51d7f9c | C# | nadavFux/Skyreach | /Skyreach/Jp2/Codestream/JP2Tile.cs | 2.9375 | 3 | using Skyreach.Query;
using Skyreach.Util;
using System;
using System.Collections.Generic;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Skyreach.Jp2.Codestream
{
public class JP2Tile
{
protected bool _isSealed;
protected List<JP2TilePart... |
5891d7d2fe6b337eeadffd447a619b16b63833a9 | C# | yuri-duque/Refletion_Factory_Singleton_Assincrono | /ProgramacaoAssincrona/ConsultaSite/Program.cs | 3.4375 | 3 | using System;
using System.Net.Http;
using System.Threading.Tasks;
namespace ConsultaSite
{
class Program
{
static void Main(string[] args)
{
var clienteHttp = new HttpClient();
var conteudo = clienteHttp.GetAsync("http://google.com.br");
var resultado = con... |
8d409710d3594ba1d2ebafd3eff0128418d95b5f | C# | NeonPandaSp/ValenceGame | /Valence/Assets/Fade.cs | 2.53125 | 3 | using UnityEngine;
using UnityEngine.UI;
using System.Collections;
public class Fade : MonoBehaviour {
public Image fadeObject;
public Text text;
public float speed;
public float delay;
float currentTime;
// Use this for initialization
void Start () {
currentTime = 0;
}
// Update is called once per fra... |
207af95977dd7b953572699ddcb34437b564ec8c | C# | joseph-gamedev/BansheeEngine | /Source/Scripting/MBansheeEditor/Windows/Scene/Gizmos/ParticleSystemGizmos.cs | 2.5625 | 3 | //********************************** Banshee Engine (www.banshee3d.com) **************************************************//
//**************** Copyright (c) 2017 Marko Pintera (marko.pintera@gmail.com). All rights reserved. **********************//
using BansheeEngine;
namespace BansheeEditor
{
/** @addtogroup G... |
2d95de0439f00e2daf777c25f0c93210ac49e99a | C# | Tiggerito/ClockWork.JavaScriptBuilder | /ScriptSet.cs | 2.8125 | 3 | using System;
using System.Data;
using System.Configuration;
using System.Collections.Generic;
using System.Collections;
using ClockWork.JavaScriptBuilder.JavaScript;
namespace ClockWork.JavaScriptBuilder
{
/// <summary>
/// A ScriptItem that consists of a set/list/collection of things
/// </summary>
public... |
3b267348c75291dee137dfbd9ef06fdcfb6d2c93 | C# | kbatalin/UniversityProjects | /csharp/Batalin.Nsudotnet.NumberGuesser/Game.cs | 3.625 | 4 | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace NumberGuesser
{
class Game
{
public int AttemptCount { get; private set; }
private readonly int _minNumber;
private readonly int _maxNumber;
private r... |
04d0c32911e6a3c2f1968c11c41b47a16ee7e562 | C# | FelixCukerman/ParkingSpaceApi | /ParkingLib/Transaction.cs | 2.578125 | 3 | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ParkingLib
{
[Serializable]
public class Transaction
{
readonly DateTime date;
public DateTime Date
{
get { return date; }
}
rea... |
034d7b9abbe38f60ecdd01b5fea56c75750a701a | C# | mateusz7812/Disk_Access_Methods | /DiskAccessMethods/DiscAccessStrategies/FcfsDiscAccessStrategy.cs | 2.796875 | 3 | using System;
using System.Collections.Generic;
using System.Text;
namespace DiskAccessMethods.DiscAccessStrategies
{
public class FcfsDiscAccessStrategy: AbstractDiscAccessStrategy
{
public FcfsDiscAccessStrategy(IHandler nextHandler) : base(nextHandler) { }
protected override int? SelectNex... |
f874b7aaf098744a475396c3f78e0351c15379d7 | C# | abowen/ProgrammingCSharpCookbook | /CSharpCookbook/CreateAndUseTypes/ManipulateStrings/Streams/StreamReaderWriterCommand.cs | 3.171875 | 3 | using System.Diagnostics.Contracts;
using System.IO;
using System.Text;
using CSharpCookbook.BaseCommands;
namespace CSharpCookbook.CreateAndUseTypes.ManipulateStrings.Streams
{
public class StreamReaderWriterCommand : DemoCommand
{
public StreamReaderWriterCommand()
{
AddResource(... |
d90d1d6bdb2f742c27b186392c65be0b3d15b9ae | C# | garsonlab/RandomMap | /Point.cs | 3.390625 | 3 | using System;
namespace TinyGrid
{
[System.Serializable]
public struct Point : IEquatable<Point>
{
public int x;
public int y;
public Point(int x, int y)
{
this.x = x;
this.y = y;
}
public static Point up => new Point(0, 1);
... |
c6bef3b3aaed752823bb45b6ceb1f4feab7f350e | C# | AcademyDotNET/pokemon_example-Jesse-Viskens | /Pokemon/Pokemon.cs | 3.3125 | 3 | using System;
using System.Collections.Generic;
using System.Text;
namespace Pokemon
{
class Pokemon
{
public Pokemon()
{
Hp_Base = 10;
Attack_Base = 10;
Defense_Base = 10;
SpecialAttack_Base = 10;
SpecialDefence_Base = 10;
... |
6b9ebe182259b51306f167cf59ee9fe0d607b59f | C# | aday1986/Leo | /Leo/Util/Converter.cs | 2.828125 | 3 | using Leo.Util.IniConfig;
using System;
using System.Collections.Generic;
using System.Data;
using System.IO;
using System.Reflection;
using System.Runtime.Serialization.Formatters.Binary;
using System.Text;
namespace Leo.Util
{
public class Converter
{
/// <summary>
/// 序列化实例为Base64。
... |
4ae053b67883a544f18b87ac13cdb9e9c8e5aec7 | C# | zeppu/WindowSnap | /Snapinator/Core/Hotkeys/Hotkey.cs | 2.625 | 3 | using System;
using System.ComponentModel;
using System.Runtime.InteropServices;
using System.Windows.Forms;
using Snapinator.Native;
namespace Snapinator.Core.Hotkeys
{
public sealed class Hotkey : IDisposable
{
private bool Equals(Hotkey other)
{
return _modifier == other._modifie... |
cc9abfa689701ee6e4d55f86524dc705ba028eeb | C# | vikashvns1/Dashboard | /DashBoard/Data/ExtensionMethods.cs | 3.453125 | 3 | using System.Collections.Generic;
using System.Data;
using System.Dynamic;
using System.Linq;
namespace DashBoard
{
public static class ExtensionMethods
{
/// <summary>
/// Create a datatable from a list of <see cref="IEnumerable{T}"/>
/// </summary>
/// <param name="data">The... |
153fba963bfe72d2641fbdb23e4711e486358cf0 | C# | swaros/projector | /src/CommandLineParser.cs | 2.953125 | 3 | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Text.RegularExpressions;
namespace Projector
{
class CommandLineParser
{
private string origText = "";
private string leftLimiter = "[SCRIPT]";
private string rightLimiter = ... |
6bf7380bbf07b6ae92009995efc2a4df64704555 | C# | shendongnian/download4 | /code4/640146-15197814-36863596-2.cs | 3.546875 | 4 | using System;
class PleaseDontDoThis {
public static implicit operator bool(PleaseDontDoThis h) {
return (new Random().Next() % 2 == 0);
}
}
static class Program {
static void Main(string[] args) {
var x = new PleaseDontDoThis();
if (x) {
... |
ca1abc245a4796d25df257e8b366a875bf400992 | C# | OgulcanCulfa/ClassMetotDemo | /CustomerManager.cs | 2.859375 | 3 | using System;
using System.Collections.Generic;
using System.Text;
namespace ClassMetotDemo
{
public class CustomerManager
{
void Add(Customer customer)
{
Console.WriteLine("Customer added.");
}
public string GetCustomers()
{
return "Customers l... |
089503d9b3699a801d16bbae66269dc597fd0a46 | C# | kingartes/SnakeVsBlocks | /Assets/Scripts/Snake/SnakeHead.cs | 2.546875 | 3 | using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.Events;
[RequireComponent(typeof(Rigidbody2D))]
public class SnakeHead : MonoBehaviour
{
private Rigidbody2D _rigidbody2D;
public event UnityAction<Block> BlockCollided;
public event UnityAction<int> BonusCol... |
487bbee3e712078565768690dff4a5f938d39cab | C# | shendongnian/download4 | /first_version_download2/28489-1473732-2919461-2.cs | 3.375 | 3 | public static class EnumerableExtension
{
public static void IfEmpty<T>(this IEnumerable<T> list, Action<IEnumerable<T>> action)
{
if (list.Count() == 0)
action(list);
}
}
foreach (var v in blabla)
{
}
blabla.IfEmpty(x => log("List is empty")... |
60490a690563cd8a3e0e7502857b4002d0f313c4 | C# | g14costa/AppLanches | /DextraApp/DextraAppTest/TesteLanche.cs | 3.03125 | 3 | using System;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using DextraApp.Models;
using System.Linq;
using System.Collections.Generic;
namespace DextraAppTest
{
[TestClass]
public class TesteLanche
{
private readonly Ingrediente Alface;
private readonly Ingrediente Bacon;
p... |
8df8d693f8b34c501515cfc76a237065dddb78ed | C# | vanderkorn/autocompleter | /Vdk.AutoCompleter.TestClient/Services/ApplicationTestClient.cs | 2.515625 | 3 | // --------------------------------------------------------------------------------------------------------------------
// <copyright file="ApplicationTestClient.cs" company="Ivan Kornilov">
// Copyright © 2014, Ivan Kornilov. All rights reserved.
// </copyright>
// <summary>
// The application test client.
// </... |
673e3e81070d04e4c42be3137b9f6c365f4deb9e | C# | miki9009/Platform | /Assets/Scripts/Infinite/SpawnManager.cs | 2.625 | 3 | using System.Collections.Generic;
using UnityEngine;
public static class SpawnManager
{
//static Dictionary<string, GameObject> spawnsOriginal = new Dictionary<string, GameObject>();
static Dictionary<string, Queue<GameObject>> spawns = new Dictionary<string, Queue<GameObject>>();
public static void A... |
1fda016345100be361699ab92fa5b2285540885c | C# | MilovanTomasevic/Design-Patterns-in-Csharp-and-.NET | /src/2_CreationalPatterns/3_Prototype/Inheritance.cs | 3.78125 | 4 | using System;
using static System.Console;
namespace DotNetDesignPatternDemos.Creational.Prototype.Inheritance
{
public interface IDeepCopyable<T> where T : new()
{
void CopyTo(T target);
public T DeepCopy()
{
T t = new T();
CopyTo(t);
return t;
}
}
pu... |
60005f9ae3612cb81f4f3d88d88446adc53c0ac8 | C# | UurDemir/KABU_BLog | /KABU_Blog/Blog.AI/Models/TableViewModel.cs | 2.53125 | 3 | using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Blog.Resources;
namespace Blog.AI.Models
{
public class TableViewModel<T>
{
public TableViewModel()
{
Perpage = 10;... |
b43105be2864bea6306a5d995104d2ad9a8b386b | C# | brendae132/mis33kproject | /FinalProject_Team12/FinalProject_Team12/Models/AppUser.cs | 2.609375 | 3 | using System.Data.Entity;
using System.Security.Claims;
using System.Threading.Tasks;
using Microsoft.AspNet.Identity;
using Microsoft.AspNet.Identity.EntityFramework;
using System.ComponentModel.DataAnnotations;
using System;
using System.Collections.Generic;
namespace FinalProject_Team12.Models
{
// You can ad... |
33adaa7a6d9e6c46d917ac981d6792e554a0121e | C# | JimenezIsidoro/JimenezIsidoro_UD3 | /Codigo/JimenezIsidoro_Cuaderno.cs | 2.59375 | 3 | using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class Example : MonoBehaviour
{
// 1.
// 1. El componente transform sirve la situar el objeto en el espacio, orientarlo con respecto a nuestro interes y cambiar su tamaño.
// 2. GetComponent: Devu... |
2b1e49d96f9a9281998c1359aa1bf4a7686d311b | C# | OrkhanBV/WebApiEx5 | /WebApi5/WebApi5/Controllers/UploadFileController.cs | 2.515625 | 3 | /*using System;
using System.IO;
using System.Net.Http;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Mvc;
using System.Web;
using Microsoft.AspNetCore.Http;
using Microsoft.EntityFrameworkCore.Metadata.Internal;*/
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
u... |
dcb31ae072b20c7132ad0a7845827957930d1a2d | C# | claudiomr79/.NetUtn | /Geometria/Geometria/Geometria/Cuadrado.cs | 2.953125 | 3 | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace Geometria
{
public class Cuadrado: Rectangulo
{
private double _Lado;
public double Lado
{
get { return _Lado; }
set { _Lado = value; }
}
public overr... |
646d209907571cec0f475cd8f6fcb1f767b537da | C# | hunzalaqamar/Cricket-Game | /Form1.cs | 2.671875 | 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 Assignment_2_Q1
{
public partial class cricketForm : Form
{
Team... |
47b282c2635d034575107e23e0af0a94578a85f6 | C# | maranmaran/ProductService | /Source/Business/Queries/GetProducts/GetProductsQueryHandler.cs | 2.859375 | 3 | using Business.Interfaces;
using Business.Models;
using Common;
using Common.Exceptions;
using Domain.Entities;
using LinqKit;
using MediatR;
using Microsoft.Extensions.Logging;
using Persistence.Interfaces;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Linq.Expressions;
using System.... |
8988d90bd16bf01c9c5de9eada5eafe1492262af | C# | kianev/Programming-Fundamentals-C-Sharp | /11.Strings-and-Text-Processing-Lab/04.Palindrome/04.Palindrome/Program.cs | 3.484375 | 3 | using System;
using System.Collections.Generic;
using System.Linq;
namespace _04.Palindrome
{
internal class Program
{
private static void Main(string[] args)
{
var input = Console.ReadLine().Split(new char[] { ' ', ',', '.', '!', '?' },
StringSplitOptions.RemoveEmp... |
14c9cffc7c96089b00801c87ed560ea70b00d6a5 | C# | mistertempleton/Assignment2v2 | /Classes/Advisor.cs | 3.0625 | 3 | using System;
using System.Collections.Generic;
using System.Linq;
namespace BuffTeks_Models
{
class Advisors
{
static void Main(string[] args)
{
using(var db = new AppDbContext())
{
try
{
db.Database.EnsureCreated(); ... |
76350c733dab0bf8b0ebf60a3df7c9ae9042093e | C# | nikolovescode/ExamApp | /NUnitTestProject/UnitTest1.cs | 2.53125 | 3 | using NUnit.Framework;
namespace Tests
{
using ExamApp;
using ExamApp.Services;
[TestFixture]
public class Tests
{
[SetUp]
public void Setup()
{
}
[Test]
public void Test1()
{
Assert.Pass();
}
[TestCase]
p... |
9dde4c58d10003129f44f1ef04ae129fe72266cd | C# | V-Uzunov/Soft-Uni-Education | /06.C#Advanced/06.ManualStringProcessing/04.ConvertFromBase10ToBase-N/StartUp.cs | 3.390625 | 3 | using System.Text;
namespace _04.ConvertFromBase10ToBase_N
{
using System;
using System.Linq;
using System.Numerics;
public class StartUp
{
public static void Main()
{
var input = Console.ReadLine()
.Split(new[] { " " }, StringSplitOptions.RemoveEmptyEn... |
5e1965b93843db4b3e857f440f46c738243bf241 | C# | DiptiDG/FinalProject | /ScheduleIt2.0/ScheduleIt2.0/Controllers/WorkTimeEventController.cs | 2.59375 | 3 | using System;
using System.Collections.Generic;
using System.Data;
using System.Data.Entity;
using System.Linq;
using System.Net;
using System.Web;
using System.Web.Mvc;
using Microsoft.AspNet.Identity;
using ScheduleIt2._0.Models;
namespace ScheduleIt2._0.Controllers
{
public class WorkTimeEventController : Cont... |
80ea5637f27bc00ddb5b3e29a319cbccc6b52b12 | C# | LorandBiro/LogSpect | /Source/LogSpectRewriterTests/Infrastructure/DebugOutputWriter.cs | 2.5625 | 3 | namespace LogSpectRewriterTests.Infrastructure
{
using System;
using System.Diagnostics;
using System.Text;
using LogSpectRewriter.Output;
internal class DebugOutputWriter : IOutputWriter
{
public static readonly DebugOutputWriter Instance = new DebugOutputWriter();
... |
2e1f32a0b707508f4fe28530afd5547238219372 | C# | LivingSkySchoolDivision/SchoolLogicDataExtractor | /sldataextractor.data/SchoolClassRepository.cs | 2.859375 | 3 | using sldataextractor.model;
using sldataextractor.util;
using System;
using System.Collections.Generic;
using System.Data;
using System.Data.SqlClient;
using System.Linq;
using System.Text;
namespace sldataextractor.data
{
public class SchoolClassRepository
{
private CourseRepository _courseRepo;
... |
cb6121938199bb5b18e1655b14b9150f105da8e7 | C# | nimasTT/ProductHuntAPI | /ProductHuntAPI/Models/RootWithPost.cs | 2.75 | 3 | using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.Runtime.Serialization;
using System.Text;
namespace ProductHuntAPI.Models
{
[DataContract]
internal class RootWithPost: IRootWithInstance<Post>
{
[DataMember(Name ="post")]
public Post Instance { get; set; ... |
d6d075666d5e28f8a546460b281735e6cd4b2e5b | C# | Koneke/DeepMagic | /Curses/DeepMagic/Input/Character/PaperDoll.cs | 3.15625 | 3 | namespace Deep.Magic
{
using System.Collections.Generic;
public class PaperDoll
{
private List<string> slots;
private List<string> freeSlots;
public PaperDoll()
{
this.slots = new List<string>();
this.freeSlots = new List<string>();
this.Items = new List<Item>();
}
public List<Item> Items { ... |
32b420f28ea61c10a20df27f569b6e1d8ffe24e6 | C# | jshagouv/lc101-kc | /March 23, 2017/code/Quiz/QuizAnswer.cs | 3.0625 | 3 | namespace Quiz
{
public class QuizAnswer {
public string Value {get; set;}
public override bool Equals (object obj)
{
//
// See the full list of guidelines at
// http://go.microsoft.com/fwlink/?LinkID=85237
// and also the guidance for opera... |
9115c40b4f4f291bd7eb4d3e91f1004f569bc627 | C# | Code-Inside/Samples | /2009/Errors/Repository/UserRepository.cs | 2.53125 | 3 | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Model;
namespace Repository
{
public class UserRepository
{
public IList<User> GetUsers()
{
List<User> returnList = new List<User>();
returnList.Add(new User() { Id = Guid.NewGui... |
4e33bee61cd32c3e7feb37fc73070cbc37e94565 | C# | LudovicDubois/SmartTests | /SmartTests/Ranges/INumericType.cs | 3.015625 | 3 | using System;
using System.Collections.Generic;
// ReSharper disable UnusedMember.Global
namespace SmartTests.Ranges
{
/// <summary>
/// Represents a range of integers of any integer type T
/// </summary>
/// <typeparam name="T">The type of integers for this range</typeparam>
public interface... |
dcdcd33cce6ae60aba84813cf831d98fbca31eff | C# | JarneStaalPXL/CSHARP | /Semester 1/Week 2/Iteratie/Deel 3 Iteratie/Oefening 4/Oefening 4/Program.cs | 3.796875 | 4 | using System;
namespace Oefening_4
{
class Program
{
static void Main(string[] args)
{
Console.WriteLine("Oefening 4: Schrijf een programma dat een rechthoekige driehoek van oplopende getallen");
Console.WriteLine("afdrukt van een gegeven aantal rijen.");
Co... |
be5dc7f62263f92ea4ed024322875f924708ae6e | C# | jamietre/tcc-plugin | /src/TccPlugin/TakeCmd/TccCommandRepo.cs | 2.53125 | 3 | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace TccPlugin.TakeCmd
{
public unsafe static class TccCommandRepo
{
private static Dictionary<TccCommandName, TccCommand> _Commands;
private static Dictiona... |
0f45452dbd0db196b09e1641d87e9a11da239159 | C# | yu3mars/procon | /atcoder/abc/abc005/c/Program.cs | 3.234375 | 3 | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace c
{
class Program
{
static void Main(string[] args)
{
int t = int.Parse(Console.ReadLine());
int n = int.Parse(Console.ReadLine());
... |
d00ac613f5030c60234c6c9448657769cbc80fdf | C# | shendongnian/download4 | /code4/608148-14350797-34520641-2.cs | 3 | 3 | public partial class Form1 : Form
{
Bitmap chip = new Bitmap(40, 40, PixelFormat.Format32bppArgb);
public Form1()
{
InitializeComponent();
using (Graphics g = Graphics.FromImage(chip))
{
g.SmoothingMode = System.Drawing.Drawing2D.Smooth... |
f317db84edd5d785877db99be4c621601bf50f9f | C# | midhunsankar/ProximityMatch | /ProximityMatch/IVector.cs | 2.625 | 3 | /*
* Developer : Midhun Sankar
* Date : 02/05/2018
* Description : This project is a demo to plot entities in a three dimentional vector space,
* and find vector points laying nearest to a point of reference.
* License : GNU General Public License.
*/
using System;
using ... |
dc14b98c1d9dc789084a4c8dc4b78a62bd3cff9b | C# | arifahmed411/Design_Patterns | /Proxy/Proxy.cs | 3.296875 | 3 | using System;
namespace DesignPatterns.GoF.Structural.Proxy
{
// Proxy is applicable whenever there is a need for a more versatile or sophisticated
//reference to an object than a simple pointer.Here are several common situations
//in which the Proxy pattern is applicable:
//1. A remote proxy provi... |
aa35a692b50cd32be1030738694359bcf015f674 | C# | CheeseSoftware/DynamicEEBot | /src/DynamicEEBot/Subbots/Dig/Item/PickaxeItem.cs | 2.828125 | 3 | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace DynamicEEBot.SubBots.Dig.Item
{
[Serializable]
public class PickaxeItem : InventoryItem, Item.IDestroyable
{
int totalDurability;
public PickaxeItem(string name, int buyPrice, int sellPrice, int... |
29050eaf666666c876ee9bb0c89868787df1e547 | C# | RobinJS/dotNET | /Telerik Academy Homework/C Sharp/OOP/OOP Principles I/Task 1/Teacher.cs | 2.625 | 3 | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace Task_1
{
public class Teacher : Person
{
private List<Discipline> disciplines;
private string name;
public string Name
{
get
{
return this.n... |
7cb5287ada8294dfa99fe58a04a0024827168858 | C# | alexrogeriodj/URI | /URI 1016/Program.cs | 3.515625 | 4 | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace URI_1016
{
class Program
{
static void Main(string[] args)
{
/**
* Dois carros (X e Y) partem em uma mesma direção. O carro X sai com velocida... |
3c126edc203d1fa8c24559969c255e38c57d172d | C# | barbie-ez/algorithms | /problemsolving/SimpleArraySum.cs | 3.078125 | 3 | using System;
namespace problemsolving
{
public class SimpleArraySum
{
public SimpleArraySum()
{
}
static int simpleArraySum(int[] ar)
{
int sum = 0;
foreach(var item in ar)
{
sum += item;
}
r... |
94407fe2dfe616bf1a1c54799bd38a9c39478d86 | C# | deton/bjd5 | /SmtpServer/Ml/MlEnvelope.cs | 2.625 | 3 | using Bjd;
using Bjd.mail;
using Bjd.net;
namespace SmtpServer {
class MlEnvelope {
public MailAddress From { get;private set; }
public MailAddress To { get; private set; }
public string Host { get; private set; }
public Ip Addr { get; private set; }
public MlEnvelope(Mail... |
8c0f7ab586de920400c7b9521e2b6a2284d26978 | C# | rotorist/TunguskaGame | /Assets/Code/UI/LightMeter.cs | 2.84375 | 3 | using UnityEngine;
using System.Collections;
public class LightMeter : MonoBehaviour
{
public UISprite [] Lights;
protected float Value;
private float _flashTimer;
private float _flashDuration;
private bool _isLastLightOn;
public void Initialize(float originalValue)
{
SetValue(originalValue);
_flashTim... |
9314da7537061c299f787ddeb005099bdcb67110 | C# | InterlakeHighSchoolMachineLearningClub/Colorizer | /Colorizer/Colorizer/Learning/LockBitmapData.cs | 3.28125 | 3 | using Colorizer.Imaging;
using System;
using System.Collections.Generic;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Colorizer.Learning
{
public sealed class LockBitmapData
{
public readonly int Length;
private readonly LockBitmap Bitmap... |
4d985d4c613b8bf5622c29273dd5050a21c7321b | C# | meizihuai/UplanServer | /UplanServer/classes/HTTPHelper.cs | 2.875 | 3 | using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Net;
using System.Net.Http;
using System.Net.Http.Headers;
using System.Text;
using System.Threading.Tasks;
using System.Web;
namespace UplanServer
{
public class HttpHelper
{
public static async Task<stri... |
6cdb23ab1d3e4b8c36212b077e5760a7ac86cd68 | C# | RoziPetkova/SoftUni-Homework | /1.3 Object-oriented programming/Homework 5 Encapsulation, Polymorphism, SC and LC/TheSlum-Skeleton/GameEngine/GameObjectEngine.cs | 3.109375 | 3 | using System;
using System.Linq;
using TheSlum.Characters;
using TheSlum.GameObjects.Items;
namespace TheSlum.GameEngine
{
public class GameObjectEngine : Engine
{
protected override void ExecuteCommand(string[] inputParams)
{
switch (inputParams[0])
{
c... |
18d0632863b60ff5e4507d20aeddf6261802d306 | C# | AlexandreBalataSouto/Tetris-Unity | /Assets/Scripts/PieceSpawner_Script.cs | 2.546875 | 3 | using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class PieceSpawner_Script : MonoBehaviour
{
public GameObject[] levelPieces;
public GameObject currentPiece, nextPiece;
private void Start()
{
nextPiece = Instantiate(levelPieces[0], this.transform.position,... |
07ab9197a6c46e5ba0168ab191a8c9bcb7da0cc8 | C# | bleroy/lunr-core | /LunrCorePerf/VectorBenchmark.cs | 2.671875 | 3 | using BenchmarkDotNet.Attributes;
using Lunr;
using System;
namespace LunrCorePerf
{
public class VectorBenchmark
{
private readonly Vector _v1 = new Vector();
private readonly Vector _v2 = new Vector();
private readonly Random _rnd = new Random();
[GlobalSetup]
public... |
63c1cb98e7f45410bf8ce7ec631ca13bf26b9e85 | C# | NataliaGomez2/InstrumentoAssist | /InstrumentodeMedicionAssist/FormularioIngreso.cs | 2.515625 | 3 | using System;
using System.Windows.Forms;
namespace InstrumentodeMedicionAssist
{
public partial class FormularioIngreso : Form
{
public FormularioIngreso()
{
InitializeComponent();
}
private void btnIngresar_Click(object sender, EventArgs e)
{
... |
65344fc56262d5690d4c569d4ff7466aedece6ed | C# | Serafim00/Runner_1 | /Assets/Scripts/GroundGenerator.cs | 2.640625 | 3 | using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class GroundGenerator : MonoBehaviour
{
public GameObject[] _groundPrefabs;
private List<GameObject> _activeGround = new List<GameObject>();
private float _spawnPosition = 0;
private float _groundLength = 100;
[S... |
dc7d91632eebc9d05622c07d7390b55c8277fe39 | C# | Girafee/ImperatorToCK3 | /ImperatorToCK3.UnitTests/Mappers/Region/CK3RegionTests.cs | 2.53125 | 3 | using ImperatorToCK3.Mappers.Region;
using ImperatorToCK3.CK3.Titles;
using commonItems;
using Xunit;
namespace ImperatorToCK3.UnitTests.Mappers.Region {
public class CK3RegionTests {
[Fact]
public void BlankRegionLoadsWithNoRegionsAndNoDuchies() {
var reader = new BufferedReader(string.Empty);
var region ... |
4ab56fa3eb3b4f42b23ee353c884853111b479d9 | C# | accessrichard/sqleditor.net | /SqlEditor/Models/Dojo/Dgrid/Column.cs | 2.8125 | 3 | namespace SqlEditor.Models.Dojo.Dgrid
{
/// <summary>
/// Represents a column in the client side dojo grid.
/// </summary>
public class Column
{
/// <summary>
/// Backing field for label property.
/// </summary>
private string label;
/// <summary>
//... |
88f730547d89eb3c2e388679c5a6e2347cec1b23 | C# | shendongnian/download4 | /first_version_download2/239840-18928874-47725955-2.cs | 2.796875 | 3 | SqlConnection conn = new SqlConnection("Data Source="?";Initial Catalog="?";Integrated Security=True");
SqlCommand cmd = new SqlCommand("SELECT * FROM Customers WHERE ID = @ID", conn);
cmd.Parameters.Add("@ID", System.Data.SqlDbType.Int).Value = Convert.ToInt32(txtID.Text);
SqlDataAdap... |
9440cdcc77605067004ece78125f9f8961f52c2d | C# | VonStrudel/Projet-prog-avanc-e | /Projet Jeu/Projet Jeu/IEventThrower.cs | 2.96875 | 3 | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace Projet_Jeu
{
/*Chaque objet (le monde et les composants du worldobject) appellent des events
*dans beaucoup de situations. Un objet peut s'inscrire à l'event d'un autre objet pour etre prévenu :
* exemple :... |
b4746dde9c6b9332089c9b889c24aa85f8e39e89 | C# | malvaradoLM/CMSuite | /Class/clsVehiculo.cs | 2.921875 | 3 | using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace RedCoForm.Class
{
public class clsVehiculo
{
public int VehiculoID
{
get;
set;
}
public string NoEconomico
... |
c448717d68533378a71d4dee0001669ca205ce67 | C# | KacperJedrzejewski/Programowanie-Obiektowe | /lista4/zad2.cs | 3.796875 | 4 | using System;
using System.Collections;
public class Primes : IEnumerator{
int next ;
public Primes(){ next = int.MaxValue - 200; }
bool primeCheck(int n){
if (n < 2) return false;
for (int i = 2; i <= Math.Sqrt(n); i++) if (n % i == 0) return false;
return true;
}
pu... |
7e0ea68e5e2656acd71f5390d8fd3bec53a7bd5d | C# | autumn009/TanoCSharpSamples | /Chap30/文字列の書き入れ/文字列の書き入れ/Program.cs | 2.734375 | 3 | using System;
class Program
{
static void Main(string[] args)
{
var x = 1;
var y = 2;
var a = string.Format("{0},{1}", x, y);
var b = $"{x},{y}";
Console.WriteLine(a);
Console.WriteLine(b);
}
}
|
26abb530d9576abee6afdac427bea38a51bc79d0 | C# | XamlBrewer/UWP-Prism-Validation-Sample | /XamlBrewer.Uwp.PrismValidationSample/Mvvm/LaterThanPropertyAttribute.cs | 3.015625 | 3 | using System;
using System.ComponentModel.DataAnnotations;
using System.Reflection;
namespace Mvvm
{
/// <summary>
/// Checks whether a DateTime is later than another Property.
/// </summary>
[AttributeUsage(AttributeTargets.Property | AttributeTargets.Field, AllowMultiple = false)]
public class L... |
b0ab14944b293f4b56430e4c2e192300b71f36de | C# | luiseduardohdbackup/CouchRS | /test/CouchRS.Test/Json/when_visiting_object_with_one_property_containing_an_array_of_complex_types.cs | 2.5625 | 3 | using Machine.Specifications;
using CouchRS.Json;
using System.Linq;
using Symbiote.Core;
namespace CouchRS.Test.Json
{
public class when_visiting_object_with_one_property_containing_an_array_of_complex_types
{
static JsonVisitor visitor;
private Because of = () =>
... |
0b0eb171c57c37e3389d562d3a0efd6bffc1fd1b | C# | alex-ks/backend-comptech | /Comptech.Backend/src/Comptech.Backend.Data/Repositories/Psql/PsqlSessionRepository.cs | 2.71875 | 3 | using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Comptech.Backend.Data.DomainEntities;
using Microsoft.Extensions.Logging;
namespace Comptech.Backend.Data.Repositories.Psql
{
public class PsqlSessionRepository : ISessionRepository
{
private ILogger... |
3cf2b614a0934109f21b19629b13721b17f98ba7 | C# | koenwermer/wlp | /Equivalent mutations/original C# code/Matrix.cs | 3.34375 | 3 | // http://www.java2s.com/Code/CSharp/2D-Graphics/MultiplytwoMatrixes.htm
using System;
using System.Collections.Generic;
using System.Text;
public class Matrix
{
public static double[,] Mul(double[,] a, double[,] b)
{
if (a.GetLength(1) != b.GetLength(0))
throw new ArgumentException();
... |
ca5dc95e07cf6abeb305584595e72ed076f540e3 | C# | tanchik1908/TelerikAcademy | /C#-1part-2part/10.Methods/5.CompareElements/CompareElemets.cs | 4 | 4 | //5. Write a method that checks if the element at given position in given array of integers
//is bigger than its two neighbors (when such exist).
using System;
class CompareElemets
{
static void Main()
{
//int[] intArray = { 2, 4, 5, 4, 7, 4, 2 };
//int index = 4;
//Console.WriteLin... |
9c66785549d3dd88e346797518a3b588c46a08f0 | C# | WAyling1021/BinaryTree | /BinaryTree.cs | 3.4375 | 3 | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace BinarySearchTreeAssignment
{
public class BinaryTree
{
//member variables
public BinaryTree()
{
root = null;
count = 0;
... |
ef869a2f135546ec10c7858cb88383b966ee4e1a | C# | NikolayKolibarov/C-Sharp-Programming-Basics | /Loops-Homework/14.DecimalToBinary/DecimalToBinary.cs | 3.765625 | 4 | using System;
class DecimalToBinary
{
static void Main()
{
long decNum;
string binNum = "";
Console.WriteLine("Enter a number different from 0: ");
while (!long.TryParse(Console.ReadLine(),out decNum))
{
Console.WriteLine("You must enter a number: ");
... |
323c238ab6e5ecb0142461bef692a4d6fc841be6 | C# | Stoipler/BlackJack | /BlackJack.Common/Models/Base/BasePlayer.cs | 2.8125 | 3 | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using BlackJack.Common.Enums;
namespace BlackJack.Common.Models.Base
{
public abstract class BasePlayer
{
public string Name;
public List<Card> Cards;
public int Money=15... |
43125c5479313af38279260e05343fba73987e22 | C# | HeartlessSpades/gamedev-cw-1 | /Program 1 + 2.cs | 3.390625 | 3 | using System;
namespace c_1_2
{
class Program
{
static void Main(string[] args)
{
int age = 15;
string superpower1 = "bubbles armor";
string superpower2 = "wind control";
string characterName = "spongbob";
Console.WriteLine("Hello Wo... |
ff53da2d5b953848418c82ec514510490054ee8d | C# | wk-j/action-result | /src/ActionResult.Tests/UnitTest1.cs | 2.59375 | 3 | using System;
using System.Collections.Generic;
using Microsoft.AspNetCore.Mvc;
using Xunit;
using System.Linq;
using System.Collections;
namespace ActionResult.Tests {
public class UnitTest1 {
[Fact]
public void Test1() {
ActionResult<string> a = "Hello";
Assert... |
f84a5837da807de7b9e29af0432e945964167af0 | C# | shendongnian/download4 | /code3/484103-11044617-25578664-4.cs | 2.515625 | 3 | static void browser_DocumentCompleted(object sender, WebBrowserDocumentCompletedEventArgs e)
{
WebBrowser browser = (WebBrowser)sender;
HtmlElementCollection collection;
List<HtmlElement> imgListString = new List<HtmlElement>();
if (browser != null)
{
if (brow... |
7940cc18eab4bd1dbabd50f60304519d79610579 | C# | maziesmith/CSharpLearning | /04_ASP/Itcaster.Web.DAL/SqlHelper.cs | 2.796875 | 3 | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Configuration;
using System.Data;
using System.Data.SqlClient;
namespace Itcaster.Web.DAL
{
public static class SqlHelper
{
private static readonly string str = Configuratio... |
a6cd66166f3bba399db36b711b257c4e7138188b | C# | NDuris/QuizRacer-1.0 | /Server/Main.cs | 3.046875 | 3 | using NetworkCommsDotNet;
using NetworkCommsDotNet.Connections;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Server
{
public class Program
{
public static void Main()
{
//Trigger the method Print... |
0f229e608614b5b22b5328e4a45b225566d95ca3 | C# | AhmedSamiir51/ClientCallsApi | /ClientCall/Service/IClient.cs | 2.796875 | 3 | using ClientCall.Model;
using Microsoft.EntityFrameworkCore;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
namespace ClientCall.Service
{
public class IClient : IService<Client>
{
ClientDbContext db = new ClientDbContext();
public Client Cre... |
784ae6329a76c49d00170429d954e578a2233fb1 | C# | pengqiangchn/LeetCode | /LeetCode/Easy/461-Hamming Distance.cs | 3.421875 | 3 | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace LeetCode
{
public class Solution461
{
public int HammingDistance(int x, int y)
{
int count = 0;
int z = x ^ y;
//可以使用Linq 写个 纳姆达表达式
string zs = Conver... |
e25379025ac7b0b36fa745fabc40a8af4cf14404 | C# | YKHahahaha/AutomatedTesting | /CC.AutomatedTesting.Infrastructure/ActionFactory/AssertActionFactory.cs | 2.59375 | 3 | using CC.AutomatedTesting.Infrastructure.Exceptions;
using CC.AutomatedTesting.Infrastructure.Extensions;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using System.Text;
using System.Text.RegularExpressions;
using System.Threading.Tasks;
namespace CC.AutomatedTesting.Inf... |
7998694dd9ca6d432c08aa863165640abca96cf5 | C# | mayrie73/c_sharp_projects | /c_sharp/dojodachi/Controllers/HomeController.cs | 2.75 | 3 | using System;
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Http;
namespace dojodachi.Controllers
{
public class HomeController : Controller
{
[Route("")]
[HttpGet]
public IActionResult Home()
{
TempData["gameStatus"] = "playing";
int? happine... |
be9adab860c599152d5c48f57e9069f92736050b | C# | shendongnian/download4 | /latest_version_download2/143024-29123148-86118753-2.cs | 3 | 3 | DataTable dt = new DataTable();
DataColumn c = new DataColumn();
c.DataType = typeof(string);
c.Name = "Product Name";
dt.Columns.Add(c);
c = new DataColumn();
c.DataType = typeof(decimal);
c.Name = "Cost";
dt.Columns.Add(c);
while (dr4.Read())
{
DataRow r = dt.N... |
1c35a18169fe0ec850b9ff0f1e57f77021208941 | C# | JW33/ClassLibraries | /ArrayCalculations/Mean.cs | 3.703125 | 4 |
using System.Collections.Generic;
namespace ArrayCalculations
{
public static class Mean
{
//--------------------------------------------------------------------
// Mean
//--------------------------------------------------------------------
/// <summary>
/... |
4984d689ec545209550eb6ec1c62fdb1790bd10e | C# | JanVdVeken/AdventOfCode2020 | /Days/Day15/Day15.cs | 3.21875 | 3 | using AdventOfCode2020.Shared;
using Days.Day15;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace AdventOfCode2020.Days
{
public class Day15 : Day
{
private Dictionary<int,int> input = new Dictionary<int, int>();
public Day15()
{
... |
3e9655172f3672cb3fa2b8ad163c5ebca1ebcc32 | C# | parhelia512/WaveEngineComponents-2.5 | /Shared/Primitives/LinePrimitives/LineArcMesh.cs | 2.640625 | 3 | // Copyright © 2018 Wave Engine S.L. All rights reserved. Use is subject to license terms.
#region Using Statements
using System.Runtime.Serialization;
using WaveEngine.Common.Attributes;
using WaveEngine.Common.Attributes.Converters;
using WaveEngine.Common.Math;
using WaveEngine.Components.Graphics3D;
#endregion
n... |
f11aee33e2767c042e883da513471e4bb47691ce | C# | IMAGE-ET/DicomControl | /LkDicomView.AnnObjects/AnnObject.cs | 2.609375 | 3 | using LkDicomView.AnnObjects.Enums;
using LkDicomView.Library;
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
namespace LkDicomView.AnnObjects
{
public abstract class AnnObject
{
public AnnO... |
ff16da88e4f624ecff19b0c619e5166a13d925e2 | C# | SamuelKhalil/BooksLookup | /Services/BookService.cs | 3.328125 | 3 | using BooksLookup.Interfaces;
using BooksLookup.Models;
using System;
using System.Collections.Generic;
using System.Text;
using System.Threading.Tasks;
using Newtonsoft.Json;
using System.Linq;
using System.Text.RegularExpressions;
namespace BooksLookup.Services
{
/// <summary>
/// BookService class is used ... |
aabc01477e1c36e6c9c162a5d037b4cd91e932b8 | C# | NTCoding/FubuRaven.NTCoding.com | /src/tests/Web.Tests/Utilities/HomepageViewModelAssertions.cs | 2.59375 | 3 | using System;
using System.Collections.Generic;
using System.Linq;
using Model;
using Model.Services.dtos;
using NUnit.Framework;
using Web.Endpoints.HomepageModels;
using Web.Utilities;
namespace Web.Tests.Utilities
{
public static class HomepageViewModelAssertions
{
public static void ShouldContain(this Homepag... |
fc2444d5b50b924502cd9805193d499579c5f9ca | C# | joemo65/TLG | /TLG/Assets/Scripts/ManagerScripts/CharacterManagerScript.cs | 2.71875 | 3 | using UnityEngine;
using System.Collections;
using System.Collections.Generic;
//using UnityEditor;
public class CharacterManagerScript : MonoBehaviour
{
public GameObject character; //reference to the main character
private static Stats overallStats = new Stats(); ... |