text:
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using Chutzpah.Exceptions;
using Chutzpah.Facts.Mocks;
using Chutzpah.Models;
using Chutzpah.Utility;
using Chutzpah.Wrappers;
using Moq;
using Xunit;
using Chutzpah.Transformers;

namespace Chutzpah.Facts
{
    public class TestRunnerFacts
    {
        private class TestableTestRunner : Testable<TestRunner>
        {
            public static string ExecutionPhantomArgs = BuildArgs("runner.js", "file:///D:/harnessPath.html", "execution", Constants.DefaultTestFileTimeout);

            public TestableTestRunner()
            {
                Mock<IFileProbe>().Setup(x => x.FindFilePath(It.IsAny<string>())).Returns("");
                Mock<IFileProbe>()
                    .Setup(x => x.FindScriptFiles(It.IsAny<IEnumerable<string>>()))
                    .Returns<IEnumerable<string>>((x) => x.Select(f => new PathInfo { Path = f, FullPath = f }));
                Mock<IProcessHelper>()
                    .Setup(x => x.RunExecutableAndProcessOutput(It.IsAny<string>(), It.IsAny<string>(), It.IsAny<Func<ProcessStream, IList<TestFileSummary>>>()))
                    .Returns(new ProcessResult<IList<TestFileSummary>>(0, new List<TestFileSummary>{new TestFileSummary("somePath")}));

                Mock<IChutzpahTestSettingsService>()
                    .Setup(x => x.FindSettingsFile(It.IsAny<string>(), It.IsAny<ChutzpahSettingsFileEnvironments>()))
                    .Returns(new ChutzpahTestSettingsFile().InheritFromDefault());
            }

            public static string BuildArgs(string runner, string harness, string mode = "execution", int? timeout = null, bool ignoreResourceLoadingError = false)
            {
                var format = "{0} \"{1}\" \"{2}\" {3} {4} {5} ";
                return string.Format(format, "--ignore-ssl-errors=true --proxy-type=none", runner, harness, mode, timeout.HasValue ? timeout.ToString() : "", ignoreResourceLoadingError.ToString());
            }

            public TestContext SetupTestContext(string[] testPaths = null,  string harnessPath = @"D:\harnessPath.html", string testRunnerPath = "testRunner.js", bool success = true, bool @throw = false)
            {
                var context = new TestContext { TestHarnessPath = harnessPath, TestRunner = testRunnerPath };
                if (testPaths != null)
                {
                    var pathCount = testPaths.Count();
                    if (@throw)
                    {
                        this.Mock<ITestContextBuilder>().Setup(x => x.TryBuildContext(It.Is<IEnumerable<PathInfo>>(fs => fs.Select(f => f.FullPath).Intersect(testPaths).Count() == pathCount), It.IsAny<TestOptions>(), out context)).Throws(new Exception());
                    }
                    else
                    {
                        this.Mock<ITestContextBuilder>().Setup(x => x.TryBuildContext(It.Is<IEnumerable<PathInfo>>(fs => fs.Select(f => f.FullPath).Intersect(testPaths).Count() == pathCount), It.IsAny<TestOptions>(), out context)).Returns(success);

                    }
                }
                else
                {
                    if(@throw)
                    {
                        this.Mock<ITestContextBuilder>().Setup(x => x.TryBuildContext(It.IsAny<IEnumerable<PathInfo>>(), It.IsAny<TestOptions>(), out context)).Throws(new Exception());
                    }
                    else
                    {
                        this.Mock<ITestContextBuilder>().Setup(x => x.TryBuildContext(It.IsAny<IEnumerable<PathInfo>>(), It.IsAny<TestOptions>(), out context)).Returns(success);
                    }
                }

                return context;
            }
        }

        public class CleanContext
        {
            [Fact]
            public void Will_clean_test_context()
            {
                var runner = new TestableTestRunner();
                var context = new TestContext();

                runner.ClassUnderTest.CleanTestContext(context);

                runner.Mock<ITestContextBuilder>().Verify(x => x.CleanupContext(context));
            }
        }

        public class GetTestContext
        {
            [Fact]
            public void Will_get_test_context()
            {
                var runner = new TestableTestRunner();
                var context = new TestContext();
                runner.Mock<ITestContextBuilder>().Setup(x => x.BuildContext("a.js", It.IsAny<TestOptions>())).Returns(context);

                var res = runner.ClassUnderTest.GetTestContext("a.js");

                Assert.Equal(context, res);
            }

            [Fact]
            public void Will_return_null_given_empty_path()
            {
                var runner = new TestableTestRunner();

                var result = runner.ClassUnderTest.GetTestContext(string.Empty);

                Assert.Null(result);
            }
        }

        public class IsTestFile
        {
            [Fact]
            public void Will_true_if_test_file()
            {
                var runner = new TestableTestRunner();
                runner.Mock<ITestContextBuilder>().Setup(x => x.IsTestFile("a.js", null)).Returns(true);

                var result = runner.ClassUnderTest.IsTestFile("a.js", null);

                Assert.True(result);
            }

            [Fact]
            public void Will_false_if_not_test_file()
            {
                var runner = new TestableTestRunner();
                runner.Mock<ITestContextBuilder>().Setup(x => x.IsTestFile("a.js", null)).Returns(false);

                var result = runner.ClassUnderTest.IsTestFile("a.js", null);

                Assert.False(result);
            }
        }

        public class DiscoverTests
        {
            [Fact]
            public void Will_throw_if_test_files_collection_is_null()
            {
                TestableTestRunner runner = new TestableTestRunner();
                var ex = Record.Exception(() => runner.ClassUnderTest.DiscoverTests((IEnumerable<string>)null)) as ArgumentNullException;

                Assert.NotNull(ex);
            }

            [Fact]
            public void Will_throw_if_headless_browser_does_not_exist()
            {
                TestableTestRunner runner = new TestableTestRunner();
                runner.Mock<IFileProbe>().Setup(x => x.FindFilePath(TestRunner.HeadlessBrowserName)).Returns((string)null);

                var ex = Record.Exception(() => runner.ClassUnderTest.DiscoverTests("someFile")) as FileNotFoundException;

                Assert.NotNull(ex);
            }

            [Fact]
            public void Will_throw_if_test_runner_js_does_not_exist()
            {
                TestableTestRunner runner = new TestableTestRunner();
                runner.Mock<IFileProbe>().Setup(x => x.FindFilePath(TestRunner.TestRunnerJsName)).Returns((string)null);

                var ex = Record.Exception(() => runner.ClassUnderTest.DiscoverTests("someFile")) as FileNotFoundException;

                Assert.NotNull(ex);
            }

            [Fact]
            public void Will_run_test_file_and_return_test_summary_model()
            {
                var runner = new TestableTestRunner();
                var summary = new TestFileSummary("somePath");
                summary.AddTestCase(new TestCase());
                var context = runner.SetupTestContext(testPaths: new []{@"path\tests.html"}, harnessPath: @"D:\harnessPath.html", testRunnerPath: "runner");
                runner.Mock<IFileProbe>().Setup(x => x.FindFilePath("runner")).Returns("jsPath");
                runner.Mock<IFileProbe>().Setup(x => x.FindFilePath(TestRunner.HeadlessBrowserName)).Returns("browserPath");
                runner.Mock<IFileProbe>().Setup(x => x.FindFilePath(@"path\tests.html")).Returns(@"D:\path\tests.html");
                var args = TestableTestRunner.BuildArgs("jsPath", "file:///D:/harnessPath.html", "discovery", Constants.DefaultTestFileTimeout);
                runner.Mock<IProcessHelper>()
                    .Setup(x => x.RunExecutableAndProcessOutput("browserPath", args, It.IsAny<Func<ProcessStream, IList<TestFileSummary>>>()))
                    .Returns(new ProcessResult<IList<TestFileSummary>>(0, new List<TestFileSummary>{summary}));

                var res = runner.ClassUnderTest.DiscoverTests(@"path\tests.html");

                Assert.Equal(1, res.Count());
            }
        }

        public class RunTests
        {

            [Fact]
            public void Will_throw_if_test_files_collection_is_null()
            {
                var runner = new TestableTestRunner();
                var ex = Record.Exception(() => runner.ClassUnderTest.RunTests((IEnumerable<string>)null)) as ArgumentNullException;

                Assert.NotNull(ex);
            }

            [Fact]
            public void Will_throw_if_headless_browser_does_not_exist()
            {
                var runner = new TestableTestRunner();
                runner.Mock<IFileProbe>().Setup(x => x.FindFilePath(TestRunner.HeadlessBrowserName)).Returns((string)null);

                var ex = Record.Exception(() => runner.ClassUnderTest.RunTests("someFile")) as FileNotFoundException;

                Assert.NotNull(ex);
            }

            [Fact]
            public void Will_throw_if_test_runner_js_does_not_exist()
            {
                var runner = new TestableTestRunner();
                runner.Mock<IFileProbe>().Setup(x => x.FindFilePath(TestRunner.TestRunnerJsName)).Returns((string)null);

                var ex = Record.Exception(() => runner.ClassUnderTest.RunTests("someFile")) as FileNotFoundException;

                Assert.NotNull(ex);
            }

            [Fact]
            public void Will_run_test_file_and_return_test_results_model()
            {
                var runner = new TestableTestRunner();
                var summary = new TestFileSummary("somePath");
                summary.AddTestCase(new TestCase());
                var context = runner.SetupTestContext(testPaths: new []{@"path\tests.html"}, harnessPath: @"D:\harnessPath.html", testRunnerPath: "runner");
                runner.Mock<IFileProbe>().Setup(x => x.FindFilePath("runner")).Returns("jsPath");
                runner.Mock<IFileProbe>().Setup(x => x.FindFilePath(TestRunner.HeadlessBrowserName)).Returns("browserPath");
                runner.Mock<IFileProbe>().Setup(x => x.FindFilePath(@"path\tests.html")).Returns(@"D:\path\tests.html");
                var args = TestableTestRunner.BuildArgs("jsPath", "file:///D:/harnessPath.html", "execution", Constants.DefaultTestFileTimeout);

                runner.Mock<IProcessHelper>()
                    .Setup(x => x.RunExecutableAndProcessOutput("browserPath", args, It.IsAny<Func<ProcessStream, IList<TestFileSummary>>>()))
                    .Returns(new ProcessResult<IList<TestFileSummary>>(0, new List<TestFileSummary>{summary}));

                TestCaseSummary res = runner.ClassUnderTest.RunTests(@"path\tests.html");

                Assert.Equal(1, res.TotalCount);
            }

            [Fact]
            public void Will_pass_timeout_option_to_test_runner()
            {
                var runner = new TestableTestRunner();
                var summary = new TestFileSummary("somePath");
                summary.AddTestCase(new TestCase());
                var context = runner.SetupTestContext( testRunnerPath: "runner");
                runner.Mock<IFileProbe>().Setup(x => x.FindFilePath("runner")).Returns("jsPath");
                runner.Mock<IFileProbe>().Setup(x => x.FindFilePath(TestRunner.HeadlessBrowserName)).Returns("browserPath");
                runner.Mock<IFileProbe>().Setup(x => x.FindFilePath(@"path\tests.html")).Returns(@"D:\path\tests.html");
                var args = TestableTestRunner.BuildArgs("jsPath", "file:///D:/harnessPath.html", "execution", 5000);
                runner.Mock<IProcessHelper>()
                 .Setup(x => x.RunExecutableAndProcessOutput("browserPath", args, It.IsAny<Func<ProcessStream, IList<TestFileSummary>>>()))
                 .Returns(new ProcessResult<IList<TestFileSummary>>(0, new List<TestFileSummary>{summary}));

                TestCaseSummary res = runner.ClassUnderTest.RunTests(@"path\tests.html", new TestOptions { TestFileTimeoutMilliseconds = 5000 });

                Assert.Equal(1, res.TotalCount);
            }

            [Fact]
            public void Will_use_timeout_from_context_if_exists()
            {
                var runner = new TestableTestRunner();
                var summary = new TestFileSummary("somePath");
                summary.AddTestCase(new TestCase());
                var context = runner.SetupTestContext(testRunnerPath: "runner");
                context.TestFileSettings.TestFileTimeout = 6000;
                runner.Mock<IFileProbe>().Setup(x => x.FindFilePath("runner")).Returns("jsPath");
                runner.Mock<IFileProbe>().Setup(x => x.FindFilePath(TestRunner.HeadlessBrowserName)).Returns("browserPath");
                runner.Mock<IFileProbe>().Setup(x => x.FindFilePath(@"path\tests.html")).Returns(@"D:\path\tests.html");
                var args = TestableTestRunner.BuildArgs("jsPath", "file:///D:/harnessPath.html", "execution", 6000);
                runner.Mock<IProcessHelper>()
                 .Setup(x => x.RunExecutableAndProcessOutput("browserPath", args, It.IsAny<Func<ProcessStream, IList<TestFileSummary>>>()))
                 .Returns(new ProcessResult<IList<TestFileSummary>>(0, new List<TestFileSummary> { summary }));

                TestCaseSummary res = runner.ClassUnderTest.RunTests(@"path\tests.html", new TestOptions { TestFileTimeoutMilliseconds = 5000 });

                Assert.Equal(1, res.TotalCount);
            }

            [Fact]
            public void Will_run_test_files_found_from_given_folder_path()
            {
                var runner = new TestableTestRunner();
                var summary = new TestFileSummary("somePath");
                summary.AddTestCase(new TestCase());
                var context = runner.SetupTestContext( testRunnerPath: "runner");
                runner.Mock<IFileProbe>().Setup(x => x.FindFilePath("runner")).Returns("jsPath");
                runner.Mock<IFileProbe>().Setup(x => x.FindFilePath(TestRunner.HeadlessBrowserName)).Returns("browserPath");
                runner.Mock<IFileProbe>().Setup(x => x.FindFilePath(@"path\tests.html")).Returns(@"D:\path\tests.html");
                runner.Mock<IFileProbe>()
                    .Setup(x => x.FindScriptFiles(new List<string> { @"path\testFolder" }))
                    .Returns(new List<PathInfo> { new PathInfo { FullPath = @"path\tests.html" } });
                var args = TestableTestRunner.BuildArgs("jsPath", "file:///D:/harnessPath.html", "execution", Constants.DefaultTestFileTimeout);
                runner.Mock<IProcessHelper>()
                 .Setup(x => x.RunExecutableAndProcessOutput("browserPath", args, It.IsAny<Func<ProcessStream, IList<TestFileSummary>>>()))
                 .Returns(new ProcessResult<IList<TestFileSummary>>(0, new List<TestFileSummary>{summary}));

                TestCaseSummary res = runner.ClassUnderTest.RunTests(@"path\testFolder");

                Assert.Equal(1, res.TotalCount);
            }

            [Fact]
            public void Will_run_test_files_found_from_chutzpah_json_files()
            {
                var runner = new TestableTestRunner();
                var summary = new TestFileSummary("somePath");
                summary.AddTestCase(new TestCase());
                var context = runner.SetupTestContext( testRunnerPath: "runner");
                runner.Mock<IFileProbe>().Setup(x => x.FindFilePath("runner")).Returns("jsPath");
                runner.Mock<IFileProbe>().Setup(x => x.FindFilePath(TestRunner.HeadlessBrowserName)).Returns("browserPath");
                runner.Mock<IFileProbe>().Setup(x => x.FindFilePath(@"path\tests.html")).Returns(@"D:\path\tests.html");
                runner.Mock<IFileProbe>().Setup(x => x.FindFilePath(@"path\chutzpah.json")).Returns(@"D:\path\chutzpah.json");
                runner.Mock<IFileProbe>()
                    .Setup(x => x.FindScriptFiles(It.IsAny<ChutzpahTestSettingsFile>()))
                    .Returns(new List<PathInfo> { new PathInfo { FullPath = @"path\tests.html" } });
                var args = TestableTestRunner.BuildArgs("jsPath", "file:///D:/harnessPath.html", "execution", Constants.DefaultTestFileTimeout);
                runner.Mock<IProcessHelper>()
                 .Setup(x => x.RunExecutableAndProcessOutput("browserPath", args, It.IsAny<Func<ProcessStream, IList<TestFileSummary>>>()))
                 .Returns(new ProcessResult<IList<TestFileSummary>>(0, new List<TestFileSummary>{summary}));

                TestCaseSummary res = runner.ClassUnderTest.RunTests(@"path\chutzpah.json");

                Assert.Equal(1, res.TotalCount);
                runner.Mock<IFileProbe>()
                    .Verify(x => x.FindScriptFiles(It.IsAny<List<string>>()), Times.Never());
            }

            [Fact]
            public void Will_open_test_file_in_browser_when_given_flag()
            {
                var runner = new TestableTestRunner();
                var context = runner.SetupTestContext( testRunnerPath: "testRunner.js");
                runner.Mock<IFileProbe>().Setup(x => x.FindFilePath(TestRunner.TestRunnerJsName)).Returns("runner.js");
                runner.Mock<IFileProbe>().Setup(x => x.FindFilePath(TestRunner.HeadlessBrowserName)).Returns("browserPath");
                runner.Mock<IFileProbe>().Setup(x => x.FindFilePath(@"path\tests.html")).Returns(@"D:\path\tests.html");
                runner.Mock<IFileProbe>().Setup(x => x.FindFilePath("testRunner.js")).Returns("runner.js");

                TestCaseSummary res = runner.ClassUnderTest.RunTests(@"path\tests.html", new TestOptions { OpenInBrowser = true });

                runner.Mock<IProcessHelper>().Verify(x => x.LaunchFileInBrowser(@"D:\harnessPath.html", null));
            }

            [Fact]
            public void Will_run_multiple_test_files_and_return_results()
            {
                var runner = new TestableTestRunner();
                var summary = new TestFileSummary("somePath");
                summary.AddTestCase(new TestCase());
                var context1 = runner.SetupTestContext(harnessPath: @"D:\harnessPath1.html", testRunnerPath: "runner1", testPaths: new []{@"path\tests1.html"});
                var context2 = runner.SetupTestContext(harnessPath: @"D:\harnessPath2.htm", testRunnerPath: "runner2", testPaths: new []{@"path\tests2.html"});
                runner.Mock<IFileProbe>().Setup(x => x.FindFilePath(@"path\tests1.html")).Returns(@"D:\path\tests1.html");
                runner.Mock<IFileProbe>().Setup(x => x.FindFilePath(@"path\tests2.htm")).Returns(@"D:\path\tests2.htm");
                runner.Mock<IFileProbe>().Setup(x => x.FindFilePath("runner1")).Returns("jsPath1");
                runner.Mock<IFileProbe>().Setup(x => x.FindFilePath("runner2")).Returns("jsPath2");
                var args1 = TestableTestRunner.BuildArgs("jsPath1", "file:///D:/harnessPath1.html", "execution", Constants.DefaultTestFileTimeout);
                var args2 = TestableTestRunner.BuildArgs("jsPath2", "file:///D:/harnessPath2.htm", "execution", Constants.DefaultTestFileTimeout);
                runner.Mock<IProcessHelper>()
                    .Setup(x => x.RunExecutableAndProcessOutput(It.IsAny<string>(), args1, It.IsAny<Func<ProcessStream, IList<TestFileSummary>>>()))
                    .Returns(new ProcessResult<IList<TestFileSummary>>(0, new List<TestFileSummary>{summary}));
                runner.Mock<IProcessHelper>()
                    .Setup(x => x.RunExecutableAndProcessOutput(It.IsAny<string>(), args2, It.IsAny<Func<ProcessStream, IList<TestFileSummary>>>()))
                    .Returns(new ProcessResult<IList<TestFileSummary>>(0, new List<TestFileSummary>{summary}));
                runner.Mock<IFileProbe>()
                    .Setup(x => x.FindScriptFiles(new List<string> { @"path\tests1a.html", @"path\tests2a.htm" }))
                    .Returns(new List<PathInfo> { new PathInfo { FullPath = @"path\tests1.html" }, new PathInfo { FullPath = @"path\tests2.html" } });

                TestCaseSummary res = runner.ClassUnderTest.RunTests(new List<string> { @"path\tests1a.html", @"path\tests2a.htm" });

                Assert.Equal(2, res.TotalCount);
            }

            [Fact]
            public void Will_batch_test_files_with_same_context_given_testFileBatching_setting_is_enabled()
            {
                var runner = new TestableTestRunner();
                var summary = new TestFileSummary("somePath");
                summary.AddTestCase(new TestCase());
                var context1 = runner.SetupTestContext(harnessPath: @"D:\harnessPath1.html", testRunnerPath: "runner1", testPaths: new[] { @"path\tests1.js", @"path\tests2.js" });
                var context2 = runner.SetupTestContext(harnessPath: @"D:\harnessPath2.htm", testRunnerPath: "runner2", testPaths: new[] { @"path2\tests1.js", @"path2\tests2.js" });
                runner.Mock<IFileProbe>().Setup(x => x.FindFilePath("runner1")).Returns("jsPath1");
                runner.Mock<IFileProbe>().Setup(x => x.FindFilePath("runner2")).Returns("jsPath2");
                var args1 = TestableTestRunner.BuildArgs("jsPath1", "file:///D:/harnessPath1.html", "execution", Constants.DefaultTestFileTimeout);
                var args2 = TestableTestRunner.BuildArgs("jsPath2", "file:///D:/harnessPath2.htm", "execution", Constants.DefaultTestFileTimeout);
                runner.Mock<IProcessHelper>()
                    .Setup(x => x.RunExecutableAndProcessOutput(It.IsAny<string>(), args1, It.IsAny<Func<ProcessStream, IList<TestFileSummary>>>()))
                    .Returns(new ProcessResult<IList<TestFileSummary>>(0, new List<TestFileSummary> { summary }));
                runner.Mock<IProcessHelper>()
                    .Setup(x => x.RunExecutableAndProcessOutput(It.IsAny<string>(), args2, It.IsAny<Func<ProcessStream, IList<TestFileSummary>>>()))
                    .Returns(new ProcessResult<IList<TestFileSummary>>(0, new List<TestFileSummary> { summary }));
                runner.Mock<IFileProbe>()
                    .Setup(x => x.FindScriptFiles(new List<string> { @"path\tests1a.js", @"path\tests2a.js", @"path2\tests1a.js", @"path2\tests2a.js" }))
                    .Returns(new List<PathInfo> {
                        new PathInfo { FullPath = @"path\tests1.js" },
                        new PathInfo { FullPath = @"path\tests2.js" } ,
                        new PathInfo { FullPath = @"path2\tests1.js" } ,
                        new PathInfo { FullPath = @"path2\tests2.js" } ,
                    });
                var settingsForPath = new ChutzpahTestSettingsFile { SettingsFileDirectory = "path", EnableTestFileBatching = true }.InheritFromDefault();
                var settingsForPath2 = new ChutzpahTestSettingsFile { SettingsFileDirectory = "path2", EnableTestFileBatching = true }.InheritFromDefault();
                runner.Mock<IChutzpahTestSettingsService>().Setup(x => x.FindSettingsFile(@"path", It.IsAny<ChutzpahSettingsFileEnvironments>())).Returns(settingsForPath);
                runner.Mock<IChutzpahTestSettingsService>().Setup(x => x.FindSettingsFile(@"path2", It.IsAny<ChutzpahSettingsFileEnvironments>())).Returns(settingsForPath2);

                TestCaseSummary res = runner.ClassUnderTest.RunTests(new List<string> { @"path\tests1a.js", @"path\tests2a.js", @"path2\tests1a.js", @"path2\tests2a.js" });

                Assert.Equal(2, res.TotalCount);
            }

            [Fact]
            public void Will_call_test_suite_started()
            {
                var runner = new TestableTestRunner();
                var testCallback = new MockTestMethodRunnerCallback();
                var context = runner.SetupTestContext();
                runner.Mock<IFileProbe>().Setup(x => x.FindFilePath(@"path\tests.html")).Returns(@"D:\path\tests.html");

                TestCaseSummary res = runner.ClassUnderTest.RunTests(@"path\tests.html", testCallback.Object);

                testCallback.Verify(x => x.TestSuiteStarted());
            }

            [Fact]
            public void Will_call_test_suite_finished_with_final_result()
            {
                var runner = new TestableTestRunner();
                var testCallback = new MockTestMethodRunnerCallback();
                var context = runner.SetupTestContext();
                runner.Mock<IFileProbe>().Setup(x => x.FindFilePath(@"path\tests.html")).Returns(@"D:\path\tests.html");
                runner.Mock<IFileProbe>().Setup(x => x.FindFilePath(TestRunner.TestRunnerJsName)).Returns("jsPath");

                TestCaseSummary res = runner.ClassUnderTest.RunTests(@"path\tests.html", testCallback.Object);

                testCallback.Verify(x => x.TestSuiteFinished(It.IsAny<TestCaseSummary>()));
            }

            [Fact]
            public void Will_clean_up_test_context()
            {
                var runner = new TestableTestRunner();
                var context = runner.SetupTestContext();
                runner.Mock<IFileProbe>().Setup(x => x.FindFilePath(@"path\tests.html")).Returns(@"D:\path\tests.html");
                runner.Mock<IFileProbe>().Setup(x => x.FindFilePath(TestRunner.TestRunnerJsName)).Returns("jsPath");

                TestCaseSummary res = runner.ClassUnderTest.RunTests(@"path\tests.html");

                runner.Mock<ITestContextBuilder>().Verify(x => x.CleanupContext(context));
            }

            [Fact]
            public void Will_not_clean_up_test_context_if_debug_mode()
            {
                var runner = new TestableTestRunner();
                var context = runner.SetupTestContext();
                runner.Mock<IFileProbe>().Setup(x => x.FindFilePath(@"path\tests.html")).Returns(@"D:\path\tests.html");
                runner.Mock<IFileProbe>().Setup(x => x.FindFilePath(TestRunner.TestRunnerJsName)).Returns("jsPath");
                runner.ClassUnderTest.EnableDebugMode();

                TestCaseSummary res = runner.ClassUnderTest.RunTests(@"path\tests.html");

                runner.Mock<ITestContextBuilder>().Verify(x => x.CleanupContext(context), Times.Never());
            }

            [Fact]
            public void Will_not_clean_up_test_context_if_open_in_browser_is_set()
            {
                var runner = new TestableTestRunner();
                var context = runner.SetupTestContext();
                runner.Mock<IFileProbe>().Setup(x => x.FindFilePath(@"path\tests.html")).Returns(@"D:\path\tests.html");
                runner.Mock<IFileProbe>().Setup(x => x.FindFilePath(TestRunner.TestRunnerJsName)).Returns("jsPath");

                TestCaseSummary res = runner.ClassUnderTest.RunTests(@"path\tests.html", new TestOptions { OpenInBrowser = true });

                runner.Mock<ITestContextBuilder>().Verify(x => x.CleanupContext(context), Times.Never());
            }

            [Fact]
            public void Will_add_exception_to_errors_and_move_to_next_test_file()
            {
                var runner = new TestableTestRunner();
                var summary = new TestFileSummary("somePath");
                summary.AddTestCase(new TestCase());
                var testCallback = new MockTestMethodRunnerCallback();
                var exception = new Exception();
                var context = runner.SetupTestContext(testRunnerPath: "testRunner.js", testPaths: new []{@"path\tests1.html"});
                runner.SetupTestContext(testRunnerPath: "testRunner.js", testPaths: new []{@"path\tests2.html"}, @throw: true);
                runner.Mock<IFileProbe>().Setup(x => x.FindFilePath(@"path\tests1.html")).Throws(exception);
                runner.Mock<IFileProbe>().Setup(x => x.FindFilePath(@"path\tests2.html")).Returns(@"D:\path\tests2.html");
                runner.Mock<IFileProbe>().Setup(x => x.FindFilePath("testRunner.js")).Returns("runner.js");
                runner.Mock<IFileProbe>().Setup(x => x.FindFilePath(TestRunner.HeadlessBrowserName)).Returns("browserPath");
                var args = TestableTestRunner.BuildArgs("runner.js", "file:///D:/harnessPath.html", "execution", Constants.DefaultTestFileTimeout);
                runner.Mock<IProcessHelper>()
                 .Setup(x => x.RunExecutableAndProcessOutput("browserPath", args, It.IsAny<Func<ProcessStream, IList<TestFileSummary>>>()))
                 .Returns(new ProcessResult<IList<TestFileSummary>>(0, new List<TestFileSummary>{summary}));

                TestCaseSummary res = runner.ClassUnderTest.RunTests(new[] { @"path\tests1.html", @"path\tests2.html" }, testCallback.Object);

                testCallback.Verify(x => x.FileError(It.IsAny<TestError>()));
                Assert.Equal(1, res.Errors.Count);
                Assert.Equal(1, res.TotalCount);
            }

            [Fact]
            public void Will_record_timeout_exception_from_test_runner()
            {
                var runner = new TestableTestRunner();
                var summary = new TestFileSummary("somePath");
                summary.AddTestCase(new TestCase());
                var testCallback = new MockTestMethodRunnerCallback();
                var context = runner.SetupTestContext( testRunnerPath: "testRunner.js");
                runner.Mock<IFileProbe>().Setup(x => x.FindFilePath(@"path\tests.html")).Returns(@"D:\path\tests.html");
                runner.Mock<IFileProbe>().Setup(x => x.FindFilePath("testRunner.js")).Returns("runner.js");
                runner.Mock<IFileProbe>().Setup(x => x.FindFilePath(TestRunner.HeadlessBrowserName)).Returns(TestRunner.HeadlessBrowserName);
                runner.Mock<IProcessHelper>()
                    .Setup(x => x.RunExecutableAndProcessOutput(TestRunner.HeadlessBrowserName, TestableTestRunner.ExecutionPhantomArgs, It.IsAny<Func<ProcessStream, IList<TestFileSummary>>>()))
                    .Returns(new ProcessResult<IList<TestFileSummary>>((int)TestProcessExitCode.Timeout, new List<TestFileSummary>{summary}));

                TestCaseSummary res = runner.ClassUnderTest.RunTests(new[] { @"path\tests.html" }, testCallback.Object);

                testCallback.Verify(x => x.FileError(It.IsAny<TestError>()));
                Assert.Equal(1, res.TotalCount);
                Assert.Equal(1, res.Errors.Count);
            }

            [Fact]
            public void Will_record_unknown_exception_from_test_runner()
            {
                var runner = new TestableTestRunner();
                var summary = new TestFileSummary("somePath");
                summary.AddTestCase(new TestCase());
                var testCallback = new MockTestMethodRunnerCallback();
                var context = runner.SetupTestContext( testRunnerPath: "testRunner.js");
                runner.Mock<IFileProbe>().Setup(x => x.FindFilePath(@"path\tests.html")).Returns(@"D:\path\tests.html");
                runner.Mock<IFileProbe>().Setup(x => x.FindFilePath("testRunner.js")).Returns("runner.js");
                runner.Mock<IFileProbe>().Setup(x => x.FindFilePath(TestRunner.HeadlessBrowserName)).Returns(TestRunner.HeadlessBrowserName);
                runner.Mock<IProcessHelper>()
                    .Setup(x => x.RunExecutableAndProcessOutput(TestRunner.HeadlessBrowserName, TestableTestRunner.ExecutionPhantomArgs, It.IsAny<Func<ProcessStream, IList<TestFileSummary>>>()))
                    .Returns(new ProcessResult<IList<TestFileSummary>>((int)TestProcessExitCode.Unknown, new List<TestFileSummary>{summary}));

                TestCaseSummary res = runner.ClassUnderTest.RunTests(new[] { @"path\tests.html" }, testCallback.Object);

                testCallback.Verify(x => x.FileError(It.IsAny<TestError>()));
                Assert.Equal(1, res.TotalCount);
                Assert.Equal(1, res.Errors.Count);
            }

            [Fact]
            public void Will_call_process_transforms()
            {
                var runner = new TestableTestRunner();
                var summary = new TestFileSummary("somePath");
                summary.AddTestCase(new TestCase());
                var testCallback = new MockTestMethodRunnerCallback();
                var context = runner.SetupTestContext( testRunnerPath: "testRunner.js");
                runner.Mock<IFileProbe>().Setup(x => x.FindFilePath(@"path\tests.html")).Returns(@"D:\path\tests.html");
                runner.Mock<IFileProbe>().Setup(x => x.FindFilePath("testRunner.js")).Returns("runner.js");
                runner.Mock<IFileProbe>().Setup(x => x.FindFilePath(TestRunner.HeadlessBrowserName)).Returns(TestRunner.HeadlessBrowserName);
                runner.Mock<IProcessHelper>()
                    .Setup(x => x.RunExecutableAndProcessOutput(TestRunner.HeadlessBrowserName, TestableTestRunner.ExecutionPhantomArgs, It.IsAny<Func<ProcessStream, IList<TestFileSummary>>>()))
                    .Returns(new ProcessResult<IList<TestFileSummary>>((int)TestProcessExitCode.Unknown, new List<TestFileSummary>{summary}));

                TestCaseSummary res = runner.ClassUnderTest.RunTests(new[] { @"path\tests.html" }, testCallback.Object);

                runner.Mock<ITransformProcessor>().Verify(x => x.ProcessTransforms(It.Is<IEnumerable<TestContext>>(c => c.Count() == 1 && c.Single() == context), res));
            }

            private ChutzpahTestSettingsFile GetTransformTestSettings(string path)
            {
                return new ChutzpahTestSettingsFile
                {
                    Transforms = new List<TransformConfig>
                    {
                        new TransformConfig { Name = "mock", Path = path }
                    }
                }.InheritFromDefault();
            }
        }
    }
}


text:
Emails reveal allegations of overreach against New Hanover County commissioner
Peyton Furtado,
NEW HANOVER COUNTY (WWAY) — Emails show a potential run-in between New Hanover County and Carolina Beach officials when it comes to the Paradise Cove fire investigation.
These events took place over the course of two days: Tuesday, April 6, and Wednesday, April 7.
According to government emails, the night of April 6, Carolina Beach's mayor, Leann Pierce received a call from Julia Olson-Boseman, New Hanover County Commissioners' Chairperson.
Olson-Boseman informed the mayor she'd be legally representing several Paradise Cove homeowners.
The next morning, Darrel Johnson, a Carolina Beach employee got a call from New Hanover County. The caller informed him within the hour, New Hanover County's Building Safety Director, Commissioner Boseman, and a group of inspectors would knock on doors at the Paradise Cove complex and inspect the building during an active investigation.
"My understanding was that she was representing people on that property," said Alan Griffin, Carolina Beach's fire chief.
"And to me it'd be a little inappropriate for her to come down and walk the property with the building inspectors… because there might be some insight that nobody else would have details to at this point."
"There was no prior coordination with our staff about the visit from county inspectors," said Carolina Beach Town Manager, Bruce Oakley.
"Staff was concerned about it interfering with ongoing fire investigations. Our fire chief and building inspectors reached out to state fire and building officials, and they seemed to share the sheriff's similar concerns."
Carolina Beach officials like Griffin said it was outside of New Hanover County's jurisdiction.
"So, it's not an outreach to say that they overstepped their bounds," Griffin continued.
Monday afternoon, Boseman commented to the media in part, "I'm sorry if their feelings were hurt, but if they'd been doing their jobs, I wouldn't have to go down there and respond to a fire alarm for friends who live in the complex."
"And I think a statement was made by Mrs. Boseman that if we were doing our job, and I'm a little bit confused," Griffin responded. "Because there's a lot of rumors we've already discredited through press releases."
According to Griffin, Carolina Beach Fire confirmed alarms were up to code.
Griffin believed the way the New Hanover County inspection was handled was unprofessional, and he worried it would undermine the public's belief in Carolina Beach Fire's ability to do its job.
"It's so ironic to me it went all the way to Wednesday before there was even contact with us. And then the contact was almost like we weren't doing our job," Griffin said.
We received a statement from New Hanover County on the matter, which read:
New Hanover County performs trades inspections in Carolina Beach, and a small team of our Building Safety inspectors was sent at the request of the Board of Commissioners chair. They were able to help educate residents about fire code and the trades, refer them to the Carolina Beach Building Inspector in cases where fire damage on exterior walls was present, and answer questions that residents had. It was not intended to be an overstep jurisdictionally; it was merely a way to support and educate residents.
Our Building Safety team spoke with the Office of the State Fire Marshal at the North Carolina Department of Insurance (NCDOI) and they have affirmed that because the county performs trades inspections and the county inspections team was there to inform people of who to contact with questions or concerns and to educate them, they did not act outside of their scope of responsibilities.
Tags: Alan Griffin, Bruce Oakley, Carolina Beach, Carolina Beach Fire Department, Commissioner Julia Olson-Boseman, Fire, Julia Olson-Boseman, Mayor LeAnn Pierce, New Hanover County Commissioners, Paradise Cove, Paradise Cove Condominiums

redpajama_set_name: RedPajamaCommonCrawl


This is the Northwest Minnesota Birding Report for Thursday, October 18, 2012 sponsored by the Detroit Lakes Regional Chamber of Commerce. You may also hear this report by calling (218)847-5743 or 1-800-433-1888.
It has been a cool week in the northwest, and the last two days have given us some much needed rain. However, it hasn't been fun to be outside due today at least to the strong northwest winds. Many of the sparrows mentioned last week have departed , leaving the stragglers at the feeders.
Beth Siverhus saw her first NORTHERN SHRIKE of the season in the Beltrami Island State Forest in Lake of the Woods County on October 17. Also seen were several RUFFED GROUSE, and a PILEATED WOODPECKER. Gretchen Mehmel reported that a NORTHERN HAWK OWL has been seen on the Roosevelt Road north of the Norris fire tower.
Shelley Steva at the Agassiz Valley Impoundment , Marshall County, on October 13 observed a mixed flock of around 1000 BLACK-BELLIED PLOVERS and AMERICAN GOLDEN-PLOVERS. Two TUNDRA SWANS, NORTHERN SHOVELER, PIED-BILLED GREBES, many AMERICAN COOTS, some KILLDEER, GREATER YELLOWLEGS, more than 100 RUSTY BLACKBIRDS, and around 1600 SANDHILL CRANES were also there. The water is being let out and the mudflats won't last long unless today's rain delays the process. On October 14, Shelley and I found two GREAT EGRETS, two BALD EAGLES, and several AMERICAN PIPITS there. Numbers of plovers had decreased.
From Becker County, Steve Midthune reported HARRIS'S SPARROWS, and the first PINE SISKINS in Detroit Lakes on October 17.
Marshall Howe in Hubbard County observed HOODED MERGANSERS, PIED-BILLED GREBES and two BONAPARTE'S GULLS on October 12. On the 15th, he saw RUBY-CROWNED KINGLET, GOLDEN-CROWNED KINGLET, AMERICAN TREE SPARROW, WHITE-THROATED SPARROW, and YELLOW-RUMPED WARBLER. October 17th he saw WOOD DUCKS, several RUSTY BLACKBIRDS, and RED-WINGED BLACKBIRDS.
Please report bird sightings to Jeanie Joppru by email, no later than Thursday each week, at [email protected] OR call the Detroit Lakes Chamber's toll free number: 1-800-542-3992. Detroit Lakes area birders please call 847-9202. Please include the county where the sighting took place. The next scheduled update of this report is Thursday, October 25, 2012.


text:
Xbox One X Launching This Autumn, Will Be Most Powerful Console Ever
by Stephen Jackson June 11, 2017 June 12, 2017
Xbox One X, previously named Project Scorpio, will be launching worldwide on November 7th and will be the most powerful console ever produced, Microsoft has announced during its E3 conference.
Xbox One X will be releasing with a price of $499, which is just under £400 based on current currency exchange rates.
Microsoft's latest console will release with a six teraflops GPU, almost two teraflops more than that included in Sony's PlayStation 4 Pro which only has 4.2 teraflops. Xbox One X will also be using a custom GPU engine developed by Microsoft which will run at 1,172MHz. For comparison, Xbox One runs at 853MHz with PS4 Pro running at 911MHZ. In addition to that, the console will also ship with an Ultra HD Blu-ray drive capable of displaying 4K movies.
While Xbox One X is definitely a lot more powerful than the standard Xbox One console, Microsoft were keen to reiterate that all Xbox games will be playable across all Xbox One consoles, although games running on Xbox One X will see a noticeable boost in performance. All Xbox One accessories and peripherals will also work on Xbox One X.
If you're worried about how big a machine this powerful will be, you needn't worry as Xbox One X will be the smallest Xbox ever made.
Metro: Exodus Announced, Will Be Releasing in 2018 as an Xbox Exclusive
New Anthem Trailer Shows Flying Exo-Suit Gameplay
Stephen is Gaming Respawn's Editor-in-Chief and takes care of the day-to-day running of the site. You're most likely to see him chilling in the news section where he happens to spend most of his time covering the latest news.


Members Las Rebeldes practice their routine on Saturday, March 7, 2015, in Hockley. The group will be performing during Tejano Day at the Houston Livestock Show and Rodeo.
The cowgirls of Las Rebeldes practiced in Hockley in preparation for their performance at RodeoHouston on Go Tejano Day.


text:
It's all happening in Kindergarten
Two months into this Ministry gig, and I am learning more about Kindergarten than I ever did in 17 years of classroom teaching!
Because the unit that I work with at the Curriculum and Assessment Policy Branch is focused specifically on assessment and reporting policy, familiarity with, interpretation of and implementation support of Growing Success are key components of my job.
In particular, the recently-released Kindergarten Addendum has become a focus for me, as I find myself with a number of Kindergarten resource, support and policy projects in my portfolio.
I've a wide range of classroom experience in my 17 years with a school board before my recent leap to the Ministry of Education, but Kindergarten has made up at best a tiny portion of that experience. While the complexity of a critically rich, socially just and academically robust integrated program was a challenge I enjoyed at the junior and intermediate levels, getting down and dirty with thirty 3-, 4-and 5-year-olds was something I just never could really wrap my head around, though I've always had an enormous respect for those who do.
Becoming a parent of twins 12 years ago certainly brought an understanding of the daily life of a Kindergarten educator into the realm of possibility, as I marveled in awe at the wonder and natural curiosity that small people bring to the world as they navigate through the toddler years attempting to make sense of the natural and social fabric that surrounds them...
And now I have the good fortune to be able to read and digest -- through personal reflections and conversations with more experienced colleagues -- a significant amount of material related to "assessment" in the Kindergarten context.
I'm amazed and impressed by the seamless integration of "assessment" (noticing and naming) and curriculum (program) planning in Kindergarten. With chapter titles like "Play-Based Learning in a Culture of Inquiry" and subheadings like "Co-constructing the Learning Environment", "Thinking about Time and Space", and "The Learning Environment and Beliefs about Children", the 2016 document invites Kindergarten educators to become reflective practitioners and adopt a growth mindset as they collaboratively develop a time and place where our province's earliest learners will begin their formal journey through an education system that will last most of them at least 12 years.
Visualizing It
Although I am reading and talking with people about the kindergarten journey, I am a practitioner, and I need to see it in action.
Fortunately, Instagram has become my new poison: I joined in October 2015, and I often flip through my feed when I have a minute or two at the bus stop or while doing one-armed stretches while riding the elevator at home or work. (I love the visual expediency of the 1000-word picture, and the language of hashtags, when applied descriptively and creatively rather than purely as a long list of marketing gimmicks, intrigues me.)
Inspiration vs. Diversion
For a few weeks after starting my new job -- lost at sea without a classroom of my own -- I got sucked into the world of "teaching's so hard and we're going post ridiculous memes of how brutal it is every second of every day" for a bit. I began following accounts like names like "teacher misery", which pretty much sum up the often true but not the only focus of some of the more challenging aspects of the teaching profession.
But the themes of these accounts, and the underlying messages implied by the gaps in their posting topics, soon got to me.
Frustrated by my own increasing depression of how frustrating the system can be, I spent one evening un-following several teacher accounts, and doing an Instagram search for things like "teacher passion", "I love teaching", "Ontario Teacher" and "Authentic Inquiry". Surely, I thought, there must be keen and eager teachers out there who are doing it well, despite the sometimes enormous challenges of too many children, not enough space, and limited resources...
Perhaps not surprisingly, the most frequent photos that popped up were ones from Kindergarten classrooms!
My respect for these dedicated educators of our school population's youngest citizens continues to grow daily as I peer through the window of social media* and am rewarded with richly colourful, diverse and hopeful images of intellectual provocations designed to invite small people into a world of wonder, speculation and risk-taking.
The research (e.g. Dweck and Leggett and others) strongly indicates that children who see themselves as capable learners early on in their development tend to experience more success throughout their educational careers and beyond.
These identities are not only formed early on, but also once set are -- according to the research -- very difficult to change. Therefore, Kindergarten educators play a key role in building a society of engaged, growth-oriented citizens: It is they, along with parents and families, who help children form an image of themselves as learners... or not.
The ways in which the adults in the room guide the co-development of the learning environment, from language used to materials laid out to provocations set up to observations named and celebrated with students form the building blocks on which the rest of a child's educational career will be built.
I'm excited to see from the many photos Ontario Kindergarten educators are enthusiastically posting on Instagram that these building blocks are being thoughtfully and joyfully offered to our young learners.
I think the rest of us have a lot to learn from what's happening in Kindergarten!
* I am not naiive enough to think that the types of activities I see posted on Instagram are indicative of what's happening every minute of every day in a given classroom; I know that many of the same hurdles I faced as a teacher are faced by the educators in Kindergarten classrooms. But the fact that they are leveraging the affinities of their students and beating the odds of the challenges some may face -- even a few times a week -- is a testament to the many wonderful things happening in their classroom practice!


Build extension that enable you to clean a resource group on azure.
With this task you can purge all resources from a resource group.
When testing the deployment of resources in a release pipeline, you want to purge the resources in the resource group after you are done. In the scenario where you want to keep the resource group it self, you can use this task.
To use the task, just select the connection to azure and then give the resource group name as parameter.


This is the third incarnation of the House of Yes—the first one was in a Bed-Stuy basement and was mostly a spot for wild underground parties. When a massive fire demolished that space in the mid-2000s, Anya and Kae decided to create a highly professional aerialist training facility and performance venue in the heart of East Williamsburg. In 2013 the lost the lease on the second space, and began a search for an even grander location. After six months of searching, they signed a lease on their current location in Bushwick and they officially opened on New Years 2016. The new location is larger and features a full service restaurant and bar.
They continue to put on high-energy, high-caliber, innovative circus and cabaret performances. They make all their costumes in the Make Fun Labs, build their own sets, and collaborate with Brooklyn bands for live musical accompaniment. Performances showcase aerialists, trapezists, fire-dancers, contortionists, burlesque acts, singers, musicians, and more. House of Yes is also a great after-hours party spot, with DJs spinning far into the wee hours most weekend nights.
Many of the House of Yes denizens also make up the loose conglomeration of female acrobats Lady Circus, performing at underground parties and cabarets across the country. The Lady Circus performers were even featured as a costume-design challenge on Project Runway in 2011.
** Adapted with permission from this piece on Brooklyn Spaces.
Check out the underground party scene at the "Burning Man of Brooklyn."
A yoga studio and venue for "chill-out parties" in a former chicken slaughterhouse.


text:
Sedation holidays
Created on Wed, 12/23/2015 - 21:27
Last updated Sat, 01/02/2016 - 05:42
Previous chapter: Delirium in critical illness
Next chapter: The role of interventional radiology
The "sedation holiday" came up in Question 1 from the first paper of 2013 and Question 5 from the second paper of 2008, a time scale which is somewhat surprising in its lateness. You'd have expected it to come up closer to the year 2000, shortly after the seminal Kress paper was published in NEJM, or when Jacobi et al promoted the practice as the new standard of care in ICU. Instead, the college waited until 2008. The 3013 question at least makes more sense because the well-received Canadian trial of this practice was published in 2012 (Mehta et al). The best resource for a "critically evaluate" answer to such a question is PulmCCM, where the primary author, enraged and frothing, fell upon the practice and tore it limb from limb. Here, only a brief summary will be attempted.
Rationale for daily interruption of sedation
Exposure to sedating agents is undesirable, given that most agents have unpleasant side-effects
Interruptions in sedation may decrease the total dose of sedation over the course of one's ICU stay
Decreased sedation means better cooperation with physiotherapy and weaning trials
Earlier extubation, decreased healthcare costs and shorter ICU stay should theoretically result.
Proposed advantages of the sedation holiday
More rapid weaning from ventilation
Reduction in ICU length of stay
Reduced need for vasopressors
Reduced need for fluid boluses
Expected disadvantages of the sedation holiday
Greater risk of self-extubation
Greater psychological distress; potential for PTSD
Increased nursing workload
Increased patient-ventilator dyssynchrony
In fact, more sedation (Mehta et al, 2012): there was an increase in the total daily dose of midazolam and fentanyl: the patients went berzerk during their holiday, and required large boluses.
Arguments in favour of this practice
In the recent trial (Mehta et al, 2012) the rate of self-extubation was unchanged (clearly, the patients were well restrained!)
There was no real increase in identified delirium between the groups (so, sedation holidays don't promote delirium)
The nursing workload was not substantially increased. The difference was rated on a 10-point visual analog scale. The difference was 4.2 vs. 3.8. So, going by this average measurement, having a sedation holiday made the patient 4% more difficult to look after.
Evidence exploring the utility of the daily sedation holiday
Kress et al (2000) - small single centre RCT; n=128
length of stay in ICU and duration of ventilation was reduced
reduced symptoms of PTSD; no adverse psychological outcome
Girard et al (2008) - multicentre trial, n=336
Reduced mortality at 1 year, but increased risk of self-extubation
Mehta et al (2012) - multicentre randomised controlled trial, n=430
No reduction in length of ICU stay or duration of ventilation
Cochrane verdict (2014) - meta-analysis, n=1282; no strong evidence in support of this practice. Tracheostomy may be performed less often.
Kress, John P., et al. "Daily interruption of sedative infusions in critically ill patients undergoing mechanical ventilation." New England Journal of Medicine342.20 (2000): 1471-1477.
Kress, John P., et al. "The long-term psychological effects of daily sedative interruption on critically ill patients." American journal of respiratory and critical care medicine 168.12 (2003): 1457-1461.
Girard, Timothy D., et al. "Efficacy and safety of a paired sedation and ventilator weaning protocol for mechanically ventilated patients in intensive care (Awakening and Breathing Controlled trial): a randomised controlled trial." The Lancet 371.9607 (2008): 126-134.
Mehta, Sangeeta, et al. "Daily sedation interruption in mechanically ventilated critically ill patients cared for with a sedation protocol: a randomized controlled trial." JAMA 308.19 (2012): 1985-1992.
Burry, L., et al. "Daily sedation interruption versus no daily sedation interruption for critically ill adult patients requiring invasive mechanical ventilation." The Cochrane Library 2014, Issue 7
Jacobi, Judith, et al. "Clinical practice guidelines for the sustained use of sedatives and analgesics in the critically ill adult." Critical care medicine 30.1 (2002): 119-141.


Since posting a cello-only cover of "Smooth Criminal" to YouTube in 2011, 2Cellos has taken over the classical music charts. The Croatian cello duo's first album, "2CELLOS," reached No. 1 on the U.S. Billboard's top classical albums.
Luka Sulic and Stjepan Hauser recently released their second album, "In2ition," which shows the dynamic duo is working as hard as ever. The collaborations and covers on this album are on another level.
"In2ition" opens with a cover of Fleetwood Mac's "Oh Well," which properly builds the momentum up for the rest of the album; the twist is that Elton John accompanies Hauser and Sulic on the track. The collaboration is not a total surprise – as Elton is known for being a fan of the duo – but it's definitely a remarkable way to open an album.
The next track, "We Found Love," is an unexpected choice, but Hauser and Sulic do it justice. The build-ups before and after the choruses are unbelievable. They took the original recording and made a flawless raw version of it.
Rihanna's hit single is followed by a rendition of "Highway to Hell" that proves the cellists can succeed in any genre. This AC/DC cover – as well as their rendition of "Technicall Difficulties" by Racer X – shows they can rock just as hard as a metal band. And guitarist Steve Vai proves to be the perfect addition to the track.
Compared to the other covers on the album, The Police's "Every Breath You Take" is underwhelming. But of course, it's nothing less than stellar. It just would've made more sense on "2CELLOS." However, the next track, "Supermassive Black Hole," takes a well-known Muse song and revamps it. Naya Rivera's vocals are perfect for the cover.
Coldplay's "Clocks" is not an unexpected song choice, but the rendition is beautiful. Pianist Lang Lang's accompaniment on the track is perfect. It adds flavor to what has become an overplayed song.
The most impressive track on the album is by far the duo's cover of "Bang Bang" by Sonny and Cher. It's unexpected in a good way, making it the best song choice on the album. Sky Ferreira's voice lies perfectly over Sulic and Hauser's lines.
The next tracks are also strong: the recreation of electronic dance sounds in "Voodoo People" and the cover of "Candle in the Wind" are impressive. The duo's original track, "Orient Express," is beautiful. It references a passenger train that passes through Paris, Istanbul and Croatia. The song's steady beat and rhythm allude to this reference.
The last two tracks – "Il Libro Dell'Amore" featuring Italian singer Zucchero and "Benedictus" – are more reminiscent of the duo's first album: they're simple yet beautiful.
No genre is left untouched on "In2ition." Every rendition is performed flawlessly and the changes made from the last album to this new release – the variety of genres and the addition of vocals – are impressive.


A few weeks ago I went to visit my very good friends Jenny and Jake in Devon, while I was there I was lucky enough to photograph them both. They have such an amazing relationship and are so close it was wonderful to capture them together. They are both as colourful and theatrical as each other which I hope comes through on these images. It also just happened to be Jake's 11th birthday (guess what his present was)! Happy times!
Contax 645. Kodak Portra 400. Developed and scanned by the brilliant UK Film Lab.


text:
Home Lifestyle Adoption Emerging Effective Cancer Option
Multicathousehold
Emerging Effective Cancer Option
Immunotherapy helps the body use its own weapons
estaff
Published: August 20, 2019 Updated: December 27, 2019
itman47 | Deposit Photos
The Animal Cancer Foundation says that of the 32 million cats in the United States, 6 million are diagnosed with cancer each year. That's a staggering number, and researchers are working hard to find cures. Among the most recent advances in oncology is immunotherapy. While standard cancer therapies—chemotherapy, radiation, surgery—directly destroy cancers, they also may harm normal cells and tissues. Immunotherapy is different. It destroys only the abnormal cells.
Immunotherapy uses your cat's own immune system to fight cancer. A healthy immune system is triggered when it detects a rapid replication of cancer cells. Unfortunately, however, it's sometimes not enough: The cancer cells may get ahead of the immune system. This may be due to the cat's immune system not being strong enough to react or because the cancer cells are somehow "hidden" from recognition. In cases like these, researchers believe, the immune system needs to be stimulated or jump-started to recognize the foreign cells and attack them.
Not Yet Perfect
While immunotherapy sounds perfect, there are caveats. Immunotherapy tends to work best after a tumor has been "debulked" (made smaller by surgical removal, radiation, or chemotherapy), which means immunotherapy is more of an adjunct to traditional therapies and adds to the cost of cancer treatment.
In addition, much of what we know about feline immunotherapy has been extrapolated from work with humans and lab animals. At the moment, it's difficult to determine which cats will benefit from immunotherapy and which therapies have trials and data backing their safety and efficacy will benefit from immunotherapy.
"One challenge with immunotherapy is predicting which patients will respond. There is a lot of research going on (some of which is currently funded by the Cornell Feline Health Center) both to find ways to increase the number of patients that respond to immunotherapies and to identify biomarkers that will predict which patients will respond," says oncologist Kelly R. Hume, DVM, DACVIM, Associate Professor, Clinical Sciences at the New York State College of Veterinary Medicine at Cornell.
"Because there are very few immunotherapies available in veterinary medicine, there are still many hurdles to overcome in commercializing these products," says Dr. Hume. "Practitioners and owners need to be vigilant about requesting peer-reviewed efficacy and safety data on immunotherapy products that are commercially available."
Vaccine Possibilities
Oncept, a vaccine designed to prevent or minimize metastasis (spread) or recurrence of oral melanomas in dogs, has been tested for use in cats. In cats, the most common location for melanomas is in the iris of the eye. Studies show that the vaccine is relatively safe for use in cats with minimal side effects. Efficacy for prolonged survival is not yet known.
A vaccine of recombinant canarypox virus expressing feline interleukin-2 (IL-2) is approved for use in Europe as adjunctive immunotherapy after surgery for some feline cancers, including feline injection-site sarcomas, or fibrosarcomas. (IL-2 is an important T cell stimulatory cytokine approved as an exogenous anti-tumor agent.)
Called Oncept IL-2, this vaccine is indicated for cats with fibrosarcoma (2 to 5 centimeters in diameter, which is of an inch to two inches) without detectable metastasis or lymph node involvement. The goal of Oncept IL-2 is to reduce the risk of relapse and to increase the relapse-free interval. It should be used in addition to surgery and radiotherapy. The vaccine requires multiple injections and is not recommended for cats who already have metastases to the lungs.
While it does seem counterintuitive to give a vaccine for a vaccine-related cancer, results show that this approach may provide some benefit. It is currently conditionally licensed for use in the U.S. with clinical trials ongoing at the University of Pennsylvania. Research is encouraging: "In the absence of immunotherapy, tumor recurrence was observed in 61% of animals within a 12-month follow-up period after treatment with surgery and iridium-based radiotherapy. In contrast, only 39 and 28% of cats receiving either NYVAC-human IL2 or ALVAC-feline IL2, respectively, exhibited tumor recurrences" (see https://www.ncbi.nlm.nih.gov/pubmed/14625567).
Autologous Vaccines
Vaccines called "autologous vaccines," are made from tissues extracted when a tumor is surgically removed. In this process, antigens on the tumor cells are isolated and used to develop a vaccine that is unique to your cat and her cancer. Because her own cells are used, the likelihood of any major reactions is low.
"The science behind the technology is the idea that every patient's tumor is different, and so an immunotherapy of some kind that's 'off the shelf' and intended to treat every tumor is simply at a disadvantage because of the diversity of tumors," says Mark Suckow, DVM, chief scientific officer for Torigen Pharmaceuticals, a company that specializes in cancer immunotherapy, in an interview in American Veterinarian.
"The vaccine stimulates the immune system, resulting in a cascade of events that culminate in the stimulation of T-lymphocyte cells, which respond and attack the tumor based upon the antigens that we have provided," says Dr. Suckow.
Cats who are using this therapy receive three injections one week apart (so far, 88 cats have been treated).
Cancer types ranged from melanoma to hemangiosarcoma, with squamous cell carcinomas and vaccine-associated fibrosarcomas being the most common. More time is needed to evaluate efficacy, but this is a promising option.
At Cornell
One of the studies funded by the Cornell Feline Health Center is being carried out at Cornell University and is headed by Cynthia Leifer PhD. This project is looking at chimeric antigen receptor (CAR) immunotherapy to eradicate feline alimentary T cell lymphoma. Lymphoma is the third most common feline cancer. The alimentary form attacks the gastrointestinal tract, the liver, and other abdominal organs. Survival time is currently poor, with most cats succumbing in six to 24 months.
The technique involves taking T lymphocytes from cats with this cancer and modifying the cells genetically. Introducing CARs into the cells is believed to "prime" the cells to find and destroy cancer cells. The modified cells are then reintroduced into the cancer patients. This type of immunotherapy has shown promise in people and is being looked at in dogs and cats.
Immunotherapy is part of the future in feline oncology. With multiple ongoing studies and more research being devoted to feline health, cancer options for your cat will continue to grow, with treatments customized to the individual cat and her cancer. There is great hope in the veterinary community that prognoses for survival and increased quality of life will improve as a result of this important work.
MAJIVECKA | Deposit photos
5 Questions About Cancer Therapies
Your input into your cat's treatment is important.
In a recent issue of DVM360, Michael O. Childress DVM offered five important questions to ask about cancer treatment. Your involvement in your cat's care and treatment decisions is important.
1. Does this therapy appear in peer-reviewed scientific literature? That means people knowledgeable about feline cancer have evaluated the treatment.
2. Are there published clinical trials using this therapy in cats with naturally occurring disease? In this case, the reports show results of using this method for cats with the same cancer as your cat in "the real world."
3. What are the pharmacokinetics and pharmacodynamics of the drug being considered? This refers to the metabolism, distribution, and effects of the drug being used. Has this drug been evaluated and used in cats?
4. How was the benefit of this drug evaluated? There are two primary ways to look at effectiveness of a chemotherapy drug. The first is the effect on the actual tumor, i.e. did it shrink? The second is: Did it increase the life span and/or quality of life of the cats who were treated with it?
5. What side effects and complications may occur in a cat as a result of this treatment? It's important because vomiting for a week may be acceptable to you but permanent incontinence may not.
Potential New Test for Urinary Tract Infections
Askelizabeth
Endoscopy: What to Expect
New Way of Evaluating Feline Pain


Sometimes it's learning small things that make using Tableau so much easier or give you a new world of viz possibilities. Today we learnt a few, with my favourite being how to create your own custom regions from fields with no geographic value. Maps and other spatial things such as polygons are not my strongest area, so it was good to improve my map skills.
We were looking at Tableau's favourite dataset 'Superstore data' and looked at a few maps. Above, we can see that the U.S is the only country in this data. We also have some data on four different regions: Central, East, South and West that we want to use to breakdown the U.S. However if we just drag this onto the Mark card, nothing really happens.
as each state is part of one of the four regions, the regions can now be displayed.
Notice how the Region dimension has changed from 'abc' (a string value) to a picture of the globe (a geographic value). Now you can use this to create any map you want.
I found this useful as it's an easy trick that can let you have better control of your maps.


text:
Morolica is a municipality in the Honduran department of Choluteca.

Founded in the late 19th century, Morolica was destroyed by flooding associated with Hurricane Mitch in October 1998.  The current Morolica, also known as New Morolica, is located in a valley some five kilometers from the original site.

The current mayor is Ever Gomez of the liberal party.  Morolica in its entirety accounts for some 6–7,000 people spread out over the city and its aldeas (villages), with around 1,200 living in the city itself.

Morolica possesses four churches: Evangelical, Baptist, Pentecostal, and Catholic.

The main industry is farming and the economy doesn't stretch much beyond that.  Possessing a kindergarten, elementary school, high school, public library, court, health center, census office, and mayor's office, the largest employer by far is the government.

Municipalities of the Choluteca Department

redpajama_set_name: RedPajamaWikipedia


text:
Column: Mayor Lori Lightfoot's plan to seize property from gang members is great if you like terrible ideas
CBS unveils plans to merge radio division with Entercom
By Cynthia Littleton
Variety |
WBBM-AM is one of Chicago's CBS Radio affiliates. (Phil Velasquez / Chicago Tribune)
CBS Corp. has unveiled plans to merge its radio division with Philadelphia-based Entercom, creating a broadcast platform with 244 stations and national reach across major markets.
The surprise deal with Entercom means that CBS has scrapped plans for an IPO spinoff of its radio division, as it had been planning for months. The complex merger agreement that will leave CBS shareholders with 72 percent of the enlarged Entercom is said to have come together in the past few weeks.
CBS' radio division owns and operates 117 radio stations in 26 markets, with seven stations in Chicago, including WBBM-AM 780, WSCR-AM 670 (The Score), WUSN-FM 99.5, WXRT-FM 93.1 and 105.9 FM's simulcast of WBBM-AM. The division also has six stations in Los Angeles, including KNX-AM 1070 and KCBS-FM 93.1.
"This agreement is great for shareholders and achieves our previously stated objectives by separating our radio business in the best possible way," said Leslie Moonves, chairman and CEO of CBS. "Entercom is a superbly run company, and together with CBS Radio's powerful brands and remarkable people, we are creating an organization that will be even better positioned to succeed in this rapidly evolving media landscape."
CBS last February announced plans to divest its radio division, which had become a drag on earnings and was not a strong fit with its content-focused strategy. CBS shopped the division around to prospective suitors but eventually settled on plans to divest through a spinoff as a stand-alone public entity. The Entercom announcement caught observers by surprise on Thursday.
"This transformational transaction creates scale-driven efficiencies and opportunities to compete more effectively with other media to better serve our listeners and our advertisers," said David J. Field, Entercom president and CEO. "The combination of a compelling strategic fit, an excellent balance sheet, and robust free cash flow generation, position us to create significant shareholder value for our investors."
Field will remain CEO of the combined company. CBS Radio president and CEO Andre Fernandez is expected to exit after the deal closes, which CBS estimated would be in the second quarter.
The combined company will have post-merger revenue of $1.7 billion and cash flow of nearly $500 million. According to CBS, the deal is designed to be tax-free to CBS shareholders through a complex process known as a reverse Morris trust, which begins with an offer to existing CBS Corp. shareholders to exchange their stock for shares in the enlarged Entercom.
The final price tag on the deal for CBS is unclear, but the Eye intends to use the proceeds to buy back CBS Corp. shares.
Entercom will rank as the nation's second-largest radio firm behind iHeartMedia Inc. The company will have stations in 23 of the top 25 markets including CBS' powerhouse news and sports outlets in New York, Los Angeles and Chicago. The sale also includes the CBS Sports Radio Network operation that has 300 station affiliates around the country.
Entercom was previously the fourth-largest radio station owner with 127 stations in 27 markets.


SSCs – a two-speed world?
Shared Service Centers are one of the fastest growing sectors in Poland. At the end of 2016 there were over 900 centers with more than 200 000 employees. Business is booming and you can read all about the benefits of this boom in the press. But there is another side to this success story. Today I will look at the HR challenges at SSCs.
The origins of Shared Service Centers are simple – cost cutting and cost optimization in the pursuit of better effectiveness. In short: money. Consultants call it the "decomposition of the value chain", outsourcing anything which isn't directly tied to the business and can be done cheaper elsewhere to maximise profits for shareholders. Every major corporation in the world has adapted this business model and is centralizing it's HR, IT and accounting operations in SSCs in the pursuit of better cost effectiveness.
In Poland, the first SSCs were established by international corporations in the first decade of the 21st century. In 2008, Shared Service Centers in Poland employed over 50,000 people, in 2012 it was 100,000, and according to a report by the ABSL, last year employment exceeded 212,000.
SSCs are evolving into highly specialized institutions with cutting edge/state of the art IT systems. Despite that, however, they are still, as Phillip Brown from Cardiff University put it, "a factory of white collar employees working on knowledge assembly lines".
You can't have your cake and eat it. The price of cost cutting is the emergence of a two-speed world – the mother company and its SSCs.
Shared Service Centers often struggle with low levels of motivation, satisfaction and commitment, limited career paths and, my favourite topic, communication and cross-cultural management issues.
When establishing SSCs, companies focused on the availability of human capital and their cost. As a result, cities with good infrastructure and universities attractive to young people were an obvious choice for the location. As time went by the increased demand for skilled labour has affected the employee cost. If the number of SSCs increases from 10 to 100 within a few years, the employee begins to dictate terms. Today, recruitment and employee turnover are the most visible and important challenges for the HR department.
The average staff turnover is 15% and in many companies is much higher. This means continual basic training and onboarding costs and therefore higher FTE costs.
The transformation associated with establishing a shared service center and changes to the organization of work create initial resistance. People lose jobs when processes are outsourced to another country – some can up-skill or re-skill but most will have to find another employer.
Those moving to a newly opened SSC often experience an identity crisis – are they still part of the mother company with its strong corporate culture or are they now an external contractor?
The problem here can be the monotonous nature of work on the process assembly line. The reaction to absurd situations is often very slow. I remember, for example, that when we opened our SSC, for a few months we kept getting emails from the system starting with Dear Ms/Mr (in Polish Droga Pani / Panie.) We couldn't change this because the template had been approved and the system for escalating the problem was still in its early days.
Outsourcing some processes creates frustration and requires a change of habits by the management. Managers are often used to VIP treatment and have a hard time adapting to a situation when they have to do something in the system themselves, the newly-hired SSC employee doesn't know who they are and therefore doesn't initiate the special treatment protocol which Director X is entitled to.
SSC is a melting pot of different communication styles – direct and indirect: different ways of saying "NO" and managing conflict, from tackling it head on to openly avoiding conflict. If we also add the linear, structured management style preferred by Germanic cultures to the more flexible approach from the Mediterranean countries to the mix, you can see the potential for problems and misunderstandings.
Well managed multi-cultural teams can be very effective, although badly managed teams end up being less effective than culturally homogenous ones. A lot of energy is wasted and little output generated.
Cross-cultural training courses are still the exception, not the rule. We assume that if someone can speak the company language (in most cases English) then he/she is also able to communicate. Unfortunately these two skills are not the same.
Cross-cultural awareness and communication should be a mandatory part of the onboarding process and the basic training for both new employees and team leaders.
The scale of recruitment, high turnover and difficulties attracting the right candidates lead to a situation where HR often focus on "delivering here and now" and a never-ending onboarding process becomes the norm. What gets lost along the way are strategic objectives such as building a long-term corporate culture and strengthening key managerial skills.
HR doesn't have a magic wand to solve all the problems with SSC identity, organizational culture and internal communication. Processes are important but so are the soft skills of team leaders and managers. An innovative approach to motivation, building and strengthening corporate culture and, in particular, cross-cultural competencies are key to success. A lot of older tools used to foster commitment in the mother company don't work in a SSC reality.
SSCs are here to stay – they've become part of our business landscape. Creating meaningful work, something more than a white collar assembly line, is one of the most pressing challenges for HR today.


8 U.S.C. Section 2257 Compliance Notice for www.yesboobs.com. All of the models, actors, actresses and other persons that appear in any visual depiction of actual sexually explicit conduct appearing or otherwise contained in the following Website were over the age of eighteen years at the time of the creation of such depictions.


text:
Michael Cohen reveals his bombshell book about Donald Trump
Michael Cohen published a first look at his book about Donald Trump on Thursday, revealing several bombshell claims, including that he witnessed a 'golden showers' incident.
In the peek at his memoir 'Disloyal,' Cohen reveals the 'mob boss' mentality of the president in his foreword, which he titled 'THE REAL REAL DONALD TRUMP.'
'Apart from his wife and children, I knew Trump better than anyone else did,' Cohen wrote, claiming he was the one who pushed him to run for president in 2011 and 2015.
'In some ways, I knew him better than even his family did because I bore witness to the real man, in strip clubs, shady business meetings, and in the unguarded moments when he revealed who he really was: a cheat, a liar, a fraud, a bully, a racist, a predator, a con man,' he revealed.
In the first part of his book, which was published to DisloyalTheBook.com on Thursday afternoon, Cohen claimed that Trump has 'no real friends.'
'He has no one he trusts to keep his secrets,' he continued. 'For ten years, he certainly had me, and I was always there for him, and look what happened to me.'
The book also includes a flurry of admissions from Cohen, some of which he already pleaded guilty to and was given a three-year prison sentence for.
'I stiffed contractors on his behalf, ripped off his business partners, lied to his wife Melania to hide his sexual infidelities, and bullied and screamed at anyone who threatened Trump's path to power,' Cohen admitted.
Michael Cohen released the forward of his upcoming book 'Disloyal,' about his longtime friendship with Donald Trump where he claimed he witnessed the 'golden showers' incident and helped Trump commit tax fraud, create a secret back channel to Vladimir Putin and lie to Melania
'Coming Soon,' the president's former fixer and personal attorney wrote in a tweet along with an image of the cover
Cohen previewed the cover of his upcoming book 'Disloyal' on Twitter Thursday morning
COHEN ON….
What he knows:
I know where the skeletons are buried because I was the one who buried them.
How Trump works:
Trump's theory of life, business and politics revolved around threats and the prospect of destruction—financial, electoral, personal, physical—as a weapon.
Who he was for Trump:
I was one of Trump's bad guys. In his world, I was one hundred percent a made man.
What Trump made him:
An acolyte obsessed with Donald J. Trump, a demented follower willing to do anything for him, including, as I vowed once to a reporter, to take a bullet.
How Cohen knows what he writes:
I knew him better than even his family did because I bore witness to the real man, in strip clubs, shady business meetings, and in the unguarded moments when he revealed who he really was: a cheat, a liar, a fraud, a bully, a racist, a predator, a con man.
What Trump offers his fans:
…an intoxicating cocktail of power, strength, celebrity, and a complete disregard for the rules and realities that govern our lives.
The inner Donald Trump:
…he has a million acquaintances, pals and hangers on, but no real friends. He has no one he trusts to keep his secrets.
How Trump instructs his aides:
Like a mob boss, using language carefully calibrated to convey his desires and demands, while at the same time employing deliberate indirection to insulate himself and avoid actually ordering a hit.
What will happen to Trump:
I'm certain that Trump knows he will face prison time if he leaves office
Why Trump wants to be 'leader for life':
Whoever follows Trump into the White House, if the President doesn't manage to make himself the leader for life, as he has started to joke about—and Trump never actually jokes- will discover a tangle of frauds and scams and lawlessness
'From golden showers in a sex club in Vegas, to tax fraud, to deals with corrupt officials from the former Soviet Union, to catch and kill conspiracies to silence Trump's clandestine lovers, I wasn't just a witness to the president's rise—I was an active and eager participant,' he wrote.
The mention of him witnessing golden showers brings a reminder to the Steele Dossier, which claims Russian President Vladimir Putin has blackmail on Trump from the time he was in Moscow for the Miss Universe pageant in 2013 and allegedly watched prostitutes urinate on a bed because it had been slept in by the Obama. Trump has denied the claim repeatedly.
However Cohen says the golden showers incident was in Las Vegas – suggesting he might be referring to a trip with Trump to a club there called The Act whose repertoire included stimulated urination by performers on stage. Trump did a deal at the club to take his Miss Universe competition to Moscow, a previous book by investigative journalists revealed.
Cohen, 53, previewed earlier in the day the cover image and title of his upcoming memoir 'Disloyal: The True Story of the Former Personal Attorney to President Donald J. Trump,' along with a teaser, 'Coming Soon' in the text of the tweet.
The foreword, however, hints at a series of bombshell in the book.
Cohen says: 'Trump had colluded with the Russians, but not in the sophisticated ways imagined by his detractors.
'I also knew that the [Robert] Mueller investigation was not a witch-hunt. Trump had cheated in the election, with Russian connivance, as you will discover in these pages, because doing anything -and I mean anything – to "win" has always been his business model and way of life.'
He says Trump tried to 'insinuate' himself into Putin's world and his 'coterie of corrupt billionaire oligarchs.'
'I know because I personally ran that deal and kept Trump and his children closely informed of all updates, even as the candidate blatantly lied to the American people saying, "there's no Russian collusion, I have no dealings with Russia… there's no Russia.'
Cohen makes clear that he speaks from a position of knowledge saying that for 10 years, he was Trump's last call at night and first in the morning, and he was 'in and out' of Trump's office '50 times a day.'
'Our cell phones had the same address books, our contacts so entwined, overlapping and intimate that part of my job was to deal with the endless queries and requests, however large or small, from Trump's countless rich and famous acquaintances,' he writes.
'I called any and all of the people he spoke to, most often on his behalf as his attorney and emissary, and everyone knew that when I spoke to them, it was as good as if they were talking directly to Trump.'
Ominously, he writes: 'I know where the skeletons are buried because I was the one who buried them.'
He describes himself as having been 'at the center of Trump's innermost circle' and that his 'boss' had come to his son's bar mitzvah and told him: 'You're family.'
'I fucking believed him,' he writes.
Cohen tells how he feared he would be killed by Trump's supporters when he gave evidence to Congress after flipping and co-operating with Mueller.
'The President of the United States wanted me dead,' he writes – saying that he knew that Trump was like a 'mob boss' who would never directly order a hit but instead spoke in a way 'carefully calibrated to convey his desires and demands.'
'I knew how he worked because I had frequently been the one screaming threats on his behalf as Trump's fixer and designated thug.
'The President called me a rat and tweeted angry accusations at me, as well as my family.'
He says he received 'hundreds' of death threats on his cell phone, his email and even in the mail.
'I was exactly the person Trump was talking about when he said he could shoot and kill someone on 5th Avenue and get away with it,' he writes.
Cohen makes clear he wrote the foreword while in prison, putting at the end of it 'Otisville, New York..
But he says he is convinced that Trump knows he will follow him to prison, calling it 'the inevitable cold Karma to the notorious chants of "Lock Her Up!"'
In fact, he says, he believes Trump wants to avoid jail by becoming leader for life, saying he has 'joked about it' and adding: 'Trump never jokes.'
Cohen hints at a semi-sympathetic view of a tortured inner Trump, lost, alone, and without the people he really needs: another Roy Cohn, the pitbull Mafia lawyer of his youth, or, Cohen says – with no self-effacement – Cohen himself.
'Watching Trump on the evening news in the prison rec room, I almost feel sorry for him,' he writes.
'I know him so well and I know his facial tics and tells; I see the cornered look in his eyes as he flails and rants and raves, searching for a protector and advocate, someone willing to fight dirty and destroy his enemies.'
He names AG Bill Barr – who tried to block the book by gagging, then jailing, Cohen – Jared Kushner, Rudy Giuliani and Mike Pompeo as 'new wannabe fixers, sycophants willing to distort the truth and break the law in the service of the Boss.'
The memoir, however, does not come without Cohen owning up to his own actions.
Secret back channel: Michael Cohen says Trump ordered him to find a conduit to the Russian president Vladimir Putin
I lied to Melania: Michael Cohen says he told Trump's wife lies to cover up her husband's infidelities
TRUMP'S NIGHTMARE SUMMER READS
Michael Cohen's book – planned for 'late September' comes amid a flurry of books – some of which Trump and his aides have tried to stop – about the president. They include:
The Room Where It Happened
Both the White House and the Department of Justice tried to gag the former national security advisor's bombshell account which told how Trump begged China's President Xi to help him win the election – and thought Finland was part of Russia
Too Much And Never Enough
Mary Trump, the president's niece, has become a number one bestseller with her devastating account of her uncle, calling him a sociopath and narcissist and Frankenstein's monster, a victim of a loveless childhood, called a 'clown' and a 'fool' by his own sister and willing to ogle his own niece. His family failed to gag her – and she also revealed how he and Ivana gave cheap Christmas gifts.
Bob Woodward, the legendary investigative journalist, will publish his second book on Trump in September. It will include 25 'love letters' between the president and Kim Jong Un with the North Korean dictator calling their relationship something from 'a fantasy film.' Trump has been interviewed by Woodward for the book.
'I made choices along the way—terrible, heartless, stupid, cruel, dishonest, destructive choices, but they were mine and constituted my reality and life,' he wrote.
He says he lost touch with his siblings, became obsessed by money, desperate 'to inhabit the world from the vantage point of private jets and billion-dollar deals, and I was willing to do whatever it took to get there.'
He admits to 'ego, short temper, and willingness to deceive' – but says that his account will allow people to see inside Trump's world.
'It's only gangster who can reveal the secrets of organized crime,' he says of Trump's world, calling himself 'one hundred percent a made man.'
The revelation of some of the book's contents came after a federal could ruled against what a judge said was Attorney General Bill Barr's attempt to stop Cohen from publishing the tell-all.
The U.S. government made an agreement with federal prosecutors at the end of July to abandon its efforts to impose a gag order on Cohen as he prepares to release his book critical of his former boss.
Cohen was released from prison in May 2020 amid concerns over coronavirus after he served one year of his three-year sentence for pleading guilty to campaign finance violations and lying to Congress.
He returned to prison in early July after tweeting about planning to publish a book alleging Trump used racial slurs against former President Barack Obama and former South Africa President Nelson Mandela.
'Favorable ruling yesterday by the Court as I am close to completion of my book…' Cohen wrote of Trump's niece Mary Trump being able to publish her critical book about her uncle.
'…anticipated release date will be late September.' Cohen wrote in another tweet.
A week after the president's former fix-it man and personal attorney was released from prison for the second time, where he spent two weeks after refusing to cease speaking to the media, the ruling came in that he could speak with the media and publish his memoir.
The tweet of him touting his new book Thursday is the first time he has posted since being released from prison.
Cohen was released from prison in late July after being ordered to return after tweeting and talking about how his upcoming book will reveal Trump's racist comments toward former President Barack Obama and Nelson Mandela
The court ruled against Attorney General Bill Barr, who Cohen sued, for trying to issue a gag order against him and sending him back to prison after his May released. The judge argued the move was in violation of Cohen's First Amendment Rights
Cohen was thrown back into prison one week after tweeting that he would release his tell-all book ahead of the November presidential election and claiming it was a 'favorable ruling' that Trump's niece Mary Trump was permitted to publish her own tell all
Cohen sued U.S. Attorney General Bill Barr and federal prison officials during his second stint, claiming he was ordered back because of the book.
U.S. Judge Alvin K. Hellerstein ordered he be released at the end of last month, saying the government's action was retaliatory and a violation of his First Amendment rights. Cohen intentionally revealed that the book would be coming out ahead of the November elections. His will join a list of other pre-Election Day books aimed at outsing Trump, including Bob Woodward's 'Fear: The Trump White House,' Mary Trump's 'Too Much and Never Enough: How My Family Created the World's Most Dangerous Man,' and former National Security Advisor John Bolton's 'The Room Where It Happened.' Both Mary and Bolton also faced lawsuits from Trump's administration trying to stop their publication, but ultimately the court ruled it was lawful for them to go ahead with releasing their respective memoirs. Read more: Official – Disloyal The Book – Foreword by Michael Cohen
Posted in English, USA.Tagged Trump.
Previous Post Укрзалізниця: Лучшая украинская фотокнига года. Пока что.
Next Post I'll cut you up piece by piece until I reach your head': How Harry and Meghan snapped up $14.7m dream home from Russian tycoon whose ex-wife claims he threatened to kill her – but he says it's a lie and she defrauded HIM


text:
Peter Singer was born in Melbourne, Australia, in 1946, and educated at the University of Melbourne and the University of Oxford. He has taught at the University of Oxford, New York University, University of Colorado at Boulder, the University of California at Irvine, and the La Trobe University. He was the founding President of Animal Liberation (Victoria) and is now the President of the Australian and New Zealand Federation of Animal Societies, a peak body for animal welfare and animal rights organisations in Australia and New Zealand. He is the co-founder and President of The Great Ape Project, an international effort to obtain basic rights for chimpanzees, gorillas and orangutans.
In 1994 Peter Singer was a candidate for the Australian Greens at a by-election for the House of Representatives, and gained 29% of the vote, an Australian record for the Greens.
Peter Singer first became well known internationally after the publication of Animal Liberation. His other books include Democracy and Disobedience; Practical Ethics; The Expanding Circle; Marx; Hegel; Animal Factories (with Jim Mason); The Reproduction Revolution (with Deane Wells); Should the Baby Live? (with Helga Kushe); How are We to Live?; and Rethinking Life and Death.
Books by Peter Singer
Be the first to find out about Peter Singer.


Extending to circa 2200 sqft this superb detached bungalow occupies a choice mature corner site with access to Mountsandel Forest from the rear garden. Boasting five bedroom, one and a half reception accommodation together with double garage, oil fired central heating and uPVC double glazed windows and doors.
Offering a contemporary modern interior finish to the Bathroom and Shower Room, a much sought-after open plan Kitchen, Dining & Family Area with French doors leading to paved patio and enclosed rear garden, this fantastic home offers adaptable family accommodation sure to meet the needs of the modern day family. Early viewing comes highly recommended.
with triple aspect and corner window, hole in the wall style fireplace with wood burning stove, tiled slate hearth, TV point, smoke alarm.
with cream country cottage style eye and low level units, polished granite worktops, integrated double larder units, integrated dishwasher and low level fridge, housing and space for range cooker, extractor fan, centre island with polished granite worktops, Belfast sink, concealed under unit lighting, pop up concealed sockets, recessed lighting, TV point, solid wooden flooring, French doors to rear garden and patio area.
with low level units, stainless steel sink unit, plumbed for washing machine, space for tumble dryer, full length shelved storage cupboard, tiled floor.
with contemporary suite comprising; low flush WC, wall hung sink and vanity unit, backlit mirror, panel bath, fully tiled walk in shower cubicle with thermostatic shower fitting, fully tiled walls, tiled floor, recessed lighting, extractor fan.
with contemporary suite comprising; fully tiled walk in double shower cubicle with thermostatic fitting including overhead drench fitting, low flush WC, wall hung wash hand basin and vanity unit, fully tiled walls, tiled floors, backlit mirror, heated towel rail, recessed lights, extractor fan.
with twin roller doors, (one electric, one manual), uPVC pedestrian door, light and power.
Leaving the town along the Mountsandel Road, after the first mini roundabout, take the turning on your right into Ratheane Avenue. Proceed to the T junction turning right. Number 46 will be on your left.
I am interested in 46 Ratheane Avenue, Mountsandel, Coleraine. Please contact me about this property.