text:
#ifndef __SETUP_ONCE_H
#define __SETUP_ONCE_H

/********************************************************************
 *                              NOTICE                              *
 *                             ========                             *
 *                                                                  *
 *  Content of header files lib/setup_once.h and ares/setup_once.h  *
 *  must be kept in sync. Modify the other one if you change this.  *
 *                                                                  *
 ********************************************************************/

/*
 * Inclusion of common header files.
 */

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <stdarg.h>
#include <ctype.h>
#include <config-tizenrt.h>

#ifdef HAVE_ERRNO_H
#include <errno.h>
#endif

#ifdef HAVE_SYS_TYPES_H
#include <sys/types.h>
#endif

#ifdef NEED_MALLOC_H
#include <malloc.h>
#endif

#ifdef NEED_MEMORY_H
#include <memory.h>
#endif

#ifdef HAVE_SYS_STAT_H
#include <sys/stat.h>
#endif

#ifdef HAVE_SYS_TIME_H
#include <sys/time.h>
#ifdef TIME_WITH_SYS_TIME
#include <time.h>
#endif
#else
#ifdef HAVE_TIME_H
#include <time.h>
#endif
#endif

#ifdef WIN32
#include <io.h>
#include <fcntl.h>
#endif

#if defined(HAVE_STDBOOL_H) && defined(HAVE_BOOL_T)
#include <stdbool.h>
#endif

#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif

#ifdef __hpux
#  if !defined(_XOPEN_SOURCE_EXTENDED) || defined(_KERNEL)
#    ifdef _APP32_64BIT_OFF_T
#      define OLD_APP32_64BIT_OFF_T _APP32_64BIT_OFF_T
#      undef _APP32_64BIT_OFF_T
#    else
#      undef OLD_APP32_64BIT_OFF_T
#    endif
#  endif
#endif

#ifdef HAVE_SYS_SOCKET_H
#include <sys/socket.h>
#endif

#ifdef __hpux
#  if !defined(_XOPEN_SOURCE_EXTENDED) || defined(_KERNEL)
#    ifdef OLD_APP32_64BIT_OFF_T
#      define _APP32_64BIT_OFF_T OLD_APP32_64BIT_OFF_T
#      undef OLD_APP32_64BIT_OFF_T
#    endif
#  endif
#endif

/*
 * Definition of timeval struct for platforms that don't have it.
 */

#ifndef HAVE_STRUCT_TIMEVAL
struct timeval {
 long tv_sec;
 long tv_usec;
};
#endif

/*
 * If we have the MSG_NOSIGNAL define, make sure we use
 * it as the fourth argument of function send()
 */

#ifdef HAVE_MSG_NOSIGNAL
#define SEND_4TH_ARG MSG_NOSIGNAL
#else
#define SEND_4TH_ARG 0
#endif

#if defined(__minix)
/* Minix doesn't support recv on TCP sockets */
#define sread(x,y,z) (ares_ssize_t)read((RECV_TYPE_ARG1)(x), \
                                   (RECV_TYPE_ARG2)(y), \
                                   (RECV_TYPE_ARG3)(z))

#elif defined(HAVE_RECV)
/*
 * The definitions for the return type and arguments types
 * of functions recv() and send() belong and come from the
 * configuration file. Do not define them in any other place.
 *
 * HAVE_RECV is defined if you have a function named recv()
 * which is used to read incoming data from sockets. If your
 * function has another name then don't define HAVE_RECV.
 *
 * If HAVE_RECV is defined then RECV_TYPE_ARG1, RECV_TYPE_ARG2,
 * RECV_TYPE_ARG3, RECV_TYPE_ARG4 and RECV_TYPE_RETV must also
 * be defined.
 *
 * HAVE_SEND is defined if you have a function named send()
 * which is used to write outgoing data on a connected socket.
 * If yours has another name then don't define HAVE_SEND.
 *
 * If HAVE_SEND is defined then SEND_TYPE_ARG1, SEND_QUAL_ARG2,
 * SEND_TYPE_ARG2, SEND_TYPE_ARG3, SEND_TYPE_ARG4 and
 * SEND_TYPE_RETV must also be defined.
 */

#if !defined(RECV_TYPE_ARG1) || \
    !defined(RECV_TYPE_ARG2) || \
    !defined(RECV_TYPE_ARG3) || \
    !defined(RECV_TYPE_ARG4) || \
    !defined(RECV_TYPE_RETV)
  /* */
  Error Missing_definition_of_return_and_arguments_types_of_recv
  /* */
#else
#define sread(x,y,z) (ares_ssize_t)recv((RECV_TYPE_ARG1)(x), \
                                   (RECV_TYPE_ARG2)(y), \
                                   (RECV_TYPE_ARG3)(z), \
                                   (RECV_TYPE_ARG4)(0))
#endif
#else /* HAVE_RECV */
#ifndef sread
  /* */
  Error Missing_definition_of_macro_sread
  /* */
#endif
#endif /* HAVE_RECV */

#if defined(__minix)
/* Minix doesn't support send on TCP sockets */
#define swrite(x,y,z) (ares_ssize_t)write((SEND_TYPE_ARG1)(x), \
                                    (SEND_TYPE_ARG2)(y), \
                                    (SEND_TYPE_ARG3)(z))

#elif defined(HAVE_SEND)
#if !defined(SEND_TYPE_ARG1) || \
    !defined(SEND_QUAL_ARG2) || \
    !defined(SEND_TYPE_ARG2) || \
    !defined(SEND_TYPE_ARG3) || \
    !defined(SEND_TYPE_ARG4) || \
    !defined(SEND_TYPE_RETV)
  /* */
  Error Missing_definition_of_return_and_arguments_types_of_send
  /* */
#else
#define swrite(x,y,z) (ares_ssize_t)send((SEND_TYPE_ARG1)(x), \
                                    (SEND_TYPE_ARG2)(y), \
                                    (SEND_TYPE_ARG3)(z), \
                                    (SEND_TYPE_ARG4)(SEND_4TH_ARG))
#endif
#else /* HAVE_SEND */
#ifndef swrite
  /* */
  Error Missing_definition_of_macro_swrite
  /* */
#endif
#endif /* HAVE_SEND */

#if 0
#if defined(HAVE_RECVFROM)
/*
 * Currently recvfrom is only used on udp sockets.
 */
#if !defined(RECVFROM_TYPE_ARG1) || \
    !defined(RECVFROM_TYPE_ARG2) || \
    !defined(RECVFROM_TYPE_ARG3) || \
    !defined(RECVFROM_TYPE_ARG4) || \
    !defined(RECVFROM_TYPE_ARG5) || \
    !defined(RECVFROM_TYPE_ARG6) || \
    !defined(RECVFROM_TYPE_RETV)
  /* */
  Error Missing_definition_of_return_and_arguments_types_of_recvfrom
  /* */
#else
#define sreadfrom(s,b,bl,f,fl) (ares_ssize_t)recvfrom((RECVFROM_TYPE_ARG1)  (s),  \
                                                 (RECVFROM_TYPE_ARG2 *)(b),  \
                                                 (RECVFROM_TYPE_ARG3)  (bl), \
                                                 (RECVFROM_TYPE_ARG4)  (0),  \
                                                 (RECVFROM_TYPE_ARG5 *)(f),  \
                                                 (RECVFROM_TYPE_ARG6 *)(fl))
#endif
#else /* HAVE_RECVFROM */
#ifndef sreadfrom
  /* */
  Error Missing_definition_of_macro_sreadfrom
  /* */
#endif
#endif /* HAVE_RECVFROM */

#ifdef RECVFROM_TYPE_ARG6_IS_VOID
#  define RECVFROM_ARG6_T int
#else
#  define RECVFROM_ARG6_T RECVFROM_TYPE_ARG6
#endif
#endif /* if 0 */

/*
 * Function-like macro definition used to close a socket.
 */

#if defined(HAVE_CLOSESOCKET)
#  define sclose(x)  closesocket((x))
#elif defined(HAVE_CLOSESOCKET_CAMEL)
#  define sclose(x)  CloseSocket((x))
#elif defined(HAVE_CLOSE_S)
#  define sclose(x)  close_s((x))
#else
#  define sclose(x)  close((x))
#endif

/*
 * Uppercase macro versions of ANSI/ISO is*() functions/macros which
 * avoid negative number inputs with argument byte codes > 127.
 */

#define ISSPACE(x)  (isspace((int)  ((unsigned char)x)))
#define ISDIGIT(x)  (isdigit((int)  ((unsigned char)x)))
#define ISALNUM(x)  (isalnum((int)  ((unsigned char)x)))
#define ISXDIGIT(x) (isxdigit((int) ((unsigned char)x)))
#define ISGRAPH(x)  (isgraph((int)  ((unsigned char)x)))
#define ISALPHA(x)  (isalpha((int)  ((unsigned char)x)))
#define ISPRINT(x)  (isprint((int)  ((unsigned char)x)))
#define ISUPPER(x)  (isupper((int)  ((unsigned char)x)))
#define ISLOWER(x)  (islower((int)  ((unsigned char)x)))
#define ISASCII(x)  (isascii((int)  ((unsigned char)x)))

#define ISBLANK(x)  (int)((((unsigned char)x) == ' ') || \
                          (((unsigned char)x) == '\t'))

#define TOLOWER(x)  (tolower((int)  ((unsigned char)x)))

/*
 * 'bool' stuff compatible with HP-UX headers.
 */

#if defined(__hpux) && !defined(HAVE_BOOL_T)
   typedef int bool;
#  define false 0
#  define true 1
#  define HAVE_BOOL_T
#endif

/*
 * 'bool' exists on platforms with <stdbool.h>, i.e. C99 platforms.
 * On non-C99 platforms there's no bool, so define an enum for that.
 * On C99 platforms 'false' and 'true' also exist. Enum uses a
 * global namespace though, so use bool_false and bool_true.
 */

#ifndef HAVE_BOOL_T
  typedef enum {
      bool_false = 0,
      bool_true  = 1
  } bool;

/*
 * Use a define to let 'true' and 'false' use those enums.  There
 * are currently no use of true and false in libcurl proper, but
 * there are some in the examples. This will cater for any later
 * code happening to use true and false.
 */
#  define false bool_false
#  define true  bool_true
#  define HAVE_BOOL_T
#endif

/*
 * Redefine TRUE and FALSE too, to catch current use. With this
 * change, 'bool found = 1' will give a warning on MIPSPro, but
 * 'bool found = TRUE' will not. Change tested on IRIX/MIPSPro,
 * AIX 5.1/Xlc, Tru64 5.1/cc, w/make test too.
 */

#ifndef TRUE
#define TRUE true
#endif
#ifndef FALSE
#define FALSE false
#endif

/*
 * Macro WHILE_FALSE may be used to build single-iteration do-while loops,
 * avoiding compiler warnings. Mostly intended for other macro definitions.
 */

#define WHILE_FALSE  while(0)

#if defined(_MSC_VER) && !defined(__POCC__)
#  undef WHILE_FALSE
#  if (_MSC_VER < 1500)
#    define WHILE_FALSE  while(1, 0)
#  else
#    define WHILE_FALSE \
__pragma(warning(push)) \
__pragma(warning(disable:4127)) \
while(0) \
__pragma(warning(pop))
#  endif
#endif

/*
 * Typedef to 'int' if sig_atomic_t is not an available 'typedefed' type.
 */

#ifndef HAVE_SIG_ATOMIC_T
typedef int sig_atomic_t;
#define HAVE_SIG_ATOMIC_T
#endif

/*
 * Convenience SIG_ATOMIC_T definition
 */

#ifdef HAVE_SIG_ATOMIC_T_VOLATILE
#define SIG_ATOMIC_T static sig_atomic_t
#else
#define SIG_ATOMIC_T static volatile sig_atomic_t
#endif

/*
 * Default return type for signal handlers.
 */

#ifndef RETSIGTYPE
#define RETSIGTYPE void
#endif

/*
 * Macro used to include code only in debug builds.
 */

#ifdef DEBUGBUILD
#define DEBUGF(x) x
#else
#define DEBUGF(x) do { } WHILE_FALSE
#endif

/*
 * Macro used to include assertion code only in debug builds.
 */

// TODO(TizenRT) : DEBUGASSERT is defined at os/include/assert.h
#ifndef DEBUGASSERT
#if defined(DEBUGBUILD) && defined(HAVE_ASSERT_H)
#define DEBUGASSERT(x) assert(x)
#else
#define DEBUGASSERT(x) do { } WHILE_FALSE
#endif
#endif

/*
 * Macro SOCKERRNO / SET_SOCKERRNO() returns / sets the *socket-related* errno
 * (or equivalent) on this platform to hide platform details to code using it.
 */

#ifdef USE_WINSOCK
#define SOCKERRNO         ((int)WSAGetLastError())
#define SET_SOCKERRNO(x)  (WSASetLastError((int)(x)))
#else
#define SOCKERRNO         (errno)
#define SET_SOCKERRNO(x)  (errno = (x))
#endif

/*
 * Macro ERRNO / SET_ERRNO() returns / sets the NOT *socket-related* errno
 * (or equivalent) on this platform to hide platform details to code using it.
 */

#if defined(WIN32) && !defined(WATT32)
#define ERRNO         ((int)GetLastError())
#define SET_ERRNO(x)  (SetLastError((DWORD)(x)))
#else
#define ERRNO         (errno)
#define SET_ERRNO(x)  (errno = (x))
#endif

/*
 * Portable error number symbolic names defined to Winsock error codes.
 */

#ifdef USE_WINSOCK
#undef  EBADF            /* override definition in errno.h */
#define EBADF            WSAEBADF
#undef  EINTR            /* override definition in errno.h */
#define EINTR            WSAEINTR
#undef  EINVAL           /* override definition in errno.h */
#define EINVAL           WSAEINVAL
#undef  EWOULDBLOCK      /* override definition in errno.h */
#define EWOULDBLOCK      WSAEWOULDBLOCK
#undef  EINPROGRESS      /* override definition in errno.h */
#define EINPROGRESS      WSAEINPROGRESS
#undef  EALREADY         /* override definition in errno.h */
#define EALREADY         WSAEALREADY
#undef  ENOTSOCK         /* override definition in errno.h */
#define ENOTSOCK         WSAENOTSOCK
#undef  EDESTADDRREQ     /* override definition in errno.h */
#define EDESTADDRREQ     WSAEDESTADDRREQ
#undef  EMSGSIZE         /* override definition in errno.h */
#define EMSGSIZE         WSAEMSGSIZE
#undef  EPROTOTYPE       /* override definition in errno.h */
#define EPROTOTYPE       WSAEPROTOTYPE
#undef  ENOPROTOOPT      /* override definition in errno.h */
#define ENOPROTOOPT      WSAENOPROTOOPT
#undef  EPROTONOSUPPORT  /* override definition in errno.h */
#define EPROTONOSUPPORT  WSAEPROTONOSUPPORT
#define ESOCKTNOSUPPORT  WSAESOCKTNOSUPPORT
#undef  EOPNOTSUPP       /* override definition in errno.h */
#define EOPNOTSUPP       WSAEOPNOTSUPP
#define EPFNOSUPPORT     WSAEPFNOSUPPORT
#undef  EAFNOSUPPORT     /* override definition in errno.h */
#define EAFNOSUPPORT     WSAEAFNOSUPPORT
#undef  EADDRINUSE       /* override definition in errno.h */
#define EADDRINUSE       WSAEADDRINUSE
#undef  EADDRNOTAVAIL    /* override definition in errno.h */
#define EADDRNOTAVAIL    WSAEADDRNOTAVAIL
#undef  ENETDOWN         /* override definition in errno.h */
#define ENETDOWN         WSAENETDOWN
#undef  ENETUNREACH      /* override definition in errno.h */
#define ENETUNREACH      WSAENETUNREACH
#undef  ENETRESET        /* override definition in errno.h */
#define ENETRESET        WSAENETRESET
#undef  ECONNABORTED     /* override definition in errno.h */
#define ECONNABORTED     WSAECONNABORTED
#undef  ECONNRESET       /* override definition in errno.h */
#define ECONNRESET       WSAECONNRESET
#undef  ENOBUFS          /* override definition in errno.h */
#define ENOBUFS          WSAENOBUFS
#undef  EISCONN          /* override definition in errno.h */
#define EISCONN          WSAEISCONN
#undef  ENOTCONN         /* override definition in errno.h */
#define ENOTCONN         WSAENOTCONN
#define ESHUTDOWN        WSAESHUTDOWN
#define ETOOMANYREFS     WSAETOOMANYREFS
#undef  ETIMEDOUT        /* override definition in errno.h */
#define ETIMEDOUT        WSAETIMEDOUT
#undef  ECONNREFUSED     /* override definition in errno.h */
#define ECONNREFUSED     WSAECONNREFUSED
#undef  ELOOP            /* override definition in errno.h */
#define ELOOP            WSAELOOP
#ifndef ENAMETOOLONG     /* possible previous definition in errno.h */
#define ENAMETOOLONG     WSAENAMETOOLONG
#endif
#define EHOSTDOWN        WSAEHOSTDOWN
#undef  EHOSTUNREACH     /* override definition in errno.h */
#define EHOSTUNREACH     WSAEHOSTUNREACH
#ifndef ENOTEMPTY        /* possible previous definition in errno.h */
#define ENOTEMPTY        WSAENOTEMPTY
#endif
#define EPROCLIM         WSAEPROCLIM
#define EUSERS           WSAEUSERS
#define EDQUOT           WSAEDQUOT
#define ESTALE           WSAESTALE
#define EREMOTE          WSAEREMOTE
#endif

/*
 *  Actually use __32_getpwuid() on 64-bit VMS builds for getpwuid()
 */

#if defined(__VMS) && \
    defined(__INITIAL_POINTER_SIZE) && (__INITIAL_POINTER_SIZE == 64)
#define getpwuid __32_getpwuid
#endif

/*
 * Macro argv_item_t hides platform details to code using it.
 */

#ifdef __VMS
#define argv_item_t  __char_ptr32
#else
#define argv_item_t  char *
#endif

/*
 * We use this ZERO_NULL to avoid picky compiler warnings,
 * when assigning a NULL pointer to a function pointer var.
 */

#define ZERO_NULL 0

#endif /* __SETUP_ONCE_H */


text:
<?xml version="1.0"?>
<!--

-->
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">
    <!-- payment method config -->
    <virtualType name="Magento\TestModuleFakePaymentMethod\Gateway\Facade" type="Magento\Payment\Model\Method\Adapter">
        <arguments>
            <argument name="code" xsi:type="string">fake</argument>
            <argument name="formBlockType" xsi:type="string">Magento\Payment\Block\Form\Cc</argument>
            <argument name="infoBlockType" xsi:type="string">Magento\Payment\Block\ConfigurableInfo</argument>
            <argument name="valueHandlerPool" xsi:type="object">Magento\TestModuleFakePaymentMethod\Gateway\Config\ValueHandlerPool</argument>
            <argument name="validatorPool" xsi:type="object">Magento\TestModuleFakePaymentMethod\Gateway\Validator\ValidatorPool</argument>
            <argument name="commandPool" xsi:type="object">Magento\TestModuleFakePaymentMethod\Gateway\Command\CommandPool</argument>
        </arguments>
    </virtualType>
    <virtualType name="Magento\TestModuleFakePaymentMethod\Gateway\Config\ValueHandlerPool" type="Magento\Payment\Gateway\Config\ValueHandlerPool">
        <arguments>
            <argument name="handlers" xsi:type="array">
                <item name="default" xsi:type="string">Magento\TestModuleFakePaymentMethod\Gateway\Config\ConfigValueHandler</item>
            </argument>
        </arguments>
    </virtualType>
    <virtualType name="Magento\TestModuleFakePaymentMethod\Gateway\Config\ConfigValueHandler" type="Magento\Payment\Gateway\Config\ConfigValueHandler">
        <arguments>
            <argument name="configInterface" xsi:type="object">Magento\TestModuleFakePaymentMethod\Gateway\Config\Config</argument>
        </arguments>
    </virtualType>
    <virtualType name="Magento\TestModuleFakePaymentMethod\Gateway\Config\Config" type="Magento\Payment\Gateway\Config\Config">
        <arguments>
            <argument name="methodCode" xsi:type="string">fake</argument>
        </arguments>
    </virtualType>
    <virtualType name="Magento\TestModuleFakePaymentMethod\Gateway\Validator\ValidatorPool" type="Magento\Payment\Gateway\Validator\ValidatorPool">
        <arguments>
            <argument name="validators" xsi:type="array">
                <!-- no validation -->
            </argument>
        </arguments>
    </virtualType>
    <virtualType name="Magento\TestModuleFakePaymentMethod\Gateway\Command\CommandPool" type="Magento\Payment\Gateway\Command\CommandPool">
        <arguments>
            <argument name="commands" xsi:type="array">
                <item name="authorize" xsi:type="string">Magento\TestModuleFakePaymentMethod\Gateway\Command\DoNothingCommand</item>
                <item name="sale" xsi:type="string">Magento\TestModuleFakePaymentMethod\Gateway\Command\DoNothingCommand</item>
                <item name="capture" xsi:type="string">Magento\TestModuleFakePaymentMethod\Gateway\Command\DoNothingCommand</item>
                <item name="settlement" xsi:type="string">Magento\TestModuleFakePaymentMethod\Gateway\Command\DoNothingCommand</item>
                <item name="vault_authorize" xsi:type="string">Magento\TestModuleFakePaymentMethod\Gateway\Command\DoNothingCommand</item>
                <item name="vault_sale" xsi:type="string">Magento\TestModuleFakePaymentMethod\Gateway\Command\DoNothingCommand</item>
                <item name="vault_capture" xsi:type="string">Magento\TestModuleFakePaymentMethod\Gateway\Command\DoNothingCommand</item>
                <item name="void" xsi:type="string">Magento\TestModuleFakePaymentMethod\Gateway\Command\DoNothingCommand</item>
                <item name="refund" xsi:type="string">Magento\TestModuleFakePaymentMethod\Gateway\Command\DoNothingCommand</item>
                <item name="cancel" xsi:type="string">Magento\TestModuleFakePaymentMethod\Gateway\Command\DoNothingCommand</item>
                <item name="deny_payment" xsi:type="string">Magento\TestModuleFakePaymentMethod\Gateway\Command\DoNothingCommand</item>
            </argument>
        </arguments>
    </virtualType>
    <virtualType name="Magento\TestModuleFakePaymentMethod\Gateway\Command\CommandManager" type="Magento\Payment\Gateway\Command\CommandManager">
        <arguments>
            <argument name="commandPool" xsi:type="object">Magento\TestModuleFakePaymentMethod\Gateway\Command\CommandPool</argument>
        </arguments>
    </virtualType>
    <type name="Magento\Payment\Gateway\Command\CommandManagerPool">
        <arguments>
            <argument name="executors" xsi:type="array">
                <item name="fake" xsi:type="string">Magento\TestModuleFakePaymentMethod\Gateway\Command\CommandManager</item>
            </argument>
        </arguments>
    </type>

    <!-- vault config -->
    <virtualType name="Magento\TestModuleFakePaymentMethod\Gateway\VaultFacade" type="Magento\Vault\Model\Method\Vault">
        <arguments>
            <argument name="config" xsi:type="object">Magento\TestModuleFakePaymentMethod\Gateway\Config\Vault\Config</argument>
            <argument name="valueHandlerPool" xsi:type="object">Magento\TestModuleFakePaymentMethod\Gateway\Config\Vault\ValueHandlerPool</argument>
            <argument name="vaultProvider" xsi:type="object">Magento\TestModuleFakePaymentMethod\Gateway\Facade</argument>
            <argument name="code" xsi:type="string">fake_vault</argument>
        </arguments>
    </virtualType>
    <virtualType name="Magento\TestModuleFakePaymentMethod\Gateway\Config\Vault\ValueHandlerPool" type="VaultPaymentValueHandlerPool">
        <arguments>
            <argument name="handlers" xsi:type="array">
                <item name="default" xsi:type="string">Magento\TestModuleFakePaymentMethod\Gateway\Config\Vault\ConfigValueHandler</item>
            </argument>
        </arguments>
    </virtualType>
    <virtualType name="Magento\TestModuleFakePaymentMethod\Gateway\Config\Vault\ConfigValueHandler" type="VaultPaymentDefaultValueHandler">
        <arguments>
            <argument name="configInterface" xsi:type="object">Magento\TestModuleFakePaymentMethod\Gateway\Config\Vault\Config</argument>
        </arguments>
    </virtualType>
    <virtualType name="Magento\TestModuleFakePaymentMethod\Gateway\Config\Vault\Config" type="Magento\Payment\Gateway\Config\Config">
        <arguments>
            <argument name="methodCode" xsi:type="string">fake_vault</argument>
        </arguments>
    </virtualType>
</config>

redpajama_set_name: RedPajamaGithub


text:
DarkUniverse
============

Dark Universe Character Manager

Build instructions:

    just type ant. Binary will be in ./dist

Run:

    java -jar ./dist/DarkUniverseApp.jar

    (in windows you can just doubleclick the .jar)

![Main screen](https://raw.github.com/ekollof/DarkUniverse/master/screens/DarkUniverse-Main.png)


text:
void bind_utility();
void bind_fingerprint();
void bind_sha1_hash();
void bind_session();
void bind_entry();
void bind_torrent_info();
void bind_unicode_string_conversion();
void bind_torrent_handle();
void bind_torrent_status();
void bind_session_settings();
void bind_version();
void bind_alert();
void bind_datetime();
void bind_peer_info();
void bind_ip_filter();
void bind_magnet_uri();
void bind_converters();
void bind_create_torrent();
void bind_error_code();

BOOST_PYTHON_MODULE(libtorrent)
{
    Py_Initialize();
    PyEval_InitThreads();

    bind_error_code();
    bind_utility();
    bind_fingerprint();
    bind_sha1_hash();
    bind_entry();
    bind_torrent_handle();
    bind_session();
    bind_torrent_info();
#if TORRENT_USE_WSTRING
    bind_unicode_string_conversion();
#endif
    bind_torrent_status();
    bind_session_settings();
    bind_version();
    bind_alert();
    bind_datetime();
    bind_peer_info();
    bind_ip_filter();
    bind_magnet_uri();
    bind_converters();
    bind_create_torrent();
}


text:
@extends('admin.layout')

@section('title','Pages Management')

@section('head')

@stop

@section('content')

               {{$page->label}} | Page Management

                <form method="post" action="{{URL::route('adminPageUpdate',array('id'=>$page->id))}}">

                         Page Label :

                                <input type="text" class="form-control" name="label" value="{{$page->label}}">

                         Content :

                            <textarea id="summernote" class="form-control" name="text" style="height: 400px;">{{$page->text}}</textarea>

                    <input type="submit" value="Save Changes" class="pull-right btn btn-primary">
                </form>

@stop

@section('script')

<link rel="stylesheet" href="{{asset('css/summernote.css')}}">

@stop


text:
class RemoveProviderColumnFromPlayers < ActiveRecord::Migration
  def change
    remove_column :players, :provider
  end
end


text:
/**
 *  Chapter 9 - Interface - Adapter Pattern
 *  Canada education has elementary school, high school, preUniversity and university
 *  @author wei.shen@iro.umontreal.ca
 *  @version 1.0
 */

package com.ciaoshen.thinkinjava.chapter9;
import java.util.*;

class CanadaEducation implements CanadaEducationInterface {

    /**
     *  PUBLIC PROXY OF CONSTRUCTOR
     */
    public static CanadaEducation createCanadaEducation(){
        return new CanadaEducation();
    }

    /**
     *  PUBLIC METHODS
     */
    public void elementarySchool(Etudiant e){
        if(!e.getElementarySchoolGraduate()){
            e.elementarySchoolGraduate();
            System.out.println("Congratulation "+e.getName()+"! You are graduated from Canada's elementary school!");
        } else {
            System.out.println("Sorry, you are not admissible to elementary school!");
        }
    }
    public void highSchool(Etudiant e){
        if(e.getElementarySchoolGraduate() && !e.getHighSchoolGraduate()){
            e.highSchoolGraduate();
            System.out.println("Congratulation "+e.getName()+"! You are graduated from Canada's high school!");
        } else {
            System.out.println("Sorry, you are not admissible to high school!");
        }
    }
    public void preUniversity(Etudiant e){
        if(e.getHighSchoolGraduate() && !e.getPreUniversityGraduate()){
            e.preUniversityGraduate();
            System.out.println("Congratulation "+e.getName()+"! You are graduated from Canada's pre-university!");
        } else {
            System.out.println("Sorry, you are not admissible to pre-university!");
        }
    }
    public void university(Etudiant e){
        if(e.getPreUniversityGraduate() && !e.getUniversityGraduate()){
            e.universityGraduate();
            System.out.println("Congratulation "+e.getName()+"! You are graduated from Canada's university!");
        } else {
            System.out.println("Sorry, you are not admissible to university!");
        }
    }

    /**
     *  PIVATE ACCESS CONSTRUCTOR
     */
    private CanadaEducation(){}

    /**
     *  PRIVATE FIELDS
     */

    /**
     *  MAIN
     *  @param args void
     */
    public static void main(String[] args){

    }

}


text:
=====================================
CoprHD FC, iSCSI, and ScaleIO drivers
=====================================

CoprHD is an open source software-defined storage controller and API platform.
It enables policy-based management and cloud automation of storage resources
for block, object and file storage providers.
For more details, see `CoprHD <http://coprhd.org/>`_.

EMC ViPR Controller is the commercial offering of CoprHD. These same volume
drivers can also be considered as EMC ViPR Controller Block Storage drivers.

System requirements
~~~~~~~~~~~~~~~~~~~

CoprHD version 3.0 is required. Refer to the CoprHD documentation for
installation and configuration instructions.

If you are using these drivers to integrate with EMC ViPR Controller, use
EMC ViPR Controller 3.0.

Supported operations
~~~~~~~~~~~~~~~~~~~~

The following operations are supported:

- Create, delete, attach, detach, retype, clone, and extend volumes.
- Create, list, and delete volume snapshots.
- Create a volume from a snapshot.
- Copy a volume to an image.
- Copy an image to a volume.
- Clone a volume.
- Extend a volume.
- Retype a volume.
- Get volume statistics.
- Create, delete, and update consistency groups.
- Create and delete consistency group snapshots.

Driver options
~~~~~~~~~~~~~~

The following table contains the configuration options specific to the
CoprHD volume driver.

.. config-table::
   :config-target: CoprHD

   cinder.volume.drivers.coprhd.common
   cinder.volume.drivers.coprhd.scaleio

Preparation
~~~~~~~~~~~

This involves setting up the CoprHD environment first and then configuring
the CoprHD Block Storage driver.

CoprHD
------

The CoprHD environment must meet specific configuration requirements to
support the OpenStack Block Storage driver.

- CoprHD users must be assigned a Tenant Administrator role or a Project
  Administrator role for the Project being used. CoprHD roles are configured
  by CoprHD Security Administrators. Consult the CoprHD documentation for
  details.

- A CorprHD system administrator must execute the following configurations
  using the CoprHD UI, CoprHD API, or CoprHD CLI:

  - Create CoprHD virtual array
  - Create CoprHD virtual storage pool
  - Virtual Array designated for iSCSI driver must have an IP network created
    with appropriate IP storage ports
  - Designated tenant for use
  - Designated project for use

.. note:: Use each back end to manage one virtual array and one virtual
          storage pool. However, the user can have multiple instances of
          CoprHD Block Storage driver, sharing the same virtual array and virtual
          storage pool.

- A typical CoprHD virtual storage pool will have the following values
  specified:

  - Storage Type: Block
  - Provisioning Type: Thin
  - Protocol: iSCSI/Fibre Channel(FC)/ScaleIO
  - Multi-Volume Consistency: DISABLED OR ENABLED
  - Maximum Native Snapshots: A value greater than 0 allows the OpenStack user
    to take Snapshots

CoprHD drivers - Single back end
--------------------------------

**cinder.conf**

#. Modify ``/etc/cinder/cinder.conf`` by adding the following lines,
   substituting values for your environment:

   .. code-block:: ini

    [coprhd-iscsi]
    volume_driver = cinder.volume.drivers.coprhd.iscsi.EMCCoprHDISCSIDriver
    volume_backend_name = coprhd-iscsi
    coprhd_hostname = <CoprHD-Host-Name>
    coprhd_port = 4443
    coprhd_username = <username>
    coprhd_password = <password>
    coprhd_tenant = <CoprHD-Tenant-Name>
    coprhd_project = <CoprHD-Project-Name>
    coprhd_varray = <CoprHD-Virtual-Array-Name>
    coprhd_emulate_snapshot = True or False, True if the CoprHD vpool has VMAX or VPLEX as the backing storage

#. If you use the ScaleIO back end, add the following lines:

   .. code-block:: ini

    coprhd_scaleio_rest_gateway_host = <IP or FQDN>
    coprhd_scaleio_rest_gateway_port = 443
    coprhd_scaleio_rest_server_username = <username>
    coprhd_scaleio_rest_server_password = <password>
    scaleio_verify_server_certificate = True or False
    scaleio_server_certificate_path = <path-of-certificate-for-validation>

#. Specify the driver using the ``enabled_backends`` parameter::

     enabled_backends = coprhd-iscsi

   .. note:: To utilize the Fibre Channel driver, replace the
             ``volume_driver`` line above with::

                 volume_driver = cinder.volume.drivers.coprhd.fc.EMCCoprHDFCDriver

   .. note:: To utilize the ScaleIO driver, replace the ``volume_driver`` line
             above with::

                 volume_driver = cinder.volume.drivers.coprhd.fc.EMCCoprHDScaleIODriver

   .. note:: Set ``coprhd_emulate_snapshot`` to True if the CoprHD vpool has
             VMAX or VPLEX as the back-end storage. For these type of back-end
             storages, when a user tries to create a snapshot, an actual volume
             gets created in the back end.

#. Modify the ``rpc_response_timeout`` value in ``/etc/cinder/cinder.conf`` to
   at least 5 minutes. If this entry does not already exist within the
   ``cinder.conf`` file, add it in the ``[DEFAULT]`` section:

   .. code-block:: ini

     [DEFAULT]
     # ...
     rpc_response_timeout = 300

#. Now, restart the ``cinder-volume`` service.

**Volume type creation and extra specs**

#. Create OpenStack volume types:

   .. code-block:: console

      $ openstack volume type create <typename>

#. Map the OpenStack volume type to the CoprHD virtual pool:

   .. code-block:: console

      $ openstack volume type set <typename> --property CoprHD:VPOOL=<CoprHD-PoolName>

#. Map the volume type created to appropriate back-end driver:

   .. code-block:: console

      $ openstack volume type set <typename> --property volume_backend_name=<VOLUME_BACKEND_DRIVER>

CoprHD drivers - Multiple back-ends
-----------------------------------

**cinder.conf**

#. Add or modify the following entries if you are planning to use multiple
   back-end drivers:

   .. code-block:: ini

      enabled_backends = coprhddriver-iscsi,coprhddriver-fc,coprhddriver-scaleio

#. Add the following at the end of the file:

   .. code-block:: ini

    [coprhddriver-iscsi]
    volume_driver = cinder.volume.drivers.coprhd.iscsi.EMCCoprHDISCSIDriver
    volume_backend_name = EMCCoprHDISCSIDriver
    coprhd_hostname = <CoprHD Host Name>
    coprhd_port = 4443
    coprhd_username = <username>
    coprhd_password = <password>
    coprhd_tenant = <CoprHD-Tenant-Name>
    coprhd_project = <CoprHD-Project-Name>
    coprhd_varray = <CoprHD-Virtual-Array-Name>

    [coprhddriver-fc]
    volume_driver = cinder.volume.drivers.coprhd.fc.EMCCoprHDFCDriver
    volume_backend_name = EMCCoprHDFCDriver
    coprhd_hostname = <CoprHD Host Name>
    coprhd_port = 4443
    coprhd_username = <username>
    coprhd_password = <password>
    coprhd_tenant = <CoprHD-Tenant-Name>
    coprhd_project = <CoprHD-Project-Name>
    coprhd_varray = <CoprHD-Virtual-Array-Name>

    [coprhddriver-scaleio]
    volume_driver = cinder.volume.drivers.coprhd.scaleio.EMCCoprHDScaleIODriver
    volume_backend_name = EMCCoprHDScaleIODriver
    coprhd_hostname = <CoprHD Host Name>
    coprhd_port = 4443
    coprhd_username = <username>
    coprhd_password = <password>
    coprhd_tenant = <CoprHD-Tenant-Name>
    coprhd_project = <CoprHD-Project-Name>
    coprhd_varray = <CoprHD-Virtual-Array-Name>
    coprhd_scaleio_rest_gateway_host = <ScaleIO Rest Gateway>
    coprhd_scaleio_rest_gateway_port = 443
    coprhd_scaleio_rest_server_username = <rest gateway username>
    coprhd_scaleio_rest_server_password = <rest gateway password>
    scaleio_verify_server_certificate = True or False
    scaleio_server_certificate_path = <certificate path>

#. Restart the ``cinder-volume`` service.

**Volume type creation and extra specs**

Setup the ``volume-types`` and ``volume-type`` to ``volume-backend``
association:

.. code-block:: console

   $ openstack volume type create "CoprHD High Performance ISCSI"
   $ openstack volume type set "CoprHD High Performance ISCSI" --property CoprHD:VPOOL="High Performance ISCSI"
   $ openstack volume type set "CoprHD High Performance ISCSI" --property volume_backend_name= EMCCoprHDISCSIDriver

   $ openstack volume type create "CoprHD High Performance FC"
   $ openstack volume type set "CoprHD High Performance FC" --property CoprHD:VPOOL="High Performance FC"
   $ openstack volume type set "CoprHD High Performance FC" --property volume_backend_name= EMCCoprHDFCDriver

   $ openstack volume type create "CoprHD performance SIO"
   $ openstack volume type set "CoprHD performance SIO" --property CoprHD:VPOOL="Scaled Perf"
   $ openstack volume type set "CoprHD performance SIO" --property volume_backend_name= EMCCoprHDScaleIODriver

ISCSI driver notes
~~~~~~~~~~~~~~~~~~

* The compute host must be added to the CoprHD along with its ISCSI
  initiator.
* The ISCSI initiator must be associated with IP network on the CoprHD.

FC driver notes
~~~~~~~~~~~~~~~

* The compute host must be attached to a VSAN or fabric discovered
  by CoprHD.
* There is no need to perform any SAN zoning operations. CoprHD will perform
  the necessary operations automatically as part of the provisioning process.

ScaleIO driver notes
~~~~~~~~~~~~~~~~~~~~

* Install the ScaleIO SDC on the compute host.
* The compute host must be added as the SDC to the ScaleIO MDS
  using the below commands::

    /opt/emc/scaleio/sdc/bin/drv_cfg --add_mdm --ip List of MDM IPs
    (starting with primary MDM and separated by comma)
    Example:
    /opt/emc/scaleio/sdc/bin/drv_cfg --add_mdm --ip
    10.247.78.45,10.247.78.46,10.247.78.47

This step has to be repeated whenever the SDC (compute host in this case)
is rebooted.

Consistency group configuration
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

To enable the support of consistency group and consistency group snapshot
operations, use a text editor to edit the file ``/etc/cinder/policy.json`` and
change the values of the below fields as specified. Upon editing the file,
restart the ``c-api`` service::

  "consistencygroup:create" : "",
  "consistencygroup:delete": "",
  "consistencygroup:get": "",
  "consistencygroup:get_all": "",
  "consistencygroup:update": "",
  "consistencygroup:create_cgsnapshot" : "",
  "consistencygroup:delete_cgsnapshot": "",
  "consistencygroup:get_cgsnapshot": "",
  "consistencygroup:get_all_cgsnapshots": "",

Names of resources in back-end storage
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

All the resources like volume, consistency group, snapshot, and consistency
group snapshot will use the display name in OpenStack for naming in the
back-end storage.


text:
import { module, test } from 'qunit';
import Ember from 'ember';
import sortBy from 'ember-computed-sortby';

const { set, isArray } = Ember;

module('sortBy', {
  beforeEach() {
    this.obj = Ember.Object.extend({
      sortedFnameUsers: sortBy('users', 'fname'),
      sortedLnameUsers: sortBy('users', 'lname:desc'),
      sortedLnameUsers2: sortBy('users', 'lname:asc'),
      lnameThenOldest: sortBy('users', 'lname:desc', 'age')
    }).create({
      users: Ember.A([
        { fname: 'Jaime',  lname: 'Lannister', age: 34 },
        { fname: 'Robb',   lname: 'Stark',     age: 16 },
        { fname: 'Cersei', lname: 'Lannister', age: 32 },
        { fname: 'Bran',   lname: 'Stark',     age:  8 }
      ])
    });
  },
  afterEach() {
    Ember.run(this.obj, 'destroy');
  }
});

test('Single sort string property defaults to asc', function(assert) {
  assert.deepEqual(this.obj.get('sortedFnameUsers').mapBy('fname'), ['Bran', 'Cersei', 'Jaime', 'Robb'], 'list is sorted correctly');

  this.obj.set('users.firstObject.fname', 'Tyrion');

  assert.deepEqual(this.obj.get('sortedFnameUsers').mapBy('fname'), ['Bran', 'Cersei', 'Robb', 'Tyrion'], 'updating sort property resorts the list');
});

test('Single sort string property works with desc', function(assert) {
  assert.deepEqual(this.obj.get('sortedLnameUsers').mapBy('lname'), ['Stark', 'Stark', 'Lannister', 'Lannister'], 'list is sorted correctly');

  this.obj.set('users.lastObject.lname', 'Baratheon');

  assert.deepEqual(this.obj.get('sortedLnameUsers').mapBy('lname'), ['Stark', 'Lannister', 'Lannister', 'Baratheon'], 'updating sort property resorts the list');
});

test('Single valued array property', function(assert) {
  assert.deepEqual(this.obj.get('sortedLnameUsers2').mapBy('lname'), ['Lannister', 'Lannister', 'Stark', 'Stark'], 'list is sorted correctly');

  this.obj.set('users.firstObject.lname', 'Baratheon');

  assert.deepEqual(this.obj.get('sortedLnameUsers2').mapBy('lname'), ['Baratheon', 'Lannister', 'Stark', 'Stark'], 'updating sort property resorts the list');
});

test('Multi valued array property', function(assert) {
  assert.deepEqual(this.obj.get('lnameThenOldest').mapBy('fname'), ['Bran', 'Robb', 'Cersei', 'Jaime'], 'list is sorted correctly');

  var jamie = this.obj.get('users').objectAt(0);
  set(jamie, 'age', 26);

  assert.deepEqual(this.obj.get('lnameThenOldest').mapBy('fname'), ['Bran', 'Robb', 'Jaime', 'Cersei'], 'updating the secondary sort property resorts list');

  var robb = this.obj.get('users').objectAt(1);
  set(robb, 'lname', 'Baratheon');

  assert.deepEqual(this.obj.get('lnameThenOldest').mapBy('fname'), ['Bran', 'Jaime', 'Cersei', 'Robb'], 'updating the primary sort property resorts list');
});

test('Add / Remove items from the sorted array', function(assert) {
  assert.deepEqual(this.obj.get('sortedFnameUsers').mapBy('fname'), ['Bran', 'Cersei', 'Jaime', 'Robb'], 'list is sorted correctly');
  assert.deepEqual(this.obj.get('lnameThenOldest').mapBy('fname'), ['Bran', 'Robb', 'Cersei', 'Jaime'], 'list is sorted correctly');

  this.obj.get('users').pushObject({ fname: 'Joffrey', lname: 'Baratheon', age: 15 });
  this.obj.get('users').pushObject({ fname: 'Ned', lname: 'Stark', age: 54 });

  assert.deepEqual(this.obj.get('sortedFnameUsers').mapBy('fname'), ['Bran', 'Cersei', 'Jaime', 'Joffrey', 'Ned', 'Robb'], 'adding items to the list should have trigger resort');
  assert.deepEqual(this.obj.get('lnameThenOldest').mapBy('fname'), ['Bran', 'Robb', 'Ned', 'Cersei', 'Jaime', 'Joffrey'], 'adding items to the list should have trigger resort');

  this.obj.get('users').removeAt(1);
  this.obj.get('users').removeAt(1);

  assert.deepEqual(this.obj.get('sortedFnameUsers').mapBy('fname'), ['Bran', 'Jaime', 'Joffrey', 'Ned'], 'removing items to the list should have trigger resort');
  assert.deepEqual(this.obj.get('lnameThenOldest').mapBy('fname'), ['Bran', 'Ned', 'Jaime', 'Joffrey'], 'removing items to the list should have trigger resort');
});

test('Change the entire sorted array', function(assert) {
  assert.deepEqual(this.obj.get('sortedFnameUsers').mapBy('fname'), ['Bran', 'Cersei', 'Jaime', 'Robb'], 'list is sorted correctly');

  this.obj.set('users', [
    { fname: 'Daenerys', lname: 'Targaryen', age: 23 },
    { fname: 'Margaery', lname: 'Tyrell',    age:  25 },
    { fname: 'Jon',      lname: 'Snow',      age: 28 }
  ]);

  assert.deepEqual(this.obj.get('sortedFnameUsers').mapBy('fname'), ['Daenerys', 'Jon', 'Margaery'], 'list should resort after being completely swapped');
});

test('Check null and empty sorting array', function(assert) {
  this.obj.set('users', []);
  var sortedList = this.obj.get('sortedFnameUsers');
  assert.ok((isArray(sortedList) && sortedList.length === 0), 'an empty items list should return an empty array');

  this.obj.set('users', null);
  sortedList = this.obj.get('sortedFnameUsers');
  assert.ok((isArray(sortedList) && sortedList.length === 0), 'a null list should return an empty array');
});

test('Bad args', function(assert) {
  assert.throws(function() {
    Ember.Object.extend({
      sortedUsers: sortBy('users')
    }).create().get('sortedUsers');
  }, 'Asserted when second argument was missing.');

  assert.throws(function() {
    Ember.Object.extend({
      sortedUsers: sortBy('users', function() {})
    }).create().get('sortedUsers');
  }, 'Asserted when second argument was incorrect.');

  assert.throws(function() {
    Ember.Object.extend({
      sortedUsers: sortBy('users', {})
    }).create().get('sortedUsers');
  }, 'Asserted when second argument was incorrect.');

  assert.throws(function() {
    Ember.Object.extend({
      sortedUsers: sortBy('users', [])
    }).create().get('sortedUsers');
  }, 'Asserted when second argument was incorrect.');

  assert.throws(function() {
    Ember.Object.extend({
      sortedUsers: sortBy('users', ['fname'])
    }).create().get('sortedUsers');
  }, 'Asserted when second argument was incorrect.');
});

test('Setting sortBy property', function(assert) {
  assert.throws(function() {
    this.obj.set('sortedFnameUsers', Ember.A([]));
  }, 'Asserted when trying set read-only list.');
});


text:
window.addEvent("domready", function () {
    // Option 1: Use the manifest:
    new FancySettings.initWithManifest(function (settings) {
        settings.manifest.location_local_location.element.addEvent("change", function(){
            chrome.runtime.sendMessage({event:'location',type:'location_local_location'});
        });
        settings.manifest.location_imgur_pages.element.addEvent("change", function(){
            chrome.runtime.sendMessage({event:'location',type:'location_imgur_pages'});
        });
        settings.manifest.location_imgur_preset.addEvent("action", function(){
            if(!settings.manifest.location_local_location.element.value.length)
                chrome.runtime.sendMessage({event:'location',type:'location_imgur_preset'});
        });
        settings.manifest.location_imgur_location.element.addEvent("change", function(e){
            if(!settings.manifest.location_local_location.element.value.length)
                chrome.runtime.sendMessage({event:'location',type:'location_imgur_location'});
        });

        settings.manifest.timing_status.element.addEvent("change", function(){
            chrome.runtime.sendMessage({event:'timing',type:'timing_status'});
        });
        settings.manifest.timing_random.element.addEvent("change",function() {
            chrome.runtime.sendMessage({event: 'timing', type: 'timing_random'});
        });
        settings.manifest.timing_swap.element.addEvent("change", function(){
            chrome.runtime.sendMessage({event:'timing',type:'timing_swap'});
        });
    });
});