Added more functions + removed unused code

TODO: Add VV fallback function for lacking semivowel clusters.

--- OpenUtau.Plugin.Builtin/SpanishSyllableBasedPhonemizer.cs
+++ OpenUtau.Plugin.Builtin/SpanishSyllableBasedPhonemizer.cs
@@ -28,7 +28,7 @@
                 .Where(parts => parts[0] != parts[1])
                 .ToDictionary(parts => parts[0], parts => parts[1]);

-        private readonly string[] longConsonants = "b,ch,d,dz,g,h,s,sh,k,p,t,ts,z,l,m,n".Split(',');
+        private readonly string[] longConsonants = "b,ch,d,dz,g,h,s,sh,k,p,rr,s,t,ts,z,l,m,n".Split(',');
         private readonly string[] burstConsonants = "b,ch,d,dz,g,j,k,p,r,t,ts".Split(',');
         private readonly string[] notClusters = "dz,hh,ll,nh,sh,zz,zh".Split(',');
         private readonly string[] specialClusters = "by,dy,fy,gy,hy,jy,ky,ly,my,py,ry,rry,sy,ty,vy,zy,bw,chw,dw,fw,gw,hw,jw,kw,lw,llw,mw,nw,pw,rw,rrw,sw,tw,vw,zw,bl,fl,gl,kl,pl,br,dr,fr,gr,kr,pr,tr".Split(',');
@@ -71,8 +71,7 @@
                     basePhoneme = rc;
                 } else if (cc[0] == "z"
                     && !HasOto(cc[0], syllable.vowelTone)
-                    && HasOto(src, syllable.vowelTone)
-                    && syllable.IsStartingCVWithOneConsonant) {
+                    && HasOto(src, syllable.vowelTone)) {
                     basePhoneme = src;
                 } else {
                     basePhoneme = $"{cc[0]}{v}";
@@ -86,28 +85,16 @@
                     basePhoneme = rvvc;
                 } else if (string.Join("", cc) == "zy"
                     && !HasOto(string.Join("", cc), syllable.vowelTone)
-                    && HasOto(syrvvc, syllable.vowelTone)
-                    && syllable.IsStartingCVWithMoreThanOneConsonant) {
+                    && HasOto(syrvvc, syllable.vowelTone)) {
                     basePhoneme = syrvvc;
                 } else if (string.Join("", cc) == "zw"
                     && !HasOto(string.Join("", cc), syllable.vowelTone)
-                    && HasOto(syrvvc, syllable.vowelTone)
-                    && syllable.IsStartingCVWithMoreThanOneConsonant) {
+                    && HasOto(syrvvc, syllable.vowelTone)) {
                     basePhoneme = swrvvc;
                 } else if (specialClusters.Contains(string.Join("", cc))) {
                     basePhoneme = $"{string.Join("", cc)}{v}";
                 } else {
                     basePhoneme = $"{cc.Last()}{v}";
-                    // try RCC
-                    // for (var i = cc.Length; i > 1; i--) {
-                    // if (TryAddPhoneme(phonemes, syllable.tone, $"- {string.Join("", cc.Take(i))}")) {
-                    //    firstC = i;
-                    //    break;
-                    //    }
-                    //}
-                    // if (phonemes.Count == 0) {
-                    //    TryAddPhoneme(phonemes, syllable.tone, $"- {cc[0]}");
-                    //}
                     // try CCV
                     for (var i = firstC; i < cc.Length - 1; i++) {
                         var ccv = string.Join("", cc.Skip(i)) + v;
@@ -166,8 +153,13 @@
                         }
                         // try vcc
                         var vcc = $"{prevV} {string.Join("", cc.Take(i))}";
+                        var vcc2 = $"{prevV}{string.Join("", cc.Take(i))}";
                         if (HasOto(vcc, syllable.tone) && !(notClusters.Contains(string.Join("", cc.Take(i))))) {
                             phonemes.Add(vcc);
+                            firstC = i - 1;
+                            break;
+                        } else if (HasOto(vcc2, syllable.tone) && !(notClusters.Contains(string.Join("", cc.Take(i))))) {
+                            phonemes.Add(vcc2);
                             firstC = i - 1;
                             break;
                         }
@@ -225,6 +217,8 @@
                 var ncc1 = $"{cc[i]} n";
                 var vc1 = $"{prevV} {cc[0]}";
                 var vc2 = $"{prevV}{cc[0]}";
+                var vcc = $"{prevV} {string.Join("", cc.Take(i))}";
+                var vcc2 = $"{prevV}{string.Join("", cc.Take(i))}";
                 if (!HasOto(cc1, syllable.tone) && !specialClusters.Contains(string.Join("", cc.Skip(i)))) {
                     cc1 = $"{cc[i]}{cc[i + 1]}";
                 }
@@ -246,14 +240,22 @@
                         }
                         // like [V C1] [C1 C2] [C2 ..]
                     } else if (!HasOto(cc2, syllable.tone)
-                        // && cc[i] == "s"
-                        // && !HasOto(vc1, syllable.tone)
-                        // && !HasOto(vc2, syllable.tone)
+                        && !vc1.Contains($"{prevV} {cc[i]}")
+                        && !vc2.Contains($"{prevV}{cc[i]}")
+                        && !HasOto(vcc, syllable.tone)
+                        && !HasOto(vcc2, syllable.tone)
+                        && !specialClusters.Contains(string.Join("", cc.Skip(i)))
+                        && !burstConsonants.Contains(cc[i])
                         && HasOto(cc[i], syllable.tone)) {
                         phonemes.Add(cc[i]);
                     } else if (burstConsonants.Contains(cc[i]) && !specialClusters.Contains(string.Join("", cc.Skip(i)))) {
                         // like [V C1] [C1] [C2 ..]
-                        TryAddPhoneme(phonemes, syllable.tone, cc[i], $"{cc[i]} -");
+                        TryAddPhoneme(phonemes, syllable.tone, cc[i]);
+                    }
+                    if (cc[i] == "r" && HasOto($"{prevV}rr", syllable.tone)) {
+                        phonemes.Remove(vc1);
+                        phonemes.Remove(vc2);
+                        phonemes.Add($"{prevV}rr");
                     }
                 } else {
                     // like [V C1] [C1 C2]  [C2 ..] or like [V C1] [C1 -] [C3 ..]
@@ -262,31 +264,29 @@
                         TryAddPhoneme(phonemes, syllable.tone, ncc1);
                     }
                     if (!HasOto(cc1, syllable.tone)
-                        // && cc[i] == "s"
+                        && !specialClusters.Contains(string.Join("", cc.Skip(i)))
                         && !HasOto(vc1, syllable.tone)
                         && !HasOto(vc2, syllable.tone)
                         && !burstConsonants.Contains(cc[i])
-                        //&& !vc1.Contains($"{prevV} s")
-                        //&& !vc2.Contains($"{prevV}s")
                         && HasOto(cc[i], syllable.tone)) {
                         phonemes.Add(cc[i]);
-                    }
-                    else if (!HasOto(cc1, syllable.tone)
-                        //&& cc[i] == "s"
-                        //&& !HasOto(vc1, syllable.tone)
-                        //&& !HasOto(vc2, syllable.tone)
-                        && !vc1.Contains($"{prevV} {cc[i]}")
-                        && !vc2.Contains($"{prevV}{cc[i]}")
-                        && HasOto(cc[i], syllable.tone)) {
+                    } else if (!HasOto(cc1, syllable.tone)
+                          && !specialClusters.Contains(string.Join("", cc.Skip(i)))
+                          && !burstConsonants.Contains(cc[i])
+                          && !vc1.Contains($"{prevV} {cc[i]}")
+                          && !vc2.Contains($"{prevV}{cc[i]}")
+                          && !HasOto(vcc, syllable.tone)
+                          && !HasOto(vcc2, syllable.tone)
+                          && HasOto(cc[i], syllable.tone)) {
                         phonemes.Add(cc[i]);
-                    }
-                    if (cc[i] == "r"
-                      && !HasOto(vc1, syllable.tone)
-                      && !HasOto(vc2, syllable.tone)
-                      && HasOto($"{prevV}rr", syllable.tone)) {
+
+                    }
+                    if (cc[i] == "r" && HasOto($"{prevV}rr", syllable.tone)) {
+                        phonemes.Remove(vc1);
+                        phonemes.Remove(vc2);
                         phonemes.Add($"{prevV}rr");
                     } else if (burstConsonants.Contains(cc[i]) && !syllable.IsStartingCVWithMoreThanOneConsonant && !specialClusters.Contains(string.Join("", cc.Skip(i)))) {
-                        TryAddPhoneme(phonemes, syllable.tone, cc[i], $"{cc[i]} -");
+                        TryAddPhoneme(phonemes, syllable.tone, cc[i]);
                     }
                 }
             }
@@ -307,71 +307,66 @@
                 var vcr = $"{v} {cc[0]}-";
                 var vc1 = $"{v} {cc[0]}";
                 var vc2 = $"{v}{cc[0]}";
-                if (HasOto(vcr, ending.tone)) {   // applies ending VC
+                var vrr = $"{v}rr";
+                if (cc[0] == "r" && HasOto(vrr, ending.tone)) {
+                    phonemes.Add(vrr);
+                } else if (HasOto(vcr, ending.tone)) {   // applies ending VC
                     phonemes.Add(vcr);
                 } else if (!HasOto(vcr, ending.tone) && (HasOto(vc1, ending.tone))) {   // if no ending VC, then regular VC
                     phonemes.Add(vc1);
                     if (burstConsonants.Contains(cc[0])) {
-                        TryAddPhoneme(phonemes, ending.tone, cc[0], $"{cc[0]} -");
+                        TryAddPhoneme(phonemes, ending.tone, cc[0]);
                     }
                 } else if (!HasOto(vc1, ending.tone) && HasOto(vc2, ending.tone)) {
                     phonemes.Add(vc2);
-                    if (burstConsonants.Contains(cc[0])) {
-                        TryAddPhoneme(phonemes, ending.tone, cc[0], $"{cc[0]} -");
-                    }
-                } else if (cc[0] == "r" && !HasOto(vc2, ending.tone) && !HasOto(vc2, ending.tone)) {
-                    phonemes.Add($"{v}rr");
+                } else if (!HasOto(vc2, ending.tone) && !HasOto(vc2, ending.tone)) {
+                    phonemes.Add($"{cc[0]}");
                 }
             } else if (ending.IsEndingVCWithMoreThanOneConsonant) {   // ending VCC (very rare, usually only occurs in words ending with "x")
-                var vccr = $"{v} {string.Join("", cc)}";
-                var vc1 = $"{v} {cc[0]}";
+                var vcc = $"{v} {string.Join("", cc)}";
+                var vcc2 = $"{v}{string.Join("", cc)}";
+                var vc = $"{v} {cc[0]}";
                 var vc2 = $"{v}{cc[0]}";
-                if (HasOto(vccr, ending.tone)) {   // applies ending VCC
-                    phonemes.Add(vccr);
-                } else if (!HasOto(vccr, ending.tone)) {   // if no ending VCC, then CC transitions
-                    TryAddPhoneme(phonemes, ending.tone, vc1);
-                    if (!HasOto(vc1, ending.tone) && HasOto(vc2, ending.tone)) {
-                        TryAddPhoneme(phonemes, ending.tone, vc2);
-                    }
-                    // all CCs except the first one are /C1C2/, the last one is /C1 C2-/
-                    // but if there is no /C1C2/, we try /C1 C2-/, vise versa for the last one
-                    for (var i = 0; i < cc.Length - 1; i++) {
-                        var cc1 = $"{cc[i]} {cc[i + 1]}";
-                        // var vc1 = $"{v} {cc[0]}";
-                        // var vc2 = $"{v}{cc[0]}";
-                            if (i < cc.Length - 2) {
-                            var cc2 = $"{cc[i + 1]} {cc[i + 2]}";
-                            if (HasOto(cc1, ending.tone) && HasOto(cc2, ending.tone)) {
-                                // like [C1 C2][C2 ...]
-                                phonemes.Add(cc1);
-                            } else if (TryAddPhoneme(phonemes, ending.tone, $"{cc[i + 1]}{cc[i + 2]}")) {
-                                // like [C1C2][C2 ...]
-                            } else if (TryAddPhoneme(phonemes, ending.tone, $"{cc[i + 1]} {cc[i + 2]}-")) {
-                                // like [C1 C2-][C3 ...]
-                                i++;
-                            } else {
-                                // like [C1][C2 ...]
-                                TryAddPhoneme(phonemes, ending.tone, cc[i], $"{cc[i]} -");
-                            }
-                        } else {
-                            if (TryAddPhoneme(phonemes, ending.tone, $"{cc[i]} {cc[i + 1]}-")) {
-                                // like [C1 C2-]
-                                i++;
-                            } else if (TryAddPhoneme(phonemes, ending.tone, $"{cc[i]}{cc[i + 1]}")) {
-                                // like [C1C2][C2 -]
-                                TryAddPhoneme(phonemes, ending.tone, $"{cc[i + 1]} -", cc[i + 1]);
-                                i++;
-                            } else if (TryAddPhoneme(phonemes, ending.tone, cc1)) {
-                                // like [C1 C2][C2 -]
-                                TryAddPhoneme(phonemes, ending.tone, $"{cc[i + 1]} -", cc[i + 1]);
-                                i++;
-                            } else {
-                                // like [C1][C2 -]
-                                TryAddPhoneme(phonemes, ending.tone, cc[i], $"{cc[i]} -");
-                                TryAddPhoneme(phonemes, ending.tone, $"{cc[i + 1]} -", cc[i + 1]);
-                                i++;
-                            }
-                        }
+                var cc1 = $"{cc[0]} {cc[1]}";
+                var cc2 = $"{cc[0]}{cc[1]}";
+                if (HasOto(vcc, ending.tone)) {   // applies ending VCC
+                    phonemes.Add(vcc);
+                }
+                if (!HasOto(vcc, ending.tone)) {   // if no ending VCC, then CC transitions
+                    TryAddPhoneme(phonemes, ending.tone, vcc2);
+                }
+                if (!HasOto(vcc, ending.tone) && !HasOto(vcc2, ending.tone) && HasOto(vc, ending.tone)) {
+                    phonemes.Add(vc);
+                    TryAddPhoneme(phonemes, ending.tone, cc1);
+                    if (burstConsonants.Contains(cc[1])) {
+                        TryAddPhoneme(phonemes, ending.tone, cc[1]);
+                    }
+                    if (!HasOto(cc1, ending.tone)) {
+                        TryAddPhoneme(phonemes, ending.tone, cc2);
+                    }
+                    if (!HasOto(cc1, ending.tone) && !HasOto(cc2, ending.tone)) {
+                        TryAddPhoneme(phonemes, ending.tone, cc[0] + cc[1]);
+                    }
+                }
+                if (!HasOto(vcc, ending.tone) && !HasOto(vcc2, ending.tone) && !HasOto(vc, ending.tone) && HasOto(vc2, ending.tone)) {
+                    phonemes.Add(vc2);
+                    TryAddPhoneme(phonemes, ending.tone, cc1);
+                    if (burstConsonants.Contains(cc[1])) {
+                        TryAddPhoneme(phonemes, ending.tone, cc[1]);
+                    }
+                    if (!HasOto(cc1, ending.tone)) {
+                        TryAddPhoneme(phonemes, ending.tone, cc2);
+                    } else if (!HasOto(cc1, ending.tone) && !HasOto(cc2, ending.tone)) {
+                        TryAddPhoneme(phonemes, ending.tone, cc[0] + cc[1]);
+                    }
+                }
+                if (!HasOto(vcc, ending.tone) && !HasOto(vcc2, ending.tone) && !HasOto(vc, ending.tone) && !HasOto(vc2, ending.tone)) {
+                    phonemes.Add(cc[0]);
+                    TryAddPhoneme(phonemes, ending.tone, cc1);
+                    if (!HasOto(cc1, ending.tone)) {
+                        TryAddPhoneme(phonemes, ending.tone, cc2);
+                    } else if (!HasOto(cc1, ending.tone) && !HasOto(cc2, ending.tone)) {
+                        TryAddPhoneme(phonemes, ending.tone, cc[1]);
                     }
                 }
             }
@@ -423,7 +418,7 @@
         protected override double GetTransitionBasicLengthMs(string alias = "") {
             foreach (var c in new[] { "rr" }) {
                 if (alias.EndsWith(c)) {
-                    return base.GetTransitionBasicLengthMs() * 1.0;
+                    return base.GetTransitionBasicLengthMs() * 1.5;
                 }
             }
             foreach (var c in new[] { "r" }) {


Property and field value reflection helpers now throw a MissingMemberException if the specified member cannot be found

--- PrtgAPI/Helpers/ReflectionHelpers.cs
+++ PrtgAPI/Helpers/ReflectionHelpers.cs
@@ -22,7 +22,12 @@
         /// <returns>The value of the retrieved property.</returns>
         public static object GetInternalProperty(this object obj, string name)
         {
-            return obj.GetInternalPropertyInfo(name).GetValue(obj);
+            var info = obj.GetInternalPropertyInfo(name);
+
+            if (info == null)
+                throw new MissingMemberException(obj.GetType().Name, name);
+
+            return info.GetValue(obj);
         }

         /// <summary>
@@ -46,7 +51,12 @@
         /// <returns>The value of the retrieved field.</returns>
         public static object GetInternalField(this object obj, string name)
         {
-            return obj.GetInternalFieldInfo(name).GetValue(obj);
+            var info = obj.GetInternalFieldInfo(name);
+
+            if (info == null)
+                throw new MissingMemberException(obj.GetType().Name, name);
+
+            return info.GetValue(obj);
         }

         /// <summary>


comment added

comment added

--- PollQuestionnaire.UI.Web/Views/Survey/PatQueSurvey.cshtml
+++ PollQuestionnaire.UI.Web/Views/Survey/PatQueSurvey.cshtml
@@ -194,14 +194,21 @@
                         jsonResults: JSON.stringify(survey.data),
                         sessionCode: sessionCode,
                         lastVisitedPageIndex: lastVisitedPage,
-                        isFinal: true
+                        isFinal: true       // ToDo: IB - Get this value from the cookie (is it complete or not...)
                     },
                     dataType: 'text',
                     success: function (data, textStatus, jqXHR) {
-                        var resumeLink = '@Url.Action("PatQueSurvey", "Survey", new { area="", surveyCode="__surveyCode__", sessionCode="__sessionCode__", lang="__language__" })';
+                        var resumeLink = '';
+                        if (!language || language == undefined || language == '' || language.length == 0) {
+                            resumeLink = '@Url.Action("PatQueSurvey", "Survey", new { area="", surveyCode="__surveyCode__", sessionCode="__sessionCode__" })';
+                        }
+                        else {
+                            resumeLink = '@Url.Action("PatQueSurvey", "Survey", new { area="", surveyCode="__surveyCode__", sessionCode="__sessionCode__", lang="__language__" })';
+                            resumeLink = resumeLink.replace("__language__", language);
+                        }
+
                         resumeLink = resumeLink.replace("__surveyCode__", codeSurveyId);
                         resumeLink = resumeLink.replace("__sessionCode__", data);
-                        resumeLink = resumeLink.replace("__language__", language);

                         var successMsg = 'If my friend created a button for Save-In-Progress, and you clicked it, you will be able to continue filling out this survey any time you like. To do so just click this link: __resumeLink__';
                         successMsg = successMsg.replace("__resumeLink__", resumeLink);


Improve comments

Improve comments

--- PrinterCommunication/PrinterConnectionAndCommunication.cs
+++ PrinterCommunication/PrinterConnectionAndCommunication.cs
@@ -1426,6 +1426,8 @@
             }
             else
             {
+                // If the serial port isn't avaiable (i.e. the specified port name wasn't found in GetPortNames()) or the serial
+                // port is already opened in another instance or process, then report the connection problem back to the user
                 connectionFailureMessage = (serialPortIsAlreadyOpen ?
                     LocalizedString.Get("Port already in use") :
                     LocalizedString.Get("Port not found"));


Draw preview boxes for all models The default cube was skipped before, as was the terrain (which needs it too as it can be selected via the scene view).

--- HedgeEdit/Viewport.cs
+++ HedgeEdit/Viewport.cs
@@ -758,21 +758,49 @@
                 UpdateBuffersFirstPass((prevRenderMode != RenderModes.Default));

                 // Render each preview box
+                bool hasUpdated;
+                DrawModelPreviewBoxes(Data.DefaultCube);
+
+                foreach (var mdl in Data.DefaultTerrainGroup)
+                {
+                    DrawModelPreviewBoxes(mdl.Value);
+                }
+
+                foreach (var group in Data.TerrainGroups)
+                {
+                    foreach (var mdl in group.Value)
+                    {
+                        DrawModelPreviewBoxes(mdl.Value);
+                    }
+                }
+
                 foreach (var mdl in Data.Objects)
                 {
-                    foreach (var instance in mdl.Value.Instances)
+                    DrawModelPreviewBoxes(mdl.Value);
+                }
+
+                // Reset RenderMode and PrimitiveTopology
+                RenderMode = prevRenderMode;
+                InputAssembler.PrimitiveTopology = PrimitiveTopology.TriangleList;
+
+                // Sub-Methods
+                void DrawModelPreviewBoxes(VPModel mdl)
+                {
+                    hasUpdated = false;
+                    foreach (var instance in mdl.Instances)
                     {
                         if (!SelectedInstances.Contains(instance))
                             continue;

-                        previewBox.Update(mdl.Value.BoundingBox.GetCorners());
+                        if (!hasUpdated)
+                        {
+                            previewBox.Update(mdl.BoundingBox.GetCorners());
+                            hasUpdated = true;
+                        }
+
                         previewBox.Draw(instance);
                     }
                 }
-
-                // Reset RenderMode and PrimitiveTopology
-                RenderMode = prevRenderMode;
-                InputAssembler.PrimitiveTopology = PrimitiveTopology.TriangleList;
             }
         }
     }


insert or replace test.

insert or replace test.

--- SQLitePCL.pretty.tests/OrmTests/TableMappingTests.Sync.cs
+++ SQLitePCL.pretty.tests/OrmTests/TableMappingTests.Sync.cs
@@ -211,6 +211,66 @@
                 Assert.Throws<SQLiteException>(() => db.InsertAll(table, result));
             }
         }
+
+        [Test]
+        public void TestInsertOrReplace()
+        {
+            var table = TableMapping.Create<TestObject>(
+                            () => testObjectBuilder.Value,
+                            o => ((TestObject.Builder)o).Build());
+
+            using (var db = SQLite3.OpenInMemory())
+            {
+                db.InitTable(table);
+
+                var inserted = db.Insert(table, new TestObject.Builder() { Value = "Hello" }.Build());
+                var changed = new TestObject.Builder() { Id = inserted.Id, Value = "Goodbye" }.Build();
+                var replaced = db.InsertOrReplace(table, changed);
+
+                Assert.AreEqual(inserted.Id, replaced.Id);
+                Assert.AreEqual(replaced.Value, "Goodbye");
+            }
+        }
+
+        [Test]
+        public void TestInsertOrReplaceAll()
+        {
+            var table = TableMapping.Create<TestObject>(
+                ()=> testObjectBuilder.Value,
+                o => ((TestObject.Builder) o).Build());
+
+            using (var db = SQLite3.OpenInMemory())
+            {
+
+                var objects = new List<TestObject>()
+                    {
+                        new TestObject.Builder() { Value = "Hello1" }.Build(),
+                        new TestObject.Builder() { Value = "Hello2" }.Build(),
+                        new TestObject.Builder() { Value = "Hello3" }.Build()
+                    };
+
+                db.InitTable(table);
+                var result = db.InsertAll(table, objects);
+                CollectionAssert.AreEquivalent(
+                    result.Select(x => x.Value),
+                    objects.Select(x => x.Value));
+                CollectionAssert.AllItemsAreUnique(result.Select(x => x.Id));
+
+                var changed = new List<TestObject>()
+                    {
+                        new TestObject.Builder() { Id = result[0].Id, Value = "Goodbye1" }.Build(),
+                        new TestObject.Builder() { Id = result[1].Id, Value = "Goodbye2" }.Build(),
+                        new TestObject.Builder() { Id = result[2].Id, Value = "Goodye3" }.Build()
+                    };
+                var replaced = db.InsertOrReplaceAll(table, changed);
+                CollectionAssert.AreEquivalent(
+                    replaced.Select(x => x.Id),
+                    result.Select(x => x.Id));
+                CollectionAssert.AreEquivalent(
+                    replaced.Select(x => x.Value),
+                    changed.Select(x => x.Value));
+            }
+        }
     }
 }


ToolBarButton groups fixes

ToolBarButton groups fixes

--- Signum.Windows/Operations/EntityOperationToolBarButton.cs
+++ Signum.Windows/Operations/EntityOperationToolBarButton.cs
@@ -83,7 +83,9 @@

             MenuItem menuItem = new MenuItem
             {
-                Header = eoc.OperationSettings.TryCC(os => os.Text) ?? (group == null ? eoc.OperationInfo.Key.NiceToString() : group.SimplifyName(eoc.OperationInfo.Key.NiceToString())),
+                Header = eoc.OperationSettings.TryCC(os => os.Text) ??
+                (group == null || group.SimplifyName == null ? eoc.OperationInfo.Key.NiceToString() :
+                 group.SimplifyName(eoc.OperationInfo.Key.NiceToString())),
                 Icon = man.GetImage(eoc.OperationInfo.Key, eoc.OperationSettings),
                 Tag = eoc.OperationInfo,
                 Background = man.GetBackground(eoc.OperationInfo, eoc.OperationSettings)
@@ -180,6 +182,8 @@
                 Background = group.Background,
             };

+            AutomationProperties.SetItemStatus(groupButton, "Group");
+
             if (group.AutomationName.HasText())
                 AutomationProperties.SetName(groupButton, group.AutomationName);


made tickGaps private

made tickGaps private

--- DemoInfo/DemoParser.cs
+++ DemoInfo/DemoParser.cs
@@ -264,11 +264,6 @@
 		public bool IsHeaderCorrupted { get; private set; }

 		/// <summary>
-		/// Used to sample gap in ticks when header is corrupted
-		/// </summary>
-		internal List<int> TickGaps = new List<int>();
-
-		/// <summary>
 		/// Gets the participants of this game
 		/// </summary>
 		/// <value>The participants.</value>
@@ -458,6 +453,7 @@
 		/// How long a tick of the demo is in s^-1
 		/// </summary>
 		/// <value>The tick time.</value>
+		private List<int> tickGaps = new List<int>();
 		private float _ticktime;
 		public float TickTime {
 			get { return IsHeaderCorrupted ? _ticktime : this.Header.PlaybackTime / this.Header.PlaybackFrames; }
@@ -575,12 +571,12 @@
 		private void FixTickTime()
 		{
 			// at the beginning of demos the tickgap can be erratic, so make sure we have 10 consecutive that are the same
-			int gap = TickGaps[1] - TickGaps[0];
+			int gap = tickGaps[1] - tickGaps[0];
 			bool isConsecutive = true;
-			for (int i = 1; i < TickGaps.Count - 1; i++) {
-				if (TickGaps[i + 1] - TickGaps[i] != gap)
+			for (int i = 1; i < tickGaps.Count - 1; i++) {
+				if (tickGaps[i + 1] - tickGaps[i] != gap)
 				{
-					TickGaps.Clear();
+					tickGaps.Clear();
 					isConsecutive = false;
 					break;
 				}
@@ -603,11 +599,11 @@
 			if (Header == null)
 				throw new InvalidOperationException ("You need to call ParseHeader first before you call ParseToEnd or ParseNextTick!");

-			int consecutiveGaps = 10;
 			if (IsHeaderCorrupted && _ticktime == 0 && IngameTick > 20) {
-				if (TickGaps.Count < consecutiveGaps)
-					TickGaps.Add(IngameTick);
-				else if (TickGaps.Count == consecutiveGaps)	{
+				int consecutiveGaps = 10;
+				if (tickGaps.Count < consecutiveGaps)
+					tickGaps.Add(IngameTick);
+				else if (tickGaps.Count == consecutiveGaps)	{
 					FixTickTime();
 				}
 			}


Renamed ParseLines to ParseLinesAs for readability

--- cs/src/markdom.cs/MarkdomGrammar.cs
+++ cs/src/markdom.cs/MarkdomGrammar.cs
@@ -325,7 +325,7 @@
 						var items = match.Product.Of2
 							.Select(itemBlockInfo =>
 								new UnorderedListItemNode(
-									ParseLines(Inlines, itemBlockInfo.Lines),
+									ParseLinesAs(Inlines, itemBlockInfo.Lines),
 									new MarkdomSourceRange(itemBlockInfo.SourceRange.Index, itemBlockInfo.SourceRange.Length, itemBlockInfo.SourceRange.Line, itemBlockInfo.SourceRange.LineIndex)))
 							.ToArray();
 						return new UnorderedListNode(items, MarkdomSourceRange.FromMatch(match));
@@ -339,7 +339,7 @@
 						var items = match.Product.Of2
 							.Select(itemBlockInfo =>
 								new UnorderedListItemNode(
-									ParseLines(Blocks, itemBlockInfo.Lines),
+									ParseLinesAs(Blocks, itemBlockInfo.Lines),
 									new MarkdomSourceRange(itemBlockInfo.SourceRange.Index, itemBlockInfo.SourceRange.Length, itemBlockInfo.SourceRange.Line, itemBlockInfo.SourceRange.LineIndex)))
 							.ToArray();
 						return new UnorderedListNode(items, MarkdomSourceRange.FromMatch(match));
@@ -393,7 +393,7 @@
 			Define(() => Paragraph,
 				AtLeast(1,
 					Reference(() => NonEmptyBlockLine),
-					match => new ParagraphNode(ParseLines(Inlines, match.Product), MarkdomSourceRange.FromMatch(match))));
+					match => new ParagraphNode(ParseLinesAs(Inlines, match.Product), MarkdomSourceRange.FromMatch(match))));

 			Define(() => NonEmptyBlockLine,
 				Sequence(
@@ -956,7 +956,7 @@
 							match => LineInfo.FromMatch(match)),
 						Reference(() => endBraces),
 						match => new DocumentLiteralExpression(
-							ParseLines(Blocks, match.Product.Of2.InArray()),
+							ParseLinesAs(Blocks, match.Product.Of2.InArray()),
 							MarkdomSourceRange.FromMatch(match)));
 				}));

@@ -1094,7 +1094,7 @@
 		}

 		private int _parseLinesCount = 0;
-		private T ParseLines<T>(IParsingExpression<T> expression, LineInfo[] lines) {
+		private T ParseLinesAs<T>(IParsingExpression<T> expression, LineInfo[] lines) {
 			_parseLinesCount++;
 			var expressionMatchingContext =
 				new MatchingContext(


Fix error in sheet generation that didn't do spillovers correctly for sheets that were not on the first 1024x1024 part.

------------------------------
Imported from Google Code.
Original SVN rev#: 286

--- csharp/Crayon/SpriteSheetBuilder.cs
+++ csharp/Crayon/SpriteSheetBuilder.cs
@@ -294,8 +294,8 @@
 						{
 							int thisTileId = tileId + rowOffset * 4 + colOffset;
 							tileIds.Add(thisTileId);
-							drawX.Add(image.GlobalX - 256 * x);
-							drawY.Add(image.GlobalY - 256 * y);
+							drawX.Add(image.SheetX - 256 * x);
+							drawY.Add(image.SheetY - 256 * y);
 						}
 					}


Suppression PoiModel

Suppression PoiModel


Cleanup and Bugfix

Cleanup and Bugfix

Cleanup code.
Dont draw empty button if there is no list available.

--- Indicator/QuickAdd.cs
+++ Indicator/QuickAdd.cs
@@ -16,6 +16,8 @@
 /// -------------------------------------------------------------------------
 /// Simon Pucher 2016
 /// -------------------------------------------------------------------------
+///
+/// -------------------------------------------------------------------------
 /// Namespace holds all indicators and is required. Do not change it.
 /// </summary>
 namespace AgenaTrader.UserCode
@@ -116,7 +118,7 @@

-
+

 		protected override void OnBarUpdate()
@@ -165,22 +167,26 @@

         #region Events

-        int counti = 0;
+      //  int counti = 0;

         public override void Plot(Graphics g, Rectangle r, double min, double max)
         {
             if (Bars == null || ChartControl == null) return;
-            counti = counti + 1;
-            Print(counti);
-
-
-            using (Font font1 = new Font("Arial", 10, FontStyle.Bold, GraphicsUnit.Point))
-            {
-                rect = new RectangleF(r.Width - 150, 10, 100, 30);
-                g.DrawString(_name_of_list, font1, brush, rect);
-                g.DrawRectangle(pen, Rectangle.Round(rect));
+            //counti = counti + 1;
+            //Print(counti);
+
+            //Only draw button if parameters are available.
+            if (this.Instrument != null && _list != null && _list.Count > 0)
+            {
+                    using (Font font1 = new Font("Arial", 10, FontStyle.Bold, GraphicsUnit.Point))
+                    {
+                        rect = new RectangleF(r.Width - 150, 10, 100, 30);
+                        g.DrawString(_name_of_list, font1, brush, rect);
+                        g.DrawRectangle(pen, Rectangle.Round(rect));
+                    }
             }
-
+
+
            // pen = Pens.Black;
            //rect = new Rectangle(r.Width - 100, 20 , 80, 60);
            // g.DrawRectangle(pen, rect);
@@ -214,10 +220,6 @@
             {
                 //Print("X = {0}, Y = {1}", e.X, e.Y);
                 //Print("X = {0}, Y = {1}", ChartControl.GetDateTimeByX(e.X), ChartControl.GetPriceByY(e.Y));
-
-                //ITextFixed txt = (ITextFixed)DrawObjects["MyText"];
-                //IText bubu;
-

                 Point cursorPos = new Point(e.X, e.Y);
                 if (rect.Contains(cursorPos))


expand created history for use in tests

expand created history for use in tests

--- AGO.Tasks/Model/Task/TaskModel.cs
+++ AGO.Tasks/Model/Task/TaskModel.cs
@@ -151,14 +151,14 @@

     	#endregion

-		public virtual void ChangeStatus(TaskStatus newStatus, UserModel changer)
+		public virtual TaskStatusHistoryModel ChangeStatus(TaskStatus newStatus, UserModel changer)
 		{
-			StatusChangeHelper.Change(this, newStatus, StatusHistory, changer);
+			return StatusChangeHelper.Change(this, newStatus, StatusHistory, changer);
 		}

-		public virtual void ChangeCustomStatus(CustomTaskStatusModel newStatus, UserModel changer)
+		public virtual CustomTaskStatusHistoryModel ChangeCustomStatus(CustomTaskStatusModel newStatus, UserModel changer)
 		{
-			StatusChangeHelper.Change(this, newStatus, CustomStatusHistory, changer, m => m.CustomStatus);
+			return StatusChangeHelper.Change(this, newStatus, CustomStatusHistory, changer, m => m.CustomStatus);
 		}
     }
 }


refactoring

refactoring

--- AgentService/AgentServiceClass.cs
+++ AgentService/AgentServiceClass.cs
@@ -240,18 +240,24 @@
 		{
 			try
 			{
-				// signal the process to close
-				var stopEvent = EventWaitHandle.OpenExisting(process.ProcessName + process.Id);
-				stopEvent.Set();
-
-				process.WaitForExit(3 * 1000);
+				try
+				{
+					// signal the process to close
+					var stopEvent = EventWaitHandle.OpenExisting(process.ProcessName + process.Id);
+					stopEvent.Set();
+				}
+				catch (Exception exc)
+				{
+					Report(exc);
+				}
+
+				if (!process.WaitForExit(3*1000))
+					process.Kill();
 			}
 			catch (Exception exc)
 			{
 				Report(exc);
 			}
-
-			process.Kill();
 		}

 		private void StopPlugin(string name)


Updated TODO comment

Updated TODO comment

--- AgilePoker/Views/Home/Room.cshtml
+++ AgilePoker/Views/Home/Room.cshtml
@@ -15,7 +15,9 @@

      }

-
+
     @Html.LabelFor(model => model.SelectedCard)
     @Html.DropDownListFor(model => model.SelectedCardValue, new SelectList(Model.PlayingCards, "Value", "ToolTip", Model.SelectedCardValue))


Used BL instead of AL.

Used BL instead of AL.

--- main.cs
+++ main.cs
@@ -43,14 +43,14 @@

 // The canvas needs to be initialized before any gui scripts are run since
 // some of the controls assume that the canvas exists at load time.
-createCanvas("T3D: Empty");
+createCanvas("T3Dbones");

 // Start rendering and stuff.
 initRenderManager();
-initLightingSystems("Advanced Lighting");
+initLightingSystems("Basic Lighting");

-// Start PostFX. If you use "Basic Lighting" above, you can get rid of this.
-initPostEffects();
+// Start PostFX. If you use "Advanced Lighting" above, uncomment this.
+//initPostEffects();

 // Start audio.
 sfxStartup();


make sure we can construct the generic method

--- src/AutoMapper/TypeDetails.cs
+++ src/AutoMapper/TypeDetails.cs
@@ -81,13 +81,14 @@
                 genericInterfaces.Add(Type);

             explicitExtensionMethods.AddRange(
-                from method in sourceExtensionMethodSearchArray.Where(method => method.IsGenericMethodDefinition)
-                let parameterType = method.GetParameters()[0].ParameterType
-                let interfaceMatch = genericInterfaces
-                    .Where(t => t.GetGenericParameters().Length == parameterType.GetTypeInfo().GenericTypeArguments.Length)
-                    .FirstOrDefault(t => method.MakeGenericMethod(t.GetTypeInfo().GenericTypeArguments).GetParameters()[0].ParameterType.GetTypeInfo().IsAssignableFrom(t.GetTypeInfo()))
-                where interfaceMatch != null
-                select method.MakeGenericMethod(interfaceMatch.GetTypeInfo().GenericTypeArguments));
+                from genericMethod in sourceExtensionMethodSearchArray.Where(method => method.IsGenericMethodDefinition)
+                    let firstParameterType = genericMethod.GetParameters()[0].ParameterType
+                from genericInterface in genericInterfaces
+                where genericInterface.GetGenericParameters().Length == firstParameterType.GetTypeInfo().GenericTypeArguments.Length &&
+                          genericMethod.GetGenericArguments().Length == genericInterface.GetTypeInfo().GenericTypeArguments.Length
+                    let methodMatch = genericMethod.MakeGenericMethod(genericInterface.GetTypeInfo().GenericTypeArguments)
+                where methodMatch.GetParameters()[0].ParameterType.GetTypeInfo().IsAssignableFrom(genericInterface.GetTypeInfo())
+                select methodMatch);

             return explicitExtensionMethods;
         }


fix for xml

fix for xml

--- src/Avalonia.Visuals/Point.cs
+++ src/Avalonia.Visuals/Point.cs
@@ -110,10 +110,10 @@
         }

         /// <summary>
-        /// Add a cortege off double numbers
-        /// </summary>
-        /// <param name="a">The point.</param>
-        /// <param name="b">cortege off doubles</param>
+        /// Add a 2-tuple of double
+        /// </summary>
+        /// <param name="a">The point.</param>
+        /// <param name="b">2-tuple of double</param>
         /// <returns>A point that is the result of the addition.</returns>
         public static Point operator +(Point a, (double x, double y) b)
         {
@@ -154,10 +154,10 @@
         }

         /// <summary>
-        /// Subtracts a cortege off double numbers
-        /// </summary>
-        /// <param name="a">The point.</param>
-        /// <param name="b">cortege off doubles</param>
+        /// Subtracts a 2-tuple of double
+        /// </summary>
+        /// <param name="a">The point.</param>
+        /// <param name="b">2-tuple of double</param>
         /// <returns>A point that is the result of the subtraction.</returns>
         public static Point operator -(Point a, (double x, double y) b)
         {
@@ -192,10 +192,10 @@
         public static Point operator *(double k, Point p) => new Point(p.X * k, p.Y * k);

         /// <summary>
-        /// Multiplies a cortege off double numbers
-        /// </summary>
-        /// <param name="a">The point.</param>
-        /// <param name="b">cortege off doubles</param>
+        /// Multiplies a 2-tuple of double
+        /// </summary>
+        /// <param name="a">The point.</param>
+        /// <param name="b">2-tuple of double</param>
         /// <returns>Points having its coordinates multiplied.</returns>
         public static Point operator *(Point a, (double x, double y) b)
         {
@@ -211,10 +211,10 @@
         public static Point operator /(Point p, double k) => new Point(p.X / k, p.Y / k);

         /// <summary>
-        /// Divides a point by a cortege off double numbers
-        /// </summary>
-        /// <param name="a">The point.</param>
-        /// <param name="b">cortege off doubles</param>
+        /// Divides a point by a 2-tuple of doubles
+        /// </summary>
+        /// <param name="a">The point.</param>
+        /// <param name="b">2-tuple of double</param>
         /// <returns>Points having its coordinates divided</returns>
         public static Point operator /(Point a, (double x, double y) b)
         {
@@ -346,11 +346,11 @@
         }

         /// <summary>
-        /// Returns a boolean indicating whether the point is equal to cortege off double numbers.
-        /// </summary>
-        /// <param name="other">ortege off double numbers</param>
+        /// Returns a boolean indicating whether the point coordinates are equal to 2-tuple of double
+        /// </summary>
+        /// <param name="other">2-tuple of double</param>
         /// <returns>
-        /// True if <paramref name="other"/> is cortege off double numbersthat equals the current point.
+        /// True if <paramref name="other"/> is 2-tuple of double equals coordinates current point.
         /// </returns>
         public bool Equals((double x, double y) other)
         {
@@ -359,7 +359,7 @@
         }

         /// <summary>
-        /// Gets a value indicating that Point coordinatrs is zero
+        /// Gets a value indicating that point coordinates are zero
         /// </summary>
         public bool IsDefault
         {


Fixed ActivateTransientChildIfNeeded

Fixed ActivateTransientChildIfNeeded

--- src/Avalonia.X11/X11Window.cs
+++ src/Avalonia.X11/X11Window.cs
@@ -775,10 +775,10 @@
             if (_disabled)
             {
                 GotInputWhenDisabled?.Invoke();
-                return false;
-            }
-
-            return true;
+                return true;
+            }
+
+            return false;
         }

         public void SetParent(IWindowImpl parent)


Call XFlush after XMapWindow

Call XFlush after XMapWindow

--- src/Avalonia.X11/X11Window.cs
+++ src/Avalonia.X11/X11Window.cs
@@ -507,7 +507,11 @@
         }

-        public void Show() => XMapWindow(_x11.Display, _handle);
+        public void Show()
+        {
+            XMapWindow(_x11.Display, _handle);
+            XFlush(_x11.Display);
+        }

         public void Hide() => XUnmapWindow(_x11.Display, _handle);


Fixed a double-string for a timer

Fixed a double-string for a timer

--- Duplicati/Library/Main/Controller.cs
+++ Duplicati/Library/Main/Controller.cs
@@ -255,7 +255,7 @@
             {
                 m_currentTask = result;
                 m_currentTaskThread = System.Threading.Thread.CurrentThread;
-                using(new Logging.Timer(string.Format("Running {0} took", result.MainOperation)))
+                using(new Logging.Timer(string.Format("Running {0}", result.MainOperation)))
                 {
                     SetupCommonOptions(result, ref paths);
                     OperationRunning(true);


Remove unnecessary method overload.

Remove unnecessary method overload.

--- Duplicati/Library/Utility/Utility.cs
+++ Duplicati/Library/Utility/Utility.cs
@@ -152,7 +152,7 @@
         /// <returns>A list of the full filenames and foldernames. Foldernames ends with the directoryseparator char</returns>
         public static IEnumerable<string> EnumerateFileSystemEntries(string basepath)
         {
-            return EnumerateFileSystemEntries(basepath, (rootpath, path, attributes) => true);
+            return EnumerateFileSystemEntries(basepath, (rootpath, path, attributes) => true, SystemIO.IO_OS.GetDirectories, Directory.GetFiles, null);
         }

         /// <summary>
@@ -176,18 +176,6 @@
         /// <param name="path">The path that produced the error</param>
         /// <param name="ex">The exception for the error</param>
         public delegate void ReportAccessError(string rootpath, string path, Exception ex);
-
-        /// <summary>
-        /// Returns a list of all files found in the given folder.
-        /// The search is recursive.
-        /// </summary>
-        /// <param name="rootpath">The folder to look in</param>
-        /// <param name="callback">The function to call with the filenames</param>
-        /// <returns>A list of the full filenames</returns>
-        public static IEnumerable<string> EnumerateFileSystemEntries(string rootpath, EnumerationFilterDelegate callback)
-        {
-            return EnumerateFileSystemEntries(rootpath, callback, SystemIO.IO_OS.GetDirectories, Directory.GetFiles, null);
-        }

         /// <summary>
         /// Returns a list of all files found in the given folder.


Changed type of Value property

Changed type of Value property

Changed the type of the Value property from JObject to object, as other possible types are JArray and JValue.

--- commercetools.Core/Products/Attribute.cs
+++ commercetools.Core/Products/Attribute.cs
@@ -1,4 +1,4 @@
-using System;
+using System;

 using Newtonsoft.Json;
 using Newtonsoft.Json.Linq;
@@ -17,7 +17,7 @@
         public string Name { get; private set; }

         [JsonProperty(PropertyName = "value")]
-        public JObject Value { get; private set; }
+        public object Value { get; private set; }

         #endregion

@@ -35,9 +35,9 @@
             }

             this.Name = data.name;
-            this.Value = new JObject(data.value);
+            this.Value = data.value;
         }

         #endregion
     }
-}+}


Value is an attribute

Value is an attribute

--- AngleSharp/DOM/Html/Forms/HTMLTextFormControlElement.cs
+++ AngleSharp/DOM/Html/Forms/HTMLTextFormControlElement.cs
@@ -11,7 +11,6 @@
     {
         #region Fields

-        String _value;
         SelectionType _direction;
         Int32 _start;
         Int32 _end;
@@ -74,8 +73,8 @@
         /// </summary>
         public String Value
         {
-            get { return _value ?? DefaultValue; }
-            set { _value = value; }
+            get { return GetAttribute(AttributeNames.Value) ?? DefaultValue; }
+            set { SetAttribute(AttributeNames.Value, value); }
         }

         /// <summary>
@@ -249,7 +248,7 @@
         /// </summary>
         internal override void Reset()
         {
-            _value = null;
+            Value = null;
             Select(Int32.MaxValue, Int32.MaxValue);
         }


Timestamps in log

Timestamps in log

--- src/ClientsState/Functions.cs
+++ src/ClientsState/Functions.cs
@@ -159,16 +159,17 @@

         private static void l(string message, params object[] arg)
         {
+            var formatedMessage = $"[{DateTime.UtcNow.ToShortTimeString()}]\t{message}";
             if (arg == null)
             {
-                Console.Out.WriteLine(message);
+                Console.Out.WriteLine(formatedMessage);
                 if (scm_logger != null)
-                    scm_logger.WriteLine(message);
+                    scm_logger.WriteLine(formatedMessage);
             }
             else {
-                Console.Out.WriteLine(message, arg);
+                Console.Out.WriteLine(formatedMessage, arg);
                 if (scm_logger != null)
-                    scm_logger.WriteLine(message);
+                    scm_logger.WriteLine(formatedMessage, arg);
             }
         }
     }


issue 57 do not prompt for save when opening New Window

--- Ior/Forms/MainForm.cs
+++ Ior/Forms/MainForm.cs
@@ -748,9 +748,6 @@
         }

         private void newWindowToolStripMenuItem_Click(object sender, EventArgs e) {
-            if(!promptForSaveIfNeeded())
-                return;
-
             var appPath = System.Reflection.Assembly.GetEntryAssembly().Location;
             System.Diagnostics.Process.Start(appPath);
         }


:anger: Fix missing minified regex sequences


still having _transport is null issues. starting to think it is part of an overly aggressive GC routine.  issue #40

--- src/Connections/Connection.cs
+++ src/Connections/Connection.cs
@@ -46,6 +46,9 @@
 				case ConnectionType.Framed:
 					_transport = new TFramedTransport(socket);
 					break;
+
+				default:
+					goto case ConnectionType.Framed;
 			}

 			_protocol = new TBinaryProtocol(_transport);
@@ -77,11 +80,11 @@
 		{
 			get
 			{
+				if (_transport == null)
+					return false;
+
 				lock (_transport)
 				{
-					if (_transport == null)
-						return false;
-
 					try { return _transport.IsOpen; }
 					catch { return false; }
 				}


Now only successfully type-checked values are added to the PMap returned from TryParse(), remove checks and add directly to KeyValueMapping.

--- Eutherion/Win/Storage/SettingCopy.cs
+++ Eutherion/Win/Storage/SettingCopy.cs
@@ -189,15 +189,13 @@

             if (parser.TryParse(Schema, out PMap map, out List<JsonErrorInfo> errors))
             {
+                // Error tolerance:
+                // 1) Even if there are errors, still load the map.
+                // 2) Don't clear the existing settings, only overwrite them.
+                //    The map might not contain all expected properties.
                 foreach (var kv in map)
                 {
-                    if (Schema.TryGetProperty(new SettingKey(kv.Key), out SettingProperty property))
-                    {
-                        if (Schema.ContainsProperty(property) && property.IsValidValue(kv.Value))
-                        {
-                            KeyValueMapping[property.Name.Key] = kv.Value;
-                        }
-                    }
+                    KeyValueMapping[kv.Key] = kv.Value;
                 }
             }


Removed most references to Config.Separator, replaced with Path.Combine(). Added ReaderWriterLock to cache register access.

--- EveLib.Core/Cache/EveLibFileCache.cs
+++ EveLib.Core/Cache/EveLibFileCache.cs
@@ -6,6 +6,7 @@
 using System.Linq;
 using System.Security.Cryptography;
 using System.Text;
+using System.Threading;
 using System.Threading.Tasks;
 using eZet.EveLib.Core.Util;

@@ -18,11 +19,11 @@

         private readonly IDictionary<string, DateTime> _register = new Dictionary<string, DateTime>();

-        private readonly TraceSource _trace = new TraceSource("EveLib", SourceLevels.All);
-
-        private object _initLock = new object();
+        private readonly TraceSource _trace = new TraceSource("EveLib");
+
         private bool _isInitialized;

+        private readonly ReaderWriterLockSlim _registerLock = new ReaderWriterLockSlim();

         /// <summary>
         ///     Initializes a new instance of the <see cref="EveLibFileCache" /> class.
@@ -95,15 +96,14 @@
                 _trace.TraceEvent(TraceEventType.Verbose, 0, "EveLibFileCache:CacheIsValid: {0} ({1})", validCache,
                     cacheExpirationTime);
                 if (validCache) {
-                    var filePath = CachePath + Config.Separator + hash;
+                    var filePath = Path.Combine(CachePath , hash);
                     var fileExist = File.Exists(filePath);
                     _trace.TraceEvent(TraceEventType.Verbose, 0, "EveLibFileCache:CacheDataFound: {0}", fileExist);
                     if (File.Exists(filePath)) {
                         try {
                             data =
                                 await
-                                    AsyncFileUtilities.ReadAllTextAsync(CachePath + Config.Separator +
-                                                                        getHash(uri))
+                                    AsyncFileUtilities.ReadAllTextAsync(Path.Combine(CachePath, getHash(uri)))
                                         .ConfigureAwait(false);
                             _trace.TraceEvent(TraceEventType.Verbose, 0,
                                 "EveLibFileCache:Data successfully loaded from cache: {0}",
@@ -131,6 +131,10 @@
             return _register.TryGetValue(key, out value);
         }

+        /// <summary>
+        /// initialize as an asynchronous operation.
+        /// </summary>
+        /// <returns>Task.</returns>
         private async Task initAsync() {
             if (_isInitialized) return;
             await loadRegisterFromDiskAsync().ConfigureAwait(false);
@@ -139,13 +143,16 @@

         private Task writeRegisterToDiskAsync() {
             _trace.TraceEvent(TraceEventType.Verbose, 0, "EveLibFileCache:Writing cache register to disk");
-            return AsyncFileUtilities.WriteAllLinesAsync(CacheRegister,
+            _registerLock.EnterWriteLock();
+            var task = AsyncFileUtilities.WriteAllLinesAsync(CacheRegister,
                 _register.Select(x => x.Key + "," + x.Value.ToString(CultureInfo.InvariantCulture)));
+            _registerLock.ExitWriteLock();
+            return task;
         }

         private Task writeCacheDataToDiskAsync(Uri uri, string data) {
             _trace.TraceEvent(TraceEventType.Verbose, 0, "EveLibFileCache:Writing cache data to disk: {0}", uri);
-            return AsyncFileUtilities.WriteAllTextAsync(CachePath + Config.Separator + getHash(uri),
+            return AsyncFileUtilities.WriteAllTextAsync(Path.Combine(CachePath, getHash(uri)),
                 data);
         }

@@ -171,8 +178,10 @@
             }
             try {
                 // read all lines
+                _registerLock.EnterReadLock();
                 var data = await
                     AsyncFileUtilities.ReadAllLinesAsync(CacheRegister).ConfigureAwait(false);
+                _registerLock.ExitReadLock();
                 foreach (var entry in data) {
                     var split = entry.Split(new[] {','}, StringSplitOptions.RemoveEmptyEntries);
                     var cacheValidUntil = DateTime.Parse(split[1], CultureInfo.InvariantCulture);
@@ -182,8 +191,9 @@
                         _register[fileName] = cacheValidUntil;
                     else {
                         // if cache is out of date we delete the data
-                        if (File.Exists(CachePath + Config.Separator + fileName)) {
-                            File.Delete(CachePath + Config.Separator + fileName);
+                        var file = Path.Combine(CachePath, fileName);
+                        if (File.Exists(file)) {
+                            File.Delete(file);
                         }
                     }
                 }


Rename params

Rename params

--- AnimatorComponent/Editor/AnimationPathAnimatorEditor.cs
+++ AnimatorComponent/Editor/AnimationPathAnimatorEditor.cs
@@ -1259,14 +1259,14 @@
         ///     Adjust ease values to path length. Making path longer will decrease ease values
         ///     to  maintain constant speed.
         /// </summary>
-        /// <param name="oldAnimGoLinearLength">Anim. Go path length before path update.</param>
-        /// <param name="newAnimGoLinearLength">Anim. Go path length after path update.</param>
+        /// <param name="oldAnimGoLength">Anim. Go path length before path update.</param>
+        /// <param name="newAnimGoLength">Anim. Go path length after path update.</param>
         private void DistributeEaseValues(
-            float oldAnimGoLinearLength,
-            float newAnimGoLinearLength) {
+            float oldAnimGoLength,
+            float newAnimGoLength) {

             // Calculate multiplier.
-            var multiplier = oldAnimGoLinearLength / newAnimGoLinearLength;
+            var multiplier = oldAnimGoLength / newAnimGoLength;

             // Multiply each single ease value.
             Script.PathData.MultiplyEaseCurveValues(multiplier);


Updated OnGameOverlayActivated.

Updated OnGameOverlayActivated.

Updated to OnGameOverlayActivated?.Invoke( x.Active != 0 ) )

--- Facepunch.Steamworks/SteamFriends.cs
+++ Facepunch.Steamworks/SteamFriends.cs
@@ -42,7 +42,7 @@
 			FriendStateChange_t.Install( x => OnPersonaStateChange?.Invoke( new Friend( x.SteamID ) ) );
 			GameRichPresenceJoinRequested_t.Install( x => OnGameRichPresenceJoinRequested?.Invoke( new Friend( x.SteamIDFriend), x.ConnectUTF8() ) );
 			GameConnectedFriendChatMsg_t.Install( OnFriendChatMessage );
-			GameOverlayActivated_t.Install( x => OnGameOverlayActivated?.Invoke(x.Active == 0 ? false : true) );
+			GameOverlayActivated_t.Install( x => OnGameOverlayActivated?.Invoke( x.Active != 0 ) );
 			GameServerChangeRequested_t.Install( x => OnGameServerChangeRequested?.Invoke( x.ServerUTF8(), x.PasswordUTF8() ) );
 			GameLobbyJoinRequested_t.Install( x => OnGameLobbyJoinRequested?.Invoke( new Lobby( x.SteamIDLobby ), x.SteamIDFriend ) );
 			FriendRichPresenceUpdate_t.Install( x => OnFriendRichPresenceUpdate?.Invoke( new Friend( x.SteamIDFriend ) ) );


Added ScaleBy to handle overlapping scaling

--- Assets/AutoMotion/Scripts/Auto.cs
+++ Assets/AutoMotion/Scripts/Auto.cs
@@ -80,7 +80,30 @@
 	public static IEnumerator ScaleFrom(this Transform transform, Vector3 target, float duration, EaseType ease)
 	{
 		return ScaleFrom(transform, target, duration, Ease.FromType(ease));
-	}
+	}
+
+    public static IEnumerator ScaleBy(this Transform transform, Vector3 scaleBy, float duration, Easer ease)
+    {
+        float elapsed = 0;
+        float previousCurvePos = 0;
+        float curvePos = 0;
+        while (elapsed < duration)
+        {
+            elapsed = Mathf.MoveTowards(elapsed, duration, Time.deltaTime);
+            curvePos = ease(elapsed / duration);
+            transform.localScale += scaleBy * (curvePos - previousCurvePos);
+            previousCurvePos = curvePos;
+            yield return null;
+        }
+    }
+    public static IEnumerator ScaleBy(this Transform transform, Vector3 scaleBy, float duration)
+    {
+        return ScaleBy(transform, scaleBy, duration, Ease.Linear);
+    }
+    public static IEnumerator ScaleBy(this Transform transform, Vector3 scaleBy, float duration, EaseType ease)
+    {
+        return ScaleBy(transform, scaleBy, duration, Ease.FromType(ease));
+    }

 	public static IEnumerator RotateTo(this Transform transform, Quaternion target, float duration, Easer ease)
 	{


Added description to AssemblyInfo.cs

Added description to AssemblyInfo.cs

--- src/yEnc/Properties/AssemblyInfo.cs
+++ src/yEnc/Properties/AssemblyInfo.cs
@@ -2,7 +2,7 @@
 using System.Reflection;

 [assembly: AssemblyTitle("yEnc")]
-[assembly: AssemblyDescription("")]
+[assembly: AssemblyDescription("A tiny library for yEncoding and decoding with .NET")]
 [assembly: AssemblyCompany("Kristian Hellang")]
 [assembly: AssemblyProduct("yEnc")]
 [assembly: AssemblyCopyright("Copyright © Kristian Hellang 2015")]


Parse base 64 string prefixes other than application/octet-stream

--- Assets/GLTF/Scripts/GLTFLoader.cs
+++ Assets/GLTF/Scripts/GLTFLoader.cs
@@ -1,6 +1,7 @@
 using UnityEngine;
 using System.Collections.Generic;
 using System.Collections;
+using System.Text.RegularExpressions;
 using System;
 using UnityEngine.Networking;
 using UnityEngine.Rendering;
@@ -406,7 +407,7 @@
 			return material;
 		}

-		private const string Base64StringInitializer = "data:application/octet-stream;base64,";
+		private const string Base64StringInitializer = "^data:[a-z-]+/[a-z-]+;base64,";

 		/// <summary>
 		///  Get the absolute path to a gltf uri reference.
@@ -428,9 +429,11 @@
 			{
 				var uri = image.Uri;

-				if (uri.StartsWith(Base64StringInitializer))
-				{
-					var base64Data = uri.Substring(Base64StringInitializer.Length);
+				Regex regex = new Regex(Base64StringInitializer);
+				Match match = regex.Match(uri);
+				if (match.Success)
+				{
+					var base64Data = uri.Substring(match.Length);
 					var textureData = Convert.FromBase64String(base64Data);
 					texture = new Texture2D(0, 0);
 					texture.LoadImage(textureData);
@@ -473,9 +476,11 @@
 				byte[] bufferData;
 				var uri = buffer.Uri;

-				if (uri.StartsWith(Base64StringInitializer))
-				{
-					var base64Data = uri.Substring(Base64StringInitializer.Length);
+				Regex regex = new Regex(Base64StringInitializer);
+				Match match = regex.Match(uri);
+				if (match.Success)
+				{
+					var base64Data = uri.Substring(match.Length);
 					bufferData = Convert.FromBase64String(base64Data);
 				}
 				else


Getting a very basic Database Context up. Need to access this result

--- src/DataCat.Core/DbContext.cs
+++ src/DataCat.Core/DbContext.cs
@@ -1,15 +1,31 @@
-using MongoDB.Driver;
+namespace DataCat.Core
+{
+    using MongoDB.Bson;
+    using MongoDB.Driver;
+    using System;

-namespace DataCat.Core
-{
     public class DbContext
     {
         private MongoClient mongoClient;
         public IMongoDatabase Database { get; private set; }

-        public DbContext()
+        public DbContext(string connectionString, string databaseName)
         {
-
+            if (string.IsNullOrWhiteSpace(connectionString))
+                throw new ArgumentException($"{nameof(connectionString)} is null or whitespace");
+
+            if (string.IsNullOrWhiteSpace(databaseName))
+                throw new ArgumentException($"{nameof(databaseName)} is null or whitespace");
+
+            var mongoUrlBuilder = new MongoUrlBuilder(connectionString);
+            mongoClient = new MongoClient(mongoUrlBuilder.ToMongoUrl());
+
+            Database = mongoClient.GetDatabase(databaseName);
+        }
+
+        public IMongoCollection<BsonDocument> GetCollection(string collectionName)
+        {
+            return Database.GetCollection<BsonDocument>(collectionName);
         }
     }
 }


Add method overloads to table.cs createTable method

--- src/Daterpillar.Core/Table.cs
+++ src/Daterpillar.Core/Table.cs
@@ -88,7 +88,24 @@

         public Column CreateColumn()
         {
-            var newColumn = new Column() { TableRef = this };
+            return CreateColumn("", new DataType("INTEGER", 32, 0), false, false);
+        }
+
+        public Column CreateColumn(string name)
+        {
+            return CreateColumn(name, new DataType("INTEGER", 32, 0), false, false);
+        }
+
+        public Column CreateColumn(string name, DataType type, bool autoIncrement = false, bool nullable = false)
+        {
+            var newColumn = new Column()
+            {
+                TableRef = this,
+                Name = name,
+                DataType = type,
+                AutoIncrement = autoIncrement,
+                IsNullable = nullable
+            };
             Columns.Add(newColumn);

             return newColumn;


Only check declaringType string for null

--- src/DotNet/FullNameCreator.cs
+++ src/DotNet/FullNameCreator.cs
@@ -1189,11 +1189,11 @@
 			CreateFullName(fieldSig == null ? null : fieldSig.Type);
 			sb.Append(' ');

-			if (!string.IsNullOrEmpty(declaringType)) {
+			if (declaringType != null) {
 				sb.Append(declaringType);
 				sb.Append("::");
 			}
-			if (!string.IsNullOrEmpty(name))
+			if (name != null)
 				sb.Append(name);
 		}

@@ -1205,7 +1205,7 @@

 			CreateFullName(methodSig.RetType);
 			sb.Append(' ');
-			if (!string.IsNullOrEmpty(declaringType)) {
+			if (declaringType != null) {
 				sb.Append(declaringType);
 				sb.Append("::");
 			}


Fixing unquoted csv read limit.

Fixing unquoted csv read limit.

--- Assets/Scripts/Content/IniRead.cs
+++ Assets/Scripts/Content/IniRead.cs
@@ -228,7 +228,11 @@
                     // Check if the string is quoted
                     if (returnValue.Length == 0 || returnValue[0] != '\"')
                     {
-                        return returnValue;
+                        if (returnValue.IndexOf(',') == -1)
+                        {
+                            return returnValue;
+                        }
+                        return returnValue.Substring(0, returnValue.IndexOf(','));
                     }

                     // Find the end of the element


fixed bug where pausing and unpausing meant the dropdownmenu wouldn't show next pause

--- Assets/Scripts/UI/DropdownMenu.cs
+++ Assets/Scripts/UI/DropdownMenu.cs
@@ -130,6 +130,7 @@
         {
             if (!bEnteringScreen)
             {
+                state = States.Hidden;
                 StartCoroutine(Bounce(-0.7f));
                 yield return new WaitForSecondsRealtime(BounceDuration);
             }


fixed empty output xml after validation #1

--- src/Engine/TransformEngine.cs
+++ src/Engine/TransformEngine.cs
@@ -42,6 +42,7 @@
 					{
 						var tmpStream = new MemoryStream();
 						workDoc.Save(tmpStream);
+						tmpStream.Position = 0;
 						streamDestination.Save(tmpStream, name);
 					}


Copy files to MacPro and checking connection with this script

--- Assets/_MyScripts/IdentifyItem.cs
+++ Assets/_MyScripts/IdentifyItem.cs
@@ -158,8 +158,9 @@
 				string tmpName = hit.collider.gameObject.name;

 				Renderer rend =hit.collider.gameObject.GetComponent(typeof (Renderer)) as Renderer;
-
-
+				GameObject CP = GameObject.Find("ColorPickerPrefab");;
+
+				GameObject Pic  = Instantiate ( CP, hit.point, Quaternion.LookRotation (hit.normal)) as GameObject;

 				string colr =  rend.material.color.ToString();
 				Debug.Log("material of selected object is " + colr);


Bug fix: Moonjump in hard scene

Bug fix: Moonjump in hard scene

Fixed moonjump bug, thanks go to Ktululz for the help

--- Assets/Microgames/MoneyTrap/Scripts/MoneyTrapPeople4.cs
+++ Assets/Microgames/MoneyTrap/Scripts/MoneyTrapPeople4.cs
@@ -36,7 +36,7 @@

     [Header("Jumping gravity")]
     [SerializeField]
-    private float gravity = 0.1f;
+    private float gravity;

     [Header("Hopping audio clip")]
     [SerializeField]
@@ -66,6 +66,8 @@
     //Store jump speedup progress
     private float speedup = 0;
     //var for late starting
+    private float latestart = 1;
+    //var for playing death sound once
     private bool hasPlayedDeathsound = false;

     // Use this for initialization
@@ -88,18 +90,20 @@
     }

     // Update is called once per frame
-    void Update ()
+    void Update()
     {
-
+        transform.position = new Vector2(transform.position.x, transform.position.y);
+
         string debug = ""; //DEBUG

         //if this person is still not trapped
         if (state != State.Falling)
         {
-            debug = debug + "State: not falling" + System.Environment.NewLine; //DEBUG

             //if person is following
             if (state == State.Following) {
+
+                debug = debug + "State: following to the "; //DEBUG

                 //get the direction towards player from this object's position and turn sprite accordingly
                 trajectory = (target.transform.position - transform.position).normalized;
@@ -107,16 +111,22 @@
                 {
                     SpriteRenderer sr = gameObject.GetComponent<SpriteRenderer>();
                     sr.flipX = true;
+
+                    debug = debug + "right" + System.Environment.NewLine; //DEBUG
                 }
                 else if (target.transform.position.x < transform.position.x)
                 {
                     SpriteRenderer sr = gameObject.GetComponent<SpriteRenderer>();
                     sr.flipX = false;
+
+                    debug = debug + "left" + System.Environment.NewLine; //DEBUG
                 }

                 //has to make a new jump if continues following
                 if (isGrounded())
                 {
+                    debug = debug + "On the ground, "; //DEBUG
+
                     //if person isn't too far away from the jewel
                     if (Mathf.Abs(transform.position.x - target.transform.position.x) < proximityFollow)
                     {


Also un-assign driver/a-driver if re-assigned elsewhere

Fixes #194

--- Battery-Commander.Web/Controllers/VehiclesController.cs
+++ Battery-Commander.Web/Controllers/VehiclesController.cs
@@ -141,7 +141,12 @@
                 }
                 else
                 {
+                    // TODO This is sloppy, should probably be a better way
+
                     if (vehicle.DriverId == driverId) vehicle.DriverId = null;
+                    if (vehicle.A_DriverId == driverId) vehicle.A_DriverId = null;
+
+                    if (vehicle.DriverId == adriverId) vehicle.DriverId = null;
                     if (vehicle.A_DriverId == adriverId) vehicle.A_DriverId = null;
                 }


Removed POST from logout

Removed POST from logout

--- CmsEngine.Ui/Areas/Cms/Controllers/AccountController.cs
+++ CmsEngine.Ui/Areas/Cms/Controllers/AccountController.cs
@@ -238,8 +238,6 @@
             return View(model);
         }

-        [HttpPost]
-        [ValidateAntiForgeryToken]
         public async Task<IActionResult> Logout()
         {
             await _signInManager.SignOutAsync();


*** empty log message ***

*** empty log message ***

--- Csla20Test/Csla.Test/ValidationRules/ValidationTests.cs
+++ Csla20Test/Csla.Test/ValidationRules/ValidationTests.cs
@@ -74,6 +74,77 @@
         }

         [TestMethod()]
+        public void TestValidationAfterEditCycle()
+        {
+            //should work since ValidationRules.CheckRules() is called in DataPortal_Create
+            Csla.ApplicationContext.GlobalContext.Clear();
+            HasRulesManager root = HasRulesManager.NewHasRulesManager();
+            Assert.AreEqual("<new>", root.Name);
+            Assert.AreEqual(true, root.IsValid, "should be valid on create");
+            Assert.AreEqual(0, root.BrokenRulesCollection.Count);
+
+            root.BeginEdit();
+            root.Name = "";
+            Assert.AreEqual("", root.Name);
+            Assert.AreEqual(false, root.IsValid);
+            Assert.AreEqual(1, root.BrokenRulesCollection.Count);
+            Assert.AreEqual("Name required", root.BrokenRulesCollection[0].Description);
+            root.BeginEdit();
+            root.Name = "Begin 1";
+            Assert.AreEqual("Begin 1", root.Name);
+            Assert.AreEqual(true, root.IsValid);
+            Assert.AreEqual(0, root.BrokenRulesCollection.Count);
+            root.BeginEdit();
+            root.Name = "Begin 2";
+            Assert.AreEqual("Begin 2", root.Name);
+            Assert.AreEqual(true, root.IsValid);
+            Assert.AreEqual(0, root.BrokenRulesCollection.Count);
+            root.BeginEdit();
+            root.Name = "Begin 3";
+            Assert.AreEqual("Begin 3", root.Name);
+            Assert.AreEqual(true, root.IsValid);
+            Assert.AreEqual(0, root.BrokenRulesCollection.Count);
+
+            HasRulesManager hrmClone = root.Clone();
+
+            //Test validation rule cancels for both clone and cloned
+            root.CancelEdit();
+            Assert.AreEqual("Begin 2", root.Name);
+            Assert.AreEqual(true, root.IsValid);
+            Assert.AreEqual(0, root.BrokenRulesCollection.Count);
+            hrmClone.CancelEdit();
+            Assert.AreEqual("Begin 2", hrmClone.Name);
+            Assert.AreEqual(true, hrmClone.IsValid);
+            Assert.AreEqual(0, hrmClone.BrokenRulesCollection.Count);
+            root.CancelEdit();
+            Assert.AreEqual("Begin 1", root.Name);
+            Assert.AreEqual(true, root.IsValid);
+            Assert.AreEqual(0, root.BrokenRulesCollection.Count);
+            hrmClone.CancelEdit();
+            Assert.AreEqual("Begin 1", hrmClone.Name);
+            Assert.AreEqual(true, hrmClone.IsValid);
+            Assert.AreEqual(0, hrmClone.BrokenRulesCollection.Count);
+            root.CancelEdit();
+            Assert.AreEqual("", root.Name);
+            Assert.AreEqual(false, root.IsValid);
+            Assert.AreEqual(1, root.BrokenRulesCollection.Count);
+            Assert.AreEqual("Name required", root.BrokenRulesCollection[0].Description);
+            hrmClone.CancelEdit();
+            Assert.AreEqual("", hrmClone.Name);
+            Assert.AreEqual(false, hrmClone.IsValid);
+            Assert.AreEqual(1, hrmClone.BrokenRulesCollection.Count);
+            Assert.AreEqual("Name required", hrmClone.BrokenRulesCollection[0].Description);
+            root.CancelEdit();
+            Assert.AreEqual("<new>", root.Name);
+            Assert.AreEqual(true, root.IsValid);
+            Assert.AreEqual(0, root.BrokenRulesCollection.Count);
+            hrmClone.CancelEdit();
+            Assert.AreEqual("<new>", hrmClone.Name);
+            Assert.AreEqual(true, hrmClone.IsValid);
+            Assert.AreEqual(0, hrmClone.BrokenRulesCollection.Count);
+        }
+
+        [TestMethod()]
         public void TestValidationRulesAfterClone()
         {
             //this test uses HasRulesManager2, which assigns criteria._name to its public


Fixed meetup display date: now it uses local timezone

--- DotNetRu.DataStore.Audit/Extensions/MeetupExtensions.cs
+++ DotNetRu.DataStore.Audit/Extensions/MeetupExtensions.cs
@@ -15,8 +15,8 @@
                            Description = meetup.Name,
                            IsAllDay = true,
                            Title = meetup.Name,
-                           StartTime = meetup.Date.DateTime,
-                           EndTime = meetup.Date.DateTime,
+                           StartTime = meetup.Date.LocalDateTime,
+                           EndTime = meetup.Date.LocalDateTime,
                            Venue = meetup.Venue.ToModel(),
                            Talks = meetup.Talks.Select(x => x.ToModel()),
                            Friends = meetup.Friends.Select(x => x.ToModel())


Repair date picker bug, after save

Repair date picker bug, after save

--- DragonContracts/DragonContracts/Views/Home/Index.cshtml
+++ DragonContracts/DragonContracts/Views/Home/Index.cshtml
@@ -27,13 +27,15 @@

                     $.post("/api/contract", newContractJs, "json")
                         .done(function(status) {
-                            alert(status);
+                            //alert(status);
                             self.contracts.push(newContractJs);
                         });

                     self.newContract(ko.mapping.fromJS(self.emptyContractJs));

-                    self.newContract().SignedOn(moment());
+                    self.newContract().SignedOn(moment().format());
+
+                    $("[datepicker='datepicker']").datepicker();
                 }
             }


Fix issue in PathUtil.NormalizePathOrUrl

--- src/Lunet/Helpers/PathUtil.cs
+++ src/Lunet/Helpers/PathUtil.cs
@@ -99,10 +99,10 @@
             var startsBySlash = str.StartsWith("/");
             if (!isUrl && startsBySlash)
             {
-                str = filePath.TrimStart(TrimCharStart);
+                str = str.TrimStart(TrimCharStart);
             } else if (isUrl && !startsBySlash)
             {
-                str = "/" + filePath;
+                str = "/" + str;
             }

             builder.Length = 0;


DynamicReconfigure event system: ints != doubles

--- DynamicReconfigureSharp/DynamicReconfigureGroup.xaml.cs
+++ DynamicReconfigureSharp/DynamicReconfigureGroup.xaml.cs
@@ -221,10 +221,10 @@
                                 var d = new DynamicReconfigureSlider(dynamic, s, pdef.value, pmax.value, pmin.value, false);
                                 paramsHolder.Children.Add(d);
                                 sliders.Add(s.name.data, d);
-                                d.Instrument(new Action<double>((S) =>
-                                {
-                                    if (DoubleChanged != null)
-                                        DoubleChanged(_name, S);
+                                d.Instrument(new Action<int>((S) =>
+                                {
+                                    if (IntChanged != null)
+                                        IntChanged(_name, S);
                                 }));
                             }
                         }


refactoring

refactoring

--- src/MtLogTailer/LogShipper.cs
+++ src/MtLogTailer/LogShipper.cs
@@ -156,8 +156,8 @@

 		Stream OpenStream()
 		{
-			var stream = new FileStream(_filePath, FileMode.Open, FileAccess.Read, FileShare.ReadWrite | FileShare.Delete);
-			return new BufferedStream(stream, 1024 * 128);
+			var stream = new FileStream(_filePath, FileMode.Open, FileAccess.Read, FileShare.ReadWrite | FileShare.Delete, BufSize);
+			return stream;
 		}

 		readonly string _filePath;
@@ -173,5 +173,7 @@

 		private Encoding _encoding;
 		private readonly int _defaultEncoding;
+
+		private const int BufSize = 1024 * 1024;
 	}
 }


FIXED #7 bug with sending session when getting account

--- src/Net.TMDb/ServiceClient.cs
+++ src/Net.TMDb/ServiceClient.cs
@@ -1061,7 +1061,8 @@

 			public async Task<Account> GetAccountAsync(string session, CancellationToken cancellationToken)
 			{
-				var response = await client.GetAsync("account", null, cancellationToken).ConfigureAwait(false);
+                var parameters = new Dictionary<string, object> { { "session_id", session }};
+                var response = await client.GetAsync("account", parameters, cancellationToken).ConfigureAwait(false);
 				return await Deserialize<Account>(response);
 			}


update import

update import

--- src/ObservablePhasedObject.cs
+++ src/ObservablePhasedObject.cs
@@ -1,4 +1,5 @@
-using UniRx;
+using System;
+using UniRx;

 namespace SharpPhase {


allow loglevel to passed as argument

allow loglevel to passed as argument

--- src/OmniSharp.Host/Program.cs
+++ src/OmniSharp.Host/Program.cs
@@ -47,6 +47,15 @@
                 {
                     enumerator.MoveNext();
                     serverPort = int.Parse((string)enumerator.Current);
+                }
+                else if (arg.ToLowerInvariant() == "-loglevel")
+                {
+                    enumerator.MoveNext();
+                    LogLevel level;
+                    if (Enum.TryParse((string) enumerator.Current, true, out level))
+                    {
+                        logLevel = level;
+                    }
                 }
                 else if (arg == "-v")
                 {


Update LocalNotification.cs

Update LocalNotification.cs

--- src/wp8/LocalNotification.cs
+++ src/wp8/LocalNotification.cs
@@ -66,7 +66,11 @@
                 DateTime origin = new DateTime(1970, 1, 1, 0, 0, 0, 0, System.DateTimeKind.Utc);
                 DateTime date = origin.AddSeconds(options.Date);
                 reminder.BeginTime = date.ToLocalTime();
-                reminder.RecurrenceType = RecurrenceInterval.None;
+                if (options.Repeat == "daily") {
+					reminder.RecurrenceType = RecurrenceInterval.Daily;
+				} else {
+			        reminder.RecurrenceType = RecurrenceInterval.None;
+				}
                 reminder.ExpirationTime = DateTime.Today.AddDays(30);
                 //reminder.NavigationUri = new Uri("/MainPage.xaml", UriKind.Relative);
                 ScheduledActionService.Add(reminder);


cleanup

cleanup

missing xml comment

--- src/Peachpie.Library/posix.cs
+++ src/Peachpie.Library/posix.cs
@@ -443,6 +443,7 @@
             /// <summary>
             /// Takes endpoints of a range and returns string containing appropriate characters.
             /// </summary>
+            /// <param name="ctx">Runtime context.</param>
             /// <param name="firstCharacter">First endpoint of a range.</param>
             /// <param name="secondCharacter">Second endpoint of a range.</param>
             /// <param name="characters">String containing all characters that are to be in the range.</param>


AddResource overload that takes an Entry

--- src/Tasks/GenerateResource.cs
+++ src/Tasks/GenerateResource.cs
@@ -3707,15 +3707,21 @@
         {
             Entry entry = new Entry(name, value);

-            if (reader.resourcesHashTable.ContainsKey(name))
-            {
-                _logger.LogWarningWithCodeFromResources(null, inputFileName, lineNumber, linePosition, 0, 0, "GenerateResource.DuplicateResourceName", name);
+            AddResource(reader, entry, inputFileName, lineNumber, linePosition);
+        }
+
+        private void AddResource(ReaderInfo reader, Entry entry, String inputFileName, int lineNumber, int linePosition)
+        {
+            if (reader.resourcesHashTable.ContainsKey(entry.name))
+            {
+                _logger.LogWarningWithCodeFromResources(null, inputFileName, lineNumber, linePosition, 0, 0, "GenerateResource.DuplicateResourceName", entry.name);
                 return;
             }

             reader.resources.Add(entry);
-            reader.resourcesHashTable.Add(name, value);
-        }
+            reader.resourcesHashTable.Add(entry.name, entry.value);
+        }
+

         /// <summary>
         /// Add a resource from an XML or binary format file to the internal data structures