Forgot to add the world alter variable to regions

--- Regions/Regions.cs
+++ Regions/Regions.cs
@@ -57,6 +57,8 @@
         public Node TilePlace;
         public Node ProjectileUse;

+        public HookResult WorldAlter = HookResult.ERASE;
+
         protected override void Initialized(object state)
         {
             base.Name = "Regions";
@@ -77,6 +79,9 @@
             rProperties.pushData();
             rProperties.Save();

+            if (rProperties.RectifyChanges)
+                WorldAlter = HookResult.RECTIFY;
+
             SelectorItem = rProperties.SelectionToolID;

             regionManager = new RegionManager(DataFolder);
@@ -170,7 +175,7 @@
                     {
                         if (IsRestrictedForUser(ctx.Player, rgn, ((args.TileWasRemoved || args.WallWasRemoved) ? TileBreak : TilePlace)))
                         {
-                            ctx.SetResult(HookResult.ERASE);
+                            ctx.SetResult(WorldAlter);
                             ctx.Player.sendMessage("You cannot edit this area!", ChatColor.Red);
                             return;
                         }


MC: fix suite/MC/Sparc/sparc-fp-instructions.s.cs, to make fuzzer happy

--- suite/MC/Sparc/sparc-fp-instructions.s.cs
+++ suite/MC/Sparc/sparc-fp-instructions.s.cs
@@ -1,4 +1,4 @@
-# CS_ARCH_SPARC, CS_MODE_BIG_ENDIAN+CS_MODE_V9, None
+# CS_ARCH_SPARC, CS_MODE_BIG_ENDIAN + CS_MODE_V9, None
 0x89,0xa0,0x18,0x80 = fitos %f0, %f4
 0x89,0xa0,0x19,0x00 = fitod %f0, %f4
 0x89,0xa0,0x19,0x80 = fitoq %f0, %f4


forgot to commit

forgot to commit

--- Dev/Editor/Effekseer/Program.cs
+++ Dev/Editor/Effekseer/Program.cs
@@ -5,6 +5,7 @@
 using System.Threading.Tasks;
 using System.IO;
 using System.Reflection;
+using System.Runtime.ExceptionServices;

 namespace Effekseer
 {
@@ -20,6 +21,7 @@
 		}

 		[STAThread]
+		[HandleProcessCorruptedStateExceptions]
 		static void Main(string[] args)
 		{
 #if DEBUG


Small improve to DB split/upgrade

Small improve to DB split/upgrade

--- EDDiscovery/DB/SQLiteDBClass.cs
+++ EDDiscovery/DB/SQLiteDBClass.cs
@@ -505,7 +505,6 @@
         #endregion

         #region Transitional properties
-        public static bool UseV5Databases = false;
         public static EDDSqlDbSelection DefaultMainDatabase { get { return  EDDSqlDbSelection.EDDiscovery; } }
         public static EDDSqlDbSelection UserDatabase { get { return EDDSqlDbSelection.EDDUser; } }
         public static EDDSqlDbSelection SystemDatabase { get { return EDDSqlDbSelection.EDDSystem;  } }
@@ -523,13 +522,14 @@
             try
             {
                 bool fileexist = File.Exists(dbv4file);
-
-                SQLiteDBClass.UseV5Databases = File.Exists(dbuserfile);
-
-                if (!fileexist)                                         // no file, create it
+                bool UseV5Databases;
+
+                UseV5Databases = File.Exists(dbuserfile);
+
+                if (!fileexist && UseV5Databases==false)                                         // no file, create it
                     SQLiteConnection.CreateFile(dbv4file);

-                if (SQLiteDBClass.UseV5Databases == false)
+                if (UseV5Databases == false)
                 {
                     using (var conn = new SQLiteConnectionOld())
                     {
@@ -540,8 +540,6 @@
                     }

                     SplitDataBase();
-                    UseV5Databases = true;
-
                 }

                 using (var conn = new SQLiteConnectionUser())


個体値と努力値が逆になっていたのを修正

個体値と努力値が逆になっていたのを修正

--- SD2Blog/Pokemon.cs
+++ SD2Blog/Pokemon.cs
@@ -46,12 +46,12 @@
             Shiny = false;
             Happiness = 0;

-            EVs = new Dictionary<string, int>()
+            IVs = new Dictionary<string, int>()
             {
                 {"HP", 31 }, {"Atk", 31 }, {"Def", 31 },
                 {"SpA", 31 }, {"SpD", 31 }, {"Spe", 31 }
             };
-            IVs = new Dictionary<string, int>()
+            EVs = new Dictionary<string, int>()
             {
                 {"HP", 0 }, {"Atk", 0 }, {"Def", 0 },
                 {"SpA", 0 }, {"SpD", 0 }, {"Spe", 0 }


Fixed whiespace errors

Fixed whiespace errors

--- publish.cake
+++ publish.cake
@@ -78,13 +78,13 @@

 	var buildManifests = DeserializeJson<BuildManifest[]> (manifestJson);

-    var downloadDir = new DirectoryPath ("./output/");
+	var downloadDir = new DirectoryPath ("./output/");
 	EnsureDirectoryExists (downloadDir);

 	foreach (var buildManifest in buildManifests) {
         var uri = new Uri (buildManifest.Url);
         var filename = System.IO.Path.GetFileName(uri.LocalPath);
-		var downloadedFile = downloadDir.CombineWithFilePath (filename);
+	var downloadedFile = downloadDir.CombineWithFilePath (filename);

         if (!downloadedFile.GetExtension().Equals(".nupkg", StringComparison.InvariantCultureIgnoreCase)) {
             Information ("Skipping: {0}", filename);


Create backing field for LoadedText property.

--- Eutherion/Win/LiveTextFile.cs
+++ Eutherion/Win/LiveTextFile.cs
@@ -56,6 +56,7 @@
         private readonly Task pollFileChangesBackgroundTask;

         private SynchronizationContext sc;
+        private Union<Exception, string> loadedText;
         private bool missedUpdates;

         /// <summary>
@@ -160,19 +161,19 @@
         /// <summary>
         /// Gets the loaded file as text in memory, or an exception if it could not be loaded.
         /// </summary>
-        public Union<Exception, string> LoadedText { get; private set; }
+        public Union<Exception, string> LoadedText => loadedText;

         private void Load()
         {
             try
             {
-                LoadedText = File.ReadAllText(AbsoluteFilePath);
+                loadedText = File.ReadAllText(AbsoluteFilePath);
             }
             catch (Exception exception)
             {
                 // 'Expected' exceptions can be traced, but rethrow developer errors.
                 if (!IsExternalCauseFileException(exception)) throw;
-                LoadedText = exception;
+                loadedText = exception;
             }
         }


Let the empty ctor properly initialize tree.

--- FdtSharp/FlattenDeviceTree.cs
+++ FdtSharp/FlattenDeviceTree.cs
@@ -8,7 +8,9 @@
 		public FlattenDeviceTree()
 		{
 			ReservationBlocks = new List<ReservationBlock>();
-
+			Version = 17;
+			LastCompatibleVersion = 16;
+			Root = new TreeNode();
 		}

 		public FlattenDeviceTree(byte[] treeData) : this()


Added XML documentation to CompositeReflectionElement class.

--- Src/Albedo/CompositeReflectionElement.cs
+++ Src/Albedo/CompositeReflectionElement.cs
@@ -5,20 +5,48 @@

 namespace Ploeh.Albedo
 {
+    /// <summary>
+    /// An implementation of a polymorphic <see cref="IReflectionElement"/>
+    /// that composes other <see cref="IReflectionElement"/> instances which
+    /// can be visited by an <see cref="IReflectionVisitor{T}"/> instance.
+    /// </summary>
     public class CompositeReflectionElement : IReflectionElement, IEnumerable<IReflectionElement>
     {
         private readonly IEnumerable<IReflectionElement> elements;

+        /// <summary>
+        /// Initializes a new instance of the
+        /// <see cref="CompositeReflectionElement"/> class.
+        /// </summary>
+        /// <param name="elements">
+        /// The <see cref="IReflectionElement"/> instances to compose.</param>
         public CompositeReflectionElement(params IReflectionElement[] elements)
         {
             this.elements = elements;
         }

+        /// <summary>
+        /// Accepts the <see cref="IReflectionVisitor{T}"/> visitor.
+        /// </summary>
+        /// <typeparam name="T">
+        /// The type of observation(s) of the vistor.
+        /// </typeparam>
+        /// <param name="visitor">The visitor to accept.</param>
+        /// <returns></returns>
         public IReflectionVisitor<T> Accept<T>(IReflectionVisitor<T> visitor)
         {
             return this.elements.Aggregate(visitor, (v, e) => e.Accept(v));
         }

+        /// <summary>
+        /// Returns an enumerator that iterates through the supplied
+        /// <see cref="IReflectionElement"/> instances.
+        /// </summary>
+        /// <returns>
+        /// A <see cref="IEnumerator{IReflectionElement}" /> that can be used to
+        /// iterate through the supplied <see cref="IReflectionElement"/>
+        /// instances.
+        /// </returns>
         public IEnumerator<IReflectionElement> GetEnumerator()
         {
             return this.elements.GetEnumerator();


remove not needed logging

remove not needed logging

--- Elephanet/JsonbQueryProvider.cs
+++ Elephanet/JsonbQueryProvider.cs
@@ -78,7 +78,6 @@

         IQueryable IQueryProvider.CreateQuery(Expression expression)
         {
-            Console.WriteLine("Calling Create Query");
             Type elementType = TypeSystem.GetElementType(expression.Type);
             try
             {


avoid null reference exception.

avoid null reference exception.

Fixes #116.

--- GitTfs/Commands/QuickFetch.cs
+++ GitTfs/Commands/QuickFetch.cs
@@ -35,11 +35,9 @@
         protected override void DoFetch(IGitTfsRemote remote)
         {
             if (InitialChangeset.HasValue)
-                // Just grab the latest changeset:
+                remote.QuickFetch(InitialChangeset.Value);
+            else
                 remote.QuickFetch();
-            else
-                // Use a specific changeset to start from:
-                remote.QuickFetch(InitialChangeset.Value);
         }
     }
 }


Updated version to 1.7.2

Updated version to 1.7.2

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


Fixed bug with row/cell validation

Fixed bug with row/cell validation

--- T3000/Controls/Improved/TDataGridView.cs
+++ T3000/Controls/Improved/TDataGridView.cs
@@ -97,28 +97,24 @@

         public bool ValidateRow(DataGridViewRow row)
         {
+            var isValidated = true;
             foreach (DataGridViewCell cell in row.Cells)
             {
-                if (!InvokeValidationHandle(cell))
-                {
-                    return false;
-                }
+                isValidated &= InvokeValidationHandle(cell);
             }

-            return true;
+            return isValidated;
         }

         public bool Validate()
         {
+            var isValidated = true;
             foreach (DataGridViewRow row in Rows)
             {
-                if (!ValidateRow(row))
-                {
-                    return false;
-                }
+                isValidated &= ValidateRow(row);
             }

-            return true;
+            return isValidated;
         }

         #endregion


Fix parsing operator >, >=

Fix parsing operator >, >=

--- TSQL_Parser/TSQL_Parser/TSQLTokenizer.cs
+++ TSQL_Parser/TSQL_Parser/TSQLTokenizer.cs
@@ -806,6 +806,7 @@
 									case '=':
 									case '/':
 									case '<':
+									case '>':
 									case '!':
 									case '%':
 									case '^':


more error

more error

--- Selfnet/HttpGateway.cs
+++ Selfnet/HttpGateway.cs
@@ -58,7 +58,7 @@
             {
                 return;
             }
-            if (resp.StatusCode == HttpStatusCode.BadRequest)
+            if (resp.StatusCode == HttpStatusCode.BadRequest || resp.StatusCode == HttpStatusCode.InternalServerError)
             {
                 var msg = await resp.Content.ReadAsStringAsync();
                 throw new SelfossException(msg, null);


Resolve #12: Set taskbar text when a timer is running

--- Hourglass/TimerWindow.xaml.cs
+++ Hourglass/TimerWindow.xaml.cs
@@ -690,6 +690,10 @@
             switch (this.Mode)
             {
                 case TimerWindowMode.Input:
+                    this.Title = this.Timer.State != TimerState.Stopped && this.Timer.State != TimerState.Expired && this.WindowState == WindowState.Minimized
+                        ? this.Timer.TimeLeftAsString
+                        : "Hourglass";
+
                     this.ProgressBar.Value = this.Timer.TimeLeftAsPercentage ?? 0.0;
                     this.UpdateTaskbarProgress();

@@ -705,6 +709,10 @@
                     return;

                 case TimerWindowMode.Status:
+                    this.Title = this.WindowState == WindowState.Minimized
+                        ? this.Timer.TimeLeftAsString
+                        : "Hourglass";
+
                     this.TimerTextBox.Text = this.Timer.TimeLeftAsString;
                     this.ProgressBar.Value = this.Timer.TimeLeftAsPercentage ?? 0.0;
                     this.UpdateTaskbarProgress();
@@ -1027,6 +1035,8 @@
             {
                 this.restoreWindowState = this.WindowState;
             }
+
+            this.UpdateBoundControls();
         }

         /// <summary>


Add a database reflection test

Add a database reflection test

--- Test/TestsDatabase/OrderDatabaseTests.cs
+++ Test/TestsDatabase/OrderDatabaseTests.cs
@@ -1,7 +1,9 @@
-using Microsoft.EntityFrameworkCore;
+using System.Collections.Generic;
+using Microsoft.EntityFrameworkCore;
 using Shouldly;
 using System.Linq;
 using System.Threading.Tasks;
+using Anlab.Core.Domain;
 using Test.Helpers;
 using Xunit;

@@ -116,6 +118,51 @@

         }

+        #region Reflection of Database.

+        /// <summary>
+        /// Tests all fields in the database have been tested.
+        /// If this fails and no other tests, it means that a field has been added which has not been tested above.
+        /// </summary>
+        [Fact]
+        public void TestAllFieldsInTheDatabaseHaveBeenTested()
+        {
+            #region Arrange
+            var expectedFields = new List<NameAndType>();
+            expectedFields.Add(new NameAndType("AdditionalEmails", "System.String", new List<string>()));
+            expectedFields.Add(new NameAndType("ClientId", "System.String", new List<string>
+            {
+                "[System.ComponentModel.DataAnnotations.StringLengthAttribute((Int32)16)]"
+            }));
+            expectedFields.Add(new NameAndType("Created", "System.DateTime", new List<string>()));
+            expectedFields.Add(new NameAndType("Creator", "Anlab.Core.Domain.User", new List<string>
+            {
+                "[System.ComponentModel.DataAnnotations.Schema.ForeignKeyAttribute(\"CreatorId\")]"
+            }));
+            expectedFields.Add(new NameAndType("CreatorId", "System.String", new List<string>
+            {
+                "[System.ComponentModel.DataAnnotations.RequiredAttribute()]"
+            }));
+            expectedFields.Add(new NameAndType("Id", "System.Int32", new List<string>()));
+            expectedFields.Add(new NameAndType("JsonDetails", "System.String", new List<string>()));
+            expectedFields.Add(new NameAndType("LabId", "System.String", new List<string>
+            {
+                "[System.ComponentModel.DataAnnotations.StringLengthAttribute((Int32)16)]"
+            }));
+            expectedFields.Add(new NameAndType("Project", "System.String", new List<string>
+            {
+                "[System.ComponentModel.DataAnnotations.RequiredAttribute()]",
+                "[System.ComponentModel.DataAnnotations.StringLengthAttribute((Int32)256)]"
+            }));
+            expectedFields.Add(new NameAndType("Status", "System.String", new List<string>()));
+            expectedFields.Add(new NameAndType("Updated", "System.DateTime", new List<string>()));
+
+            #endregion Arrange
+
+            AttributeAndFieldValidation.ValidateFieldsAndAttributes(expectedFields, typeof(Order));
+
+        }
+
+        #endregion Reflection of Database.
     }
 }


Fix a test issue which is to test symlink limitation handling.

--- test/DMLibTest/Cases/FollowSymlinkTest.cs
+++ test/DMLibTest/Cases/FollowSymlinkTest.cs
@@ -305,7 +305,7 @@
 #endif
         }

-        /// n >= 40
+        /// n > 40
         /// Symlink_(n-1) -> Folder_n
         ///           -  File_(n-2)
         ///           -  Symlink_(n-2) -> Folder_(n-1)... ... Symlink_0 -> Folder_1
@@ -322,7 +322,7 @@
             }
             DMLibDataInfo sourceDataInfo = new DMLibDataInfo("rootfolder");

-            int level = random.Next(40, 60);
+            int level = random.Next(41, 60);

             Test.Info($"Testing {level} levels of symlinked dirs");


Handle null when repeat+track delete is on and playlist empties

--- Sounds/MainForm.cs
+++ Sounds/MainForm.cs
@@ -648,7 +648,7 @@
             }
             else if (playing && repeat)
             {
-                activeFile = (TagLib.File)listView1.Items.Cast<ListViewItem>().FirstOrDefault().Tag;
+                activeFile = (TagLib.File)listView1.Items.Cast<ListViewItem>().FirstOrDefault()?.Tag;
                 if (activeFile != null)
                 {
                     PlayActive();


Use images in same folder as a fallback

Use images in same folder as a fallback

--- Sounds/MainForm.cs
+++ Sounds/MainForm.cs
@@ -343,6 +343,24 @@
                 else
                 {
                     // reasonable fallback
+                    if (activeFile != null)
+                    {
+                        var containing = Path.GetDirectoryName(activeFile.Name);
+                        // TODO, add more of these, and make them more scalable
+                        // also figure out how to integrate this into the properties dialog
+                        if (File.Exists(Path.Combine(containing, "cover.jpg")))
+                        {
+                            return new Bitmap(Path.Combine(containing, "cover.jpg"));
+                        }
+                        else if (File.Exists(Path.Combine(containing, "front.jpg")))
+                        {
+                            return new Bitmap(Path.Combine(containing, "front.jpg"));
+                        }
+                        else if (File.Exists(Path.Combine(containing, "folder.jpg")))
+                        {
+                            return new Bitmap(Path.Combine(containing, "folder.jpg"));
+                        }
+                    }
                     return new Bitmap(100, 100);
                 }
             }


Taking out the YouTube video downloading/converting part and just leaving it to return the view.

--- TubeToTune/Controllers/HomeController.cs
+++ TubeToTune/Controllers/HomeController.cs
@@ -11,25 +11,25 @@
     {
 	    public ActionResult Index()
 	    {
-			IEnumerable<VideoInfo> videoInfos = DownloadUrlResolver.GetDownloadUrls("https://www.youtube.com/watch?v=9hEWf_YlE30");
+			//IEnumerable<VideoInfo> videoInfos = DownloadUrlResolver.GetDownloadUrls("https://www.youtube.com/watch?v=9hEWf_YlE30");

-			VideoInfo video = videoInfos
-				.Where(info => info.CanExtractAudio)
-				.OrderByDescending(info => info.AudioBitrate)
-				.First();
+			//VideoInfo video = videoInfos
+			//	.Where(info => info.CanExtractAudio)
+			//	.OrderByDescending(info => info.AudioBitrate)
+			//	.First();

-			if (video.RequiresDecryption)
-			{
-				DownloadUrlResolver.DecryptDownloadUrl(video);
-			}
+			//if (video.RequiresDecryption)
+			//{
+			//	DownloadUrlResolver.DecryptDownloadUrl(video);
+			//}

-			var audioDownloader = new AudioDownloader(video, Path.Combine("C:/", video.Title + video.AudioExtension));
+			//var audioDownloader = new AudioDownloader(video, Path.Combine("C:/", video.Title + video.AudioExtension));

-			audioDownloader.DownloadProgressChanged += (sender, args) => Console.WriteLine(args.ProgressPercentage * 0.85);
-			audioDownloader.AudioExtractionProgressChanged += (sender, args) => Console.WriteLine(85 + args.ProgressPercentage * 0.15);
+			//audioDownloader.DownloadProgressChanged += (sender, args) => Console.WriteLine(args.ProgressPercentage * 0.85);
+			//audioDownloader.AudioExtractionProgressChanged += (sender, args) => Console.WriteLine(85 + args.ProgressPercentage * 0.15);

-			audioDownloader.Execute();
+			//audioDownloader.Execute();

 		    return View();
 	    }


added point multiply extension

added point multiply extension

--- Source/PointExt.cs
+++ Source/PointExt.cs
@@ -46,5 +46,10 @@
 		{
 			return pt.X.ToString() + " " + pt.Y.ToString();
 		}
+
+		public static Point Multiply(this Point pt, int mult)
+		{
+			return new Point(pt.X * mult, pt.Y * mult);
+		}
 	}
 }


Refine

Refine

--- UnitTest/UnexpectedTokenExceptionTest.cs
+++ UnitTest/UnexpectedTokenExceptionTest.cs
@@ -12,7 +12,7 @@
         public void TestConstructor()
         {
             var e = new UnexpectedTokenException(1, 10, TokenType.EOF, TokenType.Comma, TokenType.RightBrace);
-            Assert.AreEqual(1, e.LineNo);
+            Assert.AreEqual(1,  e.LineNo);
             Assert.AreEqual(10, e.ColNo);
             Assert.AreEqual("Line 1, Col 10. Unexpected token: EOF. Expected: Comma, RightBrace", e.Message);
         }


test number 2

test number 2

--- Unity/PowYingChub/Assets/SocketClient.cs
+++ Unity/PowYingChub/Assets/SocketClient.cs
@@ -14,6 +14,7 @@
 	public GameObject hero;
 	private float xPos = 10.0f;
 	private int test;
+	public int test2;
 	Thread receiveThread;
 	UdpClient client;
 	public int port;


somes bugs fixe

somes bugs fixe

--- WPFHexaEditor.Control/HexaEditor.xaml.cs
+++ WPFHexaEditor.Control/HexaEditor.xaml.cs
@@ -1350,6 +1350,10 @@
                         }

                         stackIndex++;
+
+                        //Prevent index out off range exception when resize at EOF
+                        if (stackIndex == HexDataStackPanel.Children.Count && VerticalScrollBar.Value == VerticalScrollBar.Maximum)
+                            stackIndex--;
                     }
                 }
         }
@@ -1666,7 +1670,7 @@
                 if (VerticalScrollBar.Value < VerticalScrollBar.Maximum)
                     VerticalScrollBar.Value++;

-                SetFocusHexDataPanel(bytePositionInFile);
+                SetPosition(bytePositionInFile);
             }
         }

@@ -1695,7 +1699,7 @@
                 if (VerticalScrollBar.Value < VerticalScrollBar.Maximum)
                     VerticalScrollBar.Value++;

-                SetFocusStringDataPanel(bytePositionInFile);
+                SetPosition(bytePositionInFile);
             }
         }
         #endregion Focus Methods


Fixed NullPointer bug

Fixed NullPointer bug

--- TaskManagerNote.cs
+++ TaskManagerNote.cs
@@ -51,6 +51,10 @@

 				Buffer.UserActionEnded += CheckIfNewTaskNeeded;
 				Buffer.InsertText += BufferInsertText;
+
+				//Initialise subtasks
+				//TODO: get from previous sessions?
+				TaskLists = new List<AttributedTask>();

 				initialized = true;
 			}


Added support for different plugin folder names to TeamSpeakPlugin in BSU.Sync as well.

--- TeamSpeakPlugin.cs
+++ TeamSpeakPlugin.cs
@@ -53,13 +53,20 @@
             {
                 DirectoryInfo modPath = new DirectoryInfo(Path.Combine(LocalPath.ToString(), m.ModName.ToString()));
                 DirectoryInfo[] folders = modPath.GetDirectories();
-                if (folders.Any(x => x.FullName.Equals(Path.Combine(modPath.FullName, "plugins"))))
+                List<string> pluginFolders = new List<string>();
+                pluginFolders.Add("plugins");
+                pluginFolders.Add("plugin");
+                // ^ Support for both TFAR and ACRE
+                foreach (string folder in pluginFolders)
                 {
-                    DirectoryInfo modPluginFolder = new DirectoryInfo(Path.Combine(modPath.FullName, "plugins"));
-                    DirectoryInfo tsPluginFolder = new DirectoryInfo(Path.Combine(TeamSpeakPlugin.TeamSpeakPath(), "plugins"));
+                    if (folders.Any(x => x.FullName.Equals(Path.Combine(modPath.FullName, folder))))
+                    {
+                        DirectoryInfo modPluginFolder = new DirectoryInfo(Path.Combine(modPath.FullName, folder));
+                        DirectoryInfo tsPluginFolder = new DirectoryInfo(Path.Combine(TeamSpeakPlugin.TeamSpeakPath(), folder));

-                    logger.Trace("Plugins exists inside of {0}", modPath);
-                    returnList.Add(m);
+                        logger.Trace("Plugins exists inside of {0}", modPath);
+                        returnList.Add(m);
+                    }
                 }
             }


 * Fixed a bug with joining in CurrentUser

git-svn-id: e2945e6dc2723cb01f425b5a7c3c201ce5019a89@385 080cfd25-d5d9-4c59-82ea-70d02a200d8b

--- Gablarski/Client/CurrentUser.cs
+++ Gablarski/Client/CurrentUser.cs
@@ -165,6 +165,7 @@
 			var msg = (JoinResultMessage)e.Message;
 			if (msg.Result == LoginResultState.Success)
 			{
+				this.Username = msg.UserInfo.Username;
 				this.Nickname = msg.UserInfo.Nickname;
 				this.CurrentChannelId = msg.UserInfo.CurrentChannelId;
 			}


typo fixed

typo fixed

--- Grevit.Revit/CreateExtension.cs
+++ Grevit.Revit/CreateExtension.cs
@@ -1224,7 +1224,7 @@
             foreach (Curve c in curves) outlineCurveArray.Append(c);

             var bottom = Utilities.GetLevelByName(GrevitBuildModel.document, shaft.levelbottom,0);
-            var top = Utilities.GetLevelByName(GrevitBuildModel.document, shaft.levelbottom,1000);
+            var top = Utilities.GetLevelByName(GrevitBuildModel.document, shaft.leveltop,1000);

             var opening = GrevitBuildModel.document.Create.NewOpening(bottom, top, outlineCurveArray);
             return opening;


Updated version to 0.4.1.0

Updated version to 0.4.1.0

--- XmlUnit.xUnit/Properties/AssemblyInfo.cs
+++ XmlUnit.xUnit/Properties/AssemblyInfo.cs
@@ -1,33 +1,33 @@
-using System.Reflection;
-using System.Runtime.CompilerServices;
-
-// Information about this assembly is defined by the following
-// attributes.
-//
-// change them to the information which is associated with the assembly
-// you compile.
-
-[assembly: AssemblyTitle("XmlUnit.Xunit")]
-[assembly: AssemblyDescription("Xunit extension for Xml testing")]
-[assembly: AssemblyConfiguration("")]
-[assembly: AssemblyCompany("Christian Horsdal")]
-[assembly: AssemblyProduct("")]
-[assembly: AssemblyCopyright("https://github.com/horsdal/XmlUnit.Xunit")]
-[assembly: AssemblyTrademark("")]
-[assembly: AssemblyCulture("")]
-
-// The assembly version has following format :
-//
-// Major.Minor.Build.Revision
-//
-// You can specify all values by your own or you can build default build and revision
-// numbers with the '*' character (the default):
-
-[assembly: AssemblyVersion("0.4.0.0")]
-
-// The following attributes specify the key for the sign of your assembly. See the
-// .NET Framework documentation for more information about signing.
-// This is not required, if you don't want signing let these attributes like they're.
-
-[assembly: AssemblyDelaySign(false)]
+using System.Reflection;
+using System.Runtime.CompilerServices;
+
+// Information about this assembly is defined by the following
+// attributes.
+//
+// change them to the information which is associated with the assembly
+// you compile.
+
+[assembly: AssemblyTitle("XmlUnit.Xunit")]
+[assembly: AssemblyDescription("Xunit extension for Xml testing")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("Christian Horsdal")]
+[assembly: AssemblyProduct("")]
+[assembly: AssemblyCopyright("https://github.com/horsdal/XmlUnit.Xunit")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
+// The assembly version has following format :
+//
+// Major.Minor.Build.Revision
+//
+// You can specify all values by your own or you can build default build and revision
+// numbers with the '*' character (the default):
+
+[assembly: AssemblyVersion("0.4.1.0")]
+
+// The following attributes specify the key for the sign of your assembly. See the
+// .NET Framework documentation for more information about signing.
+// This is not required, if you don't want signing let these attributes like they're.
+
+[assembly: AssemblyDelaySign(false)]
 [assembly: AssemblyKeyFile("")]


Compress rule.

Compress rule.

--- YaccConstructor/CYKCoreOpenCL/Program.cs
+++ YaccConstructor/CYKCoreOpenCL/Program.cs
@@ -32,7 +32,7 @@

     class Program
     {
-        static int32 ruleRepresentationLength = 3;
+        static int32 ruleRepresentationLength = 2;
         static int32 cellDataRepresentationLength = 1;
         static void Main(string[] args)
         {
@@ -95,7 +95,7 @@
             var commandQueue = new CommandQueue(provider, provider.Devices.First());

             var bArr = new int32[size * size * nTerms * cellDataRepresentationLength];
-            var rulesArr = new int32[nTermRules.Length * ruleRepresentationLength];
+            var rulesArr = new uint32[nTermRules.Length * ruleRepresentationLength];

             for (int i = 0; i < size; i++)
             {
@@ -116,19 +116,18 @@
             for (int i = 0; i < nTermRules.Length; i++)
             {
                 var _base =  i * ruleRepresentationLength;
-                rulesArr[_base] = nTermRules[i].a;
-                rulesArr[_base + 1] = nTermRules[i].b;
-                rulesArr[_base + 2] = nTermRules[i].c;
+                rulesArr[_base] = (uint32)(uint)(nTermRules[i].a << 16 | nTermRules[i].b);
+                rulesArr[_base + 1] = (uint32)(uint)nTermRules[i].c;
                 //rulesArr[_base + 3] = rules[i].lblNum;
                 //rulesArr[_base + 4] = rules[i].lblWeight;
             }

             var buffer = new Buffer<int32>(provider, Operations.ReadWrite, Memory.Device, bArr);
-            var rulesBuffer = new Buffer<int32>(provider, Operations.ReadOnly, Memory.Device, rulesArr);
+            var rulesBuffer = new Buffer<uint32>(provider, Operations.ReadOnly, Memory.Device, rulesArr);

             int32 rLength = nTermRules.Length;

-            var processRow = provider.Compile<_1D, int32, Buffer<int32>, Buffer<int32>>(
+            var processRow = provider.Compile<_1D, int32, Buffer<int32>, Buffer<uint32>>(
                 (range, l, a, _rules) =>
                     from r in range
                     let i = r.GlobalID0
@@ -142,10 +141,11 @@
                         let iter2 = provider.Loop(0, rLength, rIdxs =>
                             from rId in rIdxs
                             let rule_base = rId * ruleRepresentationLength
-                            let rule_a = _rules[rule_base]
-                            let rule_b = _rules[rule_base + 1]
-                            let rule_c = _rules[rule_base + 2]
-                            let res_id = res_id_base + (rule_a - 1)
+                            let rule_a_b = _rules[rule_base]
+                            let rule_a = (int)((rule_a_b >> 16) & 0xFFFF)
+                            let rule_b = (int)(rule_a_b & 0xFFFF)
+                            let rule_c = (int)(_rules[rule_base + 1] | 0)
+                            let res_id = res_id_base + ((int)(uint)rule_a - 1)
                             select new[]{(rule_c != 0
                                           & rule_c == a[right_base_idx + (rule_c - 1)]
                                           & rule_b == a[left_base_idx + (rule_b - 1)])


Partial support for multiple image sizes

--- SpotifyClient/Track.cs
+++ SpotifyClient/Track.cs
@@ -222,9 +222,11 @@
             }
         }

-        private string GetAlbumArtLink()
-        {
-            var image = Spotify.GetAlbumArtLink(_albumPtr, sp_image_size.SP_IMAGE_SIZE_SMALL);
+        private string GetAlbumArtLink(sp_image_size artSize = sp_image_size.SP_IMAGE_SIZE_SMALL)
+        {
+            var image = Spotify.GetAlbumArtLink(_albumPtr, artSize);
+            if (image == null)
+                image = Spotify.GetAlbumArtLink(_albumPtr, sp_image_size.SP_IMAGE_SIZE_SMALL);
             if (image == null)
                 image = Spotify.GetAlbumArtLink(_albumPtr, sp_image_size.SP_IMAGE_SIZE_NORMAL);
             if (image == null)


Added * and / operators to Volume.cs.

Added * and / operators to Volume.cs.

--- Src/UnitsNet/Volume.cs
+++ Src/UnitsNet/Volume.cs
@@ -180,14 +180,34 @@
             return FromCubicMeters(-right.CubicMeters);
         }

+        public static Volume operator +(Volume left, Volume right)
+        {
+            return FromCubicMeters(left.CubicMeters + right.CubicMeters);
+        }
+
         public static Volume operator -(Volume left, Volume right)
         {
             return FromCubicMeters(left.CubicMeters - right.CubicMeters);
         }

-        public static Volume operator +(Volume left, Volume right)
-        {
-            return FromCubicMeters(left.CubicMeters + right.CubicMeters);
+        public static Volume operator *(double left, Volume right)
+        {
+            return FromCubicMeters(left*right.CubicMeters);
+        }
+
+        public static Volume operator *(Volume left, double right)
+        {
+            return FromCubicMeters(left.CubicMeters*right);
+        }
+
+        public static Volume operator /(Volume left, double right)
+        {
+            return FromCubicMeters(left.CubicMeters/right);
+        }
+
+        public static double operator /(Volume left, Volume right)
+        {
+            return left.CubicMeters/right.CubicMeters;
         }

         #endregion


Fix compilation with newer compiler

Fix compilation with newer compiler

--- StreamingAudio/Main.cs
+++ StreamingAudio/Main.cs
@@ -160,8 +160,9 @@
 							var queue = player.OutputQueue;
 							if (queue == null || timeline == null)
 								return;
-							bool disc;
-							AudioTimeStamp time;
+
+							bool disc = false;
+							AudioTimeStamp time = new AudioTimeStamp ();
 							queue.GetCurrentTime (timeline, ref time, ref disc);

 							playbackTime.Text = FormatTime (time.SampleTime / sampleRate);


Fixed double click bug

Fixed double click bug

--- src/CommandWindow.cs
+++ src/CommandWindow.cs
@@ -71,9 +71,11 @@
         }

         private void listCmds_DoubleClick(object sender, EventArgs e) {
-            log4.Debug("listCmds_DoubleClick");
-            textBoxSendCommand.Text = listCmds.SelectedItems[0].Text;
-            Send();
+            if (listCmds.SelectedItems.Count > 0) {
+                log4.Debug("listCmds_DoubleClick");
+                textBoxSendCommand.Text = listCmds.SelectedItems[0].Text;
+                Send();
+            }
         }

         private void CommandWindow_VisibleChanged(object sender, EventArgs e) {


Bump nuget version

Bump nuget version

--- SvgNet/AssemblyInfo.cs
+++ SvgNet/AssemblyInfo.cs
@@ -20,8 +20,8 @@
 [assembly: AssemblyCulture("")]

 [assembly: AssemblyVersion("1.0.0")]
-[assembly: AssemblyFileVersion("1.0.3")]
-[assembly: AssemblyInformationalVersion("1.0.3")]
+[assembly: AssemblyFileVersion("1.0.4")]
+[assembly: AssemblyInformationalVersion("1.0.4")]

 [assembly: AssemblyDelaySign(false)]
 [assembly: AssemblyKeyFile("")]


Some refactorings

Some refactorings

--- Illias/Time/StartEndDateTime.cs
+++ Illias/Time/StartEndDateTime.cs
@@ -32,58 +32,24 @@

         #region Properties

-        #region StartTime
-
-        private readonly DateTime _StartTime;
-
         /// <summary>
         /// The start time.
         /// </summary>
-        public DateTime StartTime
-        {
-            get
-            {
-                return _StartTime;
-            }
-        }
-
-        #endregion
-
-        #region EndTime
-
-        private readonly DateTime? _EndTime;
+        public DateTime   StartTime   { get; }

         /// <summary>
         /// The end time.
         /// </summary>
-        public DateTime? EndTime
-        {
-            get
-            {
-                return _EndTime;
-            }
-        }
-
-        #endregion
-
-        #region Duration
+        public DateTime?  EndTime     { get; }

         /// <summary>
         /// The duration.
         /// </summary>
         public TimeSpan? Duration
-        {
-            get
-            {

-                return _EndTime.HasValue
-                           ? _EndTime.Value - _StartTime
-                           : new TimeSpan?();
-
-            }
-        }
-
-        #endregion
+            => EndTime.HasValue
+                   ? EndTime.Value - StartTime
+                   : new TimeSpan?();

         #endregion

@@ -105,8 +71,8 @@

             #endregion

-            _StartTime  = StartTime;
-            _EndTime    = EndTime;
+            this.StartTime  = StartTime;
+            this.EndTime    = EndTime;

         }

@@ -120,12 +86,8 @@
         /// is set to the current date and time.
         /// </summary>
         public static StartEndDateTime Now
-        {
-            get
-            {
-                return new StartEndDateTime(DateTime.Now);
-            }
-        }
+
+            => new StartEndDateTime(DateTime.Now);

         #endregion

@@ -139,7 +101,7 @@
         {
             unchecked
             {
-                return _StartTime.GetHashCode() * 17 ^ _EndTime.GetHashCode();
+                return StartTime.GetHashCode() * 17 ^ EndTime.GetHashCode();
             }
         }

@@ -151,9 +113,8 @@
         /// Get a string representation of this object.
         /// </summary>
         public override String ToString()
-        {
-            return String.Concat(_StartTime.ToString(), " -> ", _EndTime.ToString());
-        }
+
+            => String.Concat(StartTime.ToIso8601(), " -> ", EndTime.HasValue ? EndTime.Value.ToIso8601() : "...");

         #endregion


Expose connection timeouts

Expose connection timeouts

--- Syndll2/SynelClient.cs
+++ Syndll2/SynelClient.cs
@@ -56,9 +56,10 @@
         /// <param name="host">The terminal's IP address or DNS name.</param>
         /// <param name="port">The TCP port to use to connect to the terminal.  Defaults to 3734 if not provided.</param>
         /// <param name="terminalId">The terminal's Terminal ID.  Defaults to 0 if not provided.</param>
-        public static SynelClient Connect(string host, int port = 3734, int terminalId = 0)
-        {
-            var connection = NetworkConnection.Connect(host, port);
+        /// <param name="timeout">The amount of time before the connection will timeout. Defaults to 2 seconds.</param>
+        public static SynelClient Connect(string host, int port = 3734, int terminalId = 0, TimeSpan timeout = default(TimeSpan))
+        {
+            var connection = NetworkConnection.Connect(host, port, timeout);
             return new SynelClient(connection, terminalId);
         }

@@ -69,9 +70,10 @@
         /// <param name="host">The terminal's IP address or DNS name.</param>
         /// <param name="port">The TCP port to use to connect to the terminal.  Defaults to 3734 if not provided.</param>
         /// <param name="terminalId">The terminal's Terminal ID.  Defaults to 0 if not provided.</param>
-        public static async Task<SynelClient> ConnectAsync(string host, int port = 3734, int terminalId = 0)
-        {
-            var connection = await NetworkConnection.ConnectAsync(host, port);
+        /// <param name="timeout">The amount of time before the connection will timeout. Defaults to 2 seconds.</param>
+        public static async Task<SynelClient> ConnectAsync(string host, int port = 3734, int terminalId = 0, TimeSpan timeout = default(TimeSpan))
+        {
+            var connection = await NetworkConnection.ConnectAsync(host, port, timeout);
             return new SynelClient(connection, terminalId);
         }
 #endif


wait before starting update

wait before starting update

--- TCC.Updater/Program.cs
+++ TCC.Updater/Program.cs
@@ -1,6 +1,7 @@
 using System;
 using System.Diagnostics;
 using System.IO;
+using System.Threading;

 namespace TCC.Updater
 {
@@ -11,6 +12,7 @@

         static void Main(string[] args)
         {
+            Thread.Sleep(2000);
             //Create all of the directories
             foreach (string dirPath in Directory.GetDirectories(SourcePath, "*", SearchOption.AllDirectories))
             {


Test: UUIDTests updated

Test: UUIDTests updated

--- Tests/UUIDTests.cs
+++ Tests/UUIDTests.cs
@@ -26,6 +26,7 @@
 using System.Threading;
 using System.Diagnostics;
 using NUnit.Framework;
+using DarkCaster.UUID;

 namespace Tests
 {
@@ -107,5 +108,14 @@
 			}
 			Assert.AreEqual(m - 1, counter);
 		}
+
+		[Test]
+		public void TimestampHelper_Get()
+		{
+			var startTimestamp = new DateTime(1582, 10, 15, 00, 00, 00, DateTimeKind.Utc).Ticks;
+			var test1 = TimestampHelper.GetScrambledTimestamp();
+			var test2 = unchecked((long)((ulong)(DateTime.UtcNow.Ticks-startTimestamp) & 0xFFFFFFFFFFF00000UL));
+			Assert.AreEqual(test1, test2);
+		}
 	}
 }


Added SetMaxLength methods

Added SetMaxLength methods

--- Test2d/Shapes/XLine.cs
+++ Test2d/Shapes/XLine.cs
@@ -145,5 +145,181 @@
         {
             return Create(x, y, x, y, style, point, name);
         }
+
+        /// <summary>
+        ///
+        /// </summary>
+        /// <param name="line"></param>
+        /// <param name="x1"></param>
+        /// <param name="y1"></param>
+        /// <param name="x2"></param>
+        /// <param name="y2"></param>
+        public static void SetMaxLength(
+            XLine line,
+            ref double x1, ref double y1,
+            ref double x2, ref double y2)
+        {
+            var ls = line.Style.LineStyle;
+
+            if (ls.MaxLengthFlags == MaxLengthFlags.Disabled)
+                return;
+
+            if (ls.MaxLengthFlags.HasFlag(MaxLengthFlags.All))
+            {
+                SetMaxLengthAll(line, ref x1, ref y1, ref x2, ref y2);
+            }
+            else
+            {
+                if (ls.MaxLengthFlags.HasFlag(MaxLengthFlags.Vertical))
+                {
+                    bool isVertical = Math.Round(x1, 1) == Math.Round(x2, 1);
+                    if (isVertical)
+                    {
+                        SetMaxLengthVertical(line, ref y1, ref y2);
+                    }
+                }
+
+                if (ls.MaxLengthFlags.HasFlag(MaxLengthFlags.Horizontal))
+                {
+                    bool isHorizontal = Math.Round(y1, 1) == Math.Round(y2, 1);
+                    if (isHorizontal)
+                    {
+                        SetMaxLengthHorizontal(line, ref x1, ref x2);
+                    }
+                }
+            }
+        }
+
+        /// <summary>
+        ///
+        /// </summary>
+        /// <param name="line"></param>
+        /// <param name="x1"></param>
+        /// <param name="y1"></param>
+        /// <param name="x2"></param>
+        /// <param name="y2"></param>
+        public static void SetMaxLengthAll(
+            XLine line,
+            ref double x1, ref double y1,
+            ref double x2, ref double y2)
+        {
+            var ls = line.Style.LineStyle;
+
+            bool shortenStart = ls.MaxLengthStartState != ShapeState.Default
+                && line.Start.State.HasFlag(ls.MaxLengthStartState)
+                && ls.MaxLengthFlags.HasFlag(MaxLengthFlags.Start);
+
+            bool shortenEnd = ls.MaxLengthEndState != ShapeState.Default
+                && line.End.State.HasFlag(ls.MaxLengthEndState)
+                && ls.MaxLengthFlags.HasFlag(MaxLengthFlags.End);
+
+            if (shortenStart && !shortenEnd)
+            {
+                var p1 = Point2.Create(x1, y1);
+                var p2 = Point2.Create(x2, y2);
+                double length = p1.Distance(p2);
+                x1 = p2.X - (p2.X - p1.X) / length * ls.MaxLength;
+                y1 = p2.Y - (p2.Y - p1.Y) / length * ls.MaxLength;
+            }
+
+            if (!shortenStart && shortenEnd)
+            {
+                var p1 = Point2.Create(x2, y2);
+                var p2 = Point2.Create(x1, y1);
+                double length = p1.Distance(p2);
+                x2 = p2.X - (p2.X - p1.X) / length * ls.MaxLength;
+                y2 = p2.Y - (p2.Y - p1.Y) / length * ls.MaxLength;
+            }
+
+            if (shortenStart && shortenEnd)
+            {
+                // TODO:
+            }
+        }
+
+        /// <summary>
+        ///
+        /// </summary>
+        /// <param name="line"></param>
+        /// <param name="x1"></param>
+        /// <param name="x2"></param>
+        public static void SetMaxLengthHorizontal(XLine line, ref double x1, ref double x2)
+        {
+            var ls = line.Style.LineStyle;
+
+            bool shortenStart = ls.MaxLengthStartState != ShapeState.Default
+                && line.Start.State.HasFlag(ls.MaxLengthStartState)
+                && ls.MaxLengthFlags.HasFlag(MaxLengthFlags.Start);
+
+            bool shortenEnd = ls.MaxLengthEndState != ShapeState.Default
+                && line.End.State.HasFlag(ls.MaxLengthEndState)
+                && ls.MaxLengthFlags.HasFlag(MaxLengthFlags.End);
+
+            if (shortenStart && !shortenEnd)
+            {
+                if (x2 > x1)
+                    x1 = x2 - ls.MaxLength;
+                else
+                    x1 = x2 + ls.MaxLength;
+            }
+
+            if (!shortenStart && shortenEnd)
+            {
+                if (x2 > x1)
+                    x2 = x1 + ls.MaxLength;
+                else
+                    x2 = x1 - ls.MaxLength;
+            }
+
+            if (shortenStart && shortenEnd)
+            {
+                // TODO:
+            }
+        }
+
+        /// <summary>
+        ///
+        /// </summary>
+        /// <param name="line"></param>
+        /// <param name="y1"></param>
+        /// <param name="y2"></param>
+        public static void SetMaxLengthVertical(XLine line, ref double y1, ref double y2)
+        {
+            var ls = line.Style.LineStyle;
+
+            bool shortenStart = ls.MaxLengthStartState != ShapeState.Default
+                && line.Start.State.HasFlag(ls.MaxLengthStartState)
+                && ls.MaxLengthFlags.HasFlag(MaxLengthFlags.Start);
+
+            bool shortenEnd = ls.MaxLengthEndState != ShapeState.Default
+                && line.End.State.HasFlag(ls.MaxLengthEndState)
+                && ls.MaxLengthFlags.HasFlag(MaxLengthFlags.End);
+
+            if (shortenStart && !shortenEnd)
+            {
+                if (y2 > y1)
+                    y1 = y2 - ls.MaxLength;
+                else
+                    y1 = y2 + ls.MaxLength;
+            }
+
+            if (!shortenStart && shortenEnd)
+            {
+                if (y2 > y1)
+                    y2 = y1 + ls.MaxLength;
+                else
+                    y2 = y1 - ls.MaxLength;
+            }
+
+            /*
+            if (shortenStart && shortenEnd)
+            {
+                if (y2 > y1)
+                    y2 = y1 + ls.MaxLength;
+                else
+                    y2 = y1 - ls.MaxLength;
+            }
+            */
+        }
     }
 }


Adding ability to set Chrome extensions by using base64 encoded strings.

Previously, you could only install extensions by using a path to a .crx
file. Now you can embed the extension as a base64-encoded string, without
having it persisted to the disk at all.

--- dotnet/src/webdriver/Chrome/ChromeOptions.cs
+++ dotnet/src/webdriver/Chrome/ChromeOptions.cs
@@ -65,6 +65,7 @@
         private string binaryLocation;
         private List<string> arguments = new List<string>();
         private List<string> extensionFiles = new List<string>();
+        private List<string> encodedExtensions = new List<string>();
         private Dictionary<string, object> additionalCapabilities = new Dictionary<string, object>();
         private Proxy proxy;

@@ -105,15 +106,14 @@
         {
             get
             {
-                List<string> encodedExtensions = new List<string>();
                 foreach (string extensionFile in this.extensionFiles)
                 {
                     byte[] extensionByteArray = File.ReadAllBytes(extensionFile);
                     string encodedExtension = Convert.ToBase64String(extensionByteArray);
-                    encodedExtensions.Add(encodedExtension);
+                    this.encodedExtensions.Add(encodedExtension);
                 }

-                return encodedExtensions.AsReadOnly();
+                return this.encodedExtensions.AsReadOnly();
             }
         }

@@ -199,6 +199,61 @@
                 }

                 this.extensionFiles.Add(extension);
+            }
+        }
+
+        /// <summary>
+        /// Adds a base64-encoded string representing a Chrome extension to the list of extensions
+        /// to be installed in the instance of Chrome.
+        /// </summary>
+        /// <param name="extension">A base64-encoded string representing the extension to add.</param>
+        public void AddEncodedExtension(string extension)
+        {
+            if (string.IsNullOrEmpty(extension))
+            {
+                throw new ArgumentException("extension must not be null or empty", "extension");
+            }
+
+            this.AddExtensions(extension);
+        }
+
+        /// <summary>
+        /// Adds a list of base64-encoded strings representing Chrome extensions to the list of extensions
+        /// to be installed in the instance of Chrome.
+        /// </summary>
+        /// <param name="extensions">An array of base64-encoded strings representing the extensions to add.</param>
+        public void AddEncodedExtensions(params string[] extensions)
+        {
+            this.AddEncodedExtensions(new List<string>(extensions));
+        }
+
+        /// <summary>
+        /// Adds a list of base64-encoded strings representing Chrome extensions to be installed
+        /// in the instance of Chrome.
+        /// </summary>
+        /// <param name="extensions">An <see cref="IEnumerable{T}"/> of base64-encoded strings
+        /// representing the extensions to add.</param>
+        public void AddEncodedExtensions(IEnumerable<string> extensions)
+        {
+            if (extensions == null)
+            {
+                throw new ArgumentNullException("extensions", "extensions must not be null");
+            }
+
+            foreach (string extension in extensions)
+            {
+                // Run the extension through the base64 converter to test that the
+                // string is not malformed.
+                try
+                {
+                    Convert.FromBase64String(extension);
+                }
+                catch (FormatException ex)
+                {
+                    throw new WebDriverException("Could not properly decode the base64 string", ex);
+                }
+
+                this.encodedExtensions.Add(extension);
             }
         }

@@ -216,7 +271,7 @@
         /// has already been added will overwrite the existing value with the new value in <paramref name="capabilityValue"/></remarks>
         public void AddAdditionalCapability(string capabilityName, object capabilityValue)
         {
-            if (capabilityName == ChromeOptions.Capability)
+            if (capabilityName == ChromeOptions.Capability || capabilityName == CapabilityType.Proxy)
             {
                 string message = string.Format(CultureInfo.InvariantCulture, "There is already an option for the {0} capability. Please use that instead.", capabilityName);
                 throw new ArgumentException(message, "capabilityName");


Update docs

Update docs

--- APAnimatorComponent/APAnimator.cs
+++ APAnimatorComponent/APAnimator.cs
@@ -49,15 +49,31 @@
         [SerializeField]
         private float animationTime;

+        /// <summary>
+        /// Whether to update animated object positon, rotation and tilting. It's executed independent from animation time,
+        /// so animated object can be updated even if animator is stopped or paused.
+        /// </summary>
         private bool animGOUpdateEnabled;

+        /// <summary>
+        /// It's true when <c>CountdownToStopAnimGOUpdate</c> coroutine is running.
+        /// </summary>
         private bool countdownCoroutineIsRunning;

+        /// <summary>
+        /// It's set to true when <c>EaseTime</c> coroutine is running.
+        /// </summary>
         private bool isPlaying;

+        /// <summary>
+        /// Reference to asset file holding path data.
+        /// </summary>
         [SerializeField]
         private PathData pathData;

+        /// <summary>
+        /// Pause backing field.
+        /// </summary>
         private bool pause;

         /// <summary>
@@ -65,12 +81,21 @@
         /// </summary>
         private float prevAnimationTime;

+        /// <summary>
+        /// Reference to asset file holding animator settings.
+        /// </summary>
         [SerializeField]
         private APAnimatorSettings settingsAsset;

+        /// <summary>
+        /// Reference to GUISkin asset.
+        /// </summary>
         [SerializeField]
         private GUISkin skin;

+        /// <summary>
+        /// Is set to true after successfull subscription to events.
+        /// </summary>
         [SerializeField]
         private bool subscribedToEvents;

@@ -639,6 +664,7 @@
             }
         }

+        // TODO Rename to EaseTime().
         private IEnumerator HandleEaseTime() {
             IsPlaying = true;
             Pause = false;


added mutations to spreadsheet export.

added mutations to spreadsheet export.

--- ARKBreedingStats/Form1.library.cs
+++ ARKBreedingStats/Form1.library.cs
@@ -1150,7 +1150,7 @@
                             output += Utils.statName(Values.statsDisplayOrder[s], true) + suffix + "\t";
                         }
                     }
-                    output += "mother\tfather\tNotes\tColor0\tColor1\tColor2\tColor3\tColor4\tColor5";
+                    output += "mother\tfather\tMut\tNotes\tColor0\tColor1\tColor2\tColor3\tColor4\tColor5";

                     foreach (ListViewItem l in listViewLibrary.SelectedItems)
                     {
@@ -1172,7 +1172,7 @@
                         {
                             output += $"\t{c.valuesDom[Values.statsDisplayOrder[s]] * (Utils.precision(Values.statsDisplayOrder[s]) == 3 ? 100 : 1)}{(Utils.precision(Values.statsDisplayOrder[s]) == 3 ? "%" : "")}";
                         }
-                        output += $"\t{(c.Mother != null ? c.Mother.name : "")}\t{(c.Father != null ? c.Father.name : "")}\t{(c.note != null ? c.note.Replace("\r", "").Replace("\n", " ") : "")}";
+                        output += $"\t{(c.Mother != null ? c.Mother.name : "")}\t{(c.Father != null ? c.Father.name : "")}\t{c.Mutations}\t{(c.note != null ? c.note.Replace("\r", "").Replace("\n", " ") : "")}";
                         for (int cl = 0; cl < 6; cl++)
                         {
                             output += "\t" + c.colors[cl];


Change implementation of the deadline

Change implementation of the deadline

--- AddOns/FastAVN/FastAVN/Program.cs
+++ AddOns/FastAVN/FastAVN/Program.cs
@@ -130,7 +130,6 @@
                     return;
                 }

-
                 // Get input program
                 Utils.Print(String.Format("----- Run FastAVN on {0} with k={1} ------",
                     args[0], approximationDepth), Utils.PRINT_TAG.AV_OUTPUT);
@@ -311,30 +310,9 @@

             if (deadline > 100)
             {
-                var timeouttask = new System.Threading.Tasks.Task(() =>
-                {
-                    System.Threading.Thread.Sleep((deadline - 100) * 1000);
-                    Console.WriteLine("FastAvn deadline reached; consolidating results");
-
-                    deadlineReached = true;
-                    KillSpawnedProcesses();
-
-                    // Sleep for 2 seconds
-                    System.Threading.Thread.Sleep(2 * 1000);
-
-                    // collate bugs
-                    lock (fslock)
-                    {
-                        if (printingOutput) return;
-                        printingOutput = true;
-                        printBugs(ref mergedBugs, epNames.Count);
-                        mergeBugs(epNames);
-                    }
-
-                    // Kill self
-                    Process.GetCurrentProcess().Kill();
-                });
-                timeouttask.Start();
+                var timer = new System.Timers.Timer((deadline - 100) * 1000);
+                timer.Elapsed += (sender, e) => HandleTimer(epNames);
+                timer.Start();
             }
             else if (deadline != 0)
             {
@@ -364,6 +342,30 @@
                 mergeBugs(epNames);
             }
         }
+
+        public static void HandleTimer(HashSet<string> epNames)
+        {
+            Console.WriteLine("FastAvn deadline reached; consolidating results");
+
+            deadlineReached = true;
+            KillSpawnedProcesses();
+
+            // Sleep for 2 seconds
+            System.Threading.Thread.Sleep(2 * 1000);
+
+            // collate bugs
+            lock (fslock)
+            {
+                if (printingOutput) return;
+                printingOutput = true;
+                printBugs(ref mergedBugs, epNames.Count);
+                mergeBugs(epNames);
+            }
+
+            // Kill self
+            Process.GetCurrentProcess().Kill();
+        }
+

         class Worker
         {


comment

comment

--- sceneObjects/DMeshSO.cs
+++ sceneObjects/DMeshSO.cs
@@ -51,6 +51,8 @@
         }

+        #region IMeshComponentManager impl
+
         public void AddComponent(MeshDecomposition.Component C)
         {
             fMesh submesh = new fMesh(C.triangles, mesh, C.source_vertices, true, true);
@@ -66,6 +68,7 @@
             throw new Exception("argh");
         }

+        #endregion

         public void UpdateVertexPositions(Vector3f[] vPositions)


Added option to use memory instead of disk

--- AddOns/FastAVN/FastAVN/Program.cs
+++ AddOns/FastAVN/FastAVN/Program.cs
@@ -33,6 +33,7 @@
         static string bug_filename = "Bug";
         static string angelic_stack = "stack";
         static string stack_extension = ".txt";
+        static bool useMemNotDisk = false;
         static FastAvnConfig config = null;

         static DateTime startingTime = DateTime.Now;
@@ -56,6 +57,9 @@

             if (args.Any(s => s == "/keepFiles"))
                 Driver.keepFiles = true;
+
+            if (args.Any(s => s == "/useMemNotDisk"))
+                Driver.useMemNotDisk = true;

             args.Where(s => s.StartsWith("/aopt:"))
                 .Iter(s => avnArgs += " /" + s.Substring("/aopt:".Length) + " ");
@@ -334,8 +338,15 @@
                     Program newprogram;

                     // Each entrypoint should have its own copy of program
-                    BoogieUtil.PrintProgram(program, pruneFile);
-                    newprogram = BoogieUtil.ReadAndOnlyResolve(pruneFile);
+                    if (useMemNotDisk)
+                    {
+                        newprogram = BoogieUtil.ReResolveInMem(program);
+                    }
+                    else
+                    {
+                        BoogieUtil.PrintProgram(program, pruneFile);
+                        newprogram = BoogieUtil.ReadAndOnlyResolve(pruneFile);
+                    }

                     // slice the program by entrypoints
                     Program shallowP = pruneDeepProcs(newprogram, ref edges, impl.Name, approximationDepth, implNames);


Changed visibility of I2cDeviceBase property.

--- IoTHelpers/I2c/I2cDeviceBase.cs
+++ IoTHelpers/I2c/I2cDeviceBase.cs
@@ -13,10 +13,10 @@
         // I2C Controller name
         public const string I2C_CONTROLLER_NAME = "I2C1";

-        public I2cConnectionSettings Settings { get; set; }
+        public I2cConnectionSettings Settings { get; }

         // I2C Device
-        public I2cDevice Device { get; set; }
+        public I2cDevice Device { get; private set; }

         private string deviceSelector;


refactor.

refactor.

--- Jasily.Core/ObjectExtensions.cs
+++ Jasily.Core/ObjectExtensions.cs
@@ -1,28 +1,13 @@

-using JetBrains.Annotations;
 using System.Collections.Generic;
 using System.Threading.Tasks;
+using JetBrains.Annotations;

 namespace System
 {
     public static class ObjectExtensions
     {
-        /// <summary>
-        /// if both are not null, using Equals() to check if they equals.
-        /// <para/>
-        /// both are null, return true.
-        /// </summary>
-        /// <typeparam name="T"></typeparam>
-        /// <param name="obj"></param>
-        /// <param name="other"></param>
-        /// <returns></returns>
-        public static bool NormalEquals<T>(this T obj, T other)
-        {
-            if (ReferenceEquals(obj, other)) return true;
-            if (ReferenceEquals(obj, null) || ReferenceEquals(other, null)) return false;
-
-            return (obj as IEquatable<T>)?.Equals(other) ?? obj.Equals(other);
-        }
+        public static bool NormalEquals<T>(this T obj, T other) => EqualityComparer<T>.Default.Equals(obj, other);

         /// <summary>
         /// if obj is special type, action


removed string.format()

removed string.format()

--- Jasily.Core/StringExtensions.cs
+++ Jasily.Core/StringExtensions.cs
@@ -116,31 +116,17 @@

         #endregion

-        #region format
-
-        public static string Format(this string format, params object[] args)
-        {
-            return String.Format(format, args);
-        }
-
-        public static string Format(this string format, IFormatProvider provider, params object[] args)
-        {
-            return String.Format(format, provider, args);
-        }
-
-        #endregion
-
         #region parse

         public static int? TryParseInt32(string s)
         {
             int n;
-            return Int32.TryParse(s, out n) ? (int?) n : null;
+            return int.TryParse(s, out n) ? (int?) n : null;
         }
         public static int? TryParseInt32(string s, NumberStyles style, IFormatProvider provider)
         {
             int n;
-            return Int32.TryParse(s, style, provider, out n) ? (int?)n : null;
+            return int.TryParse(s, style, provider, out n) ? (int?)n : null;
         }

         public static long? TryParseInt64(string s)
@@ -175,9 +161,9 @@
         /// <param name="texts"></param>
         /// <param name="spliter"></param>
         /// <returns></returns>
-        public static string AsLines(this IEnumerable<string> texts, string spliter = "\r\n")
-        {
-            return String.Join(spliter, texts);
+        public static string AsLines(this IEnumerable<string> texts, string spliter = null)
+        {
+            return String.Join(spliter ?? Environment.NewLine, texts);
         }

         /// <summary>
@@ -189,8 +175,8 @@
         public static IEnumerable<string> AsLines(this string text, string spliter = null)
         {
             return spliter == null
-                ? text?.Split(new string[] { "\r\n", "\r", "\n" }, StringSplitOptions.None)
-                : text?.Split(new string[] { spliter }, StringSplitOptions.None);
+                ? text?.Split(new [] { "\r\n", "\r", "\n" }, StringSplitOptions.None)
+                : text?.Split(new [] { spliter }, StringSplitOptions.None);
         }

         /// <summary>


Test fix

Test fix

--- tests/Tgstation.Server.Tests/UsersTest.cs
+++ tests/Tgstation.Server.Tests/UsersTest.cs
@@ -164,7 +164,7 @@
 			{
 				Id = testUser2.Id,
 				PermissionSet = testUser2.PermissionSet,
-				Group = new UserGroup
+				Group = new Api.Models.Internal.UserGroup
 				{
 					Id = group.Id
 				},


Add Packet constructor.

Add Packet constructor.

--- LazerTagHostLibrary/Packet.cs
+++ LazerTagHostLibrary/Packet.cs
@@ -5,6 +5,16 @@
 {
 	public class Packet
 	{
+		public Packet()
+		{
+
+		}
+
+		public Packet(PacketType type)
+		{
+			Type = type;
+		}
+
 		public List<Signature> Signatures
 		{
 			get


Small change.

Small change.

--- Algo/OrderBookIncrementBuilder.cs
+++ Algo/OrderBookIncrementBuilder.cs
@@ -55,6 +55,9 @@
 			if (change is null)
 				throw new ArgumentNullException(nameof(change));

+			if (change.State == null)
+				throw new ArgumentException(nameof(change));
+
 			var currState = _state;
 			var newState = change.State.Value;


fixed stupid mistake on program change sender - it was sending 0 byte!

--- Xmmk/MainWindow.cs
+++ Xmmk/MainWindow.cs
@@ -75,7 +75,7 @@
 		void ProgramSelected (object sender, EventArgs e)
 		{
 			program = tone_list.IndexOf (((MenuItem) sender).Label);
-			output.Send (new Byte [] { (byte) (MidiEvent.Program + channel), (byte) program }, 0, 0, 0);
+			output.Send (new Byte [] { (byte) (MidiEvent.Program + channel), (byte) program }, 0, 2, 0);
 		}

 		protected void OnQuitActionActivated (object sender, EventArgs e)
@@ -195,29 +195,8 @@
 			"_P 120 SFX"
 			};

-		void SetupToneSelector ()
-		{
-			/*
-			tone_menu = new MenuItem ("&Tone");
-			this.Menu.MenuItems.Add (tone_menu);
-			MenuItem sub = null;
-			for (int i = 0; i < tone_list.Count; i++) {
-				if (i % 8 == 0) {
-					sub = new MenuItem (tone_categories [i / 8]);
-					tone_menu.MenuItems.Add (sub);
-				}
-				var mi = new MenuItem (tone_list [i]);
-				mi.Tag = i;
-				mi.Select += delegate {
-					output.Write (0, new MidiMessage (0xC0 + channel, (int) mi.Tag, 0));
-				};
-				sub.MenuItems.Add (mi);
-			}
-			*/
-		}
-
 		#endregion
-
+
 		#region Keyboard

 #if CHROMA_TONE


Show warning when PathData is null

Show warning when PathData is null

--- Animator/AnimationPathAnimator.cs
+++ Animator/AnimationPathAnimator.cs
@@ -285,6 +285,10 @@
         }

         public void StartEaseTimeCoroutine() {
+            if (PathData == null) {
+                Debug.LogWarning("Assign Path Asset in the inspector.");
+                return;
+            }
             // Starting node was reached.
             if (AnimationTimeRatio == 0) {
                 var args = new NodeReachedEventArgs(0, 0);


Removed an unnecessary loop inside the SortByPriority. It never ran more than once.

--- AppBrix/Application/ModuleInfo.cs
+++ AppBrix/Application/ModuleInfo.cs
@@ -39,24 +39,21 @@
             var all = new HashSet<string>(modules.Select(m => m.Module.GetType().Assembly.GetName().Name));
             var loaded = new HashSet<string>();
             var remaining = new LinkedList<ModuleInfo>(modules);
-
-            while (remaining.Count > 0)
+
+            var item = remaining.First; ;
+            while (item != null)
             {
-                var item = remaining.First; ;
-                while (item != null)
+                var assembly = item.Value.Module.GetType().Assembly;
+                if (assembly.GetReferencedAssemblies().All(a => !all.Contains(a.Name) || loaded.Contains(a.Name)))
                 {
-                    var assembly = item.Value.Module.GetType().Assembly;
-                    if (assembly.GetReferencedAssemblies().All(a => !all.Contains(a.Name) || loaded.Contains(a.Name)))
-                    {
-                        result.Add(item.Value);
-                        loaded.Add(assembly.GetName().Name);
-                        remaining.Remove(item);
-                        item = remaining.First;
-                    }
-                    else
-                    {
-                        item = item.Next;
-                    }
+                    result.Add(item.Value);
+                    loaded.Add(assembly.GetName().Name);
+                    remaining.Remove(item);
+                    item = remaining.First;
+                }
+                else
+                {
+                    item = item.Next;
                 }
             }


Added more assertions to TestSolve.

Added more assertions to TestSolve.

--- UnitTests/UnitTest1.cs
+++ UnitTests/UnitTest1.cs
@@ -126,6 +126,9 @@
             Assert.AreEqual(feature.geometry.GetGeometryType(), GeometryType.Polyline, "route feature should be a Polyline.");
         }

+        /// <summary>
+        /// Tests the "Finding the best route and driving directions between two locations" example from <see href="http://resources.arcgis.com/en/help/arcgis-rest-api/index.html#/Route_service/02r300000036000000/"/>
+        /// </summary>
         [TestMethod]
         public void TestSolve()
         {
@@ -135,11 +138,25 @@
                 stops = new double[][] {
                     new double[] {-122.4079,37.78356},
                     new double[] {-122.404,37.782}
-                }
+                },
+                ////restrictionAttributeNames = new string[] { "none" }
             };
             SolveResult result = svc.Solve(solveParameters, this.Token);
             Assert.IsInstanceOfType(result, typeof(SolveResult));
             Assert.IsNotNull(result.directions, "Directions should not be null");
+            Assert.AreEqual(result.directions.Length, 1, "Directions should have a single element.");
+            Direction direction = result.directions.First();
+            // Check some properties for expected results.
+            Assert.AreEqual(direction.routeId, 1);
+            Assert.AreEqual(direction.routeName, "Location 1 - Location 2");
+
+            Assert.IsTrue(direction.features.Length > 1);
+
+            Assert.AreEqual(direction.features.First().attributes["maneuverType"], "esriDMTDepart");
+            Assert.AreEqual(direction.features.Last().attributes["maneuverType"], "esriDMTStop");
+
+            Assert.IsNotNull(result.routes);
+            Assert.AreEqual(result.routes.spatialReference.wkid, 4326);
         }
     }
 }


Adding logging when stopping the tweeter stream

--- LogGenerator/TwitterStream.cs
+++ LogGenerator/TwitterStream.cs
@@ -89,7 +89,6 @@
                 }
                 if(--sampleSize == 0) {
                     sequenceToken = DispatchLogEvents(logEventsBatch, sequenceToken);
-                    Console.WriteLine("Stoping TwitterStream");
                     Stop();
                 }
             };
@@ -117,6 +116,7 @@
         }

         public void Stop() {
+            Console.WriteLine("Stopping Stream...");
             _stream.StopStream();
         }


InterfaceTraffic async test/example

InterfaceTraffic async test/example

--- tik4net.tests/InterfaceTest.cs
+++ tik4net.tests/InterfaceTest.cs
@@ -99,5 +99,17 @@
             cmd.AddParameter("comment", "My next comment");
             cmd.ExecuteNonQuery();
         }
+
+        [TestMethod]
+        public void InterfaceTraficAsync_WillNotFail()
+        {
+            var cmd = Connection.CreateCommandAndParameters("/interface/monitor-traffic", "interface", "ether1");
+            List<ITikReSentence> responses = new List<ITikReSentence>();
+            cmd.ExecuteAsync(re => responses.Add(re));
+            Thread.Sleep(5 * 1000);
+
+            Assert.IsTrue(responses.Count > 0);
+            cmd.CancelAndJoin(2 * 1000);
+        }
     }
 }


Expose more controls for Cycles emissive material.

--- Materials/EmissiveMaterial.cs
+++ Materials/EmissiveMaterial.cs
@@ -36,6 +36,9 @@

 		private float Strength { get; set; }
 		private Color4f Emission { get; set; }
+		private int Falloff { get; set; }
+		private float Smooth { get; set; }
+		private bool Hide { get; set; }

 		public EmissiveMaterial()
 		{
@@ -43,6 +46,13 @@
 			Fields.Add("emission_color", Color4f.White, "Emissive Color");
 			Strength = 1.0f;
 			Fields.Add("strength", 1.0f, "Strength");
+			Falloff = 0;
+			Fields.Add("falloff", 0, "Fall-off");
+			Smooth = 0.0f;
+			Fields.Add("smooth", 0.0f, "Smooth");
+			Hide = false;
+			Fields.Add("hide", true, "Hide");
+
 		}

 		public void BakeParameters()
@@ -56,6 +66,21 @@
 			if (Fields.TryGetValue("strength", out strength))
 			{
 				Strength = strength;
+			}
+			int falloff;
+			if (Fields.TryGetValue("falloff", out falloff))
+			{
+				Falloff = falloff;
+			}
+			float smooth;
+			if (Fields.TryGetValue("smooth", out smooth))
+			{
+				Smooth = smooth;
+			}
+			bool hide;
+			if (Fields.TryGetValue("hide", out hide))
+			{
+				Hide = hide;
 			}
 		}

@@ -104,23 +129,50 @@
 			{
 				Color4f color = Color4f.ApplyGamma(Emission, Gamma);

+				string falloff;
+				switch(Falloff)
+				{
+					case 0:
+						falloff = "constant";
+						break;
+					case 1:
+						falloff = "linear";
+						break;
+					default:
+						falloff = "quadratic";
+						break;
+				}
+
+				var hidepart = "";
+				if(Hide)
+				{
+					hidepart =
+					"<connect from=\"emission emission\" to=\"mix closure1\" />" +
+					"<connect from=\"lp iscameraray\" to=\"mix fac\" />" +
+					"<connect from=\"mix closure\" to=\"output surface\" />";
+				} else
+				{
+					hidepart =
+					"<connect from=\"emission emission\" to=\"output surface\" />";
+				}
+
 				return string.Format(
 					Utilities.Instance.NumberFormatInfo,
 					"<transparent_bsdf color=\"1 1 1\" name=\"transp\" />" +
 					"<emission color=\"{0} {1} {2}\" name=\"emission\" />" +
-					"<light_falloff name=\"lfo\" strength=\"{3}\"/>" +
+					"<light_falloff name=\"lfo\" strength=\"{3}\" smooth=\"{4}\" />" +
 					"<light_path name=\"lp\" />" +
 					"<mix_closure name=\"mix\" />" +

 					"<connect from=\"transp bsdf\" to=\"mix closure2\" />" +
-					"<connect from=\"lfo constant\" to=\"emission strength\" />" +
-					"<connect from=\"emission emission\" to=\"mix closure1\" />" +
-					"<connect from=\"lp iscameraray\" to=\"mix fac\" />" +
-					"<connect from=\"mix closure\" to=\"output surface\" />" +
-					"",
+					"<connect from=\"lfo {5}\" to=\"emission strength\" />" +
+					"{6}",

 					color.R, color.G, color.B,
-					Strength / 100.0f);
+					Strength / 100.0f,
+					Smooth,
+					falloff,
+					hidepart);
 			}
 		}
 	}


unit testing

unit testing

--- Assets/Scripts/Content/IniRead.cs
+++ Assets/Scripts/Content/IniRead.cs
@@ -17,8 +17,9 @@
         {
             lines = System.IO.File.ReadAllLines(path);
         }
-        catch (System.Exception)
-        {
+        catch (System.Exception ex)
+        {
+            ValkyrieDebug.Log(ex.Message);
             return null;
         }
         // Parse text data


Clean up previous changes

Clean up previous changes

--- Assets/Scripts/Models/WorldMap.cs
+++ Assets/Scripts/Models/WorldMap.cs
@@ -10,10 +10,10 @@

 	private int minimumStreetWidth 	= 5;

-	private int agentTreeSplit 		= 50;
+	private int agentTreeSplit 		= 10;
 	private int agentDepthLimit 	= 15;

-	private int buildingTreeSplit 	= 100;
+	private int buildingTreeSplit 	= 10;
 	private int buildingDepthLimit 	= 15;

 	#endregion Parameters & properties
@@ -248,9 +248,8 @@
 	#region Agent-World Interactions

 	// Agent perceives world through this function alone.
-	public void /*List<AgentPercept>*/ getPercepts(Agent agent, float perfectVisionRange)
-	{
-//		List<AgentPercept> apList = new List<AgentPercept>();
+	public void getPercepts(Agent agent, float perfectVisionRange)
+	{
 		agent.resetPercepts();

 		AgentPercept tempPercept;
@@ -281,7 +280,6 @@
 				// See AgentPercept.perceivedAgent for more.
 				tempPercept.perceivedAgent = nearbyAgents[i];

-//				apList.Add(tempPercept);
 				tempPercept 		= null;
 			}
 		}
@@ -292,12 +290,7 @@
 		List<AgentPercept> structureList = null;
 		for(int i=0; i<nearbyStructures.Count; i++)
 		{
-			/*structureList = */perceiveStructure(agent, nearbyStructures[i]);
-			/*if(structureList != null)
-			{
-				apList.AddRange(structureList);
-			}
-			structureList = null;*/
+			perceiveStructure(agent, nearbyStructures[i]);
 		}

 		// TODO: Work out a smarter way to handle WorldObjects than point-based
@@ -311,14 +304,11 @@
 					tempPercept.type = AgentPercept.PerceptType.EXTRACT;
 					tempPercept.locOne = worldObjects[wo].Location;
 					tempPercept.living = AgentPercept.LivingState.INANIMATE;
-
-//					apList.Add(tempPercept);
+
 					tempPercept = null;
 				}
 			}
 		}
-
-//		return apList;
 	}

 	public bool canPerceivePosition(Agent who, Vector2 where, float perfectVisionRange)
@@ -381,6 +371,7 @@
 			agentTree.Insert(agents[i],agents[i].Location.x, agents[i].Location.y, 0,0);
 		}
 	}
+
 	#endregion Tree Helpers
 	//////////////////////////////////////////////////////////////////


Allow to warp actor even after left mouse button has been released

--- Assets/Scripts/Room/RoomLoader.cs
+++ Assets/Scripts/Room/RoomLoader.cs
@@ -25,6 +25,7 @@
 	private Timer linkToDosBoxTimer = new Timer();
 	private bool speedRunMode;
 	private Vector3 startDragPosition;
+	private bool allowWarp;
 	private Box warpActor;
 	private bool refreshSelectedBoxAllowed = true;
 	private bool highLightedBoxAllowed = true;
@@ -498,6 +499,7 @@
 				if(highLightedBox != null && highLightedBox.name == "Actor")
 				{
 					warpActor = highLightedBox;
+					allowWarp = true;
 				}
 			}

@@ -507,7 +509,7 @@
 				Vector3 newMousePosition = Input.mousePosition;
 				if (newMousePosition != mousePosition)
 				{
-					if (warpActor == null)
+					if (!allowWarp)
 					{
 						//move camera
 						Vector3 cameraHeight = new Vector3(0.0f, 0.0f, Camera.main.transform.position.y);
@@ -515,27 +517,27 @@
 											- Camera.main.ScreenToWorldPoint(newMousePosition + cameraHeight);

 						Camera.main.transform.position += mouseDelta;
-						mousePosition = newMousePosition;
-
-						if((startDragPosition - newMousePosition).magnitude > 4.0f)
+						mousePosition = newMousePosition;
+					}
+
+					if ((startDragPosition - newMousePosition).magnitude > 4.0f)
+					{
+						refreshSelectedBoxAllowed = false;
+						if (allowWarp)
 						{
-							refreshSelectedBoxAllowed = false;
-						}
+							highLightedBoxAllowed = false;
+						}
 					}
-					else
-					{
-						//warp actor
-						if (Input.GetMouseButtonDown(1))
-						{
-							mustWarpActor = true;
-						}
-
-						if((startDragPosition - newMousePosition).magnitude > 4.0f)
-						{
-							refreshSelectedBoxAllowed = false;
-							highLightedBoxAllowed = false;
-						}
-					}
+				}
+
+				//warp actor
+				if (Input.GetMouseButtonDown(1) && warpActor != null)
+				{
+					refreshSelectedBoxAllowed = false;
+					highLightedBoxAllowed = false;
+
+					allowWarp = true;
+					mustWarpActor = true;
 				}
 			}

@@ -543,12 +545,12 @@
 			if (Input.GetMouseButtonUp(0))
 			{
 				highLightedBoxAllowed = true;
-				warpActor = null;
+				allowWarp = false;
 			}
 		}

 		//menu
-		if (Input.GetMouseButtonDown(1) && warpActor == null)
+		if (Input.GetMouseButtonDown(1) && (!Input.GetMouseButton(0) || warpActor == null))
 		{
 			WarpDialog warpDialog = GetComponent<WarpDialog>();
 			if(menuEnabled)


Make LogProviderBase public

Make LogProviderBase public

--- src/LibLog/LibLog.cs
+++ src/LibLog/LibLog.cs
@@ -1108,7 +1108,7 @@
     using global::System.Reflection;
     using global::System.Text.RegularExpressions;
     [ExcludeFromCodeCoverage]
-    internal abstract class LogProviderBase : ILogProvider
+    public abstract class LogProviderBase : ILogProvider
     {
         protected delegate IDisposable OpenNdc(string message);
         protected delegate IDisposable OpenMdc(string key, object value, bool destructure);


ID will be a string

ID will be a string

--- BetterDefaultBrowserLib/Filter.cs
+++ BetterDefaultBrowserLib/Filter.cs
@@ -106,7 +106,7 @@
         /// <summary>
         /// ID for reference in saved file
         /// </summary>
-        internal int ID { get; set; }
+        internal String ID { get; set; }

         #endregion


WriteString optimization

WriteString optimization

--- BinSerializer/StreamExtensions.cs
+++ BinSerializer/StreamExtensions.cs
@@ -1,6 +1,7 @@
 using System;
 using System.IO;
 using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
 using System.Security;

 namespace ThirtyNineEighty.BinarySerializer
@@ -220,9 +221,26 @@
     {
       BSDebug.TraceStart("WriteString", stream.Position);

-      stream.Write(obj.Length);
-      for (int i = 0; i < obj.Length; ++i)
-        stream.Write(obj[i]);
+      var length = obj.Length;
+
+      // Write length
+      stream.Write(length);
+
+      var usedLength = length * sizeof(char);
+      var buffer = Buffers.Get(usedLength);
+      unsafe
+      {
+        // It work faster but unfortunately available only from .net framework 4.6
+        //fixed (char* valuePtr = value)
+        //  fixed (byte* bufferPtr = buffer)
+        //    Buffer.MemoryCopy(valuePtr, bufferPtr, buffer.Length, usedLength);
+
+        fixed (void* valuePtr = obj)
+          Marshal.Copy(new IntPtr(valuePtr), buffer, 0, usedLength);
+      }
+
+      // Write data
+      stream.Write(buffer, 0, usedLength);

       BSDebug.TraceEnd("WriteString", stream.Position);
     }


Changed to return average win percent of brigade.

--- BrigadeRouletteConsole/Program.cs
+++ BrigadeRouletteConsole/Program.cs
@@ -71,9 +71,10 @@
                 }
             }

-            formationWinPercent = totalWinPercent / (IncludeReserve ? Formation.NumPositions * 2 : Formation.NumPositions);
-            //return formationWinPercent;
-            return totalWinPercent;
+            formationWinPercent = totalWinPercent /
+                (IncludeReserve ? Formation.NumPositions * 2 : Formation.NumPositions);
+            return formationWinPercent;
+            //return totalWinPercent;
         }

         protected void UpdateMaxFamiliarsInPositions()


Allow reinitialization of Redis connection

--- CacheSleeve.NET40/CacheManager.cs
+++ CacheSleeve.NET40/CacheManager.cs
@@ -1,11 +1,8 @@
-using System;
-using System.Collections.Generic;
+using System.Collections.Generic;
 using System.IO;
 using System.Reflection;
-using System.Text.RegularExpressions;
 using System.Linq;
 using CacheSleeve.Models;
-using CacheSleeve.Utilities;
 using RazorEngine;
 using StackExchange.Redis;
 using Encoding = System.Text.Encoding;
@@ -14,7 +11,6 @@
 {
     public sealed partial class CacheManager : ICacheManager
     {
-        private bool _setup;
         private ConnectionMultiplexer _redisConnection;

         #region Singleton Setup
@@ -79,10 +75,6 @@

         private static void PopulateSettings(ConfigurationOptions config, int redisDb = 0, string keyPrefix = "cs.")
         {
-            if (Settings._setup)
-                if (!UnitTestDetector.IsRunningFromXunit) throw new InvalidOperationException("Cannot reinitialize CacheSleeve");
-            Settings._setup = true;
-
             Settings.RedisConfiguration = config;
             Settings.KeyPrefix = keyPrefix;
             Settings.RedisDb = redisDb;


Moved messenger registerations to constructor

--- CodeHub/Views/ProfileView.xaml.cs
+++ CodeHub/Views/ProfileView.xaml.cs
@@ -27,24 +27,23 @@
         public ProfileView()
         {
             this.InitializeComponent();
-            Loading += ProfileView_Loading;
             ViewModel = new ProfileViewmodel();

             this.DataContext = ViewModel;

+            //Listening for Sign In message
+            Messenger.Default.Register<User>(this, ViewModel.RecieveSignInMessage);
+            //Listening for Sign Out message
+            Messenger.Default.Register<GlobalHelper.SignOutMessageType>(this, ViewModel.RecieveSignOutMessage);
+
             NavigationCacheMode = NavigationCacheMode.Enabled;
         }
-        protected override void OnNavigatedTo(NavigationEventArgs e)
+        protected async override void OnNavigatedTo(NavigationEventArgs e)
         {
             base.OnNavigatedTo(e);
             Messenger.Default.Send(new GlobalHelper.SetHeaderTextMessageType { PageName = "Profile" });

             ViewModel.User = (User)e.Parameter;
-        }
-        private async void ProfileView_Loading(FrameworkElement sender, object args)
-        {
-            Messenger.Default.Register<User>(this, ViewModel.RecieveSignInMessage); //Listening for Sign In message
-            Messenger.Default.Register<GlobalHelper.SignOutMessageType>(this, ViewModel.RecieveSignOutMessage);  //Listening for Sign Out message
             await ViewModel.Load();
         }
     }


Removed incorrect comment

Removed incorrect comment

--- Commands/SuspendLoggingCommand.cs
+++ Commands/SuspendLoggingCommand.cs
@@ -13,9 +13,9 @@
         {
             HostIoInterceptor.GetInterceptor().Paused = true;
         }
-    } // End ResumeLoggingCommand class
+    }
 }

 // ReSharper restore MemberCanBePrivate.Global
 // ReSharper restore UnusedAutoPropertyAccessor.Global
-// ReSharper restore UnusedMember.Global+// ReSharper restore UnusedMember.Global


Fixed parsing list items that are indented with >= 4 spaces (see also https://github.com/jgm/cmark/issues/52)

--- CommonMark/Parser/BlockMethods.cs
+++ CommonMark/Parser/BlockMethods.cs
@@ -554,6 +554,8 @@
             if (blank && container.IsLastLineBlank)
                 BreakOutOfLists(ref container, line);

+            var maybeLazy = cur.Tag == BlockTag.Paragraph;
+
             // unless last matched container is code block, try new container starts:
             while (container.Tag != BlockTag.FencedCode &&
                    container.Tag != BlockTag.IndentedCode &&
@@ -566,23 +568,9 @@

                 indent = first_nonspace - offset;
                 blank = curChar == '\n';
-
-                if (indent >= CODE_INDENT)
-                {
-
-                    if (cur.Tag != BlockTag.Paragraph && !blank)
-                    {
-                        offset += CODE_INDENT;
-                        container = CreateChildBlock(container, line, BlockTag.IndentedCode, offset);
-                    }
-                    else
-                    {
-                        // indent > 4 in lazy line
-                        break;
-                    }
-
-                }
-                else if (curChar == '>')
+                var indented = indent >= CODE_INDENT;
+
+                if (!indented && curChar == '>')
                 {

                     offset = first_nonspace + 1;
@@ -593,7 +581,7 @@
                     container = CreateChildBlock(container, line, BlockTag.BlockQuote, first_nonspace);

                 }
-                else if (curChar == '#' && 0 != (matched = Scanner.scan_atx_header_start(ln, first_nonspace, ln.Length, out i)))
+                else if (!indented && curChar == '#' && 0 != (matched = Scanner.scan_atx_header_start(ln, first_nonspace, ln.Length, out i)))
                 {

                     offset = first_nonspace + matched;
@@ -601,7 +589,7 @@
                     container.HeaderLevel = i;

                 }
-                else if ((curChar == '`' || curChar == '~') && 0 != (matched = Scanner.scan_open_code_fence(ln, first_nonspace, ln.Length)))
+                else if (!indented && (curChar == '`' || curChar == '~') && 0 != (matched = Scanner.scan_open_code_fence(ln, first_nonspace, ln.Length)))
                 {

                     container = CreateChildBlock(container, line, BlockTag.FencedCode, first_nonspace);
@@ -613,14 +601,14 @@
                     offset = first_nonspace + matched;

                 }
-                else if (curChar == '<' && Scanner.scan_html_block_tag(ln, first_nonspace, ln.Length))
+                else if (!indented && curChar == '<' && Scanner.scan_html_block_tag(ln, first_nonspace, ln.Length))
                 {

                     container = CreateChildBlock(container, line, BlockTag.HtmlBlock, first_nonspace);
                     // note, we don't adjust offset because the tag is part of the text

                 }
-                else if (container.Tag == BlockTag.Paragraph && (curChar == '=' || curChar == '-')
+                else if (!indented && container.Tag == BlockTag.Paragraph && (curChar == '=' || curChar == '-')
                         && 0 != (matched = Scanner.scan_setext_header_line(ln, first_nonspace, ln.Length))
                         && ContainsSingleLine(container.StringContent))
                 {
@@ -630,7 +618,9 @@
                     offset = ln.Length - 1;

                 }
-                else if (!(container.Tag == BlockTag.Paragraph && !all_matched) && 0 != (Scanner.scan_hrule(ln, first_nonspace, ln.Length)))
+                else if (!indented
+                    && !(container.Tag == BlockTag.Paragraph && !all_matched)
+                    && 0 != (Scanner.scan_hrule(ln, first_nonspace, ln.Length)))
                 {

                     // it's only now that we know the line is not part of a setext header:
@@ -640,7 +630,8 @@
                     offset = ln.Length - 1;

                 }
-                else if (0 != (matched = ParseListMarker(ln, first_nonspace, out data)))
+                else if ((!indented || container.Tag == BlockTag.List)
+                    && 0 != (matched = ParseListMarker(ln, first_nonspace, out data)))
                 {

                     // compute padding:
@@ -677,6 +668,11 @@
                     container = CreateChildBlock(container, line, BlockTag.ListItem, first_nonspace);
                     container.ListData = data;
                 }
+                else if (indented && !maybeLazy && !blank)
+                {
+                    offset += CODE_INDENT;
+                    container = CreateChildBlock(container, line, BlockTag.IndentedCode, offset);
+                }
                 else
                 {
                     break;
@@ -687,6 +683,8 @@
                     // if it's a line container, it can't contain other containers
                     break;
                 }
+
+                maybeLazy = false;
             }

             // what remains at offset is a text line.  add the text to the


refactoring

refactoring

--- Magic/Net/DataPackageHandler.cs
+++ Magic/Net/DataPackageHandler.cs
@@ -9,13 +9,61 @@
 {
     public sealed class DataPackageHandler : IDataPackageHandler
     {
+
+        #region Fields
+
+        private readonly ISerializeFormatterCollection _formatterCollection;
+        private readonly IServiceProvider _serviceProvider;
+        private Action<object> _commandResult;
         private const int version = 1;
+
+        #endregion Fields
+

         public DataPackageHandler(IServiceProvider serviceProvider, ISerializeFormatterCollection formatterCollection)
         {
             _serviceProvider = serviceProvider;
             _formatterCollection = formatterCollection;
         }
+
+        #region Implementation of IDataPackageHandler
+
+        public void ReceiveCommand([NotNull] RequestState requestState)
+        {
+            if (requestState == null) throw new ArgumentNullException("requestState");
+
+            while (!ThreadPool.QueueUserWorkItem(HandelReceivedCommandCallBack, requestState))
+            {
+                Trace.WriteLine("ThreadPool.QueueUserWorkItem unsuccessful");
+                Thread.Sleep(50);
+            }
+        }
+
+        public void ReceiveCommandStream([NotNull] RequestState package)
+        {
+            throw new NotImplementedException();
+        }
+
+        public void ReceiveCommandResult(RequestState requestState)
+        {
+            var commandResult =
+                _formatterCollection[requestState.Package.SerializeFormat].Deserialize<NetCommandResult>(
+                    requestState.Package.Buffer.Array, requestState.Package.Buffer.Offset);
+
+            if (_commandResult == null) return;
+
+            foreach (var subscriber in _commandResult.GetInvocationList())
+            {
+                var com = subscriber.Target as CommandResultAwait;
+                if (com != null && com.Id == commandResult.CommandId)
+                {
+                    subscriber.DynamicInvoke(commandResult.Result);
+                    break;
+                }
+            }
+        }
+
+        #endregion

         public event Action<object> CommandResult
         {
@@ -104,52 +152,5 @@

             #endregion Fields
         }
-
-        #region Fields
-
-        private readonly ISerializeFormatterCollection _formatterCollection;
-        private readonly IServiceProvider _serviceProvider;
-        private Action<object> _commandResult;
-
-        #endregion Fields
-
-        #region Implementation of IDataPackageHandler
-
-        public void ReceiveCommand([NotNull] RequestState requestState)
-        {
-            if (requestState == null) throw new ArgumentNullException("requestState");
-
-            while (!ThreadPool.QueueUserWorkItem(HandelReceivedCommandCallBack, requestState))
-            {
-                Trace.WriteLine("ThreadPool.QueueUserWorkItem unsuccessful");
-                Thread.Sleep(50);
-            }
-        }
-
-        public void ReceiveCommandStream([NotNull] RequestState package)
-        {
-            throw new NotImplementedException();
-        }
-
-        public void ReceiveCommandResult(RequestState requestState)
-        {
-            var commandResult =
-                _formatterCollection[requestState.Package.SerializeFormat].Deserialize<NetCommandResult>(
-                    requestState.Package.Buffer.Array, requestState.Package.Buffer.Offset);
-
-            if (_commandResult == null) return;
-
-            foreach (var subscriber in _commandResult.GetInvocationList())
-            {
-                var com = subscriber.Target as CommandResultAwait;
-                if (com != null && com.Id == commandResult.CommandId)
-                {
-                    subscriber.DynamicInvoke(commandResult.Result);
-                    break;
-                }
-            }
-        }
-
-        #endregion
     }
 }


Adding one more helper each for Hyperlink and ImageLink.

--- trunk/WebExtras.Mvc/Core/HtmlHelperExtension.cs
+++ trunk/WebExtras.Mvc/Core/HtmlHelperExtension.cs
@@ -45,6 +45,26 @@
     /// <param name="imageSrc">Image source</param>
     /// <param name="altText">Alternate text if the image can't be shown</param>
     /// <param name="url">URL for hyperlink</param>
+    /// <param name="htmlAttributes">[Optional] Extra html attributes for the image link. Note.
+    /// These attributes will be applied to the A tag only. Defaults to null</param>
+    /// <returns>HTML ImageHyperLink</returns>
+    public static MvcHtmlString ImageLink(
+      this HtmlHelper html,
+      string imageSrc,
+      string altText,
+      string url,
+      object htmlAttributes = null)
+    {
+      return ImageLink(html, imageSrc, altText, url, false, htmlAttributes);
+    }
+
+    /// <summary>
+    /// Displays an image hyperlink
+    /// </summary>
+    /// <param name="html">Current HTMLHelper object</param>
+    /// <param name="imageSrc">Image source</param>
+    /// <param name="altText">Alternate text if the image can't be shown</param>
+    /// <param name="url">URL for hyperlink</param>
     /// <param name="isJavascriptLink">[Optional] Flag indicating whether this is
     /// a javascript link</param>
     /// <param name="htmlAttributes">[Optional] Extra html attributes for the image link. Note.
@@ -55,7 +75,7 @@
       string imageSrc,
       string altText,
       string url,
-      bool isJavascriptLink = false,
+      bool isJavascriptLink,
       object htmlAttributes = null)
     {
       TagBuilder a = new TagBuilder("a");
@@ -75,13 +95,29 @@
     }

     /// <summary>
-    /// HTML hyperlink to given URL with the given
-    /// text
+    /// HTML hyperlink to given URL with the given text
     /// </summary>
     /// <param name="html">Current HTMLHelper object</param>
     /// <param name="linkText">Text to display for the link</param>
     /// <param name="url">URL for hyperlink. This can be either a url or a javascript event</param>
-    /// <param name="isJavascriptLink">[Optional] If the value specified for the 'url' parameter is
+    /// <param name="htmlAttributes">HTML attributes</param>
+    /// <returns>HTML Hyperlink</returns>
+    public static MvcHtmlString HyperLink(
+      this HtmlHelper html,
+      string linkText,
+      string url,
+      object htmlAttributes = null)
+    {
+      return HyperLink(html, linkText, url, false, htmlAttributes);
+    }
+
+    /// <summary>
+    /// HTML hyperlink to given URL with the given text
+    /// </summary>
+    /// <param name="html">Current HTMLHelper object</param>
+    /// <param name="linkText">Text to display for the link</param>
+    /// <param name="url">URL for hyperlink. This can be either a url or a javascript event</param>
+    /// <param name="isJavascriptLink">If the value specified for the 'url' parameter is
     /// to be treated as a javascript function call, this parameter must be set to true. Defaults to
     /// false.</param>
     /// <param name="htmlAttributes">HTML attributes</param>
@@ -90,7 +126,7 @@
       this HtmlHelper html,
       string linkText,
       string url,
-      bool isJavascriptLink = false,
+      bool isJavascriptLink,
       object htmlAttributes = null)
     {
       TagBuilder a = new TagBuilder("a");


Add notes about removal of Crayon specific Pastel functions.

--- Compiler/Pastel/NativeFunction.cs
+++ Compiler/Pastel/NativeFunction.cs
@@ -4,18 +4,19 @@
     {
         NONE,

-        // TODO: These are Crayon-specific functions that need to be removed.
+        // TODO: These are Crayon-specific functions that need to be removed. Notes on each are inline.
+        GET_PROGRAM_DATA, // used by Resources library, otherwise used only in VM. Need to just pass this around.
+        SET_PROGRAM_DATA, // separate out the creation of this into a function and then pass the result into the entry point. Then the reference to this can be managed outside the VM.
+        ENQUEUE_VM_RESUME, // Used by Core.sleep but in JS only. Ideally all Thread sleep implementations should use the hasInterrupt mechanism instead and then this becomes a non-issue.
+        VM_DETERMINE_LIBRARY_AVAILABILITY, // This goes away when library importing is revamped
+        VM_END_PROCESS, // used by the runInterpreter function right before returning and translates to something like System.exit(). This can (probably?) be changed to a specific status code.
+        // The ones below can easily be aggregated into ProgramData
         COMMAND_LINE_ARGS,
-        ENQUEUE_VM_RESUME,
-        GET_PROGRAM_DATA,
         GET_RESOURCE_MANIFEST,
         IS_DEBUG,
+        VM_SHOW_LIB_STACK,
         READ_BYTE_CODE_FILE,
         RESOURCE_READ_TEXT_FILE,
-        SET_PROGRAM_DATA,
-        VM_DETERMINE_LIBRARY_AVAILABILITY,
-        VM_END_PROCESS,
-        VM_SHOW_LIB_STACK,

         // TODO: port this to the standalone Pastel
         GET_FUNCTION,