Added ObjectGraphType.Interface(Type)

Added ObjectGraphType.Interface(Type)

--- src/GraphQL/Types/ObjectGraphType.cs
+++ src/GraphQL/Types/ObjectGraphType.cs
@@ -29,5 +29,18 @@
         {
             _interfaces.Add(typeof(TInterface));
         }
+
+        public void Interface(Type type)
+        {
+            if (type == null)
+            {
+                throw new ArgumentNullException(nameof(type));
+            }
+            if (!type.IsSubclassOf(typeof(InterfaceGraphType)))
+            {
+                throw new ArgumentException("Interface must implement InterfaceGraphType", nameof(type));
+            }
+            _interfaces.Add(type);
+        }
     }
 }


Fixed AST generation namespace handling to deal with cyclic references.

--- binder/Generators/AstGenerator.cs
+++ binder/Generators/AstGenerator.cs
@@ -69,8 +69,8 @@
             else
                 throw new Exception ("Could not visit type: " + typeInfo.ToString ());

-            decl.Namespace = @namespace;
-            @namespace.Declarations.Add (decl);
+            if (decl.Namespace == null)
+                throw new Exception("Declaration should have a namespace");

             return decl;
         }
@@ -84,9 +84,18 @@
         public Class VisitRecord(TypeInfo type)
         {
             var @class = new Class { Name = UnmangleTypeName(type.Name) };
+            HandleNamespace(type, @class);
             VisitMembers(type, @class);

             return @class;
+        }
+
+        private void HandleNamespace(TypeInfo type, Declaration decl)
+        {
+            var @namespace = VisitNamespace(type);
+
+            decl.Namespace = @namespace;
+            @namespace.Declarations.Add(decl);
         }

         public Enumeration VisitEnum(TypeInfo type)
@@ -97,6 +106,7 @@
                 Name = UnmangleTypeName(type.Name),
                 Type = VisitType(underlyingType).Type
             };
+            HandleNamespace(type, @enum);

             if (Options.Language == GeneratorKind.CPlusPlus)
                 @enum.Modifiers = Enumeration.EnumModifiers.Scoped;


Added Person Support in the VM

Added Person Support in the VM

--- jcFUS.UWP/ViewModels/MainPageModel.cs
+++ jcFUS.UWP/ViewModels/MainPageModel.cs
@@ -2,7 +2,11 @@
 using System.Collections.ObjectModel;
 using System.ComponentModel;
 using System.Runtime.CompilerServices;
-
+using Windows.Media;
+using Windows.Media.Audio;
+using Windows.Media.Capture;
+using Windows.Media.MediaProperties;
+using Windows.Media.Render;
 using jcFUS.PCL.Transports;

 namespace jcFUS.UWP.ViewModels {
@@ -14,8 +18,23 @@
             set { _chatlog = value; OnPropertyChanged(); }
         }

+        private ObservableCollection<PersonItem> _connectedPeople;
+
+        public ObservableCollection<PersonItem> ConnectedPeople {
+            get { return _connectedPeople; }
+            set { _connectedPeople = value; OnPropertyChanged(); }
+        }
+
         public MainPageModel() {
             ChatLog = new ObservableCollection<ChatLogItem>();
+
+            ConnectedPeople = new ObservableCollection<PersonItem>();
+
+            ConnectedPeople.Add(new PersonItem {
+                Color = "Green",
+                GUID = Guid.NewGuid(),
+                Name = "Jarred"
+            });
         }

         private string _chatEntry;
@@ -40,5 +59,34 @@
         protected virtual void OnPropertyChanged([CallerMemberName] string propertyName = null) {
             PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));
         }
+
+        public async void EnableMicrophone()
+        {
+            AudioGraphSettings settings = new AudioGraphSettings(AudioRenderCategory.Communications);
+
+            settings.DesiredRenderDeviceAudioProcessing = Windows.Media.AudioProcessing.Default;
+            settings.QuantumSizeSelectionMode = QuantumSizeSelectionMode.LowestLatency;
+
+
+            var result = await AudioGraph.CreateAsync(settings);
+
+            var audioGraph = result.Graph;
+
+            await audioGraph.CreateDeviceInputNodeAsync(MediaCategory.Communications,
+                AudioEncodingProperties.CreateMp3(44100, 2, 128));
+
+            frameOutputNode = audioGraph.CreateFrameOutputNode();
+
+            audioGraph.QuantumProcessed += AudioGraphy_QuantumProcessed;
+
+            audioGraph.Start();
+
+        }
+
+        private AudioFrameOutputNode frameOutputNode;
+
+        private void AudioGraphy_QuantumProcessed(AudioGraph sender, object args) {
+            AudioFrame frame = frameOutputNode.GetFrame();
+        }
     }
 }


BUG: Lucene.Net.Grouping.TopGroups - check collection equality if the generic type is a reference type (as is the default behavior in Java)

--- src/Lucene.Net.Grouping/TopGroups.cs
+++ src/Lucene.Net.Grouping/TopGroups.cs
@@ -1,6 +1,7 @@
 using Lucene.Net.Support;
 using System;
 using System.Diagnostics.CodeAnalysis;
+using System.Reflection;

 namespace Lucene.Net.Search.Grouping
 {
@@ -144,6 +145,10 @@
                 return null;
             }

+            // LUCENENET specific - store whether T is value type
+            // for optimization of GetHashCode() and Equals()
+            bool shardGroupsIsValueType = typeof(T).GetTypeInfo().IsValueType;
+
             int totalHitCount = 0;
             int totalGroupedHitCount = 0;
             // Optionally merge the totalGroupCount.
@@ -193,7 +198,9 @@
                             throw new ArgumentException("group values differ across shards; you must pass same top groups to all shards' second-pass collector");
                         }
                     }
-                    else if (!groupValue.Equals(shardGroupDocs.GroupValue))
+                    // LUCENENET specific - use Collections.Equals() if we have a reference type
+                    // to ensure if it is a collection its contents are compared
+                    else if (!(shardGroupsIsValueType ? groupValue.Equals(shardGroupDocs.GroupValue) : Collections.Equals(groupValue, shardGroupDocs.GroupValue)))
                     {
                         throw new ArgumentException("group values differ across shards; you must pass same top groups to all shards' second-pass collector");
                     }


Fixed wall sign and post sign!

Fixed wall sign and post sign!

Fixed wall sign and post sign!

--- src/MiNET/MiNET/Items/ItemFactory.cs
+++ src/MiNET/MiNET/Items/ItemFactory.cs
@@ -36,6 +36,8 @@
 			if (id == 54) item = new ItemChest(metadata);
 			else if (id == 44) item = new ItemSlab(id, metadata);
 			else if (id == 61) item = new ItemFurnace(metadata);
+			else if (id == 63) item = new ItemSign(metadata);
++			else if (id == 68) item = new ItemSign(metadata);
 			else if (id == 158) item = new ItemSlab(id, metadata);
 			else if (id == 256) item = new ItemIronShovel(metadata);
 			else if (id == 258) item = new ItemIronAxe(metadata);


oh yeah, I could have done this small tweak

--- src/NadekoBot/Modules/Music/Music.cs
+++ src/NadekoBot/Modules/Music/Music.cs
@@ -238,7 +238,7 @@
                         id[0] = "https://youtube.com/watch?v=" + id[0];
                     embed = new EmbedBuilder()
                                 .WithAuthor(eab => eab.WithName("Now Playing").WithIconUrl("https://cdn.discordapp.com/attachments/155726317222887425/258605269972549642/music1.png"))
-                                .WithTitle($"{currentSong.SongInfo.Title}")
+                                .WithTitle($"{id[1]}")
                                 .WithUrl($"{id[0]}")
                                 .WithDescription($"{currentSong.PrettyCurrentTime()}")
                                 .WithFooter(ef => ef.WithText($"{currentSong.PrettyProvider} | {currentSong.PrettyUser}"))


Pool routers work in localactorrefprovider too

--- src/Pigeon/Actor/ActorRefProvider.cs
+++ src/Pigeon/Actor/ActorRefProvider.cs
@@ -217,18 +217,53 @@
         {
             Mailbox mailbox = System.Mailboxes.FromConfig(props.Mailbox);

-            ActorCell cell;
-            if (props.RouterConfig is NoRouter)
+            Deploy configDeploy = System.Provider.Deployer.Lookup(path);
+            var deploy = configDeploy ?? props.Deploy ?? Deploy.None;
+            if (deploy.Mailbox != null)
+                props = props.WithMailbox(deploy.Mailbox);
+            if (deploy.Dispatcher != null)
+                props = props.WithDispatcher(deploy.Dispatcher);
+            if (deploy.Scope is RemoteScope)
+            {
+
+            }
+            props = props.WithDeploy(deploy);
+
+            if (string.IsNullOrEmpty(props.Mailbox))
+            {
+                //   throw new NotSupportedException("Mailbox can not be configured as null or empty");
+            }
+            if (string.IsNullOrEmpty(props.Dispatcher))
+            {
+                //TODO: fix this..
+                //    throw new NotSupportedException("Dispatcher can not be configured as null or empty");
+            }
+
+
+            if (props.Deploy != null && props.Deploy.Scope is RemoteScope)
+            {
+                throw new NotSupportedException("LocalActorRefProvider can not deploy remote");
+            }
+            return LocalActorOf(system, props, supervisor, path, mailbox);
+        }
+
+
+        private static InternalActorRef LocalActorOf(ActorSystem system, Props props, InternalActorRef supervisor,
+            ActorPath path, Mailbox mailbox)
+        {
+            ActorCell cell = null;
+            if (props.RouterConfig is NoRouter || props.RouterConfig == null) //TODO: should not need nullcheck here
             {
                 cell = new ActorCell(system, supervisor, props, path, mailbox);
             }
             else
             {
-                cell = new RoutedActorCell(system, supervisor, props,props, path, mailbox);
-            }
+                var routeeProps = props.WithRouter(RouterConfig.NoRouter);
+                cell = new RoutedActorCell(system, supervisor, props, routeeProps, path, mailbox);
+            }
+
             cell.NewActor();
-
-            //  parentContext.Watch(cell.Self);
+            //   parentContext.Watch(cell.Self);
             return cell.Self;
         }


Fix test bug

Fix test bug

--- snippets/Google.Datastore.V1Beta3.Snippets/DatastoreFooSnippets.cs
+++ snippets/Google.Datastore.V1Beta3.Snippets/DatastoreFooSnippets.cs
@@ -98,7 +98,7 @@
             string namespaceId = _fixture.NamespaceId;

             // Snippet: RunQuery(GqlQuery,string,ReadConsistency)
-            DatastoreFoo client = DatastoreFoo.Create(projectId);
+            DatastoreFoo client = DatastoreFoo.Create(projectId, namespaceId);
             GqlQuery gqlQuery = new GqlQuery
             {
                 QueryString = "SELECT * FROM book WHERE author = @author",


add missing namespace

add missing namespace

--- Assets/MRTK/Core/Attributes/PreserveAttribute.cs
+++ Assets/MRTK/Core/Attributes/PreserveAttribute.cs
@@ -3,23 +3,26 @@

 using System;

-/// <summary>
-/// Custom preserve attribute that is inheritable.
-/// </summary>
-[AttributeUsage(
-    AttributeTargets.Assembly |
-    AttributeTargets.Class |
-    AttributeTargets.Struct |
-    AttributeTargets.Enum |
-    AttributeTargets.Constructor |
-    AttributeTargets.Method |
-    AttributeTargets.Property |
-    AttributeTargets.Field |
-    AttributeTargets.Event |
-    AttributeTargets.Interface |
-    AttributeTargets.Delegate,
-    Inherited = true)]
-public class MixedRealityToolkitPreserveAttribute : UnityEngine.Scripting.PreserveAttribute
+namespace Microsoft.MixedReality.Toolkit
 {
-    // No methods on PreserveAttribue for overriding.
+    /// <summary>
+    /// Custom preserve attribute that is inheritable.
+    /// </summary>
+    [AttributeUsage(
+        AttributeTargets.Assembly |
+        AttributeTargets.Class |
+        AttributeTargets.Struct |
+        AttributeTargets.Enum |
+        AttributeTargets.Constructor |
+        AttributeTargets.Method |
+        AttributeTargets.Property |
+        AttributeTargets.Field |
+        AttributeTargets.Event |
+        AttributeTargets.Interface |
+        AttributeTargets.Delegate,
+        Inherited = true)]
+    public class MixedRealityToolkitPreserveAttribute : UnityEngine.Scripting.PreserveAttribute
+    {
+        // No methods on PreserveAttribue for overriding.
+    }
 }


adding formerly serialized flag

adding formerly serialized flag

--- Assets/MRTK/Services/InputSystem/GazeProvider.cs
+++ Assets/MRTK/Services/InputSystem/GazeProvider.cs
@@ -6,6 +6,7 @@
 using System;
 using Unity.Profiling;
 using UnityEngine;
+using UnityEngine.Serialization;
 using UnityPhysics = UnityEngine.Physics;

 namespace Microsoft.MixedReality.Toolkit.Input
@@ -590,8 +591,15 @@
         /// <inheritdoc />
         public Ray LatestEyeGaze { get; private set; } = default(Ray);

-        /// <inheritdoc />
-        public bool IsEyeTrackingEnabled { get; set; }
+        [FormerlySerializedAs("useEyeTracking")]
+        private bool isEyeTrackingEnabled;
+
+        /// <inheritdoc />
+        public bool IsEyeTrackingEnabled
+        {
+            get => isEyeTrackingEnabled;
+            set => isEyeTrackingEnabled = value;
+        }

         /// <inheritdoc />
         public DateTime Timestamp { get; private set; }


リファクタリング

リファクタリング

--- source/WinCap/Models/HotkeyService.cs
+++ source/WinCap/Models/HotkeyService.cs
@@ -21,11 +21,6 @@
         /// 基本CompositeDisposable
         /// </summary>
         private readonly LivetCompositeDisposable compositeDisposable = new LivetCompositeDisposable();
-
-        /// <summary>
-        /// ウィンドウのハンドル
-        /// </summary>
-        private IntPtr handle = IntPtr.Zero;

         /// <summary>
         /// ホットキーリスト
@@ -97,15 +92,15 @@
         private void hookWndProc(Window window)
         {
             // ウィンドプロシージャのフック
-            this.handle = new WindowInteropHelper(window).Handle;
-            HwndSource source = HwndSource.FromHwnd(this.handle);
+            IntPtr handle = new WindowInteropHelper(window).Handle;
+            HwndSource source = HwndSource.FromHwnd(handle);
             source.AddHook(new HwndSourceHook(WndProc));

             // ホットキーの生成
-            hotkeies.Add(HotkeyId.ScreenWhole, new Hotkey(this.handle, HotkeyId.ScreenWhole, CaptureService.Current.CaptureScreenWhole).AddTo(this));
-            hotkeies.Add(HotkeyId.ActiveWindow, new Hotkey(this.handle, HotkeyId.ActiveWindow, CaptureService.Current.CaptureActiveWindow).AddTo(this));
-            hotkeies.Add(HotkeyId.SelectControl, new Hotkey(this.handle, HotkeyId.SelectControl, CaptureService.Current.CaptureSelectControl).AddTo(this));
-            hotkeies.Add(HotkeyId.PageWhole, new Hotkey(this.handle, HotkeyId.PageWhole, CaptureService.Current.CapturePageWhole).AddTo(this));
+            hotkeies.Add(HotkeyId.ScreenWhole, new Hotkey(handle, HotkeyId.ScreenWhole, CaptureService.Current.CaptureScreenWhole).AddTo(this));
+            hotkeies.Add(HotkeyId.ActiveWindow, new Hotkey(handle, HotkeyId.ActiveWindow, CaptureService.Current.CaptureActiveWindow).AddTo(this));
+            hotkeies.Add(HotkeyId.SelectControl, new Hotkey(handle, HotkeyId.SelectControl, CaptureService.Current.CaptureSelectControl).AddTo(this));
+            hotkeies.Add(HotkeyId.PageWhole, new Hotkey(handle, HotkeyId.PageWhole, CaptureService.Current.CapturePageWhole).AddTo(this));
         }

         /// <summary>
@@ -121,10 +116,9 @@
         {
             if (msg == (int)WM.HOTKEY)
             {
-                int hotkeyId = (int)wParam;
                 foreach (Hotkey hotkey in hotkeies.Values)
                 {
-                    if ((int)hotkey.Id == hotkeyId)
+                    if ((int)hotkey.Id == (int)wParam)
                     {
                         hotkey.Action();
                         handled = true;


docs en code layout

docs en code layout

--- tests/NLog.UnitTests/LogManagerTests.cs
+++ tests/NLog.UnitTests/LogManagerTests.cs
@@ -401,19 +401,23 @@
 #endif
 #if NET4_5

+        /// <summary>
+        /// target for <see cref="ThreadSafe_getCurrentClassLogger_test"/>
+        /// </summary>
         private static MemoryQueueTarget mTarget = new MemoryQueueTarget(500);
+        /// <summary>
+        /// target for <see cref="ThreadSafe_getCurrentClassLogger_test"/>
+        /// </summary>
         private static MemoryQueueTarget mTarget2 = new MemoryQueueTarget(500);

         /// <summary>
         /// Note: THe problem  can be reproduced when: debugging the unittest + "break when exception is thrown" checked in visual studio.
+        ///
+        /// https://github.com/NLog/NLog/issues/500
         /// </summary>
         [Fact]
         public void ThreadSafe_getCurrentClassLogger_test()
         {
-
-
-
-
             using (var c = new UnityContainer())
             {
                 var r = Enumerable.Range(1, 100); //reported with 10.
@@ -434,13 +438,12 @@
                 });
                 mTarget.Layout = @"${date:format=HH\:mm\:ss}|${level:uppercase=true}|${message} ${exception:format=tostring}";
                 mTarget2.Layout = @"${date:format=HH\:mm\:ss}|${level:uppercase=true}|${message} ${exception:format=tostring}";
-
-
-
-
-            }
-        }
-
+            }
+        }
+
+        /// <summary>
+        /// target for <see cref="ThreadSafe_getCurrentClassLogger_test"/>
+        /// </summary>
         [Target("Memory")]
         public sealed class MemoryQueueTarget : TargetWithLayout
         {
@@ -467,6 +470,9 @@
             }
         }

+        /// <summary>
+        /// class for <see cref="ThreadSafe_getCurrentClassLogger_test"/>
+        /// </summary>
         public class ClassA
         {
             private static Logger logger = LogManager.GetCurrentClassLogger();
@@ -476,6 +482,9 @@

             }
         }
+        /// <summary>
+        /// class for <see cref="ThreadSafe_getCurrentClassLogger_test"/>
+        /// </summary>
         public class ClassB
         {
             private static Logger logger = LogManager.GetCurrentClassLogger();
@@ -484,6 +493,9 @@
                 logger.Info("Hi there B");
             }
         }
+        /// <summary>
+        /// class for <see cref="ThreadSafe_getCurrentClassLogger_test"/>
+        /// </summary>
         public class ClassC
         {
             private static Logger logger = LogManager.GetCurrentClassLogger();
@@ -493,6 +505,9 @@

             }
         }
+        /// <summary>
+        /// class for <see cref="ThreadSafe_getCurrentClassLogger_test"/>
+        /// </summary>
         public class ClassD
         {
             private static Logger logger = LogManager.GetCurrentClassLogger();


fixing build non-.net45

fixing build non-.net45

--- tests/NLog.UnitTests/LogManagerTests.cs
+++ tests/NLog.UnitTests/LogManagerTests.cs
@@ -31,14 +31,11 @@
 // THE POSSIBILITY OF SUCH DAMAGE.
 //

-using System.Collections.Generic;
-using System.Linq;
-using System.Threading.Tasks;
-using Microsoft.Practices.Unity;
-
 namespace NLog.UnitTests
 {
     using System;
+    using System.Collections.Generic;
+    using System.Linq;
     using System.Diagnostics;
     using System.IO;
     using Xunit;
@@ -46,6 +43,11 @@
     using NLog.Config;
     using NLog.Layouts;
     using NLog.Targets;
+
+#if NET4_5
+    using System.Threading.Tasks;
+    using Microsoft.Practices.Unity;
+#endif

     public class LogManagerTests : NLogTestBase
     {


(GH-80) Compress source before sending over the wire.

--- src/Cake.Scripting.Transport/Serialization/CakeScriptSerializer.cs
+++ src/Cake.Scripting.Transport/Serialization/CakeScriptSerializer.cs
@@ -4,6 +4,8 @@

 using System;
 using System.IO;
+using System.IO.Compression;
+using System.Text;
 using Cake.Scripting.Abstractions.Models;

 namespace Cake.Scripting.Transport.Serialization
@@ -29,7 +31,11 @@
             writer.WriteString(script.Host.AssemblyPath);

             // Source
-            writer.WriteString(script.Source);
+            var bytes = Zip(script.Source);
+            writer.Write(bytes.Length);
+            writer.Write(bytes);
+            // TODO: Support non-zipped as well
+            // writer.WriteString(script.Source);

             // References
             writer.Write(script.References.Count);
@@ -67,7 +73,11 @@
             cakeScript.Host.AssemblyPath = reader.ReadString();

             // Source
-            cakeScript.Source = reader.ReadString();
+            var bytesLength = reader.ReadInt32();
+            var bytes = reader.ReadBytes(bytesLength);
+            cakeScript.Source = Unzip(bytes);
+            // TODO: Support non-zipped as well
+            // cakeScript.Source = reader.ReadString();

             // References
             var referencesLength = reader.ReadInt32();
@@ -85,5 +95,35 @@

             return cakeScript;
         }
+
+        public static byte[] Zip(string str)
+        {
+            var bytes = Encoding.UTF8.GetBytes(str);
+
+            using (var msi = new MemoryStream(bytes))
+            using (var mso = new MemoryStream())
+            {
+                using (var gs = new GZipStream(mso, CompressionMode.Compress))
+                {
+                    msi.CopyTo(gs);
+                }
+
+                return mso.ToArray();
+            }
+        }
+
+        public static string Unzip(byte[] bytes)
+        {
+            using (var msi = new MemoryStream(bytes))
+            using (var mso = new MemoryStream())
+            {
+                using (var gs = new GZipStream(msi, CompressionMode.Decompress))
+                {
+                    gs.CopyTo(mso);
+                }
+
+                return Encoding.UTF8.GetString(mso.ToArray());
+            }
+        }
     }
 }


Switch to knockout for driver list

Switch to knockout for driver list

--- Battery-Commander.Web/Views/Vehicles/List.cshtml
+++ Battery-Commander.Web/Views/Vehicles/List.cshtml
@@ -19,151 +19,155 @@

-

-

-

-            @Html.DisplayNameFor(_ => _.Vehicles.FirstOrDefault().Status)
-            @Html.DisplayNameFor(_ => _.Vehicles.FirstOrDefault().Unit)
-            @Html.DisplayNameFor(_ => _.Vehicles.FirstOrDefault().Bumper)
-            @Html.DisplayNameFor(_ => _.Vehicles.FirstOrDefault().Type)
-            @Html.DisplayNameFor(_ => _.Vehicles.FirstOrDefault().Seats)
-            @Html.DisplayNameFor(_ => _.Vehicles.FirstOrDefault().Nomenclature)
-            @Html.DisplayNameFor(_ => _.Vehicles.FirstOrDefault().Registration)
-            @Html.DisplayNameFor(_ => _.Vehicles.FirstOrDefault().Serial)
-            @Html.DisplayNameFor(_ => _.Vehicles.FirstOrDefault().LIN)
-            @Html.DisplayNameFor(_ => _.Vehicles.FirstOrDefault().Driver)
-            @Html.DisplayNameFor(_ => _.Vehicles.FirstOrDefault().A_Driver)
-            @Html.DisplayNameFor(_ => _.Vehicles.FirstOrDefault().HasJBCP)
-            @Html.DisplayNameFor(_ => _.Vehicles.FirstOrDefault().Location)
-            @Html.DisplayNameFor(_ => _.Vehicles.FirstOrDefault().Notes)
-
-
-

-

-
-

-        @foreach (var vehicle in Model.Vehicles)
+

+
+

+

+

+                @Html.DisplayNameFor(_ => _.Vehicles.FirstOrDefault().Status)
+                @Html.DisplayNameFor(_ => _.Vehicles.FirstOrDefault().Unit)
+                @Html.DisplayNameFor(_ => _.Vehicles.FirstOrDefault().Bumper)
+                @Html.DisplayNameFor(_ => _.Vehicles.FirstOrDefault().Type)
+                @Html.DisplayNameFor(_ => _.Vehicles.FirstOrDefault().Seats)
+                @Html.DisplayNameFor(_ => _.Vehicles.FirstOrDefault().Nomenclature)
+                @Html.DisplayNameFor(_ => _.Vehicles.FirstOrDefault().Registration)
+                @Html.DisplayNameFor(_ => _.Vehicles.FirstOrDefault().Serial)
+                @Html.DisplayNameFor(_ => _.Vehicles.FirstOrDefault().LIN)
+                @Html.DisplayNameFor(_ => _.Vehicles.FirstOrDefault().Driver)
+                @Html.DisplayNameFor(_ => _.Vehicles.FirstOrDefault().A_Driver)
+                @Html.DisplayNameFor(_ => _.Vehicles.FirstOrDefault().HasJBCP)
+                @Html.DisplayNameFor(_ => _.Vehicles.FirstOrDefault().Location)
+                @Html.DisplayNameFor(_ => _.Vehicles.FirstOrDefault().Notes)
+
+
+

+

+
+

+            @foreach (var vehicle in Model.Vehicles)
+            {
+

+
+
+                            @Html.DisplayFor(_ => vehicle, "VehicleStatus")
+
+                        @if (vehicle.HasFuelCard)
+                        {
+                            GC
+                        }
+                        @if (vehicle.HasTowBar)
+                        {
+                            TB
+                        }
+
+                    @Html.DisplayFor(_ => vehicle.Unit)
+                    @Html.DisplayFor(_ => vehicle)
+                    @Html.DisplayFor(_ => vehicle.Type)
+                    @Html.DisplayFor(_ => vehicle.Seats)
+
+                        @if (!String.IsNullOrWhiteSpace(vehicle.Nomenclature))
+                        {
+                            @vehicle.Nomenclature
+                        }
+
+                    @Html.DisplayFor(_ => vehicle.Registration)
+                    @Html.DisplayFor(_ => vehicle.Serial)
+                    @Html.DisplayFor(_ => vehicle.LIN)
+                    @if (vehicle.Available)
+                {
+
+                            @if (vehicle.DriverId.HasValue)
+                            {
+                                @Html.DisplayFor(_ => vehicle.Driver)
+                            }
+                            else
+                            {
+                                (Empty)
+                            }
+
+
+                            @if (vehicle.A_DriverId.HasValue)
+                            {
+                                @Html.DisplayFor(_ => vehicle.A_Driver)
+                            }
+                            else
+                            {
+                                (Empty)
+                            }
+
+                    }
+                    else
+                    {
+
+
+                    }
+
+                        @if (vehicle.HasJBCP)
+                        {
+                            JBC-P
+                        }
+
+                    @Html.DisplayFor(_ => vehicle, "VehicleLocation")
+
+
+                            @Html.DisplayFor(_ => vehicle.Notes)
+
+
+                    @Html.ActionLink("Edit", "Edit", new { vehicle.Id })
+
+

+            }
+

+

+
+    <form method="post" action="@Url.Action("Reset", "Vehicles")">
+        @Html.AntiForgeryToken()
+        <button class="btn btn-danger btn-xs">Reset PAX</button>
+    </form>
+
+

+        @using (Html.BeginForm("SetDriver", "Vehicles", FormMethod.Post, new { @class = "form-horizontal", role = "form" }))
         {
-

-
-
-                        @Html.DisplayFor(_ => vehicle, "VehicleStatus")
-
-                    @if (vehicle.HasFuelCard)
-                    {
-                        GC
-                    }
-                    @if (vehicle.HasTowBar)
-                    {
-                        TB
-                    }
-
-                @Html.DisplayFor(_ => vehicle.Unit)
-                @Html.DisplayFor(_ => vehicle)
-                @Html.DisplayFor(_ => vehicle.Type)
-                @Html.DisplayFor(_ => vehicle.Seats)
-
-                    @if (!String.IsNullOrWhiteSpace(vehicle.Nomenclature))
-                    {
-                        @vehicle.Nomenclature
-                    }
-
-                @Html.DisplayFor(_ => vehicle.Registration)
-                @Html.DisplayFor(_ => vehicle.Serial)
-                @Html.DisplayFor(_ => vehicle.LIN)
-                @if (vehicle.Available)
-                {
-
-                        @if (vehicle.DriverId.HasValue)
-                        {
-                            @Html.DisplayFor(_ => vehicle.Driver)
-                        }
-                        else
-                        {
-                            (Empty)
-                        }
-
-
-                        @if (vehicle.A_DriverId.HasValue)
-                        {
-                            @Html.DisplayFor(_ => vehicle.A_Driver)
-                        }
-                        else
-                        {
-                            (Empty)
-                        }
-
-                }
-                else
-                {
-
-
-                }
-
-                    @if (vehicle.HasJBCP)
-                    {
-                        JBC-P
-                    }
-
-                @Html.DisplayFor(_ => vehicle, "VehicleLocation")
-
-
-                        @Html.DisplayFor(_ => vehicle.Notes)
-
-
-                @Html.ActionLink("Edit", "Edit", new { vehicle.Id })
-
-

+            <input id="vehicleId" name="vehicleId" type="hidden" />
+
+

+                @Html.Label("Driver")
+                <select id="driverId" data-bind="options: soldiers, optionsText: 'Text', optionsValue: 'Value', optionsCaption: 'Choose a Driver'"class="select2"></select>
+

+
+

+                @Html.Label("A-Driver")
+                <select id="adriverId" data-bind="options: soldiers, optionsText: 'Text', optionsValue: 'Value', optionsCaption: 'Choose an A-Driver'" class="select2"></select>
+

+
+            <button type="submit" id="save">Save</button>
         }
-

-

-
-<form method="post" action="@Url.Action("Reset", "Vehicles")">
-    @Html.AntiForgeryToken()
-    <button class="btn btn-danger btn-xs">Reset PAX</button>
-</form>
-
-

-    @using (Html.BeginForm("SetDriver", "Vehicles", FormMethod.Post, new { @class = "form-horizontal", role = "form" }))
-    {
-        <input id="vehicleId" name="vehicleId" type="hidden" />
-
-

-            @Html.Label("Driver")
-            @Html.DropDownList("driverId", Model.Soldiers, "-- Select Driver --", new { @class = "select2" })
-

-
-

-            @Html.Label("A-Driver")
-            @Html.DropDownList("adriverId", Model.Soldiers, "-- Select A-Driver --", new { @class = "select2" })
-

-
-        <button type="submit" id="save">Save</button>
-    }
-

-
-

-    @using (Html.BeginForm("SetStatus", "Vehicles", FormMethod.Post, new { @class = "form-horizontal", role = "form" }))
-    {
-        <input id="vehicleId" name="vehicleId" type="hidden" />
-
-

-            @Html.Label("Status")
-            @Html.DropDownList("status", Html.GetEnumSelectList<Vehicle.VehicleStatus>())
-

-
-

-            @Html.Label("Location")
-            @Html.DropDownList("location", Html.GetEnumSelectList<Vehicle.VehicleLocation>())
-

-
-

-            @Html.Label("Notes")
-            @Html.TextArea("notes")
-

-
-        <button type="submit" id="save">Save</button>
-    }
+

+
+

+        @using (Html.BeginForm("SetStatus", "Vehicles", FormMethod.Post, new { @class = "form-horizontal", role = "form" }))
+        {
+            <input id="vehicleId" name="vehicleId" type="hidden" />
+
+

+                @Html.Label("Status")
+                @Html.DropDownList("status", Html.GetEnumSelectList<Vehicle.VehicleStatus>())
+

+
+

+                @Html.Label("Location")
+                @Html.DropDownList("location", Html.GetEnumSelectList<Vehicle.VehicleLocation>())
+

+
+

+                @Html.Label("Notes")
+                @Html.TextArea("notes")
+

+
+            <button type="submit" id="save">Save</button>
+        }
+

+

 @section Scripts{
@@ -190,6 +194,14 @@
                     modal: true
                 });
             });
+
+            var viewModel = {
+                soldiers: ko.mapping.fromJSON('@Html.Raw(JsonConvert.SerializeObject(Model.Soldiers))')
+            };
+
+            window.viewModel = viewModel;
+
+            ko.applyBindings(viewModel, document.getElementById('vehicle-list'));
         });
     </script>
 }


add TODOs and remove unused imports

add TODOs and remove unused imports

--- src/csharp/Grpc.Core/Internal/AsyncCall.cs
+++ src/csharp/Grpc.Core/Internal/AsyncCall.cs
@@ -32,12 +32,7 @@
 #endregion

 using System;
-using System.Diagnostics;
-using System.Runtime.CompilerServices;
-using System.Runtime.InteropServices;
-using System.Threading;
 using System.Threading.Tasks;
-using Grpc.Core.Internal;
 using Grpc.Core.Logging;
 using Grpc.Core.Profiling;
 using Grpc.Core.Utils;
@@ -57,9 +52,11 @@
         // Completion of a pending unary response if not null.
         TaskCompletionSource<TResponse> unaryResponseTcs;

+        // TODO(jtattermusch): this field doesn't need to be initialized for unary response calls.
         // Indicates that response streaming call has finished.
         TaskCompletionSource<object> streamingCallFinishedTcs = new TaskCompletionSource<object>();

+        // TODO(jtattermusch): this field could be lazy-initialized (only if someone requests the response headers).
         // Response headers set here once received.
         TaskCompletionSource<Metadata> responseHeadersTcs = new TaskCompletionSource<Metadata>();


let the abstract BrailleIOAdapter implementation fire keyPressed events

--- BrailleIO_Interfaces/Adapter/BrailleIOAdapter.cs
+++ BrailleIO_Interfaces/Adapter/BrailleIOAdapter.cs
@@ -171,9 +171,9 @@
         internal virtual void OnBrailleIO_ErrorOccured_EventHandler(BrailleIO_ErrorOccured_EventArgs e) { errorOccurred(this, e); }
         #endregion

-        /// <summary>
-        /// Occurs when a key was pressed.
-        /// </summary>
+        ///// <summary>
+        ///// Occurs when a key was pressed.
+        ///// </summary>
         public virtual event EventHandler<BrailleIO_KeyPressed_EventArgs> keyPressed;
         /// <summary>
         /// Occurs when the state of a key has changed. This can be a pressed or a released
@@ -240,6 +240,28 @@
                 }
             }
         }
+
+        protected virtual void fireKeyPressed(
+            BrailleIO_DeviceButtonStates keyCode,
+            ref OrderedDictionary raw,
+            BrailleIO_BrailleKeyboardButtonStates keyboardButtonStates,
+            BrailleIO_AdditionalButtonStates[] additionalButtonStates
+            )
+        {
+            if(keyPressed != null)
+            {
+                try
+                {
+                    keyPressed.Invoke(
+                        this,
+                        new BrailleIO_KeyPressed_EventArgs(
+                            keyCode, ref raw,
+                            keyboardButtonStates, additionalButtonStates));
+                }
+                catch { }
+            }
+        }
+

         /// <summary>
         /// Fires a key state changed event.
@@ -281,6 +303,26 @@
             {
                 // TODO: what to do to get it valid again?!
             }
+
+            if(pressed != BrailleIO_DeviceButton.None || pressedKbB != BrailleIO_BrailleKeyboardButton.None)
+            {
+                fireKeyPressed(keyCode, ref raw, keyboardCode, additionalKeyCode);
+            }
+            else
+            {
+                if(pressedAdBs != null && pressedAdBs.Count > 0)
+                {
+                    foreach (var item in pressedAdBs)
+                    {
+                        if(item.Value != BrailleIO_AdditionalButton.None)
+                        {
+                            fireKeyPressed(keyCode, ref raw, keyboardCode, additionalKeyCode);
+                            break;
+                        }
+                    }
+                }
+            }
+

             if (keyStateChanged != null)
             {


Had forgotten to include some logic relating to guessing what internal Bridge properties to ignore in ComponentPropsHelpers

--- Bridge.React/Components/ComponentPropsHelpers.cs
+++ Bridge.React/Components/ComponentPropsHelpers.cs
@@ -57,8 +57,11 @@
 			if (((object)props1).GetType() != ((object)props2).GetType())
 				return false;

+			// Bridge adds various private members that we don't want to consider so we want to try to guess whether we're a Bridge class and then ignore them. Basic classes
+			// have $$name and $$fullname properties, which seem pretty specific. However, [ObjectLiteral] types may have $literal or $getType properties, which identify them
+			// as "special" object literals. Other [ObjectLiteral] types may have no additional properties - which is good because we can skip any additional magic.
 			/*@
-			var isBridgeType = props1.$$name && props1.$$fullname;
+			var isBridgeType = (props1.$$name && props1.$$fullname) || (typeof(props1.$getType) === "function") || (typeof(props1.$literal) === "boolean");
 			for (var propName in props1) {
 				if (isBridgeType && (propName.substr(0, 1) === "$")) {
 					continue;


Added some comments regarding the current state of the script

--- scripts/SaveOctaneFrameSequence.cs
+++ scripts/SaveOctaneFrameSequence.cs
@@ -1,7 +1,17 @@
-using System.Collections;
+// Author: Jose A. Iglesias-Guitian jalley@cvc.uab.es
+// Date: September 2017
+using System.Collections;
 using System.Collections.Generic;
 using System.IO;
 using UnityEngine;
+
+/* For now this script under development saves the output of both Octane Renderer and Unity Editor (just for debugging purposes)
+   Main idea: Unity waits until Octane Renderer is ready to dump a rendered frame, meanwhile Unity simulations are frozen using
+   Time.timeScale = 0; Observed behavior: when increasing m_CaptureFramerate through UI, it can be observed that Octane output
+   is smoothed.
+*/
+    // TO DO: The desired behavior would be to ensure the time duration of a certain captured sequence and ideally chosing how
+    // many Octane frames per second we want.

 public class SaveOctaneFrameSequence : MonoBehaviour
 {


Added Post retruning string

Added Post retruning string

--- Http/ApiClient.cs
+++ Http/ApiClient.cs
@@ -35,7 +35,7 @@
             //if (request.Contains(":"))
             //    return Uri.EscapeDataString(request); //HACK: Graph use colon in request path
             //else
-            return Uri.EscapeDataString(request);
+            return Uri.EscapeUriString(request);
         }

         JObject GetJson(string value)
@@ -98,6 +98,7 @@
         public new async Task<JObject> PostAsync(string request, HttpContent content)
         {
             var response = await Client().PostAsync(EscapeRequest(request), content);
+            //var x = await response.Content.ReadAsStringAsync();
             response.EnsureSuccessStatusCode();
             return GetJson(await response.Content.ReadAsStringAsync());
         }
@@ -107,6 +108,36 @@
             var response = await Client().PostAsync(EscapeRequest(request), null);
             response.EnsureSuccessStatusCode();
             return GetJson(await response.Content.ReadAsStringAsync());
+        }
+
+        public async Task<string> PostAsyncGetString(string request, JObject json)
+        {
+            return await PostAsyncGetString(request, new JsonContent(json));
+        }
+
+        public async Task<string> PostAsyncGetString(string request, object value)
+        {
+            return await PostAsyncGetString(request, new JsonContent(value));
+        }
+
+        public async Task<string> PostAsyncGetString(string request, string text)
+        {
+            return await PostAsyncGetString(request, new StringContent(text));
+        }
+
+        public async Task<string> PostAsyncGetString(string request, HttpContent content)
+        {
+            var response = await Client().PostAsync(EscapeRequest(request), content);
+            //var x = await response.Content.ReadAsStringAsync();
+            response.EnsureSuccessStatusCode();
+            return await response.Content.ReadAsStringAsync();
+        }
+
+        public async Task<string> PostAsyncGetString(string request)
+        {
+            var response = await Client().PostAsync(EscapeRequest(request), null);
+            response.EnsureSuccessStatusCode();
+            return await response.Content.ReadAsStringAsync();
         }
         #endregion


Implement RRCA, RRA, RR n instructions

Implement RRCA, RRA, RR n instructions

--- elbgb.gameboy/CPU/LR35902.cs
+++ elbgb.gameboy/CPU/LR35902.cs
@@ -455,6 +455,9 @@
 				case 0x07: _r.A = RotateLeft(_r.A); _r.F &= ~StatusFlags.Z; break; // RLCA
 				case 0x17: _r.A = RotateLeftThroughCarry(_r.A); _r.F &= ~StatusFlags.Z; break; // RLA

+				case 0x0F: _r.A = RotateRight(_r.A); _r.F &= ~StatusFlags.Z; break; // RRCA
+				case 0x1F: _r.A = RotateRightThroughCarry(_r.A); _r.F &= ~StatusFlags.Z; break; // RRA
+
 				// extended opcodes are prefixed with OxCB, read next byte and run opcode
 				case 0xCB: ExecuteExtendedOpcode(ReadByte(_r.PC++)); break;

@@ -570,6 +573,15 @@
 				case 0x15: _r.L = RotateLeftThroughCarry(_r.L); break; // RL L
 				case 0x16: WriteByte(_r.HL, RotateLeftThroughCarry(ReadByte(_r.HL))); break; // RL (HL)
 				case 0x17: _r.A = RotateLeftThroughCarry(_r.A); break; // RL A
+
+				case 0x18: _r.B = RotateRightThroughCarry(_r.B); break; // RR B
+				case 0x19: _r.C = RotateRightThroughCarry(_r.C); break; // RR C
+				case 0x1A: _r.D = RotateRightThroughCarry(_r.D); break; // RR D
+				case 0x1B: _r.E = RotateRightThroughCarry(_r.E); break; // RR E
+				case 0x1C: _r.H = RotateRightThroughCarry(_r.H); break; // RR H
+				case 0x1D: _r.L = RotateRightThroughCarry(_r.L); break; // RR L
+				case 0x1E: WriteByte(_r.HL, RotateRightThroughCarry(ReadByte(_r.HL))); break; // RR (HL)
+				case 0x1F: _r.A = RotateRightThroughCarry(_r.A); break;	// RR A

 				case 0x20: _r.B = ShiftLeftArithmetic(_r.B); break; // SLA B
 				case 0x21: _r.C = ShiftLeftArithmetic(_r.C); break; // SLA C
@@ -1157,6 +1169,51 @@
 			return result;
 		}

+		private byte RotateRight(byte b)
+		{
+			// clear flags
+			_r.F = StatusFlags.Clear;
+
+			// grab bit 0
+			bool bit0 = ((b & 0x01) == 0x01);
+
+			// set carry flag if old bit 0 was set
+			if (bit0)
+			{
+				_r.F |= StatusFlags.C;
+			}
+
+			// shift right and place old bit 0 in MSB
+			byte result = (byte)((b >> 1) | (bit0 ? 0x80 : 0));
+
+			// zero
+			if (result == 0)
+				_r.F |= StatusFlags.Z;
+
+			return result;
+		}
+
+		private byte RotateRightThroughCarry(byte b)
+		{
+			bool oldCarry = _r.F.FlagSet(StatusFlags.C);
+
+			// clear flags
+			_r.F = StatusFlags.Clear;
+
+			// set carry if bottom bit is set
+			if ((b & 0x01) == 0x01)
+				_r.F |= StatusFlags.C;
+
+			// shift left and place old carry in MSB
+			byte result = (byte)((b >> 1) | (oldCarry ? 0x80 : 0));
+
+			// zero
+			if (result == 0)
+				_r.F |= StatusFlags.Z;
+
+			return result;
+		}
+
 		private byte ShiftLeftArithmetic(byte b)
 		{
 			// clear flags
@@ -1181,11 +1238,11 @@
 			// clear flags
 			_r.F = StatusFlags.Clear;

-			// grab bit 1
-			bool bit1 = ((b & 0x01) == 0x01);
-
-			// set carry flag if old bit 7 was set
-			if (bit1)
+			// grab bit 0
+			bool bit0 = ((b & 0x01) == 0x01);
+
+			// set carry flag if old bit 0 was set
+			if (bit0)
 			{
 				_r.F |= StatusFlags.C;
 			}


LUCENENET-533 StringValue of NumberField is localized

--- src/core/Document/NumericField.cs
+++ src/core/Document/NumericField.cs
@@ -16,6 +16,7 @@
  */

 using System;
+using System.Globalization;
 using System.IO;
 using Lucene.Net.Search;
 using NumericTokenStream = Lucene.Net.Analysis.NumericTokenStream;
@@ -230,7 +231,13 @@
         /// <summary>Returns the numeric value as a string (how it is stored, when <see cref="Field.Store.YES" /> is chosen). </summary>
         public override string StringValue
         {
-            get { return (fieldsData == null) ? null : fieldsData.ToString(); }
+            get
+            {
+                if (fieldsData == null) return null;
+                var fd = fieldsData as IConvertible;
+                if (fd != null) return fd.ToString(CultureInfo.InvariantCulture);
+                return fieldsData.ToString();
+            }
         }

         /// <summary>Returns the current numeric value as a subclass of <see cref="Number" />, <c>null</c> if not yet initialized. </summary>


Fix double usage print

Fix double usage print

--- src/nbgv/Program.cs
+++ src/nbgv/Program.cs
@@ -113,8 +113,7 @@

                 if (syntax.ActiveCommand == null)
                 {
-                    Console.WriteLine(syntax.GetHelpText());
-                    Console.WriteLine("Use -h, --help, or -? after a command to get more help about a particular command.");
+                    Console.WriteLine("Use -h, --help, or -? for usage help. Use after a command to get more help about a particular command.");
                 }
             });


update

update

--- software/cs/SensorClock/BME280.cs
+++ software/cs/SensorClock/BME280.cs
@@ -87,8 +87,8 @@
             dig_H1 = buffer[0];
             dig_H2 = (short)ReadUsignedShort(buffer, 1);
             dig_H3 = buffer[3];
-            dig_H4 = (short)((buffer[4] << 4) | (buffer[5] & 0xF));
-            dig_H5 = (short)((buffer[6] << 4) | (buffer[5] >> 4));
+            dig_H4 = (short)((buffer[4] << 4) + (buffer[5] & 0xF));
+            dig_H5 = (short)((buffer[5] >> 4) + (buffer[6] << 4));
             dig_H6 = (sbyte)buffer[7];
         }


Printing data values on the error trace on console

--- source/CoreLib/ConcurrentTrace.cs
+++ source/CoreLib/ConcurrentTrace.cs
@@ -322,6 +322,7 @@
             Console.WriteLine("Execution trace:");
             //Console.WriteLine("Format:  filename(line,col): threadid, k");
             var prev = "";
+            var extra = "";
             foreach (var ev in events)
             {
                 if (!ev.committed)
@@ -331,19 +332,20 @@

                 if (ev.extra != "")
                 {
-                    ev.extra = "(" + ev.extra + ")";
+                    extra += (extra == "" ? "" : ", ") + ev.extra;
                 }

                 var filename = sanitizeFileName(ev.filename);
                 if (filename != null && filename != "")
                 {
                     //var str = string.Format("{0}({1},{2}):  Thread={3}  K={4}:  {5}", filename, ev.lineno, 1, ev.tid, ev.k, ev.extra);
-                    var str = string.Format("{0}({1},{2}): Trace: Thread={3}  {4}", filename, ev.lineno, ev.col == -1? 1 : ev.col, ev.tid, ev.extra);
+                    var str = string.Format("{0}({1},{2}): Trace: Thread={3}  ({4})", filename, ev.lineno, ev.col == -1? 1 : ev.col, ev.tid, extra);
                     if (str != prev)
                     {
                         Console.WriteLine(str);
                     }
                     prev = str;
+                    extra = "";
                 }
             }


Fixed issue due to overzealous commenting syndrome (Fixes #36)

--- AlternateResourcePanel/ARPWindow.cs
+++ AlternateResourcePanel/ARPWindow.cs
@@ -147,13 +147,13 @@
                             SelectedResources.TogglePartResourceVisible(ResourceID);

                         //get last stage of this resource and set it
-                        //if (lstResourcesLastStage.ContainsKey(ResourceID))
-                        //{
+                        if (lstResourcesLastStage.ContainsKey(ResourceID))
+                        {
                             Highlight = SelectedResources.ContainsKey(ResourceID) && SelectedResources[ResourceID].LastStageVisible;
                             rectBar = Drawing.CalcBarRect(rectIcon, StageBarOffset, 120, 15);
                             if (Drawing.DrawResourceBar(rectBar, lstResourcesLastStage[ResourceID], Styles.styleBarBlue_Back, Styles.styleBarBlue, Styles.styleBarBlue_Thin, settings.ShowRates, Highlight, Styles.styleBarHighlight))
                                 SelectedResources.TogglePartResourceVisible(ResourceID, true);
-                        //}
+                        }
                     }
                     GUILayout.EndHorizontal();
                 }


Is Iris Setosa?

Is Iris Setosa?

--- src/recipes/iris.cs
+++ src/recipes/iris.cs
@@ -5,16 +5,191 @@
 {
     public static class Iris
     {
+        static void Print(string header, Dots.Dot[] X, Dots.Dot[] Y, Dots.Dot[] Expected)
+        {
+            Console.ForegroundColor = ConsoleColor.White;
+
+            Console.Write("[");
+
+            for (var i = 0; X != null && i < X.Length; i++)
+            {
+                if (i > 0)
+                {
+                    Console.Write($", ");
+                }
+
+                Console.Write($"{X[i].y}");
+            }
+
+            Console.Write("]");
+
+            Console.Write(" = ");
+
+            Console.Write("[");
+
+            for (var i = 0; Y != null && i < Y.Length; i++)
+            {
+                if (i > 0)
+                {
+                    Console.Write($", ");
+                }
+
+                Console.Write($"{Y[i].y}");
+            }
+
+            Console.Write("]");
+
+            Console.Write(" ~ ");
+
+            Console.Write("[");
+
+            for (var i = 0; Expected != null && i < Expected.Length; i++)
+            {
+                if (i > 0)
+                {
+                    Console.Write($", ");
+                }
+
+                Console.Write($"{Expected[i].y}");
+            }
+
+            Console.Write("]");
+
+            Console.WriteLine();
+
+            Console.ResetColor();
+        }
+
+        static void Test(Dots.Dot[] X, Dots.Dot[] Y, Dots.Dot[][] H, Dots.Dot[] Expected)
+        {
+            Dots.compute(Y, H, X);
+
+            Print("X", X, Y, Expected);
+        }
+
+        static void Run(Func<double> α, Dots.IFunction F, ref Dots.Dot[] Y,
+            Dots.Dot[][] H, int K, Func<int, Dots.Dot[]> X, Func<int, Dots.Dot[]> T, int episodes,
+            Func<int, Dots.Dot[], double, int> epoch)
+        {
+
+            for (int episode = 0; episode < episodes; episode++)
+            {
+                int k = Dots.Dot.random(K);
+
+                var x = X(k); var t = T(k);
+
+                double E = Dots.sgd(x, ref Y, H, t, α());
+
+                if (E <= double.Epsilon || double.IsNaN(E) || double.IsInfinity(E))
+                {
+                    break;
+                }
+
+                if (epoch != null)
+                {
+                    episode = epoch(episode, x, E);
+                }
+            }
+        }
+
         static void Main(string[] args)
         {
-            var Data = Load();
-
-            foreach (var plant in Data)
-            {
-                Console.WriteLine(plant);
+            var Input = new System.Collections.Generic.List<Dots.Dot[]>();
+            var Output = new System.Collections.Generic.List<Dots.Dot[]>();
+
+            Plant[] IRIS = Load();
+
+            foreach (var m in IRIS)
+            {
+                Input.Add(new Dots.Dot[]
+                {
+                    m.SepalLength * 0.1,
+                    m.SepalWidth * 0.1,
+                    m.PetalLength * 0.1,
+                    m.PetalWidth * 0.1,
+                });
+
+                switch (m.Name)
+                {
+                    case "Iris-setosa":
+                        Output.Add(new Dots.Dot[] { 1, 0, 0 });
+                        break;
+                    case "Iris-versicolor":
+                        Output.Add(new Dots.Dot[] { 0, 1, 0 });
+                        break;
+                    case "Iris-virginica":
+                        Output.Add(new Dots.Dot[] { 0, 0, 1 });
+                        break;
+                    default:
+                        throw new ArgumentException();
+                }
+            }
+
+            bool canceled = false;
+
+            Console.CancelKeyPress += (sender, e) =>
+            {
+                e.Cancel = canceled = true;
+            };
+
+            var H = new Dots.Dot[][]
+            {
+                // No hiddent layer
+            };
+
+            Dots.Dot[] Y = null;
+
+            var i = Dots.Dot.random(Input.Count);
+
+            Test(Input[i], Y, H, Output[i]);
+
+            double E = 0.0;
+
+            Run(() => 0.01,
+
+                null,
+
+                ref Y,
+
+                H,
+
+                IRIS.Length,
+
+                (k) =>
+                {
+                    return Input[k];
+                },
+
+                (k) =>
+                {
+                    return Output[k];
+                },
+
+                32 * 1024,
+
+                (episode, X, error) =>
+                {
+                    E += error * error * (episode + 1);
+
+                    Console.WriteLine($"{1 / E}");
+
+                    if (canceled)
+                    {
+                        episode = int.MaxValue - 1;
+                    }
+
+                    return episode;
+                }
+
+            );
+
+            for (i = 0; i < Input.Count; i++)
+            {
+                Test(Input[i], Y, H, Output[i]);
             }

             Console.ReadKey();
+
         }

         public class Plant


Moved example buttons into drop down

Moved example buttons into drop down

--- Assets/Ouya/SDK/Editor/OuyaPanel.cs
+++ Assets/Ouya/SDK/Editor/OuyaPanel.cs
@@ -1463,6 +1463,27 @@

     private Vector2 m_scroll = Vector2.zero;

+    private int m_selectedExample = 0;
+
+    private static string[] m_exampleScenes =
+        {
+            "None",
+            "Starter Kit Scenes",
+            "SceneShowCamera",
+            "SceneShowDrumkit",
+            "SceneShowGuitar",
+            "SceneShowJavaScript",
+            "SceneMultipleControllers",
+            "SceneSetResolution",
+            "SceneShowController",
+            "SceneShowMeshPerformance",
+            "SceneShowNDK",
+            "SceneShowProducts",
+            "SceneShowSounds",
+            "SceneShowSticks",
+            "SceneShowUnityInput",
+        };
+
     void OnGUI()
     {
         m_scroll = GUILayout.BeginScrollView(m_scroll, GUILayout.MaxWidth(position.width));
@@ -1556,74 +1577,17 @@

                 GUILayout.Label("Build Settings:");

-                if (GUILayout.Button("Use SceneShowCamera Scene"))
-                {
-                    SwitchToExampleScene("SceneShowCamera");
-                }
-
-                if (GUILayout.Button("Use SceneShowDrumkit Scene"))
-                {
-                    SwitchToExampleScene("SceneShowDrumkit");
-                }
-
-                if (GUILayout.Button("Use SceneShowGuitar Scene"))
-                {
-                    SwitchToExampleScene("SceneShowGuitar");
-                }
-
-                if (GUILayout.Button("Use SceneShowJavaScript Scene"))
-                {
-                    SwitchToExampleScene("SceneShowJavaScript");
-                }
-
-                if (GUILayout.Button("Use SceneMultipleControllers Scene"))
-                {
-                    SwitchToExampleScene("SceneMultipleControllers");
-                }
-
-                if (GUILayout.Button("Use SetResolution Scene"))
-                {
-                    SwitchToExampleScene("SceneSetResolution");
-                }
-
-                if (GUILayout.Button("Use ShowController Scene"))
-                {
-                    SwitchToExampleScene("SceneShowController");
-                }
-
-                if (GUILayout.Button("Use SceneShowMeshPerformance Scene"))
-                {
-                    SwitchToExampleScene("SceneShowMeshPerformance");
-                }
-
-                if (GUILayout.Button("Use SceneShowNDK Scene"))
-                {
-                    SwitchToExampleScene("SceneShowNDK");
-                }
-
-                if (GUILayout.Button("Use SceneShowProducts Scene"))
-                {
-                    SwitchToExampleScene("SceneShowProducts");
-                }
-
-                if (GUILayout.Button("Use ShowSounds Scene"))
-                {
-                    SwitchToExampleScene("SceneShowSounds");
-                }
-
-                if (GUILayout.Button("Use ShowSticks Scene"))
-                {
-                    SwitchToExampleScene("SceneShowSticks");
-                }
-
-                if (GUILayout.Button("Use ShowUnityInput Scene"))
-                {
-                    SwitchToExampleScene("SceneShowUnityInput");
-                }
-
-                if (GUILayout.Button("Use Starter Kit Scenes"))
-                {
-                    string[] newScenes =
+                int selectedExample = EditorGUILayout.Popup(m_selectedExample, m_exampleScenes, GUILayout.MaxWidth(position.width));
+                if (selectedExample != m_selectedExample)
+                {
+                    m_selectedExample = selectedExample;
+                    if (m_selectedExample > 1)
+                    {
+                        SwitchToExampleScene(m_exampleScenes[m_selectedExample]);
+                    }
+                    else if (m_selectedExample == 1)
+                    {
+                        string[] newScenes =
                         {
                             "Assets/Ouya/StarterKit/Scenes/SceneInit.unity",
                             "Assets/Ouya/StarterKit/Scenes/SceneSplash.unity",
@@ -1631,7 +1595,8 @@
                             "Assets/Ouya/StarterKit/Scenes/SceneGame.unity",
                         };

-                    SwitchToStarterKitScene(newScenes, "StarterKit");
+                        SwitchToStarterKitScene(newScenes, "StarterKit");
+                    }
                 }

                 #endregion


Uniform load qf

Uniform load qf

--- Assets/Scripts/Beam/BeamAnalyzer.cs
+++ Assets/Scripts/Beam/BeamAnalyzer.cs
@@ -224,8 +224,8 @@
         {
             if (!collector.nodes[pointLoad.node].GetComponent<NodeProperty>().support)
             {
-                float l1 = GetLengthOfPointLoad(pointLoad.node, false);
-                float l2 = GetLengthOfPointLoad(pointLoad.node, true);
+                float l1 = GetLengthOfLoad(pointLoad.node, false);
+                float l2 = GetLengthOfLoad(pointLoad.node, true);
                 int node1 = GetEndNodeIndex(pointLoad.node, false);
                 int node2 = GetEndNodeIndex(pointLoad.node, true);
                 List<int> index = new List<int>() { node1 * 2, node1 * 2 + 1, node2 * 2, node2 * 2 + 1 };
@@ -239,7 +239,23 @@
         }

         //TODO Uniform Load
-
+        foreach (UniformLoadProperty uniform in collector.uniformLoads)
+        {
+            MemberProperty member = collector.members[uniform.element].GetComponent<MemberProperty>();
+            float l1 = GetLengthOfLoad(member.node2.number, false);
+            float l2 = GetLengthOfLoad(member.node2.number, true);
+            int node1 = GetEndNodeIndex(member.node2.number, false);
+            int node2 = GetEndNodeIndex(member.node2.number, true);
+            List<int> index = new List<int>() { node1 * 2, node1 * 2 + 1, node2 * 2, node2 * 2 + 1 };
+            float[] qfi = new float[4];
+            qfi[1] += uniform.load * Mathf.Pow(l2, 3) * (4f * (l1 + l2) - 3 * l2) / (12 * Mathf.Pow(l1 + l2,2));
+            qfi[3] += uniform.load * Mathf.Pow(l2, 2) * (6 * Mathf.Pow(l1 + l2, 2) - 8 * (l1 + l2) * l2 + 3 * Mathf.Pow(l2, 2)) / (12 * (l1 + l2));
+
+            qfi[0] += (qfi[1] - qfi[3] + uniform.load * Mathf.Pow(l2, 2) / 2) / (l1 + l2);
+            qfi[2] += uniform.load * l2 - qfi[0];
+            qf.Add(new IndexArray(index, qfi));
+        }
+
         string qfStr = "qf = \n";
         foreach (IndexArray qfi in qf)
         {
@@ -267,18 +283,18 @@
         }
     }

-    float GetLengthOfPointLoad(int node,bool isRight)
+    float GetLengthOfLoad(int node,bool isRight)
     {
         if (isRight)
         {
             if (node == collector.nodes.Count) return 0;
             if (collector.nodes[node].GetComponent<NodeProperty>().support) return 0;
-            return collector.nodes[node].GetComponent<NodeProperty>().rightMember.length + GetLengthOfPointLoad(node + 1, isRight);
+            return collector.nodes[node].GetComponent<NodeProperty>().rightMember.length + GetLengthOfLoad(node + 1, isRight);
         }else
         {
             if (node < 0) return 0;
             if (collector.nodes[node].GetComponent<NodeProperty>().support) return 0;
-            return collector.nodes[node].GetComponent<NodeProperty>().leftMember.length + GetLengthOfPointLoad(node - 1, isRight);
+            return collector.nodes[node].GetComponent<NodeProperty>().leftMember.length + GetLengthOfLoad(node - 1, isRight);
         }
     }


quick tweak

quick tweak

--- Assets/Scripts/World/GameControl.cs
+++ Assets/Scripts/World/GameControl.cs
@@ -16,7 +16,7 @@
 	public playerProjectileScript pps;
 	public RoomController rc;
 	private bool beatBoss1, beatBoss2, beatBoss3;
-	[SerializeField] private bool phase, projectile, chargeAttack, healthRegain;
+	[SerializeField] private bool phaseAbility, projectileAbility, chargeAttackAbility;
 	private int roomID, areaID;

 	//float value used to store time (in seconds) that a room transition takes
@@ -105,13 +105,13 @@
 				phmc.GainHealth(1);
 				break;
 			case "chargeAttack":
-				chargeAttack = setValue;
+				chargeAttackAbility = setValue;
 				break;
 			case "projectile":
-				projectile = setValue;
+				projectileAbility = setValue;
 				break;
 			case "phase":
-				phase = setValue;
+				phaseAbility = setValue;
 				break;
 		}
 	}


Prevent script to access Editor resources while not in the Editor

--- Assets/Tests/UI/RestrictedButton.cs
+++ Assets/Tests/UI/RestrictedButton.cs
@@ -7,6 +7,7 @@
 	{
 		var button = GetComponent<Button>();

+#if UNITY_EDITOR
 		if (GameJolt.API.Manager.Instance.DebugAutoConnect)
 		{
 			button.interactable = true;
@@ -15,5 +16,8 @@
 		{
 			button.interactable = false;
 		}
+#else
+		button.interactable = true;
+#endif
 	}
 }


basic example of SmartBag use via inheritance to make a deck of cards

--- Assets/UToolbox/Plugins/SmartBag.cs
+++ Assets/UToolbox/Plugins/SmartBag.cs
@@ -275,6 +275,25 @@
         #endregion
     }

+    /*
+    public interface ConditionedItem
+    {
+        string Id { get; }
+
+        float Weight { get; }
+
+        List<Condition> Requirements { get; }
+
+        List<Condition> Effects { get; }
+
+        List<Condition> Use();
+
+        void Tick();
+
+        bool IsLocked();
+    }
+    */
+
     public abstract class ConditionedItem
     {
         #region Public fields and properties


Added tooltips to the buttons on the Movement GUI.

--- Assets/VPCsimCharacterController.cs
+++ Assets/VPCsimCharacterController.cs
@@ -126,16 +126,20 @@
 		bool homeButton = false;
 		if (m_movementMode != "Walking...")
 		{
-			walkButton = GUI.Button(new Rect(10, 350, 40, 20), "Walk");
+			walkButton = GUI.Button(new Rect(10, 350, 40, 20), new GUIContent("Walk",
+									"Enter 'Walking' mode"));
 		}
 		if (m_movementMode != "Flying..." )
 		{
-			flyButton = GUI.Button(new Rect(55, 350, 40, 20), "Fly");
+			flyButton = GUI.Button(new Rect(55, 350, 40, 20), new GUIContent("Fly",
+								   "Enter 'Flying' mode"));
 		}
 		if (m_movementMode != "Sampling...")
 		{
-			samplingButton = GUI.Button(new Rect(100, 350, 55, 20), "Sample");
-			homeButton = GUI.Button(new Rect(85, 380, 70, 20), "Go home");
+			samplingButton = GUI.Button(new Rect(100, 350, 55, 20), new GUIContent("Sample",
+										"Enter 'Sampling' mode"));
+			homeButton = GUI.Button(new Rect(85, 380, 70, 20), new GUIContent("Go home",
+									"Return to the starting position"));
 		}
 		else
 		{
@@ -145,6 +149,11 @@
 		GUI.Label(new Rect(10, 405, 130, 50), "Position: " + ((int)position.x).ToString() +
 											", " + ((int)position.z).ToString() +
 											"\nAltitude: " + ((int)position.y).ToString());
+		if (!System.String.IsNullOrEmpty(GUI.tooltip))
+		{
+        	GUI.Box(new Rect(165 , 330, 185, 20),"");
+		}
+		GUI.Label(new Rect(170, 330, 210, 20), GUI.tooltip);
 		if (walkButton)
 		{
 			m_movementMode = "Walking...";


Always compute mainlineVersion w/ mainline commits

Query the mainline commit log starting from mainline tip regardless of
the current branch. Stop considering mainline commits after the merge
root for the current branch (or, if the current branch has been merged
to mainline but has new commmits, the last commit that merged the
current branch into mainline).

fixes #1035

--- src/GitVersionCore/VersionCalculation/MainlineVersionCalculator.cs
+++ src/GitVersionCore/VersionCalculation/MainlineVersionCalculator.cs
@@ -1,4 +1,4 @@
-using GitVersion.VersionCalculation.BaseVersionCalculators;
+using GitVersion.VersionCalculation.BaseVersionCalculators;
 using LibGit2Sharp;
 using System;
 using System.Collections.Generic;
@@ -33,67 +33,55 @@
                 // master *  *
                 //

-                var mainlineTip = GetMainlineTip(context);
-                var commitsNotOnMainline = context.Repository.Commits.QueryBy(new CommitFilter
-                {
-                    IncludeReachableFrom = context.CurrentBranch,
-                    ExcludeReachableFrom = mainlineTip,
-                    SortBy = CommitSortStrategies.Reverse,
-                    FirstParentOnly = true
-                }).Where(c => c.Sha != baseVersion.BaseVersionSource.Sha && c.Parents.Count() == 1).ToList();
-                var commitLog = context.Repository.Commits.QueryBy(new CommitFilter
-                {
-                    IncludeReachableFrom = context.CurrentBranch,
+                var mergeBase = baseVersion.BaseVersionSource;
+                var mainline = GetMainline(context);
+                var mainlineTip = mainline.Tip;
+
+                // when the current branch is not mainline, find the effective mainline tip for versioning the branch
+                if (!context.CurrentBranch.IsSameBranch(mainline))
+                {
+                    mergeBase = FindMergeBaseBeforeForwardMerge(context, baseVersion.BaseVersionSource, mainline, out mainlineTip);
+                    Logger.WriteInfo(string.Format("Current branch ({0}) was branch from {1}", context.CurrentBranch.FriendlyName, mergeBase));
+                }
+
+                var mainlineCommitLog = context.Repository.Commits.QueryBy(new CommitFilter
+                {
+                    IncludeReachableFrom = mainlineTip,
                     ExcludeReachableFrom = baseVersion.BaseVersionSource,
                     SortBy = CommitSortStrategies.Reverse,
                     FirstParentOnly = true
                 })
-                .Where(c => c.Sha != baseVersion.BaseVersionSource.Sha)
-                .Except(commitsNotOnMainline)
                 .ToList();
-
-                var directCommits = new List<Commit>();
+                var directCommits = new List<Commit>(mainlineCommitLog.Count);

                 // Scans commit log in reverse, aggregating merge commits
-                foreach (var commit in commitLog)
+                foreach (var commit in mainlineCommitLog)
                 {
                     directCommits.Add(commit);
                     if (commit.Parents.Count() > 1)
                     {
-                        mainlineVersion = AggregateMergeCommitIncrement(context, commit, directCommits, mainlineVersion);
+                        mainlineVersion = AggregateMergeCommitIncrement(context, commit, directCommits, mainlineVersion, mainline);
                     }
                 }

+                // This will increment for any direct commits on mainline
+                mainlineVersion = IncrementForEachCommit(context, directCommits, mainlineVersion, mainline);
+                mainlineVersion.BuildMetaData = metaDataCalculator.Create(mergeBase, context);
+
+                // branches other than master always get a bump for the act of branching
                 if (context.CurrentBranch.FriendlyName != "master")
                 {
-                    var mergedHead = context.CurrentCommit;
-                    var findMergeBase = context.Repository.ObjectDatabase.FindMergeBase(context.CurrentCommit, mainlineTip);
-                    Logger.WriteInfo(string.Format("Current branch ({0}) was branch from {1}", context.CurrentBranch.FriendlyName, findMergeBase));
-
-                    var branchIncrement = FindMessageIncrement(context, null, mergedHead, findMergeBase, directCommits);
-                    // This will increment for any direct commits on master
-                    mainlineVersion = IncrementForEachCommit(context, directCommits, mainlineVersion, "master");
-                    mainlineVersion.BuildMetaData = metaDataCalculator.Create(findMergeBase, context);
-                    // Don't increment if the merge commit is a merge into mainline
-                    // this ensures PR's and forward merges end up correct.
-                    if (mergedHead.Parents.Count() == 1 || mergedHead.Parents.First() != mainlineTip)
-                    {
-                        Logger.WriteInfo(string.Format("Performing {0} increment for current branch ", branchIncrement));
-                        mainlineVersion = mainlineVersion.IncrementVersion(branchIncrement);
-                    }
-                }
-                else
-                {
-                    // If we are on master, make sure no commits get left behind
-                    mainlineVersion = IncrementForEachCommit(context, directCommits, mainlineVersion);
-                    mainlineVersion.BuildMetaData = metaDataCalculator.Create(baseVersion.BaseVersionSource, context);
+                    var branchIncrement = FindMessageIncrement(context, null, context.CurrentCommit, mergeBase, mainlineCommitLog);
+                    Logger.WriteInfo(string.Format("Performing {0} increment for current branch ", branchIncrement));
+
+                    mainlineVersion = mainlineVersion.IncrementVersion(branchIncrement);
                 }

                 return mainlineVersion;
             }
         }

-        SemanticVersion AggregateMergeCommitIncrement(GitVersionContext context, Commit commit, List<Commit> directCommits, SemanticVersion mainlineVersion)
+        SemanticVersion AggregateMergeCommitIncrement(GitVersionContext context, Commit commit, List<Commit> directCommits, SemanticVersion mainlineVersion, Branch mainline)
         {
             // Merge commit, process all merged commits as a batch
             var mergeCommit = commit;
@@ -103,7 +91,7 @@

             // If this collection is not empty there has been some direct commits against master
             // Treat each commit as it's own 'release', we need to do this before we increment the branch
-            mainlineVersion = IncrementForEachCommit(context, directCommits, mainlineVersion);
+            mainlineVersion = IncrementForEachCommit(context, directCommits, mainlineVersion, mainline);
             directCommits.Clear();

             // Finally increment for the branch
@@ -113,7 +101,7 @@
             return mainlineVersion;
         }

-        static Commit GetMainlineTip(GitVersionContext context)
+        static Branch GetMainline(GitVersionContext context)
         {
             var mainlineBranchConfigs = context.FullConfiguration.Branches.Where(b => b.Value.IsMainline == true).ToList();
             var seenMainlineTips = new List<string>();
@@ -152,7 +140,7 @@
             {
                 var mainlineBranch = possibleMainlineBranches[0];
                 Logger.WriteInfo("Mainline for current branch is " + mainlineBranch.FriendlyName);
-                return mainlineBranch.Tip;
+                return mainlineBranch;
             }

             var chosenMainline = possibleMainlineBranches[0];
@@ -160,17 +148,85 @@
                 "Multiple mainlines ({0}) have the same merge base for the current branch, choosing {1} because we found that branch first...",
                 string.Join(", ", possibleMainlineBranches.Select(b => b.FriendlyName)),
                 chosenMainline.FriendlyName));
-            return chosenMainline.Tip;
-        }
-
-        private static SemanticVersion IncrementForEachCommit(GitVersionContext context, List<Commit> directCommits, SemanticVersion mainlineVersion, string branch = null)
+            return chosenMainline;
+        }
+
+        /// <summary>
+        /// Gets the commit on mainline at which <paramref name="mergeBase"/> was fully integrated.
+        /// </summary>
+        /// <param name="mainlineCommitLog">The collection of commits made directly to mainline, in reverse order.</param>
+        /// <param name="mergeBase">The best possible merge base between <paramref name="mainlineTip"/> and the current commit.</param>
+        /// <param name="mainlineTip">The tip of the mainline branch.</param>
+        /// <returns>The commit on mainline at which <paramref name="mergeBase"/> was merged, if such a commit exists; otherwise, <paramref name="mainlineTip"/>.</returns>
+        /// <remarks>
+        /// This method gets the most recent commit on mainline that should be considered for versioning the current branch.
+        /// </remarks>
+        private static Commit GetEffectiveMainlineTip(IEnumerable<Commit> mainlineCommitLog, Commit mergeBase, Commit mainlineTip)
+        {
+            // find the commit that merged mergeBase into mainline
+            foreach (var commit in mainlineCommitLog)
+            {
+                if (commit == mergeBase || commit.Parents.Contains(mergeBase))
+                {
+                    Logger.WriteInfo(string.Format("Found branch merge point; choosing {0} as effective mainline tip", commit));
+                    return commit;
+                }
+            }
+
+            return mainlineTip;
+        }
+
+        /// <summary>
+        /// Gets the best possible merge base between the current commit and <paramref name="mainline"/> that is not the child of a forward merge.
+        /// </summary>
+        /// <param name="context">The current versioning context.</param>
+        /// <param name="baseVersionSource">The commit that establishes the contextual base version.</param>
+        /// <param name="mainline">The mainline branch.</param>
+        /// <param name="mainlineTip">The commit on mainline at which the returned merge base was fully integrated.</param>
+        /// <returns>The best possible merge base between the current commit and <paramref name="mainline"/> that is not the child of a forward merge.</returns>
+        private static Commit FindMergeBaseBeforeForwardMerge(GitVersionContext context, Commit baseVersionSource, Branch mainline, out Commit mainlineTip)
+        {
+            var mergeBase = context.Repository.ObjectDatabase.FindMergeBase(context.CurrentCommit, mainline.Tip);
+            var mainlineCommitLog = context.Repository.Commits
+                .QueryBy(new CommitFilter
+                {
+                    IncludeReachableFrom = mainline.Tip,
+                    ExcludeReachableFrom = baseVersionSource,
+                    SortBy = CommitSortStrategies.Reverse,
+                    FirstParentOnly = true
+                })
+                .ToList();
+
+            // find the mainline commit effective for versioning the current branch
+            mainlineTip = GetEffectiveMainlineTip(mainlineCommitLog, mergeBase, mainline.Tip);
+
+            // detect forward merge and rewind mainlineTip to before it
+            if (mergeBase == context.CurrentCommit && !mainlineCommitLog.Contains(mergeBase))
+            {
+                var mainlineTipPrevious = mainlineTip.Parents.First();
+                var message = string.Format(
+                    "Detected forward merge at {0}; rewinding mainline to previous commit {1}",
+                    mainlineTip,
+                    mainlineTipPrevious);
+
+                Logger.WriteInfo(message);
+
+                // re-do mergeBase detection before the forward merge
+                mergeBase = context.Repository.ObjectDatabase.FindMergeBase(context.CurrentCommit, mainlineTipPrevious);
+                mainlineTip = GetEffectiveMainlineTip(mainlineCommitLog, mergeBase, mainlineTipPrevious);
+            }
+
+            return mergeBase;
+        }
+
+        private static SemanticVersion IncrementForEachCommit(GitVersionContext context, List<Commit> directCommits, SemanticVersion mainlineVersion, Branch mainline)
         {
             foreach (var directCommit in directCommits)
             {
                 var directCommitIncrement = IncrementStrategyFinder.GetIncrementForCommits(context, new[]
                                             {
                                                 directCommit
-                                            }) ?? IncrementStrategyFinder.FindDefaultIncrementForBranch(context, branch);
+                                            }) ?? IncrementStrategyFinder.FindDefaultIncrementForBranch(context, mainline.FriendlyName);
                 mainlineVersion = mainlineVersion.IncrementVersion(directCommitIncrement);
                 Logger.WriteInfo(string.Format("Direct commit on master {0} incremented base versions {1}, now {2}",
                     directCommit.Sha, directCommitIncrement, mainlineVersion));


React to EF changes

React to EF changes

--- src/Microsoft.AspNet.Identity.EntityFramework/IdentityDbContext.cs
+++ src/Microsoft.AspNet.Identity.EntityFramework/IdentityDbContext.cs
@@ -33,9 +33,9 @@
             builder.Entity<TUser>(b =>
                 {
                     b.Key(u => u.Id);
-                    b.Index(u => u.NormalizedUserName).Name("UserNameIndex");
-                    b.Index(u => u.NormalizedEmail).Name("EmailIndex");
-                    b.Table("AspNetUsers");
+                    b.Index(u => u.NormalizedUserName).IndexName("UserNameIndex");
+                    b.Index(u => u.NormalizedEmail).IndexName("EmailIndex");
+                    b.ToTable("AspNetUsers");
                     b.Property(u => u.ConcurrencyStamp).ConcurrencyToken();

                     b.Property(u => u.UserName).MaxLength(256);
@@ -50,8 +50,8 @@
             builder.Entity<TRole>(b =>
                 {
                     b.Key(r => r.Id);
-                    b.Index(r => r.NormalizedName).Name("RoleNameIndex");
-                    b.Table("AspNetRoles");
+                    b.Index(r => r.NormalizedName).IndexName("RoleNameIndex");
+                    b.ToTable("AspNetRoles");
                     b.Property(r => r.ConcurrencyStamp).ConcurrencyToken();

                     b.Property(u => u.Name).MaxLength(256);
@@ -64,19 +64,19 @@
             builder.Entity<IdentityUserClaim<TKey>>(b =>
                 {
                     b.Key(uc => uc.Id);
-                    b.Table("AspNetUserClaims");
+                    b.ToTable("AspNetUserClaims");
                 });

             builder.Entity<IdentityRoleClaim<TKey>>(b =>
                 {
                     b.Key(rc => rc.Id);
-                    b.Table("AspNetRoleClaims");
+                    b.ToTable("AspNetRoleClaims");
                 });

             builder.Entity<IdentityUserRole<TKey>>(b =>
                 {
                     b.Key(r => new { r.UserId, r.RoleId });
-                    b.Table("AspNetUserRoles");
+                    b.ToTable("AspNetUserRoles");
                 });
             // Blocks delete currently without cascade
             //.ForeignKeys(fk => fk.ForeignKey<TUser>(f => f.UserId))
@@ -85,7 +85,7 @@
             builder.Entity<IdentityUserLogin<TKey>>(b =>
                 {
                     b.Key(l => new { l.LoginProvider, l.ProviderKey });
-                    b.Table("AspNetUserLogins");
+                    b.ToTable("AspNetUserLogins");
                 });
         }
     }


Fix: Base class specification

Fix: Base class specification

--- src/tests/UUM.Engine.Tests/Serialization.cs
+++ src/tests/UUM.Engine.Tests/Serialization.cs
@@ -18,7 +18,7 @@
     //[KnownType(typeof(ParamsPluginA))]
     //[KnownType(typeof(ParamsPluginB))]
     [KnownType("KnownTypes")]
-    public class ParamsBase : SavableModelBase<ParamsPluginA>, IParams
+    public class ParamsBase : SavableModelBase<ParamsBase>, IParams
     {
         // This method returns the array of known types.
         static Type[] KnownTypes()


Fix IModelBinder docs

Fix IModelBinder docs

--- src/Microsoft.AspNet.Mvc.Abstractions/ModelBinding/IModelBinder.cs
+++ src/Microsoft.AspNet.Mvc.Abstractions/ModelBinding/IModelBinder.cs
@@ -6,22 +6,27 @@
 namespace Microsoft.AspNet.Mvc.ModelBinding
 {
     /// <summary>
-    /// Interface for model binding.
+    /// Defines an interface for model binders.
     /// </summary>
     public interface IModelBinder
     {
         /// <summary>
-        /// Async function to bind to a particular model.
+        /// Attempts to bind a model.
         /// </summary>
-        /// <param name="bindingContext">The binding context which has the object to be bound.</param>
-        /// <returns>A Task which on completion returns a <see cref="ModelBindingResult"/> which represents the result
-        /// of the model binding process.
+        /// <param name="bindingContext">The <see cref="ModelBindingContext"/>.</param>
+        /// <returns>
+        /// <para>
+        /// A <see cref="Task"/> which on completion returns a <see cref="ModelBindingResult"/> which
+        /// represents the result of the model binding process.
+        /// </para>
+        /// <para>
+        /// If model binding was successful, the <see cref="ModelBindingResult"/> should be a value created
+        /// with <see cref="ModelBindingResult.Success"/>. If model binding failed, the
+        /// <see cref="ModelBindingResult"/> should be a value created with <see cref="ModelBindingResult.Failed"/>.
+        /// If there was no data, or this model binder cannot handle the operation, the
+        /// <see cref="ModelBindingResult"/> should be <see cref="ModelBindingResult.NoResult"/>.
+        /// </para>
         /// </returns>
-        /// <remarks>
-        /// A <c>null</c> return value means that this model binder was not able to handle the request.
-        /// Returning <c>null</c> ensures that subsequent model binders are run. If a non <c>null</c> value indicates
-        /// that the model binder was able to handle the request.
-        /// </remarks>
         Task<ModelBindingResult> BindModelAsync(ModelBindingContext bindingContext);
     }
 }


Defensive coding for Encoding.GetString (#558)

--- src/Microsoft.Diagnostics.Runtime/src/Extensions/SpanExtensions.cs
+++ src/Microsoft.Diagnostics.Runtime/src/Extensions/SpanExtensions.cs
@@ -37,6 +37,9 @@
 #if !NETCOREAPP
         public static unsafe string GetString(this Encoding encoding, ReadOnlySpan<byte> bytes)
         {
+            if (bytes.IsEmpty)
+                return string.Empty;
+
             fixed (byte* bytesPtr = bytes)
             {
                 return encoding.GetString(bytesPtr, bytes.Length);


Avoid crashing on Linux when getting the threads callstack (#275)

--- src/Microsoft.Diagnostics.Runtime/src/Linux/LinuxLiveDataReader.cs
+++ src/Microsoft.Diagnostics.Runtime/src/Linux/LinuxLiveDataReader.cs
@@ -309,22 +309,6 @@
                         _threadIDs.Add(taskId);
                     }
                 }
-                foreach (var tid in _threadIDs)
-                {
-                    if (tid != this.ProcessId)
-                    {
-                        ulong ret = ptrace(PTRACE_ATTACH, (int)tid, IntPtr.Zero, IntPtr.Zero);
-                        if (ret != 0)
-                        {
-                            throw new InvalidOperationException($"ptrace attach failed with 0x{ret:x}. Please ensure SYS_PTRACE capability is enabled. When running inside a Docker container, add 'SYS_PTRACE' to securityContext.capabilities.");
-                        }
-                        int ret2 = wait(IntPtr.Zero);
-                        if (ret2 != tid)
-                        {
-                            throw new InvalidOperationException($"wait failed with {ret2}. is thread {tid} still running?");
-                        }
-                    }
-                }
             }
         }


Remove SerializerCodeGenerationConfiguration.ProviderName

This property is not used because Roslyn based provider was gone.

--- src/MsgPack/Serialization/SerializerCodeGenerationConfiguration.cs
+++ src/MsgPack/Serialization/SerializerCodeGenerationConfiguration.cs
@@ -236,20 +236,6 @@
 		/// </value>
 		public bool WithAsync { get; set; }

-		private string _providerName;
-
-#warning TODO: mpu
-		/// <summary>
-		///		Gets or sets a code provider name.
-		/// </summary>
-		/// <value>
-		///		A code provider name. Setting <c>null</c> causes setting empty string which represents default provider.
-		/// </value>
-		public string ProviderName
-		{
-			get { return this._providerName; }
-			set { this._providerName = value ?? String.Empty; }
-		}

 #warning TODO: mpu
 		/// <summary>


Adds better formating of exceptions

Adds better formating of exceptions

--- src/Multitenancy.Delivery/PandoraMultiTenantDeliveryProvisioner.cs
+++ src/Multitenancy.Delivery/PandoraMultiTenantDeliveryProvisioner.cs
@@ -33,7 +33,7 @@
             var notificationType = notification.GetType();
             var storeItem = store.SingleOrDefault(x => x.Tenant == tenant && x.Type == notificationType);

-            if (ReferenceEquals(null, storeItem) == true) throw new NotSupportedException($"There is no registered delivery for type {notificationType.Name} and tenant {tenant}");
+            if (ReferenceEquals(null, storeItem) == true) throw new NotSupportedException($"There is no registered delivery for type '{notificationType.Name}' and tenant '{tenant}'");
             return storeItem.Delivery;
         }

@@ -59,7 +59,7 @@
         void RegisterFireBaseDelivery(string baseUrl, FireBaseSettings settings)
         {
             if (string.IsNullOrEmpty(baseUrl) == true) throw new ArgumentNullException(nameof(baseUrl));
-            if (settings.RecipientsCountBeforeFlush >= 1000) throw new ArgumentException($"FireBase limits the number of tokens to 1000. Use lower number for {nameof(settings.RecipientsCountBeforeFlush)}");
+            if (settings.RecipientsCountBeforeFlush >= 1000) throw new ArgumentException($"FireBase limits the number of tokens to 1000. Use lower number for '{nameof(settings.RecipientsCountBeforeFlush)}'");

             var timeSpanBeforeFlush = TimeSpan.FromSeconds(settings.TimeSpanBeforeFlushInSeconds);
             var recipientsCountBeforeFlush = settings.RecipientsCountBeforeFlush;


Pass correct paramaters

Pass correct paramaters

--- src/NEventStore/Persistence/Sql/SqlDialects/OracleNativeDialect.cs
+++ src/NEventStore/Persistence/Sql/SqlDialects/OracleNativeDialect.cs
@@ -9,7 +9,6 @@
     public class OracleNativeDialect : CommonSqlDialect
     {
         private const int UniqueKeyViolation = -2146232008;
-        private const string OracleManagedDataAcccessAssemblyName = "Oracle.ManagedDataAccess";
         Action<IConnectionFactory, IDbConnection, IDbStatement, byte[]> _addPayloadParamater;

         public override string AppendSnapshotToCommit
@@ -175,10 +174,11 @@
         {
             if (_addPayloadParamater == null)
             {
+                const string oracleManagedDataAcccessAssemblyName = "Oracle.ManagedDataAccess";
                 string dbProviderAssemblyName = connectionFactory.GetDbProviderFactoryType().Assembly.GetName().Name;
-                if (dbProviderAssemblyName.Equals(OracleManagedDataAcccessAssemblyName, StringComparison.Ordinal))
+                if (dbProviderAssemblyName.Equals(oracleManagedDataAcccessAssemblyName, StringComparison.Ordinal))
                 {
-                    Assembly assembly = Assembly.Load(OracleManagedDataAcccessAssemblyName);
+                    Assembly assembly = Assembly.Load(oracleManagedDataAcccessAssemblyName);
                     var oracleParamaterType = assembly.GetType("Oracle.ManagedDataAccess.Client.OracleParameter", true);
                     var oracleParamaterValueProperty = oracleParamaterType.GetProperty("Value");
                     var oracleBlobType = assembly.GetType("Oracle.ManagedDataAccess.Types.OracleBlob", true);
@@ -187,19 +187,20 @@
                     FieldInfo blobField = oracleParamapterType.GetField("Blob");
                     var blobDbType = blobField.GetValue(null);

-                    _addPayloadParamater = (connectionFactory2, connection2, cmd2, payload2) =>
+                    _addPayloadParamater = (_, connection2, cmd2, payload2) =>
                     {
                         object payloadParam = Activator.CreateInstance(oracleParamaterType, new[] {Payload, blobDbType});
-                        ((OracleDbStatement) cmd).AddParameter(Payload, payloadParam);
-                        object oracleConnection = ((ConnectionScope) connection).Current;
+                        ((OracleDbStatement)cmd2).AddParameter(Payload, payloadParam);
+                        object oracleConnection = ((ConnectionScope)connection2).Current;
                         object oracleBlob = Activator.CreateInstance(oracleBlobType, new[] {oracleConnection});
-                        oracleBlobWriteMethod.Invoke(oracleBlob, new object[] {payload, 0, payload.Length});
+                        oracleBlobWriteMethod.Invoke(oracleBlob, new object[] { payload2, 0, payload2.Length });
                         oracleParamaterValueProperty.SetValue(payloadParam, oracleBlob, null);
                     };
                 }
                 else
                 {
-                    _addPayloadParamater = (connectionFactory2, connection2, cmd2, payload2) => base.AddPayloadParamater(connectionFactory, connection, cmd, payload);
+                    _addPayloadParamater = (connectionFactory2, connection2, cmd2, payload2)
+                        => base.AddPayloadParamater(connectionFactory2, connection2, cmd2, payload2);
                 }
             }
             _addPayloadParamater(connectionFactory, connection, cmd, payload);


Fixing AssemblyVersion which should not have been bumped

Fixing AssemblyVersion which should not have been bumped

--- src/SDKs/HDInsight/Management.HDInsight/Properties/AssemblyInfo.cs
+++ src/SDKs/HDInsight/Management.HDInsight/Properties/AssemblyInfo.cs
@@ -21,7 +21,7 @@

 [assembly: AssemblyTitle("Microsoft Azure HDInsight Management Library")]
 [assembly: AssemblyDescription("Provides management functionality for Microsoft Azure HDInsight.")]
-[assembly: AssemblyVersion("3.0.2.0")]
+[assembly: AssemblyVersion("3.0.0.0")]
 [assembly: AssemblyFileVersion("3.0.2.0")]

 [assembly: InternalsVisibleTo("Microsoft.Azure.Management.HDInsight.Tests, PublicKey=0024000004800000940000000602000000240000525341310004000001000100b5fc90e7027f67871e773a8fde8938c81dd402ba65b9201d60593e96c492651e889cc13f1415ebb53fac1131ae0bd333c5ee6021672d9718ea31a8aebd0da0072f25d87dba6fc90ffd598ed4da35e44c398c454307e8e33b8426143daec9f596836f97c8f74750e5975c64e2189f45def46b2a2b1247adc3652bf5c308055da9")]


更新.NET 4.5项目版本号

更新.NET 4.5项目版本号

--- src/Senparc.WebSocket/Senparc.WebSocket/Properties/AssemblyInfo.cs
+++ src/Senparc.WebSocket/Senparc.WebSocket/Properties/AssemblyInfo.cs
@@ -32,5 +32,5 @@
 //可以指定所有这些值，也可以使用“生成号”和“修订号”的默认值，
 // 方法是按如下所示使用“*”: :
 // [assembly: AssemblyVersion("1.0.*")]
-[assembly: AssemblyVersion("0.3.4.*")]
+[assembly: AssemblyVersion("0.3.3.*")]
 //[assembly: AssemblyFileVersion("1.0.0.0")]


docs: revisions to ndk download intro

docs: revisions to ndk download intro

Change-Id: Ib1ba3d5f0e727a1246dc92161b72bcfff6f9d772

--- tools/droiddoc/templates-sdk/sdkpage.cs
+++ tools/droiddoc/templates-sdk/sdkpage.cs
@@ -67,21 +67,18 @@
 inside of a virtual machine on the device. The fundamental Android application model
 does not change.

-Using native code does not result in an automatic performance increase,
+
Using native code does not result in an automatic performance increase,
 but always increases application complexity. If you have not run into any limitations
-using the Android framework APIs, you probably do not need the NDK.
-
Read <a href="<?cs var:toroot ?>sdk/ndk/overview.html">What is the NDK?
-to get an understanding of what the NDK offers and whether
-it will be useful to you.
+using the Android framework APIs, you probably do not need the NDK. Read <a
+href="<?cs var:toroot ?>sdk/ndk/overview.html">What is the NDK? for more information about what
+the NDK offers and whether it will be useful to you.

 The NDK is designed for use only in conjunction with the
-Android SDK, so if you have not already installed the latest Android SDK, please
+Android SDK. If you have not already installed and setup the Android SDK, please
 do so before downloading the NDK.

-
-
Select the download package that is appropriate for your development
-computer.


Hided id

Hided id

--- Azimuth/Views/Settings/Index.cshtml
+++ Azimuth/Views/Settings/Index.cshtml
@@ -134,7 +134,7 @@
                 ${city}
                 ${country}

-
${id}

+
${id}

     </script>


Added FormBuilderControl parameterless constructor

--- BForms/FormBuilder/ControlModels.cs
+++ BForms/FormBuilder/ControlModels.cs
@@ -14,7 +14,7 @@
         [Display(Name = "Default properties")]
         public DefaultcontrolProperties DefaultProperties { get; set; }

-        public FormBuilderControl(FormBuilderControlType type)
+        public FormBuilderControl(FormBuilderControlType type = FormBuilderControlType.CustomControl)
         {
             Type = type;
             DefaultProperties = new DefaultcontrolProperties();


updated cover model to work for all object types

--- OpenTile/Cover.cs
+++ OpenTile/Cover.cs
@@ -220,19 +220,19 @@
             }

             //Get possible tiles, within constraints of map, including only square titles from current position (not diagonally)
-            if (validTiles[currentLocation.X, yMax] == "W")
+            if (validTiles[currentLocation.X, yMax] != "")
             {
                 result.Add(new Point(currentLocation.X, yMax));
             }
-            if (validTiles[xMax, currentLocation.Y] == "W")
+            if (validTiles[xMax, currentLocation.Y] != "")
             {
                 result.Add(new Point(xMax, currentLocation.Y));
             }
-            if (validTiles[currentLocation.X, yMin] == "W")
+            if (validTiles[currentLocation.X, yMin] != "")
             {
                 result.Add(new Point(currentLocation.X, yMin));
             }
-            if (validTiles[xMin, currentLocation.Y] == "W")
+            if (validTiles[xMin, currentLocation.Y] != "")
             {
                 result.Add(new Point(xMin, currentLocation.Y));
             }


XUriParser tests: fixed scheme test

XUriParser tests: fixed scheme test

--- src/tests/DreamMisc/XUriParser-Test.cs
+++ src/tests/DreamMisc/XUriParser-Test.cs
@@ -243,8 +243,8 @@
         }

         [Test]
-        public void Scheme_with_invalid_char() {
-            const string original = "ht<tp://example.com";
+        public void Scheme_with_colon() {
+            const string original = "ht:tp://example.com";
             AssertParse(original, success: ParseSuccess.NEITHER);
         }


Updated command options help.

Updated command options help.

--- dotnet-flubu/Commanding/FlubuCommandParser.cs
+++ dotnet-flubu/Commanding/FlubuCommandParser.cs
@@ -53,8 +53,8 @@
             _parallelTargetExecution = _commandApp.Option("--parallel", "If applied target's are executed in parallel", CommandOptionType.NoValue);
             _targetsToExecute = _commandApp.Option("-tte|--targetsToExecute <TARGETS_TO_EXECUTE>", "Target's that must be executed. Otherwise fails.", CommandOptionType.SingleValue);
             _isDebug = _commandApp.Option("-d|--debug", "Enable debug logging.", CommandOptionType.NoValue);
-            _configurationFile = _commandApp.Option("-cf|--configurationFile", "Path to the json configuration file. If not specified configuration is readed from flubusettings.json ", CommandOptionType.SingleValue);
-            _assemblyDirectories = _commandApp.Option("-ass", "Directory to search assemblies to include in script.", CommandOptionType.MultipleValue);
+            _configurationFile = _commandApp.Option("-cf|--configurationFile", "Path to the flubu json configuration file. If not specified configuration is readed from flubusettings.json ", CommandOptionType.SingleValue);
+            _assemblyDirectories = _commandApp.Option("-ass", "Directory to search assemblies to include automatically in script (Assemblies in subdirectories are also loaded). If not specified assemblies are loaded by default from FlubuLib directory.", CommandOptionType.MultipleValue);
             _commandApp.OnExecute(() => PrepareDefaultArguments());

             if (args == null)


Bug fixes to Logitech library

Bug fixes to Logitech library

--- Chromatics/DeviceInterfaces/LogitechInterface.cs
+++ Chromatics/DeviceInterfaces/LogitechInterface.cs
@@ -286,11 +286,6 @@
                     (int) Math.Ceiling((double) (color.R * 100) / 255),
                     (int) Math.Ceiling((double) (color.G * 100) / 255),
                     (int) Math.Ceiling((double) (color.B * 100) / 255));
-
-                if (keyMappings.ContainsKey(keyName))
-                {
-                    keyMappings[keyName] = color;
-                }
             }
         }

@@ -300,10 +295,6 @@
                 (int) Math.Ceiling((double) (color.G * 100) / 255),
                 (int) Math.Ceiling((double) (color.B * 100) / 255));

-            foreach (var key in keyMappings)
-            {
-                keyMappings[key.Key] = color;
-            }
         }

         public void ApplyMapSingleLighting(Color color)
@@ -613,10 +604,6 @@
                     (int) Math.Ceiling((double) (color.G * 100) / 255),
                     (int) Math.Ceiling((double) (color.B * 100) / 255));

-            foreach (var key in keyMappings)
-            {
-                keyMappings[key.Key] = color;
-            }
         }

         public void StopEffects()


AdventureSample - minor fixes to console app

--- projects/AdventureSample/src/GWBas2CS/Program.cs
+++ projects/AdventureSample/src/GWBas2CS/Program.cs
@@ -14,7 +14,7 @@
         {
             if (args.Length != 2)
             {
-                Console.WriteLine("Please provider an input (.bas) and output (.cs) file path.");
+                Console.WriteLine("Please provide an input (.bas) and output (.cs) file path.");
                 return 1;
             }

@@ -24,11 +24,16 @@

         private static async Task MainAsync(string inputPath, string outputPath)
         {
-            using (SourceCodeStream input = new SourceCodeStream(new FileStream(inputPath, FileMode.Open, FileAccess.Read, FileShare.Read, 4096, true)))
-            using (Stream output = new FileStream(outputPath, FileMode.Create, FileAccess.Write, FileShare.None, 4096, true))
+            using (var input = new SourceCodeStream(Open(inputPath, FileMode.Open, FileAccess.Read, FileShare.Read)))
+            using (var output = Open(outputPath, FileMode.Create, FileAccess.Write, FileShare.None))
             {
                 await input.TranslateAsync(Path.GetFileNameWithoutExtension(inputPath), output);
             }
         }
+
+        private static Stream Open(string path, FileMode mode, FileAccess access, FileShare share)
+        {
+            return new FileStream(path, mode, access, share, 4096, true);
+        }
     }
 }