text:
package cn.easyproject.easyee.ssh.base.service;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import cn.easyproject.easyee.ssh.base.dao.CommonDAO;
/**
 * All Service extends BaseService
 * @author easyproject.cn
 * @version 1.0
 *
 */
@Service
public class BaseService {
	@Resource(name="commonDAO")
	protected CommonDAO commonDAO;

	/**
	 * 返回唯一结果
	 * @return
	 */
	@SuppressWarnings({ "rawtypes", "unchecked" })
	public <T> T uniqueResult(List list){
		return ((list==null||list.size()==0)?null:(T)list.get(0));
	}

	/*
	 * Common method
	 */
	/**
	 * 判断字符串是否不为空或null
	 * @param str 字符串对象
	 * @return 是否不为空
	 */
	public boolean isNotNullAndEmpty(Object str){
		return str!=null&&(!str.equals(""));
	}
}


text:
<!DOCTYPE html>

<meta charset="utf-8">
<title>WebGL GLSL Conformance Tests</title>
<link rel="stylesheet" href="../../../resources/js-test-style.css"/>
<link rel="stylesheet" href="../../../resources/glsl-feature-tests.css"/>

redpajama_set_name: RedPajamaGithub


text:
{% extends 'vesper/base.html' %}

{% block head %}

    <title>Refresh recording audio file paths</title>

    {% load static %}
    <link rel="stylesheet" type="text/css" href="{% static 'vesper/view/command-form.css' %}">

    {% load vesper_extras %}

{% endblock head %}

{% block main %}

Refresh recording audio file paths

        Refreshes the recording audio file paths stored in this archive,
        updating any that have changed.

        For each recording audio file of the archive, this command
        attempts to locate the file by name in the archive's recording
        directories and their subdirectories. If the file is found and
        its path differs from that stored in the archive, the path
        stored in the archive is updated. If the file is not found, an
        error message is logged and the path stored for it in the archive
        is not modified.

        The recording directories of an archive can be specified in the
        recording_directories setting of the
        Archive Settings.yaml file, located in the archive
        directory. If that file is absent, or if it does not contain a
        recording_directories setting, Vesper assumes that
        recordings are located in the Recordings subdirectory
        of the archive directory.

    {% include "vesper/command-executes-as-job-message.html" %}

    <form class="form" role="form" action="{% url 'refresh-recording-audio-file-paths' %}" method="post">

        {% csrf_token %}

        <button type="submit" class="btn btn-primary form-spacing command-form-spacing">Refresh Paths</button>

    </form>

{% endblock main %}


text:
.class Lcom/android/server/fingerprint/FingerprintService$5$3;
.super Ljava/lang/Object;
.source "FingerprintService.java"

# interfaces
.implements Ljava/lang/Runnable;

# annotations
.annotation system Ldalvik/annotation/EnclosingMethod;
    value = Lcom/android/server/fingerprint/FingerprintService$5;->onAcquired(JII)V
.end annotation

.annotation system Ldalvik/annotation/InnerClass;
    accessFlags = 0x0
    name = null
.end annotation

# instance fields
.field final synthetic this$1:Lcom/android/server/fingerprint/FingerprintService$5;

.field final synthetic val$errorCase:I

# direct methods
.method constructor <init>(Lcom/android/server/fingerprint/FingerprintService$5;I)V
    .locals 0

    iput-object p1, p0, Lcom/android/server/fingerprint/FingerprintService$5$3;->this$1:Lcom/android/server/fingerprint/FingerprintService$5;

    iput p2, p0, Lcom/android/server/fingerprint/FingerprintService$5$3;->val$errorCase:I

    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    return-void
.end method

# virtual methods
.method public run()V
    .locals 5

    iget-object v0, p0, Lcom/android/server/fingerprint/FingerprintService$5$3;->this$1:Lcom/android/server/fingerprint/FingerprintService$5;

    iget-object v1, v0, Lcom/android/server/fingerprint/FingerprintService$5;->this$0:Lcom/android/server/fingerprint/FingerprintService;

    const-wide/16 v2, 0x0

    iget v0, p0, Lcom/android/server/fingerprint/FingerprintService$5$3;->val$errorCase:I

    const/16 v4, 0x3e8

    if-le v0, v4, :cond_0

    const/16 v0, 0x8

    :goto_0
    iget v4, p0, Lcom/android/server/fingerprint/FingerprintService$5$3;->val$errorCase:I

    invoke-virtual {v1, v2, v3, v0, v4}, Lcom/android/server/fingerprint/FingerprintService;->handleError(JII)V

    return-void

    :cond_0
    iget v0, p0, Lcom/android/server/fingerprint/FingerprintService$5$3;->val$errorCase:I

    goto :goto_0
.end method


text:
import os

import fixtures
from migrate.versioning import repository
from oslo_db.sqlalchemy import test_base
from oslo_db.sqlalchemy import test_migrations
import sqlalchemy
import testtools

from keystone.common.sql import migrate_repo
from keystone.common.sql import migration_helpers

class DBOperationNotAllowed(Exception):
    pass

class BannedDBSchemaOperations(fixtures.Fixture):
    """Ban some operations for migrations."""

    def __init__(self, banned_resources=None):
        super(BannedDBSchemaOperations, self).__init__()
        self._banned_resources = banned_resources or []

    @staticmethod
    def _explode(resource, op):
        raise DBOperationNotAllowed(
            'Operation %s.%s() is not allowed in a database migration' % (
                resource, op))

    def setUp(self):
        super(BannedDBSchemaOperations, self).setUp()
        for resource in self._banned_resources:
            self.useFixture(fixtures.MonkeyPatch(
                'sqlalchemy.%s.drop' % resource,
                lambda *a, **k: self._explode(resource, 'drop')))
            self.useFixture(fixtures.MonkeyPatch(
                'sqlalchemy.%s.alter' % resource,
                lambda *a, **k: self._explode(resource, 'alter')))

class TestBannedDBSchemaOperations(testtools.TestCase):
    """Test the BannedDBSchemaOperations fixture."""

    def test_column(self):
        """Test column drops and alters raise DBOperationNotAllowed."""
        column = sqlalchemy.Column()
        with BannedDBSchemaOperations(banned_resources=['Column']):
            self.assertRaises(DBOperationNotAllowed, column.drop)
            self.assertRaises(DBOperationNotAllowed, column.alter)

    def test_table(self):
        """Test table drops and alters raise DBOperationNotAllowed."""
        table = sqlalchemy.Table()
        with BannedDBSchemaOperations(banned_resources=['Table']):
            self.assertRaises(DBOperationNotAllowed, table.drop)
            self.assertRaises(DBOperationNotAllowed, table.alter)

class KeystoneMigrationsCheckers(test_migrations.WalkVersionsMixin):
    """Walk over and test all sqlalchemy-migrate migrations."""

    @property
    def INIT_VERSION(self):
        return migration_helpers.get_init_version()

    @property
    def REPOSITORY(self):
        migrate_file = migrate_repo.__file__
        return repository.Repository(
            os.path.abspath(os.path.dirname(migrate_file))
        )

    @property
    def migration_api(self):
        temp = __import__('oslo_db.sqlalchemy.migration', globals(),
                          locals(), ['versioning_api'], 0)
        return temp.versioning_api

    @property
    def migrate_engine(self):
        return self.engine

    def migrate_up(self, version, with_data=False):
        """Check that migrations don't cause downtime.

        Schema migrations can be done online, allowing for rolling upgrades.
        """
        # NOTE(xek):
        # This is a list of migrations where we allow dropping and altering
        # things. The rules for adding exceptions are very specific:
        #
        # 1) Migrations which don't cause incompatibilities are allowed,
        #    for example dropping an index or constraint.
        #
        # 2) Migrations removing structures not used in the previous version
        #    are allowed (we keep compatibility between releases), ex.:
        #
        #    a) feature is deprecated according to the deprecation policies
        #       (release 1),
        #
        #    b) code supporting the feature is removed the following release
        #       (release 2),
        #
        #    c) table can be dropped a release after the code has been removed
        #       (i.e. in release 3).
        #
        # 3) Any other changes which don't pass this test are disallowed.
        #
        # Please follow the guidelines outlined at:
        # http://docs.openstack.org/developer/keystone/developing.html#online-migration

        exceptions = [
            # NOTE(xek): Reviewers: DO NOT ALLOW THINGS TO BE ADDED HERE UNLESS
            # JUSTIFICATION CAN BE PROVIDED AS TO WHY THIS WILL NOT CAUSE
            # PROBLEMS FOR ROLLING UPGRADES.

            # Migration 102 drops the domain table in the Newton release. All
            # code that referenced the domain table was removed in the Mitaka
            # release, hence this migration will not cause problems when
            # running a mixture of Mitaka and Newton versions of keystone.
            102,

            # Migration 106 simply allows the password column to be nullable.
            # This change would not impact a rolling upgrade.
            106
        ]

        # NOTE(xek): We start requiring things be additive in Newton, so
        # ignore all migrations before that point.
        NEWTON_START = 101

        if version >= NEWTON_START and version not in exceptions:
            banned = ['Table', 'Column']
        else:
            banned = None
        with BannedDBSchemaOperations(banned):
            super(KeystoneMigrationsCheckers,
                  self).migrate_up(version, with_data)

    snake_walk = False
    downgrade = False

    def test_walk_versions(self):
        self.walk_versions(self.snake_walk, self.downgrade)

class TestKeystoneMigrationsMySQL(
        KeystoneMigrationsCheckers, test_base.MySQLOpportunisticTestCase):
    pass

class TestKeystoneMigrationsPostgreSQL(
        KeystoneMigrationsCheckers, test_base.PostgreSQLOpportunisticTestCase):
    pass

class TestKeystoneMigrationsSQLite(
        KeystoneMigrationsCheckers, test_base.DbTestCase):
    pass


text:
#include "ClientSocket.h"
#include "SocketUtils.h"
#include "WdtOptions.h"
#include <glog/logging.h>
#include <sys/socket.h>
#include <poll.h>
#include <fcntl.h>

namespace facebook {
namespace wdt {

using std::string;

ClientSocket::ClientSocket(const string &dest, const string &port,
                           WdtBase::IAbortChecker const *abortChecker)
    : dest_(dest), port_(port), fd_(-1), abortChecker_(abortChecker) {
  memset(&sa_, 0, sizeof(sa_));
  const auto &options = WdtOptions::get();
  if (options.ipv6) {
    sa_.ai_family = AF_INET6;
  }
  if (options.ipv4) {
    sa_.ai_family = AF_INET;
  }
  sa_.ai_socktype = SOCK_STREAM;
}

ErrorCode ClientSocket::connect() {
  WDT_CHECK(fd_ < 0) << "Previous connection not closed " << fd_ << " "
                     << port_;
  // Lookup
  struct addrinfo *infoList = nullptr;
  auto guard = folly::makeGuard([&] {
    if (infoList) {
      freeaddrinfo(infoList);
    }
  });
  int res = getaddrinfo(dest_.c_str(), port_.c_str(), &sa_, &infoList);
  if (res) {
    // not errno, can't use PLOG (perror)
    LOG(ERROR) << "Failed getaddrinfo " << dest_ << " , " << port_ << " : "
               << res << " : " << gai_strerror(res);
    return CONN_ERROR;
  }
  int count = 0;
  for (struct addrinfo *info = infoList; info != nullptr;
       info = info->ai_next) {
    ++count;
    std::string host, port;
    SocketUtils::getNameInfo(info->ai_addr, info->ai_addrlen, host, port);
    VLOG(2) << "will connect to " << host << " " << port;
    fd_ = socket(info->ai_family, info->ai_socktype, info->ai_protocol);
    if (fd_ == -1) {
      PLOG(WARNING) << "Error making socket for port " << port_;
      continue;
    }
    VLOG(1) << "new socket " << fd_ << " for port " << port_;

    // make the socket non blocking
    int sockArg = fcntl(fd_, F_GETFL, nullptr);
    sockArg |= O_NONBLOCK;
    int retValue = fcntl(fd_, F_SETFL, sockArg);
    if (retValue == -1) {
      PLOG(ERROR) << "Could not make the socket non-blocking " << port_;
      this->close();
      continue;
    }

    if (::connect(fd_, info->ai_addr, info->ai_addrlen) != 0) {
      if (errno != EINPROGRESS) {
        PLOG(INFO) << "Error connecting on " << host << " " << port;
        this->close();
        continue;
      }
      auto startTime = Clock::now();
      int connectTimeout = WdtOptions::get().connect_timeout_millis;

      while (true) {
        // we need this loop because poll() can return before any file handles
        // have changes or before timing out. In that case, we check whether it
        // is because of EINTR or not. If true, we have to try poll with
        // reduced timeout
        int timeElapsed = durationMillis(Clock::now() - startTime);
        if (timeElapsed >= connectTimeout) {
          LOG(ERROR) << "connect() timed out";
          this->close();
          return CONN_ERROR;
        }
        int pollTimeout = connectTimeout - timeElapsed;
        struct pollfd pollFds[] = {{fd_, POLLOUT, 0}};

        int retValue;
        if ((retValue = poll(pollFds, 1, pollTimeout)) <= 0) {
          if (errno == EINTR) {
            VLOG(1) << "poll() call interrupted. retrying...";
            continue;
          }
          if (retValue == 0) {
            LOG(ERROR) << "poll() timed out " << port_;
          } else {
            PLOG(ERROR) << "poll() failed " << port_ << " " << fd_;
          }
          this->close();
          return CONN_ERROR;
        }
        break;
      }

      // have to check whether the connection attempt succeeded
      int connectResult;
      socklen_t len = sizeof(connectResult);
      if (getsockopt(fd_, SOL_SOCKET, SO_ERROR, &connectResult, &len) < 0) {
        PLOG(WARNING) << "getsockopt() failed";
        this->close();
        continue;
      }
      if (connectResult != 0) {
        LOG(WARNING) << "connect did not succeed on " << host << " " << port
                     << " : " << strerrorStr(connectResult);
        this->close();
        continue;
      }
    }

    // Set to blocking mode again
    sockArg = fcntl(fd_, F_GETFL, nullptr);
    sockArg &= (~O_NONBLOCK);
    retValue = fcntl(fd_, F_SETFL, sockArg);
    if (retValue == -1) {
      PLOG(ERROR) << "Could not make the socket blocking " << port_;
      this->close();
      continue;
    }
    VLOG(1) << "Successful connect on " << fd_;
    sa_ = *info;
    break;
  }
  if (fd_ < 0) {
    if (count > 1) {
      // Only log this if not redundant with log above (ie --ipv6=false)
      LOG(INFO) << "Unable to connect to either of the " << count << " addrs";
    }
    return CONN_ERROR_RETRYABLE;
  }
  SocketUtils::setReadTimeout(fd_);
  SocketUtils::setWriteTimeout(fd_);
  return OK;
}

int ClientSocket::getFd() const {
  VLOG(1) << "fd is " << fd_;
  return fd_;
}

std::string ClientSocket::getPort() const {
  return port_;
}

int ClientSocket::read(char *buf, int nbyte, bool tryFull) {
  return SocketUtils::readWithAbortCheck(fd_, buf, nbyte, abortChecker_,
                                         tryFull);
}

int ClientSocket::write(const char *buf, int nbyte, bool tryFull) {
  return SocketUtils::writeWithAbortCheck(fd_, buf, nbyte, abortChecker_,
                                          tryFull);
}

void ClientSocket::close() {
  if (fd_ >= 0) {
    VLOG(1) << "Closing socket : " << fd_;
    if (::close(fd_) < 0) {
      VLOG(1) << "Socket close failed for fd " << fd_;
    }
    fd_ = -1;
  }
}

void ClientSocket::shutdown() {
  if (::shutdown(fd_, SHUT_WR) < 0) {
    VLOG(1) << "Socket shutdown failed for fd " << fd_;
  }
}

ClientSocket::~ClientSocket() {
  this->close();
}
}
}  // end namespace facebook::wtd


text: search_result['2200']=["topic_0000000000000548_events--.html","AgencyDataDatatableDto Events",""];


text:
namespace pp {

namespace {

template <> const char* interface_name<PPB_Ext_Socket_Dev_0_1>() {
  return PPB_EXT_SOCKET_DEV_INTERFACE_0_1;
}

}  // namespace

namespace ext {
namespace socket {

const char* const SocketType_Dev::kTcp = "tcp";
const char* const SocketType_Dev::kUdp = "udp";

SocketType_Dev::SocketType_Dev() : value(NONE) {
}

SocketType_Dev::SocketType_Dev(ValueType in_value) : value(in_value) {
}

SocketType_Dev::~SocketType_Dev() {
}

bool SocketType_Dev::Populate(const PP_Var& var_value) {
  if (var_value.type != PP_VARTYPE_STRING)
    return false;

  std::string string_value = Var(var_value).AsString();
  if (string_value == kTcp) {
    value = TCP;
  } else if (string_value == kUdp) {
    value = UDP;
  } else {
    value = NONE;
    return false;
  }
  return true;
}

Var SocketType_Dev::CreateVar() const {
  switch (value) {
    case TCP:
      return Var(kTcp);
    case UDP:
      return Var(kUdp);
    default:
      PP_NOTREACHED();
      return Var(std::string());
  }
}

const char* const CreateInfo_Dev::kSocketId = "socketId";

CreateInfo_Dev::CreateInfo_Dev()
    : socket_id(kSocketId) {
}

CreateInfo_Dev::~CreateInfo_Dev() {
}

bool CreateInfo_Dev::Populate(const PP_Ext_Socket_CreateInfo_Dev& value) {
  if (value.type != PP_VARTYPE_DICTIONARY)
    return false;

  VarDictionary_Dev dict(value);
  bool result = socket_id.Populate(dict);

  return result;
}

Var CreateInfo_Dev::CreateVar() const {
  VarDictionary_Dev dict;

  bool result = socket_id.AddTo(&dict);
  // Suppress unused variable warnings.
  static_cast<void>(result);
  PP_DCHECK(result);

  return dict;
}

const char* const AcceptInfo_Dev::kResultCode = "resultCode";
const char* const AcceptInfo_Dev::kSocketId = "socketId";

AcceptInfo_Dev::AcceptInfo_Dev()
    : result_code(kResultCode),
      socket_id(kSocketId) {
}

AcceptInfo_Dev::~AcceptInfo_Dev() {
}

bool AcceptInfo_Dev::Populate(const PP_Ext_Socket_AcceptInfo_Dev& value) {
  if (value.type != PP_VARTYPE_DICTIONARY)
    return false;

  VarDictionary_Dev dict(value);
  bool result = result_code.Populate(dict);
  result = socket_id.Populate(dict) && result;

  return result;
}

Var AcceptInfo_Dev::CreateVar() const {
  VarDictionary_Dev dict;

  bool result = result_code.AddTo(&dict);
  result = socket_id.MayAddTo(&dict) && result;
  PP_DCHECK(result);

  return dict;
}

const char* const ReadInfo_Dev::kResultCode = "resultCode";
const char* const ReadInfo_Dev::kData = "data";

ReadInfo_Dev::ReadInfo_Dev()
    : result_code(kResultCode),
      data(kData) {
}

ReadInfo_Dev::~ReadInfo_Dev() {
}

bool ReadInfo_Dev::Populate(const PP_Ext_Socket_ReadInfo_Dev& value) {
  if (value.type != PP_VARTYPE_DICTIONARY)
    return false;

  VarDictionary_Dev dict(value);
  bool result = result_code.Populate(dict);
  result = data.Populate(dict) && result;

  return result;
}

Var ReadInfo_Dev::CreateVar() const {
  VarDictionary_Dev dict;

  bool result = result_code.AddTo(&dict);
  result = data.AddTo(&dict) && result;
  PP_DCHECK(result);

  return dict;
}

const char* const WriteInfo_Dev::kBytesWritten = "bytesWritten";

WriteInfo_Dev::WriteInfo_Dev()
    : bytes_written(kBytesWritten) {
}

WriteInfo_Dev::~WriteInfo_Dev() {
}

bool WriteInfo_Dev::Populate(const PP_Ext_Socket_WriteInfo_Dev& value) {
  if (value.type != PP_VARTYPE_DICTIONARY)
    return false;

  VarDictionary_Dev dict(value);
  bool result = bytes_written.Populate(dict);

  return result;
}

Var WriteInfo_Dev::CreateVar() const {
  VarDictionary_Dev dict;

  bool result = bytes_written.AddTo(&dict);
  // Suppress unused variable warnings.
  static_cast<void>(result);
  PP_DCHECK(result);

  return dict;
}

const char* const RecvFromInfo_Dev::kResultCode = "resultCode";
const char* const RecvFromInfo_Dev::kData = "data";
const char* const RecvFromInfo_Dev::kAddress = "address";
const char* const RecvFromInfo_Dev::kPort = "port";

RecvFromInfo_Dev::RecvFromInfo_Dev()
    : result_code(kResultCode),
      data(kData),
      address(kAddress),
      port(kPort) {
}

RecvFromInfo_Dev::~RecvFromInfo_Dev() {
}

bool RecvFromInfo_Dev::Populate(const PP_Ext_Socket_RecvFromInfo_Dev& value) {
  if (value.type != PP_VARTYPE_DICTIONARY)
    return false;

  VarDictionary_Dev dict(value);
  bool result = result_code.Populate(dict);
  result = data.Populate(dict) && result;
  result = address.Populate(dict) && result;
  result = port.Populate(dict) && result;

  return result;
}

Var RecvFromInfo_Dev::CreateVar() const {
  VarDictionary_Dev dict;

  bool result = result_code.AddTo(&dict);
  result = data.AddTo(&dict) && result;
  result = address.AddTo(&dict) && result;
  result = port.AddTo(&dict) && result;
  PP_DCHECK(result);

  return dict;
}

const char* const SocketInfo_Dev::kSocketType = "socketType";
const char* const SocketInfo_Dev::kConnected = "connected";
const char* const SocketInfo_Dev::kPeerAddress = "peerAddress";
const char* const SocketInfo_Dev::kPeerPort = "peerPort";
const char* const SocketInfo_Dev::kLocalAddress = "localAddress";
const char* const SocketInfo_Dev::kLocalPort = "localPort";

SocketInfo_Dev::SocketInfo_Dev()
    : socket_type(kSocketType),
      connected(kConnected),
      peer_address(kPeerAddress),
      peer_port(kPeerPort),
      local_address(kLocalAddress),
      local_port(kLocalPort) {
}

SocketInfo_Dev::~SocketInfo_Dev() {
}

bool SocketInfo_Dev::Populate(const PP_Ext_Socket_SocketInfo_Dev& value) {
  if (value.type != PP_VARTYPE_DICTIONARY)
    return false;

  VarDictionary_Dev dict(value);
  bool result = socket_type.Populate(dict);
  result = connected.Populate(dict) && result;
  result = peer_address.Populate(dict) && result;
  result = peer_port.Populate(dict) && result;
  result = local_address.Populate(dict) && result;
  result = local_port.Populate(dict) && result;

  return result;
}

Var SocketInfo_Dev::CreateVar() const {
  VarDictionary_Dev dict;

  bool result = socket_type.AddTo(&dict);
  result = connected.AddTo(&dict) && result;
  result = peer_address.MayAddTo(&dict) && result;
  result = peer_port.MayAddTo(&dict) && result;
  result = local_address.MayAddTo(&dict) && result;
  result = local_port.MayAddTo(&dict) && result;
  PP_DCHECK(result);

  return dict;
}

const char* const NetworkInterface_Dev::kName = "name";
const char* const NetworkInterface_Dev::kAddress = "address";

NetworkInterface_Dev::NetworkInterface_Dev()
    : name(kName),
      address(kAddress) {
}

NetworkInterface_Dev::~NetworkInterface_Dev() {
}

bool NetworkInterface_Dev::Populate(
    const PP_Ext_Socket_NetworkInterface_Dev& value) {
  if (value.type != PP_VARTYPE_DICTIONARY)
    return false;

  VarDictionary_Dev dict(value);
  bool result = name.Populate(dict);
  result = address.Populate(dict) && result;

  return result;
}

Var NetworkInterface_Dev::CreateVar() const {
  VarDictionary_Dev dict;

  bool result = name.AddTo(&dict);
  result = address.AddTo(&dict) && result;
  PP_DCHECK(result);

  return dict;
}

Socket_Dev::Socket_Dev(const InstanceHandle& instance) : instance_(instance) {
}

Socket_Dev::~Socket_Dev() {
}

int32_t Socket_Dev::Create(const SocketType_Dev& type,
                           const Optional<CreateOptions_Dev>& options,
                           const CreateCallback& callback) {
  if (!has_interface<PPB_Ext_Socket_Dev_0_1>())
    return callback.MayForce(PP_ERROR_NOINTERFACE);

  internal::ToVarConverter<SocketType_Dev> type_var(type);
  internal::ToVarConverter<Optional<CreateOptions_Dev> > options_var(options);

  return get_interface<PPB_Ext_Socket_Dev_0_1>()->Create(
      instance_.pp_instance(),
      type_var.pp_var(),
      options_var.pp_var(),
      callback.output(),
      callback.pp_completion_callback());
}

void Socket_Dev::Destroy(int32_t socket_id) {
  if (!has_interface<PPB_Ext_Socket_Dev_0_1>())
    return;

  internal::ToVarConverter<int32_t> socket_id_var(socket_id);

  return get_interface<PPB_Ext_Socket_Dev_0_1>()->Destroy(
      instance_.pp_instance(),
      socket_id_var.pp_var());
}

int32_t Socket_Dev::Connect(int32_t socket_id,
                            const std::string& hostname,
                            int32_t port,
                            const ConnectCallback& callback) {
  if (!has_interface<PPB_Ext_Socket_Dev_0_1>())
    return callback.MayForce(PP_ERROR_NOINTERFACE);

  internal::ToVarConverter<int32_t> socket_id_var(socket_id);
  internal::ToVarConverter<std::string> hostname_var(hostname);
  internal::ToVarConverter<int32_t> port_var(port);

  return get_interface<PPB_Ext_Socket_Dev_0_1>()->Connect(
      instance_.pp_instance(),
      socket_id_var.pp_var(),
      hostname_var.pp_var(),
      port_var.pp_var(),
      callback.output(),
      callback.pp_completion_callback());
}

int32_t Socket_Dev::Bind(int32_t socket_id,
                         const std::string& address,
                         int32_t port,
                         const BindCallback& callback) {
  if (!has_interface<PPB_Ext_Socket_Dev_0_1>())
    return callback.MayForce(PP_ERROR_NOINTERFACE);

  internal::ToVarConverter<int32_t> socket_id_var(socket_id);
  internal::ToVarConverter<std::string> address_var(address);
  internal::ToVarConverter<int32_t> port_var(port);

  return get_interface<PPB_Ext_Socket_Dev_0_1>()->Bind(
      instance_.pp_instance(),
      socket_id_var.pp_var(),
      address_var.pp_var(),
      port_var.pp_var(),
      callback.output(),
      callback.pp_completion_callback());
}

void Socket_Dev::Disconnect(int32_t socket_id) {
  if (!has_interface<PPB_Ext_Socket_Dev_0_1>())
    return;

  internal::ToVarConverter<int32_t> socket_id_var(socket_id);

  return get_interface<PPB_Ext_Socket_Dev_0_1>()->Disconnect(
      instance_.pp_instance(),
      socket_id_var.pp_var());
}

int32_t Socket_Dev::Read(int32_t socket_id,
                         const Optional<int32_t>& buffer_size,
                         const ReadCallback& callback) {
  if (!has_interface<PPB_Ext_Socket_Dev_0_1>())
    return callback.MayForce(PP_ERROR_NOINTERFACE);

  internal::ToVarConverter<int32_t> socket_id_var(socket_id);
  internal::ToVarConverter<Optional<int32_t> > buffer_size_var(buffer_size);

  return get_interface<PPB_Ext_Socket_Dev_0_1>()->Read(
      instance_.pp_instance(),
      socket_id_var.pp_var(),
      buffer_size_var.pp_var(),
      callback.output(),
      callback.pp_completion_callback());
}

int32_t Socket_Dev::Write(int32_t socket_id,
                          const VarArrayBuffer& data,
                          const WriteCallback& callback) {
  if (!has_interface<PPB_Ext_Socket_Dev_0_1>())
    return callback.MayForce(PP_ERROR_NOINTERFACE);

  internal::ToVarConverter<int32_t> socket_id_var(socket_id);
  internal::ToVarConverter<Var> data_var(data);

  return get_interface<PPB_Ext_Socket_Dev_0_1>()->Write(
      instance_.pp_instance(),
      socket_id_var.pp_var(),
      data_var.pp_var(),
      callback.output(),
      callback.pp_completion_callback());
}

int32_t Socket_Dev::RecvFrom(int32_t socket_id,
                             const Optional<int32_t>& buffer_size,
                             const RecvFromCallback& callback) {
  if (!has_interface<PPB_Ext_Socket_Dev_0_1>())
    return callback.MayForce(PP_ERROR_NOINTERFACE);

  internal::ToVarConverter<int32_t> socket_id_var(socket_id);
  internal::ToVarConverter<Optional<int32_t> > buffer_size_var(buffer_size);

  return get_interface<PPB_Ext_Socket_Dev_0_1>()->RecvFrom(
      instance_.pp_instance(),
      socket_id_var.pp_var(),
      buffer_size_var.pp_var(),
      callback.output(),
      callback.pp_completion_callback());
}

int32_t Socket_Dev::SendTo(int32_t socket_id,
                           const VarArrayBuffer& data,
                           const std::string& address,
                           int32_t port,
                           const SendToCallback& callback) {
  if (!has_interface<PPB_Ext_Socket_Dev_0_1>())
    return callback.MayForce(PP_ERROR_NOINTERFACE);

  internal::ToVarConverter<int32_t> socket_id_var(socket_id);
  internal::ToVarConverter<Var> data_var(data);
  internal::ToVarConverter<std::string> address_var(address);
  internal::ToVarConverter<int32_t> port_var(port);

  return get_interface<PPB_Ext_Socket_Dev_0_1>()->SendTo(
      instance_.pp_instance(),
      socket_id_var.pp_var(),
      data_var.pp_var(),
      address_var.pp_var(),
      port_var.pp_var(),
      callback.output(),
      callback.pp_completion_callback());
}

int32_t Socket_Dev::Listen(int32_t socket_id,
                           const std::string& address,
                           int32_t port,
                           const Optional<int32_t>& backlog,
                           const ListenCallback& callback) {
  if (!has_interface<PPB_Ext_Socket_Dev_0_1>())
    return callback.MayForce(PP_ERROR_NOINTERFACE);

  internal::ToVarConverter<int32_t> socket_id_var(socket_id);
  internal::ToVarConverter<std::string> address_var(address);
  internal::ToVarConverter<int32_t> port_var(port);
  internal::ToVarConverter<Optional<int32_t> > backlog_var(backlog);

  return get_interface<PPB_Ext_Socket_Dev_0_1>()->Listen(
      instance_.pp_instance(),
      socket_id_var.pp_var(),
      address_var.pp_var(),
      port_var.pp_var(),
      backlog_var.pp_var(),
      callback.output(),
      callback.pp_completion_callback());
}

int32_t Socket_Dev::Accept(int32_t socket_id,
                           const AcceptCallback& callback) {
  if (!has_interface<PPB_Ext_Socket_Dev_0_1>())
    return callback.MayForce(PP_ERROR_NOINTERFACE);

  internal::ToVarConverter<int32_t> socket_id_var(socket_id);

  return get_interface<PPB_Ext_Socket_Dev_0_1>()->Accept(
      instance_.pp_instance(),
      socket_id_var.pp_var(),
      callback.output(),
      callback.pp_completion_callback());
}

int32_t Socket_Dev::SetKeepAlive(int32_t socket_id,
                                 bool enable,
                                 const Optional<int32_t>& delay,
                                 const SetKeepAliveCallback& callback) {
  if (!has_interface<PPB_Ext_Socket_Dev_0_1>())
    return callback.MayForce(PP_ERROR_NOINTERFACE);

  internal::ToVarConverter<int32_t> socket_id_var(socket_id);
  internal::ToVarConverter<bool> enable_var(enable);
  internal::ToVarConverter<Optional<int32_t> > delay_var(delay);

  return get_interface<PPB_Ext_Socket_Dev_0_1>()->SetKeepAlive(
      instance_.pp_instance(),
      socket_id_var.pp_var(),
      enable_var.pp_var(),
      delay_var.pp_var(),
      callback.output(),
      callback.pp_completion_callback());
}

int32_t Socket_Dev::SetNoDelay(int32_t socket_id,
                               bool no_delay,
                               const SetNoDelayCallback& callback) {
  if (!has_interface<PPB_Ext_Socket_Dev_0_1>())
    return callback.MayForce(PP_ERROR_NOINTERFACE);

  internal::ToVarConverter<int32_t> socket_id_var(socket_id);
  internal::ToVarConverter<bool> no_delay_var(no_delay);

  return get_interface<PPB_Ext_Socket_Dev_0_1>()->SetNoDelay(
      instance_.pp_instance(),
      socket_id_var.pp_var(),
      no_delay_var.pp_var(),
      callback.output(),
      callback.pp_completion_callback());
}

int32_t Socket_Dev::GetInfo(int32_t socket_id,
                            const GetInfoCallback& callback) {
  if (!has_interface<PPB_Ext_Socket_Dev_0_1>())
    return callback.MayForce(PP_ERROR_NOINTERFACE);

  internal::ToVarConverter<int32_t> socket_id_var(socket_id);

  return get_interface<PPB_Ext_Socket_Dev_0_1>()->GetInfo(
      instance_.pp_instance(),
      socket_id_var.pp_var(),
      callback.output(),
      callback.pp_completion_callback());
}

int32_t Socket_Dev::GetNetworkList(const GetNetworkListCallback& callback) {
  if (!has_interface<PPB_Ext_Socket_Dev_0_1>())
    return callback.MayForce(PP_ERROR_NOINTERFACE);

  return get_interface<PPB_Ext_Socket_Dev_0_1>()->GetNetworkList(
      instance_.pp_instance(),
      callback.output(),
      callback.pp_completion_callback());
}

}  // namespace socket
}  // namespace ext
}  // namespace pp


text:
$def with (context, params=None)
$var title: $_("Sign up")
$:macro.header_desktop(context, level=0, link=1)

$_('Sign up.')

        <form class="big_form" method="$context.method" action="$context.form_action.lower()">
            <fieldset>
                <legend>$_('Choose a username and password')</legend>
                $if params:
                    $for key, value in params.items():
                        <input type="hidden" name="$key" value="$value" style="display:none;"/>

                    $_('Choose a username'):
                    <input type="text" name="username" class="inputText" />

                    $_('Enter a password'):
                    <input type="password" name="password" class="text" />

                    $_('Repeat password'):
                    <input type="password" class="text" name="password2" />

                    $_('Email') ($_('optional')):
                    <input type="text" class="text" name="email" />

                $if context.captcha_key:
                    $:macro.captcha(context)
            </fieldset>

            	<button type="submit" class="normal" />$_("Sign up")</button>

        </form>


text:
package org.ebayopensource.turmeric.tools.annoparser.outputgenerator.impl;

import org.ebayopensource.turmeric.tools.annoparser.WSDLDocInterface;
import org.ebayopensource.turmeric.tools.annoparser.XSDDocInterface;
import org.ebayopensource.turmeric.tools.annoparser.context.OutputGenaratorParam;
import org.ebayopensource.turmeric.tools.annoparser.outputgenerator.OutputGenerator;

/**
 * The Class TestOpGenClass is just a test implementation to check if Custom
 * Class is getting Instantiated.
 *
 * @author sdaripelli
 */
public class TestOpGenClass implements OutputGenerator {

	/**
	 * {@inheritDoc}
	 */
	public void generateWsdlOutput(WSDLDocInterface wsdlDoc,
			OutputGenaratorParam outputGenaratorParam) {
		System.out.println(" IN Handle WSDL Doc");

	}

	/**
	 * {@inheritDoc}
	 */
	public void generateXsdOutput(XSDDocInterface xsdDoc,
			OutputGenaratorParam outputGenaratorParam) {
		System.out.println(" IN Handle XSD Doc");

	}

	/**
	 * {@inheritDoc}
	 */
	public void completeProcessing() {
		// TODO Auto-generated method stub

	}

}


text:
import React from 'react'
import renderer from 'react-test-renderer'
import Blog from '../../template/components/Blog'

describe('Blog', () => {
  it('should render blog posts', () => {
    const props = {
      posts: [
        {name: 'hello', meta: {title: 'Hello', time: new Date()}, html: '
World!
'},
        {name: 'bonjour', meta: {title: 'Bonjour', time: new Date()}, html: '
Le monde!
'}
      ]
    }
    const component = renderer.create(
      <Blog {...props}/>
    )
    const tree = component.toJSON()
    expect(tree).toMatchSnapshot()
  })
})


text:
<?xml version="1.0" encoding="UTF-8"?>
<GetServiceStatusResponse xmlns="https://mws.amazonservices.com/Sellers/2011-07-01">
   <GetServiceStatusResult>
        <Status>String</Status>
        <Timestamp>1969-07-21T02:56:03Z</Timestamp>
        <MessageId>String</MessageId>
        <Messages>
            <Message>
                <Locale>String</Locale>
                <Text>String</Text>
            </Message>
        </Messages>
    </GetServiceStatusResult>
   <ResponseMetadata>
        <RequestId>String</RequestId>
    </ResponseMetadata>
</GetServiceStatusResponse>


text:
#ifndef _KeccakP_1600_times4_SnP_h_
#define _KeccakP_1600_times4_SnP_h_

/** For the documentation, see PlSnP-documentation.h.
 */

#include "SIMD256-config.h"

#define KeccakP1600times4_implementation        "256-bit SIMD implementation (" KeccakP1600times4_implementation_config ")"
#define KeccakP1600times4_statesSizeInBytes     800
#define KeccakP1600times4_statesAlignment       32
#define KeccakF1600times4_FastLoop_supported
#define KeccakP1600times4_12rounds_FastLoop_supported

#include <stddef.h>

#define KeccakP1600times4_StaticInitialize()
void KeccakP1600times4_InitializeAll(void *states);
#define KeccakP1600times4_AddByte(states, instanceIndex, byte, offset) \
    ((unsigned char*)(states))[(instanceIndex)*8 + ((offset)/8)*4*8 + (offset)%8] ^= (byte)
void KeccakP1600times4_AddBytes(void *states, unsigned int instanceIndex, const unsigned char *data, unsigned int offset, unsigned int length);
void KeccakP1600times4_AddLanesAll(void *states, const unsigned char *data, unsigned int laneCount, unsigned int laneOffset);
void KeccakP1600times4_OverwriteBytes(void *states, unsigned int instanceIndex, const unsigned char *data, unsigned int offset, unsigned int length);
void KeccakP1600times4_OverwriteLanesAll(void *states, const unsigned char *data, unsigned int laneCount, unsigned int laneOffset);
void KeccakP1600times4_OverwriteWithZeroes(void *states, unsigned int instanceIndex, unsigned int byteCount);
void KeccakP1600times4_PermuteAll_12rounds(void *states);
void KeccakP1600times4_PermuteAll_24rounds(void *states);
void KeccakP1600times4_ExtractBytes(const void *states, unsigned int instanceIndex, unsigned char *data, unsigned int offset, unsigned int length);
void KeccakP1600times4_ExtractLanesAll(const void *states, unsigned char *data, unsigned int laneCount, unsigned int laneOffset);
void KeccakP1600times4_ExtractAndAddBytes(const void *states, unsigned int instanceIndex,  const unsigned char *input, unsigned char *output, unsigned int offset, unsigned int length);
void KeccakP1600times4_ExtractAndAddLanesAll(const void *states, const unsigned char *input, unsigned char *output, unsigned int laneCount, unsigned int laneOffset);
size_t KeccakF1600times4_FastLoop_Absorb(void *states, unsigned int laneCount, unsigned int laneOffsetParallel, unsigned int laneOffsetSerial, const unsigned char *data, size_t dataByteLen);
size_t KeccakP1600times4_12rounds_FastLoop_Absorb(void *states, unsigned int laneCount, unsigned int laneOffsetParallel, unsigned int laneOffsetSerial, const unsigned char *data, size_t dataByteLen);

#endif


text:
@interface DiscoverController : UITableViewController

@end


text:
<?php defined('BASEPATH') OR exit('No direct script access allowed');

/**
 * Getnotes Controller
 *
 * This class show intro to getnotes
 *
 * @package		Admin
 * @author		DK
*/

class Gn_explore extends BK_Controller
{

    function index()
    {

        $data['title']     = 'Explore All';

        $this->load->view('gn_backend/explore', $data);

    }

}