text:
package org.apache.ode.axis2;

import java.io.File;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.InputStream;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import java.util.Properties;
import java.util.StringTokenizer;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
import java.util.concurrent.ThreadFactory;

import javax.servlet.ServletConfig;
import javax.servlet.ServletException;
import javax.sql.DataSource;
import javax.transaction.HeuristicMixedException;
import javax.transaction.HeuristicRollbackException;
import javax.transaction.InvalidTransactionException;
import javax.transaction.NotSupportedException;
import javax.transaction.RollbackException;
import javax.transaction.Synchronization;
import javax.transaction.SystemException;
import javax.transaction.Transaction;
import javax.transaction.TransactionManager;
import javax.transaction.xa.XAResource;

import org.apache.axis2.AxisFault;
import org.apache.axis2.engine.AxisConfiguration;
import org.apache.commons.httpclient.MultiThreadedHttpConnectionManager;
import org.apache.commons.httpclient.params.HttpConnectionManagerParams;
import org.apache.commons.httpclient.util.IdleConnectionTimeoutThread;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.apache.ode.axis2.deploy.DeploymentPoller;
import org.apache.ode.axis2.service.DeploymentWebService;
import org.apache.ode.axis2.service.ManagementService;
import org.apache.ode.axis2.util.ClusterUrlTransformer;
import org.apache.ode.bpel.connector.BpelServerConnector;
import org.apache.ode.bpel.dao.BpelDAOConnectionFactory;
import org.apache.ode.bpel.engine.BpelServerImpl;
import org.apache.ode.bpel.engine.CountLRUDehydrationPolicy;
import org.apache.ode.bpel.engine.cron.CronScheduler;
import org.apache.ode.bpel.extvar.jdbc.JdbcExternalVariableModule;
import org.apache.ode.bpel.iapi.BpelEventListener;
import org.apache.ode.bpel.iapi.EndpointReferenceContext;
import org.apache.ode.bpel.iapi.ProcessConf;
import org.apache.ode.bpel.iapi.ProcessStoreEvent;
import org.apache.ode.bpel.iapi.ProcessStoreListener;
import org.apache.ode.bpel.iapi.Scheduler;
import org.apache.ode.bpel.intercept.MessageExchangeInterceptor;
import org.apache.ode.bpel.memdao.BpelDAOConnectionFactoryImpl;
import org.apache.ode.bpel.pmapi.InstanceManagement;
import org.apache.ode.bpel.pmapi.ProcessManagement;
import org.apache.ode.il.config.OdeConfigProperties;
import org.apache.ode.il.dbutil.Database;
import org.apache.ode.scheduler.simple.JdbcDelegate;
import org.apache.ode.scheduler.simple.SimpleScheduler;
import org.apache.ode.store.ProcessStoreImpl;
import org.apache.ode.utils.GUID;
import org.apache.ode.utils.fs.TempFileManager;

/**
 * Server class called by our Axis hooks to handle all ODE lifecycle management.
 *
 * @author Matthieu Riou <mriou at apache dot org>
 */
public class ODEServer {

    protected final Log __log = LogFactory.getLog(getClass());
    protected final Log __logTx = LogFactory.getLog("org.apache.ode.tx");

    private static final Messages __msgs = Messages.getMessages(Messages.class);

    protected File _appRoot;

    protected File _workRoot;

    protected File _configRoot;

    protected BpelServerImpl _bpelServer;

    protected ProcessStoreImpl _store;

    protected ODEConfigProperties _odeConfig;

    protected AxisConfiguration _axisConfig;

    protected TransactionManager _txMgr;

    protected BpelDAOConnectionFactory _daoCF;

    protected ExecutorService _executorService;

    protected Scheduler _scheduler;

    protected CronScheduler _cronScheduler;

    protected Database _db;

    private DeploymentPoller _poller;

    private BpelServerConnector _connector;

    private ManagementService _mgtService;

    protected ClusterUrlTransformer _clusterUrlTransformer;

    protected MultiThreadedHttpConnectionManager httpConnectionManager;
    protected IdleConnectionTimeoutThread idleConnectionTimeoutThread;

    public void init(ServletConfig config, AxisConfiguration axisConf) throws ServletException {
        init(config.getServletContext().getRealPath("/WEB-INF"), axisConf);
    }

    public void init(String contextPath, AxisConfiguration axisConf) throws ServletException {
        _axisConfig = axisConf;
        String rootDir = System.getProperty("org.apache.ode.rootDir");
        if (rootDir != null) _appRoot = new File(rootDir);
        else _appRoot = new File(contextPath);

        if (!_appRoot.isDirectory())
            throw new IllegalArgumentException(_appRoot + " does not exist or is not a directory");
        TempFileManager.setWorkingDirectory(_appRoot);

        __log.debug("Loading properties");
        String confDir = System.getProperty("org.apache.ode.configDir");
        _configRoot = confDir == null ? new File(_appRoot, "conf") : new File(confDir);
        if (!_configRoot.isDirectory())
            throw new IllegalArgumentException(_configRoot + " does not exist or is not a directory");

        _odeConfig = new ODEConfigProperties(_configRoot);

        try {
            _odeConfig.load();
        } catch (FileNotFoundException fnf) {
            String errmsg = __msgs.msgOdeInstallErrorCfgNotFound(_odeConfig.getFile());
            __log.warn(errmsg);
        } catch (Exception ex) {
            String errmsg = __msgs.msgOdeInstallErrorCfgReadError(_odeConfig.getFile());
                __log.error(errmsg, ex);
                throw new ServletException(errmsg, ex);
            }

            String wdir = _odeConfig.getWorkingDir();
            if (wdir == null) _workRoot = _appRoot;
            else _workRoot = new File(wdir.trim());
        if (!_workRoot.isDirectory())
            throw new IllegalArgumentException(_workRoot + " does not exist or is not a directory");

        __log.debug("Initializing transaction manager");
        initTxMgr();
        __log.debug("Creating data source.");
        initDataSource();
        __log.debug("Starting DAO.");
        initDAO();
        EndpointReferenceContextImpl eprContext = new EndpointReferenceContextImpl(this);
        __log.debug("Initializing BPEL process store.");
        initProcessStore(eprContext);
        __log.debug("Initializing BPEL server.");
        initBpelServer(eprContext);
        __log.debug("Initializing HTTP connection manager");
        initHttpConnectionManager();

        // Register BPEL event listeners configured in axis2.properties file.
        registerEventListeners();
        registerMexInterceptors();
        registerExternalVariableModules();

        _store.loadAll();

        try {
            _bpelServer.start();
        } catch (Exception ex) {
            String errmsg = __msgs.msgOdeBpelServerStartFailure();
            __log.error(errmsg, ex);
            throw new ServletException(errmsg, ex);
        }

        _poller = getDeploymentPollerExt();
        if( _poller == null ) {
            _poller = new DeploymentPoller(_store.getDeployDir(), this);
        }

        _mgtService = new ManagementService();
        _mgtService.enableService(_axisConfig, _bpelServer, _store, _appRoot.getAbsolutePath());

        try {
            __log.debug("Initializing Deployment Web Service");
            new DeploymentWebService().enableService(_axisConfig, _store, _poller, _appRoot.getAbsolutePath(), _workRoot.getAbsolutePath());
        } catch (Exception e) {
            throw new ServletException(e);
        }

        __log.debug("Starting scheduler");
        _scheduler.start();

        __log.debug("Initializing JCA adapter.");
        initConnector();

        _poller.start();
        __log.info(__msgs.msgPollingStarted(_store.getDeployDir().getAbsolutePath()));
        __log.info(__msgs.msgOdeStarted());
    }

    @SuppressWarnings("unchecked")
    private DeploymentPoller getDeploymentPollerExt() {
        DeploymentPoller poller = null;

        InputStream is = null;
        try {
            is = ODEServer.class.getResourceAsStream("/deploy-ext.properties");
            if( is != null ) {
                __log.info("A deploy-ext.properties found; will use the provided class if applicable.");
                try {
                    Properties props = new Properties();
                    props.load(is);
                    String deploymentPollerClass = props.getProperty("deploymentPoller.class");
                    if( deploymentPollerClass == null ) {
                        __log.warn("deploy-ext.properties found in the class path; however, the file does not have 'deploymentPoller.class' as one of the properties!!");
                    } else {
                        Class pollerClass = Class.forName(deploymentPollerClass);
                        poller = (DeploymentPoller)pollerClass.getConstructor(File.class, ODEServer.class).newInstance(_store.getDeployDir(), this);
                        __log.info("A custom deployment poller: " + deploymentPollerClass + " has been plugged in.");
                    }
                } catch( Exception e ) {
                    __log.warn("Deployment poller extension class is not loadable, falling back to the default DeploymentPoller.", e);
                }
            } else if( __log.isDebugEnabled() ) __log.debug("No deploy-ext.properties found.");
        } finally {
            try {
                if(is != null) is.close();
            } catch( IOException ie ) {
                // ignore
            }
        }

        return poller;
    }

    private void initDataSource() throws ServletException {
        _db = new Database(_odeConfig);
        _db.setTransactionManager(_txMgr);
        _db.setWorkRoot(_workRoot);

        try {
            _db.start();
        } catch (Exception ex) {
            String errmsg = __msgs.msgOdeDbConfigError();
            __log.error(errmsg, ex);
            throw new ServletException(errmsg, ex);
        }

    }

    /**
     * Shutdown the service engine. This performs cleanup before the BPE is terminated. Once this method has been called, init()
     * must be called before the transformation engine can be started again with a call to start().
     *
     * @throws AxisFault if the engine is unable to shut down.
     */
    public void shutDown() {

        ClassLoader old = Thread.currentThread().getContextClassLoader();
        Thread.currentThread().setContextClassLoader(getClass().getClassLoader());
        try {
            if (_poller != null)
                try {
                    __log.debug("shutting down poller");
                    _poller.stop();
                    _poller = null;
                } catch (Throwable t) {
                    __log.debug("Error stopping poller.", t);
                }

            if (_bpelServer != null)
                try {
                    __log.debug("shutting down ODE server.");
                    _bpelServer.shutdown();
                    _bpelServer = null;
                } catch (Throwable ex) {
                    __log.debug("Error stopping services.", ex);
                }

            if( _cronScheduler != null ) {
                try {
                    __log.debug("shutting down cron scheduler.");
                    _cronScheduler.shutdown();
                    _cronScheduler = null;
                } catch (Exception ex) {
                    __log.debug("Cron scheduler couldn't be shutdown.", ex);
                }
            }

            if (_scheduler != null)
                try {
                    __log.debug("shutting down scheduler.");
                    _scheduler.shutdown();
                    _scheduler = null;
                } catch (Exception ex) {
                    __log.debug("Scheduler couldn't be shutdown.", ex);
                }

            if (_store != null)
                try {
                    _store.shutdown();
                    _store = null;
                } catch (Throwable t) {
                    __log.debug("Store could not be shutdown.", t);
                }

            if (_daoCF != null)
                try {
                    _daoCF.shutdown();
                } catch (Throwable ex) {
                    __log.debug("DOA shutdown failed.", ex);
                } finally {
                    _daoCF = null;
                }

            if (_db != null)
                try {
                    _db.shutdown();

                } catch (Throwable ex) {
                    __log.debug("DB shutdown failed.", ex);
                } finally {
                    _db = null;
                }

            if (_txMgr != null) {
                __log.debug("shutting down transaction manager.");
                _txMgr = null;
            }

            if (_connector != null) {
                try {
                    __log.debug("shutdown BpelConnector");
                    _connector.shutdown();
                    _connector = null;
                } catch (Throwable t) {
                    __log.error("Unable to cleanup temp files.", t);
                }
            }
            if(httpConnectionManager!=null){
                __log.debug("shutting down HTTP connection manager.");
                try {
                    httpConnectionManager.shutdown();
                    httpConnectionManager = null;
                } catch(Throwable t) {
                    __log.error("Unable to shut down HTTP connection manager.", t);
                }
            }
            if(idleConnectionTimeoutThread!=null){
                __log.debug("shutting down Idle Connection Timeout Thread.");
                try {
                    idleConnectionTimeoutThread.shutdown();
                    idleConnectionTimeoutThread = null;
                } catch(Throwable t) {
                    __log.error("Unable to shut down Idle Connection Timeout Thread.", t);
                }
            }
            try {
                __log.debug("cleaning up temporary files.");
                TempFileManager.cleanup();
            } catch (Throwable t) {
                __log.error("Unable to cleanup temp files.", t);
            }

            _executorService.shutdownNow();
            _executorService = null;

            __log.info(__msgs.msgOdeShutdownCompleted());
        } finally {
            Thread.currentThread().setContextClassLoader(old);
        }
    }

    @SuppressWarnings("unchecked")
     private void initTxMgr() throws ServletException {
        if (_odeConfig.getDbMode().equals(OdeConfigProperties.DatabaseMode.EXTERNAL) &&
                _odeConfig.getTxFactoryClass().equals(OdeConfigProperties.DEFAULT_TX_FACTORY_CLASS_NAME)) {
            throw new ServletException("No external transaction manager factory configured. Please use the INTERNAL mode or configure an external transaction manager that is associated with external datasource.");
        }

        String txFactoryName = _odeConfig.getTxFactoryClass();
        __log.debug("Initializing transaction manager using " + txFactoryName);
        try {
            Class txFactClass = this.getClass().getClassLoader().loadClass(txFactoryName);
            Object txFact = txFactClass.newInstance();
            _txMgr = (TransactionManager) txFactClass.getMethod("getTransactionManager", (Class[]) null).invoke(txFact);
            if (__logTx.isDebugEnabled() && System.getProperty("ode.debug.tx") != null)
                _txMgr = new DebugTxMgr(_txMgr);
        } catch (Exception e) {
            __log.fatal("Couldn't initialize a transaction manager with factory: " + txFactoryName, e);
            throw new ServletException("Couldn't initialize a transaction manager with factory: " + txFactoryName, e);
        }
    }

    private void initConnector() throws ServletException {
        int port = _odeConfig.getConnectorPort();
        if (port == 0) {
            __log.info("Skipping connector initialization.");
        } else {
            _connector = new BpelServerConnector();
            _connector.setBpelServer(_bpelServer);
            _connector.setProcessStore(_store);
            _connector.setPort(_odeConfig.getConnectorPort());
            _connector.setId("jcaServer");
            try {
                _connector.start();
            } catch (Exception e) {
                __log.error("Failed to initialize JCA connector.", e);
            }
        }
    }

    /**
     * Initialize the DAO.
     *
     * @throws ServletException
     */
    protected void initDAO() throws ServletException {
        __log.info(__msgs.msgOdeUsingDAOImpl(_odeConfig.getDAOConnectionFactory()));
        try {
            _daoCF = _db.createDaoCF();
        } catch (Exception ex) {
            String errmsg = __msgs.msgDAOInstantiationFailed(_odeConfig.getDAOConnectionFactory());
            __log.error(errmsg, ex);
            throw new ServletException(errmsg, ex);

        }
    }

    protected void initProcessStore(EndpointReferenceContext eprContext) {
        _store = createProcessStore(eprContext, _db.getDataSource());
        _store.registerListener(new ProcessStoreListenerImpl());
        _store.setDeployDir(
        		_odeConfig.getDeployDir() != null ?
	        		new File(_odeConfig.getDeployDir()) :
	        		new File(_workRoot, "processes"));
        _store.setConfigDir(_configRoot);
    }

    protected ProcessStoreImpl createProcessStore(EndpointReferenceContext eprContext, DataSource ds) {
        return new ProcessStoreImpl(eprContext, ds, _odeConfig.getDAOConnectionFactory(), _odeConfig, false);
    }

    protected Scheduler createScheduler() {
        SimpleScheduler scheduler = new SimpleScheduler(new GUID().toString(),
                new JdbcDelegate(_db.getDataSource()), _odeConfig.getProperties());
        scheduler.setExecutorService(_executorService);
        scheduler.setTransactionManager(_txMgr);
        return scheduler;
    }

    private void initBpelServer(EndpointReferenceContextImpl eprContext) {
        if (__log.isDebugEnabled()) {
            __log.debug("ODE initializing");
        }
        ThreadFactory threadFactory = new ThreadFactory() {
            int threadNumber = 0;
            public Thread newThread(Runnable r) {
                threadNumber += 1;
                Thread t = new Thread(r, "ODEServer-"+threadNumber);
                t.setDaemon(true);
                return t;
            }
        };

        if (_odeConfig.getThreadPoolMaxSize() == 0)
            _executorService = Executors.newCachedThreadPool(threadFactory);
        else
            _executorService = Executors.newFixedThreadPool(_odeConfig.getThreadPoolMaxSize(), threadFactory);

        {
            List<String> targets = new ArrayList<String>();
            Collections.addAll(targets, _odeConfig.getProperty("cluster.localRoute.targets", "").split(","));
            _clusterUrlTransformer = new ClusterUrlTransformer(targets, _odeConfig.getProperty("cluster.localRoute.base", "http://localhost:8080/ode/processes/"));
        }
        _bpelServer = new BpelServerImpl();
        _scheduler = createScheduler();
        _scheduler.setJobProcessor(_bpelServer);

        BpelServerImpl.PolledRunnableProcessor polledRunnableProcessor = new BpelServerImpl.PolledRunnableProcessor();
        polledRunnableProcessor.setPolledRunnableExecutorService(_executorService);
        polledRunnableProcessor.setContexts(_bpelServer.getContexts());
        _scheduler.setPolledRunnableProcesser(polledRunnableProcessor);

        _cronScheduler = new CronScheduler();
        _cronScheduler.setScheduledTaskExec(_executorService);
        _cronScheduler.setContexts(_bpelServer.getContexts());
        _bpelServer.setCronScheduler(_cronScheduler);

        _bpelServer.setDaoConnectionFactory(_daoCF);
        _bpelServer.setInMemDaoConnectionFactory(new BpelDAOConnectionFactoryImpl(_scheduler, _odeConfig.getInMemMexTtl()));
        _bpelServer.setEndpointReferenceContext(eprContext);
        _bpelServer.setMessageExchangeContext(new MessageExchangeContextImpl(this));
        _bpelServer.setBindingContext(new BindingContextImpl(this));
        _bpelServer.setScheduler(_scheduler);
        if (_odeConfig.isDehydrationEnabled()) {
            CountLRUDehydrationPolicy dehy = new CountLRUDehydrationPolicy();
            dehy.setProcessMaxAge(_odeConfig.getDehydrationMaximumAge());
            dehy.setProcessMaxCount(_odeConfig.getDehydrationMaximumCount());
            _bpelServer.setDehydrationPolicy(dehy);
        }
        _bpelServer.setMigrationTransactionTimeout(_odeConfig.getMigrationTransactionTimeout());
        _bpelServer.setConfigProperties(_odeConfig.getProperties());
        _bpelServer.init();
        _bpelServer.setInstanceThrottledMaximumCount(_odeConfig.getInstanceThrottledMaximumCount());
        _bpelServer.setProcessThrottledMaximumCount(_odeConfig.getProcessThrottledMaximumCount());
        _bpelServer.setProcessThrottledMaximumSize(_odeConfig.getProcessThrottledMaximumSize());
        _bpelServer.setHydrationLazy(_odeConfig.isHydrationLazy());
        _bpelServer.setHydrationLazyMinimumSize(_odeConfig.getHydrationLazyMinimumSize());
    }

    private void initHttpConnectionManager() throws ServletException {
        httpConnectionManager = new MultiThreadedHttpConnectionManager();
        // settings may be overridden from ode-axis2.properties using the same properties as HttpClient
        // /!\ If the size of the conn pool is smaller than the size of the thread pool, the thread pool might get starved.
        int max_per_host = Integer.parseInt(_odeConfig.getProperty(HttpConnectionManagerParams.MAX_HOST_CONNECTIONS, ""+_odeConfig.getPoolMaxSize()));
        int max_total = Integer.parseInt(_odeConfig.getProperty(HttpConnectionManagerParams.MAX_TOTAL_CONNECTIONS, ""+_odeConfig.getPoolMaxSize()));
        if(__log.isDebugEnabled()) {
            __log.debug(HttpConnectionManagerParams.MAX_HOST_CONNECTIONS+"="+max_per_host);
            __log.debug(HttpConnectionManagerParams.MAX_TOTAL_CONNECTIONS+"="+max_total);
        }
        if(max_per_host<1 || max_total <1){
            String errmsg = HttpConnectionManagerParams.MAX_HOST_CONNECTIONS+" and "+ HttpConnectionManagerParams.MAX_TOTAL_CONNECTIONS+" must be positive integers!";
            __log.error(errmsg);
            throw new ServletException(errmsg);
        }
        httpConnectionManager.getParams().setDefaultMaxConnectionsPerHost(max_per_host);
        httpConnectionManager.getParams().setMaxTotalConnections(max_total);

        // Register the connection manager to a idle check thread
        idleConnectionTimeoutThread = new IdleConnectionTimeoutThread();
        idleConnectionTimeoutThread.setName("Http_Idle_Connection_Timeout_Thread");
        long idleConnectionTimeout = Long.parseLong(_odeConfig.getProperty("http.idle.connection.timeout", "30000"));
        long idleConnectionCheckInterval = Long.parseLong(_odeConfig.getProperty("http.idle.connection.check.interval", "30000"));

        if(__log.isDebugEnabled()){
            __log.debug("http.idle.connection.timeout="+idleConnectionTimeout);
            __log.debug("http.idle.connection.check.interval="+idleConnectionCheckInterval);
        }
        idleConnectionTimeoutThread.setConnectionTimeout(idleConnectionTimeout);
        idleConnectionTimeoutThread.setTimeoutInterval(idleConnectionCheckInterval);

        idleConnectionTimeoutThread.addConnectionManager(httpConnectionManager);
        idleConnectionTimeoutThread.start();
    }

    public ProcessStoreImpl getProcessStore() {
        return _store;
    }

    public BpelServerImpl getBpelServer() {
        return _bpelServer;
    }

    public InstanceManagement getInstanceManagement() {
        return _mgtService.getInstanceMgmt();
    }

    public ProcessManagement getProcessManagement() {
        return _mgtService.getProcessMgmt();
    }

    public File getAppRoot() {
        return _appRoot;
    }

    public File getConfigRoot() {
        return _configRoot;
    }

    private void registerEventListeners() {
        String listenersStr = _odeConfig.getEventListeners();
        if (listenersStr != null) {
            for (StringTokenizer tokenizer = new StringTokenizer(listenersStr, ",;"); tokenizer.hasMoreTokens();) {
                String listenerCN = tokenizer.nextToken();
                try {
                    _bpelServer.registerBpelEventListener((BpelEventListener) Class.forName(listenerCN).newInstance());
                    __log.info(__msgs.msgBpelEventListenerRegistered(listenerCN));
                } catch (Exception e) {
                    __log.warn("Couldn't register the event listener " + listenerCN + ", the class couldn't be "
                            + "loaded properly: " + e);
                }
            }

        }
    }

    private void registerMexInterceptors() {
        String listenersStr = _odeConfig.getMessageExchangeInterceptors();
        if (listenersStr != null) {
            for (StringTokenizer tokenizer = new StringTokenizer(listenersStr, ",;"); tokenizer.hasMoreTokens();) {
                String interceptorCN = tokenizer.nextToken();
                try {
                    _bpelServer.registerMessageExchangeInterceptor((MessageExchangeInterceptor) Class.forName(interceptorCN).newInstance());
                    __log.info(__msgs.msgMessageExchangeInterceptorRegistered(interceptorCN));
                } catch (Exception e) {
                    __log.warn("Couldn't register the event listener " + interceptorCN + ", the class couldn't be "
                            + "loaded properly: " + e);
                }
            }
        }
    }

    private void registerExternalVariableModules() {
        JdbcExternalVariableModule jdbcext;
        jdbcext = new JdbcExternalVariableModule();
        jdbcext.registerDataSource("ode", _db.getDataSource());
        _bpelServer.registerExternalVariableEngine(jdbcext);

    }

    private class ProcessStoreListenerImpl implements ProcessStoreListener {

        public void onProcessStoreEvent(ProcessStoreEvent event) {
            handleEvent(event);
        }

    }

    private void handleEvent(ProcessStoreEvent pse) {
        __log.debug("Process store event: " + pse);
        ProcessConf pconf = _store.getProcessConfiguration(pse.pid);
        switch (pse.type) {
            case DEPLOYED:
                if (pconf != null) {
                    /*
                     * If and only if an old process exists with the same pid, the old process is cleaned up.
                     * The following line is IMPORTANT and used for the case when the deployment and store
                     * do not have the process while the process itself exists in the BPEL_PROCESS table.
                     * Notice that the new process is actually created on the 'ACTIVATED' event.
                     */
                    _bpelServer.cleanupProcess(pconf);
                }
                break;
            case ACTVIATED:
                // bounce the process
                _bpelServer.unregister(pse.pid);
                if (pconf != null) {
                    _bpelServer.register(pconf);
                } else {
                    __log.debug("slighly odd: recevied event " +
                            pse + " for process not in store!");
                }
                break;
            case RETIRED:
                // are there are instances of this process running?
                boolean instantiated = _bpelServer.hasActiveInstances(pse.pid);
                // remove the process
                _bpelServer.unregister(pse.pid);
                // bounce the process if necessary
                if (instantiated) {
                    if (pconf != null) {
                        _bpelServer.register(pconf);
                    } else {
                        __log.debug("slighly odd: recevied event " +
                                pse + " for process not in store!");
                    }
                } else {
                    // we may have potentially created a lot of garbage, so,
                    // let's hope the garbage collector is configured properly.
                    if (pconf != null) {
                        _bpelServer.cleanupProcess(pconf);
                    }
                }
                break;
            case DISABLED:
            case UNDEPLOYED:
                _bpelServer.unregister(pse.pid);
                if (pconf != null) {
                    _bpelServer.cleanupProcess(pconf);
                }
                break;
            default:
                __log.debug("Ignoring store event: " + pse);
        }

        if( pconf != null ) {
            if( pse.type == ProcessStoreEvent.Type.UNDEPLOYED) {
                __log.debug("Cancelling all cron scheduled jobs on store event: " + pse);
                _bpelServer.getContexts().cronScheduler.cancelProcessCronJobs(pse.pid, true);
            }

            // Except for undeploy event, we need to re-schedule process dependent jobs
            __log.debug("(Re)scheduling cron scheduled jobs on store event: " + pse);
            if( pse.type != ProcessStoreEvent.Type.UNDEPLOYED) {
                _bpelServer.getContexts().cronScheduler.scheduleProcessCronJobs(pse.pid, pconf);
            }
        }
    }

    // Transactional debugging stuff, to track down all these little annoying bugs.
    private class DebugTxMgr implements TransactionManager {
        private TransactionManager _tm;

        public DebugTxMgr(TransactionManager tm) {
            _tm = tm;
        }

        public void begin() throws NotSupportedException, SystemException {
            __logTx.debug("Txm begin");
            _tm.begin();
        }

        public void commit() throws HeuristicMixedException, HeuristicRollbackException, IllegalStateException, RollbackException, SecurityException, SystemException {
            __logTx.debug("Txm commit");
            for (StackTraceElement traceElement : Thread.currentThread().getStackTrace()) {
                __logTx.debug(traceElement.toString());
            }
            _tm.commit();
        }

        public int getStatus() throws SystemException {
            __logTx.debug("Txm status");
            return _tm.getStatus();
        }

        public Transaction getTransaction() throws SystemException {
            Transaction tx = _tm.getTransaction();
            __logTx.debug("Txm get tx " + tx);
            return tx == null ? null : new DebugTx(tx);
        }

        public void resume(Transaction transaction) throws IllegalStateException, InvalidTransactionException, SystemException {
            __logTx.debug("Txm resume");
            _tm.resume(transaction);
        }

        public void rollback() throws IllegalStateException, SecurityException, SystemException {
            __logTx.debug("Txm rollback");
            _tm.rollback();
        }

        public void setRollbackOnly() throws IllegalStateException, SystemException {
            __logTx.debug("Txm set rollback");
            _tm.setRollbackOnly();
        }

        public void setTransactionTimeout(int i) throws SystemException {
            __logTx.debug("Txm set tiemout " + i);
            _tm.setTransactionTimeout(i);
        }

        public Transaction suspend() throws SystemException {
            __logTx.debug("Txm suspend");
            return _tm.suspend();
        }
    }

    private class DebugTx implements Transaction {
        private Transaction _tx;

        public DebugTx(Transaction tx) {
            _tx = tx;
        }

        public void commit() throws HeuristicMixedException, HeuristicRollbackException, RollbackException, SecurityException, SystemException {
            __logTx.debug("Tx commit");
            _tx.commit();
        }

        public boolean delistResource(XAResource xaResource, int i) throws IllegalStateException, SystemException {
            return _tx.delistResource(xaResource, i);
        }

        public boolean enlistResource(XAResource xaResource) throws IllegalStateException, RollbackException, SystemException {
            return _tx.enlistResource(xaResource);
        }

        public int getStatus() throws SystemException {
            return _tx.getStatus();
        }

        public void registerSynchronization(Synchronization synchronization) throws IllegalStateException, RollbackException, SystemException {
            __logTx.debug("Synchronization registration on " + synchronization.getClass().getName());
            _tx.registerSynchronization(synchronization);
        }

        public void rollback() throws IllegalStateException, SystemException {
            __logTx.debug("Tx rollback");
            _tx.rollback();
        }

        public void setRollbackOnly() throws IllegalStateException, SystemException {
            __logTx.debug("Tx set rollback");
            _tx.setRollbackOnly();
        }
    }
}

redpajama_set_name: RedPajamaGithub


text:
Q: AJAX not returning a variable from php I know there is a few questions like this on here. but I have done a lot of researching and bug fixing all day to try work out why my ajax does not return a response from the php file. All I want is for it to tell me a user has been registered so I can let the user move on with the signing up process. And I just need someones wise guidance to tell me what I am doing wrong!!
so I wont bore you with the validation part of the js file just the ajax
  if(ValidationComplete == true){
   var that = $(this),
url = that.attr('action'),
type = that.attr('method'),
data = {};

that.find('[name]').each(function(register, value) {
    var that = $(this),
        name = that.attr('name'),
        value = that.val();

        data[name] = value;
});

    $.ajax({
    url:url,
    type:type,
    data: data,
    dataType: 'json',
    success: function(result){
        alert(result.status);
        console.log(result.data);

    },
error: function(xhr, textStatus, error){
  console.log(xhr.statusText);
  console.log(textStatus);
  console.log(error);
   }

});

return false;
} else {
    return false;
}

currently with this, if I remove the dataType bit the alert bit happens but currently with it there nothing does.
again I will just skip to the chase on the php file
    $query = "INSERT INTO person
   VALUES('','$first_Name','$surname','$email','$dob','$password',
  '1','','0','1','','','','$emailCode')";
  if($query_run =mysql_query($query)) {
      echo json_encode(array("response"='true'));

Any help would be amazing!!!!!
updated code:
  <?php

if( isset($_POST['firstname']) &&
isset($_POST['surname']) &&
isset($_POST['email']) &&
isset($_POST['day']) &&
isset($_POST['month']) &&
isset($_POST['year']) &&
isset($_POST['password']) &&
isset($_POST['re_type_password'])){

  $first_Name = $_POST['firstname'];
  $surname = $_POST['surname'];
  $email = $_POST['email'];
$password = $_POST['password'];
$day = $_POST['day'];
$month = $_POST['month'];
$year = $_POST['year'];
$re_type_password = $_POST['re_type_password'];
$emailCode = md5($_POST['$first_Name'] + microtime());

if(!empty($first_Name)&&
!empty($surname)&&
!empty($email)&&
!empty($day) &&
!empty($month) &&
!empty($year) &&
!empty($password)&&
!empty($re_type_password)){

  if(strlen($firstname)>30 || strlen($surname)>30 || strlen($email)>50){
  echo 'the data enetered is to long';
} else {
  if($password != $re_type_password){
  echo 'passwords do not match, please try again.';
} else{
$query = "SELECT email FROM person WHERE email ='$email'";
$query_run = mysql_query($query);
if(mysql_num_rows($query_run)==1){
  echo 'Email address already on databse';
} else{
  if($day>31 || $month>12){
    echo 'date of birth wrong';
  } else{

    $dob= $year.'-'.$day.'-'.$month;
  $query = "INSERT INTO person
  VALUES('','$first_Name','$surname','$email','$dob','$password'
   ,'1','','0','1','','','','$emailCode')";
   if($query_run =mysql_query($query)) {
      email($email, 'Email Confirmation', "hello ". $first_Name." ,
    \n\n you need to   activate your account so click the link  ");
    $return_data['status'] = 'success';
     echo json_encode($return_data);
  } else {
      echo @mysql_error();
  }

}

 }

  }
  }

  } else {
      echo "
 All fields are required. Please try again.
";

  }
      }

   ?>

  <?php
  } else if (loggedIn()) {

echo 'you are already registed and logged in';

   }

  ?>

A: the last line it should be
echo json_encode(array("response"=>'true'));

see the added > in the array declaration, that is used to assign arrays with keys.
also in general you should put a error capture in your ajax statement, see this answer for more info
EDIT: Ok wow, that's some spaghetti code you have there, but after a little clean-up your problem is too many closing braces } you have to remove the } just before the following line also get rid of the closing and opening tags around this line, they serve no use.
} // <------- THIS ONE!

} else if (loggedIn()) {

    echo 'you are already registed and logged in';

}

I should also mention two other issues with your code

*

*You are accepting input from the user without cleaning it up and testing it properly.  This is  no no read here to find out more

*You are using mysl_ functions, these are old and depreciated they are also security risks.  Check out PDO instead
EDIT:
Add ini_set('error_reporting',1); to the top of your php script.

redpajama_set_name: RedPajamaStackExchange


Quicken Loans is landing at Tower City Center. The company, which is owned by Cleveland Cavaliers majority owner Daniel Gilbert and is a major online home lender, is leasing 45,000 square feet on the fifth floor of the MK-Ferguson Building for a lending center. It initially will employ 50 people, but a company press release said that number will grow to between 300 and 350 employees in two to three years. The company plans to hire and train 15 to 20 new employees a month to run the center, which will advise borrowers on home finance options. At full employment, the company expects the office to close between $3 billion and $4 billion in home loans a year and to pay from $25 million to $30 million in salaries. This is the company's first lending center outside of its home state of Michigan. The company is headquartered in Livonia, Mich. "Quicken Loans' new business venture in Cleveland demonstrates that the city of Cleveland is a great place to live and work," Cleveland Mayor Frank Jackson said in a press release. "Dan Gilbert's willingness to work with the city and invest in Cleveland is an example of the type of public-private partnerships we need to make Cleveland a 24-hour city." Most of the jobs will be for loan officers, which are positions that are part sales and part finance. Full-time employees can expect to earn as much as $85,000. Quicken Loans preaches to its 3,000 employees that success is a combination of attention to detail and relentless effort. The Quicken Loans office is eligible for both city and state job creation tax credits. Quicken will receive a state credit that could be worth as much as $4.5 million over 10 years. The city credit could be worth as much as $714,000 over five years. The tax credits return to the recipient company an amount equal to 50% of the money withheld from employees for income taxes.


Gail Mirabella started The Dynamo Dogs in 2006 when she and her high flying Frisbee dogs were the featured dog act on "The Greatest Show on Earth," Ringling Bros. Circus, for four years.
She Swears that "Doggie" was her first words, and been training dogs since the age of 10 when she competed in her first kids dog show. She received a B.S. degree in Animal Science in 1991 from Delaware Valley College and started actively competing in K9 disc competitions across the United States and performing her Canine shows since 1997. She's the founder of a flying disc dog club in the Northeast, the Yankee Flyers Dog and Disc Club.
Gail has also been involved in other canine sports, since 1999, she and her canine companions compete in Dock Diving, Flyball and Agility events.
As a dog lover and trainer for more than one canine sport, she travels across the country sharing her expertise and entertaining crowds of all ages.
Gail & The Dynamo Dogs' greatest accomplishment was the 4 year (two tours) of performances for Ringling Brothers & Barnum and Bailey Circus (2/2006-11/2009). They wowed the crowds across the Country and was voted by the fellow performers the "2008 Best Animal Act" award. They also toured with Cirquesa, a theatrical circus (Jan-March 2010) in the state of Florida and was the featured act for a month at the Medora Musical in Medora, ND (June 2010).
Many of The Dynamo Dogs have been adopted or rescued. Gail's entourage includes the unique combination of a father & son duo that performs acrobatic, freestyle routines. The father, Topper the Show Stopper, is one of the world's smallest Frisbee catching dog. His son, Teaser the Crowd Pleaser, is right on his way to following in his father's paw prints, his ariel acrobatics amazes everyone!
Glamour, an Australian Shepherd, was adopted out of GA, and performs Hoop and rolling barrel tricks while her two Border Collies; K8 and Tag, both adopted from Sweet Border Collie Rescue, are known for their quick and agile disposition that allows them to catch almost every Frisbee thrown. They both are great Dock Diving Dogs too, leaping over 20' into a pool.
The munchkins are made of three tenacious Rat Terriers; Charlotte, rescued out of Florida, displays incredible vertical jumping abilities and hoop tricks while the smallest of her team, Pyper, can walk on barrels and Keeper who is now displaying some comical antics performs his many styles of hoop tricks. Kharma a tiny mini Aussie, was adopted from CT is a main component of walking on the "wheel of steel"! Roxy, a Chihuahua mix, was also adopted out of Florida, rounds out the Munchkins with her hind leg hops through hoops and over jumps.
Her pack comes complete with two large dogs, a Standard Poodle, Joker and a Doberman named, Prada. Both astound the audiences with their amazing Frisbee tricks and high jump performances, clearing over 52"!
Through their performances, Gail not only entertains but also showcases to the audiences the happy and healthy relationship she has with each and every one of her dogs. Gail supports the belief that with a little time, patience and positive training anyone can create a special bond with their dog.
They provided PR for Ringling 1-3 times/wk appearing on many local TV, radio and newspapers across the United States.
Gail & The Dynamo Dogs were also a feature story in the July 2007 issue of Ladies Home Journal magazine.
Cricket:	2005-Rev Run music video, "Got my mind on the road"
© 2018, The Marshall County Fair, WV All rights reserved.


text:
Tag: MoA
McGill threatens to terminate MoA with SSMU over the approval of Palestine Solidarity Policy
On March 21, the Palestine Solidarity Policy question on the Students' Society of McGill University (SSMU) Winter 2022 Referendum passed with a 71.1 per cent majority. The following day, however, Deputy Provost Fabrice Labeau informed SSMU that the university found the policy to be in violation of SSMU's constitution and[Read More…]
March 29, 2022 by Ghazal Azizi
Daily Publications Society wins existence referendum despite heated 'No' campaign
Between Nov. 13 and Nov. 17, the Daily Publication Society (DPS), which publishes both The McGill Daily and Le Délit, faced a referendum on the renewal of its Memorandum of Agreement (MoA) with the Students' Society of McGill University (SSMU). Despite a vocal 'No' campaign team calling for a majority vote[Read More…]
November 18, 2017 by Ozanay Bozkaya
Polish Institute of Canada to vacate location on McGill campus while students petition
The Polish Institute of Arts and Sciences in Canada (PIASA), which has occupied 3479 Rue Peel since 1969, housing a collection of nearly 50,000 books and documents, was informed by McGill that it must move out of its building by June 1. PIASA received this verbal request from the administration on[Read More…]
April 5, 2016 by Aislinn Kalob
SNAX may resume sandwich sales pending MoA negotiations with McGill
After a six month ban, students may once again be able purchase sandwiches from SNAX. Ongoing Memorandum of Agreement (MoA) negotiations between the McGill administration and the Arts Undergraduate Society (AUS) concerning the future of the AUS student-run business, appear to be coming to a conclusion. These negotiations follow the[Read More…]
November 3, 2015 by Calvin Trottier-Chi

redpajama_set_name: RedPajamaCommonCrawl


text:
Tonight's Movie: Warpath (1951)
The Edmond O'Brien Centennial
Tonight's Movie: California Mail (1936) - A Warner...
Tonight's Movie: Tell No Tales (1939)
Tonight's Movie: Oregon Passage (1957) - A Warner ...
Tonight's Movie: I Found Stella Parish (1935) - A ...
"End of Watch" for Adam-12 Star Martin Milner
Today at Disneyland: Star Wars Mania
Tonight's Movie: The Rocketeer (1991)
Tonight's Movie: Wild Boys of the Road (1933)
This post is my contribution to the William Wellman Blogathon being hosted from September 10th through 13th by Now Voyaging. Over 50 bloggers are signed up to participate! There have already been many excellent posts about this wonderful director's films, with more to come, so be sure to head over to Now Voyaging and check out the links.
This seems to be the year to celebrate William A. Wellman, thanks to a marvelous retrospective at UCLA and the release of William Wellman Jr.'s book WILD BILL WELLMAN: HOLLYWOOD REBEL. The focus on Wellman continues with this terrific blogathon hosted by Now Voyaging, and there is also a chance for some of us to see William Wellman Jr. speak at the Lone Pine Film Festival next month.
I think my favorite aspect of William Wellman Jr.'s memoir is his parents' charming love story. Dorothy "Dottie" Coonan was a teenaged dancer in Busby Berkeley musicals when the senior Wellman spotted her on the Warner Bros. lot, and the oft-married, significantly older "Wild" Bill changed his ways. The Wellmans had a long, happy marriage, with the director embracing a new lifestyle as the father of seven children; he made it a point to be home for dinner with the family and enjoyed taking his whole crew along on location trips.
Not long after Bill and Dottie met, he began preparing to film the "ripped from the headlines" Depression drama WILD BOYS OF THE ROAD (1933), about teenaged vagabonds fighting for survival. As Wellman Jr. tells it, producer Hal Wallis wanted to cast an actress like Jean Parker or Helen Mack in the key role as tomboy Sally. The director, however, had other ideas, and cast his freckle-faced love, Dottie, in the role, saying, "They're prettier than you, but you are prettier to me."
Dottie agreed to do the film and is absolutely wonderful, but she had no interest in an acting career. It would be her last screen appearance until playing a nurse in her husband's film THE STORY OF G.I. JOE (1945) a dozen years later. They're pictured here together on the set of WILD BOYS OF THE ROAD.
WILD BOYS OF THE ROAD is a gritty drama which takes place in the heart of the Depression. Eddie (Frankie Darro) and Tommy (Edwin Phillips) initially live the lives of ordinary high school kids, going to a dance and generally goofing off, but Tommy's mother is struggling to make ends meet, and soon Eddie's father (Grant Mitchell) is laid off. The boys ultimately decide their parents will have an easier time of it financially if they have fewer mouths to feed, and the boys hit the road in search of jobs.
The boys hop freight trains and travel the country, but jobs are hard to come by, and the police and railroad detectives are often waiting at stops to roust them off the trains.
Along the way, Eddie and Tommy meet Sally, who hides her braids under a cap so as not to call attention to her gender. Sally is hoping her aunt (Minna Gombell) in Chicago will take her in, and indeed, the aunt greets her with open arms -- and then the aunt's apartment, which is clearly a house of ill repute, is promptly raided. A very "pre-Code" moment.
The trio suffer some brutal experiences, including one character losing a leg and a friend (Ann Hovey) being attacked by a brutal railroad man (Ward Bond), but it's quite compelling viewing. The brisk 68-minute pace keeps things moving along quickly, which is a good thing or the viewer might become as downhearted as the characters. The location photography, including at the Southern Pacific Yard in Glendale, adds to the film's realism.
Life seems increasingly hopeless when the friends are arrested after inadvertently becoming involved in a robbery. Wellman's original ending, scripted by Earl Baldwin, was bleak, with the young people sent off to institutions.
Jack Warner insisted on a more upbeat ending, and though Wellman didn't like it, I don't think the change was a mistake. It's still clear that Tommy, Eddie, and Sally are going to face significant challenges, but the Depression wouldn't last forever, and audiences of the day probably could have used a ray of hope along with the dose of very tough social drama.
While Darro and Phillips are fine as the boys, it's Dottie Coonan who steals the show with her unique screen persona. The way she scrunches up her nose and eyes when she gives an especially happy smile is imitated by multiple characters who come in contact with her, and it's believable when she charms one official rounding up train-hoppers enough to be let go. Wellman also wrote in a scene where she tap dances on the sidewalk trying to make some money. She's a delight, and it makes one wish she'd had a longer film career, though she seems to have been very happy with her decision to focus on her family.
The supporting cast also includes Rochelle Hudson, Sterling Holloway, Arthur Hohl, Robert Barrat, and Alan Hale Jr. The movie was filmed by Arthur L. Todd.
WILD BOYS OF THE ROAD is available on DVD in the Forbidden Hollywood Collection, Vol. 3. Extras include a commentary track by William Wellman Jr. and Frank Thompson.
WILD BOYS OF THE ROAD is a very well-done, tough pre-Code Depression drama. Recommended.
Liz L said...
A fantastic post as usual! You really can't go wrong with a Wellman/Stanwyck pre-code can you? Thank you so much for joining in the blogathon! And I am still jealous of your getting to meet William Wellman Jr!
Aaahhh! Too many posts on my browser! NOT a Wellman/Stanwyck pre-code! This is actually one that I would love to see, especially after reading about it in Wellman's biography. I would also love to get a chance to see Dottie act! But yes, I am still jealous that you got to meet William Wellman Jr!
John/24Frames said...
Excellent review. One of my favorite Wellman films. For me, Wild Bill was at his best when he dealt with films having a social conscience like this one. I do disagree with you on the ending. I think the forced happy ending hurt the film. It goes against everything that came before. I do have to read the Wellman books. A great contribution!!!
Silver Screenings said...
This sounds like an intriguing film – thanks for the introduction!
I loved that you included Wm Wellman's practice of being home to have dinner with his family every night. What a wonderful gift to his children.
Summer Reeves said...
Again, the studios and their alternate endings! At least it was not a discredit to this film. Another film added to my "to watch list"! Great post!
-Summer Reeves | serendipitousanachronnisms.wordpress.com | Twitter: @kitschmeonce
Lê said...
Wellman's pre-Codes are always great, and this is one I haven't checked yet. I'm interested to see both the Depression-era theme and Dottie as an actress! Thanks for the tip, I'll look for this movie.
Don't forget to read my contribution to the blogathon! :)
Maricatrin said...
I think the sequence where Tommy loses his leg is a great example of how a scene can be horrifying, without really showing too much. Good direction and editing often lends more impact than special effects can.
And I also like the length, for the same reasons you do;-) I was curious as to what you'd think of this one, because it is pretty gritty, but still deeply involving. The young actors really suited their roles and did very well in them. Thanks for sharing your thoughts!
Thank you all so much for your comments! And especially thanks to Liz for hosting the blogathon! Liz, given how many contributions you have I'm amazed you have the time to go around leaving comments too, thank you for that!!
Very interested to get opinions on the ending! I'm kind of a softy anyway, but I tried to envision what it would feel like watching it in 1933 and I think I'd go out the door thoroughly depressed as it was originally designed... Maricatrin, I very much agree, less can be so much more.
Glad to know you wrote a post, Le, I'm working my way down the list of links at Now Voyaging trying to check out as many as I can, and I'll be sure to read yours.
Thanks to you all for stopping by and taking the time to comment!
Caftan Woman said...
Wellman detested having to change the ending and that somersault was his thumbing his nose at having to shoot the scene. Although the original bleak ending would have been more artistically organic, after becoming so emotionally involved with the characters I think the audience needed some little dash of hope (at least I know that I needed it).
Caftan Woman, what a great anecdote about the somersault!
The little dash of hope was appreciated by me...they were still going to have a tough time, keeping house who knows where in one case, missing a leg in another, etc.
Like John, I'm no fan of the forced happy ending, which is so untrue to the reality, but the rest of the film is brilliant. Definitely one of Wellman's finest pre-Codes and a haunting picture of the youngsters roaming the country during the Depression. Enjoyed your piece as always, Laura.


SUCCESS in the peace process of Mozambique and democratization in South Africa would greatly enhance the prospects for long-term stability and prosperity across southern Africa, says United Nations High Commissioner for Refugees (UNHCR) Sadako Ogata.
Mozambique is due to hold its first multiparty elections in October under the supervision of a 7,000-member UN peacekeeping force. The country's first democratic vote was originally scheduled to take place last fall as mandated by an October 1992 peace accord between the ruling Front for the Liberation of Mozambique and the former rebel Mozambican National Resistance Movement (Renamo).
The parties have agreed that elections will not proceed until a 30,000-strong unified army has been formed from 61,000 government and 19,000 rebel soldiers.
Failure to create an integrated army in Angola before that country's October 1992 elections is widely regarded as a major cause of the collapse of its transition to democracy. Jonas Savimbi's National Union for the Total Independence of Angola rejected Angola's election results and renewed the fighting.
Some 40,000 soldiers in Mozambique have already gathered in UN assembly points. Government forces were set to begin demobilizing today, followed by Renamo forces on March 18.
The 17-year conflict that followed independence from Portugal in 1976 - exacerbated by drought and famine - claimed an estimated 1 million lives and drove some 1.7 million Mozambicans to neighboring states such as Malawi, Zimbabwe, Zambia, South Africa, Tanzania, and Swaziland. In addition, an estimated 3.5 million people were internally displaced.
In a wide-ranging interview, Ogata told of how UNHCR's involvement in the region had paved the way for eventual cooperation with South Africa. UNHCR began its involvement in southern Africa with the repatriation of some 40,000 Namibian refugees before independence in March 1990. This led to the signing of the historic deal with Pretoria in September 1991 on the return of South African exiles and the follow-up agreement on all refugees in September last year.
Ogata announced on Feb. 28 a $1.2 million training and re-education project for some 15,000 political exiles who have returned to South Africa since September 1991. Some 7,000-odd returnees were repatriated under UNHCR auspices; a further 6,000 exiles returned home with the assistance of national liberation movements. About 2,000 exiles returned between February 1990 and September 1991 when UNHCR concluded the deal.
Not until September last year did UNHCR finally reach agreement with the Pretoria government over the status of an estimated 250,000 Mozambican refugees in the Eastern Transvaal.
The position of the Mozambican refugees in South Africa is complicated by a far larger - and ongoing - influx of illegal immigrants seeking jobs. These immigrants, estimated to number between 500,000 and 2.2 million, pose a major problem for South African law enforcement officers. And the influx has accelerated. In 1992, some 61,000 immigrants were repatriated at a cost of $4 million.
There is also a lack of enthusiasm among Mozambican refugees in South Africa for repatriation to a country that has been ravaged by war and famine.
Ogata says the repatriation of refugees would take time - perhaps three years - because of the duration and nature of the Mozambique conflict. She says the position of the estimated 250,000 Mozambican refugees in South Africa should not be confused with job-seeking immigrants. Negotiations would need to occur between the South African and Mozambican governments over the position of Mozambican refugees in the country, she says.
``We do not believe there is a reason for refugees to leave Mozambique today with the peace process underway and rehabilitation facilities for returnees,'' she adds.
Since UNHCR began its $203 million repatriation program in April last year, an estimated 600,000 Mozambican refugees have returned home - the vast majority of them spontaneously from Malawi. Between April and October, UNHCR expects 7000,000 refugees to return to Mozambique.


text:
Town Hall: Customer Data, Privacy & Third-Party Delivery
Everyone is talking about "who owns the data." Data privacy expert Odia Kagan joins our Town Hall to provide actionable insights.
Angela Diffly
Co-Founder, RTN
Customer data is the lifeblood of today's restaurants, allowing brands to make meaningful predictions about everything from inventory to staffing, menu optimization, loyalty offers, marketing, and so much more. But today's ever-changing legislative landscape means that restaurants must be careful about gathering and utilizing that data.
In this RTN Town Hall, Odia Kagan, Partner and Chair of GDPR Compliance & International Privacy, Fox Rothschild LLP, brings her expertise on the subject, and a lively Q&A provides further insight and guidance.
Click here to watch this Town Hall!


text:
Messi helps Barcelona to 4-1 win against Santander
Source: Agencies | September 23, 2009, Wednesday | Online Edition
LEO Messi scored twice as Barcelona thrashed Racing Santander 4-1 for its fourth win in as many games in the Spanish league yesterday.
Barcelona improved to three points clear in the standings, with Real Madrid due to play today. Barcelona has the maxiumum 12 points, with Madrid, Athletic Bilbao and Sevilla all three behind.
Sevilla handed Mallorca its first defeat by 2-0 with first-half scores from Sebastien Squillaci and Diego Perotti.
Zlatan Ibrahimovic headed Messi's cross from close range and the shot bounced in off defender Henrique for Barcelona's opener in the 20th minute.
In the 24th, Xavi Hernandez and Messi exchanged passes on the edge of Santander's area before the Argentina winger scored with a left-footed shot.
Three minutes later, defender Gerard Pique controled Ibrahimovic's backheel from inside the area and shot past goalkeeper Antonio Rodriguez.
Barcelona kept possession for long spells throughout and in the first half Santander failed to conjure a single serious chance.
"Mentally it's better when you have the ball, you enjoy it more and a high level of possession is what we look for in every game," Xavi said.
In the 45th, Ibrahimovic received a yellow card for a loose challenge on Nasief Morris and Messi appeared to score his second of the night at El Sardinero Stadium on the stroke of halftime, but he was ruled offside.
Ibrahimovic, who has scored in all four league games, needed treatment after injuring his ankle in the 46th. He returned to the field but was replaced in the 53rd by Pedro Rodriguez.
Barcelona appeared to relax in the second half, but Messi raised the temperature in the 68th, drifting past the Santander defense on the edge of the area and sending a left-foot shot into the top left corner of the goal. His fifth goal of the season made him the league top scorer.
Barcelona coach Pep Guardiola took off the Argentine a minute later and sent in Andres Iniesta, who recently returned from injury.
Santander finally got on the scoreboard in the 71st, when winger Oscar Serrano dribbled through the Barcelona defense and fired a left-footed shot into the top-left corner.
In the 87th, Santander's Laszlo Sepsi appeared to pull down Rodriguez in the area but referee Mateu Lahoz waved play on.
At Sevilla's Sanchez Pizjuan Stadium, defender Sebastien Squillaci headed in from an assist by fellow Frenchman Julien Escude in the 16th minute.
In the 25th, Jesus Navas combined with Luis Fabiano and passed for midfielder Perotti to head home in Sevilla's third win in four games.
Forward Alvaro Negredo, who moved to Sevilla from Real Madrid in the summer, had several chances in the first half but failed to get on the scoreboard.
In the second half, Mallorca replaced injured goalkeeper Dudu Aouate with German Lux.
In the 55th, Mallorca midfielder Borja Valero went on for Fernando, who had narrowly escaped a second yellow card for a rash challenge on Perotti moments earlier.
In the 63rd, goalscorer Perotti received an ovation from the crowd as he was replaced by fellow Argentine Diego Capel. Fernando Navarro then went on for the lively Navas on the right of midfield.
Villarreal's Argentina midfielder Ariel Ibagaza suffered muscle damage to his right leg during Sunday's match against Athletic Bilbao and will be sidelined for up to six weeks, the club said on Tuesday in a statement on its Web site.
On Wednesday it's Espanyol vs. Malaga, Villarreal vs. Real Madrid, Xerez vs. Deportivo La Coruna, Tenerife vs. Athletic Bilbao, Valladolid vs. Osasuna, Atletico Madrid vs. Almeria and Getafe vs. Valencia. On Thursday it's Sporting Gijon vs. Zaragoza.


text:
Unusual Visits to Villages and Towns
Learn by playing – Unusual Visits to Villages and Towns
It may be just a fantasy, but not to them. Children's play is pure reality and an essential part of their growth and happiness.
There is nothing more enjoyable than being able to play while on holiday, perhaps even discovering new cities and new landscapes. Nothing could be more funny and educational if, when you reach your destination, you can find challenging activities to engage in with your whole family. No more little hands reaching out for attention, no more yawning and whining... the hills of Langhe Monferrato Roero are "whimper free"! How did we achieve this? It was quite simple: by creating an incredible variety of activities for families. In this way, a visit to the city turns into an exciting team game in which families or groups of friends become crews who engage in competitions in search of hidden details of the city. Riddles and games that will test your intuition and imagination.
If you love music, if you always have tunes running through your head and you are a fan of the rhyming couplet, then you should not miss the guided rap tour: an innovative way to discover historic old towns where, in addition to the tour guide, you will also find a rapper and be involved in musical word games. And if you're not ready to play games or for hip hop... you can always take the Alba Family Tour with expert guides who narrate events that will fascinate both children and adults
Discover these new ways to visit the city, suitable for the whole family.
Have fun to the rhythm of rap and enjoy Alba's historical heritage and try your hand at making rhymes while keeping time. Challenge friends, but also strangers in puzzle games of skill by revealing not words but architectural and cultural treasures, experience with your children the magic of a tour especially designed for them: culture is made with rhythm and poetry in Langhe Monferrato Roero and plenty of fun is guaranteed.
Discover the Unusual Visits to Villages and Towns
Le Colline di Giuca (Educational Park)
Open Air Museums
Kid's Kit: Villages, Castles and Museums in Play
Child-friendly Castles and Museums


text:
Biografia

Insieme ad Andrea Gallina e all'accademia dei Jatrofisici si oppose al meccanismo flogistico di Herman Boerhaave. Appoggiato dai gesuiti si oppose ai principi leibniziano-wolffiani e fu allontanato dall'università di Catania in seguito alla nomina di Leonardo Gambino.

Faceva parte dei "Gioviali" e scrisse un melodramma, L'Argenide (1737).

Opere

Note

Collegamenti esterni

redpajama_set_name: RedPajamaWikipedia


WTM London 2018, the event where ideas arrive, and its co-located sister event Travel Forward experienced a massive 6% increase in visitors fuelled by an increase in senior travel and tourism industry professionals attending the event, according to unaudited figures.
WTM London 2018 (including the new travel technology event Travel Forward) saw visitor numbers – including exhibitor invitees, WTM Buyers' Club members and trade visitors – increase by 6% to 32,700.
Furthermore, members of the international media increased by 1% to 2,700. Overall participant numbers increased to 51,409 – making it one of the highest attended of the 39 WTM London's that have taken place since it launched in 1980.
The record number of visitors to WTM London – surpassing 2014's figure of 32,462 – was fuelled by a massive 39% increase in the key benchmark of exhibitor invitee visitors. Exhibitor invitees are among the most important and senior professionals in the travel and tourism industry, invited by exhibitors on the invite-only first day of the event to conduct high-level meetings and conclude business deals. A total of 17,567 exhibitor invitees attended WTM London across the three days of the event (Monday 5 – Wednesday 7 November), compared to 12,662 at the 2017 edition.
In total, WTM London experienced almost 89,000 (88,742) visits across the three days. The first day of the event (Monday 5 November) saw 27,240, Tuesday 6 November experienced 38,035 visits and the final day of the event (Wednesday 7 November) saw 23,467 people in attendance.
The event was also visited by 9,325 member of the prestigious WTM Buyers' Club alongside the exhibitor invitees these visitors will sign deals with exhibitors worth more than £3 billion.
Total participant numbers increased by 3% from 49,685 in 2017 to 51,409 in 2018.
WTM London 2018 was given a greater regional focus with the introduction of five regional Inspiration Zones – UK&I and International Hub, Europe, Asia, Americas and Middle East and Africa. These Inspiration Zones led to an increase in content, ideas and inspiration for participants to take back to their business and implement to help fuel the growth of the travel and tourism industry.
This strategy saw a greater number of senior CEOs and tourism ministers take part in the content programme – including easyJet's CEO Johan Lundgren and UK tourism minister Michael Ellis. While more research was added to the programme – including dedicated regional research sessions – from respected research organisations including Euromonitor International, Mintel, ForwardKeys and Nielsen.
Furthermore, the introduction of Travel Forward – the event to inspire the travel and hospitality industry with the next generation of technology – was a great success with more exhibitors than its predecessor The Travel Tech Show at WTM.
WTM London, Senior Director, Simon Press, said: "WTM London 2018 was a fantastic event and the most successful ever. WTM London is the event where ideas arrive and this was proved with a record number of exhibitor invitees in attendance making it among the highest attended events.
Audited figures from WTM London 2018 will be available in the New Year.
WTM London 2019 – the 40th event – will take place at ExCeL London on Monday 4 to Wednesday 6 November.
T>F Travel Forward is a new travel technology event co-located with WTM London 2018 and part of the WTM portfolio of events. The inaugural T>F Travel Forward conference, exhibition and buyer programme showcase the next-generation technology for travel and hospitality. Next event: 4-6 November 2019 – London. Next event: 4-6 November 2019 – London.
WTM Latin America, now in its seventh edition, attracts about 9,000 unique senior executives. The event generates about US$374 million of new business. Taking place in Sao Paulo, Brazil, this show attracts a global audience to meet and shape the direction of the travel industry. More than 7,000 unique visitors attend the event to network, negotiate and discover the latest industry news. http://latinamerica.wtm.com/. Next event: 2-4 April 2019 – Sao Paulo.
Arabian Travel Market (ATM) is the leading, international travel and tourism event in the Middle East for inbound and outbound tourism professionals. ATM 2018 attracted almost 40,000 industry professionals, with representation from 141 countries over the four days. The 25th edition of ATM showcased over 2,500 exhibiting companies across 12 halls at Dubai World Trade Centre. Arabian Travel Market 2019 will take place in Dubai from Sunday, 28th April to Wednesday, 1st May 2019. To find out more, please visit: www.arabiantravelmarket.wtm.com.


text:
Q: Reduce the size of vdots inside a table Consider the following table
\documentclass[12pt, bibliography=totocnumbered, listof=totoc]{scrartcl}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{lmodern}
\usepackage[ngerman]{babel}
\usepackage[flushleft]{threeparttable}
\usepackage{booktabs}
\usepackage{multirow}

\begin{document}
\begin{table}[h]
\centering
\begin{threeparttable}
\renewcommand*\TPTnoteLabel[1]{\parbox[b]{19pt}{\hfill#1}}
  \caption{DiD-Matching Schätzer}
  \label{tab:DiD}
\begin{tabular}{ccccc}
\toprule
 & Wertschöpfung & Beschäftigung & Gewinnspanne & Exporte \\
\toprule
\multicolumn{5}{l}{\textit{Jahresvergleiche: Vorbehandlungsperiode}} \\
\midrule
$t$ \\
2013 & $\hat{\tau}_{1,13}$ &  $\hat{\tau}_{2,13}$ & $\hat{\tau}_{3,13}$ & $\hat{\tau}_{4,13}$\\
2014 & \vdots &  \vdots & \vdots  & \vdots  \\
2015 &  & \\
2016 &  & \\
2017 & $\hat{\tau}_{1,17}$ &  $\hat{\tau}_{2,17}$ & $\hat{\tau}_{3,17}$ & $\hat{\tau}_{4,17}$\\
\noalign{\vskip 2mm}
\multicolumn{5}{l}{\textit{Vergleich: Aggregierte Vorbehandlungsperiode}} \\
\midrule
Phase III & $\hat{\tau}_{1,III}$ &  $\hat{\tau}_{2,III}$ & $\hat{\tau}_{3,III}$ & $\hat{\tau}_{4,III}$ \\
\bottomrule
\end{tabular}
\begin{tablenotes}
  \footnotesize
\item Aggregierte Vorbehandlungsperiode: $2003-2004$, Phase III: $2013-2017$.
    \end{tablenotes}
\end{threeparttable}
\end{table}
\end{document}

I am trying to reduce the size of \vdots so there should be additional distance between the table rows due to the size of \vdots

A: I don't know if I correctly understand you needs, but why don't use \multirow?
\documentclass[12pt, bibliography=totocnumbered, listof=totoc]{scrartcl}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{lmodern}
\usepackage[ngerman]{babel}
\usepackage[flushleft]{threeparttable}
\usepackage{booktabs}
\usepackage{multirow}

\begin{document}
\begin{table}[h]
\centering
\begin{threeparttable}
\renewcommand*\TPTnoteLabel[1]{\parbox[b]{19pt}{\hfill#1}}
  \caption{DiD-Matching Schätzer}
  \label{tab:DiD}
\begin{tabular}{ccccc}
\toprule
 & Wertschöpfung & Beschäftigung & Gewinnspanne & Exporte \\
\toprule
\multicolumn{5}{l}{\textit{Jahresvergleiche: Vorbehandlungsperiode}} \\
\midrule
$t$ \\
2013 & $\hat{\tau}_{1,13}$ &  $\hat{\tau}_{2,13}$ & $\hat{\tau}_{3,13}$ & $\hat{\tau}_{4,13}$\\
2014 & \multirow{3}{*}{\vdots} & \multirow{3}{*}{\vdots} & \multirow{3}{*}{\vdots}  & \multirow{3}{*}{\vdots}  \\
2015 &  & \\
2016 &  & \\
2017 & $\hat{\tau}_{1,17}$ &  $\hat{\tau}_{2,17}$ & $\hat{\tau}_{3,17}$ & $\hat{\tau}_{4,17}$\\
\noalign{\vskip 2mm}
\multicolumn{5}{l}{\textit{Vergleich: Aggregierte Vorbehandlungsperiode}} \\
\midrule
Phase III & $\hat{\tau}_{1,III}$ &  $\hat{\tau}_{2,III}$ & $\hat{\tau}_{3,III}$ & $\hat{\tau}_{4,III}$ \\
\bottomrule
\end{tabular}
\begin{tablenotes}
  \footnotesize
\item Aggregierte Vorbehandlungsperiode: $2003-2004$, Phase III: $2013-2017$.
    \end{tablenotes}
\end{threeparttable}
\end{table}
\end{document}


text:
Engine on PenAir Saab 340 shut down in flight.
Prem Mahendranathan November 9, 2017
PenAir Saab 340 aircraft made an emergency landing at Sand Point airport,Aleutians, Alaska on Tuesday, 7 November 2017. According to local news channel KUCB, The left engine shut down shortly after ta…
CFM signed a deal with Alaska Airlines for engine maintenance valued at $500million
Alaska Airlines and CFM International have signed a nine-year Rate Per Flight Hour (RPFH) maintenance agreement to support 128 CFM56-7B engines that power the airline's s fleet of Boeing Next-Generati…
450-pound seal removed from the runway of northern Alaskan airport at Utqiagvik.
Prem Mahendranathan October 26, 2017
A seal weighing around 204 kilograms was removed from the runway of the airport at Utqiagvik in Alaska. Though it's not uncommon for wildlife like polar bears to wander onto an airport's r…
World's first converted 737-700 freighter
Prem Mahendranathan September 27, 2017
Alaska Air Cargo introduced the first converted Boeing 737-700 cargo aircraft. The aircraft is the first of its kind in the world and was converted from an all-passenger to an all-freight aircraft. Th…
Pilot shortage hits Horizon Air
Horizon Air, operating for Alaska Airlines announced that it will cancel its daily service to Seattle service from Colorado Springs due to a pilot shortage. The service is expected to end on November …


text:
Northern Resistance Media
Of the People, By the People, For the People.
Texas Bill to Protect LGBTQ Youth from "Conversion Therapy" Gets First-Ever Hearing In House
Syndicated Stories	Human Rights Campaign	0
Post submitted by Elisabeth Rutledge, HRC state legislative team consultant
This month, for the first time ever, the Texas House held a hearing on HB 517, a bill introduced by Rep. Celia Israel to protect LGBTQ youth from the dangerous and discredited practice of so-called "conversion therapy." While Israel has introduced this bill every session since her election, this was the first time it had a hearing – a major step forward in a state legislature that spent this last session focused on several anti-LGBTQ bills.
When Israel was elected in January 2014, she was only the second LGBTQ woman in the Texas legislature, joining Rep. Mary González, who was first elected in 2012. In the 2018 election, three more openly LGBTQ women were elected to the House: Jessica González, Julie Johnson and Erin Zwiener. Together, they founded the state's first-ever LGBTQ Caucus, which counts more than 20 allies as members as well.
At the hearing on May 1 in the Public Health Committee, Israel testified about her own journey from self-doubt to being the openly LGBTQ leader that she is today. One hundred and fourteen people registered their support for this bill, and 49 registered their opposition.
The practice of "conversion therapy" is particularly cruel, as it tells vulnerable youth that the people closest to them — and society at large — believe they need to be "fixed." Bills like HB 517 and hearings like this can show LGBTQ youth that there are people fighting for them.
After the hearing, HB 517 was left pending in committee, and the deadline has passed for House bills to move forward this session. However, if history is any guide, Israel will introduce this bill again in the next legislative session in 2021. Perhaps then the House will be ready to move the bill further on behalf of LGBTQ youth across Texas.
There is no credible evidence that conversion therapy can change a person's sexual orientation or gender identity or expression. To the contrary, research has clearly shown that these practices pose devastating health risks for LGBTQ young people such as depression, decreased self-esteem, substance abuse, homelessness and even suicidal behavior. The harmful practice is condemned by every major medical and mental health organization, including the American Psychiatric Association, American Psychological Association, and American Medical Association.
Fifteen states and the District of Columbia have all enacted laws or regulations to protect minors from the harmful practice. Puerto Rico's Governor recently issued an executive order protecting minors in the commonwealth from the harmful practice. A growing number of municipalities have also enacted similar protections, including at least fifty cities and counties in Ohio, Pennsylvania, Washington, Florida, New York, Arizona and Wisconsin.More information on the lies and dangers of efforts to change sexual orientation or gender identity can be found here.
Syndication Source
Top VA Officials Used Personal Email to Communicate with Mar-a-Lago Members	EPIC Says FAA Drone App Should Track Drones
Follow NRM on Twiter
Tweets by nrmediadotorg
Except where otherwise noted, all works on this website are property of
Northern Resistance Media and are licensed under a
Creative Commons Attribution-ShareAlike 4.0 International License.
Site designed and maintained by Raymond Tec.
We use cookies to offer you a better browsing experience, analyze site traffic, personalize content, and serve targeted ads. Read how we use cookies and how you can control them in our Privacy Policy. By using our site, you consent to our use of cookies.Accept Read More


text:
Apple's First Retail Stores in Middle East Open October 29
Wednesday October 14, 2015 10:46 PM PDT by Joe Rossignol
Apple has announced that its first two retail stores in the Middle East will open in Abu Dhabi and Dubai, the two most populous cities in the United Arab Emirates, on Thursday, October 29. The nearest Apple Stores to the UAE are currently located several hours away in Istanbul, the largest city in Turkey.
The new Apple Store in Dubai will be located at the Mall of the Emirates, and will celebrate its grand opening at 4:00 PM local time, while the Abu Dhabi store will be located inside Yas Mall and hold its grand opening three hours later at 7:00 PM local time. Each store will open at 10 AM and close between 10 PM and midnight local time.
Apple has been rumored to be constructing the "world's largest" Apple Store in Dubai since August 2014, and began hiring for the upcoming UAE store that same month. Apple CEO Tim Cook visited the UAE in February 2014 to discuss the future of the IT sector with Prime Minister Shaikh Mohammed bin Rashid Al Maktoum and other officials.
Apple Watch will be available in Saudi Arabia and the UAE on October 22 as part of the wrist-worn device's eighth launch wave, a week in advance of both store openings. In the UAE, pricing for the Apple Watch Sport will start at 1,399 dirhams for the 38mm model, which is equivalent to approximately $380 in U.S. dollars.
@MacRumors @rsgnl pic.twitter.com/LMpdC38J8I — Hafez (@hafezberg) October 15, 2015
Both new Apple Stores will provide traditional services such as the Genius Bar, Events, Workshops and Personal Setup.
Note: Due to the political nature of the discussion regarding this topic, the discussion thread is located in our Politics, Religion, Social Issues forum. All forum members and site visitors are welcome to read and follow the thread, but posting is limited to forum members with at least 100 posts.
Tags: United Arab Emirates, Dubai, Abu Dhabi, Apple Store
springsup
If I were Apple I would have no dealings or sell my products to any country in the Middle East that are repressive to woman or gay people.
If Tim Cook is so anament about gay rights and woman's rights Apple should ban all sales of products and goods !!
I'm so sick of liberal elitist that don't put there money where there mouth is !!
Jobs would have never approved of this deal !!
It's not his company. He runs it, but he can be fired if he isn't doing what the shareholders want. He can't just inject his personal opinions in when it comes to who the company does business with. That's absolutely not what being the CEO of the world's largest corporation is all about.
Also, what good would it do? They would still get Apple's products, or competitor's product which does the same function, one way or another. Besides, women are able to buy and use Apple's products - the same products women in the rest of the world have access to - for their education, enjoyment, whatever. Their products aren't specifically prohibited from certain groups, otherwise they might have more to say on the matter.
I don't agree that Apple withholding sales from the ME would bring about any positive change there in those areas at all. Even if the entire technology industry followed suit and they were reduced to using inferior technology (or privately importing), it would just feel like bullying and snobbishness by foreigners who don't share their culture or understand their religion. You don't make change in foreign places; that's not your business. However, if you give them the right tools and information, you can help them make changes of their own accord. It needs to come from home. They need to realise for themselves why these changes are important and what benefits it has for their society. You can't impose that level of understanding on people.
Jacquesvw
mactactic
mrgraff
Ugh, it's unfortunate that Apple is giving in to these Stone Age barbarians but I guess money trumps values.
I can't even imagine living in a country with legally-imposed gender-specific areas…
taedouni
Doesn't Apple have stores in Russia? Last time I checked, being a homosexual in Russia was pretty rough. Anyway, Apple has been selling to middle east countries for years (online store). Apple is a corporation that relies on money. Hell, Apple has stores in China (one of the most oppressive countries).
If you are really concerned about human rights in the middle east, then you should urge the government to stop buying oil from the middle east (which I am all for).
Armstrong1889
They offer "Women Only" workshops !!


text:
Home International French nationals in Pakistan refuse to leave despite embassy requests
French nationals in Pakistan refuse to leave despite embassy requests
The French nationals in Pakistan are divided between shock, terror, and frustration in response to their embassy's request that they leave the country following rioting this week by a political party called Tehreek-e-Labbaik Pakistan.
Most people seem to have opted to stay put.
The French embassy in Islamabad advised French nationals and French firms to leave Pakistan temporarily due to "extreme threats" in a carefully worded three-line email followed by the words "urgent."
The email, which did not explain the extent of the threats, shocked and alarmed the small French population of a few hundred people.
Jean-Michel Quarantotti, who has been teaching French at the American School in Islamabad for three years, was informed of the embassy advisory by a student.
"I won't hide from you that at first, I felt a little bit of fear, panic," he told AFP.
"It's not my first foreign country — I did a lot before arriving in Pakistan — but I was really shocked. I didn't expect to go through this."
Also Read: Pakistan added to Red List of Travel Ban Countries by UK
His first reaction was to pack up and leave, but after debating the situation with coworkers, he said that logic triumphed over sentiment.
"The Pakistanis around me advised me to stay," he said. "They told me that they would protect me."
"It was very touching to see the solidarity around me, from people who told me: 'We are here for you, do not worry, we will defend you."
After the detention in Lahore of chief Saad Rizvi, who had called for a march on the capital to demand the removal of the French ambassador, the embassy statement came after days of violent protests organized by the now-proscribed Tehreek-e-Labbaik Pakistan (TLP).
Read more: کسی جتھے کو ریاست کو یرغمال بنانے کی اجازت نہیں دی جاسکتی: شیخ رشید
During the rioting, four police officers were killed.
Many of the French people contacted by AFP challenged the timing of the embassy's letter, given that the Pakistani government had just declared the ban on the TLP and seemed to be in charge of the situation.
Maria Imtiaz


HealthJoy, a Chicago, IL-based chat-based app that gives users access to doctors, healthcare concierges, insurance experts, and healthcare comparison shoppers, closed a $3M Series A round of funding.
The round was led by Chicago Ventures, with participation from Social Capital, Sidekick Fund, and seed-round lead GoHealth as well as angels Andrew Sieja, CEO of KCura; Brad Hoover, CEO of Grammarly, Ben Evans, CEO of OurHealth, Eduardo Vivas, Founder of Bright.com, and Jason Theofilis, CEO of MUNDOMedia.
The company intends to use the funds to expand its national network of distribution partners, build and grow strategic partnerships with innovative service, data and technology companies that enhance the capabilities of the platform and hire people in Chicago and remotely to improve the product, empower the customers, and support the team.
Led by Shanu Kurd, Doug Morse-Schindler, and Justin Holland, HealthJoy provides consumers with a chat-based app that combines a team of board-certified doctors, veteran insurance experts, dedicated healthcare concierges and a proactive chatbot, to protect out-of-pocket expenses. The platform is distributed to HR teams at companies of any size, from 5 to 500,000 employees across the country through benefit advisors, third-party administrators, and health plans.
In addition to the funding, HealthJoy has just been named a preferred technology partner to the Benefit Advisors Network, the nation's premier credentialed network of independent benefit advisory and consulting companies.


Blowout Sale! Up to 51% off on Pot Racks at Three Guys Pies, Page 7. Top brands include Old Dutch, Enclume, BUNN, Concept Housewares, BaHoki Essentials, ZESPROKA, MyGift, Extreme Matters, Franklin Brass, Wallniture, VDOMUS, LOUHO, Sorbus, & Bovado USA. Hurry! Limited time offers. Offers valid only while supplies last.
Old Dutch Wall-Mount Pot Rack with Grid & 12 Hooks, Graphite, 36" x 9" x 10.75"


An art therapy project created by a third-year mental health student has been improving the self esteem and social skills of patients while creating an opportunity for the nurse to observe and assess.
Mark Collins, who is studying at the University of Ulster Magee, created a Tree of Regrowth and Recovery to display patients' artwork during a six-week placement at Waterside Hospital, Western Health and Social Care Trust. It earned him a final place in the Andrew Parker Student Nurse Award, in association with RCN Fellows, at the Nursing Standard Nurse Awards.
Mark will find out if he has won at a ceremony at the Savoy Hotel, London, on May 1.
During his placement in an acute mental health ward for over-65s, he noticed that there were no group activities for patients. Mark had switched from art studies to mental health nursing when his cousin committed suicide but thought he could use those skills to promote social interaction on the ward.
'I thought this was an area I could develop - and using my art background I tried to create something that would motivate them to join in,' Mark explains.
He discussed his ideas with his mentor and the multidisciplinary team and explained why he thought it would benefit the service users.
The ward manager gave him £20 from her kitty and he went on eBay, buying the materials he needed for just £10.
'I also talked to the service users to see how they felt about it to ensure it was a positive experience from the beginning. They told me the things that made them happy were being around wildlife and nature - such as birds, so I used that as the project theme.
'I decided to create a colourful tree surrounded by owls and birds - the Tree of Regrowth and Recovery - which was placed on the wall of the corridor.
'Any finished artwork was placed around it to show what the service users had achieved,' Mark explains.
It became on ongoing project. Every time he was on shift, Mark would invite the service users to get together to paint or draw.
'I encouraged the service users to focus on what made them happy. One said that to be happy you need to have hope so I said 'why don't you do something that brings that into it' and he did. Another with late Parkinsons was really happy about his work and got friend to mount and frame it - there has even been a bit of competition about the display in a positive way!
Being together and talking improved their social skills, and having a goal to work towards gave them a sense of achievement, which promoted their self-esteem.
Feedback from the multidisciplinary team was very positive and participation was included in the care plans of service users who responded well to the project.
His mentor, senior staff nurse Jackie O'Doherty, says Mark proved to be an exemplary student during his placement. 'Using his skills, manner and enthusiasm, he inspired and engaged with patients and service users to enable them to participate in art therapy sessions initially. He then developed the Regrowth and Recovery project.
The judges also felt that Mark's passion for mental health nursing really shone through and praised him for using his skills and knowledge outside nursing to benefit his patients. They were impressed that he had used art to open up communication as a nurse rather than as an art therapist.
He is currently making a business case to extend it and intends to replicate the project where he can. 'In this instance, my placement happened to be with patients aged over 65 and on an acute ward but it would work with all ages and in any setting. I would like to show other nurses how to deliver it. I facilitated it but the service users made it work.


You might recall not long ago the passenger being dragged off a United Airlines flight – apparently at one point unconscious as he was pulled by his feet down the aisle. You may have seen the public "apology" and then the inevitably leaked internal email to United employees about the incident.
I'm not here to discuss the finer points of crisis management. My organisation has been brought in to handle the tone, language and perception of a number of crises. From that perspective, I can reliably inform you that United's CEO, Oscar Munoz, was not using any playbook with which I am familiar, and indeed his language in external and internal communications was lacking in anything like a 'finer point'.
Most companies will not find themselves in the midst of such a stark and public example of leadership and organisational failure, and while some will look on smugly while this incident focuses media and public attention away from their own workplaces, with a "this could never happen here" attitude, I want to talk about the precursor to treating a person like oversized cabin luggage.
What does it take for a person to be so dehumanised by an organisation that they can literally be dragged for refusing to take part in a process referred to as "voluntary"?
While this incident was happening, I was speaking to a group of senior doctors about the dangers of our processes and policies, as well as the often onerous and arbitrary personal and organisational targets. These create an environment that systematically dehumanises our colleagues, not to mention our patients and their families, a near inevitability.
We are literally living in a time where our brightest minds are trying to create human-like machine (code) while making people themselves, more machine-like.
If you add to those factors the habituation and desensitisation effect of being supremely familiar with your environment and eminently competent at your job, you create a stew of volatile ingredients. When combined with the impact of the 'cult of busy' that mandates that any 'serious professional' look and sound like they have no time to breathe, it's a recipe for a disaster. This is epitomised by the treatment of a human being (and fully paid customer) as a logistical inconvenience on that United flight, and the subsequent company rhetoric.
If you don't believe me on the 'cult of busy' then think about the last time you met a client, distant colleague or even a casual friend for a drink after work and didn't answer the question, "How are things with you?" with some derivation of "Really busy!" It's almost mandatory now – as if you couldn't be any good if you weren't busy.
Even the language of People functions to foster commoditisation: employees are a 'human resource' – a label bound, if not designed, to purge people of their humanity when being discussed by a third party. We call our employees "talent" – and then stream them into "high-potential" and 'everything else' – rather than recognising that with people we need to be more nuanced and understand that each person, if engaged and included, really will have some unique and important abilities to bring to the organisation. Indeed, perhaps it's time to recognise the fact that if that's not the case, then it's the recruitment process, not the people themselves that are broken.
It's ironic that we live in a working world where were two fascinating processes are happening at the same time: data mining, and the creation of generic, almost cookie-cutter-like workforces.
We are mining data at an unprecedented rate and creating ever smarter algorithms in an attempt to mimic human intelligence. At the same time, organisations operate with policies, procedures, language, an approach to people, and fixed mindsets around inclusion and human capability that turn people into predictable, indistinguishable and ultimately disposable automatons.
When you turn people into machines, commodities or 'resources', you can do unconscionable things to them because the moment someone is less than human – even by a fraction – what we consider reasonable in their treatment changes radically – and not for the better.
Suddenly, it becomes acceptable to demand complete compliance to even the most egregious of orders, to eschew outside responsibilities to loved ones and partners in service of their employer and by treating a person less well than excess baggage. This happens despite, as we saw with United Airlines, the existential threat to their own brand and stock price.
In the grand scheme of some epic Gantt chart to greatness on the wall of an organisation's head office, there will be a line item for necessary "broken eggs". Sometimes this is a euphemism for colleagues who will be asked to sacrifice for the greater good, and sometimes it's a customer or client, like a doctor trying to get back to his family and patients.
If we aren't very careful we are recreating an existence where people are not quite full people. History is littered with examples of this 'less than' mindset – such as the holocaust and the African Americans of the post-slavery and Jim Crowe era, and the ramifications of those decisions are still being felt today.
The words that define our organisational success in the future are transformation, innovation, disruption and resilience. These words are human words – intrinsically tied to properties that only humans (for now) can manifest. Every moment an employee in any company feels less human, they are less and less able, not to mention willing, to demonstrate those qualities we have collectively decided are so important to our future thriving workplaces.
It may well be easier to work with machines, but for organisations that are truly serious about competing in a future world of work, seeing people as human as possible will be how they achieve their shared goals.


text:
Q: Best approach to read and write large files with collective MPI-IO I would like to read and write large data sets in Fortran using MPI-IO. My preferred approach would be to use a MPI type defined with MPI_type_create_subarray with a single dimension to describe the view of each process to the file. My Fortran code thus looks like this:
  ! A contiguous type to describe the vector per element.
  ! MPI_TYPE_CONTIGUOUS(COUNT, OLDTYPE, NEWTYPE, IERROR)
  call MPI_Type_contiguous(nComponents, rk_mpi, &
    &                      me%vectype, iError)
  call MPI_Type_commit( me%vectype, iError )

  ! A subarray to describe the view of this process on the file.
  ! MPI_TYPE_CREATE_SUBARRAY(ndims, array_of_sizes, array_of_subsizes,
  !                          array_of_starts, order, oldtype, newtype, ierror)
  call MPI_Type_create_subarray( 1, [ globElems ], [ locElems ], &
    &                           [ elemOff ], MPI_ORDER_FORTRAN, &
    &                           me%vectype, me%ftype, iError)

However, array_of_sizes and array_of_starts, describing global quantities are just "normal" integers in the MPI-Interface. Thus there is a limit at about 2 billion elements with this approach.
Is there another interface, which uses MPI_OFFSET_KIND for these global values?
The only way to work around this, I see so far, is using the displacement option in the MPI_File_set_view instead of defining the view with the help of the subarray MPI type. However this "feels" wrong. Would you expect a performance impact in either approach for collective IO? Does anybody know, if this interface will change in MPI-3?
Maybe I should use some other MPI type?
What is the recommended solution here to write large data files with collective IO efficiently in parallel to disk?

A: Help is coming.
In MPI-3, there will be datatype manipulation routines that use MPI_Count instead of an int.   For backwards compatability (groan) the existing routines won't change, but you should be able to make your type.
But for now..
For subarray in particular, though, this isn't usually thought of as a huge issue at the moment - even for a 2d array, indices of 2 billion give you an array size of 4x1018 which is admittedly pretty large (but exactly the sort of numbers targetted for exascale-type computing).   In higher dimensions, it's even larger.
In 1d, though, a list of numbers 2 billion long is only ~8GB which isn't by any stretch big data, and I think that's the situation you find yourself in.   My suggstion would be to leave it in the form you have it now for as long as you can.   Is there a common factor in the local elements?   You can work around this by bundling up the types in units of (say) 10 vectypes if that works - for your code it shouldn't matter, but it would reduce by that same factor the numbers in the locElements and globElements.  Otherwise, yes, you could always use the displacement field in file set view.