Improved performance in getting mapping logic

--- EAAddinFramework/Mapping/ConnectorMapping.cs
+++ EAAddinFramework/Mapping/ConnectorMapping.cs
@@ -1,19 +1,16 @@
 using System;
+using System.Linq;
+using TSF.UmlToolingFramework.Wrappers.EA;
 using MP = MappingFramework;
-using UML=TSF.UmlToolingFramework.UML;
-using TSF.UmlToolingFramework.Wrappers.EA;
-using System.Collections.Generic;
-using System.Linq;
-using TFS_EA = TSF.UmlToolingFramework.Wrappers.EA;

 namespace EAAddinFramework.Mapping
 {
-	/// <summary>
-	/// Description of ConnectorMapping.
-	/// </summary>
-	public class ConnectorMapping:Mapping
-	{
-		internal ConnectorWrapper wrappedConnector{get;private set;}
+    /// <summary>
+    /// Description of ConnectorMapping.
+    /// </summary>
+    public class ConnectorMapping : Mapping
+    {
+        internal ConnectorWrapper wrappedConnector { get; private set; }
         public ConnectorMapping(ConnectorWrapper wrappedConnector, MappingNode sourceEnd, MappingNode targetEnd) : base(sourceEnd, targetEnd)
         {
             this.wrappedConnector = wrappedConnector;
@@ -21,56 +18,63 @@

         #region implemented abstract members of Mapping

-        public override MP.MappingLogic mappingLogic {
-			get
-			{
-				//check via linked element
-				if (_mappingLogic == null)
-				{
-					//check links to notes or constraints
-					//TODO: make a difference between regular notes and mapping logic?
-					var connectedElement = this.wrappedConnector.getLinkedElements().OfType<ElementWrapper>().FirstOrDefault(x => x.notes.Length > 0);
-					if (connectedElement != null) _mappingLogic = new MappingLogic(connectedElement);
-				}
-				// check via tagged value
-				if (_mappingLogic == null)
-				{
-					var mappingtag = this.wrappedConnector.taggedValues
-						.FirstOrDefault( x => x.name.Equals(MappingFactory.mappingLogicName,StringComparison.InvariantCultureIgnoreCase));
-					if (mappingtag != null &&
-					    ! string.IsNullOrEmpty(mappingtag.tagValue.ToString()))
-					{
-						_mappingLogic = new MappingLogic(mappingtag.tagValue.ToString());
-					}
-				}
-				return _mappingLogic;
-			}
-			set
-			{
-				var mappingElementWrapper = value.mappingElement as ElementWrapper;
-				if (mappingElementWrapper != null)
-				{
-					this.wrappedConnector.addTaggedValue(MappingFactory.mappingLogicName, mappingElementWrapper.uniqueID);
-					//TODO get this working for at least notes and constraints, for now we go with a tagged value
-					// this.wrappedConnector.addLinkedElement(mappingElementWrapper);
-				}
-				else
-				{
-					this.wrappedConnector.addTaggedValue(MappingFactory.mappingLogicName, value.description);
-				}
-
-			}
-		}
+        public override MP.MappingLogic mappingLogic
+        {
+            get
+            {
+                //check via linked element
+                //TODO: implement in a faster way if mapping via elements is supported again
+                //if (this._mappingLogic == null)
+                //{
+                //    //check links to notes or constraints
+                //    //TODO: make a difference between regular notes and mapping logic?
+                //    var connectedElement = this.wrappedConnector.getLinkedElements().OfType<ElementWrapper>().FirstOrDefault(x => x.notes.Length > 0);
+                //    if (connectedElement != null)
+                //    {
+                //        this._mappingLogic = new MappingLogic(connectedElement);
+                //    }
+                //}
+                // check via tagged value
+                if (this._mappingLogic == null)
+                {
+                    var mappingtag = this.wrappedConnector.taggedValues
+                        .FirstOrDefault(x => x.name.Equals(MappingFactory.mappingLogicName, StringComparison.InvariantCultureIgnoreCase));
+                    if (mappingtag != null &&
+                        !string.IsNullOrEmpty(mappingtag.tagValue.ToString()))
+                    {
+                        this._mappingLogic = new MappingLogic(mappingtag.tagValue.ToString());
+                    }
+                }
+                return this._mappingLogic;
+            }
+            set
+            {
+                var mappingElementWrapper = value.mappingElement as ElementWrapper;
+                if (mappingElementWrapper != null)
+                {
+                    this.wrappedConnector.addTaggedValue(MappingFactory.mappingLogicName, mappingElementWrapper.uniqueID);
+                    //TODO get this working for at least notes and constraints, for now we go with a tagged value
+                    // this.wrappedConnector.addLinkedElement(mappingElementWrapper);
+                }
+                else
+                {
+                    this.wrappedConnector.addTaggedValue(MappingFactory.mappingLogicName, value.description);
+                }

-		#endregion
+            }
+        }

-		#region implemented abstract members of Mapping
+        #endregion

-		public override void save()
-		{
+        #region implemented abstract members of Mapping
+
+        public override void save()
+        {
             if (this._mappingLogic != null)
+            {
                 this.mappingLogic = this._mappingLogic; //make sure to set the mapping logic value correctly
-                                                        //set mapping path
+            }
+            //set mapping path
             if (this.source.structure == MP.ModelStructure.Message)
             {
                 this.wrappedConnector.addTaggedValue(MappingFactory.mappingSourcePathName, string.Join(".", ((MappingNode)this.source).getMappingPath()));
@@ -80,7 +84,7 @@
                 this.wrappedConnector.addTaggedValue(MappingFactory.mappingTargetPathName, string.Join(".", ((MappingNode)this.target).getMappingPath()));
             }
             this.wrappedConnector.save();
-		}
+        }

         public override void deleteWrappedItem()
         {


Updating the version for release.

Updating the version for release.

--- ExpressionBuilder/Properties/AssemblyInfo.cs
+++ ExpressionBuilder/Properties/AssemblyInfo.cs
@@ -29,4 +29,4 @@
 // You can specify all the values or you can use the default the Revision and
 // Build Numbers by using the '*' as shown below:
 [assembly: AssemblyVersion("1.1.2.*")]
-[assembly: AssemblyInformationalVersion("1.1.2-rc")]
+[assembly: AssemblyInformationalVersion("1.1.2")]


Tests for circularbuffer updated.

Tests for circularbuffer updated.

--- ExtendedCollections.Tests/CircullarBuffer.cs
+++ ExtendedCollections.Tests/CircullarBuffer.cs
@@ -71,6 +71,10 @@
         {
             var buffer = new CircularBuffer<int>(4);
             Assert.IsTrue(buffer.IsEmpty);
+            buffer.Write(4);
+            buffer.Write(5);
+            Assert.IsFalse(buffer.IsEmpty);
+
         }

         [TestMethod]
@@ -78,7 +82,10 @@
         {
             var buffer = new CircularBuffer<int>(4);

+            Assert.IsFalse(buffer.IsFull);
             buffer.Write(3);
+            Assert.IsFalse(buffer.IsFull);
+
             buffer.Write(4);
             buffer.Write(5);
             buffer.Write(6);


Update FunctionsMath.cs

Update FunctionsMath.cs

--- FonctionsUtiles.Fred.Csharp/FunctionsMath.cs
+++ FonctionsUtiles.Fred.Csharp/FunctionsMath.cs
@@ -265,6 +265,7 @@
     }

     // TODO Ppcm and Pgcm methods to be implemented
+    // const EstPuissanceDe2 = x => x !== 0 && (x & x-1) === 0;
     public static bool IsAPowerOfTwo(int number)
     {
       return (number != 0) && ((number & number - 1) == 0);


pageCountに該当するのはitemの最大数ではなく、最大ページ数でした

pageCountに該当するのはitemの最大数ではなく、最大ページ数でした

--- Sdx/Pager.cs
+++ Sdx/Pager.cs
@@ -200,7 +200,7 @@
       return new Dictionary<string, object>()
       {
         {"page", Page},
-        {"pageCount", TotalCount},
+        {"pageCount", LastPage},
         {"hasNext", HasNext},
         {"hasPrev", HasPrev},
         {"perPage", PerPage},


Ignore "Merge commit xxx" subjects while parsing

--- GitMind/GitModel/Private/BranchNameParser.cs
+++ GitMind/GitModel/Private/BranchNameParser.cs
@@ -3,6 +3,7 @@
 	internal static class BranchNameParser
 	{
 		private static readonly string MergeBranchSubject = "Merge branch ";
+		private static readonly string MergeCommitSubject = "Merge commit ";
 		private static readonly string MergeBranchSubject2 = "Merge ";
 		//private static readonly string OldMergedBranchSubject = "[MERGED] from ";
 		//private static readonly string OldMergedBranchSubject2 = "MERGED from ";
@@ -23,7 +24,11 @@
 			int sourceBranchNameStart = -1;
 			int sourceBranchNameEnd = -1;

-			if (subject.StartsWith(MergeBranchSubject)
+			if (subject.StartsWith(MergeCommitSubject))
+			{
+				// Ignoring "Merge commit " messages, since they specify commit id source and not branch
+			}
+			else if (subject.StartsWith(MergeBranchSubject)
 				&& subject.Length > MergeBranchSubject.Length + 1)
 			{
 				// Found a "Merge branch "


Added Api Key for signed requests

Added Api Key for signed requests

--- GoogleApi/Entities/Common/SignableRequest.cs
+++ GoogleApi/Entities/Common/SignableRequest.cs
@@ -40,12 +40,12 @@
                 throw new NullReferenceException("ClientID");

             if (!this.ClientId.StartsWith("gme-"))
-                throw new ArgumentException("A user ID must start with 'gme-'.");
+                throw new ArgumentException("A clientId must start with 'gme-'.");

             var _urlSegmentToSign = _uri.LocalPath + _uri.Query + "&client=" + this.ClientId;
             var _privateKey = SignableRequest.FromBase64UrlString(this.Key);
             byte[] _signature;
-
+
             using (var _algorithm = new HMACSHA1(_privateKey))
             {
                 _signature = _algorithm.ComputeHash(Encoding.ASCII.GetBytes(_urlSegmentToSign));
@@ -54,14 +54,14 @@
             return new Uri(_uri.Scheme + "://" + _uri.Host + _urlSegmentToSign + "&signature=" + SignableRequest.ToBase64UrlString(_signature));
         }

-        protected override QueryStringParametersList GetQueryStringParameters()
-        {
-            var _parameters = new QueryStringParametersList();
+//        protected override QueryStringParametersList GetQueryStringParameters()
+//        {
+//            var _parameters = base.GetQueryStringParameters();

-            _parameters.Add("sensor", Sensor.ToString().ToLower());
+////            _parameters.Add("sensor", Sensor.ToString().ToLower());

-            return _parameters;
-        }
+//            return _parameters;
+//        }

         private static string ToBase64UrlString(byte[] _data)
         {


Cleanup.

Cleanup.

--- Gu.Analyzers.Analyzers/Helpers/Disposable.cs
+++ Gu.Analyzers.Analyzers/Helpers/Disposable.cs
@@ -63,7 +63,7 @@
             }

             return type == KnownSymbol.IDisposable ||
-                   type.AllInterfaces.TryGetSingle(x => x == KnownSymbol.IDisposable, out ITypeSymbol _);
+                   type.Is(KnownSymbol.IDisposable);
         }

         internal static bool TryGetDisposeMethod(ITypeSymbol type, bool recursive, out IMethodSymbol disposeMethod)


KeyboardTests

KeyboardTests

--- Gu.Wpf.UiAutomation.UITests/KeyboardTests.cs
+++ Gu.Wpf.UiAutomation.UITests/KeyboardTests.cs
@@ -3,7 +3,6 @@
     using System.Diagnostics;
     using System.IO;
     using System.Threading;
-    using Gu.Wpf.UiAutomation.UITests.TestFramework;
     using Gu.Wpf.UiAutomation.WindowsAPI;
     using NUnit.Framework;

@@ -15,28 +14,16 @@
             @"..\..\TestApplications\WpfApplication\bin\WpfApplication.exe");

         [Test]
-        public void Type()
+        public void TypeKeysThenBackspace()
         {
-            using (var app = Application.Launch("notepad.exe"))
+            using (var app = Application.Launch(ExeFileName, "SingleTextBoxWindow"))
             {
                 var mainWindow = app.MainWindow();
-
-                Keyboard.Type("ééééééööööö aaa | ");
-
-                Keyboard.Type(VirtualKeyShort.KEY_Z);
-                Keyboard.Type(VirtualKeyShort.LEFT);
-                Keyboard.Type(VirtualKeyShort.DELETE);
-                Keyboard.Type(VirtualKeyShort.KEY_Y);
+                Keyboard.Type("abc");
+                Thread.Sleep(50);
                 Keyboard.Type(VirtualKeyShort.BACK);
-                Keyboard.Type(VirtualKeyShort.KEY_X);
-
-                Keyboard.Type(" | ");
-
-                Keyboard.Type("ঋ ঌ এ ঐ ও ঔ ক খ গ ঘ ঙ চ ছ জ ঝ ঞ ট ঠ ড ঢ");
-
-                Thread.Sleep(500);
-
-                TestUtilities.CloseWindowWithDontSave(mainWindow);
+                var textBox = mainWindow.FindTextBox();
+                Assert.AreEqual("ab", textBox.Text);
             }
         }

@@ -54,6 +41,7 @@
         }

         [TestCase("abc")]
+        [TestCase("ééééééööööö aaa | ")]
         [TestCase("ঋ ঌ এ ঐ ও ঔ ক খ গ ঘ ঙ চ ছ জ ঝ ঞ ট ঠ ড ঢ")]
         public void TypeString(string text)
         {


Added ToDo

Added ToDo

--- Homie.Admin/ViewModel/MainWindowViewModel.cs
+++ Homie.Admin/ViewModel/MainWindowViewModel.cs
@@ -198,12 +198,12 @@
             eventLogViewModel = new EventLogViewModel(serviceLogProvider);

             // Users
-            IUserDataSource userDataSource = new DbUserDataSource();
+            IUserDataSource userDataSource = new DbUserDataSource(); // TODO: Use DI container
             IUserControlService userControlService = new UserControlService(userDataSource);
             usersViewModel = new UsersViewModel(dialogService, userControlService);

             // Users
-            IMachineDataSource machinedaDataSource = new DbMachineDataSource();
+            IMachineDataSource machinedaDataSource = new DbMachineDataSource(); // TODO: Use DI container
             IMachineControlService machineControlService = new MachineControlService(machinedaDataSource);
             machinesViewModel = new MachinesViewModel(dialogService, machineControlService);


fix the issue#82299 Scheduling Automated test run in ALM through Jenkins may cause exception

--- HpToolsLauncher/Runners/AlmTestSetsRunner.cs
+++ HpToolsLauncher/Runners/AlmTestSetsRunner.cs
@@ -559,6 +559,13 @@
                 {
                     TestExecStatus testExecStatusObj = executionStatus[j];

+                    currentTest = targetTestSet.TSTestFactory[testExecStatusObj.TSTestId];
+                    if (currentTest == null)
+                    {
+                        ConsoleWriter.WriteLine(string.Format("currentTest is null for test.{0} during execution", j));
+                        continue;
+                    }
+
                     activeTestDesc = UpdateTestStatus(runDesc, targetTestSet, testExecStatusObj, true);

                     if (activeTestDesc.PrevTestState != activeTestDesc.TestState)
@@ -566,7 +573,7 @@
                         TestState tstate = activeTestDesc.TestState;
                         if (tstate == TestState.Running)
                         {
-                            currentTest = targetTestSet.TSTestFactory[testExecStatusObj.TSTestId];
+                            //currentTest = targetTestSet.TSTestFactory[testExecStatusObj.TSTestId];
                             int testIndex = GetIdxByTestName(currentTest.Name, runDesc);

                             int prevRunId = GetTestRunId(currentTest);
@@ -659,11 +666,18 @@
                     }

                     TestExecStatus testExecStatusObj = executionStatus[k];
+                    currentTest = targetTestSet.TSTestFactory[testExecStatusObj.TSTestId];
+                    if (currentTest == null)
+                    {
+                        ConsoleWriter.WriteLine(string.Format("currentTest is null for test.{0} after whole execution", k));
+                        continue;
+                    }
+
                     activeTestDesc = UpdateTestStatus(runDesc, targetTestSet, testExecStatusObj, false);

                     UpdateCounters(activeTestDesc, runDesc);

-                    currentTest = targetTestSet.TSTestFactory[testExecStatusObj.TSTestId];
+                    //currentTest = targetTestSet.TSTestFactory[testExecStatusObj.TSTestId];

                     string testPath = "Root\\" + tsFolderName + "\\" + tsName + "\\" + activeTestDesc.TestName;

@@ -838,6 +852,11 @@
                 //find the test for the given status object
                 currentTest = targetTestSet.TSTestFactory[testExecStatusObj.TSTestId];

+                if (currentTest == null)
+                {
+                    return qTest;
+                }
+
                 //find the test in our list
                 int testIndex = GetIdxByTestName(currentTest.Name, runResults);
                 qTest = runResults.TestRuns[testIndex];


Fixes bug in DEMA warmup period

Fixes bug in DEMA warmup period

--- Indicators/DoubleExponentialMovingAverage.cs
+++ Indicators/DoubleExponentialMovingAverage.cs
@@ -21,12 +21,12 @@
     /// EMA2 = EMA(EMA(t,period),period)
     /// DEMA = 2 * EMA(t,period) - EMA2
     /// The Generalized DEMA (GD) is calculated with the following formula:
-    /// GD = (vFactor+1) * EMA(t,period) - vFactor * EMA2
+    /// GD = (volumeFactor+1) * EMA(t,period) - volumeFactor * EMA2
     /// </summary>
     public class DoubleExponentialMovingAverage : IndicatorBase<IndicatorDataPoint>
     {
         private readonly int _period;
-        private readonly int _vFactor;
+        private readonly int _volumeFactor;
         private readonly ExponentialMovingAverage _ema1;
         private readonly ExponentialMovingAverage _ema2;

@@ -35,12 +35,12 @@
         /// </summary>
         /// <param name="name">The name of this indicator</param>
         /// <param name="period">The period of the DEMA</param>
-        /// <param name="vFactor">The volume factor of the DEMA</param>
-        public DoubleExponentialMovingAverage(string name, int period, int vFactor = 1)
+        /// <param name="volumeFactor">The volume factor of the DEMA</param>
+        public DoubleExponentialMovingAverage(string name, int period, int volumeFactor = 1)
             : base(name)
         {
             _period = period;
-            _vFactor = vFactor;
+            _volumeFactor = volumeFactor;
             _ema1 = new ExponentialMovingAverage(name + "_1", period);
             _ema2 = new ExponentialMovingAverage(name + "_2", period);
         }
@@ -49,9 +49,9 @@
         /// Initializes a new instance of the <see cref="DoubleExponentialMovingAverage"/> class using the specified period.
         /// </summary>
         /// <param name="period">The period of the DEMA</param>
-        /// <param name="vFactor">The volume factor of the DEMA</param>
-        public DoubleExponentialMovingAverage(int period, int vFactor = 1)
-            : this("DEMA" + period, period, vFactor)
+        /// <param name="volumeFactor">The volume factor of the DEMA</param>
+        public DoubleExponentialMovingAverage(int period, int volumeFactor = 1)
+            : this("DEMA" + period, period, volumeFactor)
         {
         }

@@ -71,9 +71,11 @@
         protected override decimal ComputeNextValue(IndicatorDataPoint input)
         {
             _ema1.Update(input);
-            _ema2.Update(_ema1.Current);

-            return IsReady ? (_vFactor + 1) * _ema1 - _vFactor * _ema2 : 0m;
+            if (Samples > _period - 1)
+                _ema2.Update(_ema1.Current);
+
+            return IsReady ? (_volumeFactor + 1) * _ema1 - _volumeFactor * _ema2 : 0m;
         }

         /// <summary>


Change add method for portable builds

Change add method for portable builds

--- JumpKick.HttpLib/JumpKick.HttpLib/Request.cs
+++ JumpKick.HttpLib/JumpKick.HttpLib/Request.cs
@@ -151,7 +151,7 @@

             foreach (Header h in headers)
             {
-                whc.Add(h.Name, h.Value);
+                whc[h.Name] = h.Value;
             }

             return whc;


Added Unaggregate(Func<Maybe<A>>) IEnumerable<A>

--- KitchenSink/Collections/CollectionHelpers.cs
+++ KitchenSink/Collections/CollectionHelpers.cs
@@ -90,6 +90,25 @@
             // ReSharper disable once IteratorNeverReturns
         }

+        /// <summary>
+        /// Generates a sequence based on given function.
+        /// Functions returns None to indicate end of sequence.
+        /// </summary>
+        public static IEnumerable<A> Unaggregate<A>(Func<Maybe<A>> f)
+        {
+            while (true)
+            {
+                var x = f();
+
+                if (x.HasValue)
+                {
+                    yield return x.Value;
+                }
+            }
+
+            // ReSharper disable once IteratorNeverReturns
+        }
+
         /// <summary>Performs side-effecting Action on each item in sequence.</summary>
         public static IEnumerable<A> ForEach<A>(this IEnumerable<A> seq, Action<A> f)
         {


Fix FindDocumentType sql

Fix FindDocumentType sql

--- KotoriCore/Database/DocumentDb/DocumentDb.cs
+++ KotoriCore/Database/DocumentDb/DocumentDb.cs
@@ -182,13 +182,13 @@
         {
             var q = new DynamicQuery
                 (
-                    "select * from c where c.entity = @entity and c.instance = @instance and c.projectId = @projectId",
+                    "select * from c where c.entity = @entity and c.instance = @instance and c.projectId = @projectId c.identifier = @identifier",
                     new
                     {
                         entity = DocumentTypeEntity,
                         instance,
-                        projectId = projectId,
-
+                        projectId,
+                        identifier = documentTypeId
                     }
             );


Update DataTableExtensions.cs

Update DataTableExtensions.cs

re-organised, commented out some CSV ExpandoObject methods


getprotobyname, getprotobynumber

getprotobyname, getprotobynumber

--- src/Peachpie.Library/Network.cs
+++ src/Peachpie.Library/Network.cs
@@ -2,6 +2,7 @@
 using System.Collections.Generic;
 using System.Linq;
 using System.Net;
+using System.Net.Sockets;
 using System.Threading.Tasks;
 using Pchp.Core;
 using Pchp.Library.Streams;
@@ -178,6 +179,94 @@
         }

         #endregion
+
+        #region getprotobyname, getprotobynumber
+
+        static IEnumerable<(string name, ProtocolType type)> EnumerateProtocolTypes()
+        {
+            yield return ("ip", ProtocolType.IP);
+            yield return ("icmp", ProtocolType.Icmp);
+            yield return ("igmp", ProtocolType.Igmp);
+            yield return ("ggp", ProtocolType.Ggp);
+            yield return ("tcp", ProtocolType.Tcp);
+            //yield return ("egp", ProtocolType.); // 8
+            yield return ("pup", ProtocolType.Pup);
+            yield return ("udp", ProtocolType.Udp);
+            //yield return ("hmp", ProtocolType.); // 20
+            yield return ("xns-idp", ProtocolType.Idp);
+            //yield return ("rdp", ProtocolType.); // 27
+            yield return ("ipv6", ProtocolType.IPv6);
+            yield return ("ipv6-route", ProtocolType.IPv6RoutingHeader);
+            yield return ("ipv6-frag", ProtocolType.IPv6FragmentHeader);
+            yield return ("esp", ProtocolType.IPSecEncapsulatingSecurityPayload);
+            yield return ("ah", ProtocolType.IPSecAuthenticationHeader);
+            yield return ("ipv6-icmp", ProtocolType.IcmpV6);
+            yield return ("ipv6-nonxt", ProtocolType.IPv6NoNextHeader);
+            yield return ("ipv6-opts", ProtocolType.IPv6DestinationOptions);
+            //yield return ("rvd", ProtocolType.); // 66
+            //yield return ("nd", ProtocolType.ND);
+            yield return ("ipx", ProtocolType.Ipx);
+        }
+
+        static readonly Lazy<Dictionary<string, ProtocolType>> s_protoByName = new Lazy<Dictionary<string, ProtocolType>>(() =>
+        {
+            var map = new Dictionary<string, ProtocolType>(19, StringComparer.OrdinalIgnoreCase);
+
+            foreach (var value in EnumerateProtocolTypes())
+            {
+                map[value.name] = value.type;
+            }
+
+            return map;
+        });
+
+        static readonly Lazy<Dictionary<ProtocolType, string>> s_protoByNumber = new Lazy<Dictionary<ProtocolType, string>>(() =>
+        {
+            var map = new Dictionary<ProtocolType, string>(19);
+
+            foreach (var value in EnumerateProtocolTypes())
+            {
+                map[value.type] = value.name;
+            }
+
+            return map;
+        });
+
+        /// <summary>
+        /// Get protocol number associated with protocol name.
+        /// </summary>
+        /// <remarks>Numbers correspond to <see cref="System.Net.Sockets.ProtocolType"/>.</remarks>
+        [return: CastToFalse]
+        public static int getprotobyname(string name)
+        {
+            if (s_protoByName.Value.TryGetValue(name, out var type))
+            {
+                return (int)type;
+            }
+            else
+            {
+                return -1; // FALSE
+            }
+        }
+
+        /// <summary>
+        /// Get protocol number associated with protocol name.
+        /// </summary>
+        /// <remarks>Numbers correspond to <see cref="System.Net.Sockets.ProtocolType"/>.</remarks>
+        [return: CastToFalse]
+        public static string getprotobynumber(ProtocolType type)
+        {
+            if (s_protoByNumber.Value.TryGetValue(type, out var name))
+            {
+                return name;
+            }
+            else
+            {
+                return null; // FALSE
+            }
+        }
+
+        #endregion
     }

     /// <summary>Functions working with DNS.</summary>


get_include_path, set_include_path

get_include_path, set_include_path

--- src/Peachpie.Library/Options.cs
+++ src/Peachpie.Library/Options.cs
@@ -591,6 +591,24 @@
         #endregion

         /// <summary>
+        /// Gets the current include_path configuration option value.
+        /// </summary>
+        public static string get_include_path(Context ctx) => ctx.Configuration.Core.IncludePaths;
+
+        /// <summary>
+        /// Sets the include_path configuration option for the duration of the script.
+        /// </summary>
+        public static string set_include_path(Context ctx, string new_include_path)
+        {
+            var config = ctx.Configuration.Core;
+            var old_value = config.IncludePaths;
+
+            config.IncludePaths = new_include_path;
+
+            return old_value;
+        }
+
+        /// <summary>
         /// Gets the current configuration setting of magic_quotes_gpc.
         /// Always returns <c>false</c>.
         /// </summary>


Updated to v0.5.5

Updated to v0.5.5

--- LinqToQuerystring/Properties/AssemblyInfo.cs
+++ LinqToQuerystring/Properties/AssemblyInfo.cs
@@ -32,5 +32,5 @@
 // You can specify all the values or you can default the Build and Revision Numbers
 // by using the '*' as shown below:
 // [assembly: AssemblyVersion("1.0.*")]
-[assembly: AssemblyVersion("0.5.4.*")]
-[assembly: AssemblyFileVersion("0.5.4.0")]
+[assembly: AssemblyVersion("0.5.5.*")]
+[assembly: AssemblyFileVersion("0.5.5.0")]


Updated to version v0.3

Updated to version v0.3

--- LinqToQuerystring/Properties/AssemblyInfo.cs
+++ LinqToQuerystring/Properties/AssemblyInfo.cs
@@ -32,5 +32,5 @@
 // You can specify all the values or you can default the Build and Revision Numbers
 // by using the '*' as shown below:
 // [assembly: AssemblyVersion("1.0.*")]
-[assembly: AssemblyVersion("0.2.0.*")]
-[assembly: AssemblyFileVersion("0.2.0.0")]
+[assembly: AssemblyVersion("0.3.0.*")]
+[assembly: AssemblyFileVersion("0.3.0.0")]


Revert "Only use positive indices for Sum of Worst"

This reverts commit 847133f7061dfc7ff7208b5465967424626599b8.

--- LiveSplit/LiveSplit.Core/Model/SumOfWorst.cs
+++ LiveSplit/LiveSplit.Core/Model/SumOfWorst.cs
@@ -19,15 +19,14 @@
             if (currentTime != null)
             {
                 PopulatePrediction(predictions, currentTime + run[segmentIndex].BestSegmentTime[method], segmentIndex + 1);
-                foreach (var attempt in run.AttemptHistory)
+                foreach (var segment in run[segmentIndex].SegmentHistory)
                 {
-                    var runIndex = attempt.Index;
                     Time segmentTime;
-                    if (segmentIndex == 0
-                        || !run[segmentIndex - 1].SegmentHistory.TryGetValue(runIndex, out segmentTime)
+                    if (segmentIndex == 0
+                        || !run[segmentIndex - 1].SegmentHistory.TryGetValue(segment.Key, out segmentTime)
                         || segmentTime[method] != null)
                     {
-                        var prediction = SumOfSegmentsHelper.TrackBranch(run, currentTime, segmentIndex, runIndex, method);
+                        var prediction = SumOfSegmentsHelper.TrackBranch(run, currentTime, segmentIndex, segment.Key, method);
                         PopulatePrediction(predictions, prediction.Time[method], prediction.Index);
                     }
                 }


Немного подправил внешний вид

Немного подправил внешний вид

Уменьшил размер окна, увеличил размер шрифта основного текста, сделал
окно модальным, фиксированного размера, располагающимся поверх остальны�
окон.

--- Form1.Designer.cs
+++ Form1.Designer.cs
@@ -35,16 +35,18 @@
             // clipboardLabel
             //
             this.clipboardLabel.AutoSize = true;
+            this.clipboardLabel.Font = new System.Drawing.Font("Microsoft Sans Serif", 16F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
             this.clipboardLabel.Location = new System.Drawing.Point(24, 28);
             this.clipboardLabel.Name = "clipboardLabel";
-            this.clipboardLabel.Size = new System.Drawing.Size(35, 13);
+            this.clipboardLabel.Size = new System.Drawing.Size(187, 26);
             this.clipboardLabel.TabIndex = 0;
-            this.clipboardLabel.Text = "label1";
+            this.clipboardLabel.Text = "No text captured";
+            this.clipboardLabel.TextAlign = System.Drawing.ContentAlignment.TopCenter;
             //
             // clipboardMonitor1
             //
             this.clipboardMonitor1.BackColor = System.Drawing.Color.Red;
-            this.clipboardMonitor1.Location = new System.Drawing.Point(163, 52);
+            this.clipboardMonitor1.Location = new System.Drawing.Point(27, 63);
             this.clipboardMonitor1.Name = "clipboardMonitor1";
             this.clipboardMonitor1.Size = new System.Drawing.Size(75, 23);
             this.clipboardMonitor1.TabIndex = 1;
@@ -56,11 +58,16 @@
             //
             this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
-            this.ClientSize = new System.Drawing.Size(284, 262);
+            this.ClientSize = new System.Drawing.Size(235, 97);
             this.Controls.Add(this.clipboardMonitor1);
             this.Controls.Add(this.clipboardLabel);
+            this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
+            this.MaximizeBox = false;
+            this.MinimizeBox = false;
             this.Name = "Form1";
-            this.Text = "Form1";
+            this.StartPosition = System.Windows.Forms.FormStartPosition.Manual;
+            this.Text = "Syllabr";
+            this.TopMost = true;
             this.ResumeLayout(false);
             this.PerformLayout();


Minor changes to UI strings.

Minor changes to UI strings.

--- Form1.Designer.cs
+++ Form1.Designer.cs
@@ -150,7 +150,7 @@
             this.label2.Name = "label2";
             this.label2.Size = new System.Drawing.Size(83, 13);
             this.label2.TabIndex = 7;
-            this.label2.Text = "Seconds/Frame";
+            this.label2.Text = "Sim. Seconds/Real";
             //
             // label3
             //
@@ -188,7 +188,7 @@
             this.Controls.Add(this.menuStrip1);
             this.MainMenuStrip = this.menuStrip1;
             this.Name = "Form1";
-            this.Text = "John Choi 11129990";
+            this.Text = "Planets";
             this.Load += new System.EventHandler(this.Form1_Load);
             ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit();
             this.menuStrip1.ResumeLayout(false);


Removed .NET 2.0 specific code

Removed .NET 2.0 specific code

git-svn-id: baf6e02d125cf6f9bfcfe153b2eb83d6e1f5ace6@194 52acb1d6-8a22-11de-b505-999d5b087335

--- libsecondlife-cs/ObjectManager.cs
+++ libsecondlife-cs/ObjectManager.cs
@@ -301,7 +301,7 @@
                 // Parse the NameValue to see if this is actually an avatar
                 if (prim.LocalID != 0)
                 {
-                    if (prim.Name.Contains("FirstName"))
+                    if (prim.Name.IndexOf("FirstName") > -1)
                     {
                         avatar = new Avatar();
                         avatar.ID = prim.ID;


Simplify authorization configuration code

--- AllReadyApp/Web-App/AllReady/Startup.cs
+++ AllReadyApp/Web-App/AllReady/Startup.cs
@@ -90,10 +90,10 @@
                .AddDefaultTokenProviders();

       // Add Authorization rules for the app
-      services.Configure<AuthorizationOptions>(options =>
-      {
-        options.AddPolicy("TenantAdmin", new AuthorizationPolicyBuilder().RequireClaim(Security.ClaimTypes.UserType, new string[] { "TenantAdmin", "SiteAdmin" }).Build());
-        options.AddPolicy("SiteAdmin", new AuthorizationPolicyBuilder().RequireClaim(Security.ClaimTypes.UserType, "SiteAdmin").Build());
+      services.AddAuthorization(options =>
+      {
+        options.AddPolicy("TenantAdmin", b => b.RequireClaim(Security.ClaimTypes.UserType, "TenantAdmin", "SiteAdmin"));
+        options.AddPolicy("SiteAdmin", b => b.RequireClaim(Security.ClaimTypes.UserType, "SiteAdmin"));
       });

       services.AddCookieAuthentication(options =>


Finished the rule type annotations

Finished the rule type annotations

--- AngleSharp/DOM/Constants/CssRuleType.cs
+++ AngleSharp/DOM/Constants/CssRuleType.cs
@@ -57,6 +57,7 @@
         /// <summary>
         /// The @counter-style rule for styling counters.
         /// </summary>
+        [DomName("COUNTER_STYLE_RULE")]
         CounterStyle = 11,
         /// <summary>
         /// Checking for CSS support using @support.
@@ -71,14 +72,17 @@
         /// <summary>
         /// This @font-feature-values is still very complicated.
         /// </summary>
+        [DomName("FONT_FEATURE_VALUES_RULE")]
         FontFeatureValues = 14,
         /// <summary>
         /// Defines the @viewport rule for responsive design.
         /// </summary>
+        [DomName("VIEWPORT_RULE")]
         Viewport = 15,
         /// <summary>
         /// Creating a CSS region with @region.
         /// </summary>
+        [DomName("REGION_STYLE_RULE")]
         RegionStyle = 16
     }
 }


default client builder update

default client builder update

--- src/Quidjibo/QuidjiboBuilder.cs
+++ src/Quidjibo/QuidjiboBuilder.cs
@@ -53,7 +53,13 @@
         /// <returns></returns>
         public IQuidjiboClient BuildClient()
         {
-            return (IQuidjiboClient)BuildClient<DefaultClientKey>();
+            BackFillDefaults();
+
+            var client = new QuidjiboClient(_workProviderFactory, _scheduleProviderFactory, _serializer, _cronProvider);
+
+            QuidjiboClient.Instance = client;
+
+            return client;
         }

         /// <summary>


buff trigger resets after effect has faded

--- Assets/Scripts/BuffTriggerController.cs
+++ Assets/Scripts/BuffTriggerController.cs
@@ -22,7 +22,8 @@
             countDown -= Time.deltaTime;
             if (countDown <= 0)
             {
-                buff.GetComponent<Buff>().UnDoAction(enemy);
+                buff.GetComponent<Buff>().UnDoAction(enemy);
+                GetComponent<Collider>().enabled = false;
             }
         }
     }


Improve code

Improve code

--- BindingSample/BindingConsole/Program.cs
+++ BindingSample/BindingConsole/Program.cs
@@ -9,13 +9,13 @@
         [STAThread]
         static void Main(string[] args)
         {
-            BindOneWay();
+            Bind_OneWay();
         }

-        static void BindOneWay()
+        static void Bind_OneWay()
         {
             // Binding Source (Any object).
-            var person = new Person0 { Id = 0, Name = "Taro" };
+            var person = new Person1 { Id = 123, Name = "Taro" };

             // Binding Target must be FrameworkElement.
             var textBlock = new TextBlock { Text = "Default" };
@@ -26,7 +26,7 @@
             textBlock.SetBinding(TextBlock.TextProperty, binding);
             Console.WriteLine(textBlock.Text);

-            // Changes value.
+            // Changes source value.
             person.Name = "Jiro";
             Console.WriteLine(textBlock.Text);
         }


ファイルの形式取得処理をリファクタ

ファイルの形式取得処理をリファクタ

try～catchで例外を握り潰さないようにしました。
シンプルにTypeプロパティでデータを取得できるようにしました。

--- Sdx/Image.cs
+++ Sdx/Image.cs
@@ -53,40 +53,32 @@
       }
     }

-    private string Type
-    {
-      get { return this.type; }
-      set { this.type = value; }
-    }
-
     /// <summary>
     /// ファイルの形式(拡張子)を返す。
     /// </summary>
-    /// <returns></returns>
-    public string GetFileFormat()
+    private string Type
     {
-      if(this.Type != null){
-        return this.Type;
+      get {
+        if(this.type == null){
+          this.type = this.GetTypeString();
+        }
+
+        return this.type;
+      }
+    }
+
+    private string GetTypeString()
+    {
+      foreach (System.Drawing.Imaging.ImageCodecInfo ici in System.Drawing.Imaging.ImageCodecInfo.GetImageDecoders())
+      {
+        if (ici.FormatID == this.Bitmap.RawFormat.Guid)
+        {
+          //該当するFormatDescriptionを返す。
+          return ici.FormatDescription;
+        }
       }

-      try
-      {
-          foreach (System.Drawing.Imaging.ImageCodecInfo ici in System.Drawing.Imaging.ImageCodecInfo.GetImageDecoders())
-          {
-            if (ici.FormatID == this.Bitmap.RawFormat.Guid)
-            {
-              //該当するFormatDescriptionを返す。
-              this.Type = ici.FormatDescription;
-              return this.Type;
-            }
-          }
-
-          return string.Empty;
-      }
-      catch
-      {
-          return string.Empty;
-      }
+      return string.Empty;
     }

   }


Semaphore can use Wait's Task instead of managing it separately

--- Semaphore.cs
+++ Semaphore.cs
@@ -82,49 +82,41 @@
             {
                 if (state.Count > 0)
                 {
-                    return Tuple.Create(state.DecrementCount(), new
-                    {
-                        Wait  = (Wait) null,
-                        Task  = Task.FromResult(true),
-                    });
+                    return Tuple.Create(state.DecrementCount(), (Wait)null);
                 }   // ReSharper disable once RedundantIfElseBlock
                 else
                 {
                     var tcs = new TaskCompletionSource<bool>();
                     var wait = new Wait(tcs, isTimeoutFinitie && timeout != TimeSpan.Zero);
-                    return Tuple.Create(state.WithWaits(state.Waits.Concat(new[] { wait }).ToArray()), new
-                    {
-                        Wait = wait,
-                        tcs.Task,
-                    });
+                    return Tuple.Create(state.WithWaits(state.Waits.Concat(new[] { wait }).ToArray()), wait);
                 }
             });

             {
-                var wait = result.Wait;
-                if (wait != null)
+                var wait = result;
+                if (wait == null)
+                    return Task.FromResult(true);
+
+                if (isTimeoutFinitie)
                 {
-                    if (isTimeoutFinitie)
+                    if (timeout == TimeSpan.Zero)
                     {
-                        if (timeout == TimeSpan.Zero)
-                        {
-                            if (wait.TryConclude(Wait.Conclusion.TimedOut))
-                                TryRemoveWait(wait);
-                        }
-
-                        WaitTimeout(wait, timeout,
-                                    cancellationToken.CanBeCanceled
-                                    ? CancellationTokenSource.CreateLinkedTokenSource(wait.TimeoutCancellationToken, cancellationToken).Token
-                                    : wait.TimeoutCancellationToken)
-                            .IgnoreFault();
+                        if (wait.TryConclude(Wait.Conclusion.TimedOut))
+                            TryRemoveWait(wait);
                     }

-                    if (cancellationToken.CanBeCanceled)
-                        wait.OnCancellation(cancellationToken, TryRemoveWait);
+                    WaitTimeout(wait, timeout,
+                                cancellationToken.CanBeCanceled
+                                ? CancellationTokenSource.CreateLinkedTokenSource(wait.TimeoutCancellationToken, cancellationToken).Token
+                                : wait.TimeoutCancellationToken)
+                        .IgnoreFault();
                 }
+
+                if (cancellationToken.CanBeCanceled)
+                    wait.OnCancellation(cancellationToken, TryRemoveWait);
+
+                return result.Task;
             }
-
-            return result.Task;
         }

         async Task WaitTimeout(Wait wait, TimeSpan timeout, CancellationToken cancellationToken)


No message

No message

--- MiX.Integrate.API.Client/ILocationsClient.cs
+++ MiX.Integrate.API.Client/ILocationsClient.cs
@@ -42,7 +42,7 @@
 		/// <returns>Locations that have changed since the specified date and time</returns>
 		Task<List<Location>> GetChangedSinceAsync(long organisationId, DateTime since);

-				/// Returns, for a given organisation, a list of the location ids and the migrated legacy location ids
+	 /// Returns, for a given organisation, a list of the location ids and the migrated legacy location ids
 		/// <param name="organisationId">The identifier of the organisation to query</param>
 		/// <returns>Locations ids and the location legacy ids</returns>
 		Task<List<LocationLegacy>> MigrateLegacyIdsAsync(long organisationId);


Kept build-server shutdown in system test (clean didn't delete the .build folder for some reason).

--- Modules/ProjectCreation/Tests/SystemTests.cs
+++ Modules/ProjectCreation/Tests/SystemTests.cs
@@ -33,6 +33,7 @@
             //// Assert DB?  NUnit logs?

             Exec.Cmd("dotnet", "clean build.proj", buildFolder);
+            Exec.Cmd("dotnet", "build-server shutdown", buildFolder);
             DeleteFolder(buildFolder, 5);
         }


[ActivityElement] Update to position correctly when used in SplitView

Inherits from Element instead of UIViewElement
Fixes #202

--- MonoTouch.Dialog/Elements/ActivityElement.cs
+++ MonoTouch.Dialog/Elements/ActivityElement.cs
@@ -1,40 +1,66 @@
 using System;
 using System.Drawing;
 using MonoTouch.UIKit;
+using MonoTouch.Foundation;

 namespace MonoTouch.Dialog
 {
-	public partial class ActivityElement : UIViewElement, IElementSizing {
-		public ActivityElement () : base ("", new UIActivityIndicatorView (UIActivityIndicatorViewStyle.Gray), false)
-		{
-			var sbounds = UIScreen.MainScreen.Bounds;
-			var uia = View as UIActivityIndicatorView;
-
-			uia.StartAnimating ();
-
-			var vbounds = View.Bounds;
-			View.Frame = new RectangleF ((sbounds.Width-vbounds.Width)/2, 4, vbounds.Width, vbounds.Height + 0);
-			View.AutoresizingMask = UIViewAutoresizing.FlexibleLeftMargin | UIViewAutoresizing.FlexibleRightMargin;
+	public class ActivityElement : Element {
+		public ActivityElement():base(""){
+
 		}
-
+
+		UIActivityIndicatorView indicator;
+
 		public bool Animating {
 			get {
-				return ((UIActivityIndicatorView) View).IsAnimating;
+				return indicator.IsAnimating;
 			}
 			set {
-				var activity = View as UIActivityIndicatorView;
 				if (value)
-					activity.StartAnimating ();
+					indicator.StartAnimating ();
 				else
-					activity.StopAnimating ();
+					indicator.StopAnimating ();
 			}
 		}
-
-		float IElementSizing.GetHeight (UITableView tableView, MonoTouch.Foundation.NSIndexPath indexPath)
+
+		static NSString ikey = new NSString ("ActivityElement");
+
+		protected override NSString CellKey {
+			get {
+				return ikey;
+			}
+		}
+
+		public override UITableViewCell GetCell (UITableView tv)
 		{
-			return base.GetHeight (tableView, indexPath)+ 8;
+			var cell = tv.DequeueReusableCell (CellKey);
+			if (cell == null){
+				cell = new UITableViewCell (UITableViewCellStyle.Default, CellKey);
+			}
+
+			indicator = new UIActivityIndicatorView (UIActivityIndicatorViewStyle.Gray);
+			var sbounds = tv.Frame;
+			var vbounds = indicator.Bounds;
+
+			indicator.Frame = new RectangleF((sbounds.Width-vbounds.Width)/2, 12, vbounds.Width, vbounds.Height);
+			indicator.StartAnimating ();
+
+			cell.Add (indicator);
+
+			return cell;
 		}
-
+
+		protected override void Dispose (bool disposing)
+		{
+			if (disposing){
+				if (indicator != null){
+					indicator.Dispose ();
+					indicator = null;
+				}
+			}
+			base.Dispose (disposing);
+		}
 	}
 }


update neural network for to use axon values instead of synapse values

--- NeuralNetwork/NeuralNetwork/NeuralNetwork.cs
+++ NeuralNetwork/NeuralNetwork/NeuralNetwork.cs
@@ -41,7 +41,7 @@
             }
             for (int i = 0; i < _inputs.Count; i++)
             {
-                _inputs[i].Value = inputs[i];
+                _inputs[i].Axon.ProcessSignal(inputs[i]);
             }
         }

@@ -59,7 +59,7 @@
         {
             double[] outputs = new double[_outputs.Count];
             for(var i = 0; i < _outputs.Count; i++){
-                outputs[i] = _outputs[i].Value;
+                outputs[i] = _outputs[i].Axon.Value;
             }
             return outputs;
         }


fixing build

fixing build

--- Spex/Spex.cs
+++ Spex/Spex.cs
@@ -63,8 +63,7 @@
 			return new Scenario()
 			{
 				Title = "asdf",
-				Steps =  = new
-
+			};
 		}
 	}


Use ThreadLocal for ThreadSafety static properties. Performance impact should be reduced.

--- osu.Framework/Development/ThreadSafety.cs
+++ osu.Framework/Development/ThreadSafety.cs
@@ -12,34 +12,34 @@
         [Conditional("DEBUG")]
         internal static void EnsureUpdateThread()
         {
-            //This check is very intrusive on performance, so let's only run when a debugger is actually attached.
-            if (!Debugger.IsAttached) return;
-
             Debug.Assert(IsUpdateThread);
         }

         [Conditional("DEBUG")]
         internal static void EnsureNotUpdateThread()
         {
-            //This check is very intrusive on performance, so let's only run when a debugger is actually attached.
-            if (!Debugger.IsAttached) return;
-
             Debug.Assert(!IsUpdateThread);
         }

         [Conditional("DEBUG")]
         internal static void EnsureDrawThread()
         {
-            //This check is very intrusive on performance, so let's only run when a debugger is actually attached.
-            if (!Debugger.IsAttached) return;
-
             Debug.Assert(IsDrawThread);
         }

-        public static bool IsUpdateThread => Thread.CurrentThread.Name == GameThread.PrefixedThreadNameFor("Update");
+        private static readonly ThreadLocal<bool> is_update_thread = new ThreadLocal<bool>(() =>
+            Thread.CurrentThread.Name == GameThread.PrefixedThreadNameFor("Update"));

-        public static bool IsDrawThread => Thread.CurrentThread.Name == GameThread.PrefixedThreadNameFor("Draw");
+        private static readonly ThreadLocal<bool> is_draw_thread = new ThreadLocal<bool>(() =>
+            Thread.CurrentThread.Name == GameThread.PrefixedThreadNameFor("Draw"));

-        public static bool IsAudioThread => Thread.CurrentThread.Name == GameThread.PrefixedThreadNameFor("Audio");
+        private static readonly ThreadLocal<bool> is_audio_thread = new ThreadLocal<bool>(() =>
+            Thread.CurrentThread.Name == GameThread.PrefixedThreadNameFor("Audio"));
+
+        public static bool IsUpdateThread => is_update_thread.Value;
+
+        public static bool IsDrawThread => is_draw_thread.Value;
+
+        public static bool IsAudioThread => is_audio_thread.Value;
     }
 }


Remove not needed using

Remove not needed using

--- osu.Game.Tests/Visual/TestCaseChatLink.cs
+++ osu.Game.Tests/Visual/TestCaseChatLink.cs
@@ -15,7 +15,6 @@
 using NUnit.Framework;
 using osu.Game.Graphics.Containers;
 using osu.Game.Graphics.Sprites;
-using osu.Game.Online.API;
 using osu.Game.Overlays;

 namespace osu.Game.Tests.Visual


Fix beatmap details not displaying

Fix beatmap details not displaying

--- osu.Game/Screens/Select/BeatmapDetails.cs
+++ osu.Game/Screens/Select/BeatmapDetails.cs
@@ -327,11 +327,6 @@
                                 TextSize = 14,
                             },
                         },
-                        textFlow = new OsuTextFlowContainer
-                        {
-                            RelativeSizeAxes = Axes.X,
-                            AutoSizeAxes = Axes.Y,
-                        },
                     },
                 };
             }
@@ -349,6 +344,8 @@
                     setTextAsync(value);
                 }
             }
+
+            public override bool IsPresent => base.IsPresent || textFlow == null; // Visibility is updated in the LoadComponentAsync callback

             private void setTextAsync(string text)
             {


Case-sensitivity fix for file extensions

Added .ToLower() to ensure extensions explicitly match those in SupportedMediaTypes.json

--- InterFAX.Api/Documents.cs
+++ InterFAX.Api/Documents.cs
@@ -72,7 +72,7 @@
         /// <returns></returns>
         public IFaxDocument BuildFaxDocument(byte[] file, string extension)
         {
-            var ext = extension.Trim('.');
+            var ext = extension.Trim('.').ToLower();
             var mediaType = SupportedMediaTypes.Keys.Contains(ext)
                 ? SupportedMediaTypes[ext]
                 : "application/octet-stream";
@@ -89,7 +89,7 @@
                 throw new FileNotFoundException(filePath);

             var extension = Path.GetExtension(filePath) ?? "*";
-            extension = extension.TrimStart('.');
+            extension = extension.TrimStart('.').ToLower();

             var mediaType = SupportedMediaTypes.Keys.Contains(extension)
                 ? SupportedMediaTypes[extension]
@@ -104,7 +104,7 @@
         public IFaxDocument BuildFaxDocument(string fileName, FileStream fileStream)
         {
             var extension = Path.GetExtension(fileName) ?? "*";
-            extension = extension.TrimStart('.');
+            extension = extension.TrimStart('.').ToLower();;

             var mediaType = SupportedMediaTypes.Keys.Contains(extension)
                 ? SupportedMediaTypes[extension]


Add a test

Add a test

--- osu.Framework.Tests/Visual/TestCaseMouseStates.cs
+++ osu.Framework.Tests/Visual/TestCaseMouseStates.cs
@@ -93,13 +93,12 @@
             ((Container)InputManager.Parent).Add(new StateTracker(0));
         }

-        protected override Vector2? InitialMousePosition => actionContainer.LayoutRectangle.Centre;
+        protected override Vector2? InitialMousePosition => actionContainer.ScreenSpaceDrawQuad.Centre;

         private void initTestCase()
         {
             eventCounts1.Clear();
             eventCounts2.Clear();
-            AddStep("move mouse to center", () => InputManager.MoveMouseTo(actionContainer));
             AddStep("reset event counters", () =>
             {
                 s1.Reset();
@@ -317,6 +316,21 @@
             });
             checkEventCount("Click", 2);
             checkEventCount("DoubleClick", 1);
+        }
+
+        [Test]
+        public void SeparateMouseDown()
+        {
+            initTestCase();
+
+            AddStep("right down", () => InputManager.PressButton(MouseButton.Right));
+            checkEventCount("MouseDown", 1);
+            AddStep("move away", () => InputManager.MoveMouseTo(outerMarginBox.ScreenSpaceDrawQuad.TopLeft));
+            AddStep("left click", () => InputManager.Click(MouseButton.Left));
+            checkEventCount("MouseDown", 1, true);
+            checkEventCount("MouseUp", 1, true);
+            AddStep("right up", () => InputManager.ReleaseButton(MouseButton.Right));
+            checkEventCount("MouseUp", 1);
         }

         private void waitDoubleClickTime()


making a fake change to faile the build at appveyor for testing

--- TSVConfig.cs
+++ TSVConfig.cs
@@ -9,7 +9,7 @@
 {
     public static class TSVConfig
     {
-        private const string CACHE_KEY = "textConfigs";
+        private const string CACHE_KEY_TEST = "textConfigs";

         private static AppEnvironment appEnv = (AppEnvironment)System.Enum.Parse(typeof(AppEnvironment), ConfigurationManager.AppSettings["AppEnvironment"]);


fix code analysis errors

fix code analysis errors

--- Objectivity.Test.Automation.Common/Verify.cs
+++ Objectivity.Test.Automation.Common/Verify.cs
@@ -68,6 +68,7 @@
         /// <param name="enableScreenShot">
         /// Enabling screenshot
         /// </param>
+        [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes", Justification = "removed ref to unit test")]
         public static void That(DriverContext driverContext, Action myAssert, bool enableScreenShot)
         {
             try


* BUGFIX wrong bandwidth calculation / wrong fftResult index (x instead of y)  - fingerpint / frequency bands are now exactly as described in the paper  - now working much better in some cases (nightwish)  - working where it didn't work at all before (pröll)  - not working anymore where it worked good (fendrich, hypocrisy)

--- AudioAlign/AudioAlign.Audio/Matching/HaitsmaKalker2002/FingerprintGenerator.cs
+++ AudioAlign/AudioAlign.Audio/Matching/HaitsmaKalker2002/FingerprintGenerator.cs
@@ -72,14 +72,14 @@

             // sum up the frequency bins
             // TODO check energy computation formula from paper
-            // TODO index-mapping can be precomputed
-            float bandWidth = SAMPLERATE / fftResult.Length;
+            // TODO index-mapping can be precomputed -> CHECKED slower than now!?!
+            double bandWidth = SAMPLERATE / 2d / fftResult.Length;
             for (int x = 0; x < frequencyBands.Length - 1; x++) {
                 bands[x] = 0;
                 int lowerIndex = (int)(frequencyBands[x] / bandWidth);
                 int upperIndex = (int)(frequencyBands[x + 1] / bandWidth);
-                for (int y = lowerIndex; y <= upperIndex; y++) {
-                    bands[x] += fftResult[x];
+                for (int y = lowerIndex; y < upperIndex; y++) {
+                    bands[x] += fftResult[y];
                 }
             }


comments

comments

--- Daenet.DurableTaskMicroservices/Daenet.DurableTaskMicroservices/ServiceHost.cs
+++ Daenet.DurableTaskMicroservices/Daenet.DurableTaskMicroservices/ServiceHost.cs
@@ -288,9 +288,9 @@

         /// <summary>
-        /// Gets the key, which uniquelly identifies the orchestration (service).
-        /// </summary>
-        ///<param name="config">Specifies the instence of activity (task) type.</param>
+        /// Gets the key, which uniquely identifies the orchestration (service).
+        /// </summary>
+        ///<param name="config">Specifies the instance of activity (task) type.</param>
         /// <returns></returns>
         //private static string getConfigKey(IConfig config)
         //{
@@ -299,7 +299,7 @@

         /// <summary>
-        /// Gets the key, which uniquelly identifies the orchestration (service).
+        /// Gets the key, which uniquely identifies the orchestration (service).
         /// </summary>
         ///<param name="typeName">Specifies the type of activity (task) type instance.</param>
         //////<param name="name">Specifies the name of activity (task) type instance.</param>
@@ -389,7 +389,7 @@
                         return svcConfig;
                 }
                 else
-                    throw new ArgumentException("Specified microservice (orchestration) type is not registerd.");
+                    throw new ArgumentException("Specified microservice (orchestration) type is not registered.");
             }
         }

@@ -400,7 +400,7 @@
         /// <typeparam name="T"></typeparam>
         /// <param name="name">Name of the type instance. Every activity is identified by its type and its name.</param>
         /// <param name="typeName">Type of the activity (task).</param>
-        /// <returns>Untyped instance ofconfiguration.</returns>
+        /// <returns>Untyped instance of configuration.</returns>
         public static object GetActivityConfiguration(string name, Type typeName)
         {
             string activityKey = getConfigKey(String.Empty, typeName);


bug fix

bug fix

--- DapRepo.DataAccess/GenericRepository.cs
+++ DapRepo.DataAccess/GenericRepository.cs
@@ -152,7 +152,7 @@
             }
             else if (type == typeof(Guid))
             {
-                return "UNIQUEIDENTOFIER";
+                return "UNIQUEIDENTIFIER";
             }


removed comment

removed comment

--- Forum3/Startup.cs
+++ Forum3/Startup.cs
@@ -37,7 +37,6 @@
 			if (string.IsNullOrEmpty(connectionString))
 				connectionString = Configuration.GetConnectionString("DefaultConnection");

-			// Add framework services.
 			services.AddDbContext<ApplicationDbContext>(options =>
 				options.UseSqlServer(connectionString)
 			);


Turn off photoscreen saver untill fully tested

--- MediaBrowser.Plugins.DefaultTheme/Screensavers/PhotoScreensaverWindow..xaml.cs
+++ MediaBrowser.Plugins.DefaultTheme/Screensavers/PhotoScreensaverWindow..xaml.cs
@@ -24,7 +24,7 @@
     /// <summary>
     /// Screen saver factory to create Photo Screen saver
     /// </summary>
-    public class PhotoScreensaverFactory : IScreensaverFactory
+    public class PhotoScreensaverFactory // : IScreensaverFactory // turn off photoscreen save until full tested
     {
         private readonly IApplicationHost _applicationHost;

@@ -38,6 +38,7 @@

         public IScreensaver GetScreensaver()
         {
+
             return (IScreensaver)_applicationHost.CreateInstance(typeof(PhotoScreensaverWindow));
         }
     }


Tweak bar chart data animation timings.

Tweak bar chart data animation timings.

--- Joey/UI/Views/BarChart.cs
+++ Joey/UI/Views/BarChart.cs
@@ -186,12 +186,12 @@
                 scene.Play (fadeOverlayOut);

                 foreach (var row in rows) {
-                    var axisFadeIn = ObjectAnimator.OfFloat (row.YAxisTextView, "alpha", 0f, 1f).SetDuration (200);
+                    var axisFadeIn = ObjectAnimator.OfFloat (row.YAxisTextView, "alpha", 0f, 1f).SetDuration (500);
                     var barScaleUp = ObjectAnimator.OfFloat (row.BarView, "scaleX", 0f, 1f).SetDuration (750);
-                    var valueFadeIn = ObjectAnimator.OfFloat (row.ValueTextView, "alpha", 0f, 1f).SetDuration (200);
+                    var valueFadeIn = ObjectAnimator.OfFloat (row.ValueTextView, "alpha", 0f, 1f).SetDuration (400);

                     scene.Play (axisFadeIn);
-                    scene.Play (barScaleUp).After (100);
+                    scene.Play (barScaleUp).After (axisFadeIn.Duration / 2);
                     scene.Play (valueFadeIn).After (barScaleUp);
                 }


Resolve #1070 -- Fix Commands (#1069)

Resolve #1070 -- Fix Commands (#1069)

* Added communication channel to loading screen convertors

--- PacketDefinitions420/PacketHandlerManager.cs
+++ PacketDefinitions420/PacketHandlerManager.cs
@@ -62,7 +62,7 @@
                 {
                     if (attr is PacketType)
                     {
-                        if (((PacketType)attr).ChannelId == Channel.CHL_LOADING_SCREEN)
+                        if (((PacketType)attr).ChannelId == Channel.CHL_LOADING_SCREEN || ((PacketType)attr).ChannelId == Channel.CHL_COMMUNICATION)
                         {
                             var method = (RequestConvertor)Delegate.CreateDelegate(typeof(RequestConvertor), m);
                             _loadScreenConvertorTable.Add(((PacketType)attr).LoadScreenPacketId, method);


Create DateTimeOffsets from XEP-0082 date strings

--- Extensions/XEP-0082/DateTimeProfiles.cs
+++ Extensions/XEP-0082/DateTimeProfiles.cs
@@ -1,5 +1,6 @@
 using System;
 using System.Collections.Generic;
+using System.Globalization;
 using System.Linq;
 using System.Text;
 using System.Threading.Tasks;
@@ -88,5 +89,15 @@
         {
             return dt.ToUniversalTime().ToString("yyyy-MM-ddThh:mm:ss.fffZ");
         }
+
+        /// <summary>
+        /// Create a DateTimeOffset from an XEP-0082 string
+        /// </summary>
+        public static DateTimeOffset FromXmppString(string dt)
+        {
+            dt.ThrowIfNullOrEmpty("dt");
+
+            return DateTimeOffset.Parse(dt, null, DateTimeStyles.AdjustToUniversal | DateTimeStyles.RoundtripKind);
+        }
     }
 }


Release version 1.0.5

Release version 1.0.5

--- PhotoShopFileType/Properties/AssemblyInfo.cs
+++ PhotoShopFileType/Properties/AssemblyInfo.cs
@@ -55,5 +55,5 @@
 //
 // You can specify all the values or you can default the Revision and Build Numbers
 // by using the '*' as shown below:
-[assembly: AssemblyVersion("1.0.4.*")]
-[assembly: AssemblyFileVersion("1.0.4.0")]
+[assembly: AssemblyVersion("1.0.5.*")]
+[assembly: AssemblyFileVersion("1.0.5.0")]


Check existence in background thread for UWP compatibility

--- FluentFTP/Client/FtpClient_HighLevel.cs
+++ FluentFTP/Client/FtpClient_HighLevel.cs
@@ -736,9 +736,9 @@
 				throw new ArgumentException("Required parameter is null or blank.", "localPath");
 			if (remotePath.IsBlank())
 				throw new ArgumentException("Required parameter is null or blank.", "remotePath");
-
+
 			// skip uploading if the local file does not exist
-			if (!File.Exists(localPath)) {
+			if (!await Task.Run(()=>File.Exists(localPath))) {
 				FtpTrace.WriteStatus(FtpTraceLevel.Error, "File does not exist.");
 				return false;
 			}
@@ -1542,7 +1542,7 @@
 				throw new ArgumentNullException("localPath");

 			// skip downloading if the local file exists
-			if (!overwrite && File.Exists(localPath)) {
+			if (!overwrite && await Task.Run(() => File.Exists(localPath))) {
 				FtpTrace.WriteStatus(FtpTraceLevel.Error, "Overwrite is false and local file already exists");
 				return false;
 			}


Housekeeping.

Housekeeping.

--- Piccolo.UnitTests/PiccoloHttpHandlerTests.cs
+++ Piccolo.UnitTests/PiccoloHttpHandlerTests.cs
@@ -447,7 +447,7 @@
 		}

 		[TestFixture]
-		public class when_processing_request_with_route_parameter_datatype_mismatch_exception : given_http_handler
+		public class when_processing_request_with_route_parameter_datatype_mismatch : given_http_handler
 		{
 			private Mock<HttpResponseBase> _httpResponse;

@@ -501,7 +501,7 @@
 			}

 			[Route("/route_parameter_datatype_mismatch_exception/{id}")]
-			public class HandlerWithRuntimeRouteParameterDatatypeMismatchException : IGet<string>
+			public class HandlerWithRuntimeRouteParameterDatatypeMismatch : IGet<string>
 			{
 				public int Id { get; set; }

@@ -514,7 +514,7 @@
 		}

 		[TestFixture]
-		public class when_processing_request_with_route_parameter_datatype_mismatch_exception_in_aspnet_debug_mode : given_http_handler
+		public class when_processing_request_with_route_parameter_datatype_mismatch_in_aspnet_debug_mode : given_http_handler
 		{
 			private Mock<HttpResponseBase> _httpResponse;

@@ -570,7 +570,7 @@
 		}

 		[TestFixture]
-		public class when_processing_request_with_malformed_payload_exception : given_http_handler
+		public class when_processing_request_with_malformed_payload : given_http_handler
 		{
 			private Mock<HttpResponseBase> _httpResponse;

@@ -624,7 +624,7 @@
 			}

 			[Route("/malformed_payload_exception")]
-			public class HandlerWithRuntimeRouteParameterDatatypeMismatchException : IPost<DateTime, string>
+			public class HandlerWithRuntimeRouteParameterDatatypeMismatch : IPost<DateTime, string>
 			{
 				[ExcludeFromCodeCoverage]
 				public HttpResponseMessage<string> Post(DateTime parameters)
@@ -635,7 +635,7 @@
 		}

 		[TestFixture]
-		public class when_processing_request_with_malformed_payload_exception_in_aspnet_debug_mode : given_http_handler
+		public class when_processing_request_with_malformed_payload_in_aspnet_debug_mode : given_http_handler
 		{
 			private Mock<HttpResponseBase> _httpResponse;


Das löschen von Blöcken verbessert

Das löschen von Blöcken verbessert

Die verbesserung is mir heute morgen noch eingefallen und wollte ich
noch mit im Master haben.

--- Platformer_001/Assets/Scripts/Endlosmodus.cs
+++ Platformer_001/Assets/Scripts/Endlosmodus.cs
@@ -10,13 +10,14 @@
 	int minPlatSize=3;
 	int maxPlatSize=7;
 	int maxHazardSize=4;
-	int maxUp=4;
-	int maxDown=-6;
+	int maxUp=3;
+	int maxDown=-2;
 	[Range(0,1)]
 	float hazardChance=.3f;
 	int lastX;
 	List<GameObject> spawnedTiles;
 	bool isHazard;
+	int spawnedBlocks=0;

 	void Start () {
 		spawnedTiles = new List<GameObject>();
@@ -36,8 +37,8 @@
 			Spawn ();
 			Delete ();
 			hazardChance += .01f;
-			print (hazardChance);
 		}
+		spawnedBlocks = 0;
 	}

 	void Spawn() {
@@ -53,6 +54,7 @@
 			isHazard = false;
 			for (int i = 2; i <= size * 2; i = i + 2) {
 				GameObject tile = Instantiate (grass, new Vector3 (lastX + 2, height, 0), new Quaternion ());
+				spawnedBlocks++;
 				lastX += 2;
 				spawnedTiles.Add (tile);
 			}
@@ -60,7 +62,7 @@
 	}

 	void Delete()	{
-		int f = Mathf.RoundToInt(Player.transform.position.x - spawnedTiles [0].transform.position.x - 100f);
+		int f = spawnedBlocks;
 		for (int i = 1; i <= f; i++) {
 			Destroy (spawnedTiles [0]);
 			spawnedTiles.RemoveAt (0);


Fix a bug reported on the RequestMarketData function where if you request multiple ticks, the api was only requesting the first tick in the list.

--- Krs.Ats.IBNet/IBClient.cs
+++ Krs.Ats.IBNet/IBClient.cs
@@ -1347,10 +1347,16 @@
                          *
                          * Therefore we are relying on TWS doing validation.
                          */
+
                         StringBuilder genList = new StringBuilder();
                         if (genericTickList != null)
-                            genList.AppendFormat("{0},",
-                                                 ((int) genericTickList[0]).ToString(CultureInfo.InvariantCulture));
+                        {
+                            for (int counter = 0; counter < genericTickList.Count; counter++)
+                                genList.AppendFormat("{0},",
+                                                     ((int) genericTickList[counter]).ToString(
+                                                         CultureInfo.InvariantCulture));
+                        }
+
                         if (marketDataOff)
                             genList.AppendFormat("mdoff");


[V2] Process settings on the right Xcode configuration, rather than assuming it's always the first

--- packages/XcodeBuilder/dev/XcodeBuilder.cs
+++ packages/XcodeBuilder/dev/XcodeBuilder.cs
@@ -683,7 +683,7 @@
             return newBuildFile;
         }

-        private Target
+        public Target
         FindOrCreateTarget(
             Bam.Core.V2.Module module,
             FileReference fileRef,
@@ -702,14 +702,12 @@
             return newTarget;
         }

-        public Target
+        public Configuration
         AddNewTargetConfiguration(
             Bam.Core.V2.Module module,
             FileReference fileRef,
-            Target.EProductType type)
-        {
-            var target = this.FindOrCreateTarget(module, fileRef, type);
-
+            Target target)
+        {
             var config = new Configuration(module.BuildEnvironment.Configuration.ToString());
             config["PRODUCT_NAME"] = new UniqueConfigurationValue("$(TARGET_NAME)");

@@ -725,7 +723,7 @@
             target.ConfigurationList.AddConfiguration(config);
             this.Configurations.Add(config);

-            return target;
+            return config;
         }

         private void InternalSerialize(System.Text.StringBuilder text, int indentLevel)
@@ -749,6 +747,7 @@
             text.AppendLine();
             text.AppendFormat("{0}compatibilityVersion = \"{1}\";", indent2, "Xcode 3.2"); // TODO
             text.AppendLine();
+            // project configuration list is always the first
             text.AppendFormat("{0}buildConfigurationList = {1} /* Build configuration list for FILLEMIN */;", indent2, this.ConfigurationLists[0].GUID);
             text.AppendLine();
             text.AppendFormat("{0}mainGroup = {1};", indent2, this.MainGroup.GUID);
@@ -953,9 +952,13 @@
             protected set;
         }

-        public void SetCommonCompilationOptions(Bam.Core.V2.Module module, Bam.Core.V2.Settings settings)
-        {
-            (settings as XcodeProjectProcessor.V2.IConvertToProject).Convert(module, this.ConfigurationList[0]);
+        public void
+        SetCommonCompilationOptions(
+            Bam.Core.V2.Module module,
+            Configuration configuration,
+            Bam.Core.V2.Settings settings)
+        {
+            (settings as XcodeProjectProcessor.V2.IConvertToProject).Convert(module, configuration);
         }

         private string ProductTypeToString()
@@ -1312,6 +1315,12 @@
         }

         public Target Target
+        {
+            get;
+            protected set;
+        }
+
+        public Configuration Configuration
         {
             get;
             protected set;
@@ -1448,7 +1457,8 @@
                 sourceTree:FileReference.ESourceTree.BuiltProductsDir);
             this.Output = library;
             this.Project.ProductRefGroup.AddReference(library);
-            this.Target = this.Project.AddNewTargetConfiguration(module, library, V2.Target.EProductType.StaticLibrary);
+            this.Target = this.Project.FindOrCreateTarget(module, library, V2.Target.EProductType.StaticLibrary);
+            this.Configuration = this.Project.AddNewTargetConfiguration(module, library, this.Target);
         }

         public void AddSource(Bam.Core.V2.Module module, FileReference source, BuildFile output, Bam.Core.V2.Settings patchSettings)
@@ -1465,7 +1475,7 @@

         public void SetCommonCompilationOptions(Bam.Core.V2.Module module, Bam.Core.V2.Settings settings)
         {
-            this.Target.SetCommonCompilationOptions(module, settings);
+            this.Target.SetCommonCompilationOptions(module, this.Configuration, settings);
         }

         public FileReference Output
@@ -1490,10 +1500,8 @@
                 sourceTree:FileReference.ESourceTree.BuiltProductsDir);
             this.Output = application;
             this.Project.ProductRefGroup.AddReference(application);
-
-            var target = new Target(module, this.Project, application, V2.Target.EProductType.Executable);
-            this.Target = target;
-            this.Project.SourcesBuildPhases.Add(target.SourcesBuildPhase);
+            this.Target = this.Project.FindOrCreateTarget(module, application, V2.Target.EProductType.Executable);
+            this.Configuration = this.Project.AddNewTargetConfiguration(module, application, this.Target);
         }

         public void AddSource(Bam.Core.V2.Module module, FileReference source, BuildFile output, Bam.Core.V2.Settings patchSettings)
@@ -1508,9 +1516,12 @@
             this.Project.MainGroup.AddReference(source); // TODO: will do proper grouping later
         }

-        public void SetCommonCompilationOptions(Bam.Core.V2.Module module, Bam.Core.V2.Settings settings)
-        {
-            this.Target.SetCommonCompilationOptions(module, settings);
+        public void
+        SetCommonCompilationOptions(
+            Bam.Core.V2.Module module,
+            Bam.Core.V2.Settings settings)
+        {
+            this.Target.SetCommonCompilationOptions(module, this.Configuration, settings);
         }

         public FileReference Output


Copy values from the prototype.

Copy values from the prototype.

--- Overrides.cs
+++ Overrides.cs
@@ -18,13 +18,13 @@
             ShaderUniforms uniforms=null)
         {
             this.Prototype = prototype;
-            this.Lighting = lighting;
-            this.Material = material;
-            this.Alpha = alpha;
-            this.ShaderProgram = shaderProgram;
-            this.VertexShader = vertexShader;
-            this.FragmentShader = fragmentShader;
-            this.Uniforms = uniforms ?? new ShaderUniforms();
+            this.Lighting = lighting ?? prototype.GetLighting(null);
+            this.Material = material ?? prototype.GetMaterial(null);
+            this.Alpha = alpha ?? (prototype != null ? prototype.Alpha : null);
+            this.ShaderProgram = shaderProgram ?? prototype.GetShaderProgram(null);
+            this.VertexShader = vertexShader ?? prototype.GetVertexShader(null);
+            this.FragmentShader = fragmentShader ?? prototype.GetFragmentShader(null);
+            this.Uniforms = uniforms ?? prototype.GetUniforms(null) ?? new ShaderUniforms();
         }

         public readonly Overrides Prototype;


Use University_Structure vocabulary

Use University_Structure vocabulary

--- R7.University.Launchpad/EditDivision.ascx.cs
+++ R7.University.Launchpad/EditDivision.ascx.cs
@@ -67,7 +67,7 @@
 			// Fill terms list
 			var termCtrl = new TermController ();
 			// TODO: Org. structure vocabulary name must be set in settings
-			var terms = termCtrl.GetTermsByVocabulary("Structure").ToList();
+			var terms = termCtrl.GetTermsByVocabulary("University_Structure").ToList();

 			// add default term,
 			// TermId = Null.NullInteger is setting in cstor


Revert "Revert "Revert "^"""

Revert "Revert "Revert "^"""

This reverts commit a1b027c6954acfec60f4cbdc4be9094cf5b87fe0.

--- RateSharp.Net/RateSharp.Net.Test/RateTest.cs
+++ RateSharp.Net/RateSharp.Net.Test/RateTest.cs
@@ -1,135 +0,0 @@
-using System;
-using System.Diagnostics;
-using NUnit.Framework;
-
-using RateSharp.Net.Models.Enum;
-using RateSharp.Net.Models;
-
-namespace RateSharp.Net.Test
-{
-    [TestFixture]
-    public class RateTest
-    {
-        [TestFixtureSetUp]
-        public void Init()
-        {
-         /* Enter your API Key below.
-          * ******************************************/
-            const string apiKey = "";
-         /* ******************************************/
-
-            var day = DateTime.UtcNow.DayOfWeek;
-            var hour = DateTime.UtcNow.Hour;
-
-            switch (day)
-            {
-                case DayOfWeek.Friday:
-                    if (hour > 22) Debug.Assert(false, "Markets are closed!", "Markets reopen on Sunday 22:00 UTC");
-                    break;
-
-                case DayOfWeek.Saturday:
-                    Debug.Assert(false, "Markets are closed!", "Markets reopen on Sunday 22:00 UTC");
-                    break;
-
-                case DayOfWeek.Sunday:
-                    if (hour < 22) Debug.Assert(false, "Markets are closed!", "Markets reopen on Sunday 22:00 UTC");
-                    break;
-            }
-
-            _rates = new Rates(apiKey);
-        }
-
-        private Rates _rates;
-
-        [TestCase]
-        public void Can_GetBarUpdate()
-        {
-            var bar = _rates.GetBarUpdate(TimePeriod.M5, Symbol.EURNOK);
-            Debug.Assert(bar.Open != 0, "Open price is invalid");
-            Debug.Assert(bar.Close != 0, "Close price is invalid");
-            Debug.Assert(bar.High != 0, "High price is invalid");
-            Debug.Assert(bar.Low != 0, "Low price is invalid");
-            Debug.Assert(bar.Timestamp > DateTime.UtcNow.Subtract(TimeSpan.FromDays(365)));
-
-            Console.WriteLine("Open: {0}", bar.Open);
-            Console.WriteLine("Close: {0}", bar.Close);
-            Console.WriteLine("High: {0}", bar.High);
-            Console.WriteLine("Low: {0}", bar.Low);
-            Console.WriteLine("Time stamp: {0}\n", bar.Timestamp);
-        }
-
-        [TestCase]
-        public void Can_GetLotUpdate()
-        {
-            var allSymbols = _rates.GetLotUpdate(TimePeriod.M60);
-            var periodProperties = allSymbols.GetType().GetProperties();
-
-            foreach (var property in periodProperties)
-            {
-                if (!(property.GetValue(allSymbols) is SymbolBar)) continue;
-
-                var bar = (SymbolBar)property.GetValue(allSymbols);
-                bar.Timestamp = allSymbols.Timestamp;
-
-                Debug.Assert(bar.Open != 0, "Open price is invalid");
-                Debug.Assert(bar.Close != 0, "Close price is invalid");
-                Debug.Assert(bar.High != 0, "High price is invalid");
-                Debug.Assert(bar.Low != 0, "Low price is invalid");
-                Debug.Assert(bar.Timestamp > DateTime.UtcNow.Subtract(TimeSpan.FromDays(365)));
-
-                Console.WriteLine(property.Name);
-                Console.WriteLine("Open: {0}", bar.Open);
-                Console.WriteLine("Close: {0}", bar.Close);
-                Console.WriteLine("High: {0}", bar.High);
-                Console.WriteLine("Low: {0}", bar.Low);
-                Console.WriteLine("Time stamp: {0}\n", bar.Timestamp);
-            }
-        }
-
-        [TestCase]
-        public void Can_GetBarHistory()
-        {
-            var symbolHistory = _rates.GetBarHistory(TimePeriod.M1, Symbol.TRYJPY, DateTime.Now.Subtract(new TimeSpan(1,0,0,0)));
-
-            foreach (var bar in symbolHistory)
-            {
-                Debug.Assert(bar.Open != 0, "Open price is invalid");
-                Debug.Assert(bar.Close != 0, "Close price is invalid");
-                Debug.Assert(bar.High != 0, "High price is invalid");
-                Debug.Assert(bar.Low != 0, "Low price is invalid");
-                Debug.Assert(bar.Timestamp > DateTime.UtcNow.Subtract(TimeSpan.FromDays(365)));
-
-                Console.WriteLine("Open: {0}", bar.Open);
-                Console.WriteLine("Close: {0}", bar.Close);
-                Console.WriteLine("High: {0}", bar.High);
-                Console.WriteLine("Low: {0}", bar.Low);
-                Console.WriteLine("Time stamp: {0}\n", bar.Timestamp);
-            }
-        }
-
-        [TestCase]
-        public void Can_GetAllPeriodsUpdate()
-        {
-            var periods = _rates.GetAllPeriodsUpdate(Symbol.USDTRY);
-            var periodProperties = periods.GetType().GetProperties();
-
-            foreach (var property in periodProperties)
-            {
-                var bar = (SymbolBar)property.GetValue(periods);
-
-                Debug.Assert(bar.Open  != 0, "Open price is invalid");
-                Debug.Assert(bar.Close != 0, "Close price is invalid");
-                Debug.Assert(bar.High  != 0, "High price is invalid");
-                Debug.Assert(bar.Low   != 0, "Low price is invalid");
-                Debug.Assert(bar.Timestamp > DateTime.UtcNow.Subtract(TimeSpan.FromDays(365)));
-
-                Console.WriteLine(property.Name);
-                Console.WriteLine("Open: {0}", bar.Open);
-                Console.WriteLine("Close: {0}", bar.Close);
-                Console.WriteLine("High: {0}", bar.High);
-                Console.WriteLine("Low: {0}", bar.Low);
-                Console.WriteLine("Time stamp: {0}\n", bar.Timestamp);
-            }
-        }
-    }
-}


Fixed swallowed cast exception

Fixed swallowed cast exception

This exception caused that the deleting of a package did not work
correctly.

--- nUpdate.Administration/UI/Dialogs/ProjectDialog.cs
+++ nUpdate.Administration/UI/Dialogs/ProjectDialog.cs
@@ -30,8 +30,11 @@
 {
     public partial class ProjectDialog : BaseDialog, IAsyncSupportable, IResettable
     {
+// ReSharper disable once InconsistentNaming
         private const float KB = 1024;
+        // ReSharper disable once InconsistentNaming
         private const float MB = 1048576;
+        // ReSharper disable once InconsistentNaming
         private const float GB = 1073741824;
         private bool _allowCancel = true;
         private Uri _configurationFileUrl;
@@ -1624,8 +1627,7 @@
                         try
                         {
                             updateConfig.Remove(
-                                updateConfig.First(item => new UpdateVersion(item.LiteralVersion) ==
-                                                           (UpdateVersion) ((ListViewItem) enumerator.Current).Tag));
+                                updateConfig.First(item => item.LiteralVersion == (string)((ListViewItem) enumerator.Current).Tag));
                         }
                         catch
                         {
@@ -1635,7 +1637,6 @@
                     enumerator.Reset();

                     var configurationFilePath = Path.Combine(Program.Path, "updates.json");
-
                     try
                     {
                         File.WriteAllText(configurationFilePath, Serializer.Serialize(updateConfig));


Add GET verb.

Add GET verb.

--- src/redmine-net-api/HttpVerbs.cs
+++ src/redmine-net-api/HttpVerbs.cs
@@ -23,6 +23,10 @@
     public static class HttpVerbs
     {
         /// <summary>
+        /// Represents an HTTP GET protocol method that is used to get an entity identified by a URI.
+        /// </summary>
+        public const string GET = "GET";
+        /// <summary>
         /// Represents an HTTP PUT protocol method that is used to replace an entity identified by a URI.
         /// </summary>
         public const string PUT = "PUT";


Add Async method.

Add Async method.


Make the HttpWebRequest provide more details for Put failures


release

release


Fix Issue 774 test so it works with wrapped IApp on phone and tablet

--- Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue774.cs
+++ Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue774.cs
@@ -34,48 +34,25 @@
 		[Test]
 		public void Issue774TestsDismissActionSheetAfterRotation ()
 		{
+			RunningApp.Tap(q => q.Button("Show ActionSheet"));
+			RunningApp.Screenshot("Show ActionSheet");

-			RunningApp.Tap (q => q.Button ("Show ActionSheet"));
-			RunningApp.Screenshot ("Show ActionSheet");
+			RunningApp.SetOrientationLandscape();
+			RunningApp.Screenshot("Rotate Device");

-			RunningApp.SetOrientationLandscape ();
-			RunningApp.Screenshot ("Rotate Device");
-
-			var app = (RunningApp as iOSApp);
+			// Wait for the action sheet element to show up
+			RunningApp.WaitForElement(q => q.Marked("What's up"));

-			if (app != null) {
+			var dismiss = RunningApp.Query("Dismiss");

-				if (!app.Device.IsTablet)
-					RunningApp.Tap (q => q.Marked ("Dismiss"));
-				else // iPad does not have dismiss option
-					RunningApp.Tap (q => q.Marked ("Destroy"));
+			var target = dismiss.Length > 0 ? "Dismiss" : "Destroy";

-				if(app.Device.IsTablet)
-					RunningApp.WaitForNoElement (q => q.Marked ("Destroy"));
-				else
-					RunningApp.WaitForNoElement (q => q.Marked ("Dismiss"));

-				RunningApp.Screenshot ("Dismiss ActionSheet");
+			RunningApp.Tap(q => q.Marked(target));
+			RunningApp.WaitForNoElement(q => q.Marked(target));

-//				App.SetOrientationPortrait ();
-//				App.Tap (q => q.Button ("Show ActionSheet"));
-//				App.Screenshot ("Rotate and show ActionSheet");
-//
-//				if (!app.Device.IsTablet)
-//					App.Tap (q => q.Button ("Dismiss"));
-//				else // iPad does not have dismiss option
-//					App.Tap (q => q.Marked ("Destroy"));
-//
-//				if (app.Device.IsTablet)
-//					App.WaitForNoElement (q => q.Marked ("Destroy"));
-//				else // iPad does not have dismiss option
-//					App.WaitForNoElement (q => q.Marked ("Dismiss"));
-
-			}
-			else
-			{
-				RunningApp.Tap(q => q.Marked("Dismiss"));
-			}
+			RunningApp.Screenshot("Dismiss ActionSheet");
+
 		}

 		[TearDown]


Correct bug in Item Points parsing.

Correct bug in Item Points parsing.

--- Tabulator.cs
+++ Tabulator.cs
@@ -796,7 +796,7 @@
                                 }
                                 else if (spoints < 0 || spoints > points)
                                 {
-                                    ReportError(it, ErrCat.Metadata, ErrSeverity.Severe, "Metadata ScorePoints value is out of range (0 - {1}).", "ScorePoints='{0}' value='{1}' min='0' max='{2}'", scorePoints, spoints, points);
+                                    ReportError(it, ErrCat.Metadata, ErrSeverity.Severe, "Metadata ScorePoints value is out of range.", "ScorePoints='{0}' value='{1}' min='0' max='{2}'", scorePoints, spoints, points);
                                 }
                                 else
                                 {
@@ -2016,7 +2016,7 @@
                 if (!char.IsDigit(c)) return i;
                 i = (i * 10) + (c - '0');
             }
-            return 0;
+            return i;
         }
     }
 }


9869: temp note on Color

9869: temp note on Color

--- a_mini/projects/PixelFarm/PixelFarm.MiniAgg/02_PixelBuffer/PixelBlenderRGBA.cs
+++ a_mini/projects/PixelFarm/PixelFarm.MiniAgg/02_PixelBuffer/PixelBlenderRGBA.cs
@@ -29,7 +29,7 @@

 using PixelFarm.Drawing;
 using System.Collections.Generic;
-using System;
+using System;

 namespace PixelFarm.Agg.Imaging
 {
@@ -53,11 +53,33 @@

     public sealed class PixelBlenderBGRA : PixelBlenderBGRABase, IPixelBlender
     {
+        //from https://microsoft.github.io/Win2D/html/PremultipliedAlpha.htm
+        //1. Straight alpha
+        //result = (source.RGB* source.A) + (dest.RGB* (1 - source.A))
+        //---
+        //2. Premultiplied alpha
+        //result = source.RGB + (dest.RGB * (1 - source.A))
+        //---
+        //3. Converting between alpha formats
+        //3.1 from straight to premult
+        //premultiplied.R = (byte) (straight.R* straight.A / 255);
+        //premultiplied.G = (byte) (straight.G* straight.A / 255);
+        //premultiplied.B = (byte) (straight.B* straight.A / 255);
+        //premultiplied.A = straight.A;
+        //3.2 from premult to strait
+        //straight.R = premultiplied.R  * ((1/straight.A) * 255);
+        //straight.G = premultiplied.G  * ((1/straight.A) * 255);
+        //straight.B = premultiplied.B  * ((1/straight.A) * 255);
+        //straight.A = premultiplied.A;
+
+
         public PixelBlenderBGRA()
         {
         }
         public Color PixelToColorRGBA_Bytes(byte[] buffer, int bufferOffset)
         {
+            //TODO: review here
+            //change  if the buffer is pre-mul
             return new Color(
                 buffer[bufferOffset + CO.A],
                 buffer[bufferOffset + CO.R],
@@ -102,10 +124,10 @@
                     }
                     else
                     {
-                        int r = buffer[bufferOffset + CO.R];
-                        int g = buffer[bufferOffset + CO.G];
-                        int b = buffer[bufferOffset + CO.B];
-                        int a = buffer[bufferOffset + CO.A];
+                        byte r = buffer[bufferOffset + CO.R];
+                        byte g = buffer[bufferOffset + CO.G];
+                        byte b = buffer[bufferOffset + CO.B];
+                        byte a = buffer[bufferOffset + CO.A];
                         buffer[bufferOffset + CO.R] = (byte)(((sourceColor.red - r) * sourceColor.alpha + (r << (int)AggColorExtensions.BASE_SHIFT)) >> (int)AggColorExtensions.BASE_SHIFT);
                         buffer[bufferOffset + CO.G] = (byte)(((sourceColor.green - g) * sourceColor.alpha + (g << (int)AggColorExtensions.BASE_SHIFT)) >> (int)AggColorExtensions.BASE_SHIFT);
                         buffer[bufferOffset + CO.B] = (byte)(((sourceColor.blue - b) * sourceColor.alpha + (b << (int)AggColorExtensions.BASE_SHIFT)) >> (int)AggColorExtensions.BASE_SHIFT);
@@ -216,10 +238,10 @@
         {
             unchecked
             {
-                int r = buffer[bufferOffset + CO.R];
-                int g = buffer[bufferOffset + CO.G];
-                int b = buffer[bufferOffset + CO.B];
-                int a = buffer[bufferOffset + CO.A];
+                byte r = buffer[bufferOffset + CO.R];
+                byte g = buffer[bufferOffset + CO.G];
+                byte b = buffer[bufferOffset + CO.B];
+                byte a = buffer[bufferOffset + CO.A];
                 buffer[bufferOffset + CO.R] = m_gamma.inv((byte)(((sourceColor.red - r) * sourceColor.alpha + (r << (int)AggColorExtensions.BASE_SHIFT)) >> (int)AggColorExtensions.BASE_SHIFT));
                 buffer[bufferOffset + CO.G] = m_gamma.inv((byte)(((sourceColor.green - g) * sourceColor.alpha + (g << (int)AggColorExtensions.BASE_SHIFT)) >> (int)AggColorExtensions.BASE_SHIFT));
                 buffer[bufferOffset + CO.B] = m_gamma.inv((byte)(((sourceColor.blue - b) * sourceColor.alpha + (b << (int)AggColorExtensions.BASE_SHIFT)) >> (int)AggColorExtensions.BASE_SHIFT));
@@ -240,9 +262,13 @@
         static readonly int[] m_Saturate9BitToByte = new int[1 << 9];
         public PixelBlenderPreMultBGRA()
         {
+
             if (m_Saturate9BitToByte[2] == 0)
             {
-                for (int i = 0; i < m_Saturate9BitToByte.Length; i++)
+
+                //init the look-up table (once)
+                int len = m_Saturate9BitToByte.Length;
+                for (int i = 0; i < len; i++)
                 {
                     m_Saturate9BitToByte[i] = Math.Min(i, 255);
                 }


Removed Attributes property.

Removed Attributes property.

--- ITablatureFile.cs
+++ ITablatureFile.cs
@@ -1,7 +1,7 @@
 #region

 using System;
-using System.Collections.Generic;
+using System.IO;
 using Tabster.Core.Types;

 #endregion
@@ -10,9 +10,8 @@
 {
     public interface ITablatureFile : ITablatureAttributes
     {
+        FileInfo FileInfo { get; }
         Version Version { get; }
-        Dictionary<string, string> Attributes { get; }
-
         void Load(string fileName);
         void Save(string fileName);
     }


Tell: Also save when reading/consuming messages

--- Tell/Tell.cs
+++ Tell/Tell.cs
@@ -102,6 +102,7 @@
                 irc.SendNotice(e.Nick, FormatTell(tellMsg));

             irc.SendNotice(e.Nick, "You have {0} more message(s) waiting.", inbox.MessagesCount);
+            inboxes.Save(inbox);
         }
         else
             irc.SendNotice(e.Nick, "No messages to read.");


Fix mod detection. Fixes #15

Fix mod detection. Fixes #15

--- KraxbotOSS/Form1.cs
+++ KraxbotOSS/Form1.cs
@@ -440,12 +440,15 @@
             SteamID userID = callback.ChatterID;
             SteamID chatRoomID = callback.ChatRoomID;
             Settings chatRoom = CR.Single(s => s.ChatID == chatRoomID);
+            UserInfo chatter = chatRoom.Users.Single(s => s.SteamID == userID);

             string name = friends.GetFriendPersonaName(callback.ChatterID);
             string game = friends.GetFriendGamePlayedName(callback.ChatterID);

-            // TODO: Fix this
-            bool isMod = true;
+            // Check if mod
+            bool isMod = false;
+            if (chatter.Rank == EClanPermission.Moderator || chatter.Rank == EClanPermission.Officer || chatter.Rank == EClanPermission.Owner)
+                isMod = true;

             // TODO: Spam protection


More detailed notes

More detailed notes

--- KraxbotOSS/Form1.cs
+++ KraxbotOSS/Form1.cs
@@ -721,7 +721,7 @@

         void CreateSettings(SteamID ChatRoomID)
         {
-            // TODO: Get more info that defaults to null
+            // TODO: Get ChatName, InvitedName and InvitedID
             CR.Add(new Settings() { ChatID = ChatRoomID });
         }
         void SaveSettings(Settings setting)


Bump version number

Bump version number

--- KraxbotOSS/Form1.cs
+++ KraxbotOSS/Form1.cs
@@ -19,7 +19,7 @@
     public partial class Form1 : Form
     {
         // Some variables
-        string version = "1.0.2";
+        string version = "1.0.3";
         bool running;
         public static string configPath;
         List<Settings> CR = new List<Settings>();


chartfix #9: indicator is ahead of candles, +fix sample crash

--- Samples/Chart/SampleChart/MainWindow.xaml.cs
+++ Samples/Chart/SampleChart/MainWindow.xaml.cs
@@ -52,7 +52,7 @@
 		private TimeFrameCandle _candle;
 		private CandleMessageVolumeProfile _volumeProfile;
 		private readonly DispatcherTimer _chartUpdateTimer = new DispatcherTimer();
-		private readonly SynchronizedDictionary<DateTimeOffset, TimeFrameCandle> _updatedCandles = new SynchronizedDictionary<DateTimeOffset, TimeFrameCandle>();
+		private readonly SynchronizedDictionary<DateTimeOffset, Tuple<TimeFrameCandle, bool>> _updatedCandles = new SynchronizedDictionary<DateTimeOffset, Tuple<TimeFrameCandle, bool>>();
 		private readonly CachedSynchronizedList<TimeFrameCandle> _allCandles = new CachedSynchronizedList<TimeFrameCandle>();
 		private decimal _lastPrice;
 		//private const decimal _priceStep = 10m;
@@ -71,7 +71,7 @@

 			Loaded += OnLoaded;

-			_chartUpdateTimer.Interval = TimeSpan.FromMilliseconds(100);
+			_chartUpdateTimer.Interval = TimeSpan.FromMilliseconds(1);
 			_chartUpdateTimer.Tick += ChartUpdateTimerOnTick;
 			_chartUpdateTimer.Start();

@@ -160,8 +160,8 @@
 			_security = new Security
 			{
 				Id = id.ToStringId(),
-				PriceStep = id.SecurityCode.StartsWithIgnoreCase("RI") ? 10 : 0.01m,
-				Board = _exchangeInfoProvider.GetExchangeBoard(id.BoardCode) ?? ExchangeBoard.Associated
+				PriceStep = id.SecurityCode.StartsWith("RI", StringComparison.InvariantCultureIgnoreCase) ? 10 : 0.01m,
+				Board = ExchangeBoard.Associated
 			};

 			_tradeGenerator = new RandomWalkTradeGenerator(id);
@@ -232,8 +232,10 @@
 				{
 					foreach (var candle in storage.GetCandleStorage(typeof(TimeFrameCandle), security, _timeframe, new LocalMarketDataDrive(path), format).Load())
 					{
-						lock (_updatedCandles.SyncRoot)
-							_updatedCandles[candle.OpenTime] = _candle = (TimeFrameCandle)candle;
+						lock(_updatedCandles.SyncRoot) {
+							_candle = (TimeFrameCandle)candle;
+							_updatedCandles[candle.OpenTime] = Tuple.Create(_candle, true);
+						}

 						_lastTime = candle.OpenTime + _timeframe;
 						_lastPrice = _candle.ClosePrice;
@@ -290,7 +292,7 @@
 				_lastTime += TimeSpan.FromSeconds(10);
 			}

-			TimeFrameCandle[] candlesToUpdate;
+			Tuple<TimeFrameCandle, bool>[] candlesToUpdate;
 			lock (_updatedCandles.SyncRoot)
 			{
 				candlesToUpdate = _updatedCandles.OrderBy(p => p.Key).Select(p => p.Value).ToArray();
@@ -298,18 +300,25 @@
 			}

 			var lastCandle = _allCandles.LastOrDefault();
-			_allCandles.AddRange(candlesToUpdate.Where(c => lastCandle == null || c.OpenTime != lastCandle.OpenTime));
+			_allCandles.AddRange(candlesToUpdate.Where(c => lastCandle == null || c.Item1.OpenTime != lastCandle.OpenTime).Select(t => t.Item1));

 			ChartDrawData chartData = null;

-			foreach (var candle in candlesToUpdate)
-			{
+			foreach (var tuple in candlesToUpdate)
+			{
+				var candle = tuple.Item1;
+				var needToFinish = tuple.Item2;
+
 				if (chartData == null)
 					chartData = new ChartDrawData();

+				if(needToFinish)
+					candle.State = CandleStates.Finished;
+
 				var chartGroup = chartData.Group(candle.OpenTime);

-				chartGroup.Add(_candleElement, candle);
+				lock(candle.PriceLevels)
+					chartGroup.Add(_candleElement, candle);

 				foreach (var pair in _indicators.CachedPairs)
 				{
@@ -330,16 +339,13 @@
 			{
 				if (_candle != null)
 				{
-					_candle.State = CandleStates.Finished;
-
 					lock (_updatedCandles.SyncRoot)
-						_updatedCandles[_candle.OpenTime] = _candle;
+						_updatedCandles[_candle.OpenTime] = Tuple.Create(_candle, true);

 					_lastPrice = _candle.ClosePrice;
 					_tradeGenerator.Process(tick);
 				}

-				//var t = TimeframeSegmentDataSeries.GetTimeframePeriod(time.DateTime, _timeframe);
 				var bounds = _timeframe.GetCandleBounds(time, security.Board);

 				_candle = new TimeFrameCandle
@@ -369,10 +375,11 @@

 			_candle.TotalVolume += tick.TradeVolume.Value;

-			_volumeProfile.Update(tick.TradePrice.Value, tick.TradeVolume, tick.OriginSide);
+			lock(_volumeProfile.PriceLevels)
+				_volumeProfile.Update(tick.TradePrice.Value, tick.TradeVolume, tick.OriginSide);

 			lock (_updatedCandles.SyncRoot)
-				_updatedCandles[_candle.OpenTime] = _candle;
+				_updatedCandles[_candle.OpenTime] = Tuple.Create(_candle, false);
 		}

 		private void Error(string msg)


ScadaComm: fix InvalidateCurData

ScadaComm: fix InvalidateCurData

--- ScadaComm/ScadaCommCommon/Devices/KPLogic.cs
+++ ScadaComm/ScadaCommCommon/Devices/KPLogic.cs
@@ -938,17 +938,15 @@
         {
             lock (curData)
             {
-                if (tagIndex < 0)
-                    tagIndex = 0;
-                if (tagIndex >= curData.Length - tagCount)
-                    tagCount = curData.Length - tagIndex;
-
                 SrezTableLight.CnlData newData = SrezTableLight.CnlData.Empty;
-                for (int i = 0; i < tagCount; i++)
-                {
-                    SrezTableLight.CnlData curTagData = curData[tagIndex];
-                    curDataModified[tagIndex] |= curTagData.Val != newData.Val || curTagData.Stat != newData.Stat;
-                    curData[tagIndex] = newData;
+                for (int i = 0, len = curData.Length; i < tagCount && tagIndex < len; i++)
+                {
+                    if (tagIndex >= 0)
+                    {
+                        SrezTableLight.CnlData curTagData = curData[tagIndex];
+                        curDataModified[tagIndex] |= curTagData.Val != newData.Val || curTagData.Stat != newData.Stat;
+                        curData[tagIndex] = newData;
+                    }
                     tagIndex++;
                 }
             }


Starting Client parameters changed

Starting Client parameters changed

--- SelfOrganizingMapClient/MainForm.Designer.cs
+++ SelfOrganizingMapClient/MainForm.Designer.cs
@@ -216,7 +216,7 @@
             this.numRadiusDecay.TabIndex = 10;
             this.numRadiusDecay.TabStop = false;
             this.numRadiusDecay.Value = new decimal(new int[] {
-            150,
+            300,
             0,
             0,
             0});
@@ -249,7 +249,7 @@
             this.numShiftFactor.TabIndex = 12;
             this.numShiftFactor.TabStop = false;
             this.numShiftFactor.Value = new decimal(new int[] {
-            25,
+            75,
             0,
             0,
             131072});