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 |
|---|---|---|---|---|---|---|---|---|
9ef3534f95963d93c419ab9dba4412fc3500f3aa | Create TestXLookupFunction.cs | antony-liu/npoi | testcases/ooxml/XSSF/TestXLookupFunction.cs | testcases/ooxml/XSSF/TestXLookupFunction.cs | using NPOI.SS.UserModel;
using NPOI.SS.Util;
using NPOI.Util;
using NPOI.XSSF.UserModel;
using NUnit.Framework;
using System;
using System.Collections.Generic;
using System.IO;
using System.Text;
namespace TestCases.XSSF
{
[TestFixture]
public class TestXLookupFunction
{
[Test]
public void... | apache-2.0 | C# | |
d2f19060a9de668dfc3bdb70774f30be1a0f53d7 | Create Obfuscate.cs | TomGullen/C-Email-Obfuscator | Obfuscate.cs | Obfuscate.cs | /// <summary>
/// Obfuscate email address into HTML
/// </summary>
public static string ObfuscateEmailAddress(string email)
{
string reversedEmail;
{
var charArray = email.ToCharArray();
Array.Reverse(charArray);
reversedEmail = new string(charArra... | mit | C# | |
77840b71dbe12103eec916200936a9a7cb58ff6a | Add IFrameBuffer | ppy/osu-framework,peppy/osu-framework,peppy/osu-framework,peppy/osu-framework,ppy/osu-framework,ppy/osu-framework | osu.Framework/Graphics/Rendering/IFrameBuffer.cs | osu.Framework/Graphics/Rendering/IFrameBuffer.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 System;
using osu.Framework.Graphics.Textures;
using osuTK;
namespace osu.Framework.Graphics.Rendering
{
public interface IFrameBuffer : IDisposable
{
... | mit | C# | |
b0f9cb7c64084c7f2368f969ea289105925db6e8 | Create Utilities class | bartlomiejwolk/MoveToCursorPosition | Utilities.cs | Utilities.cs | using System;
using System.Diagnostics;
using System.Reflection;
#if UNITY_EDITOR
using UnityEditor;
#endif
using UnityEngine;
namespace MoveToCursorPositionEx {
public enum InfoType {
Warning,
Error
}
public static class Utilities {
/// <summary>
/// </summary>
... | mit | C# | |
49e509946a0e382b8ccf7dfce1cde5bffb3e3b26 | bump the release to 3.6 | AzureAD/microsoft-authentication-library-for-dotnet,AzureAD/microsoft-authentication-library-for-dotnet,yamamoWorks/azure-activedirectory-library-for-dotnet,AzureAD/azure-activedirectory-library-for-dotnet,bjartebore/azure-activedirectory-library-for-dotnet,AzureAD/microsoft-authentication-library-for-dotnet,AzureAD/mi... | src/ADAL.Common/CommonAssemblyInfo.cs | src/ADAL.Common/CommonAssemblyInfo.cs | //----------------------------------------------------------------------
// Copyright (c) Microsoft Open Technologies, Inc.
// All Rights Reserved
// Apache License 2.0
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may ob... | //----------------------------------------------------------------------
// Copyright (c) Microsoft Open Technologies, Inc.
// All Rights Reserved
// Apache License 2.0
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may ob... | mit | C# |
0270433805b8e53d1688257c1ec914c0ce9e2991 | Add Helpers.RunWpfAsync | aelij/roslynpad | src/RoslynPad.Runtime/Runtime/Helpers.cs | src/RoslynPad.Runtime/Runtime/Helpers.cs | using System;
using System.Linq;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Threading;
using System.Threading.Tasks;
namespace RoslynPad.Runtime
{
public static class Helpers
{
private static readonly Lazy<Task<SynchronizationContext>> _dispatcherTask = new Lazy<Task<... | apache-2.0 | C# | |
5b3d5db1d6c21338583843983f58d65a66cd99c6 | Add WindowTransparencyLevel enum. | Perspex/Perspex,wieslawsoltes/Perspex,jkoritzinsky/Avalonia,SuperJMN/Avalonia,jkoritzinsky/Avalonia,AvaloniaUI/Avalonia,wieslawsoltes/Perspex,jkoritzinsky/Avalonia,AvaloniaUI/Avalonia,wieslawsoltes/Perspex,wieslawsoltes/Perspex,wieslawsoltes/Perspex,jkoritzinsky/Avalonia,akrisiun/Perspex,wieslawsoltes/Perspex,grokys/Pe... | src/Avalonia.Controls/WindowTransparencyLevel.cs | src/Avalonia.Controls/WindowTransparencyLevel.cs | namespace Avalonia.Controls
{
public enum WindowTransparencyLevel
{
/// <summary>
/// The window background is Black where nothing is drawn in the window.
/// </summary>
None,
/// <summary>
/// The window background is Transparent where nothing is drawn in the w... | mit | C# | |
69afa939152ea8d27a7a293406fd7a39cd2b5903 | add missing file. | jonnii/statr,jonnii/statr | src/Statr/Management/Windsor/WindsorDependencyResolver.cs | src/Statr/Management/Windsor/WindsorDependencyResolver.cs | using System;
using System.Collections.Generic;
using System.Linq;
using System.Web.Http.Dependencies;
using Castle.Windsor;
namespace Statr.Management.Windsor
{
public class WindsorDependencyResolver : IDependencyResolver
{
private readonly IWindsorContainer container;
public WindsorDependenc... | apache-2.0 | C# | |
e1f0c0601270705d49ea1041fd5e50c797c7dc7d | Add missing file and other changes. | esskar/Canon.Eos.Framework | Canon.Eos.Framework/Eventing/EosExceptionEventArgs.cs | Canon.Eos.Framework/Eventing/EosExceptionEventArgs.cs | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace Canon.Eos.Framework.Eventing
{
public class EosExceptionEventArgs : EventArgs
{
public Exception Exception { get; internal set; }
}
}
| mit | C# | |
ec904c5496272777a1445488ce78d391cc71643e | Add files via upload | cheshireviolet/boubrnfck | boubrnfck.cs | boubrnfck.cs | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace boubrnfck
{
class boubrnfck
{
int[] _mem;
string _input, _output = "";
int _pointer = 0, _loopStart, _loopEnd, _charCounter = 0;
bool _igno... | mit | C# | |
68f87bdd1ad53a74fb7ed1b7eec49c6f5c38643a | Create oledb.cs | DaSpawn/edge-oledb,DaSpawn/edge-oledb | oledb.cs | oledb.cs | using System;
using System.Data;
using System.Data.OleDb;
using System.Collections.Generic;
using System.Dynamic;
using System.Text;
using System.Threading.Tasks;
public class Startup
{
public async Task<object> Invoke(IDictionary<string, object> parameters)
{
string connectionString = ((string)parame... | mit | C# | |
9add70ba8e7ece37f5be0cc9b60c184714a6c54d | add SourceReader | maul-esel/CobaltAHK,maul-esel/CobaltAHK | CobaltAHK/SourceReader.cs | CobaltAHK/SourceReader.cs | using System;
using System.IO;
namespace CobaltAHK
{
public class SourceReader
{
public SourceReader(TextReader reader)
{
buffer = reader.ReadToEnd().ToCharArray();
}
public char Peek()
{
return index >= buffer.Length ? Lexer.charEOF : buffer[index];
}
public char Read()
{
char ch = Peek()... | mit | C# | |
aaaec81e8b26df3b30f0f3b5314013f95c3079e2 | Add tests for MergeUtils | vbliznikov/colabedit,vbliznikov/colabedit,vbliznikov/colabedit,vbliznikov/colabedit | src/vcs-lib.tests/VersionControl/Operations/TestMergeUtils.cs | src/vcs-lib.tests/VersionControl/Operations/TestMergeUtils.cs | using NUnit.Framework;
namespace CollabEdit.VersionControl.Operations.Tests
{
[TestFixture]
public class TestMergeUtils
{
[TestCase(1, 2, ConflictResolutionOptions.TakeLeft, ExpectedResult = 1)]
[TestCase(1, 2, ConflictResolutionOptions.TakeRight, ExpectedResult = 2)]
public int Te... | mit | C# | |
6b7e4271adbb00d651083351cfcd8bfbcde87266 | Define 'System.Nullable<T>' | jonathanvdc/flame-llvm,jonathanvdc/flame-llvm,jonathanvdc/flame-llvm | stdlib/corlib/Nullable.cs | stdlib/corlib/Nullable.cs | namespace System
{
/// <summary>
/// Represents a value type that can be assigned null.
/// </summary>
public struct Nullable<T> : Object
where T : struct
{
/// <summary>
/// Creates a non-null nullable object from the given value.
/// </summary>
/// <param na... | mit | C# | |
917c28fe6ef9d00278c592d5b4c95e28ec394abe | add physics types | galek/crown,mikymod/crown,galek/crown,mikymod/crown,dbartolini/crown,mikymod/crown,mikymod/crown,galek/crown,galek/crown,dbartolini/crown,taylor001/crown,taylor001/crown,taylor001/crown,taylor001/crown,dbartolini/crown,dbartolini/crown | tools/gui/UnitEditor/UnitEditor/Types.cs | tools/gui/UnitEditor/UnitEditor/Types.cs | using System.Collections.Generic;
namespace UnitEditor
{
//------------------------------------------------------------------------------
public class Renderable
{
public string node;
public string type;
public string resource;
public bool visible;
}
//----------------------------------------------------... | using System.Collections.Generic;
namespace UnitEditor
{
//------------------------------------------------------------------------------
public class Renderable
{
public Renderable(string node, string type, string resource, bool visible)
{
this.node = node;
this.type = type;
this.resource = resource;
this... | mit | C# |
23280788afd622b32b042b1a1c26e62c688b70b7 | Add some manually bound methods | mono-soc-2013/gstreamer-sharp,mono-soc-2013/gstreamer-sharp,mono-soc-2013/gstreamer-sharp | sources/custom/Adapter.cs | sources/custom/Adapter.cs | // Copyright (C) 2013 Stephan Sundermann <stephansundermann@gmail.com>
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as
// published by the Free Software Foundation, either version 3 of the
// License, or (at your option) any ... | agpl-3.0 | C# | |
2bf2f0c25c3d272aa5152ad8ef3243476fb13404 | Update assembly version for NuGet | ubershmekel/MustacheCs,jehugaleahsa/mustache-sharp,nickytonline/mosharp | mustache-sharp/Properties/AssemblyInfo.cs | mustache-sharp/Properties/AssemblyInfo.cs | using System;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
[assembly: AssemblyTitle("mustache-sharp")]
[assembly: AssemblyDescription("A extension of the mustache text template engine for .NET.")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany... | using System;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
[assembly: AssemblyTitle("mustache-sharp")]
[assembly: AssemblyDescription("A extension of the mustache text template engine for .NET.")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany... | mit | C# |
20df1978b6407b60284541ccc3e706559cb93c8d | Add DragPanel.cs | felladrin/unity-scripts,felladrin/unity3d-scripts | DragPanel.cs | DragPanel.cs | using UnityEngine;
using UnityEngine.EventSystems;
// Script available at https://unity3d.com/pt/learn/tutorials/modules/intermediate/live-training-archive/panels-panes-windows
public class DragPanel : MonoBehaviour, IPointerDownHandler, IDragHandler
{
private Vector2 pointerOffset;
private RectTransform canv... | mit | C# | |
cb81a1c660e20ea3bcfe7c4205043cce2eabb633 | Add benchmark for hashing extensions | smoogipooo/osu-framework,peppy/osu-framework,ppy/osu-framework,peppy/osu-framework,smoogipooo/osu-framework,ppy/osu-framework,peppy/osu-framework,ZLima12/osu-framework,ppy/osu-framework,ZLima12/osu-framework | osu.Framework.Benchmarks/BenchmarkHashing.cs | osu.Framework.Benchmarks/BenchmarkHashing.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 System;
using System.IO;
using BenchmarkDotNet.Attributes;
using osu.Framework.Extensions;
namespace osu.Framework.Benchmarks
{
[MemoryDiagnoser]
public c... | mit | C# | |
d688aa685661440ed447d53b57f442a0c4a76f91 | Add Test | robinrodricks/FluentFTP,robinrodricks/FluentFTP,robinrodricks/FluentFTP | FluentFTP.Tests/Unit/ExceptionTests.cs | FluentFTP.Tests/Unit/ExceptionTests.cs | using FluentFTP.Helpers;
using System;
using System.Collections.Generic;
using System.Diagnostics;
using Xunit;
namespace FluentFTP.Tests.Unit {
public class ExceptionTests {
[Fact]
public void FtpCommandException_includes_CompletionCode_in_message() {
Action act = () => throw new FtpCommandException("501", ... | mit | C# | |
c3e1b9df258868de0e8e7907327b6afa5de52c86 | Address minor PR feedback on aCL.id | Rolstenhouse/sarif-sdk,kschecht/sarif-sdk,Rolstenhouse/sarif-sdk,kschecht/sarif-sdk,kschecht/sarif-sdk,kschecht/sarif-sdk,Rolstenhouse/sarif-sdk,Rolstenhouse/sarif-sdk,kschecht/sarif-sdk,Rolstenhouse/sarif-sdk,kschecht/sarif-sdk,Rolstenhouse/sarif-sdk,kschecht/sarif-sdk,Rolstenhouse/sarif-sdk | src/Sarif/Readers/AnnotatedCodeLocationIdConverter.cs | src/Sarif/Readers/AnnotatedCodeLocationIdConverter.cs | // Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
using System;
using System.Globalization;
using Newtonsoft.Json;
namespace Microsoft.CodeAnalysis.Sarif.Readers
{
public class AnnotatedCodeLocationIdConverter : ... | // Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
using System;
using System.Globalization;
using Newtonsoft.Json;
namespace Microsoft.CodeAnalysis.Sarif.Readers
{
public class AnnotatedCodeLocationIdConverter : ... | mit | C# |
2c7f50dbd8cd6f16c8b0e595941db2b532d842cc | Create getCollection.cs | Gytaco/RevitAPI,Gytaco/RevitAPI | Macros/CS/getCollection.cs | Macros/CS/getCollection.cs | /*
This commend accesses wall information directly from the Revit database
It then returns the type information of the wall such as the names and Id's and returns that to a string
*/
//This code requires a reference for the stringbuilder class
using System.Text;
public void Ex2_2get_Collection()
{
//assigns... | mit | C# | |
51416221cac3e31c8022c233fc7ddb4baffc543c | Fix issue with nested actions not being shown. | jamesqo/roslyn,reaction1989/roslyn,DustinCampbell/roslyn,aelij/roslyn,jamesqo/roslyn,genlu/roslyn,robinsedlaczek/roslyn,MichalStrehovsky/roslyn,yeaicc/roslyn,zooba/roslyn,jeffanders/roslyn,tmat/roslyn,davkean/roslyn,sharwell/roslyn,mattscheffer/roslyn,AArnott/roslyn,shyamnamboodiripad/roslyn,agocke/roslyn,heejaechang/r... | src/EditorFeatures/Core/Implementation/Suggestions/SuggestedActionWithNestedActions.cs | src/EditorFeatures/Core/Implementation/Suggestions/SuggestedActionWithNestedActions.cs | // Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using System.Collections.Generic;
using System.Collections.Immutable;
using System.Threading;
using System.Threading.Tasks;
using Microsoft.CodeAnalysis.Code... | // Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using System.Collections.Generic;
using System.Collections.Immutable;
using System.Threading;
using System.Threading.Tasks;
using Microsoft.CodeAnalysis.Code... | mit | C# |
63fc86fe9912627e797ddbe05b5145abdf3833a4 | Add non-generic ConnectionManager that uses the connection factory. bugid: 219 | JasonBock/csla,MarimerLLC/csla,rockfordlhotka/csla,ronnymgm/csla-light,BrettJaner/csla,JasonBock/csla,ronnymgm/csla-light,BrettJaner/csla,ronnymgm/csla-light,rockfordlhotka/csla,MarimerLLC/csla,jonnybee/csla,MarimerLLC/csla,JasonBock/csla,BrettJaner/csla,jonnybee/csla,rockfordlhotka/csla,jonnybee/csla | cslacs/Csla/Data/ConnectionManager.cs | cslacs/Csla/Data/ConnectionManager.cs | using System;
using System.Configuration;
using System.Data;
using System.Data.Common;
using Csla.Properties;
namespace Csla.Data
{
/// <summary>
/// Provides an automated way to reuse open
/// database connections within the context
/// of a single data portal operation.
/// </summary>... | mit | C# | |
6e75ebbb06fb6bf394e257bc44877b3f7171923f | Add interface to handle local beatmap presentation logic | peppy/osu,smoogipoo/osu,NeoAdonis/osu,NeoAdonis/osu,ppy/osu,peppy/osu,UselessToucan/osu,UselessToucan/osu,smoogipooo/osu,ppy/osu,peppy/osu,ppy/osu,smoogipoo/osu,smoogipoo/osu,peppy/osu-new,UselessToucan/osu,NeoAdonis/osu | osu.Game/Screens/IHandlePresentBeatmap.cs | osu.Game/Screens/IHandlePresentBeatmap.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 osu.Game.Beatmaps;
using osu.Game.Rulesets;
namespace osu.Game.Screens
{
/// <summary>
/// Denotes a screen which can handle beatmap / ruleset selection vi... | mit | C# | |
00233e4a8456ef13ce5aaf1af287b35b5a66f4e6 | include generated code | mtian/SiteExtensionGallery,skbkontur/NuGetGallery,skbkontur/NuGetGallery,projectkudu/SiteExtensionGallery,KuduApps/NuGetGallery,skbkontur/NuGetGallery,KuduApps/NuGetGallery,ScottShingler/NuGetGallery,projectkudu/SiteExtensionGallery,mtian/SiteExtensionGallery,KuduApps/NuGetGallery,ScottShingler/NuGetGallery,JetBrains/R... | Website/StatisticsController.generated.cs | Website/StatisticsController.generated.cs | // <auto-generated />
// This file was generated by a T4 template.
// Don't change it directly as your change would get overwritten. Instead, make changes
// to the .tt file (i.e. the T4 template) and save it to regenerate this file.
// Make sure the compiler doesn't complain about missing Xml comments
#pragma warnin... | apache-2.0 | C# | |
e43f5e2c59df818b21c6c277fd282272cd8a335d | add Upgrade_20220311_fixWebpackAssets | signumsoftware/framework,signumsoftware/framework | Signum.Upgrade/Upgrades/Upgrade_20220311_fixWebpackAssets.cs | Signum.Upgrade/Upgrades/Upgrade_20220311_fixWebpackAssets.cs | using Signum.Utilities;
namespace Signum.Upgrade.Upgrades;
class Upgrade_20220311_fixWebpackAssets : CodeUpgradeBase
{
public override string Description => "Replaces fetchLitesWithFilters to fetchLites";
public override void Execute(UpgradeContext uctx)
{
uctx.ChangeCodeFile(@"Southwind.React/we... | mit | C# | |
dfa52e94f3bd2a39b3432976420e8681a293551c | Add an Uri extension to work with Uri scheme. | stackia/SteamFriendsManager | SteamFriendsManager/Utility/UriExtension.cs | SteamFriendsManager/Utility/UriExtension.cs | using System;
using System.Text.RegularExpressions;
using Microsoft.Win32;
namespace SteamFriendsManager.Utility
{
public static class UriExtension
{
public static bool CheckSchemeExistance(this Uri uri)
{
var schemeKey = Registry.ClassesRoot.OpenSubKey(uri.Scheme);
ret... | bsd-3-clause | C# | |
23362d5e604b5f04aebbe4f408c5cfe90a4f66ba | Add prefix module to get or set the current prefix | Daniele122898/SoraBot-v2,Daniele122898/SoraBot-v2 | SoraBot/SoraBot.Bot/Modules/PrefixModule.cs | SoraBot/SoraBot.Bot/Modules/PrefixModule.cs | using System.Threading.Tasks;
using Discord;
using Discord.Commands;
using SoraBot.Common.Extensions.Modules;
using SoraBot.Services.Guilds;
namespace SoraBot.Bot.Modules
{
[Name("Prefix")]
[Summary("Commands to get and set the prefix inside a Guild")]
public class PrefixModule : SoraSocketCommandModule
... | agpl-3.0 | C# | |
ab6801438ac7a0c5e9ba5d2b011286f98529bb37 | Create root entry point for SystemWeb | peterblazejewicz/Glimpse.Prototype,peterblazejewicz/Glimpse.Prototype,peterblazejewicz/Glimpse.Prototype,peterblazejewicz/Glimpse.Prototype,peterblazejewicz/Glimpse.Prototype | src/Glimpse.Common/_SystemWeb/Glimpse.cs | src/Glimpse.Common/_SystemWeb/Glimpse.cs | #if SystemWeb
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.Extensions.DependencyInjection;
namespace Glimpse
{
public static class Glimpse
{
public static IServiceCollection Start()
{
return Start(null);
}
... | mit | C# | |
5c466b86cce0898956f970e163c8aed01703b162 | add ResourcesTracker.cs | shimat/opencvsharp,shimat/opencvsharp,shimat/opencvsharp | src/OpenCvSharp/Util/ResourcesTracker.cs | src/OpenCvSharp/Util/ResourcesTracker.cs | using System;
using System.Collections.Generic;
namespace OpenCvSharp.Util
{
/// <summary>
/// Used for manage the resources of OpenCVSharp, like Mat, MatExpr, etc.
/// </summary>
public class ResourcesTracker : IDisposable
{
private ISet<DisposableObject> trackedObjects = new HashSet<Disp... | apache-2.0 | C# | |
397ca927c5e15950cad5c8f998501a6b6548b228 | Create listImage.cs | fatmagazaile/Projet | listImage.cs | listImage.cs | using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using MvcMeublatexApp.Models;
using System.IO;
namespace MvcMeublatexApp
{
public class ListeImage
{
Models.MeublatexDataEntities a = new MeublatexDataEntities();
public byte[] GetImages(int id)
{
... | apache-2.0 | C# | |
2771360898268b01b80490f5567022962ceaddd4 | Create binary_heap_tree.cs | ZoranPandovski/al-go-rithms,ZoranPandovski/al-go-rithms,ZoranPandovski/al-go-rithms,ZoranPandovski/al-go-rithms,ZoranPandovski/al-go-rithms,ZoranPandovski/al-go-rithms,ZoranPandovski/al-go-rithms,ZoranPandovski/al-go-rithms,ZoranPandovski/al-go-rithms,ZoranPandovski/al-go-rithms,ZoranPandovski/al-go-rithms,ZoranPandovs... | data_structures/heap/C#/binary_heap_tree.cs | data_structures/heap/C#/binary_heap_tree.cs | using System;
// A Binary Tree node
public class Node
{
public int key;
public Node left, right;
public Node(int k)
{
key = k;
left = right = null;
}
}
class Is_BinaryTree_MaxHeap
{
/* This function counts the number
of nodes in a binary tree */
int countNodes(Node roo... | cc0-1.0 | C# | |
cdb36256a6155e93d57f7a6966ca800b015ee252 | Add Q160 | txchen/localleet | csharp/Q160_IntersectionOfTwoLinkedLists.cs | csharp/Q160_IntersectionOfTwoLinkedLists.cs | using System;
using System.Collections.Generic;
using System.Linq;
using Xunit;
// Write a program to find the node at which the intersection of two singly linked lists begins.
//
// For example, the following two linked lists:
//
// A: a1 → a2
// ↘
// c1 → c2 → c3
// ... | mit | C# | |
8518c4be53ab6dcd74d66e4332a99e15f59c5f7f | Create Setting.cs | LanguagePatches/LanguagePatches-Framework | LanguagePatches/LanguagePatches/Setting.cs | LanguagePatches/LanguagePatches/Setting.cs | /**
* Language Patches
* Copyright (C) 2015 Thomas P. (http://kerbalspaceprogram.de), simon56modder
*
* 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 3 of the Lic... | mit | C# | |
f4e66b2d730efea70ae34fa9c9b1fbf0ed470345 | Create MapperProfile.cs | tiksn/TIKSN-Framework | TIKSN.Framework.Core/Data/MapperProfile.cs | TIKSN.Framework.Core/Data/MapperProfile.cs | using System;
using AutoMapper;
using Microsoft.Extensions.DependencyInjection;
namespace TIKSN.Data
{
public class MapperProfile : Profile
{
protected readonly IServiceCollection services;
public MapperProfile(IServiceCollection services)
{
this.services = services ?? thro... | mit | C# | |
c3b73e53552b0a09ad1cafb270d927cbeb1de813 | Add EmailValidate. | App2Night/App2Night.Xamarin | App2Night.Service/Helper/ValidateHelper.cs | App2Night.Service/Helper/ValidateHelper.cs | using System.Text.RegularExpressions;
namespace App2Night.Service.Helper
{
public class ValidateHelper
{
static Regex ValidEmailRegex = CreateValidEmailRegex();
private static Regex CreateValidEmailRegex()
{
string validEmailPattern = @"^(?!\.)(""([^""\r\\]|\\[""\r\\])*""|... | mit | C# | |
8acdadbb5b1bdbab0c337ae36e5c3caab5dcb039 | add isnull | m5knt/ThunderEgg.Extensions | src/ObjectExtension.cs | src/ObjectExtension.cs | /**
* @file
* @brief object の拡張メソッド関係
*/
using System;
using System.Text;
namespace ThunderEgg.Extentions {
/// <summary>object の拡張メソッド関係</summary>
public static class ObjectExtension {
/// <summary>null であるかを返す</summary>
public static bool IsNull<T>(this T @this) where T : class {
... | mit | C# | |
38a03ac8dfbaed63d20a886b60a7296dc7355f74 | Range sum query | Gerula/interviews,Gerula/interviews,Gerula/interviews,Gerula/interviews,Gerula/interviews | LeetCode/remote/range_sum_query_mutable.cs | LeetCode/remote/range_sum_query_mutable.cs | // https://leetcode.com/problems/range-sum-query-mutable/
// https://leetcode.com/submissions/detail/85308737/
public class NumArray {
int[] fenwick;
int[] prevs;
public NumArray(int[] nums) {
fenwick = new int[nums.Length + 1];
prevs = new int[nums.Length];
for (var i = 0; i < n... | mit | C# | |
8daa2fc7ab2e7c73a35aa56057ad12502131d556 | Add basic structure for hex colour picker part | peppy/osu-framework,peppy/osu-framework,ppy/osu-framework,smoogipooo/osu-framework,ppy/osu-framework,ZLima12/osu-framework,ZLima12/osu-framework,peppy/osu-framework,smoogipooo/osu-framework,ppy/osu-framework | osu.Framework/Graphics/UserInterface/HexColourPicker.cs | osu.Framework/Graphics/UserInterface/HexColourPicker.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 osu.Framework.Bindables;
using osu.Framework.Graphics.Containers;
using osu.Framework.Graphics.Shapes;
namespace osu.Framework.Graphics.UserInterface
{
public ... | mit | C# | |
98e8f9a88d174210eb1d93946c56bf5e42c47b14 | Add common assembly info | dnauck/License.Manager-Light,dnauck/License.Manager-Light,dnauck/License.Manager-Light | src/CommonAssemblyInfo.cs | src/CommonAssemblyInfo.cs | using System.Reflection;
[assembly: AssemblyCompanyAttribute("Nauck IT KG")]
[assembly: AssemblyProductAttribute("License Manager Light")]
[assembly: AssemblyCopyrightAttribute("Copyright � 2012 - 2013 Nauck IT KG")]
[assembly: AssemblyVersionAttribute("0.0.0.0")]
[assembly: AssemblyFileVersionAttribute("0.0.0.0")]
[... | mit | C# | |
a528b6f6c4ee097e3dc80ceccb73400224c8d985 | Create Context.cs | hprose/hprose-dotnet | src/Hprose.RPC/Context.cs | src/Hprose.RPC/Context.cs | /*--------------------------------------------------------*\
| |
| hprose |
| |
| Official WebSite: https://hprose.com |
| ... | mit | C# | |
3956151ceeebbecbbb9e2e88224e4cd4519c81c2 | 修正 Bug | yonglehou/Jumony,wukaixian/Jumony,zpzgone/Jumony,yonglehou/Jumony,zpzgone/Jumony,wukaixian/Jumony | Ivony.Html.Web.Mvc/ViewHandlerProvider.cs | Ivony.Html.Web.Mvc/ViewHandlerProvider.cs | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Web;
using System.Web.Compilation;
using System.Web.Hosting;
using System.Web.Mvc;
namespace Ivony.Html.Web
{
/// <summary>
/// 提供视图处理程序
/// </summary>
public static class ViewHandlerProvider
{
... | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Web;
using System.Web.Compilation;
using System.Web.Hosting;
using System.Web.Mvc;
namespace Ivony.Html.Web
{
/// <summary>
/// 提供视图处理程序
/// </summary>
public static class ViewHandlerProvider
{
... | apache-2.0 | C# |
042104839349a3f6fc096201d2a0647c3f60fa60 | add Category.cs | WeihanLi/WeihanLi.Common,WeihanLi/WeihanLi.Common,WeihanLi/WeihanLi.Common | src/WeihanLi.Common/Models/Category.cs | src/WeihanLi.Common/Models/Category.cs | namespace WeihanLi.Common.Models
{
public class Category<TKey>
{
public TKey Id { get; set; }
public string Name { get; set; }
public TKey ParentId { get; set; }
}
public class Category : Category<int>
{
}
public class CategoryWithDesc : Category<int>
{
... | mit | C# | |
acd7ac45b3b0ad89d0364c9e55ea3ceeb0658c4a | change namespace and disable by default SharedLink WebDAV property (fix) | yar229/WebDavMailRuCloud | WebDavMailRuCloudStore/CustomProperties/YarWebDavNamespaces.cs | WebDavMailRuCloudStore/CustomProperties/YarWebDavNamespaces.cs | using System.Xml.Linq;
namespace YaR.Clouds.WebDavStore.CustomProperties
{
public static class YarWebDavNamespaces
{
public static readonly XNamespace YarNs = "urn:schemas-yar-now-im:";
}
} | mit | C# | |
e0960e05be5ef2789367a97a500bb91ef97f195e | Add DocWriter | vzoran/eatogliffy | mddocgen/IO/IDocWriter.cs | mddocgen/IO/IDocWriter.cs | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace MdDocGenerator.IO
{
public interface IDocWriter
{
void WritePackageContent(long itemId, string itemName, string itemString);
void WriteImageReference(long itemId, strin... | mit | C# | |
be8985d46c79d763f6ea939f851aceb819f6adfa | add extension for create stringwebsocket on request websocket | PedDavid/qip,PedDavid/qip,PedDavid/qip | Server/API/WebSockets/StringWebSocketExtensions.cs | Server/API/WebSockets/StringWebSocketExtensions.cs | using Microsoft.AspNetCore.Http;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net.WebSockets;
using System.Threading.Tasks;
namespace API.WebSockets {
public static class StringWebSocketExtensions {
public static async Task<StringWebSocket> AcceptStringWebSocketAsync(thi... | mit | C# | |
348d319f91ca926395a79b57518526473bd1dacb | Create macro.cs | kfpopeye/LinePatternViewerWpfControl | macro.cs | macro.cs | using System;
using Autodesk.Revit.UI;
using Autodesk.Revit.DB;
using Autodesk.Revit.UI.Selection;
using System.Collections.Generic;
using System.Linq;
using System.Collections.ObjectModel;
using System.Diagnostics;
namespace LinePatternMacro
{
[Autodesk.Revit.Attributes.Transaction(Autodesk.Revit.Attributes.Transact... | mit | C# | |
127c16fccdfc0b836b4221e1692a83e232965257 | Implement OverlayTitle component | ppy/osu,smoogipoo/osu,NeoAdonis/osu,smoogipoo/osu,UselessToucan/osu,EVAST9919/osu,peppy/osu,UselessToucan/osu,smoogipooo/osu,ppy/osu,UselessToucan/osu,peppy/osu,peppy/osu,peppy/osu-new,EVAST9919/osu,NeoAdonis/osu,NeoAdonis/osu,smoogipoo/osu,ppy/osu | osu.Game/Overlays/OverlayTitle.cs | osu.Game/Overlays/OverlayTitle.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 osu.Framework.Allocation;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers;
using osu.Framework.Graphics.Sprites;
using osu.Framework.Graphics.... | mit | C# | |
706bb73ef28df8077358652f831ff3a1a7a778e1 | Add SyncResponseReceivedEventArgs | jchristn/WatsonTcp | WatsonTcp/SyncResponseReceivedEventArgs.cs | WatsonTcp/SyncResponseReceivedEventArgs.cs | using System;
using System.Collections.Generic;
using System.Text;
namespace WatsonTcp
{
/// <summary>
/// Internal EventArgs for passing arguments for SyncResponseReceived event.
/// </summary>
internal class SyncResponseReceivedEventArgs
{
public SyncResponseReceivedEventArgs(WatsonMessa... | mit | C# | |
e605615027d2edf8606dbd0db2834bf8b2369d1b | Add new abstract class AVBlock to hold IVNodes, and have common interface with usefull functions | BenVlodgi/VMFParser | VMFParser/AVBlock.cs | VMFParser/AVBlock.cs | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace VMFParser
{
public abstract class AVBlock
{
/// <summary> Contains all sub IVNodes. </summary>
public IList<IVNode> Body { get; protected set; }
/// <summary>... | mit | C# | |
c2d5fd190552e6a2a101c4fba05eb980288a4a21 | Bump version to 3.5.0-beta3 | bcuff/RazorEngine,HongJunRen/RazorEngine,MetSystem/RazorEngine,csantero/RazorEngine,Antaris/RazorEngine,aviatrix/RazorEngine,SharpeRAD/RazorEngine,bcuff/RazorEngine,Antaris/RazorEngine,HongJunRen/RazorEngine,aviatrix/RazorEngine,SharpeRAD/RazorEngine,csantero/RazorEngine,MetSystem/RazorEngine | src/SharedAssemblyInfo.cs | src/SharedAssemblyInfo.cs | // <auto-generated/>
using System.Reflection;
[assembly: AssemblyCompanyAttribute("RazorEngine")]
[assembly: AssemblyProductAttribute("RazorEngine")]
[assembly: AssemblyCopyrightAttribute("Copyright � RazorEngine Project 2011-2014")]
[assembly: AssemblyVersionAttribute("3.5.0.0")]
[assembly: AssemblyFileVersionAttrib... | // <auto-generated/>
using System.Reflection;
[assembly: AssemblyCompanyAttribute("RazorEngine")]
[assembly: AssemblyProductAttribute("RazorEngine")]
[assembly: AssemblyCopyrightAttribute("Copyright � RazorEngine Project 2011-2014")]
[assembly: AssemblyVersionAttribute("3.5.0.0")]
[assembly: AssemblyFileVersionAttrib... | apache-2.0 | C# |
3f96c3dd4c12e3209622ceb84a1e7b78db50a5b5 | Add builderfactory tests | inputfalken/Sharpy | tests/Sharpy.Tests/BuilderFactoryTests.cs | tests/Sharpy.Tests/BuilderFactoryTests.cs | using System;
using System.Collections.Generic;
using System.Text;
using NUnit.Framework;
namespace Sharpy.Tests {
[TestFixture]
internal class BuilderFactoryTests {
[Test]
public void Enumerable_Is_Not_Null() => Assert.IsNotNull(BuilderFactory.Enumerable(b => b, 20));
[Test]
... | mit | C# | |
eeec1f32c6a8396b7714fc7448e56c4d4cc9b3ba | Add very basic TestGetRootPartPosition() test | bravelittlescientist/opensim-performance,TomDataworks/opensim,Michelle-Argus/ArribasimExtract,ft-/arribasim-dev-tests,BogusCurry/arribasim-dev,justinccdev/opensim,RavenB/opensim,rryk/omp-server,ft-/opensim-optimizations-wip,RavenB/opensim,QuillLittlefeather/opensim-1,justinccdev/opensim,bravelittlescientist/opensim-per... | OpenSim/Region/Framework/Scenes/Tests/SceneObjectSpatialTests.cs | OpenSim/Region/Framework/Scenes/Tests/SceneObjectSpatialTests.cs | /*
* Copyright (c) Contributors, http://opensimulator.org/
* See CONTRIBUTORS.TXT for a full list of copyright holders.
*
* 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 r... | bsd-3-clause | C# | |
d170540388ad17a83a9f53b66921bbe0e03d3b2a | test case for PrimitiveParser | rmartinho/boo,wbardzinski/boo,drslump/boo,wbardzinski/boo,Unity-Technologies/boo,KidFashion/boo,KidFashion/boo,boo-lang/boo,hmah/boo,wbardzinski/boo,BitPuffin/boo,KingJiangNet/boo,rmboggs/boo,rmartinho/boo,BITechnologies/boo,wbardzinski/boo,BillHally/boo,BitPuffin/boo,hmah/boo,boo-lang/boo,scottstephens/boo,scottstephe... | tests/Boo.Lang.Parser.Tests/PrimitiveParserTest.cs | tests/Boo.Lang.Parser.Tests/PrimitiveParserTest.cs | using Boo.Lang.Compiler.Ast;
using NUnit.Framework;
namespace Boo.Lang.Parser.Tests
{
[TestFixture]
public class PrimitiveParserTest
{
[Test]
public void LongBoundary()
{
IntegerLiteralExpression expression = PrimitiveParser.ParseIntegerLiteralExpression(new BooToken(), "-9223372036854775808L",... | bsd-3-clause | C# | |
67415e25b54d56c347bdd4bfce08b495c4f788a7 | Improve parsing of issues in release notes | FakeItEasy/FakeItEasy,blairconrad/FakeItEasy,thomaslevesque/FakeItEasy,adamralph/FakeItEasy,adamralph/FakeItEasy,FakeItEasy/FakeItEasy,blairconrad/FakeItEasy,thomaslevesque/FakeItEasy | tools/ReleaseHelpers.cs | tools/ReleaseHelpers.cs | namespace FakeItEasy.Tools
{
using System.Collections.Generic;
using System.Globalization;
using System.Text.RegularExpressions;
using Octokit;
public static class ReleaseHelpers
{
public static ICollection<int> GetIssueNumbersReferencedFromReleases(IEnumerable<Release> release... | namespace FakeItEasy.Tools
{
using System;
using System.Collections.Generic;
using System.Globalization;
using System.Text.RegularExpressions;
using Octokit;
public static class ReleaseHelpers
{
public static ICollection<int> GetIssueNumbersReferencedFromReleases(IEnumerab... | mit | C# |
445ced13d4f655be74047b59ee6f389b40ef16a7 | Create ReferenceImageViewer.cs | UnityCommunity/UnityLibrary | Assets/Scripts/Editor/Tools/ReferenceImageViewer.cs | Assets/Scripts/Editor/Tools/ReferenceImageViewer.cs | // simple image viewer inside unity editor
// use case: to keep reference image visible while working in single monitor
using UnityEngine;
using UnityEditor;
namespace UnityLibrary
{
public class ReferenceImageViewer : EditorWindow
{
Texture2D tex;
bool keepAspectRatio = false;
[MenuI... | mit | C# | |
5f1e193e8950b9db4ad3282c9a148ba2cc7305bf | Create opFicheros.cs | Beelzenef/GestionMenu | ejemplosClase/streaming/opFicheros.cs | ejemplosClase/streaming/opFicheros.cs | using System;
using System.IO;
namespace egb.Ficheritos
{
class Inicio
{
static void Main()
{
string ruta1 = @"/home/usuario/Escritorio";
string ruta2 = @"/home/usuario/Escritorio/fi.txt";
FileInfo fi = new FileInfo (ruta2);
if (Directory.Exists (ruta1)) {
File.Create (ruta1);
File.WriteAll... | mit | C# | |
096a958ce86f45bb694a41f6a884aeacf4475af1 | Attach image to stream | Ziggeo/ZiggeoCSharpSDK,Ziggeo/ZiggeoCSharpSDK | demos/Attach_image_to_Stream.cs | demos/Attach_image_to_Stream.cs | using System;
using System.IO;
using System.Linq;
using System.Collections;
using System.Collections.Generic;
using Newtonsoft.Json.Linq;
using Newtonsoft.Json;
namespace Attach_image
{
public class Attach_Image
{
public static void Main(string[] args)
{
Ziggeo ziggeo = new Ziggeo... | apache-2.0 | C# | |
126d1b0e0b1de5a676c2806dec694a969bf51609 | Create Program.cs | Armdroid/Armdroid-Tools-Windows | ArmdroidTools/ArmTest/Program.cs | ArmdroidTools/ArmTest/Program.cs | using System;
using System.Collections.Generic;
using System.Linq;
using System.Windows.Forms;
namespace ArmdroidTools.ArmTest
{
static class Program
{
/// <summary>
/// The main entry point for the application.
/// </summary>
[STAThread]
static void Main()
{
... | mit | C# | |
b4932f6df6359cf7b1fdc899488f3b3bcb279245 | Add ability to run evaluation tests | terrajobst/nquery-vnext | src/NQuery.Tests/Evaluation/EvaluationTest.cs | src/NQuery.Tests/Evaluation/EvaluationTest.cs | using System;
using Xunit;
namespace NQuery.Tests.Evaluation
{
public class EvaluationTest
{
protected void AssertProduces<T>(string text, T[] expected)
{
var expectedColumns = new[] { typeof(T) };
var expectedRows = new object[expected.Length][];
for (var i... | mit | C# | |
c2b092929e1ffaef4cd88b9a726000b7ded25b03 | Add GetPresignedUrl tests | carbon/Amazon | src/Amazon.S3.Tests/GetPresignedUrlTests.cs | src/Amazon.S3.Tests/GetPresignedUrlTests.cs | using System;
using Xunit;
namespace Amazon.S3.Tests
{
public class GetPresignedUrlTests
{
private static readonly AwsCredential credential = new AwsCredential("test", "test");
[Fact]
public void Get()
{
var date = new DateTime(2000, 01, 01, 00, 00, 0... | mit | C# | |
a3b96ed0fc30ed0add9c05cf43d33a0f12305ae4 | Create Settings.cs | hprose/hprose-dotnet | src/Hprose.RPC/Settings.cs | src/Hprose.RPC/Settings.cs | /*--------------------------------------------------------*\
| |
| hprose |
| |
| Official WebSite: https://hprose.com |
| ... | mit | C# | |
06156c0bf7128c4c242ca101cc171740093f2303 | Work in progress visitor | kiraacorsac/dotvvm,kiraacorsac/dotvvm,kiraacorsac/dotvvm,darilek/dotvvm,riganti/dotvvm,riganti/dotvvm,darilek/dotvvm,riganti/dotvvm,darilek/dotvvm,riganti/dotvvm | src/DotVVM.Framework/Parser/Dothtml/Parser/IDothtmlSyntaxTreeVisitor.cs | src/DotVVM.Framework/Parser/Dothtml/Parser/IDothtmlSyntaxTreeVisitor.cs | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace DotVVM.Framework.Parser.Dothtml.Parser
{
public interface IDothtmlSyntaxTreeVisitor
{
void Visit(DothtmlAttributeNode attribute);
void Visit(DothtmlBindingNode binding)... | apache-2.0 | C# | |
d56fbfaa85b12a31cd1f4c388859f9fd3b9717dd | Add tests | AngleSharp/AngleSharp,AngleSharp/AngleSharp,AngleSharp/AngleSharp,AngleSharp/AngleSharp,AngleSharp/AngleSharp | src/AngleSharp.Core.Tests/Library/XhtmlFormatter.cs | src/AngleSharp.Core.Tests/Library/XhtmlFormatter.cs | using AngleSharp.Xhtml;
using NUnit.Framework;
namespace AngleSharp.Core.Tests.Library
{
[TestFixture]
public class XhtmlFormatter
{
[Test]
public void XhtmlMarkupFormatter_DoesNotFormatEmptyElementsToSelfClosing_WhenEmptyTagsToSelfClosingIsFalse()
{
var formatter = new ... | mit | C# | |
a536bbbe3b647bdd94b6f4c037542bcfa8669301 | Add class | whampson/bft-spec,whampson/cascara | Cascara/Src/Interpreter/SyntaxException.cs | Cascara/Src/Interpreter/SyntaxException.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# | |
9a8d268bb5fcb315abc82554e8f040ac154a97d7 | Define mutex primitives | jonathanvdc/flame-llvm,jonathanvdc/flame-llvm,jonathanvdc/flame-llvm | stdlib/primitives/Threading/MutexPrimitives.cs | stdlib/primitives/Threading/MutexPrimitives.cs | using System.Primitives.InteropServices;
using pthread_mutex_t = void;
using pthread_mutexattr_t = void;
namespace System.Primitives.Threading
{
/// <summary>
/// A handle to a mutex.
/// </summary>
public struct MutexHandle
{
/// <summary>
/// Checks if this is a null handle, i.e.... | mit | C# | |
cb9674fe929d55ada6040d3b0a5fb483160a34be | Normalize path variable name between Map middleware and extension methods. | abrodersen/katana,PxAndy/Katana,abrodersen/katana,evicertia/Katana,HongJunRen/katanaproject,julianpaulozzi/katanaproject,monkeysquare/katana,HongJunRen/katanaproject,evicertia/Katana,eocampo/KatanaProject301,tomi85/Microsoft.Owin,monkeysquare/katana,evicertia/Katana,julianpaulozzi/katanaproject,eocampo/KatanaProject301... | src/Microsoft.Owin/Mapping/MapExtensions.cs | src/Microsoft.Owin/Mapping/MapExtensions.cs | // <copyright file="MapExtensions.cs" company="Microsoft Open Technologies, Inc.">
// Copyright 2011-2013 Microsoft Open Technologies, 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... | // <copyright file="MapExtensions.cs" company="Microsoft Open Technologies, Inc.">
// Copyright 2011-2013 Microsoft Open Technologies, 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... | apache-2.0 | C# |
23f6308026db811b8c490b66a7d57ec8656853f5 | add in console version | mono/tao,OpenRA/tao,OpenRA/tao,mono/tao | examples/SdlExamples/SdlExamplesConsole.cs | examples/SdlExamples/SdlExamplesConsole.cs | using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Reflection;
using System.IO;
namespace SdlExamples
{
class SdlExamplesConsole
{
public SdlExamplesConsole()
{
Initialize();
}... | mit | C# | |
90b32ea14824804783f3b9563e079a94ff57f338 | add mailkitprovider extensions | myloveCc/NETCore.MailKit,myloveCc/NETCore.MailKit,myloveCc/NETCore.MailKit | src/NETCore.MailKit/Extensions/MailKitProviderExtension.cs | src/NETCore.MailKit/Extensions/MailKitProviderExtension.cs | using System;
using System.Collections.Generic;
using System.Text;
namespace NETCore.MailKit.Extensions
{
class MailKitProviderExtension
{
}
}
| mit | C# | |
378a5120c86d506468a170ad3bd6bdd55061c948 | Add C# version | delight-im/ShortURL,delight-im/ShortURL,delight-im/ShortURL,delight-im/ShortURL,delight-im/ShortURL,delight-im/ShortURL,delight-im/ShortURL,delight-im/ShortURL,delight-im/ShortURL,delight-im/ShortURL,delight-im/ShortURL | C#/ShortURL.cs | C#/ShortURL.cs | /*
* ShortURL (https://github.com/delight-im/ShortURL)
* Copyright (c) delight.im (https://www.delight.im/)
* Licensed under the MIT License (https://opensource.org/licenses/MIT)
*/
using System.Linq;
using System.Text;
/**
* ShortURL: Bijective conversion between natural numbers (IDs) and short strings
*
* Sh... | mit | C# | |
219d960babe5a61b1184781277d8d86049a0c588 | Create Question.cs | mdlthree/uFLOPS | CS/Question.cs | CS/Question.cs | using System;
namespace uFLOPS_Desktop
{
public class Question
{
private static Random randomObj = new Random();
private int _First;
private int _Second;
private int _Answer;
private string _QuestionText;
private int _Attempt;
private bool _IsCorrect;
... | unlicense | C# | |
82faafe32fdf11c5005ecd6d90f3d4ad025c4741 | Add Example | wirunekaewjai/unity-fsm | FSM/Example.cs | FSM/Example.cs | using UnityEngine;
using Devdayo;
using System;
public class Example : MonoBehaviour
{
Fsm fsm;
void Start ()
{
fsm = new Fsm(this);
fsm.Go<StateOne>();
}
}
public class StateOne : FsmState
{
public override void OnSubscribe()
{
base.OnSubscribe();
Subscribe<Upda... | mit | C# | |
e5bcc1d15a98990584fdda3c5fa73d55c0abe2c4 | Create Query.cs | lbargaoanu/AutoMapper,michaelkauflin/AutoMapper,sh-sabooni/AutoMapper,GeertVL/AutoMapper,AutoMapper/AutoMapper,gentledepp/AutoMapper,briangweber/AutoMapper,seanlin816/AutoMapper,CandidoCleyton/AutoMapper,mwpowellhtx/MicroMapper,jnm2/AutoMapper,AutoMapper/AutoMapper,dparra0007/AutoMapper,jbogard/AutoMapper,jasonholloway... | src/AutoMapperSamples/Mappers/Query.cs | src/AutoMapperSamples/Mappers/Query.cs | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using AutoMapper;
using AutoMapper.QueryableExtensions;
using NUnit.Framework;
using Should;
namespace AutoMapperSamples.Mappers
{
namespace Query
{
[TestFixture]
public class Sim... | mit | C# | |
7febd421d9b2b9b23cd4a29528f97a46ea5b1389 | add DynamicMethodExecutor | JeffreySu/WeiXinMPSDK,JeffreySu/WeiXinMPSDK,wanddy/WeiXinMPSDK,mc7246/WeiXinMPSDK,lishewen/WeiXinMPSDK,jiehanlin/WeiXinMPSDK,down4u/WeiXinMPSDK,lishewen/WeiXinMPSDK,down4u/WeiXinMPSDK,wanddy/WeiXinMPSDK,down4u/WeiXinMPSDK,wanddy/WeiXinMPSDK,jiehanlin/WeiXinMPSDK,JeffreySu/WeiXinMPSDK,lishewen/WeiXinMPSDK,jiehanlin/WeiX... | src/Senparc.Weixin/Senparc.Weixin/Helpers/Methods/DynamicMethodExecutor.cs | src/Senparc.Weixin/Senparc.Weixin/Helpers/Methods/DynamicMethodExecutor.cs | #region Apache License Version 2.0
/*----------------------------------------------------------------
Copyright 2017 Jeffrey Su & Suzhou Senparc Network Technology Co.,Ltd.
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 ... | apache-2.0 | C# | |
e77a187a84bfacc691498d2e1a00b62b53b35627 | Create Lawl.cs | MathiasGarnier/Algorithms-All,MathiasGarnier/Algorithms-All,MathiasGarnier/Algorithms-All | Lawl.cs | Lawl.cs | using System;
namespace TestCS {
class MainClass {
public static void Main (string[] args) {
Neuro rep = (circonstance) new Neuro(Brain().rep(rep.LOGIQUE, rep.FONDE));
}
}
}
| apache-2.0 | C# | |
123b7abe40a797740fd0235d2ce0bb627a7c6697 | change Container to FillFlowContainer | Nabile-Rahmani/osu-framework,ppy/osu-framework,naoey/osu-framework,default0/osu-framework,DrabWeb/osu-framework,peppy/osu-framework,default0/osu-framework,DrabWeb/osu-framework,paparony03/osu-framework,ZLima12/osu-framework,EVAST9919/osu-framework,smoogipooo/osu-framework,EVAST9919/osu-framework,peppy/osu-framework,Tom... | osu.Framework/Graphics/Containers/SearchContainer.cs | osu.Framework/Graphics/Containers/SearchContainer.cs | // Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu-framework/master/LICENCE
using System;
using System.Collections.Generic;
using System.Linq;
namespace osu.Framework.Graphics.Containers
{
public class SearchContainer : ... | // Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu-framework/master/LICENCE
using System;
using System.Collections.Generic;
using System.Linq;
namespace osu.Framework.Graphics.Containers
{
public class SearchContainer : ... | mit | C# |
e26d8e24b4fa78f69d1c291b42fe3a54c6670570 | Add IconUtilities to WPF UI | Deadpikle/NetSparkle,Deadpikle/NetSparkle | src/NetSparkle.UI.WPF/IconUtilities.cs | src/NetSparkle.UI.WPF/IconUtilities.cs | using System;
using System.Collections.Generic;
using System.Drawing;
using System.Text;
using System.Windows;
using System.Windows.Interop;
using System.Windows.Media;
using System.Windows.Media.Imaging;
namespace NetSparkle.UI.WPF
{
public class IconUtilities
{
/// <summary>
/// Convert Syst... | mit | C# | |
67cb8a0e1178e00197725cb7d7a2214841358cfb | Add IConnection to Connections.Abstractions (#2444) | aspnet/AspNetCore,aspnet/AspNetCore,aspnet/AspNetCore,aspnet/AspNetCore,aspnet/AspNetCore,aspnet/AspNetCore,aspnet/AspNetCore,aspnet/AspNetCore,aspnet/AspNetCore | src/Connections.Abstractions/IConnection.cs | src/Connections.Abstractions/IConnection.cs | using System.Collections.Generic;
using System.IO.Pipelines;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Http.Features;
namespace Microsoft.AspNetCore.Connections
{
public interface IConnection
{
IDuplexPipe Transport { get; }
IFeatureCollection Features { get; }
Task Star... | apache-2.0 | C# | |
c0d8c45d8e52d9eef4b93a01aeeb0f2d92fb5d4e | create sample for supplying custom connections (#66) | googleapis/dotnet-spanner-nhibernate,googleapis/dotnet-spanner-nhibernate | Google.Cloud.Spanner.NHibernate.Samples/Snippets/ConnectionProviderSample.cs | Google.Cloud.Spanner.NHibernate.Samples/Snippets/ConnectionProviderSample.cs | // Copyright 2022 Google 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 by applica... | apache-2.0 | C# | |
d6e02784f204d784ca1e9d06e7c566ea6df765ce | Create RomanNumerals.cs | fireheadmx/ProjectEuler,fireheadmx/ProjectEuler | RomanNumerals.cs | RomanNumerals.cs | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace ProjectEuler
{
static class RomanNumerals
{
public static string DecToRom(int number)
{
List<int> dec = new List<int> { 1000, 900, 500, 400, 100, 90, 50, 40, 10, 9, 5, 4, 1 };
... | mit | C# | |
bde18f19f3b3ce945e08f82690b080a86387acab | Add authoriation scopes | stoiveyp/Alexa.NET.Management | Alexa.NET.Management/AuthorizationScopes.cs | Alexa.NET.Management/AuthorizationScopes.cs | namespace Alexa.NET.Management
{
public static class AuthorizationScopes
{
public const string ReadSkills = "alexa::ask:skills:read";
public const string ReadWriteSkills = "alexa::ask:skills:readwrite";
public const string ReadModels = "alexa::ask:models:read";
public const stri... | mit | C# | |
795919aee0b4b08195c002f3069492160e7c4b38 | Add Android callback classes | one-signal/OneSignal-Xamarin-SDK,one-signal/OneSignal-Xamarin-SDK | Com.OneSignal.Android/OneSignalCallbacks.cs | Com.OneSignal.Android/OneSignalCallbacks.cs | using System;
using System.Collections.Generic;
using System.Runtime.CompilerServices;
using System.Threading.Tasks;
using Com.OneSignal.Core;
using OneSignalNative = Com.OneSignal.Android.OneSignal;
using Org.Json;
using Laters;
namespace Com.OneSignal {
public partial class OneSignalImplementation {
... | mit | C# | |
fe9f7706b8368819c847571655127b8224eec042 | Create Edit.cshtml - add the page to edit a stat | NinjaVault/NinjaHive,NinjaVault/NinjaHive | NinjaHive.WebApp/Views/Stats/Edit.cshtml | NinjaHive.WebApp/Views/Stats/Edit.cshtml | @{
ViewBag.Title = "Edit";
}
<h2>Edit</h2>
| apache-2.0 | C# | |
eb024939ec72fc2e5bdd18d71ffbc5a2bb0c3f8a | Add nthelement-PD.cs | mcraiha/CSharp-nth_element | nthelement-PD.cs | nthelement-PD.cs | /*
This file implements derivate version of nth_element function in C#. Original Java source code is made by
Adam Horvath and you can find it from
http://blog.teamleadnet.com/2012/07/quick-select-algorithm-find-kth-element.html
This is free and unencumbered software released into the public domain.
*/
// N... | cc0-1.0 | C# | |
4ae6c93f942dcf2d27986570ab85e8bc62a6dc40 | Add mouse tint debug component | Thraka/SadConsole | SadConsole.Extended/Components/MouseTint.cs | SadConsole.Extended/Components/MouseTint.cs | using System;
using System.Collections.Generic;
using System.Text;
using SadConsole.Input;
using SadRogue.Primitives;
namespace SadConsole.Components
{
/// <summary>
/// Tints a surface when that surface would use the mouse. Helps debug which object is receiving mouse input as you move the mouse around.
/... | mit | C# | |
f1b6fb744d499aa79d7b9e4fa46e432f1cbc4634 | Add Hello.cs | theDrake/csharp-experiments | Hello.cs | Hello.cs | class HelloWorld
{
static void Main()
{
System.Console.WriteLine("Hello world!");
}
}
| mit | C# | |
321a04108b7bf6766344c4ef0042e8aec49da969 | Add IOManager | stoyanov7/SoftwareUniversity,stoyanov7/SoftwareUniversity,stoyanov7/SoftwareUniversity,stoyanov7/SoftwareUniversity | C#Development/BashSoft/BashSoft/IO/IOManager.cs | C#Development/BashSoft/BashSoft/IO/IOManager.cs | namespace BashSoft.IO
{
using System.Collections.Generic;
using System.IO;
public static class IOManager
{
public static void TraverseDirectory(string path)
{
OutputWriter.WriteEmptyLine();
var initialIdentation = path
.Split('\\')
... | mit | C# | |
92bbbf0dc6673d50fd78322c2562f75ef8eea752 | Add utils class which holds temporary linking info between user-device. | marcuson/A2BBServer,marcuson/A2BBServer,marcuson/A2BBServer | A2BBAPI/Utils/LinkHolder.cs | A2BBAPI/Utils/LinkHolder.cs | using A2BBAPI.Models;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
namespace A2BBAPI.Utils
{
/// <summary>
/// Class holding info for device linking.
/// </summary>
public class LinkHolder
{
#region Public properties
/// <summary>... | apache-2.0 | C# | |
3797cbda66863331dc79c02500fee8a75498ba08 | Create Collision.cs | thakyZ/myFirstXNAGame,thakyZ/Glow-Pong | myFirstXNAGame/myFirstXNAGame/Collision.cs | myFirstXNAGame/myFirstXNAGame/Collision.cs | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework;
namespace myFirstXNAGame
{
public class Collision
{
public struct MapSegment
{
public Point p1;
public Point p2;
public MapSegment(Point a, P... | unknown | C# | |
8a640e3b7377b525fd74bb969c87f3b3d026876d | fix merge issue - add Infrastructure AssemblyInfo | QubizSolutions/mvc5-ng2-material2,QubizSolutions/mvc5-ng2-material2,QubizSolutions/mvc5-ng2-material2,QubizSolutions/mvc5-ng2-material2 | src/Infrastructure/Properties/AssemblyInfo.cs | src/Infrastructure/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("In... | mit | C# | |
2b45f74b2c6d45ea5f5f744ecc5345884ec5e09c | Create DibToBitmap.cs | SolidEdgeCommunity/SolidEdge.Community.Reader | src/SolidEdge.Community.Reader/DibToBitmap.cs | src/SolidEdge.Community.Reader/DibToBitmap.cs | using System;
using System.Collections.Generic;
using System.Drawing;
using System.IO;
using System.Linq;
using System.Reflection;
using System.Runtime.InteropServices;
using System.Runtime.InteropServices.ComTypes;
using System.Text;
using System.Drawing.Imaging;
namespace SolidEdgeCommunity.Reader
{
public class... | mit | C# | |
1431537d4aee772ba4bb1bae03928235d2f10b4d | Create GetRandomStringFromArray.cs | felladrin/unity-scripts,felladrin/unity3d-scripts | GetRandomStringFromArray.cs | GetRandomStringFromArray.cs | static string GetRandomStringFromArray (string[] array)
{
return array[new Random().Next (0, array.Length)];
}
| mit | C# | |
4709fcecdd118cf1323f8ec5089f6512d52b9bac | Add Oid struct | ektrah/nsec | src/Cryptography/Oid.cs | src/Cryptography/Oid.cs | using System;
namespace NSec.Cryptography
{
internal struct Oid
{
private readonly byte[] _bytes;
public Oid(
int first,
int second,
params int[] rest)
{
int length = GetLength(first * 40 + second);
for (int i = 0; i < rest.Le... | mit | C# | |
494d7e47b0a06dee818796b740b9e97fa307d06d | Create TypeSwitch.cs | strvmarv/Extensions | TypeSwitch.cs | TypeSwitch.cs | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace Extensions
{
public static class TypeSwitch
{
public static CaseInfo Case<T>(Action action)
{
return new CaseInfo()
{
Action = x => action(),
T... | mit | C# | |
ebbdd205595ebd19a060f256df075fb7a7a32d3f | Add glyph rendering tests | zwcloud/ImGui,zwcloud/ImGui,zwcloud/ImGui | test/TextRenderingTest/GlyphRenderingFacts.cs | test/TextRenderingTest/GlyphRenderingFacts.cs | using ImGui;
using ImGui.Rendering;
using ImGui.Style;
using ImGui.OSAbstraction.Text;
using ImGui.Development;
using System;
using System.Diagnostics;
using Xunit;
using Typography.OpenFont;
using System.IO;
using System.Linq;
namespace TextRenderingTest
{
public class GlyphRenderingFacts
{
public Gl... | agpl-3.0 | C# | |
8da25ce3a3d42da2cb93520d88d58df69b552964 | Create ApiDefinition.cs | dariasu/MobilogicsBinding | ApiDefinition.cs | ApiDefinition.cs | using MonoTouch.Foundation;
using MonoTouch.ExternalAccessory;
namespace MobilogicBinding
{
[Preserve]
[BaseType (typeof (NSObject))]
[Model]
public interface ReceiveCommandProtocol {
[Export ("isHandle:")]
NSObject IsHandle (NSObject data);
[Export ("handle:")]
void C... | mit | C# | |
7c1a98bbe938cd2d683dabd16b68cf26d21f22fb | Add test for Firebird | sqlkata/querybuilder | QueryBuilder.Tests/FirebirdLimitTest.cs | QueryBuilder.Tests/FirebirdLimitTest.cs | using SqlKata;
using SqlKata.Compilers;
using Xunit;
public class FirebirdLimitTest
{
private FirebirdCompiler compiler = new FirebirdCompiler();
[Fact]
public void NoLimitNorOffset()
{
var query = new Query("Table");
var ctx = new SqlResult { Query = query };
Assert.Null(comp... | mit | C# | |
b70d4cba6ea44839800c3627b1070eb062db16c4 | Create GetRandomEnum.cs | felladrin/unity3d-scripts,felladrin/unity-scripts | GetRandomEnum.cs | GetRandomEnum.cs | static T GetRandomEnum<T>()
{
System.Array arr = System.Enum.GetValues(typeof(T));
T randomEnum = (T)arr.GetValue(UnityEngine.Random.Range(0, arr.Length));
return randomEnum;
}
| mit | C# | |
752a6ee8f1ba92e5fbe32b984fd878f33d77462f | Add chunking tests to make sure all platforms work well in CI (#2975) | Microsoft/vsts-agent,Microsoft/vsts-agent,Microsoft/vsts-agent,Microsoft/vsts-agent | src/Test/L0/Plugin/ChunkerTests.cs | src/Test/L0/Plugin/ChunkerTests.cs | // Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
using System;
using BuildXL.Cache.ContentStore.Hashing;
using BuildXL.Cache.ContentStore.Interfaces.Utils;
using Xunit;
namespace Microsoft.VisualStudio.Services.Agent.Tests
{
public class ChunkerTests
{
[Theory]
[Inlin... | mit | C# |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.