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 |
|---|---|---|---|---|---|---|---|---|
f4fd0ba723368420bc38fb357553b051609cadc9 | Create 09.Refactor-Special-Numbers.cs | StefanKoev/DataTypesAndVariables---Lab | 09.Refactor-Special-Numbers.cs | 09.Refactor-Special-Numbers.cs | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace _09.Refactor_Special_Numbers
{
class Program
{
static void Main(string[] args)
{
int number = int.Parse(Console.ReadLine());
int digitsSum = 0;
... | mit | C# | |
67ef887900753483fad4d882ab92fb19b1bacff3 | Add new file AssemblyMetadataHelper.cs from [SD:715912] | bingbing8/PowerShell,PaulHigin/PowerShell,bingbing8/PowerShell,kmosher/PowerShell,bmanikm/PowerShell,TravisEz13/PowerShell,KarolKaczmarek/PowerShell,TravisEz13/PowerShell,kmosher/PowerShell,KarolKaczmarek/PowerShell,PaulHigin/PowerShell,kmosher/PowerShell,bmanikm/PowerShell,bingbing8/PowerShell,bingbing8/PowerShell,jso... | src/Microsoft.PowerShell.CoreCLR.AssemblyLoadContext/CoreCLR/AssemblyMetadataHelper.cs | src/Microsoft.PowerShell.CoreCLR.AssemblyLoadContext/CoreCLR/AssemblyMetadataHelper.cs | /********************************************************************++
Copyright (c) Microsoft Corporation. All rights reserved.
--********************************************************************/
using System.Globalization;
using System.Reflection;
using System.Reflection.Metadata;
using System.Security.Crypto... | mit | C# | |
a7858e5a84f11b9f8faffb6974b3432fbadcd508 | add ui logic | scheshan/DoubanGroup.UWP | DoubanGroup.Client/Shell.xaml.cs | DoubanGroup.Client/Shell.xaml.cs | using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Runtime.InteropServices.WindowsRuntime;
using Windows.Foundation;
using Windows.Foundation.Collections;
using Windows.UI.Xaml;
using Windows.UI.Xaml.Controls;
using Windows.UI.Xaml.Controls.Primitives;
using Windows.UI.Xam... | apache-2.0 | C# | |
3de6b112a45e9ad856c7118ae58c91fa1b29c076 | Add Pokemon class. | NextLight/PokeBattle_Server | PokeBattle/PokeBattle/Pokemon.cs | PokeBattle/PokeBattle/Pokemon.cs | using System;
using System.Linq;
namespace PokeBattle
{
class Pokemon
{
public string Name { get; private set; }
public int Level { get; private set; }
public Tuple<int, int?> Types { get; private set; }
public Move[] Moves { get; private set; }
public int Hp { get; pri... | mit | C# | |
86bef748b0193cd9c187f83d52590cbbb0e4791b | Change version to 2.0.0 | courtneyklatt/Mjolnir,hudl/Mjolnir | Hudl.Mjolnir/Properties/AssemblyInfo.cs | Hudl.Mjolnir/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("Hu... | 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("Hu... | apache-2.0 | C# |
57ae87f5eb8c2874f19b866cc047f352b0b8aaeb | Add Indicator.cs | AMDL/amdl2maml | amdl2maml/Converter/Indicator.cs | amdl2maml/Converter/Indicator.cs | using System;
namespace Amdl.Maml.Converter
{
/// <summary>
/// Progress report object.
/// </summary>
public struct Indicator
{
private readonly string name;
private readonly int index;
private readonly int count;
private Indicator(int count, int index, string nam... | apache-2.0 | C# | |
655b89308de3386dd446daa03b25a522bba22a25 | Use new DocumentObjectSerializer in Mongo test setup | nerdamigo/NEventStore,jamiegaines/NEventStore,marcoaoteixeira/NEventStore,chris-evans/NEventStore,gael-ltd/NEventStore,paritoshmmmec/NEventStore,NEventStore/NEventStore,D3-LucaPiombino/NEventStore,AGiorgetti/NEventStore,deltatre-webplu/NEventStore,adamfur/NEventStore | src/tests/EventStore.Persistence.AcceptanceTests/Engines/AcceptanceTestMongoPersistenceFactory.cs | src/tests/EventStore.Persistence.AcceptanceTests/Engines/AcceptanceTestMongoPersistenceFactory.cs | namespace EventStore.Persistence.AcceptanceTests.Engines
{
using MongoPersistence;
using Serialization;
public class AcceptanceTestMongoPersistenceFactory : MongoPersistenceFactory
{
public AcceptanceTestMongoPersistenceFactory()
: base("Mongo", new DocumentObjectSerializer())
{
}
protected override st... | namespace EventStore.Persistence.AcceptanceTests.Engines
{
using MongoPersistence;
using Serialization;
public class AcceptanceTestMongoPersistenceFactory : MongoPersistenceFactory
{
public AcceptanceTestMongoPersistenceFactory()
: base("Mongo", new NullDocumentSerializer())
{
}
protected override stri... | mit | C# |
15682818bb7a4830b3dcfd596dd0bb51074fe560 | Create GenericResponse.cs | titanium007/Titanium,titanium007/Titanium-Web-Proxy,justcoding121/Titanium-Web-Proxy | Titanium.Web.Proxy/Http/Responses/GenericResponse.cs | Titanium.Web.Proxy/Http/Responses/GenericResponse.cs | using System.Net;
namespace Titanium.Web.Proxy.Http.Responses
{
/// <summary>
/// Anything other than a 200 or 302 response
/// </summary>
public class GenericResponse : Response
{
public GenericResponse(HttpStatusCode status)
{
ResponseStatusCode = ((int)status).ToStrin... | mit | C# | |
aade1805f44bd22c18aa642816f7575daa7b861a | Remove unnecessary using | Nabile-Rahmani/osu-framework,smoogipooo/osu-framework,DrabWeb/osu-framework,DrabWeb/osu-framework,naoey/osu-framework,default0/osu-framework,peppy/osu-framework,Tom94/osu-framework,EVAST9919/osu-framework,ZLima12/osu-framework,paparony03/osu-framework,smoogipooo/osu-framework,ppy/osu-framework,peppy/osu-framework,EVAST... | osu.Framework/Graphics/Animations/FrameData.cs | osu.Framework/Graphics/Animations/FrameData.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
namespace osu.Framework.Graphics.Animations
{
/// <summary>
/// Represents all data necessary to describe a single frame of an <see cref="Animat... | // 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 osu.Framework.Graphics.Containers;
namespace osu.Framework.Graphics.Animations
{
/// <summary>
/// Represents all data necessary to des... | mit | C# |
dc113ace0a614308194f61532f16d0103662a7df | Solve Area 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/beecrowd/1012/1012.cs | solutions/beecrowd/1012/1012.cs | using System;
class Solution {
static void Main() {
double a, b, c, pi = 3.14159;
string line;
string[] numbers;
while ((line = Console.ReadLine()) != null) {
numbers = line.Split(' ');
a = Convert.ToDouble(numbers[0]);
b = Convert.ToDouble(numbe... | mit | C# | |
d074e36190a192b7aface8f8b9b010f26d9d67d7 | Add benchmark test. | codecutout/JsonApiSerializer | tests/JsonApiSerializer.Test/DeserializationTests/DeserializationPerformanceBenchmarkTests.cs | tests/JsonApiSerializer.Test/DeserializationTests/DeserializationPerformanceBenchmarkTests.cs | using JsonApiSerializer.JsonApi;
using JsonApiSerializer.Test.Models.Articles;
using JsonApiSerializer.Test.TestUtils;
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
using Newtonsoft.Json.Serialization;
using System;
using System.Collections;
using System.Collections.Generic;
using System.Collections.ObjectModel;
... | mit | C# | |
232a9c5dbbed83bc95ca161b9409bbeca98579fb | Create TrainRendererExtensions.cs | efruchter/UnityUtilities | TrainRendererExtensions.cs | TrainRendererExtensions.cs | using UnityEngine;
using System.Collections;
/**
* A way to reset animations on TrailRenderers when moving them suddenly.
* Normally a trail will streak across the space it was teleported. This script gives
* it a single frame to reset, and then applies the proper trail time again.
*
* Usage (from within a script... | mit | C# | |
b28dbffe2c179afa76ec99f7e37e1f3ea148cac9 | Create ANDGate.cs | irtezasyed007/CSC523-Game-Project | Gates/ANDGate.cs | Gates/ANDGate.cs | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace CSC_523_Game
{
class ANDGate : Gate
{
public ANDGate(Variable [] vars) : base(vars)
{
}
public override bool getResult()
{
bool res... | mit | C# | |
734522193c218ab3dd996eb45833ee9ea5248f02 | Fix json property name. | peeedge/mobile,eatskolnikov/mobile,ZhangLeiCharles/mobile,eatskolnikov/mobile,eatskolnikov/mobile,masterrr/mobile,masterrr/mobile,peeedge/mobile,ZhangLeiCharles/mobile | Phoebe/Bugsnag/Data/Event.cs | Phoebe/Bugsnag/Data/Event.cs | using System;
using Newtonsoft.Json;
using Toggl.Phoebe.Bugsnag.Json;
using System.Collections.Generic;
namespace Toggl.Phoebe.Bugsnag.Data
{
[JsonObject (MemberSerialization.OptIn)]
public class Event
{
[JsonProperty ("user", DefaultValueHandling = DefaultValueHandling.Ignore)]
public User... | using System;
using Newtonsoft.Json;
using Toggl.Phoebe.Bugsnag.Json;
using System.Collections.Generic;
namespace Toggl.Phoebe.Bugsnag.Data
{
[JsonObject (MemberSerialization.OptIn)]
public class Event
{
[JsonProperty ("user", DefaultValueHandling = DefaultValueHandling.Ignore)]
public User... | bsd-3-clause | C# |
0325a86837ab4ea4a28bb02e2ae70892966a72a6 | Change -> PropertyChange | afit/HVoIPM | State/PropertyChangeBehaviour.cs | State/PropertyChangeBehaviour.cs | using System;
using System.Collections.Generic;
using System.Text;
using LothianProductions.VoIP.State;
namespace LothianProductions.VoIP.State {
// FIXME how to enable some lines but not others?
public class PropertyChangeBehaviour {
public PropertyChangeBehaviour( bool showBubble, String bubbleTex... | mit | C# | |
5354cdd56693bccf0094626189de7e0a1dc25073 | Create Camera_depthTextureMode.cs | UnityCommunity/UnityLibrary | Docs/Camera/Camera_depthTextureMode.cs | Docs/Camera/Camera_depthTextureMode.cs | // page https://docs.unity3d.com/ScriptReference/Camera-depthTextureMode.html
// usage: attach this script to Camera
using UnityEngine;
namespace UnityLibrary
{
public class Camera_depthTextureMode : MonoBehaviour
{
void OnEnable()
{
var cam = Getcomponent<Camera>();
if... | mit | C# | |
de52aff1a33a9bae7754e522a797a7fc79e8a357 | Create fibonacci.cs | ashoktandan007/csharp,wchild30/asterisk | fibonacci.cs | fibonacci.cs | using System;
class Program
{
static int x=0,y=1,z = 0;
static void Main(string[] args)
{
Console.WriteLine(x);
Console.WriteLine(y);
for (int i = 0; i < 10; i++)
{
z = x+y;
Console.WriteLine(z);
... | apache-2.0 | C# | |
eaba437a44daf13d78bfc88f5ec5daadab172d42 | add globalsuppressions.cs | Foglio1024/Tera-custom-cooldowns,Foglio1024/Tera-custom-cooldowns | TCC.Core/GlobalSuppressions.cs | TCC.Core/GlobalSuppressions.cs |
// This file is used by Code Analysis to maintain SuppressMessage
// attributes that are applied to this project.
// Project-level suppressions either have no target or are given
// a specific target and scoped to a namespace, type, member, etc.
[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Code Qual... | mit | C# | |
3a229bffbe4ed9adc1f02dda9d36dde00cfa583e | Add Base32 tests | ektrah/nsec | tests/Formatting/Base32Tests.cs | tests/Formatting/Base32Tests.cs | using System;
using System.Text;
using NSec.Cryptography.Formatting;
using Xunit;
namespace NSec.Tests.Formatting
{
public static class Base32Tests
{
[Theory]
[InlineData("", "")]
[InlineData("f", "MY======")]
[InlineData("fo", "MZXQ====")]
[InlineData("foo", "MZXW6===")... | mit | C# | |
cd120598261d8eb34739d25bb18b6234d85ff905 | Add F.Uncurry | farity/farity | Farity/Uncurry.cs | Farity/Uncurry.cs | using System;
namespace Farity
{
public static partial class F
{
public static
Func<T1, T2, TResult>
Uncurry<T1, T2, TResult>(
FuncCurry<T1, T2, TResult> curried)
=> (a, b) => curried(a)(b);
public static
Func<T1, T2, T3, TResult... | mit | C# | |
87fbeb8d19a15d3b3b02c9e3a129045b8ca4be47 | Create TabObjectStart.cs | MatrixNAN/Unity-Artist-Tools | TabObjectStart.cs | TabObjectStart.cs | using UnityEngine;
using System.Collections;
public class TabObjectStart : MonoBehaviour
{
public GameObject[] InactiveTabObject;
public GameObject[] ActiveTabObject;
// Use this for initialization
void Start ()
{
int count = 0;
for (count = 0; count < ActiveTabObject.Length; count++)
ActiveTabObject[... | apache-2.0 | C# | |
7573e690ccf8e580166c44b2cb7c5f1d2752d0d7 | create StatController.cs - for now there is not so much to do, it is possible only to see the example stat | NinjaVault/NinjaHive,NinjaVault/NinjaHive | NinjaHive.WebApp/Controllers/StatsController.cs | NinjaHive.WebApp/Controllers/StatsController.cs | using System;
using System.Web.Mvc;
using NinjaHive.Contract.Commands;
using NinjaHive.Contract.DTOs;
using NinjaHive.Contract.Queries;
using NinjaHive.Core;
using NinjaHive.WebApp.Services;
namespace NinjaHive.WebApp.Controllers
{
public class StatsController : Controller
{
private StatInfo[] example... | apache-2.0 | C# | |
41d1e0a3d5d577521511820ce1c75778a50521d2 | Create ShopifySmartCollection.cs | mooglegiant/ShopifySharp,shajumohamed/ShopifySharp,clement911/ShopifySharp,nozzlegear/ShopifySharp,addsb/ShopifySharp,Yitzchok/ShopifySharp | ShopifySharp/Entities/ShopifySmartCollection.cs | ShopifySharp/Entities/ShopifySmartCollection.cs | using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ShopifySharp
{
/// <summary>
/// An entity representing a Shopify Smart Collection Object.
/// </summary>
public class ShopifySmartCollection : ShopifyObj... | mit | C# | |
569d08183fcec317641a527b5b9bcc8c35cd424f | Update RecordDeclarationOrganizer.cs | eriawan/roslyn,wvdd007/roslyn,tmat/roslyn,shyamnamboodiripad/roslyn,AlekseyTs/roslyn,dotnet/roslyn,mavasani/roslyn,CyrusNajmabadi/roslyn,sharwell/roslyn,physhi/roslyn,sharwell/roslyn,mgoertz-msft/roslyn,weltkante/roslyn,weltkante/roslyn,ErikSchierboom/roslyn,AmadeusW/roslyn,shyamnamboodiripad/roslyn,jasonmalinowski/ros... | src/Features/CSharp/Portable/Organizing/Organizers/RecordDeclarationOrganizer.cs | src/Features/CSharp/Portable/Organizing/Organizers/RecordDeclarationOrganizer.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.Composition;
using System.Threading;
using Microsoft.CodeAnalysis.CSharp.Syntax;
using M... | // 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.Composition;
using System.Threading;
using Microsoft.CodeAnalysis.CSharp.Syntax;
using M... | mit | C# |
37c8670e1fb47756f5c2e388af057429e90d70c1 | 添加 CaseCollectionController.cs | JeffreySu/WeiXinMPSDK,mc7246/WeiXinMPSDK,mc7246/WeiXinMPSDK,lishewen/WeiXinMPSDK,JeffreySu/WeiXinMPSDK,mc7246/WeiXinMPSDK,JeffreySu/WeiXinMPSDK,lishewen/WeiXinMPSDK,lishewen/WeiXinMPSDK | Samples/Senparc.Weixin.MP.Sample.vs2017/Senparc.Weixin.MP.CoreSample/Controllers/CaseCollectionController.cs | Samples/Senparc.Weixin.MP.Sample.vs2017/Senparc.Weixin.MP.CoreSample/Controllers/CaseCollectionController.cs | using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Hosting;
namespace Senparc.Weixin.MP.CoreSample.Controllers
{
public class CaseCollectionController : Controller
{
... | apache-2.0 | C# | |
82effc2860e927e1aa1fa3eacdc4ac3ef20045dd | Add Prepend and Append extension methods | nuke-build/nuke,nuke-build/nuke,nuke-build/nuke,nuke-build/nuke | source/Nuke.Common/Utilities/String.PrependAppend.cs | source/Nuke.Common/Utilities/String.PrependAppend.cs | // Copyright 2018 Maintainers of NUKE.
// Distributed under the MIT License.
// https://github.com/nuke-build/nuke/blob/master/LICENSE
using System;
using System.Collections.Generic;
using System.Linq;
using JetBrains.Annotations;
namespace Nuke.Common.Utilities
{
public static partial class StringExtensions
... | mit | C# | |
345b00d6d1e9d72cc8088a7bc63a88fca0e84486 | Add handwritten code for Operation.ToLroResponse() | jskeet/google-cloud-dotnet,jskeet/google-cloud-dotnet,jskeet/google-cloud-dotnet,jskeet/google-cloud-dotnet,googleapis/google-cloud-dotnet,googleapis/google-cloud-dotnet,jskeet/google-cloud-dotnet,googleapis/google-cloud-dotnet,jskeet/gcloud-dotnet | apis/Google.Cloud.Compute.V1/Google.Cloud.Compute.V1/OperationToLroResponse.cs | apis/Google.Cloud.Compute.V1/Google.Cloud.Compute.V1/OperationToLroResponse.cs | // Copyright 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
//
// https://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in... | apache-2.0 | C# | |
d46802d44f66c23e334f457e893ae1779668938f | Add support for RAW SCPI commands | tparviainen/oscilloscope | SCPI/RAW.cs | SCPI/RAW.cs | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace SCPI
{
public class RAW : ICommand
{
public string Description => "Send a raw SCPI command to instrument";
public string Command(params string[] parameters)
{
if (parameters.Len... | mit | C# | |
f87d117f89fa972f3361ed5ceb0ee4924103f388 | Add some interesting tests into VSCode/CSProjDemo. | modulexcite/Demos-1,bridgedotnet/Demos,modulexcite/Demos-1,modulexcite/Demos-1,bridgedotnet/Demos,bridgedotnet/Demos,bridgedotnet/Demos,modulexcite/Demos-1,bridgedotnet/Demos | VSCode/CSProjDemo/Demo/Demo.cs | VSCode/CSProjDemo/Demo/Demo.cs | using Bridge.Html5;
namespace Demo
{
public class DemoClass
{
[Ready]
public static void Main()
{
Console.Log("Demo. Logged on console.");
var spanEl = new SpanElement()
{
InnerHTML = "If you can read this line, then bridge is workin... | using Bridge.Html5;
namespace Demo
{
public class DemoClass
{
[Ready]
public static void Main()
{
Console.Log("Demo. Logged on console.");
var spanEl = new SpanElement()
{
InnerHTML = "If you can read this line, then bridge is workin... | apache-2.0 | C# |
e25150adbc246e3024f106f7401bc43420eaf2b4 | Implement quick sort | cschen1205/cs-algorithms,cschen1205/cs-algorithms | Algorithms/Sorting/QuickSort.cs | Algorithms/Sorting/QuickSort.cs | using System;
using System.Collections.Concurrent;
using Algorithms.Utils;
namespace Algorithms.Sorting
{
public class QuickSort
{
public static void Sort<T>(T[] a) where T : IComparable<T>
{
Sort(a, 0, a.Length - 1, (a1, a2) => a1.CompareTo(a2));
}
public static v... | mit | C# | |
3489e6366c4b296451db696a5e9135f7e6d4b573 | Add Component details as property | sts-CAD-Software/PCB-Investigator-Scripts | Editing/AddComp_Property_w_h.cs | Editing/AddComp_Property_w_h.cs | //Synchronous template
//-----------------------------------------------------------------------------------
// PCB-Investigator Automation Script
// Created on 18.08.2016
// Autor Guenther
//
// Empty template to fill for synchronous script.
//------------------------------------------------------------------... | bsd-3-clause | C# | |
63a829c7e8d95094f60f474c2b8210814bdfc600 | Add Q278 | txchen/csharp-leet,txchen/csharp-leet | solutions/Q278.cs | solutions/Q278.cs | /* The isBadVersion API is defined in the parent class VersionControl.
bool IsBadVersion(int version); */
public class Solution : VersionControl {
public int FirstBadVersion(int n) {
int low = 1, high = n;
int answer = n;
while (low <= high)
{
int mid = low + (high... | mit | C# | |
2a1fbf12dd16a35532ff4705a101934c7a259ea3 | Create PooledGameObject.cs | drawcode/labs-unity | gameobjects/PooledGameObject.cs | gameobjects/PooledGameObject.cs | using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
// Just a holder to identify pooled objects, however ObjectPoolManager will destroy either
// Identification for GetComponentsInChildren<T>(true) for finding while inactive.
public class PoolGameObject : MonoBehaviour {
... | mit | C# | |
cdc679de467f9d23ca0f1be35551187365e9d45c | Create ED.cs | etormadiv/njRAT_0.7d_Stub_ReverseEngineering | j_csharp/OK/ED.cs | j_csharp/OK/ED.cs | //Reversed by Etor Madiv
public static void ED()
{
pr(0);
}
| unlicense | C# | |
f7a8c163037efc147d9b1af305891f5f775acfff | Add Q274 | txchen/csharp-leet,txchen/csharp-leet | solutions/Q274.cs | solutions/Q274.cs | public class Solution {
public int HIndex(int[] citations)
{
int[] count = new int[citations.Length + 1]; // counting sort, O(N) time O(N) space
for (int i = 0; i < citations.Length; i++)
{
if (citations[i] >= count.Length)
{
count[count.Length - 1... | mit | C# | |
ff36b94b7ea6c1c56d5eeba1760eb99ad852c4e0 | add treenode | codeyu/LeetCode,codeyu/LeetCode,codeyu/LeetCode | Algorithms/Utils/TreeNode.cs | Algorithms/Utils/TreeNode.cs | namespace Algorithms.Utils
{
public class TreeNode
{
public int Val{get;set;}
public TreeNode Left {get;set;}
public TreeNode Right{get;set;}
public TreeNode(int x)
{
Val = x;
}
}
} | mit | C# | |
4503e78afed564a4c9d17937fd35650f757177f2 | Add CCGroupCommand which allows for rendering of RenderCommands in a group. | zmaruo/CocosSharp,TukekeSoft/CocosSharp,haithemaraissia/CocosSharp,mono/CocosSharp,mono/CocosSharp,TukekeSoft/CocosSharp,MSylvia/CocosSharp,haithemaraissia/CocosSharp,MSylvia/CocosSharp,zmaruo/CocosSharp | src/Renderer/CCGroupCommand.cs | src/Renderer/CCGroupCommand.cs | using System;
namespace CocosSharp
{
public class CCGroupCommand : CCRenderCommand
{
internal bool Begin { get; set; }
public CCGroupCommand(float globalZOrder, bool begin = true )
: base (globalZOrder)
{
CommandType = CommandType.GROUP_COMMAND;
Beg... | mit | C# | |
5834bcf5731801d6c4cfba9f8cc17f7642df2027 | Create GlimpseRazorHost.cs | peterblazejewicz/Glimpse.Prototype,zanetdev/Glimpse.Prototype,pranavkm/Glimpse.Prototype,peterblazejewicz/Glimpse.Prototype,Glimpse/Glimpse.Prototype,peterblazejewicz/Glimpse.Prototype,mike-kaufman/Glimpse.Prototype,mike-kaufman/Glimpse.Prototype,mike-kaufman/Glimpse.Prototype,Glimpse/Glimpse.Prototype,peterblazejewicz... | src/Glimpse.Host.Web.AspNet/GlimpseRazorHost.cs | src/Glimpse.Host.Web.AspNet/GlimpseRazorHost.cs | using System.Collections.Generic;
using System.Linq;
using Microsoft.AspNet.Mvc.Razor;
using Microsoft.AspNet.Mvc.Razor.Directives;
using Microsoft.AspNet.Razor.Generator.Compiler;
namespace Glimpse.Host.Web.AspNet
{
public class GlimpseRazorHost : MvcRazorHost
{
public GlimpseRazorHost(ICodeTreeCache ... | mit | C# | |
b68a63ea530aac5763ccfe24089ae651861c4b95 | Add Initial Test | ajesusflores/IronMatrix | IronMatrix.Tests/InitialTest.cs | IronMatrix.Tests/InitialTest.cs | using System;
using Xunit;
using IronMatrix;
namespace IronMatrix.Tests
{
public class InitialTest
{
private readonly Vector algebraService;
public InitialTest()
{
algebraService = new Vector();
}
[Fact]
public void MustRunAndReturnValue()
... | mit | C# | |
28df06759adc08d3aebeadcffeed9d88991e3e04 | Fix the missing module for CineCameraActor. | qiuwch/unrealcv,unrealcv/unrealcv,qiuwch/unrealcv,unrealcv/unrealcv,qiuwch/unrealcv,qiuwch/unrealcv,unrealcv/unrealcv,unrealcv/unrealcv,unrealcv/unrealcv,qiuwch/unrealcv,qiuwch/unrealcv | Source/UnrealCV/UnrealCV.Build.cs | Source/UnrealCV/UnrealCV.Build.cs | // Copyright 1998-2016 Epic Games, Inc. All Rights Reserved.
using System.IO;
namespace UnrealBuildTool.Rules
{
public class UnrealCV: ModuleRules
{
public UnrealCV(TargetInfo Target)
{
// This is tricky from https://answers.unrealengine.com/questions/258689/how-to-include-private-header-files-of-oth... | // Copyright 1998-2016 Epic Games, Inc. All Rights Reserved.
using System.IO;
namespace UnrealBuildTool.Rules
{
public class UnrealCV: ModuleRules
{
public UnrealCV(TargetInfo Target)
{
// This is tricky from https://answers.unrealengine.com/questions/258689/how-to-include-private-header-files-of-oth... | mit | C# |
085483fa67f8243c4a3593f165f259a97cfeca4c | add library administrator table | CVBDL/RALibraryServer | RaLibrary/Models/LibraryAdmin.cs | RaLibrary/Models/LibraryAdmin.cs | using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Web;
namespace RaLibrary.Models
{
public class LibraryAdmin
{
public int Id { get; set; }
[Required]
[MaxLength(50)]
public string Name { get; set; }
... | mit | C# | |
43c678176c382f0f2d6ee35f36776280a82f7ec6 | Add what's that song script | mmbot/mmbot.scripts | scripts/Music/PlayMe.csx | scripts/Music/PlayMe.csx |
var robot = Require<Robot>();
var baseUri = robot.GetConfigVariable("MMBOT_PLAYME_URL");
if(baseUri != null && !baseUri.EndsWith("/")){
baseUri = baseUri + "/";
}
robot.Respond(@"what'?s that song\??", msg => {
msg.Http(baseUri + "Queue/CurrentTrack")
.GetJson((err, res, body) => {
try{
... | apache-2.0 | C# | |
da8b359ad85d0e8d77a49b29518a60b51ff0b957 | Add a helpful EmailBuilder (fluent interface). | brendanjbaker/Bakery | src/Bakery/Mail/EmailBuilder.cs | src/Bakery/Mail/EmailBuilder.cs | namespace Bakery.Mail
{
using System;
using System.Collections.Generic;
public class EmailBuilder
{
private String body;
private ICollection<IEmailHeader> headers;
private ICollection<IEmailRecipient> recipients;
private IEmailAddress sender;
private String subject;
private EmailBuilder(... | mit | C# | |
28dd5525874b7fb2d19ff02d66db2d42e0ebc358 | add SDK_DIR | galek/crown,mikymod/crown,dbartolini/crown,taylor001/crown,mikymod/crown,dbartolini/crown,galek/crown,dbartolini/crown,galek/crown,mikymod/crown,galek/crown,taylor001/crown,taylor001/crown,taylor001/crown,dbartolini/crown,mikymod/crown | tools/gui/starter/MainWindow.cs | tools/gui/starter/MainWindow.cs | using System;
using Gtk;
using System;
public partial class MainWindow: Gtk.Window
{
public const string SDK_DIR = Environment.GetEnvironmentVariable ("CROWN_INSTALLATION_DIR");
public string project_name;
public string source_path;
public string destination_path;
public MainWindow () : base (Gtk.WindowType.To... | using System;
using Gtk;
public partial class MainWindow: Gtk.Window
{
public string project_name;
public string source_path;
public string destination_path;
public MainWindow () : base (Gtk.WindowType.Toplevel)
{
Build ();
}
protected void OnDeleteEvent (object sender, DeleteEventArgs a)
{
Application.... | mit | C# |
ff411da24368ee326172dfbb3fc484136b82b723 | add a BaseView type for instantiating viewmodels | wislon/xam-akavache-test | src/AkavacheTest/Views/BaseView.cs | src/AkavacheTest/Views/BaseView.cs | using System;
using Android.OS;
using ReactiveUI;
namespace AkavacheTest.Views
{
public class BaseView<T> : ReactiveActivity<T> where T : ReactiveObject
{
protected override void OnCreate(Bundle savedInstanceState)
{
base.OnCreate(savedInstanceState);
ViewModel = (T)Activator.CreateInstance (typeof ... | mit | C# | |
4a13f639957eaa7308c0d020600009455e095d45 | Add filters | ValeriyH/training,ValeriyH/training,ValeriyH/training,ValeriyH/training,ValeriyH/training | WebAPI/WebAPISelfHost/Handlers/ModelValidationFilter.cs | WebAPI/WebAPISelfHost/Handlers/ModelValidationFilter.cs | using System.Net;
using System.Net.Http;
using System.Web.Http.Controllers;
using System.Web.Http.Filters;
namespace WebAPISelfHost.Handlers
{
class ModelValidationFilter : ActionFilterAttribute
{
public override void OnActionExecuting(HttpActionContext actionContext)
{
... | mit | C# | |
2dabea17f5231c36fb77ca3fcce7e8106dd501ec | Create OutputBox.cs | myuulius/omega-kawaii-animeDB,myuulius/omega-kawaii-animeDB | OutputBox.cs | OutputBox.cs | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Controls;
using System.IO;
namespace kawaii_animedb
{
public class OutputBox : TextWriter
{
TextBox textBox = null;
public OutputBox(TextBox output)
... | bsd-2-clause | C# | |
cd5307c865edaa103a026347bcf8ed927f030145 | Create Product12.cs | neilopet/projecteuler_cs | Product12.cs | Product12.cs | /*
* Problem #12
The sequence of triangle numbers is generated by adding the natural numbers. So the 7th triangle number would be 1 + 2 + 3 + 4 + 5 + 6 + 7 = 28. The first ten terms would be:
1, 3, 6, 10, 15, 21, 28, 36, 45, 55, ...
Let us list the factors of the first seven triangle numbers:
1: 1
3: 1,3
6: 1,2,... | mit | C# | |
a9359c2359cd21f3ac75055648437061cb47a95c | add StreamHelper | ssg/SimpleBase,ssg/SimpleBase,ssg/SimpleBase32 | src/StreamHelper.cs | src/StreamHelper.cs | // <copyright file="StreamHelper.cs" company="Sedat Kapanoglu">
// Copyright (c) 2014-2019 Sedat Kapanoglu
// Licensed under Apache-2.0 License (see LICENSE.txt file for details)
// </copyright>
namespace SimpleBase
{
using System;
using System.IO;
using System.Threading.Tasks;
/// <summary>
/// ... | apache-2.0 | C# | |
b104136a5c9936f065e57fcf02c500c4ff6c9f2d | Create KiteChat.cs | LassieME/KiteBot | ConsoleApplication1/KiteChat.cs | ConsoleApplication1/KiteChat.cs | using System;
using System.IO;
using System.Collections.Generic;
namespace KiteBot
{
public class KiteChat
{
public static Random _randomSeed;
public static string[] _greetings;
public static string[] _responses;
public static string ChatDirectory = Directory.GetParent(AppDoma... | mit | C# | |
52dec5e4693f3f51633cbe7ffe02bde397215e17 | Add Whisper class. | AIWolfSharp/AIWolf_NET,AIWolfSharp/AIWolfCore | AIWolfLib/Whisper.cs | AIWolfLib/Whisper.cs | //
// Whisper.cs
//
// Copyright (c) 2016 Takashi OTSUKI
//
// This software is released under the MIT License.
// http://opensource.org/licenses/mit-license.php
//
using Newtonsoft.Json;
namespace AIWolf.Lib
{
public class Whisper : Talk
{
/// <summary>
/// Initializes a new instance of this... | mit | C# | |
883fcd2e3124871de7fa8fd8ba57fdbdd736c9f6 | Update state to be used after redirect | davidebbo/SimpleWAWS,projectkudu/SimpleWAWS,projectkudu/TryAppService,projectkudu/TryAppService,projectkudu/SimpleWAWS,projectkudu/TryAppService,projectkudu/SimpleWAWS,davidebbo/SimpleWAWS,fashaikh/SimpleWAWS,projectkudu/SimpleWAWS,fashaikh/SimpleWAWS,projectkudu/TryAppService,davidebbo/SimpleWAWS,fashaikh/SimpleWAWS,f... | SimpleWAWS/Authentication/GoogleAuthProvider.cs | SimpleWAWS/Authentication/GoogleAuthProvider.cs | using System;
using System.Collections.Generic;
using System.Configuration;
using System.Globalization;
using System.Linq;
using System.Net;
using System.Text;
using System.Web;
namespace SimpleWAWS.Authentication
{
public class GoogleAuthProvider : BaseOpenIdConnectAuthProvider
{
public override stri... | using System;
using System.Collections.Generic;
using System.Configuration;
using System.Globalization;
using System.Linq;
using System.Net;
using System.Text;
using System.Web;
namespace SimpleWAWS.Authentication
{
public class GoogleAuthProvider : BaseOpenIdConnectAuthProvider
{
public override stri... | apache-2.0 | C# |
eff833b9d65c9913d1db1657e46e7b4ba2df2f68 | Add sample that shows how to add editing support to a DialogViewController | danmiser/MonoTouch.Dialog,newky2k/MonoTouch.Dialog,migueldeicaza/MonoTouch.Dialog,jstedfast/MonoTouch.Dialog,Milan1992/MonoTouch.Dialog,ClusterReplyBUS/MonoTouch.Dialog,benoitjadinon/MonoTouch.Dialog,hisystems/MonoTouch.Dialog | Sample/DemoEditing.cs | Sample/DemoEditing.cs | using System;
using MonoTouch.UIKit;
using MonoTouch.Foundation;
using MonoTouch.Dialog;
using System.Threading;
namespace Sample
{
//
// To support editing, you need to subclass the DialogViewController and provide
// your own "Source" classes (which you also have to subclass).
//
// There are two source classe... | mit | C# | |
ff556af6d8343c09c6987d5e429ffe10d3026d66 | Create empty folder | lizaamini/CSharpExercises | Sheet-4/Exercise4A.cs | Sheet-4/Exercise4A.cs | mit | C# | ||
acd6b59bb8267ff64a7793f8dcf477c17fbf12d5 | Patch entry test coverage. | PKRoma/libgit2sharp,Zoxive/libgit2sharp,libgit2/libgit2sharp,Zoxive/libgit2sharp | LibGit2Sharp.Tests/PatchEntryChangesFixture.cs | LibGit2Sharp.Tests/PatchEntryChangesFixture.cs | using System;
using System.IO;
using System.Linq;
using System.Text;
using LibGit2Sharp.Tests.TestHelpers;
using Xunit;
using Xunit.Extensions;
namespace LibGit2Sharp.Tests
{
public class PatchEntryChangesFixture : BaseFixture
{
[Fact]
public void PatchEntryBasics()
{
// Init test repo
var... | mit | C# | |
ab5a52d035f81beb733e987cda83344bba36a3cd | Create ObjectRecycler.cs | drawcode/labs-unity | gameobjects/ObjectRecycler.cs | gameobjects/ObjectRecycler.cs | using System.Collections;
using UnityEngine;
/**
* Basic usage with an example of a bullet. Assume spawnerPrefab is a bullet prefab and recycler is an ivar.
*
* Start:
recycler = new ObjectRecycler( spawnerPrefab, 10 );
Shoot:
// Grab the next free object from our recycler
GameObject b... | mit | C# | |
3c9281ac1f7b888ed775d7888fa4568e388edef2 | Modify File userAuth/Droid/Resources/AltActivity.cs | ARCNanotech/userAuthenticate,ARCNanotech/userAuthenticate,ARCNanotech/userAuthenticate,ARCNanotech/userAuthenticate,ARCNanotech/userAuthenticate,ARCNanotech/userAuthenticate,ARCNanotech/userAuthenticate,ARCNanotech/userAuthenticate | userAuth/Droid/Resources/AltActivity.cs | userAuth/Droid/Resources/AltActivity.cs |
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Android.App;
using Android.Content;
using Android.OS;
using Android.Runtime;
using Android.Views;
using Android.Widget;
namespace userAuth.Droid
{
[BroadcastReceiver (Label = "userAuth.Droid", Icon = "@drawable/icon", AltLa... | mit | C# | |
66b295fd62edd32e1fb681e67f96b03a044f9a12 | 添加了一个Button控件。 | Zongsoft/Zongsoft.Web | src/Controls/Button.cs | src/Controls/Button.cs | /*
* Authors:
* 钟峰(Popeye Zhong) <zongsoft@gmail.com>
*
* Copyright (C) 2015 Zongsoft Corporation <http://www.zongsoft.com>
*
* This file is part of Zongsoft.Web.
*
* Zongsoft.Web is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as publ... | lgpl-2.1 | C# | |
74189b3c68735632535b1b48fb83c292fffe8b0f | Create Scanner.cs | Code-017/WindLang | Source/Scanner.cs | Source/Scanner.cs | using System;
namespace WindLang
{
namespace Lexer
{
public class PublicExchanger
{
public static Token Exchange(RawToken raw)
{
if(raw.Lexeme == "("){
return new Token(TokenType.LParen);
}else if(raw.Lexeme == ")"){
... | mit | C# | |
7eb5d529238718146f149db4e620aa4de54a23ae | Create 1XORproblem.cs | iitjee/SteppinsMachineLearning,iitjee/SteppinsMachineLearning,iitjee/SteppinsMachineLearning | ENCOG/1XORproblem.cs | ENCOG/1XORproblem.cs | using Encog.Engine.Network.Activation;
using Encog.ML.Data.Basic;
using Encog.Neural.Networks;
using Encog.Neural.Networks.Layers;
using Encog.Neural.Networks.Training.Propagation.Resilient;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace XO... | apache-2.0 | C# | |
c65154303f31cb93d79504942064ecfd57531d9e | Create lesson2_1.cs | AndrewTurlanov/ANdrew | lesson2_1.cs | lesson2_1.cs | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace ConsoleApp1
{
class Program
{
static void Main(string[] args)
{
ConsoleKey playerKey = Console.ReadKey(true).Key;
int x = 0, y = 0;
while (playerKey == ConsoleKe... | apache-2.0 | C# | |
7c163203ad824a887bda610b181da68efb5b7775 | Create AiPlayer.cs | jon-lad/Battlefleet-Gothic | Players/AiPlayer.cs | Players/AiPlayer.cs | using UnityEngine;
using System.Collections;
public class AIPlayer : Player {
// Use this for initialization
void Start () {
}
// Update is called once per frame
public override void Update () {
base.Update ();
}
public override void TurnUpdate() {
base.TurnUpdate ();
}
public override IEnumerator... | mit | C# | |
44dc2a9e11d8a14845f6b92f157ebc93c5cd6efe | bump framework to re-enable Actions tests for non-Windows environments (#2071) | shiftkey/octokit.net,adamralph/octokit.net,octokit/octokit.net,shiftkey/octokit.net,octokit/octokit.net | build/Context.cs | build/Context.cs | using Cake.Common;
using Cake.Common.Diagnostics;
using Cake.Common.Tools.DotNetCore.Test;
using Cake.Core;
using Cake.Core.IO;
using Cake.Frosting;
public class Context : FrostingContext
{
public string Target { get; set; }
public string Configuration { get; set; }
public bool LinkSources { get; set; }
... | using Cake.Common;
using Cake.Common.Diagnostics;
using Cake.Common.Tools.DotNetCore.Test;
using Cake.Core;
using Cake.Core.IO;
using Cake.Frosting;
public class Context : FrostingContext
{
public string Target { get; set; }
public string Configuration { get; set; }
public bool LinkSources { get; set; }
... | mit | C# |
fd422d44fee4324851f6b20b7202ba7106980a19 | Create App.xaml.cs | wieslawsoltes/Draw2D,wieslawsoltes/Draw2D,wieslawsoltes/Draw2D | src/Draw2D.NetCore/App.xaml.cs | src/Draw2D.NetCore/App.xaml.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 Avalonia;
using Avalonia.Markup.Xaml;
namespace Draw2D.NetCore
{
public class App : Application
{
public override void Initialize()
... | mit | C# | |
9a835fa448a3862d24b40334fd30c706c307c744 | Create TimeConvert.cs | michaeljwebb/Algorithm-Practice | Coderbyte/TimeConvert.cs | Coderbyte/TimeConvert.cs | using System;
class MainClass {
public static string TimeConvert(int num) {
int numHours = num / 60;
int numMins = num % 60;
return numHours.ToString() + ":" + numMins.ToString();
}
static void Main() {
// keep this function call here
Console.WriteLine(TimeConvert(Console.ReadLine()));
... | mit | C# | |
ccab7f85b190b2e8929f1f2adf79057ac4b38261 | Create SpriteBase.cs | Moci1/ColorBox | SpriteBase.cs | SpriteBase.cs | using System;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
namespace ColorBox
{
public delegate void ValidHandler(object sender, ValidEventArgs e);
public class SpriteBase
{
Texture2D texture;
public Color[] ColorArray { get; private set; }
public Vector2 Size { get; private set; }
... | mit | C# | |
a7daf5910e71b90f966b0a43031dacd5cbd4fc8b | Bump Version 0.1.3 | celeron533/KeepOn | KeepOn/Properties/AssemblyInfo.cs | KeepOn/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: AssemblyTi... | 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: AssemblyTi... | mit | C# |
2b14e84b0d426550d606ae54062f2cda8677b28b | Create Problem57.cs | fireheadmx/ProjectEuler,fireheadmx/ProjectEuler | Problems/Problem57.cs | Problems/Problem57.cs | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data;
namespace ProjectEuler.Problems
{
class Problem57
{
private int upper = 1000;
private decimal Evaluate(string expression)
{
DataTable table = new DataTable();
... | mit | C# | |
f99dcb3eda9397e26619e56c799ad960e428ee85 | 添加 Reader.cs | wangzhongyu1997/Reader-for-Csharp | Reader.cs | Reader.cs | using System;
using System.Collections.Generic;
/**
*
* Reader类:帮助你从一行输入中读取 用空格或制表符隔开的 数字或字符串,(类似于C++中cin 对象)
*
* 示例:
* 输入一行 15 17.0 ppp
* int a=Reader.nextInt(); //a=15
* float b=Reader.nextFloat(); //b=17.0
* string s=Reader.nextStr(); //s="ppp"
*
* 作者:王中玉 信1501-2
* 日期:2017.10.13
* 警... | mit | C# | |
0000eb187bc6b6a67496dcc0f658d19e7951d119 | Bump version | GDoronin/FluentValidation,robv8r/FluentValidation | src/CommonAssemblyInfo.cs | src/CommonAssemblyInfo.cs | using System.Reflection;
[assembly : AssemblyVersion("6.2.0.0")]
[assembly : AssemblyFileVersion("6.2.0.0")] | using System.Reflection;
[assembly : AssemblyVersion("6.1.0.0")]
[assembly : AssemblyFileVersion("6.1.0.0")] | apache-2.0 | C# |
c3dede8d7b4fae21bde5732499d562a190fd7d4f | Create basic-exercises.cs | jesushilarioh/Questions-and-Exercises-in-C-Sharp | basic-exercises.cs | basic-exercises.cs | using System;
public class Program
{
public static void Main()
{
/*
* Examples from w3resource.com -
* C# Sharp Basic Exercises
* [53 exercises with soluction}
*/
// 1. Write a C# Sharp Program to print "Hello" and your name on a separate line.
Console.WriteLine("Hello: ");
Console.WriteLi... | mit | C# | |
558d87123cb81f876802db639dbbabc3ac7b08d6 | Create StringNullToVisibilityConverter.cs | UnstableMutex/WPF.Converters | StringNullToVisibilityConverter.cs | StringNullToVisibilityConverter.cs | class StringNullToVisibilityConverter
{
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
{
return string.IsNullOrEmpty((string)value) ? Visibility.Collapsed : Visibility.Visible;
}
public object ConvertBack(object value, Typ... | mit | C# | |
39614d7a9974c8fcb0fe0b771c8ac46873f631a3 | Create sm_example.cs | burnsba/scratch,burnsba/scratch,burnsba/scratch | FiniteStateMachine/sm_example.cs | FiniteStateMachine/sm_example.cs | // see sm.png for graphical representation
var fsm = new FiniteStateMachine();
var s1 = new State();
s1.Value = "state 1";
var s2 = new State();
s2.Value = "state 2";
var s3 = new State();
s3.Value = "fin";
s3.CanTransition = false;
var s1_c = new StateTransitionCriteria();
s1_c.NextState = s2;
s1_c.Predicate = x ... | apache-2.0 | C# | |
6f587c034614543fbbd4e0d339c878be1852c513 | Add JSON RPC | mage/mage-sdk-unity,AlmirKadric/mage-sdk-unity | JSONRPC/JSONRPC.cs | JSONRPC/JSONRPC.cs | using System;
using System.Collections.Generic;
using System.Net;
using System.IO;
using System.Text;
using Newtonsoft.Json.Linq;
public class JSONRPC {
private string _endpoint;
// Basic authentication
private string _username;
private string _password;
public void setEndpoint(string endpoint, string usernam... | mit | C# | |
bf2ac6ad3fe85e46eb9d28f94df4db0fecfa11f8 | Allow extending translations | bussemac/n2cms,VoidPointerAB/n2cms,VoidPointerAB/n2cms,EzyWebwerkstaden/n2cms,n2cms/n2cms,bussemac/n2cms,nicklv/n2cms,SntsDev/n2cms,n2cms/n2cms,EzyWebwerkstaden/n2cms,nicklv/n2cms,DejanMilicic/n2cms,EzyWebwerkstaden/n2cms,DejanMilicic/n2cms,DejanMilicic/n2cms,nimore/n2cms,nicklv/n2cms,bussemac/n2cms,VoidPointerAB/n2cms... | src/Mvc/MvcTemplates/N2/Web/AngularLocalizationHandler.cs | src/Mvc/MvcTemplates/N2/Web/AngularLocalizationHandler.cs | using N2.Web;
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Web;
using System.Web.Hosting;
namespace N2.Management.Web
{
public class AngularLocalizationHandler : IHttpHandler
{
public bool IsReusable
{
get { return true; }
}
public voi... | using N2.Web;
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Web;
using System.Web.Hosting;
namespace N2.Management.Web
{
public class AngularLocalizationHandler : IHttpHandler
{
public bool IsReusable
{
get { return true; }
}
public voi... | lgpl-2.1 | C# |
4f8db212b52651362483c548d030b7567d74b646 | Add basic engine interface | SirNanoCat/nano-tile-engine | Nano/Engine/INanoEngine.cs | Nano/Engine/INanoEngine.cs | using System;
namespace Nano.Engine
{
public interface INanoEngine
{
int TileHeight { get; }
int TileWidth { get; }
}
}
| mit | C# | |
c42258cfacf964476a64cf1aca5f157a6a0ab5cd | Add SessionStateInternal.Drives() xUnit test | jsoref/PowerShell,daxian-dbw/PowerShell,JamesWTruher/PowerShell-1,kmosher/PowerShell,bingbing8/PowerShell,PaulHigin/PowerShell,KarolKaczmarek/PowerShell,PaulHigin/PowerShell,bmanikm/PowerShell,jsoref/PowerShell,bingbing8/PowerShell,KarolKaczmarek/PowerShell,bmanikm/PowerShell,daxian-dbw/PowerShell,kmosher/PowerShell,Ja... | test/csharp/test_SessionState.cs | test/csharp/test_SessionState.cs | using Xunit;
using System;
using System.Collections;
using System.Collections.ObjectModel;
using System.Globalization;
using System.Management.Automation;
using System.Management.Automation.Host;
using System.Management.Automation.Internal;
using System.Management.Automation.Internal.Host;
using System.Management.Autom... | mit | C# | |
5354f490b2cbd6dcc7f72c2ba8aa606dd72d013a | add shooter game scripts | slevin/experiements,slevin/experiements,slevin/experiements,slevin/experiements,slevin/experiements,slevin/experiements,slevin/experiements,slevin/experiements,slevin/experiements | unity/shooter/PlayerController.cs | unity/shooter/PlayerController.cs | using UnityEngine;
using System.Collections;
[System.Serializable]
public class Boundary {
public float xMin;
public float xMax;
public float zMin;
public float zMax;
}
public class PlayerController : MonoBehaviour {
public float speed;
public Boundary boundary;
public float tilt;
void FixedUpdate() {
fl... | unlicense | C# | |
e8602379292360795b60d0d4173447b682dd3f2d | Add tests for 'HttpClient' | InfiniteSoul/Azuria | Azuria.Test/Requests/HttpClientTest.cs | Azuria.Test/Requests/HttpClientTest.cs | using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading;
using System.Threading.Tasks;
using Autofac;
using Azuria.ErrorHandling;
using Azuria.Requests.Http;
using Newtonsoft.Json.Linq;
using Xunit;
namespace Azuria.Test.Requests
{
public class HttpClientTest
{
private... | mit | C# | |
41695281accaf250962e54ad3f6ad2a58d442b7d | add curency | dataccountzXJ9/Lynx | Lynx/Modules/Currency.cs | Lynx/Modules/Currency.cs | using Discord.Commands;
using System;
using System.Collections.Generic;
using System.Text;
using System.Drawing;
using System.Threading.Tasks;
namespace Lynx.Modules
{
public class Currency : ModuleBase
{
static Random RNG = new Random();
}
}
| mit | C# | |
5fc6c85abbf4754935e7d54ffbbb2ecb04b27bf2 | Create User.cs | Longfld/ASPNETcoreAngularJWT,Longfld/ASPNETcoreAngularJWT,Longfld/ASPNETcoreAngularJWT,Longfld/ASPNETcoreAngularJWT | Common/User.cs | Common/User.cs | using System;
namespace ASPNETCoreAngularJWT
{
public class User
{
public Guid ID { get; set; }
public string Username { get; set; }
public string Password { get; set; }
public string Fname {get;set;}
public string Lname {get;set;}
}
}
| mit | C# | |
8ff362668fb7027fc049285106d29d03f35dae1a | Fix on User table migration | daywrite/aspnetboilerplate,lvjunlei/aspnetboilerplate,chenkaibin/aspnetboilerplate,ZhaoRd/aspnetboilerplate,carldai0106/aspnetboilerplate,LenFon/aspnetboilerplate,4nonym0us/aspnetboilerplate,dVakulen/aspnetboilerplate,virtualcca/aspnetboilerplate,aspnetboilerplate/aspnetboilerplate,carldai0106/aspnetboilerplate,AntTech... | src/Abp/Modules/Core/Abp.Modules.Core.Infrastructure.Data.NHibernate/Data/Migrations/V20130824/_02_CreateAbpUsersTable.cs | src/Abp/Modules/Core/Abp.Modules.Core.Infrastructure.Data.NHibernate/Data/Migrations/V20130824/_02_CreateAbpUsersTable.cs | using FluentMigrator;
namespace Abp.Modules.Core.Data.Migrations.V20130824
{
[Migration(2013082402)]
public class _02_CreateAbpUsersTable : Migration
{
public override void Up()
{
Create.Table("AbpUsers")
.WithColumn("Id").AsInt32().NotNullable().PrimaryKey().Id... | using FluentMigrator;
namespace Abp.Modules.Core.Data.Migrations.V20130824
{
[Migration(2013082402)]
public class _02_CreateAbpUsersTable : Migration
{
public override void Up()
{
Create.Table("AbpUsers")
.WithColumn("Id").AsInt32().NotNullable().PrimaryKey().Id... | mit | C# |
5cc728bef7b3fef7982c8b82a1eab84115a93e63 | Create ucl.cs | ChelseaStats/19thMayBot,ChelseaStats/19thMayBot | ucl.cs | ucl.cs | using System;
using System.Configuration;
using System.IO;
using System.Net;
using System.Threading;
namespace ucl
{
public class Program
{
private static void Main(string[] args)
{
var consumerKey = ConfigurationManager.AppSettings["consumerKey"];
var consumerKeySecret ... | unlicense | C# | |
af27ed178a970b9a9aa321d14734782d950a1e12 | Create ThrusterEmitterController.cs | highnet/Java-101,highnet/Java-101 | Unity/ThrusterEmitterController.cs | Unity/ThrusterEmitterController.cs | using UnityEngine;
using System.Collections;
public class ThrusterEmitterController : MonoBehaviour {
ParticleSystem ps;
AudioSource ac;
// Use this for initialization
void Start () {
ps = GetComponent<ParticleSystem>();
ac = GetComponent<AudioSource>();
}
// Update is called once per... | mit | C# | |
17b6af23c07cfb884edeaa1061ef7d616929fd03 | Copy test helper from main project | AngleSharp/AngleSharp.Io,AngleSharp/AngleSharp.Io,AngleSharp/AngleSharp.Io | AngleSharp.Io.Tests/Helper.cs | AngleSharp.Io.Tests/Helper.cs | namespace AngleSharp.Core.Tests
{
using NUnit.Framework;
using System;
using System.IO;
using System.Net.NetworkInformation;
/// <summary>
/// Small (but quite useable) code to enable / disable some
/// test(s) depending on the current network status.
/// Taken from
/// http://stac... | mit | C# | |
004d5848df782316f5793b536eb707a11869e921 | Create Settings.cs | Armdroid/Armdroid-Tools-Windows | ArmdroidTools/ArmTest/Settings.cs | ArmdroidTools/ArmTest/Settings.cs | namespace ArmdroidTools.ArmTest.Properties {
// This class allows you to handle specific events on the settings class:
// The SettingChanging event is raised before a setting's value is changed.
// The PropertyChanged event is raised after a setting's value is changed.
// The SettingsLoaded... | mit | C# | |
2f91bdb295e742a0b6a86c5157f504bc6f4c475f | Create _HeaderInjector.cshtml | Bjorn-3wPortal/3wPortal.HeaderInjector | _HeaderInjector.cshtml | _HeaderInjector.cshtml | @using DotNetNuke.Web.Client.ClientResourceManagement;
@{
@*
Config
-
Role name is case sensitive
*@
var myRole01 = "Marenor Users";
@* var skinPath01 = Dnn.Tab.SkinPath; *@
string skinPath02 = "/DesktopModules/Net3wPortal.HeaderInjector/";
string cssName = skinPath02 + "editorSimpleView.css";
}
@*
... | mit | C# | |
224d80f52247617f639298d8b12ef888ec59c547 | add validation and fix payments service with async | paymill/paymill-net,paymill/paymill-net | PaymillWrapper/Service/ValidationUtils.cs | PaymillWrapper/Service/ValidationUtils.cs | using PaymillWrapper.Models;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace PaymillWrapper.Service
{
internal class ValidationUtils
{
static void ValidatesId(String id)
{
if (String.IsNullOrWhiteSpace(i... | mit | C# | |
68289a75672c27169429dba9b82dd12625c2a035 | Fix type parameter name. | ronnymgm/csla-light,BrettJaner/csla,BrettJaner/csla,ronnymgm/csla-light,rockfordlhotka/csla,JasonBock/csla,MarimerLLC/csla,MarimerLLC/csla,ronnymgm/csla-light,MarimerLLC/csla,BrettJaner/csla,JasonBock/csla,rockfordlhotka/csla,rockfordlhotka/csla,jonnybee/csla,jonnybee/csla,JasonBock/csla,jonnybee/csla | cslalightcs/Csla/ReadOnlyBase.cs | cslalightcs/Csla/ReadOnlyBase.cs | using System;
using Csla.Serialization;
using Csla.Core;
using Csla.Core.FieldManager;
namespace Csla
{
[Serializable]
public class ReadOnlyBase<T> : Csla.Core.MobileObject
where T : ReadOnlyBase<T>
{
#region FieldManager
private FieldDataManager _fieldManager;
public static Pro... | using System;
using Csla.Serialization;
using Csla.Core;
using Csla.Core.FieldManager;
namespace Csla
{
[Serializable]
public class ReadOnlyBase<T> : Csla.Core.MobileObject
where T : ReadOnlyBase<T>
{
#region FieldManager
private FieldDataManager _fieldManager;
public static Pro... | mit | C# |
b332caa1dc58911437014d93ca782f7c372a4082 | Fix StudioForm Missing | samuelGrahame/ExpressCraft,samuelGrahame/ExpressCraft,samuelGrahame/ExpressCraft | ExpressCraftDesign/StudioForm.cs | ExpressCraftDesign/StudioForm.cs | using ExpressCraft;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ExpressCraftDesign
{
public class StudioForm : Form
{
public RibbonControl ribbonControl;
public TabControl tabControl1;
public StudioForm()
{
ribbonControl =... | apache-2.0 | C# | |
c802e701cd58e6e84377073c1a7d3ef11ddefddf | Add missing ChartTimeSpan class. | avatar29A/Last.fm | src/Hqub.Lastfm/ChartTimeSpan.cs | src/Hqub.Lastfm/ChartTimeSpan.cs | namespace Hqub.Lastfm
{
using System;
/// <summary>
/// A time span of a weekly chart.
/// </summary>
public class ChartTimeSpan
{
/// <summary>
/// The beginning date.
/// </summary>
public DateTime From { get; set; }
/// <summary>
/// The end d... | mit | C# | |
c18d87488428e2b4610026b93d97c05abd0ff123 | Add GenericComaprer | tomgrv/pa.toolbox,perspicapps/toolbox,perspicapps/toolbox | PA.Converters/GenericComparer.cs | PA.Converters/GenericComparer.cs | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace PA.Converters
{
public class GenericCompare<T> : IEqualityComparer<T> where T : class
{
private Func<T, object> select { get; set; }
public GenericCompare(Func<T, obje... | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace PA.Converters
{
public class GenericCompare<T> : IEqualityComparer<T> where T : class
{
private Func<T, object> select { get; set; }
public GenericCompare(Func<T, obje... | mit | C# |
019ee16309ea69b0afa1e2e101f477d7abce4dd3 | Index added | VladimirLeskin/apmathAzureCloudWebApp,VladimirLeskin/apmathAzureCloudWebApp | site/index.cshtml | site/index.cshtml | @{
var txt = DateTime.Now;
}
<html>
<body>
<p>The dateTime is @txt</p>
</body>
</html> | mit | C# | |
124f66383a38c06fa1d1a83e96e39a77d4d29950 | Add YoutubeModule | Auxes/Dogey | src/Dogey/Modules/YoutubeModule.cs | src/Dogey/Modules/YoutubeModule.cs | using Discord.Commands;
using System.Threading.Tasks;
namespace Dogey.Modules
{
[Group("youtube"), Alias("yt")]
public class YoutubeModule : ModuleBase<SocketCommandContext>
{
[Command]
public Task BaseAsync()
=> new HelpModule().HelpAsync(Context, "youtube");
[Command... | apache-2.0 | C# | |
8f7ec3200376afffe4abebe0ccb8424beb1fe899 | Create cs7test.cs | imba-tjd/CSharp-Code-Repository | 单个文件的程序/cs7test.cs | 单个文件的程序/cs7test.cs | using static System.Console;
class Test
{
static void Main() { }
object o = 1;
void F0()
{
// normal usage
if (o is int i)
WriteLine(i);
}
void F1()
{
if (o is int i)
WriteLine(i);
else
WriteLine(i); // Use of unassigned ... | mit | C# | |
56a3e4c7a9d5fa9d89211ed29e73257a7bb0d946 | Update PushResponse.cs | moonpyk/FireSharp,4nthonylin/FireSharp,moonpyk/FireSharp,ziyasal/FireSharp,4nthonylin/FireSharp,moonpyk/FireSharp,ziyasal/FireSharp,4nthonylin/FireSharp,ziyasal/FireSharp | FireSharp/Response/PushResponse.cs | FireSharp/Response/PushResponse.cs | using System.Net;
using System.Net.Http;
namespace FireSharp.Response
{
public class PushResponse : FirebaseResponse
{
public PushResponse(string body, HttpStatusCode statusCode, HttpResponseMessage httpResponse)
: base(body, statusCode, httpResponse)
{
}
public Pu... | using System.Net;
using System.Net.Http;
namespace FireSharp.Response
{
public class PushResponse : FirebaseResponse
{
public PushResponse(string body, HttpStatusCode statusCode, HttpResponseMessage httpResponse)
: base(body, statusCode, httpResponse)
{
}
public Pu... | mit | C# |
e3144f80a9bdec9f4615816ea91da6de63b8c665 | Update #283 - Introduced an Initializer for EF so that things can be setup before client triggers EF setup code | dudzon/Glimpse,codevlabs/Glimpse,dudzon/Glimpse,gabrielweyer/Glimpse,sorenhl/Glimpse,elkingtonmcb/Glimpse,rho24/Glimpse,paynecrl97/Glimpse,rho24/Glimpse,elkingtonmcb/Glimpse,Glimpse/Glimpse,gabrielweyer/Glimpse,SusanaL/Glimpse,flcdrg/Glimpse,codevlabs/Glimpse,SusanaL/Glimpse,gabrielweyer/Glimpse,Glimpse/Glimpse,elkingt... | source/Glimpse.EF/Initialize.cs | source/Glimpse.EF/Initialize.cs | using Glimpse.EF.Inspector.Core;
namespace Glimpse.EF
{
public static class Initialize
{
public static void EF(this Glimpse.Core.Setting.Initializer initializer)
{
var wrapper = new WrapDbConfigurationDbConnectionFactory();
wrapper.Execute();
}
}
}
| apache-2.0 | C# | |
55bd294705ae6bae9403a75bda4b20515d727299 | Add benchmark | peppy/osu-framework,ppy/osu-framework,peppy/osu-framework,ppy/osu-framework,ppy/osu-framework,peppy/osu-framework | osu.Framework.Benchmarks/BenchmarkInvalidationList.cs | osu.Framework.Benchmarks/BenchmarkInvalidationList.cs | // Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
using BenchmarkDotNet.Attributes;
using osu.Framework.Graphics;
using osu.Framework.Layout;
namespace osu.Framework.Benchmarks
{
public class BenchmarkInvalidationLi... | mit | C# | |
c17ed719d2115cfae0e0a89662ebc24d164905c6 | add helper to assist serializing models into http content for requests | mzrimsek/resume-site-api | Test.Integration/Helpers/RequestHelper.cs | Test.Integration/Helpers/RequestHelper.cs | using System.Net.Http;
using Newtonsoft.Json;
namespace Test.Integration.Helpers
{
public static class RequestHelper
{
public static HttpContent GetContentFromObject(object value)
{
var valueJson = JsonConvert.SerializeObject(value);
return new StringContent(valueJson);
... | mit | C# | |
a5bf9d09c73e09c5e7f69e5a9a259c7875c01e80 | Add file with DynamicTimeWarping.onDeserialized to source contol | cureos/accord,cureos/accord,cureos/accord,cureos/accord,cureos/accord | Sources/Accord.Statistics/Kernels/DynamicTimeWarping.NoPcl.cs | Sources/Accord.Statistics/Kernels/DynamicTimeWarping.NoPcl.cs | // Accord Statistics Library
// The Accord.NET Framework
// http://accord-framework.net
//
// Copyright © César Souza, 2009-2015
// cesarsouza at gmail.com
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published ... | lgpl-2.1 | C# |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.