commit
stringlengths
40
40
subject
stringlengths
4
1.73k
repos
stringlengths
5
127k
old_file
stringlengths
2
751
new_file
stringlengths
2
751
new_contents
stringlengths
1
8.98k
old_contents
stringlengths
0
6.59k
license
stringclasses
13 values
lang
stringclasses
23 values
80d81c30440594e4aa92d62812504086f82a95da
Reword taiko easy mod description to fit others better
peppy/osu,NeoAdonis/osu,peppy/osu-new,smoogipoo/osu,NeoAdonis/osu,peppy/osu,UselessToucan/osu,smoogipooo/osu,peppy/osu,NeoAdonis/osu,smoogipoo/osu,ppy/osu,UselessToucan/osu,UselessToucan/osu,ppy/osu,ppy/osu,smoogipoo/osu
osu.Game.Rulesets.Taiko/Mods/TaikoModEasy.cs
osu.Game.Rulesets.Taiko/Mods/TaikoModEasy.cs
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. using osu.Game.Rulesets.Mods; namespace osu.Game.Rulesets.Taiko.Mods { public class TaikoModEasy : ModEasy { public override string Description => @"Beats move slower, and less accuracy required!"; } }
// 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.Rulesets.Mods; namespace osu.Game.Rulesets.Taiko.Mods { public class TaikoModEasy : ModEasy { public override string Description => @"Beats move slower, less accuracy required!"; } }
mit
C#
e827b14abf5212aa0809256b4830456acda994e8
Add LayeredHitSamples skin config lookup
ppy/osu,NeoAdonis/osu,peppy/osu,NeoAdonis/osu,peppy/osu,ppy/osu,smoogipoo/osu,UselessToucan/osu,NeoAdonis/osu,UselessToucan/osu,UselessToucan/osu,smoogipoo/osu,smoogipooo/osu,smoogipoo/osu,peppy/osu-new,ppy/osu,peppy/osu
osu.Game/Skinning/GlobalSkinConfiguration.cs
osu.Game/Skinning/GlobalSkinConfiguration.cs
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. namespace osu.Game.Skinning { public enum GlobalSkinConfiguration { AnimationFramerate, LayeredHitSounds, } }
// 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.Game.Skinning { public enum GlobalSkinConfiguration { AnimationFramerate } }
mit
C#
ea965af1c0d363412a1cd91b9cea87fe6ed1235c
Add comment for GetAsync
ZLima12/osu-framework,EVAST9919/osu-framework,smoogipooo/osu-framework,DrabWeb/osu-framework,ZLima12/osu-framework,ppy/osu-framework,peppy/osu-framework,DrabWeb/osu-framework,EVAST9919/osu-framework,EVAST9919/osu-framework,peppy/osu-framework,smoogipooo/osu-framework,ppy/osu-framework,DrabWeb/osu-framework,Tom94/osu-framework,peppy/osu-framework,EVAST9919/osu-framework,ppy/osu-framework,Tom94/osu-framework
osu.Framework/IO/Stores/IResourceStore.cs
osu.Framework/IO/Stores/IResourceStore.cs
// Copyright (c) 2007-2018 ppy Pty Ltd <contact@ppy.sh>. // Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu-framework/master/LICENCE using System; using System.IO; using System.Threading.Tasks; namespace osu.Framework.IO.Stores { public interface IResourceStore<T> : IDisposable { /// <summary> /// Retrieves an object from the store. /// </summary> /// <param name="name">The name of the object.</param> /// <returns>The object.</returns> T Get(string name); /// <summary> /// Retrieves an object from the store asynchronously. /// </summary> /// <param name="name">The name of the object.</param> /// <returns>The object.</returns> Task<T> GetAsync(string name); Stream GetStream(string name); } }
// Copyright (c) 2007-2018 ppy Pty Ltd <contact@ppy.sh>. // Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu-framework/master/LICENCE using System; using System.IO; using System.Threading.Tasks; namespace osu.Framework.IO.Stores { public interface IResourceStore<T> : IDisposable { /// <summary> /// Retrieves an object from the store. /// </summary> /// <param name="name">The name of the object.</param> /// <returns>The object.</returns> T Get(string name); Task<T> GetAsync(string name); Stream GetStream(string name); } }
mit
C#
ec241352f852765e76d1f11c21d6aac44256203c
fix bug in dxf table writing
IxMilia/BCad,IxMilia/BCad
BCad.Dxf/Tables/DxfViewPortTable.cs
BCad.Dxf/Tables/DxfViewPortTable.cs
using BCad.Dxf.Sections; using System.Collections.Generic; using System.Linq; namespace BCad.Dxf.Tables { public class DxfViewPortTable : DxfTable { public override DxfTableType TableType { get { return DxfTableType.ViewPort; } } public List<DxfViewPort> ViewPorts { get; private set; } public DxfViewPortTable() : this(new DxfViewPort[0]) { } public DxfViewPortTable(IEnumerable<DxfViewPort> viewPorts) { ViewPorts = new List<DxfViewPort>(viewPorts); } internal override IEnumerable<DxfCodePair> GetValuePairs() { if (ViewPorts.Count == 0) yield break; yield return new DxfCodePair(0, DxfSection.TableText); yield return new DxfCodePair(2, DxfTable.ViewPortText); foreach (var viewPort in ViewPorts) { foreach (var pair in viewPort.GetValuePairs()) yield return pair; } yield return new DxfCodePair(0, DxfSection.EndTableText); } internal static DxfViewPortTable ViewPortTableFromBuffer(DxfCodePairBufferReader buffer) { var table = new DxfViewPortTable(); while (buffer.ItemsRemain) { var pair = buffer.Peek(); buffer.Advance(); if (DxfTablesSection.IsTableEnd(pair)) { break; } if (pair.Code != 0 || pair.StringValue != DxfViewPort.ViewPortText) { throw new DxfReadException("Expected view port start."); } var vp = DxfViewPort.FromBuffer(buffer); table.ViewPorts.Add(vp); } return table; } } }
using BCad.Dxf.Sections; using System.Collections.Generic; using System.Linq; namespace BCad.Dxf.Tables { public class DxfViewPortTable : DxfTable { public override DxfTableType TableType { get { return DxfTableType.ViewPort; } } public List<DxfViewPort> ViewPorts { get; private set; } public DxfViewPortTable() : this(new DxfViewPort[0]) { } public DxfViewPortTable(IEnumerable<DxfViewPort> viewPorts) { ViewPorts = new List<DxfViewPort>(viewPorts); } internal override IEnumerable<DxfCodePair> GetValuePairs() { if (ViewPorts.Count == 0) yield break; yield return new DxfCodePair(0, DxfSection.TablesSectionText); yield return new DxfCodePair(2, DxfTable.ViewPortText); foreach (var viewPort in ViewPorts) { foreach (var pair in viewPort.GetValuePairs()) yield return pair; } yield return new DxfCodePair(0, DxfSection.EndTableText); } internal static DxfViewPortTable ViewPortTableFromBuffer(DxfCodePairBufferReader buffer) { var table = new DxfViewPortTable(); while (buffer.ItemsRemain) { var pair = buffer.Peek(); buffer.Advance(); if (DxfTablesSection.IsTableEnd(pair)) { break; } if (pair.Code != 0 || pair.StringValue != DxfViewPort.ViewPortText) { throw new DxfReadException("Expected view port start."); } var vp = DxfViewPort.FromBuffer(buffer); table.ViewPorts.Add(vp); } return table; } } }
apache-2.0
C#
4d5a9dad88febc7bd888132a7c43eb03a13b70f8
Fix the order of the connect section
github/VisualStudio,github/VisualStudio,github/VisualStudio,HeadhunterXamd/VisualStudio,luizbon/VisualStudio
src/GitHub.VisualStudio/TeamExplorer/Connect/GitHubConnectSection1.cs
src/GitHub.VisualStudio/TeamExplorer/Connect/GitHubConnectSection1.cs
using GitHub.Api; using GitHub.Models; using GitHub.Services; using Microsoft.TeamFoundation.Controls; using System.ComponentModel.Composition; namespace GitHub.VisualStudio.TeamExplorer.Connect { [TeamExplorerSection(GitHubConnectSection1Id, TeamExplorerPageIds.Connect, 10)] [PartCreationPolicy(CreationPolicy.NonShared)] public class GitHubConnectSection1 : GitHubConnectSection { public const string GitHubConnectSection1Id = "519B47D3-F2A9-4E19-8491-8C9FA25ABE91"; [ImportingConstructor] public GitHubConnectSection1(ISimpleApiClientFactory apiFactory, ITeamExplorerServiceHolder holder, IConnectionManager manager) : base(apiFactory, holder, manager, 1) { } } }
using GitHub.Api; using GitHub.Models; using GitHub.Services; using Microsoft.TeamFoundation.Controls; using System.ComponentModel.Composition; namespace GitHub.VisualStudio.TeamExplorer.Connect { [TeamExplorerSection(GitHubConnectSection1Id, TeamExplorerPageIds.Connect, 11)] [PartCreationPolicy(CreationPolicy.NonShared)] public class GitHubConnectSection1 : GitHubConnectSection { public const string GitHubConnectSection1Id = "519B47D3-F2A9-4E19-8491-8C9FA25ABE91"; [ImportingConstructor] public GitHubConnectSection1(ISimpleApiClientFactory apiFactory, ITeamExplorerServiceHolder holder, IConnectionManager manager) : base(apiFactory, holder, manager, 1) { } } }
mit
C#
b441b56fa7fc89df7af05bb23ec6207d486969d6
rename extensions static class
xatzipe/BatchEnumerable
Xatzipe.BatchEnumerable/Xatzipe.BatchEnumerable/Enumerable.cs
Xatzipe.BatchEnumerable/Xatzipe.BatchEnumerable/Enumerable.cs
using System; using System.Collections.Generic; using System.Linq; using System.Linq.Expressions; using System.Text; using System.Threading.Tasks; namespace Xatzipe.BatchEnumerable { /// <summary> /// IEnumerable extension to iterate in batches /// </summary> public static class Enumerable { /// <summary> /// Batch the specified items, selectedColumns, orderBy, batchSize and filter /// </summary> /// <param name="items">Items</param> /// <param name="response">Selected columns</param> /// <param name="order">Order by</param> /// <param name="batchSize">Batch size</param> /// <param name="filter">Filter</param> /// <typeparam name="TModel">The Input type parameter</typeparam> /// <typeparam name="TResult">The Output type parameter</typeparam> public static IBatchEnumerable<TModel, TResult> Batch<TModel, TResult> ( this IEnumerable<TModel> items, Expression<Func<TModel, TResult>> response, Func<IQueryable<TModel>, IOrderedQueryable<TModel>> order = null, Expression<Func<TModel, bool>> filter = null, int batchSize = 10 ) { return new BatchEnumerable<TModel, TResult>(items.AsQueryable(), response, order, filter, batchSize); } /// <summary> /// Batch the specified items, orderBy, batchSize and filter. /// </summary> /// <param name="items">Items.</param> /// <param name="order">Order by.</param> /// <param name="batchSize">Batch size.</param> /// <param name="filter">Filter.</param> /// <typeparam name="TResult">The 1st type parameter.</typeparam> public static IBatchEnumerable<TResult> Batch<TResult> ( this IEnumerable<TResult> items, Func<IQueryable<TResult>, IOrderedQueryable<TResult>> order = null, Expression<Func<TResult, bool>> filter = null, int batchSize = 10 ) { return new BatchEnumerable<TResult>(items.AsQueryable(), order, filter, batchSize); } } }
using System; using System.Collections.Generic; using System.Linq; using System.Linq.Expressions; using System.Text; using System.Threading.Tasks; namespace Xatzipe.BatchEnumerable { /// <summary> /// IEnumerable extension to iterate in batches /// </summary> public static class BatchEnumerableExtensions { /// <summary> /// Batch the specified items, selectedColumns, orderBy, batchSize and filter /// </summary> /// <param name="items">Items</param> /// <param name="response">Selected columns</param> /// <param name="order">Order by</param> /// <param name="batchSize">Batch size</param> /// <param name="filter">Filter</param> /// <typeparam name="TModel">The Input type parameter</typeparam> /// <typeparam name="TResult">The Output type parameter</typeparam> public static IBatchEnumerable<TModel, TResult> Batch<TModel, TResult> ( this IEnumerable<TModel> items, Expression<Func<TModel, TResult>> response, Func<IQueryable<TModel>, IOrderedQueryable<TModel>> order = null, Expression<Func<TModel, bool>> filter = null, int batchSize = 10 ) { return new BatchEnumerable<TModel, TResult>(items.AsQueryable(), response, order, filter, batchSize); } /// <summary> /// Batch the specified items, orderBy, batchSize and filter. /// </summary> /// <param name="items">Items.</param> /// <param name="order">Order by.</param> /// <param name="batchSize">Batch size.</param> /// <param name="filter">Filter.</param> /// <typeparam name="TResult">The 1st type parameter.</typeparam> public static IBatchEnumerable<TResult> Batch<TResult> ( this IEnumerable<TResult> items, Func<IQueryable<TResult>, IOrderedQueryable<TResult>> order = null, Expression<Func<TResult, bool>> filter = null, int batchSize = 10 ) { return new BatchEnumerable<TResult>(items.AsQueryable(), order, filter, batchSize); } } }
mit
C#
85e9f3843ea612656513fe962c5ed0e7f8cdc77d
add experiment note
LayoutFarm/PixelFarm
a_mini/projects/Tests/WinFormTestBed/Interfaces/Interfaces.cs
a_mini/projects/Tests/WinFormTestBed/Interfaces/Interfaces.cs
//Apache2, 2017, WinterDev namespace PaintLab { //this is an optional*** interface //that bridge our platform to another app world //with this interface, //the app dose not know about the backend engine. //suite for general client public interface IAppHost { } public interface IViewport { IAppHost AppHost { get; } IUIRootElement Root { get; } } public interface IUIEvent { } public interface IUIElement { } public interface IUIBoxElement : IUIElement { int Width { get; } int Height { get; } int Top { get; } int Left { get; } void SetSize(int w, int h); void SetLocation(int left, int top); } public interface IUIRootElement { IUIElement CreateElement(string elemName); void AddContent(IUIElement uiElement); } public enum BasicUIElementKind { SimpleBox, TextBox, HScrollBar, VScrollBar, } public static class UIElemNameConst { public const string simple_box = "simple_box"; public const string v_scroll_bar = "v_scroll_bar"; public const string h_scroll_bar = "h_scroll_bar"; public const string textbox = "textbox"; } public static class UIRootElementExtensions { public static IUIElement CreateElement2(this IUIRootElement rootElem, BasicUIElementKind elemKind) { switch (elemKind) { default: case BasicUIElementKind.SimpleBox: return rootElem.CreateElement(UIElemNameConst.simple_box); case BasicUIElementKind.VScrollBar: return rootElem.CreateElement(UIElemNameConst.simple_box); case BasicUIElementKind.HScrollBar: return rootElem.CreateElement(UIElemNameConst.h_scroll_bar); case BasicUIElementKind.TextBox: return rootElem.CreateElement(UIElemNameConst.textbox); } } } }
//Apache2, 2017, WinterDev namespace PaintLab { public interface IAppHost { } public interface IViewport { IAppHost AppHost { get; } IUIRootElement Root { get; } } public interface IUIEvent { } public interface IUIElement { } public interface IUIBoxElement : IUIElement { int Width { get; } int Height { get; } int Top { get; } int Left { get; } void SetSize(int w, int h); void SetLocation(int left, int top); } public interface IUIRootElement { IUIElement CreateElement(string elemName); void AddContent(IUIElement uiElement); } public enum BasicUIElementKind { SimpleBox, TextBox, HScrollBar, VScrollBar, } public static class UIElemNameConst { public const string simple_box = "simple_box"; public const string v_scroll_bar = "v_scroll_bar"; public const string h_scroll_bar = "h_scroll_bar"; public const string textbox = "textbox"; } public static class UIRootElementExtensions { public static IUIElement CreateElement2(this IUIRootElement rootElem, BasicUIElementKind elemKind) { switch (elemKind) { default: case BasicUIElementKind.SimpleBox: return rootElem.CreateElement(UIElemNameConst.simple_box); case BasicUIElementKind.VScrollBar: return rootElem.CreateElement(UIElemNameConst.simple_box); case BasicUIElementKind.HScrollBar: return rootElem.CreateElement(UIElemNameConst.h_scroll_bar); case BasicUIElementKind.TextBox: return rootElem.CreateElement(UIElemNameConst.textbox); } } } }
bsd-2-clause
C#
e7853cc3a052ecdc9d645b95d05ef2c7dcb6e3c6
Simplify TypeContainer class
github/codeql,github/codeql,github/codeql,github/codeql,github/codeql,github/codeql,github/codeql,github/codeql,github/codeql,github/codeql,github/codeql,github/codeql,github/codeql,github/codeql,github/codeql
csharp/extractor/Semmle.Extraction.CIL/Entities/TypeContainer.cs
csharp/extractor/Semmle.Extraction.CIL/Entities/TypeContainer.cs
using System; using Microsoft.CodeAnalysis; using System.Collections.Generic; using System.IO; namespace Semmle.Extraction.CIL.Entities { /// <summary> /// Base class for all type containers (namespaces, types, methods). /// </summary> public abstract class TypeContainer : LabelledEntity, IGenericContext { protected TypeContainer(Context cx) : base(cx) { } public abstract IEnumerable<Type> MethodParameters { get; } public abstract IEnumerable<Type> TypeParameters { get; } } }
using System; using Microsoft.CodeAnalysis; using System.Collections.Generic; using System.IO; namespace Semmle.Extraction.CIL.Entities { /// <summary> /// Base class for all type containers (namespaces, types, methods). /// </summary> public abstract class TypeContainer : IGenericContext, IExtractedEntity { public Context Cx { get; } protected TypeContainer(Context cx) { Cx = cx; } public virtual Label Label { get; set; } public abstract void WriteId(TextWriter trapFile); public void WriteQuotedId(TextWriter trapFile) { trapFile.Write("@\""); WriteId(trapFile); trapFile.Write(IdSuffix); trapFile.Write('\"'); } public abstract string IdSuffix { get; } public void Extract(Context cx2) { cx2.Populate(this); } public abstract IEnumerable<IExtractionProduct> Contents { get; } public override string ToString() { using var writer = new StringWriter(); WriteQuotedId(writer); return writer.ToString(); } public TrapStackBehaviour TrapStackBehaviour => TrapStackBehaviour.NoLabel; public Location ReportingLocation => throw new NotImplementedException(); public abstract IEnumerable<Type> MethodParameters { get; } public abstract IEnumerable<Type> TypeParameters { get; } } }
mit
C#
8db90056f545ca73e4ae2f561d04499f29ea7e3d
create temp drectory for home directory in integration test
OlegKleyman/IntegrationFtpServer
tests/integration/Omego.SimpleFtp.Tests.Integration/FtpServerTests.cs
tests/integration/Omego.SimpleFtp.Tests.Integration/FtpServerTests.cs
namespace Omego.SimpleFtp.Tests.Integration { using System.IO; using System.IO.Abstractions; using NUnit.Framework; [TestFixture] public class FtpServerTests { private readonly string ftpHomeDirectory = Path.Combine(Path.GetTempPath(), Path.GetRandomFileName()); [OneTimeSetUp] public void Setup() { Directory.CreateDirectory(ftpHomeDirectory); } [Test] public void FilesShouldBeListed() { var server = GetFtpServer(); server.Start(); } private FtpServer GetFtpServer() { return new FtpServer(new FtpConfiguration(ftpHomeDirectory, 3435), new FileSystem(), new OperatingSystem()); } } }
namespace Omego.SimpleFtp.Tests.Integration { using System.IO.Abstractions; using NUnit.Framework; [TestFixture] public class FtpServerTests { [Test] public void FilesShouldBeListed() { var server = GetFtpServer(); server.Start(); } private FtpServer GetFtpServer() { return new FtpServer(new FtpConfiguration("Home", 3435), new FileSystem(), new OperatingSystem()); } } }
unlicense
C#
3785458459d62f8c533ef1fa26527595dd7b5813
fix for updated sdk
JetBrains/resharper-unity,JetBrains/resharper-unity,JetBrains/resharper-unity
resharper/src/resharper-unity/ShaderLab/Feature/Services/QuickFixes/ShaderLabRedundantPreprocessorCharQuickFix.cs
resharper/src/resharper-unity/ShaderLab/Feature/Services/QuickFixes/ShaderLabRedundantPreprocessorCharQuickFix.cs
using System; using System.Collections.Generic; using JetBrains.Application.Progress; using JetBrains.ProjectModel; using JetBrains.ReSharper.Feature.Services.Bulbs; using JetBrains.ReSharper.Feature.Services.Intentions; using JetBrains.ReSharper.Feature.Services.QuickFixes; using JetBrains.ReSharper.Plugins.Unity.ShaderLab.Daemon.Stages.Highlightings; using JetBrains.ReSharper.Psi; using JetBrains.ReSharper.Psi.Tree; using JetBrains.TextControl; using JetBrains.Util; using JetBrains.Util.Text; namespace JetBrains.ReSharper.Plugins.Unity.ShaderLab.Feature.Services.QuickFixes { [QuickFix] public class ShaderLabRedundantPreprocessorCharQuickFix : IQuickFix { private readonly ITokenNode mySwallowedToken; public ShaderLabRedundantPreprocessorCharQuickFix(ShaderLabSwallowedPreprocessorCharWarning highlighting) { mySwallowedToken = highlighting.SwallowedToken; } public IEnumerable<IntentionAction> CreateBulbItems() { return new RemoveSwallowedToken(mySwallowedToken).ToQuickFixIntentions(); } public bool IsAvailable(IUserDataHolder cache) => mySwallowedToken.IsValid(); private class RemoveSwallowedToken : BulbActionBase { private readonly ITokenNode mySwallowedToken; public RemoveSwallowedToken(ITokenNode swallowedToken) { mySwallowedToken = swallowedToken; } protected override Action<ITextControl> ExecutePsiTransaction(ISolution solution, IProgressIndicator progress) { // TODO: When we have a code formatter for ShaderLab, we can just use CodeFormattingHelper.AddLineBreakAfter var lineEnding = mySwallowedToken.GetContainingFile() #if RIDER .DetectLineEnding(solution.GetPsiServices()); #else .DetectLineEnding(); #endif var presentationAsBuffer = lineEnding.GetPresentationAsBuffer(); return textControl => { textControl.Document.InsertText(mySwallowedToken.GetDocumentStartOffset().Offset, presentationAsBuffer.GetText()); }; } public override string Text => "Insert new line"; } } }
using System; using System.Collections.Generic; using JetBrains.Application.Progress; using JetBrains.ProjectModel; using JetBrains.ReSharper.Feature.Services.Bulbs; using JetBrains.ReSharper.Feature.Services.Intentions; using JetBrains.ReSharper.Feature.Services.QuickFixes; using JetBrains.ReSharper.Plugins.Unity.ShaderLab.Daemon.Stages.Highlightings; using JetBrains.ReSharper.Psi.Tree; using JetBrains.TextControl; using JetBrains.Util; using JetBrains.Util.Text; namespace JetBrains.ReSharper.Plugins.Unity.ShaderLab.Feature.Services.QuickFixes { [QuickFix] public class ShaderLabRedundantPreprocessorCharQuickFix : IQuickFix { private readonly ITokenNode mySwallowedToken; public ShaderLabRedundantPreprocessorCharQuickFix(ShaderLabSwallowedPreprocessorCharWarning highlighting) { mySwallowedToken = highlighting.SwallowedToken; } public IEnumerable<IntentionAction> CreateBulbItems() { return new RemoveSwallowedToken(mySwallowedToken).ToQuickFixIntentions(); } public bool IsAvailable(IUserDataHolder cache) => mySwallowedToken.IsValid(); private class RemoveSwallowedToken : BulbActionBase { private readonly ITokenNode mySwallowedToken; public RemoveSwallowedToken(ITokenNode swallowedToken) { mySwallowedToken = swallowedToken; } protected override Action<ITextControl> ExecutePsiTransaction(ISolution solution, IProgressIndicator progress) { // TODO: When we have a code formatter for ShaderLab, we can just use CodeFormattingHelper.AddLineBreakAfter var lineEnding = mySwallowedToken.GetContainingFile().DetectLineEnding(); var presentationAsBuffer = lineEnding.GetPresentationAsBuffer(); return textControl => { textControl.Document.InsertText(mySwallowedToken.GetDocumentStartOffset().Offset, presentationAsBuffer.GetText()); }; } public override string Text => "Insert new line"; } } }
apache-2.0
C#
917c55fdb49d914e02c8fa04f7a5c5994b08e139
Fix JValue
AndriyVolkov/JSReader
Src/JSReader/src/obj/JValue.cs
Src/JSReader/src/obj/JValue.cs
using System; namespace JSReader { public class JValue : JArrayItem { public JValue(string _value) { Value = _value; } public override string LazyJson { get { return $"{Value}"; } } public override bool IsValid { get { return true; } } public string Value { get; internal set; } public override string ToString() { return $"\"{Value}\""; } public override void Read(string iText) { Value = iText; } } }
using System; namespace JSReader { public class JValue : JArrayItem { public JValue(string _value) { Value = _value; } public override string JText { get { return $"\"{Value}\""; } } public override string JTextLight { get { return $"{Value}"; } } public override bool IsValid { get { return true; } } public string Value { get; internal set; } } }
mit
C#
fe0c6475c0b4ceb7e1d7a5be9e637bda6402549b
Make example more readable
rdelhommer/MainPower.Com0com.Redirector
examples/Com0Com.CSharp.Examples/Program.cs
examples/Com0Com.CSharp.Examples/Program.cs
using System; using System.Collections.Generic; namespace Com0Com.CSharp.Examples { class Program { private static readonly Com0ComSetupCFacade SetupCFacade = new Com0ComSetupCFacade(); static void Main(string[] args) { Console.WriteLine("Pre-existing virtual crossover port pairs:"); var preExistingPortPairs = SetupCFacade.GetCrossoverPortPairs(); foreach (var pp in preExistingPortPairs) { Console.WriteLine($"Virtual Port Pair: CNCA{pp.PairNumber}({pp.PortNameA}) <-> CNCB{pp.PairNumber}({pp.PortNameB})"); } Console.WriteLine(); // Create some new virtual com port pairs var pp1 = SetupCFacade.CreatePortPair(); var pp2 = SetupCFacade.CreatePortPair("COM180", "COM181"); Console.WriteLine("Virtual crossover port pairs after creation:"); var portPairsAfterCreation = SetupCFacade.GetCrossoverPortPairs(); foreach (var pp in portPairsAfterCreation) { Console.WriteLine($"Virtual Port Pair: CNCA{pp.PairNumber}({pp.PortNameA}) <-> CNCB{pp.PairNumber}({pp.PortNameB})"); } Console.WriteLine(); // Remove the virtual com port pairs that we created SetupCFacade.DeletePortPair(pp1.PairNumber); SetupCFacade.DeletePortPair(pp2.PairNumber); Console.WriteLine("Virtual crossover port pairs after removal:"); var portPairsAfterDelete = SetupCFacade.GetCrossoverPortPairs(); foreach (var pp in portPairsAfterDelete) { Console.WriteLine($"Virtual Port Pair: CNCA{pp.PairNumber}({pp.PortNameA}) <-> CNCB{pp.PairNumber}({pp.PortNameB})"); } Console.ReadLine(); } } }
using System; using System.Collections.Generic; namespace Com0Com.CSharp.Examples { class Program { private static readonly Com0ComSetupCFacade SetupCFacade = new Com0ComSetupCFacade(); static void Main(string[] args) { // Get all the pre existing virtual com port pairs var preExistingPortPairs = SetupCFacade.GetCrossoverPortPairs(); foreach (var pp in preExistingPortPairs) { Console.WriteLine($"Virtual Port Pair: CNCA{pp.PairNumber}({pp.PortNameA}) <-> CNCB{pp.PairNumber}({pp.PortNameB})"); } // Create some new virtual com port pairs var pp1 = SetupCFacade.CreatePortPair(); var pp2 = SetupCFacade.CreatePortPair("COM180", "COM181"); var portPairsAfterCreation = SetupCFacade.GetCrossoverPortPairs(); foreach (var pp in portPairsAfterCreation) { Console.WriteLine($"Virtual Port Pair: CNCA{pp.PairNumber}({pp.PortNameA}) <-> CNCB{pp.PairNumber}({pp.PortNameB})"); } // Remove the virtual com port pairs that we created SetupCFacade.DeletePortPair(pp1.PairNumber); SetupCFacade.DeletePortPair(pp2.PairNumber); var portPairsAfterDelete = SetupCFacade.GetCrossoverPortPairs(); foreach (var pp in portPairsAfterDelete) { Console.WriteLine($"Virtual Port Pair: CNCA{pp.PairNumber}({pp.PortNameA}) <-> CNCB{pp.PairNumber}({pp.PortNameB})"); } Console.ReadLine(); } } }
mit
C#
10dffba7e6502bda6bf2637338a740a45c446303
Implement IComparable interface
projecteon/thecollection,projecteon/thecollection,projecteon/thecollection,projecteon/thecollection
TheCollection.Domain/Period.cs
TheCollection.Domain/Period.cs
namespace TheCollection.Domain { using System; using Newtonsoft.Json; using NodaTime; public class Period : IComparable<Period> { private static DateTime DefaultDate = DateTime.MinValue; [JsonConstructor] public Period(int year, int month) { Year = year; Month = month; } public Period(LocalDate localDate) { Year = localDate.Year; Month = localDate.Month; } public int Year { get; } public int Month { get; } public int CompareTo(Period other) { if (Year > other.Year) return -1; if (Year == other.Year) { if (Month > other.Month) return -1; if (Month == other.Month) return 0; return 1; } return 1; } } }
namespace TheCollection.Domain { using System; using Newtonsoft.Json; using NodaTime; public class Period { private static DateTime DefaultDate = DateTime.MinValue; [JsonConstructor] public Period(int year, int month) { Year = year; Month = month; } public Period(LocalDate localDate) { Year = localDate.Year; Month = localDate.Month; } public int Year { get; } public int Month { get; } } }
apache-2.0
C#
aa6d0c6217a846301502be1b4a48a521e367d5a1
Add missing comment
killerantz/HoloToolkit-Unity,killerantz/HoloToolkit-Unity,DDReaper/MixedRealityToolkit-Unity,killerantz/HoloToolkit-Unity,killerantz/HoloToolkit-Unity
Assets/MRTK/SDK/Experimental/InteractiveElement/Examples/Scripts/CustomStateExample/KeyboardState/KeyboardReceiver.cs
Assets/MRTK/SDK/Experimental/InteractiveElement/Examples/Scripts/CustomStateExample/KeyboardState/KeyboardReceiver.cs
// Copyright (c) Microsoft Corporation. // Licensed under the MIT License. using UnityEngine.Events; using UnityEngine.EventSystems; namespace Microsoft.MixedReality.Toolkit.Experimental.InteractiveElement.Examples { /// <summary> /// Example receiver class for the Keyboard state /// </summary> public class KeyboardReceiver : BaseEventReceiver { /// <summary> /// Example constructor for the Keyboard State /// </summary> /// <param name="eventConfiguration">The event configuration for the Keyboard state</param> public KeyboardReceiver(BaseInteractionEventConfiguration eventConfiguration) : base(eventConfiguration) { } private KeyboardEvents KeyboardEventConfig => EventConfiguration as KeyboardEvents; // Set reference to the event defined in KeyboardEvents private UnityEvent onKKeyPressed => KeyboardEventConfig.OnKKeyPressed; // The OnUpdate method is called using: // InteractiveElement.SetStateAndInvokeEvent(stateName, stateValue, optional eventData) public override void OnUpdate(StateManager stateManager, BaseEventData eventData) { bool keyPressed = stateManager.GetState(StateName).Value > 0; // If the state was set to on, then invoke the event if (keyPressed) { onKKeyPressed.Invoke(); } } } }
// Copyright (c) Microsoft Corporation. // Licensed under the MIT License. using UnityEngine.Events; using UnityEngine.EventSystems; namespace Microsoft.MixedReality.Toolkit.Experimental.InteractiveElement.Examples { /// <summary> /// Example receiver class for the Keyboard state /// </summary> public class KeyboardReceiver : BaseEventReceiver { /// <summary> /// Example constructor for the Keyboard State /// </summary> /// <param name="eventConfiguration"></param> public KeyboardReceiver(BaseInteractionEventConfiguration eventConfiguration) : base(eventConfiguration) { } private KeyboardEvents KeyboardEventConfig => EventConfiguration as KeyboardEvents; // Set reference to the event defined in KeyboardEvents private UnityEvent onKKeyPressed => KeyboardEventConfig.OnKKeyPressed; // The OnUpdate method is called using: // InteractiveElement.SetStateAndInvokeEvent(stateName, stateValue, optional eventData) public override void OnUpdate(StateManager stateManager, BaseEventData eventData) { bool keyPressed = stateManager.GetState(StateName).Value > 0; // If the state was set to on, then invoke the event if (keyPressed) { onKKeyPressed.Invoke(); } } } }
mit
C#
2c1f4d0b306aec3a95670b83d283be65b340f2fe
Convert search term to lower case on user search
erooijak/oogstplanner,erooijak/oogstplanner,erooijak/oogstplanner,erooijak/oogstplanner
Oogstplanner.Data/UserRepository.cs
Oogstplanner.Data/UserRepository.cs
using System.Linq; using System.Collections.Generic; using Oogstplanner.Common; using Oogstplanner.Models; namespace Oogstplanner.Data { public class UserRepository : EntityFrameworkRepository<User>, IUserRepository { public UserRepository(IOogstplannerContext db) : base(db) { } public User GetUserByUserName(string name) { var user = DbSet.SingleOrDefault(u => u.Name == name); if (user == null) { throw new UserNotFoundException("The user with the specified name does not exist."); } return user; } public int GetUserIdByEmail(string email) { var user = DbSet.SingleOrDefault(u => u.Email == email); if (user == null) { throw new UserNotFoundException("The user with the specified email does not exist."); } return user.Id; } public int GetUserIdByName(string name) { var user = DbSet.SingleOrDefault(u => u.Name == name); if (user == null) { throw new UserNotFoundException("The user with the specified name does not exist."); } return user.Id; } public IEnumerable<User> GetRecentlyActiveUsers(int count) { return DbSet.Where(u => u.AuthenticationStatus == AuthenticatedStatus.Authenticated) .OrderByDescending(u => u.LastActive).Take(count).ToList(); } public IEnumerable<User> SearchUsers(string searchTerm) { searchTerm = searchTerm.ToLower(); return DbSet.Where(u => u.AuthenticationStatus == AuthenticatedStatus.Authenticated && (u.Name.ToLower().Contains(searchTerm) || u.FullName.ToLower().Contains(searchTerm))) .OrderByDescending(u => u.LastActive); } } }
using System.Linq; using System.Collections.Generic; using Oogstplanner.Common; using Oogstplanner.Models; namespace Oogstplanner.Data { public class UserRepository : EntityFrameworkRepository<User>, IUserRepository { public UserRepository(IOogstplannerContext db) : base(db) { } public User GetUserByUserName(string name) { var user = DbSet.SingleOrDefault(u => u.Name == name); if (user == null) { throw new UserNotFoundException("The user with the specified name does not exist."); } return user; } public int GetUserIdByEmail(string email) { var user = DbSet.SingleOrDefault(u => u.Email == email); if (user == null) { throw new UserNotFoundException("The user with the specified email does not exist."); } return user.Id; } public int GetUserIdByName(string name) { var user = DbSet.SingleOrDefault(u => u.Name == name); if (user == null) { throw new UserNotFoundException("The user with the specified name does not exist."); } return user.Id; } public IEnumerable<User> GetRecentlyActiveUsers(int count) { return DbSet.Where(u => u.AuthenticationStatus == AuthenticatedStatus.Authenticated) .OrderByDescending(u => u.LastActive).Take(count).ToList(); } public IEnumerable<User> SearchUsers(string searchTerm) { return DbSet.Where(u => u.AuthenticationStatus == AuthenticatedStatus.Authenticated && (u.Name.ToLower().Contains(searchTerm) || u.FullName.ToLower().Contains(searchTerm))) .OrderByDescending(u => u.LastActive); } } }
mit
C#
63aa2c11f25f0dde75ce64029e3db84aa5f628ff
Fix namespace-directory mismatch (#403)
DevExpress/DevExtreme.AspNet.Data,AlekseyMartynov/DevExtreme.AspNet.Data,AlekseyMartynov/DevExtreme.AspNet.Data,DevExpress/DevExtreme.AspNet.Data,AlekseyMartynov/DevExtreme.AspNet.Data,DevExpress/DevExtreme.AspNet.Data,DevExpress/DevExtreme.AspNet.Data,AlekseyMartynov/DevExtreme.AspNet.Data
net/DevExtreme.AspNet.Data/RemoteGrouping/RemoteAvgAggregator.cs
net/DevExtreme.AspNet.Data/RemoteGrouping/RemoteAvgAggregator.cs
using DevExtreme.AspNet.Data.Aggregation; using DevExtreme.AspNet.Data.Helpers; using DevExtreme.AspNet.Data.Types; using System; using System.Linq; namespace DevExtreme.AspNet.Data.RemoteGrouping { class RemoteAvgAggregator<T> : Aggregator<T> { Aggregator<T> _countAggregator; SumAggregator<T> _valueAggregator; public RemoteAvgAggregator(IAccessor<T> accessor) : base(accessor) { _countAggregator = new SumAggregator<T>(accessor); _valueAggregator = new SumAggregator<T>(accessor); } public override void Step(T container, string selector) { _countAggregator.Step(container, AnonType.IndexToField(1 + AnonType.FieldToIndex(selector))); _valueAggregator.Step(container, selector); } public override object Finish() { var count = Convert.ToInt32(_countAggregator.Finish()); if(count == 0) return null; var valueAccumulator = _valueAggregator.GetAccumulator(); valueAccumulator.Divide(count); return valueAccumulator.GetValue(); } } }
using DevExtreme.AspNet.Data.Helpers; using DevExtreme.AspNet.Data.Types; using System; using System.Linq; namespace DevExtreme.AspNet.Data.Aggregation { class RemoteAvgAggregator<T> : Aggregator<T> { Aggregator<T> _countAggregator; SumAggregator<T> _valueAggregator; public RemoteAvgAggregator(IAccessor<T> accessor) : base(accessor) { _countAggregator = new SumAggregator<T>(accessor); _valueAggregator = new SumAggregator<T>(accessor); } public override void Step(T container, string selector) { _countAggregator.Step(container, AnonType.IndexToField(1 + AnonType.FieldToIndex(selector))); _valueAggregator.Step(container, selector); } public override object Finish() { var count = Convert.ToInt32(_countAggregator.Finish()); if(count == 0) return null; var valueAccumulator = _valueAggregator.GetAccumulator(); valueAccumulator.Divide(count); return valueAccumulator.GetValue(); } } }
mit
C#
c54e2b57339b094a7e1849329f1deaaa2335ba0e
Update version number to 0.5.0.
beppler/trayleds
TrayLeds/Properties/AssemblyInfo.cs
TrayLeds/Properties/AssemblyInfo.cs
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("TrayLeds")] [assembly: AssemblyDescription("Tray Notification Leds")] [assembly: AssemblyProduct("TrayLeds")] [assembly: AssemblyCopyright("Copyright © 2017 Carlos Alberto Costa Beppler")] // Setting ComVisible to false makes the types in this assembly not visible // to COM components. If you need to access a type in this assembly from // COM, set the ComVisible attribute to true on that type. [assembly: ComVisible(false)] // The following GUID is for the ID of the typelib if this project is exposed to COM [assembly: Guid("eecfb156-872b-498d-9a01-42d37066d3d4")] // Version information for an assembly consists of the following four values: // // Major Version // Minor Version // Build Number // Revision // // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] [assembly: AssemblyVersion("0.5.0.0")] [assembly: AssemblyFileVersion("0.5.0.0")]
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("TrayLeds")] [assembly: AssemblyDescription("Tray Notification Leds")] [assembly: AssemblyProduct("TrayLeds")] [assembly: AssemblyCopyright("Copyright © 2017 Carlos Alberto Costa Beppler")] // Setting ComVisible to false makes the types in this assembly not visible // to COM components. If you need to access a type in this assembly from // COM, set the ComVisible attribute to true on that type. [assembly: ComVisible(false)] // The following GUID is for the ID of the typelib if this project is exposed to COM [assembly: Guid("eecfb156-872b-498d-9a01-42d37066d3d4")] // Version information for an assembly consists of the following four values: // // Major Version // Minor Version // Build Number // Revision // // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] [assembly: AssemblyVersion("0.4.1.0")] [assembly: AssemblyFileVersion("0.4.1.0")]
mit
C#
dbead4dfbed42350f8dc61f6170b8728700be54d
Make it harder to accidentally reset prod database
ucdavis/Anlab,ucdavis/Anlab,ucdavis/Anlab,ucdavis/Anlab
Anlab.Mvc/Controllers/SystemController.cs
Anlab.Mvc/Controllers/SystemController.cs
using System; using AnlabMvc.Models.Roles; using AnlabMvc.Services; using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Mvc; using System.Threading.Tasks; namespace AnlabMvc.Controllers { [Authorize(Roles = RoleCodes.Admin)] public class SystemController : ApplicationController { private readonly IDbInitializationService _dbInitializationService; public SystemController(IDbInitializationService dbInitializationService) { _dbInitializationService = dbInitializationService; } #if DEBUG public Task<IActionResult> ResetDb() { throw new NotImplementedException("Only enable this when working against a local database."); // await _dbInitializationService.RecreateAndInitialize(); // return RedirectToAction("LogoutDirect", "Account"); } #else public Task<IActionResult> ResetDb() { throw new NotImplementedException("WHAT!!! Don't reset DB in Release!"); } #endif } }
using System; using AnlabMvc.Models.Roles; using AnlabMvc.Services; using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Mvc; using System.Threading.Tasks; namespace AnlabMvc.Controllers { [Authorize(Roles = RoleCodes.Admin)] public class SystemController : ApplicationController { private readonly IDbInitializationService _dbInitializationService; public SystemController(IDbInitializationService dbInitializationService) { _dbInitializationService = dbInitializationService; } #if DEBUG public async Task<IActionResult> ResetDb() { await _dbInitializationService.RecreateAndInitialize(); return RedirectToAction("LogoutDirect", "Account"); } #else public Task<IActionResult> ResetDb() { throw new NotImplementedException("WHAT!!! Don't reset DB in Release!"); } #endif } }
mit
C#
cfec20bbe3db1240c172926f7dc5c9f80905dd63
Update IAction.cs
wieslawsoltes/AvaloniaBehaviors,wieslawsoltes/AvaloniaBehaviors
src/Avalonia.Xaml.Interactivity/IAction.cs
src/Avalonia.Xaml.Interactivity/IAction.cs
// Copyright (c) Wiesław Šoltés. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. namespace Avalonia.Xaml.Interactivity { /// <summary> /// Interface implemented by all custom actions. /// </summary> public interface IAction { /// <summary> /// Executes the action. /// </summary> /// <param name="sender">The <see cref="object"/> that is passed to the action by the behavior. Generally this is <seealso cref="IBehavior.AssociatedObject"/> or a target object.</param> /// <param name="parameter">The value of this parameter is determined by the caller.</param> /// <remarks> An example of parameter usage is EventTriggerBehavior, which passes the EventArgs as a parameter to its actions.</remarks> /// <returns>Returns the result of the action.</returns> object? Execute(object sender, object parameter); } }
// Copyright (c) Wiesław Šoltés. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. namespace Avalonia.Xaml.Interactivity { /// <summary> /// Interface implemented by all custom actions. /// </summary> public interface IAction { /// <summary> /// Executes the action. /// </summary> /// <param name="sender">The <see cref="object"/> that is passed to the action by the behavior. Generally this is <seealso cref="IBehavior.AssociatedObject"/> or a target object.</param> /// <param name="parameter">The value of this parameter is determined by the caller.</param> /// <remarks> An example of parameter usage is EventTriggerBehavior, which passes the EventArgs as a parameter to its actions.</remarks> /// <returns>Returns the result of the action.</returns> object Execute(object sender, object parameter); } }
mit
C#
ee384edd7420aa0b3fbbd1d594a2c762e133c946
Use UTC dates for CircuitBreaker for invariance.
Whiteknight/Acquaintance,Whiteknight/Acquaintance
Acquaintance/Utility/CircuitBreaker.cs
Acquaintance/Utility/CircuitBreaker.cs
using System; using System.Threading; namespace Acquaintance.Utility { // TODO: Mode where we count the number of failures in the last N requests // TODO: Mode where we count the number of failures in the last unit of time public class CircuitBreaker { private readonly int _breakMs; private readonly int _maxFailedRequests; private volatile int _failedRequests; private long _restartTime; public CircuitBreaker(int breakMs, int maxFailedRequests) { _breakMs = breakMs; _maxFailedRequests = maxFailedRequests; _failedRequests = 0; } public bool CanProceed() { if (_failedRequests < _maxFailedRequests) return true; var restartTime = Interlocked.Read(ref _restartTime); if (DateTime.UtcNow.Ticks >= restartTime) { _failedRequests = 0; return true; } return false; } public void RecordResult(bool success) { if (success) { _failedRequests = 0; return; } var failedRequests = Interlocked.Increment(ref _failedRequests); if (failedRequests >= _maxFailedRequests) _restartTime = DateTime.UtcNow.AddMilliseconds(_breakMs).Ticks; } } }
using System; using System.Threading; namespace Acquaintance.Utility { public class CircuitBreaker { private readonly int _breakMs; private readonly int _maxFailedRequests; private volatile int _failedRequests; private long _restartTime; public CircuitBreaker(int breakMs, int maxFailedRequests) { _breakMs = breakMs; _maxFailedRequests = maxFailedRequests; _failedRequests = 0; } public bool CanProceed() { if (_failedRequests < _maxFailedRequests) return true; var restartTime = Interlocked.Read(ref _restartTime); if (DateTime.Now.Ticks >= restartTime) { _failedRequests = 0; return true; } return false; } public void RecordResult(bool success) { if (success) { _failedRequests = 0; return; } var failedRequests = Interlocked.Increment(ref _failedRequests); if (failedRequests >= _maxFailedRequests) _restartTime = DateTime.Now.AddMilliseconds(_breakMs).Ticks; } } }
apache-2.0
C#
2d81ea9aa0d375fa2c31ee552c7cca36c7362c24
fix to create directory if not exists
WojcikMike/docs.particular.net
samples/custom-transport/Version_6/Shared/Dispatcher.cs
samples/custom-transport/Version_6/Shared/Dispatcher.cs
using System; using System.Collections.Generic; using System.IO; using System.Threading.Tasks; using NServiceBus.Extensibility; using NServiceBus.Transports; #region Dispatcher class Dispatcher : IDispatchMessages { public Task Dispatch(TransportOperations outgoingMessages, ContextBag context) { foreach (UnicastTransportOperation transportOperation in outgoingMessages.UnicastTransportOperations) { string basePath = BaseDirectoryBuilder.BuildBasePath(transportOperation.Destination); string nativeMessageId = Guid.NewGuid().ToString(); string bodyPath = Path.Combine(basePath, ".bodies", nativeMessageId) + ".xml"; var dir = Path.GetDirectoryName(bodyPath); if (!Directory.Exists(dir)) Directory.CreateDirectory(dir); File.WriteAllBytes(bodyPath, transportOperation.Message.Body); List<string> messageContents = new List<string> { bodyPath, HeaderSerializer.Serialize(transportOperation.Message.Headers) }; DirectoryBasedTransaction transaction; string messagePath = Path.Combine(basePath, nativeMessageId) + ".txt"; if (transportOperation.RequiredDispatchConsistency != DispatchConsistency.Isolated && context.TryGet(out transaction)) { transaction.Enlist(messagePath, messageContents); } else { string tempFile = Path.GetTempFileName(); //write to temp file first so we can do a atomic move //this avoids the file being locked when the receiver tries to process it File.WriteAllLines(tempFile, messageContents); File.Move(tempFile, messagePath); } } return TaskEx.CompletedTask; } } #endregion
using System; using System.Collections.Generic; using System.IO; using System.Threading.Tasks; using NServiceBus.Extensibility; using NServiceBus.Transports; #region Dispatcher class Dispatcher : IDispatchMessages { public Task Dispatch(TransportOperations outgoingMessages, ContextBag context) { foreach (UnicastTransportOperation transportOperation in outgoingMessages.UnicastTransportOperations) { string basePath = BaseDirectoryBuilder.BuildBasePath(transportOperation.Destination); string nativeMessageId = Guid.NewGuid().ToString(); string bodyPath = Path.Combine(basePath, ".bodies", nativeMessageId) + ".xml"; File.WriteAllBytes(bodyPath, transportOperation.Message.Body); List<string> messageContents = new List<string> { bodyPath, HeaderSerializer.Serialize(transportOperation.Message.Headers) }; DirectoryBasedTransaction transaction; string messagePath = Path.Combine(basePath, nativeMessageId) + ".txt"; if (transportOperation.RequiredDispatchConsistency != DispatchConsistency.Isolated && context.TryGet(out transaction)) { transaction.Enlist(messagePath, messageContents); } else { string tempFile = Path.GetTempFileName(); //write to temp file first so we can do a atomic move //this avoids the file being locked when the receiver tries to process it File.WriteAllLines(tempFile, messageContents); File.Move(tempFile, messagePath); } } return TaskEx.CompletedTask; } } #endregion
apache-2.0
C#
32fe8a44812205c2cd4504cfb151f0389f9b5db2
Use HTML helper extension method for outputting an <input type="hidden"/> element
stevehodgkiss/restful-routing,restful-routing/restful-routing,restful-routing/restful-routing,restful-routing/restful-routing,stevehodgkiss/restful-routing,stevehodgkiss/restful-routing
src/RestfulRouting/HtmlHelperExtensions.cs
src/RestfulRouting/HtmlHelperExtensions.cs
using System.Web.Mvc; using System.Web.Mvc.Html; namespace RestfulRouting { public static class HtmlHelperExtensions { public static MvcHtmlString PutOverrideTag(this HtmlHelper html) { return html.Hidden("_method", "put"); } public static MvcHtmlString DeleteOverrideTag(this HtmlHelper html) { return html.Hidden("_method", "delete"); } } }
using System.Web.Mvc; namespace RestfulRouting { public static class HtmlHelperExtensions { public static MvcHtmlString PutOverrideTag(this HtmlHelper html) { return MvcHtmlString.Create("<input type=\"hidden\" name=\"_method\" value=\"put\" />"); } public static MvcHtmlString DeleteOverrideTag(this HtmlHelper html) { return MvcHtmlString.Create("<input type=\"hidden\" name=\"_method\" value=\"delete\" />"); } } }
mit
C#
93bbfbe05f582f9b4e12dd8c8e3243b9153c8c67
Downgrade version to 0.6.0 again -- only update version upon actual release
electroly/sqlnotebook,electroly/sqlnotebook,electroly/sqlnotebook
src/SqlNotebook/Properties/AssemblyInfo.cs
src/SqlNotebook/Properties/AssemblyInfo.cs
using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; // General Information about an assembly is controlled through the following // set of attributes. Change these attribute values to modify the information // associated with an assembly. [assembly: AssemblyTitle("SQL Notebook")] [assembly: AssemblyDescription("")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("")] [assembly: AssemblyProduct("SQL Notebook")] [assembly: AssemblyCopyright("Copyright © 2016 Brian Luft")] [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] // Setting ComVisible to false makes the types in this assembly not visible // to COM components. If you need to access a type in this assembly from // COM, set the ComVisible attribute to true on that type. [assembly: ComVisible(false)] // The following GUID is for the ID of the typelib if this project is exposed to COM [assembly: Guid("4766090d-0e56-4a24-bde7-3f9fb8d37c80")] // Version information for an assembly consists of the following four values: // // Major Version // Minor Version // Build Number // Revision // // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] [assembly: AssemblyVersion("1.0.0.0")] // this is Application.ProductVersion [assembly: AssemblyFileVersion("0.6.0")]
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("SQL Notebook")] [assembly: AssemblyDescription("")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("")] [assembly: AssemblyProduct("SQL Notebook")] [assembly: AssemblyCopyright("Copyright © 2016 Brian Luft")] [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] // Setting ComVisible to false makes the types in this assembly not visible // to COM components. If you need to access a type in this assembly from // COM, set the ComVisible attribute to true on that type. [assembly: ComVisible(false)] // The following GUID is for the ID of the typelib if this project is exposed to COM [assembly: Guid("4766090d-0e56-4a24-bde7-3f9fb8d37c80")] // Version information for an assembly consists of the following four values: // // Major Version // Minor Version // Build Number // Revision // // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] [assembly: AssemblyVersion("1.0.0.0")] // this is Application.ProductVersion [assembly: AssemblyFileVersion("0.7.0")]
mit
C#
d329714521d395c496dec0adad34fa04c465e9ce
Bump version
canton7/SyncTrayzor,canton7/SyncTrayzor,canton7/SyncTrayzor
src/SyncTrayzor/Properties/AssemblyInfo.cs
src/SyncTrayzor/Properties/AssemblyInfo.cs
using System.Reflection; using System.Resources; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; using System.Windows; // 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("SyncTrayzor")] [assembly: AssemblyDescription("")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("")] [assembly: AssemblyProduct("SyncTrayzor")] [assembly: AssemblyCopyright("Copyright © Antony Male 2015")] [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] // Setting ComVisible to false makes the types in this assembly not visible // to COM components. If you need to access a type in this assembly from // COM, set the ComVisible attribute to true on that type. [assembly: ComVisible(false)] //In order to begin building localizable applications, set //<UICulture>CultureYouAreCodingWith</UICulture> in your .csproj file //inside a <PropertyGroup>. For example, if you are using US english //in your source files, set the <UICulture> to en-US. Then uncomment //the NeutralResourceLanguage attribute below. Update the "en-US" in //the line below to match the UICulture setting in the project file. //[assembly: NeutralResourcesLanguage("en-US", UltimateResourceFallbackLocation.Satellite)] [assembly: ThemeInfo( ResourceDictionaryLocation.None, //where theme specific resource dictionaries are located //(used if a resource is not found in the page, // or application resource dictionaries) ResourceDictionaryLocation.SourceAssembly //where the generic resource dictionary is located //(used if a resource is not found in the page, // app, or any theme specific resource dictionaries) )] // Version information for an assembly consists of the following four values: // // Major Version // Minor Version // Build Number // Revision // // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] [assembly: AssemblyVersion("1.0.1.0")] [assembly: AssemblyFileVersion("1.0.1.0")]
using System.Reflection; using System.Resources; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; using System.Windows; // 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("SyncTrayzor")] [assembly: AssemblyDescription("")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("")] [assembly: AssemblyProduct("SyncTrayzor")] [assembly: AssemblyCopyright("Copyright © Antony Male 2015")] [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] // Setting ComVisible to false makes the types in this assembly not visible // to COM components. If you need to access a type in this assembly from // COM, set the ComVisible attribute to true on that type. [assembly: ComVisible(false)] //In order to begin building localizable applications, set //<UICulture>CultureYouAreCodingWith</UICulture> in your .csproj file //inside a <PropertyGroup>. For example, if you are using US english //in your source files, set the <UICulture> to en-US. Then uncomment //the NeutralResourceLanguage attribute below. Update the "en-US" in //the line below to match the UICulture setting in the project file. //[assembly: NeutralResourcesLanguage("en-US", UltimateResourceFallbackLocation.Satellite)] [assembly: ThemeInfo( ResourceDictionaryLocation.None, //where theme specific resource dictionaries are located //(used if a resource is not found in the page, // or application resource dictionaries) ResourceDictionaryLocation.SourceAssembly //where the generic resource dictionary is located //(used if a resource is not found in the page, // app, or any theme specific resource dictionaries) )] // Version information for an assembly consists of the following four values: // // Major Version // Minor Version // Build Number // Revision // // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] [assembly: AssemblyVersion("1.0.0.0")] [assembly: AssemblyFileVersion("1.0.0.0")]
mit
C#
d6aae8084cfb49dbc4dc286d5ad14882df08f394
configure services ordering from Populate-method in Maestro.Microsoft.DependencyInjection
JonasSamuelsson/Maestro
src/Maestro.Microsoft.DependencyInjection/Extensions.cs
src/Maestro.Microsoft.DependencyInjection/Extensions.cs
using System; using System.Collections.Generic; using Maestro.Configuration; using Microsoft.Extensions.DependencyInjection; namespace Maestro.Microsoft.DependencyInjection { public static class Extensions { /// <summary> /// Populates the container using the specified service descriptors. /// </summary> /// <remarks> /// This method should only be called once per container. /// </remarks> /// <param name="container">The container.</param> /// <param name="descriptors">The service descriptors.</param> public static void Populate(this IContainer container, IEnumerable<ServiceDescriptor> descriptors) { container.Configure(x => { x.Config.GetServicesOrder = GetServicesOrder.Ordered; x.For<IServiceProvider>().Use.Instance(new MaestroServiceProvider(container)); foreach (var descriptor in descriptors) { x.Register(descriptor); } }); } private static void Register(this IContainerExpression containerExpression, ServiceDescriptor descriptor) { if (descriptor.ImplementationType != null) { containerExpression.For(descriptor.ServiceType) .Use.Type(descriptor.ImplementationType) .Lifetime.Use(descriptor.Lifetime); return; } if (descriptor.ImplementationFactory != null) { containerExpression.For(descriptor.ServiceType) .Use.Factory(GetFactory(descriptor)) .Lifetime.Use(descriptor.Lifetime); return; } containerExpression.For(descriptor.ServiceType) .Use.Instance(descriptor.ImplementationInstance); } private static void Use<T>(this ILifetimeSelector<T> expression, ServiceLifetime descriptorLifetime) { switch (descriptorLifetime) { case ServiceLifetime.Singleton: expression.Singleton(); break; case ServiceLifetime.Scoped: expression.Scoped(); break; case ServiceLifetime.Transient: expression.Transient(); break; default: throw new ArgumentOutOfRangeException(nameof(descriptorLifetime), descriptorLifetime, null); } } private static Func<IContext, object> GetFactory(ServiceDescriptor descriptor) { return context => descriptor.ImplementationFactory(context.GetService<IServiceProvider>()); } } }
using System; using System.Collections.Generic; using Maestro.Configuration; using Microsoft.Extensions.DependencyInjection; namespace Maestro.Microsoft.DependencyInjection { public static class Extensions { /// <summary> /// Populates the container using the specified service descriptors. /// </summary> /// <remarks> /// This method should only be called once per container. /// </remarks> /// <param name="container">The container.</param> /// <param name="descriptors">The service descriptors.</param> public static void Populate(this IContainer container, IEnumerable<ServiceDescriptor> descriptors) { container.Configure(x => { x.For<IServiceProvider>().Use.Instance(new MaestroServiceProvider(container)); foreach (var descriptor in descriptors) { x.Register(descriptor); } }); } private static void Register(this IContainerExpression containerExpression, ServiceDescriptor descriptor) { if (descriptor.ImplementationType != null) { containerExpression.For(descriptor.ServiceType) .Use.Type(descriptor.ImplementationType) .Lifetime.Use(descriptor.Lifetime); return; } if (descriptor.ImplementationFactory != null) { containerExpression.For(descriptor.ServiceType) .Use.Factory(GetFactory(descriptor)) .Lifetime.Use(descriptor.Lifetime); return; } containerExpression.For(descriptor.ServiceType) .Use.Instance(descriptor.ImplementationInstance); } private static void Use<T>(this ILifetimeSelector<T> expression, ServiceLifetime descriptorLifetime) { switch (descriptorLifetime) { case ServiceLifetime.Singleton: expression.Singleton(); break; case ServiceLifetime.Scoped: expression.Scoped(); break; case ServiceLifetime.Transient: expression.Transient(); break; default: throw new ArgumentOutOfRangeException(nameof(descriptorLifetime), descriptorLifetime, null); } } private static Func<IContext, object> GetFactory(ServiceDescriptor descriptor) { return context => descriptor.ImplementationFactory(context.GetService<IServiceProvider>()); } } }
mit
C#
802ea221bde2a2aa96511add6f5bbb69bdbc0021
Put name on top
PoESkillTree/PoESkillTree,Ttxman/PoESkillTree,mihailim/PoESkillTree,nikibobi/PoESkillTree,brather1ng/PoESkillTree,EmmittJ/PoESkillTree,BlueManiac/PoESkillTreeSource,l0g0sys/PoESkillTree,Yskuma/PoESkillTree,MLanghof/PoESkillTree
WPFSKillTree/ViewModels/PoEBuild.cs
WPFSKillTree/ViewModels/PoEBuild.cs
using System.Xml.Serialization; namespace POESKillTree.ViewModels { public class PoEBuild { public string Name { get; set; } public string Class { get; set; } public string PointsUsed { get; set; } public string Url { get; set; } public string Note { get; set; } [XmlIgnoreAttribute] public string Description {get { return Class + ", " + PointsUsed + " points used"; }} public PoEBuild() { } public PoEBuild(string name, string poeClass, string pointsUsed, string url, string note) { Name = name; Class = poeClass; PointsUsed = pointsUsed; Url = url; Note = note; } public override string ToString() { return Name + '\n' + Description; } } }
using System.Xml.Serialization; namespace POESKillTree.ViewModels { public class PoEBuild { public string Class { get; set; } public string PointsUsed { get; set; } public string Name { get; set; } public string Url { get; set; } public string Note { get; set; } [XmlIgnoreAttribute] public string Description {get { return Class + ", " + PointsUsed + " points used"; }} public PoEBuild() { } public PoEBuild(string name, string poeClass, string pointsUsed, string url, string note) { Name = name; Class = poeClass; PointsUsed = pointsUsed; Url = url; Note = note; } public override string ToString() { return Name + '\n' + Description; } } }
mit
C#
63468dc29f9b2182ab2a87b228b51a6e90b3a715
Add check for path to PHP dir on build agent
rmunn/lfmerge-autosrtests,rmunn/lfmerge-autosrtests
LfMerge.AutomatedSRTests/LfMergeHelper.cs
LfMerge.AutomatedSRTests/LfMergeHelper.cs
// Copyright (c) 2017 SIL International // This software is licensed under the MIT License (http://opensource.org/licenses/MIT) using System; using System.Diagnostics; using System.IO; using Palaso.IO; namespace LfMerge.AutomatedSRTests { public static class LfMergeHelper { public static string BaseDir => Path.Combine(Directories.TempDir, "BaseDir"); private static bool VerifyPhpDir(string dir) { return File.Exists(Path.Combine(dir, "Api/Library/Shared/CLI/cliConfig.php")) && File.Exists(Path.Combine(dir, "vendor/autoload.php")); } private static string CheckPhpDir(string candidate) { return VerifyPhpDir(candidate) ? candidate : null; } private static void WriteTestSettingsFile() { var phpSourceDir = CheckPhpDir("/var/www/virtual/languageforge.org/htdocs") ?? CheckPhpDir("/var/www/virtual/languageforge.org/htdocs") ?? CheckPhpDir("/var/www/languageforge.org_dev/htdocs") ?? Path.Combine(Directories.DataDir, "php", "src"); if (!VerifyPhpDir(phpSourceDir)) { Console.WriteLine("Can't find 'Api/Library/Shared/CLI/cliConfig.php' or 'vendor/autoload.php'" + " in any of the directories ['/var/www/virtual/languageforge.org/htdocs', " + "'/var/www/virtual/languageforge.org/htdocs', '{0}']", phpSourceDir); } Directory.CreateDirectory(BaseDir); var mongoHostName = Environment.GetEnvironmentVariable("MongoHostName") ?? "localhost"; var mongoPort = Environment.GetEnvironmentVariable("MongoPort") ?? "27017"; var settings = $@" BaseDir = {BaseDir} WebworkDir = webwork TemplatesDir = Templates MongoHostname = {mongoHostName} MongoPort = {mongoPort} MongoMainDatabaseName = scriptureforge MongoDatabaseNamePrefix = sf_ VerboseProgress = false PhpSourcePath = {phpSourceDir} LanguageDepotRepoUri = {LanguageDepotHelper.LdDirectory} "; var configFile = Path.Combine(Directories.TempDir, "sendreceive.conf"); File.WriteAllText(configFile, settings); } public static void Run(string args) { WriteTestSettingsFile(); using (var process = new Process()) { process.StartInfo.UseShellExecute = false; process.StartInfo.CreateNoWindow = true; process.StartInfo.FileName = Path.Combine(FileLocator.DirectoryOfApplicationOrSolution, "lfmerge"); process.StartInfo.Arguments = args + $" --config \"{Directories.TempDir}\""; process.StartInfo.RedirectStandardOutput = true; Console.WriteLine($"Executing: {process.StartInfo.FileName} {process.StartInfo.Arguments}"); process.Start(); Console.WriteLine("Output: {0}", process.StandardOutput.ReadToEnd()); process.WaitForExit(); if (process.ExitCode != 0) { throw new ApplicationException($"Running 'lfmerge {args}' returned {process.ExitCode}"); } } } } }
// Copyright (c) 2017 SIL International // This software is licensed under the MIT License (http://opensource.org/licenses/MIT) using System; using System.Diagnostics; using System.IO; using Palaso.IO; namespace LfMerge.AutomatedSRTests { public static class LfMergeHelper { public static string BaseDir => Path.Combine(Directories.TempDir, "BaseDir"); private static bool VerifyPhpDir(string dir) { return File.Exists(Path.Combine(dir, "Api/Library/Shared/CLI/cliConfig.php")) && File.Exists(Path.Combine(dir, "vendor/autoload.php")); } private static string CheckPhpDir(string candidate) { return VerifyPhpDir(candidate) ? candidate : null; } private static void WriteTestSettingsFile() { var phpSourceDir = CheckPhpDir("/var/www/virtual/languageforge.org/htdocs") ?? CheckPhpDir("/var/www/virtual/languageforge.org/htdocs") ?? Path.Combine(Directories.DataDir, "php", "src"); if (!VerifyPhpDir(phpSourceDir)) { Console.WriteLine("Can't find 'Api/Library/Shared/CLI/cliConfig.php' or 'vendor/autoload.php'" + " in any of the directories ['/var/www/virtual/languageforge.org/htdocs', " + "'/var/www/virtual/languageforge.org/htdocs', '{0}']", phpSourceDir); } Directory.CreateDirectory(BaseDir); var mongoHostName = Environment.GetEnvironmentVariable("MongoHostName") ?? "localhost"; var mongoPort = Environment.GetEnvironmentVariable("MongoPort") ?? "27017"; var settings = $@" BaseDir = {BaseDir} WebworkDir = webwork TemplatesDir = Templates MongoHostname = {mongoHostName} MongoPort = {mongoPort} MongoMainDatabaseName = scriptureforge MongoDatabaseNamePrefix = sf_ VerboseProgress = false PhpSourcePath = {phpSourceDir} LanguageDepotRepoUri = {LanguageDepotHelper.LdDirectory} "; var configFile = Path.Combine(Directories.TempDir, "sendreceive.conf"); File.WriteAllText(configFile, settings); } public static void Run(string args) { WriteTestSettingsFile(); using (var process = new Process()) { process.StartInfo.UseShellExecute = false; process.StartInfo.CreateNoWindow = true; process.StartInfo.FileName = Path.Combine(FileLocator.DirectoryOfApplicationOrSolution, "lfmerge"); process.StartInfo.Arguments = args + $" --config \"{Directories.TempDir}\""; process.StartInfo.RedirectStandardOutput = true; Console.WriteLine($"Executing: lfmerge {process.StartInfo.Arguments}"); process.Start(); Console.WriteLine("Output: {0}", process.StandardOutput.ReadToEnd()); process.WaitForExit(); if (process.ExitCode != 0) { throw new ApplicationException($"Running 'lfmerge {args}' returned {process.ExitCode}"); } } } } }
mit
C#
bcbe3bbd0e05efb413bf493ceaeaa78075e8ce2a
Update AeroListView.cs
stefan-baumann/AeroSuite
AeroSuite/Controls/AeroListView.cs
AeroSuite/Controls/AeroListView.cs
using System; using System.Collections.Generic; using System.ComponentModel; using System.Drawing; using System.Linq; using System.Text; using System.Windows.Forms; namespace AeroSuite.Controls { /// <summary> /// An aero-styled ListView. /// </summary> /// <remarks> /// A ListView with the "Explorer"-WindowTheme applied. /// If the operating system is Windows XP or older, nothing will be changed. /// </remarks> [DesignerCategory("Code")] [DisplayName("Aero ListView")] [Description("An aero-styled ListView.")] [ToolboxItem(true)] [ToolboxBitmap(typeof(ListView))] public class AeroListView : ListView { private const int LVS_EX_DOUBLEBUFFER = 0x10000; private const int LVM_SETEXTENDEDLISTVIEWSTYLE = 4150; /// <summary> /// Initializes a new instance of the <see cref="AeroListView"/> class. /// </summary> public AeroListView() : base() { this.FullRowSelect = true; } /// <summary> /// Raises the <see cref="E:HandleCreated" /> event. /// </summary> /// <param name="e">The <see cref="EventArgs"/> instance containing the event data.</param> protected override void OnHandleCreated(EventArgs e) { base.OnHandleCreated(e); if (PlatformHelper.VistaOrHigher) { NativeMethods.SetWindowTheme(this.Handle, "explorer", null); NativeMethods.SendMessage(this.Handle, LVM_SETEXTENDEDLISTVIEWSTYLE, new IntPtr(LVS_EX_DOUBLEBUFFER), new IntPtr(LVS_EX_DOUBLEBUFFER)); } } } }
using System; using System.Collections.Generic; using System.ComponentModel; using System.Drawing; using System.Linq; using System.Text; using System.Windows.Forms; namespace AeroSuite.Controls { /// <summary> /// An aero-styled ListView. /// </summary> /// <remarks> /// A ListView with the "Explorer"-WindowTheme applied and. /// If the operating system is Windows XP or older, nothing will be changed. /// </remarks> [DesignerCategory("Code")] [DisplayName("Aero ListView")] [Description("An aero-styled ListView.")] [ToolboxItem(true)] [ToolboxBitmap(typeof(ListView))] public class AeroListView : ListView { private const int LVS_EX_DOUBLEBUFFER = 0x10000; private const int LVM_SETEXTENDEDLISTVIEWSTYLE = 4150; /// <summary> /// Initializes a new instance of the <see cref="AeroListView"/> class. /// </summary> public AeroListView() : base() { this.FullRowSelect = true; } /// <summary> /// Raises the <see cref="E:HandleCreated" /> event. /// </summary> /// <param name="e">The <see cref="EventArgs"/> instance containing the event data.</param> protected override void OnHandleCreated(EventArgs e) { base.OnHandleCreated(e); if (PlatformHelper.VistaOrHigher) { NativeMethods.SetWindowTheme(this.Handle, "explorer", null); NativeMethods.SendMessage(this.Handle, LVM_SETEXTENDEDLISTVIEWSTYLE, new IntPtr(LVS_EX_DOUBLEBUFFER), new IntPtr(LVS_EX_DOUBLEBUFFER)); } } } }
mit
C#
a43b53d77dcdafd806eee7ed90716a77dc2d73c4
change tab size
Voxelgon/Voxelgon,Voxelgon/Voxelgon
Assets/Plugins/Voxelgon/Manager.cs
Assets/Plugins/Voxelgon/Manager.cs
using UnityEngine; using System.Collections; namespace Voxelgon { public class Manager : MonoBehaviour { public void Start() { Voxelgon.Asset.Import(); } } }
using UnityEngine; using System.Collections; namespace Voxelgon { public class Manager : MonoBehaviour { public void Start() { Voxelgon.Asset.Import(); } } }
apache-2.0
C#
0261c8de6cb5b71206d4eae5a8541efb55599872
Change Paddle direction to a float.
dirty-casuals/LD38-A-Small-World
Assets/Scripts/PaddleController.cs
Assets/Scripts/PaddleController.cs
using UnityEngine; public class PaddleController : MonoBehaviour { [SerializeField] private float _speed; [SerializeField] private Planet _planet; [SerializeField] private float _orbitAngle; [SerializeField] private float _orbitDistance; [SerializeField, Range( -1, 1 )] private float _direction = 0; public float Speed { get { return _speed; } set { _speed = value; } } public float Direction { get { return _direction; } set { _direction = Mathf.Clamp( value, -1, 1 ) }; } public Planet Planet { get { return _planet; } set { _planet = value; } } public float OrbitAngle { get { return _orbitAngle; } private set { _orbitAngle = value; } } public float OrbitDistance { get { return _orbitDistance; } set { _orbitDistance = value; } } private void FixedUpdate() { float anglePerSecond = Speed / Planet.Permieter * Direction; float deltaAngle = Time.fixedDeltaTime * anglePerSecond; OrbitAngle += deltaAngle; Vector3 targetPosition, targetFacing; Planet.SampleOrbit2D( OrbitAngle, OrbitDistance, out targetPosition, out targetFacing ); transform.forward = targetFacing; transform.position = targetPosition; } }
using UnityEngine; public class PaddleController : MonoBehaviour { [SerializeField] private float _speed; [SerializeField] private Planet _planet; [SerializeField] private float _orbitAngle; [SerializeField] private float _orbitDistance; public enum MoveDirection { Left = -1, None = 0, Right = 1, } public float Speed { get { return _speed; } set { _speed = value; } } public MoveDirection Direction { get; set; } public Planet Planet { get { return _planet; } set { _planet = value; } } public float OrbitAngle { get { return _orbitAngle; } private set { _orbitAngle = value; } } public float OrbitDistance { get { return _orbitDistance; } set { _orbitDistance = value; } } private void FixedUpdate() { int direction = (int) Direction; float anglePerSecond = Speed / Planet.Permieter * direction; float deltaAngle = Time.fixedDeltaTime * anglePerSecond; OrbitAngle += deltaAngle; Vector3 targetPosition, targetFacing; Planet.SampleOrbit2D( OrbitAngle, OrbitDistance, out targetPosition, out targetFacing ); transform.forward = targetFacing; transform.position = targetPosition; } }
mit
C#
64e5b6603f3746e2b7ddbf2a0949c3517a86a918
Fix stack overflow in TestSceneDrawVisualiser (#2764)
smoogipooo/osu-framework,EVAST9919/osu-framework,peppy/osu-framework,EVAST9919/osu-framework,peppy/osu-framework,smoogipooo/osu-framework,ZLima12/osu-framework,peppy/osu-framework,ppy/osu-framework,ppy/osu-framework,EVAST9919/osu-framework,EVAST9919/osu-framework,ppy/osu-framework,ZLima12/osu-framework
osu.Framework.Tests/Visual/Testing/TestSceneDrawVisualiser.cs
osu.Framework.Tests/Visual/Testing/TestSceneDrawVisualiser.cs
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. using System; using System.Collections.Generic; using osu.Framework.Allocation; using osu.Framework.Graphics; using osu.Framework.Graphics.Visualisation; using osu.Framework.Input; using osu.Framework.Tests.Visual.Containers; using osuTK; namespace osu.Framework.Tests.Visual.Testing { public class TestSceneDrawVisualiser : FrameworkTestScene { public override IReadOnlyList<Type> RequiredTypes => new[] { typeof(TreeContainer), typeof(FlashyBox), typeof(IContainVisualisedDrawables), typeof(InfoOverlay), typeof(LogOverlay), typeof(PropertyDisplay), typeof(TitleBar), typeof(TreeContainer), typeof(TreeContainerStatus), typeof(VisualisedDrawable), typeof(ToolWindow) }; [BackgroundDependencyLoader] private void load() { DrawVisualiser vis; Drawable target; // Avoid stack-overflow scenarios by isolating the hovered drawables through a new input manager Child = new PassThroughInputManager { Children = new[] { target = new TestSceneDynamicDepth { Anchor = Anchor.BottomRight, Origin = Anchor.BottomRight, Size = new Vector2(0.5f) }, vis = new DrawVisualiser(), } }; vis.Show(); vis.Target = target; } } }
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. using System; using System.Collections.Generic; using osu.Framework.Allocation; using osu.Framework.Graphics; using osu.Framework.Graphics.Visualisation; using osu.Framework.Tests.Visual.Containers; using osuTK; namespace osu.Framework.Tests.Visual.Testing { public class TestSceneDrawVisualiser : FrameworkTestScene { public override IReadOnlyList<Type> RequiredTypes => new[] { typeof(TreeContainer), typeof(FlashyBox), typeof(IContainVisualisedDrawables), typeof(InfoOverlay), typeof(LogOverlay), typeof(PropertyDisplay), typeof(TitleBar), typeof(TreeContainer), typeof(TreeContainerStatus), typeof(VisualisedDrawable), typeof(ToolWindow) }; [BackgroundDependencyLoader] private void load() { DrawVisualiser vis; Drawable target; Children = new[] { target = new TestSceneDynamicDepth { Anchor = Anchor.BottomRight, Origin = Anchor.BottomRight, Size = new Vector2(0.5f) }, vis = new DrawVisualiser(), }; vis.Show(); vis.Target = target; } } }
mit
C#
9657e299084d8cb77e361f42a076221acebaf00a
Hide more documentation classes
chtoucas/Narvalo.NET,chtoucas/Narvalo.NET
src/Narvalo.Core/NamespaceDoc.cs
src/Narvalo.Core/NamespaceDoc.cs
// Copyright (c) 2014, Narvalo.Org. All rights reserved. See LICENSE.txt in the project root for license information. namespace Narvalo { #if DOCUMENTATION class NamespaceDoc { } #endif }
// Copyright (c) 2014, Narvalo.Org. All rights reserved. See LICENSE.txt in the project root for license information. namespace Narvalo { using System.Runtime.CompilerServices; [CompilerGeneratedAttribute] class NamespaceDoc { } }
bsd-2-clause
C#
f6efdb16d428144cd959e046a07c7fa052467f60
Add API to get a user's active consultations.
dhawalharsora/connectedcare-sdk,SnapMD/connectedcare-sdk
SnapMD.ConnectedCare.Sdk/EncountersApi.cs
SnapMD.ConnectedCare.Sdk/EncountersApi.cs
// Copyright 2015 SnapMD, Inc. // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // http://www.apache.org/licenses/LICENSE-2.0 // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. using System.Net; using SnapMD.ConnectedCare.ApiModels; using SnapMD.ConnectedCare.Sdk.Models; using SnapMD.ConnectedCare.Sdk.Wrappers; namespace SnapMD.ConnectedCare.Sdk { public class EncountersApi : ApiCall { public EncountersApi(string baseUrl, string bearerToken, string developerId, string apiKey) : base(baseUrl, new WebClientWrapper(new WebClient()), bearerToken, developerId, apiKey) { } public void UpdateIntakeQuestionnaire(int consultationId, object intakeData) { var url = string.Format("v2/patients/consultations/{0}/intake", consultationId); var result = Put(url, intakeData); } /// <summary> /// Gets a list of running consultations for the user whether the user is a clinician or a patient. /// There should be 0 or 1 results, but if there are more, this information can be used for /// debugging. /// </summary> /// <returns></returns> public ApiResponseV2<PatientConsultationInfo> GetUsersActiveConsultations() { const string url = "v2/consultations/running"; var result = MakeCall<ApiResponseV2<PatientConsultationInfo>>(url); return result; } } }
// Copyright 2015 SnapMD, Inc. // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // http://www.apache.org/licenses/LICENSE-2.0 // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. using System.Net; using SnapMD.ConnectedCare.Sdk.Wrappers; namespace SnapMD.ConnectedCare.Sdk { public class EncountersApi : ApiCall { public EncountersApi(string baseUrl, string bearerToken, string developerId, string apiKey) : base(baseUrl, new WebClientWrapper(new WebClient()), bearerToken, developerId, apiKey) { } public void UpdateIntakeQuestionnaire(int consultationId, object intakeData) { var url = string.Format("v2/patients/consultations/{0}/intake", consultationId); var result = Put(url, intakeData); } } }
apache-2.0
C#
23269ab16d4c85316feb7b759ff5765e388c990e
Tag to 8.4.1
jgoode/EDDiscovery,mwerle/EDDiscovery,jgoode/EDDiscovery,mwerle/EDDiscovery,jthorpe4/EDDiscovery
EDDiscovery/Properties/AssemblyInfo.cs
EDDiscovery/Properties/AssemblyInfo.cs
/* * Copyright © 2015 - 2017 EDDiscovery development team * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this * file except in compliance with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software distributed under * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF * ANY KIND, either express or implied. See the License for the specific language * governing permissions and limitations under the License. * * EDDiscovery is not affiliated with Frontier Developments plc. */ 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("EDDiscovery")] [assembly: AssemblyDescription("")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("")] [assembly: AssemblyProduct("EDDiscovery")] [assembly: AssemblyCopyright("Copyright © Robert Wahlström 2017")] [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] // Setting ComVisible to false makes the types in this assembly not visible // to COM components. If you need to access a type in this assembly from // COM, set the ComVisible attribute to true on that type. [assembly: ComVisible(false)] // The following GUID is for the ID of the typelib if this project is exposed to COM [assembly: Guid("1ad84dc2-298f-4d18-8902-7948bccbdc72")] // Version information for an assembly consists of the following four values: // // Major Version // Minor Version // Build Number // Revision // // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] [assembly: AssemblyVersion("8.4.1.0")] [assembly: AssemblyFileVersion("8.4.1.0")]
/* * Copyright © 2015 - 2017 EDDiscovery development team * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this * file except in compliance with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software distributed under * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF * ANY KIND, either express or implied. See the License for the specific language * governing permissions and limitations under the License. * * EDDiscovery is not affiliated with Frontier Developments plc. */ 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("EDDiscovery")] [assembly: AssemblyDescription("")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("")] [assembly: AssemblyProduct("EDDiscovery")] [assembly: AssemblyCopyright("Copyright © Robert Wahlström 2017")] [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] // Setting ComVisible to false makes the types in this assembly not visible // to COM components. If you need to access a type in this assembly from // COM, set the ComVisible attribute to true on that type. [assembly: ComVisible(false)] // The following GUID is for the ID of the typelib if this project is exposed to COM [assembly: Guid("1ad84dc2-298f-4d18-8902-7948bccbdc72")] // Version information for an assembly consists of the following four values: // // Major Version // Minor Version // Build Number // Revision // // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] [assembly: AssemblyVersion("8.4.0.0")] [assembly: AssemblyFileVersion("8.4.0.0")]
apache-2.0
C#
c370ab7ffd76e507df90d70203c39ee3b65d01a0
Add Sample operator
emoacht/Monitorian
Source/Monitorian.Core/Helper/Throttle.cs
Source/Monitorian.Core/Helper/Throttle.cs
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading; using System.Threading.Tasks; using System.Windows.Threading; namespace Monitorian.Core.Helper { /// <summary> /// Rx Throttle like operator /// </summary> public class Throttle { protected readonly Action _action; protected readonly DispatcherTimer _timer; protected readonly SemaphoreSlim _semaphore = new SemaphoreSlim(1, 1); public Throttle(TimeSpan dueTime, Action action) { if (dueTime <= TimeSpan.Zero) throw new ArgumentOutOfRangeException(nameof(dueTime)); this._action = action; _timer = new DispatcherTimer { Interval = dueTime }; _timer.Tick += OnTick; } private void OnTick(object sender, EventArgs e) { try { _semaphore.Wait(); _timer.Stop(); _action?.Invoke(); } finally { _semaphore.Release(); } } public virtual async Task PushAsync() { try { await _semaphore.WaitAsync(); _timer.Stop(); _timer.Start(); } finally { _semaphore.Release(); } } } /// <summary> /// Rx Sample like operator /// </summary> public class Sample : Throttle { public Sample(TimeSpan dueTime, Action action) : base(dueTime, action) { } public override async Task PushAsync() { try { await _semaphore.WaitAsync(); if (!_timer.IsEnabled) _timer.Start(); } finally { _semaphore.Release(); } } } }
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading; using System.Threading.Tasks; using System.Windows.Threading; namespace Monitorian.Core.Helper { internal class Throttle { private readonly Action _action; private readonly DispatcherTimer _timer; private readonly SemaphoreSlim _semaphore = new SemaphoreSlim(1, 1); public Throttle(TimeSpan dueTime, Action action) { if (dueTime <= TimeSpan.Zero) throw new ArgumentOutOfRangeException(nameof(dueTime)); this._action = action; _timer = new DispatcherTimer { Interval = dueTime }; _timer.Tick += OnTick; } private void OnTick(object sender, EventArgs e) { try { _semaphore.Wait(); _timer.Stop(); _action?.Invoke(); } finally { _semaphore.Release(); } } public async Task PushAsync() { try { await _semaphore.WaitAsync(); _timer.Stop(); _timer.Start(); } finally { _semaphore.Release(); } } } }
mit
C#
479905c47d455a33ba484ae9430e8149cd0b85ee
fix errorhandling pass trim
RobinHerbots/NCDO,RobinHerbots/NCDO
src/NCDO/CDORequest.cs
src/NCDO/CDORequest.cs
using System; using System.Collections.Generic; using System.Json; using System.Net.Http; using System.Text; using NCDO.Extensions; using NCDO.Interfaces; using Newtonsoft.Json; namespace NCDO { public class CDORequest : ICDORequest { public IEnumerable<ICDORequest> Batch { get; internal set; } public string FnName { get; internal set; } public ICloudDataObject CDO { get; internal set; } public ICloudDataRecord Record { get; internal set; } public JsonObject ObjParam { get; internal set; } public JsonObject Response { get; internal set; } public bool? Success { get; internal set; } public HttpResponseMessage ResponseMessage { get; internal set; } public Uri RequestUri { get; internal set; } public HttpMethod Method { get; internal set; } public void ThrowOnError() { Response?.ThrowOnErrorResponse(); if (Success.HasValue && !Success.Value) { var errorMessage = Response?.ToString(); throw new CDOException(ResponseMessage.StatusCode.ToString(), string.IsNullOrEmpty(errorMessage) ? $"Server error for request: {ResponseMessage.RequestMessage.RequestUri}" : errorMessage); } } public bool CdoMemory { get; set; } = true; } }
using System; using System.Collections.Generic; using System.Json; using System.Net.Http; using System.Text; using NCDO.Extensions; using NCDO.Interfaces; using Newtonsoft.Json; namespace NCDO { public class CDORequest : ICDORequest { public IEnumerable<ICDORequest> Batch { get; internal set; } public string FnName { get; internal set; } public ICloudDataObject CDO { get; internal set; } public ICloudDataRecord Record { get; internal set; } public JsonObject ObjParam { get; internal set; } public JsonObject Response { get; internal set; } public bool? Success { get; internal set; } public HttpResponseMessage ResponseMessage { get; internal set; } public Uri RequestUri { get; internal set; } public HttpMethod Method { get; internal set; } public void ThrowOnError() { Response?.ThrowOnErrorResponse(); if (Success.HasValue && !Success.Value) { var errorMessage = JsonConvert.SerializeObject(Response, Formatting.Indented); throw new CDOException(ResponseMessage.StatusCode.ToString(), string.IsNullOrEmpty(errorMessage) ? $"Server error for request: {ResponseMessage.RequestMessage.RequestUri}" : errorMessage); } } public bool CdoMemory { get; set; } = true; } }
mit
C#
240e7b4e4814e7a6b689ff57eb94451fc6beeeba
fix non-passing unit test
ParagonTruss/UnitClassLibrary
UnitClassLibrary/Force/ForceConversion.cs
UnitClassLibrary/Force/ForceConversion.cs
using System; namespace UnitClassLibrary { public partial class Force { /// <summary>Converts one unit of Force to another</summary> /// <param name="typeConvertingTo">input unit type</param> /// <param name="passedValue"></param> /// <param name="typeConvertingFrom">desired output unit type</param> /// <returns>passedValue in desired units</returns> public static double ConvertForce(ForceType typeConvertingFrom, double passedValue, ForceType typeConvertingTo) { double returnDouble = 0.0; switch (typeConvertingFrom) { case ForceType.Newton: switch (typeConvertingTo) { case ForceType.Newton: returnDouble = passedValue; // Return passed in Newton break; case ForceType.Pound: returnDouble = passedValue * (1/4.44822162); // Convert Newton to Pound break; case ForceType.Kip: returnDouble = passedValue * (1/4448.2216); // Convert Newton to Kip break; } break; case ForceType.Pound: switch (typeConvertingTo) { case ForceType.Newton: returnDouble = passedValue * 4.44822162; // Convert Pound to Newton break; case ForceType.Pound: returnDouble = passedValue; // Return passed in Pound break; case ForceType.Kip: returnDouble = passedValue * (1.0/1000.0); // Convert Pound to Kip break; } break; case ForceType.Kip: switch (typeConvertingTo) { case ForceType.Newton: returnDouble = passedValue * 4448.2216; // Convert Kip to Newton break; case ForceType.Pound: returnDouble = passedValue * 1000; // Convert Kip to Pound break; case ForceType.Kip: returnDouble = passedValue; // Return passed in Kip break; } break; } return returnDouble; } } }
using System; namespace UnitClassLibrary { public partial class Force { /// <summary>Converts one unit of Force to another</summary> /// <param name="typeConvertingTo">input unit type</param> /// <param name="passedValue"></param> /// <param name="typeConvertingFrom">desired output unit type</param> /// <returns>passedValue in desired units</returns> public static double ConvertForce(ForceType typeConvertingFrom, double passedValue, ForceType typeConvertingTo) { double returnDouble = 0.0; switch (typeConvertingFrom) { case ForceType.Newton: switch (typeConvertingTo) { case ForceType.Newton: returnDouble = passedValue; // Return passed in Newton break; case ForceType.Pound: returnDouble = passedValue * (1/4.44822162); // Convert Newton to Pound break; case ForceType.Kip: returnDouble = passedValue * (1/4448.2216); // Convert Newton to Kip break; } break; case ForceType.Pound: switch (typeConvertingTo) { case ForceType.Newton: returnDouble = passedValue * 4.44822162; // Convert Pound to Newton break; case ForceType.Pound: returnDouble = passedValue; // Return passed in Pound break; case ForceType.Kip: returnDouble = passedValue * (1/1000); // Convert Pound to Kip break; } break; case ForceType.Kip: switch (typeConvertingTo) { case ForceType.Newton: returnDouble = passedValue * 4448.2216; // Convert Kip to Newton break; case ForceType.Pound: returnDouble = passedValue * 1000; // Convert Kip to Pound break; case ForceType.Kip: returnDouble = passedValue; // Return passed in Kip break; } break; } return returnDouble; } } }
lgpl-2.1
C#
22261ee9349ebf028a0fe9b853c02a3988da94d5
fix swagger to OpenApi rename in NSwag
amweiss/WeatherLink
src/WeatherLink/Startup.cs
src/WeatherLink/Startup.cs
using Microsoft.AspNetCore.Builder; using Microsoft.AspNetCore.Hosting; using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.HttpsPolicy; using Microsoft.Extensions.Configuration; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Hosting; using Microsoft.Extensions.Logging; using Microsoft.Extensions.Options; using NSwag.AspNetCore; using WeatherLink.Models; using WeatherLink.Services; using NSwag; namespace WeatherLink { internal class Startup { public Startup(IWebHostEnvironment env) { var builder = new ConfigurationBuilder() .SetBasePath(env.ContentRootPath) .AddJsonFile("appsettings.json", optional: true, reloadOnChange: true) .AddJsonFile($"appsettings.{env.EnvironmentName}.json", optional: true) .AddEnvironmentVariables(); Configuration = builder.Build(); } public IConfigurationRoot Configuration { get; } // This method gets called by the runtime. Use this method to configure the HTTP request pipeline. public void Configure(IApplicationBuilder app, IWebHostEnvironment env) { if (env.IsDevelopment()) { app.UseDeveloperExceptionPage(); } else { app.UseExceptionHandler("/Error"); app.UseHsts(); } app.UseHttpsRedirection(); app.UseStaticFiles(); app.UseRouting(); app.UseEndpoints(endpoints => { endpoints.MapControllers(); endpoints.MapHealthChecks("/health"); }); app.UseOpenApi(); app.UseSwaggerUi3(); } // This method gets called by the runtime. Use this method to add services to the container. public void ConfigureServices(IServiceCollection services) { // Add framework services services.AddMvc().AddNewtonsoftJson(); //TODO: Change this to AddControllers when possible services.AddHealthChecks(); services.AddOptions(); // Get config services.Configure<WeatherLinkSettings>(Configuration); // Setup token db services.AddDbContext<SlackWorkspaceAppContext>(); // Add custom services services.AddTransient<ITrafficAdviceService, WeatherBasedTrafficAdviceService>(); services.AddTransient<IGeocodeService, GoogleMapsGeocodeService>(); services.AddTransient<IDistanceToDurationService, GoogleMapsDistanceToDurationService>(); services.AddTransient<IDarkSkyService, HourlyAndMinutelyDarkSkyService>(); // Configure swagger services.AddOpenApiDocument(c => { c.Title = "WeatherLink"; c.Description = "An API to get weather based advice."; c.PostProcess = (document) => document.Schemes = new[] { OpenApiSchema.Https }; }); } } }
using Microsoft.AspNetCore.Builder; using Microsoft.AspNetCore.Hosting; using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.HttpsPolicy; using Microsoft.Extensions.Configuration; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Hosting; using Microsoft.Extensions.Logging; using Microsoft.Extensions.Options; using NSwag.AspNetCore; using WeatherLink.Models; using WeatherLink.Services; using NSwag; namespace WeatherLink { internal class Startup { public Startup(IWebHostEnvironment env) { var builder = new ConfigurationBuilder() .SetBasePath(env.ContentRootPath) .AddJsonFile("appsettings.json", optional: true, reloadOnChange: true) .AddJsonFile($"appsettings.{env.EnvironmentName}.json", optional: true) .AddEnvironmentVariables(); Configuration = builder.Build(); } public IConfigurationRoot Configuration { get; } // This method gets called by the runtime. Use this method to configure the HTTP request pipeline. public void Configure(IApplicationBuilder app, IWebHostEnvironment env) { if (env.IsDevelopment()) { app.UseDeveloperExceptionPage(); } else { app.UseExceptionHandler("/Error"); app.UseHsts(); } app.UseHttpsRedirection(); app.UseStaticFiles(); app.UseRouting(); app.UseEndpoints(endpoints => { endpoints.MapControllers(); endpoints.MapHealthChecks("/health"); }); app.UseOpenApi(); app.UseSwaggerUi3(); } // This method gets called by the runtime. Use this method to add services to the container. public void ConfigureServices(IServiceCollection services) { // Add framework services services.AddMvc().AddNewtonsoftJson(); //TODO: Change this to AddControllers when possible services.AddHealthChecks(); services.AddOptions(); // Get config services.Configure<WeatherLinkSettings>(Configuration); // Setup token db services.AddDbContext<SlackWorkspaceAppContext>(); // Add custom services services.AddTransient<ITrafficAdviceService, WeatherBasedTrafficAdviceService>(); services.AddTransient<IGeocodeService, GoogleMapsGeocodeService>(); services.AddTransient<IDistanceToDurationService, GoogleMapsDistanceToDurationService>(); services.AddTransient<IDarkSkyService, HourlyAndMinutelyDarkSkyService>(); // Configure swagger services.AddSwaggerDocument(c => { c.Title = "WeatherLink"; c.Description = "An API to get weather based advice."; c.PostProcess = (document) => document.Schemes = new[] { SwaggerSchema.Https }; }); } } }
mit
C#
60f4520669aa0b688183199e65bbd15b0791cac9
Use msbuild path from config.json if present
OmniSharp/omnisharp-server,x335/omnisharp-server,syl20bnr/omnisharp-server,x335/omnisharp-server,syl20bnr/omnisharp-server,corngood/omnisharp-server,corngood/omnisharp-server,svermeulen/omnisharp-server
OmniSharp/Build/BuildCommandBuilder.cs
OmniSharp/Build/BuildCommandBuilder.cs
using System.IO; using OmniSharp.Solution; namespace OmniSharp.Build { public class BuildCommandBuilder { private readonly ISolution _solution; private readonly OmniSharpConfiguration _config; public BuildCommandBuilder( ISolution solution, OmniSharpConfiguration config) { _solution = solution; _config = config; } public string Executable { get { return PlatformService.IsUnix ? "xbuild" : Path.Combine( _config.MSBuildPath ?? System.Runtime.InteropServices.RuntimeEnvironment.GetRuntimeDirectory(), "Msbuild.exe"); } } public string Arguments { get { return (PlatformService.IsUnix ? "" : "/m ") + "/nologo /v:q /property:GenerateFullPaths=true \"" + _solution.FileName + "\""; } } public BuildTargetResponse BuildCommand(BuildTargetRequest req) { return new BuildTargetResponse { Command = this.Executable.ApplyPathReplacementsForClient() + " " + this.Arguments + " /target:" + req.Type.ToString() }; } } }
using System.IO; using OmniSharp.Solution; namespace OmniSharp.Build { public class BuildCommandBuilder { private readonly ISolution _solution; public BuildCommandBuilder(ISolution solution) { _solution = solution; } public string Executable { get { return PlatformService.IsUnix ? "xbuild" : Path.Combine(System.Runtime.InteropServices.RuntimeEnvironment.GetRuntimeDirectory(), "Msbuild.exe"); } } public string Arguments { get { return (PlatformService.IsUnix ? "" : "/m ") + "/nologo /v:q /property:GenerateFullPaths=true \"" + _solution.FileName + "\""; } } public BuildTargetResponse BuildCommand(BuildTargetRequest req) { return new BuildTargetResponse { Command = this.Executable.ApplyPathReplacementsForClient() + " " + this.Arguments + " /target:" + req.Type.ToString() }; } } }
mit
C#
b39fe0a93279cb8a9bec6c7e8f3f6a8ed073ed52
Fix typo in data object cloning.
eatskolnikov/mobile,ZhangLeiCharles/mobile,peeedge/mobile,masterrr/mobile,peeedge/mobile,eatskolnikov/mobile,eatskolnikov/mobile,ZhangLeiCharles/mobile,masterrr/mobile
Phoebe/Data/DataObjects/ProjectData.cs
Phoebe/Data/DataObjects/ProjectData.cs
using System; using SQLite; namespace Toggl.Phoebe.Data.DataObjects { [Table ("Project")] public class ProjectData : CommonData { public ProjectData () { } public ProjectData (ProjectData other) : base (other) { Name = other.Name; Color = other.Color; IsActive = other.IsActive; IsBillable = other.IsBillable; IsPrivate = other.IsPrivate; IsTemplate = other.IsTemplate; UseTasksEstimate = other.UseTasksEstimate; WorkspaceId = other.WorkspaceId; ClientId = other.ClientId; } public string Name { get; set; } public int Color { get; set; } public bool IsActive { get; set; } public bool IsBillable { get; set; } public bool IsPrivate { get; set; } public bool IsTemplate { get; set; } public bool UseTasksEstimate { get; set; } [ForeignRelation (typeof(WorkspaceData))] public Guid WorkspaceId { get; set; } [ForeignRelation (typeof(ClientData))] public Guid? ClientId { get; set; } } }
using System; using SQLite; namespace Toggl.Phoebe.Data.DataObjects { [Table ("Project")] public class ProjectData : CommonData { public ProjectData () { } public ProjectData (ProjectData other) : base (other) { Name = other.Name; Color = other.Color; IsActive = other.IsActive; IsBillable = other.IsBillable; IsPrivate = other.IsBillable; IsTemplate = other.IsTemplate; UseTasksEstimate = other.UseTasksEstimate; WorkspaceId = other.WorkspaceId; ClientId = other.ClientId; } public string Name { get; set; } public int Color { get; set; } public bool IsActive { get; set; } public bool IsBillable { get; set; } public bool IsPrivate { get; set; } public bool IsTemplate { get; set; } public bool UseTasksEstimate { get; set; } [ForeignRelation (typeof(WorkspaceData))] public Guid WorkspaceId { get; set; } [ForeignRelation (typeof(ClientData))] public Guid? ClientId { get; set; } } }
bsd-3-clause
C#
3ef53099e0608be7eb35aeb3b949426e60c9ac4e
Update RxRadialLookup.cs
ADAPT/ADAPT
source/ADAPT/Prescriptions/RxRadialLookup.cs
source/ADAPT/Prescriptions/RxRadialLookup.cs
/******************************************************************************* * Copyright (C) 2015, 2018 AgGateway and ADAPT Contributors * Copyright (C) 2015 Deere and Company * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html <http://www.eclipse.org/legal/epl-v10.html> * * Contributors: * * *******************************************************************************/ using System.Collections.Generic; namespace AgGateway.ADAPT.ApplicationDataModel.Prescriptions { public class RxRadialLookup { public RxRadialLookup() { RxRates = new List<RxRate>(); } public RadialExtent Extent { get; set; } public List<RxRate> RxRates { get; set; } } }
/******************************************************************************* * Copyright (C) 2015 AgGateway and ADAPT Contributors * Copyright (C) 2015 Deere and Company * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html <http://www.eclipse.org/legal/epl-v10.html> * * Contributors: * * *******************************************************************************/ using System.Collections.Generic; namespace AgGateway.ADAPT.ApplicationDataModel.Prescriptions { public class RxRadialLookup { public RxRadialLookup() { RxRates = new List<RxRate>(); } public RadialExtent Extent { get; set; } public List<RxRate> RxRates { get; set; } } }
epl-1.0
C#
9e18bf5309191ab7f680002afa062ebd43dba16d
rename home page title
Borayvor/ASP.NET-MVC-CourseProject,Borayvor/ASP.NET-MVC-CourseProject,Borayvor/ASP.NET-MVC-CourseProject
EntertainmentSystem/Web/EntertainmentSystem.Web/Views/Home/Index.cshtml
EntertainmentSystem/Web/EntertainmentSystem.Web/Views/Home/Index.cshtml
@using EntertainmentSystem.Web.Controllers @{ ViewBag.Title = "For free time !"; } <div id="es-home"> <h1> @ViewBag.Title </h1> <div class="row"> <section class="col-md-4"> @(Html.Action<HomeController>(c => c.GetMusic(), new { area = string.Empty })) </section> <section class="col-md-8"> @(Html.Action<HomeController>(c => c.GetPictures(), new { area = string.Empty })) </section> </div> <div class="row"> <section class="col-xs-12"> @(Html.Action<HomeController>(c => c.GetVideos(), new { area = string.Empty })) </section> </div> </div>
@using EntertainmentSystem.Web.Controllers @{ ViewBag.Title = "For yours free time !"; } <div id="es-home"> <h1> @ViewBag.Title </h1> <div class="row"> <section class="col-md-4"> @(Html.Action<HomeController>(c => c.GetMusic(), new { area = string.Empty })) </section> <section class="col-md-8"> @(Html.Action<HomeController>(c => c.GetPictures(), new { area = string.Empty })) </section> </div> <div class="row"> <section class="col-xs-12"> @(Html.Action<HomeController>(c => c.GetVideos(), new { area = string.Empty })) </section> </div> </div>
mit
C#
298a862373bb422a1af60e92644d63de7f6ee050
fix for unwanted headers
museumvictoria/collections-online,museumvictoria/collections-online,museumvictoria/collections-online,museumsvictoria/collections-online,museumsvictoria/collections-online,museumsvictoria/collections-online
src/CollectionsOnline.WebSite/Global.asax.cs
src/CollectionsOnline.WebSite/Global.asax.cs
using System; using System.Web; using CollectionsOnline.WebSite.Extensions; using Nancy; using Serilog; namespace CollectionsOnline.WebSite { public class Global : HttpApplication { protected void Application_PreSendRequestHeaders(object sender, EventArgs e) { Response.Headers.Remove("Server"); Response.Headers.Remove("X-MiniProfiler-Ids"); } protected void Application_Error(object sender, EventArgs e) { // Capture any errors occurring before the nancy pipeline var ex = Server.GetLastError(); Log.Logger.Fatal(ex, "Unhandled Exception occured in System.Web pipeline {Url} {@HttpParams}", Request.Url, Request.RenderParams()); Server.ClearError(); Response.ContentType = "text/html"; Response.StatusCode = (int)HttpStatusCode.InternalServerError; Response.TransmitFile(@"Views\Error\500.html"); } } }
using System; using System.Web; using CollectionsOnline.WebSite.Extensions; using Nancy; using Serilog; namespace CollectionsOnline.WebSite { public class Global : HttpApplication { protected void Application_EndRequest(object sender, EventArgs e) { // Remove headers that are not needed var application = sender as HttpApplication; if (application != null && application.Context != null) { application.Context.Response.Headers.Remove("Server"); application.Context.Response.Headers.Remove("X-MiniProfiler-Ids"); } } protected void Application_Error(object sender, EventArgs e) { // Capture any errors occurring before the nancy pipeline var ex = Server.GetLastError(); Log.Logger.Fatal(ex, "Unhandled Exception occured in System.Web pipeline {Url} {@HttpParams}", Request.Url, Request.RenderParams()); Server.ClearError(); Response.ContentType = "text/html"; Response.StatusCode = (int)HttpStatusCode.InternalServerError; Response.TransmitFile(@"Views\Error\500.html"); } } }
mit
C#
04ae344bf46bb0772e5637a1911ce77737ac6a0c
Bump version info
NightmareX1337/LF2.IDE
LF2.IDE/Properties/AssemblyInfo.cs
LF2.IDE/Properties/AssemblyInfo.cs
using LF2.IDE; 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("LF2 IDE")] [assembly: AssemblyDescription("LF2 Integrated Development Environment")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("Ahmet Sait Koçak")] [assembly: AssemblyProduct("LF2 IDE")] [assembly: AssemblyCopyright("Copyright © Ahmet Sait Koçak 2013-2018")] [assembly: AssemblyTrademark("")] // Setting ComVisible to false makes the types in this assembly not visible // to COM components. If you need to access a type in this assembly from // COM, set the ComVisible attribute to true on that type. [assembly: ComVisible(false)] // The following GUID is for the ID of the typelib if this project is exposed to COM //[assembly: Guid("693719bd-1edc-440c-b74b-941ca9e7639f")] // Version information for an assembly consists of the following four values: // // Major Version // Minor Version // Build Number // Revision // // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] [assembly: AssemblyVersion("3.3.1.*")] [assembly: AssemblyFileVersion("3.3.1")] [assembly: AssemblyInformationalVersion("v3.3.1")]
using LF2.IDE; 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("LF2 IDE")] [assembly: AssemblyDescription("LF2 Integrated Development Environment")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("Ahmet Sait Koçak")] [assembly: AssemblyProduct("LF2 IDE")] [assembly: AssemblyCopyright("Copyright © Ahmet Sait Koçak 2013-2018")] [assembly: AssemblyTrademark("")] // Setting ComVisible to false makes the types in this assembly not visible // to COM components. If you need to access a type in this assembly from // COM, set the ComVisible attribute to true on that type. [assembly: ComVisible(false)] // The following GUID is for the ID of the typelib if this project is exposed to COM //[assembly: Guid("693719bd-1edc-440c-b74b-941ca9e7639f")] // Version information for an assembly consists of the following four values: // // Major Version // Minor Version // Build Number // Revision // // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] [assembly: AssemblyVersion("3.3.0.*")] [assembly: AssemblyFileVersion("3.3.0")] [assembly: AssemblyInformationalVersion("v3.3.0")]
mit
C#
59fa56b1f446495561d55a4fbaa419e6aaf08657
Fix for getting the email addresses the wrong way round
Red-Folder/red-folder.com,Red-Folder/red-folder.com,Red-Folder/red-folder.com
src/Red-Folder.com/Services/SendGridEmail.cs
src/Red-Folder.com/Services/SendGridEmail.cs
using RedFolder.Models; using RedFolder.ViewModels; using SendGrid; using SendGrid.Helpers.Mail; using System.Net; using System.Threading.Tasks; using System.Web; namespace RedFolder.Services { public class SendGridEmail : IEmail { private const string CONTACT_THANK_YOU_TEMPLATE = "d-b7898a39f2c441d6812a466fe02b9ab4"; private readonly SendGridConfiguration _configuration; public SendGridEmail(SendGridConfiguration configuration) { _configuration = configuration; } public async Task<bool> SendContactThankYou(ContactForm contactForm) { try { var client = new SendGridClient(_configuration.ApiKey); var from = new EmailAddress(_configuration.From); var to = new EmailAddress(contactForm.EmailAddress); var msg = MailHelper.CreateSingleTemplateEmail(from, to, CONTACT_THANK_YOU_TEMPLATE, new { name = HttpUtility.HtmlEncode(contactForm.Name), howcanihelp = HttpUtility.HtmlEncode(contactForm.HowCanIHelp) }); if (!contactForm.EmailAddress.ToLower().Equals(_configuration.From.ToLower())) { msg.AddBcc(new EmailAddress(_configuration.From)); } var response = await client.SendEmailAsync(msg); return response?.StatusCode == HttpStatusCode.Accepted; } catch { } return false; } } }
using RedFolder.Models; using RedFolder.ViewModels; using SendGrid; using SendGrid.Helpers.Mail; using System.Net; using System.Threading.Tasks; using System.Web; namespace RedFolder.Services { public class SendGridEmail : IEmail { private const string CONTACT_THANK_YOU_TEMPLATE = "d-b7898a39f2c441d6812a466fe02b9ab4"; private readonly SendGridConfiguration _configuration; public SendGridEmail(SendGridConfiguration configuration) { _configuration = configuration; } public async Task<bool> SendContactThankYou(ContactForm contactForm) { try { var client = new SendGridClient(_configuration.ApiKey); var from = new EmailAddress(contactForm.EmailAddress); var to = new EmailAddress(_configuration.From); var msg = MailHelper.CreateSingleTemplateEmail(from, to, CONTACT_THANK_YOU_TEMPLATE, new { name = HttpUtility.HtmlEncode(contactForm.Name), howcanihelp = HttpUtility.HtmlEncode(contactForm.HowCanIHelp) }); if (!contactForm.EmailAddress.ToLower().Equals(_configuration.From.ToLower())) { msg.AddBcc(new EmailAddress(_configuration.From)); } var response = await client.SendEmailAsync(msg); return response?.StatusCode == HttpStatusCode.Accepted; } catch { } return false; } } }
mit
C#
c49bcfb04700914d1ba95bc4ba837ecc8d354263
Add regional fallback mechanic
Xeeynamo/KingdomHearts
OpenKh.Tools.ModsManager/Services/OperationDispatcher.cs
OpenKh.Tools.ModsManager/Services/OperationDispatcher.cs
using OpenKh.Common; using System.IO; namespace OpenKh.Tools.ModsManager.Services { public class OperationDispatcher : IOperationDispatcher { private static readonly string[] _regionFallback = new[] { "us", "fm", "jp", "uk", "it", "fr", "es", "de" }; public bool LoadFile(Stream outStream, string fileName) { //fileName = fileName.Replace("menu/it/title", "menu/fm/title"); //fileName = fileName.Replace("menu/it/pause", "menu/fm/pause"); fileName = fileName.Replace("menu/it/save", "menu/fm/save"); if (LoadFileInternal(outStream, fileName)) return true; var region = GetRegion(fileName); if (region == null) return false; foreach (var fallback in _regionFallback) { if (LoadFileInternal(outStream, fileName.Replace($"/{region}/", $"/{fallback}/"))) return true; } return false; } public int GetFileSize(string fileName) { var realFileName = Path.Combine(ConfigurationService.GameModPath, fileName); if (!File.Exists(realFileName)) realFileName = Path.Combine(ConfigurationService.GameDataLocation, fileName); if (!File.Exists(realFileName)) return 0; return (int)new FileInfo(realFileName).Length; } private bool LoadFileInternal(Stream outStream, string fileName) { var realFileName = Path.Combine(ConfigurationService.GameModPath, fileName); if (!File.Exists(realFileName)) realFileName = Path.Combine(ConfigurationService.GameDataLocation, fileName); if (!File.Exists(realFileName)) return false; File.OpenRead(realFileName).Using(x => x.CopyTo(outStream)); return true; } private static string GetRegion(string fileName) { foreach (var region in Kh2.Constants.Regions) { var indexOfRegion = fileName.IndexOf($"/{region}/"); if (indexOfRegion >= 0) return region; } return null; } } }
using OpenKh.Common; using System.IO; namespace OpenKh.Tools.ModsManager.Services { public class OperationDispatcher : IOperationDispatcher { public bool LoadFile(Stream outStream, string fileName) { var realFileName = Path.Combine(ConfigurationService.GameModPath, fileName); if (!File.Exists(realFileName)) realFileName = Path.Combine(ConfigurationService.GameDataLocation, fileName); if (!File.Exists(realFileName)) return false; File.OpenRead(realFileName).Using(x => x.CopyTo(outStream)); return true; } public int GetFileSize(string fileName) { var realFileName = Path.Combine(ConfigurationService.GameModPath, fileName); if (!File.Exists(realFileName)) realFileName = Path.Combine(ConfigurationService.GameDataLocation, fileName); if (!File.Exists(realFileName)) return 0; return (int)new FileInfo(realFileName).Length; } } }
mit
C#
d3e717d2227bcc66ced2d6cd8d1f88e442783211
Simplify first Xmas Ball behaviour.
Noxalus/Xmas-Hell
Xmas-Hell/Xmas-Hell-Core/Entities/Bosses/XmasBall/XmasBallBehaviour1.cs
Xmas-Hell/Xmas-Hell-Core/Entities/Bosses/XmasBall/XmasBallBehaviour1.cs
using System; using Microsoft.Xna.Framework; using XmasHell.BulletML; namespace XmasHell.Entities.Bosses.XmasBall { class XmasBallBehaviour1 : AbstractBossBehaviour { private TimeSpan _newPositionTime; private TimeSpan _bulletFrequence; public XmasBallBehaviour1(Boss boss) : base(boss) { } public override void Start() { base.Start(); Boss.Speed = 500f; _newPositionTime = TimeSpan.Zero; _bulletFrequence = TimeSpan.Zero; Boss.CurrentAnimator.Play("Idle"); } public override void Stop() { base.Stop(); } public override void Update(GameTime gameTime) { base.Update(gameTime); if (!Boss.TargetingPosition) { var newPosition = new Vector2( Boss.Game.GameManager.Random.Next((int)(Boss.Width() / 2f), GameConfig.VirtualResolution.X - (int)(Boss.Width() / 2f)), Boss.Game.GameManager.Random.Next((int)(Boss.Height() / 2f) + 100, 500 - (int)(Boss.Height() / 2f)) ); Boss.MoveTo(newPosition, 1.5f); } if (_bulletFrequence.TotalMilliseconds > 0) _bulletFrequence -= gameTime.ElapsedGameTime; else { _bulletFrequence = TimeSpan.FromSeconds(0.5f); Boss.Game.GameManager.MoverManager.TriggerPattern("sample", BulletType.Type2, false, Boss.Position()); } } } }
using System; using Microsoft.Xna.Framework; using XmasHell.BulletML; namespace XmasHell.Entities.Bosses.XmasBall { class XmasBallBehaviour1 : AbstractBossBehaviour { private TimeSpan _newPositionTime; private TimeSpan _bulletFrequence; public XmasBallBehaviour1(Boss boss) : base(boss) { } public override void Start() { base.Start(); Boss.Speed = 500f; _newPositionTime = TimeSpan.Zero; _bulletFrequence = TimeSpan.Zero; Boss.CurrentAnimator.Play("Idle"); } public override void Stop() { base.Stop(); } public override void Update(GameTime gameTime) { base.Update(gameTime); if (_newPositionTime.TotalMilliseconds > 0) { if (!Boss.TargetingPosition) _newPositionTime -= gameTime.ElapsedGameTime; } else { _newPositionTime = TimeSpan.FromSeconds(0); var newPosition = new Vector2( Boss.Game.GameManager.Random.Next((int)(Boss.Width() / 2f), GameConfig.VirtualResolution.X - (int)(Boss.Width() / 2f)), Boss.Game.GameManager.Random.Next((int)(Boss.Height() / 2f) + 100, 500 - (int)(Boss.Height() / 2f)) ); Boss.MoveTo(newPosition, 1.5f); } if (_bulletFrequence.TotalMilliseconds > 0) _bulletFrequence -= gameTime.ElapsedGameTime; else { _bulletFrequence = TimeSpan.FromSeconds(0.5f); Boss.Game.GameManager.MoverManager.TriggerPattern("sample", BulletType.Type2, false, Boss.Position()); } } } }
mit
C#
26accb12e4e63237bbee85f876f42c68c4444016
add metas and github link
shearnie/UrlPrettyPrint
UrlPrettyPrint/Views/Home/Index.cshtml
UrlPrettyPrint/Views/Home/Index.cshtml
@{ ViewBag.Title = "Url Pretty Print"; } @section meta { <meta name="description" content="Url Pretty Print" /> <meta name="keywords" content="url pretty print, url parameters, pretty, print" /> <meta name="expires" content="never" /> <meta name="language" content="english" /> <meta name="distribution" content="Global" /> <meta name="robots" content="ALL,INDEX,FOLLOW" /> <meta name="document-class" content="Completed"> <meta name="document-classification" content="Url Pretty Print"> <meta name="author" content="Steve Shearn" /> <meta name="document-rights" content="Public Domain" /> <meta name="document-type" content="Public" /> <meta name="document-rating" content="General" /> <meta name="document-distribution" content="Global" /> <meta name="document-state" content="Dynamic" /> <meta name="cache-control" content="Public" /> <meta name="copyright" content="Url Pretty Print" /> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <meta http-equiv="Content-Language" content="en-us" /> <meta name="abstract" content="Url Pretty Print" /> } <div class="row"> <div class="col-md-6 col-md-offset-3"> <h1>Url Pretty Print</h1> <hr /> <p> A basic pretty printer for breaking up a one line url into parameters. </p> <p> Paste the Url in the text area below, click the "<i>Pretty Print Url</i>" button, and see pretty printed Url. </p> @{ Html.BeginForm("Index", "Home", FormMethod.Post); } <div style="margin-bottom: 20px;"> <textarea name="txturl" id="txturl" class="form-control" rows="10" required autofocus></textarea> </div> <input type="submit" class="btn btn-primary" value="Pretty Print Url"> <p class="pull-right"> <a href="https://github.com/shearnie/UrlPrettyPrint" target="_blank"><i class="fa fa-github fa-2x"></i></a> </p> @{ Html.EndForm(); } </div> </div>
@{ ViewBag.Title = "Url Pretty Print"; } <div class="row"> <div class="col-md-6 col-md-offset-3"> <h1>Url Pretty Print</h1> <hr /> <p> A basic pretty printer for breaking up a one line url into parameters. </p> <p> Paste the Url in the text area below, click the "<i>Pretty Print Url</i>" button, and see pretty printed Url. </p> @{ Html.BeginForm("Index", "Home", FormMethod.Post); } <div style="margin-bottom: 20px;"> <textarea name="txturl" id="txturl" class="form-control" rows="10" required autofocus></textarea> </div> <input type="submit" class="btn btn-primary" value="Pretty Print Url"> @{ Html.EndForm(); } </div> </div>
mit
C#
40def7afa13ca08f88b653bf5018263c43cbe67f
Throw command exception if configuration variable already exists
appharbor/appharbor-cli
src/AppHarbor/AppHarborClient.cs
src/AppHarbor/AppHarborClient.cs
using System; using System.Collections.Generic; using AppHarbor.Model; namespace AppHarbor { public class AppHarborClient : IAppHarborClient { private readonly AppHarborApi _api; public AppHarborClient(string AccessToken) { var authInfo = new AuthInfo { AccessToken = AccessToken }; try { _api = new AppHarborApi(authInfo); } catch (ArgumentNullException) { throw new CommandException("You're not logged in. Log in with \"appharbor login\""); } } public CreateResult<string> CreateApplication(string name, string regionIdentifier = null) { var result = _api.CreateApplication(name, regionIdentifier); if (result.Status != CreateStatus.Created) { throw new ApiException(); } return result; } public void DeleteApplication(string id) { if (!_api.DeleteApplication(id)) { throw new ApiException(); } } public Application GetApplication(string id) { var application = _api.GetApplication(id); if (string.IsNullOrEmpty(application.Slug)) { throw new ApiException(); } return application; } public IEnumerable<Application> GetApplications() { var applications = _api.GetApplications(); if (applications == null) { throw new ApiException(); } return applications; } public User GetUser() { var user = _api.GetUser(); if (user == null) { throw new ApiException(); } return user; } public void CreateConfigurationVariable(string applicationId, string key, string value) { var result = _api.CreateConfigurationVariable(applicationId, key, value); switch (result.Status) { case CreateStatus.Created: break; case CreateStatus.AlreadyExists: throw new CommandException(string.Format("The configuration variable key \"{0}\" already exists")); default: throw new ApiException(); } } } }
using System; using System.Collections.Generic; using AppHarbor.Model; namespace AppHarbor { public class AppHarborClient : IAppHarborClient { private readonly AppHarborApi _api; public AppHarborClient(string AccessToken) { var authInfo = new AuthInfo { AccessToken = AccessToken }; try { _api = new AppHarborApi(authInfo); } catch (ArgumentNullException) { throw new CommandException("You're not logged in. Log in with \"appharbor login\""); } } public CreateResult<string> CreateApplication(string name, string regionIdentifier = null) { var result = _api.CreateApplication(name, regionIdentifier); if (result.Status != CreateStatus.Created) { throw new ApiException(); } return result; } public void DeleteApplication(string id) { if (!_api.DeleteApplication(id)) { throw new ApiException(); } } public Application GetApplication(string id) { var application = _api.GetApplication(id); if (string.IsNullOrEmpty(application.Slug)) { throw new ApiException(); } return application; } public IEnumerable<Application> GetApplications() { var applications = _api.GetApplications(); if (applications == null) { throw new ApiException(); } return applications; } public User GetUser() { var user = _api.GetUser(); if (user == null) { throw new ApiException(); } return user; } public void CreateConfigurationVariable(string applicationId, string key, string value) { var result = _api.CreateConfigurationVariable(applicationId, key, value); if (result.Status != CreateStatus.Created) { throw new ApiException(); } } } }
mit
C#
56e03d8cfcc78e97fba609a71c2b73361d9d41b7
Improve ToString() formatting for Intervals
marsop/ephemeral
Interval.cs
Interval.cs
using System; namespace seasonal { /// <summary> /// Immutable Interval Base class /// </summary> public class Interval : IInterval { private readonly DateTimeOffset _start; public DateTimeOffset Start => _start; private readonly DateTimeOffset _end; public DateTimeOffset End => _end; private readonly bool _startIncluded; public bool StartIncluded => _startIncluded; private readonly bool _endIncluded; public bool EndIncluded => _endIncluded; private TimeSpan _duration; public TimeSpan Duration => _duration; public Interval(DateTimeOffset start, DateTimeOffset end, bool startIncluded, bool endIncluded) { _start = start; _end = end; _duration = end - start; _startIncluded = startIncluded; _endIncluded = endIncluded; if (!IsValid()) throw new InvalidDurationException(ToString()); } public Interval(DateTimeOffset start, TimeSpan duration, bool startIncluded, bool endIncluded) : this(start, start.Add(duration), startIncluded, endIncluded) { } public Interval(ITimestamped start, ITimestamped end, bool startIncluded, bool endIncluded) : this(start.Timestamp, end.Timestamp, startIncluded, endIncluded) { } private bool IsValid() => (Start < End || (Start == End && StartIncluded && EndIncluded)); public override string ToString() { var startDelimiter = StartIncluded ? "[" : "("; var endDelimiter = EndIncluded ? "]" : ")"; return $"{startDelimiter}{Start} => {End}{endDelimiter}"; } } }
using System; namespace seasonal { /// <summary> /// Immutable Interval Base class /// </summary> public class Interval : IInterval { private readonly DateTimeOffset _start; public DateTimeOffset Start => _start; private readonly DateTimeOffset _end; public DateTimeOffset End => _end; private readonly bool _startIncluded; public bool StartIncluded => _startIncluded; private readonly bool _endIncluded; public bool EndIncluded => _endIncluded; private TimeSpan _duration; public TimeSpan Duration => _duration; public Interval(DateTimeOffset start, DateTimeOffset end, bool startIncluded, bool endIncluded) { _start = start; _end = end; _duration = end - start; _startIncluded = startIncluded; _endIncluded = endIncluded; if (!IsValid()) throw new InvalidDurationException(ToString()); } public Interval(DateTimeOffset start, TimeSpan duration, bool startIncluded, bool endIncluded) : this(start, start.Add(duration), startIncluded, endIncluded) { } public Interval(ITimestamped start, ITimestamped end, bool startIncluded, bool endIncluded) : this(start.Timestamp, end.Timestamp, startIncluded, endIncluded) { } private bool IsValid() => (Start < End || (Start == End && StartIncluded && EndIncluded)); public override string ToString() => $"{Start} ({StartIncluded}) => {End} ({EndIncluded})"; } }
mit
C#
bbbaa386882473e05ad11912fb523c672a5e42c0
Increment version
R-Smith/vmPing
vmPing/Properties/AssemblyInfo.cs
vmPing/Properties/AssemblyInfo.cs
using System.Reflection; using System.Resources; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; using System.Windows; // 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("vmPing")] [assembly: AssemblyDescription("")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("")] [assembly: AssemblyProduct("vmPing")] [assembly: AssemblyCopyright("Copyright © 2021 Ryan Smith")] [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] // Setting ComVisible to false makes the types in this assembly not visible // to COM components. If you need to access a type in this assembly from // COM, set the ComVisible attribute to true on that type. [assembly: ComVisible(false)] //In order to begin building localizable applications, set //<UICulture>CultureYouAreCodingWith</UICulture> in your .csproj file //inside a <PropertyGroup>. For example, if you are using US english //in your source files, set the <UICulture> to en-US. Then uncomment //the NeutralResourceLanguage attribute below. Update the "en-US" in //the line below to match the UICulture setting in the project file. //[assembly: NeutralResourcesLanguage("en-US", UltimateResourceFallbackLocation.Satellite)] [assembly: ThemeInfo( ResourceDictionaryLocation.None, //where theme specific resource dictionaries are located //(used if a resource is not found in the page, // or application resource dictionaries) ResourceDictionaryLocation.SourceAssembly //where the generic resource dictionary is located //(used if a resource is not found in the page, // app, or any theme specific resource dictionaries) )] // Version information for an assembly consists of the following four values: // // Major Version // Minor Version // Build Number // Revision // // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] [assembly: AssemblyVersion("1.3.12.0")] [assembly: AssemblyFileVersion("1.3.12.0")]
using System.Reflection; using System.Resources; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; using System.Windows; // 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("vmPing")] [assembly: AssemblyDescription("")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("")] [assembly: AssemblyProduct("vmPing")] [assembly: AssemblyCopyright("Copyright © 2021 Ryan Smith")] [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] // Setting ComVisible to false makes the types in this assembly not visible // to COM components. If you need to access a type in this assembly from // COM, set the ComVisible attribute to true on that type. [assembly: ComVisible(false)] //In order to begin building localizable applications, set //<UICulture>CultureYouAreCodingWith</UICulture> in your .csproj file //inside a <PropertyGroup>. For example, if you are using US english //in your source files, set the <UICulture> to en-US. Then uncomment //the NeutralResourceLanguage attribute below. Update the "en-US" in //the line below to match the UICulture setting in the project file. //[assembly: NeutralResourcesLanguage("en-US", UltimateResourceFallbackLocation.Satellite)] [assembly: ThemeInfo( ResourceDictionaryLocation.None, //where theme specific resource dictionaries are located //(used if a resource is not found in the page, // or application resource dictionaries) ResourceDictionaryLocation.SourceAssembly //where the generic resource dictionary is located //(used if a resource is not found in the page, // app, or any theme specific resource dictionaries) )] // Version information for an assembly consists of the following four values: // // Major Version // Minor Version // Build Number // Revision // // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] [assembly: AssemblyVersion("1.3.11.0")] [assembly: AssemblyFileVersion("1.3.11.0")]
mit
C#
43126c1a007a9723949c18cc2de2b24d2b9044fb
Add some code documentation
awaescher/RepoZ,awaescher/RepoZ
RepoZ.Api.Win/PInvoke/Combridge.cs
RepoZ.Api.Win/PInvoke/Combridge.cs
using System; using System.Collections.Generic; using System.Linq; using System.Reflection; using System.Runtime.InteropServices; using System.Text; using System.Threading.Tasks; namespace RepoZ.Api.Win.PInvoke { /// <summary> /// Wraps calls to COM objects to make sure that these objects are released properly. /// With it, methods can be invoked and property values can be retrieved without /// using the dynamic keyword which leads to memory leaks when used with COM objects. /// See: https://stackoverflow.com/questions/33080252/memory-overflow-having-an-increasing-number-of-microsoft-csharp-runtimebinder-s/34123315 /// Note: /// - Use this class within a using block only! Otherwise COM objects might not be released as planned. /// - Using this class will be slower than accessing COM properties and methods via dynamic objects. Decide for yourself: Performance vs. memory. /// </summary> /// <remarks> /// This class is not related to any cities or universities located in the UK. /// </remarks> public class Combridge : IDisposable { private Lazy<Type> _comType; /// <summary> /// Creates a new instance of the Combridge COM wrapper class. /// </summary> /// <param name="comObject">The COM object to wrap.</param> public Combridge(object comObject) { ComObject = comObject; _comType = new Lazy<Type>(() => ComObject.GetType()); } /// <summary> /// Disposes the wrapper class and enforces a Marshal.FinalReleaseComObject() /// on the COM object if available. /// </summary> public void Dispose() { if (ComObject != null) Marshal.FinalReleaseComObject(ComObject); ComObject = null; _comType = null; } /// <summary> /// Invokes a method by a given name and returns its result. /// </summary> /// <typeparam name="T">The expected type of the return value.</typeparam> /// <param name="methodName">The name of the method to invoke on the COM object.</param> /// <returns></returns> public T InvokeMethod<T>(string methodName) => GetValueViaReflection<T>(methodName, BindingFlags.InvokeMethod); /// <summary> /// Gets the value of a property by a given property name. /// </summary> /// <typeparam name="T">The expected type of the return value.</typeparam> /// <param name="propertyName">The name of the property get the value from.</param> /// <returns></returns> public T GetPropertyValue<T>(string propertyName) => GetValueViaReflection<T>(propertyName, BindingFlags.GetProperty); /// <summary> /// Accesses the COM object by using the Method "InvokeMember()" to call methods /// or retrieve property values. /// </summary> /// <typeparam name="T">The expected type of the return value.</typeparam> /// <param name="memberName">The name of the member (method or property) to call or to get the value from.</param> /// <param name="flags">The binding flags to decide whether to invoke methods or to retrieve property values.</param> /// <returns></returns> protected T GetValueViaReflection<T>(string memberName, BindingFlags flags) => (T)_comType.Value.InvokeMember(memberName, flags, null, ComObject, null); /// <summary> /// Gets the wrapped COM object for native access. /// </summary> public object ComObject { get; private set; } } }
using System; using System.Collections.Generic; using System.Linq; using System.Reflection; using System.Runtime.InteropServices; using System.Text; using System.Threading.Tasks; namespace RepoZ.Api.Win.PInvoke { public class Combridge : IDisposable { private Lazy<Type> _comType; public Combridge(object comObject) { ComObject = comObject; _comType = new Lazy<Type>(() => ComObject.GetType()); } public void Dispose() { if (ComObject != null) Marshal.FinalReleaseComObject(ComObject); ComObject = null; _comType = null; } public T InvokeMethod<T>(string methodName) => GetValueViaReflection<T>(methodName, BindingFlags.InvokeMethod); public T GetPropertyValue<T>(string propertyName) => GetValueViaReflection<T>(propertyName, BindingFlags.GetProperty); protected T GetValueViaReflection<T>(string memberName, BindingFlags flags) => (T)_comType.Value.InvokeMember(memberName, flags, null, ComObject, null); public object ComObject { get; private set; } } }
mit
C#
1f20c55d8ed44c51fdb83917eb512fbda91669a5
Update SaveFileInExcel97-2003format.cs
asposecells/Aspose_Cells_NET,asposecells/Aspose_Cells_NET,maria-shahid-aspose/Aspose.Cells-for-.NET,aspose-cells/Aspose.Cells-for-.NET,maria-shahid-aspose/Aspose.Cells-for-.NET,aspose-cells/Aspose.Cells-for-.NET,aspose-cells/Aspose.Cells-for-.NET,asposecells/Aspose_Cells_NET,aspose-cells/Aspose.Cells-for-.NET,maria-shahid-aspose/Aspose.Cells-for-.NET,maria-shahid-aspose/Aspose.Cells-for-.NET,asposecells/Aspose_Cells_NET
Examples/CSharp/Files/Handling/SaveFileInExcel97-2003format.cs
Examples/CSharp/Files/Handling/SaveFileInExcel97-2003format.cs
using System.IO; using Aspose.Cells; namespace Aspose.Cells.Examples.Files.Handling { public class SaveFileInExcel97-2003format { public static void Main(string[] args) { //ExStart:1 // The path to the documents directory. string dataDir = Aspose.Cells.Examples.Utils.GetDataDir(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); //Creating a Workbook object Workbook workbook = new Workbook(); //Your Code goes here for any workbook related operations //Save in Excel 97 – 2003 format workbook.Save(dataDir + "book1.out.xls"); //OR workbook.Save(dataDir + "book1.out.xls", new XlsSaveOptions(SaveFormat.Excel97To2003)); //ExEnd:1 } } }
using System.IO; using Aspose.Cells; namespace Aspose.Cells.Examples.Files.Handling { public class SavingFiles { public static void Main(string[] args) { //ExStart:1 // The path to the documents directory. string dataDir = Aspose.Cells.Examples.Utils.GetDataDir(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); //Creating a Workbook object Workbook workbook = new Workbook(); //Your Code goes here for any workbook related operations //Save in Excel 97 – 2003 format workbook.Save(dataDir + "book1.out.xls"); //OR workbook.Save(dataDir + "book1.out.xls", new XlsSaveOptions(SaveFormat.Excel97To2003)); //ExEnd:1 } } }
mit
C#
44133a6857682a9a030eda03d3a3853cd5273962
Add [Serializable] attribute
dnm240/NSubstitute,dnm240/NSubstitute,dnm240/NSubstitute,dnm240/NSubstitute,dnm240/NSubstitute
Source/NSubstitute/Exceptions/CallSequenceNotFoundException.cs
Source/NSubstitute/Exceptions/CallSequenceNotFoundException.cs
using System.Runtime.Serialization; namespace NSubstitute.Exceptions { [Serializable] public class CallSequenceNotFoundException : SubstituteException { public CallSequenceNotFoundException(string message) : base(message) { } protected CallSequenceNotFoundException(SerializationInfo info, StreamingContext context) : base(info, context) { } } }
using System.Runtime.Serialization; namespace NSubstitute.Exceptions { public class CallSequenceNotFoundException : SubstituteException { public CallSequenceNotFoundException(string message) : base(message) { } protected CallSequenceNotFoundException(SerializationInfo info, StreamingContext context) : base(info, context) { } } }
bsd-3-clause
C#
5e763c90eec6b84f5ee25d3b6e9cfb1b413f4e05
Fix tabs
twilio/twilio-csharp
Twilio/Exceptions/RestException.cs
Twilio/Exceptions/RestException.cs
using Newtonsoft.Json; namespace Twilio.Exceptions { [JsonObject(MemberSerialization.OptIn)] public class RestException : TwilioException { [JsonProperty("code")] public int Code { get; private set; } [JsonProperty("status")] public int Status { get; private set; } [JsonProperty("message")] public string Body { get; private set; } [JsonProperty("more_info")] public string MoreInfo { get; private set; } public RestException() {} private RestException( [JsonProperty("status")] int status, [JsonProperty("message")] string message, [JsonProperty("code")] int code, [JsonProperty("more_info")] string moreInfo ) { Status = status; Code = code; Body = message; MoreInfo = moreInfo; } public static RestException FromJson(string json) { return JsonConvert.DeserializeObject<RestException>(json); } } }
using System.Runtime.Serialization; using Newtonsoft.Json; namespace Twilio.Exceptions { [JsonObject(MemberSerialization.OptIn)] public class RestException : TwilioException { [JsonProperty("code")] public int Code { get; private set; } [JsonProperty("status")] public int Status { get; private set; } [JsonProperty("message")] public string Body { get; private set; } [JsonProperty("more_info")] public string MoreInfo { get; private set; } public RestException() {} private RestException( [JsonProperty("status")] int status, [JsonProperty("message")] string message, [JsonProperty("code")] int code, [JsonProperty("more_info")] string moreInfo ) { Status = status; Code = code; Body = message; MoreInfo = moreInfo; } public static RestException FromJson(string json) { return JsonConvert.DeserializeObject<RestException>(json); } } }
mit
C#
cab11cd54675801881250dd7f7ac84eadd7c4c98
Update WpfBrushCache.cs
wieslawsoltes/Draw2D,wieslawsoltes/Draw2D,wieslawsoltes/Draw2D
src/Draw2D.Wpf/Renderers/WpfBrushCache.cs
src/Draw2D.Wpf/Renderers/WpfBrushCache.cs
// Copyright (c) Wiesław Šoltés. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. using System.Windows.Media; using Draw2D.Core.Style; namespace Draw2D.Wpf.Renderers { public struct WpfBrushCache : IDisposable { public readonly Brush Stroke; public readonly Pen StrokePen; public readonly Brush Fill; public WpfBrushCache(Brush stroke, Pen strokePen, Brush fill) { this.Stroke = stroke; this.StrokePen = strokePen; this.Fill = fill; } public void Dispose() { } public static Color FromDrawColor(DrawColor color) { return Color.FromArgb(color.A, color.R, color.G, color.B); } public static WpfBrushCache FromDrawStyle(DrawStyle style) { Brush stroke = null; Pen strokePen = null; Brush fill = null; if (style.Stroke != null) { stroke = new SolidColorBrush(FromDrawColor(style.Stroke)); strokePen = new Pen(stroke, style.Thickness); stroke.Freeze(); strokePen.Freeze(); } if (style.Fill != null) { fill = new SolidColorBrush(FromDrawColor(style.Fill)); fill.Freeze(); } return new WpfBrushCache(stroke, strokePen, fill); } } }
// Copyright (c) Wiesław Šoltés. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. using System.Windows.Media; using Draw2D.Core.Style; namespace Draw2D.Wpf.Renderers { public struct WpfBrushCache { public readonly Brush Stroke; public readonly Pen StrokePen; public readonly Brush Fill; public WpfBrushCache(Brush stroke, Pen strokePen, Brush fill) { this.Stroke = stroke; this.StrokePen = strokePen; this.Fill = fill; } public static Color FromDrawColor(DrawColor color) { return Color.FromArgb(color.A, color.R, color.G, color.B); } public static WpfBrushCache FromDrawStyle(DrawStyle style) { var stroke = new SolidColorBrush(FromDrawColor(style.Stroke)); var strokePen = new Pen(stroke, style.Thickness); var fill = new SolidColorBrush(FromDrawColor(style.Fill)); stroke.Freeze(); strokePen.Freeze(); fill.Freeze(); return new WpfBrushCache(stroke, strokePen, fill); } } }
mit
C#
5c86a5122ae9a45d561f825d5d219352d1be8004
Update MergeConflict.cs
planetxamarin/planetxamarin,planetxamarin/planetxamarin,planetxamarin/planetxamarin,planetxamarin/planetxamarin
src/Firehose.Web/Authors/MergeConflict.cs
src/Firehose.Web/Authors/MergeConflict.cs
using System; using System.Collections.Generic; using Firehose.Web.Infrastructure; namespace Firehose.Web.Authors { public class MergeConflict : IAmACommunityMember { public string FirstName => "Merge"; public string LastName => "Conflict"; public string StateOrRegion => "Seattle, WA"; public string EmailAddress => "mergeconflictfm@gmail.com"; public string ShortBioOrTagLine => "is a weekly development podcast hosted by Frank Krueger and James Montemagno."; public Uri WebSite => new Uri("http://mergeconflict.fm"); public IEnumerable<Uri> FeedUris { get { yield return new Uri("http://www.mergeconflict.fm/rss"); } } public string TwitterHandle => "MergeConflictFM"; public string GravatarHash => "24527eb9b29a8adbfc4155db4044dd3c"; public string GitHubHandle => string.Empty; public GeoPosition Position => new GeoPosition(47.6062100, -122.3320710); } }
using System; using System.Collections.Generic; using Firehose.Web.Infrastructure; namespace Firehose.Web.Authors { public class MergeConflict : IAmACommunityMember { public string FirstName => "Merge"; public string LastName => "Conflict"; public string StateOrRegion => "Seattle, WA"; public string EmailAddress => "mergeconflictfm@gmail.com"; public string ShortBioOrTagLine => "is a weekly development podcast hosted by Frank Krueger and James Montemagno."; public Uri WebSite => new Uri("http://mergeconflict.fm"); public IEnumerable<Uri> FeedUris { get { yield return new Uri("http://simplecast.com/podcasts/2117/rss"); } } public string TwitterHandle => "MergeConflictFM"; public string GravatarHash => "24527eb9b29a8adbfc4155db4044dd3c"; public string GitHubHandle => string.Empty; public GeoPosition Position => new GeoPosition(47.6062100, -122.3320710); } }
mit
C#
b353277fa09f1b6f96ba6152830154fcb56f5715
Add default rootpathprovider
thesheps/lemonade,thesheps/lemonade,thesheps/lemonade
src/Lemonade.Web/LemonadeBooststrapper.cs
src/Lemonade.Web/LemonadeBooststrapper.cs
using System; using System.Collections.Generic; using Lemonade.Web.Modules; using Nancy; using Nancy.Bootstrapper; using Nancy.Hosting.Aspnet; using Nancy.TinyIoc; using Nancy.ViewEngines; using Nancy.ViewEngines.Razor; namespace Lemonade.Web { public abstract class LemonadeBootstrapper : DefaultNancyBootstrapper { protected override void ConfigureApplicationContainer(TinyIoCContainer container) { base.ConfigureApplicationContainer(container); ResourceViewLocationProvider.RootNamespaces.Clear(); ResourceViewLocationProvider.RootNamespaces.Add(typeof(FeatureModule).Assembly, "Lemonade.Web.Views"); ConfigureDependencies(container); } protected override NancyInternalConfiguration InternalConfiguration { get { return NancyInternalConfiguration.WithOverrides(nic => nic.ViewLocationProvider = typeof(ResourceViewLocationProvider)); } } protected override IEnumerable<Type> ViewEngines { get { yield return typeof(RazorViewEngine); } } protected override IRootPathProvider RootPathProvider => new AspNetRootPathProvider(); protected abstract void ConfigureDependencies(TinyIoCContainer container); } }
using System; using System.Collections.Generic; using Lemonade.Web.Modules; using Nancy; using Nancy.Bootstrapper; using Nancy.TinyIoc; using Nancy.ViewEngines; using Nancy.ViewEngines.Razor; namespace Lemonade.Web { public abstract class LemonadeBootstrapper : DefaultNancyBootstrapper { protected override void ConfigureApplicationContainer(TinyIoCContainer container) { base.ConfigureApplicationContainer(container); ResourceViewLocationProvider.RootNamespaces.Clear(); ResourceViewLocationProvider.RootNamespaces.Add(typeof(FeatureModule).Assembly, "Lemonade.Web.Views"); ConfigureDependencies(container); } protected abstract void ConfigureDependencies(TinyIoCContainer container); protected override NancyInternalConfiguration InternalConfiguration { get { return NancyInternalConfiguration.WithOverrides(nic => nic.ViewLocationProvider = typeof(ResourceViewLocationProvider)); } } protected override IEnumerable<Type> ViewEngines { get { yield return typeof(RazorViewEngine); } } } }
mit
C#
5b0010a95f4aede0b163c06a0e801ad3b3a746d4
fix timing project
wallymathieu/with
src/Timing/Copy_update_single_property.cs
src/Timing/Copy_update_single_property.cs
using System; using With; using BenchmarkDotNet.Attributes; using With.Lenses; namespace Timing { public class Copy_update_single_property { private static readonly Customer _myClass = new Customer(1, "2", new[] { "t" }); private static readonly DataLens<Customer, string> _myClassPreparedCopy = LensBuilder<Customer>.Of(m => m.Name).Build(); [Benchmark] public void Using_static_prepered_copy_expression() { var time = new DateTime(2001, 1, 1).AddMinutes(2); var res = _myClassPreparedCopy.Write(_myClass, time.ToString()); } [Benchmark] public void Hand_written_method_returning_new_instance() { var time = new DateTime(2001, 1, 1).AddMinutes(2); var res = _myClass.SetName(time.ToString()); } [Benchmark] public void Language_ext_generated() { var time = new DateTime(2001, 1, 1).AddMinutes(2); var res = _myClass.With(Name:time.ToString()); } } }
using System; using With; using BenchmarkDotNet.Attributes; namespace Timing { public class Copy_update_single_property { private static readonly Customer _myClass = new Customer(1, "2", new[] { "t" }); private static readonly IPreparedCopy<Customer, string> _myClassPreparedCopy = Prepare.Copy<Customer, string>((m, v) => m.Name == v); [Benchmark] public void Using_static_prepered_copy_expression() { var time = new DateTime(2001, 1, 1).AddMinutes(2); var res = _myClassPreparedCopy.Copy(_myClass, time.ToString()); } [Benchmark] public void Hand_written_method_returning_new_instance() { var time = new DateTime(2001, 1, 1).AddMinutes(2); var res = _myClass.SetName(time.ToString()); } [Benchmark] public void Language_ext_generated() { var time = new DateTime(2001, 1, 1).AddMinutes(2); var res = _myClass.With(Name:time.ToString()); } } }
mit
C#
e7d07bd4172ff8cf552adc735748c2bb48248864
Refactor pagination to a common base class
simonray/Acme.Helpers,simonray/Acme.Helpers
src/Acme.Helpers/Alignment.cs
src/Acme.Helpers/Alignment.cs
 namespace Acme.Helpers { /// <summary> /// Horizontal alignment options. /// </summary> public enum HorizontalAlignment { Left, Right, } }
 namespace Acme.Helpers { /// <summary> /// Horizontal alignment options. /// </summary> public enum HorizontalAlignment { Left, Right, } public enum PagerVerticalAlignment { Top, Bottom, Both } }
mit
C#
60d59e458c3ae503a0b53e9bbcb42531adfdfd56
Fix sniper rifle projectile impact sound.
fr1tz/rotc-ethernet-game,fr1tz/rotc-ethernet-game,fr1tz/rotc-ethernet-game,fr1tz/rotc-ethernet-game
ethernet/server/scripts/weapons/sniperrifle/sniperrifle.sfx.cs
ethernet/server/scripts/weapons/sniperrifle/sniperrifle.sfx.cs
//------------------------------------------------------------------------------ // Revenge Of The Cats: Ethernet // Copyright (C) 2009, mEthLab Interactive //------------------------------------------------------------------------------ //------------------------------------------------------------------------------ // Revenge Of The Cats - sniperrifle.sfx.cs // Sounds for the sniper rifle //------------------------------------------------------------------------------ datablock AudioProfile(SniperRifleTargetSound) { filename = "~/data/weapons/sniperrifle/sound.target.wav"; description = AudioCloseLooping3D; preload = true; }; datablock AudioProfile(SniperRifleTargetAquiredSound) { filename = "~/data/weapons/sniperrifle/sound.targetaquired.wav"; description = AudioCloseLooping3D; preload = true; }; datablock AudioProfile(SniperRifleFireSound) { filename = "~/data/weapons/sniperrifle/sound_fire.wav"; description = AudioDefault3D; preload = true; }; datablock AudioProfile(SniperExplosionSound) { filename = "~/data/weapons/sniperrifle/sound.explosion.wav"; description = AudioFar3D; preload = true; }; datablock AudioProfile(SniperDebrisSound) { filename = "~/data/weapons/sniperrifle/sound.debris.wav"; description = AudioDefault3D; preload = true; }; datablock AudioProfile(SniperNearEnemyExplosionSound) { filename = "~/data/weapons/sniperrifle/sound.nearenemyexp.wav"; description = AudioDefault3D; preload = true; }; datablock AudioProfile(SniperPowerUpSound) { filename = "~/data/weapons/sniperrifle/sound.charge.wav"; description = AudioClose3D; preload = true; }; datablock AudioProfile(SniperPowerDownSound) { filename = "~/data/weapons/sniperrifle/sound.noammo.wav"; description = AudioClose3D; preload = true; }; datablock AudioProfile(SniperProjectileImpactSound) { filename = "~/data/weapons/blaster/sound_impact.wav"; description = AudioDefault3D; preload = true; }; datablock AudioProfile(SniperProjectileMissedEnemySound) { filename = "~/data/weapons/blaster/sound_flyby.wav"; description = AudioClose3D; preload = true; };
//------------------------------------------------------------------------------ // Revenge Of The Cats: Ethernet // Copyright (C) 2009, mEthLab Interactive //------------------------------------------------------------------------------ //------------------------------------------------------------------------------ // Revenge Of The Cats - sniperrifle.sfx.cs // Sounds for the sniper rifle //------------------------------------------------------------------------------ datablock AudioProfile(SniperRifleTargetSound) { filename = "~/data/weapons/sniperrifle/sound.target.wav"; description = AudioCloseLooping3D; preload = true; }; datablock AudioProfile(SniperRifleTargetAquiredSound) { filename = "~/data/weapons/sniperrifle/sound.targetaquired.wav"; description = AudioCloseLooping3D; preload = true; }; datablock AudioProfile(SniperRifleFireSound) { filename = "~/data/weapons/sniperrifle/sound_fire.wav"; description = AudioDefault3D; preload = true; }; datablock AudioProfile(SniperExplosionSound) { filename = "~/data/weapons/sniperrifle/sound.explosion.wav"; description = AudioFar3D; preload = true; }; datablock AudioProfile(SniperDebrisSound) { filename = "~/data/weapons/sniperrifle/sound.debris.wav"; description = AudioDefault3D; preload = true; }; datablock AudioProfile(SniperNearEnemyExplosionSound) { filename = "~/data/weapons/sniperrifle/sound.nearenemyexp.wav"; description = AudioDefault3D; preload = true; }; datablock AudioProfile(SniperPowerUpSound) { filename = "~/data/weapons/sniperrifle/sound.charge.wav"; description = AudioClose3D; preload = true; }; datablock AudioProfile(SniperPowerDownSound) { filename = "~/data/weapons/sniperrifle/sound.noammo.wav"; description = AudioClose3D; preload = true; }; datablock AudioProfile(SniperProjectileMissedEnemySound) { filename = "~/data/weapons/blaster/sound_flyby.wav"; description = AudioClose3D; preload = true; };
lgpl-2.1
C#
665153ab0cdb06d8227e5b8e0bbd0e0a5bf429ca
Fix pragma warning restore (dotnet/coreclr#26389)
ericstj/corefx,shimingsg/corefx,ViktorHofer/corefx,shimingsg/corefx,shimingsg/corefx,ericstj/corefx,shimingsg/corefx,ViktorHofer/corefx,ericstj/corefx,ViktorHofer/corefx,ViktorHofer/corefx,wtgodbe/corefx,ericstj/corefx,wtgodbe/corefx,wtgodbe/corefx,shimingsg/corefx,wtgodbe/corefx,wtgodbe/corefx,wtgodbe/corefx,shimingsg/corefx,shimingsg/corefx,ViktorHofer/corefx,ericstj/corefx,ericstj/corefx,ViktorHofer/corefx,wtgodbe/corefx,ViktorHofer/corefx,ericstj/corefx
src/Common/src/CoreLib/System/ByReference.cs
src/Common/src/CoreLib/System/ByReference.cs
// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. using System.Runtime.CompilerServices; using System.Runtime.Versioning; namespace System { // ByReference<T> is meant to be used to represent "ref T" fields. It is working // around lack of first class support for byref fields in C# and IL. The JIT and // type loader has special handling for it that turns it into a thin wrapper around ref T. [NonVersionable] internal ref struct ByReference<T> { // CS0169: The private field '{blah}' is never used #pragma warning disable 169 #pragma warning disable CA1823 private readonly IntPtr _value; #pragma warning restore CA1823 #pragma warning restore 169 [Intrinsic] public ByReference(ref T value) { // Implemented as a JIT intrinsic - This default implementation is for // completeness and to provide a concrete error if called via reflection // or if intrinsic is missed. throw new PlatformNotSupportedException(); } public ref T Value { [Intrinsic] get { // Implemented as a JIT intrinsic - This default implementation is for // completeness and to provide a concrete error if called via reflection // or if the intrinsic is missed. throw new PlatformNotSupportedException(); } } } }
// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. using System.Runtime.CompilerServices; using System.Runtime.Versioning; namespace System { // ByReference<T> is meant to be used to represent "ref T" fields. It is working // around lack of first class support for byref fields in C# and IL. The JIT and // type loader has special handling for it that turns it into a thin wrapper around ref T. [NonVersionable] internal ref struct ByReference<T> { // CS0169: The private field '{blah}' is never used #pragma warning disable 169 #pragma warning disable CA1823 private readonly IntPtr _value; #pragma warning disable CA1823 #pragma warning restore 169 [Intrinsic] public ByReference(ref T value) { // Implemented as a JIT intrinsic - This default implementation is for // completeness and to provide a concrete error if called via reflection // or if intrinsic is missed. throw new PlatformNotSupportedException(); } public ref T Value { [Intrinsic] get { // Implemented as a JIT intrinsic - This default implementation is for // completeness and to provide a concrete error if called via reflection // or if the intrinsic is missed. throw new PlatformNotSupportedException(); } } } }
mit
C#
4fe77646cd5bfcbc6c17e80f926684bec43c8331
Replace registered type if someone tries to register the type again
simonbaas/EasyZMq,simonbaas/EasyZMq
src/EasyZMq/Infrastructure/SuperSimpleIoC.cs
src/EasyZMq/Infrastructure/SuperSimpleIoC.cs
using System; using System.Collections.Generic; using System.Linq; namespace EasyZMq.Infrastructure { internal class SuperSimpleIoC { private readonly Dictionary<Type, RegisteredObject> _configItems = new Dictionary<Type, RegisteredObject>(); public void Register<T, TU>() where TU : T { var typeToResolve = typeof (T); if (_configItems.ContainsKey(typeToResolve)) _configItems.Remove(typeToResolve); var configItem = new RegisteredObject { TypeToResolve = typeToResolve, ConcreteType = typeof(TU) }; _configItems.Add(typeof(T), configItem); } public void Register<T>(Func<T> createInstance) { var typeToResolve = typeof(T); if (_configItems.ContainsKey(typeToResolve)) _configItems.Remove(typeToResolve); var instance = createInstance(); var configItem = new RegisteredObject { TypeToResolve = typeToResolve, ConcreteType = instance.GetType(), Instance = instance }; _configItems.Add(typeof(T), configItem); } public T Resolve<T>() { return (T)Resolve(typeof(T)); } private object Resolve(Type type) { if (!_configItems.ContainsKey(type)) return null; var configItem = _configItems[type]; if (configItem.Instance != null) return configItem.Instance; var parameters = ResolveConstructorParameters(configItem.ConcreteType).ToArray(); configItem.Instance = Activator.CreateInstance(configItem.ConcreteType, parameters); return configItem.Instance; } private IEnumerable<object> ResolveConstructorParameters(Type concreteType) { var constructorInfo = concreteType.GetConstructors().First(); return constructorInfo.GetParameters().Select(parameterInfo => Resolve(parameterInfo.ParameterType)); } private class RegisteredObject { public Type TypeToResolve { get; set; } public Type ConcreteType { get; set; } public dynamic Instance { get; set; } } } }
using System; using System.Collections.Generic; using System.Linq; namespace EasyZMq.Infrastructure { internal class SuperSimpleIoC { private readonly Dictionary<Type, RegisteredObject> _configItems = new Dictionary<Type, RegisteredObject>(); public void Register<T, TU>() where TU : T { if (_configItems.ContainsKey(typeof(T))) return; var configItem = new RegisteredObject { TypeToResolve = typeof(T), ConcreteType = typeof(TU) }; _configItems.Add(typeof(T), configItem); } public void Register<T>(Func<T> createInstance) { if (_configItems.ContainsKey(typeof(T))) return; var instance = createInstance(); var configItem = new RegisteredObject { TypeToResolve = typeof(T), ConcreteType = instance.GetType(), Instance = instance }; _configItems.Add(typeof(T), configItem); } public T Resolve<T>() { return (T)Resolve(typeof(T)); } private object Resolve(Type type) { if (!_configItems.ContainsKey(type)) return null; var configItem = _configItems[type]; if (configItem.Instance != null) return configItem.Instance; var parameters = ResolveConstructorParameters(configItem.ConcreteType).ToArray(); configItem.Instance = Activator.CreateInstance(configItem.ConcreteType, parameters); return configItem.Instance; } private IEnumerable<object> ResolveConstructorParameters(Type concreteType) { var constructorInfo = concreteType.GetConstructors().First(); return constructorInfo.GetParameters().Select(parameterInfo => Resolve(parameterInfo.ParameterType)); } } internal class RegisteredObject { public Type TypeToResolve { get; set; } public Type ConcreteType { get; set; } public dynamic Instance { get; set; } } }
apache-2.0
C#
2e274dd721d1f281f401c2bdde7767d9bf1e331b
Set improved ThreadPool values for nancy
raziel057/FrameworkBenchmarks,nbrady-techempower/FrameworkBenchmarks,ratpack/FrameworkBenchmarks,mfirry/FrameworkBenchmarks,markkolich/FrameworkBenchmarks,jaguililla/FrameworkBenchmarks,waiteb3/FrameworkBenchmarks,martin-g/FrameworkBenchmarks,zloster/FrameworkBenchmarks,yunspace/FrameworkBenchmarks,hperadin/FrameworkBenchmarks,seem-sky/FrameworkBenchmarks,mfirry/FrameworkBenchmarks,markkolich/FrameworkBenchmarks,sgml/FrameworkBenchmarks,kbrock/FrameworkBenchmarks,doom369/FrameworkBenchmarks,Verber/FrameworkBenchmarks,sxend/FrameworkBenchmarks,Rydgel/FrameworkBenchmarks,PermeAgility/FrameworkBenchmarks,lcp0578/FrameworkBenchmarks,jetty-project/FrameworkBenchmarks,jetty-project/FrameworkBenchmarks,greg-hellings/FrameworkBenchmarks,Rydgel/FrameworkBenchmarks,youprofit/FrameworkBenchmarks,zhuochenKIDD/FrameworkBenchmarks,s-ludwig/FrameworkBenchmarks,nathana1/FrameworkBenchmarks,greg-hellings/FrameworkBenchmarks,steveklabnik/FrameworkBenchmarks,marko-asplund/FrameworkBenchmarks,MTDdk/FrameworkBenchmarks,psfblair/FrameworkBenchmarks,jeevatkm/FrameworkBenchmarks,psfblair/FrameworkBenchmarks,greenlaw110/FrameworkBenchmarks,sxend/FrameworkBenchmarks,knewmanTE/FrameworkBenchmarks,thousandsofthem/FrameworkBenchmarks,ratpack/FrameworkBenchmarks,kbrock/FrameworkBenchmarks,zane-techempower/FrameworkBenchmarks,grob/FrameworkBenchmarks,zapov/FrameworkBenchmarks,sanjoydesk/FrameworkBenchmarks,stefanocasazza/FrameworkBenchmarks,zapov/FrameworkBenchmarks,marko-asplund/FrameworkBenchmarks,valyala/FrameworkBenchmarks,saturday06/FrameworkBenchmarks,leafo/FrameworkBenchmarks,thousandsofthem/FrameworkBenchmarks,Verber/FrameworkBenchmarks,zloster/FrameworkBenchmarks,Rydgel/FrameworkBenchmarks,leafo/FrameworkBenchmarks,denkab/FrameworkBenchmarks,kostya-sh/FrameworkBenchmarks,hperadin/FrameworkBenchmarks,waiteb3/FrameworkBenchmarks,ashawnbandy-te-tfb/FrameworkBenchmarks,nkasvosve/FrameworkBenchmarks,martin-g/FrameworkBenchmarks,actframework/FrameworkBenchmarks,jetty-project/FrameworkBenchmarks,jebbstewart/FrameworkBenchmarks,raziel057/FrameworkBenchmarks,PermeAgility/FrameworkBenchmarks,Ocramius/FrameworkBenchmarks,greenlaw110/FrameworkBenchmarks,sanjoydesk/FrameworkBenchmarks,julienschmidt/FrameworkBenchmarks,nbrady-techempower/FrameworkBenchmarks,sagenschneider/FrameworkBenchmarks,dmacd/FB-try1,RockinRoel/FrameworkBenchmarks,circlespainter/FrameworkBenchmarks,jamming/FrameworkBenchmarks,greg-hellings/FrameworkBenchmarks,markkolich/FrameworkBenchmarks,zapov/FrameworkBenchmarks,diablonhn/FrameworkBenchmarks,jaguililla/FrameworkBenchmarks,Eyepea/FrameworkBenchmarks,markkolich/FrameworkBenchmarks,sagenschneider/FrameworkBenchmarks,thousandsofthem/FrameworkBenchmarks,victorbriz/FrameworkBenchmarks,Jesterovskiy/FrameworkBenchmarks,sanjoydesk/FrameworkBenchmarks,torhve/FrameworkBenchmarks,herloct/FrameworkBenchmarks,sagenschneider/FrameworkBenchmarks,thousandsofthem/FrameworkBenchmarks,martin-g/FrameworkBenchmarks,MTDdk/FrameworkBenchmarks,jetty-project/FrameworkBenchmarks,sgml/FrameworkBenchmarks,fabianmurariu/FrameworkBenchmarks,torhve/FrameworkBenchmarks,kellabyte/FrameworkBenchmarks,jetty-project/FrameworkBenchmarks,donovanmuller/FrameworkBenchmarks,julienschmidt/FrameworkBenchmarks,zloster/FrameworkBenchmarks,Eyepea/FrameworkBenchmarks,zloster/FrameworkBenchmarks,zdanek/FrameworkBenchmarks,greg-hellings/FrameworkBenchmarks,zane-techempower/FrameworkBenchmarks,jetty-project/FrameworkBenchmarks,circlespainter/FrameworkBenchmarks,xitrum-framework/FrameworkBenchmarks,marko-asplund/FrameworkBenchmarks,testn/FrameworkBenchmarks,knewmanTE/FrameworkBenchmarks,s-ludwig/FrameworkBenchmarks,hamiltont/FrameworkBenchmarks,alubbe/FrameworkBenchmarks,psfblair/FrameworkBenchmarks,raziel057/FrameworkBenchmarks,zane-techempower/FrameworkBenchmarks,xitrum-framework/FrameworkBenchmarks,zloster/FrameworkBenchmarks,jetty-project/FrameworkBenchmarks,donovanmuller/FrameworkBenchmarks,jetty-project/FrameworkBenchmarks,julienschmidt/FrameworkBenchmarks,nbrady-techempower/FrameworkBenchmarks,ratpack/FrameworkBenchmarks,sanjoydesk/FrameworkBenchmarks,ratpack/FrameworkBenchmarks,nbrady-techempower/FrameworkBenchmarks,Dith3r/FrameworkBenchmarks,zane-techempower/FrameworkBenchmarks,PermeAgility/FrameworkBenchmarks,kostya-sh/FrameworkBenchmarks,F3Community/FrameworkBenchmarks,testn/FrameworkBenchmarks,valyala/FrameworkBenchmarks,Rayne/FrameworkBenchmarks,Dith3r/FrameworkBenchmarks,denkab/FrameworkBenchmarks,dmacd/FB-try1,knewmanTE/FrameworkBenchmarks,valyala/FrameworkBenchmarks,s-ludwig/FrameworkBenchmarks,zapov/FrameworkBenchmarks,herloct/FrameworkBenchmarks,sanjoydesk/FrameworkBenchmarks,khellang/FrameworkBenchmarks,F3Community/FrameworkBenchmarks,donovanmuller/FrameworkBenchmarks,k-r-g/FrameworkBenchmarks,psfblair/FrameworkBenchmarks,sagenschneider/FrameworkBenchmarks,sgml/FrameworkBenchmarks,actframework/FrameworkBenchmarks,MTDdk/FrameworkBenchmarks,greenlaw110/FrameworkBenchmarks,nkasvosve/FrameworkBenchmarks,steveklabnik/FrameworkBenchmarks,jamming/FrameworkBenchmarks,fabianmurariu/FrameworkBenchmarks,thousandsofthem/FrameworkBenchmarks,PermeAgility/FrameworkBenchmarks,Eyepea/FrameworkBenchmarks,marko-asplund/FrameworkBenchmarks,jaguililla/FrameworkBenchmarks,doom369/FrameworkBenchmarks,herloct/FrameworkBenchmarks,Rydgel/FrameworkBenchmarks,hamiltont/FrameworkBenchmarks,sxend/FrameworkBenchmarks,hamiltont/FrameworkBenchmarks,ratpack/FrameworkBenchmarks,actframework/FrameworkBenchmarks,yunspace/FrameworkBenchmarks,zdanek/FrameworkBenchmarks,zapov/FrameworkBenchmarks,jamming/FrameworkBenchmarks,sagenschneider/FrameworkBenchmarks,torhve/FrameworkBenchmarks,ashawnbandy-te-tfb/FrameworkBenchmarks,nkasvosve/FrameworkBenchmarks,nathana1/FrameworkBenchmarks,torhve/FrameworkBenchmarks,sanjoydesk/FrameworkBenchmarks,PermeAgility/FrameworkBenchmarks,stefanocasazza/FrameworkBenchmarks,nathana1/FrameworkBenchmarks,circlespainter/FrameworkBenchmarks,saturday06/FrameworkBenchmarks,knewmanTE/FrameworkBenchmarks,nbrady-techempower/FrameworkBenchmarks,Eyepea/FrameworkBenchmarks,xitrum-framework/FrameworkBenchmarks,jamming/FrameworkBenchmarks,kellabyte/FrameworkBenchmarks,julienschmidt/FrameworkBenchmarks,yunspace/FrameworkBenchmarks,joshk/FrameworkBenchmarks,Rayne/FrameworkBenchmarks,knewmanTE/FrameworkBenchmarks,jamming/FrameworkBenchmarks,MTDdk/FrameworkBenchmarks,joshk/FrameworkBenchmarks,dmacd/FB-try1,dmacd/FB-try1,sanjoydesk/FrameworkBenchmarks,herloct/FrameworkBenchmarks,Jesterovskiy/FrameworkBenchmarks,s-ludwig/FrameworkBenchmarks,seem-sky/FrameworkBenchmarks,doom369/FrameworkBenchmarks,herloct/FrameworkBenchmarks,Eyepea/FrameworkBenchmarks,raziel057/FrameworkBenchmarks,greenlaw110/FrameworkBenchmarks,Eyepea/FrameworkBenchmarks,grob/FrameworkBenchmarks,markkolich/FrameworkBenchmarks,F3Community/FrameworkBenchmarks,doom369/FrameworkBenchmarks,martin-g/FrameworkBenchmarks,waiteb3/FrameworkBenchmarks,donovanmuller/FrameworkBenchmarks,testn/FrameworkBenchmarks,sxend/FrameworkBenchmarks,valyala/FrameworkBenchmarks,steveklabnik/FrameworkBenchmarks,torhve/FrameworkBenchmarks,kellabyte/FrameworkBenchmarks,yunspace/FrameworkBenchmarks,greg-hellings/FrameworkBenchmarks,thousandsofthem/FrameworkBenchmarks,fabianmurariu/FrameworkBenchmarks,doom369/FrameworkBenchmarks,dmacd/FB-try1,dmacd/FB-try1,nbrady-techempower/FrameworkBenchmarks,Verber/FrameworkBenchmarks,greenlaw110/FrameworkBenchmarks,ashawnbandy-te-tfb/FrameworkBenchmarks,psfblair/FrameworkBenchmarks,Dith3r/FrameworkBenchmarks,waiteb3/FrameworkBenchmarks,PermeAgility/FrameworkBenchmarks,marko-asplund/FrameworkBenchmarks,sxend/FrameworkBenchmarks,ashawnbandy-te-tfb/FrameworkBenchmarks,markkolich/FrameworkBenchmarks,zapov/FrameworkBenchmarks,herloct/FrameworkBenchmarks,nkasvosve/FrameworkBenchmarks,sagenschneider/FrameworkBenchmarks,youprofit/FrameworkBenchmarks,k-r-g/FrameworkBenchmarks,seem-sky/FrameworkBenchmarks,Jesterovskiy/FrameworkBenchmarks,yunspace/FrameworkBenchmarks,kbrock/FrameworkBenchmarks,alubbe/FrameworkBenchmarks,yunspace/FrameworkBenchmarks,Rayne/FrameworkBenchmarks,nathana1/FrameworkBenchmarks,nathana1/FrameworkBenchmarks,hperadin/FrameworkBenchmarks,donovanmuller/FrameworkBenchmarks,zloster/FrameworkBenchmarks,jamming/FrameworkBenchmarks,fabianmurariu/FrameworkBenchmarks,sagenschneider/FrameworkBenchmarks,k-r-g/FrameworkBenchmarks,RockinRoel/FrameworkBenchmarks,diablonhn/FrameworkBenchmarks,lcp0578/FrameworkBenchmarks,zhuochenKIDD/FrameworkBenchmarks,zhuochenKIDD/FrameworkBenchmarks,k-r-g/FrameworkBenchmarks,fabianmurariu/FrameworkBenchmarks,mfirry/FrameworkBenchmarks,youprofit/FrameworkBenchmarks,Rayne/FrameworkBenchmarks,markkolich/FrameworkBenchmarks,actframework/FrameworkBenchmarks,sgml/FrameworkBenchmarks,alubbe/FrameworkBenchmarks,markkolich/FrameworkBenchmarks,kostya-sh/FrameworkBenchmarks,testn/FrameworkBenchmarks,doom369/FrameworkBenchmarks,victorbriz/FrameworkBenchmarks,raziel057/FrameworkBenchmarks,RockinRoel/FrameworkBenchmarks,seem-sky/FrameworkBenchmarks,dmacd/FB-try1,ratpack/FrameworkBenchmarks,mfirry/FrameworkBenchmarks,seem-sky/FrameworkBenchmarks,mfirry/FrameworkBenchmarks,seem-sky/FrameworkBenchmarks,kellabyte/FrameworkBenchmarks,s-ludwig/FrameworkBenchmarks,Verber/FrameworkBenchmarks,jeevatkm/FrameworkBenchmarks,xitrum-framework/FrameworkBenchmarks,dmacd/FB-try1,RockinRoel/FrameworkBenchmarks,MTDdk/FrameworkBenchmarks,sagenschneider/FrameworkBenchmarks,greg-hellings/FrameworkBenchmarks,mfirry/FrameworkBenchmarks,Verber/FrameworkBenchmarks,victorbriz/FrameworkBenchmarks,hamiltont/FrameworkBenchmarks,mfirry/FrameworkBenchmarks,Synchro/FrameworkBenchmarks,khellang/FrameworkBenchmarks,jeevatkm/FrameworkBenchmarks,zdanek/FrameworkBenchmarks,joshk/FrameworkBenchmarks,steveklabnik/FrameworkBenchmarks,ashawnbandy-te-tfb/FrameworkBenchmarks,s-ludwig/FrameworkBenchmarks,ratpack/FrameworkBenchmarks,yunspace/FrameworkBenchmarks,youprofit/FrameworkBenchmarks,doom369/FrameworkBenchmarks,Rayne/FrameworkBenchmarks,steveklabnik/FrameworkBenchmarks,jamming/FrameworkBenchmarks,saturday06/FrameworkBenchmarks,Verber/FrameworkBenchmarks,joshk/FrameworkBenchmarks,Synchro/FrameworkBenchmarks,valyala/FrameworkBenchmarks,sagenschneider/FrameworkBenchmarks,jeevatkm/FrameworkBenchmarks,Ocramius/FrameworkBenchmarks,methane/FrameworkBenchmarks,greg-hellings/FrameworkBenchmarks,jebbstewart/FrameworkBenchmarks,zdanek/FrameworkBenchmarks,diablonhn/FrameworkBenchmarks,torhve/FrameworkBenchmarks,Ocramius/FrameworkBenchmarks,leafo/FrameworkBenchmarks,marko-asplund/FrameworkBenchmarks,Rayne/FrameworkBenchmarks,khellang/FrameworkBenchmarks,MTDdk/FrameworkBenchmarks,zapov/FrameworkBenchmarks,RockinRoel/FrameworkBenchmarks,Dith3r/FrameworkBenchmarks,hperadin/FrameworkBenchmarks,zdanek/FrameworkBenchmarks,stefanocasazza/FrameworkBenchmarks,zane-techempower/FrameworkBenchmarks,jaguililla/FrameworkBenchmarks,julienschmidt/FrameworkBenchmarks,thousandsofthem/FrameworkBenchmarks,kellabyte/FrameworkBenchmarks,julienschmidt/FrameworkBenchmarks,actframework/FrameworkBenchmarks,hamiltont/FrameworkBenchmarks,markkolich/FrameworkBenchmarks,marko-asplund/FrameworkBenchmarks,torhve/FrameworkBenchmarks,Synchro/FrameworkBenchmarks,zdanek/FrameworkBenchmarks,sxend/FrameworkBenchmarks,victorbriz/FrameworkBenchmarks,k-r-g/FrameworkBenchmarks,martin-g/FrameworkBenchmarks,leafo/FrameworkBenchmarks,MTDdk/FrameworkBenchmarks,valyala/FrameworkBenchmarks,sagenschneider/FrameworkBenchmarks,s-ludwig/FrameworkBenchmarks,stefanocasazza/FrameworkBenchmarks,PermeAgility/FrameworkBenchmarks,Eyepea/FrameworkBenchmarks,jaguililla/FrameworkBenchmarks,doom369/FrameworkBenchmarks,zane-techempower/FrameworkBenchmarks,julienschmidt/FrameworkBenchmarks,lcp0578/FrameworkBenchmarks,julienschmidt/FrameworkBenchmarks,waiteb3/FrameworkBenchmarks,Rayne/FrameworkBenchmarks,Dith3r/FrameworkBenchmarks,zhuochenKIDD/FrameworkBenchmarks,mfirry/FrameworkBenchmarks,kostya-sh/FrameworkBenchmarks,sanjoydesk/FrameworkBenchmarks,Verber/FrameworkBenchmarks,youprofit/FrameworkBenchmarks,testn/FrameworkBenchmarks,xitrum-framework/FrameworkBenchmarks,sgml/FrameworkBenchmarks,kbrock/FrameworkBenchmarks,saturday06/FrameworkBenchmarks,Dith3r/FrameworkBenchmarks,leafo/FrameworkBenchmarks,steveklabnik/FrameworkBenchmarks,kbrock/FrameworkBenchmarks,knewmanTE/FrameworkBenchmarks,jamming/FrameworkBenchmarks,testn/FrameworkBenchmarks,actframework/FrameworkBenchmarks,zloster/FrameworkBenchmarks,circlespainter/FrameworkBenchmarks,yunspace/FrameworkBenchmarks,stefanocasazza/FrameworkBenchmarks,xitrum-framework/FrameworkBenchmarks,hamiltont/FrameworkBenchmarks,sgml/FrameworkBenchmarks,seem-sky/FrameworkBenchmarks,nathana1/FrameworkBenchmarks,saturday06/FrameworkBenchmarks,stefanocasazza/FrameworkBenchmarks,Jesterovskiy/FrameworkBenchmarks,sanjoydesk/FrameworkBenchmarks,alubbe/FrameworkBenchmarks,actframework/FrameworkBenchmarks,Rydgel/FrameworkBenchmarks,lcp0578/FrameworkBenchmarks,herloct/FrameworkBenchmarks,marko-asplund/FrameworkBenchmarks,k-r-g/FrameworkBenchmarks,xitrum-framework/FrameworkBenchmarks,khellang/FrameworkBenchmarks,greg-hellings/FrameworkBenchmarks,grob/FrameworkBenchmarks,sxend/FrameworkBenchmarks,jaguililla/FrameworkBenchmarks,lcp0578/FrameworkBenchmarks,PermeAgility/FrameworkBenchmarks,methane/FrameworkBenchmarks,zapov/FrameworkBenchmarks,nkasvosve/FrameworkBenchmarks,hamiltont/FrameworkBenchmarks,testn/FrameworkBenchmarks,actframework/FrameworkBenchmarks,kellabyte/FrameworkBenchmarks,kbrock/FrameworkBenchmarks,martin-g/FrameworkBenchmarks,denkab/FrameworkBenchmarks,zdanek/FrameworkBenchmarks,waiteb3/FrameworkBenchmarks,zloster/FrameworkBenchmarks,zane-techempower/FrameworkBenchmarks,markkolich/FrameworkBenchmarks,jebbstewart/FrameworkBenchmarks,steveklabnik/FrameworkBenchmarks,steveklabnik/FrameworkBenchmarks,ratpack/FrameworkBenchmarks,Rayne/FrameworkBenchmarks,khellang/FrameworkBenchmarks,zloster/FrameworkBenchmarks,kbrock/FrameworkBenchmarks,saturday06/FrameworkBenchmarks,nbrady-techempower/FrameworkBenchmarks,greenlaw110/FrameworkBenchmarks,jebbstewart/FrameworkBenchmarks,dmacd/FB-try1,donovanmuller/FrameworkBenchmarks,xitrum-framework/FrameworkBenchmarks,saturday06/FrameworkBenchmarks,greg-hellings/FrameworkBenchmarks,xitrum-framework/FrameworkBenchmarks,MTDdk/FrameworkBenchmarks,kostya-sh/FrameworkBenchmarks,julienschmidt/FrameworkBenchmarks,martin-g/FrameworkBenchmarks,grob/FrameworkBenchmarks,Synchro/FrameworkBenchmarks,seem-sky/FrameworkBenchmarks,s-ludwig/FrameworkBenchmarks,zapov/FrameworkBenchmarks,actframework/FrameworkBenchmarks,thousandsofthem/FrameworkBenchmarks,stefanocasazza/FrameworkBenchmarks,kbrock/FrameworkBenchmarks,steveklabnik/FrameworkBenchmarks,saturday06/FrameworkBenchmarks,jebbstewart/FrameworkBenchmarks,xitrum-framework/FrameworkBenchmarks,thousandsofthem/FrameworkBenchmarks,seem-sky/FrameworkBenchmarks,martin-g/FrameworkBenchmarks,Rydgel/FrameworkBenchmarks,zloster/FrameworkBenchmarks,zane-techempower/FrameworkBenchmarks,hperadin/FrameworkBenchmarks,nathana1/FrameworkBenchmarks,youprofit/FrameworkBenchmarks,Synchro/FrameworkBenchmarks,F3Community/FrameworkBenchmarks,torhve/FrameworkBenchmarks,jamming/FrameworkBenchmarks,Rydgel/FrameworkBenchmarks,kbrock/FrameworkBenchmarks,waiteb3/FrameworkBenchmarks,methane/FrameworkBenchmarks,ratpack/FrameworkBenchmarks,valyala/FrameworkBenchmarks,circlespainter/FrameworkBenchmarks,sagenschneider/FrameworkBenchmarks,raziel057/FrameworkBenchmarks,zane-techempower/FrameworkBenchmarks,julienschmidt/FrameworkBenchmarks,jeevatkm/FrameworkBenchmarks,thousandsofthem/FrameworkBenchmarks,xitrum-framework/FrameworkBenchmarks,zloster/FrameworkBenchmarks,zdanek/FrameworkBenchmarks,khellang/FrameworkBenchmarks,sgml/FrameworkBenchmarks,ashawnbandy-te-tfb/FrameworkBenchmarks,MTDdk/FrameworkBenchmarks,Rydgel/FrameworkBenchmarks,sgml/FrameworkBenchmarks,fabianmurariu/FrameworkBenchmarks,joshk/FrameworkBenchmarks,F3Community/FrameworkBenchmarks,seem-sky/FrameworkBenchmarks,Dith3r/FrameworkBenchmarks,circlespainter/FrameworkBenchmarks,victorbriz/FrameworkBenchmarks,zapov/FrameworkBenchmarks,Jesterovskiy/FrameworkBenchmarks,knewmanTE/FrameworkBenchmarks,jaguililla/FrameworkBenchmarks,sgml/FrameworkBenchmarks,s-ludwig/FrameworkBenchmarks,joshk/FrameworkBenchmarks,Verber/FrameworkBenchmarks,youprofit/FrameworkBenchmarks,grob/FrameworkBenchmarks,martin-g/FrameworkBenchmarks,grob/FrameworkBenchmarks,methane/FrameworkBenchmarks,donovanmuller/FrameworkBenchmarks,jeevatkm/FrameworkBenchmarks,joshk/FrameworkBenchmarks,alubbe/FrameworkBenchmarks,kostya-sh/FrameworkBenchmarks,MTDdk/FrameworkBenchmarks,martin-g/FrameworkBenchmarks,jeevatkm/FrameworkBenchmarks,lcp0578/FrameworkBenchmarks,Dith3r/FrameworkBenchmarks,mfirry/FrameworkBenchmarks,doom369/FrameworkBenchmarks,stefanocasazza/FrameworkBenchmarks,MTDdk/FrameworkBenchmarks,knewmanTE/FrameworkBenchmarks,alubbe/FrameworkBenchmarks,yunspace/FrameworkBenchmarks,k-r-g/FrameworkBenchmarks,k-r-g/FrameworkBenchmarks,steveklabnik/FrameworkBenchmarks,greg-hellings/FrameworkBenchmarks,Rydgel/FrameworkBenchmarks,Eyepea/FrameworkBenchmarks,jetty-project/FrameworkBenchmarks,actframework/FrameworkBenchmarks,sxend/FrameworkBenchmarks,valyala/FrameworkBenchmarks,zane-techempower/FrameworkBenchmarks,knewmanTE/FrameworkBenchmarks,actframework/FrameworkBenchmarks,lcp0578/FrameworkBenchmarks,yunspace/FrameworkBenchmarks,circlespainter/FrameworkBenchmarks,circlespainter/FrameworkBenchmarks,Jesterovskiy/FrameworkBenchmarks,herloct/FrameworkBenchmarks,doom369/FrameworkBenchmarks,psfblair/FrameworkBenchmarks,xitrum-framework/FrameworkBenchmarks,greenlaw110/FrameworkBenchmarks,methane/FrameworkBenchmarks,zhuochenKIDD/FrameworkBenchmarks,raziel057/FrameworkBenchmarks,donovanmuller/FrameworkBenchmarks,jebbstewart/FrameworkBenchmarks,doom369/FrameworkBenchmarks,nbrady-techempower/FrameworkBenchmarks,nbrady-techempower/FrameworkBenchmarks,jamming/FrameworkBenchmarks,khellang/FrameworkBenchmarks,herloct/FrameworkBenchmarks,Jesterovskiy/FrameworkBenchmarks,Synchro/FrameworkBenchmarks,testn/FrameworkBenchmarks,grob/FrameworkBenchmarks,julienschmidt/FrameworkBenchmarks,nkasvosve/FrameworkBenchmarks,zane-techempower/FrameworkBenchmarks,markkolich/FrameworkBenchmarks,kbrock/FrameworkBenchmarks,martin-g/FrameworkBenchmarks,RockinRoel/FrameworkBenchmarks,nathana1/FrameworkBenchmarks,sanjoydesk/FrameworkBenchmarks,ashawnbandy-te-tfb/FrameworkBenchmarks,khellang/FrameworkBenchmarks,sxend/FrameworkBenchmarks,zhuochenKIDD/FrameworkBenchmarks,diablonhn/FrameworkBenchmarks,marko-asplund/FrameworkBenchmarks,herloct/FrameworkBenchmarks,greenlaw110/FrameworkBenchmarks,Jesterovskiy/FrameworkBenchmarks,sgml/FrameworkBenchmarks,doom369/FrameworkBenchmarks,donovanmuller/FrameworkBenchmarks,circlespainter/FrameworkBenchmarks,youprofit/FrameworkBenchmarks,kostya-sh/FrameworkBenchmarks,F3Community/FrameworkBenchmarks,testn/FrameworkBenchmarks,F3Community/FrameworkBenchmarks,s-ludwig/FrameworkBenchmarks,diablonhn/FrameworkBenchmarks,zloster/FrameworkBenchmarks,raziel057/FrameworkBenchmarks,denkab/FrameworkBenchmarks,kostya-sh/FrameworkBenchmarks,kellabyte/FrameworkBenchmarks,testn/FrameworkBenchmarks,jebbstewart/FrameworkBenchmarks,hperadin/FrameworkBenchmarks,Dith3r/FrameworkBenchmarks,Eyepea/FrameworkBenchmarks,raziel057/FrameworkBenchmarks,Eyepea/FrameworkBenchmarks,doom369/FrameworkBenchmarks,jamming/FrameworkBenchmarks,Rayne/FrameworkBenchmarks,jaguililla/FrameworkBenchmarks,hperadin/FrameworkBenchmarks,zloster/FrameworkBenchmarks,k-r-g/FrameworkBenchmarks,thousandsofthem/FrameworkBenchmarks,circlespainter/FrameworkBenchmarks,ratpack/FrameworkBenchmarks,herloct/FrameworkBenchmarks,martin-g/FrameworkBenchmarks,Jesterovskiy/FrameworkBenchmarks,nkasvosve/FrameworkBenchmarks,grob/FrameworkBenchmarks,methane/FrameworkBenchmarks,jebbstewart/FrameworkBenchmarks,herloct/FrameworkBenchmarks,sagenschneider/FrameworkBenchmarks,PermeAgility/FrameworkBenchmarks,nbrady-techempower/FrameworkBenchmarks,nathana1/FrameworkBenchmarks,jaguililla/FrameworkBenchmarks,sgml/FrameworkBenchmarks,youprofit/FrameworkBenchmarks,diablonhn/FrameworkBenchmarks,jetty-project/FrameworkBenchmarks,hamiltont/FrameworkBenchmarks,k-r-g/FrameworkBenchmarks,donovanmuller/FrameworkBenchmarks,Ocramius/FrameworkBenchmarks,jaguililla/FrameworkBenchmarks,grob/FrameworkBenchmarks,kellabyte/FrameworkBenchmarks,sxend/FrameworkBenchmarks,ashawnbandy-te-tfb/FrameworkBenchmarks,sgml/FrameworkBenchmarks,victorbriz/FrameworkBenchmarks,khellang/FrameworkBenchmarks,raziel057/FrameworkBenchmarks,sagenschneider/FrameworkBenchmarks,Rydgel/FrameworkBenchmarks,Verber/FrameworkBenchmarks,F3Community/FrameworkBenchmarks,waiteb3/FrameworkBenchmarks,fabianmurariu/FrameworkBenchmarks,denkab/FrameworkBenchmarks,Rayne/FrameworkBenchmarks,nbrady-techempower/FrameworkBenchmarks,leafo/FrameworkBenchmarks,nbrady-techempower/FrameworkBenchmarks,PermeAgility/FrameworkBenchmarks,dmacd/FB-try1,sanjoydesk/FrameworkBenchmarks,Verber/FrameworkBenchmarks,steveklabnik/FrameworkBenchmarks,jetty-project/FrameworkBenchmarks,MTDdk/FrameworkBenchmarks,jetty-project/FrameworkBenchmarks,RockinRoel/FrameworkBenchmarks,MTDdk/FrameworkBenchmarks,seem-sky/FrameworkBenchmarks,denkab/FrameworkBenchmarks,valyala/FrameworkBenchmarks,zhuochenKIDD/FrameworkBenchmarks,zhuochenKIDD/FrameworkBenchmarks,psfblair/FrameworkBenchmarks,fabianmurariu/FrameworkBenchmarks,sxend/FrameworkBenchmarks,diablonhn/FrameworkBenchmarks,ratpack/FrameworkBenchmarks,Jesterovskiy/FrameworkBenchmarks,thousandsofthem/FrameworkBenchmarks,zdanek/FrameworkBenchmarks,jamming/FrameworkBenchmarks,greenlaw110/FrameworkBenchmarks,jaguililla/FrameworkBenchmarks,diablonhn/FrameworkBenchmarks,victorbriz/FrameworkBenchmarks,diablonhn/FrameworkBenchmarks,grob/FrameworkBenchmarks,RockinRoel/FrameworkBenchmarks,k-r-g/FrameworkBenchmarks,marko-asplund/FrameworkBenchmarks,mfirry/FrameworkBenchmarks,circlespainter/FrameworkBenchmarks,kbrock/FrameworkBenchmarks,lcp0578/FrameworkBenchmarks,jebbstewart/FrameworkBenchmarks,jeevatkm/FrameworkBenchmarks,jebbstewart/FrameworkBenchmarks,Dith3r/FrameworkBenchmarks,Rayne/FrameworkBenchmarks,Ocramius/FrameworkBenchmarks,doom369/FrameworkBenchmarks,waiteb3/FrameworkBenchmarks,khellang/FrameworkBenchmarks,kostya-sh/FrameworkBenchmarks,jeevatkm/FrameworkBenchmarks,grob/FrameworkBenchmarks,greenlaw110/FrameworkBenchmarks,fabianmurariu/FrameworkBenchmarks,Dith3r/FrameworkBenchmarks,grob/FrameworkBenchmarks,grob/FrameworkBenchmarks,Eyepea/FrameworkBenchmarks,jaguililla/FrameworkBenchmarks,greenlaw110/FrameworkBenchmarks,k-r-g/FrameworkBenchmarks,jebbstewart/FrameworkBenchmarks,nkasvosve/FrameworkBenchmarks,waiteb3/FrameworkBenchmarks,doom369/FrameworkBenchmarks,MTDdk/FrameworkBenchmarks,actframework/FrameworkBenchmarks,diablonhn/FrameworkBenchmarks,RockinRoel/FrameworkBenchmarks,jeevatkm/FrameworkBenchmarks,jeevatkm/FrameworkBenchmarks,torhve/FrameworkBenchmarks,steveklabnik/FrameworkBenchmarks,kostya-sh/FrameworkBenchmarks,s-ludwig/FrameworkBenchmarks,alubbe/FrameworkBenchmarks,zhuochenKIDD/FrameworkBenchmarks,Jesterovskiy/FrameworkBenchmarks,zdanek/FrameworkBenchmarks,zdanek/FrameworkBenchmarks,methane/FrameworkBenchmarks,ashawnbandy-te-tfb/FrameworkBenchmarks,psfblair/FrameworkBenchmarks,nathana1/FrameworkBenchmarks,Ocramius/FrameworkBenchmarks,stefanocasazza/FrameworkBenchmarks,zdanek/FrameworkBenchmarks,Ocramius/FrameworkBenchmarks,jeevatkm/FrameworkBenchmarks,thousandsofthem/FrameworkBenchmarks,joshk/FrameworkBenchmarks,actframework/FrameworkBenchmarks,Jesterovskiy/FrameworkBenchmarks,RockinRoel/FrameworkBenchmarks,Verber/FrameworkBenchmarks,mfirry/FrameworkBenchmarks,hamiltont/FrameworkBenchmarks,stefanocasazza/FrameworkBenchmarks,zloster/FrameworkBenchmarks,Dith3r/FrameworkBenchmarks,Eyepea/FrameworkBenchmarks,dmacd/FB-try1,alubbe/FrameworkBenchmarks,Rydgel/FrameworkBenchmarks,victorbriz/FrameworkBenchmarks,stefanocasazza/FrameworkBenchmarks,jeevatkm/FrameworkBenchmarks,knewmanTE/FrameworkBenchmarks,ashawnbandy-te-tfb/FrameworkBenchmarks,joshk/FrameworkBenchmarks,victorbriz/FrameworkBenchmarks,greenlaw110/FrameworkBenchmarks,stefanocasazza/FrameworkBenchmarks,Synchro/FrameworkBenchmarks,Eyepea/FrameworkBenchmarks,Ocramius/FrameworkBenchmarks,hperadin/FrameworkBenchmarks,leafo/FrameworkBenchmarks,hamiltont/FrameworkBenchmarks,s-ludwig/FrameworkBenchmarks,nkasvosve/FrameworkBenchmarks,greg-hellings/FrameworkBenchmarks,lcp0578/FrameworkBenchmarks,youprofit/FrameworkBenchmarks,sanjoydesk/FrameworkBenchmarks,psfblair/FrameworkBenchmarks,seem-sky/FrameworkBenchmarks,zapov/FrameworkBenchmarks,yunspace/FrameworkBenchmarks,ratpack/FrameworkBenchmarks,greg-hellings/FrameworkBenchmarks,Eyepea/FrameworkBenchmarks,lcp0578/FrameworkBenchmarks,testn/FrameworkBenchmarks,kellabyte/FrameworkBenchmarks,stefanocasazza/FrameworkBenchmarks,testn/FrameworkBenchmarks,martin-g/FrameworkBenchmarks,marko-asplund/FrameworkBenchmarks,torhve/FrameworkBenchmarks,psfblair/FrameworkBenchmarks,methane/FrameworkBenchmarks,Synchro/FrameworkBenchmarks,alubbe/FrameworkBenchmarks,raziel057/FrameworkBenchmarks,khellang/FrameworkBenchmarks,Ocramius/FrameworkBenchmarks,martin-g/FrameworkBenchmarks,Synchro/FrameworkBenchmarks,MTDdk/FrameworkBenchmarks,herloct/FrameworkBenchmarks,Jesterovskiy/FrameworkBenchmarks,joshk/FrameworkBenchmarks,kellabyte/FrameworkBenchmarks,Rayne/FrameworkBenchmarks,ashawnbandy-te-tfb/FrameworkBenchmarks,saturday06/FrameworkBenchmarks,k-r-g/FrameworkBenchmarks,hamiltont/FrameworkBenchmarks,F3Community/FrameworkBenchmarks,leafo/FrameworkBenchmarks,denkab/FrameworkBenchmarks,denkab/FrameworkBenchmarks,steveklabnik/FrameworkBenchmarks,Dith3r/FrameworkBenchmarks,alubbe/FrameworkBenchmarks,zane-techempower/FrameworkBenchmarks,lcp0578/FrameworkBenchmarks,nkasvosve/FrameworkBenchmarks,donovanmuller/FrameworkBenchmarks,lcp0578/FrameworkBenchmarks,saturday06/FrameworkBenchmarks,herloct/FrameworkBenchmarks,MTDdk/FrameworkBenchmarks,waiteb3/FrameworkBenchmarks,alubbe/FrameworkBenchmarks,Jesterovskiy/FrameworkBenchmarks,jetty-project/FrameworkBenchmarks,donovanmuller/FrameworkBenchmarks,testn/FrameworkBenchmarks,Dith3r/FrameworkBenchmarks,zloster/FrameworkBenchmarks,steveklabnik/FrameworkBenchmarks,jetty-project/FrameworkBenchmarks,jetty-project/FrameworkBenchmarks,lcp0578/FrameworkBenchmarks,zhuochenKIDD/FrameworkBenchmarks,yunspace/FrameworkBenchmarks,stefanocasazza/FrameworkBenchmarks,kellabyte/FrameworkBenchmarks,valyala/FrameworkBenchmarks,zapov/FrameworkBenchmarks,denkab/FrameworkBenchmarks,marko-asplund/FrameworkBenchmarks,Synchro/FrameworkBenchmarks,youprofit/FrameworkBenchmarks,xitrum-framework/FrameworkBenchmarks,fabianmurariu/FrameworkBenchmarks,stefanocasazza/FrameworkBenchmarks,Eyepea/FrameworkBenchmarks,diablonhn/FrameworkBenchmarks,Dith3r/FrameworkBenchmarks,valyala/FrameworkBenchmarks,steveklabnik/FrameworkBenchmarks,victorbriz/FrameworkBenchmarks,leafo/FrameworkBenchmarks,victorbriz/FrameworkBenchmarks,stefanocasazza/FrameworkBenchmarks,valyala/FrameworkBenchmarks,alubbe/FrameworkBenchmarks,jamming/FrameworkBenchmarks,circlespainter/FrameworkBenchmarks,kostya-sh/FrameworkBenchmarks,kellabyte/FrameworkBenchmarks,RockinRoel/FrameworkBenchmarks,youprofit/FrameworkBenchmarks,zloster/FrameworkBenchmarks,zhuochenKIDD/FrameworkBenchmarks,valyala/FrameworkBenchmarks,stefanocasazza/FrameworkBenchmarks,k-r-g/FrameworkBenchmarks,youprofit/FrameworkBenchmarks,ashawnbandy-te-tfb/FrameworkBenchmarks,zloster/FrameworkBenchmarks,hamiltont/FrameworkBenchmarks,Synchro/FrameworkBenchmarks,jaguililla/FrameworkBenchmarks,leafo/FrameworkBenchmarks,joshk/FrameworkBenchmarks,RockinRoel/FrameworkBenchmarks,youprofit/FrameworkBenchmarks,saturday06/FrameworkBenchmarks,F3Community/FrameworkBenchmarks,sagenschneider/FrameworkBenchmarks,Rayne/FrameworkBenchmarks,s-ludwig/FrameworkBenchmarks,jetty-project/FrameworkBenchmarks,methane/FrameworkBenchmarks,jamming/FrameworkBenchmarks,saturday06/FrameworkBenchmarks,zdanek/FrameworkBenchmarks,greg-hellings/FrameworkBenchmarks,hamiltont/FrameworkBenchmarks,stefanocasazza/FrameworkBenchmarks,PermeAgility/FrameworkBenchmarks,s-ludwig/FrameworkBenchmarks,greenlaw110/FrameworkBenchmarks,herloct/FrameworkBenchmarks,F3Community/FrameworkBenchmarks,diablonhn/FrameworkBenchmarks,greenlaw110/FrameworkBenchmarks,denkab/FrameworkBenchmarks,RockinRoel/FrameworkBenchmarks,k-r-g/FrameworkBenchmarks,dmacd/FB-try1,raziel057/FrameworkBenchmarks,victorbriz/FrameworkBenchmarks,raziel057/FrameworkBenchmarks,nbrady-techempower/FrameworkBenchmarks,Verber/FrameworkBenchmarks,denkab/FrameworkBenchmarks,nbrady-techempower/FrameworkBenchmarks,fabianmurariu/FrameworkBenchmarks,methane/FrameworkBenchmarks,jetty-project/FrameworkBenchmarks,hperadin/FrameworkBenchmarks,nkasvosve/FrameworkBenchmarks,khellang/FrameworkBenchmarks,diablonhn/FrameworkBenchmarks,jaguililla/FrameworkBenchmarks,nkasvosve/FrameworkBenchmarks,joshk/FrameworkBenchmarks,sxend/FrameworkBenchmarks,jeevatkm/FrameworkBenchmarks,yunspace/FrameworkBenchmarks,waiteb3/FrameworkBenchmarks,RockinRoel/FrameworkBenchmarks,methane/FrameworkBenchmarks,mfirry/FrameworkBenchmarks,zhuochenKIDD/FrameworkBenchmarks,circlespainter/FrameworkBenchmarks,PermeAgility/FrameworkBenchmarks,sxend/FrameworkBenchmarks,fabianmurariu/FrameworkBenchmarks,nbrady-techempower/FrameworkBenchmarks,zapov/FrameworkBenchmarks,jeevatkm/FrameworkBenchmarks,hperadin/FrameworkBenchmarks,MTDdk/FrameworkBenchmarks,mfirry/FrameworkBenchmarks,valyala/FrameworkBenchmarks,alubbe/FrameworkBenchmarks,psfblair/FrameworkBenchmarks,sxend/FrameworkBenchmarks,RockinRoel/FrameworkBenchmarks,jaguililla/FrameworkBenchmarks,ashawnbandy-te-tfb/FrameworkBenchmarks,jebbstewart/FrameworkBenchmarks,greenlaw110/FrameworkBenchmarks,thousandsofthem/FrameworkBenchmarks,kostya-sh/FrameworkBenchmarks,hperadin/FrameworkBenchmarks,lcp0578/FrameworkBenchmarks,zapov/FrameworkBenchmarks,jebbstewart/FrameworkBenchmarks,Synchro/FrameworkBenchmarks,nkasvosve/FrameworkBenchmarks,ashawnbandy-te-tfb/FrameworkBenchmarks,steveklabnik/FrameworkBenchmarks,denkab/FrameworkBenchmarks,torhve/FrameworkBenchmarks,Ocramius/FrameworkBenchmarks,knewmanTE/FrameworkBenchmarks,zdanek/FrameworkBenchmarks,sxend/FrameworkBenchmarks,psfblair/FrameworkBenchmarks,raziel057/FrameworkBenchmarks,khellang/FrameworkBenchmarks,zane-techempower/FrameworkBenchmarks,zapov/FrameworkBenchmarks,actframework/FrameworkBenchmarks,jeevatkm/FrameworkBenchmarks,sgml/FrameworkBenchmarks,nkasvosve/FrameworkBenchmarks,F3Community/FrameworkBenchmarks,sgml/FrameworkBenchmarks,joshk/FrameworkBenchmarks,joshk/FrameworkBenchmarks,mfirry/FrameworkBenchmarks,fabianmurariu/FrameworkBenchmarks,zloster/FrameworkBenchmarks,waiteb3/FrameworkBenchmarks,greenlaw110/FrameworkBenchmarks,jebbstewart/FrameworkBenchmarks,doom369/FrameworkBenchmarks,methane/FrameworkBenchmarks,markkolich/FrameworkBenchmarks,waiteb3/FrameworkBenchmarks,donovanmuller/FrameworkBenchmarks,greg-hellings/FrameworkBenchmarks,saturday06/FrameworkBenchmarks,Jesterovskiy/FrameworkBenchmarks,khellang/FrameworkBenchmarks,torhve/FrameworkBenchmarks,Ocramius/FrameworkBenchmarks,Verber/FrameworkBenchmarks,nathana1/FrameworkBenchmarks,mfirry/FrameworkBenchmarks,nbrady-techempower/FrameworkBenchmarks,raziel057/FrameworkBenchmarks,nathana1/FrameworkBenchmarks,markkolich/FrameworkBenchmarks,mfirry/FrameworkBenchmarks,kostya-sh/FrameworkBenchmarks,nathana1/FrameworkBenchmarks,greenlaw110/FrameworkBenchmarks,marko-asplund/FrameworkBenchmarks,sxend/FrameworkBenchmarks,PermeAgility/FrameworkBenchmarks,denkab/FrameworkBenchmarks,jetty-project/FrameworkBenchmarks,Rydgel/FrameworkBenchmarks,testn/FrameworkBenchmarks,nbrady-techempower/FrameworkBenchmarks,PermeAgility/FrameworkBenchmarks,Rydgel/FrameworkBenchmarks,diablonhn/FrameworkBenchmarks,kellabyte/FrameworkBenchmarks,s-ludwig/FrameworkBenchmarks,nathana1/FrameworkBenchmarks,Synchro/FrameworkBenchmarks,saturday06/FrameworkBenchmarks,Jesterovskiy/FrameworkBenchmarks,nathana1/FrameworkBenchmarks,sanjoydesk/FrameworkBenchmarks,seem-sky/FrameworkBenchmarks,markkolich/FrameworkBenchmarks,PermeAgility/FrameworkBenchmarks,circlespainter/FrameworkBenchmarks,greenlaw110/FrameworkBenchmarks,k-r-g/FrameworkBenchmarks,actframework/FrameworkBenchmarks,Dith3r/FrameworkBenchmarks,leafo/FrameworkBenchmarks,grob/FrameworkBenchmarks,sagenschneider/FrameworkBenchmarks,alubbe/FrameworkBenchmarks,victorbriz/FrameworkBenchmarks,jeevatkm/FrameworkBenchmarks,Eyepea/FrameworkBenchmarks,knewmanTE/FrameworkBenchmarks,k-r-g/FrameworkBenchmarks,zane-techempower/FrameworkBenchmarks,kostya-sh/FrameworkBenchmarks,leafo/FrameworkBenchmarks,actframework/FrameworkBenchmarks,donovanmuller/FrameworkBenchmarks,psfblair/FrameworkBenchmarks,Synchro/FrameworkBenchmarks,methane/FrameworkBenchmarks,zapov/FrameworkBenchmarks,jeevatkm/FrameworkBenchmarks,Rydgel/FrameworkBenchmarks,marko-asplund/FrameworkBenchmarks,ashawnbandy-te-tfb/FrameworkBenchmarks,yunspace/FrameworkBenchmarks,sanjoydesk/FrameworkBenchmarks,kbrock/FrameworkBenchmarks,steveklabnik/FrameworkBenchmarks,sagenschneider/FrameworkBenchmarks,victorbriz/FrameworkBenchmarks,s-ludwig/FrameworkBenchmarks,sxend/FrameworkBenchmarks,denkab/FrameworkBenchmarks,knewmanTE/FrameworkBenchmarks,Rayne/FrameworkBenchmarks,doom369/FrameworkBenchmarks,xitrum-framework/FrameworkBenchmarks,Ocramius/FrameworkBenchmarks,RockinRoel/FrameworkBenchmarks,zhuochenKIDD/FrameworkBenchmarks,methane/FrameworkBenchmarks,knewmanTE/FrameworkBenchmarks,MTDdk/FrameworkBenchmarks,hperadin/FrameworkBenchmarks,F3Community/FrameworkBenchmarks,fabianmurariu/FrameworkBenchmarks,psfblair/FrameworkBenchmarks,zhuochenKIDD/FrameworkBenchmarks,nbrady-techempower/FrameworkBenchmarks,RockinRoel/FrameworkBenchmarks,martin-g/FrameworkBenchmarks,sagenschneider/FrameworkBenchmarks,martin-g/FrameworkBenchmarks,raziel057/FrameworkBenchmarks,sxend/FrameworkBenchmarks,julienschmidt/FrameworkBenchmarks,hperadin/FrameworkBenchmarks,Dith3r/FrameworkBenchmarks,knewmanTE/FrameworkBenchmarks,F3Community/FrameworkBenchmarks,raziel057/FrameworkBenchmarks,Verber/FrameworkBenchmarks,yunspace/FrameworkBenchmarks
nancy/src/Global.asax.cs
nancy/src/Global.asax.cs
using System; using System.Collections.Generic; using System.Web; using Nancy; using Nancy.ErrorHandling; using System.Threading; namespace NancyBenchmark { public class Global : HttpApplication { protected void Application_Start() { var threads = 40 * Environment.ProcessorCount; ThreadPool.SetMaxThreads(threads, threads); ThreadPool.SetMinThreads(threads, threads); } } }
using System; using System.Collections.Generic; using System.Web; using Nancy; using Nancy.ErrorHandling; namespace NancyBenchmark { public class Global : HttpApplication { protected void Application_Start() { } } }
bsd-3-clause
C#
d50679ff2152e91f24dd086104426327d2503297
Update CSharpSyntaxBase.cs
NMSLanX/Natasha
src/Natasha.CSharpSyntax/CSharpSyntaxBase.cs
src/Natasha.CSharpSyntax/CSharpSyntaxBase.cs
using Microsoft.CodeAnalysis; using Microsoft.CodeAnalysis.CSharp; using Microsoft.CodeAnalysis.Formatting; using Natasha.Framework; namespace Natasha.CSharpSyntax { public abstract class CSharpSyntaxBase : SyntaxBase { private readonly static AdhocWorkspace _workSpace; private readonly static CSharpParseOptions _options; static CSharpSyntaxBase() { _workSpace = new AdhocWorkspace(); _workSpace.AddSolution(SolutionInfo.Create(SolutionId.CreateNewId("formatter"), VersionStamp.Default)); _options = new CSharpParseOptions(LanguageVersion.Latest); } public override SyntaxTree LoadTreeFromScript(string script) { var tree = CSharpSyntaxTree.ParseText(script.Trim(), _options); return LoadTree(tree); } public override SyntaxTree LoadTree(SyntaxTree tree) { SyntaxNode root = Formatter.Format(tree.GetCompilationUnitRoot(), _workSpace); tree = root.SyntaxTree; _workSpace.ClearSolution(); return tree; } } }
using Microsoft.CodeAnalysis; using Microsoft.CodeAnalysis.CSharp; using Microsoft.CodeAnalysis.Formatting; using Natasha.Error.Model; using Natasha.Framework; namespace Natasha.CSharpSyntax { public abstract class CSharpSyntaxBase : SyntaxBase { private readonly static AdhocWorkspace _workSpace; private readonly static CSharpParseOptions _options; static CSharpSyntaxBase() { _workSpace = new AdhocWorkspace(); _workSpace.AddSolution(SolutionInfo.Create(SolutionId.CreateNewId("formatter"), VersionStamp.Default)); _options = new CSharpParseOptions(LanguageVersion.Latest); } public override SyntaxTree LoadTreeFromScript(string script) { var tree = CSharpSyntaxTree.ParseText(script.Trim(), _options); return LoadTree(tree); } public override SyntaxTree LoadTree(SyntaxTree tree) { SyntaxNode root = Formatter.Format(tree.GetCompilationUnitRoot(), _workSpace); tree = root.SyntaxTree; _workSpace.ClearSolution(); return tree; } } }
mpl-2.0
C#
ab353428fe94a8106249ed61f637958de624890f
Add new type of devices
wangkanai/Detection
src/Wangkanai.Detection.Device/DeviceType.cs
src/Wangkanai.Detection.Device/DeviceType.cs
// Copyright (c) 2018 Sarin Na Wangkanai, All Rights Reserved. // The Apache v2. See License.txt in the project root for license information. namespace Wangkanai.Detection { public enum DeviceType { Desktop, Tablet, Mobile, Tv, Console, Car } }
// Copyright (c) 2018 Sarin Na Wangkanai, All Rights Reserved. // The Apache v2. See License.txt in the project root for license information. namespace Wangkanai.Detection { public enum DeviceType { Desktop, Tablet, Mobile } }
apache-2.0
C#
3342d41a128c53a6868805ed589f6e716ed1eedf
fix ios stub.
SuperJMN/Avalonia,jkoritzinsky/Avalonia,jkoritzinsky/Perspex,wieslawsoltes/Perspex,AvaloniaUI/Avalonia,wieslawsoltes/Perspex,grokys/Perspex,jkoritzinsky/Avalonia,wieslawsoltes/Perspex,AvaloniaUI/Avalonia,jkoritzinsky/Avalonia,SuperJMN/Avalonia,jkoritzinsky/Avalonia,jkoritzinsky/Avalonia,SuperJMN/Avalonia,SuperJMN/Avalonia,jkoritzinsky/Avalonia,AvaloniaUI/Avalonia,wieslawsoltes/Perspex,SuperJMN/Avalonia,AvaloniaUI/Avalonia,SuperJMN/Avalonia,SuperJMN/Avalonia,wieslawsoltes/Perspex,AvaloniaUI/Avalonia,AvaloniaUI/Avalonia,Perspex/Perspex,grokys/Perspex,wieslawsoltes/Perspex,jkoritzinsky/Avalonia,AvaloniaUI/Avalonia,Perspex/Perspex,wieslawsoltes/Perspex
src/iOS/Avalonia.iOS/Stubs.cs
src/iOS/Avalonia.iOS/Stubs.cs
using System; using System.IO; using Avalonia.Input; using Avalonia.Platform; namespace Avalonia.iOS { class CursorFactoryStub : ICursorFactory { public ICursorImpl CreateCursor(IBitmapImpl cursor, PixelPoint hotSpot) => new CursorImplStub(); ICursorImpl ICursorFactory.GetCursor(StandardCursorType cursorType) => new CursorImplStub(); private class CursorImplStub : ICursorImpl { public void Dispose() { } } } class WindowingPlatformStub : IWindowingPlatform { public IWindowImpl CreateWindow() => throw new NotSupportedException(); public IWindowImpl CreateEmbeddableWindow() => throw new NotSupportedException(); public ITrayIconImpl CreateTrayIcon() => throw new NotSupportedException(); } class PlatformIconLoaderStub : IPlatformIconLoader { public IWindowIconImpl LoadIcon(IBitmapImpl bitmap) { using (var stream = new MemoryStream()) { bitmap.Save(stream); return LoadIcon(stream); } } public IWindowIconImpl LoadIcon(Stream stream) { var ms = new MemoryStream(); stream.CopyTo(ms); return new IconStub(ms); } public IWindowIconImpl LoadIcon(string fileName) { using (var file = File.Open(fileName, FileMode.Open)) return LoadIcon(file); } } public class IconStub : IWindowIconImpl { private readonly MemoryStream _ms; public IconStub(MemoryStream stream) { _ms = stream; } public void Save(Stream outputStream) { _ms.Position = 0; _ms.CopyTo(outputStream); } } }
using System; using System.IO; using Avalonia.Input; using Avalonia.Platform; namespace Avalonia.iOS { class CursorFactoryStub : ICursorFactory { public ICursorImpl CreateCursor(IBitmapImpl cursor, PixelPoint hotSpot) => new CursorImplStub(); ICursorImpl ICursorFactory.GetCursor(StandardCursorType cursorType) => new CursorImplStub(); private class CursorImplStub : ICursorImpl { public void Dispose() { } } } class WindowingPlatformStub : IWindowingPlatform { public IWindowImpl CreateWindow() => throw new NotSupportedException(); public IWindowImpl CreateEmbeddableWindow() => throw new NotSupportedException(); } class PlatformIconLoaderStub : IPlatformIconLoader { public IWindowIconImpl LoadIcon(IBitmapImpl bitmap) { using (var stream = new MemoryStream()) { bitmap.Save(stream); return LoadIcon(stream); } } public IWindowIconImpl LoadIcon(Stream stream) { var ms = new MemoryStream(); stream.CopyTo(ms); return new IconStub(ms); } public IWindowIconImpl LoadIcon(string fileName) { using (var file = File.Open(fileName, FileMode.Open)) return LoadIcon(file); } } public class IconStub : IWindowIconImpl { private readonly MemoryStream _ms; public IconStub(MemoryStream stream) { _ms = stream; } public void Save(Stream outputStream) { _ms.Position = 0; _ms.CopyTo(outputStream); } } }
mit
C#
8b5de7403f317cd87be9315976632d08873b021a
Fix android usage of obsoleted VersionCode
ppy/osu,ppy/osu,smoogipooo/osu,NeoAdonis/osu,peppy/osu,smoogipoo/osu,ppy/osu,UselessToucan/osu,NeoAdonis/osu,UselessToucan/osu,peppy/osu-new,peppy/osu,NeoAdonis/osu,smoogipoo/osu,peppy/osu,smoogipoo/osu,UselessToucan/osu
osu.Android/OsuGameAndroid.cs
osu.Android/OsuGameAndroid.cs
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. using System; using Android.App; using osu.Game; using osu.Game.Updater; namespace osu.Android { public class OsuGameAndroid : OsuGame { public override Version AssemblyVersion { get { var packageInfo = Application.Context.ApplicationContext.PackageManager.GetPackageInfo(Application.Context.ApplicationContext.PackageName, 0); try { // todo: needs checking before play store redeploy. string versionName = packageInfo.VersionName; // undo play store version garbling return new Version(int.Parse(versionName.Substring(0, 4)), int.Parse(versionName.Substring(4, 4)), int.Parse(versionName.Substring(8, 1))); } catch { } return new Version(packageInfo.VersionName); } } protected override UpdateManager CreateUpdateManager() => new SimpleUpdateManager(); } }
// 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 Android.App; using osu.Game; using osu.Game.Updater; namespace osu.Android { public class OsuGameAndroid : OsuGame { public override Version AssemblyVersion { get { var packageInfo = Application.Context.ApplicationContext.PackageManager.GetPackageInfo(Application.Context.ApplicationContext.PackageName, 0); try { string versionName = packageInfo.VersionCode.ToString(); // undo play store version garbling return new Version(int.Parse(versionName.Substring(0, 4)), int.Parse(versionName.Substring(4, 4)), int.Parse(versionName.Substring(8, 1))); } catch { } return new Version(packageInfo.VersionName); } } protected override UpdateManager CreateUpdateManager() => new SimpleUpdateManager(); } }
mit
C#
8c10d31af947d8ace2265952bfa2bbbea62e2d43
Make accuracy formatting more consistent
smoogipooo/osu,smoogipoo/osu,NeoAdonis/osu,peppy/osu-new,johnneijzen/osu,NeoAdonis/osu,smoogipoo/osu,EVAST9919/osu,UselessToucan/osu,smoogipoo/osu,johnneijzen/osu,peppy/osu,ppy/osu,ppy/osu,2yangk23/osu,peppy/osu,NeoAdonis/osu,UselessToucan/osu,peppy/osu,ppy/osu,UselessToucan/osu,2yangk23/osu,EVAST9919/osu
osu.Game/Utils/FormatUtils.cs
osu.Game/Utils/FormatUtils.cs
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. namespace osu.Game.Utils { public static class FormatUtils { /// <summary> /// Turns the provided accuracy into a percentage with 2 decimal places. /// </summary> /// <param name="accuracy">The accuracy to be formatted</param> /// <returns>formatted accuracy in percentage</returns> public static string FormatAccuracy(this double accuracy) => $"{accuracy:0.00%}"; /// <summary> /// Turns the provided accuracy into a percentage with 2 decimal places. /// </summary> /// <param name="accuracy">The accuracy to be formatted</param> /// <returns>formatted accuracy in percentage</returns> public static string FormatAccuracy(this decimal accuracy) => $"{accuracy:0.00}%"; } }
// 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.Game.Utils { public static class FormatUtils { /// <summary> /// Turns the provided accuracy into a percentage with 2 decimal places. /// Omits all decimal places when <paramref name="accuracy"/> equals 1d. /// </summary> /// <param name="accuracy">The accuracy to be formatted</param> /// <returns>formatted accuracy in percentage</returns> public static string FormatAccuracy(this double accuracy) => accuracy == 1 ? "100%" : $"{accuracy:0.00%}"; /// <summary> /// Turns the provided accuracy into a percentage with 2 decimal places. /// Omits all decimal places when <paramref name="accuracy"/> equals 100m. /// </summary> /// <param name="accuracy">The accuracy to be formatted</param> /// <returns>formatted accuracy in percentage</returns> public static string FormatAccuracy(this decimal accuracy) => accuracy == 100 ? "100%" : $"{accuracy:0.00}%"; } }
mit
C#
07ee1b4d0b73edebaaffc632acd13dc993f0871c
Make power status properties abstract
peppy/osu,UselessToucan/osu,smoogipoo/osu,ppy/osu,NeoAdonis/osu,smoogipooo/osu,NeoAdonis/osu,UselessToucan/osu,ppy/osu,NeoAdonis/osu,peppy/osu,smoogipoo/osu,UselessToucan/osu,peppy/osu,smoogipoo/osu,ppy/osu,peppy/osu-new
osu.Game/Utils/PowerStatus.cs
osu.Game/Utils/PowerStatus.cs
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. namespace osu.Game.Utils { /// <summary> /// Provides access to the system's power status. /// Currently implemented on iOS and Android only. /// </summary> public abstract class PowerStatus { /// <summary> /// The maximum battery level considered as low, from 0 to 1. /// </summary> public abstract double BatteryCutoff { get; } /// <summary> /// The charge level of the battery, from 0 to 1. /// </summary> public abstract double ChargeLevel { get; } public abstract bool IsCharging { get; } /// <summary> /// Whether the battery is currently low in charge. /// Returns true if not charging and current charge level is lower than or equal to <see cref="BatteryCutoff"/>. /// </summary> public bool IsLowBattery => !IsCharging && ChargeLevel <= BatteryCutoff; } }
// 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.Game.Utils { /// <summary> /// Provides access to the system's power status. /// Currently implemented on iOS and Android only. /// </summary> public abstract class PowerStatus { /// <summary> /// The maximum battery level considered as low, from 0 to 1. /// </summary> public virtual double BatteryCutoff { get; } = 0; /// <summary> /// The charge level of the battery, from 0 to 1. /// </summary> public virtual double ChargeLevel { get; } = 0; public virtual bool IsCharging { get; } = false; /// <summary> /// Whether the battery is currently low in charge. /// Returns true if not charging and current charge level is lower than or equal to <see cref="BatteryCutoff"/>. /// </summary> public bool IsLowBattery => !IsCharging && ChargeLevel <= BatteryCutoff; } }
mit
C#
297105e370079570d3650fb92b3862c60c7e17a5
Add New Exception *() saftynet
OfficialLucky/jRace,OfficialLucky/jRace
inject.cs
inject.cs
using RestSharp; using jRace.PrivateClass.Main; Namespace Inject { public class Inject { file = new jRace.PrivateClass.Main(); brows = new jRace.PrivateClass.Brows(); private main() { var browser = brows.runproc(get()); var bID = brows.getID(browser()); brows.Select(bID, int); if(ID = null || ID == 0){ await saftynet(brower); } else{ return(load); } } load void(){ file.Load(token.Method()); file.Send(token, login); return(saftynet); } } }
using RestSharp; using jRace.PrivateClass.Main; Namespace Inject { public class Inject { file = new jRace.PrivateClass.Main(); brows = new jRace.PrivateClass.Brows(); private main() { var browser = brows.runproc(get()); brows.getID(browser); brows.Select(ID); return(load); } load void(){ file.Load(token.Method()); file.Send(token, login); return(saftynet); } } }
mpl-2.0
C#
e907a4bc6361b0f06d3d5d43c88ec14454a37850
Allow attribute without options
dnnsoftware/Dnn.Platform,dnnsoftware/Dnn.Platform,robsiera/Dnn.Platform,robsiera/Dnn.Platform,valadas/Dnn.Platform,dnnsoftware/Dnn.AdminExperience.Library,RichardHowells/Dnn.Platform,mitchelsellers/Dnn.Platform,nvisionative/Dnn.Platform,nvisionative/Dnn.Platform,EPTamminga/Dnn.Platform,valadas/Dnn.Platform,valadas/Dnn.Platform,mitchelsellers/Dnn.Platform,bdukes/Dnn.Platform,bdukes/Dnn.Platform,EPTamminga/Dnn.Platform,nvisionative/Dnn.Platform,dnnsoftware/Dnn.AdminExperience.Library,RichardHowells/Dnn.Platform,robsiera/Dnn.Platform,mitchelsellers/Dnn.Platform,dnnsoftware/Dnn.AdminExperience.Library,valadas/Dnn.Platform,bdukes/Dnn.Platform,valadas/Dnn.Platform,dnnsoftware/Dnn.Platform,bdukes/Dnn.Platform,dnnsoftware/Dnn.Platform,mitchelsellers/Dnn.Platform,mitchelsellers/Dnn.Platform,RichardHowells/Dnn.Platform,EPTamminga/Dnn.Platform,dnnsoftware/Dnn.Platform,RichardHowells/Dnn.Platform
src/Dnn.PersonaBar.Library/Prompt/Attributes/ConsoleCommandAttribute.cs
src/Dnn.PersonaBar.Library/Prompt/Attributes/ConsoleCommandAttribute.cs
using System; namespace Dnn.PersonaBar.Library.Prompt.Attributes { [AttributeUsage(AttributeTargets.Class)] #pragma warning disable CS3015 // Type has no accessible constructors which use only CLS-compliant types public class ConsoleCommandAttribute : Attribute #pragma warning restore CS3015 // Type has no accessible constructors which use only CLS-compliant types { public string Name { get; set; } public string NameSpace { get; set; } public string Description { get; set; } public string[] Options; public ConsoleCommandAttribute(string name, string description) : this(name, description, new string[] { }) { } public ConsoleCommandAttribute(string name, string description, string[] options) : this(name, "", description, options) { } public ConsoleCommandAttribute(string name, string nameSpace, string description, string[] options) { Name = name; NameSpace = nameSpace; Description = description; Options = options; } } }
using System; namespace Dnn.PersonaBar.Library.Prompt.Attributes { [AttributeUsage(AttributeTargets.Class)] #pragma warning disable CS3015 // Type has no accessible constructors which use only CLS-compliant types public class ConsoleCommandAttribute : Attribute #pragma warning restore CS3015 // Type has no accessible constructors which use only CLS-compliant types { public string Name { get; set; } public string NameSpace { get; set; } public string Description { get; set; } public string[] Options; public ConsoleCommandAttribute(string name, string description, string[] options) { Name = name; NameSpace = ""; Description = description; Options = options; } public ConsoleCommandAttribute(string name, string nameSpace, string description, string[] options) { Name = name; NameSpace = nameSpace; Description = description; Options = options; } } }
mit
C#
c980aaaf5ed1671a4fa1db3c0fbdd9e8877e3475
添加GetHmacSha256()方法单元测试
JeffreySu/WeiXinMPSDK,mc7246/WeiXinMPSDK,lishewen/WeiXinMPSDK,JeffreySu/WeiXinMPSDK,mc7246/WeiXinMPSDK,JeffreySu/WeiXinMPSDK,lishewen/WeiXinMPSDK,lishewen/WeiXinMPSDK,jiehanlin/WeiXinMPSDK,mc7246/WeiXinMPSDK,jiehanlin/WeiXinMPSDK,jiehanlin/WeiXinMPSDK
src/Senparc.Weixin.MP/Senparc.WeixinTests/Helpers/EncryptHelperTests.cs
src/Senparc.Weixin.MP/Senparc.WeixinTests/Helpers/EncryptHelperTests.cs
using Microsoft.VisualStudio.TestTools.UnitTesting; using Senparc.Weixin.Helpers; using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace Senparc.Weixin.Helpers.Tests { [TestClass()] public class EncryptHelperTests { string encypStr = "Senparc"; string exceptMD5Result = "8C715F421744218AB5B9C8E8D7E64AC6"; [TestMethod()] public void GetMD5Test() { //常规方法 var result = EncryptHelper.GetMD5(encypStr, Encoding.UTF8); Assert.AreEqual(exceptMD5Result, result); //重写方法 result = EncryptHelper.GetMD5(encypStr); Assert.AreEqual(exceptMD5Result, result); //小写 result = EncryptHelper.GetLowerMD5(encypStr, Encoding.UTF8); Assert.AreEqual(exceptMD5Result.ToLower(), result); } [TestMethod] public void GetHmacSha256Test() { var msg = "{\"foo\":\"bar\"}"; var sessionKey = "o0q0otL8aEzpcZL/FT9WsQ=="; var result = EncryptHelper.GetHmacSha256(msg, sessionKey); Assert.AreEqual("654571f79995b2ce1e149e53c0a33dc39c0a74090db514261454e8dbe432aa0b",result); } } }
using Microsoft.VisualStudio.TestTools.UnitTesting; using Senparc.Weixin.Helpers; using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace Senparc.Weixin.Helpers.Tests { [TestClass()] public class EncryptHelperTests { string encypStr = "Senparc"; string exceptMD5Result = "8C715F421744218AB5B9C8E8D7E64AC6"; [TestMethod()] public void GetMD5Test() { //常规方法 var result = EncryptHelper.GetMD5(encypStr, Encoding.UTF8); Assert.AreEqual(exceptMD5Result, result); //重写方法 result = EncryptHelper.GetMD5(encypStr); Assert.AreEqual(exceptMD5Result, result); //小写 result = EncryptHelper.GetLowerMD5(encypStr, Encoding.UTF8); Assert.AreEqual(exceptMD5Result.ToLower(), result); } } }
apache-2.0
C#
9b15b987fea2e90204eaf36087893aa654f65158
test request to identityServer4 (console)
FlorinskiyDI/coremanage,FlorinskiyDI/coremanage,FlorinskiyDI/coremanage,FlorinskiyDI/coremanage
coremanage/ClientResourceOwner/Program.cs
coremanage/ClientResourceOwner/Program.cs
using IdentityModel.Client; using Newtonsoft.Json.Linq; using System; using System.Net.Http; using System.Threading.Tasks; namespace ResourceOwnerClient { public class Program { public static void Main(string[] args) { MainAsync(args).GetAwaiter().GetResult(); Console.ReadKey(); } private static async Task MainAsync(string[] args) { // IdentityServer4 host const string authority = "http://localhost:5100"; // client data const string clientId = "ro.client"; const string clientSecret = "secret"; // user data const string userName = "SuperAdmin"; const string password = "SuperAdmin"; const string scope = "api1"; // discover endpoints from metadata var disco = await DiscoveryClient.GetAsync(authority); // request token var tokenClient = new TokenClient(disco.TokenEndpoint, clientId, clientSecret); var tokenResponse = await tokenClient.RequestResourceOwnerPasswordAsync(userName, password, scope); if (tokenResponse.IsError) { Console.WriteLine(tokenResponse.Error); return; } Console.WriteLine(tokenResponse.Json); Console.WriteLine("\n\n"); // call api var client = new HttpClient(); client.SetBearerToken(tokenResponse.AccessToken); var response = await client.GetAsync("http://localhost:5200/api/Identity"); if (!response.IsSuccessStatusCode) { Console.WriteLine(response.StatusCode); } else { var content = response.Content.ReadAsStringAsync().Result; Console.WriteLine("User claims \n" + JArray.Parse(content)); } } } }
using System; namespace ClientResourceOwner { class Program { static void Main(string[] args) { Console.WriteLine("Hello World!"); } } }
apache-2.0
C#
89468ef329c8a78031a40d4543e3ea87386ee7ec
use env name in jobs dashboard. Closes ##171
bit-foundation/bit-framework,bit-foundation/bit-framework,bit-foundation/bit-framework,bit-foundation/bit-framework
src/Server/Bit.Hangfire/JobSchedulerMiddlewareConfiguration.cs
src/Server/Bit.Hangfire/JobSchedulerMiddlewareConfiguration.cs
using System.Collections.Generic; using Bit.Core.Models; using Bit.Hangfire.Contracts; using Bit.Owin.Contracts; using Hangfire; using Hangfire.Dashboard; using Owin; #if DotNetCore using Bit.OwinCore.Contracts; using Microsoft.AspNetCore.Builder; #endif namespace Bit.Hangfire { public class JobSchedulerMiddlewareConfiguration : #if DotNet IOwinMiddlewareConfiguration #else IAspNetCoreMiddlewareConfiguration #endif { public virtual IEnumerable<IDashboardAuthorizationFilter> AuthFilters { get; set; } public virtual AppEnvironment AppEnvironment { get; set; } public virtual IJobSchedulerBackendConfiguration JobSchedulerBackendConfiguration { get; set; } #if DotNetCore public MiddlewarePosition MiddlewarePosition => MiddlewarePosition.BeforeOwinMiddlewares; public virtual void Configure(IApplicationBuilder app) #else public virtual void Configure(IAppBuilder app) #endif { JobSchedulerBackendConfiguration.Init(); app.UseHangfireDashboard("/jobs", new DashboardOptions { Authorization = AuthFilters, AppPath = AppEnvironment.GetHostVirtualPath(), DashboardTitle = $"Hangfire dashboard - {AppEnvironment.Name} environment" }); } } }
using System.Collections.Generic; using Bit.Core.Models; using Bit.Hangfire.Contracts; using Bit.Owin.Contracts; using Hangfire; using Hangfire.Dashboard; using Owin; #if DotNetCore using Bit.OwinCore.Contracts; using Microsoft.AspNetCore.Builder; #endif namespace Bit.Hangfire { public class JobSchedulerMiddlewareConfiguration : #if DotNet IOwinMiddlewareConfiguration #else IAspNetCoreMiddlewareConfiguration #endif { public virtual IEnumerable<IDashboardAuthorizationFilter> AuthFilters { get; set; } public virtual AppEnvironment AppEnvironment { get; set; } public virtual IJobSchedulerBackendConfiguration JobSchedulerBackendConfiguration { get; set; } #if DotNetCore public MiddlewarePosition MiddlewarePosition => MiddlewarePosition.BeforeOwinMiddlewares; public virtual void Configure(IApplicationBuilder app) #else public virtual void Configure(IAppBuilder app) #endif { JobSchedulerBackendConfiguration.Init(); app.UseHangfireDashboard("/jobs", new DashboardOptions { Authorization = AuthFilters, AppPath = AppEnvironment.GetHostVirtualPath() }); } } }
mit
C#
f42f2c684e4c448cd2053fd0e2d7bf851ccd49c1
Fix async behavior of console program.
maxcutler/wp-api-csharp
ApiConsole/Program.cs
ApiConsole/Program.cs
using System; using System.Net.Http; using System.Threading.Tasks; using PortableWordPressApi; namespace ApiConsole { class Program { static void Main(string[] args) { Task.WaitAll(AsyncMain()); Console.WriteLine("Press any key to close."); Console.Read(); } private static async Task AsyncMain() { Console.WriteLine("Enter site URL:"); var url = Console.ReadLine(); Console.WriteLine("Searching for API at {0}", url); var httpClient = new HttpClient(); var discovery = new WordPressApiDiscovery(new Uri(url, UriKind.Absolute), httpClient); var api = await discovery.DiscoverApiForSite(); Console.WriteLine("Site's API endpoint: {0}", api.ApiRootUri); } } }
using System; using System.Net.Http; using System.Threading.Tasks; using PortableWordPressApi; namespace ApiConsole { class Program { static void Main(string[] args) { Task.WhenAll(AsyncMain()); Console.WriteLine("Press any key to close."); Console.Read(); } private static async Task AsyncMain() { Console.WriteLine("Enter site URL:"); var url = Console.ReadLine(); Console.WriteLine("Searching for API at {0}", url); var httpClient = new HttpClient(); var discovery = new WordPressApiDiscovery(new Uri(url, UriKind.Absolute), httpClient); var api = await discovery.DiscoverApiForSite(); Console.WriteLine("Site's API endpoint: {0}", api.ApiRootUri); } } }
mit
C#
5602e971450676aaafe39380fd8db65b93473806
Update to release 2.1.0
ndouthit/Certify,Prerequisite/Certify,Marcus-L/Certify,webprofusion/Certify
src/Certify.Core/Properties/AssemblyInfo.cs
src/Certify.Core/Properties/AssemblyInfo.cs
using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; // General Information about an assembly is controlled through the following set of attributes. // Change these attribute values to modify the information associated with an assembly. [assembly: AssemblyTitle("Certify - SSL Certificate Manager")] [assembly: AssemblyDescription("")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("")] [assembly: AssemblyProduct("Certify")] [assembly: AssemblyCopyright("Copyright © Webprofusion Pty Ltd 2015 - 2017")] [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] // Setting ComVisible to false makes the types in this assembly not visible to COM components. If you // need to access a type in this assembly from COM, set the ComVisible attribute to true on that type. [assembly: ComVisible(false)] // The following GUID is for the ID of the typelib if this project is exposed to COM [assembly: Guid("87baa9ca-e0c9-4d3e-8971-55a30134c942")] // Version information for an assembly consists of the following four values: // // Major Version Minor Version Build Number Revision // // You can specify all the values or you can default the Build and Revision Numbers by using the '*' // as shown below: [assembly: AssemblyVersion("1.0.*")] [assembly: AssemblyVersion("2.1.0.*")] [assembly: AssemblyFileVersion("2.0.0")]
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("Certify - SSL Certificate Manager")] [assembly: AssemblyDescription("")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("")] [assembly: AssemblyProduct("Certify")] [assembly: AssemblyCopyright("Copyright © Webprofusion Pty Ltd 2015 - 2017")] [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] // Setting ComVisible to false makes the types in this assembly not visible to COM components. If you // need to access a type in this assembly from COM, set the ComVisible attribute to true on that type. [assembly: ComVisible(false)] // The following GUID is for the ID of the typelib if this project is exposed to COM [assembly: Guid("87baa9ca-e0c9-4d3e-8971-55a30134c942")] // Version information for an assembly consists of the following four values: // // Major Version Minor Version Build Number Revision // // You can specify all the values or you can default the Build and Revision Numbers by using the '*' // as shown below: [assembly: AssemblyVersion("1.0.*")] [assembly: AssemblyVersion("2.0.14.*")] [assembly: AssemblyFileVersion("2.0.0")]
mit
C#
3c502af6178bbcb6db75d57385ee89ab0838f861
修复Literal表达式构造函数内未更新text参数的错误。 :strawberry:
Zongsoft/Zongsoft.Data
src/Common/Expressions/LiteralExpression.cs
src/Common/Expressions/LiteralExpression.cs
/* * _____ ______ * /_ / ____ ____ ____ _________ / __/ /_ * / / / __ \/ __ \/ __ \/ ___/ __ \/ /_/ __/ * / /__/ /_/ / / / / /_/ /\_ \/ /_/ / __/ /_ * /____/\____/_/ /_/\__ /____/\____/_/ \__/ * /____/ * * Authors: * 钟峰(Popeye Zhong) <zongsoft@qq.com> * * Copyright (C) 2015-2018 Zongsoft Corporation <http://www.zongsoft.com> * * This file is part of Zongsoft.Data. * * Zongsoft.Data is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * Zongsoft.Data is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * The above copyright notice and this permission notice shall be * included in all copies or substantial portions of the Software. * * You should have received a copy of the GNU Lesser General Public * License along with Zongsoft.Data; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ using System; namespace Zongsoft.Data.Common.Expressions { public class LiteralExpression : Expression { #region 构造函数 public LiteralExpression(string text) { if(string.IsNullOrEmpty(text)) throw new ArgumentNullException(nameof(text)); this.Text = text; } #endregion #region 公共属性 public string Text { get; } #endregion #region 重写方法 public override string ToString() { return this.Text; } #endregion } }
/* * _____ ______ * /_ / ____ ____ ____ _________ / __/ /_ * / / / __ \/ __ \/ __ \/ ___/ __ \/ /_/ __/ * / /__/ /_/ / / / / /_/ /\_ \/ /_/ / __/ /_ * /____/\____/_/ /_/\__ /____/\____/_/ \__/ * /____/ * * Authors: * 钟峰(Popeye Zhong) <zongsoft@qq.com> * * Copyright (C) 2015-2018 Zongsoft Corporation <http://www.zongsoft.com> * * This file is part of Zongsoft.Data. * * Zongsoft.Data is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * Zongsoft.Data is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * The above copyright notice and this permission notice shall be * included in all copies or substantial portions of the Software. * * You should have received a copy of the GNU Lesser General Public * License along with Zongsoft.Data; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ using System; namespace Zongsoft.Data.Common.Expressions { public class LiteralExpression : Expression { #region 构造函数 public LiteralExpression(string text) { } #endregion #region 公共属性 public string Text { get; set; } #endregion #region 重写方法 public override string ToString() { return this.Text; } #endregion } }
lgpl-2.1
C#
728b8b8bf9765683c22be04b19df0f3cbf4c3740
Raise incoming event on the ThreadPool
loraderon/nvents
src/Nvents/Services/Network/EventService.cs
src/Nvents/Services/Network/EventService.cs
using System; using System.ServiceModel; using System.Threading; namespace Nvents.Services.Network { [ServiceBehavior( InstanceContextMode = InstanceContextMode.Single, ConcurrencyMode = ConcurrencyMode.Multiple)] public class EventService : IEventService { public event EventHandler<EventPublishedEventArgs> EventPublished; public void Publish(IEvent @event) { if (EventPublished == null) return; ThreadPool.QueueUserWorkItem(s => EventPublished(null, new EventPublishedEventArgs(@event))); } } }
using System; using System.ServiceModel; namespace Nvents.Services.Network { [ServiceBehavior( InstanceContextMode = InstanceContextMode.Single, ConcurrencyMode = ConcurrencyMode.Multiple)] public class EventService : IEventService { public event EventHandler<EventPublishedEventArgs> EventPublished; public void Publish(IEvent @event) { if (EventPublished != null) EventPublished(this, new EventPublishedEventArgs(@event)); } } }
mit
C#
4e66dcc183e7775356ed07e03a11facff54b3632
fix bug in ef7 data layer
joeaudette/cloudscribe.Logging
src/cloudscribe.Logging.EF/DbInitializer.cs
src/cloudscribe.Logging.EF/DbInitializer.cs
// Copyright (c) Source Tree Solutions, LLC. All rights reserved. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. // Author: Joe Audette // Created: 2015-12-26 // Last Modified: 2015-12-26 // using Microsoft.Data.Entity; using Microsoft.Extensions.DependencyInjection; using System; using System.Threading.Tasks; namespace cloudscribe.Logging.EF { public static class DbInitializer { public static async Task InitializeDatabaseAsync(IServiceProvider serviceProvider) { using (var serviceScope = serviceProvider.GetRequiredService<IServiceScopeFactory>().CreateScope()) { var db = serviceScope.ServiceProvider.GetService<LoggingDbContext>(); await db.Database.MigrateAsync(); } } } }
// Copyright (c) Source Tree Solutions, LLC. All rights reserved. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. // Author: Joe Audette // Created: 2015-12-26 // Last Modified: 2015-12-26 // using Microsoft.Data.Entity; using Microsoft.Extensions.DependencyInjection; using System; using System.Threading.Tasks; namespace cloudscribe.Logging.EF { public static class DbInitializer { public static async Task InitializeDatabaseAsync(IServiceProvider serviceProvider) { using (var serviceScope = serviceProvider.GetRequiredService<IServiceScopeFactory>().CreateScope()) { var db = serviceScope.ServiceProvider.GetService<LoggingDbContext>(); bool didCreatedDb = await db.Database.EnsureCreatedAsync(); if(!didCreatedDb) { await db.Database.MigrateAsync(); } } } } }
apache-2.0
C#
4e5f13b29fcc0027f5e5abbe46fad3cd3a8df674
update instance for litedb v3 concurrency
0xFireball/KQAnalytics3,0xFireball/KQAnalytics3,0xFireball/KQAnalytics3
KQAnalytics3/src/KQAnalytics3/Services/Database/DatabaseAccessService.cs
KQAnalytics3/src/KQAnalytics3/Services/Database/DatabaseAccessService.cs
using LiteDB; namespace KQAnalytics3.Services.Database { public static class DatabaseAccessService { public static string LoggedRequestDataKey => "lrequests"; private static LiteDatabase _dbInstance; public static LiteDatabase OpenOrCreateDefault() { if (_dbInstance == null) { _dbInstance = new LiteDatabase("kqanalytics.lidb"); } return _dbInstance; } } }
using LiteDB; namespace KQAnalytics3.Services.Database { public static class DatabaseAccessService { public static string LoggedRequestDataKey => "lrequests"; public static LiteDatabase OpenOrCreateDefault() { //kqanalytics3.lidb return new LiteDatabase("kqanalytics.lidb"); } } }
agpl-3.0
C#
fa18bd9a6953f9054f66d706eed72d1fd713ec77
allow nav layout for store to not have a main title specified
btcpayserver/btcpayserver,btcpayserver/btcpayserver,btcpayserver/btcpayserver,btcpayserver/btcpayserver
BTCPayServer/Views/Shared/_NavLayout.cshtml
BTCPayServer/Views/Shared/_NavLayout.cshtml
@{ Layout = "/Views/Shared/_Layout.cshtml"; ViewBag.ShowMenu = ViewBag.ShowMenu ?? true; if (!ViewData.ContainsKey("NavPartialName")) { ViewData["NavPartialName"] = "_Nav"; } var title = $"{(ViewData.ContainsKey("MainTitle")? $"{ViewData["MainTitle"]}:" : String.Empty)} {ViewData["Title"]}"; } <section> <div class="container"> <div class="row"> <div class="col-lg-12"> <h4 class="section-heading">@title</h4> <hr class="primary ml-0"> </div> </div> <div> <div class="row"> <div class="col-md-3"> @if (ViewBag.ShowMenu) { @await Html.PartialAsync(ViewData["NavPartialName"].ToString()) } </div> <div class="col-md-9"> @RenderBody() </div> </div> </div> </div> </section> @section HeadScripts { @RenderSection("HeadScripts", required: false) } @section Scripts { @RenderSection("Scripts", required: false) }
@{ Layout = "/Views/Shared/_Layout.cshtml"; ViewBag.ShowMenu = ViewBag.ShowMenu ?? true; } <section> <div class="container"> <div class="row"> <div class="col-lg-12"> <h4 class="section-heading">@ViewData["MainTitle"]: @ViewData["Title"]</h4> <hr class="primary ml-0"> </div> </div> <div> <div class="row"> <div class="col-md-3"> @if (ViewBag.ShowMenu) { @await Html.PartialAsync("_Nav") } </div> <div class="col-md-9"> @RenderBody() </div> </div> </div> </div> </section> @section HeadScripts { @RenderSection("HeadScripts", required: false) } @section Scripts { @RenderSection("Scripts", required: false) }
mit
C#
bc08bd7dc22d6605f3b4cbd1be9cf747ba4652b5
Fix #22: PluginWebViewPage ReferenceNullException
garysharp/Disco,garysharp/Disco,garysharp/Disco
Disco.Services/Plugins/PluginWebViewPage.cs
Disco.Services/Plugins/PluginWebViewPage.cs
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace Disco.Services.Plugins { public abstract class PluginWebViewPage<T> : Disco.Services.Web.WebViewPage<T> { private Lazy<WebPageHelper<T>> _plugin; public PluginManifest Manifest {get;private set;} public WebPageHelper<T> Plugin { get { return _plugin.Value; } } public PluginWebViewPage() { var self = this.GetType(); this.Manifest = Plugins.GetPlugin(self.Assembly); this._plugin = new Lazy<WebPageHelper<T>>(() => { if (this.Context == null) throw new InvalidOperationException("The WebViewPage Context property is not initialized"); return new WebPageHelper<T>(this, this.Manifest); }); } } }
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace Disco.Services.Plugins { public abstract class PluginWebViewPage<T> : Disco.Services.Web.WebViewPage<T> { public WebPageHelper<T> Plugin { get; private set; } public PluginWebViewPage() { var self = this.GetType(); var manifest = Plugins.GetPlugin(self.Assembly); this.Plugin = new WebPageHelper<T>(this, manifest); } } }
agpl-3.0
C#
4ab254b90a367ff4a66b80d6cc7b22bb5c7bcdd2
Revert "Triggering new build"
Teleopti/Stardust
Node/NodeTest.JobHandlers/FailingJobCode.cs
Node/NodeTest.JobHandlers/FailingJobCode.cs
using System; using System.Threading; using log4net; using Stardust.Node.Extensions; namespace NodeTest.JobHandlers { public class FailingJobCode { private static readonly ILog Logger = LogManager.GetLogger(typeof (FailingJobCode)); public FailingJobCode() { Logger.DebugWithLineNumber("'Failing Job Code' class constructor called."); WhoAmI = "[NODETEST.JOBHANDLERS.FailingJobCode, " + Environment.MachineName.ToUpper() + "]"; } public string WhoAmI { get; set; } public void DoTheThing(FailingJobParams message, CancellationTokenSource cancellationTokenSource, Action<string> progress) { Logger.DebugWithLineNumber("'Failing Job Code' Do The Thing method called."); var jobProgress = new TestJobProgress { Text = WhoAmI + ": This job will soon throw exeception.", ConsoleColor = ConsoleColor.DarkRed }; progress(jobProgress.Text); throw new Exception(message.Error); } } }
using System; using System.Threading; using log4net; using Stardust.Node.Extensions; namespace NodeTest.JobHandlers { public class FailingJobCode { private static readonly ILog Logger = LogManager.GetLogger(typeof (FailingJobCode)); public FailingJobCode() { Logger.DebugWithLineNumber("'Failing Job Code' class constructor called."); WhoAmI = $"[NODETEST.JOBHANDLERS.FailingJobCode, {Environment.MachineName.ToUpper()}]"; } public string WhoAmI { get; set; } public void DoTheThing(FailingJobParams message, CancellationTokenSource cancellationTokenSource, Action<string> progress) { Logger.DebugWithLineNumber("'Failing Job Code' Do The Thing method called."); var jobProgress = new TestJobProgress { Text = $"{WhoAmI}: This job will soon throw exeception.", ConsoleColor = ConsoleColor.DarkRed }; progress(jobProgress.Text); throw new Exception(message.Error); } } }
mit
C#
c0289fb7f67fb2f6ff83f2b26a7f477d467fb763
Add NET Standard 1.6 API dependency
ranterle/XamarinTest,ranterle/XamarinTest
Droid/MainActivity.cs
Droid/MainActivity.cs
using Android.App; using Android.Widget; using Android.OS; using System.Security.Cryptography; namespace MatXiTest.Droid { [Activity(Label = "MatXiTest", MainLauncher = true, Icon = "@mipmap/icon")] public class MainActivity : Activity { int count = 1; protected override void OnCreate(Bundle savedInstanceState) { base.OnCreate(savedInstanceState); // Set our view from the "main" layout resource SetContentView(Resource.Layout.Main); // Get our button from the layout resource, // and attach an event to it Button button = FindViewById<Button>(Resource.Id.myButton); button.Click += delegate { button.Text = string.Format("{0} clicks!", count++); }; ECCurve curve = ECCurve.CreateFromValue(""); } } }
using Android.App; using Android.Widget; using Android.OS; namespace MatXiTest.Droid { [Activity(Label = "MatXiTest", MainLauncher = true, Icon = "@mipmap/icon")] public class MainActivity : Activity { int count = 1; protected override void OnCreate(Bundle savedInstanceState) { base.OnCreate(savedInstanceState); // Set our view from the "main" layout resource SetContentView(Resource.Layout.Main); // Get our button from the layout resource, // and attach an event to it Button button = FindViewById<Button>(Resource.Id.myButton); button.Click += delegate { button.Text = string.Format("{0} clicks!", count++); }; } } }
mit
C#
f8b1e4f06e9c796c24709e96538b31a8e012d17e
Improve drive selection.
jp7677/hellocoreclr,jp7677/hellocoreclr,jp7677/hellocoreclr,jp7677/hellocoreclr
src/HelloCoreClrApp/Health/DiskMonitor.cs
src/HelloCoreClrApp/Health/DiskMonitor.cs
using System; using System.IO; using System.Linq; using Humanizer.Bytes; using Serilog; namespace HelloCoreClrApp.Health { public class DiskMonitor : IMonitor { private static readonly ILogger Log = Serilog.Log.ForContext<DiskMonitor>(); public void LogUsage() { var summary = DriveInfo.GetDrives() .Where(drive => (drive.DriveType == DriveType.Fixed || drive.DriveType == DriveType.Unknown) && drive.TotalSize > 0) .Aggregate(string.Empty, (current, drive) => current + $"{ByteSize.FromBytes(drive.AvailableFreeSpace).Gigabytes:0.00G} of " + $"{ByteSize.FromBytes(drive.TotalSize).Gigabytes:0.00G} free for " + $"{drive.Name}{Environment.NewLine}"); Log.Information("Available disk space:{0}{1}", Environment.NewLine, summary.TrimEnd()); } } }
using System; using System.IO; using System.Linq; using Humanizer.Bytes; using Serilog; namespace HelloCoreClrApp.Health { public class DiskMonitor : IMonitor { private static readonly ILogger Log = Serilog.Log.ForContext<DiskMonitor>(); public void LogUsage() { var summary = DriveInfo.GetDrives() .Where(drive => drive.DriveType == DriveType.Fixed) .Aggregate(string.Empty, (current, drive) => current + $"{ByteSize.FromBytes(drive.AvailableFreeSpace).Gigabytes:0.00G} of " + $"{ByteSize.FromBytes(drive.TotalSize).Gigabytes:0.00G} free for " + $"{drive.Name}{Environment.NewLine}"); Log.Information("Available disk space:{0}{1}", Environment.NewLine, summary.TrimEnd()); } } }
mit
C#
cf6595f78200b1b7134cdccff4538c0d9ea5b55d
bump ver
AntonyCorbett/OnlyT,AntonyCorbett/OnlyT
SolutionInfo.cs
SolutionInfo.cs
using System.Reflection; [assembly: AssemblyCompany("SoundBox")] [assembly: AssemblyProduct("OnlyT")] [assembly: AssemblyCopyright("Copyright © 2019 Antony Corbett")] [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] [assembly: AssemblyVersion("1.1.0.68")]
using System.Reflection; [assembly: AssemblyCompany("SoundBox")] [assembly: AssemblyProduct("OnlyT")] [assembly: AssemblyCopyright("Copyright © 2019 Antony Corbett")] [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] [assembly: AssemblyVersion("1.1.0.67")]
mit
C#
c106c416d30ea744e359323822152ecd53086082
Fix issue where quad was not visible
bastuijnman/open-park
Assets/Scripts/LocalGrid.cs
Assets/Scripts/LocalGrid.cs
using UnityEngine; using System.Collections; public class LocalGrid : MonoBehaviour { private float tileSize = 1.0f; private float width; private float height; private float x; private float z; private bool active = true; private GameObject tile; // Use this for initialization void Start () { Vector3 size = GetComponent<Collider> ().bounds.size; width = size.x; height = size.z; x = transform.position.x; z = transform.position.z; tile = GameObject.CreatePrimitive (PrimitiveType.Quad); tile.transform.parent = transform; // Quads are upright, so rotate to align with grid tile.transform.rotation = Quaternion.Euler (new Vector3 (90.0f, 0.0f, 0.0f)); tile.transform.localScale = new Vector3 (tileSize, tileSize, 1.0f); } // Update is called once per frame void Update () { if (active) { Vector2 mouse = new Vector2 (Input.mousePosition.x, Input.mousePosition.y); Ray ray = Camera.main.ScreenPointToRay (mouse); RaycastHit hit; if (Physics.Raycast (ray, out hit, 50)) { // This does not seem performant :S if (hit.collider == GetComponent<Collider> ()) { int row = Mathf.FloorToInt ((height + z + hit.point.z) / tileSize); int col = Mathf.FloorToInt ((width + x + hit.point.x) / tileSize); tile.transform.localPosition = new Vector3 ( col * tileSize, 0.1f, // Ever so slightly higher than the grid object row * tileSize ); } } } } }
using UnityEngine; using System.Collections; public class LocalGrid : MonoBehaviour { private float tileSize = 1.0f; private float width; private float height; private float x; private float z; private bool active = true; private GameObject tile; // Use this for initialization void Start () { Vector3 size = GetComponent<Collider> ().bounds.size; width = size.x; height = size.z; x = transform.position.x; z = transform.position.z; tile = GameObject.CreatePrimitive (PrimitiveType.Quad); tile.transform.parent = transform; // Quads are upright, so rotate to align with grid tile.transform.rotation = Quaternion.Euler (new Vector3 (90.0f, 0.0f, 0.0f)); tile.transform.localScale = new Vector3 (tileSize, tileSize, 1.0f); } // Update is called once per frame void Update () { if (active) { Vector2 mouse = new Vector2 (Input.mousePosition.x, Input.mousePosition.y); Ray ray = Camera.main.ScreenPointToRay (mouse); RaycastHit hit; if (Physics.Raycast (ray, out hit, 50)) { // This does not seem performant :S if (hit.collider == GetComponent<Collider> ()) { int row = Mathf.FloorToInt ((height + z + hit.point.z) / tileSize); int col = Mathf.FloorToInt ((width + x + hit.point.x) / tileSize); tile.transform.localPosition = new Vector3 ( col * tileSize, 0.0f, row * tileSize ); } } } } }
mit
C#
da0159f5eb10ed22ebc23d9d2c0c2a4528296de5
Change Namespace
muhammedikinci/FuzzyCore
FuzzyCore/ConsoleMessage.cs
FuzzyCore/ConsoleMessage.cs
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace FuzzyCore.Server { public class ConsoleMessage { public enum MessageType { ERROR, SUCCESS, CONNECT, DISCONNECT, NORMAL } public void Write(String Message , MessageType mType) { if (mType == MessageType.ERROR) { Console.ForegroundColor = ConsoleColor.Red; Console.WriteLine("ERROR : " + Message); Console.ForegroundColor = ConsoleColor.Gray; } else if (mType == MessageType.SUCCESS) { Console.ForegroundColor = ConsoleColor.Green; Console.WriteLine("SUCCESS : " + Message); Console.ForegroundColor = ConsoleColor.Gray; } else if (mType == MessageType.CONNECT) { Console.ForegroundColor = ConsoleColor.Green; Console.WriteLine("CONNECT : " + Message); Console.ForegroundColor = ConsoleColor.Gray; } else if (mType == MessageType.DISCONNECT) { Console.ForegroundColor = ConsoleColor.Red; Console.WriteLine("DISCONNECT : " + Message); Console.ForegroundColor = ConsoleColor.Gray; } else if (mType == MessageType.NORMAL) { Console.ForegroundColor = ConsoleColor.Gray; Console.WriteLine("MESSAGE : " + Message); Console.ForegroundColor = ConsoleColor.Gray; } } } }
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace fuzzyControl.Server { class ConsoleMessage { public enum MessageType { ERROR, SUCCESS, CONNECT, DISCONNECT, NORMAL } public void Write(String Message , MessageType mType) { if (mType == MessageType.ERROR) { Console.ForegroundColor = ConsoleColor.Red; Console.WriteLine("ERROR : " + Message); Console.ForegroundColor = ConsoleColor.Gray; } else if (mType == MessageType.SUCCESS) { Console.ForegroundColor = ConsoleColor.Green; Console.WriteLine("SUCCESS : " + Message); Console.ForegroundColor = ConsoleColor.Gray; } else if (mType == MessageType.CONNECT) { Console.ForegroundColor = ConsoleColor.Green; Console.WriteLine("CONNECT : " + Message); Console.ForegroundColor = ConsoleColor.Gray; } else if (mType == MessageType.DISCONNECT) { Console.ForegroundColor = ConsoleColor.Red; Console.WriteLine("DISCONNECT : " + Message); Console.ForegroundColor = ConsoleColor.Gray; } else if (mType == MessageType.NORMAL) { Console.ForegroundColor = ConsoleColor.Gray; Console.WriteLine("MESSAGE : " + Message); Console.ForegroundColor = ConsoleColor.Gray; } } } }
mit
C#
3ba00a8475a6de3ccceebc6f36377a53842c3f5b
Fix abstract class unaryExpressionConverterBase
quartz-software/kephas,quartz-software/kephas
src/Kephas.Data.Client/Queries/Conversion/ExpressionConverters/UnaryExpressionConverterBase.cs
src/Kephas.Data.Client/Queries/Conversion/ExpressionConverters/UnaryExpressionConverterBase.cs
// -------------------------------------------------------------------------------------------------------------------- // <copyright file="UnaryExpressionConverterBase.cs" company="Quartz Software SRL"> // Copyright (c) Quartz Software SRL. All rights reserved. // </copyright> // <summary> // Implements the unary expression converter base class. // </summary> // -------------------------------------------------------------------------------------------------------------------- namespace Kephas.Data.Client.Queries.Conversion.ExpressionConverters { using System; using System.Collections.Generic; using System.Linq.Expressions; using Kephas.Data.Client.Resources; using Kephas.Diagnostics.Contracts; /// <summary> /// Base class for unary expression converters. /// </summary> public abstract class UnaryExpressionConverterBase : IExpressionConverter { /// <summary> /// The binary expression factory. /// </summary> private readonly Func<Expression, UnaryExpression> unaryExpressionFactory; /// <summary> /// Initializes a new instance of the <see cref="UnaryExpressionConverterBase"/> class. /// </summary> /// <param name="unaryExpressionFactory">The unary expression factory.</param> protected UnaryExpressionConverterBase(Func<Expression, UnaryExpression> unaryExpressionFactory) { Requires.NotNull(unaryExpressionFactory, nameof(unaryExpressionFactory)); this.unaryExpressionFactory = unaryExpressionFactory; } /// <summary> /// Converts the provided expression to a LINQ expression. /// </summary> /// <param name="args">The arguments.</param> /// <returns> /// The converted expression. /// </returns> public virtual Expression ConvertExpression(IList<Expression> args) { if (args.Count != 1) { throw new DataException(string.Format(Strings.ExpressionConverter_BadArgumentsCount_Exception, args.Count, 1)); } return this.unaryExpressionFactory(args[0]); } } }
// -------------------------------------------------------------------------------------------------------------------- // <copyright file="UnaryExpressionConverterBase.cs" company="Quartz Software SRL"> // Copyright (c) Quartz Software SRL. All rights reserved. // </copyright> // <summary> // Implements the unary expression converter base class. // </summary> // -------------------------------------------------------------------------------------------------------------------- namespace Kephas.Data.Client.Queries.Conversion.ExpressionConverters { using System; using System.Collections.Generic; using System.Linq.Expressions; using Kephas.Data.Client.Resources; using Kephas.Diagnostics.Contracts; /// <summary> /// Base class for unary expression converters. /// </summary> public class UnaryExpressionConverterBase : IExpressionConverter { /// <summary> /// The binary expression factory. /// </summary> private readonly Func<Expression, UnaryExpression> unaryExpressionFactory; /// <summary> /// Initializes a new instance of the <see cref="UnaryExpressionConverterBase"/> class. /// </summary> /// <param name="unaryExpressionFactory">The unary expression factory.</param> protected UnaryExpressionConverterBase(Func<Expression, UnaryExpression> unaryExpressionFactory) { Requires.NotNull(unaryExpressionFactory, nameof(unaryExpressionFactory)); this.unaryExpressionFactory = unaryExpressionFactory; } /// <summary> /// Converts the provided expression to a LINQ expression. /// </summary> /// <param name="args">The arguments.</param> /// <returns> /// The converted expression. /// </returns> public virtual Expression ConvertExpression(IList<Expression> args) { if (args.Count != 1) { throw new DataException(string.Format(Strings.ExpressionConverter_BadArgumentsCount_Exception, args.Count, 1)); } return this.unaryExpressionFactory(args[0]); } } }
mit
C#
6d7f1616b768d04f96ede8068686a8e47ce7c8a4
Fix transparent config skipping bugs
kamsar/Unicorn,kamsar/Unicorn
src/Unicorn/ControlPanel/Pipelines/UnicornControlPanelRequest/SyncVerb.cs
src/Unicorn/ControlPanel/Pipelines/UnicornControlPanelRequest/SyncVerb.cs
using System; using System.Linq; using System.Web; using Kamsar.WebConsole; using Unicorn.Configuration; using Unicorn.ControlPanel.Headings; using Unicorn.ControlPanel.Responses; using Unicorn.Logging; using Sitecore.Diagnostics; // ReSharper disable RedundantArgumentNameForLiteralExpression // ReSharper disable RedundantArgumentName namespace Unicorn.ControlPanel.Pipelines.UnicornControlPanelRequest { public class SyncVerb : UnicornControlPanelRequestPipelineProcessor { private readonly SerializationHelper _helper; public SyncVerb() : this("Sync", new SerializationHelper()) { } protected SyncVerb(string verb, SerializationHelper helper) : base(verb) { _helper = helper; } protected override IResponse CreateResponse(UnicornControlPanelRequestPipelineArgs args) { return new WebConsoleResponse("Sync Unicorn", args.SecurityState.IsAutomatedTool, new HeadingService(), progress => Process(progress, new WebConsoleLogger(progress, args.Context.Request.QueryString["log"]))); } protected virtual void Process(IProgressStatus progress, ILogger additionalLogger) { var configurations = ResolveConfigurations(); _helper.SyncConfigurations(configurations, progress, additionalLogger); } protected virtual IConfiguration[] ResolveConfigurations() { var config = HttpContext.Current.Request.QueryString["configuration"]; var targetConfigurations = ControlPanelUtility.ResolveConfigurationsFromQueryParameter(config); if (targetConfigurations.Length == 0) throw new ArgumentException("Configuration(s) requested were not defined."); // skipTransparent does not apply when syncing a single config explicitly if (targetConfigurations.Length == 1) return targetConfigurations; // optionally skip transparent sync configs when syncing var skipTransparent = HttpContext.Current.Request.QueryString["skipTransparentConfigs"]; if (skipTransparent == "1" || skipTransparent.Equals(bool.TrueString, StringComparison.OrdinalIgnoreCase)) { targetConfigurations = targetConfigurations.SkipTransparentSync().ToArray(); if (targetConfigurations.Length == 0) Log.Warn("[Unicorn] All configurations were transparent sync and skipTransparentConfigs was active. Syncing nothing.", this); } return targetConfigurations; } } }
using System; using System.Linq; using System.Web; using Kamsar.WebConsole; using Unicorn.Configuration; using Unicorn.ControlPanel.Headings; using Unicorn.ControlPanel.Responses; using Unicorn.Logging; using Sitecore.Diagnostics; // ReSharper disable RedundantArgumentNameForLiteralExpression // ReSharper disable RedundantArgumentName namespace Unicorn.ControlPanel.Pipelines.UnicornControlPanelRequest { public class SyncVerb : UnicornControlPanelRequestPipelineProcessor { private readonly SerializationHelper _helper; public SyncVerb() : this("Sync", new SerializationHelper()) { } protected SyncVerb(string verb, SerializationHelper helper) : base(verb) { _helper = helper; } protected override IResponse CreateResponse(UnicornControlPanelRequestPipelineArgs args) { return new WebConsoleResponse("Sync Unicorn", args.SecurityState.IsAutomatedTool, new HeadingService(), progress => Process(progress, new WebConsoleLogger(progress, args.Context.Request.QueryString["log"]))); } protected virtual void Process(IProgressStatus progress, ILogger additionalLogger) { var configurations = ResolveConfigurations(); _helper.SyncConfigurations(configurations, progress, additionalLogger); } protected virtual IConfiguration[] ResolveConfigurations() { var config = HttpContext.Current.Request.QueryString["configuration"]; var targetConfigurations = ControlPanelUtility.ResolveConfigurationsFromQueryParameter(config); if (targetConfigurations.Length == 0) throw new ArgumentException("Configuration(s) requested were not defined."); var skipTransparent = HttpContext.Current.Request.QueryString["skipTransparentConfigs"]; if (skipTransparent == "1") { targetConfigurations = targetConfigurations.SkipTransparentSync().ToArray(); if (targetConfigurations.Length == 0) Log.Warn("[Unicorn] All configurations were transparent sync and skipTransparentConfigs was active. Syncing nothing.", this); } return targetConfigurations; } } }
mit
C#
dd34453f3e72c47b5b7e63f396ed4b4789981187
Add Enabled = true, Exported = false
CrossGeeks/FirebasePushNotificationPlugin
Plugin.FirebasePushNotification/PushNotificationDeletedReceiver.android.cs
Plugin.FirebasePushNotification/PushNotificationDeletedReceiver.android.cs
using System.Collections.Generic; using Android.Content; namespace Plugin.FirebasePushNotification { [BroadcastReceiver(Enabled = true, Exported = false)] public class PushNotificationDeletedReceiver : BroadcastReceiver { public override void OnReceive(Context context, Intent intent) { IDictionary<string, object> parameters = new Dictionary<string, object>(); var extras = intent.Extras; if (extras != null && !extras.IsEmpty) { foreach (var key in extras.KeySet()) { parameters.Add(key, $"{extras.Get(key)}"); System.Diagnostics.Debug.WriteLine(key, $"{extras.Get(key)}"); } } FirebasePushNotificationManager.RegisterDelete(parameters); } } }
using System.Collections.Generic; using Android.Content; namespace Plugin.FirebasePushNotification { [BroadcastReceiver] public class PushNotificationDeletedReceiver : BroadcastReceiver { public override void OnReceive(Context context, Intent intent) { IDictionary<string, object> parameters = new Dictionary<string, object>(); var extras = intent.Extras; if (extras != null && !extras.IsEmpty) { foreach (var key in extras.KeySet()) { parameters.Add(key, $"{extras.Get(key)}"); System.Diagnostics.Debug.WriteLine(key, $"{extras.Get(key)}"); } } FirebasePushNotificationManager.RegisterDelete(parameters); } } }
mit
C#
93b92cd27b0c6cf7bb30a3123c0f0a86dac36c77
Fix code analysis
jkonecki/T4MVC,payini/T4MVC,jkonecki/T4MVC,scott-xu/T4MVC,M1chaelTran/T4MVC,scott-xu/T4MVC,T4MVC/T4MVC,payini/T4MVC,T4MVC/T4MVC,M1chaelTran/T4MVC
T4MVCHostMvcApp/Areas/FeatureFolderArea/FeatureFoo/FeatureFooController.cs
T4MVCHostMvcApp/Areas/FeatureFolderArea/FeatureFoo/FeatureFooController.cs
using System.Web.Mvc; namespace T4MVCHostMvcApp.Areas.FeatureFolderArea.FeatureFoo { public partial class FeatureFooController : Controller { public virtual ActionResult Index() { return View(); } [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", MessageId = "Foobar")] [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", MessageId = "param")] public virtual ActionResult Foobar(string param) { return View(); } } }
using System.Web.Mvc; namespace T4MVCHostMvcApp.Areas.FeatureFolderArea.FeatureFoo { public partial class FeatureFooController : Controller { public virtual ActionResult Index() { return View(); } public virtual ActionResult Foobar(string param) { return View(); } } }
apache-2.0
C#
54bd545a843ae4ea88468639aaa57f409d5e02fa
Add doc comment to BenchmarkAttribute
visia/xunit-performance,Microsoft/xunit-performance,pharring/xunit-performance,ericeil/xunit-performance,ianhays/xunit-performance,Microsoft/xunit-performance,mmitche/xunit-performance
xunit.performance.core/BenchmarkAttribute.cs
xunit.performance.core/BenchmarkAttribute.cs
using System; using Xunit; using Xunit.Sdk; namespace Microsoft.Xunit.Performance { /// <summary> /// Attribute that is applied to a method to indicate that it is a performance test that /// should be run and measured by the performance test runner. /// </summary> [XunitTestCaseDiscoverer("Microsoft.Xunit.Performance.BenchmarkDiscoverer", "xunit.performance.execution.{Platform}")] [TraitDiscoverer("Microsoft.Xunit.Performance.BenchmarkTraitDiscoverer", "xunit.performance.execution.{Platform}")] [AttributeUsage(AttributeTargets.Method, AllowMultiple = false)] public class BenchmarkAttribute : FactAttribute, ITraitAttribute { /// <summary> /// If true, performance metrics will be computed for all iterations of the method. If false (the default), the first /// iteration of the method will be ignored when computing results. This "warmup" iteration helps eliminate one-time costs /// (such as JIT compilation time) from the results, but may be unnecessary for some tests. /// </summary> public bool SkipWarmup { get; set; } } }
using System; using Xunit; using Xunit.Sdk; namespace Microsoft.Xunit.Performance { [XunitTestCaseDiscoverer("Microsoft.Xunit.Performance.BenchmarkDiscoverer", "xunit.performance.execution.{Platform}")] [TraitDiscoverer("Microsoft.Xunit.Performance.BenchmarkTraitDiscoverer", "xunit.performance.execution.{Platform}")] [AttributeUsage(AttributeTargets.Method, AllowMultiple = false)] public class BenchmarkAttribute : FactAttribute, ITraitAttribute { /// <summary> /// If true, performance metrics will be computed for all iterations of the method. If false (the default), the first /// iteration of the method will be ignored when computing results. This "warmup" iteration helps eliminate one-time costs /// (such as JIT compilation time) from the results, but may be unnecessary for some tests. /// </summary> public bool SkipWarmup { get; set; } } }
mit
C#
5c5391506450d53eadbbe9527969a2eb5188dd22
increase LineParserTest timeout
alexvictoor/BrowserLog,alexvictoor/BrowserLog,alexvictoor/BrowserLog
BrowserLog.Tests/TinyServer/LineParserTest.cs
BrowserLog.Tests/TinyServer/LineParserTest.cs
using System; using System.Collections.Generic; using System.IO; using System.Linq; using System.Text; using System.Threading; using System.Threading.Tasks; using BrowserLog.TinyServer; using NFluent; using NUnit.Framework; namespace BrowserLog.TinyServer { public class LineParserTest { [Test] [Timeout(100)] public async void Should_parse_one_line() { // given byte[] buffer = Encoding.ASCII.GetBytes("first line\n\n"); var stream = new MemoryStream(buffer); var parser = new LineParser(); // when var lines = await parser.Parse(stream, CancellationToken.None); // then Check.That(lines).HasSize(1); Check.That(lines.ElementAt(0)).IsEqualTo("first line"); } [Test] public async void Should_parse_two_lines() { // given byte[] buffer = Encoding.ASCII.GetBytes("first line\nsecond line\n\n"); var stream = new MemoryStream(buffer); var parser = new LineParser(); // when var lines = await parser.Parse(stream, CancellationToken.None); // then Check.That(lines).HasSize(2); Check.That(lines.ElementAt(0)).IsEqualTo("first line"); Check.That(lines.ElementAt(1)).IsEqualTo("second line"); } [Test] [Timeout(10000)] public async void Should_parse_lines_till_cancelled() { // given byte[] buffer = Encoding.ASCII.GetBytes("first line\nsecond"); var stream = new MemoryStream(buffer); var parser = new LineParser(); // when var source = new CancellationTokenSource(); var parsingTask = Task.Run(() => parser.Parse(stream, source.Token)); await Task.Delay(200); source.Cancel(); await Task.Delay(1000); // then Check.That(parsingTask.Status).IsNotEqualTo(TaskStatus.Running); } } }
using System; using System.Collections.Generic; using System.IO; using System.Linq; using System.Text; using System.Threading; using System.Threading.Tasks; using BrowserLog.TinyServer; using NFluent; using NUnit.Framework; namespace BrowserLog.TinyServer { public class LineParserTest { [Test] [Timeout(100)] public async void Should_parse_one_line() { // given byte[] buffer = Encoding.ASCII.GetBytes("first line\n\n"); var stream = new MemoryStream(buffer); var parser = new LineParser(); // when var lines = await parser.Parse(stream, CancellationToken.None); // then Check.That(lines).HasSize(1); Check.That(lines.ElementAt(0)).IsEqualTo("first line"); } [Test] public async void Should_parse_two_lines() { // given byte[] buffer = Encoding.ASCII.GetBytes("first line\nsecond line\n\n"); var stream = new MemoryStream(buffer); var parser = new LineParser(); // when var lines = await parser.Parse(stream, CancellationToken.None); // then Check.That(lines).HasSize(2); Check.That(lines.ElementAt(0)).IsEqualTo("first line"); Check.That(lines.ElementAt(1)).IsEqualTo("second line"); } [Test] [Timeout(2000)] public async void Should_parse_lines_till_cancelled() { // given byte[] buffer = Encoding.ASCII.GetBytes("first line\nsecond"); var stream = new MemoryStream(buffer); var parser = new LineParser(); // when var source = new CancellationTokenSource(); var parsingTask = Task.Run(() => parser.Parse(stream, source.Token)); await Task.Delay(200); source.Cancel(); await Task.Delay(1000); // then Check.That(parsingTask.Status).IsNotEqualTo(TaskStatus.Running); } } }
apache-2.0
C#
e4c414a99d362d93eed30949727a719f05387bbc
Fix Injector saving
SnpM/Lockstep-Framework,yanyiyun/LockstepFramework,erebuswolf/LockstepFramework
Core/Utility/Serialization/Editor/Injector.cs
Core/Utility/Serialization/Editor/Injector.cs
using UnityEngine; using System.Collections; using UnityEditor; namespace Lockstep { public static class Injector { public static void SetTarget (UnityEngine.Object target) { Target = target; } public static Object Target{ get; private set;} static SerializedObject so; public static SerializedProperty GetProperty (string name) { so = new SerializedObject (Target); SerializedProperty prop = so.FindProperty(name); return prop; } public static void SetField (string name, float value, FieldType fieldType) { SerializedProperty prop = GetProperty (name); switch (fieldType) { case FieldType.FixedNumber: prop.longValue = FixedMath.Create(value); break; case FieldType.Interval: prop.intValue = Mathf.RoundToInt(value * LockstepManager.FrameRate); break; case FieldType.Rate: prop.intValue = Mathf.RoundToInt((1 / value) * LockstepManager.FrameRate); break; } so.ApplyModifiedProperties(); EditorUtility.SetDirty(Target); } public static float GetField (string name, FieldType fieldType) { SerializedProperty prop = GetProperty (name); switch (fieldType) { case FieldType.FixedNumber: return prop.longValue.ToFloat(); break; case FieldType.Interval: return prop.intValue / (float) LockstepManager.FrameRate; break; case FieldType.Rate: return 1 / (prop.intValue / (float)LockstepManager.FrameRate); break; } return 0; } } public enum FieldType { FixedNumber, Interval, Rate, } }
using UnityEngine; using System.Collections; using UnityEditor; namespace Lockstep { public static class Injector { public static void SetTarget (UnityEngine.Object target) { Target = target; } public static Object Target{ get; private set;} public static SerializedProperty GetProperty (string name) { SerializedObject so = new SerializedObject (Target); SerializedProperty prop = so.FindProperty(name); return prop; } public static void SetField (string name, float value, FieldType fieldType) { SerializedProperty prop = GetProperty (name); switch (fieldType) { case FieldType.FixedNumber: prop.longValue = FixedMath.Create(value); break; case FieldType.Interval: prop.intValue = Mathf.RoundToInt(value * LockstepManager.FrameRate); break; case FieldType.Rate: prop.intValue = Mathf.RoundToInt((1 / value) * LockstepManager.FrameRate); break; } } public static float GetField (string name, FieldType fieldType) { SerializedProperty prop = GetProperty (name); switch (fieldType) { case FieldType.FixedNumber: return prop.longValue.ToFloat(); break; case FieldType.Interval: return prop.intValue / (float) LockstepManager.FrameRate; break; case FieldType.Rate: return 1 / (prop.intValue / (float)LockstepManager.FrameRate); break; } return 0; } } public enum FieldType { FixedNumber, Interval, Rate, } }
mit
C#
2dc328727a20bd7e72f570c31a0974b4bd30b780
Fix logic fail with IsNoFlip
AngelDE98/FEZMod,AngelDE98/FEZMod
FezEngine.Mod.mm/FezEngine/Structure/Level.cs
FezEngine.Mod.mm/FezEngine/Structure/Level.cs
using System; namespace FezEngine.Structure { public class Level { public static bool IsNoFlat = false; public bool orig_get_Flat() { return false; } public bool get_Flat() { return orig_get_Flat() && !IsNoFlat; } } }
using System; namespace FezEngine.Structure { public class Level { public static bool IsNoFlat = false; public bool orig_get_Flat() { return false; } public bool get_Flat() { return orig_get_Flat() || !IsNoFlat; } } }
mit
C#
8dd4271c475feb14496fe88b0720f55f64aafe06
revert unwanted change
AvaloniaUI/Avalonia,AvaloniaUI/Avalonia,grokys/Perspex,AvaloniaUI/Avalonia,SuperJMN/Avalonia,SuperJMN/Avalonia,AvaloniaUI/Avalonia,grokys/Perspex,SuperJMN/Avalonia,AvaloniaUI/Avalonia,AvaloniaUI/Avalonia,SuperJMN/Avalonia,SuperJMN/Avalonia,SuperJMN/Avalonia,AvaloniaUI/Avalonia,SuperJMN/Avalonia
src/Android/Avalonia.AndroidTestApplication/Resources/Resource.Designer.cs
src/Android/Avalonia.AndroidTestApplication/Resources/Resource.Designer.cs
#pragma warning disable 1591 //------------------------------------------------------------------------------ // <auto-generated> // This code was generated by a tool. // // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. // </auto-generated> //------------------------------------------------------------------------------ [assembly: global::Android.Runtime.ResourceDesignerAttribute("Avalonia.AndroidTestApplication.Resource", IsApplication=true)] namespace Avalonia.AndroidTestApplication { [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Xamarin.Android.Build.Tasks", "12.1.99.62")] public partial class Resource { static Resource() { global::Android.Runtime.ResourceIdManager.UpdateIdValues(); } public static void UpdateIdValues() { } public partial class Attribute { static Attribute() { global::Android.Runtime.ResourceIdManager.UpdateIdValues(); } private Attribute() { } } public partial class Drawable { // aapt resource value: 0x7F010000 public const int Icon = 2130771968; static Drawable() { global::Android.Runtime.ResourceIdManager.UpdateIdValues(); } private Drawable() { } } public partial class String { // aapt resource value: 0x7F020000 public const int ApplicationName = 2130837504; // aapt resource value: 0x7F020001 public const int Hello = 2130837505; static String() { global::Android.Runtime.ResourceIdManager.UpdateIdValues(); } private String() { } } } } #pragma warning restore 1591
#pragma warning disable 1591 //------------------------------------------------------------------------------ // <auto-generated> // This code was generated by a tool. // // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. // </auto-generated> //------------------------------------------------------------------------------ [assembly: global::Android.Runtime.ResourceDesignerAttribute("Avalonia.AndroidTestApplication.Resource", IsApplication=true)] namespace Avalonia.AndroidTestApplication { [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Xamarin.Android.Build.Tasks", "12.1.0.11")] public partial class Resource { static Resource() { global::Android.Runtime.ResourceIdManager.UpdateIdValues(); } public static void UpdateIdValues() { } public partial class Attribute { static Attribute() { global::Android.Runtime.ResourceIdManager.UpdateIdValues(); } private Attribute() { } } public partial class Drawable { // aapt resource value: 0x7F010000 public const int Icon = 2130771968; static Drawable() { global::Android.Runtime.ResourceIdManager.UpdateIdValues(); } private Drawable() { } } public partial class String { // aapt resource value: 0x7F020000 public const int ApplicationName = 2130837504; // aapt resource value: 0x7F020001 public const int Hello = 2130837505; static String() { global::Android.Runtime.ResourceIdManager.UpdateIdValues(); } private String() { } } } } #pragma warning restore 1591
mit
C#
0f9f762cc5b154b6790c6f5f1e4ac326de86537f
Update StudentCreateViewModel to restrict the size of the Grade input.
Programazing/Open-School-Library,Programazing/Open-School-Library
src/Open-School-Library/Models/StudentViewModels/StudentCreateViewModel.cs
src/Open-School-Library/Models/StudentViewModels/StudentCreateViewModel.cs
using Microsoft.AspNetCore.Mvc.Rendering; using System; using System.Collections.Generic; using System.ComponentModel.DataAnnotations; using System.Linq; using System.Threading.Tasks; namespace Open_School_Library.Models.StudentViewModels { public class StudentCreateViewModel { public int StudentID { get; set; } [Display(Name = "First Name")] [Required(ErrorMessage = "First Name is Required!")] public string FirstName { get; set; } [Display(Name = "Last Name")] [Required(ErrorMessage = "Last name is Required!")] public string LastName { get; set; } [Required(ErrorMessage = "Grade is Required!")] [MaxLength(99)] public int Grade { get; set; } public decimal? Fines { get; set; } [Display(Name = "Issued ID")] public int? IssuedID { get; set; } public string Email { get; set; } [Display(Name = "Teacher")] public int TeacherID { get; set; } public SelectList Teacher { get; set; } } }
using Microsoft.AspNetCore.Mvc.Rendering; using System; using System.Collections.Generic; using System.ComponentModel.DataAnnotations; using System.Linq; using System.Threading.Tasks; namespace Open_School_Library.Models.StudentViewModels { public class StudentCreateViewModel { public int StudentID { get; set; } [Display(Name = "First Name")] [Required(ErrorMessage = "First Name is Required!")] public string FirstName { get; set; } [Display(Name = "Last Name")] [Required(ErrorMessage = "Last name is Required!")] public string LastName { get; set; } [Required(ErrorMessage = "Grade is Required!")] public int Grade { get; set; } public decimal? Fines { get; set; } [Display(Name = "Issued ID")] public int? IssuedID { get; set; } public string Email { get; set; } [Display(Name = "Teacher")] public int TeacherID { get; set; } public SelectList Teacher { get; set; } } }
mit
C#
1643d0229415479f66bf2830f0c3a0e255882cb4
Include email possibility on server error page
erooijak/oogstplanner,erooijak/oogstplanner,erooijak/oogstplanner,erooijak/oogstplanner
Oogstplanner.Web/Views/Shared/Error.cshtml
Oogstplanner.Web/Views/Shared/Error.cshtml
@{ ViewBag.Title = "Er is iets fout gegaan"; } <div id="top"></div> <div class="row"> <div class="col-lg-4 col-md-3 col-sm-2 col-xs-2"></div> <div class="col-lg-4 col-md-6 col-sm-8 col-xs-8"> <div class="panel panel-default dark"> <div class="panel-heading"> <h1 class="panel-title"><strong>500 Interne Server Fout</strong></h1> </div> <p> <span class="glyphicon glyphicon-heart-empty"></span>&nbsp; Oeps, sorry, er is iets fout gegaan.<br/><br/> Er is iets kapot. Als u zo vriendelijk wilt zijn <a href="https://github.com/erooijak/oogstplanner/issues"> een probleem (issue) aan te maken op onze GitHub </a> of een mail te sturen naar <a href="mailto:oogstplanner@gmail.com"> oogstplanner@gmail.com </a> zullen we er naar kijken. </p> </div> </div> <div class="col-lg-4 col-md-3 col-sm-2 col-xs-2"></div> </div>
@{ ViewBag.Title = "Er is iets fout gegaan"; } <div id="top"></div> <div class="row"> <div class="col-lg-4 col-md-3 col-sm-2 col-xs-2"></div> <div class="col-lg-4 col-md-6 col-sm-8 col-xs-8"> <div class="panel panel-default dark"> <div class="panel-heading"> <h1 class="panel-title"><strong>500 Interne Server Fout</strong></h1> </div> <p> <span class="glyphicon glyphicon-heart-empty"></span>&nbsp; Oeps, sorry, er is iets fout gegaan.<br/><br/> Er is iets kapot. Als u zo vriendelijk wilt zijn <a href="https://github.com/erooijak/oogstplanner/issues"> een probleem (issue) aan te maken op onze GitHub </a> zullen we er naar kijken. </p> </div> </div> <div class="col-lg-4 col-md-3 col-sm-2 col-xs-2"></div> </div>
mit
C#