修复大将优先级

修复大将优先级

--- com.lover.astd.common/model/BigHero.cs
+++ com.lover.astd.common/model/BigHero.cs
@@ -92,7 +92,7 @@
         /// <param name="nodes"></param>
         public void fillValues(XmlNodeList nodes)
         {
-            index_ = 999;
+            index_ = 9999;
             foreach (XmlNode xmlNode in nodes)
             {
                 if (xmlNode.Name == "generalid")


removed unecessary cast

removed unecessary cast

--- src/shawlib/Overlay.cs
+++ src/shawlib/Overlay.cs
@@ -29,7 +29,7 @@
                     val = 0;

                 opacity = (byte)val;
-                NativeMethods.SetLayeredWindowAttributes(this.Handle, 0, (byte)opacity, 0x2);
+                NativeMethods.SetLayeredWindowAttributes(this.Handle, 0, opacity, 0x2);
             }
         }


hide Toolbar wp8

hide Toolbar wp8

--- src/wp/InAppBrowser.cs
+++ src/wp/InAppBrowser.cs
@@ -57,6 +57,7 @@

         protected bool ShowLocation {get;set;}
         protected bool StartHidden  {get;set;}
+        protected bool ShowToolbar  {get;set;}

         protected string NavigationCallbackId { get; set; }

@@ -65,6 +66,7 @@
             // reset defaults on ShowLocation + StartHidden features
             ShowLocation = true;
             StartHidden = false;
+            ShowToolbar = false;

             string[] args = JSON.JsonHelper.Deserialize<string[]>(options);
             //BrowserOptions opts = JSON.JsonHelper.Deserialize<BrowserOptions>(options);
@@ -89,6 +91,9 @@
                             case "hidden":
                                 StartHidden = split[1].StartsWith("yes", StringComparison.OrdinalIgnoreCase);
                                 break;
+                            case "toolbar":
+                                ShowToolbar = split[1].StartsWith("yes", StringComparison.OrdinalIgnoreCase);
+                                break;
                         }
                     }
                     catch (Exception)
@@ -126,7 +131,11 @@
                 Deployment.Current.Dispatcher.BeginInvoke(() =>
                 {
                     browser.Visibility = Visibility.Visible;
-                    AppBar.IsVisible = true;
+                    if(ShowToolbar){
+                       AppBar.IsVisible = true;
+                    }else{
+                       AppBar.IsVisible = false;
+                    }
                 });
             }
         }
@@ -345,7 +354,12 @@
                             bar.Buttons.Add(closeBtn);

                             page.ApplicationBar = bar;
-                            bar.IsVisible = !StartHidden;
+                            if(ShowToolbar){
+                               bar.IsVisible = true;
+                            }else{
+                               bar.IsVisible = false;
+                            }
+
                             AppBar = bar;

                             page.BackKeyPress += page_BackKeyPress;


Code documentation

Code documentation

--- SQLServerBackupTool.Web/Lib/BackupsManager.cs
+++ SQLServerBackupTool.Web/Lib/BackupsManager.cs
@@ -1,10 +1,10 @@
-using System.Data.Entity;
-using Ionic.Zip;
+using Ionic.Zip;
 using NLog;
 using SQLServerBackupTool.Lib;
 using SQLServerBackupTool.Lib.Annotations;
 using SQLServerBackupTool.Web.Models;
 using System;
+using System.Data.Entity;
 using System.IO;
 using System.Linq;
 using System.Threading.Tasks;
@@ -21,7 +21,9 @@
         /// <param name="dbName">Name of the database to backup</param>
         /// <param name="logger">Optional instance of a <see cref="Logger"/></param>
         /// <returns>An instance of <see cref="BackupHistory"/> on success, null otherwise</returns>
-        /// <remarks>If deletion of the original backup file fails for any reason, only a log entry will be done, the backup won't be considered as failed</remarks>
+        /// <remarks>If deletion of the original backup file fails for any reason, only a log entry will be done, the backup won't be considered as failed.
+        /// This methods needs to be run in a valid <see cref="HttpContext"/>.
+        /// </remarks>
         public static async Task<BackupHistory> BackupDatabase([NotNull] string backupConnectionString, [NotNull] string dbName, [CanBeNull] Logger logger)
         {
             if (string.IsNullOrWhiteSpace(backupConnectionString))


remove unused method

remove unused method

--- SS.Integration.Adapter/Interface/ISettings.cs
+++ SS.Integration.Adapter/Interface/ISettings.cs
@@ -149,15 +149,6 @@
         int StreamSafetyThreshold { get; }

         /// <summary>
-        /// Indicates if the adapter should introduce
-        /// a delay before stop streaming for fixtures
-        /// that belong to a given sport
-        /// </summary>
-        /// <param name="sport"></param>
-        /// <returns></returns>
-        bool ShouldDelayStopStreaming(string sport);
-
-        /// <summary>
         /// This is litit for sttempt to start streaming
         /// </summary>
         int StartStreamingTimeoutInSeconds { get; }


Removed the redundant type

Removed the redundant type

--- SampleCSharp7/FirstConsoleApp/PersonHelper.cs
+++ SampleCSharp7/FirstConsoleApp/PersonHelper.cs
@@ -24,7 +24,7 @@
             {
                 case Student _:
                     var studentObject = (Student) person;
-                    WriteLine($"\nStudent {studentObject.Name} {studentObject.LastName} is enrolled for courses {string.Join<int>(", ", studentObject.CourseCodes)}");
+                    WriteLine($"\nStudent {studentObject.Name} {studentObject.LastName} is enrolled for courses {string.Join(", ", studentObject.CourseCodes)}");
                     break;
                 case Professor _:
                     var professorObject = (Professor)person;
@@ -33,6 +33,10 @@
             }
         }

+        /// <summary>
+        /// Pattern Matching with "is" keyword
+        /// </summary>
+        /// <param name="person"></param>
         public void PrintDataWithPatternMatching(object person)
         {
             if (person is null)
@@ -42,7 +46,7 @@

             if (person is Student studentObject)
             {
-                WriteLine($"\nStudent {studentObject.Name} {studentObject.LastName} is enrolled for courses {string.Join<int>(", ", studentObject.CourseCodes)}");
+                WriteLine($"\nStudent {studentObject.Name} {studentObject.LastName} is enrolled for courses {string.Join(", ", studentObject.CourseCodes)}");
             }
             if (person is Professor professorObject)
             {


Bugfix

Bugfix

- Fixed emitting incorrect code for methods without return parameter

--- SharpRemote/CodeGeneration/ServantCompiler.cs
+++ SharpRemote/CodeGeneration/ServantCompiler.cs
@@ -195,7 +195,9 @@

 		private new void ExtractArgumentsAndCallMethod(ILGenerator gen, MethodInfo methodInfo)
 		{
-			gen.Emit(OpCodes.Ldarg_3);
+			if (methodInfo.ReturnType != typeof(void))
+				gen.Emit(OpCodes.Ldarg_3);
+
 			gen.Emit(OpCodes.Ldarg_0);
 			gen.Emit(OpCodes.Ldfld, _subject);
 			base.ExtractArgumentsAndCallMethod(gen, methodInfo);


Added link

Added link

--- Skermstafir/Controllers/SubtitleController.cs
+++ Skermstafir/Controllers/SubtitleController.cs
@@ -48,14 +48,13 @@
 			RequestModel rModel = new RequestModel();
 			int idValue = id.Value;
 			rModel = rr.GetRequestByID(idValue);
-			DateTime dt = new DateTime();
-			sModel.subtitle.DateAdded   = dt.Date+dt.TimeOfDay;
 			sModel.subtitle.Genres      = rModel.request.Genres;
 			sModel.subtitle.Actors      = rModel.request.Actors;
 			sModel.subtitle.YearCreated = rModel.request.YearCreated;
 			sModel.subtitle.Name        = rModel.request.Name;
 			sModel.subtitle.Language    = rModel.request.Language;
 			sModel.subtitle.Description = rModel.request.Description;
+			sModel.subtitle.Link		= rModel.request.Link;
 			// Put genres in a bool array
 			FillModel(sModel);


Improved console snake layout

Improved console snake layout

--- Snake/Snake.Windows.Console/ConsoleDisplay.cs
+++ Snake/Snake.Windows.Console/ConsoleDisplay.cs
@@ -38,12 +38,40 @@
         {
             if (pos == snake.Positions.Count - 1)
             {
-                return 'O'; //Head
+                if (snake.Positions[snake.Positions.Count - 1].X == snake.Positions[snake.Positions.Count - 2].X)
+                {
+                    if (snake.Positions[snake.Positions.Count - 1].Y > snake.Positions[snake.Positions.Count - 2].Y)
+                    {
+                        return 'O'; // down
+                    }
+                    else
+                    {
+                        return 'O'; // up
+                    }
+                }
+                else
+                {
+                    if (snake.Positions[snake.Positions.Count - 1].X > snake.Positions[snake.Positions.Count - 2].X)
+                    {
+                        return 'O'; // right
+                    }
+                    else
+                    {
+                        return 'O'; // left
+                    }
+                }
             }

             if (pos == 0)
             {
-                return 'X'; //End
+                if (snake.Positions[1].X == snake.Positions[0].X)
+                {
+                    return '│';
+                }
+                else
+                {
+                    return '─';
+                }
             }

             (Int32, Int32) normIntoRange(Int32 a, Int32 b, Int32 norm) => Math.Abs(a - b) <= 2 ? (a, b) : (a < b ? (a + norm, b) : (a, b + norm));
@@ -52,17 +80,17 @@

             if (nx == px)
             {
-                return '│';
+                return '║';
             }
             if (ny == py)
             {
-                return '─';
+                return '═';
             }

             var sum = (snake.Positions[pos + 1].X == snake.Positions[pos].X ? 0b001 : 0)
                     + (py > ny ? 0b100 : 0)
                     + (px > nx ? 0b010 : 0) ;
-            return new[] {'┐', '└', '┌', '┘'}[sum >= 4 ? -sum + 7 : sum];
+            return new[] { '╗', '╚', '╔', '╝' }[sum >= 4 ? -sum + 7 : sum];
         }

         public void RemoveSnake(Snake snake)


ensure pktypes are calling the correct MoveTo function (#2686)

--- Source/ACE.Server/WorldObjects/Player_Move.cs
+++ Source/ACE.Server/WorldObjects/Player_Move.cs
@@ -36,6 +36,12 @@

         public void CreateMoveToChain(WorldObject target, Action<bool> callback, float? useRadius = null, bool rotate = true)
         {
+            if (FastTick)
+            {
+                CreateMoveToChain2(target, callback, useRadius, rotate);
+                return;
+            }
+
             var thisMoveToChainNumber = GetNextMoveToChainNumber();

             if (target.Location == null)


Corrected typo

Corrected typo

--- Source/Facebook/FacebookClient.OAuthResult.cs
+++ Source/Facebook/FacebookClient.OAuthResult.cs
@@ -116,7 +116,7 @@
             }

             // Automatically add client_id if not present in the parameters
-            if (!dictionary.ContainsKey("client_id") && string.IsNullOrEmpty(this.AppId)) {
+            if (!dictionary.ContainsKey("client_id") && !string.IsNullOrEmpty(this.AppId)) {
                 dictionary.Add("client_id", this.AppId);
             }


Preparing 1.10.

Preparing 1.10.

--- Source/WrtSettings/Properties/SolutionInfo.cs
+++ Source/WrtSettings/Properties/SolutionInfo.cs
@@ -4,5 +4,5 @@
 [assembly: AssemblyCompany("Josip Medved")]
 [assembly: AssemblyCopyright("Copyright (c) 2014 Josip Medved <jmedved@jmedved.com>")]

-[assembly: AssemblyVersion("0.00.*")]
-[assembly: AssemblyInformationalVersion("0.00")]
+[assembly: AssemblyVersion("1.10.*")]
+[assembly: AssemblyInformationalVersion("1.10")]


Cleaned attributes provided in build script

--- SuggestionBox.Data/Properties/AssemblyInfo.cs
+++ SuggestionBox.Data/Properties/AssemblyInfo.cs
@@ -1,36 +1,11 @@
-using System.Reflection;
+using System.Reflection;
 using System.Runtime.CompilerServices;
 using System.Runtime.InteropServices;

-// General Information about an assembly is controlled through the following
-// set of attributes. Change these attribute values to modify the information
-// associated with an assembly.
 [assembly: AssemblyTitle("SuggestionBox.Data")]
 [assembly: AssemblyDescription("")]
-[assembly: AssemblyConfiguration("")]
-[assembly: AssemblyCompany("")]
 [assembly: AssemblyProduct("SuggestionBox.Data")]
-[assembly: AssemblyCopyright("Copyright ©  2013")]
 [assembly: AssemblyTrademark("")]
 [assembly: AssemblyCulture("")]
-
-// Setting ComVisible to false makes the types in this assembly not visible
-// to COM components.  If you need to access a type in this assembly from
-// COM, set the ComVisible attribute to true on that type.
 [assembly: ComVisible(false)]
-
-// The following GUID is for the ID of the typelib if this project is exposed to COM
 [assembly: Guid("3f31aa35-71b4-4cea-b842-4844fac90b95")]
-
-// Version information for an assembly consists of the following four values:
-//
-//      Major Version
-//      Minor Version
-//      Build Number
-//      Revision
-//
-// 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.0.0.0")]
-[assembly: AssemblyFileVersion("1.0.0.0")]


Make SEC data converter map file resolver configurable via config.json

--- ToolBox/SECDataDownloader/SECDataConverter.cs
+++ ToolBox/SECDataDownloader/SECDataConverter.cs
@@ -25,9 +25,11 @@
 using System.Threading.Tasks;
 using System.Xml;
 using Newtonsoft.Json;
+using QuantConnect.Configuration;
 using QuantConnect.Data;
 using QuantConnect.Data.Auxiliary;
 using QuantConnect.Data.Custom.SEC;
+using QuantConnect.Interfaces;
 using QuantConnect.Logging;
 using QuantConnect.Util;
 using Formatting = Newtonsoft.Json.Formatting;
@@ -42,6 +44,8 @@
     /// </summary>
     public class SECDataConverter
     {
+        private MapFileResolver _mapFileResolver;
+
         /// <summary>
         /// Raw data source path
         /// </summary>
@@ -154,6 +158,9 @@
         {
             RawSource = rawSource;
             Destination = destination;
+
+            _mapFileResolver = Composer.Instance.GetExportedValueByTypeName<IMapFileProvider>(Config.Get("map-file-provider", "LocalDiskMapFileProvider"))
+                .Get(Market.USA);
         }

         /// <summary>
@@ -225,8 +232,6 @@
             Log.Trace($"SECDataConverter.Process(): Copied raw data from {remoteRawData.FullName} - to: {tempPath}");

             Log.Trace($"SECDataConverter.Process(): Start processing...");
-
-            var mapFileResolver = MapFileResolver.Create(Globals.DataFolder, Market.USA);

             var ncFilesRead = 0;
             var startingTime = DateTime.Now;
@@ -369,7 +374,7 @@
                     // it is not found in the map files, we skip writing it.
                     foreach (var ticker in tickers)
                     {
-                        var tickerMapFile = mapFileResolver.ResolveMapFile(ticker, processingDate);
+                        var tickerMapFile = _mapFileResolver.ResolveMapFile(ticker, processingDate);
                         if (!tickerMapFile.Any())
                         {
                             Log.Trace($"SECDataConverter.Process(): {processingDate} - Failed to find map file for ticker: {ticker}");


BrowserControl: possible workaround for JS alert from TWStats

--- TribalWars/Browsers/Control/BrowserControl.cs
+++ TribalWars/Browsers/Control/BrowserControl.cs
@@ -10,6 +10,16 @@

 namespace TribalWars.Browsers.Control
 {
+    // TODO: Possible workaround for TWStats showing popups
+    //http://stackoverflow.com/questions/1951771/how-to-disable-alert-box-javascript-in-c-sharp-webbrower-control
+    //HtmlElement head = myWebBrowser.Document.GetElementsByTagName("head")[0];
+    //    HtmlElement scriptEl = myWebBrowser.Document.CreateElement("script");
+    //    IHTMLScriptElement element = (IHTMLScriptElement)scriptEl.DomElement;
+    //    string alertBlocker = @"window.alert = function () { };";
+    //    element.text = alertBlocker;
+    //    head.AppendChild(scriptEl);
+    //    myWebBrowser.ScriptErrorsSuppressed = true;
+
     public partial class BrowserControl : UserControl
     {
         #region Constants


Update PasswordValidatorUnitTest.cs

Update PasswordValidatorUnitTest.cs

--- UnitTestProject1/PasswordValidatorUnitTest.cs
+++ UnitTestProject1/PasswordValidatorUnitTest.cs
@@ -1,4 +1,5 @@
 #if NUNIT
+using Nunit.Framework;
 using TestClass = NUnit.Framework.TestFixtureAttribute;
 using TestMethod = NUnit.Framework.TestAttribute;
 using TestCleanup = NUnit.Framework.TearDownAttribute;


Fixed FieldSyncs clean-up to properly clean up before next test class

--- UnitTests/Source/NetworkObjects/FieldSyncs.cs
+++ UnitTests/Source/NetworkObjects/FieldSyncs.cs
@@ -13,8 +13,6 @@
 		[ClassInitialize]
 		public static void CreateServer(TestContext context)
 		{
-			ConnectSetup(objectCreatedCallback: ObjectCreated);
-
 			NetworkObject.Factory = new NetworkObjectFactory();
 		}

@@ -24,13 +22,21 @@
 			ConnectTeardown(ObjectCreated);
 		}

+        [TestInitialize]
+        public void Startup()
+        {
+            ConnectSetup(objectCreatedCallback: ObjectCreated);
+        }
+
 		[TestCleanup]
 		public void Cleanup()
 		{
 			serverObj = null;
 			clientObj = null;
 			otherClientObj = null;
-		}
+
+            ConnectTeardown(ObjectCreated);
+        }

 		private void SetTargetFields(TestNetworkObject target)
 		{


Pulling from LFS repositories works

Pulling from LFS repositories works

--- UnityBuildServer/VersionControl/Git/GitVCS.cs
+++ UnityBuildServer/VersionControl/Git/GitVCS.cs
@@ -32,8 +32,9 @@
             signature = new Signature(new Identity("UnityBuildServer", "info@basenjigames.com"), DateTimeOffset.UtcNow);

             // Set up LFS filter
-            var filter = new LFSFilter("lfs", workspace.WorkingDirectory, new List<FilterAttributeEntry> { new FilterAttributeEntry("lfs") });
-            lfsFilter = GlobalSettings.RegisterFilter(filter);
+            // DISABLED - we'll run LFS commands manually
+            //var filter = new LFSFilter("lfs", workspace.WorkingDirectory, new List<FilterAttributeEntry> { new FilterAttributeEntry("lfs") });
+            //lfsFilter = GlobalSettings.RegisterFilter(filter);
         }

         public override string TypeName
@@ -72,27 +73,9 @@
             if (config.UseLFS)
             {
                 BuildConsole.WriteLine($"Cloning LFS repository:  {config.RepositoryURL}");
-
-                Console.ForegroundColor = ConsoleColor.Red;
-
                 workspace.CleanWorkingDirectory();
                 string repoUrl = GetUrlWithPassword(config.RepositoryURL);
-
-                var startInfo = new ProcessStartInfo
-                {
-                    FileName = "git-lfs",
-                    Arguments = $"clone {repoUrl} {workspace.WorkingDirectory}",
-                    WorkingDirectory = workspace.WorkingDirectory,
-                    RedirectStandardInput = true,
-                    RedirectStandardOutput = true,
-                    CreateNoWindow = true,
-                    UseShellExecute = false
-                };
-                var process = new Process { StartInfo = startInfo };
-                process.Start();
-                process.WaitForExit();
-
-                Console.ResetColor();
+                ExecuteLFSCommand($"clone {repoUrl} {workspace.WorkingDirectory}");
             }
             else
             {
@@ -130,30 +113,73 @@
             // Clean the repo
             using (var repo = new Repository(workspace.WorkingDirectory))
             {
+                // Skip the LFS smudge filter when resetting the repo.
+                // LFS files will be integrated manually.
+                repo.Config.Set("filter.lfs.smudge", "git-lfs smudge --skip %f", ConfigurationLevel.Local);
+                repo.Config.Set("filter.lfs.required", false);
+
                 repo.Reset(ResetMode.Hard);
                 repo.RemoveUntrackedFiles();

                 // Pull changes
-
+
                 string remoteName = "origin";
+                BuildConsole.WriteLine($"Pulling changes from {remoteName}:  {config.RepositoryURL}");

-                BuildConsole.WriteLine($"Fetching from {remoteName}:  ({config.RepositoryURL})");
-                var fetchOptions = new FetchOptions
+                var pullOptions = new PullOptions
                 {
-                    CredentialsProvider = credentialsHandler
+                    FetchOptions = new FetchOptions
+                    {
+                        CredentialsProvider = credentialsHandler
+                    },
+                    MergeOptions = new MergeOptions
+                    {
+                        FastForwardStrategy = FastForwardStrategy.FastForwardOnly,
+                        FileConflictStrategy = CheckoutFileConflictStrategy.Theirs,
+                        MergeFileFavor = MergeFileFavor.Theirs,
+                        FailOnConflict = false
+                    }
                 };
-                repo.Fetch(remoteName, fetchOptions);
+                var mergeResult = repo.Network.Pull(signature, pullOptions);

-                BuildConsole.WriteLine($"Merging changes into {config.RepositoryBranchName}");
-                var mergeOptions = new MergeOptions
+                if (config.UseLFS)
                 {
-                    FastForwardStrategy = FastForwardStrategy.FastForwardOnly,
-                    FileConflictStrategy = CheckoutFileConflictStrategy.Theirs,
-                    MergeFileFavor = MergeFileFavor.Theirs,
-                    FailOnConflict = false
-                };
-                repo.Merge(config.RepositoryBranchName, signature, mergeOptions);
+                    BuildConsole.WriteLine("Fetching LFS files");
+                    ExecuteLFSCommand("fetch");
+                    BuildConsole.WriteLine("Checking out LFS files into working copy");
+                    ExecuteLFSCommand("checkout");
+                }
+
+                if (mergeResult.Status == MergeStatus.UpToDate)
+                {
+                    BuildConsole.WriteLine($"Repository is already up-to-date");
+                }
+                else
+                {
+                    BuildConsole.WriteLine($"Merged commit {mergeResult.Commit.Sha}: {mergeResult.Commit.MessageShort}");
+                }
             }
+        }
+
+        void ExecuteLFSCommand(string arguments)
+        {
+            Console.ForegroundColor = ConsoleColor.Red;
+
+            var startInfo = new ProcessStartInfo
+            {
+                FileName = "git-lfs",
+                Arguments = arguments,
+                WorkingDirectory = workspace.WorkingDirectory,
+                RedirectStandardInput = true,
+                RedirectStandardOutput = true,
+                CreateNoWindow = true,
+                UseShellExecute = false
+            };
+            var process = new Process { StartInfo = startInfo };
+            process.Start();
+            process.WaitForExit();
+
+            Console.ResetColor();
         }
     }
 }


cached allowed registers and allowed mnemonics in AsmDudeTools

--- VS/CSHARP/asm-dude-vsix/Tools/AsmDudeTools.cs
+++ VS/CSHARP/asm-dude-vsix/Tools/AsmDudeTools.cs
@@ -44,8 +44,10 @@
         private IDictionary<string, AssemblerEnum> _assembler;
         private IDictionary<string, Arch> _arch;
         private IDictionary<string, string> _description;
+        private ISet<Mnemonic> _mnemonics_switched_on;
+        private ISet<Rn> _register_switched_on;
+
         private readonly ErrorListProvider _errorListProvider;
-
         private readonly MnemonicStore _mnemonicStore;
         private readonly PerformanceStore _performanceStore;
         private readonly SmartThreadPool _threadPool;
@@ -87,6 +89,12 @@
             #endregion

             Init_Data();
+
+            this._mnemonics_switched_on = new HashSet<Mnemonic>();
+            this.UpdateMnemonicSwitchedOn();
+
+            this._register_switched_on = new HashSet<Rn>();
+            this.UpdateRegisterSwitchedOn();

             #region Experiments

@@ -257,6 +265,55 @@

         #region Public Methods

+        public bool MnemonicSwitchedOn(Mnemonic mnemonic)
+        {
+            return this._mnemonics_switched_on.Contains(mnemonic);
+        }
+        public IEnumerable<Mnemonic> Get_Allowed_Mnemonics()
+        {
+            return this._mnemonics_switched_on;
+        }
+        public void UpdateMnemonicSwitchedOn()
+        {
+            this._mnemonics_switched_on.Clear();
+            ISet<Arch> selectedArchs = AsmDudeToolsStatic.Get_Arch_Swithed_On();
+            foreach (Mnemonic mnemonic in Enum.GetValues(typeof(Mnemonic)))
+            {
+                foreach (Arch a in this.Mnemonic_Store.GetArch(mnemonic))
+                {
+                    if (selectedArchs.Contains(a))
+                    {
+                        _mnemonics_switched_on.Add(mnemonic);
+                        break;
+                    }
+                }
+            }
+        }
+
+        public bool RegisterSwitchedOn(Rn reg)
+        {
+            return this._register_switched_on.Contains(reg);
+        }
+        public IEnumerable<Rn> Get_Allowed_Registers()
+        {
+            return this._register_switched_on;
+        }
+        public void UpdateRegisterSwitchedOn()
+        {
+            this._register_switched_on.Clear();
+            ISet<Arch> selectedArchs = AsmDudeToolsStatic.Get_Arch_Swithed_On();
+            foreach (Rn reg in Enum.GetValues(typeof(Rn)))
+            {
+                if (reg != Rn.NOREG)
+                {
+                    if (selectedArchs.Contains(RegisterTools.GetArch(reg)))
+                    {
+                        _register_switched_on.Add(reg);
+                    }
+                }
+            }
+        }
+
         public ErrorListProvider Error_List_Provider { get { return this._errorListProvider; } }

         public MnemonicStore Mnemonic_Store { get { return this._mnemonicStore; } }
@@ -265,7 +322,7 @@

         public SmartThreadPool Thread_Pool { get { return this._threadPool; } }

-        /// Get the collection of Keywords (in CAPITALS)
+        /// Get the collection of Keywords (in CAPITALS), but NOT mnemonics and registers
         public IEnumerable<string> Get_Keywords()
         {
             if (this._type == null) this.Init_Data();
@@ -285,7 +342,10 @@
             {
                 string keyword2 = keyword.Substring(1);
                 Rn reg = RegisterTools.ParseRn(keyword2, true);
-                return (reg != Rn.NOREG) ? AsmTokenType.Register : AsmTokenType.UNKNOWN;
+                if (reg != Rn.NOREG)
+                {
+                    if (RegisterSwitchedOn(reg)) return AsmTokenType.Register;
+                }
             }
             #endregion
             #region Test if keyword is an imm
@@ -299,7 +359,7 @@
                 Mnemonic mnemonic = AsmSourceTools.ParseMnemonic_Att(keyword, true);
                 if (mnemonic != Mnemonic.NONE)
                 {
-                    return (AsmSourceTools.IsJump(mnemonic)) ? AsmTokenType.Jump : AsmTokenType.Mnemonic;
+                    if (MnemonicSwitchedOn(mnemonic)) return (AsmSourceTools.IsJump(mnemonic)) ? AsmTokenType.Jump : AsmTokenType.Mnemonic;
                 }
             }
             #endregion
@@ -314,9 +374,13 @@
             Mnemonic mnemonic = AsmSourceTools.ParseMnemonic(keyword, true);
             if (mnemonic != Mnemonic.NONE)
             {
-                return (AsmSourceTools.IsJump(mnemonic)) ? AsmTokenType.Jump : AsmTokenType.Mnemonic;
-            }
-
+                if (MnemonicSwitchedOn(mnemonic)) return (AsmSourceTools.IsJump(mnemonic)) ? AsmTokenType.Jump : AsmTokenType.Mnemonic;
+            }
+            Rn reg = RegisterTools.ParseRn(keyword, true);
+            if (reg != Rn.NOREG)
+            {
+                if (RegisterSwitchedOn(reg)) return AsmTokenType.Register;
+            }
             return (this._type.TryGetValue(keyword, out var tokenType)) ? tokenType : AsmTokenType.UNKNOWN;
         }

@@ -368,7 +432,6 @@
             this._arch = new Dictionary<string, Arch>();
             this._assembler = new Dictionary<string, AssemblerEnum>();
             this._description = new Dictionary<string, string>();
-
             // fill the dictionary with keywords
             XmlDocument xmlDoc = Get_Xml_Data();
             foreach (XmlNode node in xmlDoc.SelectNodes("//misc"))
@@ -413,7 +476,7 @@
                 else
                 {
                     string name = nameAttribute.Value.ToUpper();
-                    this._type[name] = AsmTokenType.Register;
+                    //this._type[name] = AsmTokenType.Register;
                     this._arch[name] = Retrieve_Arch(node);
                     this._description[name] = Retrieve_Description(node);
                 }


Modified relative paths

Modified relative paths

--- WebApp-B2C-DotNet/Views/Shared/_Layout.cshtml
+++ WebApp-B2C-DotNet/Views/Shared/_Layout.cshtml
@@ -4,8 +4,11 @@
     <meta charset="utf-8" />
     <meta name="viewport" content="width=device-width, initial-scale=1.0">
     <title>@ViewBag.Title - My ASP.NET Application</title>
-    @Styles.Render("~/Content/css")
-    @Scripts.Render("~/bundles/modernizr")
+    @{
+       var CurrentUrl = HttpContext.Current.Request.Url;
+    }
+    @Styles.Render(CurrentUrl + "Content/css")
+    @Scripts.Render(CurrentUrl + "bundles/modernizr")
 </head>
 <body>
     <div class="navbar navbar-inverse navbar-fixed-top">


WebEditor was saving incorrect version number

--- WorldModel/WorldModel/GameLoader/GameSaver.cs
+++ WorldModel/WorldModel/GameLoader/GameSaver.cs
@@ -70,7 +70,7 @@

             UpdateImpliedTypesCache();

-            Version ver = new Version(System.Windows.Forms.Application.ProductVersion);
+            string ver = System.Reflection.Assembly.GetExecutingAssembly().GetName().Version.ToString();
             writer.WriteComment(string.Format("Saved by Quest {0}", ver));
             writer.WriteStartElement("asl");
             if (mode == SaveMode.Editor)


#846 - in Edit mode, load multiple switch case expressions separated by commas as one expression

--- WorldModel/WorldModel/Scripts/SwitchScript.cs
+++ WorldModel/WorldModel/Scripts/SwitchScript.cs
@@ -47,12 +47,24 @@
                     if (cases.StartsWith("case"))
                     {
                         string expr = Utility.GetParameter(cases, out afterExpr);
-                        var matchList = Utility.SplitParameter(expr);
                         string caseScript = Utility.GetScript(afterExpr);
                         IScript script = ScriptFactory.CreateScript(caseScript, scriptContext);

-                        foreach (var match in matchList)
-                            result.Add(new ExpressionGeneric(match, scriptContext), script);
+                        // Case expression can have multiple values separated by commas. In Edit mode,
+                        // just load this as one expression for editing.
+
+                        if (!scriptContext.WorldModel.EditMode)
+                        {
+                            var matchList = Utility.SplitParameter(expr);
+                            foreach (var match in matchList)
+                            {
+                                result.Add(new ExpressionGeneric(match, scriptContext), script);
+                            }
+                        }
+                        else
+                        {
+                            result.Add(new ExpressionGeneric(expr, scriptContext), script);
+                        }
                     }
                     else if (cases.StartsWith("default"))
                     {


Pass the processed image stream to the next pipeline

--- Wyam.Modules.ImageProcessor/ImageProcessor.cs
+++ Wyam.Modules.ImageProcessor/ImageProcessor.cs
@@ -127,7 +127,7 @@
                 ISupportedImageFormat format = GetFormat(extension);
                 if (format == null)
                     continue;
-
+
                 foreach (var ins in _instructions)
                 {
                     if (input.Stream.CanSeek)
@@ -140,64 +140,63 @@

                     var destinationPath = Path.Combine(destinationDirectory, destinationFile);
                     context.Trace.Verbose($"Sending processed image to {destinationPath}");
-                    ProduceImage(input.Stream, format, ins, destinationPath);
-                }
-
-                yield return input;
-            }
-        }
-
-        void ProduceImage(Stream inStream, ISupportedImageFormat format, ImageInstruction ins, string destinationPath)
-        {
-            using (var outStream = new MemoryStream())
-            {
-                using (var imageFactory = new img.ImageFactory(preserveExifData: true))
-                {
-                    // Load, resize, set the format and quality and save an image.
-                    var fac = imageFactory.Load(inStream)
-                                .Format(format);
-
-                    if (ins.IsNeedResize)
+                    var output = ProduceImage(input.Stream, format, ins, destinationPath);
+
+                    yield return input.Clone(output, new Dictionary<string, object>
+                        {
+                            {Wyam.Core.Documents.MetadataKeys.WritePath, destinationPath},
+                            {Wyam.Core.Documents.MetadataKeys.WriteExtension, extension }
+                        });
+                }
+
+            }
+        }
+
+        Stream ProduceImage(Stream inStream, ISupportedImageFormat format, ImageInstruction ins, string destinationPath)
+        {
+            using (var imageFactory = new img.ImageFactory(preserveExifData: true))
+            {
+                // Load, resize, set the format and quality and save an image.
+                var fac = imageFactory.Load(inStream)
+                            .Format(format);
+
+                if (ins.IsNeedResize)
+                {
+                    if (ins.IsCropRequired)
                     {
-                        if (ins.IsCropRequired)
-                        {
-                            var layer = new ResizeLayer(
-                                size: ins.GetSize().Value,
-                                anchorPosition: ins.GetAnchorPosition(),
-                                resizeMode: ResizeMode.Crop
-                                );
-
-                            fac.Resize(layer);
-                        }
-                        else
-                        {
-                            fac.Resize(ins.GetSize().Value);
-                        }
+                        var layer = new ResizeLayer(
+                            size: ins.GetSize().Value,
+                            anchorPosition: ins.GetAnchorPosition(),
+                            resizeMode: ResizeMode.Crop
+                            );
+
+                        fac.Resize(layer);
                     }
-
-                    foreach (var f in ins.Filters)
+                    else
                     {
-                        fac.Filter(ins.GetMatrixFilter(f));
+                        fac.Resize(ins.GetSize().Value);
                     }
-
-                    if (ins.Brightness.HasValue)
-                    {
-                        fac.Brightness(ins.Brightness.Value);
-                    }
-
-                    if (ins.Constraint.HasValue)
-                    {
-                        fac.Constrain(ins.Constraint.Value);
-                    }
-
-                    fac.Save(outStream);
-                }
-
-                outStream.Seek(0, SeekOrigin.Begin);
-                using (var f = File.Create(destinationPath))
-                {
-                    outStream.CopyTo(f);
-                }
+                }
+
+                foreach (var f in ins.Filters)
+                {
+                    fac.Filter(ins.GetMatrixFilter(f));
+                }
+
+                if (ins.Brightness.HasValue)
+                {
+                    fac.Brightness(ins.Brightness.Value);
+                }
+
+                if (ins.Constraint.HasValue)
+                {
+                    fac.Constrain(ins.Constraint.Value);
+                }
+
+                var outputStream = new MemoryStream();
+                fac.Save(outputStream);
+                outputStream.Seek(0, SeekOrigin.Begin);
+                return outputStream;
             }
         }
     }


Optimizations to panel painting. Improved framerate.

--- ASU/UI/MainForm.cs
+++ ASU/UI/MainForm.cs
@@ -21,6 +21,8 @@
         private string FormTitle;

         private Bitmap ZoomImage;
+        private Bitmap originalImage = null;
+        private Bitmap paintedImage = null;

         private string OverlayText;
         private Point MouseLocation;
@@ -111,6 +113,11 @@
             this.Boxes.Clear();
             this.Selected.Clear();
             this.Hover = Rectangle.Empty;
+
+            if (this.originalImage != null)
+                this.originalImage.Dispose();
+
+            this.originalImage = null;

             BO.RegionUnpacker.Counter = 0;
             SheetWithBoxes = null;
@@ -707,8 +714,6 @@
         {
             Graphics graphics = null;
             Graphics zoomGraphics = null;
-            Bitmap originalImage = null;
-            Bitmap paintedImage = null;

             try
             {
@@ -719,7 +724,8 @@

                 if (this.unpackers.Count == 1)
                 {
-                    originalImage = this.unpackers[0].GetOriginalClone();
+                    if (originalImage == null)
+                        originalImage = this.unpackers[0].GetOriginalClone();
                 }

                 if (originalImage != null)
@@ -753,8 +759,21 @@
                         }
                     }

-                    paintedImage = new Bitmap(this.MainPanel.ClientRectangle.Width, this.MainPanel.ClientRectangle.Height);
+                    bool refresh = false;
+
+                    if (paintedImage == null)
+                        refresh = true;
+
+                    if (paintedImage != null)
+                        if (this.MainPanel.ClientRectangle.Width != paintedImage.Width || this.MainPanel.ClientRectangle.Height != paintedImage.Height)
+                            refresh = true;
+
+                    if (refresh)
+                        paintedImage = new Bitmap(this.MainPanel.ClientRectangle.Width, this.MainPanel.ClientRectangle.Height);
+
                     graphics = Graphics.FromImage(paintedImage);
+                    graphics.InterpolationMode = System.Drawing.Drawing2D.InterpolationMode.NearestNeighbor;
+                    graphics.Clear(Color.Black);
                     graphics.DrawImage(SheetWithBoxes, this.Offset);

                     Rectangle boxOffset;
@@ -853,7 +872,7 @@
                 }
                 if (paintedImage != null)
                 {
-                    paintedImage.Dispose();
+                    //paintedImage.Dispose();
                 }
             }
         }


BF interpreter now uses raw stdin and stdout for I/O.

--- BFLib/Brainfuck.cs
+++ BFLib/Brainfuck.cs
@@ -1,4 +1,5 @@
 using System;
+using System.IO;

 namespace BrainTools
 {
@@ -18,6 +19,9 @@
             char[] program = code.ToCharArray();
             int brackets = 0;
             int codePointer = 0;
+
+            Stream stdin = Console.OpenStandardInput();
+            Stream stdout = Console.OpenStandardOutput();

             while (codePointer < program.Length)
             {
@@ -68,11 +72,11 @@
                         }
                         break;
                     case '.':
-                        Console.Write((char)tape.Cell);
+                        stdout.WriteByte((byte)tape.Cell);
                         codePointer++;
                         break;
                     case ',':
-                        tape.Cell = Console.Read();
+                        tape.Cell = stdin.ReadByte();
                         codePointer++;
                         break;
                     default:


Add UpdateWithNull for variations

Add UpdateWithNull for variations

--- Base/BaseObject.cs
+++ Base/BaseObject.cs
@@ -246,6 +246,28 @@
             return API.DeserializeJSon<T>(await API.PostRestful(APIParentEndpoint + "/" + parentId.ToString() + "/" + APIEndpoint + "/" + id.ToString(), item, parms).ConfigureAwait(false));
         }

+        public async Task<T> UpdateWithNull(int id, int parentId, object item, Dictionary<string, string> parms = null)
+        {
+            if (API.GetType().Name == "RestAPI")
+            {
+                StringBuilder json = new StringBuilder();
+                json.Append("{");
+                foreach (var prop in item.GetType().GetProperties())
+                {
+                    json.Append($"\"{prop.Name}\": \"\", ");
+                }
+
+                if (json.Length > 1)
+                    json.Remove(json.Length - 2, 1);
+
+                json.Append("}");
+
+                return API.DeserializeJSon<T>(await API.PostRestful(APIParentEndpoint + "/" + parentId.ToString() + "/" + APIEndpoint + "/" + id.ToString(), json.ToString(), parms).ConfigureAwait(false));
+            }
+            else
+                return API.DeserializeJSon<T>(await API.PostRestful(APIParentEndpoint + "/" + parentId.ToString() + "/" + APIEndpoint + "/" + id.ToString(), item, parms).ConfigureAwait(false));
+        }
+
         public async Task<BatchObject<T>> UpdateRange(int parentId, BatchObject<T> items, Dictionary<string, string> parms = null)
         {
             return API.DeserializeJSon<BatchObject<T>>(await API.PostRestful(APIParentEndpoint + "/" + parentId.ToString() + "/" + APIEndpoint + "/batch", items, parms).ConfigureAwait(false));


Added a couple of XML util functions.

Added a couple of XML util functions.

git-svn-id: 3916312b38d4626f60559a41769e1638eb2972bb@107 35089d11-96e9-ae4d-82a0-4b2588c93174

--- Utils.cs
+++ Utils.cs
@@ -16,6 +16,8 @@
 using System.Diagnostics;
 using System.Collections.Generic;
 using System.Security.Cryptography;
+using System.Xml;
+using System.Web;

 namespace Latino
 {
@@ -338,6 +340,34 @@
             return true;
         }

+        public static string XmlReadValue(XmlReader reader, string attrName)
+        {
+            Utils.ThrowException(reader == null ? new ArgumentNullException("reader") : null);
+            Utils.ThrowException(attrName == null ? new ArgumentNullException("attrName") : null);
+            if (reader.IsEmptyElement) { return ""; }
+            string text = "";
+            while (reader.Read() && reader.NodeType != XmlNodeType.Text && reader.NodeType != XmlNodeType.CDATA && !(reader.NodeType == XmlNodeType.EndElement && reader.Name == attrName)) ;
+            if (reader.NodeType == XmlNodeType.Text)
+            {
+                text = HttpUtility.HtmlDecode(reader.Value);
+                XmlSkip(reader, attrName);
+            }
+            else if (reader.NodeType == XmlNodeType.CDATA)
+            {
+                text = reader.Value; // no decoding for CDATA
+                XmlSkip(reader, attrName);
+            }
+            return text;
+        }
+
+        public static void XmlSkip(XmlReader reader, string attrName)
+        {
+            Utils.ThrowException(reader == null ? new ArgumentNullException("reader") : null);
+            Utils.ThrowException(attrName == null ? new ArgumentNullException("attrName") : null);
+            if (reader.IsEmptyElement) { return; }
+            while (reader.Read() && !(reader.NodeType == XmlNodeType.EndElement && reader.Name == attrName)) ;
+        }
+
         // *** Delegates ***

         public delegate T UnaryOperatorDelegate<T>(T val);


调整字符串

调整字符串

--- SalamanderWamp/Log.cs
+++ SalamanderWamp/Log.cs
@@ -73,8 +73,8 @@
             rtfLog = logRichTextBox;
             wnmp_log_notice("Initializing Control Panel", LogSection.WNMP_MAIN);
             wnmp_log_notice("Control Panel Version: " + Constants.CPVER, LogSection.WNMP_MAIN);
-            wnmp_log_notice("Wnmp Version: " + Constants.APPVER, LogSection.WNMP_MAIN);
-            wnmp_log_notice("Wnmp Directory: " + MainWindow.StartupPath, LogSection.WNMP_MAIN);
+            wnmp_log_notice("Wamp Version: " + Constants.APPVER, LogSection.WNMP_MAIN);
+            wnmp_log_notice("Wamp Directory: " + MainWindow.StartupPath, LogSection.WNMP_MAIN);
         }
     }
 }


Refactor LightManager.

Refactor LightManager.

--- Scene/LightManager.cs
+++ Scene/LightManager.cs
@@ -13,6 +13,7 @@
 	private Light pickupLight;
 	private Light tileLight;
 	private Light planeLight;
+<<<<<<< HEAD:Assets/Scripts/Scene/LightManager.cs
 	// coordinates on TileMap where ground begins
 	private float groundLine;
 	// above ground light intensity
@@ -27,6 +28,15 @@
 	private float pickupBelowGround = 1.1f;
 	private float tileBelowGround = .64f;
 	private float planeBelowGround = .13f;
+=======
+	private float groundLine;						// coordinates on TileMap where above ground and below ground meet
+	private float aboveGround = 1.95f;				// light intensity when player is above ground
+	private float playerBelowGround = 1.17f;		// light intensity when player is below ground
+	private float creatureBelowGround = 1.17f;		// light intensity when player is below ground
+	private float pickupBelowGround = 1.1f;			// light intensity when player is below ground
+	private float tileBelowGround = .64f;			// light intensity when player is below ground
+	private float planeAboveBelowGround = .13f;		// light intensity when player is below ground
+>>>>>>> c241ff51d911cd89ed8dc6a108d25085e4e7771a:Assets/Scripts/Scene/SunlightManager.cs

 	void Start ()
 	{