Instruction stringlengths 14 778 | input_code stringlengths 0 4.24k | output_code stringlengths 1 5.44k |
|---|---|---|
Use ticks instead of milliseconds for time calculation | using System;
using System.Diagnostics;
namespace OpenSage
{
public sealed class GameTimer : IDisposable
{
private readonly Stopwatch _stopwatch;
private double _startTime;
private double _lastUpdate;
public GameTime CurrentGameTime { get; private set; }
public GameTi... | using System;
using System.Diagnostics;
namespace OpenSage
{
public sealed class GameTimer : IDisposable
{
private readonly Stopwatch _stopwatch;
private long _startTime;
private long _lastUpdate;
public GameTime CurrentGameTime { get; private set; }
public GameTimer(... |
Comment out unused variables for now | // 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.Game.Beatmaps;
using osu.Game.Rulesets.Catch.Objects;
using System.Collections.Generic;
using System;
using osu.Game.Rulesets.Objects.Types;
using osu... | // 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.Game.Beatmaps;
using osu.Game.Rulesets.Catch.Objects;
using System.Collections.Generic;
using System;
using osu.Game.Rulesets.Objects.Types;
using osu... |
Add progress example to command line program | using System;
using ArduinoUploader;
namespace ArduinoSketchUploader
{
/// <summary>
/// The ArduinoSketchUploader can upload a compiled (Intel) HEX file directly to an attached Arduino.
/// </summary>
internal class Program
{
private enum StatusCodes
{
Success,
... | using System;
using ArduinoUploader;
using NLog;
namespace ArduinoSketchUploader
{
/// <summary>
/// The ArduinoSketchUploader can upload a compiled (Intel) HEX file directly to an attached Arduino.
/// </summary>
internal class Program
{
private static readonly Logger logger = LogManager.... |
Add Dequeue<T>(int count) for dequeue specified items in Queue<T> by count when enumberate | using System;
using System.Collections.Generic;
using System.Net;
using System.Threading;
using System.Threading.Tasks;
namespace TirkxDownloader.Framework
{
public static class Extension
{
public static async Task<HttpWebResponse> GetResponseAsync(this HttpWebRequest request, CancellationToken ct)
... | using System;
using System.Collections.Generic;
using System.Net;
using System.Threading;
using System.Threading.Tasks;
namespace TirkxDownloader.Framework
{
public static class Extension
{
public static async Task<HttpWebResponse> GetResponseAsync(this HttpWebRequest request, CancellationToken ct)
... |
Add change handling for effects section | // Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
using osu.Framework.Allocation;
using osu.Framework.Bindables;
using osu.Game.Beatmaps.ControlPoints;
using osu.Game.Graphics.UserInterfaceV2;
namespace osu.Game.Screens... | // Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
using osu.Framework.Allocation;
using osu.Framework.Bindables;
using osu.Game.Beatmaps.ControlPoints;
using osu.Game.Graphics.UserInterfaceV2;
namespace osu.Game.Screens... |
Use canned document service by default. | namespace WorkoutWotch.UI.Android
{
using Services.ExerciseDocument;
using WorkoutWotch.Services.Contracts.Audio;
using WorkoutWotch.Services.Contracts.ExerciseDocument;
using WorkoutWotch.Services.Contracts.Speech;
using WorkoutWotch.Services.Android.Audio;
using WorkoutWotch.Services.Android.... | namespace WorkoutWotch.UI.Android
{
using Services.ExerciseDocument;
using WorkoutWotch.Services.Contracts.Audio;
using WorkoutWotch.Services.Contracts.ExerciseDocument;
using WorkoutWotch.Services.Contracts.Speech;
using WorkoutWotch.Services.Android.Audio;
using WorkoutWotch.Services.Android.... |
Move TokenEnvironmentVariable to constant string | using System;
namespace AppHarbor.Commands
{
public class LoginCommand : ICommand
{
private readonly AccessTokenFetcher _accessTokenFetcher;
private readonly EnvironmentVariableConfiguration _environmentVariableConfiguration;
public LoginCommand(AccessTokenFetcher accessTokenFetcher, EnvironmentVariableConfi... | using System;
namespace AppHarbor.Commands
{
public class LoginCommand : ICommand
{
private const string TokenEnvironmentVariable = "AppHarborToken";
private readonly AccessTokenFetcher _accessTokenFetcher;
private readonly EnvironmentVariableConfiguration _environmentVariableConfiguration;
public LoginCom... |
Add more tests to TestSuite | using Arkivverket.Arkade.Core;
using Arkivverket.Arkade.Tests;
using FluentAssertions;
using Xunit;
namespace Arkivverket.Arkade.Test.Core
{
public class TestSuiteTest
{
[Fact]
public void ShouldReturnOneError()
{
var testSuite = new TestSuite();
var testRun = n... | using Arkivverket.Arkade.Core;
using Arkivverket.Arkade.Tests;
using FluentAssertions;
using Xunit;
namespace Arkivverket.Arkade.Test.Core
{
public class TestSuiteTest
{
private readonly TestResult _testResultWithError = new TestResult(ResultType.Error, new Location(""), "feil");
private readon... |
Add UserIDFromDeployedItem and UserIDsFromBuildingPrivilege - Courtesy of @strykes aka Reneb | using System;
using System.Collections.Generic;
using System.Linq;
using Oxide.Core.Libraries;
using Oxide.Core.Plugins;
namespace Oxide.Rust.Libraries
{
/// <summary>
/// A library containing utility shortcut functions for rust
/// </summary>
public class Rust : Library
{
/// <summary>
... | using System;
using System.Collections.Generic;
using System.Linq;
using Oxide.Core.Libraries;
using Oxide.Core.Plugins;
namespace Oxide.Rust.Libraries
{
/// <summary>
/// A library containing utility shortcut functions for rust
/// </summary>
public class Rust : Library
{
/// <summary>
... |
Add shortcut of canvas width scaling by up/down arrow key | using UniRx;
using UnityEngine;
using UnityEngine.UI;
public class CanvasWidthScalePresenter : MonoBehaviour
{
[SerializeField]
CanvasEvents canvasEvents;
[SerializeField]
Slider canvasWidthScaleController;
NotesEditorModel model;
void Awake()
{
model = NotesEditorModel.Instance;... | using UniRx;
using UniRx.Triggers;
using UnityEngine;
using UnityEngine.UI;
public class CanvasWidthScalePresenter : MonoBehaviour
{
[SerializeField]
CanvasEvents canvasEvents;
[SerializeField]
Slider canvasWidthScaleController;
NotesEditorModel model;
void Awake()
{
model = Note... |
Add space for readability in the exception messages. | namespace SqlStreamStore.Infrastructure
{
using SqlStreamStore.Imports.Ensure.That;
internal static class EnsureThatExtensions
{
internal static Param<string> DoesNotStartWith(this Param<string> param, string s)
{
if (!Ensure.IsActive)
{
return param... | namespace SqlStreamStore.Infrastructure
{
using SqlStreamStore.Imports.Ensure.That;
internal static class EnsureThatExtensions
{
internal static Param<string> DoesNotStartWith(this Param<string> param, string s)
{
if (!Ensure.IsActive)
{
return param... |
Work around problem in casting int to double. | // -----------------------------------------------------------------------
// <copyright file="GridSplitterStyle.cs" company="Steven Kirk">
// Copyright 2014 MIT Licence. See licence.md for more information.
// </copyright>
// -----------------------------------------------------------------------
namespace Perspex.T... | // -----------------------------------------------------------------------
// <copyright file="GridSplitterStyle.cs" company="Steven Kirk">
// Copyright 2014 MIT Licence. See licence.md for more information.
// </copyright>
// -----------------------------------------------------------------------
namespace Perspex.T... |
Add sample path to the lookup names | // Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
using System.Collections.Generic;
using osu.Framework.Graphics;
using osu.Game.Audio;
using osu.Game.Storyboards.Drawables;
namespace osu.Game.Storyboards
{
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 System.Collections.Generic;
using osu.Framework.Graphics;
using osu.Game.Audio;
using osu.Game.Storyboards.Drawables;
namespace osu.Game.Storyboards
{
public ... |
Revert "Only test that the program compiles until we can parse top-level arrays" | using System;
using System.IO;
namespace test
{
class Program
{
static void Main(string[] args)
{
var path = args[0];
// var json = File.ReadAllText(path);
// var qt = QuickType.TopLevel.FromJson(json);
}
}
}
| using System;
using System.IO;
namespace test
{
class Program
{
static void Main(string[] args)
{
var path = args[0];
var json = File.ReadAllText(path);
var qt = QuickType.TopLevel.FromJson(json);
}
}
}
|
Change AssemblyCopyright from ACAXLabs to ACAExpress | using System.Reflection;
using System.Runtime.InteropServices;
[assembly: AssemblyTitle("LibSlyBroadcast")]
[assembly: AssemblyProduct("LibSlyBroadcast")]
[assembly: AssemblyCopyright("Copyright © ACAXLabs 2016")]
[assembly: ComVisible(false)]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0... | using System.Reflection;
using System.Runtime.InteropServices;
[assembly: AssemblyTitle("LibSlyBroadcast")]
[assembly: AssemblyProduct("LibSlyBroadcast")]
[assembly: AssemblyCopyright("Copyright © ACAExpress.com, Inc 2016")]
[assembly: ComVisible(false)]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileV... |
Return the values of variables in the program as well as variables in the query | using LogicalShift.Reason.Api;
using LogicalShift.Reason.Unification;
using System;
using System.Collections.Generic;
using System.Linq;
namespace LogicalShift.Reason
{
/// <summary>
/// Helper methods for performing unification
/// </summary>
public static class BasicUnification
{
/// <su... | using LogicalShift.Reason.Api;
using LogicalShift.Reason.Unification;
using System;
using System.Collections.Generic;
using System.Linq;
namespace LogicalShift.Reason
{
/// <summary>
/// Helper methods for performing unification
/// </summary>
public static class BasicUnification
{
/// <su... |
Make the login button more noticeable | @using Anlab.Core.Domain
@using Microsoft.AspNetCore.Http
@inject SignInManager<User> SignInManager
@inject UserManager<User> UserManager
@if (User.Identity.IsAuthenticated)
{
var user = await UserManager.GetUserAsync(User);
<form class="flexer" asp-area="" asp-controller="Account" asp-action="Logout" metho... | @using Anlab.Core.Domain
@using Microsoft.AspNetCore.Http
@inject SignInManager<User> SignInManager
@inject UserManager<User> UserManager
@if (User.Identity.IsAuthenticated)
{
var user = await UserManager.GetUserAsync(User);
<form class="flexer" asp-area="" asp-controller="Account" asp-action="Logout" method... |
Update tests to match new constructor | // 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.Framework.Graphics.Containers;
using osu.Game.Beatmaps;
using osu.Game.Screens.Ranking.Expanded;
namespace osu.Game.Tests.Visual.... | // 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.Framework.Graphics.Containers;
using osu.Game.Beatmaps;
using osu.Game.Screens.Ranking.Expanded;
namespace osu.Game.Tests.Visual.... |
Divide weapon arc by half | /*
** Project ShiftDrive
** (C) Mika Molenkamp, 2016.
*/
using System;
using Microsoft.Xna.Framework;
namespace ShiftDrive {
/// <summary>
/// Represents the maximum weapon size that a mount can hold.
/// </summary>
internal enum MountSize {
Small = 1,
Medium = 2,
Large = 3
... | /*
** Project ShiftDrive
** (C) Mika Molenkamp, 2016.
*/
using System;
using Microsoft.Xna.Framework;
namespace ShiftDrive {
/// <summary>
/// Represents the maximum weapon size that a mount can hold.
/// </summary>
internal enum MountSize {
Small = 1,
Medium = 2,
Large = 3
... |
Print the sha which was excluded from version calculation | using System;
using System.Collections.Generic;
using System.Linq;
using GitVersion.VersionCalculation.BaseVersionCalculators;
namespace GitVersion.VersionFilters
{
public class ShaVersionFilter : IVersionFilter
{
private readonly IEnumerable<string> shas;
public ShaVersionFilter(IEnumerable<... | using System;
using System.Collections.Generic;
using System.Linq;
using GitVersion.VersionCalculation.BaseVersionCalculators;
namespace GitVersion.VersionFilters
{
public class ShaVersionFilter : IVersionFilter
{
private readonly IEnumerable<string> shas;
public ShaVersionFilter(IEnumerable<... |
Remove unnecessary check for SharpZipLib dll. | using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Reflection;
namespace IronFoundry.Container
{
public class ContainerHostDependencyHelper
{
const string ContainerHostAssemblyName = "IronFoundry.Container.Host";
readonly Assembly containerHostAss... | using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Reflection;
namespace IronFoundry.Container
{
public class ContainerHostDependencyHelper
{
const string ContainerHostAssemblyName = "IronFoundry.Container.Host";
readonly Assembly containerHostAss... |
Set RemoteEndPoint for UDP connections | using System;
using System.Buffers;
using System.Net;
using System.Net.Sockets;
using System.Threading;
using System.Threading.Tasks;
using SuperSocket.ProtoBase;
namespace SuperSocket.Channel
{
public class UdpPipeChannel<TPackageInfo> : VirtualChannel<TPackageInfo>, IChannelWithSessionIdentifier
{
pr... | using System;
using System.Buffers;
using System.Net;
using System.Net.Sockets;
using System.Threading;
using System.Threading.Tasks;
using SuperSocket.ProtoBase;
namespace SuperSocket.Channel
{
public class UdpPipeChannel<TPackageInfo> : VirtualChannel<TPackageInfo>, IChannelWithSessionIdentifier
{
pr... |
Remove Cache From Print Version | using Mazzimo.Models;
using Mazzimo.Repositories;
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
namespace Mazzimo.Controllers
{
public class HomeController : Controller
{
IPostRepository _postRepo;
IResumeRepos... | using Mazzimo.Models;
using Mazzimo.Repositories;
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
namespace Mazzimo.Controllers
{
public class HomeController : Controller
{
IPostRepository _postRepo;
IResumeRepos... |
Call correct overload of log.FatalAsync | extern alias pcl;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Windows.UI.Xaml;
namespace MetroLog
{
public static class GlobalCrashHandler
{
public static void Configure()
{
Application.Current.Unhandled... | extern alias pcl;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Windows.UI.Xaml;
namespace MetroLog
{
public static class GlobalCrashHandler
{
public static void Configure()
{
Application.Current.Unhandled... |
Make convlayer tests more complete | using NUnit.Framework;
namespace ConvNetSharp.Tests
{
[TestFixture]
public class ConvLayerTests
{
[Test]
public void GradientWrtInputCheck()
{
const int inputWidth = 10;
const int inputHeight = 10;
const int inputDepth = 2;
// Create... | using NUnit.Framework;
namespace ConvNetSharp.Tests
{
[TestFixture]
public class ConvLayerTests
{
[Test]
public void GradientWrtInputCheck()
{
const int inputWidth = 30;
const int inputHeight = 30;
const int inputDepth = 2;
// Create... |
Fix insane oversight in `SynchronizationContext` implementation | // 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.Threading;
#nullable enable
namespace osu.Framework.Threading
{
/// <summary>
/// A synchronisation context which posts all continuatiuons to a sch... | // 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.Threading;
#nullable enable
namespace osu.Framework.Threading
{
/// <summary>
/// A synchronisation context which posts all continuatiuons to a sch... |
Fix wrong type for linkbuttons | using System;
using System.Web.UI.WebControls;
namespace R7.HelpDesk
{
public partial class AdminSettings
{
protected Panel pnlAdminSettings;
protected Panel pnlAdministratorRole;
protected Panel pnlUploFilesPath;
protected Panel pnlTagsAdmin;
protected Panel pnlRoles;
protected Button btnA... | using System;
using System.Web.UI.WebControls;
namespace R7.HelpDesk
{
public partial class AdminSettings
{
protected Panel pnlAdminSettings;
protected Panel pnlAdministratorRole;
protected Panel pnlUploFilesPath;
protected Panel pnlTagsAdmin;
protected Panel pnlRoles;
protected Button btnA... |
Fix bug with slow loading high scores | using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using CodeBreaker.Core;
using CodeBreaker.Core.Storage;
using Microsoft.EntityFrameworkCore;
namespace CodeBreaker.WebApp.Storage
{
public class ScoreStore : IScoreStore
{
private readonly CodeBreakerDbCont... | using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using CodeBreaker.Core;
using CodeBreaker.Core.Storage;
using Microsoft.EntityFrameworkCore;
namespace CodeBreaker.WebApp.Storage
{
public class ScoreStore : IScoreStore
{
private readonly CodeBreakerDbCont... |
Check for active connections in each iteration | using System;
using System.Linq;
using System.Net.NetworkInformation;
namespace HttpMock.Integration.Tests
{
internal static class PortHelper
{
internal static int FindLocalAvailablePortForTesting()
{
IPGlobalProperties properties = IPGlobalProperties.GetIPGlobalProperties();
var activeTcpConne... | using System;
using System.Linq;
using System.Net;
using System.Net.NetworkInformation;
namespace HttpMock.Integration.Tests
{
internal static class PortHelper
{
internal static int FindLocalAvailablePortForTesting()
{
const int minPort = 1024;
var random = new Random();
var maxPort... |
Switch over support commands from using the query class | using System.Data;
using System.Linq;
namespace ZocMonLib
{
public class StorageCommandsSupport : IStorageCommandsSupport
{
public string SelectCurrentReduceStatus(IDbConnection conn)
{
var result = DatabaseSqlHelper.CreateListWithConnection<bool>(conn, StorageCommandsSqlServerQuery... | using System.Data;
using System.Linq;
namespace ZocMonLib
{
public class StorageCommandsSupport : IStorageCommandsSupport
{
public string SelectCurrentReduceStatus(IDbConnection conn)
{
const string sql = @"SELECT TOP(1) IsReducing FROM Settings";
var result = DatabaseS... |
Fix documentation confusion in a similar way to r3a00fecf9d42. | // Copyright 2013 The Noda Time Authors. All rights reserved.
// Use of this source code is governed by the Apache License 2.0,
// as found in the LICENSE.txt file.
using System;
namespace NodaTime.Annotations
{
/// <summary>
/// Indicates that a type is immutable. Some members of this type
/// a... | // Copyright 2013 The Noda Time Authors. All rights reserved.
// Use of this source code is governed by the Apache License 2.0,
// as found in the LICENSE.txt file.
using System;
namespace NodaTime.Annotations
{
/// <summary>
/// Indicates that a type is mutable. Some members of this type
/// allow state ... |
Add all operating system in the platform resolver | // Copyright (c) 2014-2020 Sarin Na Wangkanai, All Rights Reserved.
// The Apache v2. See License.txt in the project root for license information.
using Wangkanai.Detection.Extensions;
using Wangkanai.Detection.Models;
namespace Wangkanai.Detection.Services
{
public class PlatformService : IPlatformService
{
... | // Copyright (c) 2014-2020 Sarin Na Wangkanai, All Rights Reserved.
// The Apache v2. See License.txt in the project root for license information.
using Wangkanai.Detection.Extensions;
using Wangkanai.Detection.Models;
namespace Wangkanai.Detection.Services
{
public class PlatformService : IPlatformService
{
... |
Simplify fetching the temporary path | // Automatically generated by Opus v0.50
namespace CopyTest1
{
class CopySingleFileTest : FileUtilities.CopyFile
{
public CopySingleFileTest()
{
this.SetRelativePath(this, "data", "testfile.txt");
this.UpdateOptions += delegate(Opus.Core.IModule module, Opus.Core.... | // Automatically generated by Opus v0.50
namespace CopyTest1
{
class CopySingleFileTest : FileUtilities.CopyFile
{
public CopySingleFileTest()
{
this.SetRelativePath(this, "data", "testfile.txt");
this.UpdateOptions += delegate(Opus.Core.IModule module, Opus.Core.... |
Set app version to 3.0.0 | using System;
using System.Reflection;
using System.Runtime.InteropServices;
[assembly: AssemblyTitle("EVE-O Preview")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("EVE-O Preview")]
[assembly: AssemblyCopyright("")]
[as... | using System;
using System.Reflection;
using System.Runtime.InteropServices;
[assembly: AssemblyTitle("EVE-O Preview")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("EVE-O Preview")]
[assembly: AssemblyCopyright("")]
[as... |
Fix the not registered fare deal options. | using System;
using Diskordia.Columbus.Bots.FareDeals;
using Diskordia.Columbus.Bots.FareDeals.SingaporeAirlines;
using Diskordia.Columbus.Common;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
namespace Diskordia.Columbus.Bots
{
public static class BotsExtensions
{
publ... | using System;
using Diskordia.Columbus.Bots.FareDeals;
using Diskordia.Columbus.Bots.FareDeals.SingaporeAirlines;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
namespace Diskordia.Columbus.Bots
{
public static class BotsExtensions
{
public static IServiceCollection AddF... |
Throw Exception if arg < 0 using Throw Expression | using System;
using System.Linq;
namespace FibCSharp
{
class Program
{
static void Main(string[] args)
{
var max = 50;
Enumerable.Range(0, int.MaxValue)
.Select(Fib)
.TakeWhile(x => x <= max)
.ToList()
.For... | using System;
using System.Linq;
namespace FibCSharp
{
class Program
{
static void Main(string[] args)
{
var max = 50;
Enumerable.Range(0, int.MaxValue)
.Select(Fib)
.TakeWhile(x => x <= max)
.ToList()
.For... |
Split ModuleOutput tests to separate asserts | using Microsoft.VisualStudio.TestTools.UnitTesting;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace T4TS.Tests
{
[TestClass]
public class ModuleOutputAppenderTests
{
[TestMethod]
public void ModuleOutputAppenderR... | using Microsoft.VisualStudio.TestTools.UnitTesting;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace T4TS.Tests
{
[TestClass]
public class ModuleOutputAppenderTests
{
[TestMethod]
public void TypescriptVersion083Y... |
Change version up to 0.5.1 | using UnityEngine;
using System.Reflection;
[assembly: AssemblyVersion("0.5.0.*")]
public class Loader : MonoBehaviour
{
/// <summary>
/// DebugUI prefab to instantiate.
/// </summary>
[SerializeField]
private GameObject _debugUI;
/// <summary>
/// ModalDialog prefab to insta... | using UnityEngine;
using System.Reflection;
[assembly: AssemblyVersion("0.5.1.*")]
public class Loader : MonoBehaviour
{
/// <summary>
/// DebugUI prefab to instantiate.
/// </summary>
[SerializeField]
private GameObject _debugUI;
/// <summary>
/// ModalDialog prefab to insta... |
Handle iOS memory alerts and free any memory we can | // 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 CoreGraphics;
using UIKit;
namespace osu.Framework.iOS
{
internal class GameViewController : UIViewController
{
public override bool PrefersStatus... | // 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 CoreGraphics;
using UIKit;
namespace osu.Framework.iOS
{
internal class GameViewController : UIViewController
{
public override bool PrefersStatus... |
Fix help text to use Debug output | // Copyright 2021 Maintainers of NUKE.
// Distributed under the MIT License.
// https://github.com/nuke-build/nuke/blob/master/LICENSE
using System;
using System.Collections.Generic;
using System.Linq;
namespace Nuke.Common.Execution
{
internal class HandleHelpRequestsAttribute : BuildExtensionAttributeBase, IOnB... | // Copyright 2021 Maintainers of NUKE.
// Distributed under the MIT License.
// https://github.com/nuke-build/nuke/blob/master/LICENSE
using System;
using System.Collections.Generic;
using System.Linq;
namespace Nuke.Common.Execution
{
internal class HandleHelpRequestsAttribute : BuildExtensionAttributeBase, IOnB... |
Allow legacy score to be constructed even if replay file is missing | // 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.Linq;
using osu.Framework.IO.Stores;
using osu.Game.Beatmaps;
using osu.Game.Rulesets;
using osu.Game.Scoring.Legacy;
namespace osu.Game.Scori... | // 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.Linq;
using osu.Framework.IO.Stores;
using osu.Game.Beatmaps;
using osu.Game.Rulesets;
using osu.Game.Scoring.Legacy;
namespace osu.Game.Scori... |
Fix PCL implementation of Reset | using System;
using System.Threading;
#if PORTABLE
using System.Threading.Tasks;
#endif
namespace Polly.Utilities
{
/// <summary>
/// Time related delegates used to improve testability of the code
/// </summary>
public static class SystemClock
{
/// <summary>
/// Allows the settin... | using System;
using System.Threading;
namespace Polly.Utilities
{
/// <summary>
/// Time related delegates used to improve testability of the code
/// </summary>
public static class SystemClock
{
#if !PORTABLE
/// <summary>
/// Allows the setting of a custom Thread.Sleep implementa... |
Add Path property to exception | using System;
using System.Text;
using Microsoft.AspNetCore.Http;
namespace Hellang.Middleware.SpaFallback
{
public class SpaFallbackException : Exception
{
private const string Fallback = nameof(SpaFallbackExtensions.UseSpaFallback);
private const string StaticFiles = "UseStaticFiles";
... | using System;
using System.Text;
using Microsoft.AspNetCore.Http;
namespace Hellang.Middleware.SpaFallback
{
public class SpaFallbackException : Exception
{
private const string Fallback = nameof(SpaFallbackExtensions.UseSpaFallback);
private const string StaticFiles = "UseStaticFiles";
... |
Remove forced height for testing | @*
* Copyright (c) gestaoaju.com.br - All rights reserved.
* Licensed under MIT (https://github.com/gestaoaju/commerce/blob/master/LICENSE).
*@
@{ Layout = "~/Views/Shared/_AppLayout.cshtml"; }
@section scripts
{
<script type="text/javascript" src="/js/overview.min.js" asp-append-version="true"></script>
}
<d... | @*
* Copyright (c) gestaoaju.com.br - All rights reserved.
* Licensed under MIT (https://github.com/gestaoaju/commerce/blob/master/LICENSE).
*@
@{ Layout = "~/Views/Shared/_AppLayout.cshtml"; }
@section scripts
{
<script type="text/javascript" src="/js/overview.min.js" asp-append-version="true"></script>
}
<d... |
Add google analytics tracking code. | <!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>@ViewBag.Title</title>
@Styles.Render("~/Content/css")
@Scripts.Render("~/bundles/modernizr")
</head>
<body>
<div class="container body-content">
... | <!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>@ViewBag.Title</title>
@Styles.Render("~/Content/css")
@Scripts.Render("~/bundles/modernizr")
</head>
<body>
<div class="container body-content">
... |
Correct test for TeamCity status | using System.Collections.Generic;
using System.Linq;
using Fake;
using Machine.Specifications;
namespace Test.FAKECore
{
public class when_encapsuting_strings
{
It should_encapsulate_without_special_chars =
() => TeamCityHelper.EncapsulateSpecialChars("Total 47, Failures 1, NotRun 0, Incon... | using System.Collections.Generic;
using System.Linq;
using Fake;
using Machine.Specifications;
namespace Test.FAKECore
{
public class when_encapsuting_strings
{
It should_encapsulate_without_special_chars =
() => TeamCityHelper.EncapsulateSpecialChars("Total 47, Failures 1, NotRun 0, Incon... |
Format contribution info as annotation | ---
Title: Documentation
---
<p>
We gladly accept your contributions. If there is something that you would like to add then you can edit the content directly on GitHub.
</p>
@foreach(IDocument child in Model.DocumentList(Keys.Children).OrderBy(x => x.Get<int>(DocsKeys.Order, 1000)))
{
<h1>@(child.String(Keys.T... | ---
Title: Documentation
---
<div class="alert alert-info">
<p>
We gladly accept your contributions. If there is something that you would like to add then you can edit the content directly on GitHub.
</p>
</div>
@foreach(IDocument child in Model.DocumentList(Keys.Children).OrderBy(x => x.Get<int>(Docs... |
Add required defaults for tests | using System;
using System.Collections.Generic;
using UnityEngine;
namespace Bugsnag.Unity.Tests
{
public class TestConfiguration : IConfiguration
{
public TimeSpan MaximumLogsTimePeriod { get; set; }
public Dictionary<LogType, int> MaximumTypePerTimePeriod { get; set; }
public TimeSpan UniqueLogsTi... | using System;
using System.Collections.Generic;
using UnityEngine;
namespace Bugsnag.Unity.Tests
{
public class TestConfiguration : IConfiguration
{
public TimeSpan MaximumLogsTimePeriod { get; set; } = TimeSpan.FromSeconds(1);
public Dictionary<LogType, int> MaximumTypePerTimePeriod { get; set; }
p... |
Add time measurement in Main, fix output | using System;
using CIV.Formats;
using static System.Console;
namespace CIV
{
[Flags]
enum ExitCodes : int
{
Success = 0,
FileNotFound = 1,
ParsingFailed = 2,
VerificationFailed = 4
}
class Program
{
static void Main(string[] args)
{
try
... | using System;
using System.Diagnostics;
using CIV.Formats;
using static System.Console;
namespace CIV
{
[Flags]
enum ExitCodes : int
{
Success = 0,
FileNotFound = 1,
ParsingFailed = 2,
VerificationFailed = 4
}
class Program
{
static void Main(string[] args)
{
... |
Remove publicly exposed Vertices property | using System;
using System.Collections.Generic;
namespace Graph
{
/// <summary>
/// Represents a graph.
/// </summary>
/// <typeparam name="V">The vertex type.</typeparam>
/// <typeparam name="E">The edge type.</typeparam>
public interface IGraph<V, E> : IEquatable<IGraph<V, E>> where E: IEdge... | using System;
using System.Collections.Generic;
namespace Graph
{
/// <summary>
/// Represents a graph.
/// </summary>
/// <typeparam name="V">The vertex type.</typeparam>
/// <typeparam name="E">The edge type.</typeparam>
public interface IGraph<V, E> : IEquatable<IGraph<V, E>> where E: IEdge... |
Add Google Analytics tracking for changing results mode | @using CkanDotNet.Api.Model
@using CkanDotNet.Web.Models
@using CkanDotNet.Web.Models.Helpers
@using System.Collections.Specialized
@model PackageSearchResultsModel
@{
var routeValues = RouteHelper.RouteFromParameters(Html.ViewContext);
// Remove the page number from the route values since we are doing client-side
/... | @using CkanDotNet.Api.Model
@using CkanDotNet.Web.Models
@using CkanDotNet.Web.Models.Helpers
@using System.Collections.Specialized
@model PackageSearchResultsModel
@{
var routeValues = RouteHelper.RouteFromParameters(Html.ViewContext);
// Remove the page number from the route values since we are doing client-side
/... |
Fix to alarm not triggering correctly | namespace Raccoon.Components {
public class Alarm : Component {
public Alarm(uint interval, System.Action action) {
NextActivationTimer = Interval = interval;
Action = action;
}
public System.Action Action { get; set; }
public uint Timer { get; priva... | namespace Raccoon.Components {
public class Alarm : Component {
public Alarm(uint interval, System.Action action) {
NextActivationTimer = Interval = interval;
Action = action;
}
public System.Action Action { get; set; }
public uint Timer { get; priva... |
Revert "Added incoming_webhook to Access Token Response" | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace SlackAPI
{
[RequestPath("oauth.access")]
public class AccessTokenResponse : Response
{
public string access_token;
public string scope;
public string team_n... | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace SlackAPI
{
[RequestPath("oauth.access")]
public class AccessTokenResponse : Response
{
public string access_token;
public string scope;
public string team_n... |
Fix Error entity not contain RawJson | using System;
using Mastodot.Entities;
using Mastodot.Exceptions;
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
namespace Mastodot.Utils.JsonConverters
{
internal class ErrorThrowJsonConverter<T> : JsonConverter
{
public override bool CanConvert(Type objectType)
{
return true;... | using System;
using Mastodot.Entities;
using Mastodot.Exceptions;
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
namespace Mastodot.Utils.JsonConverters
{
internal class ErrorThrowJsonConverter<T> : JsonConverter
{
public override bool CanConvert(Type objectType)
{
return true;... |
Add a test for IterateAsync | // Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
using System.Collections.Generic;
using System.Linq;
using Microsoft.Xunit.Performance;
using Xunit;
namespace SimplePerfTests
{
public class Document
{
... | // Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.Xunit.Performance;
using Xunit;
namespace SimplePerfTests
{
pub... |
Add better test coverage of `SettingsPanel` | // 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 NUnit.Framework;
using osu.Framework.Allocation;
using osu.Framework.Graphics.Containers;
using osu.Game.Overlays;
namespace osu.Game.Tests.Visual.Settings
{
... | // 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 NUnit.Framework;
using osu.Framework.Allocation;
using osu.Framework.Graphics.Containers;
using osu.Framework.Testing;
using osu.Game.Overlays;
namespace osu.Game... |
Update interface for ignored request policy | using System;
namespace Glimpse.Agent.Web
{
public class IIgnoredRequestPolicy
{
}
} | using System;
namespace Glimpse.Agent.Web
{
public interface IIgnoredRequestPolicy
{
bool ShouldIgnore(IContext context);
}
} |
Test case for calling try read with null values | using System;
using Microsoft.BizTalk.Message.Interop;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using Winterdom.BizTalk.PipelineTesting;
namespace BizTalkComponents.Utils.Tests.UnitTests
{
[TestClass]
public class ContextExtensionTests
{
private IBaseMessage _testMessage;
[Test... | using System;
using Microsoft.BizTalk.Message.Interop;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using Winterdom.BizTalk.PipelineTesting;
namespace BizTalkComponents.Utils.Tests.UnitTests
{
[TestClass]
public class ContextExtensionTests
{
private IBaseMessage _testMessage;
[Test... |
Put constructor initializers on their own line | // <copyright file="TJException.cs" company="Autonomic Systems, Quamotion">
// Copyright (c) Autonomic Systems. All rights reserved.
// Copyright (c) Quamotion. All rights reserved.
// </copyright>
using System;
namespace TurboJpegWrapper
{
// ReSharper disable once InconsistentNaming
/// <summar... | // <copyright file="TJException.cs" company="Autonomic Systems, Quamotion">
// Copyright (c) Autonomic Systems. All rights reserved.
// Copyright (c) Quamotion. All rights reserved.
// </copyright>
using System;
namespace TurboJpegWrapper
{
// ReSharper disable once InconsistentNaming
/// <summar... |
Make sure the model isn't lost when navigating to/from the contact picker | using MobileKidsIdApp.Services;
using System.Threading.Tasks;
using System.Windows.Input;
using Xamarin.Forms;
using MobileKidsIdApp.Models;
namespace MobileKidsIdApp.ViewModels
{
public class BasicDetails : ViewModelBase<Models.ChildDetails>
{
private ContactInfo _contact;
public ICommand Ch... | using MobileKidsIdApp.Services;
using System.Threading.Tasks;
using System.Windows.Input;
using Xamarin.Forms;
using MobileKidsIdApp.Models;
namespace MobileKidsIdApp.ViewModels
{
public class BasicDetails : ViewModelBase<Models.ChildDetails>
{
private ContactInfo _contact;
public ICommand Ch... |
Update copyright year in template | <!DOCTYPE html>
<html>
<head>
<title>@ViewData["Title"]</title>
<link rel="icon" type="image/png" href="favicon.png">
<meta name="viewport" content="width=device-width,initial-scale=1">
<link rel="stylesheet" href="~/style.css"/>
</head>
<body>
<div class="container">... | <!DOCTYPE html>
<html>
<head>
<title>@ViewData["Title"]</title>
<link rel="icon" type="image/png" href="favicon.png">
<meta name="viewport" content="width=device-width,initial-scale=1">
<link rel="stylesheet" href="~/style.css"/>
</head>
<body>
<div class="container">... |
Remove ignore attribute from now fixed test scene | // 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.Linq;
using NUnit.Framework;
using osu.Framework.Extensions.IEnumerableExtensions;
using osu.Framework.Graphics.Containers;
using osu.Framework.Screens;
usin... | // 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.Linq;
using NUnit.Framework;
using osu.Framework.Extensions.IEnumerableExtensions;
using osu.Framework.Graphics.Containers;
using osu.Framework.Screens;
usin... |
Fix create BitmapDecoder with async file stream. | using System;
using System.IO;
using System.Runtime.InteropServices;
namespace JemlemlacuLemjakarbabo
{
class Program
{
static void Main(string[] args)
{
CheckHResult(UnsafeNativeMethods.WICCodec.CreateImagingFactory(UnsafeNativeMethods.WICCodec.WINCODEC_SDK_VERSION,
... | using System;
using System.IO;
using System.Runtime.InteropServices;
using Microsoft.Win32.SafeHandles;
namespace JemlemlacuLemjakarbabo
{
class Program
{
static void Main(string[] args)
{
CheckHResult(UnsafeNativeMethods.WICCodec.CreateImagingFactory(UnsafeNativeMethods.WICCodec.W... |
Remove extra loadImage callback until we discuss it | using System.Runtime.InteropServices;
using System.Windows.Forms;
using ExcelDna.Integration.CustomUI;
namespace Ribbon
{
[ComVisible(true)]
public class RibbonController : ExcelRibbon
{
public override string GetCustomUI(string RibbonID)
{
return @"
<customUI xmlns='http... | using System.Runtime.InteropServices;
using System.Windows.Forms;
using ExcelDna.Integration.CustomUI;
namespace Ribbon
{
[ComVisible(true)]
public class RibbonController : ExcelRibbon
{
public override string GetCustomUI(string RibbonID)
{
return @"
<customUI xmlns='http... |
Test Refactor, consolidate Evaluate Add tests | namespace ClojSharp.Core.Tests
{
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using ClojSharp.Core.Compiler;
using Microsoft.VisualStudio.TestTools.UnitTesting;
[TestClass]
public class EvaluateTests
{
private Machine mac... | namespace ClojSharp.Core.Tests
{
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using ClojSharp.Core.Compiler;
using Microsoft.VisualStudio.TestTools.UnitTesting;
[TestClass]
public class EvaluateTests
{
private Machine mac... |
Reset live tokens value when it can not be saved | using System;
using System.Diagnostics;
using StreamCompanionTypes.DataTypes;
using StreamCompanionTypes.Enums;
namespace OsuMemoryEventSource
{
public class LiveToken
{
public IToken Token { get; set; }
public Func<object> Updater;
public bool IsLazy { get; set; }
protected Laz... | using System;
using System.Diagnostics;
using StreamCompanionTypes.DataTypes;
using StreamCompanionTypes.Enums;
namespace OsuMemoryEventSource
{
public class LiveToken
{
public IToken Token { get; set; }
public Func<object> Updater;
public bool IsLazy { get; set; }
protected Laz... |
Enable overriding of settings via command line arguments in the formats: /SettingName=value /SettingName:value | // Copyright 2007-2010 The Apache Software Foundation.
//
// 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 req... | // Copyright 2007-2010 The Apache Software Foundation.
//
// 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 req... |
Put performance test into separate method in console. | using System;
using System.Collections.Generic;
using Arango.Client;
using Arango.fastJSON;
namespace Arango.ConsoleTests
{
class Program
{
public static void Main(string[] args)
{
var performance = new Performance();
//performance.TestSimpleSe... | using System;
using System.Collections.Generic;
using Arango.Client;
using Arango.fastJSON;
namespace Arango.ConsoleTests
{
class Program
{
public static void Main(string[] args)
{
//PerformanceTests();
Console.Write("Press any key to continue ... |
Fix "rate app" button in the about page. | // Copyright (c) PocketCampus.Org 2014-15
// See LICENSE file for more details
// File author: Solal Pirelli
using System;
using Windows.ApplicationModel;
using Windows.System;
namespace PocketCampus.Main.Services
{
public sealed class AppRatingService : IAppRatingService
{
public async v... | // Copyright (c) PocketCampus.Org 2014-15
// See LICENSE file for more details
// File author: Solal Pirelli
using System;
using Windows.System;
namespace PocketCampus.Main.Services
{
public sealed class AppRatingService : IAppRatingService
{
private const string AppId = "28f8300e-8a84-4e3... |
Make the SUTA edit text form bigger | @model BatteryCommander.Web.Commands.UpdateSUTARequest
@using (Html.BeginForm("Edit", "SUTA", new { Model.Id }, FormMethod.Post, true, new { @class = "form-horizontal", role = "form" }))
{
@Html.AntiForgeryToken()
@Html.ValidationSummary()
<div class="form-group form-group-lg">
@Html.Disp... | @model BatteryCommander.Web.Commands.UpdateSUTARequest
@using (Html.BeginForm("Edit", "SUTA", new { Model.Id }, FormMethod.Post, true, new { @class = "form-horizontal", role = "form" }))
{
@Html.AntiForgeryToken()
@Html.ValidationSummary()
<div class="form-group form-group-lg">
@Html.Disp... |
Add tag for Scene logs; Code alignment; | using UnityEngine;
using System.Collections;
namespace UDBase.Components.Log {
public class LogTags {
public const int Common = 1;
public const int UI = 2;
string[] _names = new string[]{"Common", "UI"};
public virtual string GetName(int index) {
switch( index ) {
case Common: {
return "Co... | using UnityEngine;
using System.Collections;
namespace UDBase.Components.Log {
public class LogTags {
public const int Common = 1;
public const int UI = 2;
public const int Scene = 3;
string[] _names = new string[]{"Common", "UI", "Scene"};
public virtual string GetName(int index) {
switch( index... |
Fix of LocalChecker sometimes loopback could be already part of dictionary throwing exception on duplicate add. | using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Net.Sockets;
namespace Nowin
{
public class IpIsLocalChecker : IIpIsLocalChecker
{
readonly Dictionary<IPAddress, bool> _dict;
public IpIsLocalChecker()
{
var host = Dns.GetHostEntry(Dns.Get... | using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Net.Sockets;
namespace Nowin
{
public class IpIsLocalChecker : IIpIsLocalChecker
{
readonly Dictionary<IPAddress, bool> _dict;
public IpIsLocalChecker()
{
var host = Dns.GetHostEntry(Dns.Get... |
Change logger type for NLog error messages to be based on exception if possible | using System;
using System.Collections.Generic;
using System.Diagnostics;
using FubuCore;
using FubuCore.Descriptions;
using FubuCore.Logging;
using FubuCore.Util;
using NLog;
using Logger = NLog.Logger;
namespace FubuMVC.NLog
{
public class NLogListener : ILogListener
{
private readonly... | using System;
using System.Collections.Generic;
using System.Diagnostics;
using FubuCore;
using FubuCore.Descriptions;
using FubuCore.Logging;
using FubuCore.Util;
using NLog;
using Logger = NLog.Logger;
namespace FubuMVC.NLog
{
public class NLogListener : ILogListener
{
private readonly... |
Add warmup attribute to test runner factory | namespace Moya.Runner.Factories
{
using System;
using System.Collections.Generic;
using Attributes;
using Exceptions;
using Extensions;
using Moya.Utility;
using Runners;
public class TestRunnerFactory : ITestRunnerFactory
{
private readonly IDictionary<Type, Type> attribut... | namespace Moya.Runner.Factories
{
using System;
using System.Collections.Generic;
using Attributes;
using Exceptions;
using Extensions;
using Moya.Utility;
using Runners;
public class TestRunnerFactory : ITestRunnerFactory
{
private readonly IDictionary<Type, Type> attribut... |
Fix title of match song select | // Copyright (c) 2007-2018 ppy Pty Ltd <contact@ppy.sh>.
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
using System;
using osu.Game.Online.Multiplayer;
using osu.Game.Screens.Multi;
namespace osu.Game.Screens.Select
{
public class MatchSongSelect : SongSelect, IMult... | // Copyright (c) 2007-2018 ppy Pty Ltd <contact@ppy.sh>.
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
using System;
using Humanizer;
using osu.Game.Online.Multiplayer;
using osu.Game.Screens.Multi;
namespace osu.Game.Screens.Select
{
public class MatchSongSelect : ... |
Use correct lookup type to ensure username based lookups always prefer username | // Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
using osu.Game.Users;
using osu.Game.Rulesets;
namespace osu.Game.Online.API.Requests
{
public class GetUserRequest : APIRequest<User>
{
private readonl... | // Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
using osu.Game.Users;
using osu.Game.Rulesets;
namespace osu.Game.Online.API.Requests
{
public class GetUserRequest : APIRequest<User>
{
private readonl... |
Replace two xml comment instances of 'OmitOnRecursionGuard' with 'RecursionGuard' | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Ploeh.AutoFixture.Kernel;
namespace Ploeh.AutoFixture
{
/// <summary>
/// Decorates an <see cref="ISpecimenBuilder" /> with a
/// <see cref="OmitOnRecursionGuard" />.
/// </summary>
public class... | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Ploeh.AutoFixture.Kernel;
namespace Ploeh.AutoFixture
{
/// <summary>
/// Decorates an <see cref="ISpecimenBuilder" /> with a
/// <see cref="RecursionGuard" />.
/// </summary>
public class OmitO... |
Rename some classes to better match the service API. | using System;
using System.Threading.Tasks;
namespace DanTup.DartAnalysis
{
class VersionRequest : Request<Response<VersionResponse>>
{
public string method = "server.getVersion";
}
class VersionResponse
{
public string version = null;
}
public static class VersionRequestImplementation
{
public static ... | using System;
using System.Threading.Tasks;
namespace DanTup.DartAnalysis
{
class ServerVersionRequest : Request<Response<ServerVersionResponse>>
{
public string method = "server.getVersion";
}
class ServerVersionResponse
{
public string version = null;
}
public static class ServerVersionRequestImplementa... |
Add a non-generic object cache | // Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
using System;
using System.Threading.Tasks;
namespace Microsoft.Fx.Portability
{
public interface IObjectCache<TObject> : IDisposable
{
TObject Value ... | // Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
using System;
using System.Threading.Tasks;
namespace Microsoft.Fx.Portability
{
public interface IObjectCache : IDisposable
{
Task UpdateAsync();
... |
Add Mouse Look Tracking to player character | using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class PlayerMovement : MonoBehaviour {
public float movementSpeed = 1.0f;
// Use this for initialization
void Start () {
}
// Update is called once per frame
void Update () {
var x = Input.GetAxis("Horizontal... | using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class PlayerMovement : MonoBehaviour {
public float movementSpeed = 1.0f;
private bool isMovementLocked = false;
// Use this for initialization
void Start () {
}
// Update is called once per frame
void Update (... |
Use property instead of member | using System.Collections.Generic;
using System.Linq;
using System.Threading;
using System.Threading.Tasks;
using WalletWasabi.Backend.Models;
using WalletWasabi.Interfaces;
namespace WalletWasabi.WebClients.SmartBit
{
public class SmartBitExchangeRateProvider : IExchangeRateProvider
{
private SmartBitClient _clie... | using System.Collections.Generic;
using System.Linq;
using System.Threading;
using System.Threading.Tasks;
using WalletWasabi.Backend.Models;
using WalletWasabi.Interfaces;
namespace WalletWasabi.WebClients.SmartBit
{
public class SmartBitExchangeRateProvider : IExchangeRateProvider
{
private SmartBitClient Clien... |
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... |
Make taskbar jump list show last part of path (folder name) | using System.Windows;
using System.Windows.Shell;
using GitMind.ApplicationHandling.SettingsHandling;
namespace GitMind.Common
{
public class JumpListService
{
private static readonly int MaxTitleLength = 25;
public void Add(string workingFolder)
{
JumpList jumpList = JumpList.GetJumpList(Application.Cu... | using System.IO;
using System.Windows;
using System.Windows.Shell;
using GitMind.ApplicationHandling.SettingsHandling;
namespace GitMind.Common
{
public class JumpListService
{
private static readonly int MaxTitleLength = 25;
public void Add(string workingFolder)
{
JumpList jumpList = JumpList.GetJumpLi... |
Use the .Data propertry as opposed to GetData in this PartialView | @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) { continue... | @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) { continue... |
Fix whitespace in team player stats view. | @model WuzlStats.ViewModels.Player.TeamPlayerStats
<div class="panel panel-default">
<div class="panel-heading">Teams</div>
<div class="panel-body">
<div class="row">
<div class="col-sm-4">
<label>Games played:</label>
</div>
<div class="col-sm-8"><... | @model WuzlStats.ViewModels.Player.TeamPlayerStats
<div class="panel panel-default">
<div class="panel-heading">Teams</div>
<div class="panel-body">
<div class="row">
<div class="col-sm-4">
<label>Games played:</label>
</div>
<div class="col-sm-8"><... |
Make a tag V15.8.0 2017-05-22 | using System.Web;
using Newtonsoft.Json;
using System;
namespace TropoCSharp.Tropo
{
/// <summary>
/// A utility class to render a Tropo object as JSON.
/// </summary>
public static class TropoJSONExtensions
{
public static void RenderJSON(this Tropo tropo, HttpResponse response)
{... | using System.Web;
using Newtonsoft.Json;
using System;
namespace TropoCSharp.Tropo
{
/// <summary>
/// A utility class to render a Tropo object as JSON.
/// </summary>
public static class TropoJSONExtensions
{
public static void RenderJSON(this Tropo tropo, HttpResponse response)
{... |
Fix remaining game host regressions | // 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.Platform;
namespace osu.Game.Tests
{
/// <summary>
/// A headless host which cleans up before running (removing any remnants from a previous... | // 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.Platform;
namespace osu.Game.Tests
{
/// <summary>
/// A headless host which cleans up before running (removing any remnants from a previous... |
Switch to the Build<AppFunc> extension method - nicer syntax | using System;
using System.Collections.Generic;
using System.Threading.Tasks;
using System.Windows;
using Microsoft.Owin.Builder;
using Owin;
namespace CefSharp.Owin.Example.Wpf
{
//Shorthand for Owin pipeline func
using AppFunc = Func<IDictionary<string, object>, Task>;
/// <summary>
/// Interaction... | using System;
using System.Collections.Generic;
using System.Threading.Tasks;
using System.Windows;
using Microsoft.Owin.Builder;
using Owin;
namespace CefSharp.Owin.Example.Wpf
{
//Shorthand for Owin pipeline func
using AppFunc = Func<IDictionary<string, object>, Task>;
/// <summary>
/// Interaction... |
Update error categories to match libgit2 | namespace LibGit2Sharp.Core
{
internal enum GitErrorCategory
{
Unknown = -1,
NoMemory,
Os,
Invalid,
Reference,
Zlib,
Repository,
Config,
Regex,
Odb,
Index,
Object,
Net,
Tag,
Tree,
Inde... | namespace LibGit2Sharp.Core
{
internal enum GitErrorCategory
{
Unknown = -1,
None,
NoMemory,
Os,
Invalid,
Reference,
Zlib,
Repository,
Config,
Regex,
Odb,
Index,
Object,
Net,
Tag,
Tree... |
Add tests for FY handling | using BatteryCommander.Web.Models;
using System;
using System.Collections.Generic;
using Xunit;
namespace BatteryCommander.Tests
{
public class FiscalYearTests
{
[Fact]
public void Check_FY_2017_Start()
{
}
}
} | using BatteryCommander.Web.Models;
using System;
using System.Collections.Generic;
using Xunit;
using BatteryCommander.Web.Services;
namespace BatteryCommander.Tests
{
public class FiscalYearTests
{
[Fact]
public void Check_FY_2017_Start()
{
Assert.Equal(new DateTime(2016,... |
Add "Nominations" and "Updated" sorting criteria in beatmap listing | // 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.Framework.Localisation;
using osu.Game.Resources.Localisation.Web;
namespace osu.Game.Overlays.BeatmapListing
{
public enum SortCriteria... | // 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.Framework.Localisation;
using osu.Game.Resources.Localisation.Web;
namespace osu.Game.Overlays.BeatmapListing
{
public enum SortCriteria... |
Add "counter" keyword for key overlay setting | // Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
using osu.Framework.Allocation;
using osu.Framework.Graphics;
using osu.Framework.Localisation;
using osu.Game.Configuration;
using osu.Game.Localisation;
namespace osu... | // Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
using osu.Framework.Allocation;
using osu.Framework.Graphics;
using osu.Framework.Localisation;
using osu.Game.Configuration;
using osu.Game.Localisation;
namespace osu... |
Allow combining lifetime scope tags | using System;
using Autofac.Builder;
using Hangfire.Annotations;
namespace Hangfire
{
/// <summary>
/// Adds registration syntax to the <see cref="Autofac.ContainerBuilder"/> type.
/// </summary>
public static class RegistrationExtensions
{
/// <summary>
/// Share one instance of t... | using System;
using System.Linq;
using Autofac.Builder;
using Hangfire.Annotations;
namespace Hangfire
{
/// <summary>
/// Adds registration syntax to the <see cref="Autofac.ContainerBuilder"/> type.
/// </summary>
public static class RegistrationExtensions
{
/// <summary>
/// Shar... |
Add ctor to pipe the http factory | using System;
using System.Collections.Generic;
namespace website_performance.Entities
{
public class Robots
{
private readonly List<Uri> _sitemaps = new List<Uri>();
public Robots(string url)
{
if (Uri.TryCreate(url, UriKind.Absolute, out var robotsUrl))
U... | using System;
using System.Collections.Generic;
using website_performance.Infrastructure;
namespace website_performance.Entities
{
public class Robots
{
private readonly IHttpMessageHandlerFactory _httpMessageHandlerFactory;
private readonly List<Uri> _sitemaps = new List<Uri>();
publ... |
Update existing documentation for season ids. | namespace TraktApiSharp.Objects.Get.Shows.Seasons
{
using Newtonsoft.Json;
/// <summary>
/// A collection of ids for various web services for a Trakt season.
/// </summary>
public class TraktSeasonIds
{
/// <summary>
/// The Trakt numeric id for the season.
/// </summar... | namespace TraktApiSharp.Objects.Get.Shows.Seasons
{
using Newtonsoft.Json;
/// <summary>A collection of ids for various web services, including the Trakt id, for a Trakt season.</summary>
public class TraktSeasonIds
{
/// <summary>Gets or sets the Trakt numeric id.</summary>
[JsonPrope... |
Set the the game width and height to the console window size or to a maximum value. | using SnakeApp.Models;
using System;
namespace SnakeApp.Controllers
{
public class GameController
{
public void StartNewGame()
{
PrepareConsole();
var game = new Game(80, 25, 5, 100);
game.StartAsync();
ConsoleKeyInfo userInput = new ConsoleKeyInfo();
do
{
userInput = Console.ReadKey(tru... | using SnakeApp.Models;
using System;
namespace SnakeApp.Controllers
{
public class GameController
{
private byte MAX_WIDTH = 80;
private byte MAX_HEIGHT = 25;
public void StartNewGame()
{
PrepareConsole();
var game = new Game(Math.Min((byte)(Console.WindowWidth - 1), MAX_WIDTH), Math.Min((byte)(Cons... |
Fix an endless feedback loop | // Copyright (c) 2007-2018 ppy Pty Ltd <contact@ppy.sh>.
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
namespace osu.Game.Screens.Select
{
public class MatchSongSelect : SongSelect
{
protected override bool OnSelectionFinalised()
{
Exi... | // Copyright (c) 2007-2018 ppy Pty Ltd <contact@ppy.sh>.
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
namespace osu.Game.Screens.Select
{
public class MatchSongSelect : SongSelect
{
protected override bool OnSelectionFinalised()
{
Sch... |
Fix no build option in dotnet test task | // Copyright (c) .NET Foundation and contributors. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
namespace Microsoft.DotNet.Cli.Build
{
public class DotNetTest : DotNetTool
{
protected override string Command
{
... | // Copyright (c) .NET Foundation and contributors. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
namespace Microsoft.DotNet.Cli.Build
{
public class DotNetTest : DotNetTool
{
protected override string Command
{
... |
Reduce default access token expiration timespan | // Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information.
using System;
using Microsoft.Owin.Infrastructure;
using Microsoft.Owin.Security.Infrastructure;
namespace Microsoft.Owin.Security.OAuth
{
public class OAuthAuthorizationServerOptio... | // Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information.
using System;
using Microsoft.Owin.Infrastructure;
using Microsoft.Owin.Security.Infrastructure;
namespace Microsoft.Owin.Security.OAuth
{
public class OAuthAuthorizationServerOptio... |
Use correct order of equality assertion for better error message (xUnit analyzer) | using System;
using System.Collections.Generic;
using System.Linq;
using AvsAnLib.Internals;
using WikipediaAvsAnTrieExtractor;
using Xunit;
namespace WikipediaAvsAnTrieExtractorTest {
public class TriePrefixIncrementorTest {
[Fact]
public void BasicIncrementWorks() {
var no... | using System;
using System.Collections.Generic;
using System.Linq;
using AvsAnLib.Internals;
using WikipediaAvsAnTrieExtractor;
using Xunit;
namespace WikipediaAvsAnTrieExtractorTest {
public class TriePrefixIncrementorTest {
[Fact]
public void BasicIncrementWorks() {
var no... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.