text:
require "action_view"

module Datagrid
  class Renderer #:nodoc:

    def self.for(template)
      new(template)
    end

    def initialize(template)
      @template = template
    end

    def format_value(grid, column, asset)
      if column.is_a?(String) || column.is_a?(Symbol)
        column = grid.column_by_name(column)
      end

      value = grid.html_value(column, @template, asset)

      url = column.options[:url] && column.options[:url].call(asset)
      if url
        @template.link_to(value, url)
      else
        value
      end
    end

    def form_for(grid, options = {})
      options[:method] ||= :get
      options[:html] ||= {}
      options[:html][:class] ||= "datagrid-form #{@template.dom_class(grid)}"
      options[:as] ||= grid.param_name
      _render_partial('form', options[:partials], {:grid => grid, :options => options})
    end

    def table(grid, *args)
      options = args.extract_options!
      options[:html] ||= {}
      options[:html][:class] ||= "datagrid #{@template.dom_class(grid)}"
      if options[:cycle]
        ::Datagrid::Utils.warn_once("datagrid_table cycle option is deprecated. Use css to style odd/even rows instead.")
      end
      assets = args.any? ? args.shift : grid.assets
      paginate = options[:paginate]
      if paginate
        ::Datagrid::Utils.warn_once(":paginate option is deprecated. Look to https://github.com/bogdan/datagrid/wiki/Frontend.")
        assets = assets.paginate(paginate)
      end

      _render_partial('table', options[:partials],
                      {
                        :grid => grid,
                        :options => options,
                        :assets => assets
                      })
    end

    def header(grid, options = {})
      options[:order] = true unless options.has_key?(:order)

      _render_partial('head', options[:partials],
                      { :grid => grid, :options => options })
    end

    def rows(grid, assets, options = {})
      result = assets.map do |asset|
        _render_partial(
          'row', options[:partials],
          {
            :grid => grid,
            :options => options,
            :asset => asset
          })
      end.to_a.join

      _safe(result)
    end

    def order_for(grid, column, options = {})
      _render_partial('order_for', options[:partials],
                      { :grid => grid, :column => column })
    end

    private

    def _safe(string)
      string.respond_to?(:html_safe) ? string.html_safe : string
    end

    def _render_partial(partial_name, partials_path, locals = {})
      @template.render({
        :partial => File.join(partials_path || 'datagrid', partial_name),
        :locals => locals
      })
    end
  end
end


text:
<?php

namespace Http\Adapter\React\Tests;

use Http\Adapter\React\Client;
use Http\Client\Tests\HttpClientTest;
use Psr\Http\Client\ClientInterface;

/**
 * @author Stéphane Hulard <s.hulard@chstudio.fr>
 */
class ClientTest extends HttpClientTest
{
    protected function createHttpAdapter(): ClientInterface
    {
        return new Client();
    }
}

redpajama_set_name: RedPajamaGithub


text:
package org.foliage.common.domain;

/**
 *
 *
 * @author deathknight0718@qq.com.
 * @version 1.0.0
 */
public interface Verifiable<T> {

    boolean verify(T input) throws Exception;

}


text:
package org.apache.jackrabbit.core.observation;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;

import javax.jcr.AccessDeniedException;
import javax.jcr.RepositoryException;
import javax.jcr.UnsupportedRepositoryOperationException;
import javax.jcr.observation.EventJournal;
import javax.jcr.observation.EventListener;
import javax.jcr.observation.EventListenerIterator;
import javax.jcr.observation.ObservationManager;

import org.apache.jackrabbit.api.observation.JackrabbitEventFilter;
import org.apache.jackrabbit.api.observation.JackrabbitObservationManager;
import org.apache.jackrabbit.core.SessionImpl;
import org.apache.jackrabbit.core.cluster.ClusterNode;
import org.apache.jackrabbit.core.id.NodeId;
import org.apache.jackrabbit.core.nodetype.NodeTypeImpl;
import org.apache.jackrabbit.core.nodetype.NodeTypeManagerImpl;
import org.apache.jackrabbit.spi.Path;
import org.apache.jackrabbit.spi.commons.conversion.NameException;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

/**
 * Each Session instance has its own ObservationManager
 * instance. The class SessionLocalObservationManager implements
 * this behaviour.
 */
public class ObservationManagerImpl implements EventStateCollectionFactory,
        JackrabbitObservationManager {

    /**
     * The logger instance of this class
     */
    private static final Logger log = LoggerFactory.getLogger(ObservationManagerImpl.class);

    /**
     * The Session this ObservationManager
     * belongs to.
     */
    private final SessionImpl session;

    /**
     * The cluster node where this session is running.
     */
    private final ClusterNode clusterNode;

    /**
     * The ObservationDispatcher
     */
    private final ObservationDispatcher dispatcher;

    /**
     * The currently set user data.
     */
    private String userData;

    static {
        // preload EventListenerIteratorImpl to prevent classloader issues during shutdown
        EventListenerIteratorImpl.class.hashCode();
    }

    /**
     * Creates an ObservationManager instance.
     *
     * @param dispatcher observation dispatcher
     * @param session the Session this ObservationManager
     *                belongs to.
     * @param clusterNode
     * @throws NullPointerException if dispatcher, session
     *                              or clusterNode is null.
     */
    public ObservationManagerImpl(
            ObservationDispatcher dispatcher, SessionImpl session,
            ClusterNode clusterNode) {
        if (dispatcher == null) {
            throw new NullPointerException("dispatcher");
        }
        if (session == null) {
            throw new NullPointerException("session");
        }

        this.dispatcher = dispatcher;
        this.session = session;
        this.clusterNode = clusterNode;
    }

    /**
     * {@inheritDoc}
     */
    public void addEventListener(EventListener listener,
                                 int eventTypes,
                                 String absPath,
                                 boolean isDeep,
                                 String[] uuid,
                                 String[] nodeTypeName,
                                 boolean noLocal)
            throws RepositoryException {

        // create filter
        EventFilter filter = createEventFilter(eventTypes, Collections.singletonList(absPath),
                isDeep, uuid, nodeTypeName, noLocal, false, false);

        dispatcher.addConsumer(new EventConsumer(session, listener, filter));
    }

    @Override
    public void addEventListener(EventListener listener, JackrabbitEventFilter filter)
            throws RepositoryException {

        String[] excludedPaths = filter.getExcludedPaths();
        if (excludedPaths.length > 0) {
            log.warn("JackrabbitEventFilter excludedPaths is not implemented and will be ignored: {}",
                    Arrays.toString(excludedPaths));
        }

        List<String> absPaths = new ArrayList<String>(Arrays.asList(filter.getAdditionalPaths()));
        if (filter.getAbsPath() != null) {
            absPaths.add(filter.getAbsPath());
        }

        EventFilter f = createEventFilter(filter.getEventTypes(), absPaths,
                filter.getIsDeep(), filter.getIdentifiers(), filter.getNodeTypes(),
                filter.getNoLocal(), filter.getNoExternal(), filter.getNoInternal());

        dispatcher.addConsumer(new EventConsumer(session, listener, f));
    }

    /**
     * {@inheritDoc}
     */
    public void removeEventListener(EventListener listener)
            throws RepositoryException {
        dispatcher.removeConsumer(
                new EventConsumer(session, listener, EventFilter.BLOCK_ALL));

    }

    /**
     * {@inheritDoc}
     */
    public EventListenerIterator getRegisteredEventListeners()
            throws RepositoryException {
        return new EventListenerIteratorImpl(
                session,
                dispatcher.getSynchronousConsumers(),
                dispatcher.getAsynchronousConsumers());
    }

    /**
     * {@inheritDoc}
     */
    public void setUserData(String userData) throws RepositoryException {
        this.userData = userData;
    }

    /**
     * @return the currently set user data.
     */
    String getUserData() {
        return userData;
    }

    /**
     * Unregisters all EventListeners.
     */
    public void dispose() {
        try {
            EventListenerIterator it = getRegisteredEventListeners();
            while (it.hasNext()) {
                EventListener l = it.nextEventListener();
                log.debug("removing EventListener: " + l);
                removeEventListener(l);
            }
        } catch (RepositoryException e) {
            log.error("Internal error: Unable to dispose ObservationManager.", e);
        }

    }

    /**
     * Creates a new event filter with the given restrictions.
     *
     * @param eventTypes A combination of one or more event type constants encoded as a bitmask.
     * @param absPaths absolute paths.
     * @param isDeep a boolean.
     * @param uuid array of UUIDs.
     * @param nodeTypeName array of node type names.
     * @param noLocal a boolean.
     * @param noExternal a boolean.
     * @param noInternal a boolean.
     * @return the event filter with the given restrictions.
     * @throws RepositoryException if an error occurs.
     */
    public EventFilter createEventFilter(int eventTypes,
                                         List<String> absPaths,
                                         boolean isDeep,
                                         String[] uuid,
                                         String[] nodeTypeName,
                                         boolean noLocal,
                                         boolean noExternal,
                                         boolean noInternal)
            throws RepositoryException {
        // create NodeType instances from names
        NodeTypeImpl[] nodeTypes;
        if (nodeTypeName == null) {
            nodeTypes = null;
        } else {
            NodeTypeManagerImpl ntMgr = session.getNodeTypeManager();
            nodeTypes = new NodeTypeImpl[nodeTypeName.length];
            for (int i = 0; i < nodeTypes.length; i++) {
                nodeTypes[i] = (NodeTypeImpl) ntMgr.getNodeType(nodeTypeName[i]);
            }
        }

        List<Path> paths = new ArrayList<Path>();
        for (String absPath : absPaths) {
            try {
                Path normalizedPath = session.getQPath(absPath).getNormalizedPath();
                if (!normalizedPath.isAbsolute()) {
                    throw new RepositoryException("absPath must be absolute");
                }
                paths.add(normalizedPath);
            } catch (NameException e) {
                String msg = "invalid path syntax: " + absPath;
                log.debug(msg);
                throw new RepositoryException(msg, e);

        }            }
        NodeId[] ids = null;
        if (uuid != null) {
            ids = new NodeId[uuid.length];
            for (int i = 0; i < uuid.length; i++) {
                ids[i] = NodeId.valueOf(uuid[i]);
            }
        }
        // create filter
        return new EventFilter(
                session, eventTypes, paths, isDeep, ids, nodeTypes, noLocal, noExternal, noInternal);
    }

    /**
     * Returns the event journal for this workspace. The events are filtered
     * according to the passed criteria.
     *
     * @param eventTypes A combination of one or more event type constants encoded as a bitmask.
     * @param absPath an absolute path.
     * @param isDeep a boolean.
     * @param uuid array of UUIDs.
     * @param nodeTypeName array of node type names.
     * @return the event journal for this repository.
     * @throws UnsupportedRepositoryOperationException if this repository does
     *          not support an event journal (cluster journal disabled).
     * @throws RepositoryException if another error occurs.
     * @see ObservationManager#getEventJournal(int, String, boolean, String[], String[])
     */
    public EventJournal getEventJournal(
            int eventTypes, String absPath, boolean isDeep,
            String[] uuid, String[] nodeTypeName)
            throws RepositoryException {
        if (clusterNode == null) {
            throw new UnsupportedRepositoryOperationException(
                    "Event journal is only available in cluster deployments");
        }

        if (!session.isAdmin()) {
            throw new AccessDeniedException("Only administrator session may access EventJournal");
        }

        EventFilter filter = createEventFilter(
                eventTypes, Collections.singletonList(absPath), isDeep, uuid, nodeTypeName, false, false, false);
        return new EventJournalImpl(
                filter, clusterNode.getJournal(), clusterNode.getId(), session);
    }

    /**
     * Returns an unfiltered event journal for this workspace.
     *
     * @return the event journal for this repository.
     * @throws UnsupportedRepositoryOperationException if this repository does
     *          not support an event journal (cluster journal disabled).
     * @throws RepositoryException if another error occurs.
     */
    public EventJournal getEventJournal() throws RepositoryException {
        return getEventJournal(-1, "/", true, null, null);
    }

    //------------------------------------------< EventStateCollectionFactory >

    /**
     * {@inheritDoc}
     *

     * Creates an EventStateCollection tied to the session
     * which is attached to this ObservationManager instance.
     */
    public EventStateCollection createEventStateCollection() {
        EventStateCollection esc = new EventStateCollection(dispatcher, session, null);
        esc.setUserData(userData);
        return esc;
    }

}


text:
<?php

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 * Description of orcaWidgetFormInputText
 *
 * @author srathgeber
 */
class orcaWidgetFormInputTextMoney extends sfWidgetFormInputText
{

    protected function configure($options = array(), $attributes = array())
    {
        $this->addOption('money', '€');
        $this->addOption('digits', 0);

        parent::configure($options, $attributes);
    }

    /**
     * @param  string $name        The element name
     * @param  string $value       The value displayed in this widget
     * @param  array  $attributes  An array of HTML attributes to be merged with the default HTML attributes
     * @param  array  $errors      An array of errors for the field
     *
     * @return string An HTML tag string
     *
     * @see sfWidgetForm
     */
    public function render($name, $value = null, $attributes = array(), $errors = array())
    {
        if (is_numeric($value)) {
          $value = number_format($value,$this->getOption('digits'),".","");
        }
        return $this->renderTag('input', array_merge(array('type' => $this->getOption('type'), 'name' => $name, 'value' => $value), $attributes)) . ' ' . $this->getOption('money') . '';
    }

}


text:
"""
    flask_security.recoverable
    ~~~~~~~~~~~~~~~~~~~~~~~~~~

    Flask-Security recoverable module

    :copyright: (c) 2012 by Matt Wright.
    :license: MIT, see LICENSE for more details.
"""

from flask import current_app as app
from werkzeug.local import LocalProxy

from .signals import password_reset, reset_password_instructions_sent
from .utils import config_value, get_token_status, hash_data, hash_password, \
    send_mail, url_for_security, verify_hash

# Convenient references
_security = LocalProxy(lambda: app.extensions['security'])

_datastore = LocalProxy(lambda: _security.datastore)

def send_reset_password_instructions(user):
    """Sends the reset password instructions email for the specified user.

    :param user: The user to send the instructions to
    """
    token = generate_reset_password_token(user)
    reset_link = url_for_security(
        'reset_password', token=token, _external=True
    )

    if config_value('SEND_PASSWORD_RESET_EMAIL'):
        send_mail(config_value('EMAIL_SUBJECT_PASSWORD_RESET'), user.email,
                  'reset_instructions',
                  user=user, reset_link=reset_link)

    reset_password_instructions_sent.send(
        app._get_current_object(), user=user, token=token
    )

def send_password_reset_notice(user):
    """Sends the password reset notice email for the specified user.

    :param user: The user to send the notice to
    """
    if config_value('SEND_PASSWORD_RESET_NOTICE_EMAIL'):
        send_mail(config_value('EMAIL_SUBJECT_PASSWORD_NOTICE'), user.email,
                  'reset_notice', user=user)

def generate_reset_password_token(user):
    """Generates a unique reset password token for the specified user.

    :param user: The user to work with
    """
    password_hash = hash_data(user.password) if user.password else None
    data = [str(user.id), password_hash]
    return _security.reset_serializer.dumps(data)

def reset_password_token_status(token):
    """Returns the expired status, invalid status, and user of a password reset
    token. For example::

        expired, invalid, user, data = reset_password_token_status('...')

    :param token: The password reset token
    """
    expired, invalid, user, data = get_token_status(
        token, 'reset', 'RESET_PASSWORD', return_data=True
    )
    if not invalid and user:
        if user.password:
            if not verify_hash(data[1], user.password):
                invalid = True

    return expired, invalid, user

def update_password(user, password):
    """Update the specified user's password

    :param user: The user to update_password
    :param password: The unhashed new password
    """
    user.password = hash_password(password)
    _datastore.put(user)
    send_password_reset_notice(user)
    password_reset.send(app._get_current_object(), user=user)


text:
<!DOCTYPE html>

  <meta charset="utf-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <title>Go Sling</title>

  <meta name="description" content="">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">

  <link rel="shortcut icon" href="/images/favicon.png">
  <link rel="apple-touch-icon" sizes="57x57" href="/images/apple-touch-icon.png">
  <link rel="apple-touch-icon" sizes="72x72" href="/images/apple-touch-icon-72x72.png">
  <link rel="apple-touch-icon" sizes="114x114" href="/images/apple-touch-icon-114x114.png">
  <link href='http://fonts.googleapis.com/css?family=Courgette' rel='stylesheet' type='text/css'>

  <link rel="stylesheet" href="css/style.css">

  <link rel="stylesheet" type="text/css" href="jquery.js">

  <link rel="stylesheet" type="text/css" href="css/codemirror.css">
  <link rel="stylesheet" type="text/css" href="theme/monokai.css">
  <link rel="stylesheet" type="text/css" href="theme/3024-night.css">
  <link rel="stylesheet" type="text/css" href="theme/abiance.css">
  <link rel="stylesheet" type="text/css" href="theme/base16-dark.css">
  <link rel="stylesheet" type="text/css" href="theme/blackboard.css">
  <link rel="stylesheet" type="text/css" href="theme/cobalt.css">
  <link rel="stylesheet" type="text/css" href="theme/elegant.css">
  <link rel="stylesheet" type="text/css" href="theme/erlang-dark.css">
  <link rel="stylesheet" type="text/css" href="theme/lesser-dark.css">

  <link rel="stylesheet" href="main.css">

        Go Sling

        Hello World

        Paragraphs

        Formatting

        Some other shit

  <textarea id="code_area" autofocus></textarea>


text:
package com.structurizr.model;

import com.structurizr.AbstractWorkspaceTestBase;
import org.junit.jupiter.api.Test;

import static org.junit.jupiter.api.Assertions.*;

public class ElementTests extends AbstractWorkspaceTestBase {

    @Test
    void construction() {
        Element element = model.addSoftwareSystem("Name", "Description");
        assertEquals("Name", element.getName());
        assertEquals("Description", element.getDescription());
    }

    @Test
    void setName_ThrowsAnException_WhenANullValueIsSpecified() {
        Element element = model.addSoftwareSystem("Name", "Description");
        try {
            element.setName(null);
            fail();
        } catch (Exception e) {
            assertEquals("The name of an element must not be null or empty.", e.getMessage());
        }
    }

    @Test
    void setName_ThrowsAnException_WhenAnEmptyValueIsSpecified() {
        Element element = model.addSoftwareSystem("Name", "Description");
        try {
            element.setName(" ");
            fail();
        } catch (Exception e) {
            assertEquals("The name of an element must not be null or empty.", e.getMessage());
        }
    }

    @Test
    void hasEfferentRelationshipWith_ReturnsFalse_WhenANullElementIsSpecified() {
        SoftwareSystem softwareSystem1 = model.addSoftwareSystem("System 1", "");
        assertFalse(softwareSystem1.hasEfferentRelationshipWith(null));
    }

    @Test
    void hasEfferentRelationshipWith_ReturnsFalse_WhenTheSameElementIsSpecifiedAndNoCyclicRelationshipExists() {
        SoftwareSystem softwareSystem1 = model.addSoftwareSystem("System 1", "");
        assertFalse(softwareSystem1.hasEfferentRelationshipWith(softwareSystem1));
    }

    @Test
    void hasEfferentRelationshipWith_ReturnsTrue_WhenTheSameElementIsSpecifiedAndACyclicRelationshipExists() {
        SoftwareSystem softwareSystem1 = model.addSoftwareSystem("System 1", "");
        softwareSystem1.uses(softwareSystem1, "uses");
        assertTrue(softwareSystem1.hasEfferentRelationshipWith(softwareSystem1));
    }

    @Test
    void hasEfferentRelationshipWith_ReturnsTrue_WhenThereIsARelationship() {
        SoftwareSystem softwareSystem1 = model.addSoftwareSystem("System 1", "");
        SoftwareSystem softwareSystem2 = model.addSoftwareSystem("System 2", "");
        softwareSystem1.uses(softwareSystem2, "uses");
        assertTrue(softwareSystem1.hasEfferentRelationshipWith(softwareSystem2));
    }

    @Test
    void hasEfferentRelationshipWithElementAndDescription_ReturnsFalse_WhenANullElementIsSpecified() {
        SoftwareSystem softwareSystem1 = model.addSoftwareSystem("System 1", "");
        assertFalse(softwareSystem1.hasEfferentRelationshipWith(null, null));
    }

    @Test
    void hasEfferentRelationshipWithElementAndDescription_ReturnsFalse_WhenThereIsNotAMatchingRelationship() {
        SoftwareSystem softwareSystem1 = model.addSoftwareSystem("System 1", "");
        SoftwareSystem softwareSystem2 = model.addSoftwareSystem("System 2", "");
        softwareSystem1.uses(softwareSystem2, "Uses");

        assertFalse(softwareSystem1.hasEfferentRelationshipWith(softwareSystem2, "Does something with"));
    }

    @Test
    void hasEfferentRelationshipWithElementAndDescription_ReturnsTrue_WhenThereIsAMatchingRelationship() {
        SoftwareSystem softwareSystem1 = model.addSoftwareSystem("System 1", "");
        SoftwareSystem softwareSystem2 = model.addSoftwareSystem("System 2", "");
        softwareSystem1.uses(softwareSystem2, "Uses");

        assertTrue(softwareSystem1.hasEfferentRelationshipWith(softwareSystem2, "Uses"));
    }

    @Test
    void getEfferentRelationshipWith_ReturnsNull_WhenANullElementIsSpecified() {
        SoftwareSystem softwareSystem1 = model.addSoftwareSystem("System 1", "");
        assertNull(softwareSystem1.getEfferentRelationshipWith(null));
    }

    @Test
    void getEfferentRelationshipWith_ReturnsNull_WhenTheSameElementIsSpecifiedAndNoCyclicRelationshipExists() {
        SoftwareSystem softwareSystem1 = model.addSoftwareSystem("System 1", "");
        assertNull(softwareSystem1.getEfferentRelationshipWith(softwareSystem1));
    }

    @Test
    void getEfferentRelationshipWith_ReturnsCyclicRelationship_WhenTheSameElementIsSpecifiedAndACyclicRelationshipExists() {
        SoftwareSystem softwareSystem1 = model.addSoftwareSystem("System 1", "");
        softwareSystem1.uses(softwareSystem1, "uses");

        Relationship relationship = softwareSystem1.getEfferentRelationshipWith(softwareSystem1);
        assertSame(softwareSystem1, relationship.getSource());
        assertEquals("uses", relationship.getDescription());
        assertSame(softwareSystem1, relationship.getDestination());
    }

    @Test
    void getEfferentRelationshipWith_ReturnsTheRelationship_WhenThereIsARelationship() {
        SoftwareSystem softwareSystem1 = model.addSoftwareSystem("System 1", "");
        SoftwareSystem softwareSystem2 = model.addSoftwareSystem("System 2", "");
        softwareSystem1.uses(softwareSystem2, "uses");

        Relationship relationship = softwareSystem1.getEfferentRelationshipWith(softwareSystem2);
        assertSame(softwareSystem1, relationship.getSource());
        assertEquals("uses", relationship.getDescription());
        assertSame(softwareSystem2, relationship.getDestination());
    }

    @Test
    void hasAfferentRelationships_ReturnsFalse_WhenThereAreNoIncomingRelationships() {
        SoftwareSystem softwareSystem1 = model.addSoftwareSystem("System 1", "");
        SoftwareSystem softwareSystem2 = model.addSoftwareSystem("System 2", "");
        softwareSystem1.uses(softwareSystem2, "Uses");

        assertFalse(softwareSystem1.hasAfferentRelationships());
    }

    @Test
    void hasAfferentRelationships_ReturnsTrue_WhenThereAreIncomingRelationships() {
        SoftwareSystem softwareSystem1 = model.addSoftwareSystem("System 1", "");
        SoftwareSystem softwareSystem2 = model.addSoftwareSystem("System 2", "");
        softwareSystem1.uses(softwareSystem2, "Uses");

        assertTrue(softwareSystem2.hasAfferentRelationships());
    }

    @Test
    void addRelationship_DoesNothing_WhenTheSameRelationshipWithASoftwareSystemIsAddedMoreThanOnce() {
        SoftwareSystem a = model.addSoftwareSystem("A", "");
        SoftwareSystem b = model.addSoftwareSystem("B", "");

        Relationship relationship = a.uses(b, "Uses");
        assertNotNull(relationship);
        assertEquals(1, model.getRelationships().size());

        assertNull(a.uses(b, "Uses"));
        assertEquals(1, model.getRelationships().size());

        assertNull(a.uses(b, "Uses", "Technology"));
        assertEquals(1, model.getRelationships().size());

        assertNull(a.uses(b, "Uses", "Technology", InteractionStyle.Synchronous));
        assertEquals(1, model.getRelationships().size());
    }

    @Test
    void addRelationship_DoesNothing_WhenTheSameRelationshipWithAContainerIsAddedMoreThanOnce() {
        SoftwareSystem a = model.addSoftwareSystem("A", "");
        SoftwareSystem b = model.addSoftwareSystem("B", "");
        Container bb = b.addContainer("BB", "", "");

        Relationship relationship = a.uses(bb, "Uses");
        assertNotNull(relationship);
        assertEquals(1, model.getRelationships().size());

        assertNull(a.uses(bb, "Uses"));
        assertEquals(1, model.getRelationships().size());

        assertNull(a.uses(bb, "Uses", "Technology"));
        assertEquals(1, model.getRelationships().size());

        assertNull(a.uses(bb, "Uses", "Technology", InteractionStyle.Synchronous));
        assertEquals(1, model.getRelationships().size());
    }

    @Test
    void addRelationship_DoesNothing_WhenTheSameRelationshipWithAComponentIsAddedMoreThanOnce() {
        SoftwareSystem a = model.addSoftwareSystem("A", "");
        SoftwareSystem b = model.addSoftwareSystem("B", "");
        Container bb = b.addContainer("BB", "", "");
        Component bbb = bb.addComponent("BBB", "", "");

        Relationship relationship = a.uses(bbb, "Uses");
        assertNotNull(relationship);
        assertEquals(1, model.getRelationships().size());

        assertNull(a.uses(bbb, "Uses"));
        assertEquals(1, model.getRelationships().size());

        assertNull(a.uses(bbb, "Uses", "Technology"));
        assertEquals(1, model.getRelationships().size());

        assertNull(a.uses(bbb, "Uses", "Technology", InteractionStyle.Synchronous));
        assertEquals(1, model.getRelationships().size());
    }

    @Test
    void addRelationship_DoesNothing_WhenTheSameRelationshipWithAPersonIsAddedMoreThanOnce() {
        SoftwareSystem a = model.addSoftwareSystem("A", "");
        Person b = model.addPerson("B", "");

        Relationship relationship = a.delivers(b, "Sends e-mail to");
        assertNotNull(relationship);
        assertEquals(1, model.getRelationships().size());

        assertNull(a.delivers(b, "Sends e-mail to"));
        assertEquals(1, model.getRelationships().size());

        assertNull(a.delivers(b, "Sends e-mail to", "Technology"));
        assertEquals(1, model.getRelationships().size());

        assertNull(a.delivers(b, "Sends e-mail to", "Technology", InteractionStyle.Synchronous));
        assertEquals(1, model.getRelationships().size());
    }

    @Test
    void equals_ReturnsFalse_WhenTestedAgainstNull() {
        SoftwareSystem softwareSystem = model.addSoftwareSystem("Name", "Description");
        assertNotEquals(softwareSystem, null);
    }

    @Test
    void equals_ReturnsFalse_WhenTheTwoObjectsAreDifferentTypes() {
        SoftwareSystem softwareSystem = model.addSoftwareSystem("Name", "Description");
        assertNotEquals(softwareSystem, "hello world");
    }

    @Test
    void equals_ReturnsTrue_WhenTestedAgainstItself() {
        SoftwareSystem softwareSystem = model.addSoftwareSystem("Name", "Description");
        assertEquals(softwareSystem, softwareSystem);
    }

    @Test
    void equals_ReturnsFalse_WhenTheTwoObjectsAreDifferent() {
        SoftwareSystem softwareSystemA = model.addSoftwareSystem("A", "Description");
        SoftwareSystem softwareSystemB = model.addSoftwareSystem("B", "Description");
        assertNotEquals(softwareSystemA, softwareSystemB);
    }

    @Test
    void equals_ReturnsFalse_WhenTheTwoElementsHaveTheSameCanonicalNameButAreDifferentTypes() {
        SoftwareSystem softwareSystem = model.addSoftwareSystem("Name", "Description");
        Person person = model.addPerson("Name", "Description");
        assertNotEquals(softwareSystem, person);
    }

    @Test
    void setUrl() {
        Element element = model.addSoftwareSystem("Name", "Description");
        element.setUrl("https://structurizr.com");
        assertEquals("https://structurizr.com", element.getUrl());
    }

    @Test
    void setUrl_ThrowsAnIllegalArgumentException_WhenAnInvalidUrlIsSpecified() {
        assertThrows(IllegalArgumentException.class, () -> {
            Element element = model.addSoftwareSystem("Name", "Description");
            element.setUrl("htt://blah");
        });
    }

    @Test
    void setUrl_ResetsTheUrl_WhenANullUrlIsSpecified() {
        Element element = model.addSoftwareSystem("Name", "Description");
        element.setUrl("https://structurizr.com");
        element.setUrl(null);
        assertNull(element.getUrl());
    }

    @Test
    void setUrl_ResetsTheUrl_WhenAnEmptyUrlIsSpecified() {
        Element element = model.addSoftwareSystem("Name", "Description");
        element.setUrl("https://structurizr.com");
        element.setUrl(" ");
        assertNull(element.getUrl());
    }

}


text:
My heroes

Hero name:<input #heroName/>
  <button (click)="add(heroName.value); heroName.value=''">Add</button>

    {{hero.id}}
    {{hero.name}}
    <button class="delete" (click)="delete(hero); $event.stopPropagation()">x</button>

{{selectedHero.name | uppercase}} is the hero of a day

  <button (click)="gotoDetail()">View Details</button>


text:
/***************************************************************************//**
* \file cyhal_irq_impl.h
*
* \brief
* Provides internal utility functions for working with interrupts on CAT1/CAT2.
*
********************************************************************************
* \copyright
* Copyright 2018-2022 Cypress Semiconductor Corporation (an Infineon company) or
* an affiliate of Cypress Semiconductor Corporation
*
* SPDX-License-Identifier: Apache-2.0
*
* 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.
*******************************************************************************/

#pragma once
#include "cyhal_utils.h"
#include "cy_result.h"
#include "cy_sysint.h"

/* System IRQ refers to signals that peripherals produce to request and interrupt,
 * which may or may not correspond 1:1 to the CPU IRQ lines */
#if defined(COMPONENT_CAT1)
#define _CYHAL_IRQ_MUXING (CY_CPU_CORTEX_M0P || CPUSS_SYSTEM_IRQ_PRESENT)
#else
#define _CYHAL_IRQ_MUXING (0)
#endif
/* Old-style IRQ muxing where each CPU interrupt can be driven by exactly one System interrupt.
 * This is a subset of _CYHAL_IRQ_MUXING. */
#define _CYHAL_IRQ_LEGACY_M0 (CY_CPU_CORTEX_M0P && (1u == CY_IP_M4CPUSS_VERSION))

#if !(_CYHAL_IRQ_LEGACY_M0)
/* Interrupt priority is set per CPU interrupt, but application-defined priorities are set
 * in terms of system interrupts. So keep track of the IRQ per system interrupt and
 * set the CPU interrupt priority to the lowest (i.e. most important) value of any
 * system interrupt that is connected to it */
#if (CY_CPU_CORTEX_M0P)
    #define _CYHAL_IRQ_PRIO_BITS (3u)
#elif defined(CY_IP_M4CPUSS)
    #define _CYHAL_IRQ_PRIO_BITS (CPUSS_CM4_LVL_WIDTH)
#else /* M7CPUSS */
    #define _CYHAL_IRQ_PRIO_BITS (CPUSS_CM7_LVL_WIDTH)
#endif

#if defined(CY_IP_M4CPUSS)
    #define _CYHAL_IRQ_COUNT    (CPUSS_IRQ_NR)
#else /* M7CPUSS */
    #define _CYHAL_IRQ_COUNT    (CPUSS_SYSTEM_INT_NR)
#endif

#endif // !(_CYHAL_IRQ_LEGACY_M0)

#if (_CYHAL_IRQ_MUXING)
typedef cy_en_intr_t _cyhal_system_irq_t;
#else
typedef IRQn_Type    _cyhal_system_irq_t;
#endif

#if _CYHAL_IRQ_LEGACY_M0
IRQn_Type _cyhal_irq_find_cm0(cy_en_intr_t system_intr);
#elif _CYHAL_IRQ_MUXING
uint8_t _cyhal_system_irq_lookup_priority(cy_en_intr_t system_irq);
void _cyhal_system_irq_store_priority(cy_en_intr_t system_irq, uint8_t priority);
uint8_t _cyhal_system_irq_lowest_priority(IRQn_Type cpu_irq);
#endif

void _cyhal_system_irq_clear_disabled_in_pending(void);
cy_rslt_t _cyhal_irq_register(_cyhal_system_irq_t system_intr, uint8_t intr_priority, cy_israddress irq_handler);

// TODO: Remove this once DRIVERS-7707 is fixed
#if defined(CY_IP_M4CPUSS) && (CY_CPU_CORTEX_M0P) && !(_CYHAL_IRQ_LEGACY_M0)
static void Cy_SysInt_EnableSystemInt(cy_en_intr_t sysIntSrc)
{
    #if defined(CPUSS_V2_CM0_SYSTEM_INT_CTL_CPU_INT_VALID_Msk)
    CPUSS_CM0_SYSTEM_INT_CTL[sysIntSrc] |= CPUSS_V2_CM0_SYSTEM_INT_CTL_CPU_INT_VALID_Msk;
    #else
    CPUSS_CM0_SYSTEM_INT_CTL[sysIntSrc] |= CPUSS_CM0_SYSTEM_INT_CTL_CPU_INT_VALID_Msk;
    #endif
}

static void Cy_SysInt_DisableSystemInt(cy_en_intr_t sysIntSrc)
{
    #if defined(CPUSS_V2_CM0_SYSTEM_INT_CTL_CPU_INT_VALID_Msk)
    CPUSS->CM0_SYSTEM_INT_CTL[sysIntSrc] &= (uint32_t) ~CPUSS_V2_CM0_SYSTEM_INT_CTL_CPU_INT_VALID_Msk;
    #else
    CPUSS->CM0_SYSTEM_INT_CTL[sysIntSrc] &= (uint32_t) ~CPUSS_CM0_SYSTEM_INT_CTL_CPU_INT_VALID_Msk;
    #endif
}
#endif

static inline void _cyhal_irq_set_priority(_cyhal_system_irq_t system_irq, uint8_t intr_priority)
{
#if _CYHAL_IRQ_MUXING
    #if _CYHAL_IRQ_LEGACY_M0
    IRQn_Type irqn = _cyhal_irq_find_cm0(system_irq);
    uint8_t priority_to_set = intr_priority;
    #else /* CM0+ on CPUSSv2, or CM4/CM7 on CPUSSv2 with SYSTEM_IRQ_PRESENT */
    IRQn_Type irqn = Cy_SysInt_GetNvicConnection(system_irq);
    _cyhal_system_irq_store_priority(system_irq, intr_priority);
    uint8_t priority_to_set = _cyhal_system_irq_lowest_priority(irqn);
    #endif
#else
    IRQn_Type irqn = system_irq;
    uint8_t priority_to_set = intr_priority;
#endif
    NVIC_SetPriority(irqn, priority_to_set);
}

static inline uint8_t _cyhal_irq_get_priority(_cyhal_system_irq_t system_irq)
{
#if _CYHAL_IRQ_MUXING
    #if _CYHAL_IRQ_LEGACY_M0
    IRQn_Type irqn = _cyhal_irq_find_cm0(system_irq);
    return NVIC_GetPriority(irqn);
    #else /* CM0+ on CPUSSv2, or CM4/CM7 on CPUSSv2 with SYSTEM_IRQ_PRESENT */
    return _cyhal_system_irq_lookup_priority(system_irq);
    #endif
#else
    return NVIC_GetPriority(system_irq);
#endif
}

static inline void _cyhal_irq_clear_pending(_cyhal_system_irq_t system_irq)
{
#if _CYHAL_IRQ_MUXING
    #if _CYHAL_IRQ_LEGACY_M0
    IRQn_Type irqn = _cyhal_irq_find_cm0(system_irq);
    #else /* CM0+ on CPUSSv2, or CM4/CM7 on CPUSSv2 with SYSTEM_IRQ_PRESENT */
    IRQn_Type irqn = Cy_SysInt_GetNvicConnection(system_irq);
    #endif
#else
    IRQn_Type irqn = system_irq;
#endif
    NVIC_ClearPendingIRQ(irqn);
}

static inline void _cyhal_irq_enable(_cyhal_system_irq_t system_irq)
{
#if _CYHAL_IRQ_MUXING
    #if _CYHAL_IRQ_LEGACY_M0
    IRQn_Type irqn = _cyhal_irq_find_cm0(system_irq);
    #else /* CM0+ on CPUSSv2, or CM4/CM7 on CPUSSv2 with SYSTEM_IRQ_PRESENT */
    Cy_SysInt_EnableSystemInt(system_irq);
    IRQn_Type irqn = Cy_SysInt_GetNvicConnection(system_irq);
    #endif
#else
    IRQn_Type irqn = system_irq;
#endif
    NVIC_EnableIRQ(irqn);
}

static inline void _cyhal_irq_disable(_cyhal_system_irq_t system_irq)
{
#if _CYHAL_IRQ_MUXING
    #if _CYHAL_IRQ_LEGACY_M0
    IRQn_Type irqn = _cyhal_irq_find_cm0(system_irq);
    NVIC_DisableIRQ(irqn);
    #else /* CM0+ on CPUSSv2, or CM4/CM7 on CPUSSv2 with SYSTEM_IRQ_PRESENT */
    Cy_SysInt_DisableSystemInt(system_irq);
    /* Don't call NVIC_DisableIRQ because there could be other system interrupts still using this IRQn */
    #endif
#else
    NVIC_DisableIRQ(system_irq);
#endif
}

#if (_CYHAL_IRQ_MUXING) && defined (COMPONENT_CAT1A) && (!_CYHAL_IRQ_LEGACY_M0)
extern uint8_t _cpu_irq_tracker; // TODO: This is a temporary workaround to assign 1:1 CPU to system mapping.
#endif

static inline void _cyhal_irq_free(_cyhal_system_irq_t system_irq)
{
    #if _CYHAL_IRQ_LEGACY_M0
    /* Need to turn the IRQ off and also clear out the NVIC slot so that we
     * know it's available for other drivers to use */
    IRQn_Type irqn = _cyhal_irq_find_cm0(system_irq);
    NVIC_DisableIRQ(irqn); /* Don't reuse irq_disable because it would have to repeat the find_cm0 */
    Cy_SysInt_DisconnectInterruptSource(irqn, system_irq /* ignored for CPUSSv1 */);
    #elif _CYHAL_IRQ_MUXING /* New style IRQ muxing */
    /* DisconnectInterruptSource on M4CPUSS and DisableSystemInt on M7CPUSS are functionally equivalent */
    IRQn_Type irqn = Cy_SysInt_GetNvicConnection(system_irq);
    // TODO: This is a temporary workaround to assign 1:1 CPU to system mapping.
    #if defined (COMPONENT_CAT1A)
    _cpu_irq_tracker &= ~(1 << irqn);
    #endif
    #if defined(CY_IP_M4CPUSS)
    Cy_SysInt_DisconnectInterruptSource(irqn, system_irq);
    #elif defined(CY_IP_M7CPUSS)
    Cy_SysInt_DisableSystemInt(system_irq);
    #endif

    /* Must happen after the interrupt source is disabled because we use GetNvicConnection to determine
     * what system interrupts are actively associated with a given CPU interrupt */
    uint8_t lowest_priority = _cyhal_system_irq_lowest_priority(irqn);
    NVIC_SetPriority(irqn, lowest_priority);
    #endif

    _cyhal_irq_disable(system_irq);
}

static inline bool _cyhal_irq_is_enabled(_cyhal_system_irq_t system_irq)
{
#if _CYHAL_IRQ_MUXING
    #if _CYHAL_IRQ_LEGACY_M0
    IRQn_Type irqn = _cyhal_irq_find_cm0(system_irq);
    return (unconnected_IRQn != irqn) && NVIC_GetEnableIRQ(irqn);
    #else /* CM0+ on CPUSSv2, or CM4/CM7 on CPUSSv2 with SYSTEM_IRQ_PRESENT */
        /* Based on Cy_SysInt_EnableSystemInt */
        if (CY_CPU_CORTEX_M0P)
        {
            #if defined(CPUSS_V2_CM0_SYSTEM_INT_CTL_CPU_INT_VALID_Msk)
            return (0u != (CPUSS_CM0_SYSTEM_INT_CTL[system_irq] & CPUSS_V2_CM0_SYSTEM_INT_CTL_CPU_INT_VALID_Msk));
            #else
            return (0u != (CPUSS_CM0_SYSTEM_INT_CTL[system_irq] & CPUSS_CM0_SYSTEM_INT_CTL_CPU_INT_VALID_Msk));
            #endif
        }
#if defined(CY_IP_M7CPUSS)
        else if (CY_IS_CM7_CORE_0)
        {
            return (0u != (CPUSS_CM7_0_SYSTEM_INT_CTL[system_irq] & CPUSS_CM7_0_SYSTEM_INT_CTL_CPU_INT_VALID_Msk));
        }
        else if (CY_IS_CM7_CORE_1)
        {
            return (0u != (CPUSS_CM7_1_SYSTEM_INT_CTL[system_irq] & CPUSS_CM7_1_SYSTEM_INT_CTL_CPU_INT_VALID_Msk));
        }
#endif
        else
        {
            CY_ASSERT(false); /* Unsupported CPU */
            return false;
        }
    #endif
#else
    return NVIC_GetEnableIRQ(system_irq);
#endif
}

static inline _cyhal_system_irq_t _cyhal_irq_get_active(void)
{
    IRQn_Type irqn = _CYHAL_UTILS_GET_CURRENT_IRQN();
#if _CYHAL_IRQ_MUXING
    #if _CYHAL_IRQ_LEGACY_M0
    /* No pre-built functionality for this. Need to see what CPU interrupt is active, then
     * indirect through the NVIC mux to figure out what system IRQ it is mapped to. */
    return Cy_SysInt_GetInterruptSource(irqn);
    #else /* CM0+ on CPUSSv2, or CM4/CM7 on CPUSSv2 with SYSTEM_IRQ_PRESENT */
    return Cy_SysInt_GetInterruptActive(irqn);
    #endif
#else
    return irqn;
#endif
}


text:
package cn.limw.summer.mail.javax;

import java.util.Date;

import javax.mail.Flags;
import javax.mail.Message;
import javax.mail.internet.MimeMessage;

import org.slf4j.Logger;

import cn.limw.summer.javax.mail.internet.util.MimeMessageUtil;
import cn.limw.summer.mail.Mail;
import cn.limw.summer.mail.util.MailUtil;
import cn.limw.summer.util.Logs;

/**
 * @author li
 * @version 1 (2014年7月8日 下午12:52:40)
 * @since Java7
 */
public class ReceiveMail extends Mail {
    private static final long serialVersionUID = 1416126665880739848L;

    private static final Logger log = Logs.slf4j();

    private Message message;

    private String uid;

    public ReceiveMail(Message message) {
        this.message = message;
    }

    public String getFrom() {
        if (null == super.getFrom() && null != getMessage()) {
            super.setFrom(MailUtil.getFrom(getMessage()));
        }
        return super.getFrom();
    }

    public String getTo() {
        if (null == super.getTo() && null != getMessage()) {
            super.setTo(MailUtil.getTo(getMessage()));
        }
        return super.getTo();
    }

    public String getSubject() {
        if (null == super.getSubject() && null != getMessage()) {
            super.setSubject(MailUtil.getSubject(getMessage()));
        }
        return super.getSubject();
    }

    public String getContent() {
        if (null == super.getContent()) {
            super.setContent(MailUtil.getContent(getMessage()));
        }
        return super.getContent();
    }

    public String getUid() {
        if (null == uid) {
            uid = MailUtil.getUid(message);
        }
        return uid;
    }

    public String getCc() {
        if (null == super.getCc()) {
            super.setCc(MailUtil.getCc(getMessage()));
        }
        return super.getCc();
    }

    public String getBcc() {
        if (null == super.getBcc()) {
            super.setBcc(MailUtil.getBcc(getMessage()));
        }
        return super.getBcc();
    }

    public void setMessage(Message message) {
        this.message = message;
    }

    public Message getMessage() {
        return message;
    }

    public void setUid(String uid) {
        this.uid = uid;
    }

    public String getMessageId() {
        if (getMessage() instanceof MimeMessage) {
            return MimeMessageUtil.getMessageId((MimeMessage) getMessage());
        } else {
            log.error("getMessageId() 失败 message 类型不是 MimeMessage " + getMessage().getClass());
            return "message-is-not-mime-message";
        }
    }

    public Date getSentDate() {
        if (getMessage() instanceof MimeMessage) {
            return MimeMessageUtil.getSentDate((MimeMessage) getMessage());
        } else {
            log.error("getSentDate() 失败 message 类型不是 MimeMessage " + getMessage().getClass());
            return null;
        }
    }

    public Date getReceivedDate() {
        if (getMessage() instanceof MimeMessage) {
            return MimeMessageUtil.getReceivedDate((MimeMessage) getMessage());
        } else {
            log.error("getReceivedDate() 失败 message 类型不是 MimeMessage " + getMessage().getClass());
            return null;
        }
    }

    public String getSender() {
        if (getMessage() instanceof MimeMessage) {
            return MimeMessageUtil.getSender((MimeMessage) getMessage());
        } else {
            log.error("getReceivedDate() 失败 message 类型不是 MimeMessage " + getMessage().getClass());
            return "message-is-not-mime-message";
        }
    }

    /**
     * 将邮件设置删除标记,需要配合 folder.open(Folder.READ_WRITE) 及 folder.close(true)才会真的删除
     */
    public Boolean delete() {
        try {
            log.info("setting delete flag message=" + getMessage() + ", receiveMail=" + this);
            getMessage().setFlag(Flags.Flag.DELETED, true);
            // getMessage().saveChanges(); // javax.mail.IllegalWriteException: POP3 messages are read-only
            return true;
        } catch (Exception e) {
            throw new RuntimeException(e);
        }
    }
}


text:
namespace blink {

TEST(HTMLTreeBuilderSimulatorTest, SelfClosingSVGFollowedByScript) {
  HTMLParserOptions options;
  HTMLTreeBuilderSimulator simulator(options);
  std::unique_ptr<HTMLTokenizer> tokenizer =
      std::make_unique<HTMLTokenizer>(options);
  SegmentedString input("<svg/><script></script>");
  HTMLToken token;
  EXPECT_TRUE(tokenizer->NextToken(input, token));
  EXPECT_EQ(HTMLTreeBuilderSimulator::kOtherToken,
            simulator.Simulate(
                CompactHTMLToken(&token, TextPosition::MinimumPosition()),
                tokenizer.get()));

  token.Clear();
  EXPECT_TRUE(tokenizer->NextToken(input, token));
  EXPECT_EQ(HTMLTreeBuilderSimulator::kValidScriptStart,
            simulator.Simulate(
                CompactHTMLToken(&token, TextPosition::MinimumPosition()),
                tokenizer.get()));

  EXPECT_EQ(HTMLTokenizer::kScriptDataState, tokenizer->GetState());

  token.Clear();
  EXPECT_TRUE(tokenizer->NextToken(input, token));
  EXPECT_EQ(HTMLTreeBuilderSimulator::kScriptEnd,
            simulator.Simulate(
                CompactHTMLToken(&token, TextPosition::MinimumPosition()),
                tokenizer.get()));
}

TEST(HTMLTreeBuilderSimulatorTest, SelfClosingMathFollowedByScript) {
  HTMLParserOptions options;
  HTMLTreeBuilderSimulator simulator(options);
  std::unique_ptr<HTMLTokenizer> tokenizer =
      std::make_unique<HTMLTokenizer>(options);
  SegmentedString input("<math/><script></script>");
  HTMLToken token;
  EXPECT_TRUE(tokenizer->NextToken(input, token));
  EXPECT_EQ(HTMLTreeBuilderSimulator::kOtherToken,
            simulator.Simulate(
                CompactHTMLToken(&token, TextPosition::MinimumPosition()),
                tokenizer.get()));

  token.Clear();
  EXPECT_TRUE(tokenizer->NextToken(input, token));
  EXPECT_EQ(HTMLTreeBuilderSimulator::kValidScriptStart,
            simulator.Simulate(
                CompactHTMLToken(&token, TextPosition::MinimumPosition()),
                tokenizer.get()));

  EXPECT_EQ(HTMLTokenizer::kScriptDataState, tokenizer->GetState());

  token.Clear();
  EXPECT_TRUE(tokenizer->NextToken(input, token));
  EXPECT_EQ(HTMLTreeBuilderSimulator::kScriptEnd,
            simulator.Simulate(
                CompactHTMLToken(&token, TextPosition::MinimumPosition()),
                tokenizer.get()));
}

TEST(HTMLTreeBuilderSimulatorTest, DetectInvalidScriptType) {
  HTMLParserOptions options;
  HTMLTreeBuilderSimulator simulator(options);
  std::unique_ptr<HTMLTokenizer> tokenizer =
      std::make_unique<HTMLTokenizer>(options);
  SegmentedString input("<script type=\"text/html\"></script>");
  HTMLToken token;
  EXPECT_TRUE(tokenizer->NextToken(input, token));
  EXPECT_NE(HTMLTreeBuilderSimulator::kValidScriptStart,
            simulator.Simulate(
                CompactHTMLToken(&token, TextPosition::MinimumPosition()),
                tokenizer.get()));

  token.Clear();
  EXPECT_TRUE(tokenizer->NextToken(input, token));
  EXPECT_EQ(HTMLTreeBuilderSimulator::kScriptEnd,
            simulator.Simulate(
                CompactHTMLToken(&token, TextPosition::MinimumPosition()),
                tokenizer.get()));
}

}  // namespace blink


text:
package main

import (
	"bytes"
	"errors"
	"os"
	"os/exec"
)

func execInBackground(cmd string, args ...string) error {
	subProcess := exec.Command(cmd, args...)

	stdin, stdinErr := subProcess.StdinPipe()
	defer stdin.Close()

	subProcess.Stdout = os.Stdout
	subProcess.Stderr = os.Stderr

	startErr := subProcess.Start()
	waitErr := subProcess.Wait()

	if stdinErr != nil || startErr != nil || waitErr != nil {
		var b bytes.Buffer
		b.WriteString("Failed to exec \"")
		b.WriteString(cmd)
		for _, arg := range args {
			b.WriteByte(' ')
			b.WriteString(arg)
		}
		b.WriteString("\" due to some errors along the way: [ ")
		if stdinErr != nil {
			b.WriteString(stdinErr.Error())
			b.WriteString(", ")
		}
		if startErr != nil {
			b.WriteString(startErr.Error())
			b.WriteString(", ")
		}
		if waitErr != nil {
			b.WriteString(waitErr.Error())
		}
		b.WriteString(" ].")

		return errors.New(b.String())
	}

	return nil
}


text:
package com.synopsys.arc.jenkinsci.plugins.jobrestrictions.restrictions.job;

import hudson.Extension;
import hudson.model.User;
import hudson.security.SecurityRealm;

import java.util.ArrayList;
import java.util.HashSet;
import java.util.List;
import java.util.Set;

import javax.annotation.CheckForNull;
import javax.annotation.Nonnull;

import jenkins.model.Jenkins;

import org.acegisecurity.GrantedAuthority;
import org.acegisecurity.userdetails.UserDetails;
import org.kohsuke.stapler.DataBoundConstructor;

import com.synopsys.arc.jenkinsci.plugins.jobrestrictions.Messages;
import com.synopsys.arc.jenkinsci.plugins.jobrestrictions.restrictions.JobRestriction;
import com.synopsys.arc.jenkinsci.plugins.jobrestrictions.restrictions.JobRestrictionDescriptor;
import com.synopsys.arc.jenkinsci.plugins.jobrestrictions.util.GroupSelector;

/**
 * {@link JobRestriction}, which checks if the user belongs to the specified groups.
 *
 * @author Christopher Suarez
 * @author Oleg Nenashev <o.v.nenashev@gmail.com>
 * @since 0.4
 */
public class StartedByMemberOfGroupRestriction extends AbstractUserCauseRestriction {

    private final List<GroupSelector> groupList;

    private transient Set<String> acceptedGroups = null;

    @DataBoundConstructor
    public StartedByMemberOfGroupRestriction(List<GroupSelector> groupList,
            boolean checkUpstreamProjects) {
        super(checkUpstreamProjects);
        this.groupList = groupList;
    }

    public List<GroupSelector> getGroupList() {
        return groupList;
    }

    private synchronized @Nonnull
    Set<String> getAcceptedGroups() {
        if (acceptedGroups == null) {
            final List<GroupSelector> selectors = getGroupList();
            acceptedGroups = new HashSet<String>(selectors.size());
            for (GroupSelector selector : selectors) {
                // merge equal entries
                acceptedGroups.add(selector.getSelectedGroupId());
            }
        }
        return acceptedGroups;
    }

    @Override
    protected boolean acceptsUser(@CheckForNull String userId) {
        if (userId == null) {
            return false;
        }
        final @CheckForNull List<String> authorities = getAuthorities(userId);
        if (authorities == null) {
            return false;
        }

        final Set<String> allowedGroups = getAcceptedGroups();
        for (String groupId : authorities) {
            if (allowedGroups.contains(groupId)) {
                return true;
            }
        }
        return false;
    }

    private List<String> getAuthorities(String userId) {
        final @CheckForNull User usr = User.get(userId, false, null);
        if (usr == null) {
            return getAuthoritiesFromRealm(userId);
        }
        List<String> authorities = usr.getAuthorities();
        if (authorities == null || authorities.size() == 0) {
            return getAuthoritiesFromRealm(userId);
        }
        return authorities;
    }

    private List<String> getAuthoritiesFromRealm(String userId) {
        SecurityRealm sr = Jenkins.getInstance().getSecurityRealm();
        final @CheckForNull UserDetails userDetails = sr.loadUserByUsername(userId);
        if (userDetails == null) {
            return null;
        }
        GrantedAuthority[] authorities = userDetails.getAuthorities();
        List<String> authorityList = new ArrayList<String>(authorities.length);

        for (GrantedAuthority auth : authorities) {
            authorityList.add(auth.getAuthority());
        }
        return authorityList;
    }

    @Extension
    public static class DescriptorImpl extends JobRestrictionDescriptor {

        @Override
        public String getDisplayName() {
            return Messages.restrictions_Job_StartedByMemberOfGroupRestriction_displayName();
        }
    }
}


text:
package com.copperweather.android.gson;

import com.google.gson.annotations.SerializedName;

public class Suggestion {

	@SerializedName("comf")
	public Comfort comfort;
	@SerializedName("flu")
	public Flu flu;
	@SerializedName("drsg")
	public Dress dress;
	@SerializedName("uv")
	public UV uv;
	public Sport sport;

	public class Comfort {
		@SerializedName("txt")
		public String info;
	}

	public class Flu {
		@SerializedName("txt")
		public String info;
	}

	public class Dress {
		@SerializedName("txt")
		public String info;
	}

	public class UV {
		@SerializedName("txt")
		public String info;
	}

	public class Sport {
		@SerializedName("txt")
		public String info;
	}
}


text:
<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# source: google/ads/googleads/v10/enums/location_group_radius_units.proto

namespace Google\Ads\GoogleAds\V10\Enums;

use Google\Protobuf\Internal\GPBType;
use Google\Protobuf\Internal\RepeatedField;
use Google\Protobuf\Internal\GPBUtil;

/**
 * Container for enum describing unit of radius in location group.
 *
 * Generated from protobuf message google.ads.googleads.v10.enums.LocationGroupRadiusUnitsEnum
 */
class LocationGroupRadiusUnitsEnum extends \Google\Protobuf\Internal\Message
{

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Ads\GoogleAds\V10\Enums\LocationGroupRadiusUnits::initOnce();
        parent::__construct($data);
    }

}


text:
package ch.hearc.pokerface.gameengine.gamecore.state;

import java.util.List;

import ch.hearc.pokerface.gameengine.gamecore.Action;
import ch.hearc.pokerface.gameengine.gamecore.GameEngine;
import ch.hearc.pokerface.gameengine.gamecore.SoundEngine;
import ch.hearc.pokerface.gameengine.player.Player;
import ch.hearc.pokerface.gameengine.player.Role;

public class BettingState extends State
{
	/*------------------------------------------------------------------*\
	|*							Methodes Public							*|
	\*------------------------------------------------------------------*/

	@Override
	public void addCards(GameEngine ge)
	{
		//Nothing
	}

	@Override
	public void bet(GameEngine ge)
	{
		if (ge.getUnfoldedPlayer() > 1)
		{
			if (ge.getUnfoldedPlayer() - ge.getAllInPlayer() > 1)
			{
				do
				{
					if (!ge.getPostSmallBlind() && !ge.getPostBigBlind())//In this case, if everybody checks, the big blind can play twice
					{
						firstBetProcessing(ge, ge.getCurrentPlayer());
					}
					else
					{
						//If someone has allin because he's so poor, the player doesn't have to play alone ! He has to "simulate" an allin
						normalBetProcessing(ge, ge.getCurrentPlayer());
					}
				} while(!allChecked(ge));
			}

			ge.setNewState();

			//Reinitialise the player's bet
			Player firstPlayer = ge.getCurrentPlayer();
			while(firstPlayer.isFolded())
			{
				ge.changeCurrentPlayer();
				firstPlayer = ge.getCurrentPlayer();
			}
			Player currentPlayer = firstPlayer;
			do
			{
				currentPlayer.endBettingState();
				currentPlayer = ge.getPlayers().get(ge.changeCurrentPlayer());
			} while(currentPlayer != firstPlayer);
		}
	}

	@SuppressWarnings("incomplete-switch")
	@Override
	public void nextSate(GameEngine ge)
	{
		switch(ge.getOldState())
		{
			case PreFlopState:
				ge.setState(new FlopState());
				break;

			case FlopState:
				ge.setState(new TurnState());
				break;

			case TurnState:
				ge.setState(new RiverState());
				break;

			case RiverState:
				ge.setState(new PreFlopState());
				ge.showdown();
				break;
		}
	}

	/*------------------------------------------------------------------*\
	|*							Methodes Private						*|
	\*------------------------------------------------------------------*/

	/**
	 * Check if everybody has checked or allin. In a nutshell if everybody didn't raise
	 *
	 * @param ge
	 *            : The GameEngine
	 * @return
	 */
	private boolean allChecked(GameEngine ge)
	{
		boolean allChecked = true;
		int nbUnfoldedPlayer = ge.getUnfoldedPlayer();
		int nbAllInPlayer = ge.getAllInPlayer();

		if (nbAllInPlayer != nbUnfoldedPlayer)
		{
			List<Player> players = ge.getPlayers();
			for(Player p:players)
			{
				if (!p.isFolded())
				{
					if ((p.getBetSpending() < ge.getBet() && p.getBankroll() != 0))
					{
						allChecked = false;
					}
				}
			}
			allChecked = (allChecked || (nbUnfoldedPlayer - nbAllInPlayer) <= 1);
		}

		return allChecked;
	}

	/**
	 * State for a normalBet, i.e. the bet after the flop/turn or river
	 *
	 * @param ge
	 *            : The GameEngine
	 * @param player
	 *            : The currentplayer
	 */
	private void normalBetProcessing(GameEngine ge, Player player)
	{
		//If he checks, he's considered as the last player who has "raised"
		if (ge.getBet() == 0)
		{
			ge.setIndexLastRaise(player);
		}
		do
		{
			if (player.getBankroll() != 0)
			{
				player.doAction();
			}
			ge.changeCurrentPlayer();
			player = ge.getCurrentPlayer();
		} while(player != ge.getLastRaisePlayer() && ge.getPlayers().size() > 1);
	}

	/**
	 * Only for the bettingstate after the preflop
	 *
	 * @param ge
	 *            : The GameEngine
	 * @param player
	 *            : The currentPlayer
	 */
	private void firstBetProcessing(GameEngine ge, Player player)
	{
		boolean hasBigBlindToPlayTwice = false;
		boolean bigBlindCantPlayMore = false;
		boolean isThePlayerTheLastRaisePlayer = false;

		while(!isThePlayerTheLastRaisePlayer)
		{
			if (!ge.getPostSmallBlind())
			{
				if (ge.getNbPlayers() == 2)
				{
					ge.changeCurrentPlayer();
					player = ge.getCurrentPlayer();
					player.betSmallBlind();
					ge.changeCurrentPlayer();
					player = ge.getCurrentPlayer();
					player.betBigBlind();
				}
				else
				{
					player.betSmallBlind();
				}
			}
			else if (!ge.getPostBigBlind())
			{
				player.betBigBlind();
			}
			else if (player.getBankroll() != 0)
			{
				if (player == GameEngine.HUMAN_PLAYER)
				{
					SoundEngine.getInstance().playSound(Action.YourTurn);
				}
				player.doAction();
			}
			Player oldPlayerBB = player;
			ge.changeCurrentPlayer();
			player = ge.getCurrentPlayer();

			isThePlayerTheLastRaisePlayer = player == ge.getLastRaisePlayer();

			//We check if everybody checks, the BB can play twice, but only in this case !
			if (hasBigBlindToPlayTwice && !bigBlindCantPlayMore)
			{
				isThePlayerTheLastRaisePlayer = oldPlayerBB.getBetSpending() <= ge.getBigBlind();
				hasBigBlindToPlayTwice = false;
				bigBlindCantPlayMore = true;
			}
			else if (isThePlayerTheLastRaisePlayer && Math.abs(ge.getAllInPlayer()-ge.getUnfoldedPlayer()) > 1 && !bigBlindCantPlayMore && player.getRole() == Role.BigBlind && ge.getBet() <= ge.getBigBlind())
			{
				hasBigBlindToPlayTwice = true;
				isThePlayerTheLastRaisePlayer = false;
			}

		}
	}
}


text:
<manifest package="me.tatarka.bindingcollectionadapter2.recyclerview">
    <application />
</manifest>


text:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Spectrum.Framework.Network
{
    public enum HandshakeStage
    {
        Wait = 0,
        Begin = 1,
        AckBegin = 2,
        PartialRequest = 3,
        PartialResponse = 4,
        Completed = 5
    }

    public struct HandshakeHandler
    {
        public Action<NetID, NetMessage> Receive;
        public Action<NetID, NetMessage> Write;
        public HandshakeHandler(Action<NetID, NetMessage> write, Action<NetID, NetMessage> receive)
        {
            Write = write;
            Receive = receive;
        }
    }

    public class Handshake
    {
        private static Dictionary<HandshakeStage, List<HandshakeHandler>> handshakeHandlers = new Dictionary<HandshakeStage, List<HandshakeHandler>>();
        public static void RegisterHandshakeHandler(HandshakeStage stage, HandshakeHandler handler)
        {
            if (!handshakeHandlers.ContainsKey(stage)) { handshakeHandlers[stage] = new List<HandshakeHandler>(); }
            handshakeHandlers[stage].Add(handler);
        }
        public static void WriteHandshake(HandshakeStage stage, NetID peer, NetMessage message)
        {
            List<HandshakeHandler> handlers;
            if (!handshakeHandlers.TryGetValue(stage, out handlers)) { return; }
            foreach (HandshakeHandler handler in handlers)
            {
                handler.Write(peer, message);
            }
        }
        public static void ReadHandshake(HandshakeStage stage, NetID peer, NetMessage message)
        {
            List<HandshakeHandler> handlers;
            if (!handshakeHandlers.TryGetValue(stage, out handlers)) { return; }
            foreach (HandshakeHandler handler in handlers)
            {
                handler.Receive(peer, message);
            }
        }
    }
}


text:
@echo off

if exist bin goto _bin
mkdir bin
goto _bin2
:_bin
rd /s /q bin
:_bin2

if exist bin\data goto _bind
mkdir bin\data
:_bind

if exist src goto _src
mkdir src
goto _src2
:_src
rd /s /q src
:_src2

copy "..\Release Generic\BulletSharp.dll" bin\

copy Generic\bin\Release\BasicDemo.exe bin\
copy Generic\bin\Release\BenchmarkDemo.exe bin\
copy Generic\bin\Release\Box2DDemo.exe bin\
copy Generic\bin\Release\BspDemo.exe bin\
copy Generic\bin\Release\BulletXmlImportDemo.exe bin\
copy Generic\bin\Release\CcdPhysicsDemo.exe bin\
copy Generic\bin\Release\CharacterDemo.exe bin\
copy Generic\bin\Release\CollisionInterfaceDemo.exe bin\
copy Generic\bin\Release\ConcaveConvexCastDemo.exe bin\
copy Generic\bin\Release\ConcaveRaycastDemo.exe bin\
copy Generic\bin\Release\ConstraintDemo.exe bin\
copy Generic\bin\Release\ConvexDecompositionDemo.exe bin\
copy Generic\bin\Release\DistanceDemo.exe bin\
copy Generic\bin\Release\FeatherStoneDemo.exe bin\
copy Generic\bin\Release\GImpactTestDemo.exe bin\
copy Generic\bin\Release\MotorDemo.exe bin\
copy Generic\bin\Release\RagdollDemo.exe bin\
copy Generic\bin\Release\RollingFrictionDemo.exe bin\
copy Generic\bin\Release\SerializeDemo.exe bin\
copy Generic\bin\Release\SoftDemo.exe bin\
copy Generic\bin\Release\VehicleDemo.exe bin\

copy Generic\bin\Release\data\BspDemo.bsp bin\data\
copy Generic\bin\Release\data\file.obj bin\data\
copy Generic\bin\Release\data\cube.ele bin\data\
copy Generic\bin\Release\data\cube.node bin\data\
copy Generic\bin\Release\data\bullet_basic.xml bin\data\
copy Generic\bin\Release\testFile.bullet bin\
rem copy Generic\bin\Release\data\heightfield128x128.raw bin\data\

copy Generic\bin\Release\DemoFramework.dll bin\
copy Generic\bin\Release\DemoFramework.OpenTK.dll bin\
copy Generic\bin\Release\DemoFramework.SharpDX.dll bin\
copy Generic\bin\Release\DemoFramework.SharpDX11.dll bin\
copy Generic\bin\Release\DemoFramework.SlimDX.dll bin\
copy Generic\bin\Release\DemoFramework.MonoGame.dll bin\

copy Generic\bin\Release\OpenTK.dll bin\
copy Generic\bin\Release\OpenTK.GLControl.dll bin\
copy Generic\bin\Release\SharpDX.dll bin\
copy Generic\bin\Release\SharpDX.D3DCompiler.dll bin\
copy Generic\bin\Release\SharpDX.Direct2D1.dll bin\
copy Generic\bin\Release\SharpDX.Direct3D10.dll bin\
copy Generic\bin\Release\SharpDX.Direct3D11.dll bin\
copy Generic\bin\Release\SharpDX.Direct3D11.Effects.dll bin\
copy Generic\bin\Release\SharpDX.DXGI.dll bin\
copy Generic\bin\Release\sharpdx_direct3d11_effects_x64.dll bin\
copy Generic\bin\Release\sharpdx_direct3d11_effects_x86.dll bin\

cmd /C git clone https://github.com/AndresTraks/BulletSharp.git repo
move repo\demos\Generic src
rmdir /s /q repo

"%PROGRAMFILES%\7-Zip\7z.exe" a bulletsharp-demos.zip bin src


text:
namespace content {

MockContentBrowserClient::MockContentBrowserClient() {
}

MockContentBrowserClient::~MockContentBrowserClient() {
}

BrowserMainParts* MockContentBrowserClient::CreateBrowserMainParts(
    const content::MainFunctionParams& parameters) {
  return NULL;
}

WebContentsView* MockContentBrowserClient::CreateWebContentsView(
    WebContents* web_contents) {
  return new TestWebContentsView;
}

void MockContentBrowserClient::RenderViewHostCreated(
    RenderViewHost* render_view_host) {
}

void MockContentBrowserClient::RenderProcessHostCreated(
    RenderProcessHost* host) {
}

WebUIControllerFactory* MockContentBrowserClient::GetWebUIControllerFactory() {
  return NULL;
}

GURL MockContentBrowserClient::GetEffectiveURL(
    content::BrowserContext* browser_context, const GURL& url) {
  return url;
}

bool MockContentBrowserClient::ShouldUseProcessPerSite(
    BrowserContext* browser_context, const GURL& effective_url) {
  return false;
}

bool MockContentBrowserClient::IsURLSameAsAnySiteInstance(const GURL& url) {
  return false;
}

bool MockContentBrowserClient::IsHandledURL(const GURL& url) {
  return false;
}

bool MockContentBrowserClient::IsSuitableHost(
    RenderProcessHost* process_host,
    const GURL& site_url) {
  return true;
}

void MockContentBrowserClient::SiteInstanceGotProcess(
    SiteInstance* site_instance) {
}

void MockContentBrowserClient::SiteInstanceDeleting(
    SiteInstance* site_instance) {
}

bool MockContentBrowserClient::ShouldSwapProcessesForNavigation(
    const GURL& current_url,
    const GURL& new_url) {
  return false;
}

std::string MockContentBrowserClient::GetCanonicalEncodingNameByAliasName(
    const std::string& alias_name) {
  return std::string();
}

void MockContentBrowserClient::AppendExtraCommandLineSwitches(
    CommandLine* command_line, int child_process_id) {
}

std::string MockContentBrowserClient::GetApplicationLocale() {
  return std::string();
}

std::string MockContentBrowserClient::GetAcceptLangs(
    content::BrowserContext* context) {
  return std::string();
}

SkBitmap* MockContentBrowserClient::GetDefaultFavicon() {
  static SkBitmap empty;
  return ∅
}

bool MockContentBrowserClient::AllowAppCache(
    const GURL& manifest_url, const GURL& first_party,
    const content::ResourceContext& context) {
  return true;
}

bool MockContentBrowserClient::AllowGetCookie(
    const GURL& url,
    const GURL& first_party,
    const net::CookieList& cookie_list,
    const content::ResourceContext& context,
    int render_process_id,
    int render_view_id) {
  return true;
}

bool MockContentBrowserClient::AllowSetCookie(
    const GURL& url,
    const GURL& first_party,
    const std::string& cookie_line,
    const content::ResourceContext& context,
    int render_process_id,
    int render_view_id,
    net::CookieOptions* options) {
  return true;
}

bool MockContentBrowserClient::AllowSaveLocalState(
    const content::ResourceContext& context) {
  return true;
}

bool MockContentBrowserClient::AllowWorkerDatabase(
    int worker_route_id,
    const GURL& url,
    const string16& name,
    const string16& display_name,
    unsigned long estimated_size,
    WorkerProcessHost* worker_process_host) {
  return true;
}

bool MockContentBrowserClient::AllowWorkerFileSystem(
    int worker_route_id,
    const GURL& url,
    WorkerProcessHost* worker_process_host) {
  return true;
}

QuotaPermissionContext*
    MockContentBrowserClient::CreateQuotaPermissionContext() {
  return NULL;
}

net::URLRequestContext* MockContentBrowserClient::OverrideRequestContextForURL(
    const GURL& url, const content::ResourceContext& context) {
  return NULL;
}

void MockContentBrowserClient::OpenItem(const FilePath& path) {
}

void MockContentBrowserClient::ShowItemInFolder(const FilePath& path) {
}

void MockContentBrowserClient::AllowCertificateError(
    SSLCertErrorHandler* handler,
    bool overridable,
    const base::Callback<void(SSLCertErrorHandler*, bool)>& callback) {
}

void MockContentBrowserClient::SelectClientCertificate(
    int render_process_id,
    int render_view_id,
    SSLClientAuthHandler* handler) {
}

void MockContentBrowserClient::AddNewCertificate(
    net::URLRequest* request,
    net::X509Certificate* cert,
    int render_process_id,
    int render_view_id) {
}

void MockContentBrowserClient::RequestDesktopNotificationPermission(
    const GURL& source_origin,
    int callback_context,
    int render_process_id,
    int render_view_id) {
}

::WebKit::WebNotificationPresenter::Permission
    MockContentBrowserClient::CheckDesktopNotificationPermission(
        const GURL& source_origin,
        const content::ResourceContext& context,
        int render_process_id) {
  return ::WebKit::WebNotificationPresenter::PermissionAllowed;
}

void MockContentBrowserClient::ShowDesktopNotification(
    const content::ShowDesktopNotificationHostMsgParams& params,
    int render_process_id,
    int render_view_id,
    bool worker) {
}

void MockContentBrowserClient::CancelDesktopNotification(
    int render_process_id,
    int render_view_id,
    int notification_id) {
}

bool MockContentBrowserClient::CanCreateWindow(
    const GURL& source_origin,
    WindowContainerType container_type,
    const content::ResourceContext& context,
    int render_process_id) {
  return true;
}

std::string MockContentBrowserClient::GetWorkerProcessTitle(
    const GURL& url, const content::ResourceContext& context) {
  return std::string();
}

void MockContentBrowserClient::ResourceDispatcherHostCreated() {
}

ui::Clipboard* MockContentBrowserClient::GetClipboard() {
  static ui::Clipboard clipboard;
  return &clipboard;
}

MHTMLGenerationManager* MockContentBrowserClient::GetMHTMLGenerationManager() {
  return NULL;
}

net::NetLog* MockContentBrowserClient::GetNetLog() {
  return NULL;
}

speech_input::SpeechInputManager*
    MockContentBrowserClient::GetSpeechInputManager() {
  return NULL;
}

AccessTokenStore* MockContentBrowserClient::CreateAccessTokenStore() {
  return NULL;
}

bool MockContentBrowserClient::IsFastShutdownPossible() {
  return true;
}

WebPreferences MockContentBrowserClient::GetWebkitPrefs(RenderViewHost* rvh) {
  return WebPreferences();
}

void MockContentBrowserClient::UpdateInspectorSetting(
    RenderViewHost* rvh, const std::string& key, const std::string& value) {
}

void MockContentBrowserClient::ClearInspectorSettings(RenderViewHost* rvh) {
}

void MockContentBrowserClient::BrowserURLHandlerCreated(
    BrowserURLHandler* handler) {
}

void MockContentBrowserClient::ClearCache(RenderViewHost* rvh) {
}

void MockContentBrowserClient::ClearCookies(RenderViewHost* rvh) {
}

FilePath MockContentBrowserClient::GetDefaultDownloadDirectory() {
  if (!download_dir_.IsValid()) {
    bool result = download_dir_.CreateUniqueTempDir();
    CHECK(result);
  }
  return download_dir_.path();
}

std::string MockContentBrowserClient::GetDefaultDownloadName() {
  return std::string();
}

bool MockContentBrowserClient::AllowSocketAPI(const GURL& url) {
  return false;
}

#if defined(OS_POSIX) && !defined(OS_MACOSX)
int MockContentBrowserClient::GetCrashSignalFD(
    const CommandLine& command_line) {
  return -1;
}
#endif

#if defined(OS_WIN)
const wchar_t* MockContentBrowserClient::GetResourceDllName() {
  return NULL;
}
#endif

#if defined(USE_NSS)
crypto::CryptoModuleBlockingPasswordDelegate*
    MockContentBrowserClient::GetCryptoPasswordDelegate(const GURL& url) {
  return NULL;
}
#endif

#if defined(OS_ANDROID)
void MockContentBrowserClient::CreateAutoLogin(
    int render_process_id,
    int web_contents_id,
    const std::string& header_value) {
}

int MockContentBrowserClient::CreateMinidumpFile() {
  return -1;
}

void MockContentBrowserClient::AddNewCertificateAndroid(
    net::URLRequest* request,
    const std::string& cert_data,
    bool isPKCS12) {
}
#endif

}  // namespace content


text:
function Recupererimage(){
    	$('#photo input[type="file"]').change(function() {

    	   var file = $(this);
 		   var reader = new FileReader;

	       reader.onload = function(event) {
	    		var img = new Image();

        		img.onload = function() {
				   var width  = 100;
				   var height = 105;

				   var canvas = $('<canvas></canvas>').attr({ width: width, height: height });
				   file.replaceWith(canvas);
				   var context = canvas[0].getContext('2d');
	        	    	context.drawImage(img, 0, 0, width, height);
			    };
			    document.getElementById('fichier_tmp').value = img.src = event.target.result;

    	};
    	 $("#modifier_photo").remove(); //POUR LA MODIFICATION
    	reader.readAsDataURL(file[0].files[0]);
    	//Cr�ation de l'onglet de suppression de la photo
    	$("#supprimer_photo").children().remove(); //ex:: ../../../img/delete_16.png
    	$('').appendTo($("#supprimer_photo"));

    	//SUPPRESSION DU PHOTO
        //SUPPRESSION DU PHOTO
          $("#supprimer_photo").click(function(e){
        	  $('#supp_photo').w2overlay({ html: "" +
      			"" +
      			"
Supprimer l'image
" +
      			"
" +
      			"<button class='btn' style='cursor:pointer;' onclick='popupFermer(); return false;'>Non</button>" +
      			"<button class='btn' style='cursor:pointer;' onclick='suppression(); return false;'>Oui</button>" +
      			"
" +
      			""

          	});

          });
      });

    }
    //AJOUTER LA PHOTO DU PATIENT
    //AJOUTER LA PHOTO DU PATIENT
    Recupererimage();

    function popupFermer() {
    	$(null).w2overlay(null);
    }

    function suppression(id) {
    	$(null).w2overlay(null);
    	//alert('Attention vous êtes sur le point de supprimer l\'article');

    	$('#photo').children().remove();
        $('<input type="file" name="fichier" >').appendTo($('#photo'));
        $("#supprimer_photo").children().remove();
        Recupererimage();
    }

    function initFonctPhoto(image) {

    	$('#photo').children().remove();
        $('').appendTo($('#photo'));

        $("#supprimer_photo").children().remove();
     	$('').appendTo($("#supprimer_photo"));
    	//SUPPRESSION DU PHOTO
        //SUPPRESSION DU PHOTO
          $("#supprimer_photo").click(function(e){
        	  $('#supp_photo').w2overlay({ html: "" +
      			"" +
      			"
Supprimer l'image
" +
      			"
" +
      			"<button class='btn' style='cursor:pointer;' onclick='popupFermer(); return false;'>Non</button>" +
      			"<button class='btn' style='cursor:pointer;' onclick='suppression(); return false;'>Oui</button>" +
      			"
" +
      			""

          	});

          });
    }


text:
#region License

#endregion

//-------------------------------------------------------------------------------------------------
// <auto-generated>
// Marked as auto-generated so StyleCop will ignore BDD style tests
// </auto-generated>
//-------------------------------------------------------------------------------------------------

#pragma warning disable 169
// ReSharper disable InconsistentNaming
// ReSharper disable UnusedMember.Global
// ReSharper disable UnusedMember.Local

namespace RedBadger.Xpf.Specs.ElementCollectionSpecs
{
    using Machine.Specifications;

    [Subject(typeof(ElementCollection), "Visual Parent")]
    public class when_adding_an_element_to : an_ElementCollection
    {
        private Establish context = () => Owner.Object.Measure(new Size());

        private Because of = () => ElementCollection.Add(Child1.Object);

        private It should_invalidate_its_owners_measure = () => Owner.Object.IsMeasureValid.ShouldBeFalse();

        private It should_set_the_elements_visual_parent =
            () => Child1.Object.VisualParent.ShouldBeTheSameAs(Owner.Object);
    }

    [Subject(typeof(ElementCollection), "Visual Parent")]
    public class when_setting_an_element_in : an_ElementCollection
    {
        private Establish context = () =>
            {
                ElementCollection.Add(Child1.Object);

                Owner.Object.Measure(Size.Empty);
            };

        private Because of = () => ElementCollection[0] = Child2.Object;

        private It should_invalidate_its_owners_measure = () => Owner.Object.IsMeasureValid.ShouldBeFalse();

        private It should_set_the_elements_visual_parent =
            () => Child2.Object.VisualParent.ShouldBeTheSameAs(Owner.Object);

        private It should_unset_the_old_elements_visual_parent = () => Child1.Object.VisualParent.ShouldBeNull();
    }

    [Subject(typeof(ElementCollection), "Visual Parent")]
    public class when_removing_an_element_from : an_ElementCollection
    {
        private Establish context = () =>
            {
                ElementCollection.Add(Child1.Object);

                Owner.Object.Measure(Size.Empty);
            };

        private Because of = () => ElementCollection.Remove(Child1.Object);

        private It should_invalidate_its_owners_measure = () => Owner.Object.IsMeasureValid.ShouldBeFalse();

        private It should_unset_the_elements_visual_parent = () => Child1.Object.VisualParent.ShouldBeNull();
    }

    [Subject(typeof(ElementCollection), "Visual Parent")]
    public class when_removing_an_element_at_a_certain_position_from : an_ElementCollection
    {
        private Establish context = () =>
            {
                ElementCollection.Add(Child1.Object);

                Owner.Object.Measure(Size.Empty);
            };

        private Because of = () => ElementCollection.RemoveAt(0);

        private It should_invalidate_its_owners_measure = () => Owner.Object.IsMeasureValid.ShouldBeFalse();

        private It should_unset_the_elements_visual_parent = () => Child1.Object.VisualParent.ShouldBeNull();
    }

    [Subject(typeof(ElementCollection), "Visual Parent")]
    public class when_inserting_an_element_into : an_ElementCollection
    {
        private Establish context = () => Owner.Object.Measure(Size.Empty);

        private Because of = () => ElementCollection.Insert(0, Child1.Object);

        private It should_invalidate_its_owners_measure = () => Owner.Object.IsMeasureValid.ShouldBeFalse();

        private It should_set_the_elements_visual_parent =
            () => Child1.Object.VisualParent.ShouldBeTheSameAs(Owner.Object);
    }
}


text:
# Caching

Speed! It is becoming more and more important to serve content to client as fast as possible. One method to aid this is caching. Caching does this by temporarly storing data - either on the client or on the server - so that future requests to that same data can be served faster.

## Web API caching

In this section we will look at different ways of caching data on Web API services. There are some libraries available for implementing client and server caching. The most common libraries for .NET 4.5 are:

* [CacheCow](https://github.com/aliostad/CacheCow)
* [ASP.NET Web API CacheOutput](https://github.com/filipw/AspNetWebApi-OutputCache)

Of course you could also implement your own caching method.

These libraries don't seem to have been ported over to .NET Core yet, at least according to this: [http://stackoverflow.com/questions/35458737/implement-http-cache-etag-in-asp-net-core-web-api](http://stackoverflow.com/questions/35458737/implement-http-cache-etag-in-asp-net-core-web-api).

### ETags

Before we look at these two libraries it is important to understand how ETags work.

Etag is basically a unique identifier for web caching validation. It is a unique key generated at the server.
This key represents a resource (URL), if the resource changes then a new Etag is issued for that resource.

Lets say for example we issue a get request (http://.../api/courses/persons) to a web service, and lets assume that we have not made a request before. We will get a response which includes the resulting data as well as an Etag. Now if we issue the same request, by including the "If-None-Match" header with the value of the Etag, the server will then compare the header (Etag) with the resource requested and if they match, the cached content will be returned together with a 304 HTTP response (Not modified).

On the other hand if we wanted to issue a PUT/PATCH request we would have to include the "If-Match" header, this will result in the server returning a 412 HTTP response (Precondition Failed) to the client if the Etag does not match, meaning that the data request has changed.

### CacheCow

The CacheCow library implements HTTP caching on both client and server in ASP.NET Web API. It uses [message handlers](http://www.asp.net/web-api/overview/advanced/http-message-handlers) on both client and server to intercept request and response and apply caching logic and rules.

CacheCow comes with an in-memory database that will be used on the server if nothing else is specified. If the API is to be used for anything else than debugging, testing or a website that you don't want to get popular, something like sql, redis or memcached is recommended.

First you need to install [this library](https://www.nuget.org/packages/CacheCow.Server/) and to start using it you have to add the following code to the WebApiConfig class

```c#
...
public static void Register(HttpConfiguration config)
{
	//Caching with CacheCow
	var cacheCowCacheHandler = new CachingHandler(config);
        config.MessageHandlers.Add(cacheCowCacheHandler);
}
...
```

Now as an example if we issue the get request mentioned earlier we will get this:

***Status Code: 200 OK***

***Request Headers***
* Accept:text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8
* Accept-Encoding:gzip,deflate,sdch
* Accept-Language:en-US,en;q=0.8,is;q=0.6
* Cache-Control:no-cache
* Connection:keep-alive
* Cookie:...
* Host:localhost:12298
* Pragma:no-cache
* User-Agent:Mozilla/5.0 (Windows NT 6.2; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/37.0.2062.124 Safari/537.36

***Response Headers***
* Cache-Control:no-transform, must-revalidate, max-age=0, private
* Content-Length:10952
* Content-Type:application/xml; charset=utf-8
* Date:Sun, 28 Sep 2014 23:32:09 GMT
* **ETag:W/"c701cee4b1d64c658cc13c7f891139cd"**
* **Last-Modified:Sun, 28 Sep 2014 23:30:40 GMT**
* Server:Microsoft-IIS/8.0
* X-AspNet-Version:4.0.30319
* X-Powered-By:ASP.NET
* X-SourceFiles:...

But the second request:

***Status Code: 304 Not Modified***

***Request Headers***
* Accept:text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8
* Accept-Encoding:gzip,deflate,sdch
* Accept-Language:en-US,en;q=0.8,is;q=0.6
* Cache-Control:max-age=0
* Connection:keep-alive
* Cookie:...
* Host:localhost:12298
* If-Modified-Since:Sun, 28 Sep 2014 23:30:40 GMT
* **If-None-Match:W/"c701cee4b1d64c658cc13c7f891139cd"**
* User-Agent:Mozilla/5.0 (Windows NT 6.2; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/37.0.2062.124 Safari/537.36

***Response Headers***
* Cache-Control:no-cache
* Date:Sun, 28 Sep 2014 23:30:44 GMT
* **ETag:W/"c701cee4b1d64c658cc13c7f891139cd"**
* Expires:-1
* Pragma:no-cache
* Server:Microsoft-IIS/8.0
* X-AspNet-Version:4.0.30319
* X-Powered-By:ASP.NET
* X-SourceFiles:...

Here we notice that the first request returned a status code 200 with an Etag, then when we issued a second request with the "If-None-Match" header with the Etag value and we got a status code 304, thus cached contents where issued.

As mentioned on their [wiki](https://github.com/aliostad/CacheCow/wiki), some features include:

**CacheCow.Server features**

* Managing ETag, Last Modified, Expires and other cache related headers
* Implementing returning Not-Modified 304 and precondition failed 412 responses for conditional calls
* Invalidating cache in case of PUT, POST, PATCH and DELETE
* Flexible resource organisation. Rules can be defined so invalidation of a resource can invalidate linked resources

**CacheCow.Client features**

* Caching GET responses according to their caching headers.
* Verifying cached items for their staleness.
* Validating cached items if must-revalidate parameter of Cache-Control header is set to true. It will use ETag or Expires whichever exists.
* Making conditional PUT for resources that are cached based on their ETag or expires header, whichever exists.

### ASP.NET Web API CacheOutput

This library is a little bit different from CacheCow, it uses attributes to control caching on actions.

To use it install [this library](https://www.nuget.org/packages/Strathweb.CacheOutput.WebApi2/)

As mentioned in [there documentation](https://github.com/filipw/AspNetWebApi-OutputCache), some of the properties you can specify are:

* *ClientTimeSpan* (corresponds to CacheControl MaxAge HTTP header).
* *MustRevalidate* (corresponds to MustRevalidate HTTP header - indicates whether the origin server requires revalidation of a cache entry on any subsequent use when the cache entry becomes stale).
* *ExcludeQueryStringFromCacheKey* (do not vary cache by querystring values).
* *ServerTimeSpan* (time how long the response should be cached on the server side).
* *AnonymousOnly* (cache enabled only for requests when Thread.CurrentPrincipal is not set).

Lets say that we would like to cache the following action for 30 seconds on both client and server, the code would look like this:

```c#
[CacheOutput(ClientTimeSpan = 30, ServerTimeSpan = 30)]
[Route("allpersons")]
public List<Person> GetAllPersons()
{
	return _service.GetPersons();
}
```

CacheOutput offer several options for configuring and applying cache to your API service.
Some of these include the possibility to implement your own custom server side cache mechanism. You can also invalidate cache through attributes at controller or action level as well manually.

For example decorating a controller with [AutoInvalidateCacheOutput] attribute will automatically flush all cached GET data from this controller after a successfull POST/PUT/DELETE request.

### Custom Server side cache example

As mentioned in the begining you could also implement your own caching method.
A very simple implementation using the default cache memory could be like this utility class

```c#
public class Utilities
{
    public static void RemoveFromCache(string key)
    {
        System.Runtime.Caching.MemoryCache.Default.Remove(key);
    }

    public static void AddToCache<T>(T obj, string key, int duration)
    {
        System.Runtime.Caching.MemoryCache.Default.Remove(key);
        System.Runtime.Caching.MemoryCache.Default.Add(key, obj, DateTime.Now.AddMinutes(duration));
    }

    public static T GetFromCache<T>(string key, bool ignoreCache)
    {
        if (System.Runtime.Caching.MemoryCache.Default.Get(key) != null && !ignoreCache)
        {
            T cachedObject = (T)System.Runtime.Caching.MemoryCache.Default.Get(key);
            return cachedObject;
        }

        return default(T);
    }
}
```

Then if you wanted for example to cache an action that returns your info, one could this:

```c#
[Route("myperson")]
public Person GetMyInfo()
{
    //Manual caching
    string myEmail = "patrekur10@ru.is"; // unique identifier
    int CacheTimeout = 60; // 60 minutes
    string cacheKey = "GetMyInfo" + myEmail;
    var person = Utilities.GetFromCache<Person>(cacheKey, false);
    if (person == null) //Not present in cache or cache has expired
    {
        person = _service.GetPersonByEmail(myEmail);
        Utilities.AddToCache<Person>(person != null ? person : new Person(), cacheKey, CacheTimeout);
    }
    return person;
}
```

***Related material***
* [AspNetWebApi-OutputCache]()
* [CacheCow](https://github.com/aliostad/CacheCow)
* [Building ASP.Net Web API RESTful Service](http://bitoftech.net/2014/02/08/asp-net-web-api-resource-caching-etag-cachecow/)
* [Exploring Web API 2 Caching](http://damienbod.wordpress.com/2014/05/18/exploring-web-api-2-caching/)
* [Implimenting own caching method](https://github.com/filipw/apress-recipes-webapi/tree/master/Chapter%2005/5-6/Apress.Recipes.WebApi)
* [Breeze - A interesting client caching framework, available for javascript and c#](http://www.getbreezenow.com/)


text:
var common = require('../common');
var assert = require('assert');
var cluster = require('cluster');
var msg = 'foo';

if (cluster.isMaster) {
  var worker = cluster.fork();
  var timer = setTimeout(function() {
    assert(false, 'message not received');
  }, 1000);

  timer.unref();

  worker.on('message', function(message) {
    assert(message, 'did not receive expected message');
    worker.disconnect();
  });

  worker.on('online', function() {
    worker.send(msg);
  });
} else {
  // GH #7998
  cluster.worker.on('message', function(message) {
    process.send(message === msg);
  });
}


text:
{% extends "main.j2.html" %}
{% block body %}

Paper details:

Matthew C. Stamm, Steven K. Tjoa, W. Sabrina Lin, and K. J. Ray Liu

IEEE Int. Conf. Acoustics, Speech, and Signal Processing, March 2010

Download: Paper

BibTeX:

@INPROCEEDINGS{stamm2010icassp_antiforensics,
  title = "Anti-Forensics of {JPEG} Compression",
  author = "Matthew C. Stamm and Steven K. Tjoa and W. Sabrina Lin and K. J. Ray Liu",
  booktitle = "Proc. IEEE Int. Conf. Acoustics, Speech, and Signal Processing",
  address = "Dallas, TX",
  year = "2010",
  month = mar,
  pages = "1694--1697"
};

Digital image forensics is a relatively new field that has only become popular within the last seven years. A newer body of research involves anti-forensics — methods of processing images that disguise evidence of earlier image processing or tampering. By altering the forensically significant properties in an image, existing image forensic systems may be rendered useless. Like many areas of security, we benefit from the study of anti-forensics by understanding the attacks that are most likely to occur before they actually do. Then, we can refine our image forensic systems further.

Earlier, our group proposed the first forensic system that identifies which compression method was used upon a digital image. In this paper, we propose an anti-forensic method for defeating the identification of JPEG compression in an image. Our method alters the intrinsic fingerprint of JPEG-compressed images in the transform domain such that the attacked image is perceptually similar to the image before attack. To our knowledge, this work is the first to propose a method specifically designed to defeat compression identification systems, and we anticipate that more work will follow.

{% endblock %}


text:
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:paddingBottom="@dimen/activity_vertical_margin"
    android:paddingLeft="@dimen/activity_horizontal_margin"
    android:paddingRight="@dimen/activity_horizontal_margin"
    android:paddingTop="@dimen/activity_vertical_margin"
    tools:context=".OriginalAnswerActivity" >

    <TextView
        android:id="@+id/tvOriginalAnswerHeader"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_alignParentLeft="true"
        android:layout_alignParentTop="true"
        android:layout_marginTop="20dp"
        android:text="@string/orignialAnswer" />

    <TextView
        android:id="@+id/tvOriginalAnswer"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_alignLeft="@+id/tvOriginalAnswerHeader"
        android:layout_below="@+id/tvOriginalAnswerHeader"
        android:layout_marginTop="18dp"
        android:text="Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
        Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat."
        android:maxLines="30" />

</RelativeLayout>


text:
import Shop from '../../../models/Shop';

export const fields = {
  shop: {
    label: 'Shop',
    ref: Shop,
    index: true
  }
};


text:
package com.lightbend.lagom.internal.cluster

import akka.actor.ActorRef
import akka.actor.Address
import akka.cluster.Cluster
import akka.cluster.MemberStatus
import akka.remote.testconductor.RoleName
import akka.remote.testkit.MultiNodeSpec
import akka.testkit.ImplicitSender
import com.lightbend.lagom.internal.cluster.ClusterMultiNodeConfig.node1

import scala.concurrent.duration._

abstract class ClusteredMultiNodeUtils(val numOfNodes: Int, multiNodeConfig: ClusterMultiNodeConfig)
    extends MultiNodeSpec(multiNodeConfig, ClusterMultiNodeActorSystemFactory.createActorSystem())
    with STMultiNodeSpec
    with ImplicitSender {
  override def initialParticipants: Int = roles.size

  def join(from: RoleName, to: RoleName): Unit = {
    runOn(from) {
      Cluster(system).join(node(to).address)
    }
    enterBarrier(from.name + "-joined")
  }

  def fullAddress(ref: ActorRef): Address =
    if (ref.path.address.hasLocalScope) Cluster(system).selfAddress
    else ref.path.address

  protected override def atStartup(): Unit = {
    roles.foreach(n => join(n, node1))
    within(15.seconds) {
      awaitAssert(Cluster(system).state.members.size should be(numOfNodes))
      awaitAssert(
        Cluster(system).state.members.toIndexedSeq.map(_.status).distinct should be(IndexedSeq(MemberStatus.Up))
      )
    }

    enterBarrier("startup")
  }
}


text:
int main(int argc, char *argv[]) {
    const char *fileName = "test.las";
    switch (argc) {
        case 2:
            fileName = argv[1];
        case 1: {
            pubgeo::PointCloud pointCloud;
            std::cerr << "Processing file: " << fileName << std::endl;
            if (pointCloud.Read(fileName)) {
                // Grab a truly random c++ 11 number
                std::random_device rd;
                std::mt19937 gen(rd());
                std::uniform_int_distribution<> dis(0, pointCloud.numPoints);
                long int index = dis(gen);
                std::cerr << pointCloud.numPoints << " points in file." << std::endl
                          << "Here is a sample point from index " << index << ":"
                          << pointCloud.x(index) << ", " << pointCloud.y(index) << ", "
                          << pointCloud.z(index) << std::endl;
            }
            break;
        }
        default:
            std::cerr << "Invalid number of arguments" << std::endl;
    }

#ifdef WIN32
    system("pause");
#endif
}


text:
require "faraday"
require "gapic/call_options"
require "gapic/common/version"
require "gapic/headers"
require "gapic/protobuf"
require "gapic/rest/client_stub"
require "gapic/rest/error"
require "gapic/rest/faraday_middleware"
require "gapic/rest/grpc_transcoder"
require "gapic/rest/operation"
require "gapic/rest/paged_enumerable"
require "gapic/rest/server_stream"
require "gapic/rest/threaded_enumerator"
require "json"


text:
import { Tsunami24 } from "../../";

export = Tsunami24;