text:
package org.axonframework.micrometer;

import org.axonframework.messaging.Message;
import org.axonframework.monitoring.MessageMonitor;

import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
import java.util.function.Function;
import javax.annotation.Nonnull;

/**
 * A {@link MessageMonitor} implementation which creates a new MessageMonitor for every {@link Message} payload type
 * ingested by it. The PayloadTypeMessageMonitorWrapper keeps track of all distinct payload types it has created
 * and only creates a new one if there is none present.
 * <p>
 * The type of MessageMonitor which is created for every payload type is configurable, as long as it implements
 * MessageMonitor}.
 *
 * @param <T> The type of the MessageMonitor created for every payload type.Must implement both {@link MessageMonitor}
 * @author Steven van Beelen
 * @author Marijn van Zelst
 * @since 4.1
 * @deprecated As of release 4.4, replaced by using {@link Tag}s on the monitor implementations.
 * Use {@link org.axonframework.micrometer.GlobalMetricRegistry#registerWithConfigurerWithDefaultTags(Configurer) to achieve the same behavior as this implementation.
 */
@Deprecated
public class PayloadTypeMessageMonitorWrapper<T extends MessageMonitor<Message<?>>>
        implements MessageMonitor<Message<?>> {

    private final Function<String, T> monitorSupplier;
    private final Map<String, T> payloadTypeMonitors;
    private final Function<Class<?>, String> monitorNameBuilder;

    /**
     * Create a PayloadTypeMessageMonitorWrapper which builds monitors through a given {@code monitorSupplier} for
     * every message payload type encountered.
     *
     * @param monitorSupplier A Supplier of MessageMonitors of type {@code T} for every encountered payload type
     */
    public PayloadTypeMessageMonitorWrapper(Function<String, T> monitorSupplier) {
        this(monitorSupplier, Class::getName);
    }

    /**
     * Create a PayloadTypeMessageMonitorWrapper which builds monitors through a given {@code monitorSupplier} for
     * every message payload type encountered and sets the monitor name as specified by the {@code monitorNameBuilder}.
     *
     * @param monitorSupplier    A Function to create a MessageMonitor of type {@code T}, with the given {@code String}
     *                           as name, for every encountered payload type
     * @param monitorNameBuilder A Function where the payload type is the input (of type {@code Class<?>}) and output
     *                           is the desired name for the monitor (of type {@code String})
     */
    public PayloadTypeMessageMonitorWrapper(Function<String, T> monitorSupplier,
                                            Function<Class<?>, String> monitorNameBuilder) {
        this.monitorSupplier = monitorSupplier;
        this.payloadTypeMonitors = new ConcurrentHashMap<>();
        this.monitorNameBuilder = monitorNameBuilder;
    }

    @Override
    public MonitorCallback onMessageIngested(@Nonnull Message<?> message) {
        String monitorName = monitorNameBuilder.apply(message.getPayloadType());

        MessageMonitor<Message<?>> messageMonitorForPayloadType =
                payloadTypeMonitors.computeIfAbsent(monitorName, monitorSupplier);

        return messageMonitorForPayloadType.onMessageIngested(message);
    }
}


text:
package sun.security.ssl;

import java.net.Socket;
import javax.net.ssl.SSLSession;

import java.util.*;
import java.security.*;
import java.security.cert.*;
import javax.net.ssl.*;

import sun.security.validator.*;
import sun.security.util.HostnameChecker;

/**
 * This class implements the SunJSSE X.509 trust manager using the internal
 * validator API in J2SE core. The logic in this class is minimal.

 *

 * This class supports both the Simple validation algorithm from previous
 * JSSE versions and PKIX validation. Currently, it is not possible for the
 * application to specify PKIX parameters other than trust anchors. This will
 * be fixed in a future release using new APIs. When that happens, it may also
 * make sense to separate the Simple and PKIX trust managers into separate
 * classes.
 *
 * @author Andreas Sterbenz
 */
final class X509TrustManagerImpl extends X509ExtendedTrustManager
        implements X509TrustManager {

    private final String validatorType;

    /**
     * The Set of trusted X509Certificates.
     */
    private final Collection<X509Certificate> trustedCerts;

    private final PKIXBuilderParameters pkixParams;

    // note that we need separate validator for client and server due to
    // the different extension checks. They are initialized lazily on demand.
    private volatile Validator clientValidator, serverValidator;

    private static final Debug debug = Debug.getInstance("ssl");

    X509TrustManagerImpl(String validatorType, KeyStore ks)
            throws KeyStoreException {
        this.validatorType = validatorType;
        this.pkixParams = null;
        if (ks == null) {
            trustedCerts = Collections.<X509Certificate>emptySet();
        } else {
            trustedCerts = KeyStores.getTrustedCerts(ks);
        }
        showTrustedCerts();
    }

    X509TrustManagerImpl(String validatorType, PKIXBuilderParameters params) {
        this.validatorType = validatorType;
        this.pkixParams = params;
        // create server validator eagerly so that we can conveniently
        // get the trusted certificates
        // clients need it anyway eventually, and servers will not mind
        // the little extra footprint
        Validator v = getValidator(Validator.VAR_TLS_SERVER);
        trustedCerts = v.getTrustedCertificates();
        serverValidator = v;
        showTrustedCerts();
    }

    @Override
    public void checkClientTrusted(X509Certificate chain[], String authType)
            throws CertificateException {
        checkTrusted(chain, authType, (Socket)null, true);
    }

    @Override
    public void checkServerTrusted(X509Certificate chain[], String authType)
            throws CertificateException {
        checkTrusted(chain, authType, (Socket)null, false);
    }

    @Override
    public X509Certificate[] getAcceptedIssuers() {
        X509Certificate[] certsArray = new X509Certificate[trustedCerts.size()];
        trustedCerts.toArray(certsArray);
        return certsArray;
    }

    @Override
    public void checkClientTrusted(X509Certificate[] chain, String authType,
                Socket socket) throws CertificateException {
        checkTrusted(chain, authType, socket, true);
    }

    @Override
    public void checkServerTrusted(X509Certificate[] chain, String authType,
            Socket socket) throws CertificateException {
        checkTrusted(chain, authType, socket, false);
    }

    @Override
    public void checkClientTrusted(X509Certificate[] chain, String authType,
            SSLEngine engine) throws CertificateException {
        checkTrusted(chain, authType, engine, true);
    }

    @Override
    public void checkServerTrusted(X509Certificate[] chain, String authType,
            SSLEngine engine) throws CertificateException {
        checkTrusted(chain, authType, engine, false);
    }

    private Validator checkTrustedInit(X509Certificate[] chain,
                                        String authType, boolean isClient) {
        if (chain == null || chain.length == 0) {
            throw new IllegalArgumentException(
                "null or zero-length certificate chain");
        }

        if (authType == null || authType.length() == 0) {
            throw new IllegalArgumentException(
                "null or zero-length authentication type");
        }

        Validator v = null;
        if (isClient) {
            v = clientValidator;
            if (v == null) {
                synchronized (this) {
                    v = clientValidator;
                    if (v == null) {
                        v = getValidator(Validator.VAR_TLS_CLIENT);
                        clientValidator = v;
                    }
                }
            }
        } else {
            // assume double checked locking with a volatile flag works
            // (guaranteed under the new Tiger memory model)
            v = serverValidator;
            if (v == null) {
                synchronized (this) {
                    v = serverValidator;
                    if (v == null) {
                        v = getValidator(Validator.VAR_TLS_SERVER);
                        serverValidator = v;
                    }
                }
            }
        }

        return v;
    }

    private void checkTrusted(X509Certificate[] chain, String authType,
                Socket socket, boolean isClient) throws CertificateException {
        Validator v = checkTrustedInit(chain, authType, isClient);

        AlgorithmConstraints constraints = null;
        if ((socket != null) && socket.isConnected() &&
                                        (socket instanceof SSLSocket)) {

            SSLSocket sslSocket = (SSLSocket)socket;
            SSLSession session = sslSocket.getHandshakeSession();
            if (session == null) {
                throw new CertificateException("No handshake session");
            }

            // check endpoint identity
            String identityAlg = sslSocket.getSSLParameters().
                                        getEndpointIdentificationAlgorithm();
            if (identityAlg != null && identityAlg.length() != 0) {
                checkIdentity(session, chain[0], identityAlg, isClient,
                        getRequestedServerNames(socket));
            }

            // create the algorithm constraints
            ProtocolVersion protocolVersion =
                ProtocolVersion.valueOf(session.getProtocol());
            if (protocolVersion.v >= ProtocolVersion.TLS12.v) {
                if (session instanceof ExtendedSSLSession) {
                    ExtendedSSLSession extSession =
                                    (ExtendedSSLSession)session;
                    String[] localSupportedSignAlgs =
                            extSession.getLocalSupportedSignatureAlgorithms();

                    constraints = new SSLAlgorithmConstraints(
                                    sslSocket, localSupportedSignAlgs, false);
                } else {
                    constraints =
                            new SSLAlgorithmConstraints(sslSocket, false);
                }
            } else {
                constraints = new SSLAlgorithmConstraints(sslSocket, false);
            }
        }

        X509Certificate[] trustedChain = null;
        if (isClient) {
            trustedChain = validate(v, chain, constraints, null);
        } else {
            trustedChain = validate(v, chain, constraints, authType);
        }
        if (debug != null && Debug.isOn("trustmanager")) {
            System.out.println("Found trusted certificate:");
            System.out.println(trustedChain[trustedChain.length - 1]);
        }
    }

    private void checkTrusted(X509Certificate[] chain, String authType,
            SSLEngine engine, boolean isClient) throws CertificateException {
        Validator v = checkTrustedInit(chain, authType, isClient);

        AlgorithmConstraints constraints = null;
        if (engine != null) {
            SSLSession session = engine.getHandshakeSession();
            if (session == null) {
                throw new CertificateException("No handshake session");
            }

            // check endpoint identity
            String identityAlg = engine.getSSLParameters().
                                        getEndpointIdentificationAlgorithm();
            if (identityAlg != null && identityAlg.length() != 0) {
                checkIdentity(session, chain[0], identityAlg, isClient,
                        getRequestedServerNames(engine));
            }

            // create the algorithm constraints
            ProtocolVersion protocolVersion =
                ProtocolVersion.valueOf(session.getProtocol());
            if (protocolVersion.v >= ProtocolVersion.TLS12.v) {
                if (session instanceof ExtendedSSLSession) {
                    ExtendedSSLSession extSession =
                                    (ExtendedSSLSession)session;
                    String[] localSupportedSignAlgs =
                            extSession.getLocalSupportedSignatureAlgorithms();

                    constraints = new SSLAlgorithmConstraints(
                                    engine, localSupportedSignAlgs, false);
                } else {
                    constraints =
                            new SSLAlgorithmConstraints(engine, false);
                }
            } else {
                constraints = new SSLAlgorithmConstraints(engine, false);
            }
        }

        X509Certificate[] trustedChain = null;
        if (isClient) {
            trustedChain = validate(v, chain, constraints, null);
        } else {
            trustedChain = validate(v, chain, constraints, authType);
        }
        if (debug != null && Debug.isOn("trustmanager")) {
            System.out.println("Found trusted certificate:");
            System.out.println(trustedChain[trustedChain.length - 1]);
        }
    }

    private void showTrustedCerts() {
        if (debug != null && Debug.isOn("trustmanager")) {
            for (X509Certificate cert : trustedCerts) {
                System.out.println("adding as trusted cert:");
                System.out.println("  Subject: "
                                        + cert.getSubjectX500Principal());
                System.out.println("  Issuer:  "
                                        + cert.getIssuerX500Principal());
                System.out.println("  Algorithm: "
                                        + cert.getPublicKey().getAlgorithm()
                                        + "; Serial number: 0x"
                                        + cert.getSerialNumber().toString(16));
                System.out.println("  Valid from "
                                        + cert.getNotBefore() + " until "
                                        + cert.getNotAfter());
                System.out.println();
            }
        }
    }

    private Validator getValidator(String variant) {
        Validator v;
        if (pkixParams == null) {
            v = Validator.getInstance(validatorType, variant, trustedCerts);
        } else {
            v = Validator.getInstance(validatorType, variant, pkixParams);
        }
        return v;
    }

    private static X509Certificate[] validate(Validator v,
            X509Certificate[] chain, AlgorithmConstraints constraints,
            String authType) throws CertificateException {
        Object o = JsseJce.beginFipsProvider();
        try {
            return v.validate(chain, null, constraints, authType);
        } finally {
            JsseJce.endFipsProvider(o);
        }
    }

    // Get string representation of HostName from a list of server names.
    //
    // We are only accepting host_name name type in the list.
    private static String getHostNameInSNI(List<SNIServerName> sniNames) {

        SNIHostName hostname = null;
        for (SNIServerName sniName : sniNames) {
            if (sniName.getType() != StandardConstants.SNI_HOST_NAME) {
                continue;
            }

            if (sniName instanceof SNIHostName) {
                hostname = (SNIHostName)sniName;
            } else {
                try {
                    hostname = new SNIHostName(sniName.getEncoded());
                } catch (IllegalArgumentException iae) {
                    // unlikely to happen, just in case ...
                    if ((debug != null) && Debug.isOn("trustmanager")) {
                        System.out.println("Illegal server name: " + sniName);
                    }
                }
            }

            // no more than server name of the same name type
            break;
        }

        if (hostname != null) {
            return hostname.getAsciiName();
        }

        return null;
    }

    // Also used by X509KeyManagerImpl
    static List<SNIServerName> getRequestedServerNames(Socket socket) {
        if (socket != null && socket.isConnected() &&
                                        socket instanceof SSLSocket) {

            SSLSocket sslSocket = (SSLSocket)socket;
            SSLSession session = sslSocket.getHandshakeSession();

            if (session != null && (session instanceof ExtendedSSLSession)) {
                ExtendedSSLSession extSession = (ExtendedSSLSession)session;
                return extSession.getRequestedServerNames();
            }
        }

        return Collections.<SNIServerName>emptyList();
    }

    // Also used by X509KeyManagerImpl
    static List<SNIServerName> getRequestedServerNames(SSLEngine engine) {
        if (engine != null) {
            SSLSession session = engine.getHandshakeSession();

            if (session != null && (session instanceof ExtendedSSLSession)) {
                ExtendedSSLSession extSession = (ExtendedSSLSession)session;
                return extSession.getRequestedServerNames();
            }
        }

        return Collections.<SNIServerName>emptyList();
    }

    /*
     * Per RFC 6066, if an application negotiates a server name using an
     * application protocol and then upgrades to TLS, and if a server_name
     * extension is sent, then the extension SHOULD contain the same name
     * that was negotiated in the application protocol.  If the server_name
     * is established in the TLS session handshake, the client SHOULD NOT
     * attempt to request a different server name at the application layer.
     *
     * According to the above spec, we only need to check either the identity
     * in server_name extension or the peer host of the connection.  Peer host
     * is not always a reliable fully qualified domain name. The HostName in
     * server_name extension is more reliable than peer host. So we prefer
     * the identity checking aginst the server_name extension if present, and
     * may failove to peer host checking.
     */
    private static void checkIdentity(SSLSession session,
            X509Certificate cert,
            String algorithm,
            boolean isClient,
            List<SNIServerName> sniNames) throws CertificateException {

        boolean identifiable = false;
        String peerHost = session.getPeerHost();
        if (isClient) {
            String hostname = getHostNameInSNI(sniNames);
            if (hostname != null) {
                try {
                    checkIdentity(hostname, cert, algorithm);
                    identifiable = true;
                } catch (CertificateException ce) {
                    if (hostname.equalsIgnoreCase(peerHost)) {
                        throw ce;
                    }

                    // otherwisw, failover to check peer host
                }
            }
        }

        if (!identifiable) {
            checkIdentity(peerHost, cert, algorithm);
        }
    }

    /*
     * Identify the peer by its certificate and hostname.
     *
     * Lifted from sun.net.www.protocol.https.HttpsClient.
     */
    static void checkIdentity(String hostname, X509Certificate cert,
            String algorithm) throws CertificateException {
        if (algorithm != null && algorithm.length() != 0) {
            // if IPv6 strip off the "[]"
            if ((hostname != null) && hostname.startsWith("[") &&
                    hostname.endsWith("]")) {
                hostname = hostname.substring(1, hostname.length() - 1);
            }

            if (algorithm.equalsIgnoreCase("HTTPS")) {
                HostnameChecker.getInstance(HostnameChecker.TYPE_TLS).match(
                        hostname, cert);
            } else if (algorithm.equalsIgnoreCase("LDAP") ||
                    algorithm.equalsIgnoreCase("LDAPS")) {
                HostnameChecker.getInstance(HostnameChecker.TYPE_LDAP).match(
                        hostname, cert);
            } else {
                throw new CertificateException(
                        "Unknown identification algorithm: " + algorithm);
            }
        }
    }
}

redpajama_set_name: RedPajamaGithub


text:
from context import Timer
import unittest
import time

class test_time_input(unittest.TestCase):

	def test_start_on_init(self):
		input = Timer('timer')
		t = input.read()
		self.assertGreater(t, 0)

	def test_seconds_interval(self):
		input1 = Timer('timer')
		input2 = Timer('timer', 's')
		time.sleep(10)
		t1 = input1.read()
		t2 = input2.read()
		self.assertGreater(t1, 9)
		self.assertGreater(t2, 9)
		self.assertLess(t1, 11)
		self.assertLess(t2, 11)

	def test_reset(self):
		input = Timer('timer', 's')
		time.sleep(5)
		t = input.read()
		self.assertGreater(t, 4)
		input.start_time()
		t = input.read()
		self.assertLess(t, 1)

	def test_millis(self):
		input = Timer('timer', 'ms')
		time.sleep(1)
		t = input.read()
		self.assertGreater(t, 900)
		self.assertLess(t, 1100)

	def test_mins(self):
		input = Timer('timer', 'm')
		time.sleep(3)
		t = input.read()
		self.assertLess(t, 1)

if __name__ == 'main':
	unittest.main()


text:
<!DOCTYPE html>

        <meta charset="UTF-8">
        <title>Space Invaders</title>


text:
package org.dom4j.dom;

import org.dom4j.tree.DefaultDocumentType;

import org.w3c.dom.DOMException;
import org.w3c.dom.Document;
import org.w3c.dom.NamedNodeMap;
import org.w3c.dom.NodeList;

/**
 *

 * DOMDocumentType implements a DocumentType node which supports
 * the W3C DOM API.
 *

 *
 * @author James Strachan
 * @version $Revision: 1.11 $
 */
public class DOMDocumentType extends DefaultDocumentType implements
        org.w3c.dom.DocumentType {
    public DOMDocumentType() {
    }

    public DOMDocumentType(String elementName, String systemID) {
        super(elementName, systemID);
    }

    public DOMDocumentType(String name, String publicID, String systemID) {
        super(name, publicID, systemID);
    }

    // org.w3c.dom.Node interface
    // -------------------------------------------------------------------------
    public boolean supports(String feature, String version) {
        return DOMNodeHelper.supports(this, feature, version);
    }

    public String getNamespaceURI() {
        return DOMNodeHelper.getNamespaceURI(this);
    }

    public String getPrefix() {
        return DOMNodeHelper.getPrefix(this);
    }

    public void setPrefix(String prefix) throws DOMException {
        DOMNodeHelper.setPrefix(this, prefix);
    }

    public String getLocalName() {
        return DOMNodeHelper.getLocalName(this);
    }

    public String getNodeName() {
        return getName();
    }

    // already part of API
    //
    // public short getNodeType();
    public String getNodeValue() throws DOMException {
        return null;
    }

    public void setNodeValue(String nodeValue) throws DOMException {
    }

    public org.w3c.dom.Node getParentNode() {
        return DOMNodeHelper.getParentNode(this);
    }

    public NodeList getChildNodes() {
        return DOMNodeHelper.getChildNodes(this);
    }

    public org.w3c.dom.Node getFirstChild() {
        return DOMNodeHelper.getFirstChild(this);
    }

    public org.w3c.dom.Node getLastChild() {
        return DOMNodeHelper.getLastChild(this);
    }

    public org.w3c.dom.Node getPreviousSibling() {
        return DOMNodeHelper.getPreviousSibling(this);
    }

    public org.w3c.dom.Node getNextSibling() {
        return DOMNodeHelper.getNextSibling(this);
    }

    public NamedNodeMap getAttributes() {
        return null;
    }

    public Document getOwnerDocument() {
        return DOMNodeHelper.getOwnerDocument(this);
    }

    public org.w3c.dom.Node insertBefore(org.w3c.dom.Node newChild,
            org.w3c.dom.Node refChild) throws DOMException {
        checkNewChildNode(newChild);

        return DOMNodeHelper.insertBefore(this, newChild, refChild);
    }

    public org.w3c.dom.Node replaceChild(org.w3c.dom.Node newChild,
            org.w3c.dom.Node oldChild) throws DOMException {
        checkNewChildNode(newChild);

        return DOMNodeHelper.replaceChild(this, newChild, oldChild);
    }

    public org.w3c.dom.Node removeChild(org.w3c.dom.Node oldChild)
            throws DOMException {
        return DOMNodeHelper.removeChild(this, oldChild);
    }

    public org.w3c.dom.Node appendChild(org.w3c.dom.Node newChild)
            throws DOMException {
        checkNewChildNode(newChild);

        return DOMNodeHelper.appendChild(this, newChild);
    }

    private void checkNewChildNode(org.w3c.dom.Node newChild)
            throws DOMException {
        throw new DOMException(DOMException.HIERARCHY_REQUEST_ERR,
                "DocumentType nodes cannot have children");
    }

    public boolean hasChildNodes() {
        return DOMNodeHelper.hasChildNodes(this);
    }

    public org.w3c.dom.Node cloneNode(boolean deep) {
        return DOMNodeHelper.cloneNode(this, deep);
    }

    public void normalize() {
        DOMNodeHelper.normalize(this);
    }

    public boolean isSupported(String feature, String version) {
        return DOMNodeHelper.isSupported(this, feature, version);
    }

    public boolean hasAttributes() {
        return DOMNodeHelper.hasAttributes(this);
    }

    // org.w3c.dom.DocumentType interface
    // -------------------------------------------------------------------------
    public NamedNodeMap getEntities() {
        return null;
    }

    public NamedNodeMap getNotations() {
        return null;
    }

    public String getPublicId() {
        return getPublicID();
    }

    public String getSystemId() {
        return getSystemID();
    }

    public String getInternalSubset() {
        return getElementName();
    }
}

/*
 * Redistribution and use of this software and associated documentation
 * ("Software"), with or without modification, are permitted provided that the
 * following conditions are met:
 *
 * 1. Redistributions of source code must retain copyright statements and
 * notices. Redistributions must also contain a copy of this document.
 *
 * 2. Redistributions in binary form must reproduce the above copyright notice,
 * this list of conditions and the following disclaimer in the documentation
 * and/or other materials provided with the distribution.
 *
 * 3. The name "DOM4J" must not be used to endorse or promote products derived
 * from this Software without prior written permission of MetaStuff, Ltd. For
 * written permission, please contact dom4j-info@metastuff.com.
 *
 * 4. Products derived from this Software may not be called "DOM4J" nor may
 * "DOM4J" appear in their names without prior written permission of MetaStuff,
 * Ltd. DOM4J is a registered trademark of MetaStuff, Ltd.
 *
 * 5. Due credit should be given to the DOM4J Project - http://www.dom4j.org
 *
 * THIS SOFTWARE IS PROVIDED BY METASTUFF, LTD. AND CONTRIBUTORS ``AS IS'' AND
 * ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
 * ARE DISCLAIMED. IN NO EVENT SHALL METASTUFF, LTD. OR ITS CONTRIBUTORS BE
 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 * POSSIBILITY OF SUCH DAMAGE.
 *
 * Copyright 2001-2005 (C) MetaStuff, Ltd. All Rights Reserved.
 */


text:
package com.shejiaomao.weibo.service.task;

import com.shejiaomao.maobo.R;
import android.app.AlertDialog;
import android.content.DialogInterface;
import android.content.Intent;
import android.content.pm.ActivityInfo;
import android.os.AsyncTask;
import android.util.Log;
import android.view.WindowManager;

import com.cattong.commons.Logger;
import com.shejiaomao.common.NetUtil;
import com.shejiaomao.weibo.SheJiaoMaoApplication;
import com.shejiaomao.weibo.activity.HomePageActivity;
import com.shejiaomao.weibo.common.Constants;
import com.shejiaomao.weibo.common.GlobalVars;
import com.umeng.update.UmengUpdateAgent;

public class InitAppTask extends AsyncTask<Void, Void, Void> {
	private static final String TAG = InitAppTask.class.getSimpleName();

	private HomePageActivity context;
    private SheJiaoMaoApplication shejiaomao;

	public InitAppTask(HomePageActivity context) {
		this.context = context;
		this.shejiaomao = (SheJiaoMaoApplication)context.getApplication();
	}

	@Override
	protected void onPreExecute() {
		super.onPreExecute();

		context.getWindow().addFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN);
		context.setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT);
		context.setContentView(R.layout.splash);
	}

	@Override
	protected Void doInBackground(Void... params) {
		if (Logger.isDebug()) {
			Log.v(TAG, "InitAppTask ... , Intent : " + context.getIntent());
		}

		//初始化
		context.initComponents();
		return null;
	}

	@Override
	protected void onPostExecute(Void result) {
		super.onPostExecute(result);

		context.getWindow().clearFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN);
		if (shejiaomao.isAutoScreenOrientation()) {
            context.setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_USER);
		} else {
			context.setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT);
		}

		context.updateContentView(null);

		if (!NetUtil.isConnect(context)) {
			showNetSettingsDialog();
		}

		if (GlobalVars.IS_MOBILE_NET_UPDATE_VERSION) {
			UmengUpdateAgent.setUpdateOnlyWifi(false);
		}
		if (shejiaomao.isCheckNewVersionOnStartup()) {
			//检查更新
			UmengUpdateAgent.update(context);
		}

		//清除缓存
		StatusesCleanTask statusCleanTask = new StatusesCleanTask(context);
		statusCleanTask.execute();
		ImageCacheQuickCleanTask imageCacheTask = new ImageCacheQuickCleanTask(context);
		imageCacheTask.execute();
	}

	private void showNetSettingsDialog() {
		new AlertDialog.Builder(context)
		    .setTitle(context.getString(R.string.title_dialog_net_setting))
		    .setMessage(context.getString(R.string.msg_net_setting))
		    .setPositiveButton(context.getString(R.string.btn_net_setting),
				new DialogInterface.OnClickListener() {
					@Override
					public void onClick(DialogInterface dialog, int which) {
						context.startActivityForResult(
							new Intent(android.provider.Settings.ACTION_WIRELESS_SETTINGS),
							Constants.REQUEST_CODE_NET_SETTINGS
						);
					}
				})
			.setNegativeButton(context.getString(R.string.btn_net_cancel),
				new DialogInterface.OnClickListener() {
					@Override
					public void onClick(DialogInterface dialog, int which) {
						dialog.dismiss();
					}
				})
			.show();
	}

}


text:
<?php

namespace CoreBundle\Model\Request\Battle;

use CoreBundle\Entity\BattleStatus;
use CoreBundle\Entity\MapType;

/**
 * Interface BattleAllRequestInterface
 *
 * @method bool hasBattleStatus()
 * @method bool hasMapType()
 * @method bool hasName()
 */
interface BattleAllRequestInterface
{
    /**
     * @return BattleStatus
     */
    public function getBattleStatus();

    /**
     * @param BattleStatus $battleStatus
     */
    public function setBattleStatus(BattleStatus $battleStatus);

    /**
     * @return MapType
     */
    public function getMapType(): MapType;

    /**
     * @param MapType $mapType
     */
    public function setMapType(MapType $mapType);

    /**
     * @return string
     */
    public function getName(): string;

    /**
     * @param string $name
     */
    public function setName(string $name);
}


text:
<?xml version="1.0" encoding="UTF-8" ?>

<!--
   Copyright 2008 University of Rochester

   Licensed under the Apache License, Version 2.0 (the "License");
   you may not use this file except in compliance with the License.
   You may obtain a copy of the License at

       http://www.apache.org/licenses/LICENSE-2.0

   Unless required by applicable law or agreed to in writing, software
   distributed under the License is distributed on an "AS IS" BASIS,
   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   See the License for the specific language governing permissions and
   limitations under the License.
-->

<!DOCTYPE struts PUBLIC
    "-//Apache Software Foundation//DTD Struts Configuration 2.5//EN"
    "http://struts.apache.org/dtds/struts-2.5.dtd" [
    <!ENTITY item_public SYSTEM "item_public.xml">
    <!ENTITY oai_harvesting SYSTEM "admin_file_storage.xml">
    ]>

<struts>
    <constant name="struts.enable.SlashesInActionNames" value="true"/>
    <include file="struts-default.xml"/>
    <include file="config-browser.xml"/>

    <package name="default" extends="struts-default" strict-method-invocation="false">

        <result-types>
            <result-type name="no-op" class="edu.ur.ir.web.action.result.NoOp"/>
        </result-types>
        <interceptors>
             <interceptor name="user" class="edu.ur.web.interceptor.AcegiUserInterceptor"/>
             <interceptor name="emailError" class="edu.ur.web.interceptor.EmailErrorInterceptor"/>

             <interceptor-stack name="default">
                <interceptor-ref name="emailError"/>
                <interceptor-ref name="defaultStack"/>
                <interceptor-ref name="user"/>
             </interceptor-stack>

             <interceptor-stack name="editStack">
                 <interceptor-ref name="emailError"/>
                 <interceptor-ref name="servletConfig"/>
                 <interceptor-ref name="staticParams"/>
                 <interceptor-ref name="params"/>
                 <interceptor-ref name="prepare"/>
                 <interceptor-ref name="modelDriven"/>
                 <interceptor-ref name="conversionError"/>
                 <interceptor-ref name="user"/>
             </interceptor-stack>

             <interceptor-stack name="crudStack">
                 <interceptor-ref name="emailError"/>
                 <interceptor-ref name="servletConfig"/>
                 <interceptor-ref name="staticParams"/>
                 <interceptor-ref name="params"/>
                 <interceptor-ref name="prepare"/>
                 <interceptor-ref name="modelDriven"/>
                 <interceptor-ref name="params"/>
                 <interceptor-ref name="conversionError"/>
                 <interceptor-ref name="validation"/>
                 <interceptor-ref name="workflow"/>
                 <interceptor-ref name="user"/>
             </interceptor-stack>

        </interceptors>

        <!--  set the default stack for this package -->
        <default-interceptor-ref name="default"/>

        <default-action-ref name="unknownAction" />

        <global-results>
        	 <result type="redirect" name="change-password">/pages/user/login/force_change_password.jsp</result>
        	 <result type="redirect" name="registration-error">/pages/user/login/invalid_token.jsp</result>
        	 <result type="redirect" name="handleError">/pages/error.jsp</result>
        	 <result type="redirect" name="accessDenied">/accessDenied.jsp</result>
        	 <result type="redirectAction" name="acceptLicense">
        	      <param name="actionName">acceptRepositoryLicense.action</param>
        	      <param name="namespace">/user</param>
        	 </result>
        </global-results>

        <!--  ************************************ -->
        <!--  public item actions                  -->
        <!--  ************************************ -->
        &item_public;

        <!--  handles old url values from the old system -->
        <action name="handle/**" class="edu.ur.ir.web.action.RedirectOldHandleUrl">
            <result name="notFound">/pages/item/institutional_publication_not_found.jsp</result>
            <result name="success" type="redirectAction">
                <param name="actionName">institutionalPublicationPublicView</param>
                <param name="institutionalItemId">${institutionalItemId}</param>
                <param name="versionNumber">${versionNumber}</param>
            </result>
        </action>

        <!-- Help action -->
        <action name="help">
            <result type="redirect">/pages/help/help.jsp</result>
        </action>

        <!-- Help action -->
        <action name="privacyPolicy">
            <result type="redirect">/pages/privacy_policy.jsp</result>
        </action>

        <!--  Conact Us action -->
        <action name="contactUs">
            <result type="redirect"> /pages/contact_us.jsp</result>
        </action>

        <action name="sendHelpEmail" class="edu.ur.ir.web.action.ContactUs">
            <result name="success">/pages/contact_us_thankyou.jsp</result>
            <result name="input">/pages/contact_us.jsp</result>
        </action>

        <!-- Help action -->
        <action name="about">
            <result type="redirect">/pages/about.jsp</result>
        </action>

        <!--  Home page actions -->
        <action name="goHome">
            <result name="success" type="redirect">home.action</result>
        </action>

        <action name="home" class="edu.ur.ir.web.action.Home">
            <interceptor-ref name="editStack"/>
            <result name="success">/pages/home.jsp</result>
        </action>

        <action name="unknownAction" class="edu.ur.ir.web.action.UnknownAction">
            <result>/pages/unknown_action.jsp</result>
        </action>

        <action name="j_acegi_logout">
             <result type="redirect">home.action</result>
        </action>

        <!--  ************************************ -->
        <!--  actions for viewing collections      -->
        <!--  ************************************ -->
        <action name="viewInstitutionalCollection"
                class="edu.ur.ir.web.action.institution.PublicCollectionView"
                method="view">
                <interceptor-ref name="editStack" />
                <result name="view">/pages/collection/collection_view.jsp</result>
                <result name="notFound">/pages/collection/collection_not_found.jsp</result>
        </action>

        <!--  ************************************ -->
        <!--  actions for viewing collections      -->
        <!--  ************************************ -->
        <action name="viewInstitutionalCollectionRss"
                class="edu.ur.ir.web.action.institution.PublicCollectionView"
                method="viewRss">
                <interceptor-ref name="editStack" />
                <result name="view">/pages/collection/collection_rss_feed.jsp</result>
                <result name="notFound">/pages/collection/collection_not_found.jsp</result>
        </action>

        <!-- Collection pictures action -->
        <action name="downloadCollectionPicture"
            class="edu.ur.ir.web.action.institution.CollectionPictureFileDownload">
            <result name="success" type="no-op"/>
        </action>

        <!-- Collection pictures action -->
        <action name="nextCollectionPicture"
            class="edu.ur.ir.web.action.institution.NextCollectionPicture">
            <result name="success">/pages/collection/next_collection_picture_frag.jsp</result>
        </action>

        <!--  ************************************ -->
        <!--  Inviting and adding invited user     -->
        <!--  actions                              -->
        <!--  ************************************ -->

        <!-- Login for invited user - actions -->
        <action name="inviteLogin"
            class="edu.ur.ir.web.action.user.InviteLogin">
            <interceptor-ref name="editStack" />
            <result name="success">/pages/user/login/invite_login.jsp</result>
        </action>

        <action name="viewAddUser"
            class="edu.ur.ir.web.action.user.RegisterUser">
            <interceptor-ref name="editStack" />
            <result name="success">/pages/user/login/register_user.jsp</result>
        </action>

         <!--  ************************************ -->
        <!--   User Registration - actions                  -->
        <!--  ************************************ -->

        <action name="viewUserRegistration" method="viewUserRegistration"
            class="edu.ur.ir.web.action.user.RegisterUser">
            <interceptor-ref name="editStack" />
            <result name="success">/pages/user/login/register_user.jsp</result>
        </action>

        <action name="registerNewUser" method="registerUser"
            class="edu.ur.ir.web.action.user.RegisterUser">
            <interceptor-ref name="crudStack" />
            <result name="input">/pages/user/login/register_user.jsp</result>
            <result name="success">/pages/user/login/registeration_confirmation.jsp</result>
            <result name="successInvite">/pages/user/login/invite_confirmation.jsp</result>
        </action>

        <!--  ************************************ -->
        <!--   password - actions                  -->
        <!--  ************************************ -->

        <!-- forgot password -->
        <action name="viewForgotPassword"
            class="edu.ur.ir.web.action.user.ForgotPassword">
            <result name="success">/pages/user/login/change_password.jsp</result>
        </action>

        <!-- forgot password -->
        <action name="savePasswordToken"
            class="edu.ur.ir.web.action.user.ForgotPassword">
            <interceptor-ref name="editStack"/>
            <result name="success">/pages/user/login/forgot_password_form.jsp</result>
        </action>

       <!-- Change password - actions  -->
        <action name="viewChangePassword"
            class="edu.ur.ir.web.action.user.ChangePassword">
            <result name="success">/pages/user/login/change_password.jsp</result>
        </action>

        <action name="changePassword" method="savePassword"
            class="edu.ur.ir.web.action.user.ChangePassword">
            <interceptor-ref name="editStack"/>
           <result name="success" type="redirect">/user/passwordConfirmation.action</result>
        </action>

        <!--  ************************************ -->
        <!--    Repository pictures actions        -->
        <!--  ************************************ -->
        <!-- Repository pictures action -->
        <action name="downloadRepositoryPicture"
            class="edu.ur.ir.web.action.RepositoryPictureFileDownload">
            <result name="success" type="no-op"/>
        </action>

        <!-- Repository pictures action -->
        <action name="nextRepositoryPicture"
            class="edu.ur.ir.web.action.NextRepositoryPicture">
            <result name="success">/pages/next_repository_picture_frag.jsp</result>
        </action>

        <!--  ************************************ -->
        <!--    Transformed file / Thumbnail file actions  -->
        <!--  ************************************ -->

         <!--  Action for downloading repository thumbnail files -->
        <action name="repositoryThumbnailDownloader"
            class="edu.ur.ir.web.action.repository.RepositoryThumbnailDownloader">
            <result name="success" type="no-op"/>
        </action>

          <!--  Action for downloading news thumbnail files -->
        <action name="newsThumbnailDownloader"
            class="edu.ur.ir.web.action.news.NewsThumbnailDownloader">
            <result name="success" type="no-op"/>
        </action>

        <!--  Action for downloading collection thumbnail files -->
        <action name="institutionalCollectionThumbnailDownloader"
            class="edu.ur.ir.web.action.institution.InstitutionalCollectionThumbnailDownloader">
            <result name="success" type="no-op"/>
        </action>

        <!--  Action for item file transformed MOSTLY Thumbnail viewing -->
        <action name="genericItemTransformedFileDownload"
            class="edu.ur.ir.web.action.item.GenericItemTransformedFileDownloader">
            <interceptor-ref name="editStack"/>
            <result name="success" type="no-op"/>
        </action>

         <!--  Action for item file transformed MOSTLY Thumbnail viewing -->
        <action name="researcherThumbnailDownloader"
            class="edu.ur.ir.web.action.researcher.ResearcherThumbnailDownloader">
            <interceptor-ref name="editStack"/>
            <result name="success" type="no-op"/>
        </action>

        <!--  ************************************ -->
        <!--    News actions                       -->
        <!--  ************************************ -->
        <!-- News items -->
        <action name="getNewsItems"
            class="edu.ur.ir.web.action.GetNewsItems">
            <result name="success">/pages/news_items_frag.jsp</result>
        </action>

        <action name="viewNews"
            class="edu.ur.ir.web.action.GetNewsArticle">
            <interceptor-ref name="editStack"/>
            <result name="success">/pages/news.jsp</result>
        </action>

        <!-- News pictures action -->
        <action name="downloadNewsItemsPicture"
            class="edu.ur.ir.web.action.NewsImageDownloader">
            <result name="success" type="no-op"/>
        </action>

        <!--  ************************************ -->
        <!--    Researcher actions                 -->
        <!--  ************************************ -->

        <!-- Researcher pictures action -->
        <action name="nextResearcherPicture"
            class="edu.ur.ir.web.action.NextResearcherPicture">
            <result name="success">/pages/next_researcher_picture_frag.jsp</result>
        </action>

        <action name="viewResearcherPage"
                class="edu.ur.ir.web.action.researcher.PublicResearcherPageView"
                method="view">
                <interceptor-ref name="editStack" />
                <result name="accessDenied">/accessDenied.jsp</result>
                <result name="success">/pages/researcher_page/researcher_page_view.jsp</result>
                <result name="notFound">/pages/researcher_page/researcher_not_found.jsp</result>
        </action>

        <action name="viewResearcherXmlPage"
                class="edu.ur.ir.web.action.researcher.PublicResearcherPageView"
                method="view">
                <interceptor-ref name="editStack" />
                <result name="accessDenied">/accessDenied_xml.jsp</result>
                <result name="success">/pages/researcher_page/researcher_page_xml_view.jsp</result>
                <result name="notFound">/pages/researcher_page/researcher_not_found_xml.jsp</result>
        </action>

        <action name="researcherPublicationView"
            class="edu.ur.ir.web.action.researcher.ViewResearcherPublication">
            <interceptor-ref name="editStack"/>
            <result name="success">/pages/item/personal_publication_view.jsp</result>
            <result name="accessDenied">/accessDenied.jsp</result>
            <result name="notFound">/pages/researcher_page/researcher_pub_not_found.jsp</result>
        </action>

        <!-- Download Researcher picture  -->
        <action name="downloadResearcherPicture"
            class="edu.ur.ir.web.action.researcher.ResearcherPictureFileDownload">
            <interceptor-ref name="editStack"/>
            <result name="accessDenied">/accessDenied.jsp</result>
            <result name="success" type="no-op"/>
        </action>

        <!-- Next Researcher picture  -->
        <action name="nextPicture"
            class="edu.ur.ir.web.action.researcher.PublicResearcherPageView"
            method="getPictures">
            <interceptor-ref name="editStack" />
            <result name="accessDenied">/accessDenied.jsp</result>
            <result name="success">/pages/researcher_page/next_researcher_picture_frag.jsp</result>
        </action>

        <action name="researcherFileDownload"
                class="edu.ur.ir.web.action.researcher.DownloadResearcherFile">
            <interceptor-ref name="editStack"/>
            <result name="accessDenied">/accessDenied.jsp</result>
            <result name="success" type="no-op"/>
            <result name="notFound">/pages/researcher_page/researcher_file_not_found.jsp</result>
        </action>

        <!--  ************************************ -->
        <!--    Researcher browse / Search actions -->
        <!--  ************************************ -->

        <action name="viewResearcherBrowse" method="browseResearcher"
            class="edu.ur.ir.web.action.researcher.ResearcherBrowse">
            <result name="success">/pages/researcher_page/browse_all_researchers.jsp</result>
            <result name="input">/pages/researcher_page/researcher_not_found.jsp</result>
        </action>

        <action name="startSearchResearchers"
             class="edu.ur.ir.web.action.researcher.ResearcherSearch">
             <result name="success">/pages/researcher_page/browse_all_researchers.jsp</result>
             <result name="input">/pages/researcher_page/researcher_not_found.jsp</result>
        </action>

        <action name="searchResearchers"
             class="edu.ur.ir.web.action.researcher.ResearcherSearch"
             method="searchResearchers">
             <result name="success">/pages/researcher_page/browse_all_researchers.jsp</result>
             <result name="input">/pages/researcher_page/researcher_not_found.jsp</result>
        </action>

        <action name="filterSearchResearchers"
             class="edu.ur.ir.web.action.researcher.ResearcherSearch"
             method="filteredSearchResearchers">
             <result name="success">/pages/researcher_page/browse_all_researchers.jsp</result>
             <result name="input">/pages/researcher_page/researcher_not_found.jsp</result>
        </action>

        <!--  ************************************ -->
        <!--    Contributor actions                 -->
        <!--  ************************************ -->

        <action name="viewContributorRss"
                class="edu.ur.ir.web.action.item.ViewContributorPage"
                method="getRss">
                <interceptor-ref name="editStack" />
                <result name="success">/pages/item/contributor_page_rss_feed.jsp</result>
                <result name="not_found">/pages/item/contributor_page_not_found_rss_feed.jsp</result>
                <result name="input">/pages/item/contributor_page_not_found_rss_feed.jsp</result>
        </action>

         <action name="viewContributorPage"
                class="edu.ur.ir.web.action.item.ViewContributorPage">
         	<result name="success">/pages/item/contributor_page_view.jsp</result>
         	<result name="not_found">/pages/item/contributor_page_not_found.jsp</result>
            <result name="input">/pages/item/contributor_page_not_found.jsp</result>
         </action>

         <action name="viewContributorXmlPage"
                class="edu.ur.ir.web.action.item.ViewContributorPage">
         	<result name="success">/pages/item/contributor_page_view_xml.jsp</result>
         	<result name="not_found">/pages/item/institutional_publication_not_found.jsp</result>
            <result name="input">/pages/item/institutional_publication_not_found.jsp</result>
         </action>

        <!--  ************************************ -->
        <!--    Sponsor actions                 -->
        <!--  ************************************ -->

         <action name="viewSponsorPage"
                class="edu.ur.ir.web.action.sponsor.ViewSponsor">
         	<result name="success">/pages/sponsor/sponsor_page_view.jsp</result>
         	<result name="input">/pages/sponsor/sponsor_not_found.jsp</result>
         </action>

        <!--  ************************************ -->
        <!--    OAI actions                 -->
        <!--  ************************************ -->
         <action name="oai2"
                class="edu.ur.ir.web.action.oai.Oai_2_0">
         	<result name="badVerb">/pages/oai/bad_verb.jsp</result>
         	<result name="getRecord">/pages/oai/get_record.jsp</result>
         	<result name="cannotDisseminateFormat">/pages/oai/cannot_disseminate_format.jsp</result>
         	<result name="idDoesNotExist">/pages/oai/id_does_not_exist.jsp</result>
         	<result name="identify">/pages/oai/identify.jsp</result>
         	<result name="success">/pages/oai/ok.jsp</result>
         	<result name="listIdentifiers">/pages/oai/list_identifiers.jsp</result>
         	<result name="listSets">/pages/oai/list_sets.jsp</result>
         	<result name="listMetadataFormats">/pages/oai/list_metadata_formats.jsp</result>
         	<result name="noRecordsMatch">/pages/oai/no_records_match.jsp</result>
         	<result name="noSetHierarchy">/pages/oai/no_records_match.jsp</result>
         	<result name="badArgument">/pages/oai/bad_argument.jsp</result>
         	<result name="badResumptionToken">/pages/oai/bad_resumption_token.jsp</result>
         	<result name="listRecords">/pages/oai/list_records.jsp</result>
         </action>

        <!--  ************************************ -->
        <!--    General repository stats           -->
        <!--  ************************************ -->
        <action name="viewRepositoryStatistics"
                class="edu.ur.ir.web.action.institution.RepositoryStatistics">
         	<result name="success">/pages/repository_statistics.jsp</result>
        </action>
        <action name="viewCollectionStatistics"
                class="edu.ur.ir.web.action.institution.InstitutionalCollectionStatistics">
         	<result name="success">/pages/collection/collection_statistics.jsp</result>
        </action>

        <!-- marc MRC file export action -->
        <action name="exportToMarcMrcFile"
            class="edu.ur.ir.web.action.export.MarcFileExport"
            method="mrc">
            <result name="success" type="no-op"/>
        </action>

         <!-- marc XML file export action -->
        <action name="exportToMarcXmlFile"
            class="edu.ur.ir.web.action.export.MarcFileExport"
            method="xml">
            <result name="success" type="no-op"/>
        </action>

    </package>

    <!-- admin functions -->
    <include file="admin.xml"/>

    <!-- include user functions -->
    <include file="user.xml"/>

</struts>


text:
<!DOCTYPE html>

    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta name="description" content="">
    <meta name="author" content="">

    <title>AVS - Ambulatorio Veterinario Sperlonga</title>

    <link href="vendor/bootstrap/css/bootstrap.min.css" rel="stylesheet">

    <link href="vendor/font-awesome/css/font-awesome.min.css" rel="stylesheet" type="text/css">
    <link href='https://fonts.googleapis.com/css?family=Open+Sans:300italic,400italic,600italic,700italic,800italic,400,300,600,700,800' rel='stylesheet' type='text/css'>
    <link href='https://fonts.googleapis.com/css?family=Merriweather:400,300,300italic,400italic,700,700italic,900,900italic' rel='stylesheet' type='text/css'>

    <link href="vendor/magnific-popup/magnific-popup.css" rel="stylesheet">

    <link href="css/creative.min.css" rel="stylesheet">

                <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1">
                    Toggle navigation Menu
                </button>

                        Su di noi

                        Servizi

                        Contattaci

        <video autoplay loop muted poster="./img/header.jpg">
            <source src="./img/video.mp4" type="video/mp4" />
        </video>

Ambulatorio
 Veterinario sperlonga

L' ambulatorio Veterinario Sperlonga offre un'ampia gamma di  attività per la cura degli animali domestici, da quella  clinica di  routine a quella specialistica di settore, mirate al controllo della  salute e benessere del Vostro animale..

                Scopri di più

Lorella Russo

Si laurea nel 2012 presso l'Università Federico II di Napoli.

                        Durante il corso di laurea frequenta un tirocinio teorico-pratico di 3 mesi a Barcellona mediante il progetto "Erasmus Placement".

                        Dal Gennaio 2013 a Settembre 2015 svolge il ruolo di Direttore Sanitario presso il canile "Dog Village" di Salerno.

                        Lavora da Maggio 2013 a Settembre 2015 presso la Clinica Veterinaria Specialistica Vetlan di Battipaglia (Sa) occupandosi principalmente di Medicina d'Urgenza e Terapia Intensiva.

                        Da Marzo 2014 ad Ottobre 2015 segue l'Itinerario di Medicina d'Urgenza accereditato all'European School of Veterinary Postgraduate Studies per il conseguimento del GPCert(EM&S).

                        Socio SCIVAC dal 2014 e SIMUTIV dal 2016.

                        Da Ottobre 2015 a Luglio 2017 collabora a tempo pieno con la Clinica Veterinaria Roma Sud dove si occupa di Pronto Soccorso e Medicina Interna.

I nostri servizi

Prima Visita

Il primo, importantissimo approccio, al vostro animale. In genere si tratta di cuccioli appena adottati, ma lo stesso vale anche per gli adulti.

Medicina Interna

Prevenzione, diagnosi e cura delle malattie, utilizzando prevalentemente mezzi terapeutici non chirurgici.

Chirurgia

Si effettuano interventi di chirurgia generale e specialistica eseguiti nel più rigoroso rispetto della sterilità di attrezzature, ambienti e operatori.

Day Hospital

Consiste nel ricovero dal mattino alla sera per indagini diagnostiche od osservazione.

Ecografia

Attraverso questa metodica è possibile diagnosticare numerosissime patologie dell'apparato digerente, genitourinarie, vascolare. Inoltre è utilizzata per la diagnosi precoce di gravidanza.

Pronto Soccorso

Lo staff è reperibile anche nei giorni festivi, in caso di urgenze è possibile chiamare al numero
 <o>320 3027435</o> per ricevere un consiglio immediato

Orari

Dal lunedì al Venerdì dalle 09:30 alle 13:00 e dalle 16:00 alle 19:00.
 Il Sabato dalle 09:30 alle 13:00

 <o> 320 3027435</o>

Dove siamo

 Sperlonga (Latina) Via Valle, 6 (ex 108)
 320 3027435</o>


text:
package de.bitshares_munich.models;

/**
 * Created by mbilal on 5/24/16.
 */
public class DecodeMemo {
    public String status;
    public String msg;
}


text:
<!DOCTYPE html>

<meta charset="utf-8">
<title>Welcome to PitchBreakfast</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="">
<meta name="author" content="">

<meta name="twitter:card" content="summary" />
<meta name="twitter:site" content="@StartCLT" />
<meta name="twitter:title" content="Subscribe to the StartCLT Newsletter" />
<meta name="twitter:description" content="Are you ready?" />
<meta name="twitter:image" content="https://drive.google.com/file/d/0Bz6_qIYsC2utazJTcXZtd3pqTWM/edit?usp=sharing" />

<link href="stylesheets/all.css" rel="stylesheet">
<link href="stylesheets/bootstrap.css" rel="stylesheet">
<link href="stylesheets/bootstrap-responsive.css" rel="stylesheet">
<link href="stylesheets/bootstrap-responsive.min.css" rel="stylesheet">
<link href="stylesheets/bootstrap.min.css" rel="stylesheet">
<link href="stylesheets/usebootstrap.css" rel="stylesheet">
<link href="stylesheets/usebootstrap.less" rel="stylesheet">
<link href="stylesheets/usebootstrap.min.css" rel="stylesheet">
<link href="stylesheets/variables.less" rel="stylesheet">

<link href='http://fonts.googleapis.com/css?family=Patua+One' rel='stylesheet' type='text/css'>

                    Inspired by PureCSS.io


text:
copyright:
  years: 2015, 2016

---

{:new_window: target="_blank"}
{:shortdesc: .shortdesc}
{:screen: .screen}
{:codeblock: .codeblock}

# Initiation à {{site.data.keyword.amashort}}
{: #gettingstarted}
*Dernière mise à jour : 15 juin 2016*
{: .last-updated}

Ajoutez une fonctionnalité de sécurité à votre application mobile avec le service {{site.data.keyword.amafull}}. Vous pouvez configurer une authentification client et des fournisseurs d'identité de sorte que les utilisateurs
puissent se connecter à l'application avec leur comptes Google ou Facebook existants.
{:shortdesc}

**Remarque :** Le service {{site.data.keyword.amashort}} était dénommé auparavant Advanced Mobile
Access.

Pour démarrer et et commencer à travailler avec le service {{site.data.keyword.amashort}}, procédez comme suit :

1.  Utilisez le tableau de bord {{site.data.keyword.Bluemix_notm}} pour créer une application de back end mobile ou configurez une application existante.
  - Vous pouvez sélectionner MobileFirst Services Starter dans le catalogue Bluemix.
  - Ou, vous pouvez lier le service à une application existante et la configurer.

   Quand vous utilisez MobileFirst Services Starter, vous obtenez une instance du contexte d'exécution Node.js qui s'exécute sur IBM {{site.data.keyword.Bluemix_notm}} pour implémenter votre logique de back end personnalisée. Un ensemble de services mobiles de base qui fournissent des fonctions de sécurité, de données, d'envoi par commande push et de surveillance est lié à cette application
Node.js. Une fois l'application {{site.data.keyword.Bluemix_notm}} Node.js créée, vous pouvez configurer votre environnement de développement
et commencer à utiliser les logiciels SDK de {{site.data.keyword.Bluemix_notm}} Mobile Services. Vous pouvez utiliser les logiciels SDK pour accéder aux services qui sont liés à votre application en cloud à l'aide de simples appels d'API.

1. Sécurisez les ressources côté serveur.

   Protégez vos ressources de back end mobile qui s'exécutent en contextes d'exécution Node.js,ou Liberty for Java™, avec la sécurité OAuth pour les périphériques mobiles. Pour plus d'informations, voir [Protection des ressources](protecting-resources.html).
   Pour en savoir plus sur l'application de back end mobile par défaut, voir [bms-hellotodo-strongloop](https://github.com/ibm-bluemix-mobile-services/bms-hellotodo-strongloop).

1. Configurez votre environnement de développement côté client {{site.data.keyword.amashort}} principal.

   Vous pouvez ajouter le SDK {{site.data.keyword.amashort}} à votre application Android, Cordova ou iOS existante. Vous pouvez également télécharger l'exemple
d'application HelloAuthentication.
   * **Android** : ([Configuration du logiciel SDK Android](getting-started-android.html)) ([Exemple](https://github.com/ibm-bluemix-mobile-services/bms-samples-android-helloauthentication))

   * **Cordova** : ([Configuration du plug-in Cordova](getting-started-cordova.html)) ([Exemple](https://github.com/ibm-bluemix-mobile-services/bms-samples-cordova-helloauthentication))

   * ****iOS (SDK Swift) : ([Configuration du SDK Swift iOS](getting-started-ios-swift-sdk.html))
      ([Exemple](https://github.com/ibm-bluemix-mobile-services/bms-samples-swift-helloauthentication))

   * **iOS (SDK Objective-C)** : ([Configuration du SDK Objective-C pour iOS](getting-started-ios.html)) ([Exemple](https://github.com/ibm-bluemix-mobile-services/bms-samples-ios-helloauthentication))

   **Remarque :** alors que le SDK Objective-C reste complètement pris en charge et est toujours considéré comme le SDK principal pour Bluemix Mobile Services, il est prévu qu'il soit interrompu plus tard dans l'année et remplacé par le nouveau SDK Swift. Si vous créez une application, il est vivement recommandé d'utiliser le SDK Swift (voir [Configuration du SDK Swift iOS](getting-started-ios-swift-sdk.html)).

1. **Facultatif :** configurez un fournisseur d'identité pour votre application. Vous ne pouvez configurer qu'un fournisseur d'identité par
application. La configuration d'un fournisseur d'identité permet aux utilisateurs de votre application mobile de se connecter avec leur compte Facebook
ou Google+ existant. Ou bien, vous pouvez définir le mode de connexion des utilisateurs en créant une authentification personnalisée.
   * [Authentification des utilisateurs à l'aide des données d'identification Facebook](facebook-auth-overview.html)
   * [Authentification des utilisateurs avec des données d'identification Google](google-auth-overview.html)
   * [Authentification des utilisateurs en utilisant un fournisseur d'identité personnalisé](custom-auth.html)

1. Configurez la surveillance et la journalisation des applications.

    Pour plus d'informations, voir [Surveillance des applications](app-monitoring.html).

# Liens connexes
{: #rellinks}

## Tutoriels et exemples
{: #samples}
* [Exemple android-helloauthentication](https://github.com/ibm-bluemix-mobile-services/bms-samples-android-helloauthentication){: new_window}
* [Exemple ios-helloauthentication (SDK Swift)](https://github.com/ibm-bluemix-mobile-services/bms-samples-swift-helloauthentication){: new_window}
* [Exemple ios-helloauthentication (SDK Objective-C)](https://github.com/ibm-bluemix-mobile-services/bms-samples-ios-helloauthentication){: new_window}

## Logiciel SDK
{: #sdk}
* [Core SDK (Android)](https://github.com/ibm-bluemix-mobile-services/bms-clientsdk-android-core){: new_window}
* [Core SDK (plug-in Cordova)](https://github.com/ibm-bluemix-mobile-services/bms-clientsdk-cordova-plugin-core){: new_window}
* [Core SDK (iOS - Swift) ](https://github.com/ibm-bluemix-mobile-services/bms-clientsdk-swift-core){: new_window}
* [Core SDK (iOS - Objective-C - Déprécié](https://hub.jazz.net/git/bluemixmobilesdk/imf-ios-sdk/archive?revstr=master){: new_window}
* [Authentification personnalisée -
exemple simple](https://github.com/ibm-bluemix-mobile-services/bms-mca-custom-identity-provider-sample){: new_window}
* [Authentification personnalisée -
exemple avancé](https://github.com/ibm-bluemix-mobile-services/bms-mca-custom-identity-provider-with-user-management){: new_window}

## Référence d'API
{: api}
* [Android](https://console.{DomainName}/docs/api/content/api/mobilefirst/android/core-api-doc/overview-summary.html){: new_window}
* [iOS (SDK Objective-C) - Déprécié](https://console.{DomainName}/docs/api/content/api/mobilefirst/ios/IMFCore_api-doc/html/index.html){: new_window}

## Liens connexes
{: #general}
* [Présentation](overview.html){: new_window}


text:
package org.openuap.cms.engine.profile.impl;

import org.openuap.cms.engine.profile.PublishOperationProfile;

/**
 *

 * 缺省DB操作分析实现
 *

 *
 *

 * $Id: PublishOperationProfileImpl.java 3924 2010-10-26 11:53:36Z orangeforjava $
 *

 *
 * @author Joseph
 * @version 1.0
 */
public class PublishOperationProfileImpl implements PublishOperationProfile {

	private long endTime;

	private Exception exception;

	private long startTime;

	private int type;

	private String operation;

	private String templateContent;

	private int records;

	public String getTemplateContent() {
		return templateContent;
	}

	public void setTemplateContent(String templateContent) {
		this.templateContent = templateContent;
	}

	public int getRecords() {
		return records;
	}

	public void setRecords(int records) {
		this.records = records;
	}

	public String getOperation() {
		return operation;
	}

	public void setOperation(String operation) {
		this.operation = operation;
	}

	public long getEndTime() {
		return endTime;
	}

	public Exception getException() {
		return exception;
	}

	public long getStartTime() {
		return startTime;
	}

	public int getType() {
		return type;
	}

	public void setEndTime(long endTime) {
		this.endTime = endTime;
	}

	public void setException(Exception ex) {
		this.exception = ex;
	}

	public void setStartTime(long startTime) {
		this.startTime = startTime;
	}

	public void setType(int type) {
		this.type = type;
	}

	public long getProccessTimes() {
		return endTime - startTime;
	}

}


text:
package gov.sandia.cognition.statistics.bayesian;

import gov.sandia.cognition.statistics.bayesian.conjugate.UnivariateGaussianMeanBayesianEstimator;
import gov.sandia.cognition.statistics.bayesian.conjugate.UnivariateGaussianMeanVarianceBayesianEstimator;
import gov.sandia.cognition.statistics.distribution.NormalInverseGammaDistribution;
import gov.sandia.cognition.statistics.distribution.StudentTDistribution;
import gov.sandia.cognition.statistics.distribution.UnivariateGaussian;
import gov.sandia.cognition.statistics.method.ConfidenceInterval;
import gov.sandia.cognition.statistics.method.KolmogorovSmirnovConfidence;
import gov.sandia.cognition.statistics.method.StudentTConfidence;
import java.util.ArrayList;
import junit.framework.TestCase;
import java.util.Random;

/**
 * Unit tests for BayesianUtilTest.
 *
 * @author krdixon
 */
public class BayesianUtilTest
    extends TestCase
{

    /**
     * Random number generator to use for a fixed random seed.
     */
    public final Random RANDOM = new Random( 1 );

    /**
     * Default tolerance of the regression tests, {@value}.
     */
    public final double TOLERANCE = 1e-5;

    /**
     * Number of samples, {@value}.
     */
    public final int NUM_SAMPLES = 1000;

    /**
     * Default confidence, {@value}.
     */
    public final double CONFIDENCE = 0.95;

    /**
     * Tests for class BayesianUtilTest.
     * @param testName Name of the test.
     */
    public BayesianUtilTest(
        String testName)
    {
        super(testName);
    }

    /**
     * Tests the constructors of class BayesianUtilTest.
     */
    public void testConstructors()
    {
        System.out.println( "Constructors" );

        BayesianUtil instance = new BayesianUtil();
        assertNotNull( instance );
    }

    /**
     * Test of logLikelihood method, of class BayesianUtil.
     */
    public void testLogLikelihood()
    {
        System.out.println("logLikelihood");

        UnivariateGaussian.PDF f = new UnivariateGaussian.PDF();
        ArrayList<Double> observations = f.sample(RANDOM, NUM_SAMPLES);
        double result = BayesianUtil.logLikelihood(f, observations);
        double logSum = 0.0;
        for( Double observation : observations )
        {
            logSum += f.logEvaluate(observation);
        }
        assertEquals(logSum, result, TOLERANCE);
    }

    /**
     * Sample
     */
    public void testSampleParameter()
    {
        System.out.println( "sample" );
        double mean = RANDOM.nextGaussian();
        double variance = 1.0/RANDOM.nextDouble();
        UnivariateGaussian conditional = new UnivariateGaussian( mean, variance );
        UnivariateGaussianMeanVarianceBayesianEstimator estimator =
            new UnivariateGaussianMeanVarianceBayesianEstimator();

        ArrayList<Double> observations = conditional.sample(RANDOM, NUM_SAMPLES);
        NormalInverseGammaDistribution posterior = estimator.learn(observations);
        StudentTDistribution.CDF predictive =
            estimator.createPredictiveDistribution(posterior).getCDF();

        UnivariateGaussianMeanVarianceBayesianEstimator.Parameter parameter =
            new UnivariateGaussianMeanVarianceBayesianEstimator.Parameter(
                conditional, posterior);

        ArrayList<? extends Double> samples = BayesianUtil.sample(
            parameter, RANDOM, NUM_SAMPLES );
        KolmogorovSmirnovConfidence.Statistic kstest =
            KolmogorovSmirnovConfidence.evaluateNullHypothesis(samples, predictive);
        System.out.println( "K-S test:\n" + kstest );
        assertEquals( 1.0, kstest.getNullHypothesisProbability(), CONFIDENCE );

    }

    /**
     * Sample
     */
    public void testSample3()
    {
        System.out.println( "Sample3" );
        double mean = RANDOM.nextGaussian();
        double variance = 1.0/RANDOM.nextDouble();
        UnivariateGaussian conditional = new UnivariateGaussian( mean, variance );
        ArrayList<Double> observations = conditional.sample(RANDOM, NUM_SAMPLES);
        UnivariateGaussianMeanBayesianEstimator instance =
            new UnivariateGaussianMeanBayesianEstimator(variance);

        UnivariateGaussian posterior = instance.learn(observations);
        UnivariateGaussian.CDF predictive =
            instance.createPredictiveDistribution(posterior).getCDF();
        ArrayList<? extends Double> samples = BayesianUtil.sample(
            conditional, "mean", posterior, RANDOM, NUM_SAMPLES );
        KolmogorovSmirnovConfidence.Statistic kstest =
            KolmogorovSmirnovConfidence.evaluateNullHypothesis(samples, predictive);
        System.out.println( "K-S test:\n" + kstest );
        assertEquals( 1.0, kstest.getNullHypothesisProbability(), CONFIDENCE );
    }

    /**
     * Test of deviance method, of class BayesianUtil.
     */
    public void testDeviance()
    {
        System.out.println("deviance");
        double mean = RANDOM.nextGaussian();
        double variance = 1.0/RANDOM.nextDouble();
        UnivariateGaussian conditional = new UnivariateGaussian( mean, variance );
        UnivariateGaussianMeanVarianceBayesianEstimator estimator =
            new UnivariateGaussianMeanVarianceBayesianEstimator();

        ArrayList<Double> observations = conditional.sample(RANDOM, NUM_SAMPLES);
        NormalInverseGammaDistribution posterior = estimator.learn(observations);
        StudentTDistribution.CDF predictive =
            estimator.createPredictiveDistribution(posterior).getCDF();

        UnivariateGaussianMeanVarianceBayesianEstimator.Parameter parameter =
            new UnivariateGaussianMeanVarianceBayesianEstimator.Parameter(
                conditional, posterior);
    }

    /**
     * Test of expectedDeviance method, of class BayesianUtil.
     */
    public void testExpectedDeviance()
    {
        System.out.println("expectedDeviance");

        double mean = RANDOM.nextGaussian();
        double variance = 1.0/RANDOM.nextDouble();
        UnivariateGaussian conditional = new UnivariateGaussian( mean, variance );
        UnivariateGaussianMeanVarianceBayesianEstimator estimator =
            new UnivariateGaussianMeanVarianceBayesianEstimator();

        ArrayList<Double> observations = conditional.sample(RANDOM, NUM_SAMPLES);
        NormalInverseGammaDistribution posterior = estimator.learn(observations);
        StudentTDistribution predictive =
            estimator.createPredictiveDistribution(posterior);

        UnivariateGaussianMeanVarianceBayesianEstimator.Parameter parameter =
            new UnivariateGaussianMeanVarianceBayesianEstimator.Parameter(
                conditional, posterior);

        UnivariateGaussian expected = BayesianUtil.expectedDeviance(
            parameter, observations, RANDOM,NUM_SAMPLES);

        double result = BayesianUtil.deviance(predictive, observations);

        BayesianCredibleInterval vi =
            BayesianCredibleInterval.compute(expected,CONFIDENCE);
        System.out.println( "Result: " + result );
        System.out.println( "Interval: " + vi );
        assertTrue( vi.withinInterval(result) );

    }

    /**
     * Test of getMean method, of class UnivariateMonteCarloIntegrator.
     */
    public void testGetMean()
    {
        System.out.println("getMean");
        double mean = RANDOM.nextGaussian();
        double precision = RANDOM.nextDouble();
        StudentTDistribution targetDistribution =
            new StudentTDistribution( 4.0, mean, precision );

        System.out.println( "Target     = " + targetDistribution );

        int num = 100;
        ArrayList<Double> means = new ArrayList<Double>( num );
        ArrayList<Double> variances = new ArrayList<Double>( num );
        for( int n = 0; n < num; n++ )
        {
            UnivariateGaussian g = BayesianUtil.getMean(
                targetDistribution.sample(RANDOM, NUM_SAMPLES ) );
            means.add( g.getMean() );
            variances.add( g.getVariance() );
        }

        UnivariateGaussian sampleMeanDistribution =
            UnivariateGaussian.MaximumLikelihoodEstimator.learn(means, 0.0);
        UnivariateGaussian sampleVarianceDistribution =
            UnivariateGaussian.MaximumLikelihoodEstimator.learn(variances, 0.0);

        ConfidenceInterval ci = StudentTConfidence.INSTANCE.computeConfidenceInterval(
            sampleMeanDistribution.getMean(), sampleMeanDistribution.getVariance(), num, CONFIDENCE );
        System.out.println( "====== Mean ========" );
        System.out.println( "Target   = " + targetDistribution );
        System.out.println( "Sample   = " + sampleMeanDistribution );
        System.out.println( "Interval = " + ci );
        assertTrue( ci.withinInterval( targetDistribution.getMean() ) );

        ConfidenceInterval vi = StudentTConfidence.INSTANCE.computeConfidenceInterval(
            sampleVarianceDistribution.getMean(), sampleVarianceDistribution.getVariance(), num, CONFIDENCE );
        double varianceTarget = targetDistribution.getVariance() / NUM_SAMPLES;
        System.out.println( "====== Variance =======" );
        System.out.println( "Target   = " + varianceTarget );
        System.out.println( "Sample   = " + sampleVarianceDistribution );
        System.out.println( "Interval = " + vi );
        assertTrue( vi.withinInterval(varianceTarget) );

    }

}


text:
package com.mapswithme.util;

import android.app.Activity;
import android.content.DialogInterface;
import android.graphics.drawable.Drawable;
import androidx.annotation.DrawableRes;
import androidx.annotation.IdRes;
import androidx.annotation.MenuRes;
import androidx.annotation.NonNull;
import androidx.annotation.StringRes;
import androidx.core.content.ContextCompat;
import android.view.MenuItem;

import com.cocosw.bottomsheet.BottomSheet;
import com.mapswithme.maps.MwmApplication;

public final class BottomSheetHelper
{
  public static class Builder extends BottomSheet.Builder
  {
    public Builder(@NonNull Activity context)
    {
      super(context);
      setOnDismissListener(null);
      if (ThemeUtils.isNightTheme(context))
        darkTheme();
    }

    @Override
    public BottomSheet build()
    {
      BottomSheet res = super.build();
      return res;
    }

    @SuppressWarnings("NullableProblems")
    @Override
    public Builder setOnDismissListener(final DialogInterface.OnDismissListener listener)
    {
      super.setOnDismissListener(new DialogInterface.OnDismissListener()
      {
        @Override
        public void onDismiss(DialogInterface dialog)
        {
          if (listener != null)
            listener.onDismiss(dialog);
        }
      });

      return this;
    }

    @Override
    public Builder title(CharSequence title)
    {
      super.title(title);
      return this;
    }

    @Override
    public Builder title(@StringRes int title)
    {
      super.title(title);
      return this;
    }

    @Override
    public Builder sheet(@MenuRes int xmlRes)
    {
      super.sheet(xmlRes);
      return this;
    }

    @Override
    public Builder sheet(int id, @NonNull Drawable icon, @NonNull CharSequence text)
    {
      super.sheet(id, icon, text);
      return this;
    }

    @Override
    public Builder sheet(int id, @DrawableRes int iconRes, @StringRes int textRes)
    {
      super.sheet(id, iconRes, textRes);
      return this;
    }

    @Override
    public Builder grid()
    {
      super.grid();
      return this;
    }

    @Override
    public Builder listener(@NonNull MenuItem.OnMenuItemClickListener listener)
    {
      super.listener(listener);
      return this;
    }
  }

  public static void tint(@NonNull BottomSheet bottomSheet)
  {
    for (int i = 0; i < bottomSheet.getMenu().size(); i++)
    {
      MenuItem mi = bottomSheet.getMenu().getItem(i);
      Drawable icon = mi.getIcon();
      if (icon != null)
        mi.setIcon(Graphics.tint(bottomSheet.getContext(), icon));
    }
  }

  @NonNull
  public static MenuItem findItemById(@NonNull BottomSheet bottomSheet, @IdRes int id)
  {
    MenuItem item = bottomSheet.getMenu().findItem(id);

    if (item == null)
      throw new AssertionError("Can not find bottom sheet item with id: " + id);

    return item;
  }

  private BottomSheetHelper()
  {}

  public static Builder create(Activity context)
  {
    return new Builder(context);
  }

  public static Builder create(Activity context, @StringRes int title)
  {
    return create(context).title(title);
  }

  public static Builder create(Activity context, CharSequence title)
  {
    return create(context).title(title);
  }

  public static Builder createGrid(Activity context, @StringRes int title)
  {
    return create(context, title).grid();
  }
}


text:
import b from "benny";
import { build } from "../index";
import { initWebAssembly } from "../wasm";
initWebAssembly().then(() => {
  const randomInteger = (max: number = Number.MAX_SAFE_INTEGER) =>
    Math.floor(Math.random() * max);
  const options = { initCount: 100 };

  b.suite(
    "Histogram percentile distribution",
    b.add(
      "Int32Histogram",
      () => {
        const histogram = build({
          bitBucketSize: 32
        });
        for (let index = 0; index < 1024; index++) {
          histogram.recordValueWithCount(randomInteger(), randomInteger(100));
        }
        return () => {
          histogram.outputPercentileDistribution();
        };
      },
      options
    ),

    b.add(
      "WASM 32B Histogram",
      () => {
        const histogram = build({
          bitBucketSize: 32,
          useWebAssembly: true
        });
        for (let index = 0; index < 1024; index++) {
          histogram.recordValueWithCount(randomInteger(), randomInteger(100));
        }
        return () => {
          histogram.outputPercentileDistribution();
        };
      },
      options
    ),
    b.add(
      "Packed Histogram",
      () => {
        const histogram = build({
          bitBucketSize: "packed"
        });
        for (let index = 0; index < 1024; index++) {
          histogram.recordValueWithCount(randomInteger(), randomInteger(100));
        }
        return () => {
          histogram.outputPercentileDistribution();
        };
      },
      options
    ),
    b.add(
      "WASM Packed Histogram",
      () => {
        const histogram = build({
          bitBucketSize: "packed",
          useWebAssembly: true
        });
        for (let index = 0; index < 1024; index++) {
          histogram.recordValueWithCount(randomInteger(), randomInteger(100));
        }
        return () => {
          histogram.outputPercentileDistribution();
        };
      },
      options
    ),

    b.complete(),
    b.save({ file: "distribution", format: "chart.html" })
  );
});


text:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

<title>com.amd.aparapi</title>
<meta name="date" content="2013-01-23">
<link rel="stylesheet" type="text/css" href="../../../stylesheet.css" title="Style">

com.amd.aparapi

Interfaces

InstructionViewer.Form.Template

OpenCL

OpenCLDevice.DeviceComparitor

OpenCLDevice.DeviceSelector

Classes

Device

InstructionTransformer

InstructionViewer

InstructionViewer.DoorBell

InstructionViewer.Form

InstructionViewer.Options

JavaDevice

Kernel

OpenCLAdapter

OpenCLArgDescriptor

OpenCLDevice

OpenCLDevice.OpenCLInvocationHandler

OpenCLJNI

OpenCLKernel

OpenCLMem

OpenCLPlatform

OpenCLProgram

ProfileInfo

Range

Enums

ClassParseException.TYPE

Device.TYPE

Kernel.EXECUTION_MODE

Exceptions

AparapiException

ClassParseException

Annotation Types

InstructionViewer.Form.Check

InstructionViewer.Form.List

InstructionViewer.Form.OneOf

InstructionViewer.Form.Toggle

Kernel.Constant

Kernel.Local

OpenCL.Arg

OpenCL.Constant

OpenCL.Get

OpenCL.GlobalReadOnly

OpenCL.GlobalReadWrite

OpenCL.GlobalWriteOnly

OpenCL.Kernel

OpenCL.Local

OpenCL.Put

OpenCL.Resource

OpenCL.Source


text: <?php echo file_get_contents($zipPath);


text:
const Rx = require('rx-lite');
const Sequelize = require('sequelize');

Sequelize.Model.prototype.streamAll = function streamAll(options = {}) {
  return Rx.Observable.create((observer) => {
    const chunkSize = options.chunkSize || 1000;
    options.offset = 0;
    options.limit = chunkSize;

    const findFn = (opts) => {
      this.findAll(opts).then((models = []) => {
        observer.onNext(models)
        if (models.length === chunkSize) {
          opts.offset = chunkSize;
          findFn(opts)
        } else {
          observer.onCompleted()
        }
      })
    }

    findFn(options)
  })
}


text:
/* IBM_PROLOG_BEGIN_TAG                                                   */
/* This is an automatically generated prolog.                             */
/*                                                                        */
/* $Source: src/usr/isteps/istep12/call_proc_omi_scominit.C $             */
/*                                                                        */
/* OpenPOWER HostBoot Project                                             */
/*                                                                        */
/* Contributors Listed Below - COPYRIGHT 2015,2020                        */
/* [+] International Business Machines Corp.                              */
/*                                                                        */
/*                                                                        */
/* Licensed under the Apache License, Version 2.0 (the "License");        */
/* you may not use this file except in compliance with the License.       */
/* You may obtain a copy of the License at                                */
/*                                                                        */
/*     http://www.apache.org/licenses/LICENSE-2.0                         */
/*                                                                        */
/* Unless required by applicable law or agreed to in writing, software    */
/* distributed under the License is distributed on an "AS IS" BASIS,      */
/* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or        */
/* implied. See the License for the specific language governing           */
/* permissions and limitations under the License.                         */
/*                                                                        */
/* IBM_PROLOG_END_TAG                                                     */
/**
 * @file    call_proc_omi_scominit.C
 *
 *  Contains wrappers for Istep 12.3
 *      p10_omi_scominit
 *      p10_omi_setup_bars
 *
 */
#include    <stdint.h>

#include    <trace/interface.H>
#include    <initservice/taskargs.H>
#include    <errl/errlentry.H>

#include    <isteps/hwpisteperror.H>
#include    <errl/errludtarget.H>

#include    <initservice/isteps_trace.H>
#include    <istepHelperFuncs.H>          // captureError

//  targeting support.
#include    <targeting/common/commontargeting.H>
#include    <targeting/common/utilFilter.H>

//Fapi Support
#include    <config.h>
#include    <fapi2.H>
#include    <fapi2/plat_hwp_invoker.H>
#include    <util/utilmbox_scratch.H>

// HWP
#include <p10_omi_setup_bars.H>
#include <p10_omi_scominit.H>

#include    <mmio/mmio.H>

using   namespace   ISTEP;
using   namespace   ISTEP_ERROR;
using   namespace   ERRORLOG;
using   namespace   TARGETING;

namespace ISTEP_12
{
void* call_proc_omi_scominit (void *io_pArgs)
{
    IStepError l_StepError;
    errlHndl_t l_err = nullptr;

    TARGETING::TargetHandleList l_procTargetList;
    getAllChips(l_procTargetList, TYPE_PROC);

    TRACFCOMP(ISTEPS_TRACE::g_trac_isteps_trace, "call_proc_omi_scominit "
        "entry. %d procs found", l_procTargetList.size());

    // 12.3.a p10_omi_scominit.C is an empty place holder
    // TODO: RTC 248244  Verify the EKB function is implemented
    TRACDCOMP(ISTEPS_TRACE::g_trac_isteps_trace, ENTER_MRK"p10_omi_scominit");

    for (const auto & l_proc_target : l_procTargetList)
    {
        TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace,
            "p10_omi_scominit HWP target HUID %.8x",
            TARGETING::get_huid(l_proc_target));

        //  call the HWP with each target
        fapi2::Target <fapi2::TARGET_TYPE_PROC_CHIP> l_fapi_proc_target
                (l_proc_target);

        FAPI_INVOKE_HWP(l_err, p10_omi_scominit, l_fapi_proc_target);

        //  process return code.
        if ( l_err )
        {
            TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace,
                "ERROR : call p10_omi_scominit HWP(): failed on target 0x%08X. "
                TRACE_ERR_FMT,
                get_huid(l_proc_target),
                TRACE_ERR_ARGS(l_err));

            // Capture error
            captureError(l_err, l_StepError, HWPF_COMP_ID, l_proc_target);
        }
        else
        {
            TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace,
                     "SUCCESS :  p10_omi_scominit HWP");
        }
    }

    TRACFCOMP(ISTEPS_TRACE::g_trac_isteps_trace, EXIT_MRK"p10_omi_scominit");

    // 12.3.b p10_omi_setup_bars.C
    TRACDCOMP(ISTEPS_TRACE::g_trac_isteps_trace, ENTER_MRK"p10_omi_setup_bars");

    for (const auto & l_proc_target : l_procTargetList)
    {
        TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace,
            "p10_omi_setup_bars HWP target HUID %.8x",
            TARGETING::get_huid(l_proc_target));

        //  call the HWP with each target
        fapi2::Target <fapi2::TARGET_TYPE_PROC_CHIP> l_fapi_proc_target
                (l_proc_target);

        FAPI_INVOKE_HWP(l_err, p10_omi_setup_bars, l_fapi_proc_target);

        //  process return code.
        if ( l_err )
        {
            TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace,
              "ERROR : call p10_omi_setup_bars HWP(): failed on target 0x%08X. "
              TRACE_ERR_FMT,
              get_huid(l_proc_target),
              TRACE_ERR_ARGS(l_err));

            // Capture error
            captureError(l_err, l_StepError, HWPF_COMP_ID, l_proc_target);
        }
        else
        {
            TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace,
                     "SUCCESS :  p10_omi_setup_bars HWP");
        }
    }

    TRACFCOMP(ISTEPS_TRACE::g_trac_isteps_trace, EXIT_MRK"p10_omi_setup_bars");

    // map OCMBs into Hostboot memory
    l_err = MMIO::mmioSetup();
    if ( l_err )
    {
        TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace,
            "ERROR : call mmioSetup() : unable to initialize MMIO! "
            TRACE_ERR_FMT,
            TRACE_ERR_ARGS(l_err));

        // Capture error
        captureError(l_err, l_StepError, ISTEP_COMP_ID);
    }

    TRACFCOMP(ISTEPS_TRACE::g_trac_isteps_trace, "call_proc_omi_scominit exit");

    // end task, returning any errorlogs to IStepDisp
    return l_StepError.getErrorHandle();
}

};


text:
package com.commonsware.android.urlhandler;

import android.app.Activity;
import android.content.Intent;
import android.net.Uri;
import android.os.Bundle;
import android.util.Log;
import android.view.View;
import android.widget.TextView;

public class URLHandler extends Activity {
  @Override
  public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.main);

    TextView uri=(TextView)findViewById(R.id.uri);

    if (Intent.ACTION_MAIN.equals(getIntent().getAction())) {
      String intentUri=(new Intent("com.commonsware.android.MY_ACTION"))
                          .toUri(Intent.URI_INTENT_SCHEME)
                          .toString();

      uri.setText(intentUri);
      Log.w("URLHandler", intentUri);
    }
    else {
      Uri data=getIntent().getData();

      if (data==null) {
        uri.setText("Got com.commonsware.android.MY_ACTION Intent");
      }
      else {
        uri.setText(getIntent().getData().toString());
      }
    }
  }

  public void visitSample(View v) {
    startActivity(new Intent(Intent.ACTION_VIEW,
                             Uri.parse("http://commonsware.com/sample")));
  }
}