Revert "Use input bits per sample (optimization, as 32 bit path is slower)"

This reverts commit 8d737a1e9f805f0b9cceb811737eefe2cbc0bd8c.

--- AudioWorks/src/Extensions/AudioWorks.Extensions.Apple/AacAudioEncoder.cs
+++ AudioWorks/src/Extensions/AudioWorks.Extensions.Apple/AacAudioEncoder.cs
@@ -17,8 +17,6 @@
         [CanBeNull] FileStream _fileStream;
         [CanBeNull] AudioMetadata _metadata;
         [CanBeNull] SettingDictionary _settings;
-        int _bitsPerSample;
-        int _bytesPerSample;
         [CanBeNull] ExtendedAudioFile _audioFile;

         public SettingInfoDictionary SettingInfo
@@ -51,8 +49,6 @@
             _fileStream = fileStream;
             _metadata = metadata;
             _settings = settings;
-            _bitsPerSample = info.BitsPerSample;
-            _bytesPerSample = (int) Math.Ceiling(_bitsPerSample / 8.0);

             var inputDescription = GetInputDescription(info);
             _audioFile = new ExtendedAudioFile(GetOutputDescription(inputDescription), AudioFileType.M4A, fileStream);
@@ -101,9 +97,9 @@
         {
             if (samples.Frames == 0) return;

-            var bufferSize = samples.Frames * samples.Channels * _bytesPerSample;
-            Span<byte> buffer = stackalloc byte[bufferSize];
-            samples.CopyToInterleaved(buffer, _bitsPerSample);
+            var bufferSize = samples.Frames * samples.Channels;
+            Span<int> buffer = stackalloc int[bufferSize];
+            samples.CopyToInterleaved(buffer, 32);

             var bufferList = new AudioBufferList
             {
@@ -111,7 +107,7 @@
                 Buffers = new AudioBuffer[1]
             };
             bufferList.Buffers[0].NumberChannels = (uint) samples.Channels;
-            bufferList.Buffers[0].DataByteSize = (uint) bufferSize;
+            bufferList.Buffers[0].DataByteSize = (uint) (bufferSize * Marshal.SizeOf<int>());
             bufferList.Buffers[0].Data = new IntPtr(Unsafe.AsPointer(ref MemoryMarshal.GetReference(buffer)));

             // ReSharper disable once PossibleNullReferenceException
@@ -143,18 +139,16 @@
         [Pure]
         static AudioStreamBasicDescription GetInputDescription([NotNull] AudioInfo info)
         {
-            var bytePerSample = (uint) Math.Ceiling(info.BitsPerSample / 8.0);
-
             return new AudioStreamBasicDescription
             {
                 SampleRate = info.SampleRate,
                 AudioFormat = AudioFormat.LinearPcm,
                 Flags = AudioFormatFlags.PcmIsSignedInteger | AudioFormatFlags.PcmIsPacked,
-                BytesPerPacket = bytePerSample * (uint) info.Channels,
+                BytesPerPacket = 4 * (uint) info.Channels,
                 FramesPerPacket = 1,
-                BytesPerFrame = bytePerSample * (uint) info.Channels,
+                BytesPerFrame = 4 * (uint) info.Channels,
                 ChannelsPerFrame = (uint) info.Channels,
-                BitsPerChannel = (uint) info.BitsPerSample
+                BitsPerChannel = 32
             };
         }


propagate failing http status code form login.microsoftonline.com as OAuthException, with diagnostic messages

--- CSharp/Library/Microsoft.Bot.Connector.Shared/MicrosoftAppCredentials.cs
+++ CSharp/Library/Microsoft.Bot.Connector.Shared/MicrosoftAppCredentials.cs
@@ -16,6 +16,7 @@
 #if NET45
 using System.Configuration;
 using System.Diagnostics;
+using System.Runtime.Serialization;
 #endif

 namespace Microsoft.Bot.Connector
@@ -191,25 +192,53 @@
             return false;
         }

+#if NET45
+        [Serializable]
+#endif
+        public sealed class OAuthException : Exception
+        {
+            public OAuthException(string body, Exception inner)
+                : base(body, inner)
+            {
+            }
+
+#if NET45
+            private OAuthException(SerializationInfo info, StreamingContext context)
+                : base(info, context)
+            {
+            }
+#endif
+        }
+
         private async Task<OAuthResponse> RefreshTokenAsync()
         {
-            OAuthResponse oauthResponse;
-
             using (HttpClient httpClient = new HttpClient())
             {
-                HttpResponseMessage response = await httpClient.PostAsync(OAuthEndpoint, new FormUrlEncodedContent(new Dictionary<string, string>()
+                var content = new FormUrlEncodedContent(new Dictionary<string, string>()
                 {
                     { "grant_type", "client_credentials" },
                     { "client_id", MicrosoftAppId },
                     { "client_secret", MicrosoftAppPassword },
                     { "scope", OAuthScope }
-                })).ConfigureAwait(false);
-
-                string body = await response.Content.ReadAsStringAsync().ConfigureAwait(false);
-
-                oauthResponse = JsonConvert.DeserializeObject<OAuthResponse>(body);
-                oauthResponse.expiration_time = DateTime.UtcNow.AddSeconds(oauthResponse.expires_in).Subtract(TimeSpan.FromSeconds(60));
-                return oauthResponse;
+                });
+
+                using (var response = await httpClient.PostAsync(OAuthEndpoint, content).ConfigureAwait(false))
+                {
+                    string body = await response.Content.ReadAsStringAsync().ConfigureAwait(false);
+
+                    try
+                    {
+                        response.EnsureSuccessStatusCode();
+
+                        var oauthResponse = JsonConvert.DeserializeObject<OAuthResponse>(body);
+                        oauthResponse.expiration_time = DateTime.UtcNow.AddSeconds(oauthResponse.expires_in).Subtract(TimeSpan.FromSeconds(60));
+                        return oauthResponse;
+                    }
+                    catch (Exception error)
+                    {
+                        throw new OAuthException(body, error);
+                    }
+                }
             }
         }


Tweak last commit

Tweak last commit

--- slimCat/Utilities/FilteredCollection.cs
+++ slimCat/Utilities/FilteredCollection.cs
@@ -147,9 +147,7 @@

                 case NotifyCollectionChangedAction.Remove:
                 {
-                    var items = e.OldItems.Cast<T>();
-
-                    items.Each(item => Collection.Remove(item));
+                    e.OldItems.OfType<T>().Each(item => Collection.Remove(item));
                     break;
                 }
             }


Minor AudioBuffer syntax changes

Minor AudioBuffer syntax changes

--- source/Cosmos.HAL2/Audio/AudioBuffer.cs
+++ source/Cosmos.HAL2/Audio/AudioBuffer.cs
@@ -92,11 +92,7 @@
             int bufferOffset = index * format.size;

             fixed(byte* bufferPtr = buffer) {
-                MemoryOperations.Copy(
-                    dest,
-                    bufferPtr + bufferOffset,
-                    format.size
-                );
+                MemoryOperations.Copy(dest, bufferPtr + bufferOffset, format.size);
             }
         }


serial fix?

serial fix?

--- source/Cosmos/Cosmos.Hardware/Serial.cs
+++ source/Cosmos/Cosmos.Hardware/Serial.cs
@@ -25,8 +25,8 @@
             ushort xComAddr = GetSerialAddr(aSerialIdx);
             IOWriteByte((ushort)(xComAddr + 1), 0x00);    // Disable all interrupts
             IOWriteByte((ushort)(xComAddr + 3), 0x80);    // Enable DLAB (set baud rate divisor)
-            IOWriteByte((ushort)(xComAddr + 0), 0x03);    // Set divisor to 3 (lo byte) 38400 baud
-            //IOWriteByte((ushort)(xComAddr + 1), 0x00);    //                  (hi byte)
+            IOWriteByte((ushort)(xComAddr + 0), 0x0C);    // Set divisor to 3 (lo byte) 38400 baud
+            IOWriteByte((ushort)(xComAddr + 1), 0x00);    //                  (hi byte)
             IOWriteByte((ushort)(xComAddr + 3), 0x03);    // 8 bits, no parity, one stop bit
             IOWriteByte((ushort)(xComAddr + 2), 0xC7);    // Enable FIFO, clear them, with 14-byte threshold
             IOWriteByte((ushort)(xComAddr + 4), 0x0B);    // IRQs enabled, RTS/DSR set


Fixing comments

Fixing comments

--- Core/System/Runtime/CompilerServices/TupleElementNamesAttribute.net45.cs
+++ Core/System/Runtime/CompilerServices/TupleElementNamesAttribute.net45.cs
@@ -18,8 +18,7 @@
         private readonly string[] _transformNames;

         /// <summary>
-        /// Initializes a new instance of the <see
-        /// cref="TupleElementNamesAttribute"/> class.
+        /// Initializes a new instance of the <see cref="TupleElementNamesAttribute"/> class.
         /// </summary>
         /// <param name="transformNames">
         /// Specifies, in a pre-order depth-first traversal of a type's
@@ -30,9 +29,7 @@
         /// This constructor is meant to be used on types that contain an
         /// instantiation of <see cref="System.ValueType"/> that contains
         /// element names.  For instance, if <c>C</c> is a generic type with
-        /// two type parameters, then a use of the constructed type <c>C{<see
-        /// cref="System.ValueTuple{T1, T2}"/>, <see
-        /// cref="System.ValueTuple{T1, T2, T3}"/></c> might be intended to
+        /// two type parameters, then a use of the constructed type <c>C{<see cref="System.ValueTuple{T1, T2}"/>, <see cref="System.ValueTuple{T1, T2, T3}"/></c> might be intended to
         /// treat the first type argument as a tuple with element names and the
         /// second as a tuple without element names. In which case, the
         /// appropriate attribute specification should use a


Remove the paging query string in the selection URL.

--- Kooboo.CMS/Publish/Default/Cms_Data/Views/ControlTypes/MediaFiles.cshtml
+++ Kooboo.CMS/Publish/Default/Cms_Data/Views/ControlTypes/MediaFiles.cshtml
@@ -24,7 +24,7 @@

-            @@Html.IconImage("plus small")
+            @@Html.IconImage("plus small")
             @Html.Raw(FormHelper.Tooltip(Model.Tooltip))


Matt Williams patch to dispose of the MembcachedClient

--- MassTransit.Infrastructure/Subscriptions/DistributedSubscriptionCache.cs
+++ MassTransit.Infrastructure/Subscriptions/DistributedSubscriptionCache.cs
@@ -174,24 +174,26 @@
 			_messageTypes.Clear();
 		}

-		private void QueryCache(string messageName, SubscriptionKey key, List<Subscription> result)
-		{
-			MemcachedClient client = GetCacheClient();
-
-			string value = client.Get<string>(key.CacheKey);
-
-			if (!string.IsNullOrEmpty(value))
-			{
-				string[] uris = value.Split(_newLineToken);
-
-				foreach (string uri in uris)
-				{
-					result.Add(new Subscription(messageName, key.CorrelationId, new Uri(uri)));
-				}
-			}
-		}
-
-		private MemcachedClient GetCacheClient()
+        private void QueryCache(string messageName, SubscriptionKey key, List<Subscription> result)
+        {
+            using (MemcachedClient client = GetCacheClient())
+            {
+                string value = client.Get<string>(key.CacheKey);
+
+                if (!string.IsNullOrEmpty(value))
+                {
+                    string[] uris = value.Split(_newLineToken);
+
+                    foreach (string uri in uris)
+                    {
+                        result.Add(new Subscription(messageName, key.CorrelationId, new Uri(uri)));
+                    }
+                }
+            }
+        }
+
+
+	    private MemcachedClient GetCacheClient()
 		{
 			if (_configuration != null)
 				return new MemcachedClient(_configuration);
@@ -231,6 +233,7 @@
 			public void Dispose()
 			{
 				_client.Remove(_key.LockKey);
+                _client.Dispose();
 			}

 			public R GetFromClient<R>(SubscriptionKey key)
@@ -296,4 +299,4 @@

 		#endregion
 	}
-}+}


#113 - Convert the CreditCardLabel, CreditCardAudience and CreditCardSecurity enums to lists of const strings

--- Mollie.Api/Models/Payment/Response/Specific/CreditCardPaymentResponse.cs
+++ Mollie.Api/Models/Payment/Response/Specific/CreditCardPaymentResponse.cs
@@ -30,14 +30,13 @@
         /// <summary>
         /// Not always available. – The card's target audience.
         /// </summary>
-        [JsonConverter(typeof(StringEnumConverter))]
-        public CreditCardAudience? CardAudience { get; set; }
+        public string CardAudience { get; set; }

         /// <summary>
-        /// The card's label. Note that not all labels can be acquired through Mollie.
+        /// The card's label. Note that not all labels can be acquired through Mollie. See the
+        /// Mollie.Api.Models.Payment.Response.CreditCardLabel class for a full list of known values
         /// </summary>
-        [JsonConverter(typeof(StringEnumConverter))]
-        public CreditCardLabel? CardLabel { get; set; }
+        public string CardLabel { get; set; }

         /// <summary>
         /// The ISO 3166-1 alpha-2 country code of the country the card was issued in. For example: BE.
@@ -45,10 +44,10 @@
         public string CardCountryCode { get; set; }

         /// <summary>
-        /// Only available if the payment succeeded. – The payment's security type.
+        /// Only available if the payment succeeded. – The payment's security type. See the
+        /// Mollie.Api.Models.Payment.Response.CreditCardSecurity class for a full list of known values
         /// </summary>
-        [JsonConverter(typeof(StringEnumConverter))]
-        public CreditCardSecurity? CardSecurity { get; set; }
+        public string CardSecurity { get; set; }

         /// <summary>
         /// Only available if the payment succeeded. – The fee region for the payment. See your credit card addendum for
@@ -59,7 +58,7 @@

         /// <summary>
         /// Only available for failed payments. Contains a failure reason code. See the
-        /// Mollie.Api.Models.Payment.Response.CreditCardFailureReason class for a full list of known failure reasons
+        /// Mollie.Api.Models.Payment.Response.CreditCardFailureReason class for a full list of known values
         /// </summary>
         public string FailureReason { get; set; }

@@ -72,18 +71,17 @@
     /// <summary>
     /// The card's target audience.
     /// </summary>
-    public enum CreditCardAudience {
-        Consumer,
-        Business
+    public static class CreditCardAudience {
+        public const string Consumer = nameof(Consumer);
+        public const string Business = nameof(Business);
     }

     /// <summary>
     /// Only available if the payment has been completed – The type of security used during payment processing.
     /// </summary>
-    public enum CreditCardSecurity {
-        Normal,
-        [EnumMember(Value = "3dsecure")]
-        Secure3D
+    public static class CreditCardSecurity {
+        public const string Normal = nameof(Normal);
+        public const string Secure3D = "3dsecure";
     }

     /// <summary>
@@ -116,19 +114,19 @@

     /// <summary>
     /// The card's label. Note that not all labels can be acquired through Mollie.
-    /// </summary>
-    public enum CreditCardLabel {
-        [EnumMember(Value = "American Express")] AmericanExpress,
-        [EnumMember(Value = "Carta si")] CartaSi,
-        [EnumMember(Value = "Carte Bleue")] CarteBleue,
-        Dankort,
-        [EnumMember(Value = "Diners Club")] DinersClub,
-        Discover,
-        [EnumMember(Value = "JCB")] Jcb,
-        [EnumMember(Value = "Laser")] Laser,
-        Maestro,
-        Mastercard,
-        Unionpay,
-        Visa
+    /// </summary>
+    public static class CreditCardLabel {
+        public const string AmericanExpress = "American Express";
+        public const string CartaSi = "Carta si";
+        public const string CarteBleue = "Carte Bleue";
+        public const string Dankort = nameof(Dankort);
+        public const string DinersClub = "Diners Club";
+        public const string Discover = nameof(Discover);
+        public const string Jcb = "JCB";
+        public const string Laser = nameof(Laser);
+        public const string Maestro = nameof(Maestro);
+        public const string Mastercard = nameof(Mastercard);
+        public const string Unionpay = nameof(Unionpay);
+        public const string Visa = nameof(Visa);
     }
 }


Dictionary tests

Dictionary tests

--- ObjectsComparer/ObjectsComparer.Tests/Comparer_GenericEnumerableTests.cs
+++ ObjectsComparer/ObjectsComparer.Tests/Comparer_GenericEnumerableTests.cs
@@ -409,7 +409,7 @@
             var a1 = new HashSet<string> { "a", "b" };
             var a2 = new HashSet<string> { "a", "b", "c" };
             var comparer = new Comparer<HashSet<string>>();
-
+
             var isEqual = comparer.Compare(a1, a2, out var differencesEnum);
             var differences = differencesEnum.ToList();

@@ -473,5 +473,41 @@
             Assert.AreEqual("2", differences.First().Value1);
             Assert.AreEqual("1", differences.First().Value2);
         }
+
+        [Test]
+        public void DictionaryEqualitySameOrder()
+        {
+            var a1 = new Dictionary<int, string> { { 1, "One" }, { 2, "Two" } };
+            var a2 = new Dictionary<int, string> { { 1, "One" }, { 2, "Two" } };
+            var comparer = new Comparer<Dictionary<int, string>>();
+
+            var isEqual = comparer.Compare(a1, a2);
+
+            Assert.IsTrue(isEqual);
+        }
+
+        [Test]
+        public void DictionaryInequalityDifferentOrder()
+        {
+            var a1 = new Dictionary<int, string> { { 1, "One" }, { 2, "Two" } };
+            var a2 = new Dictionary<int, string> { { 2, "Two" }, { 1, "One" } };
+            var comparer = new Comparer<Dictionary<int, string>>();
+
+            var isEqual = comparer.Compare(a1, a2);
+
+            Assert.IsFalse(isEqual);
+        }
+
+        [Test]
+        public void DictionaryInequalityDifferentNumberOfElements()
+        {
+            var a1 = new Dictionary<int, string> { { 1, "One" }, { 2, "Two" } };
+            var a2 = new Dictionary<int, string> { { 1, "One" }, { 2, "Two" }, { 3, "Three" } };
+            var comparer = new Comparer<Dictionary<int, string>>();
+
+            var isEqual = comparer.Compare(a1, a2);
+
+            Assert.IsFalse(isEqual);
+        }
     }
 }


modificacion del formulario carbohidrato

--- Presentacion/Presentacion.Ventas/Presentacion.Ventas/FormCarbohidrato.cs
+++ Presentacion/Presentacion.Ventas/Presentacion.Ventas/FormCarbohidrato.cs
@@ -20,7 +20,227 @@
         {
             InitializeComponent();
         }
+        Carbohidrato obcarbohidrato = new Carbohidrato();
+        DataTable dtcarbohidrato = new DataTable();
+        CtrlTransaccion ctr = new CtrlTransaccion();
+
+        private void btnGuardar_Click(object sender, EventArgs e)
+        {
+            btnGuardar.Enabled = false;
+            if (!string.IsNullOrEmpty(t1.Text))
+            {
+                if (insetarDatos())
+                {
+                    txt_buscar.Text = t1.Text;
+                    if (cargarBusqueda())
+                        inicio();
+                }
+            }
+            btnGuardar.Enabled = true;
+
+        }
+
+        private void btn_buscar_Click(object sender, EventArgs e)
+        {
+            if (cargarBusqueda())
+                inicio();
+        }
+
+        private void btnActualizar_Click(object sender, EventArgs e)
+        {
+            btnActualizar.Enabled = false;
+            if (!string.IsNullOrEmpty(t1.Text))
+            {
+                if (actualizarDatos())
+                {
+                    txt_buscar.Text = t1.Text;
+                    if (cargarBusqueda())
+                        inicio();
+                }
+            }
+            btnActualizar.Enabled = true;
+        }
+
+        private void btnEliminar_Click(object sender, EventArgs e)
+        {
+            btnEliminar.Enabled = false;
+            if (eliminarDatos())
+            {
+                txt_buscar.Text = "";
+                if (cargarBusqueda())
+                    inicio();
+            }
+            btnEliminar.Enabled = true;
+        }
+
+        private void btn_inicio_Click(object sender, EventArgs e)
+        {
+            if (hayDatos())
+                inicio();
+        }
+
+        private void btn_atras_Click(object sender, EventArgs e)
+        {
+            if (hayDatos() && puedeAtras())
+                atras();
+        }
+
+        private void btn_siguiente_Click(object sender, EventArgs e)
+        {
+            if (hayDatos() && puedeSiguiente())
+                siguiente();
+        }
+
+        private void btn_fin_Click(object sender, EventArgs e)
+        {
+            if (hayDatos())
+                fin();
+        }
+
+        bool cargarBusqueda()
+        {
+            dtcarbohidrato = obcarbohidrato.datosCarbohidratoNombre(txt_buscar.Text);
+            if (dtcarbohidrato != null)
+                dg1.DataSource = obcarbohidrato.datosCarbohidratoNombre(txt_buscar.Text);
+            else
+            {
+                MessageBox.Show(obcarbohidrato.ERROR);
+                return false;
+            }
+            return true;
+        }
+
+        int pos = -1;
+        string llave = "";
+
+        void cargarText()
+        {
+            if (hayDatos())
+            {
+                llave = dtcarbohidrato.Rows[pos][0].ToString();
+                t1.Text = dtcarbohidrato.Rows[pos][1].ToString();
+            }
+        }
+
+        void inicio()
+        {
+            pos = 0;
+            cargarText();
+        }
+
+        void fin()
+        {
+            pos = dtcarbohidrato.Rows.Count - 1;
+            cargarText();
+        }
+
+        void atras()
+        {
+            pos--;
+            cargarText();
+        }
+
+        void siguiente()
+        {
+            pos++;
+            cargarText();
+        }
+
+        bool insertarVitamina(OleDbTransaction tr)
+        {
+            if (obcarbohidrato.llave(tr) == "")
+                obcarbohidrato.vdatos[0] = "1";
+            else
+                obcarbohidrato.vdatos[0] = (int.Parse(obcarbohidrato.llave(tr)) + 1).ToString();
+            obcarbohidrato.vdatos[1] = t1.Text;
+            if (obcarbohidrato.insertar(tr) == 0)
+            {
+                MessageBox.Show(obcarbohidrato.ERROR);
+                ctr.desTR(tr);
+                return false;
+            }
+            return true;
+        }
+
+        bool insetarDatos()
+        {
+            OleDbTransaction tr = ctr.iniciarTransaccion();
+            if (insertarVitamina(tr))
+            {
+                ctr.finTR(tr);
+                return true;
+            }
+            return false;
+        }
+
+        bool actualizarVitamina(OleDbTransaction tr)
+        {
+            obcarbohidrato.vdatos[0] = llave;
+            obcarbohidrato.vdatos[1] = t1.Text;
+            if (obcarbohidrato.actualizar(tr) == 0)
+            {
+                MessageBox.Show(obcarbohidrato.ERROR);
+                ctr.desTR(tr);
+                return false;
+            }
+            return true;
+        }
+
+        bool actualizarDatos()
+        {
+            OleDbTransaction tr = ctr.iniciarTransaccion();
+            if (actualizarVitamina(tr))
+            {
+                ctr.finTR(tr);
+                return true;
+            }
+            return false;
+        }
+
+        bool eliminarVitamina(OleDbTransaction tr)
+        {
+            obcarbohidrato.vdatos[0] = llave;
+            if (obcarbohidrato.eliminar(tr) == 0)
+            {
+                MessageBox.Show(obcarbohidrato.ERROR);
+                ctr.desTR(tr);
+                return false;
+            }
+            return true;
+        }
+
+        bool eliminarDatos()
+        {
+            OleDbTransaction tr = ctr.iniciarTransaccion();
+            if (eliminarVitamina(tr))
+            {
+                    ctr.finTR(tr);
+                    return true;
+            }
+            return false;
+        }
+
+        bool hayDatos()
+        {
+            return dtcarbohidrato.Rows.Count != 0;
+        }
+
+        bool puedeSiguiente()
+        {
+            return pos < dtcarbohidrato.Rows.Count - 1;
+        }
+
+        bool puedeAtras()
+        {
+            return pos > 0;
+        }
+
+        private void FormCarbohidrato_Load(object sender, EventArgs e)
+        {
+
+        }
+     }
+  }

-    }
-}
+


Photo: удалить свойства Count, Items

Photo: удалить свойства Count, Items

#983


Use default camera device when initializing CameraPreviewImageSource

Reverts previous commit. Specifying back camera causes problems in some
devices.

--- RealtimeFilterDemoWindows/RealtimeFilterDemo.Shared/MainPageViewModel.cs
+++ RealtimeFilterDemoWindows/RealtimeFilterDemo.Shared/MainPageViewModel.cs
@@ -14,10 +14,8 @@
 using System.Collections.Generic;
 using System.ComponentModel;
 using System.Threading.Tasks;
-using Windows.Devices.Enumeration;
 using Windows.UI.Core;
 using Windows.UI.Xaml.Media.Imaging;
-using System.Linq;

 namespace RealtimeFilterDemo
 {
@@ -182,10 +180,8 @@
             Status = "Starting camera...";

             // Create a camera preview image source (from Imaging SDK)
-            DeviceInformationCollection devices = await Windows.Devices.Enumeration.DeviceInformation.FindAllAsync(Windows.Devices.Enumeration.DeviceClass.VideoCapture);
-            String backCameraId = devices.FirstOrDefault(x => x.EnclosureLocation != null && x.EnclosureLocation.Panel == Windows.Devices.Enumeration.Panel.Back).Id;
             _cameraPreviewImageSource = new CameraPreviewImageSource();
-            await _cameraPreviewImageSource.InitializeAsync(backCameraId);
+            await _cameraPreviewImageSource.InitializeAsync(string.Empty);
             var properties = await _cameraPreviewImageSource.StartPreviewAsync();

             // Create a preview bitmap with the correct aspect ratio


Added arg checks for CopyCuratedFeedTask

--- Source/NuGetGallery.Operations/Tasks/CuratedFeeds/CopyCuratedFeedTask.cs
+++ Source/NuGetGallery.Operations/Tasks/CuratedFeeds/CopyCuratedFeedTask.cs
@@ -3,6 +3,7 @@
 using System.Linq;
 using System.Text;
 using System.Threading.Tasks;
+using NuGetGallery.Operations.Common;

 namespace NuGetGallery.Operations.Tasks.CuratedFeeds
 {
@@ -87,6 +88,14 @@
         [Option("The name of the destination feed", AltName = "d")]
         public string DestinationFeed { get; set; }

+        public override void ValidateArguments()
+        {
+            base.ValidateArguments();
+
+            ArgCheck.Required(SourceFeed, "SourceFeed");
+            ArgCheck.Required(DestinationFeed, "DestinationFeed");
+        }
+
         public override void ExecuteCommand()
         {
             WithConnection((connection, db) =>


forget something

forget something

--- src/Avalonia.Controls/MenuItem.cs
+++ src/Avalonia.Controls/MenuItem.cs
@@ -14,8 +14,6 @@
 using Avalonia.Interactivity;
 using Avalonia.LogicalTree;
 using Avalonia.VisualTree;
-using Avalonia.Media;
-using Avalonia.Controls.Primitives.PopupPositioning;

 namespace Avalonia.Controls
 {


Add method to encrypt SecureMemoryHandle


Bump the max results to 1000

Bump the max results to 1000


fixed typo

fixed typo

--- src/ps_test/test_CorePsPlatform.cs
+++ src/ps_test/test_CorePsPlatform.cs
@@ -101,7 +101,8 @@
                 File.Create(path);
             }
             // Create a file to write to using StreamWriter.
-            // convert string to stream.  On Windows, this appears to be handled, but on *nix, we apparently need to convert to UTF8.
+            // convert string to stream.  On Windows, this appears to be handled, but on *nix,
+            // we apparently need to convert to UTF8.
             byte[] byteArray    = System.Text.Encoding.UTF8.GetBytes(path);
             MemoryStream stream = new MemoryStream(byteArray);


Fix display settings binding to configuration bindables in async load

--- osu.Game/Overlays/Settings/Sections/Graphics/LayoutSettings.cs
+++ osu.Game/Overlays/Settings/Sections/Graphics/LayoutSettings.cs
@@ -133,6 +133,15 @@
                 },
             };

+            scalingSettings.ForEach(s => bindPreviewEvent(s.Current));
+        }
+
+        protected override void LoadComplete()
+        {
+            base.LoadComplete();
+
+            windowModeDropdown.Current.ValueChanged += _ => updateResolutionDropdown();
+
             windowModes.BindCollectionChanged((sender, args) =>
             {
                 if (windowModes.Count > 1)
@@ -140,8 +149,6 @@
                 else
                     windowModeDropdown.Hide();
             }, true);
-
-            windowModeDropdown.Current.ValueChanged += _ => updateResolutionDropdown();

             currentDisplay.BindValueChanged(display => Schedule(() =>
             {
@@ -159,8 +166,6 @@
                 updateResolutionDropdown();
             }), true);

-            scalingSettings.ForEach(s => bindPreviewEvent(s.Current));
-
             scalingMode.BindValueChanged(mode =>
             {
                 scalingSettings.ClearTransforms();


refs insight#4748

refs insight#4748

--- test/FalkonryTests.cs
+++ test/FalkonryTests.cs
@@ -660,7 +660,7 @@

                 // use this tracker for checking the status of the process.
                 options = new SortedDictionary<string, string>();
-                options.Add("tarckerId", __id);
+                options.Add("trackerId", __id);
                 options.Add("responseFormat", "application/json");

                 httpResponse = falkonry.getHistoricalOutput(assessment, options);