text:
package org.keycloak.testsuite.arquillian;

import org.apache.commons.io.filefilter.WildcardFileFilter;
import org.apache.commons.lang.StringUtils;
import org.jboss.arquillian.container.spi.ContainerRegistry;
import org.jboss.arquillian.container.spi.client.container.LifecycleException;
import org.jboss.arquillian.container.spi.client.container.DeploymentException;
import org.jboss.arquillian.container.spi.event.StartContainer;
import org.jboss.arquillian.container.spi.event.StartSuiteContainers;
import org.jboss.arquillian.container.spi.event.StopContainer;
import org.jboss.arquillian.container.spi.event.container.AfterStart;
import org.jboss.arquillian.container.spi.event.container.BeforeStop;
import org.jboss.arquillian.container.test.api.ContainerController;
import org.jboss.arquillian.core.api.Event;
import org.jboss.arquillian.core.api.Instance;
import org.jboss.arquillian.core.api.InstanceProducer;
import org.jboss.arquillian.core.api.annotation.ApplicationScoped;
import org.jboss.arquillian.core.api.annotation.Inject;
import org.jboss.arquillian.core.api.annotation.Observes;
import org.jboss.arquillian.test.spi.annotation.ClassScoped;
import org.jboss.arquillian.test.spi.annotation.SuiteScoped;
import org.jboss.arquillian.test.spi.event.suite.AfterClass;
import org.jboss.arquillian.test.spi.event.suite.AfterSuite;
import org.jboss.arquillian.test.spi.event.suite.BeforeClass;
import org.jboss.arquillian.test.spi.event.suite.BeforeSuite;
import org.jboss.logging.Logger;
import org.jboss.shrinkwrap.api.ShrinkWrap;
import org.keycloak.admin.client.Keycloak;
import org.keycloak.common.util.StringPropertyReplacer;
import org.keycloak.representations.idm.RealmRepresentation;
import org.keycloak.services.error.KeycloakErrorHandler;
import org.keycloak.testsuite.arquillian.annotation.SetDefaultProvider;
import org.keycloak.testsuite.arquillian.annotation.UncaughtServerErrorExpected;
import org.keycloak.testsuite.arquillian.annotation.EnableVault;
import org.keycloak.testsuite.client.KeycloakTestingClient;
import org.keycloak.testsuite.util.LogChecker;
import org.keycloak.testsuite.util.OAuthClient;
import org.keycloak.testsuite.util.SpiProvidersSwitchingUtils;
import org.keycloak.testsuite.util.SqlUtils;
import org.keycloak.testsuite.util.SystemInfoHelper;
import org.keycloak.testsuite.util.VaultUtils;
import org.keycloak.testsuite.util.ServerURLs;
import org.keycloak.testsuite.util.TextFileChecker;
import org.wildfly.extras.creaper.core.ManagementClient;
import org.wildfly.extras.creaper.core.online.OnlineManagementClient;
import org.wildfly.extras.creaper.core.online.OnlineOptions;
import org.wildfly.extras.creaper.core.online.operations.Address;
import org.wildfly.extras.creaper.core.online.operations.Operations;
import org.wildfly.extras.creaper.core.online.operations.admin.Administration;

import java.io.File;
import java.io.FileFilter;
import java.io.IOException;
import java.net.MalformedURLException;
import java.net.URL;
import java.security.Provider;
import java.security.Security;
import java.util.List;
import java.util.Objects;
import java.util.Optional;
import java.util.Set;

import java.util.regex.Matcher;
import java.util.regex.Pattern;
import java.util.stream.Collectors;
import java.util.stream.Stream;
import javax.ws.rs.NotFoundException;
import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory;
import javax.xml.parsers.ParserConfigurationException;
import org.jboss.arquillian.test.spi.event.suite.After;
import org.jboss.arquillian.test.spi.event.suite.Before;
import org.jboss.shrinkwrap.api.importer.ZipImporter;
import org.jboss.shrinkwrap.api.spec.JavaArchive;
import org.jboss.shrinkwrap.resolver.api.maven.Maven;
import org.junit.Assert;
import org.w3c.dom.Document;
import org.w3c.dom.NodeList;
import org.xml.sax.SAXException;

import static org.keycloak.testsuite.arquillian.ServerTestEnricherUtil.addHttpsListener;
import static org.keycloak.testsuite.arquillian.ServerTestEnricherUtil.reloadOrRestartTimeoutClient;
import static org.keycloak.testsuite.arquillian.ServerTestEnricherUtil.removeHttpsListener;
import static org.keycloak.testsuite.util.ServerURLs.getAuthServerContextRoot;
import static org.keycloak.testsuite.util.ServerURLs.removeDefaultPorts;

/**
 *
 * @author tkyjovsk
 * @author vramik
 */
public class AuthServerTestEnricher {

    protected static final Logger log = Logger.getLogger(AuthServerTestEnricher.class);

    @Inject
    private Instance<ContainerController> containerConroller;
    @Inject
    private Instance<ContainerRegistry> containerRegistry;

    @Inject
    private Event<StartContainer> startContainerEvent;
    @Inject
    private Event<StopContainer> stopContainerEvent;

    private JavaArchive testsuiteProvidersArchive;
    private String currentContainerName;

    public static final String AUTH_SERVER_CONTAINER_DEFAULT = "auth-server-undertow";
    public static final String AUTH_SERVER_CONTAINER_PROPERTY = "auth.server.container";
    public static final String AUTH_SERVER_CONTAINER = System.getProperty(AUTH_SERVER_CONTAINER_PROPERTY, AUTH_SERVER_CONTAINER_DEFAULT);

    public static final String AUTH_SERVER_BACKEND_DEFAULT = AUTH_SERVER_CONTAINER + "-backend";
    public static final String AUTH_SERVER_BACKEND_PROPERTY = "auth.server.backend";
    public static final String AUTH_SERVER_BACKEND = System.getProperty(AUTH_SERVER_BACKEND_PROPERTY, AUTH_SERVER_BACKEND_DEFAULT);

    public static final String AUTH_SERVER_LEGACY = "auth-server-legacy";

    public static final String AUTH_SERVER_BALANCER_DEFAULT = "auth-server-balancer";
    public static final String AUTH_SERVER_BALANCER_PROPERTY = "auth.server.balancer";
    public static final String AUTH_SERVER_BALANCER = System.getProperty(AUTH_SERVER_BALANCER_PROPERTY, AUTH_SERVER_BALANCER_DEFAULT);

    public static final String AUTH_SERVER_CLUSTER_PROPERTY = "auth.server.cluster";
    public static final boolean AUTH_SERVER_CLUSTER = Boolean.parseBoolean(System.getProperty(AUTH_SERVER_CLUSTER_PROPERTY, "false"));
    public static final String AUTH_SERVER_CROSS_DC_PROPERTY = "auth.server.crossdc";
    public static final boolean AUTH_SERVER_CROSS_DC = Boolean.parseBoolean(System.getProperty(AUTH_SERVER_CROSS_DC_PROPERTY, "false"));

    public static final String HOT_ROD_STORE_ENABLED_PROPERTY = "hotrod.store.enabled";
    public static final boolean HOT_ROD_STORE_ENABLED = Boolean.parseBoolean(System.getProperty(HOT_ROD_STORE_ENABLED_PROPERTY, "false"));

    public static final String AUTH_SERVER_HOME_PROPERTY = "auth.server.home";

    public static final String CACHE_SERVER_LIFECYCLE_SKIP_PROPERTY = "cache.server.lifecycle.skip";
    public static final boolean CACHE_SERVER_LIFECYCLE_SKIP = Boolean.parseBoolean(System.getProperty(CACHE_SERVER_LIFECYCLE_SKIP_PROPERTY, "false"));

    private static final String MIGRATION_MODE_PROPERTY = "migration.mode";
    private static final String MIGRATION_MODE_AUTO = "auto";
    private static final String MIGRATION_MODE_MANUAL = "manual";
    public static final Boolean START_MIGRATION_CONTAINER = MIGRATION_MODE_AUTO.equals(System.getProperty(MIGRATION_MODE_PROPERTY)) ||
            MIGRATION_MODE_MANUAL.equals(System.getProperty(MIGRATION_MODE_PROPERTY));

    @Inject
    @SuiteScoped
    private InstanceProducer<SuiteContext> suiteContextProducer;
    private SuiteContext suiteContext;

    @Inject
    @ApplicationScoped // needed in AdapterTestExecutionDecider
    private InstanceProducer<TestContext> testContextProducer;

    @Inject
    @ClassScoped
    private InstanceProducer<OAuthClient> oAuthClientProducer;

    public static boolean isAuthServerRemote() {
        return AUTH_SERVER_CONTAINER.equals("auth-server-remote");
    }

    public static boolean isAuthServerQuarkus() {
        return AUTH_SERVER_CONTAINER.equals("auth-server-quarkus");
    }

    public static String getHttpAuthServerContextRoot() {
        String host = System.getProperty("auth.server.host", "localhost");
        int httpPort = Integer.parseInt(System.getProperty("auth.server.http.port")); // property must be set

        return removeDefaultPorts(String.format("%s://%s:%s", "http", host, httpPort));
    }

    public static String getHttpsAuthServerContextRoot() {
        String host = System.getProperty("auth.server.host", "localhost");
        int httpPort = Integer.parseInt(System.getProperty("auth.server.https.port")); // property must be set

        return removeDefaultPorts(String.format("%s://%s:%s", "https", host, httpPort));
    }

    public static String getAuthServerBrowserContextRoot() throws MalformedURLException {
        return getAuthServerBrowserContextRoot(new URL(getAuthServerContextRoot()));
    }

    public static String getAuthServerBrowserContextRoot(URL contextRoot) {
        String browserHost = System.getProperty("auth.server.browserHost");
        if (StringUtils.isEmpty(browserHost)) {
            browserHost = contextRoot.getHost();
        }
        return String.format("%s://%s%s", contextRoot.getProtocol(), browserHost,
                contextRoot.getPort() == -1 || contextRoot.getPort() == contextRoot.getDefaultPort()
                        ? ""
                        : ":" + contextRoot.getPort());
    }

    public static OnlineManagementClient getManagementClient() {
        try {
            return ManagementClient.online(OnlineOptions
                    .standalone()
                    .hostAndPort(System.getProperty("auth.server.management.host", "localhost"), Integer.parseInt(System.getProperty("auth.server.management.port", "10090")))
                    .auth("admin", "admin")
                    .build()
            );
        } catch (IOException e) {
            throw new RuntimeException(e);
        }
    }

    public void distinguishContainersInConsoleOutput(@Observes(precedence = 5) StartContainer event) {
        log.info("************************" + event.getContainer().getName()
                + "*****************************************************************************");
        currentContainerName = event.getContainer().getName();
    }

    public void initializeSuiteContext(@Observes(precedence = 2) BeforeSuite event) {
        Set<ContainerInfo> containers = containerRegistry.get().getContainers().stream()
          .map(ContainerInfo::new)
          .collect(Collectors.toSet());

        suiteContext = new SuiteContext(containers);

        if (AUTH_SERVER_CROSS_DC) {
            // if cross-dc mode enabled, load-balancer is the frontend of datacenter cluster
            containers.stream()
                .filter(c -> c.getQualifier().startsWith(AUTH_SERVER_BALANCER + "-cross-dc"))
                .forEach(c -> {
                    String portOffsetString = c.getArquillianContainer().getContainerConfiguration().getContainerProperties().getOrDefault("bindHttpPortOffset", "0");
                    String dcString = c.getArquillianContainer().getContainerConfiguration().getContainerProperties().getOrDefault("dataCenter", "0");
                    updateWithAuthServerInfo(c, Integer.valueOf(portOffsetString));
                    suiteContext.addAuthServerInfo(Integer.valueOf(dcString), c);
                });

            if (suiteContext.getDcAuthServerInfo().isEmpty()) {
                throw new IllegalStateException("Not found frontend container (load balancer): " + AUTH_SERVER_BALANCER);
            }
            if (suiteContext.getDcAuthServerInfo().stream().anyMatch(Objects::isNull)) {
                throw new IllegalStateException("Frontend container (load balancer) misconfiguration");
            }

            containers.stream()
                    .filter(c -> c.getQualifier().startsWith("auth-server-" + System.getProperty("node.name") + "-"))
                    .sorted((a, b) -> a.getQualifier().compareTo(b.getQualifier()))
                    .forEach(c -> {
                        String portOffsetString = c.getArquillianContainer().getContainerConfiguration().getContainerProperties().getOrDefault("bindHttpPortOffset", "0");
                        updateWithAuthServerInfo(c, Integer.valueOf(portOffsetString));

                        String dcString = c.getArquillianContainer().getContainerConfiguration().getContainerProperties().getOrDefault("dataCenter", "0");
                        suiteContext.addAuthServerBackendsInfo(Integer.valueOf(dcString), c);
                    });

            containers.stream()
                    .filter(c -> c.getQualifier().startsWith("cache-server-"))
                    .sorted((a, b) -> a.getQualifier().compareTo(b.getQualifier()))
                    .forEach(containerInfo -> {

                        log.info(String.format("cache container: %s", containerInfo.getQualifier()));

                        int prefixSize = containerInfo.getQualifier().lastIndexOf("-") + 1;
                        int dcIndex = Integer.parseInt(containerInfo.getQualifier().substring(prefixSize)) - 1;

                        suiteContext.addCacheServerInfo(dcIndex, containerInfo);
                    });

            if (suiteContext.getDcAuthServerInfo().isEmpty()) {
                throw new RuntimeException(String.format("No auth server container matching '%s' found in arquillian.xml.", AUTH_SERVER_BACKEND));
            }
            if (suiteContext.getDcAuthServerBackendsInfo().stream().anyMatch(Objects::isNull)) {
                throw new IllegalStateException("Frontend container (load balancer) misconfiguration");
            }
            if (suiteContext.getDcAuthServerBackendsInfo().stream().anyMatch(List::isEmpty)) {
                throw new RuntimeException(String.format("Some data center has no auth server container matching '%s' defined in arquillian.xml.", AUTH_SERVER_BACKEND));
            }
            if (suiteContext.getCacheServersInfo().isEmpty() && !CACHE_SERVER_LIFECYCLE_SKIP) {
                throw new IllegalStateException("Cache containers misconfiguration");
            }

            log.info("Using frontend containers: " + this.suiteContext.getDcAuthServerInfo().stream()
              .map(ContainerInfo::getQualifier)
              .collect(Collectors.joining(", ")));
        } else if (AUTH_SERVER_CLUSTER) {
            // if cluster mode enabled, load-balancer is the frontend
            ContainerInfo container = containers.stream()
              .filter(c -> c.getQualifier().startsWith(AUTH_SERVER_BALANCER))
              .findAny()
              .orElseThrow(() -> new IllegalStateException("Not found frontend container: " + AUTH_SERVER_BALANCER));
            updateWithAuthServerInfo(container);
            suiteContext.setAuthServerInfo(container);

            containers.stream()
                .filter(c -> c.getQualifier().startsWith(AUTH_SERVER_BACKEND))
                .sorted((a, b) -> a.getQualifier().compareTo(b.getQualifier())) // ordering is expected by the cluster tests
                .forEach(c -> {
                    int portOffset = Integer.parseInt(c.getQualifier().substring(AUTH_SERVER_BACKEND.length()));
                    updateWithAuthServerInfo(c, portOffset);
                    suiteContext.addAuthServerBackendsInfo(0, c);
                });

            if (Boolean.parseBoolean(System.getProperty("auth.server.jboss.legacy"))) {
                ContainerInfo legacy = containers.stream()
                    .filter(c -> c.getQualifier().startsWith(AUTH_SERVER_LEGACY))
                    .findAny()
                    .orElseThrow(() -> new IllegalStateException("Not found legacy container: " + AUTH_SERVER_LEGACY));
                updateWithAuthServerInfo(legacy, 500);
                suiteContext.setLegacyAuthServerInfo(legacy);
            }

            if (suiteContext.getAuthServerBackendsInfo().isEmpty()) {
                throw new RuntimeException(String.format("No auth server container matching '%s' found in arquillian.xml.", AUTH_SERVER_BACKEND));
            }

            log.info("Using frontend container: " + container.getQualifier());
        } else {
            // frontend-only
            ContainerInfo container = containers.stream()
              .filter(c -> c.getQualifier().startsWith(AUTH_SERVER_CONTAINER))
              .findAny()
              .orElseThrow(() -> new IllegalStateException("Not found frontend container: " + AUTH_SERVER_CONTAINER));
            updateWithAuthServerInfo(container);
            suiteContext.setAuthServerInfo(container);
        }

        if (START_MIGRATION_CONTAINER) {
            // init migratedAuthServerInfo
            for (ContainerInfo container : suiteContext.getContainers()) {
                // migrated auth server
                if (container.getQualifier().equals("auth-server-jboss-migration")) {
                    updateWithAuthServerInfo(container);
                    suiteContext.setMigratedAuthServerInfo(container);
                }
            }
            // validate setup
            if (suiteContext.getMigratedAuthServerInfo() == null) {
                throw new RuntimeException(String.format("Migration test was enabled but no auth server from which to migrate was activated. "
                        + "A container matching auth-server-jboss-migration needs to be enabled in arquillian.xml."));
            }
        }

        if (HOT_ROD_STORE_ENABLED) {
            HotRodStoreTestEnricher.initializeSuiteContext(suiteContext);

            for (ContainerInfo container : suiteContext.getContainers()) {
                // migrated auth server
                if (container.getQualifier().equals("hot-rod-store")) {
                    suiteContext.setHotRodStoreInfo(container);
                }
            }
        }

        suiteContextProducer.set(suiteContext);
        CrossDCTestEnricher.initializeSuiteContext(suiteContext);
        log.info("\n\n" + suiteContext);
        log.info("\n\n" + SystemInfoHelper.getSystemInfo());

        // Remove all map storages present in target directory
        // This is useful for example in intellij where target directory is not removed between test runs
        File dir = new File(System.getProperty("project.build.directory", "target"));
        FileFilter fileFilter = new WildcardFileFilter("map-*.json");
        File[] files = dir.listFiles(fileFilter);
        if (files != null) {
            for (File f : files) {
                f.delete();
            }
        }
    }

    public static void executeCli(String... commands) throws Exception {
        OnlineManagementClient client = AuthServerTestEnricher.getManagementClient();
        Administration administration = new Administration(client);

        for (String c : commands) {
            client.execute(c).assertSuccess();
        }

        administration.reload();

        client.close();
    }

    private ContainerInfo updateWithAuthServerInfo(ContainerInfo authServerInfo) {
        return updateWithAuthServerInfo(authServerInfo, 0);
    }

    private ContainerInfo updateWithAuthServerInfo(ContainerInfo authServerInfo, int clusterPortOffset) {
        try {
            URL contextRoot = new URL(getAuthServerContextRoot(clusterPortOffset));

            authServerInfo.setContextRoot(contextRoot);
            authServerInfo.setBrowserContextRoot(new URL(getAuthServerBrowserContextRoot(contextRoot)));
        } catch (MalformedURLException ex) {
            throw new IllegalArgumentException(ex);
        }
        return authServerInfo;
    }

    public void startMigratedContainer(@Observes(precedence = 3) StartSuiteContainers event) {
        if (suiteContext.isAuthServerMigrationEnabled()) {
            log.info("\n\n### Starting keycloak " + System.getProperty("migrated.auth.server.version", "- previous") + " ###\n\n");
            startContainerEvent.fire(new StartContainer(suiteContext.getMigratedAuthServerInfo().getArquillianContainer()));
            initializeTLS(suiteContext.getMigratedAuthServerInfo());
        }
    }

    public void deployProviders(@Observes(precedence = -1) AfterStart event) throws DeploymentException {
        if (isAuthServerRemote() && currentContainerName.contains("auth-server")) {
            this.testsuiteProvidersArchive = ShrinkWrap.create(ZipImporter.class, "testsuiteProviders.jar")
                    .importFrom(Maven.configureResolverViaPlugin()
                        .resolve("org.keycloak.testsuite:integration-arquillian-testsuite-providers")
                        .withoutTransitivity()
                        .asSingleFile()
                    ).as(JavaArchive.class)
                    .addAsManifestResource("jboss-deployment-structure.xml");

            event.getDeployableContainer().deploy(testsuiteProvidersArchive);
        }
    }

    public void unDeployProviders(@Observes(precedence = 20) BeforeStop event) throws DeploymentException {
        if (testsuiteProvidersArchive != null) {
            event.getDeployableContainer().undeploy(testsuiteProvidersArchive);
        }
    }

    public void runPreMigrationTask(@Observes(precedence = 2) StartSuiteContainers event) throws Exception {
        if (suiteContext.isAuthServerMigrationEnabled()) {
            log.info("\n\n### Run preMigration task on keycloak " + System.getProperty("migrated.auth.server.version", "- previous") + " ###\n\n");
            suiteContext.getMigrationContext().runPreMigrationTask();
        }
    }

    public void stopMigratedContainer(@Observes(precedence = 1) StartSuiteContainers event) {
        if (suiteContext.isAuthServerMigrationEnabled()) {
            log.info("## STOP old container: " + suiteContext.getMigratedAuthServerInfo().getQualifier());
            stopContainerEvent.fire(new StopContainer(suiteContext.getMigratedAuthServerInfo().getArquillianContainer()));
        }
    }

    public void startAuthContainer(@Observes(precedence = 0) StartSuiteContainers event) {
        //frontend-only (either load-balancer or auth-server)
        log.debug("Starting auth server before suite");

        try {
            startContainerEvent.fire(new StartContainer(suiteContext.getAuthServerInfo().getArquillianContainer()));
        } catch (Exception e) {
            // It is expected that server startup fails with migration-mode-manual
            if (e instanceof LifecycleException && handleManualMigration()) {
                log.info("Set log file checker to end of file.");
                try {
                    // this will mitigate possible issues in manual server update tests
                    // when the auth server started with not updated DB
                    // e.g. Caused by: org.keycloak.ServerStartupError: Database not up-to-date, please migrate database with
                    if (suiteContext.getServerLogChecker() == null) {
                        setServerLogChecker();
                    }
                    suiteContext.getServerLogChecker()
                        .updateLastCheckedPositionsOfAllFilesToEndOfFile();
                } catch (IOException ioe) {
                    log.warn("Server log checker failed to update position:", ioe);
                }
                log.info("Starting server again after manual DB migration was finished");
                startContainerEvent.fire(new StartContainer(suiteContext.getAuthServerInfo().getArquillianContainer()));
                return;
            }

            // Just re-throw the exception
            throw e;
        }
    }

    /**
     * Returns true if we are in manual DB migration test and if the previously created SQL script was successfully executed.
     * Returns false if we are not in manual DB migration test or SQL script couldn't be executed for any reason.
     * @return see method description
     */
    private boolean handleManualMigration() {
        // It is expected that server startup fails with migration-mode-manual
        if (!MIGRATION_MODE_MANUAL.equals(System.getProperty(MIGRATION_MODE_PROPERTY))) {
            return false;
        }

        String authServerHome = System.getProperty(AUTH_SERVER_HOME_PROPERTY);
        if (authServerHome == null) {
            log.warnf("Property '%s' was missing during manual mode migration test", AUTH_SERVER_HOME_PROPERTY);
            return false;
        }

        String sqlScriptPath = authServerHome + File.separator + "keycloak-database-update.sql";
        if (!new File(sqlScriptPath).exists()) {
            log.warnf("File '%s' didn't exists during manual mode migration test", sqlScriptPath);
            return false;
        }

        // Run manual migration with the ant task
        log.infof("Running SQL script created by liquibase during manual migration flow", sqlScriptPath);
        String prefix = "keycloak.connectionsJpa.";
        String jdbcDriver = System.getProperty(prefix + "driver");
        String dbUrl = StringPropertyReplacer.replaceProperties(System.getProperty(prefix + "url"));
        String dbUser = System.getProperty(prefix + "user");
        String dbPassword = System.getProperty(prefix + "password");

        SqlUtils.runSqlScript(sqlScriptPath, jdbcDriver, dbUrl, dbUser, dbPassword);

        return true;
    }

    private static final Pattern RECOGNIZED_ERRORS = Pattern.compile("ERROR \\[|SEVERE \\[|Exception ");
    private static final Pattern IGNORED = Pattern.compile("Jetty ALPN support not found|org.keycloak.events");

    private static final boolean isRecognizedErrorLog(String logText) {
        //There is expected string "Exception" in server log: Adding provider
        //singleton org.keycloak.services.resources.ModelExceptionMapper
        return RECOGNIZED_ERRORS.matcher(logText).find() && ! IGNORED.matcher(logText).find();
    }

    private static final void failOnRecognizedErrorInLog(Stream<String> logStream) {
        Optional<String> anyRecognizedError = logStream.filter(AuthServerTestEnricher::isRecognizedErrorLog).findAny();
        if (anyRecognizedError.isPresent()) {
            throw new RuntimeException(String.format("Server log file contains ERROR: '%s'", anyRecognizedError.get()));
        }
    }

    private void setServerLogChecker() throws IOException {
        String jbossHomePath = suiteContext.getAuthServerInfo().getProperties().get("jbossHome");
        suiteContext.setServerLogChecker(LogChecker.getJBossServerLogsChecker(jbossHomePath));
    }

    public void checkServerLogs(@Observes(precedence = -1) BeforeSuite event) throws IOException, InterruptedException {
        if (! suiteContext.getAuthServerInfo().isJBossBased()) {
            suiteContext.setServerLogChecker(new TextFileChecker());    // checks nothing
            return;
        }
        if (suiteContext.getServerLogChecker() == null) {
            setServerLogChecker();
        }
        boolean checkLog = Boolean.parseBoolean(System.getProperty("auth.server.log.check", "true"));
        if (checkLog) {
            suiteContext.getServerLogChecker()
                .checkFiles(true, AuthServerTestEnricher::failOnRecognizedErrorInLog);
        }
    }

    public void restartAuthServer() throws Exception {
        if (isAuthServerRemote()) {
            try (OnlineManagementClient client = getManagementClient()) {
                int timeoutInSec = Integer.getInteger(System.getProperty("auth.server.jboss.startup.timeout"), 300);
                Administration administration = new Administration(client, timeoutInSec);
                administration.reload();
            }
        } else {
            stopContainerEvent.fire(new StopContainer(suiteContext.getAuthServerInfo().getArquillianContainer()));
            startContainerEvent.fire(new StartContainer(suiteContext.getAuthServerInfo().getArquillianContainer()));
        }
    }

    public void initializeTestContext(@Observes(precedence = 2) BeforeClass event) throws Exception {
        TestContext testContext = new TestContext(suiteContext, event.getTestClass().getJavaClass());
        testContextProducer.set(testContext);

        if (!isAuthServerRemote()) {
            boolean wasUpdated = false;

            if (event.getTestClass().isAnnotationPresent(SetDefaultProvider.class)) {
                SetDefaultProvider defaultProvider = event.getTestClass().getAnnotation(SetDefaultProvider.class);

                if (defaultProvider.beforeEnableFeature()) {
                    SpiProvidersSwitchingUtils.addProviderDefaultValue(suiteContext, defaultProvider);
                    wasUpdated = true;
                }
            }

            if (event.getTestClass().isAnnotationPresent(EnableVault.class)) {
                VaultUtils.enableVault(suiteContext, event.getTestClass().getAnnotation(EnableVault.class).providerId());
                wasUpdated = true;
            }

            if (wasUpdated) {
                restartAuthServer();
                testContext.reconnectAdminClient();
            }
        }
    }

    public void initializeTLS(@Observes(precedence = 3) BeforeClass event) throws Exception {
        // TLS for Undertow is configured in KeycloakOnUndertow since it requires
        // SSLContext while initializing HTTPS handlers
        if (!suiteContext.isAuthServerCrossDc() && !suiteContext.isAuthServerCluster()) {
            initializeTLS(suiteContext.getAuthServerInfo());
        }
    }

    public static void initializeTLS(ContainerInfo containerInfo) {
        if (ServerURLs.AUTH_SERVER_SSL_REQUIRED && containerInfo.isJBossBased()) {
            log.infof("\n\n### Setting up TLS for %s ##\n\n", containerInfo);
            try (OnlineManagementClient client = getManagementClient(containerInfo)) {
                AuthServerTestEnricher.enableTLS(client);
            } catch (Exception e) {
                log.warn("Failed to set up TLS for container '" + containerInfo.getQualifier() + "'. This may lead to unexpected behavior unless the test" +
                        " sets it up manually", e);
            }

        }
    }

    /** KEYCLOAK-15692 Work-around the OpenJSSE TlsMasterSecretGenerator error:
     *
     *      https://github.com/openjsse/openjsse/issues/11
     *
     *  To prevent above TLS handshake error when initiating a TLS connection
     *  ensure:
     *  * Either both server and client endpoints of the future TLS connection
     *    simultaneously utilize a JSSE security provider using the OpenJSSE
     *    extension,
     *
     *  * Or both server and client endpoints simultaneously use a JSSE
     *    security provider, which doesn't depend on the OpenJSSE extension.
     *
     *  Do this by performing the following:
     *  * On platforms where implementation of the SunJSSE provider depends on
     *  OpenJSSE extension ensure only SunJSSE provider is used to define the
     *  SSL context of the Elytron client used for outbound SSL connections.
     *
     *  * On other platforms, use any suitable JSSE provider by querying all
     *  the platform providers for respective property.
     *
     */
    public static void setJsseSecurityProviderForOutboundSslConnectionsOfElytronClient(@Observes(precedence = 100) StartSuiteContainers event) {
        log.info(
            "Determining the JSSE security provider to use for outbound " +
            "SSL/TLS connections of the Elytron client"
        );

        // Use path to wildfly-config.xml directly if specified
        String wildflyConfigXmlPath =
            System.getProperty("wildfly-client.config.path");

        // Otherwise scan the classpath to determine its location
        if (wildflyConfigXmlPath == null) {
            log.debug("Scanning classpath to locate wildfly-config.xml");
            final String javaClassPath = System.getProperty("java.class.path");
            for (String dir : javaClassPath.split(File.pathSeparator)) {
                if (!dir.isEmpty()) {
                    String candidatePath = dir + File.separator +
                        "wildfly-config.xml";
                    if (new File(candidatePath).exists()) {
                        wildflyConfigXmlPath = candidatePath;
                        log.debugf(
                            "Found wildfly-config.xml at '%s' location",
                            wildflyConfigXmlPath
                        );
                        break;
                    }
                }
            }
        }

        final File wildflyConfigXml = ( wildflyConfigXmlPath != null ) ?
            new File(wildflyConfigXmlPath)                             :
            null;

        // Throw an error if wildfly-config.xml path specified directly via the
        // 'wildfly-client.config.path' property doesn't represent a regular file
        // on the file system, or if it wasn't found by scanning the classpath
        if ( wildflyConfigXml == null || ! wildflyConfigXml.exists() ) {
            throw new RuntimeException(
                "Failed to locate the wildfly-config.xml to use for " +
                "the configuration of Elytron client"
            );
        } else {
            log.debugf(
                "Using wildfly-config.xml from '%s' location",
                wildflyConfigXmlPath
            );
        }

        /** Determine the name of the system property from wildfly-config.xml
         *  holding the name of the security provider which is used by Elytron
         *  client to define its SSL context for outbound SSL connections.
         */
        String jsseSecurityProviderSystemProperty = null;
        try {
            DocumentBuilder documentBuilder = DocumentBuilderFactory
                .newInstance().newDocumentBuilder();

            Document xmlDoc = documentBuilder.parse(wildflyConfigXml);
            NodeList nodeList = xmlDoc.getElementsByTagName("provider-name");
            // Sanity check
            if (nodeList.getLength() != 1) {
                throw new RuntimeException(
                    "Failed to locate the 'provider-name' element " +
                    "in wildfly-config.xml XML file"
                );
            }
            String providerNameElement = nodeList.item(0).getAttributes()
                .getNamedItem("name").getNodeValue();

            // Drop Wildfly's expressions notation from the attribute's value
            jsseSecurityProviderSystemProperty = providerNameElement
                .replaceAll("(\\$|\\{|\\}|(:.*$))", new String());

        } catch (IOException e) {
            throw new RuntimeException(String.format(
                "Error reading the '%s' file. Please make sure the provided " +
                "path is correct and retry",
                wildflyConfigXml.getAbsolutePath()
            ));
        } catch (ParserConfigurationException|SAXException e) {
            throw new RuntimeException(String.format(
                "Failed to parse the '%s' XML file",
                wildflyConfigXml.getAbsolutePath()
            ));
        }

        boolean determineJsseSecurityProviderName = false;
        if (jsseSecurityProviderSystemProperty != null) {
            // Does JSSE security provider system property already exist?
            if (
                System.getProperty(jsseSecurityProviderSystemProperty) == null
            ) {
                // If not, determine it
                determineJsseSecurityProviderName = true;
            }
        } else {
            throw new RuntimeException(
                "Failed to determine the name of system property " +
                "holding JSSE security provider's name for Elytron client"
            );
        }

        if (determineJsseSecurityProviderName) {

            /** Detect if OpenJSSE extension is present on the platform
             *
             *  Since internal 'com.sun.net.ssl.*' classes of the SunJSSE
             *  provider have identical names regardless if the OpenJSSE
             *  extension is used or not:
             *
             *    https://github.com/openjsse/openjsse/blob/master/pom.xml#L125
             *
             *  detect the presence of the OpenJSSE extension by checking the
             *  presence of the 'openjsse.jar' file within the JRE extensions
             *  directory.
             *
             */
            final String jreExtensionsDir = System.getProperty("java.home") +
                File.separator + "lib" + File.separator + "ext" +
                File.separator + "openjsse.jar";

            boolean openJsseExtensionPresent = new File(
                jreExtensionsDir).exists();

            Provider platformJsseProvider = Security
                .getProviders("SSLContext.TLSv1.2")[0];

            if (platformJsseProvider != null) {
                // If OpenJSSE extension is present
                if (openJsseExtensionPresent) {
                    // Sanity check - confirm SunJSSE provider is present on
                    // the platform (if OpenJSSE extension is present, it
                    // shouldn't ever happen SunJSSE won't be, but double-check
                    // for any case)
                    Provider sunJsseProvider = Stream.of(
                            Security.getProviders()
                        ).filter(p -> p.getName().equals("SunJSSE"))
                        .collect(Collectors.toList())
                        .get(0);

                    // Use it or throw an error if absent
                    if (sunJsseProvider != null) {
                        platformJsseProvider = sunJsseProvider;
                    } else {
                        throw new RuntimeException(
                            "The SunJSSE provider is not present " +
                            "on the platform"
                        );
                    }
                }
                // Propagate the final provider name to system property used by
                // wildfly-config.xml to configure the JSSE provider name
                System.setProperty(
                    jsseSecurityProviderSystemProperty,
                    platformJsseProvider.getName()
                );
            } else {
                throw new RuntimeException(
                    "Cannot identify a security provider for Elytron client " +
                    "offering the TLSv1.2 capability"
                );
            }
            log.infof(
                "Using the '%s' JSSE provider", platformJsseProvider.getName()
            );
        }
    }

    private static OnlineManagementClient getManagementClient(ContainerInfo containerInfo) {
        try {
            return ManagementClient.online(OnlineOptions
                    .standalone()
                    .hostAndPort("localhost", Integer.parseInt(containerInfo.getProperties().get("managementPort")))
                    .build()
            );
        } catch (IOException e) {
            throw new RuntimeException(e);
        }
    }

    private static void enableTLS(OnlineManagementClient client) throws Exception {
        Administration administration = new Administration(client);
        Operations operations = new Operations(client);

        if(!operations.exists(Address.subsystem("elytron").and("server-ssl-context", "httpsSSC"))) {
            client.execute("/subsystem=elytron/key-store=httpsKS:add(relative-to=jboss.server.config.dir,path=keycloak.jks,credential-reference={clear-text=secret},type=JKS)");
            client.execute("/subsystem=elytron/key-manager=httpsKM:add(key-store=httpsKS,credential-reference={clear-text=secret})");
            client.execute("/subsystem=elytron/key-store=twoWayTS:add(relative-to=jboss.server.config.dir,path=keycloak.truststore,credential-reference={clear-text=secret},type=JKS)");
            client.execute("/subsystem=elytron/trust-manager=twoWayTM:add(key-store=twoWayTS)");
            client.execute("/subsystem=elytron/server-ssl-context=httpsSSC:add(key-manager=httpsKM,protocols=[\"TLSv1.2\"],trust-manager=twoWayTM,want-client-auth=true)");

            removeHttpsListener(client, administration);
            addHttpsListener(client);
            reloadOrRestartTimeoutClient(administration);
        } else {
            log.info("## The Auth Server has already configured TLS. Skipping ##");
        }
    }

    protected boolean isAuthServerJBossBased() {
        return containerRegistry.get().getContainers().stream()
              .map(ContainerInfo::new)
              .anyMatch(ContainerInfo::isJBossBased);
    }

    public void initializeOAuthClient(@Observes(precedence = 4) BeforeClass event) {
        // TODO workaround. Check if can be removed
        OAuthClient.updateURLs(suiteContext.getAuthServerInfo().getContextRoot().toString());
        OAuthClient oAuthClient = new OAuthClient();
        oAuthClientProducer.set(oAuthClient);
    }

    public void beforeTest(@Observes(precedence = 100) Before event) throws IOException {
        suiteContext.getServerLogChecker().updateLastCheckedPositionsOfAllFilesToEndOfFile();
    }

    public void startTestClassProvider(@Observes(precedence = 1) BeforeSuite beforeSuite) {
        TestClassProvider testClassProvider = new TestClassProvider();
        testClassProvider.start();
        suiteContext.setTestClassProvider(testClassProvider);
    }

    public void stopTestClassProvider(@Observes(precedence = -1) AfterSuite afterSuite) {
        suiteContext.getTestClassProvider().stop();
    }

    private static final Pattern UNEXPECTED_UNCAUGHT_ERROR = Pattern.compile(
      KeycloakErrorHandler.class.getSimpleName()
        + ".*"
        + Pattern.quote(KeycloakErrorHandler.UNCAUGHT_SERVER_ERROR_TEXT)
        + "[\\s:]*(.*)$"
    );

    private void checkForNoUnexpectedUncaughtError(Stream<String> logStream) {
        Optional<Matcher> anyUncaughtError = logStream.map(UNEXPECTED_UNCAUGHT_ERROR::matcher).filter(Matcher::find).findAny();
        if (anyUncaughtError.isPresent()) {
            Matcher m = anyUncaughtError.get();
            Assert.fail("Uncaught server error detected: " + m.group(1));
        }
    }

    public void afterTest(@Observes(precedence = -1) After event) throws IOException {
        if (event.getTestMethod().getAnnotation(UncaughtServerErrorExpected.class) == null) {
            suiteContext.getServerLogChecker().checkFiles(false, this::checkForNoUnexpectedUncaughtError);
        }
    }

    public void afterClass(@Observes(precedence = 1) AfterClass event) throws Exception {
        //check if a test accidentally left the auth-server not running
        ContainerController controller = containerConroller.get();
        if (!controller.isStarted(suiteContext.getAuthServerInfo().getQualifier())) {
            log.warn("Auth server wasn't running. Starting " + suiteContext.getAuthServerInfo().getQualifier());
            controller.start(suiteContext.getAuthServerInfo().getQualifier());
        }

        TestContext testContext = testContextProducer.get();

        Keycloak adminClient = testContext.getAdminClient();
        KeycloakTestingClient testingClient = testContext.getTestingClient();

        removeTestRealms(testContext, adminClient);

        if (!isAuthServerRemote()) {

            boolean wasUpdated = false;

            if (event.getTestClass().isAnnotationPresent(SetDefaultProvider.class)) {
                SpiProvidersSwitchingUtils.resetProvider(suiteContext, event.getTestClass().getAnnotation(SetDefaultProvider.class));
                wasUpdated = true;
            }

            if (event.getTestClass().isAnnotationPresent(EnableVault.class) && !isAuthServerQuarkus()) {
                VaultUtils.disableVault(suiteContext, event.getTestClass().getAnnotation(EnableVault.class).providerId());
                wasUpdated = true;
            }

            if (wasUpdated) {
                restartAuthServer();
                testContext.reconnectAdminClient();
            }
        }

        if (adminClient != null) {
            adminClient.close();
        }

        if (testingClient != null) {
            testingClient.close();
        }
    }

    public static void removeTestRealms(TestContext testContext, Keycloak adminClient) {
        List<RealmRepresentation> testRealmReps = testContext.getTestRealmReps();
        if (testRealmReps != null && !testRealmReps.isEmpty()) {
            log.info("removing test realms after test class");
            StringBuilder realms = new StringBuilder();
            for (RealmRepresentation testRealm : testRealmReps) {
                try {
                    adminClient.realms().realm(testRealm.getRealm()).remove();
                    realms.append(testRealm.getRealm()).append(", ");
                } catch (NotFoundException e) {
                    // Ignore
                }
            }
            log.info("removed realms: " + realms);
        }
    }

}

redpajama_set_name: RedPajamaGithub


Ticket #69 removed the "desc" attribute from crates. This resulted in "name" being used for the mouse over text and "text" being used for the "examine" action text. NPC objects were not updated. Currently the mouse over text for NPCs defaults to "Generic Object".


text:
La  (danskefilm.dk) est une base de données en ligne diffusant des informations sur le cinéma et les acteurs danois.

Le nom de domaine a été acheté en . Le site s'est enrichi de données sur des séries télévisées, des films muets, des films d'animation et des revues. Depuis, il a également ajouté des sondages.

Liens externes

Base de données cinématographiques sur Internet
Fondation en 1999
Site web danois
Site web en danois
Site web sur le cinéma
Cinéma danois

redpajama_set_name: RedPajamaWikipedia


text:
4 Startups to Keep an Eye On in 2020
The entrepreneurial field is more crowded today than it's ever been. These companies exemplify those that have the potential to be disruptive.
David McCannJanuary 7, 2020
Today there are dozens of services, products, and industries that could be upended by an up-and-coming competitor at a moment's notice. That reality represents an opportunity for such a company, its early customers, and investors alike. But not everyone is taking full advantage.
I've been an angel investor for years. When I look for businesses to invest in, I seek companies that are doing something meaningfully different. The novelty of an idea, solid leadership, and a willingness to challenge how things are done all matter a great deal, regardless of the industry.
In 2020, young companies that I plan to keep an eye on include Packsize, Klipfolio, Lucerna Health, and Guideline. I am an investor in none of them, and indeed, all startups face immense challenges. So far, though, these four are doing impressive, impactful things.
In the era of Amazon, shipping has exploded; nearly 34 million packages are sent each day. Unfortunately, that has led to massive waste.
About one-third of the average garbage dump is made up of packaging material. Most boxes are far larger than the item being shipped and require additional padding, and delivery trucks are not the most fuel-efficient vehicles.
The entire shipping industry hasn't evolved much in the last 20 years. Enter PackSize. It creates packaging that fits products of every size, from bicycles to guitars, cutting down on waste and cost. And for companies that handle all their own packaging, PackSize even offers machines that can 3-D scan products and generate packaging on demand. That could help thousands of businesses across the country struggling to be sustainable and cost-efficient.
Klipfolio
Every modern business works with data, metrics, or financial information. Any platform that helps a growing data-focused company manage that information is a necessity.
For years, companies like Domo have been well-known in the market, offering custom dashboards and visualizations that consolidate data sources (Google Analytics, spreadsheets, financial/accounting systems, etc.) at a hefty cost.
The market should pay attention to one of Domo's competitors, Klipfolio. It offers functionally the same service, but at a dramatically reduced cost, making it accessible to growing start-ups. As companies increasingly rely on data, that access should lead to a more level playing field, more dynamic competition, and more innovation.
Lucerna Health
There are few things more personal than health. Unfortunately, over the last decade, most people's medical history and health data have been scattered across a number of incompatible digital systems.
These competing systems force some hospitals and doctors to use fax machines rather than digitally share records, wasting time that could be used to improve the quality of care and save lives.
Lucerna Health offers a solution for this problem: a platform that connects the various health data systems, making them all compatible. For the first time since health records went digital, doctors, insurance companies, and hospitals can access a complete picture of the patient's medical history. That means more effective, efficient care at a lower cost.
When I started my first company, I was more worried about how we were going to keep everything running for another year. I cared about my employees, but my focus was not on their retirement.
Most small business owners feel the same. In fact, the General Accounting Office found that only 14% of small employers sponsor retirement plans. Speaking from experience, setting up and managing retirement plans can be overwhelming. For smaller, newer companies, Guideline could be a godsend.
The company has modernized the 401(k), one of the oldest investment vehicles out there. Nearly everything, from plan administration to compliance, to investment choices, is managed with software and automated for optimization.
On top of that, Guideline is one of the only 401(k) providers that doesn't charge fees on investments, allowing employees to save more in the long run. Their attention to small businesses' unique needs may pay off down the line.
In an incredibly crowded entrepreneurial field, where business ideas and venture capital are flowing at an unprecedented rate, the best thing a company can do is stand out.
Not every company ends up on "Shark Tank" or on the front page of The Wall Street Journal, but the above-described companies have the potential to change the status quo in their respective fields.
Brett Derricott, a longtime angel investor, founded and is CEO of Built for Teams, a human resources software platform.
angel investor, Brett Derricott, Built for Teams, Guideline, Klipfolio, Lucerna Health, PackSize
More in Innovation
DocGo Aims to Deliver Cost-Efficient Medical Care
Replacing COVID-19 revenue and managing working capital are high priorities for a company trying to deliver mobile health services.
By Vincent Ryan | December 21, 2022
A Small Business CFO's Practical Approach to New Technologies
CFOs can add discipline to the technology selection process and set the "tone at the top'" by demonstrating a willingness to upskill.
By Steve McNally | August 9, 2021
CFO Q&A: Power Surge
Charging network company Volta lays a foundation for the mass adoption of all-electric vehicles.
By Vincent Ryan | August 4, 2021

redpajama_set_name: RedPajamaCommonCrawl


text:
HPLC–MS–MS Analysis of Zebrafish Embryos
Scientists from the Helmholtz Centre for Environmental Research in Germany, have developed a high performance liquid chromatography tandem mass spectrometry (HPLC–MS–MS) method to determine the internal concentrations of 34 test compounds in zebrafish (Danio rerio) embryos.
Scientists from the Helmholtz Centre for Environmental Research in Germany, have developed a high performance liquid chromatography tandem mass spectrometry (HPLC–MS–MS) method to determine the internal concentrations of 34 test compounds in zebrafish (Danio rerio) embryos.1
Zebrafish embryos (ZFE) can be used in toxicity tests instead of adult fish to determine the safety level of compounds. It is important to quantify internal concentrations of a compound in ZFE to understand why it exerts an effect or not. Stephan Brox told The Column: "Since the zebrafish embryo has become a well-established model organism in the field of (eco)toxicology, it is important to gain more data on uptake processes and internal concentrations. So far, observed effects on test organisms are often correlated to an external concentration in the exposure medium. However, for a better understanding why a specific compound may or may not exhibit toxic effects, internal concentrations have to be considered too."
Fertilized eggs were exposed to polar chemicals, such as clofibric acid or metribuzin, and were subsequently extracted using methanol. Extracts were analyzed using HPLC–MS–MS and different internal concentration-time profiles were observed, according to Brox. When asked to comment on the challenges of developing the method, Brox told The Column that the small size of the ZFE and their fast development were challenging because the internal concentrations could be very low. He added: "Furthermore the developing organism may also lead to changing matrix effects during the electrospray ionization process at different life‑stages of the organism. During the method development we considered all these challenges and the presented method is suitable for the determination of internal concentrations at early life-stages of the organism."
1. S. Brox et al., Anal. Bioanal. Chem. 406, 4831–4840 (2014).
This story originally appeared in The Column. Click here to view that issue.


This material was prepared by MarketingPro, Inc., and does not necessarily represent the views of the presenting party, nor their affiliates. The information herein has been derived from sources believed to be accurate. Please note - investing involves risk, and past performance is no guarantee of future results. Investments will fluctuate and when redeemed may be worth more or less than when originally invested. This information should not be construed as investment, tax or legal advice and may not be relied on for the purpose of avoiding any Federal tax penalty. This is neither a solicitation nor recommendation to purchase or sell any investment or insurance product or service, and should not be relied upon as such. All market indices discussed are unmanaged and are not illustrative of any particular investment. Indices do not incur management fees, costs, or expenses. Investors cannot invest directly in indices. All economic and performance data is historical and not indicative of future results.


text:
//
// $
//

package jsky.app.ot.gemini.gems;

import edu.gemini.pot.sp.ISPObsComponent;
import edu.gemini.spModel.gemini.gems.Gems;
import edu.gemini.spModel.type.DisplayableSpType;
import jsky.app.ot.editor.OtItemEditor;

import javax.swing.*;
import java.awt.GridBagConstraints;
import java.awt.GridBagLayout;
import java.awt.Insets;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.util.HashMap;
import java.util.Map;

/**
 * User interface and editor for Gems.
 */
public final class GemsEditor extends OtItemEditor<ISPObsComponent, Gems> {

    private final JPanel pan;
    private final JCheckBox adcCheckbox;
    private final OptionsBox<Gems.DichroicBeamsplitter> bsBox;
    private final OptionsBox<Gems.AstrometricMode> amBox;

    public GemsEditor() {
        pan = new JPanel(new GridBagLayout());
        pan.setBorder(BorderFactory.createEmptyBorder(15, 15, 15, 15));

        final GridBagConstraints gbc = new GridBagConstraints();

        // Add the labels.
        gbc.gridx   = 0;
        gbc.anchor  = GridBagConstraints.NORTHEAST;
        gbc.insets  = new Insets(0, 0, 10, 10);
        gbc.gridy = 0; pan.add(new JLabel("Atmospheric Dispersion Corrector"), gbc);
        gbc.gridy = 1; pan.add(new JLabel("Dichroic Beamsplitter"), gbc);
        gbc.gridy = 2; pan.add(new JLabel("Astrometric Mode"), gbc);

        // Add the widgets.
        gbc.gridx   = 1;
        gbc.anchor  = GridBagConstraints.NORTHWEST;
        gbc.insets  = new Insets(0, 0, 10, 0);
        gbc.gridy = 0; pan.add(adcCheckbox = createAdc(), gbc);
        gbc.gridy = 1; pan.add((bsBox = createBeamsplitter()).getBox(), gbc);
        gbc.gridy = 2; pan.add((amBox = createAstrometricMode()).getBox(), gbc);

        // Push everything to the top left.
        gbc.fill    = GridBagConstraints.BOTH;
        gbc.weightx = 1.0;
        gbc.weighty = 1.0;
        gbc.gridx   = 2;
        gbc.gridy   = 3;
        pan.add(new JPanel(), gbc);
    }

    private JCheckBox createAdc() {
        final JCheckBox cb = new JCheckBox(Gems.Adc.ON.displayValue());
        cb.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                if (getDataObject() == null) return;
                getDataObject().setAdc(cb.isSelected() ? Gems.Adc.ON : Gems.Adc.OFF);
            }
        });
        return cb;
    }

    private interface ListenerFactory<T extends DisplayableSpType> {
        ActionListener create(T t);
    }

    private static class OptionsBox<T extends DisplayableSpType> {
        private final Map<T, JRadioButton> btnMap = new HashMap<T, JRadioButton>();
        private final Box box = new Box(BoxLayout.PAGE_AXIS);
        private final ButtonGroup grp = new ButtonGroup();

        public Box getBox() {
            return box;
        }

        public void create(T t, ListenerFactory<T> fact) {
            final JRadioButton btn = new JRadioButton(t.displayValue());
            btn.addActionListener(fact.create(t));
            grp.add(btn);
            box.add(btn);
            btnMap.put(t, btn);
        }

        public JRadioButton get(T t) {
            return btnMap.get(t);
        }
    }

    private <T extends DisplayableSpType> OptionsBox<T> createOptionsBox(Class<T> tClass, ListenerFactory<T> fact) {
        final OptionsBox<T> box = new OptionsBox<T>();
        final T[] tArray = tClass.getEnumConstants();
        for (final T t : tArray) {
            box.create(t, fact);
        }
        return box;
    }

    private OptionsBox<Gems.DichroicBeamsplitter> createBeamsplitter() {
        final Class<Gems.DichroicBeamsplitter> c = Gems.DichroicBeamsplitter.class;
        return createOptionsBox(c, new ListenerFactory<Gems.DichroicBeamsplitter>() {
            public ActionListener create(final Gems.DichroicBeamsplitter bs) {
                return new ActionListener() {
                    public void actionPerformed(ActionEvent evt) {
                        if (getDataObject() == null) return;
                        getDataObject().setDichroicBeamsplitter(bs);
                    }
                };
            }
        });
    }

    private OptionsBox<Gems.AstrometricMode> createAstrometricMode() {
        final Class<Gems.AstrometricMode> c = Gems.AstrometricMode.class;
        return createOptionsBox(c, new ListenerFactory<Gems.AstrometricMode>() {
            public ActionListener create(final Gems.AstrometricMode am) {
                return new ActionListener() {
                    public void actionPerformed(ActionEvent evt) {
                        if (getDataObject() == null) return;
                        getDataObject().setAstrometricMode(am);
                    }
                };
            }
        });
    }

    public JPanel getWindow() {
        return pan;
    }

    public void init() {
        adcCheckbox.setSelected(getDataObject().getAdc() == Gems.Adc.ON);
        bsBox.get(getDataObject().getDichroicBeamsplitter()).setSelected(true);
        amBox.get(getDataObject().getAstrometricMode()).setSelected(true);
    }
}


Hindsight, they say, is always 20-20.
It's easy to comment on something after the fact, when the dust settles and we can examine all the facts.
But the nitty gritty takes place in the heat of the moment, during the battle cries, bombings, political rallies, government curfews and church sermons.
We are human beings, with all our imperfections. We plan, consult, gather input and together, create laws, guidelines, policies, codes, strategies and rule books. We make decisions, relying on the information available, facts, opinion and a dash of emotion and instinct. Did I mention we were imperfect?
The best laid plans are often a mess. But we don't realize this until they're implemented and we can see, for ourselves, the actual practical ramifications.
We are reactionary by nature, we humans who are propelled as much by logic as we are by our appetites, desires and sinful ways. We are, too often, smug in our confidence that we know what we're doing and that we are doing the right thing.
The trend, in the last few years, has been for governments, politicians and groups to apologize for wrongdoings in the past. How much weight does an apology carry when it's given by a generation far removed from the actual events? We all know what we did was wrong, why are we expending such effort to be remorseful?
Action speaks louder than words, and to heal old wounds, we need to move forward with innovative, responsive, compassionate, legal and sensible methods.
We also can't judge our past by our current standards.
We've been battling racism in Canada for more than 150 years, since we created the Underground Railroad. It still exists. Canada legalized gay marriages yet we're still trying to come to grips with attitudes towards the LGBTQ community.
There was a time when women were not allowed to vote, and the term "housewife" was commonplace and recognized as a legitimate role. Did anyone apologize to the suffragettes?
Saudi Arabia issued its first driver's licences to women in May, as they prepare to lift the world's only ban on women driving. This is 2018! Don't expect an apology from the Saudi government on this, ever.
The days of the Cleavers are long gone, but again, that was the era.
Our entire human history is filled to the brim with misconduct, murder, mayhem, abuse of civil rights, genocide, racism, sexism and a bunch of other isms.
We humans have only been living together in organized settlements and colonies for the past 10,000 years. From crawling out of caves, walking upright and establishing rules, it's taken us thousands of years to evolve.
We spent millennia killing animals for food and then killing each other for territory and power.
You would think we would have learned from the fall of the Roman Empire or the demise of Ghengis Khan that tyranny always ends badly.
The atrocities of the Second World War are well documented. To this day, sanctions remain against Germany in terms of military might and possession of nuclear weapons.
Today, both Germany and Japan are strong allies and trading partners of the western nations. The Germans are still apologizing, even though very few remain who were actually there.
To this day, the U.S. has not apologized for dropping atomic bombs on Hiroshima and Nagasaki, killing an estimated 214,000 people (largely civilians) and leaving tens of thousands more with chronic illnesses and cancer.
The U.S. will also never apologize for the use of the toxic Agent Orange in Vietnam, or the invasion of Iraq in 2003, or countless CIA-backed coups.
The Vatican (under Pope John Paul II) did apologize for or the actions of the Crusader attack on Constantinople in 1204; burnings at the stake following the Protestant Reformation, and even how Galileo was treated.
We can all stand up in our seats and shout out a collective "we're sorry" for what happened in our past.
We study all aspects of human history to not only learn about our humble beginnings, but to understand how and why things happened. We can't change the past, but we can learn from it.
That's the lesson here. Apologizing for our entire existence on this planet is pointless.
Our fellow humans have gone through a particularly disturbing year of apologies for sexual indiscretions – from politicians and Hollywood legends, all the way down the list. Some incidents date back decades.
So now we're at the point in our ongoing saga where we've risen above all those petty biases, discriminations and conflicts, right? We're almost perfect, right?
A new marijuana law is coming into effect in this country. How will this milestone law change our society? How will the history books recount this weird chapter in our development?
I can hardly wait to recount these tales to my grandchildren!
The point I'm trying to make is by evolving and moving forward, we will one day eliminate the need to apologize for our behaviour.
Wouldn't it be nice to have a spotless record to brag about? Let's make it happen!


Mack parts and accessories are available from bugshields to sunvisors, light bars, cab & sleeper skirts plus more.
For 2018+ Mack Anthem models. Sold as a 4-piece set.
For 2018+ Mack Anthem models. Sold in pairs.
For Granite CT/GU models – with square headlights.
Designed for 2018+ Mack Anthem models. Extended. Designed to be used with fender guards 3281-MSS253. Drilling required.
Designed for 2018+ Mack Anthem models. Drilling required.


BIG US TRIP 2018 Day 2 sight seeing !!
After heading from Chris Grubl we made a detour to visit Mount Rushmore.
It was felt we couldn't pass without visiting it certainly is a fantastic sight, even visiting a 2nd time it still has that WOW factor.


text:
Gloria Estefan to guest star on 'One Day at a Time'
Gloria Estefan, who has said she is a fan of "One Day at a Time," will guest star in an upcoming episode of the Netflix sitcom. File Photo by Gary I Rothstein/UPI | License Photo
Actors Justina Machado (L) and Rita Moreno arrive for the 69th annual Primetime Emmy Awards in Los Angeles on September 17, 2017. File Photo by Christine Chew/UPI | License Photo
June 25 (UPI) -- Singer-songwriter Gloria Estefan announced on social media Monday she will guest star on the Netflix sitcom One Day at a Time.
"So excited to announce that I'll finally be guest starring on @odaatnetflix I'll be playing Mirtha, Lydia's baby sister and arch-nemesis. I'm coming for you, Alvarez family! #ODAAT," Estefan wrote on Twitter and Instagram.
The One Day at a Time Twitter feed featured a link to Estefan's message, along with the words, "Familia are you ready?"
The show was renewed in March for a third season. It follows a loving, functional family led by Justina Machado's Penelope Alvarez, a U.S. Army Nursing Corps veteran and single mom who is working in a doctor's office and raising her teenage children Elena and Alex -- played by Isabella Gomez and Marcel Ruiz -- in Los Angeles with the help of her Cuban-born mother Lydia, played by Rita Moreno.
One Day at a Time is the remake of a series developed by revolutionary writer-producer Norman Lear, which ran from 1975 to 1984. It starred Bonnie Franklin as a divorcee living in Indianapolis with her teenage daughters, played by Valerie Bertinelli and Mackenzie Phillips.
So excited to announce that I'll finally be guest starring on @odaatnetflix I'll be playing Mirtha, Lydia's baby sister and arch-nemesis. I'm coming for you, Alvarez family! #ODAAT
A post shared by Gloria Estefan (@gloriaestefan) on Jun 25, 2018 at 8:01am PDT
Toni Collette, Merritt Wever to star in Netflix's 'Unbelievable' Russell Crowe to play Roger Ailes in Showtime series Seth Rogen on 'Preacher' violence: Not for everyone Billy Bob Thornton calls 'Goliath' gig perfect for work-life balance Justina Machado: Latino story makes 'One Day' remake 'electric'
Rita Moreno
Beyonce, Donald Glover attend 'The Lion King' premiere


text:
Q: Unable to find GCC Code coverage libgcov.so for arm toolchain Steps to Reproduce the issue
#include<iostream>
int main(){
    std::cout <<  "Hello World" << std::endl;
}

*

*Write main.cpp

*Download Toolchain from this link

*Compile with below commands.

*

*. /opt/poky/1.6/environment-setup-armv7a-vfp-neon-poky-linux-gnueabi

*arm-poky-linux-gnueabi-g++ main.cpp -o main --coverage

*Will get an error like below.
Error

/opt/poky/1.6.1/sysroots/i686-pokysdk-linux/usr/libexec/arm-poky-linux-gnueabi/gcc/arm-poky-linux-gnueabi/4.8.3/ld:
cannot find -lgcov collect2: error: ld returned 1 exit status

Problem Statement
How to generate a libgcov.so file for ARM poky toolchain?
-fprofile-args --coverage -ftest-coverage

I'm able to generate a the code coverage report using x86 linux g++ compiler by installing
- sudo apt-get install gcovr
- g++ main.cpp -o main --coverage

Is there any source code or git repository from which I can generate the libgcov.so file for the ARM poky toolchain? Or Is there any solution to get the coverage of a program from ARM poky toolchain?
I have tried cloning and compiling the below repository as a library but the issue is not resolved.

https://github.com/reeteshranjan/libgcov-embedded

How to generate the code coverage report file for a program written using ARM toolchain(poky 1.6) on Ubuntu 18.04?

A: *

*Build the application using yocto build system
bitbake

*Copy the libgcov.so generated from /tmp/deploy/ into /opt/poky/1.6.1/sysroots/i686-pokysdk-linux/usr/lib/

*Trigger the build using g++

redpajama_set_name: RedPajamaStackExchange


Mary Lambert is presumed innocent, until proven guilty in a court of law. Not all of outcomes are known or final.
Is Mary Lambert a criminal?
Mary Lambert is innocent until proven guilty in a court of law.
What was Mary Lambert arrested for?
When was Mary Lambert arrested?
How old was Mary Lambert at the time of the arrest?
Where was Mary Lambert arrested?
When was Mary Lambert born?
Mary Lambert was born on February 24,1962.
Mary Lambert was 56 years old at the time of the arrest. was arrested on 2018-11-10 08:15:00.
Below you can find more information about the charges of Mary Lambert (if available).
This official record of Mary Lambert is redistributed by FindMugshots.com and is protected by publishing, constitutional and other legal rights. The official record was collected from local law enforcement agencies of Tennessee. Not all of outcomes of this arrest report are known or final.
Not the Mary Lambert you were searching for? Use the search bar above to find the correct record or view all results for Mary Lambert in All States.


Popularity Contests - are Classical Musicians not interested?
Shorty Awards are for "Honoring the Best in Social Media" - at least according to their website. If you look at the list of people 'nominated' for awards in the music category, you'll see all your favorite pop and 'talent TV' stars prominently listed. What you won't see are classical music artists.
TwtrSymphony ranks 55th and Versailees_P_Q ranks 62nd.
Where are the rest of them???


Elite Shoecare products are the go-to for high quality shoe and sandal maintenance. Main staples include laces of all lengths, leather polishes, waterproofing dubbin and sprays, nubuck/suede cleaners, sandal cork renews and sealants, heel grips… the list goes on and on. Stop in to see how you can use Elite products to keep your shoes looking and feeling the best!
Once upon a time, there were dress shoes, and there were sneakers. And that was it. But that's not how life works. What about everything in between? Drawing on generations of shoemaking experience, Rockport was able to merge the comfort of athletic shoes with the smart, sophisticated look of dress and casual styles. Through it all, we still love what we do. We're still working to refine and perfect our craft, because we're committed to building the best possible shoes for our customers.
Tana has a longstanding name in the shoecare industry. Beginning with simple inventory like shoe horns and polishes, Tana has grown to encompass all in the shoe maintenance world. Products range from polishes, mink oil waterproofers and salt stain removers to curly laces and breathable insoles. Stop by to see our full collection of Tana specialty merchandise and get the most out of your footwear!
Terra is synonymous with safety. Each shoe and boot has been developed to withstand the harshest of working conditions so at the end of the day you know that your feet will have been protected by the best. With 30 years of development Terra has put hard labour behind finding the right fit, comfort, safety and style for each shoe and boot so no matter how long you're on the job all you have to worry about is getting it done.
UGG has set the standard for crafting premium products from incredibly plush sheepskin. The mastery of this material in the fine craft of shoemaking is deeply ingrained in our rich history. For over 35 years, UGG has used only the finest, luxuriously soft Grade-A Twinface sheepskin in the world in our Classic boots, putting each sheepskin through an extensive process to ensure it will provide the signature UGG experience.


text:
Suing Landlords for Falling Down Stairs
Those who live in apartment buildings, duplexes, or anywhere else with communal stairs rely on their landlords to keep those stairs clear and safe for regular traversal. If a resident trips or slips and falls down the stairs and sustains an injury, they may have grounds for a lawsuit against their landlord.
When Are Landlords Held Accountable for Falling Down Stairs?
As the owners and oftentimes managers of shared residential or commercial buildings (including apartments, malls, restaurants, and more), landlords are liable for any preventable injuries that occur on their properties.
If a resident or business patron falls down the stairs of a commercial building or residential building, landlords may be accountable for those injuries under many circumstances.
Building Code Violations
All buildings in New York must be constructed while adhering to certain building codes. Building codes affect many aspects of a structure, including its height, safety features, and the design and functionality of its stairs.
If a landlord owns a building with stairs that do not adhere to New York building codes, they may be liable for a lawsuit if they fail to modify or replace those stairs in a timely manner. For example, if someone trips and falls because a building's stairs are too narrow or the steps are too high apart, the landlord may be liable.
Failure to Warn Occupants of Hazards
Hazards may crop up from time to time, but landlords have a responsibility to warn their occupants of said hazards. For instance, if a major leak has caused a hazard on shared apartment stairs, and a landlord does not warn occupants accordingly, they may be liable for a lawsuit.
Failure to Remove Hazards
Similarly, landlords are responsible for removing hazards on shared stairs in buildings they own. If a landlord does not clean up spills, remove broken glass or oil, or get rid of ice in front of an apartment building, they may be liable for a lawsuit.
Failure to Repair Broken/Dangerous Stairs
If a set of stairs is dangerous to traverse because it is broken (such as one stair having a massive hole in the middle of it), landlords or their building managers have a responsibility to repair those stairs. Should they fail to do so, they could be sued by any residents who are injured due to the hazard(s).
Failure to Protect Building Occupants from Outside Hazards
Lastly, landlords may be liable for lawsuits if they don't protect building occupants from outside hazards. Outside hazards can include:
Ice patches in front of a commercial or residential building
Snow or ice that makes its way into the building
Pests or vermin that affect stair quality (such as termites)
What Kind of Lawsuit Should Victims File?
Alicia told her landlord month after month to put a banister on her apartment staircase, fearing that her kids would fall and hurt themselves. The landlord dismissed her for four months, until Alicia herself fell down three flights of stairs, breaking her right leg and part of her hip.
With help from Sobo & Sobo, Alicia filed a premises liability settlement that held the landlord's negligence accountable for her injuries. She still uses her settlement today to cover lost wages, medical costs, and to put food on the table for her kids. "He needed to be knocked down a peg or two for quite a while," said Alicia. "It felt good to be the one to do that, with help from my amazing lawyer. Thank you for making me feel heard."
This is a true story. We've changed the name and photograph of our client to protect her privacy.
A fall down the stairs can lead to minor to severe injuries, including bruising, lacerations, broken bones, traumatic brain injuries, and more. Many stair accident victims may need compensation to pay for their medical bills and account for other damages.
Depending on the circumstances of the accident, victims can file one of two lawsuits in most cases.
Premises liability lawsuits hold landlords or building managers accountable for failing in their duties to occupants/users of their owned or overseen buildings.
For example, a landlord agrees to keep an apartment building and all of its communal areas and resources safe for occupants. They sign documents to this effect each time they take on a new tenant.
If they fail to keep the stairs or don't remove hazards on the stairs and an occupant is injured as a result, they may be liable for a premises liability lawsuit.
Similarly, a restaurant owner has a responsibility to clear away ice in front of their commercial building or restaurant if they are open for business. If they fail to do this and a patron slips on the ice, they may be held liable.
Personal injury lawsuits are more generalized but may also be appropriate depending on the circumstances. A personal injury lawsuit may be viable if:
A building occupant or guest was injured
The injury was directly caused due to the negligence of the landlord or loading manager
Settlements for Falling Downstairs on Premises Owned by a Landlord
Many stair accident victims require compensation to pay for medical bills, loss of income, loss of ability, or pain-and-suffering. They may receive settlements ranging from a few hundred dollars up to many thousands of dollars to pay for their medical expenses and other needs.
However, the amount of compensation they receive is highly dependent on the strength of their case and whether they have injury lawyers on their side.
How Injury Lawyers Can Help
Injury lawyers have the legal knowledge and expertise necessary to help stair accident victims acquire maximum compensation for their cases. The right lawyers can:
Help victims gather evidence
Gather the right medical evidence to prove the cause and extent of victims' injuries
Provide legal expertise to accident victims
Negotiate an appropriate settlement for victims
Injury lawyers maximize a victim's chance of a successful lawsuit outcome no matter the type or details.
Contact Sobo & Sobo Today
Victims of falling down the stairs should contact Sobo & Sobo right away to start the legal process towards compensation for their injuries. As experienced New York injury attorneys, Sobo & Sobo can help with:
Trip and fall cases
Slip and fall cases
Premises liability cases
All other personal injury cases
Contact them today for a free consultation and more information.
Posted in Premises Liability


You won't find a friendlier, more skilled warehouse staff than the team headed by Mary Perdue at Capps Home Building Center. Our drive-through yard is convenient for contractors and retail customers – and there's always someone on hand to help load products into your vehicle.
We strive to be No. 1 in service and offer a fleet of delivery vehicles that includes: 24-foot flatbeds with Moffits, service van, 14-foot flatbed dump truck, a millwork truck and a pickup truck. Let our knowledgeable, professional staff of drivers, forklift operators, load pullers and material loaders assist with your next project.


Kona Community Hospital's Junior Volunteer Corps (JVC) program will begin its next cohort of participants in mid-August. The program provides students 14 or older an opportunity to volunteer at the hospital and a jump-start in their future career by giving them a chance to explore different healthcare career choices.
Participants undergo an orientation and are outfitted with scrub uniforms. They perform a variety of jobs at Kona Community Hospital, from patient interaction to paperwork. Some examples of volunteer responsibilities included putting charts together, filling water pitchers and stocking rooms, taking specimens to laboratory, pass and pick up food trays in patient rooms, observing treatment sessions, and transporting patients to designated areas.
This past Summer session had 10 hospital departments with volunteers (Business Office, Central Supply Room, Imaging, Medical Surgical, Obstetrics, Operating Room, Patient Relations, Rehabilitation Services, Radiation Therapy and Skilled Nursing).
There are three sessions per year – this first session "Spring" is from March through May; the second session "Summer" is from June to July and the last session "Fall" is from August through December.
The first and second session brought 41 students from a variety of different schools including Kealakehe Intermediate and High School, Konawaena Middle and High School, Ke Kula 'O 'Ehunuikaimalino, Makua Lani Christian School, and Kamehameha Schools.
The deadline for Fall applications is Thursday, August 19 with a 3-hour morning orientation scheduled for Saturday, August 21. Contact Emily Mendez-Bryant at 322-6960 or ebryant@hhsc.org for further details.


text:
Trump to host Louisiana State University football team
Why getting into college is becoming easier
Home/Business/UK's Tories and Labour have radically different plans for the economy
UK's Tories and Labour have radically different plans for the economy
SALFORD, ENGLAND – NOVEMBER 19: In this handout image supplied by ITV, Prime Minister Boris Johnson and Leader of the Labour Party Jeremy Corbyn shake hands during the ITV Leaders Debate at Media Centre on November 19, 2019 in Salford, England.Handout | Getty Images News | Getty ImagesMore of the same or a massive change to the economic system? This is the choice that the U.K.'s two biggest parties are offering at the upcoming election, according one independent British think tank."Rarely can a starker choice have been placed before the U.K. electorate," Paul Johnson, director of the Institute for Fiscal Studies (IFS), said at event in London Thursday.The opposition and pro-social justice party, Labour, has promised a total revamp of the U.K.'s economics. It wants to nationalize the six big energy firms, the National Grid, the water industry, the Royal Mail, the railways and the broadband arm of telecoms firm BT. Labour also wants to increase taxes for corporations.On the other hand, the incumbents and pro-business Conservative Party has put forward a somewhat "modest" manifesto, according to the IFS."It is hard to imagine two parties offering more different prospectuses to the British population," Johnson told CNBC."The Conservative manifesto is essentially 'steady she goes', no increases in taxes, very little in the way of spending rises, nothing changing in the welfare system. The Labour manifesto, on the other hand, is enormous in its ambition, literally £100 billion worth of spending increases, £80 billion worth of tax rises," Johnson added.Reacting to the IFS analysis, John McDonnell, a Labour lawmaker and prominent figure within the party said: "The IFS assessment of Labour's plans is that we are too ambitious — we take that with pride. We are ambitious for our country and will be investing on the scale needed to end austerity, tackle climate change and build our county's future."On the other hand, Sajid Javid, the Conservative minister for finance said Thursday: "Independent experts have again confirmed today that (Labour leader Jeremy) Corbyn's plans would mean millions more people paying higher taxes — leaving his manifesto promises in tatters."What are some of their economic pledges?The Conservative Party said it will no longer go ahead with a previous plan to reduce the corporation tax (the levy for businesses) from 19% to 17% — instead, Prime Minister Boris Johnson wants to invest more in public services.He also committed to a "triple tax lock," meaning that the three main taxes from the government (income tax, value-added tax and National Insurance) will not rise during its next period in power.Under a Conservative government, the National Insurance threshold (which states the amount by which people start paying tax on their income) will increase to £9,500 in 2020, with the aim to reach £12,500 in the future.On the other hand, the Labour party has announced plans to raise the main rate of corporation tax to 21% from April 2020, 24% from April 2021 and 26% from April 2022.It also intends to raise income tax for those who earn more than £80,000 a year as well as freezing National Insurance and income tax for all other brackets. VAT (a sales levy on goods and services) will also not increase under a Labour government, according to the party's manifesto.What do their plans mean for UK debt?"Conservative plans if delivered would leave public service spending (excluding health services) still 14% lower in 2023-24 than it was in 2010-11," the IFS said."Labour propose to increase current public service spending by an additional £73 billion by 2023-24 taking it to almost one-third above today's level," the think tank also said.The U.K.'s public debt pile sits at about 86% of its GDP (gross domestic product). The yield on the 10-year U.K. bond is at about 0.671%."Borrowing at the moment in the U.K. is about average by its long-term historic standards and of course interest rates are very low, so there's probably scope for more borrowing and debt overtime, if that's where we want to go," Johnson told CNBC, while adding that, nonetheless, "you can't have the debt rising forever."
Bond flows in 2019 may signal a broader market rotation
BMW and Great Wall Motor to build all-electric Mini cars in China
Boeing expected to take another big, ugly charge on 737 Max crisis
Apple may be forced to ditch Lightning charge cable amid new EU rules
Rare coin featuring King Edward VIII sells for $1.3 million
Khamenei says missile strikes against US troops was a 'day of God'


Roy and Sheila Pillay are the founding ministers of CCF International Church which was established in 1995. CCF International Church is an Apostolic-Prophetic Ministry that is based in Durban, South Africa.
We provide spiritual oversight and fathering grace to the various ministries in Brasil, Argentina, Cameroon, South Africa and Nigeria. CCF International Church is a covenant partner of the ABC Forum and relates to Dr S.Y.Govender as its apostle.
Your support, however large or small, is highly valued and appreciated.


We hope to meet you at an upcoming medical supplies tradeshow!
Crutch Caps is here to help you, your family and your friends fashionably eliminate the pain of crutches, walkers, rollators, wheelchairs, knee-rollers and scooters. Our therapeutic products remove the pain so you can concentrate on the healing.
We are excited to learn of upcoming trade shows for durable medical equipment suppliers, direct opportunities to help the disabled, veterans affairs, illness prevention assemblies and any other showcases to display our safe and pain reducing mobility aids accessories. Let us know if you think of an upcoming event or a tradeshow we are missing. Please use the information at the bottom of this page. Thanks and be safe.


text:
Some Thoughts on the Eastwood Speech
After Clint Eastwood's speech at the RNC last week, journalists covering the convention overwhelmingly judged it as an epic fail. I gave my own brief evaluation of the speech via Twitter. While I didn't appreciate Eastwood's implied vulgarities, I didn't think the speech went nearly as badly as the analysts were suggesting. My exact words, "The Eastwood speech played really well in the convention hall. It probably played better among TV viewers than commentators give credit."
It turns out that some recent polling is showing that the speech did in fact play better than many originally thought. A new Pew Research Center Poll says that among convention watchers in general 20% thought Clint Eastwood was the highlight of the Convention. Only 17% said the same for Romney's speech. Among viewers who labeled themselves as independents (the all important demographic in the general election campaign), the numbers were 26% for Eastwood and 17% for Romney.
I didn't view Eastwood's remarks as a convention speech. It was a totally different genre altogether. It was satire—a comedy bit with a political point. It was more acting than actual speechifying. Not unlike something one would see on "The Daily Show" or "The Colbert Report." It looks like there were many viewers who received it that way as well.
Having said that, I thought the vulgarities were a bridge too far, even for satire. Our national discourse would be much better off without such insults. I'm betting that convention organizers will think twice before rolling the dice like that again. Eastwood is still the story of that night, not Romney. In any case, all of the RNC speeches have been eclipsed by the performance that Michelle Obama turned in last night. I couldn't disagree more with her views on abortion and marriage, but her speech is nevertheless the most effective convention address that we've seen this cycle.
By Denny Burk 1 Comment
Grief and Anger on Insurrection Day
Are policy-makers "encouraging mass civil disobedience"?
Interview with FRC about Being Personally against but Legally for Gay Marriage
don sands
I liked listening to Clint. I just watched Joe Kid the night before. He was great in that great Western flick.
He spoke from what his heart and mind thought, and so he wasn't so much a "political" speaker. Everyone else who has spoken has been "political". And I just don't like any of the speeches at all. It's sad really. The USA is in a bad way, and needs the people down in the Capitol Building, and the Whitehouse to come together, and do what's right. But they only care about themselves, and their own agendas:-except for a small hand full, like a Rand Paul.


The Comfort Inn Prince Albert hotel near Northern Lights Casino Welcomes You!
Visitors to Saskatchewan want to be sure they have a great place to stay. The Comfort Inn Prince Albert is conveniently located minutes from so many great area attractions. Spots like the Kinsmen Water Park, Northern Lights Casino, Little Red River Park and Prince Albert Historical Museum are all nearby.
Saskatchewan is also a golf lovers paradise. Many wonderful golf courses are nearby, including Cooke Municipal Golf Course, Kachur's Golf Club, Elk Ridge Resort and Fairview Fairways. If shopping is more your scene, several shopping areas, restaurants and parks are located in the surrounding area.
Our pet-friendly hotel offers free 24-hour coffee service for all guests. This Prince Albert, Saskatchewan hotel offers corporate travelers added conveniences like a 24-hour business center and access to copy and fax services.
All of our beautifully-appointed guest rooms provide the best in convenience for our guests. Guestrooms come equipped with pillowtop-mattresses, irons, ironing boards, coffee makers, air conditioning, hair dryers and cable television. Drive-up rooms with patio door access are also available. Whether traveling alone or with a family, Comfort Inn® Prince Albert can be your home away from home.
The Comfort Inn Prince Albert is the ideal place for personal, family and business travel when visiting the Prince Albert Saskatchewan area. Any of our guest representatives are pleased to help make your trip more enjoyable!


text:
What gives life meaning? Many Republicans and Democrats give same answer
Family over everything, including politics.
Democrats and Republicans have a number of differences when it comes to what gives them meaning in life, a recent Pew Research Center survey found, but one thing that doesn't divide Americans is how important family is to keeping them going.
About half of both Democratic and Republican respondents mentioned family and children when asked by researchers, "What about your life do you currently find meaningful, fulfilling or satisfying? What keeps you going and why?" It was the top response to the open-ended question for people of both parties in the survey, which was conducted in February 2021 among nearly 3,000 American adults and released last week.
A number of other topics came up for both Democrats and Republicans. Respondents of both parties mentioned friends, community and other relationships; material well-being, stability and quality of life; and their occupation and career among their top five responses.
But Americans also had a few significant differences by party.
Republicans were much more likely than Democrats to mention spirituality, faith, religion and freedom, using words like "God," "freedom," "country" and "Americans."
"Life without Jesus is meaningless, sad and hopeless," a Republican man told respondents. "It is only through a daily relationship with Christ that joy, love, peace and goodness can be found."
Democrats were more likely than Republicans to mention hobbies and recreation, using words like "reading," "nature," "dog" and "new" (as in "new" experiences or meeting new people. They were also much more likely to mention COVID-19 in the context of the country or their community, which Pew said suggests "that for Democrats, the pandemic has more of a societal dimension than for Republicans."
Word clouds created by Pew Research Center
This partisan divide over the meaning of life appears to be an especially American phenomenon.
Pew found in most other 16 countries it surveyed, including Australia, Canada, France, Germany and Japan, there was little difference in how people spoke about what made their lives fulfilling, depending on their support for the party in power.
The think tank mentioned just two minor exceptions: Conservatives in the United Kingdom who were slightly more likely to say material well-being brought them meaning, and Democratic Progressive Party supporters in Taiwan who were more likely to mention freedom.
While just 2% of Americans mentioned a politician who gave their life meaning, that's not something that happened in other countries. The U.S. was also the only country where more than one respondent mentioned a government leader, Pew said.
One Republican woman told researchers she found meaning in "the strength and backbone taught to me by President Trump — the meaning of standing up fiercely in the face of idiocy," while a Democratic man said he found meaning in "Less racial inequality. Less Donald Trump and his fanatics."
Pew's findings show America's partisan divide is unique to our political culture and not inevitable.


text:
https://apnews.com/9c35c1496cceeee67af1b417006b6da6
Family of 18-year-old fatally shot by Wisconsin officer sues
Monique West, mother of Ty' Rese West, addresses the media at the Racine Police Department Tuesday, Dec. 17, 2019, in Racine, Wis. The family of Ty'Rese West filed a federal civil rights lawsuit on Tuesday against Sgt. Eric Giese and the Village of Mount Pleasant. West's family alleges wrongful death and excessive force. Giese shot West in June after the teen failed to have a light on his bike while riding in the dark. (Jonathon Sadowski/The Journal Times via AP)
RACINE, Wis. (AP) — The family of an 18-year-old man who was fatally shot by a Mount Pleasant police is suing over his death.
The family of Ty'Rese West filed a federal civil rights lawsuit on Tuesday against Sgt. Eric Giese and the Village of Mount Pleasant.
West's family alleges wrongful death and excessive force. Giese shot West in June after the teen failed to have a light on his bike while riding in the dark. Racine County District Attorney Patricia Hanson announced in September that the officer acted in self-defense and would not be charged.
West's family was joined by civil rights attorneys and community members at the Racine Police Department, where the lawsuit was announced.
Andrew Stroth, one of two civil rights attorneys representing the West family, called the 18-year-old "yet another black man unjustifiably shot by the police," The Journal Times of Racine reported.
A message left by The Associated Press for Giese was not immediately returned Tuesday evening. Village Administrator Maureen Murphy said in an email that the village cannot comment on pending litigation.
Giese began chasing West and told investigators he believed West was reaching for the gun he had dropped during the foot pursuit when he was shot.
Giese was wearing a body camera, but told investigators he was unable to activate it.