commit stringlengths 40 40 | subject stringlengths 4 1.73k | repos stringlengths 5 127k | old_file stringlengths 2 751 | new_file stringlengths 2 751 | new_contents stringlengths 1 8.98k | old_contents stringlengths 0 6.59k | license stringclasses 13
values | lang stringclasses 23
values |
|---|---|---|---|---|---|---|---|---|
2f41906afcac4e635b8a9e206c0fd5f36237d938 | Create 09.RefactorSpecialNumbers.cs | stoyanov7/SoftwareUniversity,stoyanov7/SoftwareUniversity,stoyanov7/SoftwareUniversity,stoyanov7/SoftwareUniversity | TechnologiesFundamentals/ProgrammingFundamentals/DataTypesAndVariables-Lab/09.RefactorSpecialNumbers.cs | TechnologiesFundamentals/ProgrammingFundamentals/DataTypesAndVariables-Lab/09.RefactorSpecialNumbers.cs | using System;
class RefactorSNumbers
{
static void Main()
{
int n = int.Parse(Console.ReadLine());
for (int i = 1; i <= n; i++)
{
int temporaryNumber = i;
int sum = 0;
while (temporaryNumber > 0)
{
sum += temporaryNumber % ... | mit | C# | |
61d14eca3bdb1fa9fb670552ce97d61d4abba54d | Create __SPECIAL__.fields.cs | etormadiv/njRAT_0.7d_Stub_ReverseEngineering | j_csharp/OK/__SPECIAL__.fields.cs | j_csharp/OK/__SPECIAL__.fields.cs | public static string VN = "[VN]";
public static string VR = "0.7d";
public static object MT = null;
public static string EXE = "[EXE]";
public static string DR = "[DR]";
public static string RG = "[RG]";
public static string H = "[H]";
public static string P = "[P]";
public static string Y = "|'|'|";
public static bool... | unlicense | C# | |
7f46a400302dfd0ded321f41278f91def26f15ff | Upgrade to C# 9 (#698) | asimarslan/hazelcast-csharp-client,asimarslan/hazelcast-csharp-client | src/Hazelcast.Net/Polyfills/IsExternalInit.cs | src/Hazelcast.Net/Polyfills/IsExternalInit.cs | // Copyright (c) 2008-2021, Hazelcast, Inc. All Rights Reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required... | apache-2.0 | C# | |
ba07c746864fe3d86f8a80bf11b8f41452eca140 | Create Problem78.cs | fireheadmx/ProjectEuler,fireheadmx/ProjectEuler | Problems/Problem78.cs | Problems/Problem78.cs | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace ProjectEuler.Problems
{
class Problem78
{
private int PermCoins(int n)
{
int count = 1; // One group of n
for (int i = n-1; i >= 1; i++)
{
... | mit | C# | |
69da2611dd69e869061bc1f1b8ae59785f7872f6 | Add event handler for picking up prizes | jguarShark/Unity2D-Components,cmilr/Unity2D-Components | Sound/SoundManager.cs | Sound/SoundManager.cs | using UnityEngine;
using UnityEngine.Assertions;
[RequireComponent(typeof(AudioSource))]
//uses mp3 for music, and ogg for sound effects
public class SoundManager : BaseBehaviour
{
public AudioClip collectPrize;
private new AudioSource audio;
void Awake()
{
audio = GetComponent<AudioSource>();
Assert.IsNotNu... | mit | C# | |
22e13e54dbe940c47b5cddd313a38976d6eb4583 | Add kinect body adapter | mrvux/kgp | src/KGP.Core/Adapters/KinectBody.cs | src/KGP.Core/Adapters/KinectBody.cs | using Microsoft.Kinect;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace KGP
{
/// <summary>
/// Adapter for kinect body, which allows us to get body information from several sources (kinect or network)
/// </summary>
public ... | mit | C# | |
415d3d726d794f966cdad78c32fc16d20c09d0c2 | Add file to the last commit | modulexcite/lokad-cqrs | Framework/Lokad.Cqrs.Portable.Tests/Feature.AtomicStorage/Stand_alone_tests.cs | Framework/Lokad.Cqrs.Portable.Tests/Feature.AtomicStorage/Stand_alone_tests.cs | using System;
using System.Runtime.Serialization;
using NUnit.Framework;
namespace Lokad.Cqrs.Feature.AtomicStorage
{
[TestFixture, Explicit]
public sealed class Stand_alone_tests
{
// ReSharper disable InconsistentNaming
[Test]
public void Test()
{
... | bsd-3-clause | C# | |
62bc10e13a32d9409cb9c318f1c76efb8d2771d1 | add Bootstrapper.cs | AspectCore/Mvvm | src/AspectCore.Extensions.Mvvm/Bootstrapper.cs | src/AspectCore.Extensions.Mvvm/Bootstrapper.cs | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace AspectCore.Extensions.Mvvm
{
public class Bootstrapper
{
public void Startup<IApplicationStartup>()
{
}
}
}
| mit | C# | |
bae9402f871a83bb16ffc0816862741698626235 | add missing ToSnakeCase method | vinhch/BizwebSharp | src/BizwebSharp/Extensions/StringExtensions.cs | src/BizwebSharp/Extensions/StringExtensions.cs | using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
namespace BizwebSharp.Extensions
{
public static class StringExtensions
{
public static string ToSnakeCase(this string input)
{
return string.Concat(input.Select((x, i) =>
{... | mit | C# | |
0a5a974f923186f79b220e7f5a46217cbc699120 | Add EquipmentMode.cs | NinjaVault/NinjaHive,NinjaVault/NinjaHive | NinjaHive.Contract/Models/EquipmentModel.cs | NinjaHive.Contract/Models/EquipmentModel.cs | using System;
using System.ComponentModel.DataAnnotations;
using NinjaHive.Core.Helpers;
using NinjaHive.Core.Validations;
namespace NinjaHive.Contract.Models
{
public class EquipmentModel : IModel
{
public Guid Id { get; set; }
[Required(ErrorMessage = "{0} is required")]
[Range(0, i... | apache-2.0 | C# | |
7cad3be1ce58cf5e6b6541f8424065b31e322e92 | Create Problem100.cs | fireheadmx/ProjectEuler,fireheadmx/ProjectEuler | Problems/Problem100.cs | Problems/Problem100.cs | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace ProjectEuler.Problems
{
static class Problem100
{
public static void Run()
{
decimal prob;
decimal min = 1000000000000m;
decimal blue = 707106781184m; // 70m // 10... | mit | C# | |
0ae6a62530e6bf579e89f7ecbdd25ac87911d6ca | Tag merging works with unsynced items. | eatskolnikov/mobile,peeedge/mobile,masterrr/mobile,eatskolnikov/mobile,ZhangLeiCharles/mobile,masterrr/mobile,ZhangLeiCharles/mobile,peeedge/mobile,eatskolnikov/mobile | Phoebe/Data/Json/Converters/TagJsonConverter.cs | Phoebe/Data/Json/Converters/TagJsonConverter.cs | using System;
using System.Linq;
using System.Threading.Tasks;
using Toggl.Phoebe.Data.DataObjects;
namespace Toggl.Phoebe.Data.Json.Converters
{
public sealed class TagJsonConverter : BaseJsonConverter
{
public async Task<TagJson> Export (TagData data)
{
var workspaceIdTask = GetR... | using System;
using System.Threading.Tasks;
using Toggl.Phoebe.Data.DataObjects;
namespace Toggl.Phoebe.Data.Json.Converters
{
public sealed class TagJsonConverter : BaseJsonConverter
{
public async Task<TagJson> Export (TagData data)
{
var workspaceIdTask = GetRemoteId<WorkspaceDa... | bsd-3-clause | C# |
d3efa6b2ef9f8e2ba424a18e06ab43847156c5d8 | add missing file | dwmkerr/sharpshell,dwmkerr/sharpshell,dwmkerr/sharpshell,dwmkerr/sharpshell | SharpShell/SharpShell.Tests/ServerRegistration/ServerRegistrationManagerTests.cs | SharpShell/SharpShell.Tests/ServerRegistration/ServerRegistrationManagerTests.cs | | mit | C# | |
143237d2ed9a4c73eb26dcca477c58aee8bfb0fd | Create DeserializeTransportMessageObserverFixture.cs | Shuttle/Shuttle.Esb,Shuttle/shuttle-esb-core | Shuttle.Esb.Tests/Pipelines/Observers/Shared/DeserializeTransportMessageObserverFixture.cs | Shuttle.Esb.Tests/Pipelines/Observers/Shared/DeserializeTransportMessageObserverFixture.cs | using System;
using System.IO;
using Moq;
using NUnit.Framework;
using Shuttle.Core.Pipelines;
using Shuttle.Core.Serialization;
using Shuttle.Core.System;
namespace Shuttle.Esb.Tests.Shared
{
public class DeserializeTransportMessageObserverFixture
{
[Test]
public void Should_be_able_to_kill_p... | bsd-3-clause | C# | |
232198a931c973d3de2f9685f7c8106a961d9c0a | Create MainWindow.xaml.cs | thekitchenscientist/WindowsEV3 | MainWindow.xaml.cs | MainWindow.xaml.cs | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
... | mit | C# | |
75d977d91e81e1c984ffa7daab1219b8073f7b26 | Add missing file | martincostello/alexa-london-travel-site,martincostello/alexa-london-travel-site,martincostello/alexa-london-travel-site,martincostello/alexa-london-travel-site | AssemblyVersion.cs | AssemblyVersion.cs | // Copyright (c) Martin Costello, 2017. All rights reserved.
// Licensed under the Apache 2.0 license. See the LICENSE file in the project root for full license information.
| apache-2.0 | C# | |
36577697c1d1c802b931f131c9920421d6a4d03a | Add ChunkListBase.ElemEqualityComparer class | 0xd4d/dnlib,ZixiangBoy/dnlib,yck1509/dnlib,Arthur2e5/dnlib,kiootic/dnlib,modulexcite/dnlib,ilkerhalil/dnlib,picrap/dnlib,jorik041/dnlib | src/DotNet/Writer/ChunkListBase.cs | src/DotNet/Writer/ChunkListBase.cs | using System.Collections.Generic;
using System.IO;
using dot10.IO;
using dot10.PE;
namespace dot10.DotNet.Writer {
/// <summary>
/// Base class of chunk list types
/// </summary>
/// <typeparam name="T">Chunk type</typeparam>
abstract class ChunkListBase<T> : IChunk where T : IChunk {
protected List<Elem> chun... | using System.Collections.Generic;
using System.IO;
using dot10.IO;
using dot10.PE;
namespace dot10.DotNet.Writer {
/// <summary>
/// Base class of chunk list types
/// </summary>
/// <typeparam name="T">Chunk type</typeparam>
abstract class ChunkListBase<T> : IChunk where T : IChunk {
protected List<Elem> chun... | mit | C# |
eac46fdf6e0586821190c6601714c2f6a6586b7d | add arcconf.cs | lesovsky/uber-scripts,lesovsky/uber-scripts,lesovsky/uber-scripts | cheatsheets/arcconf.cs | cheatsheets/arcconf.cs | # device discovery
arcconf list -- lists all controllers connected to the system
arcconf getstatus 1 -- get controller #1 status
arcconf getconfig 1 ad -- get controller detailed info
arcconf getconfig 1 ld ... | mit | C# | |
891fcb1dcce490b57b059629bf3bf53d5563a4b9 | add systemd.cs | lesovsky/uber-scripts,lesovsky/uber-scripts,lesovsky/uber-scripts | cheatsheets/systemd.cs | cheatsheets/systemd.cs | systemctl list-unit-files postgresql* -- list available unit-files
systemctl cat postgresql.service -- get content of unit-file
| mit | C# | |
9e850673a88fdc975f6a013e0fa95e4b976c595d | Add `SCardReaderState` structure | Archie-Yang/PcscDotNet | src/PcscDotNet/SCardReaderState.cs | src/PcscDotNet/SCardReaderState.cs | namespace PcscDotNet
{
/// <summary>
/// This structure is used by functions for tracking smart cards within readers.
/// (For Windows.)
/// </summary>
public struct SCardReaderState
{
/// <summary>
/// A pointer to the name of the reader being monitored.
/// Set the valu... | mit | C# | |
6a99b4ad1810d9d7816e3cc9f6a30a5c71f16511 | Create InvokeRepeating.cs | carcarc/unity3d | InvokeRepeating.cs | InvokeRepeating.cs | public float spawnTime = 3f;
// Call the Spawn function after a delay of the spawnTime and then continue to call after the same amount of time.
InvokeRepeating ("Method", spawnTime, spawnTime);
void Method ()
{
//any method
}
| mit | C# | |
4a7fd12ad44be363f8fb01dbc1482be1ee88c9db | Create RepositoryCaching.cs | CarmelSoftware/Generic-Data-Repository-With-Caching | Models/RepositoryCaching.cs | Models/RepositoryCaching.cs | using System;
using System.Collections.Generic;
using System.Linq;
using System.Data;
using System.Runtime.Caching;
using System.Web;
namespace GenericRepositoryWithCatching.Models
{
public class RepositoryCaching
{
public ObjectCache Cache
{
get { return MemoryCache.Default; }
... | mit | C# | |
44d8a3d6cdc3554b64187b0a0c8278ace83790e9 | Create ColorConverter.cs | UnstableMutex/WPF.Converters | ColorConverter.cs | ColorConverter.cs | class ColorConverter : IValueConverter
{
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
{
string c = value.ToString();
Color res = (Color)System.Windows.Media.ColorConverter.ConvertFromString("#"+c);
if (targetType ==... | mit | C# | |
ae94ea6b00dd5809d7a203dbee594c898423a2fd | Change method names in TempStorage. | bfriesen/Rock.Core,RockFramework/Rock.Core,peteraritchie/Rock.Core | Rock.Core/IO/TempStorage.cs | Rock.Core/IO/TempStorage.cs | using System.Collections.Generic;
using Rock.Defaults.Implementation;
using Rock.KeyValueStores;
namespace Rock.IO
{
public static class TempStorage
{
public static IEnumerable<IBucketItem> GetItems(string bucket)
{
return Default.TempStorage.GetItems(bucket);
}
pu... | using System.Collections.Generic;
using Rock.Defaults.Implementation;
using Rock.KeyValueStores;
namespace Rock.IO
{
public static class TempStorage
{
public static IEnumerable<IBucketItem> GetItems(string bucket)
{
return Default.TempStorage.GetItems(bucket);
}
pu... | mit | C# |
6d5f3284de9826cb0015ee4d28338c6417516469 | Add license header | ankurchoubeymsft/azure-powershell,krkhan/azure-powershell,hungmai-msft/azure-powershell,akurmi/azure-powershell,ankurchoubeymsft/azure-powershell,arcadiahlyy/azure-powershell,AzureRT/azure-powershell,atpham256/azure-powershell,seanbamsft/azure-powershell,naveedaz/azure-powershell,yoavrubin/azure-powershell,zhencui/azur... | src/ResourceManager/Compute/Commands.Compute/Models/AzureDiskEncryptionStatusContext.cs | src/ResourceManager/Compute/Commands.Compute/Models/AzureDiskEncryptionStatusContext.cs | // ----------------------------------------------------------------------------------
//
// Copyright Microsoft Corporation
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
// http://www.apa... | using Microsoft.Azure.Management.Compute.Models;
using Newtonsoft.Json;
namespace Microsoft.Azure.Commands.Compute.Models
{
enum EncryptionStatus
{
Encrypted,
NotEncrypted,
Unknown
}
class AzureDiskEncryptionStatusContext
{
public EncryptionStatus OsVolumeEncrypted... | apache-2.0 | C# |
ff866d77f598a56e6773ba27437b883cf5fe3554 | Create DeleteOnTrigger.cs | xxmon/unity | DeleteOnTrigger.cs | DeleteOnTrigger.cs | using UnityEngine;
using System.Collections;
public class DeleteOnTrigger : MonoBehaviour {
// Use this for initialization
void Start () {
}
// Update is called once per frame
void Update () {
}
void DoActivateTrigger() {
Destroy (gameObject);
}
}
| mit | C# | |
7cb8ba95dbe0079dfe7f600b25ee831e3b9acf1c | Create test.aspx.cs | paydunk/asp.net-integration | test.aspx.cs | test.aspx.cs | using System;
using System.IO;
using System.Net;
public partial class WebApiClass : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
//update the following 2 lines with your ID and Secret!
string client_id = "fwGq5O7jTCMcW26fzzJ9DnsjgnXps5C8HioF5hz0";
... | mit | C# | |
448c64c2c09c2cd0ea456eeb8124eedf2ab10196 | Change the default value of renameArgs to match the method | modulexcite/ConfuserEx,KKKas/ConfuserEx,fretelweb/ConfuserEx,jbeshir/ConfuserEx,Desolath/Confuserex,engdata/ConfuserEx,manojdjoshi/ConfuserEx,AgileJoshua/ConfuserEx,mirbegtlax/ConfuserEx,apexrichard/ConfuserEx,Immortal-/ConfuserEx,JPVenson/ConfuserEx,mirbegtlax/ConfuserEx,HalidCisse/ConfuserEx,HalidCisse/ConfuserEx,far... | Confuser.Renamer/RenamePhase.cs | Confuser.Renamer/RenamePhase.cs | using System;
using System.Collections.Generic;
using System.Linq;
using Confuser.Core;
using dnlib.DotNet;
namespace Confuser.Renamer {
internal class RenamePhase : ProtectionPhase {
public RenamePhase(NameProtection parent)
: base(parent) { }
public override ProtectionTargets Targets {
get { return Pro... | using System;
using System.Collections.Generic;
using System.Linq;
using Confuser.Core;
using dnlib.DotNet;
namespace Confuser.Renamer {
internal class RenamePhase : ProtectionPhase {
public RenamePhase(NameProtection parent)
: base(parent) { }
public override ProtectionTargets Targets {
get { return Pro... | mit | C# |
0d2f10b8bcc5ef5e05e837a4bf72cb3cebb3180d | Add HFTSetup | greggman/hft-unity3d,greggman/hft-unity3d,greggman/hft-unity3d,greggman/hft-unity3d | HappyFunTimesEditor/HFTSetup.cs | HappyFunTimesEditor/HFTSetup.cs | /*
* Copyright 2015, Gregg Tavares.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
*
* * Redistributions of source code must retain the above copyright
* notice, this list of condi... | bsd-3-clause | C# | |
e88ea76c6f78fb33377d3a30f0fb00df034d578e | Add DeleteMessage Job & TriggerQueue | Nanabell/NoAdsHere | NoAdsHere/Services/Penalties/DeleteMessageJob.cs | NoAdsHere/Services/Penalties/DeleteMessageJob.cs | using Quartz;
using System;
using System.Threading.Tasks;
using Discord;
using Microsoft.Extensions.DependencyInjection;
using NLog;
namespace NoAdsHere.Services.Penalties
{
public static class JobQueue
{
private static IScheduler _scheduler;
public static Task Install(IServiceProvider provid... | mit | C# | |
1a3807c3974c7260bfd102357dc00bb12d1cc72b | Add properties file for donet | StyleTang/incubator-rocketmq-externals,StyleTang/incubator-rocketmq-externals,StyleTang/incubator-rocketmq-externals,StyleTang/incubator-rocketmq-externals,StyleTang/incubator-rocketmq-externals,StyleTang/incubator-rocketmq-externals,StyleTang/incubator-rocketmq-externals,StyleTang/incubator-rocketmq-externals,StyleTan... | rocketmq-client-donet/Properties/AssemblyInfo.cs | rocketmq-client-donet/Properties/AssemblyInfo.cs | using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("Roc... | apache-2.0 | C# | |
5514b75ca58e476cac1b7bc69a0e0852b8526c9b | Add manual LocationName for compatibility | jskeet/google-cloud-dotnet,jskeet/google-cloud-dotnet,jskeet/google-cloud-dotnet,googleapis/google-cloud-dotnet,googleapis/google-cloud-dotnet,jskeet/google-cloud-dotnet,jskeet/gcloud-dotnet,googleapis/google-cloud-dotnet,jskeet/google-cloud-dotnet | apis/Google.Cloud.Scheduler.V1/Google.Cloud.Scheduler.V1/LocationName.cs | apis/Google.Cloud.Scheduler.V1/Google.Cloud.Scheduler.V1/LocationName.cs | // Copyright 2019 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// https://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in... | apache-2.0 | C# | |
6c9d8639bca99d89175ac33a82975ca82af77368 | add performance test | donnytian/Npoi.Mapper | Npoi.Mapper/test/PerformanceTests.cs | Npoi.Mapper/test/PerformanceTests.cs | using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using Npoi.Mapper;
namespace test
{
[TestClass]
public class PerformanceTests : TestBase
{
[TestMethod]
... | mit | C# | |
705bbe198f82be2da48d12949eaae2bde9f880c3 | Modify test to use string data. | sitofabi/duplicati,mnaiman/duplicati,duplicati/duplicati,sitofabi/duplicati,mnaiman/duplicati,mnaiman/duplicati,sitofabi/duplicati,duplicati/duplicati,duplicati/duplicati,duplicati/duplicati,duplicati/duplicati,sitofabi/duplicati,mnaiman/duplicati,sitofabi/duplicati,mnaiman/duplicati | Duplicati/UnitTest/UtilityTests.cs | Duplicati/UnitTest/UtilityTests.cs | // Copyright (C) 2017, The Duplicati Team
// http://www.duplicati.com, info@duplicati.com
//
// This library is free software; you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as
// published by the Free Software Foundation; either version 2.1 of the
// L... | // Copyright (C) 2017, The Duplicati Team
// http://www.duplicati.com, info@duplicati.com
//
// This library is free software; you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as
// published by the Free Software Foundation; either version 2.1 of the
// L... | lgpl-2.1 | C# |
993ebb23af71e9c6853bcaf0367e1538dee5facb | Add List Command | monoman/NugetCracker,monoman/NugetCracker | NugetCracker/Commands/ListCommand.cs | NugetCracker/Commands/ListCommand.cs | using System;
using System.Collections.Generic;
using System.Linq;
using log4net;
using NugetCracker.Interfaces;
using NugetCracker.Data;
namespace NugetCracker.Commands
{
public class ListCommand : ICommand
{
public bool Matches(string commandPattern)
{
commandPattern = commandPattern.Trim().To... | apache-2.0 | C# | |
9e3594f6b63fe903a8b876ca625bbf9bd37bb550 | Add word wrap extension | Faseway/GameLibrary | GameLibrary/Code/Rendering/Font/Extension.cs | GameLibrary/Code/Rendering/Font/Extension.cs | using Microsoft.Xna.Framework.Graphics;
namespace Faseway.GameLibrary.Rendering
{
public static class Extension
{
/// <summary>
/// Wraps a specified text.
/// </summary>
/// <param name="font">The font.</param>
/// <param name="text">The text to wrap.</param>
/... | mit | C# | |
ec78b76f93ed9f05f0e13fa7c9b683cab0ca813e | Simplify service creation | GestionSystemesTelecom/gst-library,GestionSystemesTelecom/gst-library | src/GST.Library.TimeZone/DependencyInjection/GSTLibraryTimeZoneServiceCollectionExtensions.cs | src/GST.Library.TimeZone/DependencyInjection/GSTLibraryTimeZoneServiceCollectionExtensions.cs | using GST.Library.TimeZone.Services;
using GST.Library.TimeZone.Services.Abstract;
using Microsoft.Extensions.DependencyInjection;
using System;
using System.Collections.Generic;
using System.Text;
namespace GST.Library.TimeZone.DependencyInjection
{
/// <summary>
/// DI extension methods for adding... | mit | C# | |
6ae97289adf93a11bd9a32473fc8b907c710641b | Add NullIndexer implementation | ZooPin/CK-Glouton,ZooPin/CK-Glouton,ZooPin/CK-Glouton,ZooPin/CK-Glouton | src/CK.Glouton.Lucene/NullIndexer.cs | src/CK.Glouton.Lucene/NullIndexer.cs | using System;
using System.Collections.Generic;
using CK.Monitoring;
namespace CK.Glouton.Lucene
{
public class NullIndexer : IIndexer
{
public NullIndexer()
{
}
public void IndexLog(ILogEntry entry, IReadOnlyDictionary<string, string> clientData)
{
}
}
}
| mit | C# | |
f5f80a547743b4c7f9e4107383771f825b986eea | Remove static check about the regions | Matt-Westphal/azure-powershell,oaastest/azure-powershell,yadavbdev/azure-powershell,naveedaz/azure-powershell,akurmi/azure-powershell,iouri-s/azure-powershell,namratab/azure-powershell,AzureRT/azure-powershell,akurmi/azure-powershell,oaastest/azure-powershell,mayurid/azure-powershell,namratab/azure-powershell,PashaPash... | src/ResourceManager/StreamAnalytics/Commands.StreamAnalytics/Subscription/GetAzureStreamAnalyticsQuotasCommand.cs | src/ResourceManager/StreamAnalytics/Commands.StreamAnalytics/Subscription/GetAzureStreamAnalyticsQuotasCommand.cs | // ----------------------------------------------------------------------------------
//
// Copyright Microsoft Corporation
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
// http://www.apa... | // ----------------------------------------------------------------------------------
//
// Copyright Microsoft Corporation
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
// http://www.apa... | apache-2.0 | C# |
0823bd858857da24feb895f340bd63d3de41c6f7 | Create AssemblyInfo.cs | RocketSoftware/multivalue-lab,nkesic/multivalue-lab,codedecay/multivalue-lab,RocketSoftware/multivalue-lab,codedecay/multivalue-lab,codedecay/multivalue-lab,codedecay/multivalue-lab,nkesic/multivalue-lab,nkesic/multivalue-lab,nkesic/multivalue-lab,codedecay/multivalue-lab,nkesic/multivalue-lab,nkesic/multivalue-lab,Roc... | U2-Toolkit/DataAdapter/Properties/AssemblyInfo.cs | U2-Toolkit/DataAdapter/Properties/AssemblyInfo.cs | using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("Dat... | mit | C# | |
0921c00ad8f9ba97b165b8acf093aded5369b9e0 | Add generic ILogger<> registration for Unity | lerthe61/Snippets,lerthe61/Snippets | dotNet/IOC/Unity/RegisterGenericFactoryMethod.cs | dotNet/IOC/Unity/RegisterGenericFactoryMethod.cs | // Problem: You need to register in Unity factory method that has single type parameters (a.k.a generic) to produce some generics
// var logger = ILoggerFactory.CreateLogger<T>()
// var logger = container.Resolve<ILogger<T>>();
public static class LoggerFactoryExtensions
{
/// <summary>
/// Creates a new ... | unlicense | C# | |
0023d25085f51aad8726c88a4a75fbdb57197374 | Create Script.cs | gmich/Gem | Gem.Network/Configuration/Script.cs | Gem.Network/Configuration/Script.cs | //var PrintSum = CSScript.LoadMethod(
// @"public static void PrintSum(int a, int b)
//{
// Console.WriteLine((a+b));
// }")
// .GetStaticMethod();
//PrintSum(1, 2);
| mit | C# | |
3b4556b9c4511ae94e1146d63fc15b59d5a52689 | Add comment. | skynode/eShopOnContainers,TypeW/eShopOnContainers,productinfo/eShopOnContainers,BillWagner/eShopOnContainers,andrelmp/eShopOnContainers,dotnet-architecture/eShopOnContainers,productinfo/eShopOnContainers,albertodall/eShopOnContainers,skynode/eShopOnContainers,skynode/eShopOnContainers,skynode/eShopOnContainers,oferns/e... | src/Services/Identity/Identity.API/Certificate/Certificate.cs | src/Services/Identity/Identity.API/Certificate/Certificate.cs | // Copyright (c) Brock Allen & Dominick Baier. All rights reserved.
// Licensed under the Apache License, Version 2.0. See LICENSE in the project root for license information.
using System.IO;
using System.Reflection;
using System.Security.Cryptography.X509Certificates;
namespace Identity.API.Certificate
{
stati... | // Copyright (c) Brock Allen & Dominick Baier. All rights reserved.
// Licensed under the Apache License, Version 2.0. See LICENSE in the project root for license information.
using System.IO;
using System.Reflection;
using System.Security.Cryptography.X509Certificates;
namespace Identity.API.Certificate
{
stati... | mit | C# |
b4eb8a94c6939575e36b99cb94a0a41821f73bff | Add ToEnglish() extension method to RoomReservationAssignmentStatus | PietroProperties/holms.platformclient.net | csharp/HOLMS.Platform/HOLMS.Platform/Types/Operations/Housekeeping/RoomReservationAssignmentStatus.cs | csharp/HOLMS.Platform/HOLMS.Platform/Types/Operations/Housekeeping/RoomReservationAssignmentStatus.cs | using System;
namespace HOLMS.Types.Operations.Housekeeping {
public static class RoomReservationAssignmentStatusExtensions {
public static string ToEnglish(this RoomReservationAssignmentStatus rras) {
switch (rras) {
case RoomReservationAssignmentStatus.VacantVacant:
... | mit | C# | |
e8b572848a69df896338a9e6bde77eb586f969c4 | add BiggerIsGreater.cs | regeldso/hrank | Algorithms/Sorting/BiggerIsGreater.cs | Algorithms/Sorting/BiggerIsGreater.cs | // v1 too slow
using System;
public static class StringExtention
{
public static string GetNextGreaterLex(this string str)
{
char symbol;
int j = str.Length - 1;
while (j > 0 && (int)str[j - 1] >= (int)str[j])
j--;
if (j <= 0)
return str;
int i =... | mit | C# | |
034f35c5f0b0794b6f6b4eb5a2a713e19f09a19a | Add url content function | caronyan/CSharpRecipe | CSharpRecipe/Recipe.Web/UrlContent.cs | CSharpRecipe/Recipe.Web/UrlContent.cs | using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Net;
using System.Text;
using System.Threading.Tasks;
namespace Recipe.Web
{
public class UrlContent
{
public static async Task<string> GetHtmlFromUrlAsync(Uri uri)
{
string html = stri... | mit | C# | |
6edf17168810d049d727500e078b6ad742bfdce6 | Add DistanceConverter | Stratajet/UnitConversion | UnitConversion/DistanceConverter.cs | UnitConversion/DistanceConverter.cs | using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using UnitConversion.Base;
namespace UnitConversion {
public class DistanceConverter : BaseUnitConverter {
public DistanceConverter(string leftUnit, string rightUnit) {
var units = new UnitFactors... | mit | C# | |
5f0000e20c5a345dc50efe5d96b49b610f77202c | Bump v1.0.16.1 | karronoli/tiny-sato | TinySato/Properties/AssemblyInfo.cs | TinySato/Properties/AssemblyInfo.cs | using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// アセンブリに関する一般情報は以下の属性セットをとおして制御されます。
// アセンブリに関連付けられている情報を変更するには、
// これらの属性値を変更してください。
[assembly: AssemblyTitle("TinySato")]
[assembly: AssemblyDescription("You can construct and send SBPL packet to Sato printer. Sat... | using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// アセンブリに関する一般情報は以下の属性セットをとおして制御されます。
// アセンブリに関連付けられている情報を変更するには、
// これらの属性値を変更してください。
[assembly: AssemblyTitle("TinySato")]
[assembly: AssemblyDescription("You can construct and send SBPL packet to Sato printer. Sat... | apache-2.0 | C# |
c4a09c7c88040569c5086454c0c3c36cc191fabe | Create 15.cs | rikkus/adventofcode2016,rikkus/adventofcode2016 | 15.cs | 15.cs | using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.CompilerServices;
using System.Text;
using System.Text.RegularExpressions;
using System.Threading.Tasks;
namespace Aoc2016_15
{
struct Disc
{
public int Count { get; set; }
public int Value { get; set; }
... | mit | C# | |
c7ef3ef03029ac3d410e34d31572eaa95ac4b8b2 | Add strong number calculation in C# | ZoranPandovski/al-go-rithms,manikTharaka/al-go-rithms,ZoranPandovski/al-go-rithms,manikTharaka/al-go-rithms,ZoranPandovski/al-go-rithms,Deepak345/al-go-rithms,Deepak345/al-go-rithms,ZoranPandovski/al-go-rithms,Deepak345/al-go-rithms,ZoranPandovski/al-go-rithms,Deepak345/al-go-rithms,Deepak345/al-go-rithms,ZoranPandovsk... | math/strong_number/C#/StrongNumber.cs | math/strong_number/C#/StrongNumber.cs | using System;
public class StrongNumber
{
/// <summary>
/// Calculates whether or not a number is a strong number.
/// </summary>
/// <param name="number">The number which may be determined to be a strong number. </param>
/// <returns>Returns true if number is a strong number.</returns>
public... | cc0-1.0 | C# | |
834f86a857c70e4fd87012061298f773a312785a | Create DependencyObjectExtensions.cs | jamesqo/typed-xaml | src/Typed.Xaml.Uwp/DependencyObjectExtensions.cs | src/Typed.Xaml.Uwp/DependencyObjectExtensions.cs | using System;
using System.Collections.Generic;
using Windows.UI.Xaml;
namespace Typed.Xaml
{
public static partial class DependencyObjectExtensions
{
public static T GetAnimationBase<T>(this DependencyObject obj, DependencyProperty property)
{
return (T)obj.GetAnimationBaseValue(pr... | mit | C# | |
29a3728ba8ee7c0f61316f517d6c9badee19d3cc | Create Student-Data.cs | DeanCabral/Code-Snippets | Console/Student-Data.cs | Console/Student-Data.cs | class StudentData
{
static void Main(string[] args)
{
GetUserInput();
}
static void GetUserInput()
{
int studentNumber;
string studentName;
string scoredMarks;
Console.Write("Input Student Number: ");
... | mit | C# | |
4e1b753f70e68645c586b296f61aacd042b6d1bd | Ajuste model. | ricardodemauro/TDC2015-MVVM | ListaDeLeituraInicial/ListaDeLeituraInicial/ListaDeLeituraInicial.Shared/Model/RssArticle.cs | ListaDeLeituraInicial/ListaDeLeituraInicial/ListaDeLeituraInicial.Shared/Model/RssArticle.cs | using System;
using System.Collections.Generic;
using System.Text;
namespace ListaDeLeituraInicial.Model
{
public class RssArticle
{
public string Titulo { get; set; }
public DateTime DataPublicacao { get; set; }
public string Descricao { get; set; }
public Uri Link { get; s... | apache-2.0 | C# | |
a35166cd6de5d8543bfc4b8b581c5a31311a8f6a | Add two numbers | Gerula/interviews,Gerula/interviews,Gerula/interviews,Gerula/interviews,Gerula/interviews | LeetCode/add_two_numbers.cs | LeetCode/add_two_numbers.cs | using System;
class Program {
class Node {
public int Value { get; set; }
public Node Next { get; set; }
public Node Add(Node second) {
Node prev = null;
Node result = null;
Node first = this;
int carry = 0;
while (first != nu... | mit | C# | |
69d01c887c78a9bb90a134ed24c54e357bd5c72d | Add codefix | reaction1989/roslyn,gafter/roslyn,brettfo/roslyn,sharwell/roslyn,mavasani/roslyn,jmarolf/roslyn,bartdesmet/roslyn,jmarolf/roslyn,dotnet/roslyn,AlekseyTs/roslyn,mgoertz-msft/roslyn,jasonmalinowski/roslyn,weltkante/roslyn,stephentoub/roslyn,physhi/roslyn,agocke/roslyn,brettfo/roslyn,shyamnamboodiripad/roslyn,agocke/rosly... | src/Features/CSharp/Portable/PassVariableExplicitlyInLocalStaticFunction/PassVariableExplicitlyInLocalStaticFunctionCodeFixProvider.cs | src/Features/CSharp/Portable/PassVariableExplicitlyInLocalStaticFunction/PassVariableExplicitlyInLocalStaticFunctionCodeFixProvider.cs | using System;
using System.Collections.Immutable;
using System.Composition;
using System.Linq;
using System.Threading;
using System.Threading.Tasks;
using Microsoft.CodeAnalysis;
using Microsoft.CodeAnalysis.CodeActions;
using Microsoft.CodeAnalysis.CodeFixes;
using Microsoft.CodeAnalysis.CSharp.GetCapturedVariables;
... | mit | C# | |
28554d7df8b0200679ee2fbb834452494ab34a6b | Add benchmark | ppy/osu-framework,peppy/osu-framework,EVAST9919/osu-framework,EVAST9919/osu-framework,EVAST9919/osu-framework,ZLima12/osu-framework,smoogipooo/osu-framework,peppy/osu-framework,ZLima12/osu-framework,ppy/osu-framework,EVAST9919/osu-framework,peppy/osu-framework,ppy/osu-framework,smoogipooo/osu-framework | osu.Framework.Benchmarks/BenchmarkInterpolation.cs | osu.Framework.Benchmarks/BenchmarkInterpolation.cs | // Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
using BenchmarkDotNet.Attributes;
using osu.Framework.Graphics;
using osu.Framework.Utils;
namespace osu.Framework.Benchmarks
{
public class BenchmarkInterpolation :... | mit | C# | |
5af3eb83efb24c200dd0f92d99d840d983cd8361 | add snippets for the OffsetTime type | nodatime/nodatime,jskeet/nodatime,malcolmr/nodatime,nodatime/nodatime,malcolmr/nodatime,malcolmr/nodatime,jskeet/nodatime,BenJenkinson/nodatime,BenJenkinson/nodatime,malcolmr/nodatime | src/NodaTime.Demo/OffsetTimeDemo.cs | src/NodaTime.Demo/OffsetTimeDemo.cs | // Copyright 2019 The Noda Time Authors. All rights reserved.
// Use of this source code is governed by the Apache License 2.0,
// as found in the LICENSE.txt file.
using NUnit.Framework;
namespace NodaTime.Demo
{
public class OffsetTimeDemo
{
[Test]
public void Construction()
{
... | apache-2.0 | C# | |
d8e062cd5c1fffffe08e605720b50aa9c1051bac | Add account to ExecutionDetailsEventArgs.ToString for logging | Jay-Jay-D/LeanSTP,StefanoRaggi/Lean,jameschch/Lean,redmeros/Lean,JKarathiya/Lean,AlexCatarino/Lean,kaffeebrauer/Lean,QuantConnect/Lean,StefanoRaggi/Lean,jameschch/Lean,kaffeebrauer/Lean,AlexCatarino/Lean,jameschch/Lean,AlexCatarino/Lean,JKarathiya/Lean,StefanoRaggi/Lean,AnshulYADAV007/Lean,JKarathiya/Lean,kaffeebrauer/... | Brokerages/InteractiveBrokers/Client/ExecutionDetailsEventArgs.cs | Brokerages/InteractiveBrokers/Client/ExecutionDetailsEventArgs.cs | /*
* QUANTCONNECT.COM - Democratizing Finance, Empowering Individuals.
* Lean Algorithmic Trading Engine v2.0. Copyright 2014 QuantConnect Corporation.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of ... | /*
* QUANTCONNECT.COM - Democratizing Finance, Empowering Individuals.
* Lean Algorithmic Trading Engine v2.0. Copyright 2014 QuantConnect Corporation.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy o... | apache-2.0 | C# |
5ece35a1bae7fee146490559ab1ec76c2959a0ad | Add examples | aspose-cells/Aspose.Cells-for-.NET,asposecells/Aspose_Cells_NET,aspose-cells/Aspose.Cells-for-.NET,asposecells/Aspose_Cells_NET,maria-shahid-aspose/Aspose.Cells-for-.NET,asposecells/Aspose_Cells_NET,maria-shahid-aspose/Aspose.Cells-for-.NET,aspose-cells/Aspose.Cells-for-.NET,aspose-cells/Aspose.Cells-for-.NET,maria-sha... | Examples/CSharp/Data/AddOn/NamedRanges/SetBorderAroundEachCell.cs | Examples/CSharp/Data/AddOn/NamedRanges/SetBorderAroundEachCell.cs | using System.IO;
using Aspose.Cells;
using System.Drawing;
namespace Aspose.Cells.Examples.Data.AddOn.NamedRanges
{
public class SetBorderAroundEachCell
{
public static void Main(string[] args)
{
//ExStart:1
// The path to the documents directory.
string dat... | mit | C# | |
1b64affaab4d367fd0adbc0bbb0ae50b5db32f9d | add skeleton of controller | mzrimsek/resume-site-api | Web/Controllers/LanguageController.cs | Web/Controllers/LanguageController.cs | using Microsoft.AspNetCore.Mvc;
using Core.Interfaces;
using Web.Mappers.LanguageMappers;
using Web.Models.LanguageModels;
namespace Web.Controllers
{
[Route("api/[controller]")]
public class LanguageController : Controller
{
private readonly ILanguageRepository _languageRepository;
public... | mit | C# | |
f71911ca9c979cbd4d5c63404d62b33c2b262c35 | Create Attacker.cs | InfernumDeus/Csharp-PokemonGO-battle-simulation | source/Attacker.cs | source/Attacker.cs | using System;
namespace battle_simulation
{
public class Attacker
{
public string pokemonName;
public int attack, defense, hp;
public Single cpm;
public string q_move, c_move;
public int q_power, c_power;
public Single q_cd, c_cd;
public Single q_mult, c... | mit | C# | |
00e9f095aeaced2758bca83cefdcd70e3e333811 | make .net examples AST compatible (TODO: fix properly) | concertman/gherkin3,pjlsergeant/gherkin,thetutlage/gherkin3,concertman/gherkin3,thiblahute/gherkin3,dg-ratiodata/gherkin3,Zearin/gherkin3,cucumber/gherkin3,moreirap/gherkin3,araines/gherkin3,araines/gherkin3,pjlsergeant/gherkin,vincent-psarga/gherkin3,araines/gherkin3,hayd/gherkin3,cucumber/gherkin3,dirkrombauts/gherki... | Gherkin/Ast/Examples.cs | Gherkin/Ast/Examples.cs | using System;
using System.Collections.Generic;
using System.Linq;
namespace Gherkin.Ast
{
public class Examples : IHasLocation, IHasDescription, IHasRows, IHasTags
{
public IEnumerable<Tag> Tags { get; private set; }
public Location Location { get; private set; }
public stri... | using System;
using System.Collections.Generic;
using System.Linq;
namespace Gherkin.Ast
{
public class Examples : IHasLocation, IHasDescription, IHasRows, IHasTags
{
public IEnumerable<Tag> Tags { get; private set; }
public Location Location { get; private set; }
public stri... | mit | C# |
4a930f58ef3605558d88a77ec8202d9cbb4c792c | Test RAW commands | tparviainen/oscilloscope | SCPI.Tests/RAW_Tests.cs | SCPI.Tests/RAW_Tests.cs | using System;
using System.Collections.Generic;
using System.Text;
using Xunit;
namespace SCPI.Tests
{
public class RAW_Tests
{
[Fact]
public void WithoutArguments()
{
// Arrange
var raw = new RAW();
var expected = "";
// Act
... | mit | C# | |
2087dd63480e22e9109d00b9cb7591b5d27ebfa7 | Add JWS tests | oocx/acme.net | src/Oocx.ACME.Tests/Jose/JWSTest.cs | src/Oocx.ACME.Tests/Jose/JWSTest.cs | using System.Security.Cryptography;
using Oocx.Asn1PKCS.PKCS1;
using Xunit;
namespace Oocx.ACME.Jose.Tests
{
public class JWSTest
{
[Fact]
public void Ensure_key_authorization_is_correct()
{
var jws = new JWS(GetPrivateKey());
Assert.Equal("token.pdmN_UI10XD6... | mit | C# | |
349a1eef874907fca3c3a3c77b1c1150a9c91ae4 | Add 'Patch' field; refine comparison operators | whampson/bft-spec,whampson/cascara | Cascara/Src/LayoutVersion.cs | Cascara/Src/LayoutVersion.cs | #region License
/* Copyright (c) 2017 Wes Hampson
*
* 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, ... | mit | C# | |
8e898107766607fce99ae45c3179e18ec5f272e8 | Mark assembly as CLS compliant. | rockfordlhotka/csla,ronnymgm/csla-light,BrettJaner/csla,BrettJaner/csla,ronnymgm/csla-light,MarimerLLC/csla,rockfordlhotka/csla,jonnybee/csla,jonnybee/csla,BrettJaner/csla,MarimerLLC/csla,MarimerLLC/csla,ronnymgm/csla-light,rockfordlhotka/csla,JasonBock/csla,jonnybee/csla,JasonBock/csla,JasonBock/csla | csla20cs/Csla/Properties/AssemblyInfo.cs | csla20cs/Csla/Properties/AssemblyInfo.cs | using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("CS... | using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("CS... | mit | C# |
124f8e06f78c6f4c3250ac5fb0c87d142a3d48ee | Make palindrome scaffolding | Gerula/interviews,Gerula/interviews,Gerula/interviews,Gerula/interviews,Gerula/interviews | ProgrammingPraxis/make_palindrome.cs | ProgrammingPraxis/make_palindrome.cs | // http://programmingpraxis.com/2015/09/29/making-a-palindrome/
//
using System;
using System.Linq;
static class Program
{
static Random random = new Random();
static String GenerateString()
{
return new String(Enumerable.Repeat(0, random.Next(10, 30)).
Se... | mit | C# | |
f34cc3e491cceaa75dc2c9e2f3f7e6cbe329016e | Create Entry.cs | ercsoftworks/bracket_generator | Entry.cs | Entry.cs | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace Brackets2012
{
public class Entry
{
public Player player1;
public Player player2;
public bool hasBeenUsed;
public String player1Name
{
get
{
... | mit | C# | |
d095eedd43a09a3f9c5f9bb77451da14c8782dc3 | Test to receive Aseba messages in C# | fi-content2-games-platform/FIcontent.Gaming.Enabler.VisualAgentDesign,fi-content2-games-platform/FIcontent.Gaming.Enabler.VisualAgentDesign,fi-content2-games-platform/FIcontent.Gaming.Enabler.VisualAgentDesign,fi-content2-games-platform/FIcontent.Gaming.Enabler.VisualAgentDesign,fi-content2-games-platform/FIcontent.Gam... | scratch/testsocket.cs | scratch/testsocket.cs | using System;
using System.Net;
using System.Net.Sockets;
using System.Text;
using System.Threading;
public class SynchronousSocketClient {
protected static byte[] ReceiveAll(Socket socket, int count)
{
byte[] buffer = new byte[count];
int done = 0;
int left = count;
while (left > 0)
{
int recvCount =... | mit | C# | |
d0665375912f89c5b20ef695e8cbdb69b0938ba4 | Add extension method to check value is in specified range | tparviainen/oscilloscope | SCPI/Extensions/ValueTypeExtensions.cs | SCPI/Extensions/ValueTypeExtensions.cs | namespace SCPI.Extensions
{
public static class ValueTypeExtensions
{
/// <summary>
/// Checks that the value is within specified range
/// </summary>
/// <param name="value">Value to check</param>
/// <param name="minValue">The inclusive lower bound</param>
/// ... | mit | C# | |
9f1f4ddde5982145564d2cca368ca3bd8b59ef60 | Add a forgotten file | scottmeyer/braintree_dotnet,ronin1/braintree_dotnet,braintree/braintree_dotnet,scottmeyer/braintree_dotnet,scottmeyer/braintree_dotnet,ronin1/braintree_dotnet,braintree/braintree_dotnet,ronin1/braintree_dotnet,scottmeyer/braintree_dotnet | Braintree.Tests/CreditCardNumbers.cs | Braintree.Tests/CreditCardNumbers.cs | namespace Braintree.Tests
{
public class CreditCardNumbers
{
public static readonly string Prepaid = "4111111111111210";
public static readonly string Commercial = "4111111111131010";
public static readonly string Payroll = "4111111114101010";
public static r... | mit | C# | |
f516483d6e4b0a7b2e023b17c0f739807966c208 | Create SerializableTransform.cs | grreuze/Utils | SerializableTransform.cs | SerializableTransform.cs | using UnityEngine;
using System;
[Serializable]
public struct TransformSerial {
public Vector3Serial positionS;
public QuaternionSerial rotationS;
public Vector3Serial localScaleS;
public void Fill(Transform t) {
positionS.Fill(t.position);
rotationS.Fill(t.rotation);
localScal... | mit | C# | |
40bfc304b1fe8ebc66a2800b41aff2bec33c4f73 | Add NoOpLogFactory | anjdreas/PortableLog,anjdreas/PortableLog | Src/PortableLog.Core/NoOpLogFactory.cs | Src/PortableLog.Core/NoOpLogFactory.cs | using System;
namespace PortableLog.Core
{
public class NoOpLogFactory : ILogFactory
{
public ILogEx GetLogger(string loggerName)
{
return new NoOpLoggerEx();
}
public ILogEx GetLogger(Type type)
{
return new NoOpLoggerEx();
}
p... | mit | C# | |
9918df986a56230a8efa9d031ef4cebc0ea60ee8 | Create MovableController.cs | xxmon/unity | Movable/MovableController.cs | Movable/MovableController.cs | using UnityEngine;
using System.Collections;
public class MovableController : MonoBehaviour
{
public GameObject objectToMove;
private bool setOffset = true;
private Vector3 offset;
// Update is called once per frame
void Update ()
{
if (Input.GetMouseButtonDown (0)) {
RaycastHit raycastHit = new RaycastHit... | mit | C# | |
dd08e83bc4c0f6531f8b3ad360eeba93a04a511f | Create basic class representing an API instance. | maxcutler/wp-api-csharp | PortableWordPressApi/WordPressApi.cs | PortableWordPressApi/WordPressApi.cs | using System;
namespace PortableWordPressApi
{
public class WordPressApi
{
public Uri ApiRootUri
{
get;
internal set;
}
}
}
| mit | C# | |
53ddd97f895e40d62f4b3907624daf3cf2dd14b1 | update Program | bitzhuwei/CSharpGL,bitzhuwei/CSharpGL,bitzhuwei/CSharpGL | redbook/RedBook.Winforms.Demo/Program.cs | redbook/RedBook.Winforms.Demo/Program.cs | using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace RedBook.Winforms.Demo
{
static class Program
{
/// <summary>
/// 应用程序的主入口点。
/// </summary>
[STAThread]
static void Main()
{
... | mit | C# | |
4fa0d2ee1462595d4bc105a1a96ea066b43e415a | Add charting for user comments stats | openchargemap/ocm-system,openchargemap/ocm-system,openchargemap/ocm-system,openchargemap/ocm-system | Website/OCM.MVC/Views/Stats/_UserComments.cshtml | Website/OCM.MVC/Views/Stats/_UserComments.cshtml | @model IEnumerable<OCM.API.Common.DataSummary.GeneralStats>
<canvas id="userCommentsChart" width="280" height="200"></canvas>
<script>
//Get the context of the canvas element we want to select
var ctx = document.getElementById("userCommentsChart").getContext("2d");
var data = {
labels: [
... | mit | C# | |
0b307d8f0bde03d08c9a2a11aa5c35f70c256e50 | Add Cláudio Silva Author | planetpowershell/planetpowershell,planetpowershell/planetpowershell,planetpowershell/planetpowershell,planetpowershell/planetpowershell | src/Firehose.Web/Authors/ClaudioSilva.cs | src/Firehose.Web/Authors/ClaudioSilva.cs | using System;
using System.Collections.Generic;
using System.Linq;
using System.ServiceModel.Syndication;
using System.Web;
using Firehose.Web.Infrastructure;
namespace Firehose.Web.Authors
{
public class ClaudioSilva : IAmAMicrosoftMVP
{
public string FirstName => "Cláudio";
public string Last... | mit | C# | |
9ac7f51d2d29128cb98d4394c5ccb48e73f5142c | Create Problem14.cs | neilopet/projecteuler_cs | Problem14.cs | Problem14.cs | /*
* Problem #14
The following iterative sequence is defined for the set of positive integers:
n → n/2 (n is even)
n → 3n + 1 (n is odd)
Using the rule above and starting with 13, we generate the following sequence:
13 → 40 → 20 → 10 → 5 → 16 → 8 → 4 → 2 → 1
It can be seen that this sequence (starting at 13 and fin... | mit | C# | |
24623cfc612fb7999f668f7aae1088f09fc85899 | Create PrizeFundManager.cs | ercsoftworks/bracket_generator | PrizeFundManager.cs | PrizeFundManager.cs | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace Brackets2012
{
class PrizeFundManager
{
public int N; //N Places to be paid (teams/individuals)
public int M; //N-1
public double K; // (N*M)/2
public double moneyUsed; //... | mit | C# | |
fc7fa5f5b4e7ebf40657e954e89a7229034712df | Add Batch class | kawatan/Milk | Megalopolis/Batch.cs | Megalopolis/Batch.cs | using System;
using System.Collections;
using System.Collections.Generic;
namespace Megalopolis
{
public class Batch<T> : ICollection<T>
{
private List<T> itemList = null;
public T this[int i]
{
get
{
return this.itemList[i];
}
... | apache-2.0 | C# | |
04fe7d0834efcbae6c1fc8b442a6f1502164691c | Fix mono problem | sillsdev/libpalaso,gtryus/libpalaso,sillsdev/libpalaso,glasseyes/libpalaso,ermshiperete/libpalaso,andrew-polk/libpalaso,darcywong00/libpalaso,gtryus/libpalaso,chrisvire/libpalaso,andrew-polk/libpalaso,hatton/libpalaso,hatton/libpalaso,JohnThomson/libpalaso,darcywong00/libpalaso,chrisvire/libpalaso,andrew-polk/libpalaso... | SIL.Archiving/Extensions.cs | SIL.Archiving/Extensions.cs | using System;
using System.Text;
using System.Windows.Forms;
namespace SIL.Archiving
{
/// ------------------------------------------------------------------------------------
public static class Extensions
{
/// ------------------------------------------------------------------------------------
/// <summary>... | using System;
using System.Windows.Forms;
namespace SIL.Archiving
{
/// ------------------------------------------------------------------------------------
public static class Extensions
{
/// ------------------------------------------------------------------------------------
/// <summary>
/// Used to size... | mit | C# |
b8c4716f4918e8b73b4a67614a1847c425af58cc | Change the version number from 1.1.0 to 1.2.0 | RachelTucker/ds3_net_sdk,SpectraLogic/ds3_net_sdk,shabtaisharon/ds3_net_sdk,rpmoore/ds3_net_sdk,shabtaisharon/ds3_net_sdk,SpectraLogic/ds3_net_sdk,rpmoore/ds3_net_sdk,rpmoore/ds3_net_sdk,RachelTucker/ds3_net_sdk,SpectraLogic/ds3_net_sdk,shabtaisharon/ds3_net_sdk,RachelTucker/ds3_net_sdk | VersionInfo.cs | VersionInfo.cs | /*
* ******************************************************************************
* Copyright 2014 Spectra Logic Corporation. All Rights Reserved.
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use
* this file except in compliance with the License. A copy of the License is loc... | /*
* ******************************************************************************
* Copyright 2014 Spectra Logic Corporation. All Rights Reserved.
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use
* this file except in compliance with the License. A copy of the License is loc... | apache-2.0 | C# |
5e1f610c9935c1067cebde799922d6355469525f | Add missing Settings file | lucasg/Dependencies,lucasg/Dependencies,lucasg/Dependencies | Dependencies/Settings.cs | Dependencies/Settings.cs | namespace Dependencies.Properties {
// Cette classe vous permet de gérer des événements spécifiques dans la classe de paramètres :
// L'événement SettingChanging est déclenché avant la modification d'une valeur de paramètre.
// L'événement PropertyChanged est déclenché après la modification d'u... | mit | C# | |
7896ace59d3f9ac4ffd27599c2d68ed2941a2dae | Create IProcessingPipeline.cs | electricessence/Solve,electricessence/Solve,electricessence/Solve,electricessence/Solve | Solve/IProcessingPipeline.cs | Solve/IProcessingPipeline.cs | using System.Threading.Tasks.Dataflow;
namespace Solve
{
public interface IProcessingPipeline<TGenome>
: ITargetBlock<GenomeFitness<TGenome>>, ISourceBlock<GenomeFitness<TGenome>>
where TGenome : IGenome
{
GenomeFitness<TGenome> Champion { get; }
}
}
| apache-2.0 | C# | |
f1e32abe21c873ebd1cc616a5dc69fdee3cf70db | Remove unneeded documentation | cmeeren/yarni | src/Yarni/ListenerMiddleware.cs | src/Yarni/ListenerMiddleware.cs | namespace Yarni
{
using System;
/// <summary>
/// Provides a middleware that raises an event when an action is received. The action is passed down the
/// middleware chain before raising the event. Event handlers are provided with the state before the action
/// was passed down.
//... | namespace Yarni
{
using System;
/// <summary>
/// Provides a middleware that raises an event when an action is received. The action is passed down the
/// middleware chain before raising the event. Event handlers are provided with the state before the action
/// was passed down.
//... | mit | C# |
350a8f8fd5911ac97f61305f8f744b36c034103e | Drop command | Reddit-Mud/RMUD,Blecki/RMUD | RMUD/Commands/Drop.cs | RMUD/Commands/Drop.cs | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace RMUD.Commands
{
internal class Drop : CommandFactory
{
public override void Create(CommandParser Parser)
{
Parser.AddCommand(
new Sequence(
new KeyWord("DROP", false),
new ObjectMatcher("TARGET", new... | mit | C# | |
0cb747271bd6b7ab2eb39fca143cc84fd0cbd6eb | Add cake script for components | Azure-Samples/MyDriving,Azure-Samples/MyDriving,Azure-Samples/MyDriving | XamarinApp/build.cake | XamarinApp/build.cake | #addin "Cake.Xamarin"
var username = Argument("XamarinLicenseUser", "");
var password = Argument("XamarinLicensePassword", "");
var TARGET = Argument ("target", Argument ("t", "Default"));
Task ("Default").Does (() =>
{
RestoreComponents ("./MyTrips.sln", new XamarinComponentRestoreSettings
{
Email = username,
... | mit | C# | |
a159ee88413fa0652200c8ecbe5671ba945d4006 | add untracked files | nh43de/ToTypeScriptD,nh43de/cstsd,nh43de/ToTypeScriptD,nh43de/cstsd,nh43de/ToTypeScriptD,nh43de/ToTypeScriptD,nh43de/ToTypeScriptD | src/ToTypeScriptD.Lexical/WinMD/TSOutParameter.cs | src/ToTypeScriptD.Lexical/WinMD/TSOutParameter.cs | //TODO: implement OutParameterReturnTypeWriter
//using System;
//using System.Collections.Generic;
//using System.Linq;
//using System.Reflection;
//using System.Text;
//using ToTypeScriptD.Core.Config;
//using ToTypeScriptD.Core.Extensions;
//using ToTypeScriptD.Lexical.Extensions;
//namespace ToTypeScriptD.Lexic... | mit | C# | |
c5810bf469c7f821e2f05b9f27f937f1eee6367d | Add misssing file from previous checkin | AustinHull/nodejstools,bowdenk7/nodejstools,np83/nodejstools,necroscope/nodejstools,ahmad-farid/nodejstools,hoanhtien/nodejstools,lukedgr/nodejstools,hoanhtien/nodejstools,redabakr/nodejstools,munyirik/nodejstools,kant2002/nodejstools,redabakr/nodejstools,bowdenk7/nodejstools,ahmad-farid/nodejstools,paladique/nodejstoo... | Release/Tests/Common/TestData/NodejsProjectData/ConsoleApplication1/DoubleCrossHierarchy.cs | Release/Tests/Common/TestData/NodejsProjectData/ConsoleApplication1/DoubleCrossHierarchy.cs | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ConsoleApplication1
{
class CrossHierarchyCut
{
}
}
| apache-2.0 | C# | |
7e7f66420c8ea4d217ce21f16c74d055395f4cc5 | add Upgrade_20211128_ES2017 | signumsoftware/framework,signumsoftware/framework | Signum.Upgrade/Upgrades/Upgrade_20211128_ES2017.cs | Signum.Upgrade/Upgrades/Upgrade_20211128_ES2017.cs | namespace Signum.Upgrade.Upgrades;
class Upgrade_20211128_ES2017 : CodeUpgradeBase
{
public override string Description => "Updage tsconfig to target 2017 (async await)";
public override void Execute(UpgradeContext uctx)
{
uctx.ChangeCodeFile(@"Southwind.React\tsconfig.json", file =>
{
... | mit | C# | |
302c69de932630b45511b2f10ffd4c0748609da8 | Add interface ISoundProducible | ivayloivanof/OOP.CSharp,ivayloivanof/OOP.CSharp | 03.InheritanceAndAbstraction/InheritanceAndAbstraction/Animals/Interfaces/ISoundProducible.cs | 03.InheritanceAndAbstraction/InheritanceAndAbstraction/Animals/Interfaces/ISoundProducible.cs | namespace Interfaces
{
interface ISoundProducible
{
void ProduceSound();
}
}
| cc0-1.0 | C# | |
aeb3a0bcc6ff634ff350c78fdde1388023bc8fe0 | Add HttpClient property to the IKubernetes interface (#548) | kubernetes-client/csharp,kubernetes-client/csharp | src/KubernetesClient/IKubernetes.HttpClient.cs | src/KubernetesClient/IKubernetes.HttpClient.cs | using System.Net.Http;
namespace k8s
{
public partial interface IKubernetes
{
/// <summary>
/// Gets the <see cref="HttpClient"/> used for making HTTP requests.
/// </summary>
HttpClient HttpClient { get; }
}
}
| apache-2.0 | C# | |
6dc391966c226dc6c0504f5aa3d3481a889c2796 | Create Program.cs | freeshype/HPRN_CSharp,freeshype/HPRN_CSharp | Program.cs | Program.cs | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Lab3_Prog
{
class Program
{
public static void Main()
{
//Intitialize the number of processes for user input
int num_of_processes = 0;
Consol... | unlicense | C# | |
93afde159d5ff7acb8264c5942b14be4ee9e2b14 | Create formatter.cs | 2105/Cabron | formatter.cs | formatter.cs | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Globalization;
namespace Bvx
{
public class Formatter
{
private static readonly NumberFormatInfo LengthFormat = new NumberFormatInfo() { NumberDecimalSeparator = ".", NumberDecimalDigits = 5 };
... | mit | C# | |
a0235b3829d424edd84810e7b2bcda3f47e9c053 | Add responsive service interface | wangkanai/Detection | src/Services/IResponsiveService.cs | src/Services/IResponsiveService.cs | // Copyright (c) 2014-2020 Sarin Na Wangkanai, All Rights Reserved.
// The Apache v2. See License.txt in the project root for license information.
namespace Wangkanai.Detection.Services
{
public interface IResponsiveService { }
}
| apache-2.0 | C# | |
8fd272b861804b1ec63300cb76bf07981b71e9cd | Add TempFileStream | vbessonov/gzip | GZip/GZip.Core/TempFileStream.cs | GZip/GZip.Core/TempFileStream.cs | using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
namespace VBessonov.GZip.Core
{
public class TempFileStream : FileStream
{
public TempFileStream()
: base(Path.GetTempFileName(), FileMode.Create, FileAccess.ReadWrite, FileShare.Read, 40... | mit | C# | |
2c708a30bc0f5489ced2156826fe81c27a88b523 | Create CameraShake.cs | UnityCommunity/UnityLibrary | Scripts/Camera/CameraShake.cs | Scripts/Camera/CameraShake.cs | using UnityEngine;
using System.Collections;
// usage: attach this script into camera, call Shake() method to start
// source: http://answers.unity3d.com/answers/992509/view.html
public class CameraShake : MonoBehaviour
{
public bool shakePosition;
public bool shakeRotation;
public float shakeIntensityMi... | mit | C# | |
284d53cd168e8f8f6173f56ed98501afb287e810 | Add nthelement-GPLv2.cs | mcraiha/CSharp-nth_element | nthelement-GPLv2.cs | nthelement-GPLv2.cs | /*
This file implements derivate version of nth_element function in C#. Original C implementation (nth_element.c) is from CDO.
CDO is a collection of Operators to manipulate and analyse Climate model Data.
Copyright (C) 2015 Kaarlo Räihä
Copyright (C) 2006 Brockmann Consult
See COPYING file for copying and ... | cc0-1.0 | C# | |
0cd90d0ed9b292f582f22abe13feac416be7a1fc | Create Problem89.cs | fireheadmx/ProjectEuler,fireheadmx/ProjectEuler | Problems/Problem89.cs | Problems/Problem89.cs | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.IO;
namespace ProjectEuler.Problems
{
class Problem89
{
public void Run()
{
int sum = 0;
try
{
using (StreamReader sr = new StreamReader("Inpu... | mit | C# |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.