text:
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Reflection;
using System.Text;
using Microsoft.CodeAnalysis;
using Microsoft.CodeAnalysis.CSharp;
using Xunit;
using Xunit.Abstractions;
using Xunit.Sdk;

namespace StaticTestGenerator
{
    ///
    /// Utility that reflects over an xunit test assembly and generates a static .cs/.csproj containing invocations
    /// of all of the tests, with minimal additional ceremony and no use of reflection.
    ///
    public static class Program
    {
        /// Entrypoint to the utility.
        /// <param name="args">Command-line arguments.</param>
        public static void Main(string[] args)
        {
            // Validate the command line and parse out the relevant pieces.
            if (!TryParseCommandLine(args, out string testAssemblyPath, out string runtimeAssembliesPath, out string outputPath, out Xunit.ConsoleClient.CommandLine? xunitCommandLine))
            {
                return;
            }

            // Set up an assembly resolving event handler to help locate helper assemblies that are needed
            // to process the test assembly, such as xunit assemblies and corefx test helpers.
            string[] probingPaths = new[] { Path.GetDirectoryName(testAssemblyPath), runtimeAssembliesPath, outputPath, AppContext.BaseDirectory };
            AppDomain.CurrentDomain.AssemblyResolve += (object sender, ResolveEventArgs args) =>
            {
                // Clean up the dll name.
                string name = args.Name;
                int comma = name.IndexOf(',');
                if (comma > 0)
                {
                    name = name.Substring(0, comma);
                }
                if (!name.EndsWith(".dll"))
                {
                    name += ".dll";
                }

                // Try to find and load the assembly from each of directory in turn.
                foreach (string probingPath in probingPaths)
                {
                    try
                    {
                        Assembly a = Assembly.LoadFrom(Path.Combine(probingPath, name));
                        Log($"Loaded {a} from {a.Location}");
                        return a;
                    }
                    catch { }
                }

                return null;
            };

            // Discover all of the test methods in the test assembly, and find all theory inputs.
            DiscoverTestMethods(testAssemblyPath, out Assembly testAssembly, out TestDiscoverySink sink);
            Dictionary<IXunitTestCase, List<TestCase>> testCaseData = ComputeTestMethodTestCases(sink);

            int numUnsupported = 0, numCalls = 0;
            XunitFilters xunitFilters = xunitCommandLine!.Project.Filters;
            var sb = new StringBuilder();

            // Output the beginning of the program.
            Log("");
            sb.AppendLine(CodeTemplateStart);

            // Output calls for each test case.
            foreach (IXunitTestCase testCase in sink.TestCases)
            {
                // Skip test cases that aren't relevant to the current platform, OS, etc.  This is based
                // primarily on the traits applied earlier.
                if (!xunitFilters.Filter(testCase))
                {
                    continue;
                }

                MethodInfo m = ((ReflectionMethodInfo)testCase.Method).MethodInfo;
                Type t = m.ReflectedType;

                // Skip test cases we can't support.  Some of these xunit doesn't support
                // either, so it's just for good measure; in other cases, xunit can support
                // them but with a lot of work at run time, often involving complicated reflection.
                if (t.IsGenericType)
                {
                    Log($"Unsupported {t.Name}.{testCase.Method.Name}. Generic type.");
                    numUnsupported++;
                    continue;
                }

                if (!IsPublic(t))
                {
                    Log($"Unsupported {t.Name}.{testCase.Method.Name}. Non-public type.");
                    numUnsupported++;
                    continue;
                }

                if (!m.IsPublic)
                {
                    Log($"Unsupported {t.Name}.{testCase.Method.Name}. Non-public method.");
                    numUnsupported++;
                    continue;
                }

                if (!m.IsStatic && !HasSupportedConstructor(t))
                {
                    Log($"Unsupported {t.Name}.{testCase.Method.Name}. Unsupported ctor.");
                    numUnsupported++;
                    continue;
                }

                // Output a call per theory data for this test case.
                sb.AppendLine("{");
                List<TestCase> testCases = testCaseData[testCase];
                for (int i = 0; i < testCases.Count; i++)
                {
                    TestCase test = testCases[i];
                    MethodInfo? mi = test.MemberDataMember as MethodInfo ?? (test.MemberDataMember as PropertyInfo)?.GetGetMethod();

                    // Skip theory data we can't support.

                    if (mi != null)
                    {
                        if (!mi.IsPublic || !mi.IsStatic)
                        {
                            Log($"Unsupported {t.Name}.{testCase.Method.Name}. Non-public MemberData {mi.Name}.");
                            numUnsupported++;
                            continue;
                        }

                        if (m.IsGenericMethod)
                        {
                            Log($"Unsupported {t.Name}.{testCase.Method.Name}. Generic method requires reflection invoke.");
                            numUnsupported++;
                            continue;
                        }
                    }

                    if (test.MemberDataMember is FieldInfo fi && (!fi.IsPublic || !fi.IsStatic))
                    {
                        Log($"Unsupported {t.Name}.{testCase.Method.Name}. Non-public MemberData field {fi.Name}.");
                        numUnsupported++;
                        continue;
                    }

                    if (test.Values != null)
                    {
                        if (!test.Values.All(v => v == null || (v is Type t && IsPublic(t)) || IsPublic(v.GetType())))
                        {
                            Log($"Unsupported {t.Name}.{testCase.Method.Name}. Non-public theory argument.");
                            numUnsupported++;
                            continue;
                        }
                    }

                    // Compute a display name to render.  This will be displayed in an error message, and
                    // can be used to then correlate back to the offending line in the generated .cs file.
                    string displayName = testCase.DisplayName;
                    if (testCases.Count > 1)
                    {
                        displayName += "{" + i + "}";
                    }

                    // Write out the call.
                    GenerateTestCaseCode(sb, displayName, t, m, test);
                    numCalls++;
                }
                sb.AppendLine("}");
            }

            // Output the end of the program.
            sb.AppendLine(CodeTemplateEnd);

            Log("");
            Log($"Num unsupported: {numUnsupported}");
            Log($"Num calls written: {numCalls}");
            Log("");

            // Make sure our output directory exists
            if (!Directory.Exists(outputPath))
            {
                Directory.CreateDirectory(outputPath);
            }

            // Write out the .cs file
            string csPath = Path.Combine(outputPath, "Program.cs");
            File.WriteAllText(csPath, CSharpSyntaxTree.ParseText(sb.ToString()).GetRoot().NormalizeWhitespace().ToString());
            Log($"Wrote {csPath}");

            // Write out the associated .csproj
            string csprojPath = Path.Combine(outputPath, Path.GetFileNameWithoutExtension(testAssemblyPath) + "-runner.csproj");
            File.WriteAllText(
                csprojPath,
                CSProjTemplate
                .Replace("#HelperAssemblyLocation#", runtimeAssembliesPath)
                .Replace("#TestAssembly#", Path.GetFullPath(testAssemblyPath))
                .Replace("#TestAssemblyLocation#", testAssemblyPath));
            Log($"Wrote {csprojPath}");
        }

        /// Parse the command-line.
        /// <param name="args">The arguments passed to Main.</param>
        /// <param name="testAssemblyPath">The location of the xunit test assembly to be analyzed. The resulting .cs file will call into this assembly.</param>
        /// <param name="runtimeAssembliesPath">The directory containing all of the helper assemblies needed, e.g. xunit's assemblies, corefx utility assemblies, etc.</param>
        /// <param name="outputPath">The directory into which the resulting project should be written.</param>
        /// <param name="xunitCommandLine">The xunit command-line object to pass to xunit test discovery.</param>
        /// <returns></returns>
        private static bool TryParseCommandLine(
            string[] args,
            out string testAssemblyPath,
            out string runtimeAssembliesPath,
            out string outputPath,
            out Xunit.ConsoleClient.CommandLine? xunitCommandLine)
        {
            if (args.Length >= 3)
            {
                static string EnsureEndsWithSeparator(string path) =>
                    !path.EndsWith(Path.DirectorySeparatorChar) && !path.EndsWith(Path.AltDirectorySeparatorChar) ?
                    path + Path.DirectorySeparatorChar :
                    path;

                runtimeAssembliesPath = EnsureEndsWithSeparator(args[1]);
                testAssemblyPath = Path.GetFullPath(args[2]);
                outputPath = EnsureEndsWithSeparator(Path.Combine(args[0], Path.GetFileNameWithoutExtension(testAssemblyPath)));

                // Gather arguments for xunit.
                var argsForXunit = new List<string>();
                argsForXunit.Add(testAssemblyPath); // first argument is the test assembly
                foreach (string extraArg in args.Skip(3))
                {
                    // If an argument is a response file, load its contents and add that instead.
                    if (extraArg.StartsWith("@"))
                    {
                        argsForXunit.AddRange(from line in File.ReadAllLines(extraArg.Substring(1))
                                              where line.Length > 0 && line[0] != '#'
                                              from part in line.Split(' ')
                                              select part);
                    }
                    else
                    {
                        // Otherwise, add the argument as-is.
                        argsForXunit.Add(extraArg);
                    }
                }

                // If the only argument added was the test assembly path, use default arguments.
                if (argsForXunit.Count == 1)
                {
                    argsForXunit.AddRange(s_defaultXunitOptions);
                }

                // Finally, hand off these arguments to xunit.
                xunitCommandLine = Xunit.ConsoleClient.CommandLine.Parse(argsForXunit.ToArray());

                Log($"Test assembly path    : {testAssemblyPath}");
                Log($"Helper assemblies path: {runtimeAssembliesPath}");
                Log($"Output path           : {outputPath}");
                Log($"Xunit arguments       : {string.Join(" ", argsForXunit)}");
                Log("");
                return true;
            }

            // Invalid command line arguments.
            Console.WriteLine("Usage: <output_directory> <helper_assemblies_directory> <test_assembly_path> <xunit_console_options>");
            Console.WriteLine("    Example:");
            Console.WriteLine(@"   dotnet run d:\tmpoutput d:\repos\corefx\artifacts\bin\testhost\netcoreapp-Windows_NT-Debug-x64\shared\Microsoft.NETCore.App\$(ProductVersion) d:\repos\corefx\artifacts\bin\System.Runtime.Tests\netcoreapp-Windows_NT-Debug\System.Runtime.Tests.dll");
            testAssemblyPath = string.Empty;
            runtimeAssembliesPath = string.Empty;
            outputPath = string.Empty;
            xunitCommandLine = null;
            return false;
        }

        /// Find all test methods in the test assembly.  The resulting <paramref name="sink"/> will contain the found tests.
        /// <param name="testAssemblyPath">The path to the test assembly.</param>
        /// <param name="testAssembly">The loaded test assembly.</param>
        /// <param name="sink">The discovered tests.</param>
        private static void DiscoverTestMethods(string testAssemblyPath, out Assembly testAssembly, out TestDiscoverySink sink)
        {
            // Load the test assembly.
            testAssembly = Assembly.LoadFrom(testAssemblyPath);
            Log($"Loaded {testAssembly.GetName().Name} from {testAssembly.Location}");

            // Find all tests.
            var discoverer = new Xunit2Discoverer(
                AppDomainSupport.Denied,
                new NullSourceInformationProvider(),
                new ReflectionAssemblyInfo(testAssembly),
                xunitExecutionAssemblyPath: null,
                shadowCopyFolder: null,
                new Xunit.NullMessageSink());

            sink = new TestDiscoverySink();

            discoverer.Find(includeSourceInformation: false, sink, TestFrameworkOptions.ForDiscovery(new TestAssemblyConfiguration()
            {
                DiagnosticMessages = false,
                InternalDiagnosticMessages = false,
                PreEnumerateTheories = false,
                StopOnFail = false
            }));

            // Wait for the find to complete.
            sink.Finished.WaitOne();
            Log($"Found {sink.TestCases.Count} test methods.");
        }

        /// Find all test cases associated with the found tests (e.g. one test case per theory input to each test).
        /// <param name="sink">The sink containing the discovered tests.</param>
        /// <returns>A dictionary of all tests and their associated test cases.</returns>
        private static Dictionary<IXunitTestCase, List<TestCase>> ComputeTestMethodTestCases(TestDiscoverySink sink)
        {
            // Create the dictionary containing all tests and associated test cases.
            Dictionary<IXunitTestCase, List<TestCase>> testCases = sink
                .TestCases
                .Cast<IXunitTestCase>()
                .Select(tc =>
                {
                    MethodInfo testMethod = ((ReflectionMethodInfo)tc.Method).MethodInfo;
                    Type testMethodType = testMethod.ReflectedType;

                    var cases = new List<TestCase>();

                    if (testMethod.GetParameters().Length > 0)
                    {
                        // The test method has arguments, so look for all of the standard data attributes we can use to invoke the theory.
                        foreach (DataAttribute attr in testMethod.GetCustomAttributes<DataAttribute>(inherit: true))
                        {
                            try
                            {
                                // DataAttributes can themselves be marked to be skipped.  Ignore the attribute if it is.
                                if (!string.IsNullOrWhiteSpace(attr.Skip))
                                {
                                    continue;
                                }

                                switch (attr)
                                {
                                    case MemberDataAttribute memberData:
                                        // For a [MemberData(...)], it might point to a method, property, or field; get the right
                                        // piece of metadata.  Also, for methods, there might be data to pass to the method
                                        // when invoking it; store that as well.
                                        Type memberDataType = memberData.MemberType ?? testMethod.DeclaringType;

                                        MethodInfo testDataMethod = memberDataType.GetMethod(memberData.MemberName, BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Static | BindingFlags.FlattenHierarchy);
                                        if (testDataMethod != null)
                                        {
                                            cases.Add(new TestCase { MemberDataMember = testDataMethod, Values = memberData.Parameters });
                                            break;
                                        }

                                        PropertyInfo testDataProperty = memberDataType.GetProperty(memberData.MemberName, BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Static | BindingFlags.FlattenHierarchy);
                                        if (testDataProperty != null)
                                        {
                                            cases.Add(new TestCase { MemberDataMember = testDataProperty });
                                            break;
                                        }

                                        FieldInfo testDataField = memberDataType.GetField(memberData.MemberName, BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Static | BindingFlags.FlattenHierarchy);
                                        if (testDataField != null)
                                        {
                                            cases.Add(new TestCase { MemberDataMember = testDataField });
                                            break;
                                        }

                                        Log($"Error finding {memberData.MemberName} in MemberData on {testMethod.Name}");
                                        break;

                                    case ClassDataAttribute classData:
                                        if (classData.Class != null)
                                        {
                                            cases.Add(new TestCase { MemberDataMember = classData.Class });
                                        }
                                        break;

                                    case InlineDataAttribute inlineData:
                                        cases.AddRange(from values in attr.GetData(testMethod) select new TestCase { Values = values });
                                        break;
                                }
                            }
                            catch (Exception e)
                            {
                                Log($"Error processing {attr} on test method {testMethod.Name}: {e.Message}.");
                            }
                        }

                        // There may also be custom data attributes.  We can't just use their GetData methods, as they
                        // may return data we can't serialize into the .cs file.  That means we need to be able to serialize
                        // the construction of the attribute itself into the source file, so that we can effectively treat it
                        // like we do a member info.  To do that, we enumerate attribute datas.
                        foreach (CustomAttributeData cad in testMethod.GetCustomAttributesData())
                        {
                            try
                            {
                                Type attrType = cad.AttributeType;

                                if (!attrType.IsSubclassOf(typeof(DataAttribute)))
                                {
                                    // We only care about DataAttribute-derived types.
                                    continue;
                                }

                                if (typeof(MemberDataAttribute).IsAssignableFrom(attrType) ||
                                    typeof(ClassDataAttribute).IsAssignableFrom(attrType) ||
                                    typeof(InlineDataAttribute).IsAssignableFrom(attrType))
                                {
                                    // Already handled these in the previous loop.
                                    continue;
                                }

                                // Skip attributes we can't handle
                                if (!attrType.IsPublic || !cad.Constructor.IsPublic || !cad.ConstructorArguments.All(c => c.ArgumentType.IsPublic))
                                {
                                    Log($"Unsupported custom data attribute {cad.AttributeType} on test method {testMethod.Name}.");
                                    continue;
                                }

                                // Store the attribute type and the ctor values for it.
                                object[] values = (object[])UnwrapCustomAttributeTypedArguments(typeof(object), cad.ConstructorArguments);
                                cases.Add(new TestCase { MemberDataMember = cad.Constructor, Values = values });
                            }
                            catch (Exception e)
                            {
                                Log($"Error processing {cad.AttributeType} on test method {testMethod.Name}: {e.Message}.");
                            }
                        }
                    }
                    else
                    {
                        // There are no arguments to the method, so we just add a single test case to represent invoking the method.
                        cases.Add(new TestCase());
                    }

                    return KeyValuePair.Create(tc, cases);
                }).ToDictionary(k => k.Key, k => k.Value);

            return testCases;
        }

        private static Array UnwrapCustomAttributeTypedArguments(Type elementType, IList<CustomAttributeTypedArgument> args)
        {
            Array result = Array.CreateInstance(elementType, args.Count);

            for (int i = 0; i < args.Count; i++)
            {
                CustomAttributeTypedArgument cata = args[i];
                object newArg = cata.Value is IReadOnlyCollection<CustomAttributeTypedArgument> roc ?
                    UnwrapCustomAttributeTypedArguments(cata.ArgumentType.GetElementType(), roc.ToArray()) :
                    cata.Value;
                try
                {
                    result.SetValue(newArg, i);
                }
                catch
                {
                    throw new Exception($"Couldn't store {newArg} into array {result}");
                }
            }

            return result;
        }

        /// Writes the code for invoking the test case into the <see cref="StringBuilder"/>.
        /// <param name="sb">The destination StringBuilder.</param>
        /// <param name="testCaseDisplayName">The display name of the test case.</param>
        /// <param name="testMethodType">The type on which the test method lives.</param>
        /// <param name="testMethod">The test method.</param>
        /// <param name="testCase">The test case.</param>
        private static void GenerateTestCaseCode(
            StringBuilder sb, string testCaseDisplayName, Type testMethodType, MethodInfo testMethod, TestCase testCase)
        {
            // Writes out ".MethodName(arg1, arg2, ...)" when all arguments are statically available.
            // The arguments are written as literals.
            void WriteArgumentListStatic(object[]? arguments, ParameterInfo[] parameters)
            {
                // Handle optional arguments by populating the input array with the defaults
                // whereever they exist and didn't already contain a value.  Also handle
                // a null input as meaning a null argument as input to a parameter.
                if (arguments == null)
                {
                    if (parameters.Length > 0)
                    {
                        arguments = new object[parameters.Length];
                    }
                }
                else if (arguments.Length < parameters.Length)
                {
                    var newArguments = new object[parameters.Length];
                    Array.Copy(arguments, 0, newArguments, 0, arguments.Length);
                    for (int i = arguments.Length; i < parameters.Length; i++)
                    {
                        if (parameters[i].HasDefaultValue)
                        {
                            newArguments[i] = parameters[i].DefaultValue;
                        }
                    }
                    arguments = newArguments;
                }

                // Write out the argument list
                sb.Append("(");
                for (int i = 0; i < parameters.Length; i++)
                {
                    if (i != 0)
                    {
                        sb.Append(", ");
                    }

                    sb.Append(EncodeLiteral(arguments?[i], parameters[i].ParameterType));
                }
                sb.Append(")");
            }

            // Writes out ".MethodName(Cast<T0>(args[0]), Cast<T1>(args[1]), ...)" when all arguments are only
            // known at execution time from invoking a theory member data.
            void WriteArgumentListDynamic(string argumentsName, ParameterInfo[] parameters)
            {
                sb.Append("(");
                for (int i = 0; i < parameters.Length; i++)
                {
                    if (i != 0)
                    {
                        sb.Append(", ");
                    }

                    sb.Append($"Cast<{GetTypeName(parameters[i].ParameterType)}>({argumentsName}[{i}])");
                }
                sb.Append(")");
            }

            // TODO: Support IDisposable on these objects passed to the ctors, and create one that's shared/reused
            // across every method on the same test class.

            // Gets the argument string to pass to the test class.  This may include instantiating
            // a class fixture to pass into the test class' ctor.
            string GetConstructorArgs()
            {
                ConstructorInfo[] ctors = testMethodType.GetConstructors();
                foreach (ConstructorInfo ctor in ctors)
                {
                    ParameterInfo[] parameters = ctor.GetParameters();
                    switch (parameters.Length)
                    {
                        case 0:
                            return string.Empty;

                        case 1:
                            string typeName = parameters[0].ParameterType.Name == "ITestOutputHelper" ?
                                "DefaultTestOutputHelper" :
                                GetTypeName(parameters[0].ParameterType);
                            return $"new {typeName}()";
                    }
                }

                Log($"Error processing ctors for {testMethod.Name}.");
                return string.Empty;
            }

            // Write out the method call to invoke the test case with all arguments known at compile time.
            void WriteInvocationStatic(object[]? arguments, ParameterInfo[] parameters)
            {
                if (testMethod.IsStatic)
                {
                    sb.Append($"Execute(\"{testCaseDisplayName}\", () => {GetTypeName(testMethodType)}.{testMethod.Name}");
                    WriteArgumentListStatic(arguments, parameters);
                    sb.AppendLine(");");
                }
                else if (testMethodType.GetInterface("IDisposable") != null)
                {
                    sb.AppendLine($"using (var inst = new {GetTypeName(testMethodType)}({GetConstructorArgs()}))");
                    sb.Append($"Execute(\"{testCaseDisplayName}\", () => inst.{testMethod.Name}");
                    WriteArgumentListStatic(arguments, parameters);
                    sb.AppendLine(");");
                }
                else
                {
                    sb.Append($"Execute(\"{testCaseDisplayName}\", () => new {GetTypeName(testMethodType)}({GetConstructorArgs()}).{testMethod.Name}");
                    WriteArgumentListStatic(arguments, parameters);
                    sb.AppendLine(");");
                }
            }

            // Write out the method call to invoke the test case with all arguments known at run time.
            void WriteInvocationDynamic(string argumentsName, ParameterInfo[] parameters)
            {
                if (testMethod.IsStatic)
                {
                    sb.Append($"Execute(\"{testCaseDisplayName}\", () => {GetTypeName(testMethodType)}.{testMethod.Name}");
                    WriteArgumentListDynamic(argumentsName, parameters);
                    sb.AppendLine(");");
                }
                else if (testMethodType.GetInterface("IDisposable") != null)
                {
                    sb.AppendLine($"using (var inst = new {GetTypeName(testMethodType)}({GetConstructorArgs()}))");
                    sb.Append($"Execute(\"{testCaseDisplayName}\", () => inst.{testMethod.Name}");
                    WriteArgumentListDynamic(argumentsName, parameters);
                    sb.AppendLine(");");
                }
                else
                {
                    sb.Append($"Execute(\"{testCaseDisplayName}\", () => new {GetTypeName(testMethodType)}({GetConstructorArgs()}).{testMethod.Name}");
                    WriteArgumentListDynamic(argumentsName, parameters);
                    sb.AppendLine(");");
                }
            }

            // Get the parameters for the test method.
            ParameterInfo[] parameters = testMethod.GetParameters();

            // Write out the invocation, with input coming from a theory data attribute if relevant.
            switch (testCase.MemberDataMember)
            {
                case MethodInfo mi:
                    // This is a theory with data coming from a MemberData method.
                    string memberDataArgs = string.Empty;
                    if (testCase.Values != null)
                    {
                        // There are arguments to the member data; serialize them to be used in the call to it.
                        ParameterInfo[] memberDataParameters = mi.GetParameters();
                        var argsSb = new StringBuilder();
                        for (int i = 0; i < testCase.Values.Length; i++)
                        {
                            if (i != 0)
                            {
                                argsSb.Append(", ");
                            }
                            argsSb.Append(EncodeLiteral(testCase.Values[i], memberDataParameters[i].ParameterType));
                        }
                        memberDataArgs = argsSb.ToString();
                    }
                    sb.AppendLine($"foreach (object[] row in {GetTypeName(mi.ReflectedType)}.{mi.Name}({memberDataArgs}))");
                    WriteInvocationDynamic("row", parameters);
                    break;

                case PropertyInfo pi:
                    // This is a theory with data coming from a MemberData property.
                    sb.AppendLine($"foreach (object[] row in {GetTypeName(pi.ReflectedType)}.{pi.Name})");
                    WriteInvocationDynamic("row", parameters);
                    break;

                case FieldInfo fi:
                    // This is a theory with data coming from a MemberData field.
                    sb.AppendLine($"foreach (object[] row in {GetTypeName(fi.ReflectedType)}.{fi.Name})");
                    WriteInvocationDynamic("row", parameters);
                    break;

                case Type ti:
                    // This is a theory with data coming from a ClassData data attribute.
                    sb.AppendLine($"foreach (object[] row in ((IEnumerable<object[]>)new {GetTypeName(ti)}())");
                    WriteInvocationDynamic("row", parameters);
                    break;

                case ConstructorInfo ci:
                    // This is a theory with data coming from a custom data attribute.
                    sb.AppendLine($"foreach (object[] row in new {GetTypeName(ci.DeclaringType)}");
                    WriteArgumentListStatic(testCase.Values, ci.GetParameters());
                    sb.Append(".GetData(null))"); // TODO: Generate code to construct a method info to pass in instead of null?
                    WriteInvocationDynamic("row", parameters);
                    break;

                default:
                    // This is either a method with no arguments, or it's a theory with theory data
                    // coming from an InlineData or some other means where we know all of the values
                    // at compile time.
                    WriteInvocationStatic(testCase.Values, parameters);
                    break;
            }
        }

        /// Encodes the provided object as a literal.
        /// <param name="literal">The literal to encode.</param>
        /// <param name="expectedType">The type that's expected at the usage location.</param>
        /// <returns>A string representing the encoded literal.</returns>
        private static string EncodeLiteral(object? literal, Type? expectedType)
        {
            if (literal == null)
            {
                return "null";
            }

            if (literal is Type t)
            {
                return $"typeof({GetTypeName(t)})";
            }

            if (literal is Array arr)
            {
                Type elementType = literal.GetType().GetElementType();
                return
                    $"new {GetTypeName(elementType)}[]" +
                    "{" +
                    string.Join(",", arr.Cast<object>().Select(o => EncodeLiteral(o, elementType))) +
                    "}";
            }

            if (literal is Guid guid)
            {
                return $"Guid.Parse(\"{guid}\")";
            }

            if (literal is IntPtr ptr)
            {
                return $"new IntPtr(0x{((long)ptr).ToString("X")})";
            }

            if (literal is UIntPtr uptr)
            {
                return $"new UIntPtr(0x{((ulong)uptr).ToString("X")})";
            }

            string? result = null;

            if (literal is Enum e)
            {
                result = $"({GetTypeName(e.GetType())})({e.ToString("D")}{(Convert.GetTypeCode(literal) == TypeCode.UInt64 ? "UL" : "L")})";
            }
            else
            {
                switch (Type.GetTypeCode(literal.GetType()))
                {
                    case TypeCode.Boolean:
                        result = ((bool)literal).ToString().ToLowerInvariant();
                        break;
                    case TypeCode.Char:
                        result = $"'\\u{((int)(char)literal).ToString("X4")}'";
                        break;
                    case TypeCode.SByte:
                        result = $"(sbyte)({literal.ToString()})";
                        break;
                    case TypeCode.Byte:
                        result = $"(byte){literal.ToString()}";
                        break;
                    case TypeCode.Int16:
                        result = $"(short)({literal.ToString()})";
                        break;
                    case TypeCode.UInt16:
                        result = $"(ushort){literal.ToString()}";
                        break;
                    case TypeCode.Int32:
                        result = $"({literal.ToString()})";
                        break;
                    case TypeCode.UInt32:
                        result = $"{literal.ToString()}U";
                        break;
                    case TypeCode.Int64:
                        result = $"({literal.ToString()}L)";
                        break;
                    case TypeCode.UInt64:
                        result = $"{literal.ToString()}UL";
                        break;
                    case TypeCode.Decimal:
                        result = $"({literal.ToString()}M)";
                        break;
                    case TypeCode.Single:
                        result =
                            float.IsNegativeInfinity((float)literal) ? "float.NegativeInfinity" :
                            float.IsInfinity((float)literal) ? "float.PositiveInfinity" :
                            float.IsNaN((float)literal) ? "float.NaN" :
                            $"(float)({((float)literal).ToString("R")}F)";
                        break;
                    case TypeCode.Double:
                        result =
                            double.IsNegativeInfinity((double)literal) ? "double.NegativeInfinity" :
                            double.IsInfinity((double)literal) ? "double.PositiveInfinity" :
                            double.IsNaN((double)literal) ? "double.NaN" :
                            $"(double)({((double)literal).ToString("R")}D)";
                        break;
                    case TypeCode.String:
                        var sb = new StringBuilder();
                        sb.Append('"');
                        foreach (char c in literal.ToString())
                        {
                            if (c == '\\')
                            {
                                sb.Append("\\\\");
                            }
                            else if (c == '"')
                            {
                                sb.Append("\\\"");
                            }
                            else if (c >= 32 && c < 127)
                            {
                                sb.Append(c);
                            }
                            else
                            {
                                sb.Append($"\\u{((int)c).ToString("X4")}");
                            }
                        }
                        sb.Append('"');
                        result = sb.ToString();
                        break;
                    default:
                        Log($"Error encoding literal {literal} ({literal?.GetType()})");
                        return string.Empty;
                }
            }

            if (expectedType != null &&
                Nullable.GetUnderlyingType(expectedType) == null &&
                literal.GetType() != expectedType &&
                !expectedType.IsGenericParameter)
            {
                result = $"({GetTypeName(expectedType)})({result})";
            }

            return result;
        }

        /// Gets the full type name that can be written into the source, e.g. in a typeof or in a method invocation.
        /// <param name="type">The type.</param>
        /// <returns>The rendered type name.</returns>
        private static string GetTypeName(Type type)
        {
            if (type == typeof(void))
            {
                return "void";
            }

            if (type == typeof(object))
            {
                return "object";
            }

            if (!type.IsEnum)
            {
                switch (Type.GetTypeCode(type))
                {
                    case TypeCode.Boolean: return "bool";
                    case TypeCode.Byte: return "byte";
                    case TypeCode.Char: return "char";
                    case TypeCode.Decimal: return "decimal";
                    case TypeCode.Double: return "double";
                    case TypeCode.Int16: return "short";
                    case TypeCode.Int32: return "int";
                    case TypeCode.Int64: return "long";
                    case TypeCode.SByte: return "sbyte";
                    case TypeCode.Single: return "float";
                    case TypeCode.String: return "string";
                    case TypeCode.UInt16: return "ushort";
                    case TypeCode.UInt32: return "uint";
                    case TypeCode.UInt64: return "ulong";
                }
            }

            if (type.IsArray)
            {
                return GetTypeName(type.GetElementType()) + "[" + new string(',', type.GetArrayRank() - 1) + "]";
            }

            if (type.IsPointer)
            {
                return GetTypeName(type.GetElementType()) + "*";
            }

            Type[] genericArgs = type.GetGenericArguments();
            Type[] parentGenericArgs = type.DeclaringType?.GetGenericArguments() ?? Type.EmptyTypes;
            string? name = null;

            if (type.IsNested)
            {
                if (type.DeclaringType.IsGenericType &&
                    !type.DeclaringType.IsConstructedGenericType &&
                    type.IsConstructedGenericType)
                {
                    name = GetTypeName(type.DeclaringType.MakeGenericType(genericArgs.Take(parentGenericArgs.Length).ToArray()));
                }
                else
                {
                    name = GetTypeName(type.DeclaringType);
                }

                name += "." + type.Name;
            }
            else if (!string.IsNullOrEmpty(type.Namespace))
            {
                name = type.Namespace + "." + type.Name;
            }
            else
            {
                name = type.Name;
            }

            if (!type.IsGenericType)
            {
                return name;
            }

            int backtickPos = name.IndexOf("`");
            if (backtickPos == -1)
            {
                return name;
            }

            name = name.Substring(0, backtickPos);

            if (type.IsNested && type.DeclaringType.IsGenericType)
            {
                genericArgs = genericArgs.Skip(parentGenericArgs.Length).ToArray();
            }

            return
                name +
                "<" +
                (type.IsConstructedGenericType ? string.Join(", ", genericArgs.Select(g => GetTypeName(g))) : new string(',', genericArgs.Length - 1)) +
                ">";
        }

        /// Determines whether the type has public visibility such that we can emit calls into it.
        /// <param name="type">The type.</param>
        /// <returns>true if we can make calls to the type; otherwise, false.</returns>
        private static bool IsPublic(Type type)
        {
            if (type.IsArray || type.IsPointer)
            {
                return IsPublic(type.GetElementType());
            }

            if (type.IsNested)
            {
                return type.IsNestedPublic && IsPublic(type.DeclaringType);
            }

            return type.IsPublic;
        }

        /// Determines whether the test class has a ctor we can use to instantiate it.
        /// <param name="testClassType">The type.</param>
        /// <returns>true if we can instantiate the test class; otherwise, false.</returns>
        private static bool HasSupportedConstructor(Type testClassType)
        {
            foreach (ConstructorInfo ci in testClassType.GetConstructors())
            {
                ParameterInfo[] parameters = ci.GetParameters();
                switch (parameters.Length)
                {
                    case 0:
                        // If there's a default ctor, we're good to go.
                        return true;

                    case 1:
                        // If the test class takes an ITestOutputHelper, we can manufacture a TestOutputHelper.
                        if (parameters[0].ParameterType == typeof(ITestOutputHelper))
                        {
                            return true;
                        }

                        // If the test class takes a type that has a public ctor we can
                        // use to create it, then we're also fine.
                        Type ctorArgType = parameters[0].ParameterType;
                        if (IsPublic(ctorArgType) && ctorArgType.GetConstructor(Type.EmptyTypes) != null)
                        {
                            return true;
                        }
                        break;
                }
            }

            // We don't know how to instantiate this test class.
            return false;
        }

        /// Log a message to the console.
        /// <param name="message">The message to log.</param>
        private static void Log(string message)
        {
            message ??= string.Empty;

            Console.ForegroundColor = ConsoleColor.DarkYellow;
            Console.Write(DateTime.Now + " | ");
            Console.ResetColor();

            const string ErrorStart = "Error";
            const string WarningStart = "Unsupported";

            if (message.StartsWith(ErrorStart))
            {
                Console.ForegroundColor = ConsoleColor.Red;
                Console.Write(ErrorStart);
                Console.ResetColor();
                message = message.Substring(ErrorStart.Length);
            }
            else if (message.StartsWith(WarningStart))
            {
                Console.ForegroundColor = ConsoleColor.Yellow;
                Console.Write(WarningStart);
                Console.ResetColor();
                message = message.Substring(WarningStart.Length);
            }

            Console.WriteLine(message);
        }

        /// Represents a test case for a test method.
        private sealed class TestCase
        {
            /// The method, property, or field to invoke or access to retrieve theory data.
            public MemberInfo? MemberDataMember;
            ///
            /// If <see cref="MemberDataMember"/> is a MethodInfo, the arguments to the test method, if there are any.
            /// Otherwise, the arguments to the member data method, or null if there aren't any.
            ///
            public object[]? Values;
        }

        /// Default options to use when constructing xunit options if no additional options are provided.
        private static readonly string[] s_defaultXunitOptions = new string[]
        {
            "-notrait", "category=nonnetcoreapptests",
            "-notrait", "category=nonwindowstests",
            "-notrait", "category=IgnoreForCI",
            "-notrait", "category=failing",
            "-notrait", "category=OuterLoop"
        };

        /// The code to write out to the output file before all of the test cases.
        private const string CodeTemplateStart =
@"using System;
using System.Threading.Tasks;
using Microsoft.DotNet.XUnitExtensions;
using Xunit.Abstractions;

public static class Test
{
    private static bool s_verbose;
    private static int s_succeeded, s_failed;

    public static void Main(string[] args)
    {
        if (args[0] == ""-v"") s_verbose = true;

";

        /// The code to write out to the output file after all of the test cases.
        private const string CodeTemplateEnd =
@"
        Console.WriteLine();
        Console.ForegroundColor = ConsoleColor.Yellow;
        int total = s_succeeded + s_failed;
        Console.WriteLine($""Total : {total}"");
        if (total > 0)
        {
            Console.WriteLine($""Passed: {s_succeeded} ({(s_succeeded * 100.0 / total).ToString(""N"")}%)"");
            Console.WriteLine($""Failed: {s_failed} ({(s_failed * 100.0 / total).ToString(""N"")}%)"");
        }
        Console.ResetColor();
    }

    private static void Execute(string name, Action action)
    {
        if (s_verbose) Console.WriteLine(name);
        try
        {
            action();
            s_succeeded++;
        }
        catch (SkipTestException) { }
        catch (Exception e)
        {
            s_failed++;
            Console.ForegroundColor = ConsoleColor.Red;
            Console.Error.WriteLine(name + "" [FAIL]"");
            Console.ResetColor();
            Console.Error.WriteLine(e);
        }
    }

    private static void Execute(string name, Func<Task> action)
    {
        if (s_verbose) Console.WriteLine(name);
        try
        {
            action().GetAwaiter().GetResult();
            s_succeeded++;
        }
        catch (SkipTestException) { }
        catch (Exception e)
        {
            s_failed++;
            Console.ForegroundColor = ConsoleColor.Red;
            Console.Error.WriteLine(name + "" [FAIL]"");
            Console.ResetColor();
            Console.Error.WriteLine(e);
        }
    }

    private static T Cast<T>(object obj) =>
        obj is null ? default :
        obj is T t ? t :
        (T)Convert.ChangeType(obj, typeof(T));

    private sealed class DefaultTestOutputHelper : ITestOutputHelper
    {
        public void WriteLine(string message)
        {
            if (s_verbose) Console.WriteLine(""TestOutputHelper: "" + message);
        }

        public void WriteLine(string format, params object[] args)
        {
            if (s_verbose) Console.WriteLine(""TestOutputHelper: "" + string.Format(format, args));
        }
    }
}
";

        /// The template for the .csproj.
        private const string CSProjTemplate =
@"<Project Sdk=""Microsoft.NET.Sdk"">
  <PropertyGroup>
    <OutputType>Exe</OutputType>
    <TargetFramework>netcoreapp3.0</TargetFramework>
    <LangVersion>preview</LangVersion>
    <TreatWarningsAsErrors>true</TreatWarningsAsErrors>
    <NoWarn>IDE0049</NoWarn>
  </PropertyGroup>
  <ItemGroup>
    <Reference Include=""xunit.core""><HintPath>#HelperAssemblyLocation#xunit.core.dll</HintPath></Reference>
    <Reference Include=""xunit.assert""><HintPath>#HelperAssemblyLocation#xunit.assert.dll</HintPath></Reference>
    <Reference Include=""xunit.abstractions""><HintPath>#HelperAssemblyLocation#xunit.abstractions.dll</HintPath></Reference>
    <Reference Include=""System.Runtime.CompilerServices.Unsafe""><HintPath>#HelperAssemblyLocation#System.Runtime.CompilerServices.Unsafe.dll</HintPath></Reference>
    <Reference Include=""Microsoft.DotNet.XUnitExtensions""><HintPath>#HelperAssemblyLocation#Microsoft.DotNet.XUnitExtensions.dll</HintPath></Reference>
    <Reference Include=""#TestAssembly#""><HintPath>#TestAssemblyLocation#</HintPath></Reference>
  </ItemGroup>
</Project>";
    }
}

redpajama_set_name: RedPajamaGithub


7:00am: Tour guide will meet you at the lobby of your hotel and after a short ride by comfortable minivan you will find yourself at Tan Cang Pier, where the adventure begins.
11:00am: When the Cu Chi tour is finished you will hop on Les Rives minivan and head to Cao Dai Temple.
12:00pm: Visit the Cao Dai Holy See Temple, a mixture of a few different religions, located in Tay Ninh province. Walk around the temple to see its marvelous and mysterious architecture and watch the noon mass.
1:30pm: On the way to Ho Chi Minh City, stop by a local restaurant for a delicious traditional lunch.
4:00pm: Arrive back to Saigon to be dropped off at your place of stay. Please note that due to the individual nature of the tours, times are approximate and can vary slightly.


Image and Video Encryption provides a unified overview of techniques for encryption of images and video data. This ranges from commercial applications like DVD or DVB to more research oriented topics and recently published material. This volume introduces different techniques from unified viewpoint, then evaluates these techniques with respect to their respective properties (e.g., security, speed.....).
The authors experimentally compare different approaches proposed in the literature and include an extensive bibliography of corresponding published material.
of maturity to warrant a comprehensive textbook treatment.
ideas for books under this series.
©2005 Springer Science + Business Media, Inc.
Print ©2005 Springer Science + Business Media, Inc.
Testimages used to evaluate the rate distortion performance.
Rate-distortion performance of JPEG and JPEG 2000.
Quality values for K = 0.
Baker Map (1/2'1/2) applied to Lena.
Visual examples for selective bitplane encryption' direct reconstruction.
Further visual examples for selective bitplane encryption.
Visual examples for encryption of MSB and one additional bitplane.
Visual examples for the efficiency of the Replacement Attack.
MSB of the Lena image and reconstructed Bitplane.
Combination of two half-images after Reconstruction Attack.
Example for leaf ordering I and II.
from digital rights management (DRM) schemes to secured personal communication.
bibliography of material related to these topics' and we experimentally compare different systems proposed in the literature and in commercial systems.
section 1.3.8 (chapter 5) in this book.
Science Fund have been supporting the work in the multimedia security area.
towards these emerging technologies and applications.
 is published in autumn 2004.
the fact that different doctors do not have access to each others patient data.
and transmitted over networks of any kind.
computer networks, video telephony is a technology that has been emerging quite recently in the area of mobile cell phone technology. Earlier attempts to marketise videophones operating over traditional phone lines (e.g.
the data onto the storage media.
to encryption (as already indicated above).
payed their subscription fees should be able to consume Pay-TV channels.
news data loose their value very quickly.
respective requirements and desired properties in some detail.
content owner as it is already the case for audio.
software, or even descriptions how to build pirate smartcards.
see below), security must not be sacrificed.
data and the encryption of data encryption is classically applied to (e.g.
application" with respect to speed in the area of visual data encryption.
requirements have to be kept to a minimum.
not even start to process the data due to the lack of header information.
cause the viewer to crash eventually.
the delivery of the data.
the video which is an enormous key management problem.
processing power to provide full real-time encryption. For low-bitrate applications like GSM or UMTS this has been solved already.
secure operation mode no matter which format is used to represent the data.
leads to a high amount of start up phases which may threaten security.
interfering with the compression process (especially with the entropy coding stage) can hardly be avoided.
classical "hard" encryption schemes like full AES encryption in this context.
but facilitate a specific business model for trading visual data.
standardised framework for digital rights management (DRM) issues including encryption support. These techniques provide a syntactical framework but no specific techniques have been standardised. Applications making use of these definitions are still yet to come.
techniques have been standardised. Applications making use of these definitions are still yet to come.
the literature and in commercial systems.
defined and conditions for the sensible use of these techniques are derived.
open questions and future issues in the area of image and video encryption.
frames, the elements of these arrays are denoted as pixels (picture elements).
channels (e.g. the YUV model).
Lossless compression: after having decompressed the data, it is numerically identical to the original values.
Lossy compression: the decompressed data is an approximation of the original values.
(Fig. 2.1) for predicting the current frame from previously (de)coded ones.
are random access points to the sequence, these frames are called I-frames.
a different quantisation matrix is used.
is the current frame and the reference frame.
enable scalable video streams and error resilience functionalities.
video at an enormous computational cost .
proven to be serious competitors to DCT based compression schemes.
values taking into account the high inter-subband correlations.
several times (see Figure 2.3.a).
detail images (see Figure 2.3.b); for more details see .
obtained which is exploited by all second generation wavelet coding schemes.
to a node of the tree.
insignificant sets), the LIP (list of insignificant pixels), and the LSP (list of significant pixels). The latter list contains the sorted coefficients which are stored.
by 1, and go to step 2.
compared to for several years.
wavelet packet subband structures and anisotropic wavelet decomposition schemes.
strategy precludes structures across subbands or even code-blocks. These independent code-blocks are passed down the "coding pipeline" shown in Fig.
passed down the coding pipeline.
Although fractal compression exhibits promising properties (like e.g. fractal interpolation and resolution independent decoding) the encoding complexity turned out to be prohibitive for successful employment of the technique.
of second generation wavelet codecs.
faster since it is a simple lookup table operation.
information security such as confidentiality, data integrity, entity authentication, and data origin authentication (see [96, p.4]).
cryptology: is the study of cryptography and cryptanalysis.
some decades ago it became science.
A message readable by humans or computers is usually called plaintext.
called decryption to recreate the original plaintext.
inability to falsely deny that the sender sent the message.
to Schneier  the warden Walter, the prover Peggy and the verifier Victor.
or Blowfish), 128 bits (IDEA, AES), 192 and 256 bits (both AES).
different keys are involved, they are related by some mathematical property.
distributed to every one, just one person has to guard the secret part of the key.
secure but a mathematical proof for any individual cipher is still missing.
Block ciphers can be deployed in different so-called "Operation Modes".
in parallel is possible, transmission errors are confined to the current block.
same cipher block provided the same key is used.
and it changes a single bit of plaintext in the next block.
be used when data must be encrypted with a size less than the block length.
requirements to keep it secret.
stream can be computed independently of the data that must be encrypted.
bits. DES performs 16 rounds of substitution (with given S-boxes) and permutation (with given P-boxes).
time). This constituted a problem since many organisations relied on DES.
countermeasure was applied: establish a different cipher as a new standard.
This leads to AES, the Advanced Encryption Standard.
two Belgian cryptologists, Joan Daemen and Vincent Rijmen, with their algorithm "Rijndael", which is based on Galois Field theory.
to withdraw DES as a standard, just keeping it in the triple-DES variant.
cipher is that it must be tested and tried to get an impression of its security.
does not help about yet to be discovered attacks.
identical to the encryption operation.
- A5/3), or the cipher which encrypts the GPS signal.
algorithms: speed. The solution is to use the best of both worlds.
see the Kerckhoff principle), but does not know the input.
chosen plaintext attack: and here the attacker can even choose the input data.
boomerang attack . An overview about such attacks is given in .
knowledge about otherwise secret data.
therefore classified into the second category.
requirements for a particular multimedia application.
decide whether its use is sensible or not.
criterion is whether the application operates in a lossless or lossy environment.
decoding of visual data is not possible (e.g. mobile clients).
be considerably lower as for encryption, contrasting to the relation if both operations are performed in software.
Here, P is the identification of relevant features in the compressed bitstream.
equation (4.1) may be satisfied easily and SE definitely makes sense.
processing time as achieved by SE in a software based system.
we discuss SE of a JPEG 2000 bitstream in an on-line scenario in detail.
for entirely encrypting the bitstream.
each operation consists of an addition, a multiplication and two array lookups.
adding the according share of operations for the remaining stages).
of instructions for encryption is significantly lower.
Visual data require a large processing capacity or transmission bandwidth.
JPEG or JPEG 2000 is the optimal lossy compression scheme for this application area.
model the costs in terms of rate-distortion performance and computational demand of the stages in the processing chain of the target environment.
interesting aspects are rate-distortion performance and computational demand.
It is generally known that the rate-distortion performance of JPEG 2000 is significantly better, especially at low bitrates.
Figure 4.2. Testimages used to evaluate the rate distortion performance.
answer this question, knowledge about the relation of computational costs (i.e.
timing behaviour) of the three stages of the processing chain is the key issue.
images and show also an average curve obtained by spline approximation.
seconds on an Intel Pentium III with 1GHz and 256MB SDRAM (this architecture is used for all subsequent measurements as well).
IEEE802.11b WLAN, and 100MBit/s ethernet. We use a client-server application which transfers data to the client as soon as the connection has been set up.


Its that time of year again! We're getting ready for our first big show of the year. Our stand is packed and ready to go and we'll be heading down to the 2017 VM and Display Show next week on the 5th and 6th of April (Wednesday and Thursday). The show will be held in the Business Design Centre in London and we are really looking forward to showcasing our work and meeting up with clients and other professionals from the retail design industry at this exciting event.
The VM and Display Show is the longest running exhibition for our industry and covers everything to do with retail design and visual merchandising. It is the only UK exhibition dedicated exclusively to the creative aspect of the retail industry and brings together everything from mannequins, print and props to POP, lighting and fabrics all under one roof over two days. The show is an international event. It features exhibits from across the globe and is also attended by lots of global businesses seeking inspiration and innovation.
At Barber we are experienced at working with international clients. Our retail designs have been installed in stores and malls across the world – from Hong Kong to Dubai. This year we will be showcasing some of our recent work including our retail designs for Neals Yard's flagship Covent Garden store and Peacemarsh HQ, the Sovereign Centre in Weston- Super-Mare, SugarSin in Covent Garden, the Discovery Store in Dubai and Love Brand and Co. Visitors to our Barber Design stand can expect an enthusiastic welcome and some expert advice on any aspect of retail design and branding. We can help you to turn your retail dream into a reality – from concept to installation. We have created award-winning designs for a wide range of retail businesses worldwide – from small, independent start ups to global franchises. Just ask us to find out more!
There are just a few days left if you want to sign up for the show. It is free to attend and you can register on the VM and Display show website: www.vmanddisplayshow.com/registration. If you do make it to the event make sure you come and find Barber Design on stand G2 to check out some of recent work and find out what we can do for your retail business.


This statement bothers me for several reasons.
First, it presumes that someone (other than people like us) care what we "say" about anything.
Third, the statement: "The church has to say something about this" presumes that we are the church.
Are we really the church, even though it is nearly impossible for most of our churches to actually give something away without trying to get a "suggested donation" or hear a religious pitch in return?
Are we really the church, even though we spend the vast majority of our money on professional clergy, building maintenance, and programs to benefit our members, so much so that a community that donates a mere ten percent of their income to the poor and needy is considered generous?
Are we really the church, even though our most pressing statistical priorities involve butts in seats and dollars in a budget, priorities that any halfway-honest reading of scripture indicates that Jesus didn't share?
Are we really the church, even though many of our most committed members consider the whole of their Christianity to be attending church, giving money, sitting on a committee, and going to a Bible Study?
Are we really the church, even though the collective life of our denomination looks almost nothing like the Jesus we claim to follow?
In our denominational ecclesiology, a group of people can get together, have a worship service in a building and otherwise live completely un-Christian lives and we have to call that "church".
If being church is a 24/7 lifestyle in community, being the body of Christ to the world (a rather uncreative statement most would agree is a solid theology), then, how is a group of people who say that they are following Jesus but whose collective lives look nothing like Jesus, really "the church"?
And in the rest of the picture? A group of white, hooded Klu-Klux Klansmen.
If you read the liturgy of the Klan, (or, indeed of many groups of their ilk), it's hard to doubt that they sincerely believe they are church, and yet, I can't imagine Jesus doing anything but getting crucified by them.
You want to tell me that's a church?
John Alexander, in his book, Being the Church, explains it this way.
Fans of the Chicago Cubs don't seem to mind too much that their team plays badly and drops the ball from time to time. But what if in the middle of a close game, the Cubs sat down in the infield and started playing tiddlywinks? Or eating lunch?
No doubt, the illustration will prompt all kinds of supposedly entertaining remarks about the Cubs, but when the people of God forget what they're about, it's not entertaining. Dropping the ball is one thing. We all do that. I certainly do. And the most casual reading of 1 Corinthians or of Revelation 2-3 prepares us for church that drop the ball. Often and badly, even. But I'm not sure it prepares us for churches playing the wrong game….
What's troubling isn't that churches fail…The New Testament gives us little reason to expect heroics of ourselves or of others with regularity.
When our so-called churches don't really look like Jesus, even when they have some positive benefit for those who participate in them, that's the Rotary Club, not the church.
Maybe it's time for us to stop discussing whether we're doing church well and discuss whether we're doing church at all.
I think this is true Bill – and there are several metaphors like this idea of church as mother that can help us check whether we're being church or not. For me, the most helpful metaphor has been the image of being poured out, as it's talked about in Philippians 2.
Pope Francis has a lot of wisdom to teach the church about being church, I think.


text:
Home Talent T-Up – Mr. Paranoid
T-Up – Mr. Paranoid
Indie artist T-Up delivers a classic for his fans with his new project Mr. Paranoid. This project features one-of-a-kind production and hard-hitting conscious verses. Mr. Paranoid has steadily been grabbing attention through social media and gaining more and more fans. People can't seem to get enough of T-Up's sound. Stay on the lookout for T-Up for the rest of 2015.
Twitter @Loyal_T_up
SoundCloud https://m.soundcloud.com/real-t-up
thirdeyevibe@gmail.com
tags: Audio breaking Dope Download Hip Hop Listen Media Mixtape Mixtapes Mr. Paranoid Music Session Sessions spotlight T-Up Talent
previous Tomi Thomas - The Renaissance
next Nike Zoom Vapor Tour 9.5 "Legend"
The Notorious B.I.G. To Be Inducted Into 2020 Rock And Roll Hall Of Fame
Baby, baby.
Thundercat Announces New Album, 'It Is What It Is'
Spring just got a bit sunnier..

redpajama_set_name: RedPajamaCommonCrawl


text:
Dog Blood
By David Moody
Read by Gerard Doyle
David Moody Blackstone Publishing 9780312532888
The Hater Series: Book 2
Category: Fiction/Science Fiction
A Kirkus Reviews Top 25 Book of 2010
The Earth has been torn apart. Everyone is either Human or Hater. Victim or killer. Major cities have become vast refugee camps where human survivors cower together in fear. Amidst this indiscriminate fighting and killing, Danny McCoyne is on a mission to find his daughter, Ellis. Free of inhibitions, unrestricted by memories of the previous world, and driven by instinct, children are pure Haters, and might well be the deciding factor in the future of the Hater race. But as McCoyne makes his way into the heart of human territory, an incident on the battlefield sets in place an unexpected chain of events, forcing him to question everything he believes he knows about the new order that has arisen, and the dynamic of the Hate itself.
"If Moody's Hater books follow the familiar zombie story of civilization rent to tatters by mindless, bloodthirsty former humans, they turn it on its ear by speaking with the voice of one of the zombies rather than one of their victims. Readers have seen a pre-Hater Danny head off to his dead-end job, get frustrated with his kids and engage in other everyday activities. That, along with Moody's spare prose, makes the book's scenes of brutal violence all the more affecting. Lean, relentless and terrifying." —Kirkus Reviews
Author Bio: David Moody
David Moody grew up in Birmingham on a diet of horror and pulp science fiction books and movies. He worked for financial institutions before giving up his day job to write about the end of the world for a living. He has written a number of horror novels, including Autumn, which has been downloaded more than half a million times since its publication in 2001. He lives in the United Kingdom with his wife and a houseful of daughters and stepdaughters, which may explain his preoccupation with Armageddon.


text:
Puzzles & Comics
Cleburne Railroaders
Track/Cross Country
Find and Save
Cleburne, TX (76033)
Sunny skies. Becoming windy late. High 76F. Winds S at 20 to 30 mph. Higher wind gusts possible..
Generally clear skies. Low 52F. Winds SSW at 10 to 20 mph.
Find Us On All Platforms 24/7 | cleburnetimesreview.com
Readers Choice Contest
Pet Calendar 2022
Cleburne FD responds to house, grass fires
By Matt Smith/msmith@trcle.com
Cleburne Assistant Fire Chief Keith Scarbrough said the July 4 holiday passed peacefully with no major incidents.
"We had a couple of little grass fire calls is all," Scarbrough said. "I'm not sure if we even seized any fireworks this year. If the police got any they haven't brought them over here to be destroyed yet. Maybe people are starting to pay attention on not shooting fireworks in the city. Either way, it's a good thing. We like it when it's a nice quiet and safe fourth."
Firefighters responded at 7:08 p.m. Thursday to the 500 block of Trinity Street on reports of a grass fire. Firefighters found nothing originally upon arrival but later spotted a smoldering area of about 3 feet by 3 feet. Firefighters soaked the ground to extinguish embers then dug around the area to ensure the fire couldn't spread. No one was present and the cause of the fire remains undetermined.
Firefighters responded to another reported grass fire at 5:14 p.m. in the 400 block of North Hyde Park Boulevard only to find nothing upon arrival. Firefighters subsequently discovered that a person had been burning grass in his backyard but had put it out before firefighters arrived.
Cleburne provided mutual aid to the Joshua Fire Department on a house fire at 8:44 p.m. June 27 in the 900 block of County Road 910. The single-story home was fully involved when firefighters arrived. Cleburne firefighters assisted in knocking the fire down then left the situation in Joshua's hands.
Reports do not list the fire's cause nor whether anyone was injured.
Cleburne police calls
Cleburne police responded to a fraud call at 3:36 p.m. June 28 in the 100 block of North Ridgeway Drive. Someone attempted to purchase tires from a business over the phone with a stolen credit card.
Police responded to another fraud call at 9:17 a.m. Thursday in the 1700 block of North Main Street. The victim reported that the suspect paid for an all-terrain vehicle with a check that turned out to be bad. The incident remains under investigation.
Police responded to a theft call at 8:24 a.m. in the 600 block of West Henderson Street. Someone stole a lady's wallet while she was shopping.
Police responded to another theft call at 5:42 p.m. the same day in the 2200 block of Pipeline Road. Someone stole the victim's prescription medicine.
Police responded to a burglary call at 6:05 p.m. the same day in the 200 block of North Wood Street. Someone kicked in the door of the house and stole a laptop.
Police responded to a vandalism call at 10:53 p.m. Saturday in the 100 block of Williams Avenue. Someone cut three of the tires on the victim's vehicle.
Police responded to a vehicle burglary call at 11:40 p.m. the same day in the 200 block of Walls Drive. Someone stole the victim's purse from her unlocked vehicle. Police remind residents to lock their vehicles and remove valuables.
React to this story:
Cleburne Fd
Keith Scarbrough
This Week's Circulars
Judy Denton
Judy Denton, 75, of Cleburne, passed away January 15, 2022 in Cleburne. Graveside: 1:00pm, Thursday, January 20, 2022 Hopewell Cemetery.
Ann Curlee
Ann Curlee, 96, of Cleburne passed away January 12, 2022 in Cleburne. Service: 10:00am, Friday, January 21, 2022, Crosier-Pearson Cleburne Chapel.
Ricky Peikoff
Ricky Lee Peikoff, 64, of Alvarado passed away January 13, 2022 in Fort Worth. Visitation 9:00-5:00 Sunday at funeral home. Graveside: Private.
Johnny Rolston
Johnny D. Rolston, 86, of Burleson passed away January 10, 2022 in Keene. Service: 2:00pm, Wednesday, January 19, 2022 Crosier-Pearson Cleburne Chapel.
Bryan Payne
Bryan Kyle Payne, 36, of Everman passed away January 9, 2022 in Everman. Service: 2:00pm, Sunday, January 16, 2022 in the Crosier-Pearson Cleburne Chapel.
Alvarado man robbed, murdered in his home
One dead, two critical after Keene shooting; suspects on the loose
Former BISD substitute, city employee arrested for online solicitation of a minor
Two arrests stem from Tuesday shooting in Keene
Victim of Tuesday's fatal shooting identified; Narcotics found at scene
Four vehicle crash leads to intoxication arrest
Elks, Spartans, Zebras lead the way on 2021 All-County football team
Elks, Zebras headline All-Johnson County football superlatives
CHS cheerleaders competing Friday in UIL Spirit State Championships
Keeton, Long compete for county clerk seat
Stay up to date on COVID-19
Get Breaking News
Sign up now to get our FREE breaking news coverage delivered right to your inbox.
First Amendment: Congress shall make no law respecting an establishment of religion, or prohibiting the free exercise thereof; or abridging the freedom of speech, or of the press; or the right of the people peaceably to assemble, and to petition the Government for a redress of grievances.
cleburnetimesreview.com
108 S. Anglin St.
Email: mfaram@trcle.com
© Copyright 2022 CleburneTimesReview.com, 108 S. Anglin St. Cleburne, TX | Terms of Use | Privacy Policy


text:
J.S. Held Expands Construction Consulting Practice with Acquisition of Antonucci Consulting Corporation
Home·About Us·News
l Created with Sketch. Share on LinkedIn noun_Email_865812_000000 Created with Sketch. Forward Article
Antonucci Consulting Corporation Joins J.S. Held
J.S. Held bolsters professional consulting services and further strengthens resources along the East Coast.
Jericho, NY – November 17, 2017 – J.S. Held, a leading multi-disciplinary consulting firm, today announced that it has acquired Antonucci Consulting Corporation, a New York-based construction consulting company. Antonucci Consulting Corporation's damage evaluation and catastrophe response experience complements J.S. Held's portfolio of professional consulting services and further strengthens the company's coverage along the east coast.
Antonucci Consulting Corporation will operate immediately under the J.S. Held brand. Frank Antonucci Sr., founder of Antonucci Consulting Corporation, will join J.S. Held as Sr. Vice President in the company's New York metro region, continuing his focus on providing expert property damage evaluations, construction claims consulting services, and response to catastrophes throughout the nation. Frank Antonucci Jr., the current CEO, will join J.S. Held as a Vice President, also in New York.
"This is an exciting time for J.S. Held and we welcome our new team members," said Jon Held, President and Chief Executive Officer of J.S. Held. "I have known and highly respected Frank Antonucci Sr. for 40 years. He is a gifted and valuable resource in our industry. The chance to work with him at this stage of our respective careers is truly exciting. Under the leadership of his son, Frank Jr., Antonucci Consulting Corp. has maintained a level of continued excellence that we and our clients value highly."
Through a growing team of experts, national distribution of offices, and superior technology and processes, J.S. Held plans to continue to exceed client expectations as they strengthen their network of professional consulting experts throughout the United States.
"With this partnership in place, our clients with have access to a broader suite of services and a larger, more geographically diverse pool of expert consultants. We will also be able to deliver an enhanced client experience, as we adopt the technology and processes that are successfully in place at J.S. Held," said Frank Antonucci. "Essentially, we will become a more valuable resource for our clients."
Clients of Antonucci Consulting Corporation will now have access to J.S. Held's comprehensive line of services, which includes property damage consulting, surety services, construction claims consulting, project and program management, equipment consulting, and environmental, health and safety services.
J.S. Held continues its strong growth trajectory, with this being its tenth acquisition following a 2015 investment from Lovell Minnick Partners, a private equity firm specializing in investing in financial and related business services companies. Previous acquisitions include Donohue Consulting, Leighton Associates, Spex, Meridian Consulting, CEIPS, U.S. HELM, Lovett Silverman Construction Consultants, Inc., the Property Loss Division of Chroma Building Corp., and Wakelee Associates. Since 1974, J.S. Held has added the capabilities of specialized consulting businesses to better address complex construction and environmental matters globally. J.S. Held now has over 40 offices across the U.S. and Canada.
About J.S. Held LLC
J.S. Held is a leading construction consulting firm specializing in property damage consulting, surety services, construction claims consulting, project and program management, equipment consulting and environmental, health and safety services. J.S. Held's consultants have provided their expertise on the most complex construction and related matters around the globe. The company serves its clients from over 40 locations throughout the U.S. and Canada. For more information regarding J.S. Held, please visit www.jsheld.com.


Aligarh, September 13: The Students Counselling Centre, Aligarh Muslim University (AMU) organised a session on Counselling Awareness at the AMU ABK High School, Girls in which students of classes IX and X were given professional guidance and help to choose careers and courses by the Chief-Speaker, Professor Akbar Husain, Dean, Faculty of Social Sciences.
During the interaction with students, Prof Husain stressed on the importance of self-realisation and self-repair for building successful careers. Quoting religious scriptures and philosophers, Prof Husain emphasised that students should pursue their dreams and aim to excel in the subject of their choice.
"Each subject has its importance and relevance," said Prof Husain while answering queries of students. He asked the students to visit the Counselling Centre with their parents and to further clear their doubts and confusions on which careers to opt for.
Prof Husain discussed common problems suffered by teenagers and urged the students to always discuss their problems with teachers and parents.
Dr Saba Hasan (Vice Principal, AMU ABK High School Girls) was present on the occasion. Mrs Shahnaz Akhtar and Ms Fakhra Tabassum organised the programme.


Wilde wrote in the literary movement called Aestheticism during the late nineteenth century. Contrary to popular belief, Wilde did not create the literary movement, but played a role as a leader who promoted the movement. While Wilde was a college student the works of Algernon Charles Swinburne and Edgar Allan Poe influenced his own writing style. Also, the English essayist Walter Pater helped to form Wilde's humanistic aesthetics.
Moreover, the philosophical foundations of Aestheticism come from Immanuel Kant. He formulated the idea of "art for art's sake". He believed that art was to be enjoyed for its own beauty regardless of social or moral concerns. Aestheticism was also supported by J. W. von Goethe and Samuel Taylor Coleridge. This new point of view was geared against Victorian conventions in which the arts were supposed to be spiritually uplifting and instructive. Thus, Wilde concluded that his life was even more important than any work that he produced.
Furthermore, Wilde's writing style also touches upon other literary movements. His relativist views on postmodern themes, such as morality and truth portrays him as a postmodernist. Also, his novels contain romantic ideas of human behavior and love. He was very passionate as demonstrated in his attacks against follies of society. However, most prevalent in his style is the degenerate aspects of aestheticism which thus, better defines him as a writer of aestheticism.


text:
Home Health Care Supreme Court sides with religious employers in health care, workplace cases
Supreme Court sides with religious employers in health care, workplace cases
Nevada among states that opposed both Trump administration policies
Allison Stevens
Supporters of employer-paid birth control rally in front of the Supreme Court in 2014. (Photo: Chip Somodevilla, Getty Images)
WASHINGTON — The U.S. Supreme Court on Wednesday upheld a Trump administration effort to exempt employers with religious or moral concerns from complying with a "birth control mandate" in the Affordable Care Act, the Obama-era law that requires employer-provided insurance plans to cover contraceptives.
Reproductive rights advocates say the ruling potentially affects hundreds of thousands of people seeking birth control and vastly expands the universe of potential exemptions to the law.
It was one of a pair of 7-2 decisions the court issued on Wednesday in which liberal justices Elena Kagan and Stephen Breyer joined the court's conservative majority. In the other, the court threw out a pair of workplace discrimination lawsuits filed by teachers at religious schools.
Justices Ruth Bader Ginsburg and Sonia Sotomayor dissented in both.
The birth control provision in the ACA dates to 2011 when the Obama administration said employers and insurers had to provide birth control at no cost. Houses of worship were exempted but not nonprofits affiliated with religious organizations. The Trump administration finalized new rules in 2018 that expanded exemptions to employers based on religious or moral beliefs. Pennsylvania and New Jersey challenged the new exemptions, arguing that they would place a burden on state agencies as women would turn to them for help. A federal judge in Philadelphia agreed and issued a nationwide injunction in January 2019 to block the rules from taking effect.
A federal appeals court upheld that decision, prompting the Trump administration and the Roman Catholic organization at the heart of the case — Little Sisters of the Poor Saints Peter and Paul Home in Pittsburgh — to appeal to the Supreme Court.
"For the past seven years, they — like many other religious objectors who have participated in the litigation and rulemakings leading up to today's decision — have had to fight for the ability to continue in their noble work without violating their sincerely held religious beliefs," Justice Clarence Thomas wrote in the majority opinion.
The federal government, he continued, "has arrived at a solution that exempts the Little Sisters from the source of their complicity-based concerns — the administratively imposed contraceptive mandate. Therefore, we reverse the judgment of the Court of Appeals and remand."
Chief Justice John Roberts joined the opinion, as did Justices Samuel Alito, Neil Gorsuch and Brett Kavanaugh. Kagan and Breyer agreed that the case should be remanded back to the lower court but did not join the majority opinion.
In her dissent, Ginsburg said the decision "leaves women workers to fend for themselves, to seek contraceptive coverage from sources other than their employer's insurer, and, absent another available source of funding, to pay for contraceptive services out of their own pockets," The "free exercise clause in the First Amendment of the U.S. Constitution, she added, "does not call for that imbalanced result."
Adam Sonfield, associate director of policy analysis at the Guttmacher Institute, a pro-choice think tank, said the ruling severely undermines contraceptive coverage guarantee under the Affordable Care Act. "This would be a harmful outcome under any circumstances, and particularly during a pandemic and a recession," he said in a statement.
"If we step back, we can see the pattern and the underlying, coercive motivations behind the Trump administration's actions. This attack on private insurance coverage of contraception is tied to the administration's destructive overhaul of the Title X national family planning program, its relentless attempts to gut the Affordable Care Act, its harmful 'refusal of care' rules, and its ongoing efforts to 'defund' Planned Parenthood and undermine Medicaid coverage of family planning care."
Arizona, Florida, Georgia and Tennessee are among the states that argued in an amicus brief that "the federal government rightly sought to provide an exemption to the Little Sisters of the Poor and similarly situated objectors, and the lower courts were wrong to stand in the way."
Nevada is one of nearly two dozen states that opposed the administration's policies. They told the Supreme Court in an amicus brief that the administration's exemptions "make women's access to contraceptive coverage contingent on the religious and moral approval of their employers" and that Congress intended for women to have full and equal coverage for preventive health care."
The court heard Little Sisters of the Poor Saints Peter and Paul Home v. Pennsylvania and consolidated arguments in Our Lady of Guadalupe School v. Morrissey-Berru and St. James School v. Biel in May.
In the workplace rights case, the same seven-justice majority found that federal employment discrimination laws don't apply to teachers at religious schools.
The case involves a pair of elementary teachers at two Catholic schools in California — Kristen Biel and Agnes Morrissey-Berru — who sued their employers after learning their contracts wouldn't be renewed.
Biel, who is now deceased, charged the school with discriminating against her because she had breast cancer. Morrissey-Berru charged her employer with age discrimination.
Lawyers for both argued that the schools violated Title VII of the Civil Rights Act, which prohibits workplace discrimination against people on the basis of disability, age, race, sex and other characteristics.
But federal trial courts disagreed, citing a legal doctrine that prohibits ministers from suing religious institutions for employment discrimination. The so-called ministerial exception is designed to preserve the separation of church and state by preventing governments from interfering in religious matters.
The U.S. Court of Appeals for the 9th Circuit reversed the lower court rulings on the grounds that the exception does not apply to Biel and Morrissey because, as teachers, they did not play the same kind of leadership role that ministers do.
But the high court disagreed. In his majority opinion, Alito explained that "the religious education and formation of students is the very reason for the existence of most private religious schools, and therefore the selection and supervision of the teachers upon whom the schools rely to do this work lie at the core of their mission."
The First Amendment, he noted, allows religious institutions "to decide for themselves, free from state interference, matters of church government as well as those of faith and doctrine."
Roberts, Thomas, Breyer, Kagan, Gorsuch and Kavanaugh joined.
In her dissenting opinion, Sotomayor called the result "profoundly unfair." The court, she said, "is not only wrong on the facts, but its error also risks upending anti-discrimination protections for many employees of religious entities."
Virginia Attorney General Mark Herring, a Democrat, filed a brief on behalf of the teachers, urging the high court to affirm the appellate court ruling. Attorneys general for Colorado, Michigan, Minnesota and Nevada were among those that signed on.
The brief said states have a substantial interest in the case because the court's decision defines the "boundaries of the balance" between employers' rights to religious autonomy and employees' right to freedom from discrimination.
Nevada, like most states, has laws banning employment discrimination on the basis of age and disability.
Last year, more than 70,000 discrimination complaints were filed with the Equal Employment Opportunity Commission. In Nevada, 24 percent of complaints were filed on the basis of disability, and 4 percent on the basis of religion. Both percentages are roughly equivalent to those nationally.
Wednesday's decision comes on the heels of another victory for religious schools last month, when the court ruled that states must grant them access to the public funding they make available for private secular schools. Nearly 6 million students across the country attend some 35,000 private schools, most of which are religious, according to the Council for American Private Education.
Earlier in the month, the court expanded protections from workplace discrimination in a ruling that employers can't legally fire people because of their gender identity or sexual orientation. In a 6-3 opinion, the court ruled that employers who fire individuals "merely for being gay or transgender" violate the Civil Rights Act.
Also last month, the court struck down a Louisiana law that critics said would have severely limited access to abortion in Louisiana and opened the door to further abortion limitations around the country. Enacted in 2014 by the Louisiana state Legislature, the law would have required physicians who perform abortions to have admitting privileges at a local hospital.
Allison Stevens is a Washington D.C. reporter for States Newsroom, a network of state-based nonprofit news outlets that includes Nevada Current.
Latino business owners hope for better results from new PPP round
▪ You must give Nevada Current credit, including https://www.nevadacurrent.com/ and author.
▪ If you publish online, include the links from the story, and a link to Nevada Current.
▪ You can publish our graphics and any photos that are credit to Nevada Current with the stories with which they originally appeared. For any other uses, you must seek permission from us at [email protected]
▪ If you share the story on social media, please mention NevadaCurrent on Twitter and newnevadacurrent on Facebook.
by Allison Stevens, Nevada Current

Supreme Court sides with religious employers in health care, workplace cases

by Allison Stevens, Nevada Current
July 8, 2020

Nevada Current is part of States Newsroom, a network of news outlets supported by grants and a coalition of donors as a 501c(3) public charity. Nevada Current maintains editorial independence. Contact Editor Hugh Jackson for questions: info@nevadacurrent.com. Follow Nevada Current on Facebook and Twitter.
Trauma drama: Turning triage into profit centers
Health Care March 20, 2019
Nevada has protected abortion rights. A hard right court won't care.
Commentary October 2, 2020


text:
Civil rights organisations call for release of Farirai Gumbonzvanda and her co-accused
MenEngage Africa and MenEngage Global Alliance are regional and global alliances connecting over 44 country networks and 6 regional networks across the world advocating for gender justice and the promotion of human rights, and together with Sonke Gender Justice, we call for the immediate release and dropping of all charges against Farirai Gumbonzvanda, a 25 year-old young female Zimbabwean social justice and girls rights advocate who was arbitrarily arrested alongside others including; George Makoni, Nyasha Frank Mphalo, Tatenda Mombeyarara, Gamuchirai Mukura, Stabile Dewa, Rita Nyampinga by the Government of Zimbabwe.
Farirai serves as a mentor and community volunteer with Rosaria Memorial Trust – a non-governmental, non-political, and not-for-profit organisation in Zimbabwe.
On 21 May 2019, Farirai Gumbonzvanda together with the people named above, were arrested on arrival at the Robert Mugabe International Airport without just cause by security operatives.
She has been baselessly accused of intent to subvert and overthrow the constitutionally elected Government of Zimbabwe, in addition to the charges of counter-intelligence, and acts of terrorism – charges which if convicted carry a maximum term of 20 years.
Prior to her arrest, Farirai applied and was accepted for a training workshop in the Maldives hosted by an organisation called CANVAS. The workshop training was from May 15 – 19, 2019.
The content of the training covered the following topics: Non-violent Tools and Tactics for Civic Engagement; Building Unity through Articulating a Strong Vision for Tomorrow; Designing Tools for Effective Communication; Protecting One's Privacy and Security from Threats of Trolling, Fake news, etc, with a special focus on digital security and safe communications.
On 17 May 2019, while Farirai was still attending her training in the Maldives, the State-controlled media outlet, The Herald newspaper, published a story with the headline: "Plot to unleash violence unearthed" in which the paper accused among others, the Rozaria Memorial Trust as part of groups undergoing training for subversive purposes.
Rosaria Memorial Trust responded and issued an official statement on the same day to refute the allegations which it found baseless and unfounded and demanded an immediate retraction and apology.
Farirai completed her training and returned to Zimbabwe on the 21st of May 2019 where she was arrested upon arrival at the airport.
Farirai is currently remanded in custody at Chikurubi Maximum Security Prison. She was scheduled to re-appear in court on June 6, 2019.
The arrest of Farirai and others' signals a clear lapse in judgement ,with no just cause having been established for their arbitrary incarceration. No prima facie evidence has been presented to support her alleged offences. We are concerned by this lack of respect for the rule of law and culture of impunity that continues to be displayed by Zimbabwean authorities against innocent civilians.
The principles of natural justice demand that before one's liberties can be curtailed, the state must have prima facie evidence of criminal conduct. There is a responsibility on the part of the state to show just cause for why a citizen should be remanded in custody. No such evidence has been presented in Farirai's and other's case. No evidence of training for subversive purposes exists in Farirai's case.
Her arbitrary arrest infringes on her constitutional right of freedom of association, assembly and expression which are constitutionally guaranteed and protected fundamental legal human rights, under international human rights law. These are internationally guaranteed rights under the International Convention on Civil and Political Rights (ICCPR), The African Charter, Freedom of Association and Protection of the Rights to Organise Convention, agreements which Zimbabwe has signed and ratified. By continuing to detain Farirai and others, the Zimbabwean Government is violating its constitutional and international obligations.
Farirai's arrest also violates the presumption of innocent until proven guilty as she is currently being treated as a criminal and is detained at a maximum security prison, before she has even been tried.
Farirai has never been involved in any politically motivated activities and her charges fit into a much wider pattern of documented repression directed against human rights activists, civic expression and activities in Zimbabwe. The new Zimbabwe leadership committed to the world after the elections to uphold human rights. We believe that the world gave Zimbabwe a benefit of the doubt in this regard and this latest attack on human rights defenders flies in the face of this commitment. MenEngage Africa, MenEngage Global Alliance, Sonke Gender Justice, together with its members and partners, support the exercise of the freedom of association, expression and movement, and steadfastly uphold the human rights of all people under international human rights law.
We call for the immediate and unconditional release of Farirai Gumbonzvanda and others from Chikurubi Maximum Prison as well as the dropping of all unfounded allegations against her and her co-accused.
We demand that Zimbabwe reform and align their legislation with s58 of Zimbabwean Constitution by repealing the Draconian Public Order and Security Act (POSA) and other laws that violate civil liberties.
For comments and further information please contact:
Hassan Sekajoolo, Chairperson, MenEngage Africa Alliance, hsekajoolo@gmail.com
Bafana Khumalo, Acting Co-Executive Director, Sonke Gender Justice, bafana@genderjustice.org.za
Joni van de Sand, Director, MenEngage Global Alliance, joni@menengage.org