text:
<?xml version="1.0" encoding="utf-8"?>
<!--
  ~ AndroidManifest.xml
  ~
  ~ Copyright (c) 2015 Auth0 (http://auth0.com)
  ~
  ~ Permission is hereby granted, free of charge, to any person obtaining a copy
  ~ of this software and associated documentation files (the "Software"), to deal
  ~ in the Software without restriction, including without limitation the rights
  ~ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
  ~ copies of the Software, and to permit persons to whom the Software is
  ~ furnished to do so, subject to the following conditions:
  ~
  ~ The above copyright notice and this permission notice shall be included in
  ~ all copies or substantial portions of the Software.
  ~
  ~ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  ~ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  ~ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
  ~ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  ~ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
  ~ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
  ~ THE SOFTWARE.
-->
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.auth0.sample" >

    <uses-permission android:name="android.permission.INTERNET"/>

    <application
        android:name=".SampleApplication"
        android:allowBackup="true"
        android:icon="@drawable/ic_launcher"
        android:label="@string/app_name"
        android:theme="@style/AppTheme" >
        <activity
            android:name=".MainActivity"
            android:label="@string/app_name" >
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />

                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>

        <!-- Auth0 Lock -->
        <activity
            android:name="com.auth0.lock.LockActivity"
            android:label="@string/app_name"
            android:launchMode="singleTask"
            android:screenOrientation="portrait"
            android:theme="@style/Lock.Theme" >
            <intent-filter>
                <action android:name="android.intent.action.VIEW" />

                <category android:name="android.intent.category.DEFAULT" />
                <category android:name="android.intent.category.BROWSABLE" />

                <data
                    android:host="@string/auth0_domain"
                    android:scheme="@string/auth0_scheme" />
            </intent-filter>
        </activity>

        <meta-data
            android:name="com.auth0.lock.client-id"
            android:value="@string/auth0_client_id" />
        <meta-data
            android:name="com.auth0.lock.domain-url"
            android:value="@string/auth0_domain" />
        <!-- Auth0 Lock End -->

        <!-- Facebook Native -->
        <!-- <activity android:name="com.facebook.LoginActivity" /> -->
        <activity android:name="com.facebook.FacebookActivity"
          android:configChanges=
                 "keyboard|keyboardHidden|screenLayout|screenSize|orientation"
          android:theme="@android:style/Theme.Translucent.NoTitleBar"
          android:label="@string/app_name" />

        <meta-data
            android:name="com.facebook.sdk.ApplicationId"
            android:value="@string/facebook_app_id" />
        <!-- Facebook Native End -->

        <activity
            android:name=".ProfileActivity"
            android:label="@string/app_name" >
        </activity>
    </application>

</manifest>


text:
#import "NSObject.h"

@class NSFileHandle, NSMutableData, NSMutableDictionary, NSString;

@interface XCRecruiterConnection : NSObject
{
    NSFileHandle *_fileHandle;
    NSString *_socketPath;
    NSMutableData *_buf;
    NSMutableDictionary *_requests;
    BOOL _ephemeral;
    BOOL _connecting;
    int _sockFD;
    struct sockaddr_un _un_addr;
}

- (void)createAndSendMessage:(id)arg1 withContentDictionary:(id)arg2;
- (void)sendMessage:(id)arg1;
- (void)handleRecruiterMessage:(id)arg1;
- (void)dataAvailable:(id)arg1;
- (void)closeConnection;
- (void)checkIn;
- (BOOL)connected;
- (int)connect;
- (int)fileDescriptor;
- (void)setEphemeral:(BOOL)arg1;
- (BOOL)ephemeral;
- (void)dealloc;
- (id)init;

@end

redpajama_set_name: RedPajamaGithub


text:
import { DisableRawTransaction } from '../../src/Commands'
import { TestCommand } from '../test-helpers'

describe('/DisableRawTransaction', function() {
  it(
    'DisableRawTransaction() should return a properly configured JSON-RPC request',
    function() {
      const transaction = 'transaction'

      // Signature 1: [string]
      TestCommand(
        DisableRawTransaction(transaction),
        DisableRawTransaction,
        [transaction],
      )
    },
  )
})


text:
package fr.univnantes.termsuite.eval.exceptions;

public class DictionaryNotFoundException extends Exception {
	/**
	 *
	 */
	private static final long serialVersionUID = 1L;
	private String path;

	public DictionaryNotFoundException(String path) {
		super("Could not find dictionary: " + path);
		this.path = path;
	}

	public String getPath() {
		return path;
	}
}


text:
package org.apache.ignite.services;

import java.io.Serializable;
import java.util.concurrent.Callable;
import org.apache.ignite.lang.IgniteExperimental;

/**
 * Service call interceptor.
 *

 * Allows the user to intercept the call to any service method except lifecycle methods
 * ({@link Service#init init()}, {@link Service#execute() execute()} and {@link Service#cancel() cancel()}).
 *

 * A typical use of an interceptor is a middleware logic that applies to all custom methods in a service.
 * The user can specify multiple interceptors in the {@link ServiceConfiguration service configuration}.
 * Each interceptor invokes the next interceptor in the chain using a delegated call, the last interceptor
 * will call the service method.
 *

 * Usage example:
 *

 * ServiceCallInterceptor security = (mtd, args, ctx, svcCall) -> {
 *     if (!CustomSecurityProvider.get().access(mtd, ctx.currentCallContext().attribute("sessionId")))
 *         throw new SecurityException("Method invocation is not permitted");
 *
 *     // Execute remaining interceptors and service method.
 *     return svcCall.call();
 * };
 *
 * ServiceCallInterceptor audit = (mtd, args, ctx, svcCall) -> {
 *     String sessionId = ctx.currentCallContext().attribute("sessionId");
 *     AuditProvider prov = AuditProvider.get();
 *
 *     // Record an event before execution of the method.
 *     prov.recordStartEvent(ctx.name(), mtd, sessionId);
 *
 *     try {
 *         // Execute service method.
 *         return svcCall.call();
 *     }
 *     catch (Exception e) {
 *         // Record error.
 *         prov.recordError(ctx.name(), mtd, sessionId), e.getMessage());
 *
 *         // Re-throw exception to initiator.
 *         throw e;
 *     }
 *     finally {
 *         // Record finish event after execution of the service method.
 *         prov.recordFinishEvent(ctx.name(), mtd, sessionId);
 *     }
 * }
 *
 * ServiceConfiguration svcCfg = new ServiceConfiguration()
 *     .setName("service")
 *     .setService(new MyServiceImpl())
 *     .setMaxPerNodeCount(1)
 *     .setInterceptors(audit, security);
 *
 * // Deploy service.
 * ignite.services().deploy(svcCfg);
 *
 * // Set context parameters for the service proxy.
 * ServiceCallContext callCtx = ServiceCallContext.builder().put("sessionId", sessionId).build();
 *
 * // Make a service proxy with the call context to define the "sessionId" attribute.
 * MyService proxy = ignite.services().serviceProxy("service", MyService.class, false, callCtx, 0);
 *
 * // Service method call will be intercepted.
 * proxy.placeOrder(order1);
 * proxy.placeOrder(order2);
 *

 *
 * @see ServiceCallContext
 * @see ServiceContext
 */
@IgniteExperimental
public interface ServiceCallInterceptor extends Serializable {
    /**
     * Intercepts delegated service call.
     *
     * @param mtd Method name.
     * @param args Method arguments.
     * @param ctx Service context.
     * @param next Delegated call to a service method and/or interceptor in the chain.
     * @return Service call result.
     */
    public Object invoke(String mtd, Object[] args, ServiceContext ctx, Callable<Object> next) throws Exception;
}


text:
<?php
namespace Concrete\Core\Database\Connection;

use Concrete\Core\Application\Application;
use Concrete\Core\Database\Driver\DriverManager;
use Doctrine\DBAL\DBALException;

class ConnectionFactory
{
    /** @var Application */
    protected $app;

    /** @var DriverManager */
    protected $driver_manager;

    public function __construct(Application $app, DriverManager $driver_manager)
    {
        $this->app = $app;
        $this->driver_manager = $driver_manager;
    }

    public function createConnection($config)
    {
        $driver = $this->driver_manager->driver(array_get($config, 'driver', ''));

        if (!($driver instanceof \Doctrine\DBAL\Driver)) {
            $driver = $this->driver_manager->driver();
        }

        $params = $config;
        $params['host'] = array_get($params, 'host', array_get($config, 'server'));
        $params['user'] = array_get($params, 'user', array_get($config, 'username'));
        $params['wrapperClass'] = array_get($config, 'wrapperClass', '\Concrete\Core\Database\Connection\Connection');
        unset($params['driver']);

        $wrapperClass = 'Doctrine\DBAL\Connection';
        if (isset($params['wrapperClass'])) {
            if (is_subclass_of($params['wrapperClass'], $wrapperClass)) {
                $wrapperClass = $params['wrapperClass'];
            } else {
                throw DBALException::invalidWrapperClass($params['wrapperClass']);
            }
        }

        return new $wrapperClass($params, $driver);
    }

    /**
     * @param $config
     * @param $name
     *
     * @return \Doctrine\DBAL\Connection
     *
     * @throws DBALException
     */
    public function make($config, $name)
    {
        return $this->createConnection($config);
    }

    /**
     * @return DriverManager
     */
    public function getDriverManager()
    {
        return $this->driver_manager;
    }
}


text:
package org.twuni.money.exchange.util;

import java.math.BigInteger;
import java.security.InvalidKeyException;
import java.security.NoSuchAlgorithmException;

import javax.crypto.Mac;
import javax.crypto.SecretKey;
import javax.crypto.spec.SecretKeySpec;

public class EncryptionUtils {

	public static String getEncryptedHexString( String message, String secret, String algorithm ) throws NoSuchAlgorithmException, InvalidKeyException {
		SecretKey key = new SecretKeySpec( secret.getBytes(), algorithm );
		Mac mac = Mac.getInstance( algorithm );
		mac.init( key );
		return new BigInteger( mac.doFinal( message.toString().getBytes() ) ).toString( 16 );
	}

}


text:
// Copyright 2008 Google Inc. All Rights Reserved.
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <time.h>
#include <arpa/inet.h>
#include "copyrt.h"
#include "rfc_uuid.h"

#ifdef __cplusplus
extern "C" {
#endif

const char* kStateFile = "/tmp/gdl/u1";

/* various forward declarations */
static int read_state(unsigned16 *clockseq, uuid_time_t *timestamp,
    uuid_node_t *node);
static void write_state(unsigned16 clockseq, uuid_time_t timestamp,
    uuid_node_t node);
static void format_uuid_v1(uuid_t *uuid, unsigned16 clockseq,
    uuid_time_t timestamp, uuid_node_t node);
static void get_current_time(uuid_time_t *timestamp);
static unsigned16 true_random(void);

/* uuid_create -- generator a UUID */
int uuid_create(uuid_t *uuid)
{
     uuid_time_t timestamp, last_time;
     unsigned16 clockseq;
     uuid_node_t node;
     uuid_node_t last_node;
     int f;

     /* acquire system-wide lock so we're alone */
     LOCK;
     /* get time, node ID, saved state from non-volatile storage */
     get_current_time(&timestamp);
     get_ieee_node_identifier(&node);
     f = read_state(&clockseq, &last_time, &last_node);

     /* if no NV state, or if clock went backwards, or node ID
        changed (e.g., new network card) change clockseq */
     if (!f || memcmp(&node, &last_node, sizeof node))
         clockseq = true_random();
     else if (timestamp < last_time)
         clockseq++;

     /* save the state for next time */
     write_state(clockseq, timestamp, node);

     UNLOCK;

     /* stuff fields into the UUID */
     format_uuid_v1(uuid, clockseq, timestamp, node);
     return 1;
}

/* format_uuid_v1 -- make a UUID from the timestamp, clockseq,
                     and node ID */
void format_uuid_v1(uuid_t* uuid, unsigned16 clock_seq,
                    uuid_time_t timestamp, uuid_node_t node)
{
    /* Construct a version 1 uuid with the information we've gathered
       plus a few constants. */
    uuid->time_low = (unsigned long)(timestamp & 0xFFFFFFFF);
    uuid->time_mid = (unsigned short)((timestamp >> 32) & 0xFFFF);
    uuid->time_hi_and_version =
        (unsigned short)((timestamp >> 48) & 0x0FFF);
    uuid->time_hi_and_version |= (1 << 12);
    uuid->clock_seq_low = clock_seq & 0xFF;
    uuid->clock_seq_hi_and_reserved = (clock_seq & 0x3F00) >> 8;
    uuid->clock_seq_hi_and_reserved |= 0x80;
    memcpy(&uuid->node, &node, sizeof uuid->node);
}

/* data type for UUID generator persistent state */
typedef struct {
    uuid_time_t  ts;       /* saved timestamp */
    uuid_node_t  node;     /* saved node ID */
    unsigned16   cs;       /* saved clock sequence */
} uuid_state;

static uuid_state st;

/* read_state -- read UUID generator state from non-volatile store */
int read_state(unsigned16 *clockseq, uuid_time_t *timestamp,
               uuid_node_t *node)
{
    static int inited = 0;
    FILE *fp;

    /* only need to read state once per boot */
    if (!inited) {
        fp = fopen(kStateFile, "rb");
        if (fp == NULL)
          return 0;
        if (fread(&st, sizeof st, 1, fp) < sizeof st) {
          fclose(fp);
          return 0;
        }
        fclose(fp);
        inited = 1;
    }
    *clockseq = st.cs;
    *timestamp = st.ts;
    *node = st.node;
    return 1;
}

/* write_state -- save UUID generator state back to non-volatile
   storage */
void write_state(unsigned16 clockseq, uuid_time_t timestamp,
                 uuid_node_t node)
{
    static int inited = 0;
    static uuid_time_t next_save;
    FILE* fp;

    if (!inited) {
        next_save = timestamp;
        inited = 1;
    }

    /* always save state to volatile shared state */
    st.cs = clockseq;
    st.ts = timestamp;
    st.node = node;
    if (timestamp >= next_save) {
        fp = fopen(kStateFile, "wb");
        if (!fp)  return;  // not a very serious error here.
        fwrite(&st, sizeof st, 1, fp);
        fclose(fp);
        /* schedule next save for 10 seconds from now */
        next_save = timestamp + (10 * 10 * 1000 * 1000);
    }
}

/* get-current_time -- get time as 60-bit 100ns ticks since UUID epoch.
   Compensate for the fact that real clock resolution is
   less than 100ns. */
void get_current_time(uuid_time_t *timestamp)
{
    static int inited = 0;
    static uuid_time_t time_last;
    static unsigned16 uuids_this_tick;
    uuid_time_t time_now;

    if (!inited) {
        get_system_time(&time_now);
        uuids_this_tick = UUIDS_PER_TICK;
        inited = 1;
    }

    for ( ; ; ) {
        get_system_time(&time_now);

        /* if clock reading changed since last UUID generated, */
        if (time_last != time_now) {
            /* reset count of uuids gen'd with this clock reading */
            uuids_this_tick = 0;
            time_last = time_now;
            break;
        }
        if (uuids_this_tick < UUIDS_PER_TICK) {
            uuids_this_tick++;
            break;
        }
        /* going too fast for our clock; spin */
    }
    /* add the count of uuids to low order bits of the clock reading */
    *timestamp = time_now + uuids_this_tick;
}

/* true_random -- generate a crypto-quality random number.
   **This sample doesn't do that.** */
static unsigned16 true_random(void)
{
    static int inited = 0;
    uuid_time_t time_now;

    if (!inited) {
        get_system_time(&time_now);
        time_now = time_now / UUIDS_PER_TICK;
        srand((unsigned int)
               (((time_now >> 32) ^ time_now) & 0xffffffff));
        inited = 1;
    }

    return rand();
}

/* uuid_compare --  Compare two UUID's "lexically" and return */
#define CHECK(f1, f2) if (f1 != f2) return f1 < f2 ? -1 : 1;
int uuid_compare(uuid_t *u1, uuid_t *u2)
{
    int i;

    CHECK(u1->time_low, u2->time_low);
    CHECK(u1->time_mid, u2->time_mid);
    CHECK(u1->time_hi_and_version, u2->time_hi_and_version);
    CHECK(u1->clock_seq_hi_and_reserved, u2->clock_seq_hi_and_reserved);
    CHECK(u1->clock_seq_low, u2->clock_seq_low)
    for (i = 0; i < 6; i++) {
        if (u1->node[i] < u2->node[i])
            return -1;
        if (u1->node[i] > u2->node[i])
            return 1;
    }
    return 0;
}
#undef CHECK

#ifdef __cplusplus
}
#endif


text:
from oslo_policy import policy

from senlin.common.policies import base

rules = [
    policy.DocumentedRuleDefault(
        name="profile_types:index",
        check_str=base.UNPROTECTED,
        description="List profile types",
        operations=[
            {
                'path': '/v1/profile-types',
                'method': 'GET'
            }
        ]
    ),
    policy.DocumentedRuleDefault(
        name="profile_types:get",
        check_str=base.UNPROTECTED,
        description="Show profile type details",
        operations=[
            {
                'path': '/v1/profile-types/{profile_type}',
                'method': 'GET'
            }
        ]
    ),
    policy.DocumentedRuleDefault(
        name="profile_types:ops",
        check_str=base.UNPROTECTED,
        description="List profile type operations",
        operations=[
            {
                'path': '/v1/profile-types/{profile_type}/ops',
                'method': 'GET'
            }
        ]
    )
]

def list_rules():
    return rules


text:
@interface DCData_CarInfoObj : HDNetServiceObject
@property (nonatomic, strong) NSString  *info;
@property (nonatomic, strong) NSString  *lat;
@property (nonatomic, strong) NSString  *lon;
@property (nonatomic, strong) NSString  *satellite;
@property (nonatomic, strong) NSString  *oilbox;
@property (nonatomic, strong) NSString  *oilbox_add;
@property (nonatomic, strong) NSString  *oilbox_add2;
@property (nonatomic, strong) NSString  *oilbox_add3;
@property (nonatomic, strong) NSString  *oilbox_add4;
@property (nonatomic, strong) NSString  *oilbox_sum;
@property (nonatomic, strong) NSString  *oilbox_sum_last;
@property (nonatomic, strong) NSString  *vol;
@property (nonatomic, strong) NSString  *tp_indoor;
@property (nonatomic, strong) NSString  *engine_rev;
@property (nonatomic, strong) NSString  *speed;
@property (nonatomic, strong) NSString  *update_time;
@property (nonatomic, strong) NSString  *mpi_oilsum;
@property (nonatomic, strong) NSString  *mpi_milesum;
@property (nonatomic, strong) NSString  *milestone;
@property (nonatomic, strong) NSString  *milestone_surplus;
@property (nonatomic, strong) NSString  *keys_num;

@end

@interface DCData_CarInfoParam : NSObject
@property (nonatomic, assign) NSInteger cid;

@end

@interface DCDataCtrl_CarInfo : HDNetServiceCtrl
@property (nonatomic, strong, readonly) DCData_CarInfoObj      *data;
@property (nonatomic, strong, readonly) DCData_CarInfoParam *param;

@end


text:
cask "plistedplus" do
  version "1.0.72"

  if MacOS.version <= :sierra
    sha256 "2351144dc51d9998e20f62d1a3135c2a2a5bdfb7d0b678aae54c702dca2be850"
    url "https://github.com/ic005k/PlistEDPlus/releases/download/#{version}/PlistEDPlus_Mac10.12.and.below.dmg"
  else
    sha256 "403846519dacb72ecda8a5ea63e0bba6a3ffcc446615f2f539172cb935718986"
    url "https://github.com/ic005k/PlistEDPlus/releases/download/#{version}/PlistEDPlus_Mac.dmg"
  end

  name "PlistEDPlus"
  desc "Plist file editor"
  homepage "https://github.com/ic005k/PlistEDPlus"

  livecheck do
    url :url
    strategy :github_latest
  end

  app "PlistEDPlus.app"

  if MacOS.version <= :sierra
    uninstall quit: "com.yourcompany.PlistEDPlus"
  else
    uninstall quit: "z.PlistEDPlus"
  end

  if MacOS.version <= :sierra
    zap trash: [
      "~/Library/Preferences/com.github-com-ic005k.PlistEdPlus.plist",
      "~/Library/Preferences/com.yourcompany.PlistEDPlus.plist",
      "~/Library/Saved Application State/com.yourcompany.PlistEDPlus.savedState",
    ]
  else
    zap trash: [
      "~/Library/Preferences/z.PlistEDPlus.plist",
      "~/Library/Saved Application State/z.PlistEDPlus.savedState",
    ]
  end
end


text:
DROP TABLE IF EXISTS account_movements;
CREATE TABLE account_movements (
  id int(10) unsigned NOT NULL AUTO_INCREMENT,
  creation_time datetime NOT NULL,
  my_iban varchar(34) NOT NULL,
  my_bic varchar(11) NOT NULL,
  my_accountnumber bigint(10) unsigned NOT NULL,
  my_bankcode int(8) unsigned NOT NULL,
  booking_date date NOT NULL,
  value_date date NOT NULL,
  invoice_timestamp timestamp NULL DEFAULT NULL,
  other_iban varchar(34) DEFAULT NULL,
  other_bic varchar(11) DEFAULT NULL,
  other_accountnumber bigint(10) unsigned DEFAULT NULL,
  other_bankcode int(8) unsigned DEFAULT NULL,
  other_name varchar(54) DEFAULT NULL,
  charge_value decimal(15,2) DEFAULT NULL,
  charge_currency varchar(3) DEFAULT NULL,
  original_value decimal(15,2) DEFAULT NULL,
  original_currency varchar(3) DEFAULT NULL,
  movement_value decimal(15,2) NOT NULL,
  movement_currency varchar(3) NOT NULL,
  movement_reason text,
  movement_type_code int(3) NOT NULL,
  movement_type_text varchar(31) DEFAULT NULL,
  customer_reference varchar(16) NOT NULL,
  bank_reference varchar(16) DEFAULT NULL,
  cancellation int(1) unsigned NOT NULL,
  additional_information varchar(512) DEFAULT NULL,
  additional_key int(3) DEFAULT NULL,
  prima_nota varchar(16) DEFAULT NULL,
  balance_date date NOT NULL,
  balance_value decimal(15,2) NOT NULL,
  balance_currency varchar(3) NOT NULL,
  PRIMARY KEY (account_movement_id),
  UNIQUE KEY hbci_i_03 (my_iban,my_bic,my_accountnumber,my_bankcode,booking_date,value_date,movement_value,movement_currency,movement_type_code,customer_reference,cancellation,balance_date,balance_value,balance_currency)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Table structure for table `balance_monthly`
--

DROP TABLE IF EXISTS balance_monthly;
CREATE TABLE balance_monthly (
  id int(10) unsigned NOT NULL AUTO_INCREMENT,
  my_iban varchar(34) NOT NULL,
  my_bic varchar(11) NOT NULL,
  my_accountnumber bigint(10) unsigned NOT NULL,
  my_bankcode int(8) unsigned NOT NULL,
  balance_year year(4) NOT NULL,
  balance_month tinyint(4) unsigned NOT NULL,
  balance_value decimal(10,2) NOT NULL,
  balance_currency varchar(3) NOT NULL,
  PRIMARY KEY (id),
  UNIQUE KEY hbci_i_02 (my_iban,my_bic,my_accountnumber,my_bankcode,balance_year,balance_month)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Table structure for table `balance_daily`
--

DROP TABLE IF EXISTS balance_daily;
CREATE TABLE balance_daily (
  id int(10) unsigned NOT NULL AUTO_INCREMENT,
  my_iban varchar(34) NOT NULL,
  my_bic varchar(11) NOT NULL,
  my_accountnumber bigint(10) unsigned NOT NULL,
  my_bankcode int(8) unsigned NOT NULL,
  balance_date date NOT NULL,
  last_transaction_date timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  balance_available_value decimal(10,2) NOT NULL,
  line_of_credit_value decimal(10,2) NOT NULL,
  balance_currency varchar(3) NOT NULL,
  last_balance_update timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (id),
  UNIQUE KEY hbci_i_04 (my_iban,my_bic,my_accountnumber,my_bankcode,balance_date)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

-- Dump completed on 2015-09-23 21:52:34


text:
package cpanel

import (
	"encoding/json"

	"github.com/letsencrypt-cpanel/cpanelgo"
)

const (
	ParkedStatusNotRedirected = "not redirected"
)

type DomainsDataDomain struct {
	Domain       string `json:"domain"`
	Ip           string `json:"ip"`
	DocumentRoot string `json:"documentroot"`
	User         string `json:"user"`
	ServerAlias  string `json:"serveralias"`
	ServerName   string `json:"servername"`
}

type DomainsDataApiResponse struct {
	cpanelgo.BaseUAPIResponse
	Data struct {
		MainDomain    DomainsDataDomain   `json:"main_domain"`
		AddonDomains  []DomainsDataDomain `json:"addon_domains"`
		ParkedDomains []string            `json:"parked_domains"`
		Sub_Domains   []json.RawMessage   `json:"sub_domains"`
		Subdomains    []DomainsDataDomain `json:"-"`
	} `json:"data"`
}

func (dd DomainsDataApiResponse) DataList() []DomainsDataDomain {
	doms := append(dd.Data.AddonDomains, dd.Data.MainDomain)
	doms = append(doms, dd.Data.Subdomains...)
	return doms
}

func (r DomainsDataApiResponse) DomainList() []string {
	out := []string{}
	out = append(out, r.Data.MainDomain.Domain)
	out = append(out, r.Data.ParkedDomains...)
	for _, v := range r.Data.AddonDomains {
		out = append(out, v.Domain)
	}
	for _, v := range r.Data.Subdomains {
		out = append(out, v.Domain)
	}
	return out
}

func (c CpanelApi) DomainsData() (DomainsDataApiResponse, error) {
	var out DomainsDataApiResponse

	err := c.Gateway.UAPI("DomainInfo", "domains_data", cpanelgo.Args{
		"format": "hash",
	}, &out)
	if err == nil {
		err = out.Error()
	}
	if err == nil {
		out.Data.Subdomains = []DomainsDataDomain{}
		for _, v := range out.Data.Sub_Domains {
			dec := DomainsDataDomain{}
			if err := json.Unmarshal(v, &dec); err == nil {
				out.Data.Subdomains = append(out.Data.Subdomains, dec)
			}
		}

	}
	return out, err
}

type SingleDomainDataApiResponse struct {
	Status int `json:"status"`
	Data   struct {
		Domain       string `json:"domain"`
		DocumentRoot string `json:"documentroot"`
	} `json:"data"`
}

func (c CpanelApi) SingleDomainData(domain string) (SingleDomainDataApiResponse, error) {
	var out SingleDomainDataApiResponse

	err := c.Gateway.UAPI("DomainInfo", "single_domain_data", cpanelgo.Args{
		"domain": domain,
	}, &out)

	return out, err
}

type ParkedDomain struct {
	Domain string `json:"domain"`
	Status string `json:"status"`
	Dir    string `json:"dir"`
}

type ListParkedDomainsApiResponse struct {
	cpanelgo.BaseAPI2Response
	Data []ParkedDomain `json:"data"`
}

func (c CpanelApi) ListParkedDomains() (ListParkedDomainsApiResponse, error) {
	var out ListParkedDomainsApiResponse

	err := c.Gateway.API2("Park", "listparkeddomains", cpanelgo.Args{}, &out)

	if err == nil {
		err = out.Error()
	}

	return out, err
}

type WebVhostsListDomainsApiResponse struct {
	cpanelgo.BaseUAPIResponse
	Data []VhostEntry `json:"data"`
}

type VhostEntry struct {
	Domain          string   `json:"domain"`
	VhostName       string   `json:"vhost_name"`
	VhostIsSsl      int      `json:"vhost_is_ssl"`
	ProxySubdomains []string `json:"proxy_subdomains"`
}

// put them into map for easy access
func (vhapi WebVhostsListDomainsApiResponse) GetProxySubdomainsMap() map[string][]string {
	proxyDomainsMap := map[string][]string{}
	for _, vhd := range vhapi.Data {
		if len(vhd.ProxySubdomains) > 0 {
			proxyDomainsMap[vhd.Domain] = vhd.ProxySubdomains
		}
	}
	return proxyDomainsMap
}

func (r WebVhostsListDomainsApiResponse) GetAllProxySubdomains() []string {
	m := map[string]struct{}{}
	for _, d := range r.Data {
		for _, proxy := range d.ProxySubdomains {
			m[proxy] = struct{}{}
		}
	}
	res := []string{}
	for p := range m {
		res = append(res, p)
	}
	return res
}

func (c CpanelApi) WebVhostsListDomains() (WebVhostsListDomainsApiResponse, error) {
	var out WebVhostsListDomainsApiResponse

	err := c.Gateway.UAPI("WebVhosts", "list_domains", cpanelgo.Args{}, &out)

	if err == nil {
		err = out.Error()
	}

	return out, err
}


text:
#ifndef _DECAF_INTERNAL_APRPOOL_H_
#define _DECAF_INTERNAL_APRPOOL_H_

#include <decaf/util/Config.h>

#include <apr_pools.h>

namespace decaf{
namespace internal{

    /**
     * Wraps an APR pool object so that classes in decaf can create a static
     * member for use in static methods where apr function calls that need a pool
     * are made.
     */
    class DECAF_API AprPool {
    private:

        /**
         * Internal APR pool
         */
        mutable apr_pool_t* aprPool;

    private:

        AprPool(const AprPool& pool);
        AprPool& operator=(const AprPool& pool);

    public:

        AprPool();
        virtual ~AprPool();

        /**
         * Gets the internal APR Pool.
         * @returns the internal APR pool
         */
        apr_pool_t* getAprPool() const;

        /**
         * Clears data that was allocated by this pool.  Users should call this
         * after getting the data from the APR functions and copying it to
         * someplace safe.
         */
        void cleanup();

        /**
         * Gets a pointer to the Global APR Pool used for the Application
         * @return pointer to the global APR Pool
         */
        static apr_pool_t* getGlobalPool();

    private:

        /**
         * Allocates the pool if it isn't already allocated.
         */
        void allocatePool() const;

        /**
         * Destroys the pool if it has been allocated.
         */
        void destroyPool();

    };

}}

#endif /*_DECAF_INTERNAL_APRPOOL_H_*/


text:
DFlipFlop::DFlipFlop(std::string name, unsigned int propagationDelay, unsigned int clockPeriod)
    : Component(name, propagationDelay, clockPeriod) {}

State* DFlipFlop::allocateState() {
    return new DFlipFlopState();
}

void DFlipFlop::executeProcess() {
    auto state = static_cast<DFlipFlopState*>(getState());
    while (haveMoreEvents() == true) {
        auto event = getEvent();

        if (auto signalEvent = dynamic_cast<const SignalEvent*>(event)) {
            state->input = signalEvent->getInputValue();
            return;
        }

        if (dynamic_cast<const ClockEvent*>(event)) {
            IntVTime currentTime = dynamic_cast<const IntVTime&>(getSimulationTime());
            IntVTime recvTime = currentTime + propagationDelay;
            if (state->input != state->previousOutput) {
                state->previousOutput = state->input;
                // Send the new output signal to all connected components
                for (auto& it : outputs) {
                    it.first->receiveEvent(new SignalEvent(
                                               getSimulationTime(),
                                               recvTime,
                                               this,
                                               it.first,
                                               it.second,
                                               state->input
                                           ));
                }
            }

            // Schedule another clock tick
            recvTime = currentTime + clockPeriod;
            receiveEvent(new ClockEvent(getSimulationTime(), recvTime, this, this));
            return;
        }
    }
}


text:
1. Install npm dependencies: `yarn install`
2. Install dotnet dependencies: `dotnet restore`
3. Start Fable server and Webpack dev server: `dotnet fable npm-run start`
4. In your browser, open: [http://localhost:8080/](http://localhost:8080/)

Any modification you do to the F# code will be reflected in the web page after saving.


text:
<?php

namespace Guzzle\Tests\Common\Validation;

use Guzzle\Common\Validation\AnyMatch;
use Guzzle\Service\Inspector;

/**
 * @covers Guzzle\Common\Validation\AnyMatch
 */
class AnyMatchTest extends Validation
{
    public function provider()
    {
        $c = 'Guzzle\Common\Validation\AnyMatch';

        if (!class_exists('Guzzle\Service\Inspector')) {
            $this->markTestSkipped('Inspector not present');
        }

        $i = Inspector::getInstance();

        return array(
            array($c, 'a', array('constraints' => 'type:string', 'inspector' => $i), true, null),
            array($c, 'a', array('type:string', 'inspector' => $i), true, null),
            array($c, 'foo', array('constraints' => 'type:string;type:numeric'), true, null),
            array($c, new \stdClass(), array('constraints' => 'type:string;type:numeric', 'inspector' => $i), 'Value type must match one of type:string OR type:numeric', null),
            array($c, 'foo', array('constraints' => 'type:numeric;type:boolean;ip;email', 'inspector' => $i), 'Value type must match one of type:numeric OR type:boolean OR ip OR email', null),
            array($c, 'http://www.example.com', array('constraints' => 'ip;url', 'inspector' => $i), true, null),
            array($c, '192.168.16.148', array('constraints' => 'ip;url', 'inspector' => $i), true, null),
            array($c, 'foo', array('constraints' => 'email;choice:foo,bar;ip;array', 'inspector' => $i), true, null),
            array($c, 'bar', array('constraints' => 'email;choice:foo,bar;ip;array', 'inspector' => $i), true, null),
            array($c, '192.168.16.48', array('constraints' => 'email;choice:foo,bar;ip;array', 'inspector' => $i), true, null),
            array($c, array(), array('constraints' => 'email;choice:foo,bar;ip;array', 'inspector' => $i), true, null),
            array($c, 'michael@awesome.com', array('constraints' => 'email;choice:foo,bar;ip;array', 'inspector' => $i), true, null),
            array($c, new \stdClass(), array('constraints' => 'type:object', 'inspector' => $i), true, null)
        );
    }
}


text:
UCLASS(MinimalAPI)
class UMaterialExpressionConstantBiasScale : public UMaterialExpression
{
	GENERATED_UCLASS_BODY()

	UPROPERTY()
	FExpressionInput Input;

	UPROPERTY(EditAnywhere, Category=MaterialExpressionConstantBiasScale)
	float Bias;

	UPROPERTY(EditAnywhere, Category=MaterialExpressionConstantBiasScale)
	float Scale;

	// Begin UMaterialExpression Interface
	virtual int32 Compile(class FMaterialCompiler* Compiler, int32 OutputIndex, int32 MultiplexIndex) override;
	virtual void GetCaption(TArray<FString>& OutCaptions) const override;
	// End UMaterialExpression Interface
};


text:
  <button type="button"
          class="btn btn-default widget-refresh"
          ng-click="ctrl.refreshSelectedWidget()">
    Refresh
  </button>

    <button type="button"
            class="btn btn-default widget-insert"
            uib-dropdown-toggle>
      Insert

    </button>

        left

        before

        after

        right

  <button type="button" class="btn btn-default widget-clone"
          ng-click="ctrl.cloneWidget()">
    Clone
  </button>
  <button type="button"
          class="btn btn-default widget-move-previous-container"
          ng-click="ctrl.moveWidgetToPreviousContainer()">

  </button>
  <button type="button" class="btn btn-default widget-move-next"
          ng-click="ctrl.moveWidgetToNext()">

  </button>
  <button type="button" class="btn btn-default widget-move-previous"
          ng-click="ctrl.moveWidgetToPrevious()">

  </button>
  <button type="button" class="btn btn-default widget-move-next-container"
          ng-click="ctrl.moveWidgetToNextContainer()">

  </button>
  <button type="button" class="btn btn-default widget-sql-show"
          ng-show="ctrl.dashboardSvc.selectedWidget.model.type == ctrl.dashboardSvc.widgetFactorySvc.widgetTypes.CHART"
          ng-click="ctrl.explorerSvc.viewSql(true)">
    Edit SQL
  </button>
  <button type="button" class="btn btn-default widget-sql-build"
          ng-show="ctrl.dashboardSvc.selectedWidget &&
                   ctrl.dashboardSvc.selectedWidget.model.datasource.custom_query"
          ng-click="ctrl.explorerSvc.restoreBuilder()">
    Use SQL Builder
  </button>
  <button type="button" class="btn btn-default widget-json-show"
          ng-click="ctrl.explorerSvc.editJson()">
    Edit JSON
  </button>
  <button type="button" class="btn btn-default widget-delete"
          ng-click="ctrl.removeSelectedWidget()">Delete</button>


text:
package org.locationtech.geomesa.api;

import com.google.common.collect.Lists;
import com.vividsolutions.jts.geom.Geometry;
import org.opengis.feature.simple.SimpleFeature;
import org.opengis.feature.type.AttributeDescriptor;

import java.util.Date;
import java.util.List;

public class DefaultSimpleFeatureView<T> implements SimpleFeatureView<T> {

    @Override
    public void populate(SimpleFeature f, T t, String id, byte[] payload, Geometry geom, Date dtg) {
        // do nothing
    }

    @Override
    public List<AttributeDescriptor> getExtraAttributes() {
        return Lists.newArrayList();
    }
}


text:
package net.avalara.avatax.rest.client.models;

import net.avalara.avatax.rest.client.enums.*;
import net.avalara.avatax.rest.client.serializer.JsonSerializer;

import java.lang.Override;
import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.Date;
import java.util.HashMap;

/**
 * Encapsulates the result of uploading a file to the resource system
 */
public class ResourceFileUploadResultModel {

    private String message;

    /**
     * Getter for message
     *
     * If the request failed, this contains a description of the error.
     */
    public String getMessage() {
        return this.message;
    }

    /**
     * Setter for message
     *
     * If the request failed, this contains a description of the error.
     */
    public void setMessage(String value) {
        this.message = value;
    }

    private Long resourceFileId;

    /**
     * Getter for resourceFileId
     *
     * If the request succeeded, this is the ID number of the file.
     */
    public Long getResourceFileId() {
        return this.resourceFileId;
    }

    /**
     * Setter for resourceFileId
     *
     * If the request succeeded, this is the ID number of the file.
     */
    public void setResourceFileId(Long value) {
        this.resourceFileId = value;
    }

    private Boolean aaa_success;

    /**
     * Getter for aaa_success
     *
     * True if the upload request succeeded.
     */
    public Boolean getAaa_success() {
        return this.aaa_success;
    }

    /**
     * Setter for aaa_success
     *
     * True if the upload request succeeded.
     */
    public void setAaa_success(Boolean value) {
        this.aaa_success = value;
    }

    /**
     * Returns a JSON string representation of ResourceFileUploadResultModel
     */
    @Override
    public String toString() {
        return JsonSerializer.SerializeObject(this);
    }
}


text:
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
// Code generated by Microsoft (R) AutoRest Code Generator.

package com.azure.resourcemanager.frontdoor;

import com.azure.core.credential.TokenCredential;
import com.azure.core.http.HttpClient;
import com.azure.core.http.HttpPipeline;
import com.azure.core.http.HttpPipelineBuilder;
import com.azure.core.http.policy.AddDatePolicy;
import com.azure.core.http.policy.BearerTokenAuthenticationPolicy;
import com.azure.core.http.policy.HttpLogOptions;
import com.azure.core.http.policy.HttpLoggingPolicy;
import com.azure.core.http.policy.HttpPipelinePolicy;
import com.azure.core.http.policy.HttpPolicyProviders;
import com.azure.core.http.policy.RequestIdPolicy;
import com.azure.core.http.policy.RetryPolicy;
import com.azure.core.http.policy.UserAgentPolicy;
import com.azure.core.management.profile.AzureProfile;
import com.azure.core.util.Configuration;
import com.azure.core.util.logging.ClientLogger;
import com.azure.resourcemanager.frontdoor.fluent.FrontDoorManagementClient;
import com.azure.resourcemanager.frontdoor.implementation.EndpointsImpl;
import com.azure.resourcemanager.frontdoor.implementation.ExperimentsImpl;
import com.azure.resourcemanager.frontdoor.implementation.FrontDoorManagementClientBuilder;
import com.azure.resourcemanager.frontdoor.implementation.FrontDoorNameAvailabilitiesImpl;
import com.azure.resourcemanager.frontdoor.implementation.FrontDoorNameAvailabilityWithSubscriptionsImpl;
import com.azure.resourcemanager.frontdoor.implementation.FrontDoorsImpl;
import com.azure.resourcemanager.frontdoor.implementation.FrontendEndpointsImpl;
import com.azure.resourcemanager.frontdoor.implementation.ManagedRuleSetsImpl;
import com.azure.resourcemanager.frontdoor.implementation.NetworkExperimentProfilesImpl;
import com.azure.resourcemanager.frontdoor.implementation.PoliciesImpl;
import com.azure.resourcemanager.frontdoor.implementation.PreconfiguredEndpointsImpl;
import com.azure.resourcemanager.frontdoor.implementation.ReportsImpl;
import com.azure.resourcemanager.frontdoor.implementation.RulesEnginesImpl;
import com.azure.resourcemanager.frontdoor.models.Endpoints;
import com.azure.resourcemanager.frontdoor.models.Experiments;
import com.azure.resourcemanager.frontdoor.models.FrontDoorNameAvailabilities;
import com.azure.resourcemanager.frontdoor.models.FrontDoorNameAvailabilityWithSubscriptions;
import com.azure.resourcemanager.frontdoor.models.FrontDoors;
import com.azure.resourcemanager.frontdoor.models.FrontendEndpoints;
import com.azure.resourcemanager.frontdoor.models.ManagedRuleSets;
import com.azure.resourcemanager.frontdoor.models.NetworkExperimentProfiles;
import com.azure.resourcemanager.frontdoor.models.Policies;
import com.azure.resourcemanager.frontdoor.models.PreconfiguredEndpoints;
import com.azure.resourcemanager.frontdoor.models.Reports;
import com.azure.resourcemanager.frontdoor.models.RulesEngines;
import java.time.Duration;
import java.time.temporal.ChronoUnit;
import java.util.ArrayList;
import java.util.List;
import java.util.Objects;

/** Entry point to FrontDoorManager. FrontDoor Client. */
public final class FrontDoorManager {
    private NetworkExperimentProfiles networkExperimentProfiles;

    private PreconfiguredEndpoints preconfiguredEndpoints;

    private Experiments experiments;

    private Reports reports;

    private FrontDoorNameAvailabilities frontDoorNameAvailabilities;

    private FrontDoorNameAvailabilityWithSubscriptions frontDoorNameAvailabilityWithSubscriptions;

    private FrontDoors frontDoors;

    private FrontendEndpoints frontendEndpoints;

    private Endpoints endpoints;

    private RulesEngines rulesEngines;

    private Policies policies;

    private ManagedRuleSets managedRuleSets;

    private final FrontDoorManagementClient clientObject;

    private FrontDoorManager(HttpPipeline httpPipeline, AzureProfile profile, Duration defaultPollInterval) {
        Objects.requireNonNull(httpPipeline, "'httpPipeline' cannot be null.");
        Objects.requireNonNull(profile, "'profile' cannot be null.");
        this.clientObject =
            new FrontDoorManagementClientBuilder()
                .pipeline(httpPipeline)
                .endpoint(profile.getEnvironment().getResourceManagerEndpoint())
                .subscriptionId(profile.getSubscriptionId())
                .defaultPollInterval(defaultPollInterval)
                .buildClient();
    }

    /**
     * Creates an instance of FrontDoor service API entry point.
     *
     * @param credential the credential to use.
     * @param profile the Azure profile for client.
     * @return the FrontDoor service API instance.
     */
    public static FrontDoorManager authenticate(TokenCredential credential, AzureProfile profile) {
        Objects.requireNonNull(credential, "'credential' cannot be null.");
        Objects.requireNonNull(profile, "'profile' cannot be null.");
        return configure().authenticate(credential, profile);
    }

    /**
     * Gets a Configurable instance that can be used to create FrontDoorManager with optional configuration.
     *
     * @return the Configurable instance allowing configurations.
     */
    public static Configurable configure() {
        return new FrontDoorManager.Configurable();
    }

    /** The Configurable allowing configurations to be set. */
    public static final class Configurable {
        private final ClientLogger logger = new ClientLogger(Configurable.class);

        private HttpClient httpClient;
        private HttpLogOptions httpLogOptions;
        private final List<HttpPipelinePolicy> policies = new ArrayList<>();
        private RetryPolicy retryPolicy;
        private Duration defaultPollInterval;

        private Configurable() {
        }

        /**
         * Sets the http client.
         *
         * @param httpClient the HTTP client.
         * @return the configurable object itself.
         */
        public Configurable withHttpClient(HttpClient httpClient) {
            this.httpClient = Objects.requireNonNull(httpClient, "'httpClient' cannot be null.");
            return this;
        }

        /**
         * Sets the logging options to the HTTP pipeline.
         *
         * @param httpLogOptions the HTTP log options.
         * @return the configurable object itself.
         */
        public Configurable withLogOptions(HttpLogOptions httpLogOptions) {
            this.httpLogOptions = Objects.requireNonNull(httpLogOptions, "'httpLogOptions' cannot be null.");
            return this;
        }

        /**
         * Adds the pipeline policy to the HTTP pipeline.
         *
         * @param policy the HTTP pipeline policy.
         * @return the configurable object itself.
         */
        public Configurable withPolicy(HttpPipelinePolicy policy) {
            this.policies.add(Objects.requireNonNull(policy, "'policy' cannot be null."));
            return this;
        }

        /**
         * Sets the retry policy to the HTTP pipeline.
         *
         * @param retryPolicy the HTTP pipeline retry policy.
         * @return the configurable object itself.
         */
        public Configurable withRetryPolicy(RetryPolicy retryPolicy) {
            this.retryPolicy = Objects.requireNonNull(retryPolicy, "'retryPolicy' cannot be null.");
            return this;
        }

        /**
         * Sets the default poll interval, used when service does not provide "Retry-After" header.
         *
         * @param defaultPollInterval the default poll interval.
         * @return the configurable object itself.
         */
        public Configurable withDefaultPollInterval(Duration defaultPollInterval) {
            this.defaultPollInterval = Objects.requireNonNull(defaultPollInterval, "'retryPolicy' cannot be null.");
            if (this.defaultPollInterval.isNegative()) {
                throw logger.logExceptionAsError(new IllegalArgumentException("'httpPipeline' cannot be negative"));
            }
            return this;
        }

        /**
         * Creates an instance of FrontDoor service API entry point.
         *
         * @param credential the credential to use.
         * @param profile the Azure profile for client.
         * @return the FrontDoor service API instance.
         */
        public FrontDoorManager authenticate(TokenCredential credential, AzureProfile profile) {
            Objects.requireNonNull(credential, "'credential' cannot be null.");
            Objects.requireNonNull(profile, "'profile' cannot be null.");

            StringBuilder userAgentBuilder = new StringBuilder();
            userAgentBuilder
                .append("azsdk-java")
                .append("-")
                .append("com.azure.resourcemanager.frontdoor")
                .append("/")
                .append("1.0.0-beta.1");
            if (!Configuration.getGlobalConfiguration().get("AZURE_TELEMETRY_DISABLED", false)) {
                userAgentBuilder
                    .append(" (")
                    .append(Configuration.getGlobalConfiguration().get("java.version"))
                    .append("; ")
                    .append(Configuration.getGlobalConfiguration().get("os.name"))
                    .append("; ")
                    .append(Configuration.getGlobalConfiguration().get("os.version"))
                    .append("; auto-generated)");
            } else {
                userAgentBuilder.append(" (auto-generated)");
            }

            if (retryPolicy == null) {
                retryPolicy = new RetryPolicy("Retry-After", ChronoUnit.SECONDS);
            }
            List<HttpPipelinePolicy> policies = new ArrayList<>();
            policies.add(new UserAgentPolicy(userAgentBuilder.toString()));
            policies.add(new RequestIdPolicy());
            HttpPolicyProviders.addBeforeRetryPolicies(policies);
            policies.add(retryPolicy);
            policies.add(new AddDatePolicy());
            policies
                .add(
                    new BearerTokenAuthenticationPolicy(
                        credential, profile.getEnvironment().getManagementEndpoint() + "/.default"));
            policies.addAll(this.policies);
            HttpPolicyProviders.addAfterRetryPolicies(policies);
            policies.add(new HttpLoggingPolicy(httpLogOptions));
            HttpPipeline httpPipeline =
                new HttpPipelineBuilder()
                    .httpClient(httpClient)
                    .policies(policies.toArray(new HttpPipelinePolicy[0]))
                    .build();
            return new FrontDoorManager(httpPipeline, profile, defaultPollInterval);
        }
    }

    /** @return Resource collection API of NetworkExperimentProfiles. */
    public NetworkExperimentProfiles networkExperimentProfiles() {
        if (this.networkExperimentProfiles == null) {
            this.networkExperimentProfiles =
                new NetworkExperimentProfilesImpl(clientObject.getNetworkExperimentProfiles(), this);
        }
        return networkExperimentProfiles;
    }

    /** @return Resource collection API of PreconfiguredEndpoints. */
    public PreconfiguredEndpoints preconfiguredEndpoints() {
        if (this.preconfiguredEndpoints == null) {
            this.preconfiguredEndpoints =
                new PreconfiguredEndpointsImpl(clientObject.getPreconfiguredEndpoints(), this);
        }
        return preconfiguredEndpoints;
    }

    /** @return Resource collection API of Experiments. */
    public Experiments experiments() {
        if (this.experiments == null) {
            this.experiments = new ExperimentsImpl(clientObject.getExperiments(), this);
        }
        return experiments;
    }

    /** @return Resource collection API of Reports. */
    public Reports reports() {
        if (this.reports == null) {
            this.reports = new ReportsImpl(clientObject.getReports(), this);
        }
        return reports;
    }

    /** @return Resource collection API of FrontDoorNameAvailabilities. */
    public FrontDoorNameAvailabilities frontDoorNameAvailabilities() {
        if (this.frontDoorNameAvailabilities == null) {
            this.frontDoorNameAvailabilities =
                new FrontDoorNameAvailabilitiesImpl(clientObject.getFrontDoorNameAvailabilities(), this);
        }
        return frontDoorNameAvailabilities;
    }

    /** @return Resource collection API of FrontDoorNameAvailabilityWithSubscriptions. */
    public FrontDoorNameAvailabilityWithSubscriptions frontDoorNameAvailabilityWithSubscriptions() {
        if (this.frontDoorNameAvailabilityWithSubscriptions == null) {
            this.frontDoorNameAvailabilityWithSubscriptions =
                new FrontDoorNameAvailabilityWithSubscriptionsImpl(
                    clientObject.getFrontDoorNameAvailabilityWithSubscriptions(), this);
        }
        return frontDoorNameAvailabilityWithSubscriptions;
    }

    /** @return Resource collection API of FrontDoors. */
    public FrontDoors frontDoors() {
        if (this.frontDoors == null) {
            this.frontDoors = new FrontDoorsImpl(clientObject.getFrontDoors(), this);
        }
        return frontDoors;
    }

    /** @return Resource collection API of FrontendEndpoints. */
    public FrontendEndpoints frontendEndpoints() {
        if (this.frontendEndpoints == null) {
            this.frontendEndpoints = new FrontendEndpointsImpl(clientObject.getFrontendEndpoints(), this);
        }
        return frontendEndpoints;
    }

    /** @return Resource collection API of Endpoints. */
    public Endpoints endpoints() {
        if (this.endpoints == null) {
            this.endpoints = new EndpointsImpl(clientObject.getEndpoints(), this);
        }
        return endpoints;
    }

    /** @return Resource collection API of RulesEngines. */
    public RulesEngines rulesEngines() {
        if (this.rulesEngines == null) {
            this.rulesEngines = new RulesEnginesImpl(clientObject.getRulesEngines(), this);
        }
        return rulesEngines;
    }

    /** @return Resource collection API of Policies. */
    public Policies policies() {
        if (this.policies == null) {
            this.policies = new PoliciesImpl(clientObject.getPolicies(), this);
        }
        return policies;
    }

    /** @return Resource collection API of ManagedRuleSets. */
    public ManagedRuleSets managedRuleSets() {
        if (this.managedRuleSets == null) {
            this.managedRuleSets = new ManagedRuleSetsImpl(clientObject.getManagedRuleSets(), this);
        }
        return managedRuleSets;
    }

    /**
     * @return Wrapped service client FrontDoorManagementClient providing direct access to the underlying auto-generated
     *     API implementation, based on Azure REST API.
     */
    public FrontDoorManagementClient serviceClient() {
        return this.clientObject;
    }
}


text:
FOUNDATION_EXPORT double RichTextVC_iOSVersionNumber;
FOUNDATION_EXPORT const unsigned char RichTextVC_iOSVersionString[];


text:
#include <aws/ec2/model/RestoreAddressToClassicResponse.h>
#include <aws/core/utils/xml/XmlSerializer.h>
#include <aws/core/AmazonWebServiceResult.h>
#include <aws/core/utils/StringUtils.h>
#include <aws/core/utils/logging/LogMacros.h>

#include <utility>

using namespace Aws::EC2::Model;
using namespace Aws::Utils::Xml;
using namespace Aws::Utils::Logging;
using namespace Aws::Utils;
using namespace Aws;

RestoreAddressToClassicResponse::RestoreAddressToClassicResponse()
{
}

RestoreAddressToClassicResponse::RestoreAddressToClassicResponse(const AmazonWebServiceResult<XmlDocument>& result)
{
  *this = result;
}

RestoreAddressToClassicResponse& RestoreAddressToClassicResponse::operator =(const AmazonWebServiceResult<XmlDocument>& result)
{
  const XmlDocument& xmlDocument = result.GetPayload();
  XmlNode rootNode = xmlDocument.GetRootElement();
  XmlNode resultNode = rootNode;
  if (rootNode.GetName() != "RestoreAddressToClassicResponse")
  {
    resultNode = rootNode.FirstChild("RestoreAddressToClassicResponse");
  }

  if(!resultNode.IsNull())
  {
    XmlNode statusNode = resultNode.FirstChild("status");
    if(!statusNode.IsNull())
    {
      m_status = StatusMapper::GetStatusForName(StringUtils::Trim(statusNode.GetText().c_str()).c_str());
    }
    XmlNode publicIpNode = resultNode.FirstChild("publicIp");
    if(!publicIpNode.IsNull())
    {
      m_publicIp = StringUtils::Trim(publicIpNode.GetText().c_str());
    }
  }

  XmlNode responseMetadataNode = rootNode.FirstChild("ResponseMetadata");
  m_responseMetadata = responseMetadataNode;
  AWS_LOGSTREAM_DEBUG("Aws::EC2::Model::RestoreAddressToClassicResponse", "x-amzn-request-id: " << m_responseMetadata.GetRequestId() );

  return *this;
}


text:
from omics_pipe.parameters.default_parameters import default_parameters
from omics_pipe.utils import *
p = Bunch(default_parameters)

def WES_preprocess(sample, extension, WES_preprocess_flag):
    '''Preprocessing steps for whole exome sequencing.

        input:
        .fastq.gz
        output:
        _realigned_sorted.bam
        citation:
        McKenna A, Hanna M, Banks E, Sivachenko A, Cibulskis K, Kernytsky A, Garimella K, Altshuler D, Gabriel S, Daly M, DePristo MA (2010). The Genome Analysis Toolkit: a MapReduce framework for analyzing next-generation DNA sequencing data. Genome Res. 20:1297-303.
        link:
        http://www.broadinstitute.org/gatk/
        parameters from parameters file:

        TEMP_DIR:

        GENOME:

        BWA_VERSION:

        ABRA_VERSION:

        SAMTOOLS_VERSION:

        SAMBAMBA_VERSION:

        SAMBLASTER_VERSION:

        SAMTOOLS_VERSION:
        '''
    sample = sample + extension
    spawn_job(jobname = 'WES_preprocess', SAMPLE = sample, LOG_PATH = p.OMICSPIPE["LOG_PATH"], RESULTS_EMAIL = p.OMICSPIPE["EMAIL"], SCHEDULER = p.OMICSPIPE["SCHEDULER"], walltime = p.PREPROCESS["WALLTIME"], queue = p.OMICSPIPE["QUEUE"], nodes = p.PREPROCESS["NODES"], ppn = p.PREPROCESS["CPU"], memory = p.PREPROCESS["MEMORY"], script = "/WES_preprocess.sh", args_list = [sample, p.OMICSPIPE["TEMP_DIR"], p.PREPROCESS["GENOME"], p.PREPROCESS["BWA_INDEX"], p.PREPROCESS["BWA_VERSION"], p.PREPROCESS["SAMTOOLS_VERSION"], p.PREPROCESS["SAMBAMBA_VERSION"], p.PREPROCESS["SAMBLASTER_VERSION"], p.PREPROCESS["ABRA_VERSION"], p.CAPTURE_KIT_BED, p.PREPROCESS["ALIGNMENT_DIR"], p.PREPROCESS["FASTQ_PATH"], p.OMICSPIPE["LOG_PATH"], sample])
    job_status(jobname = 'WES_preprocess', resultspath = p.PREPROCESS["ALIGNMENT_DIR"] + "/" + sample, SAMPLE = sample,  outputfilename = sample + "_realigned_sorted.bam", FLAG_PATH = p.OMICSPIPE["FLAG_PATH"])
    return

if __name__ == '__main__':
    WES_preprocess(sample, extension, WES_preprocess_flag)
    sys.exit(0)


text:
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
// Code generated by Microsoft (R) AutoRest Code Generator.

package com.azure.resourcemanager.datafactory.models;

import com.azure.core.annotation.Fluent;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonTypeInfo;
import com.fasterxml.jackson.annotation.JsonTypeName;

/** A copy activity Salesforce source. */
@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type")
@JsonTypeName("SalesforceSource")
@Fluent
public final class SalesforceSource extends TabularSource {
    /*
     * Database query. Type: string (or Expression with resultType string).
     */
    @JsonProperty(value = "query")
    private Object query;

    /*
     * The read behavior for the operation. Default is Query.
     */
    @JsonProperty(value = "readBehavior")
    private SalesforceSourceReadBehavior readBehavior;

    /** Creates an instance of SalesforceSource class. */
    public SalesforceSource() {
    }

    /**
     * Get the query property: Database query. Type: string (or Expression with resultType string).
     *
     * @return the query value.
     */
    public Object query() {
        return this.query;
    }

    /**
     * Set the query property: Database query. Type: string (or Expression with resultType string).
     *
     * @param query the query value to set.
     * @return the SalesforceSource object itself.
     */
    public SalesforceSource withQuery(Object query) {
        this.query = query;
        return this;
    }

    /**
     * Get the readBehavior property: The read behavior for the operation. Default is Query.
     *
     * @return the readBehavior value.
     */
    public SalesforceSourceReadBehavior readBehavior() {
        return this.readBehavior;
    }

    /**
     * Set the readBehavior property: The read behavior for the operation. Default is Query.
     *
     * @param readBehavior the readBehavior value to set.
     * @return the SalesforceSource object itself.
     */
    public SalesforceSource withReadBehavior(SalesforceSourceReadBehavior readBehavior) {
        this.readBehavior = readBehavior;
        return this;
    }

    /** {@inheritDoc} */
    @Override
    public SalesforceSource withQueryTimeout(Object queryTimeout) {
        super.withQueryTimeout(queryTimeout);
        return this;
    }

    /** {@inheritDoc} */
    @Override
    public SalesforceSource withAdditionalColumns(Object additionalColumns) {
        super.withAdditionalColumns(additionalColumns);
        return this;
    }

    /** {@inheritDoc} */
    @Override
    public SalesforceSource withSourceRetryCount(Object sourceRetryCount) {
        super.withSourceRetryCount(sourceRetryCount);
        return this;
    }

    /** {@inheritDoc} */
    @Override
    public SalesforceSource withSourceRetryWait(Object sourceRetryWait) {
        super.withSourceRetryWait(sourceRetryWait);
        return this;
    }

    /** {@inheritDoc} */
    @Override
    public SalesforceSource withMaxConcurrentConnections(Object maxConcurrentConnections) {
        super.withMaxConcurrentConnections(maxConcurrentConnections);
        return this;
    }

    /** {@inheritDoc} */
    @Override
    public SalesforceSource withDisableMetricsCollection(Object disableMetricsCollection) {
        super.withDisableMetricsCollection(disableMetricsCollection);
        return this;
    }

    /**
     * Validates the instance.
     *
     * @throws IllegalArgumentException thrown if the instance is not valid.
     */
    @Override
    public void validate() {
        super.validate();
    }
}


text:
'use strict';

/* global jsondiffpatch */

angular.module('arethusa.review').service('review', [
  'configurator',
  'state',
  '$rootScope',
  'navigator',
  'plugins',
  function (configurator, state, $rootScope, navigator, plugins) {
    var self = this;
    this.name = "review";

    var retriever;
    var doc;

    this.externalDependencies = [
      "bower_components/jsondiffpatch/public/build/jsondiffpatch.min.js"
    ];

    self.goldTokens = {};

    self.defaultConf = {
      link : true,
      contextMenu : true,
      contextMenuTemplate : "js/arethusa.review/templates/context_menu.html"
    };

    function DiffCounts() {
      this.tokens = 0;
      this.attrs  = 0;
    }

    var lazyMorph;
    function morph() {
      if (!lazyMorph) lazyMorph = plugins.get('morph');
      return lazyMorph;
    }

    function configure() {
      configurator.getConfAndDelegate(self, ['hideMode']);
      configurator.getStickyConf(self, ['link', 'autoDiff']);
      self.comparators = [
        'morphology.lemma',
        'morphology.postag',
        'head.id',
        'relation.label'
      ];
      if (self.hideMode) {
        self.contextMenu = false;
        self.autoDiff = false;
        self.link = true;
      }
      var retrievers = configurator.getRetrievers(self.conf.retrievers);
      retriever = retrievers.TreebankRetriever;
      self.diffActive = false;
    }

    function addStyleInfo(tokens) {
      angular.forEach(tokens, function (token, id) {
        var form = token.morphology;
        if (form) {
          morph().postagToAttributes(form);
          token.style = morph().styleOf(form);
        }
      });
    }

    function broadcast() {
      self.diffActive = true;
      $rootScope.$broadcast('diffLoaded');
    }

    self.goToCurrentChunk = function() {
      self.pos = navigator.status.currentPos;
      self.goldTokens = doc[self.pos].tokens;
      addStyleInfo(self.goldTokens);
    };

    function loadDocument() {
      retriever.get(function (res) {
        doc = res;
        postInit(true);
      });
    }

    function extract(obj) {
      return arethusaUtil.inject({}, obj, function(memo, id, token) {
        memo[id] = arethusaUtil.copySelection(token, self.comparators);
      });
    }

    function countDiffs() {
      var dC = self.diffCounts = new DiffCounts();
      angular.forEach(self.diff, function(d) {
        dC.tokens++;
        angular.forEach(d, function(attr) { dC.attrs++; });
      });
    }

    this.compare = function () {
      self.diff = jsondiffpatch.diff(
        extract(state.tokens),
        extract(self.goldTokens)
      );

      countDiffs();

      angular.forEach(self.diff, function (diff, id) {
        state.setState(id, 'diff', diff);
      });
      broadcast();
    };

    function postInit(initialLoad) {
      if (self.link || initialLoad) self.goToCurrentChunk();

      plugins.doAfter('depTree', function() {
        if (self.autoDiff) self.compare();
      });
    }

    this.init = function () {
      configure();

      if (!doc) {
        loadDocument();
      } else {
        postInit();
      }
    };
  }
]);


text:
shared
======

shared types and interfaces for go-on packages


text:
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.

package com.azure.messaging.eventhubs;

import com.azure.core.amqp.AmqpRetryOptions;
import com.azure.core.amqp.exception.AmqpErrorCondition;
import com.azure.core.amqp.exception.AmqpException;
import com.azure.core.amqp.implementation.AmqpConstants;
import com.azure.core.amqp.implementation.AmqpSendLink;
import com.azure.core.amqp.implementation.ErrorContextProvider;
import com.azure.core.amqp.implementation.MessageSerializer;
import com.azure.core.amqp.implementation.StringUtil;
import com.azure.core.amqp.implementation.TracerProvider;
import com.azure.core.annotation.ReturnType;
import com.azure.core.annotation.ServiceClient;
import com.azure.core.annotation.ServiceMethod;
import com.azure.core.util.Context;
import com.azure.core.util.CoreUtils;
import com.azure.core.util.logging.ClientLogger;
import com.azure.core.util.tracing.ProcessKind;
import com.azure.messaging.eventhubs.implementation.EventHubManagementNode;
import com.azure.messaging.eventhubs.models.CreateBatchOptions;
import com.azure.messaging.eventhubs.models.SendOptions;
import org.apache.qpid.proton.amqp.messaging.MessageAnnotations;
import org.apache.qpid.proton.message.Message;
import reactor.core.publisher.Flux;
import reactor.core.publisher.Mono;

import java.io.Closeable;
import java.util.ArrayList;
import java.util.Collections;
import java.util.HashMap;
import java.util.List;
import java.util.Locale;
import java.util.Set;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.atomic.AtomicBoolean;
import java.util.concurrent.atomic.AtomicReference;
import java.util.function.BiConsumer;
import java.util.function.BinaryOperator;
import java.util.function.Function;
import java.util.function.Supplier;
import java.util.stream.Collector;

import static com.azure.core.util.FluxUtil.monoError;
import static com.azure.core.util.tracing.Tracer.ENTITY_PATH_KEY;
import static com.azure.core.util.tracing.Tracer.HOST_NAME_KEY;
import static com.azure.core.util.tracing.Tracer.SPAN_CONTEXT_KEY;
import static com.azure.messaging.eventhubs.implementation.ClientConstants.MAX_MESSAGE_LENGTH_BYTES;

/**
 * An asynchronous producer responsible for transmitting {@link EventData} to a specific Event Hub, grouped
 * together in batches. Depending on the {@link CreateBatchOptions options} specified when creating an
 * {@link EventDataBatch}, the events may be automatically routed to an available partition or specific to a partition.
 *
 *

 * Allowing automatic routing of partitions is recommended when:
 *

 *
The sending of events needs to be highly available.

 *
The event data should be evenly distributed among all available partitions.

 *

 *

 *
 *

 * If no partition id is specified, the following rules are used for automatically selecting one:
 *

 *
Distribute the events equally amongst all available partitions using a round-robin approach.

 *
If a partition becomes unavailable, the Event Hubs service will automatically detect it and forward the
 * message to another available partition.

 *

 *

 *
 *
Create a producer and publish events to any partition

 * {@codesnippet com.azure.messaging.eventhubs.eventhubasyncproducerclient.createBatch}
 *
 *
Publish events to partition "foo"

 * {@codesnippet com.azure.messaging.eventhubs.eventhubasyncproducerclient.createBatch#CreateBatchOptions-partitionId}
 *
 *
Publish events to the same partition, grouped together using partition key

 * {@codesnippet com.azure.messaging.eventhubs.eventhubasyncproducerclient.createBatch#CreateBatchOptions-partitionKey}
 *
 *
Publish events using a size-limited {@link EventDataBatch}

 * {@codesnippet com.azure.messaging.eventhubs.eventhubasyncproducerclient.createBatch#CreateBatchOptions-int}
 *
 * @see EventHubClientBuilder#buildAsyncProducerClient()
 * @see EventHubProducerClient To synchronously generate events to an Event Hub, see EventHubProducerClient.
 */
@ServiceClient(builder = EventHubClientBuilder.class, isAsync = true)
public class EventHubProducerAsyncClient implements Closeable {
    private static final int MAX_PARTITION_KEY_LENGTH = 128;
    private static final String SENDER_ENTITY_PATH_FORMAT = "%s/Partitions/%s";

    private static final SendOptions DEFAULT_SEND_OPTIONS = new SendOptions();
    private static final CreateBatchOptions DEFAULT_BATCH_OPTIONS = new CreateBatchOptions();

    /**
     * Keeps track of the opened send links. Links are key'd by their entityPath. The send link for allowing the service
     * load balance messages is the eventHubName.
     */
    private final ConcurrentHashMap<String, AmqpSendLink> openLinks = new ConcurrentHashMap<>();
    private final ClientLogger logger = new ClientLogger(EventHubProducerAsyncClient.class);
    private final AtomicBoolean isDisposed = new AtomicBoolean();
    private final String fullyQualifiedNamespace;
    private final String eventHubName;
    private final EventHubConnection connection;
    private final AmqpRetryOptions retryOptions;
    private final TracerProvider tracerProvider;
    private final MessageSerializer messageSerializer;
    private final boolean isSharedConnection;

    /**
     * Creates a new instance of this {@link EventHubProducerAsyncClient} that can send messages to a single partition
     * when {@link CreateBatchOptions#getPartitionId()} is not null or an empty string. Otherwise, allows the service to
     * load balance the messages amongst available partitions.
     */
    EventHubProducerAsyncClient(String fullyQualifiedNamespace, String eventHubName, EventHubConnection connection,
        AmqpRetryOptions retryOptions, TracerProvider tracerProvider, MessageSerializer messageSerializer,
        boolean isSharedConnection) {
        this.fullyQualifiedNamespace = fullyQualifiedNamespace;
        this.eventHubName = eventHubName;
        this.connection = connection;
        this.retryOptions = retryOptions;
        this.tracerProvider = tracerProvider;
        this.messageSerializer = messageSerializer;
        this.isSharedConnection = isSharedConnection;
    }

    /**
     * Gets the fully qualified Event Hubs namespace that the connection is associated with. This is likely similar to
     * {@code {yournamespace}.servicebus.windows.net}.
     *
     * @return The fully qualified Event Hubs namespace that the connection is associated with.
     */
    public String getFullyQualifiedNamespace() {
        return fullyQualifiedNamespace;
    }

    /**
     * Gets the Event Hub name this client interacts with.
     *
     * @return The Event Hub name this client interacts with.
     */
    public String getEventHubName() {
        return eventHubName;
    }

    /**
     * Retrieves information about an Event Hub, including the number of partitions present and their identifiers.
     *
     * @return The set of information for the Event Hub that this client is associated with.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    public Mono<EventHubProperties> getEventHubProperties() {
        return connection.getManagementNode().flatMap(EventHubManagementNode::getEventHubProperties);
    }

    /**
     * Retrieves the identifiers for the partitions of an Event Hub.
     *
     * @return A Flux of identifiers for the partitions of an Event Hub.
     */
    public Flux<String> getPartitionIds() {
        return getEventHubProperties().flatMapMany(properties -> Flux.fromIterable(properties.getPartitionIds()));
    }

    /**
     * Retrieves information about a specific partition for an Event Hub, including elements that describe the available
     * events in the partition event stream.
     *
     * @param partitionId The unique identifier of a partition associated with the Event Hub.
     *
     * @return The set of information for the requested partition under the Event Hub this client is associated with.
     *
     * @throws NullPointerException if {@code partitionId} is null.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    public Mono<PartitionProperties> getPartitionProperties(String partitionId) {
        return connection.getManagementNode().flatMap(node -> node.getPartitionProperties(partitionId));
    }

    /**
     * Creates an {@link EventDataBatch} that can fit as many events as the transport allows.
     *
     * @return A new {@link EventDataBatch} that can fit as many events as the transport allows.
     */
    public Mono<EventDataBatch> createBatch() {
        return createBatch(DEFAULT_BATCH_OPTIONS);
    }

    /**
     * Creates an {@link EventDataBatch} configured with the options specified.
     *
     * @param options A set of options used to configure the {@link EventDataBatch}.
     *
     * @return A new {@link EventDataBatch} that can fit as many events as the transport allows.
     *
     * @throws NullPointerException if {@code options} is null.
     */
    public Mono<EventDataBatch> createBatch(CreateBatchOptions options) {
        if (options == null) {
            return monoError(logger, new NullPointerException("'options' cannot be null."));
        }

        final String partitionKey = options.getPartitionKey();
        final String partitionId = options.getPartitionId();
        final int batchMaxSize = options.getMaximumSizeInBytes();

        if (!CoreUtils.isNullOrEmpty(partitionKey)
            && !CoreUtils.isNullOrEmpty(partitionId)) {
            return monoError(logger, new IllegalArgumentException(String.format(Locale.US,
                "CreateBatchOptions.getPartitionKey() and CreateBatchOptions.getPartitionId() are both set. "
                    + "Only one or the other can be used. partitionKey: '%s'. partitionId: '%s'",
                partitionKey, partitionId)));
        } else if (!CoreUtils.isNullOrEmpty(partitionKey)
            && partitionKey.length() > MAX_PARTITION_KEY_LENGTH) {
            return monoError(logger, new IllegalArgumentException(String.format(Locale.US,
                "Partition key '%s' exceeds the maximum allowed length: '%s'.", partitionKey,
                MAX_PARTITION_KEY_LENGTH)));
        }

        return getSendLink(partitionId)
            .flatMap(link -> link.getLinkSize()
                .flatMap(size -> {
                    final int maximumLinkSize = size > 0
                        ? size
                        : MAX_MESSAGE_LENGTH_BYTES;

                    if (batchMaxSize > maximumLinkSize) {
                        return monoError(logger,
                            new IllegalArgumentException(String.format(Locale.US,
                                "BatchOptions.maximumSizeInBytes (%s bytes) is larger than the link size (%s bytes).",
                                batchMaxSize, maximumLinkSize)));
                    }

                    final int batchSize = batchMaxSize > 0
                        ? batchMaxSize
                        : maximumLinkSize;

                    return Mono.just(new EventDataBatch(batchSize, partitionId, partitionKey, link::getErrorContext,
                        tracerProvider));
                }));
    }

    /**
     * Sends a single event to the associated Event Hub. If the size of the single event exceeds the maximum size
     * allowed, an exception will be triggered and the send will fail.
     *
     *

     * For more information regarding the maximum event size allowed, see
     * Azure Event Hubs Quotas and
     * Limits.
     *

     *
     * @param event Event to send to the service.
     *
     * @return A {@link Mono} that completes when the event is pushed to the service.
     */
    Mono<Void> send(EventData event) {
        if (event == null) {
            return monoError(logger, new NullPointerException("'event' cannot be null."));
        }

        return send(Flux.just(event));
    }

    /**
     * Sends a single event to the associated Event Hub with the send options. If the size of the single event exceeds
     * the maximum size allowed, an exception will be triggered and the send will fail.
     *
     *

     * For more information regarding the maximum event size allowed, see
     * Azure Event Hubs Quotas and
     * Limits.
     *

     *
     * @param event Event to send to the service.
     * @param options The set of options to consider when sending this event.
     *
     * @return A {@link Mono} that completes when the event is pushed to the service.
     */
    Mono<Void> send(EventData event, SendOptions options) {
        if (event == null) {
            return monoError(logger, new NullPointerException("'event' cannot be null."));
        } else if (options == null) {
            return monoError(logger, new NullPointerException("'options' cannot be null."));
        }

        return send(Flux.just(event), options);
    }

    /**
     * Sends a set of events to the associated Event Hub using a batched approach. If the size of events exceed the
     * maximum size of a single batch, an exception will be triggered and the send will fail. By default, the message
     * size is the max amount allowed on the link.
     *
     * @param events Events to send to the service.
     *
     * @return A {@link Mono} that completes when all events are pushed to the service.
     */
    Mono<Void> send(Iterable<EventData> events) {
        if (events == null) {
            return monoError(logger, new NullPointerException("'events' cannot be null."));
        }

        return send(Flux.fromIterable(events));
    }

    /**
     * Sends a set of events to the associated Event Hub using a batched approach. If the size of events exceed the
     * maximum size of a single batch, an exception will be triggered and the send will fail. By default, the message
     * size is the max amount allowed on the link.
     *
     * @param events Events to send to the service.
     * @param options The set of options to consider when sending this batch.
     *
     * @return A {@link Mono} that completes when all events are pushed to the service.
     */
    Mono<Void> send(Iterable<EventData> events, SendOptions options) {
        if (events == null) {
            return monoError(logger, new NullPointerException("'events' cannot be null."));
        } else if (options == null) {
            return monoError(logger, new NullPointerException("'options' cannot be null."));
        }

        return send(Flux.fromIterable(events), options);
    }

    /**
     * Sends a set of events to the associated Event Hub using a batched approach. If the size of events exceed the
     * maximum size of a single batch, an exception will be triggered and the send will fail. By default, the message
     * size is the max amount allowed on the link.
     *
     * @param events Events to send to the service.
     *
     * @return A {@link Mono} that completes when all events are pushed to the service.
     */
    Mono<Void> send(Flux<EventData> events) {
        if (events == null) {
            return monoError(logger, new NullPointerException("'events' cannot be null."));
        }

        return send(events, DEFAULT_SEND_OPTIONS);
    }

    /**
     * Sends a set of events to the associated Event Hub using a batched approach. If the size of events exceed the
     * maximum size of a single batch, an exception will be triggered and the send will fail. By default, the message
     * size is the max amount allowed on the link.
     *
     * @param events Events to send to the service.
     * @param options The set of options to consider when sending this batch.
     *
     * @return A {@link Mono} that completes when all events are pushed to the service.
     */
    Mono<Void> send(Flux<EventData> events, SendOptions options) {
        if (events == null) {
            return monoError(logger, new NullPointerException("'events' cannot be null."));
        } else if (options == null) {
            return monoError(logger, new NullPointerException("'options' cannot be null."));
        }

        return sendInternal(events, options);
    }

    /**
     * Sends the batch to the associated Event Hub.
     *
     * @param batch The batch to send to the service.
     *
     * @return A {@link Mono} that completes when the batch is pushed to the service.
     *
     * @throws NullPointerException if {@code batch} is {@code null}.
     * @see EventHubProducerAsyncClient#createBatch()
     * @see EventHubProducerAsyncClient#createBatch(CreateBatchOptions)
     */
    public Mono<Void> send(EventDataBatch batch) {
        if (batch == null) {
            return monoError(logger, new NullPointerException("'batch' cannot be null."));
        } else if (batch.getEvents().isEmpty()) {
            logger.warning(Messages.CANNOT_SEND_EVENT_BATCH_EMPTY);
            return Mono.empty();
        }

        if (!CoreUtils.isNullOrEmpty(batch.getPartitionId())) {
            logger.info("Sending batch with size[{}] to partitionId[{}].", batch.getCount(), batch.getPartitionId());
        } else if (!CoreUtils.isNullOrEmpty(batch.getPartitionKey())) {
            logger.info("Sending batch with size[{}] with partitionKey[{}].",
                batch.getCount(), batch.getPartitionKey());
        } else {
            logger.info("Sending batch with size[{}] to be distributed round-robin in service.", batch.getCount());
        }

        final String partitionKey = batch.getPartitionKey();
        final boolean isTracingEnabled = tracerProvider.isEnabled();
        final AtomicReference<Context> parentContext = isTracingEnabled
            ? new AtomicReference<>(Context.NONE)
            : null;

        Context sharedContext = null;
        List<Message> messages = new ArrayList<>();

        for (int i = 0; i < batch.getEvents().size(); i++) {
            final EventData event = batch.getEvents().get(i);
            if (isTracingEnabled) {
                parentContext.set(event.getContext());
                if (i == 0) {
                    sharedContext = tracerProvider.getSharedSpanBuilder(parentContext.get());
                }
                tracerProvider.addSpanLinks(sharedContext.addData(SPAN_CONTEXT_KEY, event.getContext()));
            }
            final Message message = messageSerializer.serialize(event);

            if (!CoreUtils.isNullOrEmpty(partitionKey)) {
                final MessageAnnotations messageAnnotations = message.getMessageAnnotations() == null
                    ? new MessageAnnotations(new HashMap<>())
                    : message.getMessageAnnotations();
                messageAnnotations.getValue().put(AmqpConstants.PARTITION_KEY, partitionKey);
                message.setMessageAnnotations(messageAnnotations);
            }
            messages.add(message);
        }

        Context finalSharedContext = sharedContext;
        return getSendLink(batch.getPartitionId())
            .flatMap(link -> {
                if (isTracingEnabled) {
                    Context entityContext = finalSharedContext.addData(ENTITY_PATH_KEY, link.getEntityPath());
                    // start send span and store updated context
                    parentContext.set(tracerProvider.startSpan(
                        entityContext.addData(HOST_NAME_KEY, link.getHostname()), ProcessKind.SEND));
                }
                return messages.size() == 1
                    ? link.send(messages.get(0))
                    : link.send(messages);

            }).doOnEach(signal -> {
                if (isTracingEnabled) {
                    tracerProvider.endSpan(parentContext.get(), signal);
                }
            });
    }

    private Mono<Void> sendInternal(Flux<EventData> events, SendOptions options) {
        final String partitionKey = options.getPartitionKey();
        final String partitionId = options.getPartitionId();

        if (!CoreUtils.isNullOrEmpty(partitionKey)
            && !CoreUtils.isNullOrEmpty(partitionId)) {
            return monoError(logger, new IllegalArgumentException(String.format(Locale.US,
                "SendOptions.getPartitionKey() and SendOptions.getPartitionId() are both set. Only one or the"
                    + " other can be used. partitionKey: '%s'. partitionId: '%s'",
                partitionKey, partitionId)));
        }

        return getSendLink(options.getPartitionId())
            .flatMap(link -> link.getLinkSize()
                .flatMap(size -> {
                    final int batchSize = size > 0 ? size : MAX_MESSAGE_LENGTH_BYTES;
                    final CreateBatchOptions batchOptions = new CreateBatchOptions()
                        .setPartitionKey(options.getPartitionKey())
                        .setPartitionId(options.getPartitionId())
                        .setMaximumSizeInBytes(batchSize);
                    return events.collect(new EventDataCollector(batchOptions, 1, link::getErrorContext,
                        tracerProvider));
                })
                .flatMap(list -> sendInternal(Flux.fromIterable(list))));
    }

    private Mono<Void> sendInternal(Flux<EventDataBatch> eventBatches) {
        return eventBatches
            .flatMap(this::send)
            .then()
            .doOnError(error -> {
                logger.error(Messages.ERROR_SENDING_BATCH, error);
            });
    }

    private String getEntityPath(String partitionId) {
        return CoreUtils.isNullOrEmpty(partitionId)
            ? eventHubName
            : String.format(Locale.US, SENDER_ENTITY_PATH_FORMAT, eventHubName, partitionId);
    }

    private String getLinkName(String partitionId) {
        return CoreUtils.isNullOrEmpty(partitionId)
            ? StringUtil.getRandomString("EC")
            : StringUtil.getRandomString("PS");
    }

    private Mono<AmqpSendLink> getSendLink(String partitionId) {
        final String entityPath = getEntityPath(partitionId);
        final AmqpSendLink openLink = openLinks.get(entityPath);

        if (openLink != null) {
            return Mono.just(openLink);
        } else {
            return connection.createSendLink(getLinkName(partitionId), entityPath, retryOptions)
                .map(link -> openLinks.computeIfAbsent(entityPath, unusedKey -> link));
        }
    }

    /**
     * Disposes of the {@link EventHubProducerAsyncClient}. If the client had a dedicated connection, the underlying
     * connection is also closed.
     */
    @Override
    public void close() {
        if (isDisposed.getAndSet(true)) {
            return;
        }

        openLinks.forEach((key, value) -> value.close());
        openLinks.clear();

        if (!isSharedConnection) {
            connection.close();
        }
    }

    /**
     * Collects EventData into EventDataBatch to send to Event Hubs. If {@code maxNumberOfBatches} is {@code null} then
     * it'll collect as many batches as possible. Otherwise, if there are more events than can fit into {@code
     * maxNumberOfBatches}, then the collector throws a {@link AmqpException} with {@link
     * AmqpErrorCondition#LINK_PAYLOAD_SIZE_EXCEEDED}.
     */
    private static class EventDataCollector implements Collector<EventData, List<EventDataBatch>,
        List<EventDataBatch>> {
        private final String partitionKey;
        private final String partitionId;
        private final int maxMessageSize;
        private final Integer maxNumberOfBatches;
        private final ErrorContextProvider contextProvider;
        private final TracerProvider tracerProvider;

        private volatile EventDataBatch currentBatch;

        EventDataCollector(CreateBatchOptions options, Integer maxNumberOfBatches, ErrorContextProvider contextProvider,
            TracerProvider tracerProvider) {
            this.maxNumberOfBatches = maxNumberOfBatches;
            this.maxMessageSize = options.getMaximumSizeInBytes() > 0
                ? options.getMaximumSizeInBytes()
                : MAX_MESSAGE_LENGTH_BYTES;
            this.partitionKey = options.getPartitionKey();
            this.partitionId = options.getPartitionId();
            this.contextProvider = contextProvider;
            this.tracerProvider = tracerProvider;

            currentBatch = new EventDataBatch(maxMessageSize, partitionId, partitionKey, contextProvider,
                tracerProvider);
        }

        @Override
        public Supplier<List<EventDataBatch>> supplier() {
            return ArrayList::new;
        }

        @Override
        public BiConsumer<List<EventDataBatch>, EventData> accumulator() {
            return (list, event) -> {
                EventDataBatch batch = currentBatch;
                if (batch.tryAdd(event)) {
                    return;
                }

                if (maxNumberOfBatches != null && list.size() == maxNumberOfBatches) {
                    final String message = String.format(Locale.US,
                        Messages.EVENT_DATA_DOES_NOT_FIT, maxNumberOfBatches);

                    throw new AmqpException(false, AmqpErrorCondition.LINK_PAYLOAD_SIZE_EXCEEDED, message,
                        contextProvider.getErrorContext());
                }

                currentBatch = new EventDataBatch(maxMessageSize, partitionId, partitionKey, contextProvider,
                    tracerProvider);
                currentBatch.tryAdd(event);
                list.add(batch);
            };
        }

        @Override
        public BinaryOperator<List<EventDataBatch>> combiner() {
            return (existing, another) -> {
                existing.addAll(another);
                return existing;
            };
        }

        @Override
        public Function<List<EventDataBatch>, List<EventDataBatch>> finisher() {
            return list -> {
                EventDataBatch batch = currentBatch;
                currentBatch = null;

                if (batch != null) {
                    list.add(batch);
                }

                return list;
            };
        }

        @Override
        public Set<Characteristics> characteristics() {
            return Collections.emptySet();
        }
    }
}


text:
// Copyright (c) 2009-2010 Satoshi Nakamoto
// Copyright (c) 2009-2013 The OFCCoin developers
// Distributed under the MIT/X11 software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.

#ifndef OFCCoin_CHAIN_PARAMS_H
#define OFCCoin_CHAIN_PARAMS_H

#include "bignum.h"
#include "uint256.h"

#include <vector>

using namespace std;

#define MESSAGE_START_SIZE 4
typedef unsigned char MessageStartChars[MESSAGE_START_SIZE];

class CAddress;
class CBlock;

struct CDNSSeedData {
    string name, host;
    CDNSSeedData(const string &strName, const string &strHost) : name(strName), host(strHost) {}
};

/**
 * CChainParams defines various tweakable parameters of a given instance of the
 * OFCCoin system. There are three: the main network on which people trade goods
 * and services, the public test network which gets reset from time to time and
 * a regression test mode which is intended for private networks only. It has
 * minimal difficulty to ensure that blocks can be found instantly.
 */
class CChainParams
{
public:
    enum Network {
        MAIN,
        TESTNET,
        REGTEST,

        MAX_NETWORK_TYPES
    };

    enum Base58Type {
        PUBKEY_ADDRESS,
        SCRIPT_ADDRESS,
        SECRET_KEY,
        EXT_PUBLIC_KEY,
        EXT_SECRET_KEY,

        MAX_BASE58_TYPES
    };

    const uint256& HashGenesisBlock() const { return hashGenesisBlock; }
    const MessageStartChars& MessageStart() const { return pchMessageStart; }
    const vector<unsigned char>& AlertKey() const { return vAlertPubKey; }
    int GetDefaultPort() const { return nDefaultPort; }
    const CBigNum& ProofOfWorkLimit() const { return bnProofOfWorkLimit; }
    int SubsidyHalvingInterval() const { return nSubsidyHalvingInterval; }
    virtual const CBlock& GenesisBlock() const = 0;
    virtual bool RequireRPCPassword() const { return true; }
    const string& DataDir() const { return strDataDir; }
    virtual Network NetworkID() const = 0;
    const vector<CDNSSeedData>& DNSSeeds() const { return vSeeds; }
    const std::vector<unsigned char> &Base58Prefix(Base58Type type) const { return base58Prefixes[type]; }
    virtual const vector<CAddress>& FixedSeeds() const = 0;
    int RPCPort() const { return nRPCPort; }
protected:
    CChainParams() {}

    uint256 hashGenesisBlock;
    MessageStartChars pchMessageStart;
    // Raw pub key bytes for the broadcast alert signing key.
    vector<unsigned char> vAlertPubKey;
    int nDefaultPort;
    int nRPCPort;
    CBigNum bnProofOfWorkLimit;
    int nSubsidyHalvingInterval;
    string strDataDir;
    vector<CDNSSeedData> vSeeds;
    std::vector<unsigned char> base58Prefixes[MAX_BASE58_TYPES];
};

/**
 * Return the currently selected parameters. This won't change after app startup
 * outside of the unit tests.
 */
const CChainParams &Params();

/** Sets the params returned by Params() to those for the given network. */
void SelectParams(CChainParams::Network network);

/**
 * Looks for -regtest or -testnet and then calls SelectParams as appropriate.
 * Returns false if an invalid combination is given.
 */
bool SelectParamsFromCommandLine();

inline bool TestNet() {
    // Note: it's deliberate that this returns "false" for regression test mode.
    return Params().NetworkID() == CChainParams::TESTNET;
}

inline bool RegTest() {
    return Params().NetworkID() == CChainParams::REGTEST;
}

#endif


text:
package controllers

import (
	"encoding/json"
	"github.com/gorilla/mux"
	"gopkg.in/mgo.v2"
	"gopkg.in/mgo.v2/bson"
	// "log"
	"net/http"
	"restful-api/common"
	"restful-api/data"
)

func CreateTask(w http.ResponseWriter, r *http.Request) {
	var dataResource TaskResource
	err := json.NewDecoder(r.Body).Decode(&dataResource)
	if err != nil {
		common.DisplayAppError(w, err, "invalid task data", 500)
		return
	}
	task := &dataResource.Data
	context := NewContext()
	defer context.Close()

	c := context.DbCollection("tasks")
	repo := &data.TaskRepository{c}
	repo.Create(task)
	if j, err := json.Marshal(TaskResource{Data: *task}); err != nil {
		common.DisplayAppError(w, err, "An Unexpected error has occurred", 500)
		return
	} else {
		w.Header().Set("Content-Type", "appliction/json")
		w.WriteHeader(http.StatusCreated)
		w.Write(j)
	}
}

func GetTasks(w http.ResponseWriter, r *http.Request) {
	context := NewContext()
	defer context.Close()

	c := context.DbCollection("tasks")
	repo := &data.TaskRepository{c}

	tasks := repo.GetAll()
	j, err := json.Marshal(TasksResource{Data: tasks})
	if err != nil {
		common.DisplayAppError(w, err, "An Unexpected error has occurred", 500)
		return
	} else {
		w.Header().Set("Content-Type", "appliction/json")
		w.WriteHeader(http.StatusOK)
		w.Write(j)
	}
}

func GetTaskById(w http.ResponseWriter, r *http.Request) {

	vars := mux.Vars(r)
	id := vars["id"]
	context := NewContext()
	defer context.Close()

	c := context.DbCollection("tasks")
	repo := &data.TaskRepository{c}

	task, err := repo.GetById(id)
	if err != nil {
		if err == mgo.ErrNotFound {
			w.WriteHeader(http.StatusNoContent)
			return
		} else {
			common.DisplayAppError(w, err, "An Unexpected error has occurred", 500)
			return
		}
	}
	j, err := json.Marshal(task)
	if err != nil {
		common.DisplayAppError(w, err, "An Unexpected error has occurred", 500)
		return
	} else {
		w.Header().Set("Content-Type", "appliction/json")
		w.WriteHeader(http.StatusCreated)
		w.Write(j)
	}
}

func GetTasksByUser(w http.ResponseWriter, r *http.Request) {

	vars := mux.Vars(r)
	user := vars["id"]
	context := NewContext()
	defer context.Close()

	c := context.DbCollection("tasks")
	repo := &data.TaskRepository{c}

	tasks := repo.GetByUser(user)

	j, err := json.Marshal(TasksResource{Data: tasks})
	if err != nil {
		common.DisplayAppError(w, err, "An Unexpected error has occurred", 500)
		return
	} else {
		w.Header().Set("Content-Type", "appliction/json")
		w.WriteHeader(http.StatusCreated)
		w.Write(j)
	}
}

func UpdateTaskById(w http.ResponseWriter, r *http.Request) {

	vars := mux.Vars(r)
	id := bson.ObjectIdHex(vars["id"])

	var dataResource TaskResource
	err := json.NewDecoder(r.Body).Decode(&dataResource)
	if err != nil {
		common.DisplayAppError(w, err, "Invalid task data", 500)
		return
	}
	task := &dataResource.Data
	task.Id = id
	context := NewContext()
	defer context.Close()

	c := context.DbCollection("tasks")
	repo := &data.TaskRepository{c}

	err = repo.Update(task)
	if err != nil {
		common.DisplayAppError(w, err, "An Unexpected error has occurred", 500)
		return
	} else {
		// w.Header().Set("Content-Type", "appliction/json")
		w.WriteHeader(http.StatusOK)
		// w.Write(j)
	}
}

func DeleteTaskById(w http.ResponseWriter, r *http.Request) {

	vars := mux.Vars(r)
	id := vars["id"]

	context := NewContext()
	defer context.Close()

	c := context.DbCollection("tasks")
	repo := &data.TaskRepository{c}

	err := repo.Delete(id)
	if err != nil {
		common.DisplayAppError(w, err, "An Unexpected error has occurred", 500)
		return
	} else {
		// w.Header().Set("Content-Type", "appliction/json")
		w.WriteHeader(http.StatusOK)
		// w.Write(j)
	}
}


text:
@interface AKAssetsGroupViewCell : UITableViewCell

@end


text:
package fr.logica.application.logic;

import java.util.Map;

import javax.faces.context.FacesContext;

import fr.logica.application.DefaultApplicationLogic;
import fr.logica.business.context.RequestContext;
import fr.logica.business.controller.Request;
import fr.logica.domain.constants.ShopListConstants;
import fr.logica.jsf.controller.ViewController;
import fr.logica.jsf.utils.JSFBeanUtils;
import fr.logica.queries.ShopListQuery;

/**
 * Class used to store application logic methods.
 */
public class ApplicationLogic extends DefaultApplicationLogic {

	/** SerialVersionUID. */
	private static final long serialVersionUID = 1L;

	@Override
	public String getDefaultPage(User user) {
		if (user != null) {
			ViewController viewCtrl = ((ViewController) JSFBeanUtils.getManagedBean(FacesContext.getCurrentInstance(), "jsfCtrl"));
			viewCtrl.reset();

			return viewCtrl.prepareView(ShopListConstants.ENTITY_NAME, ShopListQuery.Query.QUERY_SHOP_LIST, "SHOP_LIST_LIST");
		}
		return "/index/login";
	}

	@Override
	public boolean enableXlsExport() {
		return false;
	}

	@Override
	public boolean enablePermalink() {
		return true;
	}

	@Override
	public Request<?> getPermalinkRequest(Map<String, String> parameters, RequestContext context) {
		// Store custom data
		User user = context.getSessionContext().getUser();
		String code = parameters.get("code");
		if (code != null && !"".equals(code)) {
			user.eanCode = code;
		}
		String shelf = parameters.get("shelf");
		if (shelf != null && !"".equals(shelf)) {
			user.eanShelf = shelf;
		}

		return super.getPermalinkRequest(parameters, context);
	}
}