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 |
|---|---|---|---|---|---|---|---|---|
1f249bbc0f13d6347db92dec9fb96d45f93ee2c3 | Create Controls_Player_Seek_Waypoint.cs | Tech-Curriculums/101-GameDesign-2D-GameDesign-With-Unity | AngryHipsters/Controls_Player_Seek_Waypoint.cs | AngryHipsters/Controls_Player_Seek_Waypoint.cs | /**
This is a common control scheme where you click to bring a player to a point.
*/
using UnityEngine;
using System.Collections;
public class Controls : MonoBehaviour {
public float speed = 1F;
Vector2 differenceVector, touchPositionTarget;
void Start() {
touchPositionTarget.x = transform.position.x;
touch... | mit | C# | |
bd70ee85d3bc14e91c5206b19b72dcc04d05a01c | include code behind | ngalin/Illumimateys,ngalin/Illumimateys | Kinect/ShadowWall/Recording/PointCloud.xaml.cs | Kinect/ShadowWall/Recording/PointCloud.xaml.cs | using Microsoft.Kinect;
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;
... | mit | C# | |
9f6418f080edd23f626215ec35ae1c6ef5273681 | Add missing file | jlewin/MatterControl,jlewin/MatterControl,larsbrubaker/MatterControl,larsbrubaker/MatterControl,larsbrubaker/MatterControl,larsbrubaker/MatterControl,jlewin/MatterControl,jlewin/MatterControl | MatterControlLib/SlicerConfiguration/UIFields/SliceEngineField.cs | MatterControlLib/SlicerConfiguration/UIFields/SliceEngineField.cs | /*
Copyright (c) 2019, Lars Brubaker, John Lewin
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice, this
list of conditions and... | bsd-2-clause | C# | |
384734e8fb60203a1fff27c1591d3031e68e1a1d | Add constant time functions and functions for generating random bytes | ektrah/nsec | src/Experimental/CryptographicUtilities.cs | src/Experimental/CryptographicUtilities.cs | using System;
using System.Runtime.CompilerServices;
namespace NSec.Experimental
{
public static class CryptographicUtilities
{
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static void FillRandomBytes(Span<byte> data)
{
System.Security.Cryptography.RandomNumberG... | mit | C# | |
061c86fb026ed25a5f7cb32243731321bac5f2c8 | Add unit tests | dsbenghe/Novell.Directory.Ldap.NETStandard,dsbenghe/Novell.Directory.Ldap.NETStandard | test/Novell.Directory.Ldap.NETStandard.UnitTests/StringExtensionTests.cs | test/Novell.Directory.Ldap.NETStandard.UnitTests/StringExtensionTests.cs | using Novell.Directory.Ldap.Utilclass;
using System;
using System.Collections.Generic;
using Xunit;
namespace Novell.Directory.Ldap.NETStandard.UnitTests
{
public class StringExtensionTests
{
[Theory]
[MemberData(nameof(DataSuccess))]
public void StartsWithStringAtOffset_Success(string... | mit | C# | |
e74f9024836b56b4485d724d867fa1f71ea0a5b6 | Add playfield test scene | peppy/osu,smoogipooo/osu,peppy/osu-new,peppy/osu,UselessToucan/osu,NeoAdonis/osu,ppy/osu,smoogipoo/osu,ppy/osu,smoogipoo/osu,UselessToucan/osu,UselessToucan/osu,smoogipoo/osu,ppy/osu,peppy/osu,NeoAdonis/osu,NeoAdonis/osu | osu.Game.Rulesets.Taiko.Tests/Skinning/TestSceneTaikoPlayfield.cs | osu.Game.Rulesets.Taiko.Tests/Skinning/TestSceneTaikoPlayfield.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.Game.Beatmaps.ControlPoints;
using osu.Game.Rulesets.Taiko.UI;
using osu.Game.Rulesets.UI.Scrollin... | mit | C# | |
4b0a5b9bb455ecc32adf39c44b0963a43e8909e3 | add test | existall/Shepherd | src/tests/ExistsForAll.Shepherd.SimpleInjector.UnitTests/CollectionRegistrationBehaviorTests.cs | src/tests/ExistsForAll.Shepherd.SimpleInjector.UnitTests/CollectionRegistrationBehaviorTests.cs | using System;
using ExistsForAll.Shepherd.SimpleInjector.RegistrationActions;
using Xunit;
using static ExistsForAll.Shepherd.SimpleInjector.UnitTests.TestUtils;
namespace ExistsForAll.Shepherd.SimpleInjector.UnitTests
{
public class CollectionRegistrationBehaviorTests
{
[Fact]
public void ShouldRegist... | mit | C# | |
1d71fc032b9e28ffdcf34e829583f232517fcbd2 | add CacheItemPolicy for backwards compat | alastairtree/LazyCache,alastairtree/LazyCache | LazyCache/CacheItemPolicy.cs | LazyCache/CacheItemPolicy.cs | using System;
using System.Linq;
using Microsoft.Extensions.Caching.Memory;
namespace LazyCache
{
[Obsolete(
"CacheItemPolicy was part of System.Runtime.Caching which is no longer used by LazyCache. " +
"This class is a fake used to maintain backward compatibility and will be removed in a ... | mit | C# | |
7898ba4ad8bf6ffdd23a5f359f5ea49d9dc4338a | Add new configuration for ServiceContainer | phaetto/serviceable-objects | Examples/TestHttpCompositionConsoleApp/ConfigurationSources/ServiceContainerConfigurationSource.cs | Examples/TestHttpCompositionConsoleApp/ConfigurationSources/ServiceContainerConfigurationSource.cs | namespace TestHttpCompositionConsoleApp.ConfigurationSources
{
using System;
using Newtonsoft.Json;
using Serviceable.Objects.Composition.Graph;
using Serviceable.Objects.Composition.Graph.Stages.Configuration;
using Serviceable.Objects.Composition.Service;
using Serviceable.Objects.IO.NamedPip... | mit | C# | |
ee2cc1c2126a0aa147bdc412f053929d83401426 | Add AssignmentMinFlow.cs | or-tools/or-tools,google/or-tools,google/or-tools,google/or-tools,or-tools/or-tools,or-tools/or-tools,google/or-tools,or-tools/or-tools,google/or-tools,google/or-tools,or-tools/or-tools,or-tools/or-tools | ortools/graph/samples/AssignmentMinFlow.cs | ortools/graph/samples/AssignmentMinFlow.cs | // Copyright 2010-2021 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
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in... | apache-2.0 | C# | |
424462cc0cc61a17c75a83c57abb85763ceeb85d | Split operator draft. | Kostassoid/Nerve,Kostassoid/Nerve | src/main/Nerve-Core/Linking/Operators/SplitOperator.cs | src/main/Nerve-Core/Linking/Operators/SplitOperator.cs | // Copyright 2014 https://github.com/Kostassoid/Nerve
//
// 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... | apache-2.0 | C# | |
70c0d315ee5a614c081c6a37edf970fd39db9c25 | Add GenericShallowCopy utility to support MemberwiseClone() into an existing object. | zhukaixy/open3mod,zhukaixy/open3mod,dayo7116/open3mod,acgessler/open3mod,acgessler/open3mod,dayo7116/open3mod | open3mod/GenericShallowCopy.cs | open3mod/GenericShallowCopy.cs | using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Reflection;
using System.Runtime.Serialization;
using System.Text;
namespace open3mod
{
// Adapted from http://csharptest.net/372/how-to-implement-a-generic-shallow-clone-for-an-object-in-c/.
class Generi... | bsd-3-clause | C# | |
f85d8af6288cd3f4c83a0e45dd17e17cc64b09c5 | Add skeleton class | fvanroie/PS_OPNsense | Classes/Relayd.cs | Classes/Relayd.cs | using System;
using System.Management.Automation;
namespace OPNsense.Rlayd {
public class Host {
#region Parameters
#endregion Parameters
public Host () {
}
public Host (
) {
}
}
}
namespace OPNsense.Rlayd {
public class Protocol {
#region Parameters
#endregion Parameters
public Protocol ()... | mit | C# | |
812a75fd50ed8f751f3b596a0a96ce29d0975b3d | Create EnumExtensions.cs | strvmarv/Extensions | EnumExtensions.cs | EnumExtensions.cs | using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Reflection;
using System.Text;
namespace Extensions
{
public static class EnumExtensions
{
public static string GetDescription(this Enum value)
{
Type type = value.GetType();... | mit | C# | |
9edc37dd22dc35093f747ea71334ecae684e4168 | Simplify code. | vslsnap/roslyn,eriawan/roslyn,abock/roslyn,akrisiun/roslyn,jmarolf/roslyn,AdamSpeight2008/roslyn-AdamSpeight2008,ljw1004/roslyn,tvand7093/roslyn,AmadeusW/roslyn,nguerrera/roslyn,jkotas/roslyn,lorcanmooney/roslyn,heejaechang/roslyn,tvand7093/roslyn,heejaechang/roslyn,KevinRansom/roslyn,bkoelman/roslyn,AmadeusW/roslyn,xo... | src/EditorFeatures/Core/Implementation/FindReferences/DefinitionLocation.NonNavigatingDefinitionLocation.cs | src/EditorFeatures/Core/Implementation/FindReferences/DefinitionLocation.NonNavigatingDefinitionLocation.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.Immutable;
namespace Microsoft.CodeAnalysis.Editor.Implementation.FindReferences
{
internal partial class DefinitionLocation
... | // 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.Immutable;
namespace Microsoft.CodeAnalysis.Editor.Implementation.FindReferences
{
internal partial class DefinitionLocation
... | apache-2.0 | C# |
b2adc82a0549fb0e677b5e85311f12b10bb2c2a8 | Add a class to perform basic vector operations (addition, subtraction, scaling) for the optimization needs. | geoem/MSolve,geoem/MSolve | ISAAR.MSolve.Analyzers/Optimization/Commons/VectorOperations.cs | ISAAR.MSolve.Analyzers/Optimization/Commons/VectorOperations.cs | using System;
namespace ISAAR.MSolve.Analyzers.Optimization.Commons
{
public static class VectorOperations
{
public static double[] Add(double[] v1, double[] v2)
{
CheckDimensions(v1, v2);
double[] result = new double[v1.Length];
for (int i = 0; i < v1.Le... | apache-2.0 | C# | |
da940fb7f8cae1806fbddb0c03f6aded1696948f | Create DNSflush.cs | bkief/DNSFlusher | DNSflush.cs | DNSflush.cs | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Runtime.InteropServices;
namespace DNSFlusher
{
class DNSFlush
{
[DllImport("dnsapi.dll",EntryPoint="DnsFlushResolverCache")]
private static extern UInt32 DnsFlushRes... | mit | C# | |
de91a0daa4f50bbc6aca8f651e3d8b59a6e20f7f | Create Problem6.cs | neilopet/projecteuler_cs | Problem6.cs | Problem6.cs | /*
* Problem #6
* The sum of the squares of the first ten natural numbers is,
* 1^2 + 2^2 + ... + 10^2 = 385
* The square of the sum of the first ten natural numbers is,
* (1 + 2 + ... + 10)^2 = 55^2 = 3025
* Hence the difference between the sum of the squares of the first ten natural numbers and the square of th... | mit | C# | |
601a0a4b2822cd877129b835af594a49ada2ba0d | Add interface for common properties | lukecahill/NutritionTracker | food_tracker/IListItems.cs | food_tracker/IListItems.cs | namespace food_tracker {
public interface IListItems {
double calories { get; set; }
double amount { get; set; }
double fats { get; set; }
double saturatedFat { get; set; }
double carbohydrates { get; set; }
double sugar { get; set; }
double protein { get; se... | mit | C# | |
08bf1eb01ba88d3054c6ba7ce9b4bf9a5d601996 | Create Log.cs | wieslawsoltes/Draw2D,wieslawsoltes/Draw2D,wieslawsoltes/Draw2D | src/Draw2D/Log.cs | src/Draw2D/Log.cs | // Copyright (c) Wiesław Šoltés. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
using System;
namespace Draw2D
{
public static class Log
{
public static void WriteLine(string message)
{
Console.WriteLine(me... | mit | C# | |
065cc9f83584cb1f3e38324fd6fd5bd1cdb0712c | Update Use.cs | wieslawsoltes/Draw2D,wieslawsoltes/Draw2D,wieslawsoltes/Draw2D | svg/Svg.Skia/Elements/Use.cs | svg/Svg.Skia/Elements/Use.cs | // Copyright (c) Wiesław Šoltés. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
//
// Parts of this source file are adapted from the https://github.com/vvvv/SVG
using System;
using System.Reflection;
using SkiaSharp;
using Svg;
namespace Svg.... | // Copyright (c) Wiesław Šoltés. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
//
// Parts of this source file are adapted from the https://github.com/vvvv/SVG
using SkiaSharp;
using Svg;
namespace Svg.Skia
{
internal struct Use
{
... | mit | C# |
990c0ebd6009e192145c60343cda24a91d73af0f | add ResponseTF.cs | ferventdesert/Hawk,zsewqsc/Hawk | Hawk.ETL/Plugins/Transformers/ResponseTF.cs | Hawk.ETL/Plugins/Transformers/ResponseTF.cs | using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Net;
using System.Text.RegularExpressions;
using System.Threading;
using System.Windows.Controls.WpfPropertyGrid.Attributes;
using Hawk.Core.Connectors;
using Hawk.Core.Utils;
using Hawk.Core.Utils.Plugins;
using Hawk.ETL.Cr... | apache-2.0 | C# | |
3eaebfef265db9ee2e737c5e814a4bcc416eb34b | fix namespace | MetacoSA/NBitcoin,bitcoinbrisbane/NBitcoin,stratisproject/NStratis,you21979/NBitcoin,dangershony/NStratis,HermanSchoenfeld/NBitcoin,NicolasDorier/NBitcoin,lontivero/NBitcoin,thepunctuatedhorizon/BrickCoinAlpha.0.0.1,MetacoSA/NBitcoin | NBitcoin/Protocol/Payloads/RejectPayload.cs | NBitcoin/Protocol/Payloads/RejectPayload.cs | using NBitcoin.DataEncoders;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace NBitcoin.Protocol
{
public enum RejectCode : byte
{
Malformed = 0x01,
Invalid = 0x10,
Obsolete = 0x11,
Duplicate = 0x12,
NonStandard = 0... | using NBitcoin.DataEncoders;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace NBitcoin.Protocol.Payloads
{
public enum RejectCode : byte
{
Malformed = 0x01,
Invalid = 0x10,
Obsolete = 0x11,
Duplicate = 0x12,
NonSta... | mit | C# |
ed1d50222ee2f0932ed35f50c3f99cb001264434 | Add DocumentDb configuration | kotorihq/kotori-core | KotoriCore/Configuration/DocumentDb.cs | KotoriCore/Configuration/DocumentDb.cs | namespace KotoriCore.Configuration
{
/// <summary>
/// Document Db connection string.
/// </summary>
public class DocumentDb
{
/// <summary>
/// Gets or sets the end point.
/// </summary>
/// <value>The end point.</value>
public string EndPoint { get; set; }
... | mit | C# | |
b3139fe4eed37407967c0a039c6f50ba2ddb3f46 | Adjust size of disable-able widget | jlewin/MatterControl,tellingmachine/MatterControl,CodeMangler/MatterControl,ddpruitt/MatterControl,ddpruitt/MatterControl,larsbrubaker/MatterControl,larsbrubaker/MatterControl,larsbrubaker/MatterControl,MatterHackers/MatterControl,tellingmachine/MatterControl,rytz/MatterControl,ddpruitt/MatterControl,unlimitedbacon/Mat... | CustomWidgets/DisableableWidget.cs | CustomWidgets/DisableableWidget.cs | using MatterHackers.Agg;
using MatterHackers.Agg.UI;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace MatterHackers.MatterControl.CustomWidgets
{
public class DisableableWidget : GuiWidget
{
public GuiWidget disableOverlay;
public DisableableWid... | using MatterHackers.Agg;
using MatterHackers.Agg.UI;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace MatterHackers.MatterControl.CustomWidgets
{
public class DisableableWidget : GuiWidget
{
public GuiWidget disableOverlay;
public DisableableWid... | bsd-2-clause | C# |
9882c808042b77126a93c97e5d4f3b7ea39e3738 | Add test for helper equality comparer too | EamonNerbonne/ValueUtils,EamonNerbonne/ValueUtils,EamonNerbonne/ValueUtils | ValueUtilsTest/FieldwiseEqualityComparerTest.cs | ValueUtilsTest/FieldwiseEqualityComparerTest.cs | using System.Collections.Generic;
using ExpressionToCodeLib;
using ValueUtils;
using Xunit;
namespace ValueUtilsTest
{
public sealed class FieldwiseEqualityComparerTest
{
static readonly IEqualityComparer<SampleStruct> eqStruct = FieldwiseEqualityComparer<SampleStruct>.Instance;
stat... | apache-2.0 | C# | |
1e5114cd7b200fa4d17085f19ea3c875b4da0852 | Add PrimaryScheduleName config option | vbfox/Opserver,wuanunet/Opserver,IDisposable/Opserver,Janiels/Opserver,Janiels/Opserver,GABeech/Opserver,GABeech/Opserver,a9261/Opserver,volkd/Opserver,maurobennici/Opserver,hotrannam/Opserver,mqbk/Opserver,18098924759/Opserver,maurobennici/Opserver,jeddytier4/Opserver,hotrannam/Opserver,manesiotise/Opserver,opserver/O... | Opserver.Core/Settings/PagerDutySettings.cs | Opserver.Core/Settings/PagerDutySettings.cs | using System.Collections.Generic;
namespace StackExchange.Opserver
{
public class PagerDutySettings : Settings<PagerDutySettings>
{
public override bool Enabled
{
get { return APIKey.HasValue(); }
}
public string APIKey { get; set; }
public string APIBaseU... | using System.Collections.Generic;
namespace StackExchange.Opserver
{
public class PagerDutySettings : Settings<PagerDutySettings>
{
public override bool Enabled
{
get { return APIKey.HasValue(); }
}
public string APIKey { get; set; }
public string APIBaseU... | mit | C# |
457766740dc15c67a800fb143b8bb377f3b5894f | Add extension to handle MPMediaItem | mike-rowley/XamarinMediaManager,mike-rowley/XamarinMediaManager,martijn00/XamarinMediaManager,martijn00/XamarinMediaManager | MediaManager/Platforms/Ios/Media/MPMediaItemExtensions.cs | MediaManager/Platforms/Ios/Media/MPMediaItemExtensions.cs | using System;
using System.Collections.Generic;
using System.Linq;
using CoreGraphics;
using MediaManager.Library;
using MediaPlayer;
namespace MediaManager.Platforms.Ios.Media
{
public static class MPMediaItemExtensions
{
public static IMediaItem ToMediaItem(this MPMediaItem item)
{
... | mit | C# | |
822f3a6788755a3accd82277b51c81b325b90613 | create future branch which bases on SuperSocket 1.5 | wangzheng888520/SuperWebSocket,v-rawang/SuperWebSocket,jmptrader/SuperWebSocket,wangzheng888520/SuperWebSocket,zhangwei900808/SuperWebSocket,jmptrader/SuperWebSocket,v-rawang/SuperWebSocket,v-rawang/SuperWebSocket,jogibear9988/SuperWebSocket,zhangwei900808/SuperWebSocket,jogibear9988/SuperWebSocket,kerryjiang/SuperWebS... | future/SuperWebSocket/Extensions.cs | future/SuperWebSocket/Extensions.cs | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace SuperWebSocket
{
public static partial class Extensions
{
private readonly static char[] m_CrCf;
static Extensions()
{
m_CrCf = "\r\n".ToArray();
}
... | apache-2.0 | C# | |
5149e3bdad0f09446abc8d8184631e0f4a759366 | Add TeamUpdateService with events and not yet finished TeamUpdate handler. | Midnight-Myth/Mitternacht-NEW,Midnight-Myth/Mitternacht-NEW,Midnight-Myth/Mitternacht-NEW,Midnight-Myth/Mitternacht-NEW | src/NadekoBot/Modules/Forum/Services/TeamUpdateService.cs | src/NadekoBot/Modules/Forum/Services/TeamUpdateService.cs | using Discord.WebSocket;
using GommeHDnetForumAPI.DataModels;
using GommeHDnetForumAPI.DataModels.Collections;
using GommeHDnetForumAPI.DataModels.Entities;
using Mitternacht.Services;
using Mitternacht.Services.Impl;
using System;
using System.Linq;
using System.Threading.Tasks;
namespace Mitternacht.Modules.Forum.S... | mit | C# | |
ab59ee7ba9ceec96330bb5d92d858e5fe86954bc | Create Reverse.cs | SurgicalSteel/Competitive-Programming,SurgicalSteel/Competitive-Programming,SurgicalSteel/Competitive-Programming,SurgicalSteel/Competitive-Programming,SurgicalSteel/Competitive-Programming | Kattis-Solutions/Reverse.cs | Kattis-Solutions/Reverse.cs | using System;
namespace Reverse
{
class Program
{
static void Main(string[] args)
{
int n = int.Parse(Console.ReadLine());
int[] arr = new int[n];
for(int i = 0; i < n; i++) { arr[i] = int.Parse(Console.ReadLine()); }
for(int i = n - 1; i >= 0; i-... | mit | C# | |
ff224b1577001c444fd6431eec42b31514f715f1 | Solve Average 1 in c# | deniscostadsc/playground,deniscostadsc/playground,deniscostadsc/playground,deniscostadsc/playground,deniscostadsc/playground,deniscostadsc/playground,deniscostadsc/playground,deniscostadsc/playground,deniscostadsc/playground,deniscostadsc/playground,deniscostadsc/playground,deniscostadsc/playground,deniscostadsc/playgr... | solutions/uri/1005/1005.cs | solutions/uri/1005/1005.cs | using System;
using System.Collections.Generic;
class Solution {
static void Main() {
double a, b;
string val;
val = Console.ReadLine();
a = Convert.ToDouble(val);
val = Console.ReadLine();
b = Convert.ToDouble(val);
Console.Write(
"MEDIA = {0:F... | mit | C# | |
84551162dcf9c8c37a0f0b0bcd2ac1e90cb8b271 | Create Problem120.cs | fireheadmx/ProjectEuler,fireheadmx/ProjectEuler | Problems/Problem120.cs | Problems/Problem120.cs | using System;
using System.Numerics;
namespace ProjectEuler.Problems
{
class Problem120
{
private int r(int a, int n)
{
// ( (a-1)^n + (a+1)^n ) % a*a
// = ( ((a-1)^n) % a*a + ((a+1)^n) % a*a ) % a*a
int sq_a = a * a;
return ((int)BigInteger.ModPo... | mit | C# | |
bab5ca7821a907c4613833d4f7cb975915db1ac5 | add tests for OptionExtensions | OlegKleyman/AlphaDev,OlegKleyman/AlphaDev,OlegKleyman/AlphaDev | tests/unit/AlphaDev.Core.Tests.Unit/Extensions/OptionExtensionTests.cs | tests/unit/AlphaDev.Core.Tests.Unit/Extensions/OptionExtensionTests.cs | using AlphaDev.Core.Extensions;
using FluentAssertions;
using Optional;
using Xunit;
namespace AlphaDev.Core.Tests.Unit.Extensions
{
public class OptionExtensionTests
{
[Theory]
[InlineData(true, true)]
[InlineData(false, false)]
public void MapToActionOnSingleValuedOptionWithN... | unlicense | C# | |
0b01bce34d7cedd2ea50ada3038e9a33c7549ac6 | Add DirectiveTests | Carbon/Css | src/Carbon.Css.Tests/DirectiveTests.cs | src/Carbon.Css.Tests/DirectiveTests.cs | using Xunit;
namespace Carbon.Css.Tests
{
public class DirectiveTests
{
[Fact]
public void ParsePartial()
{
var sheet = StyleSheet.Parse(@"
//= partial
div { color: blue; }
"); // Prevents standalone compilation
Assert.Equal("div { col... | mit | C# | |
c970db8640e4320ae860785abb3617dba42b7671 | Create MyFunctions.cs | Excel-DNA/IntelliSense | CustomAddin/MyFunctions.cs | CustomAddin/MyFunctions.cs | using System;
using ExcelDna.Integration;
namespace ExcelDna.CustomAddin
{
public class MyFunctions
{
[ExcelFunction(Description = "A useful test function that multiply two numbers, and returns the product.")]
public static double MultiplyThem(
[ExcelArgument(Name = "Augend", Descri... | mit | C# | |
cfe2e378af6484b2889b4648bca6c02ac054ee28 | Update NUnit runner. | Redth/Cake.FileHelpers,Redth/Cake.FileHelpers | build.cake | build.cake | #tool nuget:?package=NUnit.Runners&version=3.6.0
var sln = "./Cake.FileHelpers.sln";
var nuspec = "./Cake.FileHelpers.nuspec";
var version = Argument ("version", "1.0.0.0");
var target = Argument ("target", "lib");
var configuration = Argument("configuration", "Release");
Task ("lib").Does (() =>
{
NuGetRestore (sln... | #tool nuget:?package=NUnit.Runners&version=2.6.4
var sln = "./Cake.FileHelpers.sln";
var nuspec = "./Cake.FileHelpers.nuspec";
var version = Argument ("version", "1.0.0.0");
var target = Argument ("target", "lib");
var configuration = Argument("configuration", "Release");
Task ("lib").Does (() =>
{
NuGetRestore (sln... | apache-2.0 | C# |
09e7048803df43c3f5f210e79f0989f8bc22a6bd | Fix #5 | uheerme/core,uheerme/core,uheerme/core | Samesound.Services/MusicService.cs | Samesound.Services/MusicService.cs | using Samesound.Core;
using Samesound.Data;
using Samesound.Services.Infrastructure;
using System.Collections.Generic;
using System.Data.Entity;
using System.Linq;
using System.Threading.Tasks;
namespace Samesound.Services
{
public class MusicService : Service<Music>
{
public MusicService(SamesoundCon... | mit | C# | |
cb4f760205dbcc878e35ec6595bde5ce6c3057a2 | change command line name of IISFtpInstaller | Lone-Coder/letsencrypt-win-simple | letsencrypt-win-simple/Plugins/InstallationPlugins/IISFtpInstaller.cs | letsencrypt-win-simple/Plugins/InstallationPlugins/IISFtpInstaller.cs | using PKISharp.WACS.Clients;
using PKISharp.WACS.Plugins.Base;
using PKISharp.WACS.Plugins.Interfaces;
using PKISharp.WACS.Services;
using System;
using static PKISharp.WACS.Clients.IISClient;
namespace PKISharp.WACS.Plugins.InstallationPlugins
{
class IISFtpInstallerFactory : BaseInstallationPluginFactory<IISFtp... | apache-2.0 | C# | |
b343a1a0145bf7e81c797a31c53ad490aff3f451 | Add missing file | Ninputer/VBF | src/Compilers/Compilers.Parsers.Combinators/ConvertHelper.cs | src/Compilers/Compilers.Parsers.Combinators/ConvertHelper.cs | using System;
using System.Collections.Generic;
using System.Linq;
using System.Linq.Expressions;
using System.Text;
namespace VBF.Compilers.Parsers.Combinators
{
class ConvertHelper<TFrom, TTo>
{
private static Func<TFrom, TTo> s_CastFunc;
static ConvertHelper()
{
var sou... | apache-2.0 | C# | |
4737fcd53fb6a863a234fc1a9befabc141352f68 | Add comments | shyamnamboodiripad/roslyn,gafter/roslyn,stephentoub/roslyn,mgoertz-msft/roslyn,mavasani/roslyn,CyrusNajmabadi/roslyn,heejaechang/roslyn,KirillOsenkov/roslyn,shyamnamboodiripad/roslyn,shyamnamboodiripad/roslyn,AmadeusW/roslyn,weltkante/roslyn,physhi/roslyn,KevinRansom/roslyn,KirillOsenkov/roslyn,stephentoub/roslyn,ErikS... | src/Features/Core/Portable/Diagnostics/IDiagnosticService.cs | src/Features/Core/Portable/Diagnostics/IDiagnosticService.cs | // Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
using System;
using System.Collections.Immutable;
using System.Threading;
namespace Microsoft.CodeAnalysis.Diagnos... | // Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
using System;
using System.Collections.Immutable;
using System.Threading;
namespace Microsoft.CodeAnalysis.Diagnos... | mit | C# |
7ea5d9faad7382f7538f7618e51484afc1da091a | Add IRulesContainer | peasy/Peasy.NET,ahanusa/Peasy.NET,ahanusa/facile.net | src/Peasy/Peasy/IRulesContainer.cs | src/Peasy/Peasy/IRulesContainer.cs | using System.Collections.Generic;
namespace Peasy
{
public interface IRulesContainer
{
List<IRule[]> Rules { get; }
}
}
| mit | C# | |
04b7a8b0c19bf1d63ee3bb9ee842f61d0c56c0b5 | Add UT | AvaloniaUI/Avalonia,AvaloniaUI/Avalonia,AvaloniaUI/Avalonia,AvaloniaUI/Avalonia,AvaloniaUI/Avalonia,AvaloniaUI/Avalonia,AvaloniaUI/Avalonia | tests/Avalonia.Markup.Xaml.UnitTests/SetterTests.cs | tests/Avalonia.Markup.Xaml.UnitTests/SetterTests.cs | using System.Linq;
using Avalonia.Data;
using Avalonia.Styling;
using Avalonia.UnitTests;
using Xunit;
namespace Avalonia.Markup.Xaml.UnitTests
{
public class SetterTests : XamlTestBase
{
[Fact]
public void Setter_Should_Work_Outside_Of_Style_With_SetterTargetType_Attribute()
{
... | mit | C# | |
768fecb4cf6975cc99ba0a23bad0dabf6f3f3383 | Add various System.Drawing.Rectangle extensions | Xeeynamo/KingdomHearts | OpenKh.Common/RectangleExtensions.cs | OpenKh.Common/RectangleExtensions.cs | using System;
using System.Drawing;
namespace OpenKh.Common
{
public static class RectangleExtensions
{
public static Rectangle FlipX(this Rectangle rectangle) =>
Rectangle.FromLTRB(rectangle.Right, rectangle.Top, rectangle.Left, rectangle.Bottom);
public static Rectangle FlipY(th... | mit | C# | |
834542894d31764ccdfb91253f4dd92856bae130 | Add field id tests. | StephenClearyApps/DotNetApis,StephenClearyApps/DotNetApis,StephenClearyApps/DotNetApis,StephenClearyApps/DotNetApis | service/DotNetApis.Cecil.UnitTests/IdFieldTests.cs | service/DotNetApis.Cecil.UnitTests/IdFieldTests.cs | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Xunit;
using static Utility;
namespace DotNetApis.Cecil.UnitTests
{
public class IdFieldTests
{
[Fact]
public void Basic_InTopLevelType()
{
var code = @... | mit | C# | |
75293af818c9d1a56c6ee5877839214ea63b5e52 | Mark Program as static as brough to my attention by @zippy1981 | mengruxing/audio-switcher,davkean/audio-switcher,paulcbetts/audio-switcher | src/AudioSwitcher/Program.cs | src/AudioSwitcher/Program.cs | // -----------------------------------------------------------------------
// Copyright (c) David Kean.
// -----------------------------------------------------------------------
using System;
using System.ComponentModel.Composition.Hosting;
using System.Reflection;
using AudioSwitcher.ApplicationModel;
namespace Aud... | // -----------------------------------------------------------------------
// Copyright (c) David Kean.
// -----------------------------------------------------------------------
using System;
using System.ComponentModel.Composition.Hosting;
using System.Reflection;
using AudioSwitcher.ApplicationModel;
namespace Aud... | mit | C# |
c3b11da2a6ac9f9851a96cfd2da4eb817f7a6412 | Add big-endian converter | mstrother/BmpListener | src/BmpListener/BigEndian.cs | src/BmpListener/BigEndian.cs | using System;
namespace BmpListener
{
public static class BigEndian
{
public static short ToInt16(ArraySegment<byte> data, int offset)
{
offset += data.Offset;
return (short)((data.Array[offset++] << 8) | (data.Array[offset++]));
}
public static ushort ... | mit | C# | |
692187e0cbb463c49fb975f087a7ad85b60a954b | Add Color | praeclarum/Ooui,praeclarum/Ooui,praeclarum/Ooui | Ooui/Color.cs | Ooui/Color.cs | using System;
namespace Ooui
{
public struct Color
{
public byte R, G, B, A;
public double Red {
get => R / 255.0;
set => R = value >= 1.0 ? (byte)255 : ((value <= 0.0) ? (byte)0 : (byte)(value * 255.0 + 0.5));
}
public double Green {
get => ... | mit | C# | |
1a053480f7b03dc75e42a8547aa322b990685e01 | Add Upsert | rapidcore/rapidcore,rapidcore/rapidcore | src/google-cloud/test-functional/Datastore/DatastoreConnection/UpsertTests.cs | src/google-cloud/test-functional/Datastore/DatastoreConnection/UpsertTests.cs | using Xunit;
namespace functionaltests.Datastore.DatastoreConnection
{
public class UpsertTests : DatastoreConnectionTestBase
{
[Fact]
public async void Upsert_without_kind()
{
EnsureEmptyKind("TheUpserter");
var poco = new TheUpserter
{... | mit | C# | |
e46ad49a2a00b82d0bf37f21cd62aac709d8b15d | Add DiplomContextExtensions to Seed data | denismaster/dcs,denismaster/dcs,denismaster/dcs,denismaster/dcs | src/Diploms.DataLayer/DiplomContextExtensions.cs | src/Diploms.DataLayer/DiplomContextExtensions.cs | using System.Linq;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Migrations;
using Diploms.Core;
namespace Diploms.DataLayer
{
public static class DiplomContentSystemExtensions
{
public static void EnsureSeedData(this DiplomContext context)
{
... | mit | C# | |
954b76415dd9c061defd72500e5615fea3636fef | Add a simple debug query | RonnChyran/snowflake,RonnChyran/snowflake,SnowflakePowered/snowflake,RonnChyran/snowflake,SnowflakePowered/snowflake,SnowflakePowered/snowflake | src/Snowflake.Support.GraphQLFrameworkQueries/Queries/Debug/EchoQueries.cs | src/Snowflake.Support.GraphQLFrameworkQueries/Queries/Debug/EchoQueries.cs | using HotChocolate.Types;
using System;
using System.Collections.Generic;
using System.Text;
namespace Snowflake.Support.GraphQLFrameworkQueries.Queries.Debug
{
public class EchoQueries
: ObjectTypeExtension
{
protected override void Configure(IObjectTypeDescriptor descriptor)
{
... | mpl-2.0 | C# | |
96db24f548d5c2da73ab733f79035a9c2a7b33c3 | add framework characterization tests | maxhauser/semver | Semver.Test/FrameworkCharacterizationTests.cs | Semver.Test/FrameworkCharacterizationTests.cs | using System;
using System.Globalization;
using Xunit;
namespace Semver.Test
{
/// <summary>
/// These tests serve to verify or clarify the behavior of standard .NET framework
/// types which <see cref="SemVersion"/> is modeled on. This helps to ensure the
/// behavior is consistent with that... | mit | C# | |
715bd29aff07f36c19d72a6c79b9d7eb4879af18 | Add support Patch for collections. #2 | Marusyk/Simple.HttpPatch,Marusyk/Simple.HttpPatch | src/Simple.HttpPatch/PatchCollection.cs | src/Simple.HttpPatch/PatchCollection.cs | using System;
using System.Collections.Generic;
namespace Simple.HttpPatch
{
public class PatchCollection<TModel> : List<Patch<TModel>> where TModel : class, new()
{
public void Apply(IList<TModel> deltas)
{
if (deltas == null)
{
throw new ArgumentNullExc... | mit | C# | |
50173754c5de997e3a71cdec268faccebe9df89a | Add keywords of the Print Schema Keywords v1.1 | kei10in/KipSharp | Kip/PrintSchemaKeywordsV11.cs | Kip/PrintSchemaKeywordsV11.cs | using System.Xml.Linq;
namespace Kip
{
public static class Pskv11
{
public static readonly XNamespace Namespace = "http://schemas.microsoft.com/windows/2013/05/printing/printschemakeywordsv11";
public static readonly XName JobPasscode = Namespace + "JobPasscode";
public static readonl... | mit | C# | |
1a21857176d59bb2f8ddf13b329ff8c0a56c7f5c | Add EmptyArray | AspectCore/AspectCore-Framework,AspectCore/AspectCore-Framework,AspectCore/Lite,AspectCore/Abstractions | src/AspectCore.Lite.Abstractions/Common/EmptyArray.cs | src/AspectCore.Lite.Abstractions/Common/EmptyArray.cs | namespace AspectCore.Lite.Abstractions.Common
{
public static class EmptyArray<T>
{
public static readonly T[] Vaule = new T[0];
}
}
| mit | C# | |
8a42830bfc73f703d6c79d153a47ea11e9cbed0e | Add class to avoid byte[] creation | diadoc/diadocsdk-csharp,halex2005/diadocsdk-csharp,halex2005/diadocsdk-csharp,diadoc/diadocsdk-csharp | src/Com/ComBytes.cs | src/Com/ComBytes.cs | using System.IO;
using System.Runtime.InteropServices;
namespace Diadoc.Api.Com
{
[ComVisible(true)]
[Guid("AC96A3DD-E099-44CC-ABD5-11C303307159")]
public interface IComBytes
{
byte[] Bytes { get; set; }
void ReadFromFile(string path);
void SaveToFile(string path);
}
[ComVisible(true)]
[ProgId("Diadoc.... | mit | C# | |
3de477457e247c37267ba9f871ea67fd7833cdb6 | Add MapReduceJob | tristanles/mapreduce-dojo-csharp | MapReduceDojo/MapReduceJob.cs | MapReduceDojo/MapReduceJob.cs | using System;
using System.Collections.Generic;
namespace MapReduceDojo
{
public class MapReduceJob<T> : IEmitter<T> {
private enum Phase {Map, Reduce}
private Phase _phase;
private readonly IMapperReducer<T> _mapperReducer;
private readonly IDictionary<String, T> _finalResults =... | mit | C# | |
a33c1096a79e6787c68e0bde67393f93cc68acd5 | Add generation of KML file to maps menu | ShammyLevva/FTAnalyzer,ShammyLevva/FTAnalyzer,ShammyLevva/FTAnalyzer | FTAnalyser/Mapping/GoogleAPIKey.cs | FTAnalyser/Mapping/GoogleAPIKey.cs | using FTAnalyzer.Utilities;
using System;
namespace FTAnalyzer.Mapping
{
static class GoogleAPIKey
{
static string APIkeyValue = string.Empty;
public static string KeyValue
{
get
{
if (string.IsNullOrEmpty(APIkeyValue))
{
... | apache-2.0 | C# | |
7debe85437a264bc86f99048d173c95c3d2d2a41 | add type helper (in preperation for linq provider) | YoloDev/elephanet,YoloDev/elephanet,jmkelly/elephanet,jmkelly/elephanet | Elephanet/TypeHelper.cs | Elephanet/TypeHelper.cs | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Elephanet
{
internal static class TypeSystem
{
internal static Type GetElementType(Type seqType)
{
Type ienum = FindIEnumerable(seqType);
if (ie... | mit | C# | |
3346fcb5b6cf015f49cdadab18ce666b52a59e4f | Add PredicateBuilder | YeastFx/Yeast | src/Yeast.Data/PredicateBuilder.cs | src/Yeast.Data/PredicateBuilder.cs | using System;
using System.Linq;
using System.Linq.Expressions;
namespace Yeast.Data
{
/// <summary>
/// Helper class to combine predicates
/// </summary>
public static class PredicateBuilder
{
/// <summary>
/// True predicate
/// </summary>
/// <typeparam name="T">... | mit | C# | |
ad22c1194dd30c7adff2ddb97c1df339d86e1f81 | Create singleton | tenevdev/design-patterns | SingletonPattern/ChocolateFactory/ChocolateBoiler.cs | SingletonPattern/ChocolateFactory/ChocolateBoiler.cs | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace SingletonPattern.ChocolateFactory
{
public sealed class ChocolateBoiler
{
private static readonly ChocolateBoiler _instance = new ChocolateBoiler();
public static Choco... | mit | C# | |
6075910c6988380b0e2f2c9d1efd56bece04cb9b | Create scanner.cs | EverGen1/Ever,EverGen1/Ever,EverGen1/Ever | scanner.cs | scanner.cs | using Collections = http://
| mit | C# | |
b98d5ee5c0ad97b0c0eb4aae0f650cc7bc9c8264 | Make SerializationType internal | ilkerhalil/dnlib,Arthur2e5/dnlib,ZixiangBoy/dnlib,0xd4d/dnlib,yck1509/dnlib,jorik041/dnlib,kiootic/dnlib,modulexcite/dnlib,picrap/dnlib | src/DotNet/SerializationType.cs | src/DotNet/SerializationType.cs | namespace dot10.DotNet {
/// <summary>
/// See CorSerializationType/CorHdr.h
/// </summary>
enum SerializationType : byte {
/// <summary></summary>
Undefined = 0,
/// <summary>System.Boolean</summary>
Boolean = ElementType.Boolean,
/// <summary>System.Char</summary>
Char = ElementType.Char,
/// <su... | namespace dot10.DotNet {
/// <summary>
/// See CorSerializationType/CorHdr.h
/// </summary>
public enum SerializationType : byte {
/// <summary></summary>
Undefined = 0,
/// <summary>System.Boolean</summary>
Boolean = ElementType.Boolean,
/// <summary>System.Char</summary>
Char = ElementType.Char,
... | mit | C# |
2d2714d8e8bb11671caf5220e11220101a2db634 | Create ComObjectModel.cs | Excel-DNA/Samples | Misc/ComObjectModel.cs | Misc/ComObjectModel.cs | // Shows how to get hold of the Excel COM Application object
// Install the 'ExcelDna.Interop' package from NuGet, or reference the two assemblies:
// * Microsoft.Office.Interop.Excel.dll
// * Office.dll
using ExcelDna.Integration;
using Microsoft.Office.Interop.Excel;
public class TestCommands
{
// Defines a ma... | mit | C# | |
b8699d8a6a6592ea7e047c5b9d2dd6c1f38358f4 | Create ColorHelper.cs | drawcode/labs-unity | utility/ColorHelper.cs | utility/ColorHelper.cs | using System;
using System.Collections;
using System.Collections.Generic;
using Engine.Utility;
using UnityEngine;
public class ColorItem {
public float r = 0f;
public float g = 0f;
public float b = 0f;
public float a = 0f;
public ColorItem() {
}
public ColorItem(float r, flo... | mit | C# | |
dd2cd17bf8e588f75b28908dab2b8d67db3772e0 | Create index.cshtml | KovalNikita/apmathcloud | SITE/index.cshtml | SITE/index.cshtml | @{
var totalMessage = "";
if(IsPost)
{
var num1 = Request["text1"];
var num2 = Request["text2"];
var total = num1.AsInt() + num2.AsInt();
totalMessage = "Total = " + total;
}
}
<html>
<body style="background-color: beige; font-family: Verdana, Arial;">
<form action="" method="post">
<p><label fo... | mit | C# | |
e346098b4aa63527e72ab9af325b307e09ca5331 | Create SafeCrakingAIO.cs | Zephyr-Koo/sololearn-challenge | SafeCrakingAIO.cs | SafeCrakingAIO.cs | using System;
using System.Collections.Generic;
using System.Linq;
// https://www.sololearn.com/Discuss/687526/?ref=app
namespace SoloLearn
{
class Program
{
static readonly int[] CODE_SHEET = new int[] { 11, 13, 8, 10, 12, 16 };
static readonly int[] KNOWN_SAFE_PASS = new int[] { 4, 6, 8... | apache-2.0 | C# | |
8f4d4cb23f76e717c6356823c7ac58631f2be3d7 | Move a small part of current | arknu/Umbraco-CMS,KevinJump/Umbraco-CMS,umbraco/Umbraco-CMS,dawoe/Umbraco-CMS,arknu/Umbraco-CMS,marcemarc/Umbraco-CMS,marcemarc/Umbraco-CMS,umbraco/Umbraco-CMS,KevinJump/Umbraco-CMS,KevinJump/Umbraco-CMS,marcemarc/Umbraco-CMS,JimBobSquarePants/Umbraco-CMS,JimBobSquarePants/Umbraco-CMS,abjerner/Umbraco-CMS,abryukhov/Umb... | src/Umbraco.Abstractions/Composing/Current.cs | src/Umbraco.Abstractions/Composing/Current.cs | using System;
using Umbraco.Core.Logging;
namespace Umbraco.Core.Composing
{
/// <summary>
/// Provides a static service locator for most singletons.
/// </summary>
/// <remarks>
/// <para>This class is initialized with the container in UmbracoApplicationBase,
/// right after the container is ... | mit | C# | |
ea8210aa6dbc9689104b3a8ca3706f2240fe6c70 | Create PulsarTopic for consistency working with Pulsar topics | JasperFx/jasper,JasperFx/jasper,JasperFx/jasper | src/Jasper.Pulsar/PulsarTopic.cs | src/Jasper.Pulsar/PulsarTopic.cs | using System;
using System.Linq;
using System.Text.RegularExpressions;
namespace Jasper.Pulsar
{
public struct PulsarTopic
{
public string Persistence { get; }
public string Tenant { get; }
public string Namespace { get; }
public string TopicName { get; }
public bool Is... | mit | C# | |
c46dc2b3b75b4bee65ef919fcb335f8ddf3820d4 | add missing page model | myty/muse,myty/muse,myty/muse | src/MyTy.Blog.Web/Models/Page.cs | src/MyTy.Blog.Web/Models/Page.cs | using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
namespace MyTy.Blog.Web.Models
{
public class Page
{
public string FileLocation { get; set; }
public string Href { get; set; }
public string Title { get; set; }
public string SubTitle { get; set; }
public str... | mit | C# | |
5376ef4ac7fdba1af55ad4f99adc6dfa23fbb456 | Create Index.cshtml | CarmelSchvartzman/MVC_WebGrid_Admin,CarmelSoftware/MVC_WebGrid_Admin | Index.cshtml | Index.cshtml | @model IEnumerable<ERASE_BL.Blog>
@{
ViewBag.Title = "Index";
WebGrid grid = new WebGrid(Model, new[] { "Title", "Text", "DatePosted", "MainPicture", "Blogger" },
rowsPerPage:2,ajaxUpdateContainerId:"GridDiv");
IEnumerable<WebGridColumn> oColumns = new[] {
grid.Column("ID",format:(item) =... | mit | C# | |
d43a1d4a68b4b9f642f331f38415c50b8a49134a | Create StackCall.cs | secabstraction/PowerWalker | StackCall.cs | StackCall.cs | using System;
using PowerWalker.Natives;
using System.Collections.Generic;
namespace PowerWalker
{
public class StackCall
{
public ulong Offset { get; private set; }
public ulong ReturnAddress { get; private set; }
public string Symbol { get; private set; }
public string SymbolF... | bsd-3-clause | C# | |
3a492142b0b740ca7bf48c487803720959f806ec | Create Diag.cs | Xeeynamo/KingdomHearts | OpenKh.Kh2/Jiminy/Diag.cs | OpenKh.Kh2/Jiminy/Diag.cs | using System;
using System.Collections.Generic;
using System.Text;
using Xe.BinaryMapper;
namespace OpenKh.Kh2.Jiminy
{
public class Diag
{
public const int MagicCode = 0x49444D4A;
public class Flag
{
[Data] public ushort Id { get; set; }
[Data] public ushort U... | mit | C# | |
de0a076eb6ce9835810a13977319413c4e41ac1f | Add model class for mod presets | peppy/osu,ppy/osu,peppy/osu,peppy/osu,ppy/osu,ppy/osu | osu.Game/Rulesets/Mods/ModPreset.cs | osu.Game/Rulesets/Mods/ModPreset.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.Collections.Generic;
namespace osu.Game.Rulesets.Mods
{
/// <summary>
/// A mod preset is a named collection of configured mods.
/... | mit | C# | |
8dfa193e5eae915a6eb5f0ef5750d921cc367dad | Add a Panel class, to make drawing rectangles easy. | dneelyep/MonoGameUtils | MonoGameUtils/GameComponents/Panel.cs | MonoGameUtils/GameComponents/Panel.cs | using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
namespace MonoGameUtils.GameComponents
{
/// <summary>
/// A solid-color rectangle that can be drawn on-screen.
/// </summary>
internal class Panel : DrawableGameComponent
{
#region "Properties"
public Rectangl... | mit | C# | |
2f7b51978f174236bc61ec09b2cac94dbada9820 | Add exception type for native call failures. | CoraleStudios/Colore,danpierce1/Colore,Sharparam/Colore,WolfspiritM/Colore | Colore/Razer/NativeCallException.cs | Colore/Razer/NativeCallException.cs | // ---------------------------------------------------------------------------------------
// <copyright file="NativeCallException.cs" company="">
// Copyright © 2015 by Adam Hellberg and Brandon Scott.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy of
// this software ... | mit | C# | |
5e1f31100e8dbb42414dc513418261a684cfab04 | add missing file | SabotageAndi/ELMAR | net.the-engineers.elmar/elmar.droid/Events/ShutdownReceiver.cs | net.the-engineers.elmar/elmar.droid/Events/ShutdownReceiver.cs | using Android.App;
using Android.Content;
using elmar.droid.Common;
namespace elmar.droid.Events
{
[BroadcastReceiver]
[IntentFilter(new []{Intent.ActionShutdown})]
public class ShutdownReceiver : StandardBroadcastReceiver
{
protected override EventType EventType => EventType.Device... | agpl-3.0 | C# | |
4241ee7191bf54149727eb0478ddea9e1c482d0e | create customer entity | kidchenko/playground,kidchenko/playground,kidchenko/playground,kidchenko/playground,kidchenko/playground,kidchenko/playground,kidchenko/playground,kidchenko/playground,kidchenko/playground,kidchenko/playground,kidchenko/playground,kidchenko/playground,kidchenko/playground,kidchenko/playground,kidchenko/playground,kidch... | DDD/DDD.Domain/Entities/Customer.cs | DDD/DDD.Domain/Entities/Customer.cs | using System;
namespace DDD.Domain.Entities
{
public class Customer
{
private const int YEARS_FOR_CUSTOMER_VIP = 5;
public Customer()
{
Created = DateTime.Now;
Active = true;
}
public int Id { get; set; }
public string Name { get; set;... | mit | C# | |
5e800e3b70cd18d584889d9f213885ce7e18d6be | add utility script to control time of multiple alembic stream in one place | unity3d-jp/AlembicImporter,unity3d-jp/AlembicImporter,unity3d-jp/AlembicImporter | AlembicImporter/Assets/AlembicImporter/Scripts/AlembicStreamSync.cs | AlembicImporter/Assets/AlembicImporter/Scripts/AlembicStreamSync.cs | using UnityEngine;
using UnityEditor;
using System;
using System.Collections;
using System.Collections.Generic;
[ExecuteInEditMode]
public class AlembicStreamSync : MonoBehaviour
{
public float m_time;
[Serializable]
public class SyncItem
{
public GameObject stream;
public bool sync = true;
... | mit | C# | |
9989074bc1956c656c53665cda80e89e21fbc89a | Verify preorder - wrong | Gerula/interviews,Gerula/interviews,Gerula/interviews,Gerula/interviews,Gerula/interviews | LeetCode/bootleg/verify_preorder.cs | LeetCode/bootleg/verify_preorder.cs | // http://lcoj.tk/problems/verify-preorder-serialization-of-a-binary-tree-dietpepsi-review/
//
// Given a string of comma separated values,
// verify whether it is a correct preorder traversal serialization of a binary tree.
// Find an algorithm without reconstructing the tree.
//
// A value in the string is eithe... | mit | C# | |
6c628342ea8bb67157cc4bc6afa4041f64fcf340 | Add version helper to simplify creating a version list | Kentico/KInspector,Kentico/KInspector,ChristopherJennings/KInspector,ChristopherJennings/KInspector,Kentico/KInspector,Kentico/KInspector,ChristopherJennings/KInspector,ChristopherJennings/KInspector | KenticoInspector.Core/Helpers/VersionHelper.cs | KenticoInspector.Core/Helpers/VersionHelper.cs | using System;
using System.Collections.Generic;
using System.Linq;
namespace KenticoInspector.Core.Helpers
{
public class VersionHelper
{
public static IList<Version> GetVersionList(params string[] versions)
{
return versions.Select(x => GetVersionFromShortString(x)).ToList();
... | mit | C# | |
ce4f8d0347d0092667a52faa0ec8ecc065aecdc0 | Add AbstractJoinOperation class. | ayende/rhino-etl,teodimache/rhino-etl,vebin/rhino-etl,regisbsb/rhino-etl,pushrbx/rhino-etl,hibernating-rhinos/rhino-etl,koulkov/rhino-etl,IntelliTect/rhino-etl,RudyCo/rhino-etl | Rhino.Etl.Core/Operations/AbstractJoinOperation.cs | Rhino.Etl.Core/Operations/AbstractJoinOperation.cs | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace Rhino.Etl.Core.Operations
{
/// <summary>
/// Perform a join between two sources.
/// </summary>
public abstract class AbstractJoinOperation : AbstractOperation
{
/// <summary>
/// The l... | bsd-3-clause | C# | |
27264d1793380fed98fe9014513228cf99f7597f | Add CreateGenericInstance Type extension method to help building models | zpqrtbnk/Zbu.ModelsBuilder,zpqrtbnk/Zbu.ModelsBuilder,zpqrtbnk/Zbu.ModelsBuilder,danlister/Zbu.ModelsBuilder | Zbu.ModelsBuilder/TypeExtensions.cs | Zbu.ModelsBuilder/TypeExtensions.cs | using System;
namespace Zbu.ModelsBuilder
{
public static class TypeExtensions
{
/// <summary>
/// Creates a generic instance of a generic type with the proper actual type of an object.
/// </summary>
/// <param name="genericType">A generic type such as <c>Something{}</c></para... | mit | C# | |
90312b75c2d9887760495d3b5b8e2ab961de416c | make it build | Norgg/Principia,pleroy/Principia,eggrobin/Principia,pleroy/Principia,mockingbirdnest/Principia,eggrobin/Principia,Norgg/Principia,mockingbirdnest/Principia,pleroy/Principia,pleroy/Principia,Norgg/Principia,eggrobin/Principia,mockingbirdnest/Principia,Norgg/Principia,mockingbirdnest/Principia | ksp_plugin_adapter/boxed.cs | ksp_plugin_adapter/boxed.cs | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace principia {
namespace ksp_plugin_adapter {
// Strongly-typed boxing. This is used for marshaling optional parameters,
// since custom marshalers are only allowed on classes, strings, arrays, and
// boxed value types, so... | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace principia {
namespace ksp_plugin_adapter {
// Strongly-typed boxing. This is used for marshaling optional parameters,
// since custom marshalers are only allowed on classes, strings, arrays, and
// boxed value types, so... | mit | C# |
255f7b7b532a25276272331a4e224c9389a6931a | Add failing test scene | smoogipoo/osu,NeoAdonis/osu,ppy/osu,UselessToucan/osu,smoogipoo/osu,UselessToucan/osu,peppy/osu,NeoAdonis/osu,smoogipooo/osu,ppy/osu,peppy/osu,NeoAdonis/osu,ppy/osu,peppy/osu,UselessToucan/osu,peppy/osu-new,smoogipoo/osu | osu.Game.Tests/Skins/TestSceneSkinProvidingContainer.cs | osu.Game.Tests/Skins/TestSceneSkinProvidingContainer.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.Collections.Generic;
using System.Linq;
using NUnit.Framework;
using osu.Framework.Audio.Sample;
using osu.Framework.Bindables;
using osu.Framework.Extension... | mit | C# | |
f6c00f804ab2df377ceed834ff17e96261ee18ab | Create QType.cs | QetriX/CS | QetriX/libs/QType.cs | QetriX/libs/QType.cs | namespace com.qetrix.libs
{
/* Copyright (c) QetriX.com. Licensed under MIT License, see /LICENSE.txt file.
* 16.01.09 | QType
*/
using System;
using com.qetrix.libs;
/// <summary>
/// Description of QType.
/// </summary>
public class QType
{
// Class data
protected Integer t_pk = null; // Primary Key... | mit | C# | |
533cfb52f9ff78d0836b8c924c4a8e5de2dc9fde | Clean up | retroburst/SpaceShooter | Assets/Scripts/DestroyByTime.cs | Assets/Scripts/DestroyByTime.cs | using UnityEngine;
using System.Collections;
/// <summary>
/// Destroy by time.
/// Destroys game objects based
/// on a given lifetime.
/// </summary>
public class DestroyByTime : MonoBehaviour
{
public float lifetime;
/// <summary>
/// Start this instance.
/// </summary>
private void Start ()
{
Destroy (... | mit | C# | |
bdf373cc3753336169c707d554b4857edf54e7ef | Create EnumTypeModelDescription.cs | MingLu8/Nancy.WebApi.HelpPages | src/Nancy.WebApi.HelpPages.Demo/HelpPage/ModelDescriptions/EnumTypeModelDescription.cs | src/Nancy.WebApi.HelpPages.Demo/HelpPage/ModelDescriptions/EnumTypeModelDescription.cs | using System.Collections.Generic;
using System.Collections.ObjectModel;
namespace WebApplication1.Areas.HelpPage.ModelDescriptions
{
public class EnumTypeModelDescription : ModelDescription
{
public EnumTypeModelDescription()
{
Values = new Collection<EnumValueDescription>();
... | mit | C# | |
c7f288b120e2bb6240d64d25c1434377e16ff99d | Create HWD.cs | etormadiv/njRAT_0.7d_Stub_ReverseEngineering | j_csharp/OK/HWD.cs | j_csharp/OK/HWD.cs | //Reversed by Etor Madiv
public static string HWD()
{
string rootPathName;
string volumeName;
string fileSystemName;
int volumeSerialNumber;
int maximumComponentLength;
int fileSystemFlags;
try
{
rootPathName = System.String.Concat( Microsoft.VisualBasi... | unlicense | C# | |
675eee944fb2c19e6b62c2340d4bd145289f386b | Add a base for web forms controls | hishamco/WebForms,hishamco/WebForms | src/My.AspNetCore.WebForms/Controls/Control.cs | src/My.AspNetCore.WebForms/Controls/Control.cs | namespace My.AspNetCore.WebForms.Controls
{
public abstract class Control
{
public string Id { get; set; }
public string InnerHtml { get; protected set; }
public abstract void Render();
}
}
| mit | C# | |
6846d469bb3a6e7056068c1e224f9e6fdd87f854 | Add initial contract for message bus | mike-kaufman/Glimpse.Prototype,zanetdev/Glimpse.Prototype,zanetdev/Glimpse.Prototype,pranavkm/Glimpse.Prototype,mike-kaufman/Glimpse.Prototype,zanetdev/Glimpse.Prototype,mike-kaufman/Glimpse.Prototype,peterblazejewicz/Glimpse.Prototype,peterblazejewicz/Glimpse.Prototype,pranavkm/Glimpse.Prototype,peterblazejewicz/Glimp... | src/Glimpse.Common/Broker/IMessageBus.cs | src/Glimpse.Common/Broker/IMessageBus.cs | using System;
namespace Glimpse.Broker
{
public interface IMessageBus
{
IObservable<T> Listen<T>();
IObservable<T> ListenIncludeLatest<T>();
bool IsRegistered(Type type);
}
} | mit | C# | |
67cbf14e099ec2095359d7c07fe61b828df4a6ef | Implement IEntityChangeSetReasonProvider in Abp.AspNetCore | carldai0106/aspnetboilerplate,fengyeju/aspnetboilerplate,luchaoshuai/aspnetboilerplate,AlexGeller/aspnetboilerplate,aspnetboilerplate/aspnetboilerplate,andmattia/aspnetboilerplate,aspnetboilerplate/aspnetboilerplate,andmattia/aspnetboilerplate,luchaoshuai/aspnetboilerplate,Nongzhsh/aspnetboilerplate,ryancyq/aspnetboile... | src/Abp.AspNetCore/AspNetCore/EntityHistory/HttpRequestEntityChangeSetReasonProvider.cs | src/Abp.AspNetCore/AspNetCore/EntityHistory/HttpRequestEntityChangeSetReasonProvider.cs | using Abp.Dependency;
using Abp.EntityHistory;
using Abp.Runtime;
using JetBrains.Annotations;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Http.Extensions;
namespace Abp.AspNetCore.EntityHistory
{
/// <summary>
/// Implements <see cref="IEntityChangeSetReasonProvider"/> to get reason from HTTP... | mit | C# | |
a1733ef77f8ea360865e467cdd5817dd936a60c8 | Create RandomHandler.cs | LassieME/KiteBot | ConsoleApplication1/RandomHandler.cs | ConsoleApplication1/RandomHandler.cs | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace KiteBot
{
public static class RandomHandler
{
//Handles the global random object
private static System.Random _random;
public static System.Random random
{
get
... | mit | C# | |
4587d19e4e36331ce88622182d47c00aab7f7f1e | Add TestLineChartViewModel class | nopara73/HiddenWallet,nopara73/HiddenWallet,nopara73/HiddenWallet,nopara73/HiddenWallet | WalletWasabi.Fluent/ViewModels/TestLineChartViewModel.cs | WalletWasabi.Fluent/ViewModels/TestLineChartViewModel.cs | using System.Collections.Generic;
namespace WalletWasabi.Fluent.ViewModels
{
public class TestLineChartViewModel
{
public List<double> Values => new List<double>()
{
15,
22,
44,
50,
64,
68,
92,
114,... | mit | C# | |
f0e65c529035511b5b43d23d3479364487982c3e | Create task_1_3_8_3.cs | AndrewTurlanov/ANdrew | task_1_3_8_3.cs | task_1_3_8_3.cs | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ConsoleApp1
{
class Program
{
static void Main(string[] args)
{
/*
Подумайте когда лучше использовать цикл for а когда while.
... | apache-2.0 | C# | |
633f13193985474585c88c2bee57c0d81b6b88e4 | add DisplayFPS.cs | NDark/ndinfrastructure,NDark/ndinfrastructure | Unity/NGUIUtil/DisplayFPS.cs | Unity/NGUIUtil/DisplayFPS.cs | using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class DisplayFPS : MonoBehaviour
{
public UILabel m_Label = null ;
// Use this for initialization
void Start ()
{
}
// Update is called once per frame
void Update ()
{
if( null != m_Label )
{
if( fpsVec... | mit | C# | |
a3cf5c3ec355e19455627b0be36497a9a04c0996 | Add c# solution TheDescent | joand/codingame,joand/codingame,joand/codingame,joand/codingame,joand/codingame,joand/codingame | easy/theDescent/src/main/cs/App.cs | easy/theDescent/src/main/cs/App.cs | using System;
using System.Linq;
using System.IO;
using System.Text;
using System.Collections;
using System.Collections.Generic;
/**
* The while loop represents the game.
* Each iteration represents a turn of the game
* where you are given inputs (the heights of the mountains)
* and where you have to print an outp... | mit | C# | |
a05cfc92046df9a91a648133cbca1de32a095211 | Use property instead of field | KingJiangNet/boo,BitPuffin/boo,KingJiangNet/boo,BitPuffin/boo,BITechnologies/boo,hmah/boo,BillHally/boo,hmah/boo,KingJiangNet/boo,BitPuffin/boo,BitPuffin/boo,bamboo/boo,KingJiangNet/boo,KingJiangNet/boo,boo-lang/boo,BillHally/boo,drslump/boo,rmboggs/boo,drslump/boo,BITechnologies/boo,hmah/boo,bamboo/boo,KidFashion/boo,... | src/Boo.Lang/MetaAttribute.cs | src/Boo.Lang/MetaAttribute.cs | #region license
// Copyright (c) 2003, 2004, 2005 Rodrigo B. de Oliveira (rbo@acm.org)
// 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... | #region license
// Copyright (c) 2003, 2004, 2005 Rodrigo B. de Oliveira (rbo@acm.org)
// 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... | bsd-3-clause | C# |
8cdcdbe04c76cad02adc604e10e6c4ec875c222e | Create DotnetSdkManager.cs | RadicalFx/Radical.Windows | targets/DotnetSdkManager.cs | targets/DotnetSdkManager.cs | using System;
using System.Drawing;
using System.IO;
using System.Linq;
using System.Net;
using System.Runtime.InteropServices;
using static SimpleExec.Command;
using Console = Colorful.Console;
class DotnetSdkManager
{
const string customSdkInstallDir = ".dotnet";
const string buildSupportDir = ".build";
... | mit | C# | |
1d7e4ebed4261dca0c93e4654373534769c01163 | Add JWA enumeration for JWS Algorithms | thnetii/dotnet-common | src/THNETII.Security.JOSE/JsonWebSignatureAlgorithm.cs | src/THNETII.Security.JOSE/JsonWebSignatureAlgorithm.cs | using System.Runtime.Serialization;
namespace THNETII.Security.JOSE
{
/// <summary>
/// Defines the set of <c>"alg"</c> (algorithm) Header Parameter
/// values defined by this specification for use with JWS.
/// <para>Specified in <a href="https://tools.ietf.org/html/rfc7518#section-3.1">RFC 7518 - JS... | mit | C# |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.