text:
using Jil;
using Jil.Deserialize;
using Jil.Serialize;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace JilTests
{
    [TestClass]
    public class SpeedProofTests
    {
        private static uint _RandUInt(Random rand)
        {
            var bytes = new byte[4];
            rand.NextBytes(bytes);

            return BitConverter.ToUInt32(bytes, 0);
        }

        private static long _RandLong(Random rand)
        {
            var bytes = new byte[8];
            rand.NextBytes(bytes);

            return BitConverter.ToInt64(bytes, 0);
        }

        private static Guid _RandGuid(Random rand)
        {
            var bytes = new byte[16];
            rand.NextBytes(bytes);

            return new Guid(bytes);
        }

        private static char _RandChar(Random rand)
        {
            var lower = rand.Next(2) == 0;

            var ret = (char)('A' + rand.Next('Z' - 'A'));

            if (lower) ret = char.ToLower(ret);

            return ret;
        }

        public static T _RandEnum<T>(Random rand)
            where T : struct
        {
            var names = Enum.GetNames(typeof(T));

            var ix = rand.Next(names.Length);

            var retName = names[ix];

            return (T)Enum.Parse(typeof(T), retName);
        }

        public static T _RandFlagEnum<T>(Random rand)
            where T : struct
        {
            var ret = default(T);

            var values = Enum.GetValues(typeof(T)).Cast<T>().ToArray();

            var take = rand.Next(values.Length) + 1;

            for (var i = 0; i < take; i++)
            {
                var val = values[rand.Next(values.Length)];

                ret = (T)Enum.ToObject(typeof(T), Convert.ToUInt64(ret) | Convert.ToUInt64(val));
            }

            return ret;
        }

        public static string _RandString(Random rand, int? maxLength = null)
        {
            var len = 1 + rand.Next(maxLength ?? 20);

            var ret = new char[len];

            for (var i = 0; i < len; i++)
            {
                ret[i] = _RandChar(rand);
            }

            return new string(ret);
        }

        private static DateTime _RandDateTime(Random rand)
        {
            var year = 1 + rand.Next(3000);
            var month = 1 + rand.Next(12);
            var day = 1 + rand.Next(28);
            var hour = rand.Next(24);
            var minute = rand.Next(60);
            var second = rand.Next(60);

            return new DateTime(year, month, day, hour, minute, second, DateTimeKind.Utc);
        }

        private static void CompareTimes<T>(List<T> toSerialize, Jil.Options opts, Func<TextReader, int, T> a, Func<TextReader, int, T> b, out double aTimeMS, out double bTimeMS)
        {
            var asStrings = toSerialize.Select(o => Jil.JSON.Serialize(o, opts)).ToList();

            var aTimer = new Stopwatch();
            var bTimer = new Stopwatch();

            Action timeA =
                () =>
                {
                    aTimer.Start();
                    for (var i = 0; i < asStrings.Count; i++)
                    {
                        using (var str = new StringReader(asStrings[i]))
                        {
                            a(str, 0);
                        }
                    }
                    aTimer.Stop();
                };

            Action timeB =
                () =>
                {
                    bTimer.Start();
                    for (var i = 0; i < asStrings.Count; i++)
                    {
                        using (var str = new StringReader(asStrings[i]))
                        {
                            b(str, 0);
                        }
                    }
                    bTimer.Stop();
                };

            for (var i = 0; i < 5; i++)
            {
                timeA();
                timeB();
            }

            bTimer.Reset();
            aTimer.Reset();

            for (var i = 0; i < 100; i++)
            {
                var order = (i % 2) == 0;

                if (order)
                {
                    timeA();
                    timeB();
                }
                else
                {
                    timeB();
                    timeA();
                }
            }

            aTimeMS = aTimer.ElapsedMilliseconds;
            bTimeMS = bTimer.ElapsedMilliseconds;
        }

        private static void CompareTimes<T>(List<T> toSerialize, Action<TextWriter, T, int> a, Action<TextWriter, T, int> b, out double aTimeMS, out double bTimeMS, bool checkCorrectness = true)
        {
            var aTimer = new Stopwatch();
            var bTimer = new Stopwatch();

            // Some of our optimizations change the produced string, so we can conditionally suppress this
            if (checkCorrectness)
            {
                foreach (var item in toSerialize)
                {
                    using (var aStr = new StringWriter())
                    using (var bStr = new StringWriter())
                    {
                        a(aStr, item, 0);
                        b(bStr, item, 0);

                        Assert.AreEqual(aStr.ToString(), bStr.ToString());
                    }
                }
            }

            Action timeA =
                () =>
                {
                    aTimer.Start();
                    for (var i = 0; i < toSerialize.Count; i++)
                    {
                        using (var str = new StringWriter())
                        {
                            a(str, toSerialize[i], 0);
                        }
                    }
                    aTimer.Stop();
                };

            Action timeB =
                () =>
                {
                    bTimer.Start();
                    for (var i = 0; i < toSerialize.Count; i++)
                    {
                        using (var str = new StringWriter())
                        {
                            b(str, toSerialize[i], 0);
                        }
                    }
                    bTimer.Stop();
                };

            for (var i = 0; i < 5; i++)
            {
                timeA();
                timeB();
            }

            bTimer.Reset();
            aTimer.Reset();

            for (var i = 0; i < 100; i++)
            {
                var order = (i % 2) == 0;

                if (order)
                {
                    timeA();
                    timeB();
                }
                else
                {
                    timeB();
                    timeA();
                }
            }

            aTimeMS = aTimer.ElapsedMilliseconds;
            bTimeMS = bTimer.ElapsedMilliseconds;
        }

        // These tests make *no sense* in debug
#if !DEBUG

        public class _ReorderMembers
        {
            public int Foo;
            public string Bar;
            public double Fizz;
            public decimal Buzz;
            public char Hello;
            public string[] World;
        }

        [TestMethod]
        public void ReorderMembers()
        {
            Action<TextWriter, _ReorderMembers, int> memoryOrder;
            Action<TextWriter, _ReorderMembers, int> normalOrder;

            try
            {
                {
                    InlineSerializer<_ReorderMembers>.ReorderMembers = true;
                    Exception ignored;

                    // Build the *actual* serializer method
                    memoryOrder = InlineSerializerHelper.Build<_ReorderMembers>(typeof(Jil.Serialize.MicrosoftStyle), pretty: false, excludeNulls: false, jsonp: false, dateFormat: DateTimeFormat.MicrosoftStyleMillisecondsSinceUnixEpoch, includeInherited: false, dateTimeBehavior: UnspecifiedDateTimeKindBehavior.IsLocal, serializationNameFormat: SerializationNameFormat.Verbatim, exceptionDuringBuild: out ignored);
                }

                {
                    InlineSerializer<_ReorderMembers>.ReorderMembers = false;
                    Exception ignored;

                    // Build the *actual* serializer method
                    normalOrder = InlineSerializerHelper.Build<_ReorderMembers>(typeof(Jil.Serialize.MicrosoftStyle), pretty: false, excludeNulls: false, jsonp: false, dateFormat: DateTimeFormat.MicrosoftStyleMillisecondsSinceUnixEpoch, includeInherited: false, dateTimeBehavior: UnspecifiedDateTimeKindBehavior.IsLocal, serializationNameFormat: SerializationNameFormat.Verbatim, exceptionDuringBuild: out ignored);
                }
            }
            finally
            {
                InlineSerializer<_ReorderMembers>.ReorderMembers = true;
            }

            var rand = new Random(1160428);

            var toSerialize = new List<_ReorderMembers>();
            for (var i = 0; i < 10000; i++)
            {
                toSerialize.Add(
                    new _ReorderMembers
                    {
                        Bar = _RandString(rand),
                        Buzz = ((decimal)rand.NextDouble()) * decimal.MaxValue,
                        Fizz = rand.NextDouble() * double.MaxValue,
                        Foo = rand.Next(int.MaxValue),
                        Hello = _RandChar(rand),
                        World = Enumerable.Range(0, rand.Next(100)).Select(s => _RandString(rand)).ToArray()
                    }
                );
            }

            toSerialize = toSerialize.Select(_ => new { _ = _, Order = rand.Next() }).OrderBy(o => o.Order).Select(o => o._).Where((o, ix) => ix % 2 == 0).ToList();

            double reorderedTime, normalOrderTime;
            CompareTimes(toSerialize, memoryOrder, normalOrder, out reorderedTime, out normalOrderTime, checkCorrectness: false);

            var msg = "reorderedTime = " + reorderedTime + ", normalOrderTime = " + normalOrderTime;

            Assert.IsTrue(reorderedTime < normalOrderTime, msg);
        }

        public class _UseCustomIntegerToString
        {
            public byte A;
            public sbyte B;
            public short C;
            public ushort D;
            public int E;
            public uint F;
            public long G;
            public ulong H;
        }

        [TestMethod]
        public void UseCustomIntegerToString()
        {
            Action<TextWriter, _UseCustomIntegerToString, int> custom;
            Action<TextWriter, _UseCustomIntegerToString, int> normal;

            try
            {
                {
                    InlineSerializer<_UseCustomIntegerToString>.UseCustomIntegerToString = true;
                    Exception ignored;

                    // Build the *actual* serializer method
                    custom = InlineSerializerHelper.Build<_UseCustomIntegerToString>(typeof(Jil.Serialize.MicrosoftStyle), pretty: false, excludeNulls: false, jsonp: false, dateFormat: DateTimeFormat.MicrosoftStyleMillisecondsSinceUnixEpoch, includeInherited: false, dateTimeBehavior: UnspecifiedDateTimeKindBehavior.IsLocal, serializationNameFormat: SerializationNameFormat.Verbatim, exceptionDuringBuild: out ignored);
                }

                {
                    InlineSerializer<_UseCustomIntegerToString>.UseCustomIntegerToString = false;
                    Exception ignored;

                    // Build the *actual* serializer method
                    normal = InlineSerializerHelper.Build<_UseCustomIntegerToString>(typeof(Jil.Serialize.MicrosoftStyle), pretty: false, excludeNulls: false, jsonp: false, dateFormat: DateTimeFormat.MicrosoftStyleMillisecondsSinceUnixEpoch, includeInherited: false, dateTimeBehavior: UnspecifiedDateTimeKindBehavior.IsLocal, serializationNameFormat: SerializationNameFormat.Verbatim, exceptionDuringBuild: out ignored);
                }
            }
            finally
            {
                InlineSerializer<_UseCustomIntegerToString>.UseCustomIntegerToString = true;
            }

            var rand = new Random(139426720);

            var toSerialize = new List<_UseCustomIntegerToString>();
            for (var i = 0; i < 10000; i++)
            {
                toSerialize.Add(
                    new _UseCustomIntegerToString
                    {
                        A = (byte)(101 + rand.Next(155)),
                        B = (sbyte)(101 + rand.Next(27)),
                        C = (short)(101 + rand.Next(1000)),
                        D = (ushort)(101 + rand.Next(1000)),
                        E = 101 + rand.Next(int.MaxValue - 101),
                        F = (uint)(101 + rand.Next(int.MaxValue - 101)),
                        G = (long)(101 + rand.Next(int.MaxValue)),
                        H = (ulong)(101 + rand.Next(int.MaxValue))
                    }
                );
            }

            toSerialize = toSerialize.Select(_ => new { _ = _, Order = rand.Next() }).OrderBy(o => o.Order).Select(o => o._).Where((o, ix) => ix % 2 == 0).ToList();

            double customTime, normalTime;
            CompareTimes(toSerialize, custom, normal, out customTime, out normalTime);

            Assert.IsTrue(customTime < normalTime, "customTime = " + customTime + ", normalTime = " + normalTime);
        }

        public class _SkipDateTimeMathMethods
        {
            public DateTime[] Dates;
        }

        [TestMethod]
        public void SkipDateTimeMathMethods()
        {
            Action<TextWriter, _SkipDateTimeMathMethods, int> skipped;
            Action<TextWriter, _SkipDateTimeMathMethods, int> normal;

            try
            {
                {
                    InlineSerializer<_SkipDateTimeMathMethods>.SkipDateTimeMathMethods = true;
                    Exception ignored;

                    // Build the *actual* serializer method
                    skipped = InlineSerializerHelper.Build<_SkipDateTimeMathMethods>(typeof(Jil.Serialize.MicrosoftStyle), pretty: false, excludeNulls: false, jsonp: false, dateFormat: DateTimeFormat.MicrosoftStyleMillisecondsSinceUnixEpoch, includeInherited: false, dateTimeBehavior: UnspecifiedDateTimeKindBehavior.IsLocal, serializationNameFormat: SerializationNameFormat.Verbatim, exceptionDuringBuild: out ignored);
                }

                {
                    InlineSerializer<_SkipDateTimeMathMethods>.SkipDateTimeMathMethods = false;
                    Exception ignored;

                    // Build the *actual* serializer method
                    normal = InlineSerializerHelper.Build<_SkipDateTimeMathMethods>(typeof(Jil.Serialize.MicrosoftStyle), pretty: false, excludeNulls: false, jsonp: false, dateFormat: DateTimeFormat.MicrosoftStyleMillisecondsSinceUnixEpoch, includeInherited: false, dateTimeBehavior: UnspecifiedDateTimeKindBehavior.IsLocal, serializationNameFormat: SerializationNameFormat.Verbatim, exceptionDuringBuild: out ignored);
                }
            }
            finally
            {
                InlineSerializer<_SkipDateTimeMathMethods>.SkipDateTimeMathMethods = true;
            }

            var rand = new Random(66262484);

            var toSerialize = new List<_SkipDateTimeMathMethods>();
            for (var i = 0; i < 1000; i++)
            {
                var numDates = new DateTime[5 + rand.Next(10)];

                for (var j = 0; j < numDates.Length; j++)
                {
                    numDates[j] = _RandDateTime(rand);
                }

                toSerialize.Add(
                    new _SkipDateTimeMathMethods
                    {
                        Dates = numDates
                    }
                );
            }

            toSerialize = toSerialize.Select(_ => new { _ = _, Order = rand.Next() }).OrderBy(o => o.Order).Select(o => o._).Where((o, ix) => ix % 2 == 0).ToList();

            double skippedTime, normalTime;
            CompareTimes(toSerialize, skipped, normal, out skippedTime, out normalTime);

            Assert.IsTrue(skippedTime < normalTime, "skippedTime = " + skippedTime + ", normalTime = " + normalTime);
        }

        public class _UseCustomISODateFormatting
        {
            public List<DateTime> Dates;
        }

        [TestMethod]
        public void UseCustomISODateFormatting()
        {
            Action<TextWriter, _UseCustomISODateFormatting, int> skipped;
            Action<TextWriter, _UseCustomISODateFormatting, int> normal;

            try
            {
                {
                    InlineSerializer<_UseCustomISODateFormatting>.UseCustomISODateFormatting = true;
                    Exception ignored;

                    // Build the *actual* serializer method
                    skipped = InlineSerializerHelper.Build<_UseCustomISODateFormatting>(typeof(Jil.Serialize.MicrosoftStyle), dateFormat: Jil.DateTimeFormat.ISO8601, pretty: false, excludeNulls: false, jsonp: false, includeInherited: false, dateTimeBehavior: UnspecifiedDateTimeKindBehavior.IsLocal, serializationNameFormat: SerializationNameFormat.Verbatim, exceptionDuringBuild: out ignored);
                }

                {
                    InlineSerializer<_UseCustomISODateFormatting>.UseCustomISODateFormatting = false;
                    Exception ignored;

                    // Build the *actual* serializer method
                    normal = InlineSerializerHelper.Build<_UseCustomISODateFormatting>(typeof(Jil.Serialize.MicrosoftStyle), dateFormat: Jil.DateTimeFormat.ISO8601, pretty: false, excludeNulls: false, jsonp: false, includeInherited: false, dateTimeBehavior: UnspecifiedDateTimeKindBehavior.IsLocal, serializationNameFormat: SerializationNameFormat.Verbatim, exceptionDuringBuild: out ignored);
                }
            }
            finally
            {
                InlineSerializer<_UseCustomISODateFormatting>.UseCustomISODateFormatting = true;
            }

            var rand = new Random(39432715);

            var toSerialize = new List<_UseCustomISODateFormatting>();
            for (var i = 0; i < 1000; i++)
            {
                var numDates = new DateTime[5 + rand.Next(10)];

                for (var j = 0; j < numDates.Length; j++)
                {
                    numDates[j] = _RandDateTime(rand);
                }

                toSerialize.Add(
                    new _UseCustomISODateFormatting
                    {
                        Dates = numDates.ToList()
                    }
                );
            }

            toSerialize = toSerialize.Select(_ => new { _ = _, Order = rand.Next() }).OrderBy(o => o.Order).Select(o => o._).Where((o, ix) => ix % 2 == 0).ToList();

            double skippedTime, normalTime;
            CompareTimes(toSerialize, skipped, normal, out skippedTime, out normalTime);

            Assert.IsTrue(skippedTime < normalTime, "skippedTime = " + skippedTime + ", normalTime = " + normalTime);
        }

        class _UseFastLists
        {
            public List<int> A { get; set; }
            public int[] B { get; set; }
            public IList<string> C { get; set; }
        }

        [TestMethod]
        public void UseFastLists()
        {
            Action<TextWriter, _UseFastLists, int> fast;
            Action<TextWriter, _UseFastLists, int> normal;

            try
            {
                {
                    InlineSerializer<_UseFastLists>.UseFastLists = true;
                    Exception ignored;

                    // Build the *actual* serializer method
                    fast = InlineSerializerHelper.Build<_UseFastLists>(typeof(Jil.Serialize.MicrosoftStyle), pretty: false, excludeNulls: false, jsonp: false, dateFormat: DateTimeFormat.MicrosoftStyleMillisecondsSinceUnixEpoch, includeInherited: false, dateTimeBehavior: UnspecifiedDateTimeKindBehavior.IsLocal, serializationNameFormat: SerializationNameFormat.Verbatim, exceptionDuringBuild: out ignored);
                }

                {
                    InlineSerializer<_UseFastLists>.UseFastLists = false;
                    Exception ignored;

                    // Build the *actual* serializer method
                    normal = InlineSerializerHelper.Build<_UseFastLists>(typeof(Jil.Serialize.MicrosoftStyle), pretty: false, excludeNulls: false, jsonp: false, dateFormat: DateTimeFormat.MicrosoftStyleMillisecondsSinceUnixEpoch, includeInherited: false, dateTimeBehavior: UnspecifiedDateTimeKindBehavior.IsLocal, serializationNameFormat: SerializationNameFormat.Verbatim, exceptionDuringBuild: out ignored);
                }
            }
            finally
            {
                InlineSerializer<_UseFastLists>.UseFastLists = true;
            }

            var rand = new Random(2323284);

            var toSerialize = new List<_UseFastLists>();
            for (var i = 0; i < 2000; i++)
            {
                toSerialize.Add(
                    new _UseFastLists
                    {
                        A = Enumerable.Range(0, 5 + rand.Next(10)).Select(_ => rand.Next()).ToList(),
                        B = Enumerable.Range(0, 10 + rand.Next(5)).Select(_ => rand.Next()).ToArray(),
                        C = Enumerable.Range(0, 7 + rand.Next(8)).Select(_ => _RandString(rand)).ToList().AsReadOnly()
                    }
                );
            }

            toSerialize = toSerialize.Select(_ => new { _ = _, Order = rand.Next() }).OrderBy(o => o.Order).Select(o => o._).Where((o, ix) => ix % 2 == 0).ToList();

            double fastTime, normalTime;
            CompareTimes(toSerialize, fast, normal, out fastTime, out normalTime);

            Assert.IsTrue(fastTime < normalTime, "fastTime = " + fastTime + ", normalTime = " + normalTime);
        }

        class _UseFastArrays
        {
            public int[] A { get; set; }
            public double[] B { get; set; }
            public string[] C { get; set; }
        }

        [TestMethod]
        public void UseFastArrays()
        {
            Action<TextWriter, _UseFastArrays, int> fast;
            Action<TextWriter, _UseFastArrays, int> normal;

            try
            {
                {
                    InlineSerializer<_UseFastArrays>.UseFastArrays = true;
                    Exception ignored;

                    // Build the *actual* serializer method
                    fast = InlineSerializerHelper.Build<_UseFastArrays>(typeof(Jil.Serialize.MicrosoftStyle), pretty: false, excludeNulls: false, jsonp: false, dateFormat: DateTimeFormat.MicrosoftStyleMillisecondsSinceUnixEpoch, includeInherited: false, dateTimeBehavior: UnspecifiedDateTimeKindBehavior.IsLocal, serializationNameFormat: SerializationNameFormat.Verbatim, exceptionDuringBuild: out ignored);
                }

                {
                    InlineSerializer<_UseFastArrays>.UseFastArrays = false;
                    Exception ignored;

                    // Build the *actual* serializer method
                    normal = InlineSerializerHelper.Build<_UseFastArrays>(typeof(Jil.Serialize.MicrosoftStyle), pretty: false, excludeNulls: false, jsonp: false, dateFormat: DateTimeFormat.MicrosoftStyleMillisecondsSinceUnixEpoch, includeInherited: false, dateTimeBehavior: UnspecifiedDateTimeKindBehavior.IsLocal, serializationNameFormat: SerializationNameFormat.Verbatim, exceptionDuringBuild: out ignored);
                }
            }
            finally
            {
                InlineSerializer<_UseFastArrays>.UseFastArrays = true;
            }

            var rand = new Random(2323284);

            var toSerialize = new List<_UseFastArrays>();
            for (var i = 0; i < 2000; i++)
            {
                toSerialize.Add(
                    new _UseFastArrays
                    {
                        A = Enumerable.Range(0, 5 + rand.Next(10)).Select(_ => rand.Next()).ToArray(),
                        B = Enumerable.Range(0, 10 + rand.Next(5)).Select(_ => rand.NextDouble()).ToArray(),
                        C = Enumerable.Range(0, 7 + rand.Next(8)).Select(_ => _RandString(rand)).ToArray()
                    }
                );
            }

            toSerialize = toSerialize.Select(_ => new { _ = _, Order = rand.Next() }).OrderBy(o => o.Order).Select(o => o._).Where((o, ix) => ix % 2 == 0).ToList();

            double fastTime, normalTime;
            CompareTimes(toSerialize, fast, normal, out fastTime, out normalTime);

            Assert.IsTrue(fastTime < normalTime, "fastTime = " + fastTime + ", normalTime = " + normalTime);
        }

        class _UseFastGuids
        {
            public Guid A;
            public Guid? B;
            public List<Guid> C;
            public Dictionary<string, Guid> D;
        }

        [TestMethod]
        public void UseFastGuids()
        {
            Action<TextWriter, _UseFastGuids, int> fast;
            Action<TextWriter, _UseFastGuids, int> normal;

            try
            {
                {
                    InlineSerializer<_UseFastGuids>.UseFastGuids = true;
                    Exception ignored;

                    // Build the *actual* serializer method
                    fast = InlineSerializerHelper.Build<_UseFastGuids>(typeof(Jil.Serialize.MicrosoftStyle), pretty: false, excludeNulls: false, jsonp: false, dateFormat: DateTimeFormat.MicrosoftStyleMillisecondsSinceUnixEpoch, includeInherited: false, dateTimeBehavior: UnspecifiedDateTimeKindBehavior.IsLocal, serializationNameFormat: SerializationNameFormat.Verbatim, exceptionDuringBuild: out ignored);
                }

                {
                    InlineSerializer<_UseFastGuids>.UseFastGuids = false;
                    Exception ignored;

                    // Build the *actual* serializer method
                    normal = InlineSerializerHelper.Build<_UseFastGuids>(typeof(Jil.Serialize.MicrosoftStyle), pretty: false, excludeNulls: false, jsonp: false, dateFormat: DateTimeFormat.MicrosoftStyleMillisecondsSinceUnixEpoch, includeInherited: false, dateTimeBehavior: UnspecifiedDateTimeKindBehavior.IsLocal, serializationNameFormat: SerializationNameFormat.Verbatim, exceptionDuringBuild: out ignored);
                }
            }
            finally
            {
                InlineSerializer<_UseFastGuids>.UseFastGuids = true;
            }

            var rand = new Random(70490340);

            var toSerialize = new List<_UseFastGuids>();
            for (var i = 0; i < 2000; i++)
            {
                toSerialize.Add(
                    new _UseFastGuids
                    {
                        A = _RandGuid(rand),
                        B = rand.Next(2) == 0 ? null : (Guid?)_RandGuid(rand),
                        C = Enumerable.Range(0, 7 + rand.Next(8)).Select(_ => _RandGuid(rand)).ToList(),
                        D = Enumerable.Range(0, 5 + rand.Next(5)).ToDictionary(d => _RandString(rand) + _RandString(rand), d => _RandGuid(rand))
                    }
                );
            }

            toSerialize = toSerialize.Select(_ => new { _ = _, Order = rand.Next() }).OrderBy(o => o.Order).Select(o => o._).Where((o, ix) => ix % 2 == 0).ToList();

            double fastTime, normalTime;
            CompareTimes(toSerialize, fast, normal, out fastTime, out normalTime);

            Assert.IsTrue(fastTime < normalTime, "fastTime = " + fastTime + ", normalTime = " + normalTime);
        }

        class _AllocationlessDictionaries
        {
            public Dictionary<string, int> A;
        }

        [TestMethod]
        public void AllocationlessDictionaries()
        {
            Action<TextWriter, _AllocationlessDictionaries, int> allocationless;
            Action<TextWriter, _AllocationlessDictionaries, int> normal;

            try
            {
                {
                    InlineSerializer<_AllocationlessDictionaries>.AllocationlessDictionaries = true;
                    Exception ignored;

                    // Build the *actual* serializer method
                    allocationless = InlineSerializerHelper.Build<_AllocationlessDictionaries>(typeof(Jil.Serialize.MicrosoftStyle), pretty: false, excludeNulls: false, jsonp: false, dateFormat: DateTimeFormat.MicrosoftStyleMillisecondsSinceUnixEpoch, includeInherited: false, dateTimeBehavior: UnspecifiedDateTimeKindBehavior.IsLocal, serializationNameFormat: SerializationNameFormat.Verbatim, exceptionDuringBuild: out ignored);
                }

                {
                    InlineSerializer<_AllocationlessDictionaries>.AllocationlessDictionaries = false;
                    Exception ignored;

                    // Build the *actual* serializer method
                    normal = InlineSerializerHelper.Build<_AllocationlessDictionaries>(typeof(Jil.Serialize.MicrosoftStyle), pretty: false, excludeNulls: false, jsonp: false, dateFormat: DateTimeFormat.MicrosoftStyleMillisecondsSinceUnixEpoch, includeInherited: false, dateTimeBehavior: UnspecifiedDateTimeKindBehavior.IsLocal, serializationNameFormat: SerializationNameFormat.Verbatim, exceptionDuringBuild: out ignored);
                }
            }
            finally
            {
                InlineSerializer<_AllocationlessDictionaries>.AllocationlessDictionaries = true;
            }

            var rand = new Random(202457890);

            var toSerialize = new List<_AllocationlessDictionaries>();
            for (var i = 0; i < 2000; i++)
            {
                toSerialize.Add(
                    new _AllocationlessDictionaries
                    {
                        A = Enumerable.Range(0, 5 + rand.Next(5)).ToDictionary(_ => new string(("" + _)[0], 5 + rand.Next(10)), _ => rand.Next())
                    }
                );
            }

            toSerialize = toSerialize.Select(_ => new { _ = _, Order = rand.Next() }).OrderBy(o => o.Order).Select(o => o._).Where((o, ix) => ix % 2 == 0).ToList();

            double allocationlessTime, normalTime;
            CompareTimes(toSerialize, allocationless, normal, out allocationlessTime, out normalTime);

            Assert.IsTrue(allocationlessTime < normalTime, "allocationlessTime = " + allocationlessTime + ", normalTime = " + normalTime);
        }

        class _PropagateConstants
        {
            public const bool F1 = true;
            public bool P1 { get { return false; } }

            public const byte F2 = 100;
            public byte P2 { get { return 200; } }

            public const sbyte F3 = -1;
            public sbyte P3 { get { return -100; } }

            public const short F4 = -1000;
            public short P4 { get { return 1000; } }

            public const ushort F5 = 6000;
            public ushort P5 { get { return 12000; } }

            public const int F6 = -1000000;
            public int P6 { get { return 2000000; } }

            public const uint F7 = 4000000000;
            public uint P7 { get { return 4000000001; } }

            public const long F8 = long.MaxValue;
            public long P8 { get { return long.MinValue; } }

            public const ulong F9 = ulong.MaxValue;
            public ulong P9 { get { return 18446744073709551614UL; } }

            public const string F10 = "hello world";
            public string P10 { get { return null; } }

            public const char F11 = '\u1234';
            public char P11 { get { return '\u5678'; } }
        }

        [TestMethod]
        public void PropagateConstants()
        {
            Action<TextWriter, _PropagateConstants, int> propagated;
            Action<TextWriter, _PropagateConstants, int> normal;

            try
            {
                {
                    InlineSerializer<_PropagateConstants>.PropagateConstants = true;
                    Exception ignored;

                    // Build the *actual* serializer method
                    propagated = InlineSerializerHelper.Build<_PropagateConstants>(typeof(Jil.Serialize.MicrosoftStyle), pretty: false, excludeNulls: false, jsonp: false, dateFormat: DateTimeFormat.MicrosoftStyleMillisecondsSinceUnixEpoch, includeInherited: false, dateTimeBehavior: UnspecifiedDateTimeKindBehavior.IsLocal, serializationNameFormat: SerializationNameFormat.Verbatim, exceptionDuringBuild: out ignored);
                }

                {
                    InlineSerializer<_PropagateConstants>.PropagateConstants = false;
                    Exception ignored;

                    // Build the *actual* serializer method
                    normal = InlineSerializerHelper.Build<_PropagateConstants>(typeof(Jil.Serialize.MicrosoftStyle), pretty: false, excludeNulls: false, jsonp: false, dateFormat: DateTimeFormat.MicrosoftStyleMillisecondsSinceUnixEpoch, includeInherited: false, dateTimeBehavior: UnspecifiedDateTimeKindBehavior.IsLocal, serializationNameFormat: SerializationNameFormat.Verbatim, exceptionDuringBuild: out ignored);
                }
            }
            finally
            {
                InlineSerializer<_PropagateConstants>.PropagateConstants = true;
            }

            var rand = new Random(202457890);

            var toSerialize = new List<_PropagateConstants>();
            for (var i = 0; i < 2000; i++)
            {
                toSerialize.Add(new _PropagateConstants { });
            }

            toSerialize = toSerialize.Select(_ => new { _ = _, Order = rand.Next() }).OrderBy(o => o.Order).Select(o => o._).Where((o, ix) => ix % 2 == 0).ToList();

            double allocationlessTime, normalTime;
            CompareTimes(toSerialize, propagated, normal, out allocationlessTime, out normalTime);

            Assert.IsTrue(allocationlessTime < normalTime, "propagatedTime = " + allocationlessTime + ", normalTime = " + normalTime);
        }

        class _UseHashWhenMatchingMembers
        {
            public enum UserType : byte
            {
                unregistered = 2,
                registered = 3,
                moderator = 4,
                does_not_exist = 255
            }

            public int? user_id { get; set; }
            public string display_name { get; set; }
            public int? reputation { get; set; }
            public UserType? user_type { get; set; }
            public string link { get; set; }
            public int? accept_rate { get; set; }
        }

        [TestMethod]
        public void DynamicDeserializer_UseFastNumberParsing()
        {
            try
            {
                Func<TextReader, int, double> fast =
                    (txt, _) =>
                    {
                        Jil.DeserializeDynamic.DynamicDeserializer.UseFastNumberParsing = true;

                        var ret = Jil.JSON.DeserializeDynamic(txt); ;

                        return (double)ret;
                    };
                Func<TextReader, int, double> normal =
                    (txt, _) =>
                    {
                        Jil.DeserializeDynamic.DynamicDeserializer.UseFastNumberParsing = false;

                        var ret = Jil.JSON.DeserializeDynamic(txt); ;

                        return (double)ret;
                    };

                var rand = new Random(201523240);

                var toSerialize = new List<double>();
                for (var i = 0; i < 3000; i++)
                {
                    var val = rand.NextDouble();
                    val *= rand.Next();

                    if (rand.Next(2) == 0) val = -val;

                    toSerialize.Add(val);
                }

                toSerialize = toSerialize.Select(_ => new { _ = _, Order = rand.Next() }).OrderBy(o => o.Order).Select(o => o._).Where((o, ix) => ix % 2 == 0).ToList();

                double fastTime, normalTime;
                CompareTimes(toSerialize, Jil.Options.Default, fast, normal, out fastTime, out normalTime);

                Assert.IsTrue(fastTime < normalTime, "fastTime = " + fastTime + ", normalTime = " + normalTime);
            }
            finally
            {
                Jil.DeserializeDynamic.DynamicDeserializer.UseFastNumberParsing = true;
            }
        }

        [TestMethod]
        public void DynamicDeserializer_UseFastIntegerConversion()
        {
            try
            {
                Func<TextReader, int, int> fast =
                    (txt, _) =>
                    {
                        Jil.DeserializeDynamic.DynamicDeserializer.UseFastIntegerConversion = true;

                        var ret = Jil.JSON.DeserializeDynamic(txt);

                        return (int)ret;
                    };
                Func<TextReader, int, int> normal =
                    (txt, _) =>
                    {
                        Jil.DeserializeDynamic.DynamicDeserializer.UseFastIntegerConversion = false;

                        var ret = Jil.JSON.DeserializeDynamic(txt); ;

                        return (int)ret;
                    };

                var rand = new Random(211641195);

                var toSerialize = new List<int>();
                for (var i = 0; i < 10000; i++)
                {
                    var val = rand.Next();
                    if (rand.Next(2) == 0) val = -val;

                    toSerialize.Add(val);
                }

                toSerialize = toSerialize.Select(_ => new { _ = _, Order = rand.Next() }).OrderBy(o => o.Order).Select(o => o._).Where((o, ix) => ix % 2 == 0).ToList();

                double fastTime, normalTime;
                CompareTimes(toSerialize, Jil.Options.Default, fast, normal, out fastTime, out normalTime);

                Assert.IsTrue(fastTime < normalTime, "fastTime = " + fastTime + ", normalTime = " + normalTime);
            }
            finally
            {
                Jil.DeserializeDynamic.DynamicDeserializer.UseFastIntegerConversion = true;
            }
        }

        enum _UseNameAutomataWhenMatchingEnums
        {
            Hello,
            World,
            Fizz,
            Buzz,
            Baz,
            Bar
        }

        [TestMethod]
        public void UseNameAutomataWhenMatchingEnums()
        {
            Func<TextReader, int, _UseNameAutomataWhenMatchingEnums> automata;
            Func<TextReader, int, _UseNameAutomataWhenMatchingEnums> method;

            try
            {
                {
                    InlineDeserializer<_UseNameAutomataWhenMatchingEnums>.UseNameAutomataForEnums = true;
                    Exception ignored;

                    // Build the *actual* deserializer method
                    automata = InlineDeserializerHelper.BuildFromStream<_UseNameAutomataWhenMatchingEnums>(typeof(Jil.Deserialize.TypeCache<Jil.Deserialize.MicrosoftStyle, _UseNameAutomataWhenMatchingEnums>), dateFormat: Jil.DateTimeFormat.MicrosoftStyleMillisecondsSinceUnixEpoch, serializationNameFormat: SerializationNameFormat.Verbatim, exceptionDuringBuild: out ignored);
                }

                {
                    InlineDeserializer<_UseNameAutomataWhenMatchingEnums>.UseNameAutomataForEnums = false;
                    Exception ignored;

                    // Build the *actual* deserializer method
                    method = InlineDeserializerHelper.BuildFromStream<_UseNameAutomataWhenMatchingEnums>(typeof(Jil.Deserialize.TypeCache<Jil.Deserialize.MicrosoftStyle, _UseHashWhenMatchingMembers>), dateFormat: Jil.DateTimeFormat.MicrosoftStyleMillisecondsSinceUnixEpoch, serializationNameFormat: SerializationNameFormat.Verbatim, exceptionDuringBuild: out ignored);
                }
            }
            finally
            {
                InlineDeserializer<_UseNameAutomataWhenMatchingEnums>.UseNameAutomataForEnums = true;
            }

            var rand = new Random(191112901);

            var toSerialize = new List<_UseNameAutomataWhenMatchingEnums>();
            for (var i = 0; i < 2000; i++)
            {
                toSerialize.Add(_RandEnum<_UseNameAutomataWhenMatchingEnums>(rand));
            }

            toSerialize = toSerialize.Select(_ => new { _ = _, Order = rand.Next() }).OrderBy(o => o.Order).Select(o => o._).Where((o, ix) => ix % 2 == 0).ToList();

            double automataTime, methodTime;
            CompareTimes(toSerialize, Jil.Options.Default, automata, method, out automataTime, out methodTime);

            Assert.IsTrue(automataTime < methodTime, "automataTime = " + automataTime + ", methodTime = " + methodTime);
        }

        class _UseCustomWriteIntUnrolledSigned
        {
            public List<int> A { get; set; }
        }

        [TestMethod]
        public void UseCustomWriteIntUnrolledSigned()
        {
            Action<TextWriter, _UseCustomWriteIntUnrolledSigned, int> signed;
            Action<TextWriter, _UseCustomWriteIntUnrolledSigned, int> normal;

            try
            {
                {
                    InlineSerializer<_UseCustomWriteIntUnrolledSigned>.UseCustomWriteIntUnrolled = true;
                    Exception ignored;

                    // Build the *actual* serializer method
                    signed = InlineSerializerHelper.Build<_UseCustomWriteIntUnrolledSigned>(typeof(Jil.Serialize.MicrosoftStyle), pretty: false, excludeNulls: false, jsonp: false, dateFormat: DateTimeFormat.MicrosoftStyleMillisecondsSinceUnixEpoch, includeInherited: false, dateTimeBehavior: UnspecifiedDateTimeKindBehavior.IsLocal, serializationNameFormat: SerializationNameFormat.Verbatim, exceptionDuringBuild: out ignored);
                }

                {
                    InlineSerializer<_UseCustomWriteIntUnrolledSigned>.UseCustomWriteIntUnrolled = false;
                    Exception ignored;

                    // Build the *actual* serializer method
                    normal = InlineSerializerHelper.Build<_UseCustomWriteIntUnrolledSigned>(typeof(Jil.Serialize.MicrosoftStyle), pretty: false, excludeNulls: false, jsonp: false, dateFormat: DateTimeFormat.MicrosoftStyleMillisecondsSinceUnixEpoch, includeInherited: false, dateTimeBehavior: UnspecifiedDateTimeKindBehavior.IsLocal, serializationNameFormat: SerializationNameFormat.Verbatim, exceptionDuringBuild: out ignored);
                }
            }
            finally
            {
                InlineSerializer<_UseCustomWriteIntUnrolledSigned>.UseCustomWriteIntUnrolled = true;
            }

            var rand = new Random(27899810);

            var toSerialize = new List<_UseCustomWriteIntUnrolledSigned>();
            for (var i = 0; i < 1000; i++)
            {
                toSerialize.Add(
                    new _UseCustomWriteIntUnrolledSigned
                    {
                        A = Enumerable.Range(0, rand.Next(1, 1000)).Select(_ => rand.Next(2) == 0 ? rand.Next() : -rand.Next()).ToList()
                    }
                );
            }

            toSerialize = toSerialize.Select(_ => new { _ = _, Order = rand.Next() }).OrderBy(o => o.Order).Select(o => o._).Where((o, ix) => ix % 2 == 0).ToList();

            double signedTime, normalTime;
            CompareTimes(toSerialize, signed, normal, out signedTime, out normalTime);

            Assert.IsTrue(signedTime < normalTime, "signedTime = " + signedTime + ", normalTime = " + normalTime);
        }

        class _UseNameAutomata
        {
            public enum UserType : byte
            {
                unregistered = 2,
                registered = 3,
                moderator = 4,
                does_not_exist = 255
            }

            public int? user_id { get; set; }
            public string display_name { get; set; }
            public int? reputation { get; set; }
            public UserType? user_type { get; set; }
            public string link { get; set; }
            public int? accept_rate { get; set; }
        }

        [TestMethod]
        public void UseNameAutomata()
        {
            Func<TextReader, int, _UseNameAutomata> automata;
            Func<TextReader, int, _UseNameAutomata> dictionary;

            try
            {
                {
                    InlineDeserializer<_UseNameAutomata>.UseNameAutomata = true;
                    Exception ignored;

                    // Build the *actual* deserializer method
                    automata = InlineDeserializerHelper.BuildFromStream<_UseNameAutomata>(typeof(Jil.Deserialize.MicrosoftStyle), dateFormat: Jil.DateTimeFormat.MicrosoftStyleMillisecondsSinceUnixEpoch, serializationNameFormat: SerializationNameFormat.Verbatim, exceptionDuringBuild: out ignored);
                }

                {
                    InlineDeserializer<_UseNameAutomata>.UseNameAutomata = false;
                    Exception ignored;

                    // Build the *actual* deserializer method
                    dictionary = InlineDeserializerHelper.BuildFromStream<_UseNameAutomata>(typeof(Jil.Deserialize.MicrosoftStyle), dateFormat: Jil.DateTimeFormat.MicrosoftStyleMillisecondsSinceUnixEpoch, serializationNameFormat: SerializationNameFormat.Verbatim, exceptionDuringBuild: out ignored);
                }
            }
            finally
            {
                InlineDeserializer<_UseNameAutomata>.UseNameAutomata = true;
            }

            var rand = new Random(97031664);

            var toSerialize = new List<_UseNameAutomata>();
            for (var i = 0; i < 10000; i++)
            {
                toSerialize.Add(
                    new _UseNameAutomata
                    {
                        accept_rate = rand.Next(),
                        display_name = _RandString(rand),
                        link = _RandString(rand),
                        reputation = rand.Next(),
                        user_id = rand.Next(),
                        user_type = _RandEnum<_UseNameAutomata.UserType>(rand)
                    }
                );
            }

            toSerialize = toSerialize.Select(_ => new { _ = _, Order = rand.Next() }).OrderBy(o => o.Order).Select(o => o._).Where((o, ix) => ix % 2 == 0).ToList();

            double automataTime, dictionaryTime;
            CompareTimes(toSerialize, Jil.Options.Default, automata, dictionary, out automataTime, out dictionaryTime);

            Assert.IsTrue(automataTime < dictionaryTime, "automataTime = " + automataTime + ", dictionaryTime = " + dictionaryTime);
        }

        [TestMethod]
        public void UseFastFloatingPointMethods_Float_Common()
        {
            Func<TextReader, int, float> fast;
            Func<TextReader, int, float> normal;

            try
            {
                {
                    InlineDeserializer<float>.UseFastFloatingPointMethods = true;
                    Exception ignored;

                    // Build the *actual* deserializer method
                    fast = InlineDeserializerHelper.BuildFromStream<float>(typeof(Jil.Deserialize.MicrosoftStyle), dateFormat: Jil.DateTimeFormat.MicrosoftStyleMillisecondsSinceUnixEpoch, serializationNameFormat: SerializationNameFormat.Verbatim, exceptionDuringBuild: out ignored);
                }

                {
                    InlineDeserializer<float>.UseFastFloatingPointMethods = false;
                    Exception ignored;

                    // Build the *actual* deserializer method
                    normal = InlineDeserializerHelper.BuildFromStream<float>(typeof(Jil.Deserialize.MicrosoftStyle), dateFormat: Jil.DateTimeFormat.MicrosoftStyleMillisecondsSinceUnixEpoch, serializationNameFormat: SerializationNameFormat.Verbatim, exceptionDuringBuild: out ignored);
                }
            }
            finally
            {
                InlineDeserializer<float>.UseFastFloatingPointMethods = true;
            }

            var toSerialize = new List<float>();
            float i = -100.0f;
            while (i <= 100.0f)
            {
                toSerialize.Add((float)Math.Round(i, 2));
                i += 0.01f;
            }

            double fastTime, normalTime;
            CompareTimes(toSerialize, Jil.Options.Default, fast, normal, out fastTime, out normalTime);

            Assert.IsTrue(fastTime < normalTime, "fastTime = " + fastTime + ", normalTime = " + normalTime);
        }

        [TestMethod]
        public void UseFastFloatingPointMethods_Double_Common()
        {
            Func<TextReader, int, double> fast;
            Func<TextReader, int, double> normal;

            try
            {
                {
                    InlineDeserializer<double>.UseFastFloatingPointMethods = true;
                    Exception ignored;

                    // Build the *actual* deserializer method
                    fast = InlineDeserializerHelper.BuildFromStream<double>(typeof(Jil.Deserialize.MicrosoftStyle), dateFormat: Jil.DateTimeFormat.MicrosoftStyleMillisecondsSinceUnixEpoch, serializationNameFormat: SerializationNameFormat.Verbatim, exceptionDuringBuild: out ignored);
                }

                {
                    InlineDeserializer<double>.UseFastFloatingPointMethods = false;
                    Exception ignored;

                    // Build the *actual* deserializer method
                    normal = InlineDeserializerHelper.BuildFromStream<double>(typeof(Jil.Deserialize.MicrosoftStyle), dateFormat: Jil.DateTimeFormat.MicrosoftStyleMillisecondsSinceUnixEpoch, serializationNameFormat: SerializationNameFormat.Verbatim, exceptionDuringBuild: out ignored);
                }
            }
            finally
            {
                InlineDeserializer<double>.UseFastFloatingPointMethods = true;
            }

            var toSerialize = new List<double>();
            double i = -100.0;
            while (i <= 100.0)
            {
                toSerialize.Add(Math.Round(i, 2));
                i += 0.01;
            }

            double fastTime, normalTime;
            CompareTimes(toSerialize, Jil.Options.Default, fast, normal, out fastTime, out normalTime);

            Assert.IsTrue(fastTime < normalTime, "fastTime = " + fastTime + ", normalTime = " + normalTime);
        }

        [TestMethod]
        public void UseFastFloatingPointMethods_Decimal_Common()
        {
            Func<TextReader, int, decimal> fast;
            Func<TextReader, int, decimal> normal;

            try
            {
                {
                    InlineDeserializer<decimal>.UseFastFloatingPointMethods = true;
                    Exception ignored;

                    // Build the *actual* deserializer method
                    fast = InlineDeserializerHelper.BuildFromStream<decimal>(typeof(Jil.Deserialize.MicrosoftStyle), dateFormat: Jil.DateTimeFormat.MicrosoftStyleMillisecondsSinceUnixEpoch, serializationNameFormat: SerializationNameFormat.Verbatim, exceptionDuringBuild: out ignored);
                }

                {
                    InlineDeserializer<decimal>.UseFastFloatingPointMethods = false;
                    Exception ignored;

                    // Build the *actual* deserializer method
                    normal = InlineDeserializerHelper.BuildFromStream<decimal>(typeof(Jil.Deserialize.MicrosoftStyle), dateFormat: Jil.DateTimeFormat.MicrosoftStyleMillisecondsSinceUnixEpoch, serializationNameFormat: SerializationNameFormat.Verbatim, exceptionDuringBuild: out ignored);
                }
            }
            finally
            {
                InlineDeserializer<decimal>.UseFastFloatingPointMethods = true;
            }

            var toSerialize = new List<decimal>();
            decimal i = -100.0m;
            while (i <= 100.0m)
            {
                toSerialize.Add(Math.Round(i, 2));
                i += 0.01m;
            }

            double fastTime, normalTime;
            CompareTimes(toSerialize, Jil.Options.Default, fast, normal, out fastTime, out normalTime);

            Assert.IsTrue(fastTime < normalTime, "fastTime = " + fastTime + ", normalTime = " + normalTime);
        }

        class _NameAutomataBinarySearch
        {
            public string A { get; set; }
            public string B { get; set; }
            public string C { get; set; }
            public string D { get; set; }
            public string E { get; set; }
            public string F { get; set; }
            public string G { get; set; }
            public string H { get; set; }
            public string I { get; set; }
            public string J { get; set; }
            public string K { get; set; }
            public string L { get; set; }
            public string M { get; set; }
            public string N { get; set; }
            public string O { get; set; }
            public string P { get; set; }
            public string Q { get; set; }
            public string R { get; set; }
            public string S { get; set; }
            public string T { get; set; }
            public string U { get; set; }
            public string V { get; set; }
            public string W { get; set; }
            public string X { get; set; }
            public string Y { get; set; }
            public string Z { get; set; }
        }

        [TestMethod]
        public void NameAutomataBinarySearch()
        {
            var obj =
                new _NameAutomataBinarySearch
                {
                    A = "a",
                    B = "b",
                    C = "c",
                    D = "d",
                    E = "e",
                    F = "f",
                    G = "g",
                    H = "h",
                    I = "i",
                    J = "j",
                    K = "k",
                    L = "L",
                    M = "m",
                    N = "n",
                    O = "o",
                    P = "p",
                    Q = "q",
                    R = "r",
                    S = "s",
                    T = "t",
                    U = "u",
                    V = "v",
                    W = "w",
                    X = "x",
                    Y = "y",
                    Z = "z"
                };

            Func<TextReader, int, _NameAutomataBinarySearch> binarySearch;
            Func<TextReader, int, _NameAutomataBinarySearch> normal;

            try
            {
                {
                    NameAutomataConfig.UseBinarySearch = true;
                    Exception ignored;

                    // Build the *actual* deserializer method
                    binarySearch = InlineDeserializerHelper.BuildFromStream<_NameAutomataBinarySearch>(typeof(Jil.Deserialize.MicrosoftStyle), dateFormat: Jil.DateTimeFormat.MicrosoftStyleMillisecondsSinceUnixEpoch, serializationNameFormat: SerializationNameFormat.Verbatim, exceptionDuringBuild: out ignored);
                }

                {
                    NameAutomataConfig.UseBinarySearch = false;
                    Exception ignored;

                    // Build the *actual* deserializer method
                    normal = InlineDeserializerHelper.BuildFromStream<_NameAutomataBinarySearch>(typeof(Jil.Deserialize.MicrosoftStyle), dateFormat: Jil.DateTimeFormat.MicrosoftStyleMillisecondsSinceUnixEpoch, serializationNameFormat: SerializationNameFormat.Verbatim, exceptionDuringBuild: out ignored);
                }
            }
            finally
            {
                NameAutomataConfig.UseBinarySearch = true;
            }

            var toSerialize = new List<_NameAutomataBinarySearch>();
            for (var i = 0; i < 10000; i++)
            {
                toSerialize.Add(obj);
            }

            double binarySearchTime, normalTime;
            CompareTimes(toSerialize, Jil.Options.Default, binarySearch, normal, out binarySearchTime, out normalTime);

            Assert.IsTrue(binarySearchTime < normalTime, "binarySearchTime = " + binarySearchTime + ", normalTime = " + normalTime);
        }

        [TestMethod]
        public void DynamicTypeConverter()
        {
            Func<TextReader, int, object> trialCasts =
                (reader, depth) =>
                {
                    var dyn = JSON.DeserializeDynamic(reader);

                    try
                    {
                        var asInt = (int)dyn;
                        return asInt;
                    }
                    catch { }

                    try
                    {
                        var asDouble = (double)dyn;
                        return asDouble;
                    }
                    catch { }

                    try
                    {
                        var asString = (string)dyn;
                        return asString;
                    }
                    catch { }

                    return null;
                };
            Func<TextReader, int, object> typeConverter =
                (reader, depth) =>
                {
                    var dyn = JSON.DeserializeDynamic(reader);
                    System.ComponentModel.TypeConverter tc = System.ComponentModel.TypeDescriptor.GetConverter(dyn);

                    if (tc.CanConvertTo(typeof(int))) return (int)dyn;
                    if (tc.CanConvertTo(typeof(double))) return (double)dyn;
                    if (tc.CanConvertTo(typeof(string))) return (string)dyn;

                    return null;
                };

            var rand = new Random(97031664);

            var toSerialize = new List<object>();
            for (var i = 0; i < 100; i++)
            {
                switch(rand.Next(4))
                {
                    case 0: toSerialize.Add(rand.Next()); break;
                    case 1: toSerialize.Add(rand.NextDouble() * rand.Next()); break;
                    case 2: toSerialize.Add(_RandString(rand)); break;
                    case 3: toSerialize.Add(new object()); break;
                    default: throw new Exception();
                }
            }

            double trialCastTime, typeConverterTime;
            CompareTimes(toSerialize, Jil.Options.Default, trialCasts, typeConverter, out trialCastTime, out typeConverterTime);

            Assert.IsTrue(typeConverterTime < trialCastTime, "typeConverterTime = " + typeConverterTime + ", trialCastTime = " + trialCastTime);
        }

        public class _CustomRFC1123DateFormatting
        {
            public List<DateTime> Dates;
        }

        [TestMethod]
        public void UseCustomRFC1123DateFormatting()
        {
            Action<TextWriter, _CustomRFC1123DateFormatting, int> fast;
            Action<TextWriter, _CustomRFC1123DateFormatting, int> normal;

            try
            {
                {
                    InlineSerializer<_CustomRFC1123DateFormatting>.UseCustomRFC1123DateTimeFormatting = true;
                    Exception ignored;

                    // Build the *actual* serializer method
                    fast = InlineSerializerHelper.Build<_CustomRFC1123DateFormatting>(typeof(Jil.Serialize.RFC1123), dateFormat: Jil.DateTimeFormat.RFC1123, pretty: false, excludeNulls: false, jsonp: false, includeInherited: false, dateTimeBehavior: UnspecifiedDateTimeKindBehavior.IsLocal, serializationNameFormat: SerializationNameFormat.Verbatim, exceptionDuringBuild: out ignored);
                }

                {
                    InlineSerializer<_CustomRFC1123DateFormatting>.UseCustomRFC1123DateTimeFormatting = false;
                    Exception ignored;

                    // Build the *actual* serializer method
                    normal = InlineSerializerHelper.Build<_CustomRFC1123DateFormatting>(typeof(Jil.Serialize.RFC1123), dateFormat: Jil.DateTimeFormat.RFC1123, pretty: false, excludeNulls: false, jsonp: false, includeInherited: false, dateTimeBehavior: UnspecifiedDateTimeKindBehavior.IsLocal, serializationNameFormat: SerializationNameFormat.Verbatim, exceptionDuringBuild: out ignored);
                }
            }
            finally
            {
                InlineSerializer<_CustomRFC1123DateFormatting>.UseCustomRFC1123DateTimeFormatting = true;
            }

            var rand = new Random(270129617);

            var toSerialize = new List<_CustomRFC1123DateFormatting>();
            for (var i = 0; i < 1000; i++)
            {
                var numDates = new DateTime[5 + rand.Next(10)];

                for (var j = 0; j < numDates.Length; j++)
                {
                    numDates[j] = _RandDateTime(rand);
                }

                toSerialize.Add(
                    new _CustomRFC1123DateFormatting
                    {
                        Dates = numDates.ToList()
                    }
                );
            }

            toSerialize = toSerialize.Select(_ => new { _ = _, Order = rand.Next() }).OrderBy(o => o.Order).Select(o => o._).Where((o, ix) => ix % 2 == 0).ToList();

            double fastTime, normalTime;
            CompareTimes(toSerialize, fast, normal, out fastTime, out normalTime);

            Assert.IsTrue(fastTime < normalTime, "fastTime = " + fastTime + ", normalTime = " + normalTime);
        }

        [TestMethod]
        public void UseFastRFC1123Method()
        {
            Func<TextReader, int, DateTime> fast;
            Func<TextReader, int, DateTime> normal;

            try
            {
                {
                    InlineDeserializer<DateTime>.UseFastRFC1123Method = true;
                    Exception ignored;

                    // Build the *actual* serializer method
                    fast = InlineDeserializerHelper.BuildFromStream<DateTime>(typeof(Jil.Serialize.RFC1123), DateTimeFormat.RFC1123, SerializationNameFormat.Verbatim, out ignored);
                }

                {
                    InlineDeserializer<DateTime>.UseFastRFC1123Method = false;
                    Exception ignored;

                    // Build the *actual* serializer method
                    normal = InlineDeserializerHelper.BuildFromStream<DateTime>(typeof(Jil.Serialize.RFC1123), DateTimeFormat.RFC1123, SerializationNameFormat.Verbatim, out ignored);
                }
            }
            finally
            {
                InlineDeserializer<DateTime>.UseFastRFC1123Method = true;
            }

            var rand = new Random(270129617);

            var toDeserialize = new List<DateTime>();
            for (var i = 0; i < 1000; i++)
            {
                toDeserialize.Add(_RandDateTime(rand));
            }

            toDeserialize = toDeserialize.Select(_ => new { _ = _, Order = rand.Next() }).OrderBy(o => o.Order).Select(o => o._).Where((o, ix) => ix % 2 == 0).ToList();

            double fastTime, normalTime;
            CompareTimes(toDeserialize, Options.RFC1123, fast, normal, out fastTime, out normalTime);

            Assert.IsTrue(fastTime < normalTime, "fastTime = " + fastTime + ", normalTime = " + normalTime);
        }

        class _DeserializeThunkReader
        {
            public string Str { get; set; }
            public int Int { get; set; }
            public List<string> List { get; set; }
            public Dictionary<string, int> Dict { get; set; }
            public _DeserializeThunkReader Recurs { get; set; }
            public double Float { get; set; }
        }

        [TestMethod]
        public void DeserializeThunkReader()
        {
            Func<TextReader, int, _DeserializeThunkReader> thunkReader;
            Func<TextReader, int, _DeserializeThunkReader> streamReader;

            thunkReader =
                (tr, ix) =>
                {
                    var str = tr.ReadToEnd();

                    return JSON.Deserialize<_DeserializeThunkReader>(str);
                };

            streamReader =
                (tr, ix) =>
                {
                    // have to ReadToEnd for symmetry with `thunkReader`
                    var str = tr.ReadToEnd();

                    using(var r = new StringReader(str))
                    {
                        return JSON.Deserialize<_DeserializeThunkReader>(r);
                    }
                };

            var rand = new Random(141026127);

            var toDeserialize = new List<_DeserializeThunkReader>();
            for (var i = 0; i < 5000; i++)
            {
                toDeserialize.Add(
                    new _DeserializeThunkReader
                    {
                        Float = rand.NextDouble(),
                        Int = rand.Next(),
                        Str = _RandString(rand),
                        Recurs = new _DeserializeThunkReader
                        {
                            Int = rand.Next(),
                            Str = _RandString(rand),
                            List = Enumerable.Range(0, rand.Next(5)).Select(r => _RandString(rand)).ToList(),
                            Dict = Enumerable.Range(0, rand.Next(5)).ToDictionary(x => x+" "+_RandString(rand), _ => rand.Next()),
                            Float = rand.NextDouble()
                        },
                        List = Enumerable.Range(0, rand.Next(5)).Select(r => _RandString(rand)).ToList(),
                        Dict = Enumerable.Range(0, rand.Next(5)).ToDictionary(x => x + " " + _RandString(rand), _ => rand.Next())
                    }
                );
            }

            toDeserialize = toDeserialize.Select(_ => new { _ = _, Order = rand.Next() }).OrderBy(o => o.Order).Select(o => o._).Where((o, ix) => ix % 2 == 0).ToList();

            double thunkReaderTime, streamReaderTime;
            CompareTimes(toDeserialize, Options.RFC1123, thunkReader, streamReader, out thunkReaderTime, out streamReaderTime);

            Assert.IsTrue(thunkReaderTime < streamReaderTime, "thunkReaderTime = " + thunkReaderTime + ", streamReaderTime = " + streamReaderTime);
        }
#endif
    }
}

redpajama_set_name: RedPajamaGithub


At Royal Dumpster, we strive to bring you the best service at the best price available. We have a wide selection of dumpster sizes in stock in Giltner, NE, with flexible & timley pickup and delivery. Give us a call today for all your dumpster rental and roll off needs.
Now any doors and baseboards can simply be threw into the dumpster. Produced crew can easily lay your beautiful floor covering. Once the floor covering is all set up, the construction staff can placed the new entrance doors you selected onto his or her hinges. Everything is coming together perfectly and no wreck is around due to the rented dumpster.
The constant maintenance a strong performing relationship using a 20 Yard Dumpster Rentals in Giltner, NE company is important to contractors. Together with home constructing and refurbishments, there is always debris to be removed, and when you then have a good performing relationship using a dumpster company, you can depend on that the merely waste with your project is definitely debris, definitely not your time and money.
Appliances that happen to be in great shape instead of beat up and ugly or even very unclean, can be provided, as many cabinets can easily. Straight away trash needs to go to the landfill, and recyclable materials just like copper and aluminum may be fixed at the structure site or maybe taken to the proper recycle heart. You can save cash by working it by yourself. Some dumpster renting enable working at your website because they appear divided into portions. Parts of many recycled resources will get you back again a few bucks this also can cancel out the price of the 20 Yard Dumpster Rentals in Giltner, NE, sometimes using a lot.
Hire Duration: The time do you need the dumpster for? Dumpsters may be rented because of the month or even on a long term basis (generally with a 12-month commitment). Keep in mind that in the event you keep a non permanent roll-off longer than the previously approved lease timeframe, there can be additional charges of your average $15-$50 each day.
Household, office or celebration trash, now get it planning an eco-friendly approach without risks. Just loosen up, sit back and find out the waste going away devoid of bothering by yourself much.
Maybe you've looked at the garage or even basement lately? Most of us utilize these places as indefinite house storage regarding things we presume we might eventually use. Although there are always far more things we might possibly require in the future, that spaces fill up quickly, often to the point where all of us couldn't uncover any of the things we actually require amongst the chaos.
When you arrange a dumpster regarding rent, you choose your day and time that you would like to have it dropped off away from your home. Make certain you have a obvious area to put it as well as a obvious area around the idea. You want to be sure that you can get to it easily. Decide to have it right now there before you begin to actually chose the correct size, which you have room correctly, and you can start.
Another option would be to collect most waste and cart rid of it in your car or truck to your nearby disposal facility, one weight at a time. A few municipalities may accept this specific waste as well as others may not. Some may charge a fee regarding disposal. In the mean time, you never realize how much squander you have unless you try to fit it all inside your car.
Hunt for speedy services when you are trying to rent a dumpster. You will discover dumpsters that can be sent the following day to your residence or work site. That may be tip top support services if you need to have the job proceeding and accomplished quickly. Your loved ones, friends and the people a person hire may be in and out of the house in no time. You really should put your Alexandria, Virtual assistant, home up for sale since you are shifting to a house or another area. The speedier you get the house up for sale, the quicker you can obtain your money and move onto the subsequent chapter in your own life.
Whether you're a homeowner or a contractor, renting a dumpster while you are embarking on a development project is crucial. Construction often creates lots of debris, be it scraps at a build or the old materials you're exchanging. It's less complicated for your development crew to have a very single position to dump every one of the waste, and it helps you contain the peace of mind that is included with knowing assembling your project will look sparkling and skilled when the job is done plus the dumpster's been retracted.
A good dumpster support will not help you stay waiting a long time. They will begin any kind of project on the same day you contact them if you want. All you have to perform is make that mobile phone call.
Most rent a dumpster companies never allow anything other than solid waste materials to be placed of their units. This means that items including computers, fresh paint, oil, tv sets and varnish are not suitable for discretion within a move off dumpster. Always check with prospective dumpster depots what his or her policies are pertaining to waste kinds for their receptacles.
You can save cash by looking for a 20 Yard Dumpster Rentals in Giltner yourself, if you are a homeowner, along with contractors know where the greatest 20 Yard Dumpster Rentals in Giltner sites usually are. If you are a initial timer or perhaps someone looking to save some money, after that few rental internet sites online can quote that you good value and get a local dumpster of the right size to your website as soon as possible. Most demo substance that's taken from a home is usually divided into about three types -- devices and cabinets which may be re-cycled, actual trash, and materials which can be broken down out straight into separate materials which may after that be delivered off to the recycler.
Each construction project involves a lot of trash along with rubble. Get ready to experience order along with cleanliness in the environmental development project if you rent then a dumpster. Here is the quickest along with easiest way to get rid of trash along with debris. Quality and beautification for your business view is possible; it won't have to glimpse trashy, dirty along with unkempt. Quality in every development process is achievable through the use of an adequately sized along with quickly taken out dumpster at your site.
Work with a company that will deliver next day dumpsters so you can get the remodeling designed in a reasonable fashion. In the event the remodeling is complete, the next day dumpster can be hauled out, your kids can smile the room is what they often dreamed it might be.
We have to take action to prevent the outcomes of pollution for the environment with the state by reducing the production of options first. Solid waste creation is one one of several major options that create pollution throughout state. Long term generation with the state can also be affected by the impacts regarding pollution inside the state. Little ones in the tummy of the mother are affected by a lot of health issues just like low defenses, birth defects, immune defects, Hormone disproportion, neurological defects, behavioral abnormalities, altered metabolism before they will reach life. Our incapacity to take the correct action will leave no natural environment to our generations to come.
Another subject to cover when making a rental is definitely identifying the area where the package will are living. Usually with a residential property this dumpsters will be intent on the driveway or the block. An important truth to remember is the fact that in most places a make it possible for is required in case a container lies on the street. Phoning the city and getting a make it possible for can deal with this, or maybe occasionally the permit might be secured through the rental company. The location the dumpster are going to be dropped off needs to be cleared associated with a hazards, that include: low lying down power lines, shrub branches, fences or unleveled soil.
First, pick the correct dimension dumpster. The most common shapes include the 10 property container, Thirty yard package or 40 yard bins. A 10 property container is used for most home remodeling projects and take up an excessive amount of space on your property. The Thirty yard package is used for small commercial or residential projects. A new 30 property container is made for medium to large jobs. Make sure that you pick the correct dimension for your task. Even though you may well save money by renting the smaller dumpster, you are going to pay if you have to schedule multiple pick-ups to haul the trash aside. To be safe, you must not overload the dumpster because it can be be extremely dangerous with the driver transporting away the trash if it's overloaded.
For the new leisurely room chances are you'll now put in your huge furniture objects. Maybe you purchased a new sectional couch and big screen Tv set. This will be heave with your new luxurious carpeting and freshly coloured walls. No longer dark paneling or maybe dingy aged carpeting to walk on.
You can still keep your unusual looking farmhouse with the past charm. You simply need to update this from time to time to restore energy efficient and even more beautiful looking.
There are certain services which many of us pay for that appear so run of the mill that it no matter who many of us hire. We figure of which regardless of who many of us hire, the results will likely be virtually the same. Those who immediately springs to mind are things like taxi taxi cabs, flower supply, plumbers, etc. If you are carrying out any kind of renovations or main yard function, you might think junk bin leases would fall under that type too. Truly though, together with any of those services you can get considerably different results dependant upon who you use.
The most dangerous impacts of fixing climate across the world includes higher temperatures, modifying landscapes, wild animals risk, droughts, huge amounts, and thunder or wind storms and bringing up heat associated diseases. Another fact that must be revealed we have found, the nations under the hardship line are usually least responsible for the contamination generated in the environment and they are the ones that are more affected by this pollution since they're not wealthy enough to square stubborn contrary to the natural disasters of which occur across the world. They are the nearly all affected undergoes for the reason which they are usually least accountable. The the western world are the key culprits with the change in the climate.
Your lovely home might have many objects towards there is developed add-on. Seeing fifty percent burnt in the fire piled-up with the debris is very painful. When you work with a dumpster for your rubbish disposal upon rebuilding the burnt residence, you will not only remove the trash in many affordable technique but also increases the second life to your favorite items. Without a doubt how? Whenever you place an order for dumpster with a expert 20 Yard Dumpster Rentals in Giltner, NE company, they're going to guide you throughout picking the right dimension dumpster according to your project requirements. This kind of dumpster will get to your home at the right time laid out in you. When the trash is definitely dumped into the dumpster, this rubbish will not just remaining to the landfill; your products are going to be recycled throughout environmental warm and friendly manner. Your loved objects will obtain more lovely look in comparison with earlier.


text:
Trump's lawyers will argue impeachment trial is unconstitutional after split with old legal team over voter fraud
Christal Hayes David Jackson Bart Jansen
WASHINGTON – Former President Donald Trump's legal team are expected to use an argument at his impeachment trial next week that is already supported by the majority of Senate Republicans in charge of his fate: That the trial is unconstitutional because Trump is no longer the commander in chief.
But still unclear is whether they've entirely jettisoned Trump's allegations of election fraud, an issue that led to a rift with Trump's prior legal team.
Trump and his first set of lawyers parted ways over trial strategy over the weekend. The former president wanted to emphasize "voter fraud" issues during the trial, said a person familiar with the legal discussions. But the original attorneys wanted to stress that the Senate should not hold a trial of a former officeholder, and that Trump's comments during a Jan. 6 rally did not incite the mob that led a deadly riot at the U.S. Capitol.
While Trump's new team says fraud isn't at the center of their arguments, they're not closing the door on them.
Trump announced Sunday evening that David Schoen, a criminal defense attorney who works in Alabama and New York, and Bruce Castor Jr., a former district attorney in Pennsylvania, would lead his defense.
Schoen, in an interview with The Washington Post Sunday evening, offered some insight on the path forward, saying he planned to focus on the "weaponization of the impeachment process" and would not argue the president's claims of voter fraud.
"I am not a person who will put forward a theory of election fraud," Schoen told the Post. "That's not what this impeachment trial is about."
Schoen told Sean Hannity of Fox News on Monday night that the trial is unconstitutional and nothing more than an effort to prevent Trump from running for president again. "This is the political weaponization of the impeachment process," he said.
Schoen also called the trial "the most ill-advised legislative action that I've seen in my lifetime."
Trump political adviser Jason Miller said "the focus will be on the Democrats' unconstitutional push to remove a President who is no longer in office."
More:Trump parts ways with impeachment lawyers as Senate trial nears
More:Trump's shaken up legal team hints it will focus on constitutionality of impeaching a former president
More:Risky business: Donald Trump isn't alone in seeing his political fate tied to his impeachment trial
Miller disputed reporting that Trump parted ways with his first set of attorneys because he wanted them to relitigate hisbaseless concerns of voter fraud.
When asked how much of a role Trump's election fraud claims might play in the impeachment trial, he said, "Our upcoming legal briefs will give a clearer and more comprehensive overview."
Trump, who has been banned from most social media platforms, has remained virtually silent on the impeachment case that charged him with inciting an insurrection at the Capitol, which left multiple people dead. And largely so have the lawyers Trump has brought on to defend him over the weeks.
The new team appears to have a two-pronged strategy: Arguing the trial is unconstitutional and that Trump's remarks about the election did not incite the deadly riot at the Capitol.
Backstory:We investigated claims of voter fraud in the election. Here's what we found.
By the numbers:President Donald Trump's failed efforts to overturn the election
House Democrats are expected to recite the history of Trump's months of arguments questioning the legitimacy of the election, his call urging Georgia Secretary of State Brad Raffensperger to "find" votes to overturn the election of President Joe Biden and quotations from his speech Jan. 6 to the mob that later stormed the Capitol.
Trump is due on Tuesday to issue an official answer to the House's impeachment article charging him with inciting an insurrection, a filing that could offer some insight into the former president's defense strategy when the trial starts Feb. 9.
If Trump's team argues the trial is unconstitutional, it would likely find a supportive group of Senate Republicans. Last week, 45 Republican senators voted against holding the trial on constitutional grounds, well more than enough votes for Trump to win an easy acquittal.
More:As Trump impeachment trial begins, he lacks star lawyers, full Republican backing
More:The second Trump impeachment trial is set for February. What happens next?
More:Senate Republicans overwhelmingly back failed challenge to impeachment trial, hinting at Trump acquittal
The impeachment case will mark a big test for both lawyers, who aren't strangers to controversial disputes or representing high-profile figures but have never argued a case with such historical implications.
Castor drew headlines after he declined to prosecute comedian and actor Bill Cosby in 2005 on sexual assault allegations that years later sent Cosby to prison. He faced more scrutiny after telling a judge in Cosby's case that he entered a secretive agreement to not file charges against the actor if he did not plead the 5th Amendment in a civil case from one of his accusers, according to The Philadelphia Inquirer.
Schoen represented Roger Stone, a key Trump ally who was convicted in connection with the investigation into Russian meddling in the 2016 election. Trump later commuted Stone's sentence.
Schoen also met with disgraced businessman Jeffrey Epstein days before his death in 2019 to discuss taking the lead role on his defense team. Schoen told the Atlanta Jewish Times he agreed to take the role representing Epstein against allegations the financial mogul sexually exploited and abused dozens of girls.
He's worked on voting issues and consulted the counsel for Al Gore during his election battle in the 2000 election.
The attorneys originally tapped to defend the Trump who split from the team include South Carolina lawyers Butch Bowers, Deborah Barbier, Greg Harris and Johnny Gasser, along with North Carolina lawyer Josh Howard.
Changing legal teams this close to trial "would normally be incredibly problematic," said Ross Garber, an adjunct professor at Tulane Law School in New Orleans and an impeachment law expert. But a Senate vote last week showing little interest by Republicans in convicting Trump means the former president might not have to do much to be acquitted.
"At this point, conviction seems highly improbable," Garber said. "Nevertheless, there could be curveballs that change the calculus. If that happens, Trump could be caught flat-footed. Also, the Senate and impeachment are new arenas for his new lawyers. It is not the traditional courtroom they are accustomed to, and the learning curve may be steep."
Contributing: Deborah Barfield Berry

redpajama_set_name: RedPajamaCommonCrawl


At Natalis Counseling & Psychology Solutions, there are four basic activities involved in the psychological testing and evaluations for children and adolescents: neuropsychological screening, testing for cognitive functioning, personality assessment, and recommendations for intervention/support.
At times, more specific tests are used for neuropsycholgical screening, school performance, or projective personality measures. The testing sequence usually requires face-to-face time, plus a review of any background material, scoring time and completion of report.
To make an appointment, or for more information, call 651-379-5157.


Celebrities Missing At The Hum Awards 2017!
The prestigious Hum Awards ceremony was held over the weekend in Lahore and it was undoubtedly an extravagant event. However, we couldn't help but notice that many popular celebrities were not present at the event.
The star Atif Aslam was rocking a concert in Holland.
The diva won the award for best actress but was still not present at the event.
Photographed by @farhannaqvi at Oxford Street, London.
Urwa Hocane flew in on the 29th and joined her hubby Farhan at his concert at Bahria University, Karachi.
The lady boycottED the Lux Style Awards but was missing at Hum Awards as well.


text:
Home > Photos > Kathie Lee Gifford
Facelift & Fillers! Kathie Lee Gifford's Plastic Surgery Makeover Exposed By Top Docs
Aug. 25 2017, Updated 2:12 p.m. ET
Talk show host Kathie Lee Gifford has never looked better! The 64-year-old sidekick of Hoda Kotb stepped out an event in NYC this week looking ravishing and RadarOnline.com has exclusively learned from several top docs that she has likely had invasive plastic surgery procedures in recent years! Click through 7 shocking photos to see Gifford's complete transformation.
Source: BACKGRID
"Kathie Lee looks like she had a complete surgical make over" Dr. Zara Harutyunyan of L.A.'s Cosmetic Rejuvenation said.
"She appears to have undergone a facelift, necklift, skin resurfacing and Botox. Her face and neck look much tighter and lifted, which is likely the result of a really good facelift,"claimed Dr. Harutyunyan.
"In addition, her cheeks appear to be fuller, which usually is due to fat transfer or fillers. Her skin is smooth and even, which is most likely due to skin resurfacing treatments such as Endy-Med Intensif or CO2 lasers," said Dr. Harutyunyan, who has not worked on Gifford.
Kathie Lee Gifford 'No Longer Hiding' Her New Man, Friends Thrilled She 'Found Love' After Death Of Beloved Husband Frank
Kathie Lee Gifford Fielding Lucrative Offers For Big TV Return, Considered For 'The View' Before Alyssa Farah Griffin Joined: Sources
Kelly Ripa UNFAZED By Kathie Lee Gifford's Diss To Her Book Over Regis Philbin Chapters
NYC's Triple Board Certified Plastic Surgeon, Dr. Adam Schaffner, agreed with his West Coast counterpart and said, "Differences in Kathie Lee's appearance may be due to the use of Botox or Dysport, fillers such as Restylane or Juvederm, or fat transfer!"
Gifford may have also had skin rejuvenation procedures such as micro-needling with platelet-rich plasma (PRP), laser resurfacing and/or lifting procedures such as using dissolvable threads," Dr. Schaffner added.
Although Dr. Schaffner has not worked on Gifford, he told RadarOnline.com, "Of course, traditional aesthetic plastic surgery may have been performed to help rejuvenate her appearance!"
Do you think that Kathie Lee Gifford looks better than ever? Sound off in the comment section below.
We pay for juicy info! Do you have a story for RadarOnline.com? Email us at tips@radaronline.com, or call us at (866) ON-RADAR (667-2327) any time, day or night.


This is a collection of traditional Christmas songs arranged with a bit of modern creativity so that all ages can enjoy the season.
This CD will take you from organ music to full orchestra, and a medieval village to New York City. It features vocals from Danny Taddei, his wife, Korin Taddei, and friend, Kori Garner. Danny arranged and recorded these songs because of his love for the season and its favorite hymns and songs. Danny says: "I love the traditional music that we all grew up on, but the flavor was a bit to old and stale for me, so I set out to make something that felt traditional but tasted just a bit fresher."
If you would rather listen to instrumental arrangements of these songs, please see "Joy To The World: An Instrumental Christmas". It is very similar to this album with with subtle changes to make it appropriate for flutes, clarinets and other orchestral instruments.


text:
Ferdinand Stipberger (born 10 June 1972) is a German sport shooter who competed in the 2000 Summer Olympics.

References

1972 births
Living people
German male sport shooters
ISSF rifle shooters
Olympic shooters of Germany
Shooters at the 2000 Summer Olympics

redpajama_set_name: RedPajamaWikipedia


text:
Bradley Ready To Go For Playoffs
Linebacker Stewart Bradley said that he's "ready to go" for next Sunday's wild card matchup against the Green Bay Packers after dislocating his elbow in Week 14 against the Cowboys. The Eagles did not place Bradley on injured reserve because they hoped he could be ready for the postseason.
It looks like saving that roster spot will pay off.
"It's been tough not being able to play, obviously, but fortunately I'll be able to come back," Bradley said after Sunday's regular season finale against Dallas. "We're excited to play Green Bay. It's going to be a good matchup."
Bradley had 88 tackles, one sack and an interception in the regular season. If you remember, Bradley was knocked out of the first meeting against the Packers back in Week 1 with a concussion that sidelined him the following week in Detroit.
Putting his faith in the plan laid out for him by head athletic trainer Rick Burkholder and his staff, Bradley said that he's "still in good shape" and looks at the past couple of weeks as a "little hiatus to refresh the legs."
Bradley had no problem putting in the work behind the scenes since only 12 can still claim winning the Super Bowl as a potential reality for this season starting next weekend.
"Playoffs are what make this whole thing - the offseason, the training camp, the season - it's what it's all about, going to the show and playing in the playoffs," Bradley said.
Bradley was sidelined all of last season and has not played in a postseason contest since the NFC Championship game at the end of the 2008 campaign.
-- Posted by Chris McPherson, 8:30 p.m., January 2


Something that we often get asked about are our personal watch buying and wearing habits. We spend our days around incredible watches, both old and new, and most of us have dedicated not only our careers but also our lives to understanding and appreciating these timepieces. So, for the first time ever, we are going to give you a look into our own watch wearing habits. What we did here was ask every single member of the HODINKEE team, from Stephen, to Blake, to Eric, to Will, to Felix and Jason, to Paul, to John Reardon, to Ben, to John Mayer, which watch, out of all the watches they've worn in 2013, they spent the most time with. This is a question that is pretty telling about who all of us are as watch lovers, and here are your answers.
Something that we often get asked about are our personal watch buying and wearing habits. We spend our days around incredible watches, both old and new, and most of us have dedicated not only our careers but also our lives to understanding and appreciating these timepieces. So, for the first time ever, we are going to give you a look into our own watch wearing habits.
When I bought this little Tudor I was initially worried that at 35mm it would be too small for my tastes. Thankfully I was wrong and this guy has become a firm favourite. Its clean and simple good looks make it suitable for any occasion.
The watch I have worn most frequently in 2013 has been my 1961 Vulcain Cricket Nautical. It just feels and looks right on my wrist. I especially love the dimensionality and depth of the dial, as the outer track is angled. Most importantly for me, I have found this Cricket Nautical to be an ideal travel and home companion: the alarm has never failed me to wake me and is so loud that it gets me going for the day. This Cricket Nautical definitely doesn't need a snooze button. As an added plus, you just rarely see vintage Cricket Nautical watches, especially in all original unpolished condition (though the re-edition review by Blake here isn't a bad substitute).
I found this 1950s IWC stainless steel watch with a caliber 89 in the NY diamond district earlier this year. Struck by the amazingly preserved condition of the case and simplicity of dial, I bought it immediately. This is the first non-Patek that I have regularly worn in over a decade and I admit that it is the now the one watch that I can't take off my wrist.
Being relatively new to the watch world, I started wearing a watch full-time for the first time this year. It's an Omega Speedmaster, which was a gift from an uncle. He thought it was somewhat absurd that I was traveling the globe - chronicling some of the finest timepieces in the world - with a bare wrist. It does come in handy - I often use the chronograph to keep track of recording time when running around during multi-camera shoots.
This year's "most frequently worn" watch award goes to the Patek Philippe 5164a Travel Time Aquanaut. Being water (and sweat) proof made it perfect for stage, I used the dual time function to keep track of what time zone my girlfriend was in, and to my utter surprise, the watch looks perfectly paired with a suit. This is the most well-rounded watch I've ever owned.
My most frequently worn watch this year is a humble Seiko 7002-700A diver (worn on a HODINKEE leather strap). This beat up example of the SKX predecessor works in my day to day life thanks to ruggedness both in build and looks. With a 1 year old that is prone to grabbing anything on my wrist, it's nice to have a worry free ticker that can stand up to a few dings and spills. Excellent legibility, a slim case and high sentimental value (my very first automatic watch) make this watch an easy go-to for daily duties.
This rarely seen Vacheron Constantin 222 in stainless steel from 1977 was the watch I wore most in 2013. Purchased as part of a package deal with a good friend early in the year, I was thrilled to find this gray-dialed version with its original paper work. Extremely thin and comfortable thanks to its supple Gay Frères bracelet, it's been my "go to" watch for work and weekend wear.
I bought this watch in January of 2013, and my 1963 Rolex Daytona Reference 6239 hasn't been far from my wrist since. This is a watch that I had been looking to buy for years, literally. It was something of an enigma to both myself and the rest of the watch collecting world, and that is why I was so fascinated by it. The Double Swiss Underline was essentially an "A-Series" Daytona and so few people paid attention to it like they do with other first series watches, so it became my mission to understand it as well as I possibly could, and relate that story to you guys (which I did here). Along the way, I fell in love with its flawless dimensions, astounding number of just plain weird little traits, incredible versatility (I wear it on a shell cordovan strap and it's remarkably dressy, but on an Oyster bracelet, it's a true sports watch) and story behind the first generation Daytona. It took me so long to find a clean example with all its original parts, but I sure am glad I stuck with this, because my 1963 Daytona was my personal favorite watch of the year.
This IWC Mark XVII Pilot's watch was my daily go-to for most of 2013. Other watches received big wrist time in spurts, but this is one I keep coming back to. It's simple, straightforward, can take a beating, and can be worn with everything from a t shirt to a suit. Whether hanging out around New York City or traveling, I can count on the Mark XVII in any circumstance, which is exactly what I need in a watch.