SVGを簡略化

SVGを簡略化

--- QRCodeLib/QRCode/Symbol.cs
+++ QRCodeLib/QRCode/Symbol.cs
@@ -600,13 +600,7 @@
             int width, height;
             width = height = moduleSize * moduleMatrix.Length;

-            int rowBytesLen = 3 * width;
-
-            int pack4byte = 0;
-            if (rowBytesLen % 4 > 0)
-                pack4byte = 4 - (rowBytesLen % 4);
-
-            int rowSize = rowBytesLen + pack4byte;
+            int rowSize = ((3 * width + 3) / 4) * 4;
             byte[] bitmapData = new byte[rowSize * height];
             int offset = 0;

@@ -769,14 +763,8 @@

             string newLine = Environment.NewLine;

-            string svg = GetSvg(moduleSize, foreRgb);
-            string svgFile =
-                $"<?xml version='1.0' encoding='UTF-8' standalone='no'?>{newLine}" +
-                $"<!DOCTYPE svg PUBLIC '-//W3C//DTD SVG 20010904//EN'{newLine}" +
-                $"    'http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd'>{newLine}" +
-                svg + newLine;
-
-            File.WriteAllText(fileName, svgFile);
+            string svg = GetSvg(moduleSize, foreRgb) + newLine;
+            File.WriteAllText(fileName, svg);
         }

         public string GetSvg(int moduleSize = DEFAULT_MODULE_SIZE,
@@ -822,7 +810,7 @@

             Point[][] gpPaths = GraphicPath.FindContours(image);
             var buf = new StringBuilder();
-            string indent = new string(' ', 11);
+            string indent = new string(' ', 5);

             foreach (var gpPath in gpPaths)
             {
@@ -837,11 +825,10 @@
             string newLine = Environment.NewLine;
             string data = buf.ToString().Trim();
             string svg =
-                $"<svg xmlns='http://www.w3.org/2000/svg'{newLine}" +
-                $"    width='{width}' height='{height}' viewBox='0 0 {width} {height}'>{newLine}" +
-                $"    <path fill='{foreRgb}' stroke='{foreRgb}' stroke-width='1'{newLine}" +
-                $"        d='{data}'{newLine}" +
-                $"    />{newLine}" +
+                $"<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\"" + newLine +
+                $"  width=\"{width}px\" height=\"{height}px\" viewBox=\"0 0 {width} {height}\">" + newLine +
+                $"<path fill=\"{foreRgb}\" stroke=\"{foreRgb}\" stroke-width=\"1\"" + newLine +
+                $"  d=\"{data}\" />" + newLine +
                 $"</svg>";

             return svg;


Extract constants into meaningful names in RenderOffsetCalculator

--- EndlessClient/Rendering/RenderOffsetCalculator.cs
+++ EndlessClient/Rendering/RenderOffsetCalculator.cs
@@ -11,40 +11,45 @@
 {
     public class RenderOffsetCalculator : IRenderOffsetCalculator
     {
+        private const int WidthFactor = 32;
+        private const int HeightFactor = 16;
+        private const int WalkWidthFactor = WidthFactor/4;
+        private const int WalkHeightFactor = HeightFactor/4;
+
         public int CalculateOffsetX(ICharacterRenderProperties properties)
         {
             var multiplier = properties.IsFacing(EODirection.Left, EODirection.Down) ? -1 : 1;
-            var walkAdjust = properties.IsActing(CharacterActionState.Walking) ? 8 * properties.WalkFrame : 0;
+            var walkAdjust = properties.IsActing(CharacterActionState.Walking) ? WalkWidthFactor * properties.WalkFrame : 0;

             //walkAdjust * multiplier is the old ViewAdjustX
-            return properties.MapX*32 - properties.MapY*32 + walkAdjust*multiplier;
+            return properties.MapX*WidthFactor - properties.MapY*WidthFactor + walkAdjust*multiplier;
         }

         public int CalculateOffsetY(ICharacterRenderProperties properties)
         {
             var multiplier = properties.IsFacing(EODirection.Left, EODirection.Up) ? -1 : 1;
-            var walkAdjust = properties.IsActing(CharacterActionState.Walking) ? 4 * properties.WalkFrame : 0;
+            var walkAdjust = properties.IsActing(CharacterActionState.Walking) ? WalkHeightFactor * properties.WalkFrame : 0;

             //walkAdjust * multiplier is the old ViewAdjustY
-            return properties.MapX*16 + properties.MapY*16 + walkAdjust*multiplier;
+            return properties.MapX*HeightFactor + properties.MapY*HeightFactor + walkAdjust*multiplier;
         }

         public int CalculateOffsetX(INPC npc)
         {
             var multiplier = npc.IsFacing(EODirection.Left, EODirection.Down) ? -1 : 1;
-            var walkAdjust = npc.IsActing(NPCActionState.Walking) ? 8 * npc.GetWalkFrame() : 0;
+            var walkAdjust = npc.IsActing(NPCActionState.Walking) ? WalkWidthFactor * npc.GetWalkFrame() : 0;

             //walkAdjust * multiplier is the old ViewAdjustX
-            return npc.X*32 - npc.Y*32 + walkAdjust*multiplier;
+            return npc.X*WidthFactor - npc.Y*WidthFactor + walkAdjust*multiplier;
         }

         public int CalculateOffsetY(INPC npc)
         {
             var multiplier = npc.IsFacing(EODirection.Left, EODirection.Down) ? -1 : 1;
-            var walkAdjust = npc.IsActing(NPCActionState.Walking) ? 4 * npc.GetWalkFrame() : 0;
+            var walkAdjust = npc.IsActing(NPCActionState.Walking) ? WalkHeightFactor * npc.GetWalkFrame() : 0;

             //walkAdjust * multiplier is the old ViewAdjustY
-            return npc.X*16 - npc.Y*16 + walkAdjust*multiplier;
+            return npc.X*HeightFactor - npc.Y*HeightFactor + walkAdjust*multiplier;
         }
     }


Rolled back change which enabled failing tests

--- Engine3D/Engine3D-Tests/Raytrace/RendererTests.cs
+++ Engine3D/Engine3D-Tests/Raytrace/RendererTests.cs
@@ -105,7 +105,7 @@
         // Release mode: 6 mins @ res 100
         // Release mode: (5 flags) 54 seconds @ res 400
         // TODO: very, very slow! Make this much faster!
-        [TestMethod]
+        [TestMethod, Ignore]
         public void RaytraceTest()
         {
             var flags = new bool[6];
@@ -190,7 +190,7 @@
         // TODO: produced image is slightly different if this test is run in isolation vs run together with test RaytraceStaticShadow. Why?
         // TODO: number of threads affects resulting image, slighty changing quite a few pixels
         // Most likely the threads are racing each other to update the shadow cache, causing non-deterministic behaviour!
-        [TestMethod]
+        [TestMethod, Ignore]
         public void RaytraceStaticShadowAndFocalBlur()
         {
             RaytraceScenario(focalBlur: true, shadows: true, staticShadows: true, subPixelRes: 4);


Fixed a bug that NullReferenceExecption is thrown when the EventSource has a method without any argument.

--- EtwStream.Core/EventWrittenEventArgsExtensions.cs
+++ EtwStream.Core/EventWrittenEventArgsExtensions.cs
@@ -24,26 +24,18 @@
                 var xElem = XElement.Parse(manifest);
                 var ns = xElem.Name.Namespace;

-                // { tid : { eventId, keywords, taskName} }
-                var tidRef = xElem.Descendants(ns + "event")
-                    .ToDictionary(x => x.Attribute("template").Value, x => new
-                    {
-                        EventId = int.Parse(x.Attribute("value").Value),
-                        Keywords = x.Attribute("keywords")?.Value ?? "",
-                        Task = x.Attribute("task").Value
-                    });
+                // { tid : {[payloadNames]}}
+                var tidRef = xElem.Descendants(ns + "template")
+                    .ToDictionary(x => x.Attribute("tid").Value, x => new ReadOnlyCollection<string>(
+                        x.Elements(ns + "data")
+                        .Select(y => y.Attribute("name").Value)
+                        .ToArray()));

-
-                var dict = xElem.Descendants(ns + "template")
-                     .Select(template => new { template, @event = tidRef[template.Attribute("tid").Value] })
-                     .ToDictionary(
-                        x => x.@event.EventId,
-                        x => new EventSchemaPortion(
-                                new ReadOnlyCollection<string>(x.template.Elements(ns + "data")
-                                .Select(y => y.Attribute("name").Value)
-                                .ToArray()),
-                                x.@event.Keywords,
-                                x.@event.Task));
+                var dict = xElem.Descendants(ns + "event")
+                    .ToDictionary(x => int.Parse(x.Attribute("value").Value), x => new EventSchemaPortion(
+                        x.Attribute("template")?.Value != null ? tidRef[x.Attribute("template").Value] : new string[0].ToList().AsReadOnly(),
+                        x.Attribute("keywords")?.Value ?? "",
+                        x.Attribute("task")?.Value ?? x.Attribute("symbol").Value));

                 return new ReadOnlyDictionary<int, EventSchemaPortion>(dict);
             });
@@ -62,7 +54,7 @@
         /// <summary>
         /// Get KeywordDescription from EventSource manifest.
         /// </summary>
-        public static string GetKeywordDescription(this System.Diagnostics.Tracing.EventWrittenEventArgs eventArgs)
+        public static string GetKeywordName(this System.Diagnostics.Tracing.EventWrittenEventArgs eventArgs)
         {
             var source = eventArgs.EventSource;
             var templates = GetEventSchemaPortions(source);


Improve margin of page in design

Improve margin of page in design

Now margin in design draw another color.
Showing correct right edge of work area(paper - margin).
Out of work area items colored to red.

--- RdlDesign/DesignXmlDraw.cs
+++ RdlDesign/DesignXmlDraw.cs
@@ -47,12 +47,14 @@
         readonly Color BANDBORDERCOLOR = Color.DimGray; //Josh: added for Band Border
         readonly BorderStyleEnum BANDBORDERSTYLE = BorderStyleEnum.Solid; //Josh: Band Border Style
         const float BANDBORDERWIDTH = 1f; //Josh: Band border width
-        readonly Color AREABACKCOLOR = Color.LightGray; //Josh: added for area background color (behind page)
+        readonly Color AREABACKCOLOR = Color.LightGray; //Josh: added for area background color (behind page)
+		readonly Color OUTWORKAREACOLOR = Color.Azure; //out work area background color (on page, but in margin)
+		readonly Color OUTITEMCOLOR = Color.Salmon; //color of out work area parts of item

 		const float RADIUS = 2.5f;
         readonly Color BANDCOLOR = Color.LightGray;
 		const int BANDHEIGHT = 12;              // height of band (e.g. body, pageheader, pagefooter) in pts
-		const float LEFTGAP = 10f; // keep a gap on the left size of the screen
+		const float LEFTGAP = 0f; // keep a gap on the left size of the screen
 		// Various page measurements that we keep
 		float rWidth, pHeight, pWidth;
 		float lMargin, rMargin, tMargin, bMargin;
@@ -1096,10 +1098,19 @@
             // in the "off-paper" area.
             //White "Paper"
 			StyleInfo si = new StyleInfo();
-            si.BackgroundColor = Color.White;
-
-            RectangleF b = new RectangleF(xLoc, yLoc + 1, /*PointsX(Width)*/(pWidth) /*+ _hScroll*/, /*height*/ ((height > TotalPageHeight /* - yLoc*/) ? TotalPageHeight/* - yLoc*/ : height));//displayHeight > 0 ? displayHeight : 0);
-            DrawBackground(b, si);
+
+			// Entire Paper
+			si.BackgroundColor = OUTWORKAREACOLOR;
+			RectangleF b = new RectangleF(xLoc, yLoc + 1, /*PointsX(Width)*/(pWidth) /*+ _hScroll*/, /*height*/ ((height > TotalPageHeight /* - yLoc*/) ? TotalPageHeight/* - yLoc*/ : height));//displayHeight > 0 ? displayHeight : 0);
+			DrawBackground(b, si);
+
+			// Work area
+			si.BackgroundColor = Color.White;
+			b = new RectangleF(xLoc + lMargin, yLoc + 1, /*PointsX(Width)*/(pWidth - lMargin - rMargin) /*+ _hScroll*/, /*height*/ ((height > TotalPageHeight /* - yLoc*/) ? TotalPageHeight/* - yLoc*/ : height));//displayHeight > 0 ? displayHeight : 0);
+            DrawBackground(b, si);
+
+			//Edge of paper
+			DrawLine(Color.Gray, BorderStyleEnum.Solid, 1, pWidth, yLoc + 1, pWidth, yLoc + height);
             //End "Paper"

             // Josh:
@@ -1246,7 +1257,7 @@
         {
             RectangleF rir = GetReportItemRect(xNode);

-            if (rir.Right + LEFTGAP <= r.Right)
+            if (rir.Right + LEFTGAP + lMargin <= r.Right)
             {
                 return rir;
             }
@@ -1907,7 +1918,7 @@
         {
             StyleInfo si = GetStyleInfo(xNode);
             RectangleF ri = GetOutOfBoundsRightReportItemRect(xNode, r);
-            si.BackgroundColor = AREABACKCOLOR;
+			si.BackgroundColor = OUTITEMCOLOR;

             if (ri.Right > r.Right)//(!r.Contains(ri))
             {


format trend graph

format trend graph

--- RepoStats/HtmlTemplates.cs
+++ RepoStats/HtmlTemplates.cs
@@ -191,8 +191,19 @@
         public static class Graph
         {
             public static string ContainerTempalte = @"
-

-
";
+

+

+
+
Code Trend

+
+

+

+
+

+

+
+

+
";

             public static string GraphTemplate = @"


pull out email address to app settings

pull out email address to app settings

--- RequestTopicExpert/run.csx
+++ RequestTopicExpert/run.csx
@@ -62,7 +62,7 @@
     //"Node","foo@microsoft.com";"Azure Functions","foo1@microsoft.com";"Azure App Services","foo2@microsoft.com"
     string Experts = ConfigurationManager.AppSettings["EXPERT_LIST"].ToString();

-    string[] ExpertList = Experts.Split(";",StringSplitOptions.RemoveEmptyEntries);
+    string[] ExpertList = Experts.Split(';',StringSplitOptions.RemoveEmptyEntries);

     foreach (var item in ExpertList)
     {


Properly implemented sendUpdate (variable arguments\!); Interest class

--- AstronClientRepository.cs
+++ AstronClientRepository.cs
@@ -283,11 +283,60 @@
 		cr = _cr;
 	}

-	public void sendUpdate(string methodName, object[] parameters) {
+	public void legacyUpdate(string methodName, object[] parameters) {
 		cr.sendUpdate(doID, methodName, parameters); // pass off to ACR to do the dirty work
+	}
+
+	public void sendUpdate(string methodName, params string[] parameters) {
+
+		Debug.Log (parameters.Length);
+		cr.sendUpdate(doID, methodName, parameters);
 	}

 	public string getClass() {
 		return this.GetType().Name; // while this seems like utter nonsense, it allows the ACR to perform reflection on subclasses of DOs
 	}
-}+}
+
+public class DistributedObjectOV : DistributedObject {
+	public DistributedObjectOV(AstronClientRepository cr) : base(cr) {
+
+	}
+}
+
+public class Interest {
+	private UInt32 context;
+	private UInt16 interest_id;
+	private UInt32 parent_id;
+	private UInt32[] zones;
+
+	public Interest(UInt32 _context, UInt16 _interest_id, UInt32 _parent_id, UInt32[] _zones) {
+		context = _context;
+		interest_id = _interest_id;
+		parent_id = _parent_id;
+		zones = _zones;
+	}
+
+	public Interest(UInt32 _context, UInt16 _interest_id, UInt32 _parent_id, UInt32 _zone)
+		: this(_context, _interest_id, _parent_id, new UInt32[]{zone})
+	{
+		// pass
+	}
+
+	public UInt32 getZone() {
+		return zones[0];
+	}
+
+	public UInt32[] getZones() {
+		return zones;
+	}
+
+	public UInt16 getID() {
+		return interest_id;
+	}
+
+	public UInt32 getContext() {
+		return context;
+	}
+}
+


Disposing of objects in a list while enumerating it throws a runtime exception. Use an array instead.

--- COMWrapper/Application.cs
+++ COMWrapper/Application.cs
@@ -162,7 +162,9 @@

         public void Dispose()
         {
-            foreach (var pair in _wbs)
+            var to_dispose = _wbs.ToArray();
+
+            foreach (var pair in to_dispose)
             {
                 pair.Value.Dispose();
             }


Changed Coupon Validation Logic so that it MaxUsage only fails if both Unlimited and maxUsage are true.

git-tfs-id: [https://tfs.caes.ucdavis.edu:8088/tfs/DefaultCollection]$/CRP/Trunk/CRP;C9479

--- CRP.Core/Domain/Coupon.cs
+++ CRP.Core/Domain/Coupon.cs
@@ -203,7 +203,7 @@
             }

             UnlimitedAndMaxUage = true;
-            if (Unlimited != (MaxUsage == null))
+            if (Unlimited && MaxUsage != null)
             {
                 UnlimitedAndMaxUage = false;
             }


--- CSharp/Method/Internal.cs
+++ CSharp/Method/Internal.cs
@@ -3,7 +3,6 @@
     internal void Pedal() { }
     //pode ser acessado por uma classe qualquer que derive desta, ou tipos desta DLL.
     protected internal int Wheels => { get; } => 3
-    }
 }

 //http://pt.stackoverflow.com/q/186062/101


Adding the CompilationRelaxationsAttribute and CompilationRelaxations enum to System.Runtime.CompilerServices namespace.

--- Runtime/CoreLib/Runtime.cs
+++ Runtime/CoreLib/Runtime.cs
@@ -604,6 +604,33 @@
 	public interface ICriticalNotifyCompletion : INotifyCompletion {
 		void UnsafeOnCompleted(Action continuation);
 	}
+
+	[NonScriptable]
+	[EditorBrowsable(EditorBrowsableState.Never)]
+	public class CompilationRelaxationsAttribute : Attribute
+	{
+		public CompilationRelaxationsAttribute(int relaxations)
+		{
+			CompilationRelaxations = relaxations;
+		}
+
+		public CompilationRelaxationsAttribute(CompilationRelaxations relaxations)
+		{
+			CompilationRelaxations = (int)relaxations;
+		}
+
+		public int CompilationRelaxations { get; private set; }
+	}
+
+	[Flags]
+	[NonScriptable]
+	[EditorBrowsable(EditorBrowsableState.Never)]
+	public enum CompilationRelaxations : int
+	{
+		NoStringInterning = 0x0008, // Start in 0x0008, we had other non public flags in this enum before,
+		// so we'll start here just in case somebody used them. This flag is only
+		// valid when set for Assemblies.
+	};
 }

 namespace System.Runtime.InteropServices {


handle some nulls

handle some nulls

--- platform/fGameObject.cs
+++ platform/fGameObject.cs
@@ -65,6 +65,11 @@
         }

+        public virtual bool IsDestroyed {
+            // see http://answers.unity3d.com/questions/13840/how-to-detect-if-a-gameobject-has-been-destroyed.html
+            get { return go == null && ReferenceEquals(go, null) == false; }
+        }
+

         // allow game object wrapper to do things here, eg lazy updates, etc
         // This will be called by the GameObject itself, using the PreRenderBehavior (!)
@@ -165,8 +170,10 @@

         public virtual void SetColor(Colorf color)
         {
-            Renderer r = go.GetComponent<Renderer>();
-            r.material.color = color;
+            if (go != null) {
+                Renderer r = go.GetComponent<Renderer>();
+                r.material.color = color;
+            }
         }


[Gen] Don't generate extra array allocations for signals.

--- generator/Signal.cs
+++ generator/Signal.cs
@@ -442,42 +442,46 @@
 				sw.WriteLine ("\t\t\tGLib.Value ret = new GLib.Value (" + ReturnGType + ");");

 			sw.WriteLine ("\t\t\tGLib.ValueArray inst_and_params = new GLib.ValueArray (" + parms.Count + ");");
-			sw.WriteLine ("\t\t\tGLib.Value[] vals = new GLib.Value [" + parms.Count + "];");
-			sw.WriteLine ("\t\t\tvals [0] = new GLib.Value (this);");
-			sw.WriteLine ("\t\t\tinst_and_params.Append (vals [0]);");
-			string cleanup = "";
+			sw.WriteLine ("\t\t\tusing (var val0 = new GLib.Value (this)) {");
+			sw.WriteLine ("\t\t\t\tinst_and_params.Append (val0);");
+			string cleanup = "";
+			string indent = new string ('\t', 4);
 			for (int i = 1; i < parms.Count; i++) {
-				Parameter p = parms [i];
+				Parameter p = parms [i];
+				indent = new string ('\t', 3 + i);
 				if (p.PassAs != "") {
 					if (SymbolTable.Table.IsBoxed (p.CType)) {
 						if (p.PassAs == "ref")
-							sw.WriteLine ("\t\t\tvals [" + i + "] = new GLib.Value (" + p.Name + ");");
+							sw.WriteLine (indent + "using (var val" + i + " = new GLib.Value (" + p.Name + ")) {");
 						else
-							sw.WriteLine ("\t\t\tvals [" + i + "] = new GLib.Value ((GLib.GType)typeof (" + p.CSType + "));");
-						cleanup += "\t\t\t" + p.Name + " = (" + p.CSType + ") vals [" + i + "];\n";
+							sw.WriteLine (indent + "using (var val" + i + " = new GLib.Value ((GLib.GType)typeof (" + p.CSType + "))) {");
+						cleanup += indent + p.Name + " = (" + p.CSType + ") vals [" + i + "];\n";
 					} else {
 						if (p.PassAs == "ref")
-							sw.WriteLine ("\t\t\tIntPtr " + p.Name + "_ptr = GLib.Marshaller.StructureToPtrAlloc (" + p.Generatable.CallByName (p.Name) + ");");
+							sw.WriteLine (indent + "IntPtr " + p.Name + "_ptr = GLib.Marshaller.StructureToPtrAlloc (" + p.Generatable.CallByName (p.Name) + ");");
 						else
-							sw.WriteLine ("\t\t\tIntPtr " + p.Name + "_ptr = Marshal.AllocHGlobal (Marshal.SizeOf (typeof (" + p.MarshalType + ")));");
-
-						sw.WriteLine ("\t\t\tvals [" + i + "] = new GLib.Value (" + p.Name + "_ptr);");
-						cleanup += "\t\t\t" + p.Name + " = " + p.FromNative ("(" + p.MarshalType + ") Marshal.PtrToStructure (" + p.Name + "_ptr, typeof (" + p.MarshalType + "))") + ";\n";
-						cleanup += "\t\t\tMarshal.FreeHGlobal (" + p.Name + "_ptr);\n";
+							sw.WriteLine (indent + "IntPtr " + p.Name + "_ptr = Marshal.AllocHGlobal (Marshal.SizeOf (typeof (" + p.MarshalType + ")));");
+
+						sw.WriteLine (indent + "using (var val" + i + " = new GLib.Value (" + p.Name + "_ptr)) {");
+						cleanup += indent + p.Name + " = " + p.FromNative ("(" + p.MarshalType + ") Marshal.PtrToStructure (" + p.Name + "_ptr, typeof (" + p.MarshalType + "))") + ";\n";
+						cleanup += indent + "Marshal.FreeHGlobal (" + p.Name + "_ptr);\n";
 					}
 				} else if (p.IsLength && parms [i - 1].IsString)
-					sw.WriteLine ("\t\t\tvals [" + i + "] = new GLib.Value (System.Text.Encoding.UTF8.GetByteCount (" + parms [i-1].Name + "));");
+					sw.WriteLine (indent + "using (var val" + i + " = new GLib.Value (System.Text.Encoding.UTF8.GetByteCount (" + parms [i-1].Name + "))) {");
 				else
-					sw.WriteLine ("\t\t\tvals [" + i + "] = new GLib.Value (" + p.Name + ");");
-
-				sw.WriteLine ("\t\t\tinst_and_params.Append (vals [" + i + "]);");
-			}
-
-			sw.WriteLine ("\t\t\tg_signal_chain_from_overridden (inst_and_params.ArrayPtr, ref ret);");
+					sw.WriteLine (indent + "using (var val" + i + " = new GLib.Value (" + p.Name + ")) {");
+
+				sw.WriteLine (indent + "inst_and_params.Append (val" + i + ");");
+			}
+
+			sw.WriteLine (indent + "g_signal_chain_from_overridden (inst_and_params.ArrayPtr, ref ret);");
 			if (cleanup != "")
 				sw.WriteLine (cleanup);
-			sw.WriteLine ("\t\t\tforeach (GLib.Value v in vals)");
-			sw.WriteLine ("\t\t\t\tv.Dispose ();");
+			for (int i = 1; i < parms.Count; ++i) {
+				indent = new string ('\t', parms.Count - i + 3);
+				sw.WriteLine (indent + "}");
+			}
+			sw.WriteLine ("\t\t\t}");
 			if (!IsVoid) {
 				IGeneratable igen = SymbolTable.Table [retval.CType];
 				sw.WriteLine ("\t\t\t" + retval.CSType + " result = (" + (igen is EnumGen ? retval.CSType + ") (Enum" : retval.CSType) + ") ret;");


Pango and Cairo conversions

Pango and Cairo conversions

git-svn-id: 16f658619b342a39b0afd2472f072a689916e5a2@114 6f2d7086-9719-0410-ba06-0b8292a297aa

--- psycho/Psycho/Core/Color.cs
+++ psycho/Psycho/Core/Color.cs
@@ -29,10 +29,8 @@

 namespace Psycho
 {
-
         public class Color
         {
-
                 string name;
                 ushort red;
                 ushort green;
@@ -136,5 +134,33 @@
                         outColor.Blue = this.blue;
                         return outColor;
                 }
+
+                public Cairo.Color ToCairoColor ()
+                {
+                        Cairo.Color outColor = new Cairo.Color ();
+                        outColor.A = this.alfa / 255;
+                        outColor.R = this.red / 255;
+                        outColor.G = this.green / 255;
+                        outColor.B = this.blue / 255;
+                        return outColor;
+                }
+
+                public Color (Pango.Color paramColor)
+                {
+                        this.alfa = 255;
+                        this.red = paramColor.Red;
+                        this.green = paramColor.Green;
+                        this.blue = paramColor.Blue;
+                        this.name = "";
+                }
+
+                public Color (Cairo.Color paramColor)
+                {
+                        this.alfa = (ushort) (paramColor.A * 255);
+                        this.red = (ushort) (paramColor.R * 255);
+                        this.green = (ushort) (paramColor.G * 255);
+                        this.blue = (ushort) (paramColor.B * 255);
+                        this.name = "";
+                }
         }
-}
+}


Fixed test now using separate files

Fixed test now using separate files

--- SharpUV.Tests/FileTests.cs
+++ SharpUV.Tests/FileTests.cs
@@ -6,23 +6,20 @@
 {
 	public class FileTests
 	{
-		private static string TestFilePath
-		{
-			get{ return System.IO.Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "test.txt"); }
-		}
-
 		[Fact]
 		public void WriteAndReadFile()
 		{
 			const string data = "test string";

+            var path = System.IO.Path.GetTempFileName();
+
 			var handle = new WriteFileHandle(data);
-			handle.OpenWrite(TestFilePath);
+			handle.OpenWrite(path);

             Loop.Current.Run();

             var handle2 = new ReadFileHandle();
-            handle2.OpenRead(TestFilePath);
+            handle2.OpenRead(path);

             Loop.Current.Run();

@@ -35,13 +32,15 @@
 		{
 			const string data = "test string";

-			var handle = new WriteFileHandle(data);
-			handle.OpenWrite(TestFilePath);
+            var path = System.IO.Path.GetTempFileName();
+
+            var handle = new WriteFileHandle(data);
+			handle.OpenWrite(path);

 			Loop.Current.Run();

 			var handle2 = new Filesystem();
-			handle2.Stat(TestFilePath, (args) => {
+			handle2.Stat(path, (args) => {
 				Assert.Equal((ulong)data.Length, args.Stat.st_size);
 			});

@@ -53,13 +52,15 @@
 		{
 			const string data = "test string";

-			var handle = new WriteFileHandle(data);
-			handle.OpenWrite(TestFilePath);
+            var path = System.IO.Path.GetTempFileName();
+
+            var handle = new WriteFileHandle(data);
+			handle.OpenWrite(path);

 			Loop.Current.Run();

 			var handle2 = new Filesystem();
-			handle2.Delete(TestFilePath, (args) =>
+			handle2.Delete(path, (args) =>
 			{
 				Assert.True(args.Successful);
 			});
@@ -72,13 +73,15 @@
 		{
 			const string data = "test string";

-			var handle = new WriteFileHandle(data);
-			handle.OpenWrite(TestFilePath);
+            var path = System.IO.Path.GetTempFileName();
+
+            var handle = new WriteFileHandle(data);
+			handle.OpenWrite(path);

 			Loop.Current.Run();

 			var handle2 = new Filesystem();
-			handle2.Copy(TestFilePath, TestFilePath + "copy", (args) =>
+			handle2.Copy(path, path + "copy", (args) =>
 			{
 				Assert.True(args.Successful);
 			});


Fixed documentation bugs

Fixed documentation bugs

git-svn-id: 61c3ae23f3a6520e9bc357b51591209af2ede9d8@244 45b04e34-05f1-4d87-a130-40a8491d5c8b

--- Mosa/Platforms/x86/Instructions/SbbInstruction.cs
+++ Mosa/Platforms/x86/Instructions/SbbInstruction.cs
@@ -18,21 +18,21 @@
 namespace Mosa.Platforms.x86.Instructions
 {
     /// <summary>
-    /// Intermediate representation of the x86 adc instruction.
+    /// Intermediate representation of the x86 sbb instruction.
     /// </summary>
     sealed class SbbInstruction : IR.TwoOperandInstruction
     {
         #region Construction

         /// <summary>
-        /// Initializes a new instance of the <see cref="AdcInstruction"/> class.
+        /// Initializes a new instance of the <see cref="SbbInstruction"/> class.
         /// </summary>
         public SbbInstruction()
         {
         }

         /// <summary>
-        /// Initializes a new instance of the <see cref="AdcInstruction"/> class.
+        /// Initializes a new instance of the <see cref="SbbInstruction"/> class.
         /// </summary>
         /// <param name="destination">The destination operand.</param>
         /// <param name="source">The source operand.</param>


Pop up version to 0.2.1 for this hotfix.

--- Nancy.AttributeRouting/Properties/AssemblyInfo.cs
+++ Nancy.AttributeRouting/Properties/AssemblyInfo.cs
@@ -11,5 +11,5 @@
 [assembly: AssemblyCulture("")]
 [assembly: ComVisible(false)]
 [assembly: Guid("c66bf3e3-f147-41b1-ad52-7ac8d7d573c1")]
-[assembly: AssemblyVersion("0.2.0.0")]
-[assembly: AssemblyFileVersion("0.2.0.0")]
+[assembly: AssemblyVersion("0.2.1.0")]
+[assembly: AssemblyFileVersion("0.2.1.0")]


Gets the exception type

Gets the exception type

--- code/Inbox.cs
+++ code/Inbox.cs
@@ -245,7 +245,7 @@
 				UI.NotificationService.Tip(Translation.error, Translation.syncErrorOccured + exception.Message, Notification.Type.Warning, 1500);

 				// logs the error
-				Core.Log("Sync: " + exception.Message);
+				Core.Log("Sync: " + exception.GetType().ToString() + " " + exception.Message);
 			} finally {
 				UI.notifyIcon.Text = UI.notifyIcon.Text.Split('\n')[0] + "\n" + Translation.syncTime.Replace("{time}", Time.ToLongTimeString());
 			}


Changed default block light to 0

Changed default block light to 0

--- Craft.Net.Data/Section.cs
+++ Craft.Net.Data/Section.cs
@@ -42,7 +42,7 @@
             BlockLight = new NibbleArray(Width*Height*Depth);
             SkyLight = new NibbleArray(Width*Height*Depth);
             for (int i = 0; i < SkyLight.Data.Length; i++)
-                SkyLight.Data[i] = BlockLight.Data[i] = 0xFF;
+                SkyLight.Data[i] = 0xFF;
             nonAirCount = 0;
         }


Set the extension when used in the gltf file

--- Source/Runtime/Material.cs
+++ Source/Runtime/Material.cs
@@ -311,9 +311,23 @@
                 {
                     material.Extensions = new Dictionary<string, object>();
                 }
+                if (gltf.ExtensionsUsed != null)
+                {
+                    gltf.ExtensionsUsed = new List<string>();
+                }
                 foreach (var extension in Extensions)
                 {
                     material.Extensions.Add(extension.Name, extension.ConvertToSchema(gltf, samplers, images, textures));
+                    if (gltf.ExtensionsUsed == null)
+                    {
+                        gltf.ExtensionsUsed = new List<string>(new[] { extension.Name });
+
+                    }
+                    else if (!gltf.ExtensionsUsed.Contains(extension.Name))
+                    {
+                        gltf.ExtensionsUsed.Add(extension.Name);
+                    }
+
                 }
             }


Fixed a virtual list scrolling bug. (optimized)

--- Source/Scripts/UI/GList.cs
+++ Source/Scripts/UI/GList.cs
@@ -1795,8 +1795,8 @@
 			_firstIndex = newFirstIndex;
 			int curIndex = newFirstIndex;
 			bool forward = oldFirstIndex > newFirstIndex;
-			int oldCount = this.numChildren;
-			int lastIndex = oldFirstIndex + oldCount - 1;
+			int childCount = this.numChildren;
+			int lastIndex = oldFirstIndex + childCount - 1;
 			int reuseIndex = forward ? lastIndex : oldFirstIndex;
 			float curX = 0, curY = pos;
 			bool needRender;
@@ -1885,10 +1885,7 @@
 					needRender = true;
 				}
 				else
-				{
-					SetChildIndex(ii.obj, forward ? curIndex - newFirstIndex : numChildren);
 					needRender = forceUpdate;
-				}

 				if (needRender)
 				{
@@ -1924,7 +1921,7 @@
 				curIndex++;
 			}

-			for (int i = 0; i < oldCount; i++)
+			for (int i = 0; i < childCount; i++)
 			{
 				ItemInfo ii = _virtualItems[oldFirstIndex + i];
 				if (ii.updateFlag != itemInfoVer && ii.obj != null)
@@ -1936,6 +1933,14 @@
 				}
 			}

+			childCount = _children.Count;
+			for (int i = 0; i < childCount; i++)
+			{
+				GObject obj = _children[i];
+				if (obj != _virtualItems[newFirstIndex + i].obj)
+					SetChildIndex(obj, i);
+			}
+
 			if (deltaSize != 0 || firstItemDeltaSize != 0)
 				this.scrollPane.ChangeContentSizeOnScrolling(0, deltaSize, 0, firstItemDeltaSize);

@@ -1965,8 +1970,8 @@
 			_firstIndex = newFirstIndex;
 			int curIndex = newFirstIndex;
 			bool forward = oldFirstIndex > newFirstIndex;
-			int oldCount = this.numChildren;
-			int lastIndex = oldFirstIndex + oldCount - 1;
+			int childCount = this.numChildren;
+			int lastIndex = oldFirstIndex + childCount - 1;
 			int reuseIndex = forward ? lastIndex : oldFirstIndex;
 			float curX = pos, curY = 0;
 			bool needRender;
@@ -2054,10 +2059,7 @@
 					needRender = true;
 				}
 				else
-				{
-					SetChildIndex(ii.obj, forward ? curIndex - newFirstIndex : numChildren);
 					needRender = forceUpdate;
-				}

 				if (needRender)
 				{
@@ -2093,7 +2095,7 @@
 				curIndex++;
 			}

-			for (int i = 0; i < oldCount; i++)
+			for (int i = 0; i < childCount; i++)
 			{
 				ItemInfo ii = _virtualItems[oldFirstIndex + i];
 				if (ii.updateFlag != itemInfoVer && ii.obj != null)
@@ -2103,6 +2105,14 @@
 					RemoveChildToPool(ii.obj);
 					ii.obj = null;
 				}
+			}
+
+			childCount = _children.Count;
+			for (int i = 0; i < childCount; i++)
+			{
+				GObject obj = _children[i];
+				if (obj != _virtualItems[newFirstIndex + i].obj)
+					SetChildIndex(obj, i);
 			}

 			if (deltaSize != 0 || firstItemDeltaSize != 0)


[SharpDX] Fixed MathUtil.Gauss function (#489).

--- Source/SharpDX/MathUtil.cs
+++ Source/SharpDX/MathUtil.cs
@@ -96,7 +96,7 @@
             int bInt = *(int*)&b;

             // Different signs means they do not match.
-            if((aInt < 0) != (bInt < 0))
+            if ((aInt < 0) != (bInt < 0))
                 return false;

             // Find the difference in ULPs.
@@ -424,38 +424,42 @@

         /// <summary>
         /// Gauss function.
+        /// http://en.wikipedia.org/wiki/Gaussian_function#Two-dimensional_Gaussian_function
         /// </summary>
         /// <param name="amplitude">Curve amplitude.</param>
         /// <param name="x">Position X.</param>
         /// <param name="y">Position Y</param>
-        /// <param name="radX">Radius X.</param>
-        /// <param name="radY">Radius Y.</param>
+        /// <param name="centerX">Center X.</param>
+        /// <param name="centerY">Center Y.</param>
         /// <param name="sigmaX">Curve sigma X.</param>
         /// <param name="sigmaY">Curve sigma Y.</param>
         /// <returns>The result of Gaussian function.</returns>
-        public static float Gauss(float amplitude, float x, float y, float radX, float radY, float sigmaX, float sigmaY)
-        {
-            return (float)Gauss((double)amplitude, x, y, radX, radY, sigmaX, sigmaY);
+        public static float Gauss(float amplitude, float x, float y, float centerX, float centerY, float sigmaX, float sigmaY)
+        {
+            return (float)Gauss((double)amplitude, x, y, centerX, centerY, sigmaX, sigmaY);
         }

         /// <summary>
         /// Gauss function.
+        /// http://en.wikipedia.org/wiki/Gaussian_function#Two-dimensional_Gaussian_function
         /// </summary>
         /// <param name="amplitude">Curve amplitude.</param>
         /// <param name="x">Position X.</param>
         /// <param name="y">Position Y</param>
-        /// <param name="radX">Radius X.</param>
-        /// <param name="radY">Radius Y.</param>
+        /// <param name="centerX">Center X.</param>
+        /// <param name="centerY">Center Y.</param>
         /// <param name="sigmaX">Curve sigma X.</param>
         /// <param name="sigmaY">Curve sigma Y.</param>
         /// <returns>The result of Gaussian function.</returns>
-        public static double Gauss(double amplitude, double x, double y, double radX, double radY, double sigmaX, double sigmaY)
-        {
-            return (amplitude * Math.E) -
-                (
-                    Math.Pow(x - (radX / 2), 2) / (2 * Math.Pow(sigmaX, 2)) +
-                    Math.Pow(y - (radY / 2), 2) / (2 * Math.Pow(sigmaY, 2))
-                );
+        public static double Gauss(double amplitude, double x, double y, double centerX, double centerY, double sigmaX, double sigmaY)
+        {
+            var cx = x - centerX;
+            var cy = y - centerY;
+
+            var componentX = (cx * cx) / (2 * sigmaX * sigmaX);
+            var componentY = (cy * cy) / (2 * sigmaY * sigmaY);
+
+            return amplitude * Math.Exp(-(componentX + componentY));
         }
     }
 }


Adding %CommonAppDataFolder% to Dir.cs description

%CommonAppDataFolder% environment variable, mapped to Wix constant [CommonAppDataFolder] was missing from the list in the class description.
It is a minor detail, but it saves you some time when you're searching for that destination.

--- Source/src/WixSharp/Dir.cs
+++ Source/src/WixSharp/Dir.cs
@@ -47,6 +47,7 @@
     ///  <para>%WindowsFolder% - [WindowsFolder]</para>
     ///  <para>%ProgramFiles% - [ProgramFilesFolder]</para>
     ///  <para>%ProgramMenu% - [ProgramMenuFolder]</para>
+    ///  <para>%CommonAppDataFolder% - [CommonAppDataFolder]</para>
     ///  <para>%AppDataFolder% - [AppDataFolder]</para>
     ///  <para>%CommonFilesFolder% - [CommonFilesFolder]</para>
     ///  <para>%LocalAppDataFolder% - [LocalAppDataFolder]</para>


healthdataprobe cleaned up comments

healthdataprobe cleaned up comments

--- Sensus.iOS.Shared/Probes/User/Health/iOSHealthDataProbe.cs
+++ Sensus.iOS.Shared/Probes/User/Health/iOSHealthDataProbe.cs
@@ -405,11 +405,6 @@

 		private void InitializeCollectors()
 		{
-			//if (Collectors == null)
-			//{
-			//	Collectors = new List<HealthDataCollector>();
-			//}
-
 			_collectors = Collectors.ToDictionary(x => x.Key);

 			InitializeCollector(CollectBiologicalSex, new BiologicalSexCollector(_healthStore));


ログの自動スクロールは初期値ON

ログの自動スクロールは初期値ON

--- DemoP2P/Form1.Designer.cs
+++ DemoP2P/Form1.Designer.cs
@@ -504,6 +504,8 @@
             //
             this.checkBoxAutoScroll.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
             this.checkBoxAutoScroll.AutoSize = true;
+            this.checkBoxAutoScroll.Checked = true;
+            this.checkBoxAutoScroll.CheckState = System.Windows.Forms.CheckState.Checked;
             this.checkBoxAutoScroll.Location = new System.Drawing.Point(3, 406);
             this.checkBoxAutoScroll.Name = "checkBoxAutoScroll";
             this.checkBoxAutoScroll.Size = new System.Drawing.Size(94, 16);


add missing Owned property on Reward

add missing Owned property on Reward

--- Soomla/Assets/Plugins/Soomla/Core/domain/rewards/Reward.cs
+++ Soomla/Assets/Plugins/Soomla/Core/domain/rewards/Reward.cs
@@ -35,6 +35,12 @@
 		public string RewardId;
 		public string Name;
 		public bool   Repeatable;
+
+		public bool Owned {
+			get {
+				return RewardStorage.IsRewardGiven(this);
+			}
+		}

 		/// <summary>
 		/// Constructor.


Minor changes.

Minor changes.

--- Source/Main/NProxy.Core/Internal/Reflection/MemberToken.cs
+++ Source/Main/NProxy.Core/Internal/Reflection/MemberToken.cs
@@ -78,7 +78,7 @@
         /// <inheritdoc/>
         public override string ToString()
         {
-            return string.Format("[{0}]{1}", _module.Name, _metadataToken);
+            return String.Format("[{0}]{1}", _module.Name, _metadataToken);
         }

         #endregion


regular backup

regular backup

--- SteamBot/KeyUserHandler.cs
+++ SteamBot/KeyUserHandler.cs
@@ -18,8 +18,8 @@
 	{
 		private const string BotVersion = "3.2.5";
 		public TF2Value UserMetalAdded, NonTradeInventoryMetal, InventoryMetal, BotMetalAdded, ExcessRefined, KeysToScrap, AdditionalRefined, ChangeAdded, LeftoverMetal;
-		public static TF2Value SellPricePerKey = TF2Value.FromRef(21.00); //high
-		public static TF2Value BuyPricePerKey = TF2Value.FromRef(20.66); //low
+		public static TF2Value SellPricePerKey = TF2Value.FromRef(21.22); //high
+		public static TF2Value BuyPricePerKey = TF2Value.FromRef(20.88); //low

         int KeysCanBuy, NonTradeKeysCanBuy, ValidateMetaltoKey, PreviousKeys, UserKeysAdded, BotKeysAdded, InventoryKeys, NonTradeInventoryKeys, IgnoringBot, PayAttention, ScamAttempt, NonTradeScrap, Scrap, Crates, KeyNumber, ScrapAdded, NonTradeReclaimed, Reclaimed, ReclaimedAdded, NonTradeRefined, Refined, RefinedAdded, InvalidItem, NumKeys, TradeFrequency;
         double Item;


Improve `TrayManu.Dispose()` method implementation #293

--- Source/Office/Tools/Contribution/TrayMenuUtils/TrayMenu.cs
+++ Source/Office/Tools/Contribution/TrayMenuUtils/TrayMenu.cs
@@ -875,24 +875,36 @@
         #region IDisposableState

         /// <summary>
-        /// Returns information the instance is already disposed
+        /// Gets a value indicating whether the control has been disposed of.
         /// </summary>
         public bool IsDisposed { get; private set; }

         /// <summary>
-        /// Dispose the instance
+        /// Dispose the instance.
         /// </summary>
         public void Dispose()
         {
-            if (IsDisposed)
-            {
-                if (null != _contextMenu)
-                {
-                    _contextMenu.Dispose();
-                    _contextMenu = null;
-                }
-                IsDisposed = true;
-            }
+            this.Dispose(true);
+        }
+
+        /// <summary>
+        /// Dispose the instance.
+        /// </summary>
+        /// <param name="disposing"></param>
+        protected virtual void Dispose(bool disposing)
+        {
+            if (this.IsDisposed)
+            {
+                return;
+            }
+
+            if (disposing)
+            {
+                _contextMenu?.Dispose();
+                _contextMenu = null;
+            }
+
+            this.IsDisposed = true;
         }

         #endregion


PK-35 - Removed old input measurement fields from PowerCalculation model class. Updated code for saving to database to use new phasor properties instead of direct measurement access.

--- Source/PowerCalculations.UI/DataModels/PowerCalculation.cs
+++ Source/PowerCalculations.UI/DataModels/PowerCalculation.cs
@@ -54,58 +54,6 @@
 				if (m_circuitDescription == value) return;
 				m_circuitDescription = value;
 				OnPropertyChanged("CircuitDescription");
-			}
-		}
-
-		private Measurement m_voltageAngleMeasurement;
-		[Required(ErrorMessage = "Voltage angle signal ID is a required field. Please provide a value.")]
-		public Measurement VoltageAngleMeasurement
-		{
-			get { return m_voltageAngleMeasurement; }
-			set
-			{
-				if (m_voltageAngleMeasurement == value) return;
-				m_voltageAngleMeasurement = value;
-				OnPropertyChanged("VoltageAngleMeasurement");
-			}
-		}
-
-		private Measurement m_voltageMagnitudeMeasurement;
-		[Required(ErrorMessage = "Voltage magnitude signal ID is a required field. Please provide a value.")]
-		public Measurement VoltageMagnitudeMeasurement
-		{
-			get { return m_voltageMagnitudeMeasurement; }
-			set
-			{
-				if (m_voltageMagnitudeMeasurement == value) return;
-				m_voltageMagnitudeMeasurement = value;
-				OnPropertyChanged("VoltageMagnitudeMeasurement");
-			}
-		}
-
-		private Measurement m_currentAngleMeasurement;
-		[Required(ErrorMessage = "Current angle signal ID is a required field. Please provide a value.")]
-		public Measurement CurrentAngleMeasurement
-		{
-			get { return m_currentAngleMeasurement; }
-			set
-			{
-				if (m_currentAngleMeasurement == value) return;
-				m_currentAngleMeasurement = value;
-				OnPropertyChanged("CurrentAngleMeasurement");
-			}
-		}
-
-		private Measurement m_currentMagnitudeMeasurement;
-		[Required(ErrorMessage = "Current magnitude signal ID is a required field. Please provide a value.")]
-		public Measurement CurrentMagnitudeMeasurement
-		{
-			get { return m_currentMagnitudeMeasurement; }
-			set
-			{
-				if (m_currentMagnitudeMeasurement == value) return;
-				m_currentMagnitudeMeasurement = value;
-				OnPropertyChanged("CurrentMagnitudeMeasurement");
 			}
 		}

@@ -294,6 +242,19 @@
 							PowerCalculationEnabled = row.Field<bool>("CalculationEnabled"),
 							NodeId = database.Guid(row, "NodeId")
 						};
+
+						foreach (var phasor in phasors)
+						{
+							if (phasor.Id == currentPhasorId)
+							{
+								calculationList[keys.IndexOf(id)].CurrentPhasor = phasor;
+							}
+							else if (phasor.Id == voltagePhasorId)
+							{
+								calculationList[keys.IndexOf(id)].VoltagePhasor = phasor;
+							}
+						}
+
 						var mkeys = new List<Guid> { voltageAngle, voltageMagnitude, currentAngle, currentMagnitude };
 						if (realPower != null) { mkeys.Add(realPower.Value); }
 						if (reactivePower != null) { mkeys.Add(reactivePower.Value); }
@@ -303,19 +264,19 @@
 						{
 							if (measurement.SignalID == voltageAngle)
 							{
-								calculationList[keys.IndexOf(id)].VoltageAngleMeasurement = measurement;
+								calculationList[keys.IndexOf(id)].VoltagePhasor.AngleMeasurement = measurement;
 							}
 							else if (measurement.SignalID == voltageMagnitude)
 							{
-								calculationList[keys.IndexOf(id)].VoltageMagnitudeMeasurement = measurement;
+								calculationList[keys.IndexOf(id)].VoltagePhasor.MagnitudeMeasurement = measurement;
 							}
 							else if (measurement.SignalID == currentAngle)
 							{
-								calculationList[keys.IndexOf(id)].CurrentAngleMeasurement = measurement;
+								calculationList[keys.IndexOf(id)].CurrentPhasor.AngleMeasurement = measurement;
 							}
 							else if (measurement.SignalID == currentMagnitude)
 							{
-								calculationList[keys.IndexOf(id)].CurrentMagnitudeMeasurement = measurement;
+								calculationList[keys.IndexOf(id)].CurrentPhasor.MagnitudeMeasurement = measurement;
 							}
 							else if (measurement.SignalID == realPower)
 							{
@@ -328,18 +289,6 @@
 							else if (measurement.SignalID == activePower)
 							{
 								calculationList[keys.IndexOf(id)].ActivePowerOutputMeasurement = measurement;
-							}
-						}
-
-						foreach (var phasor in phasors)
-						{
-							if (phasor.Id == currentPhasorId)
-							{
-								calculationList[keys.IndexOf(id)].CurrentPhasor = phasor;
-							}
-							else if (phasor.Id == voltagePhasorId)
-							{
-								calculationList[keys.IndexOf(id)].VoltagePhasor = phasor;
 							}
 						}
 					}
@@ -404,8 +353,8 @@
 					query = database.ParameterizedQueryString("INSERT INTO PowerCalculation (CircuitDescription, VoltageAngleSignalId, VoltageMagSignalId, CurrentAngleSignalId, CurrentMagSignalId, RealPowerOutputSignalId, ReactivePowerOutputSignalId, ActivePowerOutputSignalId, CalculationEnabled, NodeId) " +
 						"VALUES ({0}, {1}, {2}, {3}, {4}, {5}, {6}, {7}, {8}, {9})", "circuitDescription", "voltageAngle", "voltageMag", "currentAngle", "currentMag", "realPowerOutput", "reactivePowerOutput", "activePowerOutput", "calculationEnabled", "nodeId");

-					database.Connection.ExecuteNonQuery(query, DefaultTimeout, powerCalculation.CircuitDescription, database.Guid(powerCalculation.VoltageAngleMeasurement.SignalID),
-						database.Guid(powerCalculation.VoltageMagnitudeMeasurement.SignalID), database.Guid(powerCalculation.CurrentAngleMeasurement.SignalID), database.Guid(powerCalculation.CurrentMagnitudeMeasurement.SignalID),
+					database.Connection.ExecuteNonQuery(query, DefaultTimeout, powerCalculation.CircuitDescription, database.Guid(powerCalculation.VoltagePhasor.AngleMeasurement.SignalID),
+						database.Guid(powerCalculation.VoltagePhasor.MagnitudeMeasurement.SignalID), database.Guid(powerCalculation.CurrentPhasor.AngleMeasurement.SignalID), database.Guid(powerCalculation.CurrentPhasor.MagnitudeMeasurement.SignalID),
 						database.Guid(powerCalculation.RealPowerOutputMeasurement.SignalID), database.Guid(powerCalculation.ReactivePowerOutputMeasurement.SignalID), database.Guid(powerCalculation.ActivePowerOutputMeasurement.SignalID),
 						powerCalculation.PowerCalculationEnabled, database.CurrentNodeID());
 				}
@@ -415,7 +364,7 @@
 						"RealPowerOutputSignalId = {5}, ReactivePowerOutputSignalId = {6}, ActivePowerOutputSignalId = {7}, CalculationEnabled = {8} WHERE PowerCalculationId = {9}", "circuitDescription", "voltageAngle", "voltageMag", "currentAngle", "currentMag", "realPowerOutput", "reactivePowerOutput", "activePowerOutput", "calculationEnabled", "powerCalculationId");

 					database.Connection.ExecuteNonQuery(query, DefaultTimeout, powerCalculation.CircuitDescription,
-						database.Guid(powerCalculation.VoltageAngleMeasurement.SignalID), database.Guid(powerCalculation.VoltageMagnitudeMeasurement.SignalID), database.Guid(powerCalculation.CurrentAngleMeasurement.SignalID), database.Guid(powerCalculation.CurrentMagnitudeMeasurement.SignalID),
+						database.Guid(powerCalculation.VoltagePhasor.AngleMeasurement.SignalID), database.Guid(powerCalculation.VoltagePhasor.MagnitudeMeasurement.SignalID), database.Guid(powerCalculation.CurrentPhasor.AngleMeasurement.SignalID), database.Guid(powerCalculation.CurrentPhasor.MagnitudeMeasurement.SignalID),
 						database.Guid(powerCalculation.RealPowerOutputMeasurement.SignalID), database.Guid(powerCalculation.ReactivePowerOutputMeasurement.SignalID), database.Guid(powerCalculation.ActivePowerOutputMeasurement.SignalID), powerCalculation.PowerCalculationEnabled, powerCalculation.PowerCalculationId);
 				}


Change the help message to point to copying OpenSimDefaults.ini.example. Provide a mostly empty OpenSim.ini.example

--- OpenSim/Region/Application/ConfigurationLoader.cs
+++ OpenSim/Region/Application/ConfigurationLoader.cs
@@ -172,7 +172,7 @@
             if (sources.Count == 0)
             {
                 m_log.FatalFormat("[CONFIG]: Could not load any configuration");
-                m_log.FatalFormat("[CONFIG]: Did you copy the OpenSim.ini.example file to OpenSim.ini?");
+                m_log.FatalFormat("[CONFIG]: Did you copy the OpenSimDefaults.ini.example file to OpenSimDefaults.ini?");
                 Environment.Exit(1);
             }


Shuffle where hooks are called from in BootstrapperBase slightly

--- Stylet/BootstrapperBase.cs
+++ Stylet/BootstrapperBase.cs
@@ -66,8 +66,11 @@
             };

             // Fetch this logger when needed. If we fetch it now, then no-one will have been given the change to enable the LogManager, and we'll get a NullLogger
-            this.Application.DispatcherUnhandledException += (o, e) => LogManager.GetLogger(typeof(BootstrapperBase)).Error(e.Exception, "Unhandled exception");
-            this.Application.DispatcherUnhandledException += (o, e) => this.OnUnhandledExecption(e);
+            this.Application.DispatcherUnhandledException += (o, e) =>
+            {
+                LogManager.GetLogger(typeof(BootstrapperBase)).Error(e.Exception, "Unhandled exception");
+                this.OnUnhandledExecption(e);
+            };
         }

         /// <summary>
@@ -84,6 +87,7 @@
             View.ViewManager = (IViewManager)this.GetInstance(typeof(IViewManager));

             this.Launch();
+            this.OnStartup();
         }

         /// <summary>
@@ -93,7 +97,6 @@
         {
             var windowManager = (IWindowManager)this.GetInstance(typeof(IWindowManager));
             windowManager.ShowWindow(this.RootViewModel);
-            this.OnStartup();
         }

         /// <summary>
@@ -114,7 +117,7 @@
         protected virtual void OnStartup() { }

         /// <summary>
-        /// Hook used internall by the Bootstrapper to do things like dispose the IoC container
+        /// Hook used internally by the Bootstrapper to do things like dispose the IoC container
         /// </summary>
         /// <param name="e">The exit event data</param>
         protected virtual void OnExitInternal(ExitEventArgs e) { }


remove dead code

remove dead code

--- SwCSharpAddinMF/SwAddin.cs
+++ SwCSharpAddinMF/SwAddin.cs
@@ -185,34 +185,6 @@
         public void CreateCube()
         {
             SampleMacroFeature.AddMacroFeature(SwApp);
-            return;
-
-            //make sure we have a part open
-            string partTemplate = ISwApp.GetUserPreferenceStringValue((int)swUserPreferenceStringValue_e.swDefaultTemplatePart);
-            if ((partTemplate != null) && (partTemplate != ""))
-            {
-                IModelDoc2 modDoc = (IModelDoc2)ISwApp.NewDocument(partTemplate, (int)swDwgPaperSizes_e.swDwgPaperA2size, 0.0, 0.0);
-
-                modDoc.InsertSketch2(true);
-                modDoc.SketchRectangle(0, 0, 0, .1, .1, .1, false);
-                //Extrude the sketch
-                IFeatureManager featMan = modDoc.FeatureManager;
-                featMan.FeatureExtrusion(true,
-                    false, false,
-                    (int)swEndConditions_e.swEndCondBlind, (int)swEndConditions_e.swEndCondBlind,
-                    0.1, 0.0,
-                    false, false,
-                    false, false,
-                    0.0, 0.0,
-                    false, false,
-                    false, false,
-                    true,
-                    false, false);
-            }
-            else
-            {
-                System.Windows.Forms.MessageBox.Show("There is no part template available. Please check your options and make sure there is a part template selected, or select a new part template.");
-            }
         }


check existence of empty constructor before activation attempt

--- TIKSN.Core/DependencyInjection/CompositionRootSetupBase.cs
+++ TIKSN.Core/DependencyInjection/CompositionRootSetupBase.cs
@@ -16,23 +16,6 @@
 		protected CompositionRootSetupBase()
 		{
 			services = new Lazy<IServiceCollection>(CreateServiceCollection, false);
-		}
-
-		protected IServiceCollection CreateServiceCollection()
-		{
-			var services = new ServiceCollection();
-			DependencyRegistration.Register(services);
-
-			ConfigureServices(services);
-
-			var configuration = GetConfigurationRoot();
-
-			ConfigureOptions(services, configuration);
-
-			services.AddSingleton(configuration);
-			services.AddSingleton<IConfiguration>(configuration);
-
-			return services;
 		}

 		public IServiceProvider CreateServiceProvider()
@@ -75,6 +58,23 @@
 		}

 		protected abstract void ConfigureServices(IServiceCollection services);
+
+		protected IServiceCollection CreateServiceCollection()
+		{
+			var services = new ServiceCollection();
+			DependencyRegistration.Register(services);
+
+			ConfigureServices(services);
+
+			var configuration = GetConfigurationRoot();
+
+			ConfigureOptions(services, configuration);
+
+			services.AddSingleton(configuration);
+			services.AddSingleton<IConfiguration>(configuration);
+
+			return services;
+		}

 		protected virtual IServiceProvider CreateServiceProviderInternal()
 		{
@@ -126,7 +126,7 @@

 						if (pInfo.PropertyType == typeof(string))
 							isNotSpecified = string.IsNullOrEmpty(pInfo.GetValue(options.Value)?.ToString());
-						else if (pInfo.GetValue(options.Value) == Activator.CreateInstance(pInfo.PropertyType) && pInfo.PropertyType.GetConstructor(Type.EmptyTypes) != null)
+						else if (pInfo.PropertyType.GetConstructor(Type.EmptyTypes) != null && pInfo.GetValue(options.Value) == Activator.CreateInstance(pInfo.PropertyType))
 							isNotSpecified = true;
 						else
 							logger.LogDebug(2016759580, $"{pInfo.Name} property of {optionType.FullName} object is type of {pInfo.PropertyType}.");


try fix next song not working.

try fix next song not working.

--- src/Wukong/Services/Channel.cs
+++ src/Wukong/Services/Channel.cs
@@ -223,7 +223,12 @@

         public bool ReportFinish(string userId, ClientSong song, bool force = false)
         {
-            if (song == null || CurrentSong == null || song.SiteId != CurrentSong.SiteId || song.SongId != CurrentSong.SongId)
+            if (CurrentSong == null)
+            {
+                ShouldForwardNow();
+                return true;
+            }
+            if (song == null || song.SiteId != CurrentSong.SiteId || song.SongId != CurrentSong.SongId)
                 return false;
             if (force)
                 DownvoteUsers.Add(userId);


Reuse Call overload from FunctionExpectation.cs

--- Telerik.JustMock/Expectations/Local/FunctionExpectation.cs
+++ Telerik.JustMock/Expectations/Local/FunctionExpectation.cs
@@ -100,7 +100,8 @@
 		{
 			return ProfilerInterceptor.GuardInternal(() =>
 			{
-				var resObject = this.Call(target, methodName, localFunctionName, args);
+				Type[] emptyParamTypes = new Type[] { };
+				var resObject = this.Call(target, methodName, emptyParamTypes, localFunctionName, args);
 				T res = (T)resObject;
 				return res;
 			});


rates identifier

rates identifier

--- Terradue.Tep/Terradue/Tep/WebServer/Accounting/WebRates.cs
+++ Terradue.Tep/Terradue/Tep/WebServer/Accounting/WebRates.cs
@@ -36,7 +36,8 @@

         public WebRates() {}

-        public WebRates(Rates entity) : base(entity){
+        public WebRates(Rates entity) : base(entity){
+            this.Identifier = entity.Identifier;
             this.Unit = entity.Unit;
             this.Cost = entity.Cost;
         }


add identifier on wps service create

add identifier on wps service create

--- Terradue.Tep/Terradue/Tep/WebServer/Service/Wps.Service.cs
+++ Terradue.Tep/Terradue/Tep/WebServer/Service/Wps.Service.cs
@@ -536,6 +536,7 @@
                 //Create WPS provider
                 WpsProvider wpsProvider = new WpsProvider(context);
                 wpsProvider.BaseUrl = request.Url;
+                wpsProvider.Identifier = request.Identifier;
                 wpsProvider.Name = request.Name;
                 wpsProvider.Store();

@@ -546,7 +547,6 @@
                 wps.Description = request.Description;
                 wps.Url = request.Url;
                 wps.Provider = wpsProvider;
-                wps.ProcessIdentifier = "None";
                 wps.Store();

                 result = new WebWpsService(wps);


Reading tortoiseproc location from registry not working on windows 10 64-bit machine #63

--- TSVN/Helpers/FileHelper.cs
+++ TSVN/Helpers/FileHelper.cs
@@ -1,4 +1,5 @@
-using System.IO;
+using System;
+using System.IO;
 using EnvDTE;
 using EnvDTE80;
 using Microsoft.Win32;
@@ -8,14 +9,15 @@
     public static class FileHelper
     {
         public static DTE2 Dte;
+        private const string DEFAULT_PROC_PATH = @"C:\Program Files\TortoiseSVN\bin\TortoiseProc.exe";

         public static string GetTortoiseSvnProc()
         {
-            var path = (string)Registry.GetValue(@"HKEY_LOCAL_MACHINE\SOFTWARE\TortoiseSVN", "ProcPath", @"C:\Program Files\TortoiseSVN\bin\TortoiseProc.exe");
+            var path = GetRegKeyValue();

             if (string.IsNullOrEmpty(path))
             {
-                path = @"C:\Program Files\TortoiseSVN\bin\TortoiseProc.exe";
+                path = DEFAULT_PROC_PATH;
             }

             return path;
@@ -62,5 +64,16 @@
             // Context menu in the Code Editor
             return Dte.ActiveDocument.FullName;
         }
+
+        private static string GetRegKeyValue()
+        {
+            var localMachineKey = RegistryKey.OpenBaseKey(RegistryHive.LocalMachine,
+                Environment.Is64BitOperatingSystem ? RegistryView.Registry64 : RegistryView.Registry32);
+
+            return localMachineKey
+                .OpenSubKey(@"SOFTWARE\TortoiseSVN")
+                .GetValue("ProcPath", DEFAULT_PROC_PATH)
+                .ToString();
+        }
     }
 }


Fix nullable.

Fix nullable.

--- CK.AspNet.Auth/UserLoginResult.cs
+++ CK.AspNet.Auth/UserLoginResult.cs
@@ -25,7 +25,7 @@
         /// corrected by registering the user for the provider.
         /// This can be true only on failure otherwise an argument exception is thrown.
         /// </param>
-        public UserLoginResult( IUserInfo info, int failureCode, string failureReason, bool unregisteredUser )
+        public UserLoginResult( IUserInfo? info, int failureCode, string failureReason, bool unregisteredUser )
         {
             if( info == null || info.UserId == 0 )
             {


Adapted the camera settings test application to reflect the new functionality for the image settings.

--- Test/CameraSettingsTest.cs
+++ Test/CameraSettingsTest.cs
@@ -54,14 +54,8 @@
                 Console.WriteLine(string.Format(CultureInfo.InvariantCulture, "Battery level: {0}", await camera.GetBatteryLevelAsync()));
                 Console.WriteLine(string.Format(CultureInfo.InvariantCulture, "Owner name: {0}", await camera.GetOwnerNameAsync()));

-                // Gets all information available about the ISO speed of the camera
-                CameraSetting cameraSetting = camera.Settings.FirstOrDefault(setting => setting.Name == CameraSettings.IsoSpeed);
-                Console.WriteLine(cameraSetting.Name);
-                Console.WriteLine(await cameraSetting.GetTypeAsync());
-                Console.WriteLine(await cameraSetting.GetLabelAsync());
-                Console.WriteLine(await cameraSetting.GetValueAsync());
-                foreach (string choice in await cameraSetting.GetChoicesAsync())
-                    Console.WriteLine(choice);
+                // Gets some information about the image settings of the camera and prints it out
+                Console.WriteLine(string.Format(CultureInfo.InvariantCulture, "ISO speed: {0}", await camera.GetIsoSpeedAsync()));
 			}
 			catch (CameraException exception)
 			{


Only force to ghost if mind belong to the body.

--- UnityProject/Assets/Scripts/Player/PlayerNetworkActions.cs
+++ UnityProject/Assets/Scripts/Player/PlayerNetworkActions.cs
@@ -24,7 +24,6 @@
 	private PlayerMove playerMove;
 	private PlayerScript playerScript;
 	private ItemStorage itemStorage;
-
 	private void Awake()
 	{
 		playerMove = GetComponent<PlayerMove>();
@@ -415,7 +414,9 @@
 	[Server]
 	public void ServerSpawnPlayerGhost()
 	{
-		if (GetComponent<LivingHealthBehaviour>().IsDead && !playerScript.IsDeadOrGhost)
+		//Only force to ghost if the mind belongs in to that body
+		var currentMobID = GetComponent<LivingHealthBehaviour>().mobID;
+		if (GetComponent<LivingHealthBehaviour>().IsDead && !playerScript.IsGhost && playerScript.mind.bodyMobID == currentMobID)
 		{
 			PlayerSpawn.ServerSpawnGhost(playerScript.mind);
 		}


The CodeAnalysisReference reference in DiagnosticVerifier.Helper was a misnamed duplicate - now removed

--- ProductiveRage.Immutable.Analyser/Analyser.Test/Helpers/DiagnosticVerifier.Helper.cs
+++ ProductiveRage.Immutable.Analyser/Analyser.Test/Helpers/DiagnosticVerifier.Helper.cs
@@ -23,7 +23,6 @@
 		private static readonly MetadataReference CorlibReference = MetadataReference.CreateFromFile(typeof(object).Assembly.Location);
 		private static readonly MetadataReference SystemCoreReference = MetadataReference.CreateFromFile(typeof(Enumerable).Assembly.Location);
 		private static readonly MetadataReference CSharpSymbolsReference = MetadataReference.CreateFromFile(typeof(CSharpCompilation).Assembly.Location);
-		private static readonly MetadataReference CodeAnalysisReference = MetadataReference.CreateFromFile(typeof(ProductiveRage.Immutable.ImmutabilityHelpers).Assembly.Location);
 		private static readonly MetadataReference CSharpProductiveRageImmutableReference = MetadataReference.CreateFromFile(typeof(ImmutabilityHelpers).Assembly.Location);
 		private static readonly MetadataReference MockBridgeReference = MetadataReference.CreateFromFile(typeof(Bridge.Script).Assembly.Location);

@@ -159,7 +158,6 @@
 				.AddMetadataReference(projectId, CorlibReference)
 				.AddMetadataReference(projectId, SystemCoreReference)
 				.AddMetadataReference(projectId, CSharpSymbolsReference)
-				.AddMetadataReference(projectId, CodeAnalysisReference)
 				.AddMetadataReference(projectId, CSharpProductiveRageImmutableReference)
 				.AddMetadataReference(projectId, MockBridgeReference);


Don't store extInfo past parsing

Don't store extInfo past parsing

--- PathfinderAPI/Replacements/ExtensionInfoLoader.cs
+++ PathfinderAPI/Replacements/ExtensionInfoLoader.cs
@@ -69,7 +69,7 @@

         private static readonly EventExecutor executor = new EventExecutor();

-        private static ExtensionInfo extInfo;
+        private static ExtensionInfo extInfo = null;

         static ExtensionInfoLoader()
         {
@@ -169,8 +169,10 @@

             if (!executor.TryParse(out var ex))
                 throw new FormatException($"An exception occurred while trying to parse '{filepath}'", ex);
-
-            return extInfo;
+
+            var ret = extInfo;
+            extInfo = null;
+            return ret;
         }
     }
 }


[ConsolidatedManagedProperty] Reversed the list of managed properties so the latest definitions are treated last.

--- Source/GSoft.Dynamite.Common.Core/Configuration/ConsolidatedManagedPropertyConfig.cs
+++ Source/GSoft.Dynamite.Common.Core/Configuration/ConsolidatedManagedPropertyConfig.cs
@@ -35,6 +35,10 @@
                     managedProperties.AddRange(configuration.ManagedProperties);
                 }

+                // Reverse the order of the managed properties so that
+                // the latest definitions are treated last (overrides the base definitions).
+                managedProperties.Reverse();
+
                 return managedProperties;
             }
         }


Main area - implemented confirmation for deleting and removing pictures.

--- Source/PhotoContest.App/Views/Shared/DisplayTemplates/DetailsPictureViewModel.cshtml
+++ Source/PhotoContest.App/Views/Shared/DisplayTemplates/DetailsPictureViewModel.cshtml
@@ -8,8 +8,11 @@

             @if ((Model.IsAuthor || this.User.IsInRole("Administrator")))
             {
-                @Html.ActionLink("Delete", "Delete", "Pictures", new { id = Model.Id }, new { @class = "btn btn-danger" })
-                @Html.ActionLink("Remove", "Remove", "Pictures", new { id = Model.Id, contestId = Model.ContestId }, new { @class = "btn btn-warning" })
+                <button class="btn btn-danger" role="button" data-toggle="modal" data-target="#confirm-delete-@Model.Id">Delete</button>
+                if (Model.ContestId != null)
+                {
+                    <button class="btn btn-warning" role="button" data-toggle="modal" data-target="#confirm-remove-@Model.Id">Remove</button>
+                }
             }
             @if (Model.HasVoted && !Model.IsAuthor)
             {
@@ -31,6 +34,43 @@
         Author: @Html.ActionLink(@Model.AuthorUsername, "Index", "Users", new { username = Model.AuthorUsername }, null)

         Posted on: @Html.DisplayFor(m => m.PostedOn)

         Total participations: @Model.ContestsCount

-        Total votes: @Model.VotesCount

+        Total votes: @Model.VotesCount

+
+

+

+

+

+                        <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
+
Delete picture confirmation

+

+

+
You are about to delete picture FROM SITE AT ALL! Are you sure?

+

+

+                        <button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>
+                        @Html.ActionLink("Delete", "Delete", "Pictures", new { id = Model.Id }, new { @class = "btn btn-danger" })
+

+

+

+

+
+

+

+

+

+                        <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
+
Remove picture confirmation

+

+

+
You are about to remove picture from this contest! Are you sure?

+

+

+                        <button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>
+                        @Html.ActionLink("Remove", "Remove", "Pictures", new { id = Model.Id, contestId = Model.ContestId }, new { @class = "btn btn-warning" })
+

+

+

+

+


Force fix for new databases

Force fix for new databases

Forces the new databases to generate the schema. This will be reversed
in the next commit such that databases can successfully migrate.

--- VotingApplication/VotingApplication.Web.Api/Global.asax.cs
+++ VotingApplication/VotingApplication.Web.Api/Global.asax.cs
@@ -29,8 +29,8 @@
             GlobalConfiguration.Configuration.Formatters.JsonFormatter.SerializerSettings.ReferenceLoopHandling = ReferenceLoopHandling.Ignore;

             //Enable automatic migrations
-            Database.SetInitializer(new MigrateDatabaseToLatestVersion<VotingContext, Configuration>());
-            new VotingContext().Database.Initialize(false);
+            //Database.SetInitializer(new MigrateDatabaseToLatestVersion<VotingContext, Configuration>());
+            //new VotingContext().Database.Initialize(false);
         }
     }
 }


Escape + Shield

Escape + Shield

--- Tibbuhs/Tibbuhs/Program.cs
+++ Tibbuhs/Tibbuhs/Program.cs
@@ -17,6 +17,8 @@
         private static Spell E;
         private static Spell R;
         private static SpellSlot Flash;
+        private static SpellSlot Ignite; //not used
+        private static SpellSlot Exhaust; //not used
         private static PredictionInput FlashTibbers_pi;
         private static PredictionOutput FlashTibbers_po;
         private static Menu menu;
@@ -40,6 +42,8 @@
             R = new Spell(SpellSlot.R, 600);
             R.SetSkillshot(250, 200, float.MaxValue, false, SkillshotType.SkillshotCircle);
             Flash = ObjectManager.Player.GetSpellSlot("SummonerFlash", true);
+            Ignite = ObjectManager.Player.GetSpellSlot("SummonerDot", true);
+            Ignite = ObjectManager.Player.GetSpellSlot("SummonerExhaust", true);
             SpellList.Add(Q); SpellList.Add(W); SpellList.Add(E); SpellList.Add(R);
             #endregion

@@ -73,9 +77,10 @@

-            menu.SubMenu("defense").AddItem(new MenuItem("Wstungapcloser", "Use W stun as a gapcloser")).SetValue(true);
+            menu.SubMenu("defense").AddItem(new MenuItem("Wstunescape", "Use W stun to escape")).SetValue(true);
+            menu.SubMenu("defense").AddItem(new MenuItem("Wstunescaperange", "Max W stun escape range")).SetValue(new Slider(250, 0, (int)W.Range));
             menu.SubMenu("defense").AddItem(new MenuItem("Eenemies", "Use E when enemies near you")).SetValue(true);
-            menu.SubMenu("defense").AddItem(new MenuItem("Eenemiesrange", "Use E when enemies closer than")).SetValue(new Slider(250, 0, 1250));
+            menu.SubMenu("defense").AddItem(new MenuItem("Eenemiesrange", "Use E when enemies closer than")).SetValue(new Slider(600, 0, 1250));

             menu.SubMenu("misc").AddItem(new MenuItem("passivestacker", "Always stack passive with E")).SetValue(false);
@@ -293,10 +298,19 @@
         private static void Cast_W()
         {
             var target = SimpleTs.GetTarget(W.Range, SimpleTs.DamageType.Magical);
+            var Wstunescaperange = menu.Item("Wstungapescaperange").GetValue<int>();
+            var closestThreat = ObjectManager.Get<Obj_AI_Hero>().First(ct => !ct.IsMe && ct.Distance(Player) < Wstunescaperange && ct.IsEnemy);
             //#TODO work on better targeting, like not wasting Q on tanks.
-            if (target != null)
-            {
-                W.Cast(target, UsePackets());
+            if (menu.Item("combotoggle").GetValue<KeyBind>().Active)
+            {
+                if (target != null)
+                {
+                    W.Cast(target, UsePackets());
+                }
+            }
+            if (menu.Item("Wstungapescape").GetValue<bool>())
+            {
+                W.Cast(closestThreat);
             }
         }
         #endregion
@@ -304,6 +318,14 @@
         #region Casting E
         private static void Cast_E(string mode)
         {
+            var defenseEenemies = menu.Item("Eenemies").GetValue<bool>();
+            var defenseEenemiesrange = menu.Item("Eenemiesrange").GetValue<int>();
+            var closestEnemy = ObjectManager.Get<Obj_AI_Hero>().First(ce => !ce.IsMe && ce.Distance(Player) < defenseEenemiesrange && ce.IsEnemy);
+            if (closestEnemy != null && defenseEenemies && E.IsReady())
+            {
+                E.Cast();
+            }
+
             if(mode == "farm" && !PassiveStacker() && (menu.Item("Elanestuncharge").GetValue<bool>()))
             {
                 if(GetPassiveStacks() < 4)


fix(dashboard): query past maxpagesize

fix(dashboard): query past maxpagesize

--- WebAPI.Dashboard/Areas/admin/Controllers/HomeController.cs
+++ WebAPI.Dashboard/Areas/admin/Controllers/HomeController.cs
@@ -2,6 +2,7 @@
 using System.Linq;
 using System.Web.Mvc;
 using Raven.Client;
+using Serilog;
 using StackExchange.Redis;
 using WebAPI.Common.Executors;
 using WebAPI.Common.Extensions;
@@ -63,9 +64,21 @@
                 return;
             }

-            StatCache.AllKeys = Session.Query<ApiKey>()
-                .Take(1024)
-                .ToArray();
+            const int pageSize = 1024;
+
+            var keys = Session.Query<ApiKey>()
+                .Take(pageSize)
+                .ToList();
+
+            keys.AddRange(Session.Query<ApiKey>()
+                .Skip(pageSize)
+                .Take(pageSize)
+                .ToList()
+            );
+
+            StatCache.AllKeys = keys.ToArray();
+
+            Log.Warning("analytics(key-count): {key}", StatCache.AllKeys.Length);

             var totalKeys = Session.Query<ApiKey>().Count();
             var totalUsers = Session.Query<Account>().Count();


Don't show 'Abandoned' view in dropdowns

--- TribalWars/Worlds/World.cs
+++ TribalWars/Worlds/World.cs
@@ -340,7 +340,7 @@

         public IEnumerable<string> GetBackgroundViews()
         {
-            return Views.Where(x => x.Background).Select(x => x.Name);
+            return Views.Where(x => x.Background).Where(x => x.Name != "Abandoned").Select(x => x.Name);
         }
         #endregion


Added some additional MIME types for serving fonts

--- Ceen.Httpd/Handler/FileHandler.cs
+++ Ceen.Httpd/Handler/FileHandler.cs
@@ -385,9 +385,19 @@
 				case ".hbs":
 					return "application/x-handlebars-template";
 				case ".woff":
+				case ".woff2":
 					return "application/font-woff";
 				case ".ttf":
 					return "application/font-ttf";
+				case ".eot":
+					return "application/vnd.ms-fontobject";
+				case ".otf":
+					return "application/font-otf";
+				case ".svg":
+					return "application/svg+xml";
+				case ".xml":
+					return "application/xml";
+
 				default:
 					return null;
 			}


Fixed "Fail-safe mode" checkbox value being updated when user goes to the "Tools" tab page, instead of the "Options" page.

--- ChargedMinersLauncher/MainForm.cs
+++ ChargedMinersLauncher/MainForm.cs
@@ -1069,32 +1069,33 @@

         void tabs_SelectedIndexChanged( object sender, EventArgs e ) {
-            if( tabs.Visible ) {
-                if( tabs.SelectedTab == tabSignIn ) {
-                    AcceptButton = bSignIn;
-                    if( cSignInUsername.Text.Length == 0 ) {
-                        cSignInUsername.Focus();
-                    } else if( tSignInPassword.Text.Length == 0 ) {
-                        tSignInPassword.Focus();
-                    } else {
-                        tSignInUrl.Focus();
-                    }
-                } else if( tabs.SelectedTab == tabResume ) {
-                    AcceptButton = bResume;
-                    bResume.Focus();
-                } else if( tabs.SelectedTab == tabDirect ) {
-                    AcceptButton = bDirectConnect;
-                    tDirectUrl.Focus();
-                } else {
-                    AcceptButton = null;
-                    if( tabs.SelectedTab == tabTools ) {
-                        SettingsFile sf = new SettingsFile();
-                        if( File.Exists( Paths.GameSettingsFile ) ) {
-                            sf.Load( Paths.GameSettingsFile );
-                        }
-                        xFailSafe.Checked = sf.GetBool( "mc.failsafe", false );
-                    }
-                }
+            if( !tabs.Visible ) {
+                return;
+            }
+            if( tabs.SelectedTab == tabSignIn ) {
+                AcceptButton = bSignIn;
+                if( cSignInUsername.Text.Length == 0 ) {
+                    cSignInUsername.Focus();
+                } else if( tSignInPassword.Text.Length == 0 ) {
+                    tSignInPassword.Focus();
+                } else {
+                    tSignInUrl.Focus();
+                }
+            } else if( tabs.SelectedTab == tabResume ) {
+                AcceptButton = bResume;
+                bResume.Focus();
+            } else if( tabs.SelectedTab == tabDirect ) {
+                AcceptButton = bDirectConnect;
+                tDirectUrl.Focus();
+            } else if( tabs.SelectedTab == tabOptions ) {
+                AcceptButton = null;
+                SettingsFile sf = new SettingsFile();
+                if( File.Exists( Paths.GameSettingsFile ) ) {
+                    sf.Load( Paths.GameSettingsFile );
+                }
+                xFailSafe.Checked = sf.GetBool( "mc.failsafe", false );
+            } else {
+                AcceptButton = null;
             }
         }


Added more LazyField<T> extension helper methods

--- Proligence.Orchard.Testing/LazyFieldExtensions.cs
+++ Proligence.Orchard.Testing/LazyFieldExtensions.cs
@@ -1,23 +1,43 @@
 namespace Proligence.Orchard.Testing
 {
+    using System;
     using System.Reflection;
     using global::Orchard.Core.Common.Utilities;

     public static class LazyFieldExtensions
     {
+        private const string LoaderFieldName = "_loader";
+        private const string SetterFieldName = "_setter";
+        private const string ValueFieldName = "_value";
+
         public static bool HasLoader<T>(this LazyField<T> lazyField)
         {
-            return ReadField(lazyField, "_loader") != null;
+            return ReadField(lazyField, LoaderFieldName) != null;
+        }
+
+        public static Func<T> GetLoader<T>(this LazyField<T> lazyField)
+        {
+            return (Func<T>)ReadField(lazyField, LoaderFieldName);
         }

         public static bool HasSetter<T>(this LazyField<T> lazyField)
         {
-            return ReadField(lazyField, "_setter") != null;
+            return ReadField(lazyField, SetterFieldName) != null;
+        }
+
+        public static Func<T, T> GetSetter<T>(this LazyField<T> lazyField)
+        {
+            return (Func<T, T>)ReadField(lazyField, SetterFieldName);
         }

         public static bool HasValue<T>(this LazyField<T> lazyField)
         {
-            return ReadField(lazyField, "_value") != null;
+            return ReadField(lazyField, ValueFieldName) != null;
+        }
+
+        public static T GetValue<T>(this LazyField<T> lazyField)
+        {
+            return (T)ReadField(lazyField, ValueFieldName);
         }

         private static object ReadField<T>(LazyField<T> lazyField, string name)


Updated the searches to all use udfs

Updated the searches to all use udfs

--- Purchasing.Core/Repositories/ISearchRepository.cs
+++ Purchasing.Core/Repositories/ISearchRepository.cs
@@ -1,11 +1,9 @@
-using System;
-using System.Collections.Generic;
+using System.Collections.Generic;
+using NHibernate;
 using NHibernate.Transform;
+using Purchasing.Core.Domain;
 using Purchasing.Core.Queries;
-using UCDArch.Core.PersistanceSupport;
 using UCDArch.Data.NHibernate;
-using Purchasing.Core.Domain;
-using NHibernate;

 namespace Purchasing.Core.Repositories
 {
@@ -37,64 +35,39 @@

     public class SearchRepository : ISearchRepository
     {
-        public ISession Session { get { return NHibernateSessionManager.Instance.GetSession(); } }
+        public ISession Session
+        {
+            get { return NHibernateSessionManager.Instance.GetSession(); }
+        }
+
+        #region ISearchRepository Members

         public IList<SearchResults.OrderResult> SearchOrders(string searchTerm, string user)
         {
-            const string queryFields = "(RES.[Justification], RES.[RequestNumber], RES.[DeliverTo], RES.[DeliverToEmail])";
-            return PerformQuery<SearchResults.OrderResult>(user, searchTerm, queryFields, "Order", queryId: "Id");
+            return PerformQuery<SearchResults.OrderResult>(searchTerm, "Order", user);
         }

         public IList<SearchResults.LineResult> SearchLineItems(string searchTerm, string user)
         {
-            const string queryFields = "(RES.[Description], RES.[Url], RES.[Notes], RES.[CatalogNumber], RES.[CommodityId])";
-            return PerformQuery<SearchResults.LineResult>(user, searchTerm, queryFields, "Line");
+            return PerformQuery<SearchResults.LineResult>(searchTerm, "Line", user);
         }

         public IList<SearchResults.CustomFieldResult> SearchCustomFieldAnswers(string searchTerm, string user)
         {
-            const string queryFields = "(RES.[Answer])";
-            return PerformQuery<SearchResults.CustomFieldResult>(user, searchTerm, queryFields, "CustomField");
+            return PerformQuery<SearchResults.CustomFieldResult>(searchTerm, "CustomField", user);
         }

         public IList<SearchResults.CommentResult> SearchComments(string searchTerm, string user)
         {
-            const string queryFields = "(RES.[text])";
-            return PerformQuery<SearchResults.CommentResult>(user, searchTerm, queryFields, "Comment");
+            return PerformQuery<SearchResults.CommentResult>(searchTerm, "Comment", user);
         }
-
-        private IList<T> PerformQuery<T>(string user, string query, string queryFields, string queryType, string queryId = "OrderId")
-        {
-            var q = Session.CreateSQLQuery(string.Format(@"SELECT RES.* FROM [PrePurchasing].[dbo].[v{0}Results] RES
-                INNER JOIN [PrePurchasing].[dbo].[vAccess] A
-                ON RES.[{1}] = A.[OrderId]
-                WHERE FREETEXT({2}, :query)
-                AND A.[AccessUserId] = :user AND A.[isadmin] = 0", queryType, queryId, queryFields))
-                .SetString("query", query)
-                .SetString("user", user)
-                .SetResultTransformer(Transformers.AliasToBean<T>());
-
-            return q.List<T>();
-        }
-
-        private IList<T> PerformUdfQuery<T>(string query, string queryType, string user = null)
-        {
-            var q = Session.CreateSQLQuery(
-                string.Format(
-                    @"DECLARE @ContainsSearchCondition varchar(255) = '{0}';
-                    SELECT * from dbo.udf_Get{1}Results(@ContainsSearchCondition)",
-                    query, queryType))
-                .SetResultTransformer(Transformers.AliasToBean<T>());
-
-            return q.List<T>();
-        }

         /// <summary>
         /// Searches commodities
         /// </summary>
         public IList<Commodity> SearchCommodities(string searchTerm)
         {
-            return PerformUdfQuery<Commodity>(searchTerm, "Commodities");
+            return PerformQuery<Commodity>(searchTerm, "Commodities");
         }

         /// <summary>
@@ -102,7 +75,7 @@
         /// </summary>
         public IList<Vendor> SearchVendors(string searchTerm)
         {
-            return PerformUdfQuery<Vendor>(searchTerm, "Vendor");
+            return PerformQuery<Vendor>(searchTerm, "Vendor");
         }

         /// <summary>
@@ -110,7 +83,29 @@
         /// </summary>
         public IList<Account> SearchAccounts(string searchTerm)
         {
-            return PerformUdfQuery<Account>(searchTerm, "Account");
+            return PerformQuery<Account>(searchTerm, "Account");
+        }
+
+        #endregion
+
+        private IList<T> PerformQuery<T>(string query, string queryType, string user = null)
+        {
+            var queryParams = new List<string> {"@User", "@ContainsSearchCondition"};
+
+            if (string.IsNullOrWhiteSpace(user))
+            {
+                queryParams.Remove("@User");
+            }
+
+            IQuery q = Session.CreateSQLQuery(
+                string.Format(
+                    @"DECLARE @User varchar(255) = '{0}';
+                    DECLARE @ContainsSearchCondition varchar(255) = '{1}';
+                    SELECT * from dbo.udf_Get{2}Results({3})",
+                    user, query, queryType, string.Join(",", queryParams)))
+                .SetResultTransformer(Transformers.AliasToBean<T>());
+
+            return q.List<T>();
         }
     }
-}
+}


Update GithubClient.cs

Update GithubClient.cs

--- ReadingList.Notes.Github/Services/GithubClient.cs
+++ ReadingList.Notes.Github/Services/GithubClient.cs
@@ -1,29 +1,30 @@
 using System.Collections.Generic;
-using System.Net.Http;
-using System.Threading.Tasks;
-using Octokit;
-
-namespace ReadingList.Notes.Github.Services
-{
-    public class GithubClient
-    {
-        public HttpClient Client { get; }
-        private readonly IGitHubClient _gitHubClient;
-        private const string ApplicationName = "ReadingList.Notes";
-
-        public GithubClient(HttpClient client)
-        {
-            client.DefaultRequestHeaders.Add("Accept","application/vnd.github.v3+json");
-            client.DefaultRequestHeaders.Add("User-Agent", ApplicationName);
-            Client = client;
-
-            _gitHubClient = new GitHubClient(new ProductHeaderValue(ApplicationName));
-        }
-
-        public async Task<string> GetRepositoryTextFile(string url) => await Client.GetStringAsync(url);
-
-        public async Task<IReadOnlyList<RepositoryContent>> GetRepositoryContent(string username, string repo, string repoPath) =>await _gitHubClient.Repository.Content.GetAllContents(username, repo, repoPath);
-
-    }
-}
-
+using System.Net.Http;
+using System.Threading.Tasks;
+using Octokit;
+
+namespace ReadingList.Notes.Github.Services
+{
+    public class GithubClient
+    {
+        public HttpClient Client { get; }
+        private readonly IGitHubClient _gitHubClient;
+        private const string ApplicationName = "ReadingList.Notes";
+
+        public GithubClient(HttpClient client)
+        {
+            client.DefaultRequestHeaders.Add("Accept","application/vnd.github.v3+json");
+            client.DefaultRequestHeaders.Add("User-Agent", ApplicationName);
+            Client = client;
+
+            _gitHubClient = new GitHubClient(new ProductHeaderValue(ApplicationName));
+        }
+
+        public async Task<string> GetRepositoryTextFile(string url) => await Client.GetStringAsync(url);
+
+        public async Task<IReadOnlyList<RepositoryContent>> GetRepositoryContent(string username, string repo, string repoPath) =>
+            await _gitHubClient.Repository.Content.GetAllContents(username, repo, repoPath);
+
+    }
+}
+


english am i right

english am i right

--- RelhaxModpack/RelhaxModpack/Utils/Translations.cs
+++ RelhaxModpack/RelhaxModpack/Utils/Translations.cs
@@ -3981,7 +3981,7 @@

             //Component: CleanupModFilesButtonDescription
             //
-            English.Add("CleanupModFilesButtonDescription", "Deletes any mods located in locations like win32 and win64 that could be causing load conflicts");
+            English.Add("CleanupModFilesButtonDescription", "Deletes any mods located in folders like win32 and win64 that could be causing load conflicts");
             German.Add("CleanupModFilesButtonDescription", TranslationNeeded);
             Polish.Add("CleanupModFilesButtonDescription", TranslationNeeded);
             French.Add("CleanupModFilesButtonDescription", TranslationNeeded);


Fixing reflection issue in deserializer

Fixing reflection issue in deserializer

Using GetRuntimeMethod() wont work because it only looks for public
members.  Changed to a more brute force lookup

--- RestSharp.WinRT/Deserializers/JsonDeserializer.cs
+++ RestSharp.WinRT/Deserializers/JsonDeserializer.cs
@@ -21,7 +21,8 @@

         public object Deserialize(IRestResponse response, Type type)
         {
-            var methodInfo = this.GetType().GetRuntimeMethod("Deserialize", new Type[] { typeof(IRestResponse)} );
+            //Note: I think using GetRuntimeMethod here doesnt work because it only finds public members, so we have to be more brute force
+            var methodInfo = this.GetType().GetTypeInfo().DeclaredMethods.Where(m => m.Name == "Deserialize" && m.IsGenericMethod).FirstOrDefault();
             var genericMethod = methodInfo.MakeGenericMethod(type);
             var result = genericMethod.Invoke(this, new object[] { response });


Replaced uses of SortedList and SortedDictionary with Dictionary.
Modified for loops since ICollection.Count is O(1) in C# 2.0.

TODO:
Remove interfaces from return types, using ReadOnlyCollection when applicable.

--- Expression.cs
+++ Expression.cs
@@ -54,7 +54,7 @@
 		/// </summary>
 		protected string inFunction = ""; // Infix function.
 		protected string postFunction = ""; // Postfix function.
-        protected SortedDictionary<string, double> variables = new SortedDictionary<string, double>();
+        protected Dictionary<string, double> variables = new Dictionary<string, double>();
 		protected const double TRUE = 1;
 		protected const double FALSE = 0;
         protected string[] splitPostFunction;
@@ -1258,7 +1258,7 @@

             // Define "EvaluateD" function.
             //
-            Type[] args = { typeof(SortedDictionary<string, double>) };
+            Type[] args = { typeof(Dictionary<string, double>) };
             MethodBuilder evalMethodD = dynamicFunctionClass.DefineMethod(
                 "EvaluateD",
                 MethodAttributes.Public | MethodAttributes.Virtual,


Attempt to get coverage to 100%

Attempt to get coverage to 100%

--- ClassicBasic.Interpreter/Token.cs
+++ ClassicBasic.Interpreter/Token.cs
@@ -109,9 +109,9 @@
                     return _text;
                 case TokenClass.String:
                     return "\"" + _text + "\"";
-                default:
-                    return $"Unknown class {_tokenClass}";
             }
+
+            return $"Unknown class {_tokenClass}";
         }
     }
 }


maarten: redid the echolocation script, much more stable & safe

--- SeeingSoundwaves/Assets/Resources/EchoLocation.cs
+++ SeeingSoundwaves/Assets/Resources/EchoLocation.cs
@@ -6,101 +6,28 @@

 public class EchoLocation : MonoBehaviour {

-    public bool EnableEchoLocation = false;
+    public bool EnableEchoLocation = false;
+    public Texture2D ScreenshotTexture;
+    public Material ScreenshotMat;

 	// Use this for initialization
-	void Start () {
-        GetComponent<Camera>().depth = 0;
+	void Start () {
 	}
-
-    Texture2D previousFrame;
-    private bool takeHiResShot = false;

-    static int o = 0;
-
 	// Update is called once per frame
 	void Update () {
-
-        //Vector4 v = new Vector4(GetComponent<Camera>().transform.position.x, GetComponent<Camera>().transform.position.y, GetComponent<Camera>().transform.position.z, 0.0f);
-        //GameObject cu = GameObject.FindGameObjectWithTag("DebugCube");
-        //if (cu != null)
-        //{
-        //    Material mat = (Material)Resources.Load("distanceLerp", typeof(Material));
-
-        //    mat.SetVector("_CameraPosition", GetComponent<Camera>().transform.position);
-        //    mat.SetFloat("_CameraDistance", Vector4.Distance(v, cu.transform.position));
-        //}
-
-        if (Input.GetKeyDown(KeyCode.Space))
-        {
-            // = true;
-            TakeHiResShot();
-            //GetComponent<Camera>().enabled = false;
-        }
-
-        if(previousFrame != null)
-        {
-            byte[] fileData = File.ReadAllBytes(string.Format("{0}/screenshots/screen.png", Application.dataPath));
-            Texture2D tex = new Texture2D(2, 2);
-            tex.LoadImage(fileData);
-
-            GameObject.Find("Viewport").GetComponent<Renderer>().material.SetTexture("_MainTex", tex);
+        if(Input.GetKeyDown(KeyCode.F))
+        {
+            StartCoroutine(screenshotFunc());
         }
 	}

-
-
-    public static string ScreenShotName(int width, int height)
-    {
-        o++;
-
-        return string.Format("{0}/screenshots/screen.png", Application.dataPath);
-
-        //return string.Format("{0}/screenshots/screen_{1}_{2}.png",
-                             //Application.dataPath,
-                             //o,
-                             //(Int32)(DateTime.UtcNow.Subtract(new DateTime(1970, 1, 1))).TotalSeconds);
-
-
-    }
-
-    public void TakeHiResShot()
-    {
-        takeHiResShot = EnableEchoLocation;
-    }
-
-    void LateUpdate()
-    {
-        takeHiResShot |= Input.GetKeyDown(KeyCode.Space);
-        if (takeHiResShot)
-        {
-            int resWidth = Screen.width;
-            int resHeight = Screen.height;
-
-            RenderTexture rt = new RenderTexture(resWidth, resHeight, 24);
-            GetComponent<Camera>().targetTexture = rt;
-
-            Texture2D screenShot = new Texture2D(resWidth, resHeight, TextureFormat.RGB24, false);
-            GetComponent<Camera>().Render();
-
-            RenderTexture.active = rt;
-            screenShot.ReadPixels(new Rect(0, 0, resWidth, resHeight), 0, 0);
-
-            GetComponent<Camera>().targetTexture = null;
-            RenderTexture.active = null; // JC: added to avoid errors
-
-            previousFrame = screenShot;
-
-            Destroy(rt);
-
-            byte[] bytes = screenShot.EncodeToPNG();
-            string filename = ScreenShotName(resWidth, resHeight);
-
-            System.IO.File.WriteAllBytes(filename, bytes);
-
-            //Debug.Log(string.Format("Took screenshot to: {0}", filename));
-
-            takeHiResShot = false;
-        }
+    IEnumerator screenshotFunc()
+    {
+        yield return new WaitForEndOfFrame();
+        ScreenshotTexture = new Texture2D(Mathf.RoundToInt(Screen.width), Mathf.RoundToInt(Screen.height), TextureFormat.ARGB32, false);
+        ScreenshotTexture.ReadPixels(new Rect(0, 0, Screen.width, Screen.height), 0, 0, false);
+        ScreenshotTexture.Apply();
+        ScreenshotMat.mainTexture = ScreenshotTexture;
     }
 }


Additional verified example

Additional verified example

Correctly calculates results for Example 7.3 from MATLAB Codes for
Finite Element Analysis.

--- SharpFE.Core.Tests/Examples/Beam/BeamIn2DModel.cs
+++ SharpFE.Core.Tests/Examples/Beam/BeamIn2DModel.cs
@@ -289,7 +289,7 @@

             Assert.AreEqual(0, node1Displacement.X, 0.0001);
             Assert.AreEqual(0, node1Displacement.Z, 0.0001);
-            Assert.AreEqual(0.00109, node1Displacement.YY, 0.0001);
+            Assert.AreEqual(0.0010985, node1Displacement.YY, 0.0001);

             Console.WriteLine(node1Reaction);
             Assert.AreEqual(-5000, node1Reaction.Z, 1);
@@ -305,7 +305,7 @@
         ///<summary>
         /// Example problem and results are derived from:
         /// MATLAB Codes for Finite Element Analysis, Solid Mechanics and its applications Volume 157, A.J.M. Ferreira, Springer 2010
-        /// Section 7.2, page 73
+        /// Section 7.2, page 91
         /// </summary>
         [Test]
         public void Calculate2DFrameOf3BeamsAnd12Dof()
@@ -366,5 +366,64 @@
             Assert.AreEqual(23284, node4Reaction.YY, 1); ///NOTE this value of 23284 does not match the example, but was verified using a commercial finite element software

         }
+
+        ///<summary>
+        /// Example problem and results are derived from:
+        /// MATLAB Codes for Finite Element Analysis, Solid Mechanics and its applications Volume 157, A.J.M. Ferreira, Springer 2010
+        /// Section 7.3, page 95
+        /// </summary>
+        [Test]
+        public void Calculate2DPortalFrameOf3BeamsAnd12Dof()
+        {
+            FiniteElementModel model = new FiniteElementModel(ModelType.Frame2D);
+            FiniteElementNode node1 = model.NodeFactory.CreateFor2DTruss(-3, 0);
+            model.ConstrainNode(node1, DegreeOfFreedom.X);
+            model.ConstrainNode(node1, DegreeOfFreedom.Z);
+            model.ConstrainNode(node1, DegreeOfFreedom.YY);
+
+            FiniteElementNode node2 = model.NodeFactory.CreateFor2DTruss(-3, 6);
+
+            FiniteElementNode node3 = model.NodeFactory.CreateFor2DTruss(3, 6);
+
+            FiniteElementNode node4 = model.NodeFactory.CreateFor2DTruss(3, 0);
+            model.ConstrainNode(node4, DegreeOfFreedom.X);
+            model.ConstrainNode(node4, DegreeOfFreedom.Z);
+            model.ConstrainNode(node4, DegreeOfFreedom.YY);
+
+            IMaterial material = new GenericElasticMaterial(0, 210000000000, 0, 0);
+            ICrossSection section = new GenericCrossSection(0.0002, 0.0002);
+
+            model.ElementFactory.CreateLinear1DBeam(node1, node2, material, section);
+            model.ElementFactory.CreateLinear1DBeam(node2, node3, material, section);
+            model.ElementFactory.CreateLinear1DBeam(node3, node4, material, section);
+
+            ForceVector force2 = model.ForceFactory.Create(15000, 0, 0, 0, -10000, 0);
+            model.ApplyForceToNode(force2, node2);
+
+            IFiniteElementSolver solver = new LinearSolverSVD(model);
+            FiniteElementResults results = solver.Solve();
+
+            DisplacementVector node2Displacement = results.GetDisplacement(node2);
+            DisplacementVector node3Displacement = results.GetDisplacement(node3);
+            ReactionVector node1Reaction = results.GetReaction(node1);
+            ReactionVector node4Reaction = results.GetReaction(node4);
+
+            Assert.AreEqual(0.0052843, node2Displacement.X, 0.0001);
+            Assert.AreEqual(0.0006522, node2Displacement.Z, 0.0001);
+            Assert.AreEqual(0.0005, node2Displacement.YY, 0.0001);
+
+            Assert.AreEqual(0.0044052, node3Displacement.X, 0.0001);
+            Assert.AreEqual(-0.0006522, node3Displacement.Z, 0.0001);
+            Assert.AreEqual(0.0006, node3Displacement.YY, 0.0001);
+
+            Assert.AreEqual(-9000, node1Reaction.X, 500);
+            Assert.AreEqual(-5000, node1Reaction.Z, 500);
+            Assert.AreEqual(-30022, node1Reaction.YY, 500);
+
+            Console.WriteLine(node4Reaction);
+            Assert.AreEqual(-6000, node4Reaction.X, 500);
+            Assert.AreEqual(5000, node4Reaction.Z, 500);
+            Assert.AreEqual(-22586, node4Reaction.YY, 500);
+        }
     }
 }


Made Bounds an extension of IShipconstruct.

--- Extensions.cs
+++ Extensions.cs
@@ -764,12 +764,12 @@
 			construct.Clear();
 		}

-		public static Bounds Bounds(this Vessel vessel, Transform refT)
+        public static Bounds Bounds(this IShipconstruct vessel, Transform refT)
 		{
 			//update physical bounds
 			var b = new Bounds();
 			bool inited = false;
-			var parts = vessel.parts;
+			var parts = vessel.Parts;
 			for(int i = 0, partsCount = parts.Count; i < partsCount; i++)
 			{
 				Part p = parts[i];


Removed unused file

Removed unused file

--- WFS210.UI/ScopeDataView.cs
+++ WFS210.UI/ScopeDataView.cs
@@ -1,39 +0,0 @@
-using System;
-using MonoTouch.UIKit;
-using System.Drawing;
-using MonoTouch.CoreGraphics;
-
-namespace WFS210.UI
-{
-	public class ScopeDataView : UIView
-	{
-		public CGPath Path {get; set;}
-		public ScopeDataView ()
-		{
-			Path = new CGPath ();
-		}
-
-		/// <summary>
-		/// Draws on the specified rect.
-		/// </summary>
-		/// <param name="rect">Rect.</param>
-		public override void Draw (RectangleF rect)
-		{
-			base.Draw (rect);
-
-			//get graphics context
-			using (CGContext g = UIGraphics.GetCurrentContext ()) {
-				//set up drawing attributes
-				g.SetLineWidth (1);
-				UIColor.Red.SetStroke ();
-
-				//add geometry to graphics context and draw it
-				g.AddPath (Path);
-				g.DrawPath (CGPathDrawingMode.Stroke);
-
-			}
-		}
-
-	}
-}
-