text:
"""Quadratic Program Solver based on IPOPT.
"""

from sys import stderr

from numpy import Inf, ones, zeros, shape, tril
from numpy import flatnonzero as find

from scipy.sparse import issparse, csr_matrix as sparse

try:
    import pyipopt
except ImportError:
#    print 'IPOPT not available'
    pass

from pypower.ipopt_options import ipopt_options

def qps_ipopt(H, c, A, l, u, xmin, xmax, x0, opt):
    """Quadratic Program Solver based on IPOPT.

    Uses IPOPT to solve the following QP (quadratic programming) problem::

        min 1/2 x'*H*x + c'*x
         x

    subject to::

        l <= A*x <= u       (linear constraints)
        xmin <= x <= xmax   (variable bounds)

    Inputs (all optional except C{H}, C{C}, C{A} and C{L}):
        - C{H} : matrix (possibly sparse) of quadratic cost coefficients
        - C{C} : vector of linear cost coefficients
        - C{A, l, u} : define the optional linear constraints. Default
        values for the elements of C{l} and C{u} are -Inf and Inf,
        respectively.
        - C{xmin, xmax} : optional lower and upper bounds on the
        C{x} variables, defaults are -Inf and Inf, respectively.
        - C{x0} : optional starting value of optimization vector C{x}
        - C{opt} : optional options structure with the following fields,
        all of which are also optional (default values shown in parentheses)
            - C{verbose} (0) - controls level of progress output displayed
                - 0 = no progress output
                - 1 = some progress output
                - 2 = verbose progress output
            - C{max_it} (0) - maximum number of iterations allowed
                - 0 = use algorithm default
            - C{ipopt_opt} - options struct for IPOPT, values in
            C{verbose} and C{max_it} override these options
        - C{problem} : The inputs can alternatively be supplied in a single
        C{problem} dict with fields corresponding to the input arguments
        described above: C{H, c, A, l, u, xmin, xmax, x0, opt}

    Outputs:
        - C{x} : solution vector
        - C{f} : final objective function value
        - C{exitflag} : exit flag
            - 1 = first order optimality conditions satisfied
            - 0 = maximum number of iterations reached
            - -1 = numerically failed
        - C{output} : output struct with the following fields:
            - C{iterations} - number of iterations performed
            - C{hist} - dict list with trajectories of the following:
            C{feascond}, C{gradcond}, C{compcond}, C{costcond}, C{gamma},
            C{stepsize}, C{obj}, C{alphap}, C{alphad}
            - message - exit message
        - C{lmbda} : dict containing the Langrange and Kuhn-Tucker
        multipliers on the constraints, with fields:
            - C{mu_l} - lower (left-hand) limit on linear constraints
            - C{mu_u} - upper (right-hand) limit on linear constraints
            - C{lower} - lower bound on optimization variables
            - C{upper} - upper bound on optimization variables

    Calling syntax options::
        x, f, exitflag, output, lmbda = \
            qps_ipopt(H, c, A, l, u, xmin, xmax, x0, opt)

        x = qps_ipopt(H, c, A, l, u)
        x = qps_ipopt(H, c, A, l, u, xmin, xmax)
        x = qps_ipopt(H, c, A, l, u, xmin, xmax, x0)
        x = qps_ipopt(H, c, A, l, u, xmin, xmax, x0, opt)
        x = qps_ipopt(problem), where problem is a struct with fields:
                        H, c, A, l, u, xmin, xmax, x0, opt
                        all fields except 'c', 'A' and 'l' or 'u' are optional
        x = qps_ipopt(...)
        x, f = qps_ipopt(...)
        x, f, exitflag = qps_ipopt(...)
        x, f, exitflag, output = qps_ipopt(...)
        x, f, exitflag, output, lmbda = qps_ipopt(...)

    Example::
        H = [   1003.1  4.3     6.3     5.9;
                4.3     2.2     2.1     3.9;
                6.3     2.1     3.5     4.8;
                5.9     3.9     4.8     10  ]
        c = zeros((4, 1))
        A = [   1       1       1       1
                0.17    0.11    0.10    0.18    ]
        l = [1, 0.10]
        u = [1, Inf]
        xmin = zeros((4, 1))
        x0 = [1, 0, 0, 1]
        opt = {'verbose': 2)
        x, f, s, out, lambda = qps_ipopt(H, c, A, l, u, xmin, [], x0, opt)

    Problem from U{http://www.jmu.edu/docs/sasdoc/sashtml/iml/chap8/sect12.htm}

    @see: C{pyipopt}, L{ipopt_options}

    @author: Ray Zimmerman (PSERC Cornell)
    """
    ##----- input argument handling  -----
    ## gather inputs
    if isinstance(H, dict):       ## problem struct
        p = H
        if 'opt' in p: opt = p['opt']
        if 'x0' in p: x0 = p['x0']
        if 'xmax' in p: xmax = p['xmax']
        if 'xmin' in p: xmin = p['xmin']
        if 'u' in p: u = p['u']
        if 'l' in p: l = p['l']
        if 'A' in p: A = p['A']
        if 'c' in p: c = p['c']
        if 'H' in p: H = p['H']
    else:                         ## individual args
        assert H is not None
        assert c is not None
        assert A is not None
        assert l is not None

    if opt is None:
        opt = {}
#    if x0 is None:
#        x0 = array([])
#    if xmax is None:
#        xmax = array([])
#    if xmin is None:
#        xmin = array([])

    ## define nx, set default values for missing optional inputs
    if len(H) == 0 or not any(any(H)):
        if len(A) == 0 and len(xmin) == 0 and len(xmax) == 0:
            stderr.write('qps_ipopt: LP problem must include constraints or variable bounds\n')
        else:
            if len(A) > 0:
                nx = shape(A)[1]
            elif len(xmin) > 0:
                nx = len(xmin)
            else:    # if len(xmax) > 0
                nx = len(xmax)
        H = sparse((nx, nx))
    else:
        nx = shape(H)[0]

    if len(c) == 0:
        c = zeros(nx)

    if  len(A) > 0 and (len(l) == 0 or all(l == -Inf)) and \
                       (len(u) == 0 or all(u ==  Inf)):
        A = None                    ## no limits => no linear constraints

    nA = shape(A)[0]                ## number of original linear constraints
    if nA:
        if len(u) == 0:             ## By default, linear inequalities are ...
            u = Inf * ones(nA)      ## ... unbounded above and ...

        if len(l) == 0:
            l = -Inf * ones(nA)     ## ... unbounded below.

    if len(x0) == 0:
        x0 = zeros(nx)

    ## default options
    if 'verbose' in opt:
        verbose = opt['verbose']
    else:
        verbose = 0

    if 'max_it' in opt:
        max_it = opt['max_it']
    else:
        max_it = 0

    ## make sure args are sparse/full as expected by IPOPT
    if len(H) > 0:
        if not issparse(H):
            H = sparse(H)

    if not issparse(A):
        A = sparse(A)

    ##-----  run optimization  -----
    ## set options dict for IPOPT
    options = {}
    if 'ipopt_opt' in opt:
        options['ipopt'] = ipopt_options(opt['ipopt_opt'])
    else:
        options['ipopt'] = ipopt_options()

    options['ipopt']['jac_c_constant']    = 'yes'
    options['ipopt']['jac_d_constant']    = 'yes'
    options['ipopt']['hessian_constant']  = 'yes'
    options['ipopt']['least_square_init_primal']  = 'yes'
    options['ipopt']['least_square_init_duals']   = 'yes'
    # options['ipopt']['mehrotra_algorithm']        = 'yes'     ## default 'no'
    if verbose:
        options['ipopt']['print_level'] = min(12, verbose * 2 + 1)
    else:
        options['ipopt']['print_level = 0']

    if max_it:
        options['ipopt']['max_iter'] = max_it

    ## define variable and constraint bounds, if given
    if nA:
        options['cu'] = u
        options['cl'] = l

    if len(xmin) > 0:
        options['lb'] = xmin

    if len(xmax) > 0:
        options['ub'] = xmax

    ## assign function handles
    funcs = {}
    funcs['objective']         = lambda x: 0.5 * x.T * H * x + c.T * x
    funcs['gradient']          = lambda x: H * x + c
    funcs['constraints']       = lambda x: A * x
    funcs['jacobian']          = lambda x: A
    funcs['jacobianstructure'] = lambda : A
    funcs['hessian']           = lambda x, sigma, lmbda: tril(H)
    funcs['hessianstructure']  = lambda : tril(H)

    ## run the optimization
    x, info = pyipopt(x0, funcs, options)

    if info['status'] == 0 | info['status'] == 1:
        eflag = 1
    else:
        eflag = 0

    output = {}
    if 'iter' in info:
        output['iterations'] = info['iter']

    output['info']       = info['status']
    f = funcs['objective'](x)

    ## repackage lmbdas
    kl = find(info['lmbda'] < 0)                     ## lower bound binding
    ku = find(info['lmbda'] > 0)                     ## upper bound binding
    mu_l = zeros(nA)
    mu_l[kl] = -info['lmbda'][kl]
    mu_u = zeros(nA)
    mu_u[ku] = info['lmbda'][ku]

    lmbda = {
        'mu_l': mu_l,
        'mu_u': mu_u,
        'lower': info['zl'],
        'upper': info['zu']
    }

    return x, f, eflag, output, lmbda


text:
module BohFoundation.Dtos.ApplicationEvaluator.EvaluatingApplicants.ShowAllApplicants {
    export class AllFinalizedApplicantsForAGraduatingYearModel {
        constructor(
            public graduatingYear?: number,
            public applicantSummaries?: Array<ApplicantSummaryModel>,
            public percentRated?: number,
            public numberOfApplicantsNotYetRated?: number,
            public nextRandomApplicantForReview?: string) {
        }
    }
}

redpajama_set_name: RedPajamaGithub


text:
require 'rails/generators/base'

module RailsImporter
  class ImporterGenerator < Rails::Generators::NamedBase
    source_root File.expand_path("../../templates", __FILE__)

    def generate_importer
      @importer_name = file_name.classify
      template "generic_importer.erb", File.join('app/importers', "#{file_name.underscore}_importer.rb")
    end
  end
end


text:
/**
 * Check a given input is valid date string
 */
exports.isValidDateString = function(input) {
    return (typeof input === 'string' && (new Date(input) !== 'Invalid Date'));
};

/**
 * Returns a string representing a date in format: "MMMM DD, YYYY",
 * using UTC time zone from a number of seconds since January 1, 1970, 00:00:00 UTC
 */
exports.secondsToUTCFullDate = function(seconds) {
    const monthNames = [
        "January", "February", "March",
        "April", "May", "June", "July",
        "August", "September", "October",
        "November", "December"
    ];

    let dateObj = new Date(seconds*1000);

    let date = dateObj.getUTCDate(),
        month = monthNames[dateObj.getUTCMonth()],
        year = dateObj.getUTCFullYear();

    return month + ' ' + date + ', ' + year;
};

/**
 * Returns the numeric value of the given date string as the number of seconds
 * since January 1, 1970, 00:00:00 UTC.
 * The given date string will always be set to UTC time zone before conversion,
 * no matter what is system time.
 * Note: this assumes given input is valid date string.
 */
exports.dateStringToUTCSeconds = function(dStr) {
    // Create a date object with given date string using local timezone
    let localDate = new Date(dStr);

    // Create a date object for start of unix time but using local timezone
    let utcDate = new Date('Jan 1 1970');

    // The difference (in milliseconds) between UTC timezone and local timezone
    let diff = utcDate.getTime();

    return utcSeconds = (localDate.getTime() - diff)/1000;
};


text:
#define _GNU_SOURCE /* asprintf, strdup */
#include <sys/cdefs.h>

#include "plugins_types.h"

#include <assert.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>

#include "libyang.h"

/* additional internal headers for some useful simple macros */
#include "common.h"
#include "compat.h"
#include "plugins_internal.h" /* LY_TYPE_*_STR */

/**
 * @page howtoDataLYB LYB Binary Format
 * @subsection howtoDataLYBTypesIdentityref identityref (built-in)
 *
 * | Size (B) | Mandatory | Type | Meaning |
 * | :------  | :-------: | :--: | :-----: |
 * | string length | yes | `char *` | string JSON format of the identityref |
 */

/**
 * @brief Print an identityref value in a specific format.
 *
 * @param[in] ident Identityref to print.
 * @param[in] format Value format.
 * @param[in] prefix_data Format-specific data for resolving prefixes.
 * @param[out] str Printed identityref.
 * @param[out] str_len Optional length of @p str.
 * @return LY_ERR value.
 */
static LY_ERR
identityref_ident2str(const struct lysc_ident *ident, LY_VALUE_FORMAT format, void *prefix_data, char **str, size_t *str_len)
{
    int len;

    len = asprintf(str, "%s:%s", lyplg_type_get_prefix(ident->module, format, prefix_data), ident->name);
    if (len == -1) {
        return LY_EMEM;
    }

    if (str_len) {
        *str_len = (size_t)len;
    }
    return LY_SUCCESS;
}

/**
 * @brief Convert a string identityref value to matching identity.
 *
 * @param[in] value Identityref value.
 * @param[in] value_len Length of @p value.
 * @param[in] format Value format.
 * @param[in] prefix_data Format-specific data for resolving prefixes.
 * @param[in] ctx libyang context.
 * @param[in] ctx_node Context node for resolving the prefixes.
 * @param[out] ident Found identity.
 * @param[out] err Error information on error.
 * @return LY_ERR value.
 */
static LY_ERR
identityref_str2ident(const char *value, size_t value_len, LY_VALUE_FORMAT format, void *prefix_data,
        const struct ly_ctx *ctx, const struct lysc_node *ctx_node, struct lysc_ident **ident, struct ly_err_item **err)
{
    const char *id_name, *prefix = value;
    size_t id_len, prefix_len;
    const struct lys_module *mod;
    LY_ARRAY_COUNT_TYPE u;
    struct lysc_ident *id, *identities;

    /* locate prefix if any */
    for (prefix_len = 0; (prefix_len < value_len) && (value[prefix_len] != ':'); ++prefix_len) {}
    if (prefix_len < value_len) {
        id_name = &value[prefix_len + 1];
        id_len = value_len - (prefix_len + 1);
    } else {
        prefix_len = 0;
        id_name = value;
        id_len = value_len;
    }

    if (!id_len) {
        return ly_err_new(err, LY_EVALID, LYVE_DATA, NULL, NULL, "Invalid empty identityref value.");
    }

    mod = lyplg_type_identity_module(ctx, ctx_node, prefix, prefix_len, format, prefix_data);
    if (!mod) {
        return ly_err_new(err, LY_EVALID, LYVE_DATA, NULL, NULL,
                "Invalid identityref \"%.*s\" value - unable to map prefix to YANG schema.", (int)value_len, value);
    }

    id = NULL;
    identities = mod->identities;
    LY_ARRAY_FOR(identities, u) {
        if (!ly_strncmp(identities[u].name, id_name, id_len)) {
            /* we have match */
            id = &identities[u];
            break;
        }
    }
    if (!id) {
        /* no match */
        return ly_err_new(err, LY_EVALID, LYVE_DATA, NULL, NULL,
                "Invalid identityref \"%.*s\" value - identity not found in module \"%s\".",
                (int)value_len, value, mod->name);
    }

    *ident = id;
    return LY_SUCCESS;
}

/**
 * @brief Check that an identityref is derived from the type base.
 *
 * @param[in] ident Identityref.
 * @param[in] type Identityref type.
 * @param[in] value String value for logging.
 * @param[in] value_len Length of @p value.
 * @param[out] err Error information on error.
 */
static LY_ERR
identityref_check_base(const struct lysc_ident *ident, struct lysc_type_identityref *type, const char *value,
        size_t value_len, struct ly_err_item **err)
{
    LY_ERR ret;
    size_t str_len;
    char *str;
    LY_ARRAY_COUNT_TYPE u;
    struct lysc_ident *base;

    /* check that the identity matches some of the type's base identities */
    LY_ARRAY_FOR(type->bases, u) {
        if (!lyplg_type_identity_isderived(type->bases[u], ident)) {
            /* we have match */
            break;
        }
    }

    /* it does not, generate a nice error */
    if (u == LY_ARRAY_COUNT(type->bases)) {
        str = NULL;
        str_len = 1;
        LY_ARRAY_FOR(type->bases, u) {
            base = type->bases[u];
            str_len += (u ? 2 : 0) + 1 + strlen(base->module->name) + 1 + strlen(base->name) + 1;
            str = ly_realloc(str, str_len);
            sprintf(str + (u ? strlen(str) : 0), "%s\"%s:%s\"", u ? ", " : "", base->module->name, base->name);
        }

        /* no match */
        if (u == 1) {
            ret = ly_err_new(err, LY_EVALID, LYVE_DATA, NULL, NULL,
                    "Invalid identityref \"%.*s\" value - identity not derived from the base %s.",
                    (int)value_len, value, str);
        } else {
            ret = ly_err_new(err, LY_EVALID, LYVE_DATA, NULL, NULL,
                    "Invalid identityref \"%.*s\" value - identity not derived from all the bases %s.",
                    (int)value_len, value, str);
        }
        free(str);
        return ret;
    }

    return LY_SUCCESS;
}

API LY_ERR
lyplg_type_store_identityref(const struct ly_ctx *ctx, const struct lysc_type *type, const void *value, size_t value_len,
        uint32_t options, LY_VALUE_FORMAT format, void *prefix_data, uint32_t hints, const struct lysc_node *ctx_node,
        struct lyd_value *storage, struct lys_glob_unres *unres, struct ly_err_item **err)
{
    LY_ERR ret = LY_SUCCESS;
    struct lysc_type_identityref *type_ident = (struct lysc_type_identityref *)type;
    char *canon;
    struct lysc_ident *ident;

    /* init storage */
    memset(storage, 0, sizeof *storage);
    storage->realtype = type;

    /* check hints */
    ret = lyplg_type_check_hints(hints, value, value_len, type->basetype, NULL, err);
    LY_CHECK_GOTO(ret, cleanup);

    /* find a matching identity */
    ret = identityref_str2ident(value, value_len, format, prefix_data, ctx, ctx_node, &ident, err);
    LY_CHECK_GOTO(ret, cleanup);

    /* handle identity in a non-implemented module */
    if (!ident->module->implemented) {
        if (options & LYPLG_TYPE_STORE_IMPLEMENT) {
            ret = lyplg_type_make_implemented(ident->module, NULL, unres);
            LY_CHECK_GOTO(ret, cleanup);
        } else {
            ret = ly_err_new(err, LY_EVALID, LYVE_DATA, NULL, NULL,
                    "Invalid identityref \"%.*s\" value - identity found in non-implemented module \"%s\".",
                    (int)value_len, (char *)value, ident->module->name);
            goto cleanup;
        }
    }

    /* check that the identity is derived form all the bases */
    ret = identityref_check_base(ident, type_ident, value, value_len, err);
    LY_CHECK_GOTO(ret, cleanup);

    /* store value */
    storage->ident = ident;

    /* store canonical value */
    if (format == LY_VALUE_CANON) {
        if (options & LYPLG_TYPE_STORE_DYNAMIC) {
            ret = lydict_insert_zc(ctx, (char *)value, &storage->_canonical);
            options &= ~LYPLG_TYPE_STORE_DYNAMIC;
            LY_CHECK_GOTO(ret, cleanup);
        } else {
            ret = lydict_insert(ctx, value, value_len, &storage->_canonical);
            LY_CHECK_GOTO(ret, cleanup);
        }
    } else {
        /* JSON format with prefix is the canonical one */
        ret = identityref_ident2str(ident, LY_VALUE_JSON, NULL, &canon, NULL);
        LY_CHECK_GOTO(ret, cleanup);

        ret = lydict_insert_zc(ctx, canon, &storage->_canonical);
        LY_CHECK_GOTO(ret, cleanup);
    }

cleanup:
    if (options & LYPLG_TYPE_STORE_DYNAMIC) {
        free((void *)value);
    }

    if (ret) {
        lyplg_type_free_simple(ctx, storage);
    }
    return ret;
}

API LY_ERR
lyplg_type_compare_identityref(const struct lyd_value *val1, const struct lyd_value *val2)
{
    if (val1->realtype != val2->realtype) {
        return LY_ENOT;
    }

    if (val1->ident == val2->ident) {
        return LY_SUCCESS;
    }
    return LY_ENOT;
}

API const void *
lyplg_type_print_identityref(const struct ly_ctx *UNUSED(ctx), const struct lyd_value *value, LY_VALUE_FORMAT format,
        void *prefix_data, ly_bool *dynamic, size_t *value_len)
{
    char *ret;

    if ((format == LY_VALUE_CANON) || (format == LY_VALUE_JSON) || (format == LY_VALUE_LYB)) {
        if (dynamic) {
            *dynamic = 0;
        }
        if (value_len) {
            *value_len = strlen(value->_canonical);
        }
        return value->_canonical;
    }

    /* print the value in the specific format */
    if (identityref_ident2str(value->ident, format, prefix_data, &ret, value_len)) {
        return NULL;
    }
    *dynamic = 1;
    return ret;
}

/**
 * @brief Plugin information for identityref type implementation.
 *
 * Note that external plugins are supposed to use:
 *
 *   LYPLG_TYPES = {
 */
const struct lyplg_type_record plugins_identityref[] = {
    {
        .module = "",
        .revision = NULL,
        .name = LY_TYPE_IDENT_STR,

        .plugin.id = "libyang 2 - identityref, version 1",
        .plugin.store = lyplg_type_store_identityref,
        .plugin.validate = NULL,
        .plugin.compare = lyplg_type_compare_identityref,
        .plugin.sort = NULL,
        .plugin.print = lyplg_type_print_identityref,
        .plugin.duplicate = lyplg_type_dup_simple,
        .plugin.free = lyplg_type_free_simple
    },
    {0}
};


text:
/**
 * @class invalidLink
 * @memberOf lapps.lappsDirectives
 * @description This directive is a template for a notification, when an invalid
 *              link was followed.
 */
(function() {
  angular.module('lappsDirectives').directive('invalidLink', function() {
    return {
      restrict: 'E',
      templateUrl: 'shared/invalidLink/invalidLinkView.html'
    };
  });
}).call(this);


text:
<?xml version="1.0" encoding="UTF-8"?>
<web-fragment id="WebFragment_ID" version="3.0" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-fragment_3_0.xsd">
<display-name>wy2-CMS-Repository</display-name>
 <name>wy2_CMS_Repository</name>
 </web-fragment>


text:
Calling for penance
Cracks in the hands of a stranger
Are asking me to come back
A call for deliverance
Ghosts in the air that we breath
Watching our every last word

We speak
We speak

So what should I do
About a boy
Who won't listen

Erase
Erase us
Erase this world

A call for penance
Crack in the hands of a stranger
Are calling me home
Sheer disobediance
Simply a lack of love
I'm warming up
To come home
To come home

So what should I do
About a boy
Who won't listen

So anxious to find
Any other way
But won't listen, no

Erase
Erase us
Erase this world

Erase
Erase us
Erase this world


text:
// Copyright 2019 The MediaPipe Authors.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//      http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

#include "mediapipe/gpu/cv_pixel_buffer_pool_wrapper.h"

#include <tuple>

#include "CoreFoundation/CFBase.h"
#include "mediapipe/framework/port/logging.h"
#include "mediapipe/objc/CFHolder.h"
#include "mediapipe/objc/util.h"

namespace mediapipe {

CvPixelBufferPoolWrapper::CvPixelBufferPoolWrapper(
    int width, int height, GpuBufferFormat format, CFTimeInterval maxAge,
    CvTextureCacheManager* texture_caches) {
  OSType cv_format = CVPixelFormatForGpuBufferFormat(format);
  CHECK_NE(cv_format, -1) << "unsupported pixel format";
  pool_ = MakeCFHolderAdopting(
      /* keep count is 0 because the age param keeps buffers around anyway */
      CreateCVPixelBufferPool(width, height, cv_format, 0, maxAge));
  texture_caches_ = texture_caches;
}

CFHolder<CVPixelBufferRef> CvPixelBufferPoolWrapper::GetBuffer() {
  CVPixelBufferRef buffer;
  int threshold = 1;
  NSMutableDictionary* auxAttributes =
      [NSMutableDictionary dictionaryWithCapacity:1];
  CVReturn err;
  bool tried_flushing = false;
  while (1) {
    auxAttributes[(id)kCVPixelBufferPoolAllocationThresholdKey] = @(threshold);
    err = CVPixelBufferPoolCreatePixelBufferWithAuxAttributes(
        kCFAllocatorDefault, *pool_, (__bridge CFDictionaryRef)auxAttributes,
        &buffer);
    if (err != kCVReturnWouldExceedAllocationThreshold) break;
    if (texture_caches_ && !tried_flushing) {
      // Call the flush function to potentially release old holds on buffers
      // and try again to create a pixel buffer.
      // This is used to flush CV texture caches, which may retain buffers until
      // flushed.
      texture_caches_->FlushTextureCaches();
      tried_flushing = true;
    } else {
      ++threshold;
    }
  }
  CHECK(!err) << "Error creating pixel buffer: " << err;
  count_ = threshold;
  return MakeCFHolderAdopting(buffer);
}

std::string CvPixelBufferPoolWrapper::GetDebugString() const {
  auto description = MakeCFHolderAdopting(CFCopyDescription(*pool_));
  return [(__bridge NSString*)*description UTF8String];
}

void CvPixelBufferPoolWrapper::Flush() { CVPixelBufferPoolFlush(*pool_, 0); }

CFHolder<CVPixelBufferRef> CvPixelBufferPoolWrapper::CreateBufferWithoutPool(
    const internal::GpuBufferSpec& spec) {
  OSType cv_format = CVPixelFormatForGpuBufferFormat(spec.format);
  CHECK_NE(cv_format, -1) << "unsupported pixel format";
  CVPixelBufferRef buffer;
  CVReturn err = CreateCVPixelBufferWithoutPool(spec.width, spec.height,
                                                cv_format, &buffer);
  CHECK(!err) << "Error creating pixel buffer: " << err;
  return MakeCFHolderAdopting(buffer);
}

}  // namespace mediapipe


text:
$("#nav-arrow").click(function() {
	$("html, body").animate({
    scrollTop: $("#about-section").offset().top - 35}, 750);
});

//Scroll to contact form on envelope click
$("#envelope").click(function() {
	$("html, body").animate({
    scrollTop: $("#contact-section").offset().top - 35}, 1300);
});

// Expand project
$(document).on("click", ".expand-description", function(event) {
	var projectNumber = $(this).attr("data-project-number");
	var projectSelector = "[data-project-number=" + projectNumber + "]";
	var project = $(".project" + projectSelector);
	var projectInfo = $(".project-info" + projectSelector);

	project.addClass("expanded");

	$(this).fadeOut(300, function() {
		$(this).text("Read less").fadeIn(300);
	});

	$(this).toggleClass("expand-description reduce-description");
	$(this).unbind();

	//Fade and slide in expanded description
	$(".expanded-text" + projectSelector)
		.css("opacity", 0)
		.slideDown(300)
		.animate(
			{ opacity: 1},
			{ queue: false, duration: 700 }
	);

	//Fade ande slide in second project image
	$(".secondary-image" + projectSelector)
		.css("opacity", 0)
		.slideDown(300)
		.animate(
			{ opacity: 1},
			{ queue: false, duration: 300 }
	);
	$(".secondary-image" + projectSelector).css("display", "block")
});

//Reduce project
$(document).on("click", ".reduce-description", function(event) {
	var projectNumber = $(this).attr("data-project-number");
	var projectSelector = "[data-project-number=" + projectNumber + "]";
	var project = $(".project" + projectSelector);
	var projectInfo = $(".project-info" + projectSelector);

	project.removeClass("expanded");

	$(this).fadeOut(300, function() {
			$(this).text("Read more").fadeIn(300);
		});
	$(this).toggleClass("expand-description reduce-description");
	$(this).unbind();

	//Fade and slide out expanded description
	$(".expanded-text" + projectSelector).slideUp(300);

	//Fade and slide out second project image
	$(".secondary-image" + projectSelector)
		.css("opacity", 1)
		.slideUp(300)
		.animate(
			{ opacity: 0},
			{ queue: false, duration: 300 }
	);
});

function submitForm() {
	var name = document.getElementById("name"),
		  email = document.getElementById("email"),
			message = document.getElementById("message"),
			submitBtn = document.getElementById("submit"),
			formStatus = $("#form-status"),
			formData = new FormData();
	console.log(formStatus);

	if (!name.value || !email.value || !message.value) {
		formStatus.fadeOut(100);
		window.setTimeout(function() {
			formStatus.text("All fields required");
			formStatus.css("background-color", "#DA4644");
		}, 101);
		window.setTimeout(function() {
			formStatus.fadeIn(300);
		}, 102)
	}
	else if (/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(email.value) === false) {
		formStatus.fadeOut(100);
		window.setTimeout(function() {
			formStatus.text("Invalid email");
			formStatus.css("background-color", "#DA4644");
		}, 101);
		window.setTimeout(function() {
			formStatus.fadeIn(300);
		}, 102)
	}
	else {
		submitBtn.disabled = true;

		formData.append("name", name.value);
		formData.append("email", email.value);
		formData.append("message", message.value);

		var ajax = new XMLHttpRequest();

		ajax.open("POST", "/send_mail.php");
		ajax.onreadystatechange = function() {
			if (ajax.readyState == 4 && ajax.status == 200) {
				if (ajax.responseText == "success") {
					formStatus.fadeOut(100);
					window.setTimeout(function() {
						formStatus.text("Message sent!");
						formStatus.css("background-color", "#73D121");
					}, 101);
					window.setTimeout(function() {
						formStatus.fadeIn(300);
						$("#submit").addClass("submit-disabled");
						$("#message").val("");
						$("#email").val("").focus().blur();
						$("#name").val("").focus().blur();
					}, 102)
				} else {
					formStatus.fadeOut(100);
					window.setTimeout(function() {
						formStatus.text("Message could not be sent - try agin later");
						formStatus.css("background-color", "#DA4644");
					}, 101);
					window.setTimeout(function() {
						formStatus.fadeIn(300);
					}, 102)
				}
			}
		};
		ajax.send(formData);
	}
}


text:
package system.scidb;

import benchmark.Benchmark;
import benchmark.BenchmarkQuery;
import benchmark.QueryGenerator;
import benchmark.BenchmarkContext;
import benchmark.BenchmarkSession;
import util.Pair;

import java.text.MessageFormat;
import java.util.List;

/**
 * @author George Merticariu
 * @author Dimitar Misev <misev@rasdaman.com>
 */
public class SciDBAFLQueryGenerator extends QueryGenerator {

    public SciDBAFLQueryGenerator(BenchmarkContext benchmarkContext) {
        super(benchmarkContext);
    }

    @Override
    public Benchmark getCachingBenchmark() {
        Benchmark ret = new Benchmark();

        {
            BenchmarkSession domainBenchmark = new BenchmarkSession("domain benchmark session");
            // count cloud-free pixels, returning a 1D array for all arrays
            String cloudCoverQuery = MessageFormat.format("aggregate( filter( join({0}, {1}), v0 > 0 and v1 > 0), count(*) );",
                    benchmarkContext.getArrayName0(), benchmarkContext.getArrayName1());
            domainBenchmark.addBenchmarkQuery(new BenchmarkQuery(cloudCoverQuery));
            // run ndvi
            String ndviQueryFormat = "aggregate( filter( join(%s, %s), ((v0 - v1) / (v0 + v1)) > %f and ((v0 - v1) / (v0 + v1)) < %f), count(*));";
            domainBenchmark.addBenchmarkQuery(new BenchmarkQuery(String.format(ndviQueryFormat,
                    benchmarkContext.getArrayName0(), benchmarkContext.getArrayName1(), 0.2, 0.4)));
            domainBenchmark.addBenchmarkQuery(new BenchmarkQuery(String.format(ndviQueryFormat,
                    benchmarkContext.getArrayName0(), benchmarkContext.getArrayName1(), 0.22, 0.45)));
            domainBenchmark.addBenchmarkQuery(new BenchmarkQuery(String.format(ndviQueryFormat,
                    benchmarkContext.getArrayName0(), benchmarkContext.getArrayName1(), 0.21, 0.38)));
            // calculate SAVI on a spatial subset
            // savi = ((NIR-R) / (NIR + R + L)) * (1+L)
            String saviQueryFormat = "aggregate( apply( join(%s, %s), v2, ((v0 - v1) / (v0 + v1 + 0.5)) * 1.5 ), min(v2));";
            domainBenchmark.addBenchmarkQuery(new BenchmarkQuery(String.format(saviQueryFormat,
                    benchmarkContext.getArrayName0(), benchmarkContext.getArrayName1())));
//            ret.add(domainBenchmark);
        }

        {
            String[] aggregateFuncs = {"min", "max", "sum", "avg"};
            for (String aggregateFunc : aggregateFuncs) {
                String subsetQuery = "aggregate( between( %s, %d, %d, %d, %d ), " + aggregateFunc + "(v0) )";
                BenchmarkSession benchmarkSession = new BenchmarkSession("subset window lower left to lower right, " + aggregateFunc);
                for (int i = 0; i < 8; i++) {
                    int origin = i * 500;
                    benchmarkSession.addBenchmarkQuery(new BenchmarkQuery(String.format(
                            subsetQuery, benchmarkContext.getArrayName0(), origin, 0, 3999 + origin, 3999)));
                }
                ret.add(benchmarkSession);
                benchmarkSession = new BenchmarkSession("subset window lower left to upper right, " + aggregateFunc);
                for (int i = 0; i < 8; i++) {
                    int origin = i * 500;
                    benchmarkSession.addBenchmarkQuery(new BenchmarkQuery(String.format(
                            subsetQuery, benchmarkContext.getArrayName0(), origin, origin, 3999 + origin, 3999 + origin)));
                }
                ret.add(benchmarkSession);
                benchmarkSession = new BenchmarkSession("subset window zoom in, " + aggregateFunc);
                for (int i = 0; i < 8; i++) {
                    int zoom = i * 500;
                    benchmarkSession.addBenchmarkQuery(new BenchmarkQuery(String.format(
                            subsetQuery, benchmarkContext.getArrayName0(), zoom, zoom, 7999 - zoom, 7999 - zoom)));
                }
                ret.add(benchmarkSession);
                benchmarkSession = new BenchmarkSession("subset window zoom out, " + aggregateFunc);
                for (int i = 7; i >= 0; i--) {
                    int zoom = i * 500;
                    benchmarkSession.addBenchmarkQuery(new BenchmarkQuery(String.format(
                            subsetQuery, benchmarkContext.getArrayName0(), zoom, zoom, 7999 - zoom, 7999 - zoom)));
                }
                ret.add(benchmarkSession);
            }
        }

        {
            String[] aggregateFuncs = {"count", "min", "max"};
            for (String aggregateFunc : aggregateFuncs) {
                String subsetQuery = "aggregate( filter( between( %s, %d, %d, %d, %d ), v0 > 0.0 and v0 < 100.0), " + aggregateFunc + "(v0) )";
                BenchmarkSession benchmarkSession = new BenchmarkSession("subset window lower left to lower right, " + aggregateFunc);
                for (int i = 0; i < 8; i++) {
                    int origin = i * 500;
                    benchmarkSession.addBenchmarkQuery(new BenchmarkQuery(String.format(
                            subsetQuery, benchmarkContext.getArrayName0(), origin, 0, 3999 + origin, 3999)));
                }
                ret.add(benchmarkSession);
                benchmarkSession = new BenchmarkSession("subset window lower left to upper right, " + aggregateFunc);
                for (int i = 0; i < 8; i++) {
                    int origin = i * 500;
                    benchmarkSession.addBenchmarkQuery(new BenchmarkQuery(String.format(
                            subsetQuery, benchmarkContext.getArrayName0(), origin, origin, 3999 + origin, 3999 + origin)));
                }
                ret.add(benchmarkSession);
                benchmarkSession = new BenchmarkSession("subset window zoom in, " + aggregateFunc);
                for (int i = 0; i < 8; i++) {
                    int zoom = i * 500;
                    benchmarkSession.addBenchmarkQuery(new BenchmarkQuery(String.format(
                            subsetQuery, benchmarkContext.getArrayName0(), zoom, zoom, 7999 - zoom, 7999 - zoom)));
                }
                ret.add(benchmarkSession);
                benchmarkSession = new BenchmarkSession("subset window zoom out, " + aggregateFunc);
                for (int i = 7; i >= 0; i--) {
                    int zoom = i * 500;
                    benchmarkSession.addBenchmarkQuery(new BenchmarkQuery(String.format(
                            subsetQuery, benchmarkContext.getArrayName0(), zoom, zoom, 7999 - zoom, 7999 - zoom)));
                }
                ret.add(benchmarkSession);
            }
        }

        {
            String[][] comparisonFuncs = {{"less than", "<"}, {"greater than", ">"}, {"less than or equal to", "<="},
            {"greater than or equal to", ">="}, {"equal to", "="}, {"not equal to", "!="}};
            for (String[] comparisonFunc : comparisonFuncs) {
                BenchmarkSession benchmarkSession = new BenchmarkSession(comparisonFunc[0]);
                String query = "aggregate( filter( %s, %s ), count(*) );";
                String expr = "";
                String op = comparisonFunc[1];
                for (int i = 0; i < 10; i++) {
                    String currExpr = "(v0" + op + i + ")";
                    if (expr.isEmpty()) {
                        expr = currExpr;
                    } else {
                        expr = expr + " and " + currExpr;
                    }
                    benchmarkSession.addBenchmarkQuery(new BenchmarkQuery(String.format(query, benchmarkContext.getArrayName0(), expr)));
                }
                ret.add(benchmarkSession);
            }
        }

        {
            String[][] unaryFuncs = {{"sqrt", "abs(v0)"}, {"sin", "v0"}, {"cos", "v0"}};
            for (String[] unaryFunc : unaryFuncs) {
                String func = unaryFunc[0];
                BenchmarkSession benchmarkSession = new BenchmarkSession(func);
                String query = "aggregate( apply( %s, v1, %s ), min(v1) );";
                String expr = unaryFunc[1];
                for (int i = 0; i < 10; i++) {
                    benchmarkSession.addBenchmarkQuery(new BenchmarkQuery(String.format(query, benchmarkContext.getArrayName0(), expr)));
                    expr = func + "(" + expr + ")";
                }
                ret.add(benchmarkSession);
            }
        }

        {
            String[][] binaryFuncs = {{"multiplication", "*"}, {"division", "/"}, {"addition", "+"}, {"subtraction", "-"}};
            for (String[] binaryFunc : binaryFuncs) {
                BenchmarkSession benchmarkSession = new BenchmarkSession(binaryFunc[0]);
                String query = "aggregate( apply( %s, v1, %s ), min(v1) );";
                String expr = "v0";
                String op = binaryFunc[1];
                for (int i = 0; i < 10; i++) {
                    benchmarkSession.addBenchmarkQuery(new BenchmarkQuery(String.format(query, benchmarkContext.getArrayName0(), expr)));
                    expr = expr + op + "v0";
                }
                ret.add(benchmarkSession);
            }
        }

        return ret;
    }

    public static String getAttributes(int n, String baseType) {
        StringBuilder att = new StringBuilder("");
        for (int i = 0; i < n; i++) {
            if (i > 0) {
                att.append(",");
            }
            att.append("att").append(i).append(":").append(baseType);
        }
        return att.toString();
    }

    @Override
    public Benchmark getStorageBenchmark() {

        Benchmark queries = new Benchmark();

        List<List<Pair<Long, Long>>> sizeQueryDomain = queryDomainGenerator.getSizeQueryDomain();
        List<List<Pair<Long, Long>>> positionQueryDomain = queryDomainGenerator.getPositionQueryDomain();
        List<List<Pair<Long, Long>>> shapeQueryDomain = queryDomainGenerator.getShapeQueryDomain();
        List<Pair<List<Pair<Long, Long>>, List<Pair<Long, Long>>>> multiAccessQueryDomain = queryDomainGenerator.getMultiAccessQueryDomain();

        for (List<Pair<Long, Long>> queryDomain : sizeQueryDomain) {
            queries.add(BenchmarkQuery.size(generateSciDBQuery(queryDomain), benchmarkContext.getArrayDimensionality()));
        }

        for (List<Pair<Long, Long>> queryDomain : positionQueryDomain) {
            queries.add(BenchmarkQuery.position(generateSciDBQuery(queryDomain), benchmarkContext.getArrayDimensionality()));
        }

        for (List<Pair<Long, Long>> queryDomain : shapeQueryDomain) {
            queries.add(BenchmarkQuery.shape(generateSciDBQuery(queryDomain), benchmarkContext.getArrayDimensionality()));
        }

        for (Pair<List<Pair<Long, Long>>, List<Pair<Long, Long>>> multiAccessDomains : multiAccessQueryDomain) {
            queries.add(BenchmarkQuery.multipleSelect(generateMultiDomainQuery(multiAccessDomains.getFirst(), multiAccessDomains.getSecond()), benchmarkContext.getArrayDimensionality()));
        }

        List<Pair<Long, Long>> middlePointQueryDomain = queryDomainGenerator.getMiddlePointQueryDomain();
        queries.add(BenchmarkQuery.middlePoint(generateSciDBQuery(middlePointQueryDomain), benchmarkContext.getArrayDimensionality()));

        return queries;
    }

    private String generateSciDBQuery(List<Pair<Long, Long>> domain) {
        return MessageFormat.format("SELECT * FROM consume((SELECT * FROM {0}))", convertToSciDBBetween(benchmarkContext.getArrayName(), domain));
    }

    private String generateMultiDomainQuery(List<Pair<Long, Long>> domain1, List<Pair<Long, Long>> domain2) {
        return MessageFormat.format("SELECT * FROM consume((SELECT * FROM {0}))", convertToSciDBDomain(benchmarkContext.getArrayName(), domain1, domain2));
    }

    public static String convertToSciDBBetween(String collectionName, List<Pair<Long, Long>> domain) {
        StringBuilder lowerBounds = new StringBuilder();
        StringBuilder upperBounds = new StringBuilder();

        boolean isFirst = true;
        int i = 0;
        for (Pair<Long, Long> axisDomain : domain) {
            if (!isFirst) {
                lowerBounds.append(",");
                upperBounds.append(",");
            }
            lowerBounds.append(axisDomain.getFirst());
            upperBounds.append(axisDomain.getSecond());

            isFirst = false;
            ++i;
        }

        return String.format("between(%s,%s,%s)", collectionName, lowerBounds.toString(), upperBounds.toString());
    }

    public static String convertToSciDBDomain(String collectionName, List<Pair<Long, Long>> domain1, List<Pair<Long, Long>> domain2) {
        return String.format("merge(aggregate(%s, count(*)),aggregate(%s, count(*)))", convertToSciDBBetween(collectionName, domain1), convertToSciDBBetween(collectionName, domain2));
    }
}


text:
package com.bladecoder.engine.actions;

import com.badlogic.gdx.graphics.Color;
import com.badlogic.gdx.math.Vector2;
import com.bladecoder.engine.actions.Param.Type;
import com.bladecoder.engine.assets.EngineAssetManager;
import com.bladecoder.engine.model.BaseActor;
import com.bladecoder.engine.model.InteractiveActor;
import com.bladecoder.engine.model.Scene;
import com.bladecoder.engine.model.Text;
import com.bladecoder.engine.model.TextManager;
import com.bladecoder.engine.model.VerbRunner;
import com.bladecoder.engine.model.World;

@ActionDescription("Draw a text in the screen")
public class TextAction implements Action {
	@ActionPropertyDescription("The 'text' to show")
	@ActionProperty(type = Type.SMALL_TEXT)
	private String text;

	@ActionPropertyDescription("The 'voice' file to play if selected.")
	@ActionProperty(type = Type.VOICE)
	private String voiceId;

	@ActionPropertyDescription("The style to use (an entry in your `ui.json` in the `com.bladecoder.engine.ui.TextManagerUI$TextManagerUIStyle` section)")
	@ActionProperty(type = Type.TEXT_STYLE, required = true, defaultValue = "default")
	private String style;

	@ActionPropertyDescription("The color to use for the font (RRGGBBAA). If not set, the default color defined in the style is used.")
	@ActionProperty(type = Type.COLOR)
	private Color color;

	@ActionProperty
	@ActionPropertyDescription("Obtain the text position from this actor.")
	private SceneActorRef target;

	@ActionProperty
	@ActionPropertyDescription("The position of the text. -1 for center. Absolute if no target is selected. Relative if the target is selected.")
	private Vector2 pos;

	@ActionProperty(required = true, defaultValue = "SUBTITLE")
	@ActionPropertyDescription("The type of the text.")
	private Text.Type type = Text.Type.PLAIN;

	@ActionProperty(defaultValue = "false")
	@ActionPropertyDescription("Queue the text if other text is showing, or show it immediately.")
	private boolean queue = false;

	@ActionProperty(required = true)
	@ActionPropertyDescription("If this param is 'false' the text is showed and the action continues inmediatly")
	private boolean wait = true;

	private World w;

	@Override
	public void init(World w) {
		this.w = w;
	}

	@Override
	public boolean run(VerbRunner cb) {

		if (text == null)
			return false;

		float x = TextManager.POS_CENTER, y = TextManager.POS_CENTER;

		if (target != null) {
			Scene ts = target.getScene(w);
			BaseActor anchorActor = ts.getActor(target.getActorId(), true);

			x = anchorActor.getX();
			y = anchorActor.getY();

			if (anchorActor instanceof InteractiveActor) {
				Vector2 refPoint = ((InteractiveActor) anchorActor).getRefPoint();
				x += refPoint.x;
				y += refPoint.y;
			}

			if (pos != null) {
				float scale = EngineAssetManager.getInstance().getScale();

				x += pos.x * scale;
				y += pos.y * scale;
			}
		} else if (pos != null) {
			float scale = EngineAssetManager.getInstance().getScale();

			if (pos.x != TextManager.POS_CENTER)
				x = pos.x * scale;

			if (pos.y != TextManager.POS_CENTER)
				y = pos.y * scale;

		} else {

			if (type == Text.Type.SUBTITLE) {
				x = y = TextManager.POS_SUBTITLE;
			}
		}

		w.getCurrentScene().getTextManager().addText(text, x, y, queue, type, color, style, null, voiceId, null,
				wait ? cb : null);

		return wait;

	}
}


text:
package com.box.l10n.mojito.cli.command;

import com.beust.jcommander.Parameter;
import com.beust.jcommander.ParameterException;
import com.beust.jcommander.Parameters;
import com.box.l10n.mojito.cli.command.param.Param;
import com.box.l10n.mojito.rest.client.exception.ResourceNotCreatedException;
import com.box.l10n.mojito.rest.entity.Repository;
import com.box.l10n.mojito.rest.entity.RepositoryLocale;
import com.google.common.io.Files;
import com.google.common.io.Resources;
import java.io.IOException;
import java.net.URL;
import java.nio.charset.StandardCharsets;
import java.nio.file.Path;
import java.nio.file.Paths;
import java.util.ArrayList;
import java.util.List;
import java.util.Set;
import org.fusesource.jansi.Ansi;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Component;

/** @author wyau */
@Component
@Scope("prototype")
@Parameters(
    commandNames = {"demo-create"},
    commandDescription = "Creates a demo repository and local resource bundle")
public class DemoCreateCommand extends RepoCommand {

  /** logger */
  static Logger logger = LoggerFactory.getLogger(DemoCreateCommand.class);

  @Parameter(
      names = {Param.REPOSITORY_NAME_LONG, Param.REPOSITORY_NAME_SHORT},
      arity = 1,
      required = true,
      description = Param.REPOSITORY_NAME_DESCRIPTION)
  String nameParam;

  @Parameter(
      names = {"--output-directory", "-o"},
      arity = 1,
      required = false,
      description = "Provide the name of the directory that will contain the resource bundle")
  String outputDirectoryParam;

  @Autowired CommandHelper commandHelper;

  CommandDirectories commandDirectories;

  Path outputDirectoryPath;

  Repository repository;

  @Override
  public void execute() throws CommandException {
    createDemoRepository();
    initOutputDirectory();
    addResourceBundleToDemoDirectory();
    importTM();
    push();

    consoleWriter
        .newLine()
        .a("Demo repository is ready!")
        .println()
        .println()
        .a("Go to directory: ")
        .fg(Ansi.Color.CYAN)
        .a(outputDirectoryPath.toString())
        .reset()
        .a(". Try to generate the localized files: ")
        .fg(Ansi.Color.CYAN)
        .a("mojito pull -r " + repository.getName())
        .reset()
        .a(" then modify ")
        .fg(Ansi.Color.CYAN)
        .a(DEMO_PROPERTIES)
        .reset()
        .a(" and re-synchronize: ")
        .fg(Ansi.Color.CYAN)
        .a("mojito push -r " + repository.getName())
        .println(2);
  }

  /** Create a directory that will contain the demo resource bundle */
  void initOutputDirectory() throws CommandException {

    if (outputDirectoryParam == null) {
      outputDirectoryPath = Paths.get(nameParam);
    } else {
      outputDirectoryPath = Paths.get(outputDirectoryParam);
    }

    try {
      java.nio.file.Files.createDirectories(outputDirectoryPath);
    } catch (IOException ioe) {
      throw new CommandException("Error creating output directory", ioe);
    }
  }

  void addResourceBundleToDemoDirectory() throws CommandException {
    try {
      String resourceBundleName = DEMO_PROPERTIES;

      URL inputResourceBundleUrl = getResourceURL(resourceBundleName);
      Path resourceBundlePath = outputDirectoryPath.resolve(resourceBundleName);

      String resourceBundleContent =
          Resources.toString(inputResourceBundleUrl, StandardCharsets.UTF_8);

      consoleWriter
          .newLine()
          .a("Add resource bundle: ")
          .fg(Ansi.Color.CYAN)
          .a(resourceBundlePath.toString())
          .println();
      Files.write(resourceBundleContent, resourceBundlePath.toFile(), StandardCharsets.UTF_8);

    } catch (IOException ioe) {
      throw new CommandException("Error copying resource bundle file into the demo directory", ioe);
    }
  }

  static final String DEMO_PROPERTIES = "demo.properties";

  void createDemoRepository() throws CommandException {

    consoleWriter
        .newLine()
        .a("Create demo repository: ")
        .fg(Ansi.Color.CYAN)
        .a(nameParam)
        .println();

    try {
      repository =
          repositoryClient.createRepository(
              nameParam,
              "",
              null,
              getRepositoryLocales(),
              extractIntegrityCheckersFromInput("properties:MESSAGE_FORMAT", false),
              null);

    } catch (ParameterException | ResourceNotCreatedException rnce) {
      throw new CommandException(rnce.getMessage(), rnce);
    }
  }

  Set<RepositoryLocale> getRepositoryLocales() throws CommandException {

    List<String> encodedBcp47Tags = new ArrayList<>();

    encodedBcp47Tags.add("da-DK");
    encodedBcp47Tags.add("de-DE");
    encodedBcp47Tags.add("(en-GB)");
    encodedBcp47Tags.add("(en-CA)->en-GB");
    encodedBcp47Tags.add("(en-AU)->en-GB");
    encodedBcp47Tags.add("es-ES");
    encodedBcp47Tags.add("fi-FI");
    encodedBcp47Tags.add("fr-FR");
    encodedBcp47Tags.add("(fr-CA)->fr-FR");
    encodedBcp47Tags.add("it-IT");
    encodedBcp47Tags.add("ja-JP");
    encodedBcp47Tags.add("ko-KR");
    encodedBcp47Tags.add("nb-NO");
    encodedBcp47Tags.add("nl-NL");
    encodedBcp47Tags.add("pl-PL");
    encodedBcp47Tags.add("pt-BR");
    encodedBcp47Tags.add("ru-RU");
    encodedBcp47Tags.add("sv-SE");
    encodedBcp47Tags.add("tr-TR");
    encodedBcp47Tags.add("zh-CN");
    encodedBcp47Tags.add("zh-TW");

    return localeHelper.extractRepositoryLocalesFromInput(encodedBcp47Tags, false);
  }

  void importTM() throws CommandException {

    consoleWriter.newLine().a("Import translation memory: ").println();

    importTMFile("Demo-1.xliff");

    for (RepositoryLocale repositoryLocale : getRepositoryLocales()) {
      String bcp47Tag = repositoryLocale.getLocale().getBcp47Tag();
      consoleWriter.a(" - locale: ").fg(Ansi.Color.CYAN).a(bcp47Tag).println();
      importTMFile("Demo-1_" + repositoryLocale.getLocale().getBcp47Tag() + ".xliff");
    }
  }

  void importTMFile(String tmFileName) throws CommandException {

    try {
      String tmFileContent = Resources.toString(getResourceURL(tmFileName), StandardCharsets.UTF_8);
      repositoryClient.importRepository(repository.getId(), tmFileContent, false);
    } catch (IOException | ResourceNotCreatedException e) {
      throw new CommandException("Error importing file [" + tmFileName + "]", e);
    }
  }

  void push() {
    new L10nJCommander()
        .run("push", "-r", repository.getName(), "-s", outputDirectoryPath.toString());
  }

  URL getResourceURL(String filename) {
    return getClass().getResource("DemoCreateCommand_IO/" + filename);
  }
}


text:
package p

import . "strings"

var _ = Index // use strings

type t struct{ Index int }

var _ = t{Index: 0}


text:
namespace GafferScene
{

class GAFFERSCENE_API Camera : public ObjectSource
{

	public :

		GAFFER_NODE_DECLARE_TYPE( GafferScene::Camera, CameraTypeId, ObjectSource );

		Camera( const std::string &name=defaultName<Camera>() );
		~Camera() override;

		Gaffer::StringPlug *projectionPlug();
		const Gaffer::StringPlug *projectionPlug() const;

		enum PerspectiveMode
		{
			FieldOfView,
			ApertureFocalLength
		};

		Gaffer::IntPlug *perspectiveModePlug();
		const Gaffer::IntPlug *perspectiveModePlug() const;

		Gaffer::FloatPlug *fieldOfViewPlug();
		const Gaffer::FloatPlug *fieldOfViewPlug() const;

		Gaffer::FloatPlug *apertureAspectRatioPlug();
		const Gaffer::FloatPlug *apertureAspectRatioPlug() const;

		Gaffer::V2fPlug *aperturePlug();
		const Gaffer::V2fPlug *aperturePlug() const;

		Gaffer::FloatPlug *focalLengthPlug();
		const Gaffer::FloatPlug *focalLengthPlug() const;

		Gaffer::V2fPlug *orthographicAperturePlug();
		const Gaffer::V2fPlug *orthographicAperturePlug() const;

		Gaffer::V2fPlug *apertureOffsetPlug();
		const Gaffer::V2fPlug *apertureOffsetPlug() const;

		Gaffer::FloatPlug *fStopPlug();
		const Gaffer::FloatPlug *fStopPlug() const;

		Gaffer::FloatPlug *focalLengthWorldScalePlug();
		const Gaffer::FloatPlug *focalLengthWorldScalePlug() const;

		Gaffer::FloatPlug *focusDistancePlug();
		const Gaffer::FloatPlug *focusDistancePlug() const;

		Gaffer::V2fPlug *clippingPlanesPlug();
		const Gaffer::V2fPlug *clippingPlanesPlug() const;

		Gaffer::CompoundDataPlug *renderSettingOverridesPlug();
		const Gaffer::CompoundDataPlug *renderSettingOverridesPlug() const;

		Gaffer::CompoundDataPlug *visualiserAttributesPlug();
		const Gaffer::CompoundDataPlug *visualiserAttributesPlug() const;

		void affects( const Gaffer::Plug *input, AffectedPlugsContainer &outputs ) const override;

	protected :

		void hashSource( const Gaffer::Context *context, IECore::MurmurHash &h ) const override;
		IECore::ConstObjectPtr computeSource( const Gaffer::Context *context ) const override;

		void hashAttributes( const SceneNode::ScenePath &path, const Gaffer::Context *context, const ScenePlug *parent, IECore::MurmurHash &h ) const override;
		IECore::ConstCompoundObjectPtr computeAttributes( const SceneNode::ScenePath &path, const Gaffer::Context *context, const ScenePlug *parent ) const override;

		IECore::ConstInternedStringVectorDataPtr computeStandardSetNames() const override;

	private :

		static size_t g_firstPlugIndex;

};

IE_CORE_DECLAREPTR( Camera )

} // namespace GafferScene

#endif // GAFFERSCENE_CAMERA_H


text:
!DOCTYPE html>

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

    <title>Monitoring Skripsi</title>

    <link href="http://localhost/MonitoringSkripsi/assets/bower_components/bootstrap/dist/css/bootstrap.min.css" rel="stylesheet">

    <link href="http://localhost/MonitoringSkripsi/assets/bower_components/metisMenu/dist/metisMenu.min.css" rel="stylesheet">

    <link href="http://localhost/MonitoringSkripsi/assets/dist/css/timeline.css" rel="stylesheet">

    <link href="http://localhost/MonitoringSkripsi/assets/dist/css/sb-admin-2.css" rel="stylesheet">

    <link href="http://localhost/MonitoringSkripsi/assets/bower_components/morrisjs/morris.css" rel="stylesheet">

    <link href="http://localhost/MonitoringSkripsi/assets/bower_components/font-awesome/css/font-awesome.min.css" rel="stylesheet" type="text/css">

                <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
                    Toggle navigation

                </button>

 Selamat Datang!

KOOR SKRIPSI

081313222773

TOPIK SKRIPSI

                          Topik Skripsi

                                    <form role="form">

	   <form id="form1" name="form1" method="post" action="v_data_topik.php">
				Cari
				<select class="form-control" name="tahun">
				<option>Tahun</option>
 			<?php for($i=2015;$i<=2020;$i++)
 					{
 						echo "<option value=".$i.">".$i."</option>";
					 }
					?>
  		</select>
				<input class="btn btn-primary" type="submit" name="Submit" value="Tampilkan"/>

  </form>

No

Tanggal

NIM

KBK

Topik

Judul

Dosen Pembimbing 1

Dosen Pembimbing 2

Kontrol

<?php
$no = 1;

foreach($skripsi as $value)
{
                ?>

                    <?php echo $no++ ;?>
					<?= $value->TanggalTopik;?>
                    <?= $value->NIM;?>
                    <?= $value->KBK;?>
                    <?= $value->Topik;?>
                    <?= $value->Judul;?>
                    <?= $value->NIK1;?>
                    <?= $value->NIK2;?>
                    <a href="<?= site_url("data_topik/edit")."?skripsi=".$value->NIM;?>"> Edit |<a href="<?= site_url("data_topik/delete")."?skripsi=".$value->NIM;?>">Delete

                  <?php
}
                ?>

		  <form name="form2" method="post" action="http://localhost/MSTopik1/index.php/data_topik/input">
              <input type="submit" name="TambahData id="TambahData" value="Tambah Data">
		  </form>


text:
require "concurrent"

# rubocop:disable ClassVars, Style/SafeNavigation
module Sapience
  # Logger stores the class name to be used for all log messages so that every
  # log message written by this instance will include the class name
  class Logger < Base
    include Sapience::Concerns::Compatibility

    # Flush all queued log entries disk, database, etc.
    #  All queued log messages are written and then each appender is flushed in turn
    def self.flush # rubocop:disable AbcSize
      return unless appender_thread
      appender_thread << lambda do
        Sapience.appenders.each do |appender|
          next unless appender.valid?
          begin
            logger.trace "Appender thread: Flushing appender: #{appender.class.name}"
            appender.flush
          rescue StandardError => exc
            $stderr.write("Appender thread: Failed to flush to appender: #{appender.inspect}\n #{exc.inspect}")
          end
        end

        logger.trace "Appender thread: All appenders flushed"
      end
    end

    # Close all appenders and flush any outstanding messages
    def self.close
      return unless appender_thread
      appender_thread << lambda do
        Sapience.appenders.each do |appender|
          next unless appender.valid?
          begin
            close_appender(appender)
          rescue StandardError => exc
            logger.error "Appender thread: Failed to close appender: #{appender.inspect}", exc
          end
        end
        logger.trace "Appender thread: All appenders flushed"
      end
    end

    def self.close_appender(appender)
      logger.trace "Appender thread: Closing appender: #{appender.name}"
      appender.flush
      appender.close
      Sapience.remove_appender(appender)
    end

    @@appender_thread = nil
    @@logger = nil

    # Internal logger for Sapience
    #   For example when an appender is not working etc..
    #   By default logs to STDERR
    def self.logger
      @@logger ||= Sapience[Sapience]
    end

    # Start the appender thread
    def self.start_appender_thread
      return false if appender_thread_active?

      @@appender_thread = Sapience.log_executor_class.new
      fail "Failed to start Appender Thread" unless @@appender_thread
      true
    end

    def self.start_invalid_appenders_task
      @@invalid_appenders_task = Concurrent::TimerTask.new(execution_interval: 120, timeout_interval: 5) do
        Sapience.appenders.each do |appender|
          next if appender.valid?
          logger.warn { "#{appender.class} is not valid. #{appender::VALIDATION_MESSAGE}" }
        end
      end
      invalid_appenders_task.execute
    end

    # Returns true if the appender_thread is active
    def self.appender_thread_active?
      @@appender_thread && @@appender_thread.running?
    end

    # Separate appender thread responsible for reading log messages and
    # calling the appenders in it's thread
    def self.appender_thread
      @@appender_thread
    end

    def self.invalid_appenders_task
      @@invalid_appenders_task
    end

    # Allow the internal logger to be overridden from its default to STDERR
    #   Can be replaced with another Ruby logger or Rails logger, but never to
    #   Sapience::Logger itself since it is for reporting problems
    #   while trying to log to the various appenders
    def self.logger=(logger)
      @@logger = logger
    end

    # Returns a Logger instance
    #
    # Return the logger for a specific class, supports class specific log levels
    #   logger = Sapience::Logger.new(self)
    # OR
    #   logger = Sapience::Logger.new('MyClass')
    #
    # Parameters:
    #  application
    #    A class, module or a string with the application/class name
    #    to be used in the logger
    #
    #  level
    #    The initial log level to start with for this logger instance
    #    Default: Sapience.config.default_level
    #
    #  filter [Regexp|Proc]
    #    RegExp: Only include log messages where the class name matches the supplied
    #    regular expression. All other messages will be ignored
    #    Proc: Only include log messages where the supplied Proc returns true
    #          The Proc must return true or false
    def initialize(klass, level = nil, filter = nil)
      super
    end

    # Place log request on the queue for the Appender thread to write to each
    # appender in the order that they were registered
    def log(log, message = nil, progname = nil, &block)
      # Compatibility with ::Logger
      return add(log, message, progname, &block) unless log.is_a?(Sapience::Log)
      if @@appender_thread
        @@appender_thread << lambda do
          Sapience.appenders.each do |appender|
            next unless appender.valid?
            begin
              appender.log(log)
            rescue StandardError => exc
              $stderr.write("Appender thread: Failed to log to appender: #{appender.inspect}\n #{exc.inspect}")
            end
          end
          Sapience.clear_tags!
        end
      end
    end

    def flush
      self.class.flush
    end
  end
end
# rubocop:enable ClassVars, Style/SafeNavigation


text:
#include <gtest/gtest.h>
#include "sjparser/sjparser.h"

using namespace SJParser;

TEST(StandaloneSUnion, Empty) {
  std::string buf(R"({})");

  Parser parser{SUnion{
      TypeHolder<int64_t>{}, "type",
      std::tuple{
          Member{1, SAutoObject{std::tuple{Member{"bool", Value<bool>{}}}}},
          Member{2,
                 SAutoObject{std::tuple{Member{"int", Value<int64_t>{}}}}}}}};

  ASSERT_NO_THROW(parser.parse(buf));
  ASSERT_NO_THROW(parser.finish());

  ASSERT_FALSE(parser.parser().isSet());
  ASSERT_TRUE(parser.parser().isEmpty());
}

TEST(StandaloneSUnion, EmptyWithType) {
  std::string buf(R"({"type": 1})");

  Parser parser{SUnion{
      TypeHolder<int64_t>{}, "type",
      std::tuple{
          Member{1, SAutoObject{std::tuple{Member{"bool", Value<bool>{}}}}},
          Member{2,
                 SAutoObject{std::tuple{Member{"int", Value<int64_t>{}}}}}}}};

  try {
    parser.parse(buf);
    FAIL() << "No exception thrown";
  } catch (ParsingError &e) {
    ASSERT_FALSE(parser.parser().isSet());
    ASSERT_EQ("Can not set value: Mandatory member #0 is not present",
              e.sjparserError());

    ASSERT_EQ(
        R"(parse error: client cancelled parse via callback return value
                             {"type": 1}
                     (right here) ------^
)",
        e.parserError());
  } catch (...) {
    FAIL() << "Invalid exception thrown";
  }
}

TEST(StandaloneSUnion, OptionalMember) {
  std::string buf(R"({"type": 1})");

  Parser parser{SUnion{
      TypeHolder<int64_t>{}, "type",
      std::tuple{
          Member{1, SAutoObject{std::tuple{Member{"bool", Value<bool>{}}}},
                 Presence::Optional},
          Member{2,
                 SAutoObject{std::tuple{Member{"int", Value<int64_t>{}}}}}}}};

  try {
    parser.parse(buf);
    FAIL() << "No exception thrown";
  } catch (ParsingError &e) {
    ASSERT_FALSE(parser.parser().isSet());
    ASSERT_EQ(
        "Can not set value: Optional member #0 does not have a default value",
        e.sjparserError());

    ASSERT_EQ(
        R"(parse error: client cancelled parse via callback return value
                             {"type": 1}
                     (right here) ------^
)",
        e.parserError());
  } catch (...) {
    FAIL() << "Invalid exception thrown";
  }
}

TEST(StandaloneSUnion, OptionalMemberWithDefaultValue) {
  std::string buf(R"({"type": 1})");

  Parser parser{SUnion{
      TypeHolder<int64_t>{}, "type",
      std::tuple{
          Member{1, SAutoObject{std::tuple{Member{"bool", Value<bool>{}}}},
                 Presence::Optional, std::tuple<bool>{false}},
          Member{2,
                 SAutoObject{std::tuple{Member{"int", Value<int64_t>{}}}}}}}};

  ASSERT_NO_THROW(parser.parse(buf));
  ASSERT_NO_THROW(parser.finish());

  auto variant = parser.parser().get();

  ASSERT_EQ(0, variant.index());

  ASSERT_EQ(false, std::get<0>(std::get<0>(variant)));
}

TEST(StandaloneSUnion, Null) {
  std::string buf(R"(null)");

  Parser parser{SUnion{
      TypeHolder<int64_t>{}, "type",
      std::tuple{
          Member{1, SAutoObject{std::tuple{Member{"bool", Value<bool>{}}}}},
          Member{2,
                 SAutoObject{std::tuple{Member{"int", Value<int64_t>{}}}}}}}};

  ASSERT_NO_THROW(parser.parse(buf));
  ASSERT_NO_THROW(parser.finish());

  ASSERT_FALSE(parser.parser().isSet());
  ASSERT_TRUE(parser.parser().isEmpty());
}

TEST(StandaloneSUnion, Reset) {
  std::string buf(R"({"type": 1, "bool": true, "integer": 10})");

  Parser parser{SUnion{
      TypeHolder<int64_t>{}, "type",
      std::tuple{
          Member{1,
                 SAutoObject{std::tuple{Member{"bool", Value<bool>{}},
                                        Member{"integer", Value<int64_t>{}}}}},
          Member{2, SAutoObject{std::tuple{Member{"bool", Value<bool>{}}}}}}}};

  ASSERT_NO_THROW(parser.parse(buf));
  ASSERT_NO_THROW(parser.finish());

  auto variant = parser.parser().get();

  ASSERT_EQ(0, variant.index());

  auto object = std::get<0>(variant);

  ASSERT_EQ(true, std::get<0>(object));
  ASSERT_EQ(10, std::get<1>(object));

  buf = R"(null)";

  ASSERT_NO_THROW(parser.parse(buf));
  ASSERT_NO_THROW(parser.finish());

  ASSERT_FALSE(parser.parser().isSet());
  ASSERT_TRUE(parser.parser().isEmpty());
}

TEST(StandaloneSUnion, AllValuesMembers) {
  std::string buf(R"({"type": 1, "bool": true, "integer": 10})");

  Parser parser{SUnion{
      TypeHolder<int64_t>{}, "type",
      std::tuple{Member{1, SAutoObject{std::tuple{
                               Member{"bool", Value<bool>{}},
                               Member{"integer", Value<int64_t>{}}}}},
                 Member{2, SAutoObject{std::tuple{
                               Member{"double", Value<double>{}},
                               Member{"string", Value<std::string>{}}}}}}}};

  ASSERT_NO_THROW(parser.parse(buf));
  ASSERT_NO_THROW(parser.finish());

  {
    auto variant = parser.parser().get();

    ASSERT_EQ(0, variant.index());

    auto object = std::get<0>(variant);

    ASSERT_EQ(true, std::get<0>(object));
    ASSERT_EQ(10, std::get<1>(object));
  }

  buf = R"({"type": 2, "double": 11.5, "string": "value"})";

  ASSERT_NO_THROW(parser.parse(buf));
  ASSERT_NO_THROW(parser.finish());

  {
    auto variant = parser.parser().get();

    ASSERT_EQ(1, variant.index());

    auto object = std::get<1>(variant);

    ASSERT_EQ(11.5, std::get<0>(object));
    ASSERT_EQ("value", std::get<1>(object));
  }
}

TEST(StandaloneSUnion, StringType) {
  std::string buf(
      R"(
{
  "type": "1",
  "bool": true
})");

  Parser parser{SUnion{
      TypeHolder<std::string>{}, "type",
      std::tuple{
          Member{"1", SAutoObject{std::tuple{Member{"bool", Value<bool>{}}}}},
          Member{"2",
                 SAutoObject{std::tuple{Member{"int", Value<int64_t>{}}}}}}}};

  ASSERT_NO_THROW(parser.parse(buf));
  ASSERT_NO_THROW(parser.finish());

  {
    auto variant = parser.parser().get();

    ASSERT_EQ(0, variant.index());

    ASSERT_EQ(true, std::get<0>(std::get<0>(variant)));
  }

  buf = R"(
{
  "type": "2",
  "int": 100
})";

  ASSERT_NO_THROW(parser.parse(buf));
  ASSERT_NO_THROW(parser.finish());

  {
    auto variant = parser.parser().get();

    ASSERT_EQ(1, variant.index());

    ASSERT_EQ(100, std::get<0>(std::get<1>(variant)));
  }
}

TEST(StandaloneSUnion, IncorrectTypeType) {
  std::string buf(
      R"(
{
  "type": "1",
  "bool": true
})");

  Parser parser{SUnion{
      TypeHolder<int64_t>{}, "type",
      std::tuple{
          Member{1, SAutoObject{std::tuple{Member{"bool", Value<bool>{}}}}},
          Member{2,
                 SAutoObject{std::tuple{Member{"int", Value<int64_t>{}}}}}}}};

  try {
    parser.parse(buf);
    FAIL() << "No exception thrown";
  } catch (ParsingError &e) {
    ASSERT_FALSE(parser.parser().isSet());

    ASSERT_EQ("Unexpected token string", e.sjparserError());
    ASSERT_EQ(
        R"(parse error: client cancelled parse via callback return value
                         {   "type": "1",   "bool": true }
                     (right here) ------^
)",
        e.parserError());
  } catch (...) {
    FAIL() << "Invalid exception thrown";
  }
}

TEST(StandaloneSUnion, IncorrectTypeValue) {
  std::string buf(
      R"(
{
  "type": 3,
  "bool": true
})");

  Parser parser{SUnion{
      TypeHolder<int64_t>{}, "type",
      std::tuple{
          Member{1, SAutoObject{std::tuple{Member{"bool", Value<bool>{}}}}},
          Member{2,
                 SAutoObject{std::tuple{Member{"int", Value<int64_t>{}}}}}}}};

  try {
    parser.parse(buf);
    FAIL() << "No exception thrown";
  } catch (ParsingError &e) {
    ASSERT_FALSE(parser.parser().isSet());

    ASSERT_EQ("Unexpected member 3", e.sjparserError());
    ASSERT_EQ(
        R"(parse error: client cancelled parse via callback return value
                           {   "type": 3,   "bool": true }
                     (right here) ------^
)",
        e.parserError());
  } catch (...) {
    FAIL() << "Invalid exception thrown";
  }
}

TEST(StandaloneSUnion, IncorrectTypeMember) {
  std::string buf(
      R"(
{
  "error": 1,
  "bool": true
})");

  Parser parser{SUnion{
      TypeHolder<int64_t>{}, "type",
      std::tuple{
          Member{1, SAutoObject{std::tuple{Member{"bool", Value<bool>{}}}}},
          Member{2,
                 SAutoObject{std::tuple{Member{"int", Value<int64_t>{}}}}}}}};

  try {
    parser.parse(buf);
    FAIL() << "No exception thrown";
  } catch (ParsingError &e) {
    ASSERT_FALSE(parser.parser().isSet());

    ASSERT_EQ("Unexpected member error", e.sjparserError());
    ASSERT_EQ(
        R"(parse error: client cancelled parse via callback return value
                             {   "error": 1,   "bool": true }
                     (right here) ------^
)",
        e.parserError());
  } catch (...) {
    FAIL() << "Invalid exception thrown";
  }
}

TEST(StandaloneSUnion, MembersWithCallbackError) {
  std::string buf(
      R"(
{
  "type": 1,
  "bool": true
})");

  auto boolCb = [&](const std::tuple<bool> &) { return false; };

  auto intCb = [&](const std::tuple<int64_t> &) { return false; };

  Parser parser{
      SUnion{TypeHolder<int64_t>{}, "type",
             std::tuple{Member{1, SAutoObject{std::tuple{
                                      Member{"bool", Value<bool>{boolCb}}}}},
                        Member{2, SAutoObject{std::tuple{Member{
                                      "int", Value<int64_t>{intCb}}}}}}}};

  try {
    parser.parse(buf);
    FAIL() << "No exception thrown";
  } catch (ParsingError &e) {
    ASSERT_FALSE(parser.parser().isSet());

    ASSERT_EQ("Callback returned false", e.sjparserError());
    ASSERT_EQ(
        R"(parse error: client cancelled parse via callback return value
           {   "type": 1,   "bool": true }
                     (right here) ------^
)",
        e.parserError());
  } catch (...) {
    FAIL() << "Invalid exception thrown";
  }

  buf = R"(
{
  "type": 2,
  "int": 100
})";

  try {
    parser.parse(buf);
    FAIL() << "No exception thrown";
  } catch (ParsingError &e) {
    ASSERT_FALSE(parser.parser().isSet());

    ASSERT_EQ("Callback returned false", e.sjparserError());
    ASSERT_EQ(
        R"(parse error: client cancelled parse via callback return value
             {   "type": 2,   "int": 100 }
                     (right here) ------^
)",
        e.parserError());
  } catch (...) {
    FAIL() << "Invalid exception thrown";
  }
}

TEST(StandaloneSUnion, SUnionWithCallback) {
  std::string buf(
      R"(
{
  "type": 1,
  "bool": true
})");

  bool bool_value = false;
  int64_t int_value;

  Parser parser{SUnion{
      TypeHolder<int64_t>{}, "type",
      std::tuple{
          Member{1, SAutoObject{std::tuple{Member{"bool", Value<bool>{}}}}},
          Member{2,
                 SAutoObject{std::tuple{Member{"int", Value<int64_t>{}}}}}}}};

  auto unionCb =
      [&](const std::variant<std::tuple<bool>, std::tuple<int64_t>> &value) {
        if (value.index() == 0) {
          bool_value = std::get<0>(std::get<0>(value));
        } else {
          int_value = std::get<0>(std::get<1>(value));
        }
        return true;
      };

  parser.parser().setFinishCallback(unionCb);

  ASSERT_NO_THROW(parser.parse(buf));
  ASSERT_NO_THROW(parser.finish());

  ASSERT_EQ(true, std::get<0>(std::get<0>(parser.parser().get())));
  ASSERT_EQ(true, bool_value);

  buf = R"(
{
  "type": 2,
  "int": 100
})";

  ASSERT_NO_THROW(parser.parse(buf));
  ASSERT_NO_THROW(parser.finish());

  ASSERT_EQ(100, std::get<0>(std::get<1>(parser.parser().get())));
  ASSERT_EQ(100, int_value);
}

TEST(StandaloneSUnion, SUnionWithCallbackError) {
  std::string buf(R"(
{
  "type": 1,
  "bool": true
})");

  Parser parser{SUnion{
      TypeHolder<int64_t>{}, "type",
      std::tuple{
          Member{1, SAutoObject{std::tuple{Member{"bool", Value<bool>{}}}}},
          Member{2,
                 SAutoObject{std::tuple{Member{"int", Value<int64_t>{}}}}}}}};

  auto unionCb =
      [&](const std::variant<std::tuple<bool>, std::tuple<int64_t>> &) {
        return false;
      };

  parser.parser().setFinishCallback(unionCb);

  try {
    parser.parse(buf);
    FAIL() << "No exception thrown";
  } catch (ParsingError &e) {
    ASSERT_TRUE(parser.parser().isSet());

    ASSERT_EQ("Callback returned false", e.sjparserError());
    ASSERT_EQ(
        R"(parse error: client cancelled parse via callback return value
             "type": 1,   "bool": true }
                     (right here) ------^
)",
        e.parserError());
  } catch (...) {
    FAIL() << "Invalid exception thrown";
  }
}

TEST(StandaloneSUnion, SUnionWithUnexpectedObject) {
  std::string buf(
      R"(
{
  "type": 1,
  "error": true
})");

  Parser parser{SUnion{
      TypeHolder<int64_t>{}, "type",
      std::tuple{
          Member{1, SAutoObject{std::tuple{Member{"bool", Value<bool>{}}}}},
          Member{2,
                 SAutoObject{std::tuple{Member{"int", Value<int64_t>{}}}}}}}};

  try {
    parser.parse(buf);
    FAIL() << "No exception thrown";
  } catch (ParsingError &e) {
    ASSERT_FALSE(parser.parser().isSet());

    ASSERT_EQ("Unexpected member error", e.sjparserError());
    ASSERT_EQ(
        R"(parse error: client cancelled parse via callback return value
                {   "type": 1,   "error": true }
                     (right here) ------^
)",
        e.parserError());
  } catch (...) {
    FAIL() << "Invalid exception thrown";
  }
}

template <typename Member1, typename Member2> struct MoveStruct {
  Member1 member1;
  Member2 member2;
  static bool copy_used;

  MoveStruct() {
    if constexpr (std::is_integral_v<
                      Member1> || std::is_floating_point_v<Member1>) {
      member1 = 0;
    }
    if constexpr (std::is_integral_v<
                      Member2> || std::is_floating_point_v<Member2>) {
      member2 = 0;
    }
  }

  MoveStruct(const MoveStruct<Member1, Member2> &other) {
    member1 = std::move(other.member1);
    member2 = std::move(other.member2);
    copy_used = true;
  }

  MoveStruct &operator=(const MoveStruct<Member1, Member2> &other) {
    member1 = std::move(other.member1);
    member2 = std::move(other.member2);
    copy_used = true;
    return *this;
  }

  MoveStruct(MoveStruct<Member1, Member2> &&other) {
    member1 = std::move(other.member1);
    member2 = std::move(other.member2);
  }
};

template <typename Member1, typename Member2>
bool MoveStruct<Member1, Member2>::copy_used = false;

TEST(StandaloneSUnion, Move) {
  std::string buf(R"({"type": 1, "bool": true, "integer": 10})");

  using ObjectStruct1 = MoveStruct<bool, int64_t>;
  using ObjectStruct2 = MoveStruct<double, std::string>;

  Parser parser{SUnion{
      TypeHolder<int64_t>{}, "type",
      std::tuple{
          Member{1, SCustomObject{TypeHolder<ObjectStruct1>{},
                                  std::tuple{
                                      Member{"bool", Value<bool>{}},
                                      Member{"integer", Value<int64_t>{}}}}},
          Member{2, SCustomObject{
                        TypeHolder<ObjectStruct2>{},
                        std::tuple{Member{"double", Value<double>{}},
                                   Member{"string", Value<std::string>{}}}}}}}};

  auto objectCb1 = [&](decltype(parser)::ParserType::ParserType<0> &parser,
                       auto &value) {
    value.member1 = parser.get<0>();
    value.member2 = parser.get<1>();
    return true;
  };

  auto objectCb2 = [&](decltype(parser)::ParserType::ParserType<1> &parser,
                       auto &value) {
    value.member1 = parser.get<0>();
    value.member2 = parser.get<1>();
    return true;
  };

  parser.parser().parser<0>().setFinishCallback(objectCb1);
  parser.parser().parser<1>().setFinishCallback(objectCb2);

  ASSERT_NO_THROW(parser.parse(buf));
  ASSERT_NO_THROW(parser.finish());

  ObjectStruct1::copy_used = false;

  {
    auto variant = parser.parser().pop();
    ASSERT_FALSE(parser.parser().isSet());

    ASSERT_FALSE((ObjectStruct1::copy_used));

    ASSERT_EQ(0, variant.index());

    auto &object = std::get<0>(variant);

    ASSERT_EQ(true, object.member1);
    ASSERT_EQ(10, object.member2);
  }

  buf = R"({"type": 2, "double": 11.5, "string": "value"})";

  ASSERT_NO_THROW(parser.parse(buf));
  ASSERT_NO_THROW(parser.finish());

  ObjectStruct2::copy_used = false;

  {
    auto variant = parser.parser().pop();
    ASSERT_FALSE(parser.parser().isSet());

    ASSERT_FALSE((ObjectStruct2::copy_used));

    ASSERT_EQ(1, variant.index());

    auto &object = std::get<1>(variant);

    ASSERT_EQ(11.5, object.member1);
    ASSERT_EQ("value", object.member2);
  }
}

TEST(StandaloneSUnion, UnknownExceptionInValueSetter) {
  std::string buf(R"({"type": 1, "bool": true})");

  struct ObjectStruct {
    bool throw_on_assign = false;

    ObjectStruct() {}

    ObjectStruct(const ObjectStruct &) {}

    ObjectStruct &operator=(const ObjectStruct &other) {
      throw_on_assign = other.throw_on_assign;
      if (throw_on_assign) {
        throw 10;
      }
      return *this;
    }
  };

  Parser parser{SUnion{
      TypeHolder<int64_t>{}, "type",
      std::tuple{
          Member{1, SCustomObject{TypeHolder<ObjectStruct>{},
                                  std::tuple{Member{"bool", Value<bool>{}}}}},
          Member{2,
                 SAutoObject{std::tuple{Member{"int", Value<int64_t>{}}}}}}}};

  auto innerObjectCb = [&](decltype(parser)::ParserType::ParserType<0> &,
                           ObjectStruct &object) {
    object.throw_on_assign = true;
    return true;
  };

  parser.parser().parser<0>().setFinishCallback(innerObjectCb);

  try {
    parser.parse(buf);
    FAIL() << "No exception thrown";
  } catch (ParsingError &e) {
    ASSERT_FALSE(parser.parser().isSet());
    ASSERT_EQ("Can not set value: unknown exception", e.sjparserError());

    ASSERT_EQ(
        R"(parse error: client cancelled parse via callback return value
               {"type": 1, "bool": true}
                     (right here) ------^
)",
        e.parserError());
  } catch (...) {
    FAIL() << "Invalid exception thrown";
  }
}

TEST(StandaloneSUnion, StandaloneSUnionWithParserReference) {
  std::string buf(
      R"(
{
  "type": 1,
  "bool": true,
  "string": "value"
})");

  SAutoObject sautoobject{std::tuple{Member{"bool", Value<bool>{}},
                                     Member{"string", Value<std::string>{}}}};

  Parser parser{SUnion{TypeHolder<int64_t>{}, "type",
                       std::tuple{Member{1, sautoobject},
                                  Member{2, SAutoObject{std::tuple{Member{
                                                "int", Value<int64_t>{}}}}}}}};

  ASSERT_NO_THROW(parser.parse(buf));
  ASSERT_NO_THROW(parser.finish());

  ASSERT_EQ(true, std::get<0>(std::get<0>(parser.parser().get())));
  ASSERT_EQ("value", std::get<1>(std::get<0>(parser.parser().get())));

  buf = R"(
{
  "type": 2,
  "int": 100
})";

  ASSERT_NO_THROW(parser.parse(buf));
  ASSERT_NO_THROW(parser.finish());

  ASSERT_EQ(100, std::get<0>(std::get<1>(parser.parser().get())));

  ASSERT_EQ(&(parser.parser().parser<0>()), &sautoobject);
}

TEST(StandaloneSUnion, MoveAssignment) {
  std::string buf(R"({"type": 1, "bool": true, "integer": 10})");

  auto sunion_parser_src = SUnion{
      TypeHolder<int64_t>{}, "type",
      std::tuple{Member{1, SAutoObject{std::tuple{
                               Member{"bool", Value<bool>{}},
                               Member{"integer", Value<int64_t>{}}}}},
                 Member{2, SAutoObject{std::tuple{
                               Member{"double", Value<double>{}},
                               Member{"string", Value<std::string>{}}}}}}};
  auto sunion_parser = SUnion{
      TypeHolder<int64_t>{}, "type",
      std::tuple{Member{1, SAutoObject{std::tuple{
                               Member{"bool_", Value<bool>{}},
                               Member{"integer_", Value<int64_t>{}}}}},
                 Member{2, SAutoObject{std::tuple{
                               Member{"double_", Value<double>{}},
                               Member{"string_", Value<std::string>{}}}}}}};
  sunion_parser = std::move(sunion_parser_src);

  Parser parser{sunion_parser};

  ASSERT_NO_THROW(parser.parse(buf));
  ASSERT_NO_THROW(parser.finish());

  auto variant = parser.parser().get();

  ASSERT_EQ(0, variant.index());

  auto object = std::get<0>(variant);

  ASSERT_EQ(true, std::get<0>(object));
  ASSERT_EQ(10, std::get<1>(object));
}


text:
KACircleProgressView
====================

Dynamic circle progress view for iOS.
Tested on iOS 6.x and 7.x.

Feature(s):
- Dynamic in size, color, line widths (of both progress line AND background circle line) and type.
- Easy to implement.
- Fully vectorized (no bitmap images).

![alt tag](http://thepearapps.com/progressView@2x.png)


text:
package org.springframework.test.context.testng;

import static org.springframework.test.transaction.TransactionTestUtils.assertInTransaction;
import static org.springframework.test.transaction.TransactionTestUtils.inTransaction;
import static org.testng.Assert.assertEquals;
import static org.testng.Assert.assertNotNull;
import static org.testng.Assert.assertNull;
import static org.testng.Assert.assertTrue;

import javax.annotation.Resource;
import javax.sql.DataSource;

import org.springframework.beans.Employee;
import org.springframework.beans.Pet;
import org.springframework.beans.factory.BeanNameAware;
import org.springframework.beans.factory.InitializingBean;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.jdbc.BadSqlGrammarException;
import org.springframework.jdbc.core.simple.SimpleJdbcTemplate;
import org.springframework.test.annotation.NotTransactional;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.transaction.AfterTransaction;
import org.springframework.test.context.transaction.BeforeTransaction;
import org.springframework.test.jdbc.SimpleJdbcTestUtils;
import org.testng.annotations.AfterClass;
import org.testng.annotations.AfterMethod;
import org.testng.annotations.BeforeClass;
import org.testng.annotations.BeforeMethod;
import org.testng.annotations.Test;

/**
 * Combined unit test for {@link AbstractTestNGSpringContextTests} and
 * {@link AbstractTransactionalTestNGSpringContextTests}.
 *
 * @author Sam Brannen
 * @since 2.5
 */
@ContextConfiguration
public class ConcreteTransactionalTestNGSpringContextTests extends AbstractTransactionalTestNGSpringContextTests
        implements BeanNameAware, InitializingBean {

    // ------------------------------------------------------------------------|
    // --- CONSTANTS ----------------------------------------------------------|
    // ------------------------------------------------------------------------|

    private static final String BOB = "bob";
    private static final String JANE = "jane";
    private static final String SUE = "sue";
    private static final String YODA = "yoda";

    // ------------------------------------------------------------------------|
    // --- STATIC VARIABLES ---------------------------------------------------|
    // ------------------------------------------------------------------------|

    private static int numSetUpCalls = 0;
    private static int numSetUpCallsInTransaction = 0;
    private static int numTearDownCalls = 0;
    private static int numTearDownCallsInTransaction = 0;

    // ------------------------------------------------------------------------|
    // --- INSTANCE VARIABLES -------------------------------------------------|
    // ------------------------------------------------------------------------|

    private boolean beanInitialized = false;

    private String beanName = "replace me with [" + getClass().getName() + "]";

    private Employee employee;

    @Autowired
    private Pet pet;

    @Autowired(required = false)
    protected Long nonrequiredLong;

    @Resource()
    protected String foo;

    protected String bar;

    // ------------------------------------------------------------------------|
    // --- STATIC METHODS -----------------------------------------------------|
    // ------------------------------------------------------------------------|

    private static int clearPersonTable(SimpleJdbcTemplate simpleJdbcTemplate) {
        return SimpleJdbcTestUtils.deleteFromTables(simpleJdbcTemplate, "person");
    }

    private static void createPersonTable(SimpleJdbcTemplate simpleJdbcTemplate) {
        try {
            simpleJdbcTemplate.update("CREATE TABLE person (name VARCHAR(20) NOT NULL, PRIMARY KEY(name))");
        }
        catch (BadSqlGrammarException bsge) {
            /* ignore */
        }
    }

    private static int countRowsInPersonTable(SimpleJdbcTemplate simpleJdbcTemplate) {
        return SimpleJdbcTestUtils.countRowsInTable(simpleJdbcTemplate, "person");
    }

    private static int addPerson(SimpleJdbcTemplate simpleJdbcTemplate, String name) {
        return simpleJdbcTemplate.update("INSERT INTO person VALUES(?)", name);
    }

    private static int deletePerson(SimpleJdbcTemplate simpleJdbcTemplate, String name) {
        return simpleJdbcTemplate.update("DELETE FROM person WHERE name=?", name);
    }

    // ------------------------------------------------------------------------|
    // --- INSTANCE METHODS ---------------------------------------------------|
    // ------------------------------------------------------------------------|

    public void afterPropertiesSet() throws Exception {
        this.beanInitialized = true;
    }

    public void setBeanName(String beanName) {
        this.beanName = beanName;
    }

    @Autowired
    protected void setEmployee(Employee employee) {
        this.employee = employee;
    }

    @Resource
    protected void setBar(String bar) {
        this.bar = bar;
    }

    // ------------------------------------------------------------------------|

    private void assertNumRowsInPersonTable(int expectedNumRows, String testState) {
        assertEquals(countRowsInPersonTable(this.simpleJdbcTemplate), expectedNumRows,
                "Verifying the number of rows in the person table (" + testState + ").");
    }

    private void assertAddPerson(final String name) {
        assertEquals(addPerson(this.simpleJdbcTemplate, name), 1, "Adding '" + name + "'");
    }

    // ------------------------------------------------------------------------|

    @BeforeClass
    public void beforeClass() {
        numSetUpCalls = 0;
        numSetUpCallsInTransaction = 0;
        numTearDownCalls = 0;
        numTearDownCallsInTransaction = 0;
    }

    @AfterClass
    public void afterClass() {
        assertEquals(numSetUpCalls, 8, "Verifying number of calls to setUp().");
        assertEquals(numSetUpCallsInTransaction, 1, "Verifying number of calls to setUp() within a transaction.");
        assertEquals(numTearDownCalls, 8, "Verifying number of calls to tearDown().");
        assertEquals(numTearDownCallsInTransaction, 1, "Verifying number of calls to tearDown() within a transaction.");
    }

    @Test
    @NotTransactional
    public void verifyApplicationContextSet() {
        assertInTransaction(false);
        assertNotNull(super.applicationContext,
                "The application context should have been set due to ApplicationContextAware semantics.");
        Employee employeeBean = (Employee) super.applicationContext.getBean("employee");
        assertEquals(employeeBean.getName(), "John Smith", "Verifying employee's name.");
    }

    @Test
    @NotTransactional
    public void verifyBeanInitialized() {
        assertInTransaction(false);
        assertTrue(this.beanInitialized,
                "This test instance should have been initialized due to InitializingBean semantics.");
    }

    @Test
    @NotTransactional
    public void verifyBeanNameSet() {
        assertInTransaction(false);
        assertEquals(this.beanName, getClass().getName(),
                "The bean name of this test instance should have been set due to BeanNameAware semantics.");
    }

    @Test
    @NotTransactional
    public void verifyAnnotationAutowiredFields() {
        assertInTransaction(false);
        assertNull(this.nonrequiredLong, "The nonrequiredLong field should NOT have been autowired.");
        assertNotNull(this.pet, "The pet field should have been autowired.");
        assertEquals(this.pet.getName(), "Fido", "Verifying pet's name.");
    }

    @Test
    @NotTransactional
    public void verifyAnnotationAutowiredMethods() {
        assertInTransaction(false);
        assertNotNull(this.employee, "The setEmployee() method should have been autowired.");
        assertEquals(this.employee.getName(), "John Smith", "Verifying employee's name.");
    }

    @Test
    @NotTransactional
    public void verifyResourceAnnotationInjectedFields() {
        assertInTransaction(false);
        assertEquals(this.foo, "Foo", "The foo field should have been injected via @Resource.");
    }

    @Test
    @NotTransactional
    public void verifyResourceAnnotationInjectedMethods() {
        assertInTransaction(false);
        assertEquals(this.bar, "Bar", "The setBar() method should have been injected via @Resource.");
    }

    // ------------------------------------------------------------------------|

    @BeforeTransaction
    public void beforeTransaction() {
        assertNumRowsInPersonTable(1, "before a transactional test method");
        assertAddPerson(YODA);
    }

    @BeforeMethod
    public void setUp() throws Exception {
        numSetUpCalls++;
        if (inTransaction()) {
            numSetUpCallsInTransaction++;
        }
        assertNumRowsInPersonTable((inTransaction() ? 2 : 1), "before a test method");
    }

    @Test
    public void modifyTestDataWithinTransaction() {
        assertInTransaction(true);
        assertAddPerson(JANE);
        assertAddPerson(SUE);
        assertNumRowsInPersonTable(4, "in modifyTestDataWithinTransaction()");
    }

    @AfterMethod
    public void tearDown() throws Exception {
        numTearDownCalls++;
        if (inTransaction()) {
            numTearDownCallsInTransaction++;
        }
        assertNumRowsInPersonTable((inTransaction() ? 4 : 1), "after a test method");
    }

    @AfterTransaction
    public void afterTransaction() {
        assertEquals(deletePerson(this.simpleJdbcTemplate, YODA), 1, "Deleting yoda");
        assertNumRowsInPersonTable(1, "after a transactional test method");
    }

    // ------------------------------------------------------------------------|
    // --- TYPES --------------------------------------------------------------|
    // ------------------------------------------------------------------------|

    public static class DatabaseSetup {

        @Autowired
        void setDataSource(DataSource dataSource) {
            SimpleJdbcTemplate simpleJdbcTemplate = new SimpleJdbcTemplate(dataSource);
            createPersonTable(simpleJdbcTemplate);
            clearPersonTable(simpleJdbcTemplate);
            addPerson(simpleJdbcTemplate, BOB);
        }
    }

}


text:
package org.apache.jackrabbit.oak.plugins.segment.standby;

import org.apache.jackrabbit.oak.plugins.segment.DebugSegmentStore;
import org.apache.jackrabbit.oak.plugins.segment.SegmentNodeStore;
import org.apache.jackrabbit.oak.plugins.segment.standby.client.StandbyClient;
import org.apache.jackrabbit.oak.plugins.segment.standby.server.StandbyServer;
import org.apache.jackrabbit.oak.spi.state.NodeStore;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;

import static org.apache.jackrabbit.oak.plugins.segment.SegmentTestUtils.addTestContent;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;

public class RecoverTestIT extends TestBase {

    @Before
    public void setUp() throws Exception {
        setUpServerAndClient();
    }

    @After
    public void after() {
        closeServerAndClient();
    }

    @Test
    public void testBrokenConnection() throws Exception {

        NodeStore store = SegmentNodeStore.builder(storeS).build();
        DebugSegmentStore s = new DebugSegmentStore(storeS);
        addTestContent(store, "server");
        storeS.flush();

        final StandbyServer server = new StandbyServer(port, s);
        s.createReadErrors = true;
        server.start();

        StandbyClient cl = newStandbyClient(storeC);
        cl.run();

        try {
            assertFalse("store are not expected to be equal", storeS.getHead().equals(storeC.getHead()));
            s.createReadErrors = false;
            cl.run();
            assertEquals(storeS.getHead(), storeC.getHead());
        } finally {
            server.close();
            cl.close();
        }

    }

    @Test
    public void testLocalChanges() throws Exception {

        NodeStore store = SegmentNodeStore.builder(storeC).build();
        addTestContent(store, "client");

        final StandbyServer server = new StandbyServer(port, storeS);
        server.start();
        store = SegmentNodeStore.builder(storeS).build();
        addTestContent(store, "server");
        storeS.flush();

        StandbyClient cl = newStandbyClient(storeC);
        try {
            assertFalse("stores are not expected to be equal", storeS.getHead().equals(storeC.getHead()));
            cl.run();
            assertEquals(storeS.getHead(), storeC.getHead());
        } finally {
            server.close();
            cl.close();
        }

    }
}


text:
<Record>
<Term>Acetohydroxamic Acid</Term>
<SemanticType>Pharmacologic Substance</SemanticType>
<SemanticType>Organic Chemical</SemanticType>
<ParentTerm>Chelating Agent</ParentTerm>
<ClassificationPath>Chemicals_and_Drugs_Kind/Drug, Food, Chemical or Biomedical Material/Pharmacologic Substance/Protective Agent/Chelating Agent/Acetohydroxamic Acid</ClassificationPath>
<BroaderTerm>Chelating Agent</BroaderTerm>
<BroaderTerm>Chemicals_and_Drugs_Kind</BroaderTerm>
<BroaderTerm>Protective Agent</BroaderTerm>
<BroaderTerm>Pharmacologic Substance</BroaderTerm>
<BroaderTerm>Acetohydroxamic Acid</BroaderTerm>
<BroaderTerm>Drug, Food, Chemical or Biomedical Material</BroaderTerm>
<Synonym>Acetohydroxamic acid</Synonym>
<Synonym>ACETOHYDROXAMIC ACID</Synonym>
<Synonym>N-Hydroxy-acetamide</Synonym>
<Synonym>Acetohydroximic Acid</Synonym>
<Synonym>Lithostat</Synonym>
<Synonym>Acetohydroxamic Acid</Synonym>
<Synonym>N-Acetyl Hydroxyacetamide</Synonym>
<Synonym>2-Hydroxyamino-2-ethanal</Synonym>
<Description>A urea analogue with bacterial urease inhibiting activity. Acetohydroxamic acid is used as adjunctive therapy in the treatment of urinary tract infections caused by urease-producing bacteria. In addition, this drug is used in the prophylaxis and treatment of struvite renal calculi, whose formation is favored by urease-producing bacteria, by dissolving renal stones as well as preventing the formation of new crystals. (NCI05)</Description>
<Source>FDA Registry</Source>
<Source>NCI Thesaurus</Source>
</Record>


text:
package com.google.idea.blaze.base.actions;

import com.google.common.collect.ImmutableMap;
import com.google.idea.blaze.base.logging.EventLoggingService;
import com.intellij.openapi.actionSystem.AnActionEvent;
import com.intellij.openapi.project.Project;

class BlazeMakeProjectAction extends BlazeProjectAction {

  @Override
  protected void actionPerformedInBlazeProject(Project project, AnActionEvent e) {
    EventLoggingService.getInstance()
        .ifPresent(s -> s.logEvent(getClass(), "make", ImmutableMap.of()));
    BlazeBuildService.getInstance().buildProject(project);
  }
}


text:
export TARGET_ARCH=mips64r6
export CFLAGS="-Os -march=${TARGET_ARCH}"
CC="mips64el-linux-android-gcc" NDK_PLATFORM_COMPAT=android-21 ARCH=mips64 HOST_COMPILER=mips64el-linux-android "$(dirname "$0")/android-build.sh"