Skip to content

Instantly share code, notes, and snippets.

View mkrueger's full-sized avatar

Mike Krüger mkrueger

View GitHub Profile
LEGAL STUFF!
=========================================================================
D.D.O. F/X and the Locatha Industries Logo (the Red Double Bladed Scythe)
are Trademarks of Locatha Industries, Incorporated. All other trademarks
are the property of their respective owners. Their use in this document
does not constitute an attempt by Locatha Industries, Inc. to claim those
Trademarks or specifically endorse them.
Although this document expressly defines D.D.O. F/X, it does not in any
way diminish the right of ownership of D.D.O. F/X by Locatha Industries
//
// StatusView.cs
//
// Author:
// Mike Krüger <mikkrg@microsoft.com>
//
// Copyright (c) 2020 Microsoft Inc.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
//
// CollectionCache.cs
//
// Author:
// Mike Krüger <mikkrg@microsoft.com>
//
// Copyright (c) 2019 Microsoft Corporation. All rights reserved.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
namespace NetCoreConsoleAp
{
class Program
{
static void Main(string[] args)
"GUI Thread" at MonoDevelop.Ide.Editor.Highlighting.RegexEngine.RegexInterpreter.Advance (int) [0x00025] in /Users/mkrueger/work/monodevelop/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Highlighting/RegexEngine/RegexInterpreter.cs:56
at MonoDevelop.Ide.Editor.Highlighting.RegexEngine.RegexInterpreter.Go () [0x00329] in /Users/mkrueger/work/monodevelop/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Highlighting/RegexEngine/RegexInterpreter.cs:482
at MonoDevelop.Ide.Editor.Highlighting.RegexEngine.RegexRunner.Scan (MonoDevelop.Ide.Editor.Highlighting.RegexEngine.Regex,string,int,int,int,int,bool,System.TimeSpan) [0x00114] in /Users/mkrueger/work/monodevelop/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Highlighting/RegexEngine/RegexRunner.cs:184
at MonoDevelop.Ide.Editor.Highlighting.RegexEngine.Regex.Run (bool,int,string,int,int,int,System.TimeSpan) [0x000a1] in /Users/mkrueger/work/monodevelop/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Highlighting/RegexEngine/Regex.cs:12
"GUI Thread" at MonoDevelop.Ide.Editor.Highlighting.RegexEngine.RegexInterpreter.Advance (int) [0x00025] in /Users/mkrueger/work/monodevelop/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Highlighting/RegexEngine/RegexInterpreter.cs:56
at MonoDevelop.Ide.Editor.Highlighting.RegexEngine.RegexInterpreter.Go () [0x00329] in /Users/mkrueger/work/monodevelop/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Highlighting/RegexEngine/RegexInterpreter.cs:482
at MonoDevelop.Ide.Editor.Highlighting.RegexEngine.RegexRunner.Scan (MonoDevelop.Ide.Editor.Highlighting.RegexEngine.Regex,string,int,int,int,int,bool,System.TimeSpan) [0x00114] in /Users/mkrueger/work/monodevelop/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Highlighting/RegexEngine/RegexRunner.cs:184
at MonoDevelop.Ide.Editor.Highlighting.RegexEngine.Regex.Run (bool,int,string,int,int,int,System.TimeSpan) [0x000a1] in /Users/mkrueger/work/monodevelop/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Highlighting/RegexEngine/Regex.cs:12
diff --git a/main/src/addins/MonoDevelop.Refactoring/MonoDevelop.CodeActions/CodeActionEditorExtension.cs b/main/src/addins/MonoDevelop.Refactoring/MonoDevelop.CodeActions/CodeActionEditorExtension.cs
index e4dda73ec2..020899f643 100644
--- a/main/src/addins/MonoDevelop.Refactoring/MonoDevelop.CodeActions/CodeActionEditorExtension.cs
+++ b/main/src/addins/MonoDevelop.Refactoring/MonoDevelop.CodeActions/CodeActionEditorExtension.cs
@@ -186,7 +186,19 @@ namespace MonoDevelop.CodeActions
{
Runtime.AssertMainThread ();
var caretOffset = Editor.CaretOffset;
- return collections.Select (c => FilterOnUIThread (c, workspace)).Where(x => x != null).OrderBy(x => GetDistance (x, caretOffset)).ToImmutableArray ();
+ var builder = ImmutableArray.CreateBuilder<CodeFixCollection> (collections.Length);
"<unnamed thread>" at <unknown> <0xffffffff>
at (wrapper managed-to-native) object.__icall_wrapper_mono_threads_state_poll () [0x00006] in <69e8aa7a1d73495d92adb99b890f03fc>:0
at System.DateTime.get_Year () <0x0001b>
at System.TimeZoneInfo.IsInDST (System.TimeZoneInfo/AdjustmentRule,System.DateTime) [0x00013] in /home/mkrueger/work/install/mono/mcs/class/corlib/System/TimeZoneInfo.cs:911
at System.TimeZoneInfo.GetUtcOffsetHelper (System.DateTime,System.TimeZoneInfo,bool&) [0x0004a] in /home/mkrueger/work/install/mono/mcs/class/corlib/System/TimeZoneInfo.cs:815
at System.TimeZoneInfo.GetUtcOffset (System.DateTime,bool&) [0x00052] in /home/mkrueger/work/install/mono/mcs/class/corlib/System/TimeZoneInfo.cs:795
at System.TimeZoneInfo.GetUtcOffset (System.DateTime) [0x00000] in /home/mkrueger/work/install/mono/mcs/class/corlib/System/TimeZoneInfo.cs:763
at System.TimeZoneInfo.ConvertTimeFromUtc (System.DateTime) [0x00025] in /home/mkrueger/work/install/mono/mcs/class/corlib/System/TimeZoneInfo.cs:4
ERROR [2015-07-28 09:49:14Z]: Could not get diff for file '/home/mkrueger/work/RefactoringEssentials/RefactoringEssentials/CSharp/Diagnostics/Synced/PracticesAndImprovements/FieldCanBeMadeReadOnlyAnalyzer.cs'
LibGit2Sharp.LibGit2SharpException: Ungültiges Sortierzeichen
at LibGit2Sharp.Core.Ensure.HandleError (Int32 result) [0x00082] in /home/mkrueger/work/monodevelop/main/external/libgit2sharp/LibGit2Sharp/Core/Ensure.cs:128
at LibGit2Sharp.Core.Ensure.ZeroResult (Int32 result) [0x0000e] in /home/mkrueger/work/monodevelop/main/external/libgit2sharp/LibGit2Sharp/Core/Ensure.cs:146
at LibGit2Sharp.Core.Proxy.git_patch_from_diff (LibGit2Sharp.Core.Handles.DiffSafeHandle diff, Int32 idx) [0x00012] in /home/mkrueger/work/monodevelop/main/external/libgit2sharp/LibGit2Sharp/Core/Proxy.cs:1495
at LibGit2Sharp.Patch..ctor (LibGit2Sharp.Core.Handles.DiffSafeHandle diff) [0x0002e] in /home/mkrueger/work/monodevelop/main/external/libgit2sharp/LibGit2Sharp/Patch.cs:38
at LibGit2Sharp.Diff.<ChangesBuilders>m
public class binarytrees {
public static void main(String[] args) throws Exception {
int n = args.length > 0 ? Integer.parseInt(args[0]) : 0;
int minDepth = 4;
int maxDepth = Math.max(minDepth + 2, n);
int stretchDepth = maxDepth + 1;
int check = (TreeNode.create(0, stretchDepth)).check();
System.out.println("stretch tree of depth " + (maxDepth + 1) + "\t check: " + check);