Instruction
stringlengths
14
778
input_code
stringlengths
0
4.24k
output_code
stringlengths
1
5.44k
Fix to the last commit.
using System; using System.Collections.Generic; using System.Linq; using System.Reflection; using JetBrains.Annotations; using JetBrains.Metadata.Utils; using JetBrains.ReSharper.Psi; using JetBrains.ReSharper.Psi.Impl.Reflection2.ExternalAnnotations; using JetBrains.Util; namespace AgentHeisenbug.Annotatio...
using System; using System.Collections.Generic; using System.IO; using System.Linq; using System.Reflection; using JetBrains.Annotations; using JetBrains.Metadata.Utils; using JetBrains.ReSharper.Psi; using JetBrains.ReSharper.Psi.Impl.Reflection2.ExternalAnnotations; using JetBrains.Util; namespace AgentH...
Fix path too long bug
using System.Threading.Tasks; using Newtonsoft.Json; namespace Audiotica.Core.Utils { public static class StringExtensions { public static string CleanForFileName(this string str, string invalidMessage) { if (string.IsNullOrEmpty(str)) { return null; ...
using System.Threading.Tasks; using Newtonsoft.Json; namespace Audiotica.Core.Utils { public static class StringExtensions { public static string CleanForFileName(this string str, string invalidMessage) { if (string.IsNullOrEmpty(str)) { return null; ...
Remove tray icon on safe exit.
using System; using System.Drawing; using System.Reflection; using System.Windows.Forms; namespace IronAHK.Scripting { partial class Script { public static void CreateTrayMenu() { if (Environment.OSVersion.Platform != PlatformID.Win32NT) return; var men...
using System; using System.Drawing; using System.Reflection; using System.Windows.Forms; namespace IronAHK.Scripting { partial class Script { public static void CreateTrayMenu() { if (Environment.OSVersion.Platform != PlatformID.Win32NT) return; var men...
Comment out logging for debugging purposes
// 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. #nullable disable using osu.Game.Rulesets.Difficulty.Preprocessing; using osu.Game.Rulesets.Difficulty.Skills; using osu.Game.Rulesets.Mods; using osu.Game.Rulesets.Tai...
// 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. #nullable disable using osu.Game.Rulesets.Difficulty.Preprocessing; using osu.Game.Rulesets.Difficulty.Skills; using osu.Game.Rulesets.Mods; using osu.Game.Rulesets.Tai...
Allow virtual SampleChannels to count towards statistics
// 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. namespace osu.Framework.Audio.Sample { /// <summary> /// A <see cref="SampleChannel"/> which explicitly plays no audio. /// Aimed for scenarios in which a non...
// 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. namespace osu.Framework.Audio.Sample { /// <summary> /// A <see cref="SampleChannel"/> which explicitly plays no audio. /// Aimed for scenarios in which a non...
Fix problem with invalid whitespaces and lower characters in input license key code
using System; using System.Threading; using UnityEngine; using UnityEngine.UI; namespace PatchKit.Unity.Patcher.Licensing { public class KeyLicenseObtainer : MonoBehaviour, ILicenseObtainer { private State _state = State.None; private KeyLicense _keyLicense; private Animator _animato...
using System; using System.Threading; using UnityEngine; using UnityEngine.UI; namespace PatchKit.Unity.Patcher.Licensing { public class KeyLicenseObtainer : MonoBehaviour, ILicenseObtainer { private State _state = State.None; private KeyLicense _keyLicense; private Animator _animato...
Order by filename ASC, so that detached versions appear always after the original photo, even if Reverse Order is used
/* * FSpot.Query.OrderByTime.cs * * Author(s): * Stephane Delcroix <stephane@delcroix.org> * * This is free software. See COPYING for details. * */ using System; using FSpot.Utils; namespace FSpot.Query { public class OrderByTime : IQueryCondition, IOrderCondition { public static OrderByTime OrderByTimeAs...
/* * FSpot.Query.OrderByTime.cs * * Author(s): * Stephane Delcroix <stephane@delcroix.org> * * This is free software. See COPYING for details. * */ using System; using FSpot.Utils; namespace FSpot.Query { public class OrderByTime : IQueryCondition, IOrderCondition { public static OrderByTime OrderByTimeAs...
Add some comments to the new PhotosDirectory field so users understand how it is used.
using System.Threading.Tasks; namespace MetaMediaPlugin.Abstractions { public interface IMediaService { bool IsCameraAvailable { get; } bool IsTakePhotoSupported { get; } bool IsPickPhotoSupported { get; } string PhotosDirectory { get; set; } // this is only used in An...
using System.Threading.Tasks; namespace MetaMediaPlugin.Abstractions { public interface IMediaService { bool IsCameraAvailable { get; } bool IsTakePhotoSupported { get; } bool IsPickPhotoSupported { get; } /// <summary> /// Specify the photo directory to use...
Set verbosity to diagnostic on hosted build.
using System; using System.IO; using System.Threading.Tasks; using Microsoft.Build.CommandLine; using Microsoft.Build.Logging.StructuredLogger; using Microsoft.Build.Utilities; namespace StructuredLogViewer { public class HostedBuild { private string projectFilePath; public Hoste...
using System; using System.IO; using System.Threading.Tasks; using Microsoft.Build.CommandLine; using Microsoft.Build.Logging.StructuredLogger; using Microsoft.Build.Utilities; namespace StructuredLogViewer { public class HostedBuild { private string projectFilePath; public Hoste...
Fix bug that was preventing transation of some items.
namespace Grabacr07.KanColleWrapper.Translation { public static class ItemTranslationHelper { public static string TranslateItemName(string name) { string stripped = TranslationHelper.StripInvalidCharacters(name); string translated = (string.IsNullOrEmpty(stripped) ? nul...
namespace Grabacr07.KanColleWrapper.Translation { public static class ItemTranslationHelper { public static string TranslateItemName(string name) { string stripped = name; string translated = (string.IsNullOrEmpty(stripped) ? null : Equipment.Resources.ResourceManager.Ge...
Handle HttpException explicitly and include comments for workaround
using System; using Abp.Dependency; using Abp.EntityHistory; using Abp.Runtime; using JetBrains.Annotations; using System.Web; namespace Abp.Web.EntityHistory { /// <summary> /// Implements <see cref="IEntityChangeSetReasonProvider"/> to get reason from HTTP request. /// </summary> public class HttpRe...
using Abp.Dependency; using Abp.EntityHistory; using Abp.Runtime; using JetBrains.Annotations; using System.Web; namespace Abp.Web.EntityHistory { /// <summary> /// Implements <see cref="IEntityChangeSetReasonProvider"/> to get reason from HTTP request. /// </summary> public class HttpRequestEntityCha...
Fix for gallio on non-windows systems
using System; using System.Collections.Generic; using System.IO; using System.Linq; using Bari.Core.Generic; using Bari.Core.Tools; using Bari.Core.UI; namespace Bari.Plugins.Gallio.Tools { public class Gallio: DownloadablePackedExternalTool, IGallio { private readonly IFileSystemDirectory targetDir; ...
using System; using System.Collections.Generic; using System.IO; using System.Linq; using Bari.Core.Generic; using Bari.Core.Tools; using Bari.Core.UI; namespace Bari.Plugins.Gallio.Tools { public class Gallio: DownloadablePackedExternalTool, IGallio { private readonly IFileSystemDirectory targetDir; ...
Add a couple of SharpDX Math related assertion helpers
using System.Diagnostics; using System.Threading; static class DebugUtilities { public static void Burn(long ms) { Stopwatch stopwatch = Stopwatch.StartNew(); while (stopwatch.ElapsedMilliseconds < ms) { } } public static void Sleep(long ms) { Stopwatch stopwatch = Stopwatch.StartNew(); while (stopwatch...
using SharpDX; using System; using System.Diagnostics; using System.Threading; static class DebugUtilities { public static void Burn(long ms) { Stopwatch stopwatch = Stopwatch.StartNew(); while (stopwatch.ElapsedMilliseconds < ms) { } } public static void Sleep(long ms) { Stopwatch stopwatch = Stopwatch.S...
Convert .Text and .Primitive to interfaces
using System; using System.Linq; namespace KornelijePetak.IncidentCS { public static partial class Incident { internal static Random Rand { get; private set; } public static PrimitiveRandomizer Primitive { get; private set; } public static TextRandomizer Text { get; private set; } static Incident() { ...
using System; using System.Linq; namespace KornelijePetak.IncidentCS { public static partial class Incident { internal static Random Rand { get; private set; } public static IPrimitiveRandomizer Primitive { get; private set; } public static ITextRandomizer Text { get; private set; } static Incident() { ...
Disable caching to force fetching of data when navigating backwards. Added api to clear db.
using System.Linq; using Microsoft.AspNetCore.Mvc; using topicr.Models; namespace topicr.Controllers.Api { [Produces("application/json")] [Route("api/topics")] public class TopicController : Controller { private readonly TopicContext _db; public TopicController(TopicContext db) ...
using System.Linq; using Microsoft.AspNetCore.Mvc; using topicr.Models; namespace topicr.Controllers.Api { [Produces("application/json")] [Route("api/topics")] public class TopicController : Controller { private readonly TopicContext _db; public TopicController(TopicContext db) ...
Update example implementation for Bob exercise
public static class Bob { public static string Response(string statement) { if (IsSilence(statement)) return "Fine. Be that way!"; if (IsYelling(statement)) return "Whoa, chill out!"; if (IsQuestion(statement)) return "Sure."; return "Whatever....
public static class Bob { public static string Response(string statement) { if (IsSilence(statement)) return "Fine. Be that way!"; if (IsYelling(statement) && IsQuestion(statement)) return "Calm down, I know what I'm doing!"; if (IsYelling(statement)) ...
Make the guard class internal
using System; namespace PalmDB { /// <summary> /// Typical guard class that contains methods to validate method arguments. /// </summary> public static class Guard { /// <summary> /// Throws a <see cref="ArgumentNullException"/> if the specified <paramref name="argument"/> is <c>nu...
using System; namespace PalmDB { /// <summary> /// Typical guard class that contains methods to validate method arguments. /// </summary> internal static class Guard { /// <summary> /// Throws a <see cref="ArgumentNullException"/> if the specified <paramref name="argument"/> is <c>...
Fix (again) syntax issue with using static
using System.Collections.Generic; using System.IO; using System.Linq; using System.Xml.Serialization; using NBi.Core; using NBi.Core.ResultSet; using static NBi.Core.ResultSet.ResultSetBuilder; namespace NBi.Xml.Items.ResultSet { public class ResultSetXml : BaseItem { [XmlElement("row")] ...
using System.Collections.Generic; using System.IO; using System.Linq; using System.Xml.Serialization; using NBi.Core; using NBi.Core.ResultSet; namespace NBi.Xml.Items.ResultSet { public class ResultSetXml : BaseItem { [XmlElement("row")] public List<RowXml> _rows { get; set; } ...
Add a 4th board cell status "Miss" to show that the user shoot to a blank spot.
using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace FightFleet { public enum BoardCellStatus { Blank = 0, Ship = 1, Hit = 2 } }
using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace FightFleet { public enum BoardCellStatus { Blank = 0, Ship = 1, Hit = 2, Miss = 3 } }
Fix bug in assembly file versioning ("*" was included in file version string)
using System.Reflection; using JetBrains.ActionManagement; using JetBrains.Application.PluginSupport; // 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: AssemblyT...
using System.Reflection; using JetBrains.ActionManagement; using JetBrains.Application.PluginSupport; // 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: AssemblyT...
Reset protagonist balance to 0
using System; class Protagonist { private static Protagonist INSTANCE; private static int MAX_MONEY = 99; private int balance; public int Balance { get { return balance; } } private Inventory inventory; public Inventory Inventory { get { return inventory; } } private Outfit outfit; private Protagoni...
using System; class Protagonist { private static Protagonist INSTANCE; private static int MAX_MONEY = 99; private int balance; public int Balance { get { return balance; } } private Inventory inventory; public Inventory Inventory { get { return inventory; } } private Outfit outfit; private Protagoni...
Set window title for authentication
using System; using UnityEditor; using UnityEngine; namespace GitHub.Unity { [Serializable] class AuthenticationWindow : BaseWindow { [SerializeField] private AuthenticationView authView; [MenuItem("GitHub/Authenticate")] public static void Launch() { Open(); ...
using System; using UnityEditor; using UnityEngine; namespace GitHub.Unity { [Serializable] class AuthenticationWindow : BaseWindow { [SerializeField] private AuthenticationView authView; [MenuItem("GitHub/Authenticate")] public static void Launch() { Open(); ...
Remove unneeded methods from model
using System; using System.Diagnostics; using System.Threading.Tasks; using Newtonsoft.Json.Linq; namespace twitch_tv_viewer.Models { public class TwitchChannel : IComparable { public TwitchChannel() { } public TwitchChannel(JToken data) { var channel = dat...
using System; using System.Diagnostics; using System.Threading.Tasks; using Newtonsoft.Json.Linq; namespace twitch_tv_viewer.Models { public class TwitchChannel : IComparable { public TwitchChannel() { } public TwitchChannel(JToken data) { var channel = dat...
Add endpoints for controlling game speed.
using System; using System.Collections.Generic; using System.Linq; using System.Reflection; using Game; using GnomeServer.Extensions; using GnomeServer.Routing; namespace GnomeServer.Controllers { [Route("Game")] public sealed class GameController : ConventionRoutingController { [HttpGet] ...
using System.Globalization; using System.Net; using Game; using GnomeServer.Routing; namespace GnomeServer.Controllers { [Route("Game")] public sealed class GameController : ConventionRoutingController { [HttpGet] [Route("Speed")] public IResponseFormatter GetSpeed() { ...
Correct the Example Name in Comment
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.IO; using System.Globalization; using Microsoft.VisualStudio.TestTools.UnitTesting; namespace Aspose.Cells.Examples.CSharp.Articles { public class LoadWorkbookWithSpecificCultureInfoNumberFormat { public...
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.IO; using System.Globalization; using Microsoft.VisualStudio.TestTools.UnitTesting; namespace Aspose.Cells.Examples.CSharp.Articles { public class LoadWorkbookWithSpecificCultureInfoNumberFormat { public...
Fix background brightness being adjusted globally
// Copyright (c) 2007-2018 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.Framework.Graphics.Containers; using osu.Framework.Graphics.Sprites; using osu.Framework.Graphic...
// Copyright (c) 2007-2018 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.Framework.Graphics.Containers; using osu.Framework.Graphics.Sprites; using osu.Framework.Graphic...
Drop in other CRUD methods
using BatteryCommander.Web.Models; using Microsoft.AspNetCore.Mvc; using System; using System.Collections.Generic; using System.Linq; using System.Threading.Tasks; namespace BatteryCommander.Web.Controllers { public class ACFTController : Controller { private readonly Database db; public ACFT...
using BatteryCommander.Web.Models; using BatteryCommander.Web.Services; using Microsoft.AspNetCore.Mvc; using Microsoft.EntityFrameworkCore; using System; using System.Collections.Generic; using System.Linq; using System.Threading.Tasks; namespace BatteryCommander.Web.Controllers { public class ACFTController : C...
Use 'o' format for date. Fixed splitting problem with backtrace.
using System; using System.Linq; using Newtonsoft.Json; namespace Exceptional.Core { public class ExceptionSummary { [JsonProperty(PropertyName = "occurred_at")] public DateTime OccurredAt { get; set; } [JsonProperty(PropertyName = "message")] public string Message ...
using System; using System.Globalization; using System.Linq; using Newtonsoft.Json; namespace Exceptional.Core { public class ExceptionSummary { [JsonProperty(PropertyName = "occurred_at")] public string OccurredAt { get; set; } [JsonProperty(PropertyName = "message")] ...
Add key binding set to loop i/o params
using System.IO; using NClap.ConsoleInput; using NClap.Utilities; namespace NClap.Repl { /// <summary> /// Parameters for constructing a loop with advanced line input. The /// parameters indicate how the loop's textual input and output should /// be implemented. /// </summary> public class Lo...
using System.IO; using NClap.ConsoleInput; using NClap.Utilities; namespace NClap.Repl { /// <summary> /// Parameters for constructing a loop with advanced line input. The /// parameters indicate how the loop's textual input and output should /// be implemented. /// </summary> public class Lo...
Fix build of test case
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using Xamarin.Forms; using Xamarin.Forms.CustomAttributes; using Xamarin.Forms.Internals; namespace Xamarin.Forms.Controls.Issues { [Preserve(AllMembers = true)] [Issue(IssueTracker.Bugzilla, 5...
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using Xamarin.Forms; using Xamarin.Forms.CustomAttributes; using Xamarin.Forms.Internals; namespace Xamarin.Forms.Controls.Issues { [Preserve(AllMembers = true)] [Issue(IssueTracker.Bugzilla, 5...
Remove some unused using statements
// Copyright 2017 Daniel Plemmons // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to ...
// Copyright 2017 Daniel Plemmons // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to ...
Add test for scalar queries with 1 row
using System; using System.Linq; #if NETFX_CORE using Microsoft.VisualStudio.TestPlatform.UnitTestFramework; using SetUp = Microsoft.VisualStudio.TestPlatform.UnitTestFramework.TestInitializeAttribute; using TestFixture = Microsoft.VisualStudio.TestPlatform.UnitTestFramework.TestClassAttribute; using Test = Microsoft....
using System; using System.Linq; #if NETFX_CORE using Microsoft.VisualStudio.TestPlatform.UnitTestFramework; using SetUp = Microsoft.VisualStudio.TestPlatform.UnitTestFramework.TestInitializeAttribute; using TestFixture = Microsoft.VisualStudio.TestPlatform.UnitTestFramework.TestClassAttribute; using Test = Microsoft....
Adjust the values for the Punchline Place fishing spot.
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using TTMouseclickSimulator.Core.Environment; namespace TTMouseclickSimulator.Core.ToontownRewritten.Actions.Fishing { public class FishingSpotFlavor { public Coordinates Scan1 { get; } ...
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using TTMouseclickSimulator.Core.Environment; namespace TTMouseclickSimulator.Core.ToontownRewritten.Actions.Fishing { public class FishingSpotFlavor { public Coordinates Scan1 { get; } ...
Initialize new home controller instance for test class
namespace Foo.Tests.Web.Controllers { public class HomeControllerTest { } }
using Foo.Web.Controllers; namespace Foo.Tests.Web.Controllers { public class HomeControllerTest { private readonly HomeController _controller; public HomeControllerTest() { _controller = new HomeController(); } } }
Update find resource code post internal change
using Glimpse.Web; using Microsoft.AspNet.Builder; using Microsoft.AspNet.Http; using System.IO; using System.Reflection; using System.Text; using Glimpse.Server.Web; namespace Glimpse.Agent.Browser.Resources { public class BrowserAgent : IMiddlewareResourceComposer { public void Register(IApplication...
using Glimpse.Web; using Microsoft.AspNet.Builder; using Microsoft.AspNet.Http; using System.IO; using System.Reflection; using System.Text; using Glimpse.Server.Web; namespace Glimpse.Agent.Browser.Resources { public class BrowserAgent : IMiddlewareResourceComposer { public void Register(IApplication...
Fix target in installer form
@{ Layout = "master.cshtml"; } <div class="admin-container"> <div class="admin-form-view"> <form role="form" method="POST" target="/"> <div class="form-group well"> <label for="key">Key</label> <input type="password" class="form-control" id="key" name="key" p...
@{ Layout = "master.cshtml"; } <div class="admin-container"> <div class="admin-form-view"> <form role="form" method="POST"> <div class="form-group well"> <label for="key">Key</label> <input type="password" class="form-control" id="key" name="key" placeholder=...
FIX logger variable in PS scripts
using System.Collections.Generic; using System.Management.Automation.Runspaces; using Aggregator.Core.Interfaces; using Aggregator.Core.Monitoring; namespace Aggregator.Core { /// <summary> /// Invokes Powershell scripting engine /// </summary> public class PsScriptEngine : ScriptEngine { ...
using System.Collections.Generic; using System.Management.Automation.Runspaces; using Aggregator.Core.Interfaces; using Aggregator.Core.Monitoring; namespace Aggregator.Core { /// <summary> /// Invokes Powershell scripting engine /// </summary> public class PsScriptEngine : ScriptEngine { ...
Fix "Keep Window Centered" option
#region using System; using System.ComponentModel; using System.Windows; using System.Windows.Interop; using SteamAccountSwitcher.Properties; #endregion namespace SteamAccountSwitcher { /// <summary> /// Interaction logic for MainWindow.xaml /// </summary> public partial class SwitchWindow : Win...
#region using System; using System.ComponentModel; using System.Windows; using System.Windows.Interop; using SteamAccountSwitcher.Properties; #endregion namespace SteamAccountSwitcher { /// <summary> /// Interaction logic for MainWindow.xaml /// </summary> public partial class SwitchWindow : Win...
Allow selecting vpks in content search paths
using System; using System.Windows.Forms; using GUI.Utils; namespace GUI.Forms { public partial class SettingsForm : Form { public SettingsForm() { InitializeComponent(); } private void SettingsForm_Load(object sender, EventArgs e) { foreach (va...
using System; using System.Windows.Forms; using GUI.Utils; namespace GUI.Forms { public partial class SettingsForm : Form { public SettingsForm() { InitializeComponent(); } private void SettingsForm_Load(object sender, EventArgs e) { foreach (va...
Add App_Code, App_Data and App_Plugins folders to be created during app startup
using System; using System.Collections.Generic; using System.IO; using System.Linq; using System.Web; using Umbraco.Core.IO; using umbraco.businesslogic; using umbraco.interfaces; namespace umbraco.presentation { public class EnsureSystemPathsApplicationStartupHandler : IApplicationStartupHandler ...
using System; using System.Collections.Generic; using System.IO; using System.Linq; using System.Web; using Umbraco.Core.IO; using umbraco.businesslogic; using umbraco.interfaces; namespace umbraco.presentation { public class EnsureSystemPathsApplicationStartupHandler : IApplicationStartupHandler ...
Fix Canvas negative Height test
using System; using Microsoft.VisualStudio.TestTools.UnitTesting; using Ooui; namespace Tests { [TestClass] public class CanvasTests { [TestMethod] public void Context2dState () { var c = new Canvas (); Assert.AreEqual (1, c.StateMessages.Count); ...
using System; using Microsoft.VisualStudio.TestTools.UnitTesting; using Ooui; namespace Tests { [TestClass] public class CanvasTests { [TestMethod] public void Context2dState () { var c = new Canvas (); Assert.AreEqual (1, c.StateMessages.Count); ...
Add exception handling in middleware
using System; using Microsoft.AspNetCore.Builder; using Criteo.Profiling.Tracing; namespace Criteo.Profiling.Tracing.Middleware { public static class TracingMiddleware { public static void UseTracing(this IApplicationBuilder app, string serviceName) { var extractor = new Middleware....
using System; using Microsoft.AspNetCore.Builder; using Criteo.Profiling.Tracing; namespace Criteo.Profiling.Tracing.Middleware { public static class TracingMiddleware { public static void UseTracing(this IApplicationBuilder app, string serviceName) { var extractor = new Middleware....
Refactor Subtract Doubles Operation to use GetValues and CloneWithValues
namespace TensorSharp.Operations { using System; using System.Collections.Generic; using System.Linq; using System.Text; public class SubtractDoubleDoubleOperation : IBinaryOperation<double, double, double> { public Tensor<double> Evaluate(Tensor<double> tensor1, Tensor<double...
namespace TensorSharp.Operations { using System; using System.Collections.Generic; using System.Linq; using System.Text; public class SubtractDoubleDoubleOperation : IBinaryOperation<double, double, double> { public Tensor<double> Evaluate(Tensor<double> tensor1, Tensor<double...
FIx issue looking up property aliases for built-in datatypes
using System; using System.Collections.Generic; using System.Data; using System.Linq; using System.Web; using Census.Interfaces; namespace Census.UmbracoObject { public class Property : IUmbracoObject { public string Name { get { return "Document Type"; } } public List<string> BackofficePages...
using System; using System.Collections.Generic; using System.Data; using System.Linq; using System.Web; using Census.Interfaces; namespace Census.UmbracoObject { public class Property : IUmbracoObject { public string Name { get { return "Document Type"; } } public List<string> BackofficePages...
Add choices of hover sample sets
// 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.Audio; using osu.Framework.Audio.Sample; using osu.Framework.Graphics.UserInterface; using osu.Framework.Inpu...
// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>. // Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE using System.ComponentModel; using osu.Framework.Allocation; using osu.Framework.Audio; using osu.Framework.Audio.Sample; using osu.Framework.Extensions; using ...
Read pages and break them down into streams If file stream was not owned by us, rewind it after reading
using System; using System.Collections.Generic; using System.IO; using System.Linq; using Mlabs.Ogg.Metadata; namespace Mlabs.Ogg { public class OggReader { private readonly Stream m_fileStream; private readonly bool m_owns; public OggReader(string fileName) { if (...
using System; using System.IO; using System.Linq; namespace Mlabs.Ogg { public class OggReader { private readonly Stream m_fileStream; private readonly bool m_owns; public OggReader(string fileName) { if (fileName == null) throw new ArgumentNullException("fileName"...
Change path for def template generator
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using RimTrans.Builder; using RimTrans.Builder.Crawler; namespace RimTransLibTest { public static class GenHelper { public static void Gen_DefTypeNameOf() { Console.Write(DefTyp...
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using RimTrans.Builder; using RimTrans.Builder.Crawler; namespace RimTransLibTest { public static class GenHelper { public static void Gen_DefTypeNameOf() { Console.Write(DefTyp...
Make virtual tracks reeeeeeeaaally long
// 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.Timing; namespace osu.Framework.Audio.Track { public class TrackVirtual : Track { private readonly StopwatchClock...
// 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.Timing; namespace osu.Framework.Audio.Track { public class TrackVirtual : Track { private readonly StopwatchClock...
Fix category of revision log RSS feeds.
<?xml version="1.0"?> <!-- RSS generated by Trac v<?cs var:trac.version ?> on <?cs var:trac.time ?> --> <rss version="2.0"> <channel><?cs if:project.name_encoded ?> <title><?cs var:project.name_encoded ?>: Revisions of <?cs var:log.path ?></title><?cs else ?> <title>Revisions of <?cs var:log.path ?></title...
<?xml version="1.0"?> <!-- RSS generated by Trac v<?cs var:trac.version ?> on <?cs var:trac.time ?> --> <rss version="2.0"> <channel><?cs if:project.name_encoded ?> <title><?cs var:project.name_encoded ?>: Revisions of <?cs var:log.path ?></title><?cs else ?> <title>Revisions of <?cs var:log.path ?></title...
Remove these enum values that were copy-pasted by mistake.
namespace ZWave.CommandClasses { public enum ThermostatFanModeValue : byte { AutoLow = 0x00, Low = 0x01, AutoHigh = 0x02, High = 0x03, AutoMedium = 0x04, Medium = 0x05, Circulation = 0x06, HumidityCirculation = 0x07, LeftAndRight = 0x08, ...
namespace ZWave.CommandClasses { public enum ThermostatFanModeValue : byte { AutoLow = 0x00, Low = 0x01, AutoHigh = 0x02, High = 0x03, AutoMedium = 0x04, Medium = 0x05, Circulation = 0x06, HumidityCirculation = 0x07, LeftAndRight = 0x08, ...
Fix expiry date on create new poll
using System; using System.ComponentModel.DataAnnotations; namespace VotingApplication.Web.Api.Models.DBViewModels { public class PollCreationRequestModel { [Required] public string Name { get; set; } [Required] public string Creator { get; set; } [Required] p...
using System; using System.ComponentModel.DataAnnotations; namespace VotingApplication.Web.Api.Models.DBViewModels { public class PollCreationRequestModel { [Required] public string Name { get; set; } [Required] public string Creator { get; set; } [Required] p...
Add Initialize() method to ITabsterPlugin
#region using System; using Tabster.Core.Plugins; #endregion namespace TextFile { public class TextFilePlugin : ITabsterPlugin { #region Implementation of ITabsterPlugin public string Author { get { return "Nate Shoffner"; } } public st...
#region using System; using Tabster.Core.Plugins; #endregion namespace TextFile { public class TextFilePlugin : ITabsterPlugin { #region Implementation of ITabsterPlugin public string Author { get { return "Nate Shoffner"; } } public st...
Add AssertConfigurationIsValid test for missing ctor parameter
using Core; using StructureMap; using System; using Xunit; namespace Tests { public class ValidationTests { [Fact] public void VerifyValidConfiguration() { var container = new Container(x => { x.For<IService>().Use<Service>(); }); ...
using Core; using StructureMap; using System; using Xunit; namespace Tests { public class ValidationTests { [Fact] public void MissingRequiredConstructorArgument() { var container = new Container(x => { x.For<IService>().Use<ServiceWithCtorArg>()...
Use anchor tag helper instead of hard coded href
@page @model Disable2faModel @{ ViewData["Title"] = "Disable two-factor authentication (2FA)"; ViewData["ActivePage"] = "TwoFactorAuthentication"; } <h2>@ViewData["Title"]</h2> <div class="alert alert-warning" role="alert"> <p> <span class="glyphicon glyphicon-warning-sign"></span> <stron...
@page @model Disable2faModel @{ ViewData["Title"] = "Disable two-factor authentication (2FA)"; ViewData["ActivePage"] = "TwoFactorAuthentication"; } <h2>@ViewData["Title"]</h2> <div class="alert alert-warning" role="alert"> <p> <span class="glyphicon glyphicon-warning-sign"></span> <stron...
Fix settings checkboxes not being searchable
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. using osu.Framework.Graphics; using osu.Game.Graphics.UserInterface; namespace osu.Game.Overlays.Settings { public class SettingsCheckbox : SettingsItem<bool> { ...
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. using osu.Framework.Graphics; using osu.Game.Graphics.UserInterface; namespace osu.Game.Overlays.Settings { public class SettingsCheckbox : SettingsItem<bool> { ...
Allow deletion and reading of saved package information.
using System; using System.Collections; using System.Collections.Generic; using System.Linq; using System.Text; using System.Security.Cryptography; using System.IO; using YaTools.Yaml; using Raven; using Raven.Client; using Raven.Client.Document; using Raven.Client.Embedded; using Raven.Storage; using Raven.Database; ...
using System; using System.Collections; using System.Collections.Generic; using System.Linq; using System.Text; using System.Security.Cryptography; using System.IO; using YaTools.Yaml; using Raven; using Raven.Client; using Raven.Client.Document; using Raven.Client.Embedded; using Raven.Storage; using Raven.Database; ...
Split apart and made generic the interfaces for maps following interface segregation and CQRS
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace Engine.Mappings { public interface IMapping<T> { void print(); T get_pos(ICoordinate coord); bool pos_exists(ICoordinate coord); bool add_to_pos(T addit...
using Engine.Mappings.Coordinates; using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace Engine.Mappings { public interface IMapWriteable<T> { bool can_move(ICoordinate<T> startCoord, ICoordinate<T> endCoord); bool move(I...
Add command in the comment.
using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Diagnostics; using System.Linq; using System.ServiceModel; using System.ServiceProcess; using System.Text; using System.Threading.Tasks; namespace WinSerHost { public partial class Service1 : ServiceBase ...
using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Diagnostics; using System.Linq; using System.ServiceModel; using System.ServiceProcess; using System.Text; using System.Threading.Tasks; namespace WinSerHost { // For this service to work correctly, //...
Use SkipLocalsInit on .NET 5
using System.Runtime.CompilerServices; [assembly: InternalsVisibleTo("ZeroLog.Tests")] [assembly: InternalsVisibleTo("ZeroLog.Benchmarks")]
using System.Runtime.CompilerServices; [assembly: InternalsVisibleTo("ZeroLog.Tests")] [assembly: InternalsVisibleTo("ZeroLog.Benchmarks")] #if NETCOREAPP && !NETCOREAPP2_1 [module: SkipLocalsInit] #endif
Add timeout waiting for MainWindow.
namespace Gu.Wpf.Geometry.UiTests { using Gu.Wpf.UiAutomation; using NUnit.Framework; public class MainWindowTests { [Test] public void ClickAllTabs() { // Just a smoke test so that we do not explode. using (var app = Application.Launch("Gu.Wpf.Geometry.D...
namespace Gu.Wpf.Geometry.UiTests { using System; using Gu.Wpf.UiAutomation; using NUnit.Framework; public class MainWindowTests { [Test] public void ClickAllTabs() { // Just a smoke test so that we do not explode. using (var app = Application.Launch(...
Add - Aggiunta proprietà lista sedi alla result degli utenti nella gestione utenti
//----------------------------------------------------------------------- // <copyright file="ListaOperatoriResult.cs" company="CNVVF"> // Copyright (C) 2017 - CNVVF // // This file is part of SOVVF. // SOVVF is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public...
//----------------------------------------------------------------------- // <copyright file="ListaOperatoriResult.cs" company="CNVVF"> // Copyright (C) 2017 - CNVVF // // This file is part of SOVVF. // SOVVF is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public...
Fix manual smoke test for Google.Cloud.Firestore.Admin.V1
// Copyright 2019 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in...
// Copyright 2019 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in...
Add non-complete boss controller script
using System.Collections; using System.Collections.Generic; using UnityEngine; public class MouthOfEvilController : MonoBehaviour { public List<EvilEyeScript> evilEyes; public int mouthOfEvilHealth = 12; private int hitsLeftInPhase; public int maxHitsPerPhase = 4; public bool isInPhase = false; void Awake () ...
using System.Collections; using System.Collections.Generic; using UnityEngine; public class MouthOfEvilController : MonoBehaviour { public List<EvilEyeScript> evilEyes; public int mouthOfEvilHealth = 12; private int hitsLeftInPhase; public int maxHitsPerPhase = 4; public bool isInPhase = false; public int tota...
Improve the interface documentation for the attribute
using System; namespace PropertyChanged { /// <summary> /// Include a <see cref="Type"/> for notification. /// The INotifyPropertyChanged interface is added to the type. /// </summary> [AttributeUsage(AttributeTargets.Class, AllowMultiple = false, Inherited = false)] public class ImplementProp...
using System; namespace PropertyChanged { /// <summary> /// Specifies that PropertyChanged Notification will be added to a class. /// PropertyChanged.Fody will weave the <c>INotifyPropertyChanged</c> interface and implementation into the class. /// When the value of a property changes, the PropertyCha...
Return object from Dump/Inspect extension methods.
using System.ComponentModel; using System.Text; using SharpLab.Runtime.Internal; public static class SharpLabObjectExtensions { // LinqPad/etc compatibility only [EditorBrowsable(EditorBrowsableState.Never)] public static void Dump<T>(this T value) { value.Inspect(title: "Dump"); } ...
using System.ComponentModel; using System.Text; using SharpLab.Runtime.Internal; public static class SharpLabObjectExtensions { // LinqPad/etc compatibility only [EditorBrowsable(EditorBrowsableState.Never)] public static T Dump<T>(this T value) => value.Inspect(title: "Dump"); publ...
Initialize AppConfigCommand with an IApplicationConfiguration
using System; namespace AppHarbor.Commands { public class AddConfigCommand : ICommand { public AddConfigCommand() { } public void Execute(string[] arguments) { throw new NotImplementedException(); } } }
using System; namespace AppHarbor.Commands { public class AddConfigCommand : ICommand { private readonly IApplicationConfiguration _applicationConfiguration; public AddConfigCommand(IApplicationConfiguration applicationConfiguration) { _applicationConfiguration = applicationConfiguration; } public vo...
Change automapper to whitelist classes rather than blacklist enums.
using System; using System.Collections.Generic; using System.Linq; using System.Reflection; using FluentNHibernate.Mapping; namespace FluentNHibernate.AutoMap { public class AutoMapper { private readonly List<IAutoMapper> _mappingRules; public AutoMapper(Conventions conventions) ...
using System; using System.Collections.Generic; using System.Linq; using System.Reflection; using FluentNHibernate.Mapping; namespace FluentNHibernate.AutoMap { public class AutoMapper { private readonly List<IAutoMapper> _mappingRules; public AutoMapper(Conventions conventions) ...
Restructure to start implementing category based pool.
using System.Collections; using System.Collections.Generic; using UnityEngine; public class ObjectPool : MonoBehaviour { [SerializeField] private GameObject _prefab; private Stack<GameObject> _pool; public GameObject prefab { set { _prefab = value; } } //TODO...
using System.Collections; using System.Collections.Generic; using UnityEngine; public class ObjectPool : MonoBehaviour { [SerializeField] private GameObject _defaultPrefab; #region Public methods and properties public GameObject defaultPrefab { set { _defaultPrefab = ...
Change default configuration file name.
using System; using System.IO; using System.Linq; using System.Windows.Forms; using Mono.Options; namespace Menora { static class Program { /// <summary> /// The main entry point for the application. /// </summary> [STAThread] static void Main(string[] arg...
using System; using System.IO; using System.Linq; using System.Windows.Forms; using Mono.Options; namespace Menora { static class Program { /// <summary> /// The main entry point for the application. /// </summary> [STAThread] static void Main(string[] arg...
Remove unnecessary using and comment.
namespace Playground.Leetcode { using System; using System.Collections.Generic; public static class CombinationSum { // Problem number 377. https://leetcode.com/problems/combination-sum-iv/ public static int CombinationSum4(int[] nums, int target) { //Array.Sort(nums...
namespace Playground.Leetcode { using System.Collections.Generic; public static class CombinationSum { // Problem number 377. https://leetcode.com/problems/combination-sum-iv/ public static int CombinationSum4(int[] nums, int target) { var count = 0; var coun...
Make new exception inherit from known type. Tests ok.
using System; namespace RepositoryExceptions.Persistence { /// <summary> /// New exception introduced /// </summary> public class UserNotFoundException : Exception { public UserNotFoundException() : base() { } public UserNotFoundException(string message) : base(mes...
using System; namespace RepositoryExceptions.Persistence { /// <summary> /// New exception introduced /// </summary> public class UserNotFoundException : EntityNotFoundException { public UserNotFoundException() : base() { } public UserNotFoundException(string messa...
Update stripe connect objects based on changes to the API
namespace Paydock_dotnet_sdk.Models { public class ChargeRequestStripeConnect : ChargeRequestBase { public MetaData meta; } public class MetaData { public string stripe_direct_account_id; public string stripe_destination_account_id; public string stripe_transfer_group; public Transfer[] stripe_trans...
namespace Paydock_dotnet_sdk.Models { public class ChargeRequestStripeConnect : ChargeRequestBase { public MetaData meta; public Transfer[] transfer; } public class MetaData { public string stripe_direct_account_id; public decimal stripe_application_fee; public string stripe_destination_account_id; ...
Add AppendEncoded to the builder
// 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. namespace Microsoft.AspNet.Html.Abstractions { /// <summary> /// A builder for HTML content. /// </summary> public interface IHtmlConte...
// 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. namespace Microsoft.AspNet.Html.Abstractions { /// <summary> /// A builder for HTML content. /// </summary> public interface IHtmlConte...
Return name of channel so we can subscribe to it
using SOVND.Client.ViewModels; using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows; using System.Windows.Controls; using System.Windows.Data; using System.Windows.Documents; using System.Windows.Input; using System.Windows.Media; usin...
using SOVND.Client.ViewModels; using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows; using System.Windows.Controls; using System.Windows.Data; using System.Windows.Documents; using System.Windows.Input; using System.Windows.Media; usin...
Fix bug in GitHub backend
namespace Downlink.GitHub { public class GitHubCredentials { public GitHubCredentials(string apiToken, string repoId) { Token = apiToken; var segs = repoId.Split('/'); if (segs.Length != 2) throw new System.InvalidOperationException("Could not parse repository...
namespace Downlink.GitHub { public class GitHubCredentials { public GitHubCredentials(string apiToken, string repoId) { Token = apiToken; var segs = repoId.Split('/'); if (segs.Length != 0) return; if (segs.Length != 2) throw new System.InvalidOper...
Add author to assembly properties
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("Ob...
using System.Reflection; 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("Obvs.RabbitMQ")] [assembly: AssemblyDescr...
Use command line args when configuring the server
using System; using System.Collections.Generic; using System.IO; using System.Linq; using System.Threading.Tasks; using Microsoft.AspNetCore; using Microsoft.AspNetCore.Hosting; using Microsoft.Extensions.Configuration; using Microsoft.Extensions.Logging; namespace AspNetCoreMvc { public class Program...
using System; using System.Collections.Generic; using System.IO; using System.Linq; using System.Threading.Tasks; using Microsoft.AspNetCore; using Microsoft.AspNetCore.Hosting; using Microsoft.Extensions.Configuration; using Microsoft.Extensions.Logging; namespace AspNetCoreMvc { public class Program...
Add methods for opening and closing PSX handle
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Diagnostics; namespace LSDStay { public static class PSXFinder { public static Process FindPSX() { Process psx = Process.GetProcessesByName("psxfin").FirstOrDefault(); } } }
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Diagnostics; namespace LSDStay { public static class PSXFinder { public static Process FindPSX() { Process psx = Process.GetProcessesByName("psxfin").FirstOrDefault(); return ps...
Split WCF functionality out of Autofac.Extras.Multitenant into a separate assembly/package, Autofac.Extras.Multitenant.Wcf. Both packages are versioned 3.1.0.
//------------------------------------------------------------------------------ // <auto-generated> // This code was generated by a tool. // Runtime Version:4.0.30319.34003 // // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. // </auto-generate...
//------------------------------------------------------------------------------ // <auto-generated> // This code was generated by a tool. // Runtime Version:4.0.30319.18051 // // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. // </auto-generate...
Resolve a problem with Obsolete controller
using MailKit.Net.Smtp; using MimeKit; using System; using System.Threading.Tasks; namespace Blogifier.Core.Services { public class MailKitService : IEmailService { private readonly IDataService _db; public MailKitService(IDataService db) { _db = db; } pub...
using MailKit.Net.Smtp; using MimeKit; using System; using System.Threading.Tasks; namespace Blogifier.Core.Services { public class MailKitService : IEmailService { private readonly IDataService _db; public MailKitService(IDataService db) { _db = db; } pub...
Rework models for global domains
using System; using Bit.Core.Domains; using System.Collections.Generic; using Newtonsoft.Json; using Bit.Core.Enums; namespace Bit.Api.Models { public class DomainsResponseModel : ResponseModel { public DomainsResponseModel(User user) : base("domains") { if(user == null...
using System; using Bit.Core.Domains; using System.Collections.Generic; using Newtonsoft.Json; using Bit.Core.Enums; using System.Linq; namespace Bit.Api.Models { public class DomainsResponseModel : ResponseModel { public DomainsResponseModel(User user) : base("domains") { ...
Update comments on test extensions
namespace CertiPay.Common.Testing { using ApprovalTests; using Newtonsoft.Json; using Ploeh.AutoFixture; public static class TestExtensions { private static readonly Fixture _fixture = new Fixture { }; /// <summary> /// Runs ApprovalTests's VerifyJson against a JSON.net se...
namespace CertiPay.Common.Testing { using ApprovalTests; using Newtonsoft.Json; using Ploeh.AutoFixture; public static class TestExtensions { private static readonly Fixture _fixture = new Fixture { }; /// <summary> /// Runs ApprovalTests's VerifyJson against a JSON.net se...
Use interfaces instead of concrete types in file definition
using MyDocs.Common.Contract.Storage; using MyDocs.Common.Model; using System; using System.Collections.Generic; using System.IO; using System.Linq; using System.Text; using System.Threading.Tasks; namespace MyDocs.Common.Contract.Service { public interface IPageExtractor { IEnumerable<string> Support...
using MyDocs.Common.Contract.Storage; using MyDocs.Common.Model; using System; using System.Collections.Generic; using System.IO; using System.Linq; using System.Text; using System.Threading.Tasks; namespace MyDocs.Common.Contract.Service { public interface IPageExtractor { IEnumerable<string> Support...
Adjust rule for Age Calc.
using System; namespace ExtensionMethods { public static class MyExtensionMethods { public static DateTime Tomorrow(this DateTime date) { return date.AddDays(1); } public static DateTime Yesterday(this DateTime date) { return date.Add...
using System; namespace ExtensionMethods { public static class MyExtensionMethods { public static DateTime Tomorrow(this DateTime date) { return date.AddDays(1); } public static DateTime Yesterday(this DateTime date) { return date.Add...
Fix safety measures. Destroy missing.
using UnityEngine; using System.Collections; public class TriggerDestroy : MonoBehaviour { public Transform owner; public float ensureDestroyAfter = 5f; void Update() { ensureDestroyAfter -= Time.deltaTime; } void OnTriggerEnter(Collider other) { if (other.transform.name != owner.name) { return; ...
using UnityEngine; using System.Collections; public class TriggerDestroy : MonoBehaviour { public Transform owner; public float ensureDestroyAfter = 2f; void Update() { ensureDestroyAfter -= Time.deltaTime; if (ensureDestroyAfter <= 0) { Destroy(gameObject); } } void OnTriggerEnter(Collider other) ...
Improve accuracy of IsBackingField extension method.
#region Apache License 2.0 // Copyright 2015 Thaddeus Ryker // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unles...
#region Apache License 2.0 // Copyright 2015 Thaddeus Ryker // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unles...
Use StringBuilderResultStore in the console application
using System; using System.Collections.Generic; using ClearMeasure.NumberCruncher; using ClearMeasure.NumberCruncher.PrinterFormatters; namespace TheTesst { class Program { static void Main(string[] args) { var formatter = new DefaultPrinterFormatter(() => new FileResult...
using System; using System.Collections.Generic; using ClearMeasure.NumberCruncher; using ClearMeasure.NumberCruncher.PrinterFormatters; namespace TheTesst { class Program { static void Main(string[] args) { var formatter = new DefaultPrinterFormatter(() => new StringBuil...
Add xml documentation to moya exceptions
namespace Moya.Exceptions { using System; public class MoyaException : Exception { public MoyaException(String message) : base(message) { } } }
namespace Moya.Exceptions { using System; /// <summary> /// Represents errors that occur during execution of Moya. /// </summary> public class MoyaException : Exception { /// <summary> /// Initializes a new instance of the <see cref="MoyaException"/> class /// with a sp...
Work around faulty StatusStrip implementations
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Drawing; using System.Windows.Forms; namespace ExtendedControls { public class StatusStripCustom : StatusStrip { public const int WM_NCHITTEST = 0x84; public const int WM_NCLBUTTONDOWN = 0xA1; ...
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Drawing; using System.Windows.Forms; namespace ExtendedControls { public class StatusStripCustom : StatusStrip { public const int WM_NCHITTEST = 0x84; public const int WM_NCLBUTTONDOWN = 0xA1; ...
Add find first or default
namespace ErikLieben.Data.Repository { using System.Collections.Generic; public interface IRepository<T> : IEnumerable<T> where T : class { /// <summary> /// Adds the specified item. /// </summary> /// <param name="item">The item to add.</param> void Add(T i...
namespace ErikLieben.Data.Repository { using System.Collections.Generic; public interface IRepository<T> : IEnumerable<T> where T : class { /// <summary> /// Adds the specified item. /// </summary> /// <param name="item">The item to add.</param> void Add(T i...
Set tabs on Android to be on the bottom
using MobileKidsIdApp.ViewModels; using Xamarin.Forms; namespace MobileKidsIdApp.Views { public class MainPage : TabbedPage { private ApplicationBase CurrentApp => Application.Current as ApplicationBase; public MainPage() { Page childListPage = CurrentApp.CreatePage<ChildP...
using MobileKidsIdApp.ViewModels; using Xamarin.Forms.PlatformConfiguration; using Xamarin.Forms.PlatformConfiguration.AndroidSpecific; namespace MobileKidsIdApp.Views { public class MainPage : Xamarin.Forms.TabbedPage { private ApplicationBase CurrentApp => Xamarin.Forms.Application.Current as Applic...
Add Request Authorizer to master request runtime
using System; using System.Collections.Generic; using Microsoft.Framework.DependencyInjection; using System.Threading.Tasks; namespace Glimpse.Web { public class MasterRequestRuntime { private readonly IDiscoverableCollection<IRequestRuntime> _requestRuntimes; private readonly IDiscoverableCol...
using System; using System.Collections.Generic; using Microsoft.Framework.DependencyInjection; using System.Threading.Tasks; namespace Glimpse.Web { public class MasterRequestRuntime { private readonly IDiscoverableCollection<IRequestRuntime> _requestRuntimes; private readonly IDiscoverableCol...
Use Unix line feed for score exportation.
using System.Collections.Generic; using System.IO; using System.Text; using CsvHelper; using CsvHelper.Configuration; using DereTore.Applications.StarlightDirector.Components; using DereTore.Applications.StarlightDirector.Entities.Serialization; namespace DereTore.Applications.StarlightDirector.Entities { public ...
using System.Collections.Generic; using System.IO; using System.Text; using CsvHelper; using CsvHelper.Configuration; using DereTore.Applications.StarlightDirector.Components; using DereTore.Applications.StarlightDirector.Entities.Serialization; namespace DereTore.Applications.StarlightDirector.Entities { public ...
Stop errors if invalid plugboard settings and inputted into the constructor The constructor would throw errors if the length of a string in the string array of settings was of length 1 or 0. Now it only adds plug settings with a length of 2 or above
// Plugboard.cs // <copyright file="Plugboard.cs"> This code is protected under the MIT License. </copyright> using System.Collections.Generic; using System.Linq; namespace EnigmaUtilities.Components { /// <summary> /// An implementation of the plug board component for the enigma machine. /// </summary> ...
// Plugboard.cs // <copyright file="Plugboard.cs"> This code is protected under the MIT License. </copyright> using System.Collections.Generic; using System.Linq; namespace EnigmaUtilities.Components { /// <summary> /// An implementation of the plug board component for the enigma machine. /// </summary> ...
Improve exception report to also get inner exceptions if possible
using System; using System.Diagnostics; using System.Text; using System.Windows.Forms; namespace Daisy.SaveAsDAISY.Addins.Word2007 { public partial class ExceptionReport : Form { private Exception ExceptionRaised { get; } public ExceptionReport(Exception raised) { InitializeComponent(...
using System; using System.Diagnostics; using System.Text; using System.Windows.Forms; namespace Daisy.SaveAsDAISY.Addins.Word2007 { public partial class ExceptionReport : Form { private Exception ExceptionRaised { get; } public ExceptionReport(Exception raised) { InitializeComponent(...
Fix comparer. Seed node all have NodeId=-99, so need to compare their fields.
using System.Collections.Generic; namespace kafka4net.Metadata { class BrokerMeta { public int NodeId; public string Host; public int Port; // Not serialized, just a link to connection associated with this broker internal Connection Conn; public o...
using System; using System.Collections.Generic; namespace kafka4net.Metadata { class BrokerMeta { public int NodeId; public string Host; public int Port; // Not serialized, just a link to connection associated with this broker internal Connection Conn; ...
Fix the access level on the size and rating structs
using System.Drawing; public struct FBAdSize { SizeF size; } public struct FBAdStarRating { float value; int scale; }
using System.Drawing; public struct FBAdSize { public SizeF size; } public struct FBAdStarRating { public float value; public int scale; }
Add Bigsby Jobs was here
using System; namespace ConsoleApplication { public class Program { public static void Main(string[] args) { Console.WriteLine("Hello World, I was created by my father, Bigsby, in an unidentified evironment!"); Console.WriteLine("Bigsby Gates was here!"); Co...
using System; namespace ConsoleApplication { public class Program { public static void Main(string[] args) { Console.WriteLine("Hello World, I was created by my father, Bigsby, in an unidentified evironment!"); Console.WriteLine("Bigsby Gates was here!"); Co...
Change IntervalReached event to contain duration position.
using System; using Microsoft.SPOT; namespace IntervalTimer { public class IntervalReachedEventArgs : EventArgs { public String Message { get; set; } public IntervalReachedEventArgs(String message) { Message = message; } } }
using System; using Microsoft.SPOT; namespace IntervalTimer { public class IntervalReachedEventArgs : EventArgs { public int DurationNumber { get; set; } public IntervalReachedEventArgs(int durationNumber) { DurationNumber = durationNumber; } } }
Scale the playfield to avoid off-screen objects
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. using osu.Framework.Bindables; using osu.Game.Configuration; using osu.Game.Rulesets.Mods; using osu.Game.Rulesets.UI; namespace osu.Game.Rulesets.Osu.Mods { public ...
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. using osu.Framework.Bindables; using osu.Game.Configuration; using osu.Game.Rulesets.Mods; using osu.Game.Rulesets.Osu.Objects; using osu.Game.Rulesets.Osu.UI; using osu....