Gui changes

Gui changes

--- CreateCookiesSolution/CreateCookies/View/Form1.Designer.cs
+++ CreateCookiesSolution/CreateCookies/View/Form1.Designer.cs
@@ -50,11 +50,15 @@
             this.label1 = new System.Windows.Forms.Label();
             this.comboBox1 = new System.Windows.Forms.ComboBox();
             this.tabPage1 = new System.Windows.Forms.TabPage();
+            this.groupBox7 = new System.Windows.Forms.GroupBox();
+            this.button8 = new System.Windows.Forms.Button();
+            this.listBox1 = new System.Windows.Forms.ListBox();
             this.groupBox6 = new System.Windows.Forms.GroupBox();
             this.button9 = new System.Windows.Forms.Button();
             this.comboBox7 = new System.Windows.Forms.ComboBox();
             this.label23 = new System.Windows.Forms.Label();
             this.groupBox5 = new System.Windows.Forms.GroupBox();
+            this.comboBox8 = new System.Windows.Forms.ComboBox();
             this.button7 = new System.Windows.Forms.Button();
             this.button6 = new System.Windows.Forms.Button();
             this.comboBox6 = new System.Windows.Forms.ComboBox();
@@ -83,20 +87,21 @@
             this.label6 = new System.Windows.Forms.Label();
             this.label5 = new System.Windows.Forms.Label();
             this.tabControl1 = new System.Windows.Forms.TabControl();
-            this.comboBox8 = new System.Windows.Forms.ComboBox();
-            this.groupBox7 = new System.Windows.Forms.GroupBox();
-            this.listBox1 = new System.Windows.Forms.ListBox();
-            this.button8 = new System.Windows.Forms.Button();
+            this.groupBox8 = new System.Windows.Forms.GroupBox();
+            this.listBox2 = new System.Windows.Forms.ListBox();
+            this.button10 = new System.Windows.Forms.Button();
+            this.tabPage5 = new System.Windows.Forms.TabPage();
             this.tabPage2.SuspendLayout();
             this.groupBox3.SuspendLayout();
             this.groupBox2.SuspendLayout();
             this.groupBox1.SuspendLayout();
             this.tabPage1.SuspendLayout();
+            this.groupBox7.SuspendLayout();
             this.groupBox6.SuspendLayout();
             this.groupBox5.SuspendLayout();
             this.groupBox4.SuspendLayout();
             this.tabControl1.SuspendLayout();
-            this.groupBox7.SuspendLayout();
+            this.groupBox8.SuspendLayout();
             this.SuspendLayout();
             //
             // tabPage4
@@ -105,7 +110,7 @@
             this.tabPage4.Margin = new System.Windows.Forms.Padding(6);
             this.tabPage4.Name = "tabPage4";
             this.tabPage4.Padding = new System.Windows.Forms.Padding(6);
-            this.tabPage4.Size = new System.Drawing.Size(1558, 952);
+            this.tabPage4.Size = new System.Drawing.Size(1558, 1002);
             this.tabPage4.TabIndex = 3;
             this.tabPage4.Text = "Supplier";
             this.tabPage4.UseVisualStyleBackColor = true;
@@ -116,13 +121,14 @@
             this.tabPage3.Margin = new System.Windows.Forms.Padding(6);
             this.tabPage3.Name = "tabPage3";
             this.tabPage3.Padding = new System.Windows.Forms.Padding(6);
-            this.tabPage3.Size = new System.Drawing.Size(1558, 952);
+            this.tabPage3.Size = new System.Drawing.Size(1558, 1002);
             this.tabPage3.TabIndex = 2;
-            this.tabPage3.Text = "Bakery";
+            this.tabPage3.Text = "Production";
             this.tabPage3.UseVisualStyleBackColor = true;
             //
             // tabPage2
             //
+            this.tabPage2.Controls.Add(this.groupBox8);
             this.tabPage2.Controls.Add(this.groupBox3);
             this.tabPage2.Controls.Add(this.groupBox2);
             this.tabPage2.Controls.Add(this.groupBox1);
@@ -132,7 +138,7 @@
             this.tabPage2.Padding = new System.Windows.Forms.Padding(6);
             this.tabPage2.Size = new System.Drawing.Size(1558, 1002);
             this.tabPage2.TabIndex = 1;
-            this.tabPage2.Text = "Shop";
+            this.tabPage2.Text = "Order";
             this.tabPage2.UseVisualStyleBackColor = true;
             //
             // groupBox3
@@ -140,16 +146,16 @@
             this.groupBox3.Controls.Add(this.button4);
             this.groupBox3.Controls.Add(this.comboBox4);
             this.groupBox3.Controls.Add(this.label11);
-            this.groupBox3.Location = new System.Drawing.Point(659, 479);
+            this.groupBox3.Location = new System.Drawing.Point(641, 819);
             this.groupBox3.Name = "groupBox3";
-            this.groupBox3.Size = new System.Drawing.Size(879, 450);
+            this.groupBox3.Size = new System.Drawing.Size(897, 140);
             this.groupBox3.TabIndex = 5;
             this.groupBox3.TabStop = false;
             this.groupBox3.Text = "Delete Order";
             //
             // button4
             //
-            this.button4.Location = new System.Drawing.Point(234, 133);
+            this.button4.Location = new System.Drawing.Point(234, 83);
             this.button4.Name = "button4";
             this.button4.Size = new System.Drawing.Size(610, 44);
             this.button4.TabIndex = 3;
@@ -159,7 +165,7 @@
             // comboBox4
             //
             this.comboBox4.FormattingEnabled = true;
-            this.comboBox4.Location = new System.Drawing.Point(234, 62);
+            this.comboBox4.Location = new System.Drawing.Point(234, 30);
             this.comboBox4.Name = "comboBox4";
             this.comboBox4.Size = new System.Drawing.Size(610, 33);
             this.comboBox4.TabIndex = 2;
@@ -167,7 +173,7 @@
             // label11
             //
             this.label11.AutoSize = true;
-            this.label11.Location = new System.Drawing.Point(66, 65);
+            this.label11.Location = new System.Drawing.Point(66, 33);
             this.label11.Name = "label11";
             this.label11.Size = new System.Drawing.Size(146, 25);
             this.label11.TabIndex = 0;
@@ -181,7 +187,7 @@
             this.groupBox2.Margin = new System.Windows.Forms.Padding(6);
             this.groupBox2.Name = "groupBox2";
             this.groupBox2.Padding = new System.Windows.Forms.Padding(6);
-            this.groupBox2.Size = new System.Drawing.Size(1532, 417);
+            this.groupBox2.Size = new System.Drawing.Size(1532, 365);
             this.groupBox2.TabIndex = 4;
             this.groupBox2.TabStop = false;
             this.groupBox2.Text = "Order control";
@@ -197,11 +203,11 @@
             this.tableLayoutPanel1.Location = new System.Drawing.Point(12, 138);
             this.tableLayoutPanel1.Name = "tableLayoutPanel1";
             this.tableLayoutPanel1.RowCount = 4;
-            this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 50F));
-            this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 50F));
-            this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 60F));
-            this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 56F));
-            this.tableLayoutPanel1.Size = new System.Drawing.Size(1511, 244);
+            this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 44.15585F));
+            this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 55.84415F));
+            this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 52F));
+            this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 48F));
+            this.tableLayoutPanel1.Size = new System.Drawing.Size(1511, 200);
             this.tableLayoutPanel1.TabIndex = 5;
             //
             // button3
@@ -210,7 +216,7 @@
             this.button3.Name = "button3";
             this.button3.Size = new System.Drawing.Size(179, 47);
             this.button3.TabIndex = 4;
-            this.button3.Text = "Search Orders";
+            this.button3.Text = "See All Orders";
             this.button3.UseVisualStyleBackColor = true;
             //
             // groupBox1
@@ -225,18 +231,18 @@
             this.groupBox1.Controls.Add(this.label2);
             this.groupBox1.Controls.Add(this.label1);
             this.groupBox1.Controls.Add(this.comboBox1);
-            this.groupBox1.Location = new System.Drawing.Point(12, 479);
+            this.groupBox1.Location = new System.Drawing.Point(12, 427);
             this.groupBox1.Margin = new System.Windows.Forms.Padding(6);
             this.groupBox1.Name = "groupBox1";
             this.groupBox1.Padding = new System.Windows.Forms.Padding(6);
-            this.groupBox1.Size = new System.Drawing.Size(602, 450);
+            this.groupBox1.Size = new System.Drawing.Size(602, 532);
             this.groupBox1.TabIndex = 2;
             this.groupBox1.TabStop = false;
             this.groupBox1.Text = "Add Order";
             //
             // button2
             //
-            this.button2.Location = new System.Drawing.Point(18, 392);
+            this.button2.Location = new System.Drawing.Point(17, 415);
             this.button2.Margin = new System.Windows.Forms.Padding(6);
             this.button2.Name = "button2";
             this.button2.Size = new System.Drawing.Size(562, 44);
@@ -247,7 +253,7 @@
             // comboBox3
             //
             this.comboBox3.FormattingEnabled = true;
-            this.comboBox3.Location = new System.Drawing.Point(184, 177);
+            this.comboBox3.Location = new System.Drawing.Point(183, 200);
             this.comboBox3.Margin = new System.Windows.Forms.Padding(6);
             this.comboBox3.Name = "comboBox3";
             this.comboBox3.Size = new System.Drawing.Size(386, 33);
@@ -256,7 +262,7 @@
             // label4
             //
             this.label4.AutoSize = true;
-            this.label4.Location = new System.Drawing.Point(12, 177);
+            this.label4.Location = new System.Drawing.Point(11, 200);
             this.label4.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
             this.label4.Name = "label4";
             this.label4.Size = new System.Drawing.Size(158, 25);
@@ -265,7 +271,7 @@
             //
             // button1
             //
-            this.button1.Location = new System.Drawing.Point(182, 112);
+            this.button1.Location = new System.Drawing.Point(178, 124);
             this.button1.Margin = new System.Windows.Forms.Padding(6);
             this.button1.Name = "button1";
             this.button1.Size = new System.Drawing.Size(392, 44);
@@ -275,7 +281,7 @@
             //
             // dateTimePicker1
             //
-            this.dateTimePicker1.Location = new System.Drawing.Point(182, 256);
+            this.dateTimePicker1.Location = new System.Drawing.Point(181, 279);
             this.dateTimePicker1.Margin = new System.Windows.Forms.Padding(6);
             this.dateTimePicker1.Name = "dateTimePicker1";
             this.dateTimePicker1.Size = new System.Drawing.Size(388, 31);
@@ -284,7 +290,7 @@
             // comboBox2
             //
             this.comboBox2.FormattingEnabled = true;
-            this.comboBox2.Location = new System.Drawing.Point(182, 321);
+            this.comboBox2.Location = new System.Drawing.Point(181, 344);
             this.comboBox2.Margin = new System.Windows.Forms.Padding(6);
             this.comboBox2.Name = "comboBox2";
             this.comboBox2.Size = new System.Drawing.Size(388, 33);
@@ -293,7 +299,7 @@
             // label3
             //
             this.label3.AutoSize = true;
-            this.label3.Location = new System.Drawing.Point(12, 321);
+            this.label3.Location = new System.Drawing.Point(11, 344);
             this.label3.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
             this.label3.Name = "label3";
             this.label3.Size = new System.Drawing.Size(104, 25);
@@ -303,7 +309,7 @@
             // label2
             //
             this.label2.AutoSize = true;
-            this.label2.Location = new System.Drawing.Point(12, 256);
+            this.label2.Location = new System.Drawing.Point(11, 279);
             this.label2.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
             this.label2.Name = "label2";
             this.label2.Size = new System.Drawing.Size(108, 25);
@@ -343,6 +349,35 @@
             this.tabPage1.TabIndex = 0;
             this.tabPage1.Text = "Customer";
             this.tabPage1.UseVisualStyleBackColor = true;
+            //
+            // groupBox7
+            //
+            this.groupBox7.Controls.Add(this.button8);
+            this.groupBox7.Controls.Add(this.listBox1);
+            this.groupBox7.Location = new System.Drawing.Point(33, 587);
+            this.groupBox7.Name = "groupBox7";
+            this.groupBox7.Size = new System.Drawing.Size(1499, 406);
+            this.groupBox7.TabIndex = 16;
+            this.groupBox7.TabStop = false;
+            this.groupBox7.Text = "Customers All Orders";
+            //
+            // button8
+            //
+            this.button8.Location = new System.Drawing.Point(21, 310);
+            this.button8.Name = "button8";
+            this.button8.Size = new System.Drawing.Size(269, 44);
+            this.button8.TabIndex = 1;
+            this.button8.Text = "Show Orders";
+            this.button8.UseVisualStyleBackColor = true;
+            //
+            // listBox1
+            //
+            this.listBox1.FormattingEnabled = true;
+            this.listBox1.ItemHeight = 25;
+            this.listBox1.Location = new System.Drawing.Point(21, 50);
+            this.listBox1.Name = "listBox1";
+            this.listBox1.Size = new System.Drawing.Size(1461, 254);
+            this.listBox1.TabIndex = 0;
             //
             // groupBox6
             //
@@ -405,6 +440,14 @@
             this.groupBox5.TabStop = false;
             this.groupBox5.Text = "Search/Update Customer";
             //
+            // comboBox8
+            //
+            this.comboBox8.FormattingEnabled = true;
+            this.comboBox8.Location = new System.Drawing.Point(226, 369);
+            this.comboBox8.Name = "comboBox8";
+            this.comboBox8.Size = new System.Drawing.Size(249, 33);
+            this.comboBox8.TabIndex = 13;
+            //
             // button7
             //
             this.button7.Location = new System.Drawing.Point(21, 472);
@@ -647,6 +690,7 @@
             this.tabControl1.Controls.Add(this.tabPage2);
             this.tabControl1.Controls.Add(this.tabPage3);
             this.tabControl1.Controls.Add(this.tabPage4);
+            this.tabControl1.Controls.Add(this.tabPage5);
             this.tabControl1.Location = new System.Drawing.Point(50, 23);
             this.tabControl1.Margin = new System.Windows.Forms.Padding(6);
             this.tabControl1.Name = "tabControl1";
@@ -654,42 +698,44 @@
             this.tabControl1.Size = new System.Drawing.Size(1566, 1040);
             this.tabControl1.TabIndex = 0;
             //
-            // comboBox8
-            //
-            this.comboBox8.FormattingEnabled = true;
-            this.comboBox8.Location = new System.Drawing.Point(226, 369);
-            this.comboBox8.Name = "comboBox8";
-            this.comboBox8.Size = new System.Drawing.Size(249, 33);
-            this.comboBox8.TabIndex = 13;
-            //
-            // groupBox7
-            //
-            this.groupBox7.Controls.Add(this.button8);
-            this.groupBox7.Controls.Add(this.listBox1);
-            this.groupBox7.Location = new System.Drawing.Point(33, 587);
-            this.groupBox7.Name = "groupBox7";
-            this.groupBox7.Size = new System.Drawing.Size(1499, 406);
-            this.groupBox7.TabIndex = 16;
-            this.groupBox7.TabStop = false;
-            this.groupBox7.Text = "Customers All Orders";
-            //
-            // listBox1
-            //
-            this.listBox1.FormattingEnabled = true;
-            this.listBox1.ItemHeight = 25;
-            this.listBox1.Location = new System.Drawing.Point(21, 50);
-            this.listBox1.Name = "listBox1";
-            this.listBox1.Size = new System.Drawing.Size(1461, 254);
-            this.listBox1.TabIndex = 0;
-            //
-            // button8
-            //
-            this.button8.Location = new System.Drawing.Point(21, 310);
-            this.button8.Name = "button8";
-            this.button8.Size = new System.Drawing.Size(269, 44);
-            this.button8.TabIndex = 1;
-            this.button8.Text = "Show Orders";
-            this.button8.UseVisualStyleBackColor = true;
+            // groupBox8
+            //
+            this.groupBox8.Controls.Add(this.button10);
+            this.groupBox8.Controls.Add(this.listBox2);
+            this.groupBox8.Location = new System.Drawing.Point(643, 442);
+            this.groupBox8.Name = "groupBox8";
+            this.groupBox8.Size = new System.Drawing.Size(894, 377);
+            this.groupBox8.TabIndex = 6;
+            this.groupBox8.TabStop = false;
+            this.groupBox8.Text = "Order Information";
+            //
+            // listBox2
+            //
+            this.listBox2.FormattingEnabled = true;
+            this.listBox2.ItemHeight = 25;
+            this.listBox2.Location = new System.Drawing.Point(14, 30);
+            this.listBox2.Name = "listBox2";
+            this.listBox2.Size = new System.Drawing.Size(871, 254);
+            this.listBox2.TabIndex = 0;
+            //
+            // button10
+            //
+            this.button10.Location = new System.Drawing.Point(14, 306);
+            this.button10.Name = "button10";
+            this.button10.Size = new System.Drawing.Size(357, 43);
+            this.button10.TabIndex = 1;
+            this.button10.Text = "Show chosen order information";
+            this.button10.UseVisualStyleBackColor = true;
+            //
+            // tabPage5
+            //
+            this.tabPage5.Location = new System.Drawing.Point(4, 34);
+            this.tabPage5.Name = "tabPage5";
+            this.tabPage5.Padding = new System.Windows.Forms.Padding(3);
+            this.tabPage5.Size = new System.Drawing.Size(1558, 1002);
+            this.tabPage5.TabIndex = 4;
+            this.tabPage5.Text = "Delivery";
+            this.tabPage5.UseVisualStyleBackColor = true;
             //
             // Form1
             //
@@ -707,6 +753,7 @@
             this.groupBox1.ResumeLayout(false);
             this.groupBox1.PerformLayout();
             this.tabPage1.ResumeLayout(false);
+            this.groupBox7.ResumeLayout(false);
             this.groupBox6.ResumeLayout(false);
             this.groupBox6.PerformLayout();
             this.groupBox5.ResumeLayout(false);
@@ -714,7 +761,7 @@
             this.groupBox4.ResumeLayout(false);
             this.groupBox4.PerformLayout();
             this.tabControl1.ResumeLayout(false);
-            this.groupBox7.ResumeLayout(false);
+            this.groupBox8.ResumeLayout(false);
             this.ResumeLayout(false);

         }
@@ -780,6 +827,10 @@
         private System.Windows.Forms.GroupBox groupBox7;
         private System.Windows.Forms.Button button8;
         private System.Windows.Forms.ListBox listBox1;
+        private System.Windows.Forms.GroupBox groupBox8;
+        private System.Windows.Forms.Button button10;
+        private System.Windows.Forms.ListBox listBox2;
+        private System.Windows.Forms.TabPage tabPage5;
     }
 }


blacky animaiton completed

blacky animaiton completed

--- Documents/Unity3D/Catcheep/Assets/Scripts/SheepMovement.cs
+++ Documents/Unity3D/Catcheep/Assets/Scripts/SheepMovement.cs
@@ -28,7 +28,7 @@
         //jst to use the same script for other objects that dnt need it really
         if (SheepDestroyer == null) SheepDestroyer = new sheepDestroyer();

-        if (tag == "blacky") StartCoroutine(suddenChangeInDirection());
+        //if (tag == "blacky") StartCoroutine(suddenChangeInDirection());
     }

@@ -46,7 +46,6 @@
                         break;
                     case "blacky":
                         destination = new Vector2(slideSpeed, -1f);
-                        GetComponent<Animator>().SetInteger("slideSpeedAnimation", (int)slideSpeed);
                         zigZagMovement(destination);
                         break;
                 }
@@ -92,12 +91,16 @@
         {
             slideSpeed = -1;
             this.destination = new Vector2(slideSpeed, -1f);
+            GetComponent<Animator>().SetInteger("slideSpeedAnimation", (int)slideSpeed);
         }
         if (transform.position.x <= -edgeOfScreen.x + sheepWidth)
         {
             slideSpeed = 1;
             this.destination = new Vector2(slideSpeed, -1f);
+            GetComponent<Animator>().SetInteger("slideSpeedAnimation", (int)slideSpeed);
         }
+
+
     }

     IEnumerator suddenChangeInDirection()
@@ -106,6 +109,9 @@
         {
             yield return new WaitForSeconds(Random.Range(0.8f, 1.6f));
             slideSpeed = Random.Range(-1, 2);
+
+            int holder = GetComponent<Animator>().GetInteger("slideSpeedAnimation");
+            if (holder != (int)slideSpeed) GetComponent<Animator>().SetInteger("slideSpeedAnimation", (int)slideSpeed);
         }
     }


renamed.

renamed.

--- Jasily.Core.Linq/Linq/EnumerableExtensions.cs
+++ Jasily.Core.Linq/Linq/EnumerableExtensions.cs
@@ -124,21 +124,21 @@

         #region split

-        public static IEnumerable<IEnumerable<TSource>> Split<TSource>([NotNull] this IEnumerable<TSource> source, int chunkSize)
+        public static IEnumerable<IEnumerable<TSource>> SplitChunks<TSource>([NotNull] this IEnumerable<TSource> source, int chunkSize)
         {
             if (source == null) throw new ArgumentNullException(nameof(source));
             if (chunkSize < 1) throw new ArgumentOutOfRangeException(nameof(chunkSize), chunkSize, "must > 0.");

             if (chunkSize == 1)
             {
-                foreach (var item in source) yield return item.IntoArray();
+                foreach (var item in source) yield return new[] { item };
             }
             else // chunkSize > 1
             {
                 var count = chunkSize - 1; // > 0
                 using (var itor = source.GetEnumerator())
                 {
-                    if (itor.MoveNext()) yield return itor.Current.IntoArray().Concat(itor.Take(count));
+                    if (itor.MoveNext()) yield return new[] { itor.Current }.Concat(itor.Take(count));
                 }
             }
         }


Default Versions Tested

Default Versions Tested

--- King.Azure.Imaging.Unit.Test/VersionsTests.cs
+++ King.Azure.Imaging.Unit.Test/VersionsTests.cs
@@ -28,5 +28,35 @@
             Assert.IsNotNull(v.Images["medium"]);
             Assert.IsNotNull(v.Images["large"]);
         }
+
+        [Test]
+        public void Thumb()
+        {
+            var v = new Versions();
+            var version = v.Images["thumb"];
+            Assert.AreEqual(100, version.Width);
+            Assert.AreEqual(0, version.Height);
+            Assert.AreEqual(50, version.Format.Quality);
+        }
+
+        [Test]
+        public void Medium()
+        {
+            var v = new Versions();
+            var version = v.Images["medium"];
+            Assert.AreEqual(640, version.Width);
+            Assert.AreEqual(0, version.Height);
+            Assert.AreEqual(70, version.Format.Quality);
+        }
+
+        [Test]
+        public void Large()
+        {
+            var v = new Versions();
+            var version = v.Images["large"];
+            Assert.AreEqual(1080, version.Width);
+            Assert.AreEqual(0, version.Height);
+            Assert.AreEqual(85, version.Format.Quality);
+        }
     }
 }


Console file listing typo "Modifed" > "Modified"

--- Kudu.Services.Web/DebugConsole/Default.cshtml
+++ Kudu.Services.Web/DebugConsole/Default.cshtml
@@ -50,7 +50,7 @@

                             Name
-                            Modifed
+                            Modified
                             Size


Create generate method to generate a TTree file, and consolidate the others to use it.

--- LINQToTTree/LINQToTTreeLib.Tests/TestUtils.cs
+++ LINQToTTree/LINQToTTreeLib.Tests/TestUtils.cs
@@ -248,15 +248,14 @@
         /// </summary>
         /// <param name="numberOfIter"></param>
         /// <returns></returns>
-        public static FileInfo CreateFileOfVectorInt(int numberOfIter, int vectorsize = 10)
-        {
-            string filename = "vectorintonly_" + numberOfIter.ToString() + ".root";
+        public static FileInfo CreateFileOf(string filename, Func<ROOTNET.NTTree> maker)
+        {
             FileInfo result = new FileInfo(filename);
             if (result.Exists)
                 return result;

             var f = new ROOTNET.NTFile(filename, "RECREATE");
-            var tree = TTreeParserCPPTests.CreateTrees.CreateTreeWithSimpleSingleVector(numberOfIter, vectorsize);
+            var tree = maker();
             f.Write();
             f.Close();
             result.Refresh();
@@ -268,19 +267,21 @@
         /// </summary>
         /// <param name="numberOfIter"></param>
         /// <returns></returns>
+        public static FileInfo CreateFileOfVectorInt(int numberOfIter, int vectorsize = 10)
+        {
+            string filename = "vectorintonly_" + numberOfIter.ToString() + ".root";
+            return CreateFileOf(filename, () => TTreeParserCPPTests.CreateTrees.CreateTreeWithSimpleSingleVector(numberOfIter, vectorsize));
+        }
+
+        /// <summary>
+        /// Create an output int file... unique so we don't have to regenerate...
+        /// </summary>
+        /// <param name="numberOfIter"></param>
+        /// <returns></returns>
         public static FileInfo CreateFileOfIndexedInt(int numberOfIter)
         {
             string filename = "FileOfIndexedInt" + numberOfIter.ToString() + ".root";
-            FileInfo result = new FileInfo(filename);
-            if (result.Exists)
-                return result;
-
-            var f = new ROOTNET.NTFile(filename, "RECREATE");
-            TTreeParserCPPTests.CreateTrees.CreateTreeWithIndexedSimpleVector(numberOfIter);
-            f.Write();
-            f.Close();
-            result.Refresh();
-            return result;
+            return CreateFileOf(filename, () => TTreeParserCPPTests.CreateTrees.CreateTreeWithIndexedSimpleVector(numberOfIter));
         }

         /// <summary>
@@ -291,16 +292,7 @@
         public static FileInfo CreateFileOfInt(int numberOfIter)
         {
             string filename = "intonly_" + numberOfIter.ToString() + ".root";
-            FileInfo result = new FileInfo(filename);
-            if (result.Exists)
-                return result;
-
-            var f = new ROOTNET.NTFile(filename, "RECREATE");
-            var tree = TTreeParserCPPTests.CreateTrees.CreateOneIntTree(numberOfIter);
-            f.Write();
-            f.Close();
-            result.Refresh();
-            return result;
+            return CreateFileOf(filename, () => TTreeParserCPPTests.CreateTrees.CreateOneIntTree(numberOfIter));
         }

         /// <summary>


DP with array and everything - same runtime

--- LeetCode/remote/unique_binary_search_trees.cs
+++ LeetCode/remote/unique_binary_search_trees.cs
@@ -27,6 +27,28 @@
         return NumTree(n, cache);
     }

+    //
+    // Submission Details
+    // 19 / 19 test cases passed.
+    //  Status: Accepted
+    //  Runtime: 56 ms
+    //
+    //      Submitted: 0 minutes ago
+    public int NumTreees(int n)
+    {
+        var dp = new int[n + 2];
+        dp[0] = dp[1] = 1;
+        for (var i = 2; i <= n; i++)
+        {
+            for (var j = 0; j < i; j++)
+            {
+                dp[i] += dp[j] * dp[i - j - 1];
+            }
+        }
+
+        return dp[n];
+    }
+
     public int NumTree(int n, int[] cache)
     {
         if (cache[n] != 0)
@@ -47,5 +69,7 @@
         var c = new Solution();
         Console.WriteLine(c.NumTrees(3));
         Console.WriteLine(c.NumTrees(19));
+        Console.WriteLine(c.NumTreees(3));
+        Console.WriteLine(c.NumTreees(19));
     }
 }


- Cleaned up implementation of SecurityEventListenerScanner.

--- FluentSecurity/Diagnostics/SecurityEventListenerScanner.cs
+++ FluentSecurity/Diagnostics/SecurityEventListenerScanner.cs
@@ -21,22 +21,24 @@

 		public IEnumerable<Type> Scan(IEnumerable<Assembly> assemblies)
 		{
-			return assemblies.SelectMany(a =>
+			return assemblies.SelectMany(GetTypesFromAssembly).Where(TypeIsExternalListener).ToList();
+		}
+
+		private IEnumerable<Type> GetTypesFromAssembly(Assembly assembly)
+		{
+			try
 			{
-				try
-				{
-					return _assemblyTypeProvider.Invoke(a);
-				}
-				catch (TypeLoadException exception)
-				{
-					Publish.ConfigurationEvent(() => exception.Message);
+				return _assemblyTypeProvider.Invoke(assembly);
+			}
+			catch (TypeLoadException exception)
+			{
+				Publish.ConfigurationEvent(() => exception.Message);

-					if (!_ignoreTypeLoadExceptions)
-						throw;
+				if (!_ignoreTypeLoadExceptions)
+					throw;

-					return new Type[0];
-				}
-			}).Where(TypeIsExternalListener).ToList();
+				return new Type[0];
+			}
 		}

 		private static bool TypeIsExternalListener(Type type)


Added umlaut to test string.

Added umlaut to test string.

--- GraphicsMagick.NET.Tests/Profiles/Iptc/IptcProfileTests.cs
+++ GraphicsMagick.NET.Tests/Profiles/Iptc/IptcProfileTests.cs
@@ -91,10 +91,10 @@
 					value = profile.Values.FirstOrDefault(val => val.Tag == IptcTag.ReferenceNumber);
 					Assert.IsNull(value);

-					profile.SetValue(IptcTag.ReferenceNumber, "Magick.NET ReferenceNumber");
+					profile.SetValue(IptcTag.ReferenceNumber, "Magick.NET ReferenceNümber");

 					value = profile.GetValue(IptcTag.ReferenceNumber);
-					TestValue(value, "Magick.NET ReferenceNumber");
+					TestValue(value, "Magick.NET ReferenceNümber");

 					// Remove the 8bim profile so we can overwrite the iptc profile.
 					image.RemoveProfile("8bim");
@@ -113,7 +113,7 @@
 					TestValue(value, "Magick.NET Title");

 					value = profile.GetValue(IptcTag.ReferenceNumber);
-					TestValue(value, "Magick.NET ReferenceNumber");
+					TestValue(value, "Magick.NET ReferenceNümber");

 					ExceptionAssert.Throws<ArgumentNullException>(delegate()
 					{


Needs a null check just like the single QueryAsync. InfluxDB will just return an empty json object "{}" for series that fail to return data.

--- InfluxData.Net.InfluxDb/ClientModules/BasicClientModule.cs
+++ InfluxData.Net.InfluxDb/ClientModules/BasicClientModule.cs
@@ -82,7 +82,8 @@
                     throw new InfluxDbApiException(HttpStatusCode.BadRequest, result.Error);
                 }

-                series.AddRange(result.Series);
+                // multi-queries can have results that are empty (just like handled in single QueryAsync)
+                series.AddRange(result.Series ?? new Serie[0]);
             }

             return series;


...solutionFive

...solutionFive

--- ListsExercises/05.ArrayManipulator/StartUp.cs
+++ ListsExercises/05.ArrayManipulator/StartUp.cs
@@ -17,8 +17,7 @@
             {
                 var commandArgs = command
                     .Split(new char[] { ' ' }, StringSplitOptions.RemoveEmptyEntries)
-                    .Select(int.Parse)
-                    .ToList();
+                    .ToArray();
                 if (commandArgs[0] == "add")
                 {
                     numbers.Insert(int.Parse(commandArgs[1]), int.Parse(commandArgs[2]));
@@ -26,7 +25,35 @@
                 }
                 else if (commandArgs[0] == "addMany")
                 {
-
+                    numbers.InsertRange(int.Parse(commandArgs[1]), commandArgs.Skip(2).Select(int.Parse).ToArray());
+                }
+                else if (commandArgs[0] == "contains")
+                {
+                    int number = int.Parse(commandArgs[1]);
+                    Console.WriteLine(numbers.IndexOf(number));
+                }
+                else if (commandArgs[0] == "remove")
+                {
+                    numbers.RemoveAt(int.Parse(commandArgs[1]));
+                }
+                else if (commandArgs[0] == "shift")
+                {
+                    int number = int.Parse(commandArgs[1]);
+                    number = number % numbers.Count;
+                    for (int i = 0; i < number; i++)
+                    {
+                        numbers.Add(numbers[0]);
+                        numbers.RemoveAt(0);
+                    }
+                }
+                else if (commandArgs[0] == "sumPairs")
+                {
+                    for (int i = 0; i < numbers.Count -1; i++)
+                    {
+                        var sum = numbers[i] + numbers[i] + 1;
+                        numbers[i] = sum;
+                        numbers.RemoveAt(i + 1);
+                    }
                 }
                 command = Console.ReadLine();
             }


Revised locking.

Revised locking.

--- Microsoft.Web.Administration/ServerManager.cs
+++ Microsoft.Web.Administration/ServerManager.cs
@@ -87,13 +87,13 @@

         private void Initialize()
         {
+            if (Initialized)
+            {
+                return;
+            }
+
             lock (locker)
             {
-                if (Initialized)
-                {
-                    return;
-                }
-
                 Initialized = true;
                 PreInitialize();
                 var machineConfig = Helper.IsRunningOnMono()
@@ -237,7 +237,10 @@
                 }

                 Initialize();
-                return _applicationDefaults;
+                lock (locker)
+                {
+                    return _applicationDefaults;
+                }
             }
         }

@@ -251,7 +254,10 @@
                 }

                 Initialize();
-                return _applicationPoolDefaults;
+                lock (locker)
+                {
+                    return _applicationPoolDefaults;
+                }
             }
         }

@@ -265,7 +271,10 @@
                 }

                 Initialize();
-                return ApplicationPoolCollection;
+                lock (locker)
+                {
+                    return ApplicationPoolCollection;
+                }
             }
         }

@@ -279,7 +288,10 @@
                 }

                 Initialize();
-                return _siteDefaults;
+                lock (locker)
+                {
+                    return _siteDefaults;
+                }
             }
         }

@@ -293,7 +305,10 @@
                 }

                 Initialize();
-                return SiteCollection;
+                lock (locker)
+                {
+                    return SiteCollection;
+                }
             }
         }

@@ -307,7 +322,10 @@
                 }

                 Initialize();
-                return _virtualDirectoryDefaults;
+                lock (locker)
+                {
+                    return _virtualDirectoryDefaults;
+                }
             }
         }

@@ -316,7 +334,10 @@
             get
             {
                 Initialize();
-                return _workerProcessCollection;
+                lock (locker)
+                {
+                    return _workerProcessCollection;
+                }
             }
         }

@@ -355,13 +376,19 @@
         public Configuration GetApplicationHostConfiguration()
         {
             Initialize();
-            return _applicationHost;
+            lock (locker)
+            {
+                return _applicationHost;
+            }
         }

         internal Configuration GetConfigurationCache()
         {
             Initialize();
-            return _cleanHost;
+            lock (locker)
+            {
+                return _cleanHost;
+            }
         }

         public object GetMetadata(string metadataType)


Fixed up broken test (was never working, was waiting until we got the rest of the stuff going).

--- LINQToTTree/LINQToTTreeLib.Tests/TTreeQueryExecutorTest.cs
+++ LINQToTTree/LINQToTTreeLib.Tests/TTreeQueryExecutorTest.cs
@@ -362,6 +362,13 @@
             var query = DummyQueryExectuor.LastQueryModel;

             ///
+            /// Generate a proxy .h file that we can use
+            ///
+
+            var proxyFile = GenerateROOTProxy(rootFile, "dude");
+            ntuple._gProxyFile = proxyFile.FullName;
+
+            ///
             /// Ok, now we can actually see if we can make it "go".
             ///


hehe must have forgotten about this..

hehe must have forgotten about this..

--- Manager/Manager/SqlAzureTransientErrorDetectionStrategy.cs
+++ Manager/Manager/SqlAzureTransientErrorDetectionStrategy.cs
@@ -15,7 +15,7 @@
 		// Added error codes 10928 and 10929 from SQL Database as transient errors (see http://blogs.msdn.com/b/psssql/archive/2012/10/31/worker-thread-governance-coming-to-azure-sql-database.aspx).
 		// Added error codes 4060, 40197, 40501, 40613 from MSDN documentation (see https://azure.microsoft.com/en-us/documentation/articles/sql-database-develop-error-messages/)

-		private readonly int[] _errorNumbers = {40540, 10928, 10929, 4060, 40197, 40501, 40613};
+		private readonly int[] _errorNumbers = {40540, 10928, 10929, 4060, 40197, 40501, 40613, 258, 121};

 		public virtual bool IsTransient(Exception ex)
 		{


Refactor scene presence list for lockless iteration. Lock contention will now only be for simultaneous add/removes of scene presences from the scene.

--- OpenSim/Region/Framework/Scenes/SceneGraph.cs
+++ OpenSim/Region/Framework/Scenes/SceneGraph.cs
@@ -68,11 +68,9 @@

         #region Fields

-        protected Dictionary<UUID, ScenePresence> m_scenePresences = new Dictionary<UUID, ScenePresence>();
-        protected ScenePresence[] m_scenePresenceArray = new ScenePresence[0];
-        protected List<ScenePresence> m_scenePresenceList = new List<ScenePresence>();
-
         protected OpenMetaverse.ReaderWriterLockSlim m_scenePresencesLock = new OpenMetaverse.ReaderWriterLockSlim();
+        protected Dictionary<UUID, ScenePresence> m_scenePresenceMap = new Dictionary<UUID, ScenePresence>();
+        protected List<ScenePresence> m_scenePresenceArray = new List<ScenePresence>();

         // SceneObjects is not currently populated or used.
         //public Dictionary<UUID, SceneObjectGroup> SceneObjects;
@@ -138,9 +136,10 @@
             m_scenePresencesLock.EnterWriteLock();
             try
             {
-                m_scenePresences.Clear();
-                m_scenePresenceArray = new ScenePresence[0];
-                m_scenePresenceList = new List<ScenePresence>();
+                Dictionary<UUID, ScenePresence> newmap = new Dictionary<UUID, ScenePresence>();
+                List<ScenePresence> newlist = new List<ScenePresence>();
+                m_scenePresenceMap = newmap;
+                m_scenePresenceArray = newlist;
             }
             finally
             {
@@ -554,34 +553,27 @@
             m_scenePresencesLock.EnterWriteLock();
             try
             {
-                if (!m_scenePresences.ContainsKey(presence.UUID))
-                {
-                    m_scenePresences.Add(presence.UUID, presence);
-
-                    // Create a new array of ScenePresence references
-                    int oldLength = m_scenePresenceArray.Length;
-                    ScenePresence[] newArray = new ScenePresence[oldLength + 1];
-                    Array.Copy(m_scenePresenceArray, newArray, oldLength);
-                    newArray[oldLength] = presence;
-                    m_scenePresenceArray = newArray;
-                    m_scenePresenceList = new List<ScenePresence>(m_scenePresenceArray);
+                Dictionary<UUID, ScenePresence> newmap = new Dictionary<UUID, ScenePresence>(m_scenePresenceMap);
+                List<ScenePresence> newlist = new List<ScenePresence>(m_scenePresenceArray);
+
+                if (!newmap.ContainsKey(presence.UUID))
+                {
+                    newmap.Add(presence.UUID, presence);
+                    newlist.Add(presence);
                 }
                 else
                 {
-                    m_scenePresences[presence.UUID] = presence;
-
-                    // Do a linear search through the array of ScenePresence references
-                    // and update the modified entry
-                    for (int i = 0; i < m_scenePresenceArray.Length; i++)
-                    {
-                        if (m_scenePresenceArray[i].UUID == presence.UUID)
-                        {
-                            m_scenePresenceArray[i] = presence;
-                            break;
-                        }
-                    }
-                    m_scenePresenceList = new List<ScenePresence>(m_scenePresenceArray);
-                }
+                    // Remember the old presene reference from the dictionary
+                    ScenePresence oldref = newmap[presence.UUID];
+                    // Replace the presence reference in the dictionary with the new value
+                    newmap[presence.UUID] = presence;
+                    // Find the index in the list where the old ref was stored and update the reference
+                    newlist[newlist.IndexOf(oldref)] = presence;
+                }
+
+                // Swap out the dictionary and list with new references
+                m_scenePresenceMap = newmap;
+                m_scenePresenceArray = newlist;
             }
             finally
             {
@@ -604,24 +596,19 @@
             m_scenePresencesLock.EnterWriteLock();
             try
             {
-                if (m_scenePresences.Remove(agentID))
-                {
-                    // Copy all of the elements from the previous array
-                    // into the new array except the removed element
-                    int oldLength = m_scenePresenceArray.Length;
-                    ScenePresence[] newArray = new ScenePresence[oldLength - 1];
-                    int j = 0;
-                    for (int i = 0; i < m_scenePresenceArray.Length; i++)
-                    {
-                        ScenePresence presence = m_scenePresenceArray[i];
-                        if (presence.UUID != agentID)
-                        {
-                            newArray[j] = presence;
-                            ++j;
-                        }
-                    }
-                    m_scenePresenceArray = newArray;
-                    m_scenePresenceList = new List<ScenePresence>(m_scenePresenceArray);
+                Dictionary<UUID, ScenePresence> newmap = new Dictionary<UUID, ScenePresence>(m_scenePresenceMap);
+                List<ScenePresence> newlist = new List<ScenePresence>(m_scenePresenceArray);
+
+                // Remember the old presene reference from the dictionary
+                ScenePresence oldref = newmap[agentID];
+                // Remove the presence reference from the dictionary
+                if (newmap.Remove(agentID))
+                {
+                    // Find the index in the list where the old ref was stored and remove the reference
+                    newlist.RemoveAt(newlist.IndexOf(oldref));
+                    // Swap out the dictionary and list with new references
+                    m_scenePresenceMap = newmap;
+                    m_scenePresenceArray = newlist;
                 }
                 else
                 {
@@ -744,7 +731,7 @@
         }

         /// <summary>
-        /// Request a copy of m_scenePresences in this World
+        /// Get a reference to the scene presence list. Changes to the list will be done in a copy
         /// There is no guarantee that presences will remain in the scene after the list is returned.
         /// This list should remain private to SceneGraph. Callers wishing to iterate should instead
         /// pass a delegate to ForEachScenePresence.
@@ -752,15 +739,7 @@
         /// <returns></returns>
         private List<ScenePresence> GetScenePresences()
         {
-            m_scenePresencesLock.EnterReadLock();
-            try
-            {
-                return m_scenePresenceList;
-            }
-            finally
-            {
-                m_scenePresencesLock.ExitReadLock();
-            }
+            return m_scenePresenceArray;
         }

         /// <summary>
@@ -770,17 +749,10 @@
         /// <returns>null if the presence was not found</returns>
         protected internal ScenePresence GetScenePresence(UUID agentID)
         {
-            ScenePresence sp;
-            m_scenePresencesLock.EnterReadLock();
-            try
-            {
-                m_scenePresences.TryGetValue(agentID, out sp);
-            }
-            finally
-            {
-                m_scenePresencesLock.ExitReadLock();
-            }
-            return sp;
+            Dictionary<UUID, ScenePresence> presences = m_scenePresenceMap;
+            ScenePresence presence;
+            presences.TryGetValue(agentID, out presence);
+            return presence;
         }

         /// <summary>
@@ -791,7 +763,8 @@
         /// <returns>null if the presence was not found</returns>
         protected internal ScenePresence GetScenePresence(string firstName, string lastName)
         {
-            foreach (ScenePresence presence in GetScenePresences())
+            List<ScenePresence> presences = GetScenePresences();
+            foreach (ScenePresence presence in presences)
             {
                 if (presence.Firstname == firstName && presence.Lastname == lastName)
                     return presence;
@@ -806,7 +779,8 @@
         /// <returns>null if the presence was not found</returns>
         protected internal ScenePresence GetScenePresence(uint localID)
         {
-            foreach (ScenePresence presence in GetScenePresences())
+            List<ScenePresence> presences = GetScenePresences();
+            foreach (ScenePresence presence in presences)
                 if (presence.LocalId == localID)
                     return presence;
             return null;
@@ -814,15 +788,8 @@

         protected internal bool TryGetScenePresence(UUID agentID, out ScenePresence avatar)
         {
-            m_scenePresencesLock.EnterReadLock();
-            try
-            {
-                m_scenePresences.TryGetValue(agentID, out avatar);
-            }
-            finally
-            {
-                m_scenePresencesLock.ExitReadLock();
-            }
+            Dictionary<UUID, ScenePresence> presences = m_scenePresenceMap;
+            presences.TryGetValue(agentID, out avatar);
             return (avatar != null);
         }

@@ -1099,9 +1066,9 @@
                 });
             Parallel.ForEach<ScenePresence>(GetScenePresences(), protectedAction);
             */
-            // For now, perform actiona serially
-
-            foreach (ScenePresence sp in GetScenePresences())
+            // For now, perform actions serially
+            List<ScenePresence> presences = GetScenePresences();
+            foreach (ScenePresence sp in presences)
             {
                 try
                 {


Name polishing in Parser class.

Name polishing in Parser class.

--- MathExpressionSolver/MathExpressionSolver/Parser/Parser.cs
+++ MathExpressionSolver/MathExpressionSolver/Parser/Parser.cs
@@ -7,15 +7,15 @@
 {
     class ExpressionParser
     {
-        const int avgExpressionItemLength = 4;
+        const int avgParsedItemLength = 4;
         public bool SkipInvalidChars { get; set; } = false;

         private List<string> parsedExpressions;
-        private List<ExpressionItemType> parsedTypes;
+        private List<ParsedItemType> parsedTypes;

         public string[] ParsedExpression { get { return parsedExpressions.ToArray(); } }
-        public ExpressionItemType[] ParsedTypes { get { return parsedTypes.ToArray(); } }
+        public ParsedItemType[] ParsedTypes { get { return parsedTypes.ToArray(); } }

         private string rawExpression;

@@ -24,10 +24,10 @@
             set
             {
                 parsedExpressions.Clear();
-                parsedExpressions.Capacity = rawExpression.Length / avgExpressionItemLength;
+                parsedExpressions.Capacity = rawExpression.Length / avgParsedItemLength;

                 parsedTypes.Clear();
-                parsedTypes.Capacity = rawExpression.Length / avgExpressionItemLength;
+                parsedTypes.Capacity = rawExpression.Length / avgParsedItemLength;

                 rawExpression = value;
             }
@@ -36,7 +36,7 @@
         public ExpressionParser()
         {
             parsedExpressions = new List<string>();
-            parsedTypes = new List<ExpressionItemType>();
+            parsedTypes = new List<ParsedItemType>();

             rawExpression = string.Empty;
         }
@@ -48,15 +48,15 @@

         public void ParseExpression()
         {
-            ExpressionItemType lastType = ExpressionItemType.NotSet;
+            ParsedItemType lastType = ParsedItemType.NotSet;

             parsedExpressions.Clear();
             parsedTypes.Clear();

-            StringBuilder expBuffer = new StringBuilder(avgExpressionItemLength);
+            StringBuilder expBuffer = new StringBuilder(avgParsedItemLength);
             foreach (char c in rawExpression)
             {
-                ExpressionItemType currentType = getExpItemType(c);
+                ParsedItemType currentType = getExpItemType(c);
                 if(IsCoumpnoundable(lastType) && currentType != lastType)
                 {
                     parseNewExpression(expBuffer, lastType);
@@ -69,7 +69,7 @@
                     continue;
                 }

-                if (currentType == ExpressionItemType.Invalid && SkipInvalidChars) { continue; }
+                if (currentType == ParsedItemType.Invalid && SkipInvalidChars) { continue; }
                 expBuffer.Append(c);

                 parseNewExpression(expBuffer, currentType);
@@ -80,7 +80,7 @@
                 parseNewExpression(expBuffer, lastType);
             }
         }
-        private void parseNewExpression(StringBuilder charBuffer, ExpressionItemType currentType)
+        private void parseNewExpression(StringBuilder charBuffer, ParsedItemType currentType)
         {
             string expression = (isTrashable(currentType)) ? string.Empty : charBuffer.ToString();

@@ -89,58 +89,58 @@
             charBuffer.Clear();
         }

-        private bool IsCoumpnoundable(ExpressionItemType type)
+        private bool IsCoumpnoundable(ParsedItemType type)
         {
             return (
-                    type == ExpressionItemType.Num ||
-                    type == ExpressionItemType.Name ||
-                    type == ExpressionItemType.WhiteSpace
+                    type == ParsedItemType.Num ||
+                    type == ParsedItemType.Name ||
+                    type == ParsedItemType.WhiteSpace
                  );
         }

-        private bool isTrashable(ExpressionItemType type)
-        {
-            return (type == ExpressionItemType.WhiteSpace);
-        }
-
-        private ExpressionItemType getExpItemType(char c)
+        private bool isTrashable(ParsedItemType type)
+        {
+            return (type == ParsedItemType.WhiteSpace);
+        }
+
+        private ParsedItemType getExpItemType(char c)
         {
             if (ParserHelper.IsNameChar(c))
             {
-                return ExpressionItemType.Name;
+                return ParsedItemType.Name;
             }
             else if (ParserHelper.IsNum(c))
             {
-                return ExpressionItemType.Num;
+                return ParsedItemType.Num;
             }
             else if (ParserHelper.IsWhiteSpace(c))
             {
-                return ExpressionItemType.WhiteSpace;
+                return ParsedItemType.WhiteSpace;
             }
             else if (ParserHelper.IsLeftBracket(c))
             {
-                return ExpressionItemType.LBracket;
+                return ParsedItemType.LBracket;
             }
             else if (ParserHelper.IsRightBracket(c))
             {
-                return ExpressionItemType.RBracket;
+                return ParsedItemType.RBracket;
             }
             else if (ParserHelper.IsOperator(c))
             {
-                return ExpressionItemType.Operator;
+                return ParsedItemType.Operator;
             }
             else if (ParserHelper.IsSeparator(c))
             {
-                return ExpressionItemType.Separator;
+                return ParsedItemType.Separator;
             }
             else
             {
-                return ExpressionItemType.Invalid;
+                return ParsedItemType.Invalid;
             }
         }
     }

-    public enum ExpressionItemType { Name, Num, LBracket, RBracket, Operator, Separator, WhiteSpace, Invalid, NotSet };
+    public enum ParsedItemType { Name, Num, LBracket, RBracket, Operator, Separator, WhiteSpace, Invalid, NotSet };

     public static class ParserHelper
     {


add missing prim count for stats

add missing prim count for stats

--- OpenSim/Region/Framework/Scenes/SceneGraph.cs
+++ OpenSim/Region/Framework/Scenes/SceneGraph.cs
@@ -2211,8 +2211,16 @@
                         SceneObjectGroupsByFullID[copy.UUID] = copy;

                     SceneObjectPart[] parts = copy.Parts;
+
+                    m_numTotalPrim += parts.Length;
+
                     foreach (SceneObjectPart part in parts)
                     {
+                        if (part.GetPrimType() == PrimType.SCULPT)
+                            m_numMesh++;
+                        else
+                            m_numPrim++;
+
                         lock (SceneObjectGroupsByFullPartID)
                             SceneObjectGroupsByFullPartID[part.UUID] = copy;
                         lock (SceneObjectGroupsByLocalPartID)


Really dirty hack to make sims start. Causes errors but the ting runs. Remove when fixed right.

--- OpenSim/Region/Physics/ChOdePlugin/ODEPrim.cs
+++ OpenSim/Region/Physics/ChOdePlugin/ODEPrim.cs
@@ -1810,7 +1810,11 @@
                 _size.X = 0.01f;
                 _size.Y = 0.01f;
                 _size.Z = 0.01f;
-                return false;
+                mesh.releaseSourceMeshData();
+                // Temporarily hacking this to true which causes the object
+                // to get no physical representation, effectively making it
+                // phantom
+                return true;
             }


Repro

Repro

--- OperationsWCF/OperationsWCF.Client/Program.cs
+++ OperationsWCF/OperationsWCF.Client/Program.cs
@@ -1,4 +1,5 @@
 using System;
+using OperacionesWCF;

 namespace OperationsWCF.Client
 {
@@ -13,11 +14,11 @@
             using (OperationsConnection connection =
                 new OperationsConnection(url))
             {
-                Console.WriteLine(connection.Channel.Echo("Hello."));
+                IOperations operations = connection.Channel;

-                Console.WriteLine(connection.Channel.Plus(345, 23));
-
-                Console.WriteLine(connection.Channel.Minus(433, 85));
+                Console.WriteLine(operations.Echo("Hello."));
+                Console.WriteLine(operations.Plus(345, 23));
+                Console.WriteLine(operations.Minus(433, 85));
             }
         }
     }


Change in ServerNameIndication handling

Change in ServerNameIndication handling

--- PInstaller/BuiltInBlocks/IISWebSiteBinding.cs
+++ PInstaller/BuiltInBlocks/IISWebSiteBinding.cs
@@ -74,6 +74,7 @@
                     {
                         var site = iisManager.Sites.FirstOrDefault(s => s.Name.ToLower() == binding.WebSiteName.ToLower());
                         if (site == null) continue;
+                        Binding newBinding = null;
                         if (!string.IsNullOrEmpty(binding.CertificateName))
                         {
                             var hash = GetCertificateHash(binding.CertificateName);
@@ -81,16 +82,19 @@
                             {
                                 throw new Exception(string.Format("Couldn't find certificate: {0}", binding.CertificateName));
                             }
-                            var newBinding = site.Bindings.Add(bindingInfo, hash.Item2, hash.Item1);
+                            newBinding = site.Bindings.Add(bindingInfo, hash.Item2, hash.Item1);
+                        }
+                        else
+                        {
+                            newBinding = site.Bindings.Add(bindingInfo, binding.Protocol);
+                        }
+                        if (newBinding != null)
+                        {
                             var flag = newBinding.Attributes.FirstOrDefault(a => a.Name.ToLower() == "sslflags");
                             if (flag != null && binding.ServerNameIndication)
                             {
                                 flag.Value = 1;
                             }
-                        }
-                        else
-                        {
-                            var newBinding = site.Bindings.Add(bindingInfo, binding.Protocol);
                         }
                         iisManager.CommitChanges();
                     }


Migrations API: Added deletion integration tests.

--- Octokit.Tests.Integration/Clients/MigrationsClientTests.cs
+++ Octokit.Tests.Integration/Clients/MigrationsClientTests.cs
@@ -100,4 +100,48 @@
             Assert.NotEmpty(url);
         }
     }
+
+    public class TheDeleteArchiveMethod
+    {
+        readonly IGitHubClient _gitHub;
+
+        public TheDeleteArchiveMethod()
+        {
+            _gitHub = Helper.GetAuthenticatedClient();
+        }
+
+        [IntegrationTest]
+        public async Task DeletesArchive()
+        {
+            var organization = Environment.GetEnvironmentVariable("OCTOKIT_GITHUBORGANIZATION");
+            var repos = (await _gitHub.Repository.GetAllForOrg(organization));
+            var repoNames = repos.Select(repo => repo.FullName).ToList();
+            var migrationRequest = new StartMigrationRequest(repoNames);
+            var migration = await _gitHub.Migration.Migrations.Start(organization, migrationRequest);
+
+            await _gitHub.Migration.Migrations.DeleteArchive(organization, migration.Id);
+        }
+    }
+
+    public class TheUnlockRepositoryMethod
+    {
+        readonly IGitHubClient _gitHub;
+
+        public TheUnlockRepositoryMethod()
+        {
+            _gitHub = Helper.GetAuthenticatedClient();
+        }
+
+        [IntegrationTest]
+        public async Task UnlocksRepository()
+        {
+            var organization = Environment.GetEnvironmentVariable("OCTOKIT_GITHUBORGANIZATION");
+            var repos = (await _gitHub.Repository.GetAllForOrg(organization));
+            var repoNames = repos.Select(repo => repo.FullName).ToList();
+            var migrationRequest = new StartMigrationRequest(repoNames, true);
+            var migration = await _gitHub.Migration.Migrations.Start(organization, migrationRequest);
+
+            await _gitHub.Migration.Migrations.UnlockRepository(organization, migration.Id, migration.Repositories[0].FullName);
+        }
+    }
 }


Removed wrong TODO comment

Removed wrong TODO comment

--- PART/Source/CprBroker/CPRDirect/XML/ClearWrittenAddress.cs
+++ PART/Source/CprBroker/CPRDirect/XML/ClearWrittenAddress.cs
@@ -195,7 +195,6 @@
                 StreetNameForAddressingName = this.StreetAddressingName,

                 // Set suite identifier
-                // TODO: Sometimes the suite is '  th'. Shall we set this as empty string in this case?
                 SuiteIdentifier = this.Door,
             };
             return ret;


Fix typo

Fix typo

--- PartPreviewWindow/View3D/TumbleCubeControl.cs
+++ PartPreviewWindow/View3D/TumbleCubeControl.cs
@@ -76,8 +76,8 @@

 		public override void OnDraw(Graphics2D graphics2D)
 		{
-			var screenSpcaeBounds = this.TransformToScreenSpace(LocalBounds);
-			world = new WorldView(screenSpcaeBounds.Width, screenSpcaeBounds.Height);
+			var screenSpaceBounds = this.TransformToScreenSpace(LocalBounds);
+			world = new WorldView(screenSpaceBounds.Width, screenSpaceBounds.Height);

 			var forward = -Vector3.UnitZ;
 			var directionForward = Vector3.TransformNormal(forward, interactionLayer.World.InverseModelviewMatrix);
@@ -86,7 +86,7 @@
 			var directionUp = Vector3.TransformNormal(up, interactionLayer.World.InverseModelviewMatrix);
 			world.RotationMatrix = Matrix4X4.LookAt(Vector3.Zero, directionForward, directionUp);

-			InteractionLayer.SetGlContext(world, screenSpcaeBounds, lighting);
+			InteractionLayer.SetGlContext(world, screenSpaceBounds, lighting);
 			GLHelper.Render(cube, Color.White, Matrix4X4.Identity, RenderTypes.Shaded);
 			InteractionLayer.UnsetGlContext();

@@ -121,7 +121,7 @@
 					interactionLayer.Invalidate();
 				}
 			}
-			else if(world != null
+			else if(world != null
 				&& cubeTraceData != null) // Make sure we don't use the trace data before it is ready
 			{
 				Ray ray = world.GetRayForLocalBounds(mouseEvent.Position);


A tweak on Add ability to set permissions on a directory when generating a wix file.

git-svn-id: http://code.wesay.org/Palaso/trunk/Palaso@1276 b25276a9-ce15-0410-9281-991c76e3d784

committer: hatton <3c620416bc545d8a9753d4db847e5544071ce657@b25276a9-ce15-0410-9281-991c76e3d784>

--- Palaso.MSBuildTasks/MakeWixForDirTree/MakeWixForDirTree.cs
+++ Palaso.MSBuildTasks/MakeWixForDirTree/MakeWixForDirTree.cs
@@ -162,7 +162,7 @@
 				elemFrag.AppendChild(elemDirRef);

 				// recurse through the tree add elements
-				ProcessDir(elemDirRef, Path.GetFullPath(_rootDir), "Lib");//review (jdh): what does this "lib" do and what should it really be?
+				ProcessDir(elemDirRef, Path.GetFullPath(_rootDir), DirectoryReferenceId);

 				// write out components into a group
 				XmlElement elemGroup = doc.CreateElement("ComponentGroup", XMLNS);
@@ -270,7 +270,7 @@

-		private void ProcessDir(XmlElement parent, string dirPath, string compPrefix)
+		private void ProcessDir(XmlElement parent, string dirPath, string outerDirectoryId)
 		{
 			Log.LogMessage(MessageImportance.Low, "Processing dir {0}", dirPath);

@@ -279,7 +279,7 @@

 			IdToGuidDatabase guidDatabase = IdToGuidDatabase.Create(Path.Combine(dirPath, kFileNameOfGuidDatabase), this); ;

-			SetupDirectoryPermissions(dirPath, parent, compPrefix, doc, guidDatabase);
+			SetupDirectoryPermissions(dirPath, parent, outerDirectoryId, doc, guidDatabase);

 			// Build a list of the files in this directory removing any that have been exluded
 			foreach (string f in Directory.GetFiles(dirPath))
@@ -303,7 +303,7 @@
 				string shortName = Path.GetFileName(d);
 				if (!m_exclude.ContainsKey(d.ToLower()) && shortName != ".svn" && shortName != "CVS")
 				{
-					string id = GetSafeDirectoryId(d, compPrefix);
+					string id = GetSafeDirectoryId(d, outerDirectoryId);

 					XmlElement elemDir = doc.CreateElement("Directory", XMLNS);
 					elemDir.SetAttribute("Id", id);
@@ -318,7 +318,7 @@
 			}
 		}

-		private void SetupDirectoryPermissions(string dirPath, XmlElement parent, string compPrefix, XmlDocument doc, IdToGuidDatabase guidDatabase)
+		private void SetupDirectoryPermissions(string dirPath, XmlElement parent, string parentDirectoryId, XmlDocument doc, IdToGuidDatabase guidDatabase)
 		{
 			if (_giveAllPermissions)
 			{
@@ -330,7 +330,7 @@
 						</Component>
 					 */

-				string id = GetSafeDirectoryId(dirPath, compPrefix);
+				string id = GetSafeDirectoryId(dirPath, parentDirectoryId);

 				XmlElement componentElement = doc.CreateElement("Component", XMLNS);
 				componentElement.SetAttribute("Id", id);
@@ -342,12 +342,25 @@

 				componentElement.AppendChild(createFolderElement);
 				parent.AppendChild(componentElement);
-			}
-		}
-
-		private string GetSafeDirectoryId(string directoryPath, string compPrefix)
-		{
-			string id = compPrefix + "." + Path.GetFileName(directoryPath);
+
+				m_components.Add(id);
+			}
+		}
+
+		private string GetSafeDirectoryId(string directoryPath, string parentDirectoryId)
+		{
+			string id = parentDirectoryId;
+			//bit of a hack... we don't want our id to have this prefix.dir form fo the top level,
+			//where it is going to be referenced by other wix files, that will just be expecting the id
+			//the msbuild target gave for the id of this directory
+
+			//I don't have it quite right, though. See the test file, where you get
+			// <Component Id="common.bin.bin" (the last bin is undesirable)
+
+			if (Path.GetFullPath(_rootDir) != directoryPath)
+			{
+				id+="." + Path.GetFileName(directoryPath);
+			}
 			id = Regex.Replace(id, @"[^\p{Lu}\p{Ll}\p{Nd}._]", "_");
 			return id;
 		}


this is how the other not authorized are done...

--- Purchasing.Mvc/Controllers/OrderController.cs
+++ Purchasing.Mvc/Controllers/OrderController.cs
@@ -2215,7 +2215,7 @@
             return this.RedirectToAction(a => a.SavedOrderRequests());
         }

-        public JsonNetResult GetRequesters(int id)
+        public ActionResult GetRequesters(int id)
         {
             var requesterInWorkgroup = _repositoryFactory.WorkgroupPermissionRepository
                 .Queryable.Where(x => x.Workgroup.Id == id && x.User.Id == CurrentUser.Identity.Name)
@@ -2223,7 +2223,8 @@

             if (!requesterInWorkgroup.Any())
             {
-                throw new Exception("Someone isn't a requester!!!");
+                ErrorMessage = "Not your order";
+                return this.RedirectToAction<ErrorController>(a => a.NotAuthorized());
             }


Added another RTDB test.

Added another RTDB test.

--- QDMSTest/QDMSServer/RealTimeDataBrokerTest.cs
+++ QDMSTest/QDMSServer/RealTimeDataBrokerTest.cs
@@ -96,6 +96,44 @@
         }

         [Test]
+        public void DoesNotRepeatRequestToSourceWhenARealTimeContinuousFuturesStreamAlreadyExists()
+        {
+            var inst = new Instrument
+            {
+                ID = 1,
+                Symbol = "ContinuousVIXFutures",
+                IsContinuousFuture = true,
+                Type = InstrumentType.Future,
+                Datasource = new Datasource { ID = 999, Name = "MockSource" }
+            };
+
+            var frontContract = new Instrument
+            {
+                ID = 2,
+                Symbol = "VXF3",
+                Type = InstrumentType.Future,
+                Datasource = new Datasource { ID = 999, Name = "MockSource" }
+            };
+
+            var req = new RealTimeDataRequest(inst, BarSize.FiveSeconds);
+
+            _cfBrokerMock.Setup(x => x.RequestFrontContract(It.IsAny<Instrument>(), It.IsAny<DateTime?>())).Returns(1);
+            _broker.RequestRealTimeData(req);
+
+            _cfBrokerMock.Raise(x => x.FoundFrontContract += null, new FoundFrontContractEventArgs(1, frontContract, DateTime.Now));
+
+            _broker.RequestRealTimeData(req);
+
+            _dataSourceMock.Verify(x => x.RequestRealTimeData(
+                It.IsAny<RealTimeDataRequest>()),
+                Times.Once);
+            _cfBrokerMock.Verify(x => x.RequestFrontContract(
+                It.IsAny<Instrument>(),
+                It.IsAny<DateTime?>()),
+                Times.Once);
+        }
+
+        [Test]
         public void RequestsFrontContractFromCFBrokerForContinuousFuturesRequests()
         {
             var cf = new ContinuousFuture()


Add comment

Add comment

--- R7.Epsilon/Skins/SkinObjects/PageInfo.ascx.cs
+++ R7.Epsilon/Skins/SkinObjects/PageInfo.ascx.cs
@@ -18,15 +18,15 @@
 //
 //  You should have received a copy of the GNU Affero General Public License
 //  along with this program.  If not, see <http://www.gnu.org/licenses/>.
-
+
 using System.Linq;
 using DotNetNuke.Common;
 using DotNetNuke.Entities.Content;
 using DotNetNuke.Entities.Portals;

-namespace R7.Epsilon.Skins.SkinObjects
-{
-    public class PageInfo : EpsilonSkinObjectBase
+namespace R7.Epsilon.Skins.SkinObjects
+{
+    public class PageInfo : EpsilonSkinObjectBase
     {
         readonly ContentItem lastModifiedContentItem;

@@ -69,7 +69,8 @@
                 return lastModifiedContentItem;
             }

+            // should be already among content items
             return PortalSettings.ActiveTab;
         }
-    }
-}
+    }
+}


Non-blocking image initialization

Non-blocking image initialization

--- ROS_ImageUtils/CompressedImageControl.xaml.cs
+++ ROS_ImageUtils/CompressedImageControl.xaml.cs
@@ -154,7 +154,7 @@
             }
             if (imgsub == null || imgsub.topic != TopicName)
             {
-                imgsub = imagehandle.subscribe<sm.CompressedImage>(new SubscribeOptions<sm.CompressedImage>(TopicName, 1, (i) => Dispatcher.Invoke(new Action(() =>
+                imgsub = imagehandle.subscribe<sm.CompressedImage>(new SubscribeOptions<sm.CompressedImage>(TopicName, 1, (i) => Dispatcher.BeginInvoke(new Action(() =>
                                                                                {
                                                                                UpdateImage(i.data);
                                                                                latestFrame = i;


* do not throw unhandled exception in a thread, it will cause the program to crash

--- Premotion.Mansion.Http/Streaming/StreamingWebConnection.cs
+++ Premotion.Mansion.Http/Streaming/StreamingWebConnection.cs
@@ -144,9 +144,6 @@
 				// notify all the observers an unhandled error has occurred
 				foreach (var observer in observers)
 					observer.OnError(exception);
-
-				// unknown error type, rethrow
-				throw;
 			}
 		}
 		/// <summary>


refactoring.

refactoring.

--- Project/LambdicSql/Clause/Select/SelectClauseExtensions.cs
+++ Project/LambdicSql/Clause/Select/SelectClauseExtensions.cs
@@ -34,6 +34,7 @@
             where TDB : class
             where TSelect : class
         {
+            query.Create();
             var select = SelectCore<TDB, TSelect>(query, null, selectTable);
             return select.From(selectTable);
         }


Add comment

Add comment

Add comment

--- QueueDataGraphic/QueueDataGraphic/CSharpFiles/DataQueue.cs
+++ QueueDataGraphic/QueueDataGraphic/CSharpFiles/DataQueue.cs
@@ -26,7 +26,7 @@
 		/// GraphicDataQueueMax is the max number of count of GraphData elements.
 		/// GraphicDataQueueMax為GraphData物件數量上限
 		/// </summary>
-		private int GraphicDataQueueMax;
+		private int GraphicDataQueueMax;                                        //	GraphicDataQueueMax variable, GraphicDataQueueMax變數

 		/// <summary>
 		/// DataQueue constructor, DataQueue建構子


Handling portrait screens in debugger visualizer

--- ReadableExpressions.Visualizers.Dialog/VisualizerDialog.cs
+++ ReadableExpressions.Visualizers.Dialog/VisualizerDialog.cs
@@ -1,18 +1,19 @@
 namespace AgileObjects.ReadableExpressions.Visualizers.Dialog
 {
+    using Configuration;
+    using Controls;
+    using Core;
+    using Core.Configuration;
+    using Core.Theming;
     using System;
     using System.Collections.Generic;
     using System.Drawing;
     using System.Linq;
     using System.Windows.Forms;
-    using Configuration;
-    using Controls;
-    using Core;
-    using Core.Configuration;
-    using Core.Theming;
     using Theming;
+    using static DialogConstants;
+    using static System.Windows.Forms.ScreenOrientation;
     using static System.Windows.Forms.SystemInformation;
-    using static DialogConstants;

     public class VisualizerDialog : Form
     {
@@ -69,7 +70,7 @@
         }

         internal TranslationViewModel ViewModel { get; }
-
+
         internal VisualizerDialogColourTable ColourTable { get; }

         internal VisualizerDialogSettings Settings => ViewModel.Settings;
@@ -159,7 +160,23 @@

         public override bool AutoSize => _autoSize;

-        public override Size MaximumSize => Screen.PrimaryScreen.WorkingArea.Size;
+        public override Size MaximumSize
+        {
+            get
+            {
+                var screenSize = Screen.GetWorkingArea(this).Size;
+
+                switch (SystemInformation.ScreenOrientation)
+                {
+                    case Angle90:
+                    case Angle270:
+                        return new Size(screenSize.Height, screenSize.Width);
+
+                    default:
+                        return screenSize;
+                }
+            }
+        }

         public override string Text => string.Empty;

@@ -232,7 +249,7 @@
         internal void HandleThemeChanged(VisualizerDialogTheme newTheme)
         {
             Theme = newTheme;
-
+
             ColourTable.HandleThemeChanged();

             foreach (var control in _themeableControls)


US6837: print nickname on label

US6837: print nickname on label

--- SignInCheckIn/SignInCheckIn/Services/ChildSigninService.cs
+++ SignInCheckIn/SignInCheckIn/Services/ChildSigninService.cs
@@ -391,7 +391,7 @@
             {
                 var printValues = new Dictionary<string, string>
                 {
-                    {"ChildName", participant.FirstName},
+                    {"ChildName", participant.Nickname},
                     {"ChildRoomName1", participant.AssignedRoomName},
                     {"ChildRoomName2", participant.AssignedSecondaryRoomName},
                     {"ChildEventName", participantEventMapDto.CurrentEvent.EventTitle},


Update contracts properly when adding more

--- Source/ContractsWindow/PanelInterfaces/contractUIObject.cs
+++ Source/ContractsWindow/PanelInterfaces/contractUIObject.cs
@@ -105,6 +105,8 @@

 				paramList.Add(new parameterUIObject(pC));
 			}
+
+			UpdateContractUI();
 		}

 		private void UpdateContractUI()


Do not call SetDefaultProperties twice (#1187)

* Do not SetDefaultProperties twice

* Inline configuration

--- Source/EasyNetQ/ConnectionString/ConnectionStringParser.cs
+++ Source/EasyNetQ/ConnectionString/ConnectionStringParser.cs
@@ -12,11 +12,9 @@
             try
             {
                 var updater = ConnectionStringGrammar.ParseConnectionString(connectionString);
-                var configuration = updater.Aggregate(
+                return updater.Aggregate(
                     new ConnectionConfiguration(), (current, updateFunction) => updateFunction(current)
                 );
-                configuration.SetDefaultProperties();
-                return configuration;
             }
             catch (ParseException parseException)
             {


Add support for image files other than jpeg.

--- Source/Examples/WPF.SharpDX/ImageViewDemo/MainViewModel.cs
+++ Source/Examples/WPF.SharpDX/ImageViewDemo/MainViewModel.cs
@@ -26,24 +26,78 @@

     public class MainViewModel : BaseViewModel
     {
-
-        public MeshGeometry3D Plane { get; private set; }
-
-        public LineGeometry3D Grid { get; private set; }
-
-        public PhongMaterial PlaneMaterial { get; private set; }
-
-        public SharpDX.Color GridColor { get; private set; }
-
-        public Media3D.Transform3D PlaneTransform { get; private set; }
-
-        public Media3D.Transform3D GridTransform { get; private set; }
-
-        public Vector3 DirectionalLightDirection { get; private set; }
-
-        public Color4 DirectionalLightColor { get; private set; }
-
-        public Color4 AmbientLightColor { get; private set; }
+        private MeshGeometry3D plane;
+        private LineGeometry3D grid;
+        private PhongMaterial planeMaterial;
+        private Color gridColor;
+        private Media3D.Transform3D planeTransform;
+        private Media3D.Transform3D gridTransform;
+        private Vector3 directionalLightDirection;
+        private Color4 directionalLightColor;
+        private Color4 ambientLightColor;
+
+        public MeshGeometry3D Plane
+        {
+            get { return this.plane; }
+            set {
+                this.SetValue(ref this.plane, value, nameof(this.Plane)); }
+        }
+
+        public LineGeometry3D Grid
+        {
+            get { return this.grid; }
+            set {
+                this.SetValue(ref this.grid, value, nameof(this.Grid)); }
+        }
+
+        public PhongMaterial PlaneMaterial
+        {
+            get { return this.planeMaterial; }
+            set {
+                this.SetValue(ref this.planeMaterial, value, nameof(this.PlaneMaterial)); }
+        }
+
+        public Color GridColor
+        {
+            get { return this.gridColor; }
+            set {
+                this.SetValue(ref this.gridColor, value, nameof(this.GridColor)); }
+        }
+
+        public Media3D.Transform3D PlaneTransform
+        {
+            get { return this.planeTransform; }
+            set {
+                this.SetValue(ref this.planeTransform, value, nameof(this.PlaneTransform)); }
+        }
+
+        public Media3D.Transform3D GridTransform
+        {
+            get { return this.gridTransform; }
+            set {
+                this.SetValue(ref this.gridTransform, value, nameof(this.GridTransform)); }
+        }
+
+        public Vector3 DirectionalLightDirection
+        {
+            get { return this.directionalLightDirection; }
+            set {
+                this.SetValue(ref this.directionalLightDirection, value, nameof(this.DirectionalLightDirection)); }
+        }
+
+        public Color4 DirectionalLightColor
+        {
+            get { return this.directionalLightColor; }
+            set {
+                this.SetValue(ref this.directionalLightColor, value, nameof(this.DirectionalLightColor)); }
+        }
+
+        public Color4 AmbientLightColor
+        {
+            get { return this.ambientLightColor; }
+            set {
+                this.SetValue(ref this.ambientLightColor, value, nameof(this.AmbientLightColor)); }
+        }

         public ICommand OpenCommand { get; private set; }

@@ -71,8 +125,8 @@
             this.DirectionalLightDirection = new Vector3(-0, -0, -10);

             // floor plane grid
-            this.Grid = LineBuilder.GenerateGrid(Vector3.UnitZ, -5, 5, -5, 5);
-            this.GridColor = SharpDX.Color.Black;
+            this.Grid = LineBuilder.GenerateGrid(Vector3.UnitZ, -5, 5, -5, 5);
+            this.GridColor = Color.Black;
             this.GridTransform = new Media3D.TranslateTransform3D(0, 0, 0);

             // plane
@@ -80,7 +134,7 @@
             b2.AddBox(new Vector3(0, 0, 0), 10, 10, 0, BoxFaces.PositiveZ);
             this.Plane = b2.ToMeshGeometry3D();
             this.PlaneMaterial = PhongMaterials.Blue;
-            this.PlaneTransform = new Media3D.TranslateTransform3D(-0, -0, -0);
+            this.PlaneTransform = new Media3D.TranslateTransform3D(-0, -0, -0);
             //this.PlaneMaterial.ReflectiveColor = Color.Black;
             this.PlaneTransform = new Media3D.TranslateTransform3D(0, 0, 0);
         }
@@ -90,7 +144,7 @@
             var ratio = img.PixelWidth / (double)img.PixelHeight;
             var transform = Media3D.Transform3D.Identity;
             ushort orientation = 1;
-            if (this.ExifReader.GetTagValue(ExifTags.Orientation, out orientation))
+            if (this.ExifReader != null && this.ExifReader.GetTagValue(ExifTags.Orientation, out orientation))
             {
                 switch (orientation)
                 {
@@ -125,7 +179,7 @@
                 }

                 this.PlaneTransform = transform;
-                this.GridTransform = transform;
+                this.GridTransform = transform;
             }
             else
             {
@@ -133,13 +187,13 @@
                 {
                     transform = transform.AppendTransform(new Media3D.ScaleTransform3D(ratio, 1.0, 1.0));
                     this.PlaneTransform = transform;
-                    this.GridTransform = PlaneTransform;
+                    this.GridTransform = this.PlaneTransform;
                 }
                 else
                 {
                     transform = transform.AppendTransform(new Media3D.ScaleTransform3D(1.0, 1.0 / ratio, 1.0));
                     this.PlaneTransform = transform;
-                    this.GridTransform = PlaneTransform;
+                    this.GridTransform = this.PlaneTransform;
                 }
             }

@@ -151,16 +205,24 @@
                 EmissiveColor = Color.Black,
                 SpecularColor = Color.Black,
                 DiffuseMap = img,
-            };
+            };
+
             this.PlaneMaterial = white;
-            this.RenderTechnique = RenderTechniquesManager.RenderTechniques[DefaultRenderTechniqueNames.Diffuse];
-        }
-
-        private void GetExif(string filename)
-        {
-            this.ExifReader = new ExifReader(filename);
-            DateTime dateTime;
-            this.ExifReader.GetTagValue(ExifTags.DateTime, out dateTime);
+            this.RenderTechnique = this.RenderTechniquesManager.RenderTechniques[DefaultRenderTechniqueNames.Blinn];
+        }
+
+        private void TryGetExif(string filename)
+        {
+            try
+            {
+                this.ExifReader = new ExifReader(filename);
+                DateTime dateTime;
+                this.ExifReader.GetTagValue(ExifTags.DateTime, out dateTime);
+            }
+            catch (Exception ex)
+            {
+                this.ExifReader = null;
+            }
         }

         private void OnOpenClick()
@@ -168,15 +230,15 @@
             try
             {
                 var d = new Microsoft.Win32.OpenFileDialog()
-                {
+                {
                     Filter = "image files|*.jpg; *.png; *.bmp; *.gif",
                 };
                 if (d.ShowDialog().Value)
                 {
                     if (File.Exists(d.FileName))
                     {
-                        var img = new BitmapImage(new System.Uri(d.FileName, System.UriKind.RelativeOrAbsolute));
-                        this.GetExif(d.FileName);
+                        var img = new BitmapImage(new Uri(d.FileName, UriKind.RelativeOrAbsolute));
+                        this.TryGetExif(d.FileName);
                         this.SetImages(img);
                         this.Title = d.FileName;
                     }


Avoid exception for collapsed popup list - issue #107

--- Source/ExcelDna.IntelliSense/UIMonitor/PopupListWatcher.cs
+++ Source/ExcelDna.IntelliSense/UIMonitor/PopupListWatcher.cs
@@ -158,7 +158,7 @@
                 ListBounds = Win32Helper.GetWindowBounds(_hwndPopupList);

                 _selectedItemIndex = Win32Helper.GetListViewSelectedItemInfo(hwndListView, out text, out itemBounds);
-                if (string.IsNullOrEmpty(text))
+                if (string.IsNullOrEmpty(text) || itemBounds == Rect.Empty)
                 {
                     // We (unexpectedly) failed to get information about the selected item - not sure this is a problem
                     Logger.WindowWatcher.Info($"PopupList UpdateSelectedItem - IsVisible but GetListViewSelectedItemInfo failed ");


GSF.Web: Updated add select field logic so that valueAllowUnset is true when select is required so that field required validation logic will apply.

--- Source/Libraries/GSF.Web/Model/Views/AddSelectField.cshtml
+++ Source/Libraries/GSF.Web/Model/Views/AddSelectField.cshtml
@@ -88,6 +88,10 @@
         optionDataBinding = string.Format(" data-bind=\"{0}\"", optionDataBinding);
     }

+    if (required) {
+        allowUnset = true;
+    }
+
     valueUnsetOptions = allowUnset.ToString().ToLower();

     if (allowUnset && !string.IsNullOrWhiteSpace(unsetCaption))


updating selenium tests

updating selenium tests

--- Spa/NakedObjects.Spa.Selenium.Test/tests/SplitPaneTests.cs
+++ Spa/NakedObjects.Spa.Selenium.Test/tests/SplitPaneTests.cs
@@ -130,8 +130,8 @@
             Assert.AreEqual("Sandra Altamirano, Owner", reference.Text);
             Click(reference);

-            WaitFor(Pane.Left, PaneType.Object, "Sandra Altamirano, Owner");
-            WaitFor(Pane.Right, PaneType.Object, "SO71926");
+            WaitFor(Pane.Right, PaneType.Object, "Sandra Altamirano, Owner");
+            WaitFor(Pane.Left, PaneType.Object, "Twin Cycles, AW00000555");
         }

         [TestMethod]
@@ -145,8 +145,8 @@
             Assert.AreEqual("Sandra Altamirano, Owner", reference.Text);
             RightClick(reference);

-            WaitFor(Pane.Left, PaneType.Object, "Twin Cycles, AW00000555");
-            WaitFor(Pane.Right, PaneType.Object, "Sandra Altamirano, Owner");
+            WaitFor(Pane.Right, PaneType.Object, "SO71926");
+            WaitFor(Pane.Left, PaneType.Object, "Sandra Altamirano, Owner");
         }

         [TestMethod]


serviceauthorize attribute should return 400 as result code

--- Serenity.Web/Mvc/ServiceAuthorizeAttribute.cs
+++ Serenity.Web/Mvc/ServiceAuthorizeAttribute.cs
@@ -54,6 +54,10 @@
                     }
                 });
             }
+
+            filterContext.HttpContext.Response.Clear();
+            filterContext.HttpContext.Response.StatusCode = 400;
+            filterContext.HttpContext.Response.TrySkipIisCustomErrors = true;
         }
     }
 }


Update ExtensionsDirectoryInfo.cs

Update ExtensionsDirectoryInfo.cs

--- Shared/Cauldron/IO/ExtensionsDirectoryInfo.cs
+++ Shared/Cauldron/IO/ExtensionsDirectoryInfo.cs
@@ -357,10 +357,13 @@
         /// names must be less than 260 characters. The specified path, file name, or both are too long.
         /// </exception>
         public static DirectoryInfo ToDirectoryInfo(this string path) => new DirectoryInfo(path);
-
+
         /// <summary>
         /// Converts a string to a <see cref="FileInfo"/>
         /// </summary>
+        /// <param name="directoryInfo">
+        /// The <see cref="DirectoryInfo"/> representing the current folder
+        /// </param>
         /// <param name="filename">
         /// The fully qualified name of the new file, or the relative file name. Do not end the path
         /// with the directory separator character.
@@ -380,6 +383,7 @@
         /// <exception cref="UnauthorizedAccessException">
         /// <paramref name="filename"/> contains a colon (:) in the middle of the string.
         /// </exception>
-        public static FileInfo ToFileInfo(this string filename) => new FileInfo(filename);
+        public static FileInfo ToFileInfo(this DirectoryInfo directoryInfo, string filename) => new FileInfo(Path.Combine(directory.FullName, filename));
+
     }
-}+}


Break up bulk operations that can't be batched.

--- Silk.Data.SQL.ORM/Operations/BulkOperation.cs
+++ Silk.Data.SQL.ORM/Operations/BulkOperation.cs
@@ -17,10 +17,12 @@
 			var currentOperations = new List<DataOperation>();
 			foreach (var operation in operations)
 			{
-				if (operation.CanBeBatched)
+				if (!operation.CanBeBatched)
 				{
-					currentOperations.Add(operation);
+					bulkOperations.Add(new BulkDataOperation(currentOperations.ToArray()));
+					currentOperations.Clear();
 				}
+				currentOperations.Add(operation);
 			}

 			if (currentOperations.Count > 0)


renames

renames

--- Simple1C/Impl/Sql/PostgreeSqlSchemaCreator.cs
+++ Simple1C/Impl/Sql/PostgreeSqlSchemaCreator.cs
@@ -41,20 +41,20 @@

         private EnumMapping[] ExtractEnumMappingsFromCom()
         {
-            var enumerations = ComHelpers.GetProperty(globalContext.ComObject(), "Перечисления");
-            var enumerationsMetadata = ComHelpers.GetProperty(globalContext.Metadata, "Перечисления");
-            var count = Call.Количество(enumerationsMetadata);
+            var enumsManager = ComHelpers.GetProperty(globalContext.ComObject(), "Перечисления");
+            var enumsMeta = ComHelpers.GetProperty(globalContext.Metadata, "Перечисления");
+            var enumsCount = Call.Количество(enumsMeta);
             var result = new List<EnumMapping>();
-            for (var i = 0; i < count; i++)
+            for (var i = 0; i < enumsCount; i++)
             {
-                var enumMeta = Call.Получить(enumerationsMetadata, i);
+                var enumMeta = Call.Получить(enumsMeta, i);
                 var enumName = Call.Имя(enumMeta);
-                var enumManager = ComHelpers.GetProperty(enumerations, enumName);
+                var enumManager = ComHelpers.GetProperty(enumsManager, enumName);
                 var enumValuesMeta = ComHelpers.GetProperty(enumMeta, "ЗначенияПеречисления");
-                var valuesCount = Call.Количество(enumerationsMetadata);
+                var valuesCount = Call.Количество(enumsMeta);
                 for (var j = 0; j < valuesCount; j++)
                 {
-                    var enumValueMeta = Call.Получить(enumValuesMeta, i);
+                    var enumValueMeta = Call.Получить(enumValuesMeta, j);
                     var enumValueName = Call.Имя(enumValueMeta);
                     var enumValue = ComHelpers.GetProperty(enumManager, enumValueName);
                     var order = Convert.ToInt32(ComHelpers.Invoke(enumManager, "Индекс", enumValue));


WeatherNowViewModel: insert placeholder text for n/a weather details

* For WUnderground

--- SimpleWeather/Controls/WeatherNowViewModel.cs
+++ SimpleWeather/Controls/WeatherNowViewModel.cs
@@ -289,7 +289,7 @@
             // Update Current Condition
             CurTemp = Settings.Unit == Settings.Fahrenheit ?
                 Math.Round(weather.condition.temp_f) + "\uf045" : Math.Round(weather.condition.temp_c) + "\uf03c";
-            CurCondition = weather.condition.weather;
+            CurCondition = (String.IsNullOrWhiteSpace(weather.condition.weather)) ? "---" : weather.condition.weather;
             WeatherIcon = WeatherUtils.GetWeatherIcon(weather.condition.icon);

             // WeatherDetails
@@ -312,6 +312,9 @@
             _Visibility = Settings.Unit == Settings.Fahrenheit ?
                 weather.atmosphere.visibility_mi + " mi" : weather.atmosphere.visibility_km + " km";

+            if (_Visibility.StartsWith(" "))
+                _Visibility = _Visibility.Insert(0, "--");
+
             // Add UI elements
             Forecasts.Clear();
             foreach (Forecast forecast in weather.forecast)


Added Overwrite property

Added Overwrite property

Overwrite is used when performing UploadFiles action to decide whether
or not we overwrite existing files

--- Solutions/Main/Framework/Communication/Ftp.cs
+++ Solutions/Main/Framework/Communication/Ftp.cs
@@ -3,6 +3,7 @@
 //-----------------------------------------------------------------------
 namespace MSBuild.ExtensionPack.Communication
 {
+    using System.Collections.Generic;
     using System.Globalization;
     using System.IO;
     using System.Linq;
@@ -61,7 +62,7 @@
         /// </summary>
         [Required]
         public string Host { get; set; }
-
+
         /// <summary>
         /// Sets the Remote Path to connect to the FTP Site
         /// </summary>
@@ -78,21 +79,27 @@
         public int Port { get; set; }

         /// <summary>
+        /// Sets if the upload action will overwrite existing files
+        /// </summary>
+        public string Overwrite { get; set; }
+
+        /// <summary>
         /// The list of files that needs to be transfered over FTP
         /// </summary>
         public ITaskItem[] FileNames { get; set; }

+
         /// <summary>
         /// Performs the action of this task.
         /// </summary>
         protected override void InternalExecute()
-        {
+        {
             if (string.IsNullOrEmpty(this.Host))
             {
                 this.Log.LogError("The required host attribute has not been set for FTP.");
                 return;
             }
-
+
             switch (this.TaskAction)
             {
                 case CreateDirectoryTaskAction:
@@ -247,12 +254,33 @@
                     ftpConnection.SetCurrentDirectory(this.RemoteDirectoryName);
                 }

+                var overwrite = true;
+                var files = new List<FtpFileInfo>();
+                if (!string.IsNullOrEmpty(this.Overwrite))
+                {
+                    if (!bool.TryParse(this.Overwrite, out overwrite))
+                    {
+                        overwrite = true;
+                    }
+                }
+
+                if (!overwrite)
+                {
+                    files.AddRange(ftpConnection.GetFiles());
+                }
+
                 foreach (string fileName in this.FileNames.Select(item => item.ItemSpec))
                 {
                     try
                     {
                         if (File.Exists(fileName))
                         {
+                            if (!overwrite && files.FirstOrDefault(fi => fi.Name == fileName) != null)
+                            {
+                                this.LogTaskMessage(string.Format(CultureInfo.CurrentCulture, "Skipped: {0}", fileName));
+                                continue;
+                            }
+
                             this.LogTaskMessage(string.Format(CultureInfo.CurrentCulture, "Uploading: {0}", fileName));
                             ftpConnection.PutFile(fileName);
                         }
@@ -329,7 +357,7 @@

             if (!string.IsNullOrEmpty(this.UserName))
             {
-                return this.Port != 0 ? new FtpConnection(this.Host, this.Port, this.UserName, this.UserPassword) : new FtpConnection(this.Host, this.UserName, this.UserPassword);
+                return this.Port != 0 ? new FtpConnection(this.Host, this.Port, this.UserName, this.UserPassword) : new FtpConnection(this.Host, this.UserName, this.UserPassword);
             }

             return this.Port != 0 ? new FtpConnection(this.Host, this.Port) : new FtpConnection(this.Host);


use implicit relative path denotation for content_folder (#3522)

--- Source/ACE.Server/Managers/PropertyManager.cs
+++ Source/ACE.Server/Managers/PropertyManager.cs
@@ -653,7 +653,7 @@

         public static readonly ReadOnlyDictionary<string, Property<string>> DefaultStringProperties =
             DictOf(
-                ("content_folder", new Property<string>(".\\Content", "for content creators to live edit weenies. defaults to Content folder found in same directory as ACE.Server.dll")),
+                ("content_folder", new Property<string>("Content", "for content creators to live edit weenies. defaults to Content folder found in same directory as ACE.Server.dll")),
                 ("dat_warning_msg", new Property<string>("Your DAT files are incomplete.\nACEmulator does not support dynamic DAT updating at this time.\nPlease visit https://emulator.ac/how-to-play to download the complete DAT files.", "Warning message displayed (if show_dat_warning is true) to player if client attempts DAT download from server")),
                 ("popup_header", new Property<string>("Welcome to Asheron's Call!", "Welcome message displayed when you log in")),
                 ("popup_welcome", new Property<string>("To begin your training, speak to the Society Greeter. Walk up to the Society Greeter using the 'W' key, then double-click on her to initiate a conversation.", "Welcome message popup in training halls")),


Added methode to convert string into CamelCase

--- SpirvSpecToJson/SpirvSpecToJson/Extensions.cs
+++ SpirvSpecToJson/SpirvSpecToJson/Extensions.cs
@@ -21,7 +21,7 @@
             // Name <id>

             // Returns just the name
-            return text.Replace("<id>", "").Trim();
+            return text.Replace("<id>", "").Trim().ToCamelCase();

         }
         /// <summary>
@@ -54,7 +54,7 @@
                 if (!s.EndsWith("s"))
                     s += "s";

-                a[0] = s;
+                a[0] = s.ToCamelCase();
                 a[1] = "ID[]";
             }

@@ -75,7 +75,7 @@
                 if (text.Contains("See"))
                     a[0] = "ExtraOperands";
                 else
-                    a[0] = s;
+                    a[0] = s.ToCamelCase();

                 // Type: LiteralNumber
                 a[1] = "LiteralNumber[]";
@@ -102,5 +102,26 @@
             }
             return s.ToString();
         }
+
+        /// <summary>
+        /// Convert string into CamelCase
+        /// </summary>
+        /// <param name="text"></param>
+        /// <returns></returns>
+        public static string ToCamelCase(this string s)
+        {
+            var test = s.Split();
+            var sx = new StringBuilder();
+            var st = new StringBuilder();
+            // Capitalize
+            foreach (var t in test)
+            {
+                sx.Append(char.ToUpper(t[0]) + t.Substring(1));
+                st.Append(sx);
+                sx.Clear();
+            }
+
+            return sx.ToString();
+        }
     }
 }


Fix for NET20 and NET35

Fix for NET20 and NET35

--- Src/Newtonsoft.Json/Utilities/ConvertUtils.cs
+++ Src/Newtonsoft.Json/Utilities/ConvertUtils.cs
@@ -35,9 +35,11 @@
 #if NET20
 using Newtonsoft.Json.Utilities.LinqBridge;
 #endif
+#if (NET20 || NET35)
+using System.Text.RegularExpressions;
+#endif
 #if !(DOTNET || PORTABLE40 || PORTABLE)
 using System.Data.SqlTypes;
-
 #endif

 namespace Newtonsoft.Json.Utilities
@@ -706,7 +708,7 @@
 #if !(NET20 || NET35)
             return Version.TryParse(input, out result);
 #else
-    // improve failure performance with regex?
+            // improve failure performance with regex?
             try
             {
                 result = new Version(input);
@@ -946,7 +948,7 @@
 #endif
         }

-        public static bool TryConvertGuid(string s, string format, out Guid g)
+        public static bool TryConvertGuid(string s, string formatString, out Guid g)
         {
             // GUID has to have format 00000000-0000-0000-0000-000000000000
 #if NET20 || NET35
@@ -964,7 +966,7 @@
             g = Guid.Empty;
             return false;
 #else
-            return Guid.TryParseExact(s, format, out g);
+            return Guid.TryParseExact(s, formatString, out g);
 #endif
         }


Remove todo comment.

Remove todo comment.

--- TestObjectBuilder/TestObjectBuilderBuilder.cs
+++ TestObjectBuilder/TestObjectBuilderBuilder.cs
@@ -22,11 +22,6 @@
             return CreateNewObject(null);
         }

-        /**
-         * TODO:
-         * - Create additional properties on the builder for ctorArgs.
-         * - Have build method use these args to build the product.
-         */
         public static ITestObjBuilder<T> CreateNewObject(TestObjectConstructorArgumentList ctorArgs)
         {
             Type finalProductType = typeof(T);