Instruction
stringlengths
14
778
input_code
stringlengths
0
4.24k
output_code
stringlengths
1
5.44k
Fix osu! playfield (was using inheriting sizemode when it shouldn't).
//Copyright (c) 2007-2016 ppy Pty Ltd <contact@ppy.sh>. //Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE using osu.Framework.Graphics; using osu.Framework.Graphics.Containers; using osu.Framework.Graphics.Drawables; using OpenTK; namespace osu.Game.GameModes.Play.Os...
//Copyright (c) 2007-2016 ppy Pty Ltd <contact@ppy.sh>. //Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE using osu.Framework.Graphics; using osu.Framework.Graphics.Containers; using osu.Framework.Graphics.Drawables; using OpenTK; namespace osu.Game.GameModes.Play.Os...
Fix silent failure when using metamethods on an object without an attached state
using System.Collections.Generic; namespace Mond.VirtualMachine { class Object { public readonly Dictionary<MondValue, MondValue> Values; public bool Locked; public MondValue Prototype; public object UserData; private MondState _dispatcherState; public MondSta...
using System.Collections.Generic; namespace Mond.VirtualMachine { class Object { public readonly Dictionary<MondValue, MondValue> Values; public bool Locked; public MondValue Prototype; public object UserData; private MondState _dispatcherState; public MondSta...
Create doc store or embedded doc
using Raven.Client; using Raven.Client.Embedded; using fn = qed.Functions; namespace qed { public static partial class Functions { public static IDocumentStore GetRavenStore() { var ravenStore = GetConfiguration<IDocumentStore>(Constants.Configuration.RavenStoreKey); if...
using Raven.Client; using Raven.Client.Document; using Raven.Client.Embedded; using fn = qed.Functions; namespace qed { public static partial class Functions { public static IDocumentStore GetRavenStore() { var ravenStore = GetConfiguration<IDocumentStore>(Constants.Configuration.R...
Extend NetworkingProxy to support listener socket endpoints besides "any".
using System.IO; using System.Net.Sockets; namespace ItzWarty.Networking { public interface INetworkingProxy { IConnectedSocket CreateConnectedSocket(string host, int port); IConnectedSocket CreateConnectedSocket(ITcpEndPoint endpoint); IListenerSocket CreateListenerSocket(int port); IConn...
using System.IO; using System.Net.Sockets; namespace ItzWarty.Networking { public interface INetworkingProxy { IConnectedSocket CreateConnectedSocket(string host, int port); IConnectedSocket CreateConnectedSocket(ITcpEndPoint endpoint); IListenerSocket CreateListenerSocket(int port); IList...
Print ffplay output to the console in debug builds
using System; using System.Diagnostics; using System.IO; namespace WebMConverter { class FFplay : Process { public string FFplayPath = Path.Combine(Environment.CurrentDirectory, "Binaries", "Win32", "ffplay.exe"); public FFplay(string argument) { this.StartInfo.FileName = ...
using System; using System.Diagnostics; using System.IO; namespace WebMConverter { class FFplay : Process { public string FFplayPath = Path.Combine(Environment.CurrentDirectory, "Binaries", "Win32", "ffplay.exe"); public FFplay(string argument) { this.StartInfo.FileName = ...
Make log4net appender render the log event (as zero log is rendering it, the comparison wouldn't be fair otherwise)
using System.Collections.Generic; using System.Threading; using log4net.Appender; using log4net.Core; namespace ZeroLog.Benchmarks { internal class Log4NetTestAppender : AppenderSkeleton { private readonly bool _captureLoggedMessages; private int _messageCount; private ManualResetEvent...
using System.Collections.Generic; using System.Threading; using log4net.Appender; using log4net.Core; namespace ZeroLog.Benchmarks { internal class Log4NetTestAppender : AppenderSkeleton { private readonly bool _captureLoggedMessages; private int _messageCount; private ManualResetEvent...
Update Console Program with a Condition - Rename GetRoleMessageTest to GetRoleMessageForAdminTest so it is more specific
using System; using Microsoft.VisualStudio.TestTools.UnitTesting; namespace Training.CSharpWorkshop.Tests { [TestClass] public class ProgramTests { [Ignore] [TestMethod] public void IgnoreTest() { Assert.Fail(); } [TestMethod()] public v...
using System; using Microsoft.VisualStudio.TestTools.UnitTesting; namespace Training.CSharpWorkshop.Tests { [TestClass] public class ProgramTests { [Ignore] [TestMethod] public void IgnoreTest() { Assert.Fail(); } [TestMethod()] public v...
Use chrome instead of chromium on Ubuntu
// Copyright (c) .NET Foundation. All rights reserved. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. using System; using System.IO; using System.Runtime.InteropServices; namespace Interop.FunctionalTests { public static class ChromeConstants {...
// Copyright (c) .NET Foundation. All rights reserved. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. using System; using System.IO; using System.Runtime.InteropServices; namespace Interop.FunctionalTests { public static class ChromeConstants {...
Add WebInvoke to demonstrate how to post.
using System; using System.Collections.Generic; using System.Linq; using System.Runtime.Serialization; using System.ServiceModel; using System.ServiceModel.Activation; using System.ServiceModel.Web; using System.Text; namespace DemoWcfRest { [ServiceContract(Namespace = "")] [AspNetCompatibilityRequirements(R...
using System; using System.Collections.Generic; using System.Linq; using System.Runtime.Serialization; using System.ServiceModel; using System.ServiceModel.Activation; using System.ServiceModel.Web; using System.Text; namespace DemoWcfRest { [ServiceContract(Namespace = "")] [AspNetCompatibilityRequirements(R...
Print MOTD in the screen only
using System.Collections.Concurrent; using LmpClient.Base; using LmpClient.Base.Interface; using LmpClient.Systems.Chat; using LmpCommon.Message.Data.Motd; using LmpCommon.Message.Interface; namespace LmpClient.Systems.Motd { public class MotdMessageHandler : SubSystem<MotdSystem>, IMessageHandler { p...
using LmpClient.Base; using LmpClient.Base.Interface; using LmpCommon.Message.Data.Motd; using LmpCommon.Message.Interface; using System.Collections.Concurrent; namespace LmpClient.Systems.Motd { public class MotdMessageHandler : SubSystem<MotdSystem>, IMessageHandler { public ConcurrentQueue<IServerM...
Make planet update dependent components.
using UnityEngine; public class Planet : MonoBehaviour { [SerializeField] private float _radius; public float Radius { get { return _radius; } set { _radius = value; } } public float Permieter { get { return 2 * Mathf.PI * Radius; } } public float Volume { ...
using UnityEngine; [ExecuteInEditMode] public class Planet : MonoBehaviour { [SerializeField] private float _radius; public float Radius { get { return _radius; } set { _radius = value; } } public float Permieter { get { return 2 * Mathf.PI * Radius; } } public f...
Remove logs link, never worked right
using BatteryCommander.Web.Models; using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Mvc; using System; using System.IO; namespace BatteryCommander.Web.Controllers { [Authorize, ApiExplorerSettings(IgnoreApi = true)] public class AdminController : Controller { // Admin Tasks: ...
using BatteryCommander.Web.Models; using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Mvc; using System; using System.IO; namespace BatteryCommander.Web.Controllers { [Authorize, ApiExplorerSettings(IgnoreApi = true)] public class AdminController : Controller { // Admin Tasks: ...
Fix incorrect formatting of time stamps
using Newtonsoft.Json; using Swashbuckle.Swagger; using System; using System.Globalization; using System.Linq; using System.Reflection; using Zinc.Json; namespace Zinc.WebServices { /// <summary /> public class ZincSchemaFilter : ISchemaFilter { /// <summary /> public void Apply( Schema sc...
using Newtonsoft.Json; using Swashbuckle.Swagger; using System; using System.Globalization; using System.Linq; using System.Reflection; using Zinc.Json; namespace Zinc.WebServices { /// <summary /> public class ZincSchemaFilter : ISchemaFilter { /// <summary /> public void Apply( Schema sc...
Change Russian to Русский for the language selector
using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace Wox.Core.i18n { internal static class AvailableLanguages { public static Language English = new Language("en", "English"); public static Language Chinese = new Language("zh-cn", "中文"); publi...
using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace Wox.Core.i18n { internal static class AvailableLanguages { public static Language English = new Language("en", "English"); public static Language Chinese = new Language("zh-cn", "中文"); publi...
Rename params to match convention
using System.Collections.Generic; namespace CefSharp { public interface IDialogHandler { bool OnOpenFile(IWebBrowser browser, string title, string default_file_name, List<string> accept_types, out List<string> result); } }
using System.Collections.Generic; namespace CefSharp { public interface IDialogHandler { bool OnOpenFile(IWebBrowser browser, string title, string defaultFileName, List<string> acceptTypes, out List<string> result); } }
Add datetime prefix to dumped file name if texture didn't have name
using System; using System.Collections.Generic; using System.IO; using System.Linq; using System.Text.RegularExpressions; using ColossalFramework.Plugins; using ICities; namespace ModTools { public static class FileUtil { public static List<string> ListFilesInDirectory(string path, List<string> _file...
using System; using System.Collections.Generic; using System.IO; using System.Linq; using System.Text.RegularExpressions; using ColossalFramework.Plugins; using ICities; namespace ModTools { public static class FileUtil { public static List<string> ListFilesInDirectory(string path, List<string> _file...
Add a diagnostic tool for myself.
//using UnityEditor; //using UnityEngine; //using System.Collections; using System.Diagnostics; public class ShellHelpers { public static Process StartProcess(string filename, string arguments) { Process p = new Process(); p.StartInfo.Arguments = arguments; p.StartInfo.CreateNoWindow = true; p.StartI...
#define DEBUG_COMMANDS //using UnityEditor; //using UnityEngine; //using System.Collections; using System.Diagnostics; public class ShellHelpers { public static Process StartProcess(string filename, string arguments) { #if DEBUG_COMMANDS UnityEngine.Debug.Log("Running: " + filename + " " + arguments); #endif ...
Make the "type" attribute available from GenerateScript
using System.Collections.Generic; namespace MR.AspNet.Deps { public class OutputHelper { private List<Element> _elements = new List<Element>(); public void Add(Element element) { _elements.Add(element); } public void Add(List<Element> elements) { _elements.AddRange(elements); } public List<...
using System.Collections.Generic; namespace MR.AspNet.Deps { public class OutputHelper { private List<Element> _elements = new List<Element>(); public void Add(Element element) { _elements.Add(element); } public void Add(List<Element> elements) { _elements.AddRange(elements); } public List<...
Update resource to handle message strings
using System.Collections.Generic; using System.Threading.Tasks; using Microsoft.AspNet.Http; using Microsoft.Net.Http.Headers; using Newtonsoft.Json; using Newtonsoft.Json.Serialization; namespace Glimpse.Server.Web { public class MessageHistoryResource : IResource { private readonly InMemoryStorage _...
using System.Collections.Generic; using System.Text; using System.Threading.Tasks; using Microsoft.AspNet.Http; using Microsoft.Net.Http.Headers; namespace Glimpse.Server.Web { public class MessageHistoryResource : IResource { private readonly InMemoryStorage _store; public MessageHistoryReso...
Fix connection bug to PGSQL
using System.Data.Common; using System.Management.Automation; using Npgsql; namespace InvokeQuery { [Cmdlet("Invoke", "PostgreSqlQuery", SupportsTransactions = true, SupportsShouldProcess = true, ConfirmImpact = ConfirmImpact.Low)] public class InvokePostgreSqlQuery : InvokeQueryBase { pr...
using Npgsql; using System.Data.Common; using System.Management.Automation; namespace InvokeQuery { [Cmdlet("Invoke", "PostgreSqlQuery", SupportsTransactions = true, SupportsShouldProcess = true, ConfirmImpact = ConfirmImpact.Low)] public class InvokePostgreSqlQuery : InvokeQueryBase { pro...
Clear console before game starts
using System; using System.IO; namespace Hangman { public class Hangman { public static void Main(string[] args) { var wordGenerator = new RandomWord(); var word = wordGenerator.Word(); var game = new Game(word); var width = Math.Min(81, Console.WindowWidth); string titleText; ...
using System; using System.IO; namespace Hangman { public class Hangman { public static void Main(string[] args) { var wordGenerator = new RandomWord(); var word = wordGenerator.Word(); var game = new Game(word); var width = Math.Min(81, Console.WindowWidth); string titleText; ...
Fix using private constructor on MessagePack object
// 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 MessagePack; using Newtonsoft.Json; namespace osu.Game.Online.Rooms { /// <summary> /// The local availability information about a certain be...
// 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 MessagePack; using Newtonsoft.Json; namespace osu.Game.Online.Rooms { /// <summary> /// The local availability information about a certain be...
Fix Basic tests (angularjs.org site has been updated)
using System; using NUnit.Framework; using OpenQA.Selenium; using OpenQA.Selenium.PhantomJS; using OpenQA.Selenium.Chrome; namespace Protractor.Samples.Basic { [TestFixture] public class BasicTests { private IWebDriver driver; [SetUp] public void SetUp() { // U...
using System; using NUnit.Framework; using OpenQA.Selenium; using OpenQA.Selenium.PhantomJS; using OpenQA.Selenium.Chrome; namespace Protractor.Samples.Basic { [TestFixture] public class BasicTests { private IWebDriver driver; [SetUp] public void SetUp() { // U...
Print the texts of each row
using System; namespace Hangman { public class Table { public int Width; public int Spacing; public Row[] Rows; public Table(int width, int spacing, Row[] rows) { Width = width; Spacing = spacing; Rows = rows; } public string Draw() { return "Hello World"; } } ...
using System; using System.Collections.Generic; using System.Text; namespace Hangman { public class Table { public int Width; public int Spacing; public Row[] Rows; public Table(int width, int spacing, Row[] rows) { Width = width; Spacing = spacing; Rows = rows; } public s...
Make Razor the only ViewEngine
using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.Mvc; using System.Web.Optimization; using System.Web.Routing; namespace MotivateMe.Web { public class MvcApplication : System.Web.HttpApplication { protected void Application_Start() { ...
using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.Mvc; using System.Web.Optimization; using System.Web.Routing; namespace MotivateMe.Web { public class MvcApplication : System.Web.HttpApplication { protected void Application_Start() { ...
Add missing EmitCloseList to backend
// // IMarkdownViewBackend.cs // // Author: // Jérémie Laval <jeremie.laval@xamarin.com> // // Copyright (c) 2012 Xamarin, Inc. using System; namespace Xwt.Backends { [Flags] enum MarkdownInlineStyle { Italic, Bold, Monospace } public interface IMarkdownViewBackend : IWidgetBackend { object Create...
// // IMarkdownViewBackend.cs // // Author: // Jérémie Laval <jeremie.laval@xamarin.com> // // Copyright (c) 2012 Xamarin, Inc. using System; namespace Xwt.Backends { [Flags] enum MarkdownInlineStyle { Italic, Bold, Monospace } public interface IMarkdownViewBackend : IWidgetBackend { object Create...
Update the Empty module template.
#region License // // Copyright (c) 2013, Kooboo team // // Licensed under the BSD License // See the file LICENSE.txt for details. // #endregion using Kooboo.CMS.Sites.Extension.ModuleArea; using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Web.Mvc; using Kooboo.CMS....
#region License // // Copyright (c) 2013, Kooboo team // // Licensed under the BSD License // See the file LICENSE.txt for details. // #endregion using Kooboo.CMS.Sites.Extension.ModuleArea; using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Web.Mvc; using Kooboo.CMS....
Fix DisposeValueIfCreated to be extension method
using System; namespace OpenMagic.Extensions { public static class LazyExtensions { public static void DisposeValueIfCreated<T>(Lazy<T> obj) where T : IDisposable { if (obj.IsValueCreated) { obj.Value.Dispose(); } } } }
using System; namespace OpenMagic.Extensions { public static class LazyExtensions { public static void DisposeValueIfCreated<T>(this Lazy<T> obj) where T : IDisposable { if (obj.IsValueCreated) { obj.Value.Dispose(); } } } }
Test that 'true' unifies correctly
using LogicalShift.Reason.Api; using NUnit.Framework; using System; using System.Collections.Generic; using System.Linq; namespace LogicalShift.Reason.Tests { [TestFixture] public class Truthiness { [Test] public void TrueIsTrue() { Assert.IsTrue(Equals(Literal.True(), ...
using LogicalShift.Reason.Api; using NUnit.Framework; using System; using System.Collections.Generic; using System.Linq; namespace LogicalShift.Reason.Tests { [TestFixture] public class Truthiness { [Test] public void TrueIsTrue() { Assert.IsTrue(Equals(Literal.True(), ...
Fix test to run with the NUnitLite in our Integration Tests on IOS
using NUnit.Framework; using RealmNet; using System; using System.Collections.Generic; using System.IO; using System.Linq; using System.Text; namespace IntegrationTests.Shared { [TestFixture] public class StandAloneObjectTests { private Person _person; [SetUp] public void SetUp() ...
using NUnit.Framework; using RealmNet; using System; using System.Collections.Generic; using System.IO; using System.Linq; using System.Text; namespace IntegrationTests.Shared { [TestFixture] public class StandAloneObjectTests { private Person _person; [SetUp] public void SetUp() ...
Move OpenFileDialog initialization inside try block
// 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; using System.Threading.Tasks; using Core2D.Editor; using Core2D.Interfaces; using Core2D.Wpf.Windows; using Microsoft.Win32; namespace Core2D.Wpf.Im...
// 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; using System.Threading.Tasks; using Core2D.Editor; using Core2D.Interfaces; using Core2D.Wpf.Windows; using Microsoft.Win32; namespace Core2D.Wpf.Im...
Add license to new file
using System; namespace Huxley.Models { public class DelaysResponse { public DateTime GeneratedAt { get; set; } public string LocationName { get; set; } public string Crs { get; set; } public string FilterLocationName { get; set; } // Yes this is a typo but it match...
/* Huxley - a JSON proxy for the UK National Rail Live Departure Board SOAP API Copyright (C) 2015 James Singleton * http://huxley.unop.uk * https://github.com/jpsingleton/Huxley This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License a...
Update SkillController.cs - add "Edit" action - add "GetSkillByIdQueryHandler"
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 SkillsController : Controller { private readonly IQueryHa...
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 SkillsController : Controller { private readonly IQueryHa...
Add methods to get the overriden values, or use a default value if not overridden. Make them extension methods so that we can call them on null objects.
using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace ChamberLib { public class Overrides { public LightingData? Lighting; public IMaterial Material; public IShaderProgram ShaderProgram; public IShaderStage VertexShader; public ...
using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace ChamberLib { public class Overrides { public LightingData? Lighting; public IMaterial Material; public IShaderProgram ShaderProgram; public IShaderStage VertexShader; public ...
Make cursor test scene more automated
// 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; using NUnit.Framework; using osu.Framework.Allocation; using osu.Framework.Graphics; using osu.Game.Rulesets.Osu.UI.Curso...
// 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; using NUnit.Framework; using osu.Framework.Allocation; using osu.Framework.Graphics; using osu.Framework.Testing.Input; u...
Add Version string to package for support for yaml script
using System; using System.Runtime.InteropServices; using EnvDTE; using EnvDTE80; using Microsoft.VisualStudio.Shell; using Microsoft.VisualStudio.Shell.Interop; namespace CopyAsPathCommand { [PackageRegistration(UseManagedResourcesOnly = true)] [ProvideMenuResource("Menus.ctmenu", 1)] [InstalledProductRe...
using System; using System.Runtime.InteropServices; using EnvDTE; using EnvDTE80; using Microsoft.VisualStudio.Shell; using Microsoft.VisualStudio.Shell.Interop; namespace CopyAsPathCommand { [PackageRegistration(UseManagedResourcesOnly = true)] [ProvideMenuResource("Menus.ctmenu", 1)] [InstalledProductRe...
Change PropertyAsObservable to return a BehaviorSubject
namespace Mappy { using System; using System.ComponentModel; using System.Reactive.Linq; using System.Reactive.Subjects; public static class ExtensionMethods { public static IObservable<TField> PropertyAsObservable<TSource, TField>(this TSource source, Func<TSource, TField> ac...
namespace Mappy { using System; using System.ComponentModel; using System.Reactive.Linq; using System.Reactive.Subjects; public static class ExtensionMethods { public static BehaviorSubject<TField> PropertyAsObservable<TSource, TField>(this TSource source, Func<TSource, TField...
Use flag instead of `StreamWriter` changes
// 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.IO; namespace osu.Framework.Platform { /// <summary> /// A <see cref="FileStream"/> which always flushes to disk on disposal. /// </summary> ...
// 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.IO; namespace osu.Framework.Platform { /// <summary> /// A <see cref="FileStream"/> which always flushes to disk on disposal. /// </summary> ...
Update the assembly information to add the right owners to the package.
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("OA...
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("OA...
Update tests for loose mode
using System; using Xunit; using Xunit.Extensions; namespace SemVer.Tests { public class LooseMode { [Theory] [InlineData("=1.2.3", "1.2.3")] [InlineData("v 1.2.3", "1.2.3")] [InlineData("1.2.3alpha", "1.2.3-alpha")] // SemVer spec is ambiguous about whether 01 in a prer...
using System; using Xunit; using Xunit.Extensions; namespace SemVer.Tests { public class LooseMode { [Theory] [InlineData("=1.2.3", "1.2.3")] [InlineData("v 1.2.3", "1.2.3")] [InlineData("1.2.3alpha", "1.2.3-alpha")] // SemVer spec is ambiguous about whether 01 in a prer...
Return trampoline from lazy function
using System; using System.Collections.Generic; using System.Linq; using Sharper.C.Control; namespace Sharper.C.Data { using static TrampolineModule; public static class EnumerableModule { public static B FoldLeft<A, B>(this IEnumerable<A> e, B x, Func<B, A, B> f) => e.Aggregate(x, f); public s...
using System; using System.Collections.Generic; using System.Linq; using Sharper.C.Control; namespace Sharper.C.Data { using static TrampolineModule; public static class EnumerableModule { public static B FoldLeft<A, B>(this IEnumerable<A> e, B x, Func<B, A, B> f) => e.Aggregate(x, f); public s...
Fix type name prettyfying for generics
using System; using System.CodeDom; using System.Linq; using Microsoft.CSharp; namespace Ludiq.Reflection.Editor { public static class Extensions { // Used to print pretty type names for primitives private static CSharpCodeProvider csharp = new CSharpCodeProvider(); /// <summary> /// Returns the name for t...
using System; using System.CodeDom; using System.Linq; using System.Text.RegularExpressions; using Microsoft.CSharp; namespace Ludiq.Reflection.Editor { public static class Extensions { // Used to print pretty type names for primitives private static CSharpCodeProvider csharp = new CSharpCodeProvider(); /// ...
Raise authentication server prerelease version.
using System.Reflection; using System.Runtime.CompilerServices; [assembly: AssemblyTitle("Affecto Authentication Server")] [assembly: AssemblyProduct("Affecto Authentication Server")] [assembly: AssemblyCompany("Affecto")] [assembly: AssemblyVersion("2.1.0.0")] [assembly: AssemblyFileVersion("2.1.0.0")] [assembly: A...
using System.Reflection; using System.Runtime.CompilerServices; [assembly: AssemblyTitle("Affecto Authentication Server")] [assembly: AssemblyProduct("Affecto Authentication Server")] [assembly: AssemblyCompany("Affecto")] [assembly: AssemblyVersion("2.1.0.0")] [assembly: AssemblyFileVersion("2.1.0.0")] [assembly: A...
Add FNV1a-32 description to example usage
using System.Collections.Generic; using System.Security.Cryptography; namespace BloomFilter { class ExampleUsage { static void Main(string[] args) { //standard usage using SHA1 hashing using (var bf = new BloomFilter<string>(MaxItems: 1000, FalsePositiveProbability: .00...
using System.Collections.Generic; using System.Security.Cryptography; namespace BloomFilter { class ExampleUsage { static void Main(string[] args) { //standard usage using SHA1 hashing using (var bf = new BloomFilter<string>(MaxItems: 1000, FalsePositiveProbability: .00...
Add example links to the design-time datacontext
using System; using System.Collections.Generic; using System.Windows.Media.Imaging; using KyleHughes.AboutDialog.WPF.Properties; namespace KyleHughes.AboutDialog.WPF { /// <summary> /// A class for extracting data from an Assembly. /// </summary> internal sealed class DesignVersionable : IVersiona...
using System; using System.Collections.Generic; using System.Windows.Media.Imaging; using KyleHughes.AboutDialog.WPF.Properties; namespace KyleHughes.AboutDialog.WPF { /// <summary> /// A class for extracting data from an Assembly. /// </summary> internal sealed class DesignVersionable : IVersiona...
Fix bug: properly create time span from seconds (not mod 60)
using System; using Rooijakkers.MeditationTimer.Data.Contracts; namespace Rooijakkers.MeditationTimer.Data { /// <summary> /// Stores settings data in local settings storage /// </summary> public class Settings : ISettings { private const string TIME_TO_GET_READY_IN_SECONDS_STORAGE = "Time...
using System; using Rooijakkers.MeditationTimer.Data.Contracts; namespace Rooijakkers.MeditationTimer.Data { /// <summary> /// Stores settings data in local settings storage /// </summary> public class Settings : ISettings { private const string TIME_TO_GET_READY_IN_SECONDS_STORAGE = "Time...
Prepare for next development iteration
using System; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; [assembly: AssemblyTitle("NModbus4")] [assembly: AssemblyProduct("NModbus4")] [assembly: AssemblyCompany("Maxwe11")] [assembly: AssemblyCopyright("Licensed under MIT License.")] [assembly: Assem...
using System; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; [assembly: AssemblyTitle("NModbus4")] [assembly: AssemblyProduct("NModbus4")] [assembly: AssemblyCompany("Maxwe11")] [assembly: AssemblyCopyright("Licensed under MIT License.")] [assembly: Assem...
Use dotnet core run task
#load nuget:https://www.myget.org/F/cake-contrib/api/v2?package=Cake.Recipe&prerelease Environment.SetVariableNames(); BuildParameters.SetParameters(context: Context, buildSystem: BuildSystem, sourceDirectoryPath: "./", title: "Xer.Cq...
#load nuget:https://www.myget.org/F/cake-contrib/api/v2?package=Cake.Recipe&prerelease Environment.SetVariableNames(); BuildParameters.SetParameters(context: Context, buildSystem: BuildSystem, sourceDirectoryPath: "./", title: "Xer.Cq...
Add an IRandom.GetDigit() extension method, which returns a string between '0' and '9'.
namespace Bakery.Security { using System; public static class RandomExtensions { public static Byte[] GetBytes(this IRandom random, Int32 count) { if (count <= 0) throw new ArgumentOutOfRangeException(nameof(count)); var buffer = new Byte[count]; for (var i = 0; i < count; i++) ...
namespace Bakery.Security { using System; public static class RandomExtensions { public static Byte[] GetBytes(this IRandom random, Int32 count) { if (count <= 0) throw new ArgumentOutOfRangeException(nameof(count)); var buffer = new Byte[count]; for (var i = 0; i < count; i++) ...
Enable testing of internal functionality, to allow tests of AsyncBarrier
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("Ch...
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("Ch...
Create a way for users to specify the initial uris to scan.
// Copyright (c) Alex Ghiondea. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. using SmugMug.Shared.Descriptors; using SmugMug.v2.Authentication; using SmugMugShared; using System.Collections.Generic; using System.Diagnostics; namespace Smug...
// Copyright (c) Alex Ghiondea. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. using SmugMug.Shared.Descriptors; using SmugMug.v2.Authentication; using SmugMugShared; using System.Collections.Generic; using System.Diagnostics; namespace Smug...
Use out var in jumbo command
using System; using System.IO; using System.Net.Http; using System.Threading.Tasks; using Discord; using Discord.Commands; using Serilog; namespace Modix.Modules { [Name("Fun"), Summary("A bunch of miscellaneous, fun commands")] public class FunModule : ModuleBase { [Command("jumbo"), Summary("Jum...
using System; using System.IO; using System.Net.Http; using System.Threading.Tasks; using Discord; using Discord.Commands; using Serilog; namespace Modix.Modules { [Name("Fun"), Summary("A bunch of miscellaneous, fun commands")] public class FunModule : ModuleBase { [Command("jumbo"), Summary("Jum...
Add more IHandleContext extension methods
using Aggregates.Internal; using NServiceBus; using NServiceBus.Unicast; using NServiceBus.Unicast.Messages; using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace Aggregates.Extensions { public static class BusExtensions { public ...
using Aggregates.Internal; using NServiceBus; using NServiceBus.Unicast; using NServiceBus.Unicast.Messages; using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace Aggregates.Extensions { public static class BusExtensions { public ...
Add test showing success message
using System; using System.Collections.Generic; using System.Text; using NUnit.Framework; namespace NUnitTestDemo { public class SimpleTests { [Test] public void TestSucceeds() { Assert.That(2 + 2, Is.EqualTo(4)); } [Test, ExpectedException(typeof(Applicati...
using System; using System.Collections.Generic; using System.Text; using NUnit.Framework; namespace NUnitTestDemo { public class SimpleTests { [Test] public void TestSucceeds() { Assert.That(2 + 2, Is.EqualTo(4)); } [Test] public void TestSucceeds_M...
Add error handling generating random values to inform column name and type
using System; namespace StrangerData.Utils { internal static class RandomValues { public static object ForColumn(TableColumnInfo columnInfo) { switch (columnInfo.ColumnType) { case ColumnType.String: // generates a random string ...
using System; namespace StrangerData.Utils { internal static class RandomValues { public static object ForColumn(TableColumnInfo columnInfo) { try { return GenerateForColumn(columnInfo); } catch (Exception ex) { ...
Add constructor with parameters for coordinate
namespace Stranne.VasttrafikNET.Models { /// <summary> /// Describes a coordinate in WGS84 decimal /// </summary> public class Coordinate { /// <summary> /// Latitude in WGS84 decimal form /// </summary> public double Latitude { get; set; } /// <summary> ...
namespace Stranne.VasttrafikNET.Models { /// <summary> /// Describes a coordinate in WGS84 decimal /// </summary> public class Coordinate { /// <summary> /// Latitude in WGS84 decimal form /// </summary> public double Latitude { get; set; } /// <summary> ...
Remove XFrame on the checkout page
using Microsoft.AspNetCore.Mvc.Filters; using System; using System.Collections.Generic; using System.Linq; using System.Threading.Tasks; namespace BTCPayServer.Filters { public class XFrameOptionsAttribute : Attribute, IActionFilter { public XFrameOptionsAttribute(string value) { V...
using Microsoft.AspNetCore.Mvc.Filters; using System; using System.Collections.Generic; using System.Linq; using System.Threading.Tasks; namespace BTCPayServer.Filters { public class XFrameOptionsAttribute : Attribute, IActionFilter { public XFrameOptionsAttribute(string value) { V...
Use ? instead of Nullable
//------------------------------------------------------------------------------ // <auto-generated> // This code was generated from a template. // // Manual changes to this file may cause unexpected behavior in your application. // Manual changes to this file will be overwritten if the code is regenerated....
//------------------------------------------------------------------------------ // <auto-generated> // This code was generated from a template. // // Manual changes to this file may cause unexpected behavior in your application. // Manual changes to this file will be overwritten if the code is regenerated....
Revert "Increase the maximum time we wait for long running tests from 5 to 10."
using System; using System.Threading; using NUnit.Framework; namespace JustSaying.TestingFramework { public static class Patiently { public static void VerifyExpectation(Action expression) { VerifyExpectation(expression, 5.Seconds()); } public static v...
using System; using System.Threading; using NUnit.Framework; namespace JustSaying.TestingFramework { public static class Patiently { public static void VerifyExpectation(Action expression) { VerifyExpectation(expression, 5.Seconds()); } public static v...
Use fieldset instead of div
@model IEnumerable<alert_roster.web.Models.Message> @{ ViewBag.Title = "Messages"; } <div class="jumbotron"> <h1>@ViewBag.Title</h1> </div> @foreach (var message in Model) { <div class="row"> <div class="col-md-4"> <h2> <script>var d = moment.utc('@message.PostedDate').lo...
@model IEnumerable<alert_roster.web.Models.Message> @{ ViewBag.Title = "Messages"; } <div class="jumbotron"> <h1>@ViewBag.Title</h1> </div> @foreach (var message in Model) { <div class="row"> <div class="col-md-4"> <fieldset> <legend> <script>var d...
Trim un-necessarry char from aggregation variable
using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace LodViewProvider { public enum AggregationType { Min = 0, Max = 1, Sum = 2, Count = 3, Average = 4, // group by // order by } public class Aggregation : ICondition { public string Variable { get; priva...
using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace LodViewProvider { public enum AggregationType { Min = 0, Max = 1, Sum = 2, Count = 3, Average = 4, // group by // order by } public class Aggregation : ICondition { public string Variable { get; priva...
Fix for SSD rank filtering
using BatteryCommander.Web.Models; using BatteryCommander.Web.Services; using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Mvc; using System; using System.Threading.Tasks; namespace BatteryCommander.Web.Controllers { [Authorize, ApiExplorerSettings(IgnoreApi = true)] public class SSDControll...
using BatteryCommander.Web.Models; using BatteryCommander.Web.Services; using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Mvc; using System.Linq; using System.Threading.Tasks; namespace BatteryCommander.Web.Controllers { [Authorize, ApiExplorerSettings(IgnoreApi = true)] public class SSDCon...
Add check is transport work with webGL or not at transport factory
namespace LiteNetLibManager { public class WebSocketTransportFactory : BaseTransportFactory { public override bool CanUseWithWebGL { get { return false; } } public override ITransport Build() { return new WebSocketTransport(); } } }
namespace LiteNetLibManager { public class WebSocketTransportFactory : BaseTransportFactory { public override bool CanUseWithWebGL { get { return true; } } public override ITransport Build() { return new WebSocketTransport(); } } }
Fix the null reference exception coming from AutomaticPackageCurator when curatedFeed has been loaded without including Packages.
using System.IO; using System.Linq; using NuGet; namespace NuGetGallery { public class WebMatrixPackageCurator : AutomaticPackageCurator { public override void Curate( Package galleryPackage, IPackage nugetPackage) { var curatedFeed = GetService<ICuratedFeed...
using System.IO; using System.Linq; using NuGet; namespace NuGetGallery { public class WebMatrixPackageCurator : AutomaticPackageCurator { public override void Curate( Package galleryPackage, IPackage nugetPackage) { var curatedFeed = GetService<ICuratedFeed...
Test for NH-2559 (does not fail)
using System; using System.Collections.Generic; using System.Linq; using System.Text; using NUnit.Framework; namespace NHibernate.Test.Linq.ByMethod { [TestFixture] public class AnyTests : LinqTestCase { [Test] public void AnySublist() { var orders = db.Orders.Wher...
using System.Linq; using NUnit.Framework; namespace NHibernate.Test.Linq.ByMethod { [TestFixture] public class AnyTests : LinqTestCase { [Test] public void AnySublist() { var orders = db.Orders.Where(o => o.OrderLines.Any(ol => ol.Quantity == 5)).ToList(); Assert.AreEqual(61, orders.Count);...
Add broken test to testproj
namespace testproj { using System; using JetBrains.dotMemoryUnit; using NUnit.Framework; [TestFixture] public class UnitTest1 { [Test] public void TestMethod1() { dotMemory.Check( memory => { var str1 = "...
namespace testproj { using System; using System.Collections.Generic; using JetBrains.dotMemoryUnit; using NUnit.Framework; [TestFixture] public class UnitTest1 { [Test] public void TestMethod1() { var strs = new List<string>(); var memoryCh...
Remove steps from part 1 that have been moved to part 2.
using System; using System.IO; using System.Security.Cryptography; namespace Tutorial { class Program { static void Main(string[] args) { if (args.Length != 2) { Console.WriteLine("You must provide the name of a file to read and the name of a...
using System; using System.IO; using System.Security.Cryptography; namespace Tutorial { class Program { static void Main(string[] args) { if (args.Length != 2) { Console.WriteLine("You must provide the name of a file to read and the name of a...
Fix code to return LanguageCode not CountryCode
using Foundation; using Internationalization.Core.Helpers; namespace Internationalization.Touch.Helpers { public class AppInfo : IAppInfo { public string CurrentLanguage => NSLocale.CurrentLocale.CountryCode.ToLower(); } }
using Foundation; using Internationalization.Core.Helpers; namespace Internationalization.Touch.Helpers { public class AppInfo : IAppInfo { public string CurrentLanguage { get { return NSLocale.CurrentLocale.LanguageCode.ToLower(); } } } }
Fix dragging tournament ladder too far causing it to disappear
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. using System; using osu.Framework.Graphics; using osu.Framework.Graphics.Containers; using osu.Framework.Graphics.Primitives; using osu.Framework.Input.Events; using osuT...
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. using System; using osu.Framework.Graphics; using osu.Framework.Graphics.Containers; using osu.Framework.Graphics.Primitives; using osu.Framework.Input.Events; using osuT...
Set only just one torch
using UnityEngine; using System.Collections; using System; public class LightDiminuer : MonoBehaviour { public float intensity = 15; public float intensityRate = 0.001F; public float ambientIntensity = 3; public float torchNoiseRange = 1; private GameObject player; private Light playerLight; private Light am...
using UnityEngine; using System.Collections; using System; public class LightDiminuer : MonoBehaviour { public float intensity = 15; public float intensityRate = 0.001F; public float ambientIntensity = 3; public float torchNoiseRange = 1; public bool lightOn = false; private GameObject player; private Light ...
Switch to list instead of Dictionnary
using System; using System.Collections.Generic; public class MultipleDelegate { private readonly Dictionary<int, Func<int, int>> _delegates = new Dictionary<int, Func<int, int>>(); private Type _typeOf; private int _pos = 0; public int Suscribe(Func<int, int> item) { _delegates.Add(_pos, ...
using System; using System.Collections.Generic; using UnityEngine; public class MultipleDelegate { private readonly List<Func<int, int>> _delegates = new List<Func<int, int>>(); private Type _typeOf; private int _pos = 0; public int Suscribe(Func<int, int> item) { _delegates.Add(item); ...
Fix array out of index issue @neico
using Oxide.Core.Libraries; using Oxide.Core.Logging; namespace Oxide.Ext.Lua.Libraries { /// <summary> /// A global library containing game-agnostic Lua utilities /// </summary> public class LuaGlobal : Library { /// <summary> /// Returns if this library should be loaded into the ...
using Oxide.Core.Libraries; using Oxide.Core.Logging; namespace Oxide.Ext.Lua.Libraries { /// <summary> /// A global library containing game-agnostic Lua utilities /// </summary> public class LuaGlobal : Library { /// <summary> /// Returns if this library should be loaded into the ...
Call widget "Special Event" on "Search" search
using System.Diagnostics; using System.Windows.Input; using DesktopWidgets.Helpers; using DesktopWidgets.WidgetBase; using DesktopWidgets.WidgetBase.ViewModel; using GalaSoft.MvvmLight.Command; namespace DesktopWidgets.Widgets.Search { public class ViewModel : WidgetViewModelBase { private string _sea...
using System.Diagnostics; using System.Windows.Input; using DesktopWidgets.Helpers; using DesktopWidgets.WidgetBase; using DesktopWidgets.WidgetBase.ViewModel; using GalaSoft.MvvmLight.Command; namespace DesktopWidgets.Widgets.Search { public class ViewModel : WidgetViewModelBase { private string _sea...
Change the Db name for the object context.
using System.Data.Entity; namespace RWXViewer.Models { public class ObjectPathContext : DbContext { public ObjectPathContext() : base("ObjectPathContext") { } public DbSet<World> Worlds { get; set; } public DbSet<ObjectPathItem> ObjectPathItem { get; set; ...
using System.Data.Entity; namespace RWXViewer.Models { public class ObjectPathContext : DbContext { public ObjectPathContext() : base("ObjectPathDb") { } public DbSet<World> Worlds { get; set; } public DbSet<ObjectPathItem> ObjectPathItem { get; set; } ...
Rename Error category to Danger
namespace HtmlLogger.Model { public enum LogCategory { Info, Warning, Error } }
namespace HtmlLogger.Model { public enum LogCategory { Info, Warning, Danger } }
Update default rendering partial view
@inherits UmbracoViewPage<BlockListModel> @using ContentModels = Umbraco.Web.PublishedModels; @using Umbraco.Core.Models.Blocks @{ if (Model?.Layout == null || !Model.Layout.Any()) { return; } } <div class="umb-block-list"> @foreach (var layout in Model.Layout) { if (layout?.Udi == null) {...
@inherits UmbracoViewPage<BlockListModel> @using Umbraco.Core.Models.Blocks @{ if (Model?.Layout == null || !Model.Layout.Any()) { return; } } <div class="umb-block-list"> @foreach (var layout in Model.Layout) { if (layout?.Udi == null) { continue; } var data = layout.Data; ...
Add OS and Version information to telemetry
using Microsoft.ApplicationInsights; using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace unBand { public static class Telemetry { public static TelemetryClient Client {get; private set;} static Telemetry() { ...
using Microsoft.ApplicationInsights; using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace unBand { public static class Telemetry { public static TelemetryClient Client {get; private set;} static Telemetry() { ...
Use TypeNameHelper instead of private method
using System; using System.Linq; using System.Reflection; namespace Scrutor { public class MissingTypeRegistrationException : InvalidOperationException { public MissingTypeRegistrationException(Type serviceType) : base($"Could not find any registered services for type '{GetFriendlyName(serv...
using System; using Microsoft.Extensions.Internal; namespace Scrutor { public class MissingTypeRegistrationException : InvalidOperationException { public MissingTypeRegistrationException(Type serviceType) : base($"Could not find any registered services for type '{TypeNameHelper.GetTypeDispl...
Fix routing tests, we DO need a database for these
using NUnit.Framework; using Umbraco.Tests.TestHelpers; using Umbraco.Web.Routing; using umbraco.BusinessLogic; using umbraco.cms.businesslogic.template; namespace Umbraco.Tests.Routing { [TestFixture] public class LookupByAliasTests : BaseRoutingTest { public override void Initialize() { base.I...
using NUnit.Framework; using Umbraco.Tests.TestHelpers; using Umbraco.Web.Routing; using umbraco.BusinessLogic; using umbraco.cms.businesslogic.template; namespace Umbraco.Tests.Routing { [TestFixture] public class LookupByAliasTests : BaseRoutingTest { public override void Initialize() { base.I...
Fix an error with console client test
namespace SupermarketChain.Client.Console { using System; using System.Linq; using SupermarketChain.Data.SqlServer; using SupermarketChain.Model; using SupermarketChain.Data.SqlServer.Repositories; class Program { static void Main(string[] args) { // Testing Su...
namespace SupermarketChain.Client.Console { using System; using System.Linq; using SupermarketChain.Data.SqlServer; using SupermarketChain.Model; using SupermarketChain.Data.SqlServer.Repositories; class Program { static void Main(string[] args) { // Testing Su...
Add cancellation field to progress object.
using System; using System.Threading; namespace Depends { public delegate void ProgressBarIncrementer(); public class Progress { private long _total = 0; private ProgressBarIncrementer _progBarIncr; private long _workMultiplier = 1; public static Progress NOPProgress() ...
using System; using System.Threading; namespace Depends { public delegate void ProgressBarIncrementer(); public class Progress { private bool _cancelled = false; private long _total = 0; private ProgressBarIncrementer _progBarIncr; private long _workMultiplier = 1; ...
Fix formatting of dates when the year comes first (JP)
using System; using System.Globalization; namespace MultiMiner.Win.Extensions { static class DateTimeExtensions { public static string ToReallyShortDateString(this DateTime dateTime) { //short date no year string shortDateValue = dateTime.ToShortDateString(); ...
using System; using System.Globalization; namespace MultiMiner.Win.Extensions { public static class DateTimeExtensions { public static string ToReallyShortDateString(this DateTime dateTime) { //short date no year string shortDateString = dateTime.ToShortDateString(); ...
Fix issue on possible null reference.
using System; using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.Mvc.Filters; namespace Talagozis.Website.Controllers { public abstract class BaseController : Controller { public override void OnActionExecuting(ActionExecutingContext context) { this.ViewBag.startTime = Date...
using System; using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.Mvc.Filters; namespace Talagozis.Website.Controllers { public abstract class BaseController : Controller { public override void OnActionExecuting(ActionExecutingContext context) { this.ViewBag.startTime = Date...
Simplify AbstractGrammarSpec by replacing deprecated helper methods with a sample Lexer implementation
namespace Parsley { public sealed class CharLexer : Lexer { public CharLexer(string source) : this(new Text(source)) { } public CharLexer(Text text) : base(text, new TokenMatcher(typeof(char), @".")) { } } }
namespace Parsley { public sealed class CharLexer : Lexer { public CharLexer(string source) : base(new Text(source), new TokenMatcher(typeof(char), @".")) { } } }
Revert "Reacting to CLI breaking change"
// Copyright (c) .NET Foundation. All rights reserved. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. using System.Collections.Generic; using System.IO; using System.Linq; using Microsoft.DotNet.ProjectModel.Graph; namespace Microsoft.DotNet.Watcher.Co...
// Copyright (c) .NET Foundation. All rights reserved. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. using System.Collections.Generic; using System.IO; using System.Linq; using Microsoft.DotNet.ProjectModel.Graph; namespace Microsoft.DotNet.Watcher.Co...
Move set-up and config code into t/c/f block - this will handle 'unhandled exeptions' that hapen outside of the OWIN pipeline.
using System; using System.IO; using Microsoft.AspNetCore; using Microsoft.AspNetCore.Hosting; using Microsoft.Extensions.Configuration; using Serilog; using Serilog.Formatting.Json; namespace Experimentation.Api { public class Program { public static void Main(string[] args) { var...
using System; using System.IO; using Microsoft.AspNetCore; using Microsoft.AspNetCore.Hosting; using Microsoft.Extensions.Configuration; using Serilog; using Serilog.Formatting.Json; namespace Experimentation.Api { public class Program { public static void Main(string[] args) { try...
Use a lifetime scope for resolution
using Autofac; using System.Management.Automation; namespace PoshGit2.Cmdlets { public class DICmdlet : Cmdlet { protected override void BeginProcessing() { base.BeginProcessing(); PoshGit2Container.Instance.InjectUnsetProperties(this); } } } ...
using Autofac; using System; using System.Management.Automation; namespace PoshGit2.Cmdlets { public class DICmdlet : PSCmdlet, IDisposable { private readonly ILifetimeScope _lifetimeScope; public DICmdlet() { _lifetimeScope = PoshGit2Container.Instance.BeginLi...
Fix loop condition on Deserialize-Tilemap.
using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace PixelPet.Commands { internal class DeserializeTilemapCmd : CliCommand { public DeserializeTilemapCmd() : base("Deserialize-Tilemap") { } public override void Run(Workbench workbench, Cli cli) { cli.Log("Deseria...
using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace PixelPet.Commands { internal class DeserializeTilemapCmd : CliCommand { public DeserializeTilemapCmd() : base("Deserialize-Tilemap") { } public override void Run(Workbench workbench, Cli cli) { cli.Log("Deseria...
Add TODO to remove extracted file after translating it
using System; using System.IO; using Newtonsoft.Json; using SmartMeter.Business.Extractor; using SmartMeter.Business.Interface; using SmartMeter.Business.Interface.Extractor; using SmartMeter.Business.Interface.Translator; namespace SmartMeter.Business.Translator { public class TranslatorService { pub...
using System; using System.IO; using Newtonsoft.Json; using SmartMeter.Business.Extractor; using SmartMeter.Business.Interface; using SmartMeter.Business.Interface.Extractor; using SmartMeter.Business.Interface.Translator; namespace SmartMeter.Business.Translator { public class TranslatorService { pub...
Update the TryGetJointPose docs to accurately describe the set of inputs it can take.
// Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See LICENSE in the project root for license information. using Microsoft.MixedReality.Toolkit.Utilities; namespace Microsoft.MixedReality.Toolkit.Input { public static class HandJointUtils { /// <summary> ...
// Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See LICENSE in the project root for license information. using Microsoft.MixedReality.Toolkit.Utilities; namespace Microsoft.MixedReality.Toolkit.Input { public static class HandJointUtils { /// <summary> ...
Update the Empty module template.
#region License // // Copyright (c) 2013, Kooboo team // // Licensed under the BSD License // See the file LICENSE.txt for details. // #endregion using Kooboo.CMS.Sites.Extension.ModuleArea; using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Web.Mvc; using Kooboo.CMS....
#region License // // Copyright (c) 2013, Kooboo team // // Licensed under the BSD License // See the file LICENSE.txt for details. // #endregion using Kooboo.CMS.Sites.Extension.ModuleArea; using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Web.Mvc; using Kooboo.CMS....
Add using for Template class.
using ExoWeb; using Microsoft.VisualStudio.TestTools.UnitTesting; using System; using System.Collections.Generic; using ExoWeb.Templates; using System.IO; using System.Linq; namespace ExoWeb.UnitTests.Server { /// <summary> ///This is a test class for ExoWebTest and is intended ///to contain all ExoWebTest Unit Te...
using System; using System.IO; using System.Linq; using ExoWeb.Templates.MicrosoftAjax; using Microsoft.VisualStudio.TestTools.UnitTesting; namespace ExoWeb.UnitTests.Server { /// <summary> ///This is a test class for ExoWebTest and is intended ///to contain all ExoWebTest Unit Tests ///</summary> [TestClass()] ...
Fix loader pushing children screens before it is displayed itself
// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>. // Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE using osu.Framework.Allocation; using osu.Framework.Graphics; using osu.Game.Screens.Menu; using OpenTK; namespace osu.Game.Screens { public class Loader...
// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>. // Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE using osu.Framework.Allocation; using osu.Framework.Graphics; using osu.Game.Screens.Menu; using OpenTK; using osu.Framework.Screens; namespace osu.Game.Scree...
Bump dev version to v0.11
using Mono.Addins; using Mono.Addins.Description; [assembly: Addin( "JustEnoughVi", Namespace = "JustEnoughVi", Version = "0.10" )] [assembly: AddinName("Just Enough Vi")] [assembly: AddinCategory("IDE extensions")] [assembly: AddinDescription("Simplified Vi/Vim mode for MonoDevelop/Xamarin Studio.")] [a...
using Mono.Addins; using Mono.Addins.Description; [assembly: Addin( "JustEnoughVi", Namespace = "JustEnoughVi", Version = "0.11" )] [assembly: AddinName("Just Enough Vi")] [assembly: AddinCategory("IDE extensions")] [assembly: AddinDescription("Simplified Vi/Vim mode for MonoDevelop/Xamarin Studio.")] [a...
Change of domain name to api.socketlabs.com
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Net; using System.IO; using System.Xml.Linq; namespace SocketLabs.OnDemand.Api { internal class Program { private static void Main(string[] args) { int accountId = 1000; // YOUR-ACCOUNT-ID string userName = ...
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Net; using System.IO; using System.Xml.Linq; namespace SocketLabs.OnDemand.Api { internal class Program { private static void Main(string[] args) { int accountId = 1000; // YOUR-ACCOUNT-ID string userName = ...
Make Check Connectionstring via builder generic
using System; using System.Collections.Generic; using System.Data.SqlClient; namespace Dirtybase.App.Options.Validators { class SqlOptionsValidator : IOptionsValidator { public Errors Errors(DirtyOptions options) { var errors = new Errors(); if(string.IsNullOrWhiteSpace(...
using System; using System.Collections.Generic; using System.Data.Common; using System.Data.SqlClient; namespace Dirtybase.App.Options.Validators { class SqlOptionsValidator : IOptionsValidator { public Errors Errors(DirtyOptions options) { var errors = new Errors(); if(...
Fix memory leak when using the SDL2 clipboard
// Copyright (c) 2007-2018 ppy Pty Ltd <contact@ppy.sh>. // Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu-framework/master/LICENCE using System.Runtime.InteropServices; namespace osu.Framework.Platform.Linux.Sdl { public class SdlClipboard : Clipboard { private const strin...
// Copyright (c) 2007-2018 ppy Pty Ltd <contact@ppy.sh>. // Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu-framework/master/LICENCE using System; using System.Runtime.InteropServices; namespace osu.Framework.Platform.Linux.Sdl { public class SdlClipboard : Clipboard { priva...
Send data always as application/octet-stream
//----------------------------------------------------------------------- // <copyright file="BackgroundUpload.cs" company="Fubar Development Junker"> // Copyright (c) Fubar Development Junker. All rights reserved. // </copyright> // <author>Mark Junker</author> //--------------------------------------------------...
//----------------------------------------------------------------------- // <copyright file="BackgroundUpload.cs" company="Fubar Development Junker"> // Copyright (c) Fubar Development Junker. All rights reserved. // </copyright> // <author>Mark Junker</author> //--------------------------------------------------...
Add handling of null values in the Papers property
using System.Collections.Generic; using Newtonsoft.Json; namespace PrintNode.Net { public class PrintNodePrinterCapabilities { [JsonProperty("bins")] public IEnumerable<string> Bins { get; set; } [JsonProperty("collate")] public bool Collate { get; set; } ...
using System.Collections.Generic; using Newtonsoft.Json; namespace PrintNode.Net { public class PrintNodePrinterCapabilities { [JsonProperty("bins")] public IEnumerable<string> Bins { get; set; } [JsonProperty("collate")] public bool Collate { get; set; } ...
Add new overload to the Deserialize method
using System.IO; namespace Gigobyte.Mockaroo.Serialization { public interface ISerializable { Stream Serialize(); void Deserialize(Stream stream); } }
using System.IO; namespace Gigobyte.Mockaroo.Serialization { public interface ISerializable { Stream Serialize(); void Deserialize(byte[] bytes); void Deserialize(Stream stream); } }