text:
require "mongoid-canhaz/version"
require "mongoid-canhaz/model_extentions"

module Canhaz
  module Mongoid
    module Document

      def self.included(base)
        base.send(:include, Canhaz::Mongoid::ModelExtensions)
      end

    end
  end
end


text:
su -l root -c "export HADOOP_LIBEXEC_DIR=/usr/lib/hadoop/libexec && /usr/lib/hadoop-yarn/sbin/yarn-daemon.sh --config /etc/hadoop/conf start resourcemanager"

# Node Manager
su -l root -c "export HADOOP_LIBEXEC_DIR=/usr/lib/hadoop/libexec && /usr/lib/hadoop-yarn/sbin/yarn-daemon.sh --config /etc/hadoop/conf start nodemanager"

redpajama_set_name: RedPajamaGithub


text:
package org.osgi.test.cases.framework.launch.fragments.tb9;

/**
 * Some test resource.
 *
 * @author $Id$
 */
public class TestClass {

}


text:
package sakethkaparthi.fileio.receivers;

import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;

import sakethkaparthi.fileio.services.UploadService;

/**
 * Created by saketh on 9/12/16.
 */

public class RetryReceiver extends BroadcastReceiver {
    public static String TAG = RetryReceiver.class.getCanonicalName();

    @Override
    public void onReceive(Context context, Intent intent) {
        String uri = intent.getStringExtra("uri");
        String displayName = intent.getStringExtra("displayName");
        Intent uploadIntent = new Intent(context, UploadService.class);
        uploadIntent.putExtra("uri", uri);
        uploadIntent.putExtra("displayName", displayName);
        context.startService(uploadIntent);

    }
}


text:
<?xml version="1.0" encoding="utf-8"?>
<AssetDeclaration xmlns="uri:ea.com:eala:asset" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
	<Tags></Tags>
	<Includes>
		<Include
			type="instance"
			source="DATA:BaseObjects/BaseCivilianStructureNoGarrison.xml" />
		<Include
			type="all"
			source="ART:BRBRui03.W3X" />
	</Includes>
	<GameObject
		id="BRBRui03"
		inheritFrom="BaseCivilianStructureNoGarrison"
		EditorName="BRBRui03"
    EditorSorting="STRUCTURE"
		Browser="REGION Brazil_BR STRUCTURE">
		<Draws>
			<ScriptedModelDraw
				id="ModuleTag_Draw"
				OkToChangeModelColor="true">
				<ModelConditionState
					ParseCondStateType="PARSE_DEFAULT">
					<Model
						Name="BRBRui03" />
				</ModelConditionState>
			</ScriptedModelDraw>
		</Draws>
		<Behaviors></Behaviors>
		<Body>
			<ActiveBody
				id="ModuleTag_Body"
				MaxHealth="6000.0"
				InitialHealth="6000.0" />
		</Body>
		<Geometry
			IsSmall="false">
			<Shape
				Type="BOX"
				MajorRadius="22"
				MinorRadius="18"
				Height="62"></Shape>
		</Geometry>
	</GameObject>
</AssetDeclaration>


text:
+++
title = "Yo-kai Watch Blasters"
date = "2015-06-24T13:50:46+02:00"
type = "portfolio"
image = "/img/portfolio/yokai_watch_blasters.png"
+++

*Yo-kai Watch Blasters* es un videojuego de rol para Nintendo 3DS, desarrollado por [Level 5](http://level5ia.com/). l juego es un *spin-off* basado en el minijuego de *Yo-kai Watch 2*.

Las dos versiones del juego, *Yo-kai Watch Blasters: Liga del gato rojo* y *Yo-kai Watch Blasters: Esquadrón del perro blanco*, salieron a la venta en Japón en 2015 y en el resto del mundo en 2018. Debido a su gran éxito, en diciembre de 2015, salió en Japón una expansión gratuita *Yo-kai Watch Blasters: Brigada del conejo lunar*, que saldría en el resto del mundo en septiembre de 2018.

La empresa encargada de la localización de este videojuego del japonés al inglés, francés, italiano, alemán y español fue [Pole To Win](https://www.ptw-i.com/). La traducción se llevó a cabo en la oficina de Glasgow, mientras que el testeo lingüístico tuvo lugar en la oficina de Londres a principios de 2018. En este proyecto, tuve la oportunidad de formar parte del **equipo de testeo para español**.


text:
package com.hribol.bromium.integration.tests.replay;

import static com.hribol.bromium.integration.tests.TestUtils.Resources.DEMO_CONFIGURATION;
import static com.hribol.bromium.integration.tests.TestUtils.Resources.TEXT_TO_BE_TEST_CASE;

/**
 * Created by hvrigazov on 04.11.17.
 */
public class TextToBeIT extends IntegrationTestAssertingThatStatusIsSuccess {

    public TextToBeIT() {
        super(DEMO_CONFIGURATION, TEXT_TO_BE_TEST_CASE);
    }
}


text:
package org.killbill.billing.mock.api;

import java.util.Iterator;
import java.util.LinkedList;
import java.util.List;
import java.util.UUID;
import java.util.concurrent.ConcurrentLinkedQueue;

import org.joda.time.DateTimeZone;
import org.killbill.billing.account.api.Account;
import org.killbill.billing.account.api.AccountApiException;
import org.killbill.billing.account.api.AccountData;
import org.killbill.billing.account.api.AccountEmail;
import org.killbill.billing.account.api.AccountUserApi;
import org.killbill.billing.catalog.api.Currency;
import org.killbill.billing.mock.MockAccountBuilder;
import org.killbill.billing.util.api.AuditLevel;
import org.killbill.billing.util.audit.AuditLogWithHistory;
import org.killbill.billing.util.callcontext.CallContext;
import org.killbill.billing.util.callcontext.TenantContext;
import org.killbill.billing.util.entity.DefaultPagination;
import org.killbill.billing.util.entity.Pagination;
import org.testng.Assert;

public class MockAccountUserApi implements AccountUserApi {

    private final ConcurrentLinkedQueue<Account> accounts = new ConcurrentLinkedQueue<Account>();

    public Account createAccountFromParams(final UUID id,
                                           final String externalKey,
                                           final String email,
                                           final String name,
                                           final int firstNameLength,
                                           final Currency currency,
                                           final int billCycleDayLocal,
                                           final UUID paymentMethodId,
                                           final DateTimeZone timeZone,
                                           final String locale,
                                           final String address1,
                                           final String address2,
                                           final String companyName,
                                           final String city,
                                           final String stateOrProvince,
                                           final String country,
                                           final String postalCode,
                                           final String phone,
                                           final String notes) {
        final Account result = new MockAccountBuilder(id)
                .externalKey(externalKey)
                .email(email)
                .name(name).firstNameLength(firstNameLength)
                .currency(currency)
                .billingCycleDayLocal(billCycleDayLocal)
                .paymentMethodId(paymentMethodId)
                .timeZone(timeZone)
                .locale(locale)
                .address1(address1)
                .address2(address2)
                .companyName(companyName)
                .city(city)
                .stateOrProvince(stateOrProvince)
                .country(country)
                .postalCode(postalCode)
                .phone(phone)
                .notes(notes)
                .build();
        accounts.add(result);
        return result;
    }

    @Override
    public Account createAccount(final AccountData data, final CallContext context) throws AccountApiException {
        final Account result = new MockAccountBuilder(data).build();
        accounts.add(result);
        return result;
    }

    @Override
    public Account getAccountByKey(final String key, final TenantContext context) {
        for (final Account account : accounts) {
            if (key.equals(account.getExternalKey())) {
                return account;
            }
        }
        return null;
    }

    @Override
    public Account getAccountById(final UUID uid, final TenantContext context) {
        for (final Account account : accounts) {
            if (uid.equals(account.getId())) {
                return account;
            }
        }
        return null;
    }

    @Override
    public Pagination<Account> searchAccounts(final String searchKey, final Long offset, final Long limit, final TenantContext tenantContext) {
        final List<Account> results = new LinkedList<Account>();
        for (final Account account : accounts) {
            if ((account.getName() != null && account.getName().contains(searchKey)) ||
                (account.getEmail() != null && account.getEmail().contains(searchKey)) ||
                (account.getExternalKey() != null && account.getExternalKey().contains(searchKey)) ||
                (account.getCompanyName() != null && account.getCompanyName().contains(searchKey))) {
                results.add(account);
            }
        }
        return DefaultPagination.<Account>build(offset, limit, accounts.size(), results);
    }

    @Override
    public Pagination<Account> getAccounts(final Long offset, final Long limit, final TenantContext context) {
        return DefaultPagination.<Account>build(offset, limit, accounts);
    }

    @Override
    public UUID getIdFromKey(final String externalKey, final TenantContext context) {
        for (final Account account : accounts) {
            if (externalKey.equals(account.getExternalKey())) {
                return account.getId();
            }
        }
        return null;
    }

    @Override
    public List<AccountEmail> getEmails(final UUID accountId, final TenantContext context) {
        throw new UnsupportedOperationException();
    }

    @Override
    public void addEmail(final UUID accountId, final AccountEmail email, final CallContext context) {
        throw new UnsupportedOperationException();
    }

    @Override
    public void removeEmail(final UUID accountId, final AccountEmail email, final CallContext context) {
        throw new UnsupportedOperationException();
    }

    @Override
    public void updateAccount(final Account account, final CallContext context) {
        final Iterator<Account> iterator = accounts.iterator();
        while (iterator.hasNext()) {
            final Account account1 = iterator.next();
            if (account.getId().equals(account1.getId())) {
                iterator.remove();
                break;
            }
        }
        try {
            createAccount(account, context);
        } catch (final AccountApiException e) {
            Assert.fail(e.toString());
        }
    }

    @Override
    public void updateAccount(final String key, final AccountData accountData, final CallContext context)
            throws AccountApiException {
        throw new UnsupportedOperationException();
    }

    @Override
    public void updateAccount(final UUID accountId, final AccountData accountData, final CallContext context)
            throws AccountApiException {
        throw new UnsupportedOperationException();
    }

    @Override
    public List<Account> getChildrenAccounts(final UUID uuid, final TenantContext tenantContext) throws AccountApiException {
        throw new UnsupportedOperationException();
    }

    @Override
    public List<AuditLogWithHistory> getAuditLogsWithHistoryForId(final UUID accountId, final AuditLevel auditLevel, final TenantContext tenantContext) throws AccountApiException {
        throw new UnsupportedOperationException();
    }

    @Override
    public List<AuditLogWithHistory> getEmailAuditLogsWithHistoryForId(final UUID accountEmailId, final AuditLevel auditLevel, final TenantContext tenantContext) throws AccountApiException {
        throw new UnsupportedOperationException();
    }
}


text:
<?xml version="1.0"?>
<tool_dependency>
    <package name="datamash" version="1.0.6">
        <install version="1.0">
            <actions>
                <action type="download_by_url" sha256sum="0154c25c45b5506b6d618ca8e18d0ef093dac47946ac0df464fb21e77b504118">https://depot.galaxyproject.org/software/datamash/datamash_1.0.6_src_all.tar.gz</action>
                <action type="autoconf">--disable-dependency-tracking</action>
                <action type="set_environment">
                    <environment_variable name="PATH" action="prepend_to">$INSTALL_DIR/bin</environment_variable>
                </action>
            </actions>
        </install>
        <readme>
            Compiling GNU Datamash requires a C compiler.
        </readme>
    </package>
</tool_dependency>


text:
#include <grpc/support/port_platform.h>

#include "src/core/ext/filters/client_channel/connector.h"

grpc_connector* grpc_connector_ref(grpc_connector* connector) {
  connector->vtable->ref(connector);
  return connector;
}

void grpc_connector_unref(grpc_connector* connector) {
  connector->vtable->unref(connector);
}

void grpc_connector_connect(grpc_connector* connector,
                            const grpc_connect_in_args* in_args,
                            grpc_connect_out_args* out_args,
                            grpc_closure* notify) {
  connector->vtable->connect(connector, in_args, out_args, notify);
}

void grpc_connector_shutdown(grpc_connector* connector, grpc_error* why) {
  connector->vtable->shutdown(connector, why);
}


text:
<?php

/**
 * rtAssetUploadForm handles the asset attachment form used in the admin area.
 *
 * @package    rtCorePlugin
 * @subpackage form
 * @author     Piers Warmers <piers@wranglers.com.au>
 */
class rtGuardFormSignin extends sfGuardFormSignin
{
  public function setup()
  {
    parent::setup();

    $this->getWidgetSchema()->setFormFormatterName(sfConfig::get('app_rt_public_form_formatter_name', 'RtList'));

    $this->widgetSchema['username']->setLabel('Your email address');
    $this->widgetSchema['password']->setLabel('Your password');

    $this->widgetSchema->setHelp('remember', 'Not for use on public or shared computers');

    if (sfConfig::get('app_sf_guard_plugin_allow_login_with_email', true))
    {
//      $this->widgetSchema->setHelp( 'username',   'Eg: jenny@example.com or jenny123');
    }
  }
}
?>


text:
import java.util.ArrayList;
import java.util.Collection;
import java.util.List;

public class Test {
  void test(Object c) {
    List<String> other, list;
    //noinspection unchecked
    list = new ArrayList<>((Collection<String>) c);
    System.out.println(list);
  }
}


text:
package test.org.auraframework.impl.javascript;

import java.lang.reflect.Method;
import java.lang.reflect.Proxy;
import java.util.List;
import java.util.Map;

import org.auraframework.def.ActionDef;
import org.auraframework.def.BaseComponentDef;
import org.auraframework.def.ControllerDef;
import org.auraframework.def.DefDescriptor;
import org.auraframework.def.JavaControllerDef;
import org.auraframework.impl.javascript.controller.JavascriptControllerDef.Builder;
import org.auraframework.impl.javascript.testsuite.JavascriptMockHandler;
import org.auraframework.instance.Action;
import org.auraframework.instance.Action.State;
import org.auraframework.instance.InstanceBuilder;
import org.auraframework.system.SubDefDescriptor;
import org.auraframework.test.Resettable;
import org.auraframework.test.mock.Answer;
import org.auraframework.test.mock.DelegatingHandler;
import org.auraframework.test.mock.Invocation;
import org.auraframework.test.mock.MockAction;
import org.auraframework.test.mock.Stub;
import org.auraframework.throwable.AuraRuntimeException;
import org.auraframework.throwable.quickfix.InvalidDefinitionException;
import org.auraframework.throwable.quickfix.QuickFixException;
import org.springframework.beans.factory.annotation.Autowire;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

import com.google.common.collect.ImmutableList;

/**
 * Parse JSTEST mock Actions.
 */
public class JavascriptMockActionHandler extends JavascriptMockHandler<ControllerDef> {

    @Configuration
    public static class ConfigureMockActionInstanceBuilder {
        @Bean(autowire = Autowire.BY_TYPE)
        public InstanceBuilder<Action, ?> mockActionInstanceBuilder() {
            return new MockActionInstanceBuilder();
        }
    }

    private static class MockActionHandler extends DelegatingHandler {
        private final Answer<?> answer;

        public MockActionHandler(Object delegate, Answer<?> answer) {
            super(delegate);
            this.answer = answer;
        }
    }

    public static class MockActionInstanceBuilder implements InstanceBuilder<Action, ActionDef> {
        @Override
        public Class<?> getDefinitionClass() {
            return Proxy.getProxyClass(JavascriptMockActionHandler.class.getClassLoader(),
                    new Class<?>[] { ActionDef.class });
        }

        @Override
        public Action getInstance(ActionDef def, Map<String, Object> attributes) throws QuickFixException {
            try {
                return (Action) ((MockActionHandler) Proxy.getInvocationHandler(def)).answer.answer();
            } catch (Throwable e) {
                throw new AuraRuntimeException(e);
            }
        }
    }

    private static class MockJavaControllerDefHandler extends DelegatingHandler {
        private final List<Stub<?>> stubs;

        private MockJavaControllerDefHandler(ControllerDef delegate, List<Stub<?>> stubs) {
            super(delegate);
            this.stubs = stubs;
        }

        @Override
        public Object invoke(Object proxy, Method method, Object[] args) throws Throwable {
            String methodName = method.getName();

            // check for Resettable.reset() call
            if ("reset".equals(methodName) && method.getDeclaringClass().equals(Resettable.class)) {
                for (Stub<?> stub : stubs) {
                    stub.reset();
                }
                return null;
            }

            Object res = super.invoke(proxy, method, args);
            if ("getSubDefinition".equals(methodName) && args.length == 1) {
                Class<?> paramType = method.getParameterTypes()[0];
                String name;
                if (SubDefDescriptor.class.equals(paramType)) {
                    name = ((SubDefDescriptor<?, ?>) args[0]).getName();
                } else {
                    name = args[0].toString();
                }
                for (Stub<?> stub : stubs) {
                    if (stub.getInvocation().getMethodName().equals(name)) {
                        Answer<?> answer = stub.getNextAnswer();
                        MockActionHandler handler = new MockActionHandler(res, answer);
                        return Proxy.newProxyInstance(JavascriptMockActionHandler.class.getClassLoader(),
                                new Class<?>[] { ActionDef.class },handler);
                    }
                }
            }

            return res;
        }
    }

    private ControllerDef controllerDef;
    private ActionDef actionDef;

    public JavascriptMockActionHandler(DefDescriptor<? extends BaseComponentDef> targetDescriptor,
            Map<String, Object> map) {
        super(targetDescriptor, map);
    }

    @Override
    protected ControllerDef createDefinition(Map<String, Object> map) throws QuickFixException {
        controllerDef = getBaseDefinition((String) map.get("descriptor"), ControllerDef.class);
        List<Stub<?>> stubs = getStubs(map.get("stubs"));
        return (JavaControllerDef) Proxy.newProxyInstance(JavascriptMockActionHandler.class.getClassLoader(),
                new Class<?>[] { JavaControllerDef.class, Resettable.class },
                new MockJavaControllerDefHandler(controllerDef, stubs));
    }

    @Override
    protected ControllerDef getDefaultBaseDefinition() throws QuickFixException {
        for (DefDescriptor<ControllerDef> desc : getTargetDescriptor().getDef().getControllerDefDescriptors()) {
            String prefix = desc.getPrefix();
            if ("java".equals(prefix) || "serviceComponent".equals(prefix)) {
                return desc.getDef();
            }
        }
        throw new InvalidDefinitionException("Unable to locate the server controller", getLocation());
    }

    @Override
    protected Invocation getDefaultInvocation() throws QuickFixException {
        throw new InvalidDefinitionException("A mock action must specify the name of the action", getLocation());
    }

    @Override
    protected Invocation getInvocation(Object object) throws QuickFixException {
        if (object instanceof Map) {
            Map<?, ?> methodMap = (Map<?, ?>) object;
            String name = (String) methodMap.get("name");
            if (name == null) {
                throw new InvalidDefinitionException("A mock action must specify the name of the action", getLocation());
            }
            String typeStr = (String) methodMap.get("type");
            Class<?> type = Object.class;
            if (typeStr != null) {
                try {
                    type = classForSimpleName(typeStr);
                } catch (ClassNotFoundException ignored) {
                }
            }
            actionDef = controllerDef.getSubDefinition(name);
            if (actionDef == null) {
                throw new InvalidDefinitionException("JavaMockActionHandler: unable to find action " + name,
                        getLocation());
            }
            return new ActionInvocation(name, null, type);
        }
        return super.getInvocation(object);
    }

    @SuppressWarnings("unchecked")
    @Override
    protected <T> Answer<T> getAnswer(Object object, Class<T> retClass) throws QuickFixException {
        if (object instanceof Map) {
            Map<?, ?> map = (Map<?, ?>) object;
            T value = getValue(map.get("value"), retClass);
            String error = (String) map.get("error");
            if (value != null) {
                if (error == null) {
                    return new Returns<>((T) new MockAction(
                            actionDef.getDescriptor(), State.SUCCESS, value));
                }
            } else {
                if (error != null) {
                    try {
                        new ThrowsExceptionClass<T>(error).answer();
                    } catch (Throwable e) {
                        return new Returns<>((T) new MockAction(
                                actionDef.getDescriptor(), State.ERROR, null,
                                null, null, ImmutableList.<Object> of(e)));
                    }
                }
            }
        }
        throw new InvalidDefinitionException("Mock answer must specify either 'value' or 'error'", getLocation());
    }

    /**
     * Matches invocations by action name only.
     */
    public class ActionInvocation extends Invocation {
        public ActionInvocation(String methodName, List<?> parameters, Class<?> returnType) {
            super(methodName, parameters, returnType);
        }

        @Override
        public boolean matches(Method method, Object[] args) {
            return method.getName().equals(getMethodName());
        }
    }

    @Override
    protected ControllerDef createDefinition(Throwable error) {
        Builder builder = new Builder();
        builder.setParseError(error);
        return builder.build();
    }
}


text:
/*
 <codex>
 <abstract>A TCP server that listens on an arbitrary port.</abstract>
 </codex>
 */

#import <Foundation/Foundation.h>

@class BKServer;

//NSString * const BKServerErrorDomain;

typedef enum {
    kBKServerCouldNotBindToIPv4Address = 1,
    kBKServerCouldNotBindToIPv6Address = 2,
    kBKServerNoSocketsAvailable = 3,
} BKServerErrorCode;

@protocol BKServerDelegate <NSObject>
@optional
- (void) serverDidEnableBonjour:(BKServer*)server withName:(NSString*)name;
- (void) server:(BKServer*)server didNotEnableBonjour:(NSDictionary *)errorDict;
- (void) didAcceptConnectionForServer:(BKServer*)server inputStream:(NSInputStream *)istr outputStream:(NSOutputStream *)ostr;
@end

@interface BKServer : NSObject {
@private
	id _delegate;
    uint16_t _port;
	CFSocketRef _ipv4socket;
	NSNetService* _netService;
	NSRunLoop* _runLoop;
}

- (BOOL)startWithRunLoop:(NSRunLoop *)aRunLoop error:(NSError **)error;
- (BOOL)stop;
- (BOOL) enableBonjourWithDomain:(NSString*)domain applicationProtocol:(NSString*)protocol name:(NSString*)name; //Pass "nil" for the default local domain - Pass only the application protocol for "protocol" e.g. "myApp"
- (void) disableBonjour;

@property(assign) id<BKServerDelegate> delegate;

+ (NSString*) bonjourTypeFromIdentifier:(NSString*)identifier;

@end


text:
Home

<?php echo $current_page?>

            <button class="btn btn-warning pull-left btn-refresh btn-circle btn-lg custom-buttons" style="margin-right: 5px;">
                </button>
            <button class="btn btn-primary pull-left btn-circle btn-lg custom-buttons" data-toggle="modal" data-target="#myModalFilter">
                </button>
            <button class="btn btn-danger btn-remove pull-right custom-buttons">Remove</button>
            <button class="btn btn-primary btn-edit pull-right custom-buttons" data-toggle="modal" data-target="#myModal">Edit</button>
            <button class="btn btn-success btn-create pull-right custom-buttons" data-toggle="modal" data-target="#myModal">Create</button>

                            Files List

                                                <input type="checkbox" value="" class="table-checkbox">

                                        File CID
                                        File Name
                                        Status

                                            <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>

Form

                                                <?php echo form_open_multipart('', array('role'=>'form', 'id'=>'myForm', 'class'=>'form-horizontal'));?>
                                                        <?php
                                                        $data = array('id'=>'id', 'name'=>'id', 'type'=>'hidden', 'value'=>'');
                                                        echo form_input($data);?>

                                                        File Code

                                                                <?php echo form_input('filecode','','class=" form-control input-sm" id="filecode"'); ?>

                                                        File Name

                                                                <?php echo form_input('filename','','class=" form-control input-sm" id="filename" readonly'); ?>

                                                        File

                                                                <?php echo form_upload('file[]', '', 'class="file-input" id="file[]" multiple="multiple"');?>

                                                        Status

                                                                <?php echo form_dropdown('status', $statusList, '', 'class="form-control input-sm select2" id="status" name="status" style="width: 100%" required');?>

                                            <button type="reset" class="btn btn-default btn-clear-form" >Clear</button>
                                            <button type="submit" class="btn btn-primary" >Save</button>

                                        </form>

                                            <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>

Filter

                                                <?php echo form_open('', array('role'=>'form', 'class'=>'form-horizontal search-form'))?>

                                                            File CID

                                                                <input type="text" class="form-control input-sm table-column1" placeholder="File CID" id="filecid">

                                                        Filename

                                                            <input type="text" class="form-control input-sm table-column2" placeholder="Filename" id="filename" >

                                                        Status

                                                                <input type="text" class="form-control input-sm table-column3" placeholder="Status" id="status" >

                                            <button type="reset" class="btn btn-default btn-refresh">Clear</button>

                                        </form>


text:
% myobj = SetDataDir( myobj, dir )
%
%     Set global run data directory.
%
function [s] = SetDataDir( s, dir )

    if( ~ischar( dir ) )
        error( 'SetDataDir ''dir'' argument must be a string.' );
    end

    DoSimpleCmd( s, sprintf( 'SETDATADIR %s', dir ) );
end


text:
<?php

/**
 * Класс для синхронизации.
 */
class Prices
{
    private static $db;

    // это пришло от клиента и его не надо включать в выхлоп
    private $dontOutputPrices;

    public function __construct($db)
    {
        self::$db = $db;
    }

    /**
     * Вставка покупки.
     * Вставляет новую строку, или обновляет уже существующую.
     * При обновлении учитывает lastUpdate.
     *
     * @param $price
     *
     * @return bool успех опреации
     */
    public function insertPrice($price)
    {
        $userID = $_SESSION ['userID'];
        $sql = "INSERT INTO prices
                (id, user_id, client_id, store_id, store_client_id, product_id, product_client_id, price, amount, date, currency_id, status)
                VALUES('$price->id', '$userID', '$price->clientID', '$price->storeID', '$price->storeClientID', '$price->productID',
                '$price->productClientID', '$price->price', '$price->amount', FROM_UNIXTIME('$price->date'), '$price->currencyID', '$price->status')";
        $result = self::$db->query($sql);

        if ($result) {
            $this->dontOutputPrices[] = $price;

            return true;
        } else {
            // если ошибка в том, что пытаемся вставить дубликат строк - значит эту строку просто изменили
            if (stripos(self::$db->error, 'duplicate entry') !== false) {
                // но нужно выяснить, кто менял её позже. Как говорится, у кого писька больше - тот и прав!
                $sql = "select UNIX_TIMESTAMP(last_update) as last_update
                        from prices
                        where id = '$price->id'
                        and user_id = '$userID'
                        and client_id = '$price->clientID'";
                $result = self::$db->query($sql);
                $row = $result->fetch_assoc();
                // если сервер проиграл сражение - меняем запись
                if ($row['last_update'] < $price->lastUpdate) {
                    $sql = "update prices
                            set store_id = '$price->storeID',
                            store_client_id = '$price->storeClientID',
                            product_id = '$price->productID',
                            product_client_id = '$price->productClientID',
                            price = '$price->price',
                            amount = '$price->amount',
                            date = FROM_UNIXTIME($price->date),
                            currency_id = '$price->currencyID',
                            status = '$price->status'
                            where id = '$price->id'
                            and user_id = '$userID'
                            and client_id = '$price->clientID'";
                    $result = self::$db->query($sql);
                    //error_log(print_r($sql, true));
                    if ($result) {
                        $this->dontOutputPrices[] = $price;

                        return true;
                    } else {
                        return false;    // произошло что-то непонятное
                    }
                } else {
                    // если же на сервере время больше - ничего не меняем, а просто вернем true.
                    // когда будем формировать ответ клиенту - эта запись уйдёт ему
                    return true;
                }
            } else {
                return false; // произошло что-то непонятное
            }
        }
    }

    /**
     * Возвращает список покупок.
     * При этом учитывается клиент, с которым пользовать авторизовался
     * (т.е. данный клиент получит только те данные, которых у него нет).
     *
     * @return список объектов, или false в случае ошибки
     */
    public function getPrices()
    {
        $userID = $_SESSION ['userID'];
        $userClientID = $_SESSION ['userClientID'];
        $sql = "select id, client_id, store_id, store_client_id, product_id, product_client_id, price, amount,
                UNIX_TIMESTAMP(date) as date, currency_id, status
                from prices
                where user_id = '$userID'
                and last_update > (
                    select ifnull(last_sync, 1)
                    from sync
                    where user_id = '$userID'
                    and client_id = $userClientID
                )";
        $result = self::$db->query($sql);

        if ($result) {
            $output = null;
            while ($row = $result->fetch_assoc()) {
                $price = new stdClass();
                $price->id = $row['id'];
                $price->clientID = $row['client_id'];
                $price->storeID = $row['store_id'];
                $price->storeClientID = $row['store_client_id'];
                $price->productID = $row['product_id'];
                $price->productClientID = $row['product_client_id'];
                $price->price = $row['price'];
                $price->amount = $row['amount'];
                $price->date = $row['date'];
                $price->currencyID = $row['currency_id'];
                $price->status = $row['status'];
                // проверка
                $wasFound = false;
                if (isset($this->dontOutputPrices)) {
                    foreach ($this->dontOutputPrices as $key => $value) {
                        if (($value->id == $price->id) && ($value->clientID == $price->clientID)) {
                            $wasFound = true;
                            break;
                        }
                    }
                }
                if ($wasFound === false) {
                    $output[] = $price;
                }
            }

            return $output;
        } else {
            return false; // записей нет. или какой-то косяк прозошел
        }
    }
}


text:
// Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.

using Microsoft.CodeAnalysis.Sarif;
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Microsoft.Sarif.Viewer.Models
{
    public class StackFrameModel : CodeLocationObject
    {
        private string _message;
        private int _line;
        private int _column;
        private int _address;
        private int _offset;
        private string _fullyQualifiedLogicalName;
        private string _module;

        public string Message
        {
            get
            {
                return this._message;
            }
            set
            {
                if (value != this._message)
                {
                    this._message = value;
                    NotifyPropertyChanged("Message");
                }
            }
        }

        public int Line
        {
            get
            {
                return this._line;
            }
            set
            {
                if (value != this._line)
                {
                    this._line = value;
                    NotifyPropertyChanged("Line");
                }
            }
        }

        public int Column
        {
            get
            {
                return this._column;
            }
            set
            {
                if (value != this._column)
                {
                    this._column = value;
                    NotifyPropertyChanged("Column");
                }
            }
        }

        public int Address
        {
            get
            {
                return this._address;
            }
            set
            {
                if (value != this._address)
                {
                    this._address = value;
                    NotifyPropertyChanged("Address");
                }
            }
        }

        public int Offset
        {
            get
            {
                return this._offset;
            }
            set
            {
                if (value != this._offset)
                {
                    this._offset = value;
                    NotifyPropertyChanged("Offset");
                }
            }
        }

        public override string FilePath
        {
            get
            {
                return this._filePath;
            }
            set
            {
                if (value != this._filePath)
                {
                    this._filePath = value;
                    NotifyPropertyChanged("FilePath");
                    NotifyPropertyChanged("FileName");
                }
            }
        }

        public string FileName
        {
            get
            {
                return Path.GetFileName(this.FilePath);
            }
        }

        public string FullyQualifiedLogicalName
        {
            get
            {
                return this._fullyQualifiedLogicalName;
            }
            set
            {
                if (value != this._fullyQualifiedLogicalName)
                {
                    this._fullyQualifiedLogicalName = value;
                    NotifyPropertyChanged("FullyQualifiedLogicalName");
                }
            }
        }

        public string Module
        {
            get
            {
                return this._module;
            }
            set
            {
                if (value != this._module)
                {
                    this._module = value;
                    NotifyPropertyChanged("Module");
                }
            }
        }
    }
}


text:
package com.jfixby.r3.api;

import com.jfixby.scarabei.api.ComponentInstaller;

public class RedTriplane {
	static private ComponentInstaller<RedTriplaneComponent> componentInstaller = new ComponentInstaller<RedTriplaneComponent>(
		"RedTriplane");

	public static final void installComponent (final RedTriplaneComponent component_to_install) {
		componentInstaller.installComponent(component_to_install);
	}

	public static final RedTriplaneComponent invoke () {
		return componentInstaller.invokeComponent();
	}

	public static final RedTriplaneComponent component () {
		return componentInstaller.getComponent();
	}

	public static EngineVersion VERSION () {
		return invoke().VERSION();
	}

	public static void setGameStarter (final GameStarter starter) {
		invoke().setGameStarter(starter);
	}

	public static GameStarter getGameStarter () {
		return invoke().getGameStarter();
	}

}


text:
package com.alibaba.otter.canal.parse.inbound.mysql;

import java.io.File;
import java.io.IOException;
import java.util.List;

import org.apache.commons.lang.NotImplementedException;
import org.apache.commons.lang.StringUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import com.alibaba.otter.canal.parse.driver.mysql.packets.GTIDSet;
import com.alibaba.otter.canal.parse.exception.CanalParseException;
import com.alibaba.otter.canal.parse.exception.ServerIdNotMatchException;
import com.alibaba.otter.canal.parse.inbound.ErosaConnection;
import com.alibaba.otter.canal.parse.inbound.MultiStageCoprocessor;
import com.alibaba.otter.canal.parse.inbound.SinkFunction;
import com.alibaba.otter.canal.parse.inbound.mysql.local.BinLogFileQueue;
import com.taobao.tddl.dbsync.binlog.FileLogFetcher;
import com.taobao.tddl.dbsync.binlog.LogContext;
import com.taobao.tddl.dbsync.binlog.LogDecoder;
import com.taobao.tddl.dbsync.binlog.LogEvent;
import com.taobao.tddl.dbsync.binlog.LogPosition;
import com.taobao.tddl.dbsync.binlog.event.QueryLogEvent;

/**
 * local bin log connection (not real connection)
 *
 * @author yuanzu Date: 12-9-27 Time: 下午6:14
 */
public class LocalBinLogConnection implements ErosaConnection {

    private static final Logger logger     = LoggerFactory.getLogger(LocalBinLogConnection.class);
    private BinLogFileQueue     binlogs    = null;
    private boolean             needWait;
    private String              directory;
    private int                 bufferSize = 16 * 1024;
    private boolean             running    = false;
    private long                serverId;
    private FileParserListener  parserListener;

    public LocalBinLogConnection(){
    }

    public LocalBinLogConnection(String directory, boolean needWait){
        this.needWait = needWait;
        this.directory = directory;
    }

    @Override
    public void connect() throws IOException {
        if (this.binlogs == null) {
            this.binlogs = new BinLogFileQueue(this.directory);
        }
        this.running = true;
    }

    @Override
    public void reconnect() throws IOException {
        disconnect();
        connect();
    }

    @Override
    public void disconnect() throws IOException {
        this.running = false;
        if (this.binlogs != null) {
            this.binlogs.destory();
        }
        this.binlogs = null;
        this.running = false;
    }

    public boolean isConnected() {
        return running;
    }

    public void seek(String binlogfilename, Long binlogPosition, String gtid, SinkFunction func) throws IOException {
    }

    public void dump(String binlogfilename, Long binlogPosition, SinkFunction func) throws IOException {
        File current = new File(directory, binlogfilename);

        FileLogFetcher fetcher = new FileLogFetcher(bufferSize);
        LogDecoder decoder = new LogDecoder(LogEvent.UNKNOWN_EVENT, LogEvent.ENUM_END_EVENT);
        LogContext context = new LogContext();
        try {
            fetcher.open(current, binlogPosition);
            context.setLogPosition(new LogPosition(binlogfilename, binlogPosition));
            while (running) {
                boolean needContinue = true;
                LogEvent event = null;
                while (fetcher.fetch()) {
                    event = decoder.decode(fetcher, context);
                    if (event == null) {
                        continue;
                    }
                    if (serverId != 0 && event.getServerId() != serverId) {
                        throw new ServerIdNotMatchException("unexpected serverId " + serverId + " in binlog file !");
                    }

                    if (!func.sink(event)) {
                        needContinue = false;
                        break;
                    }
                }

                fetcher.close(); // 关闭上一个文件
                parserFinish(current.getName());
                if (needContinue) {// 读取下一个

                    File nextFile;
                    if (needWait) {
                        nextFile = binlogs.waitForNextFile(current);
                    } else {
                        nextFile = binlogs.getNextFile(current);
                    }

                    if (nextFile == null) {
                        break;
                    }

                    current = nextFile;
                    fetcher.open(current);
                    context.setLogPosition(new LogPosition(nextFile.getName()));
                } else {
                    break;// 跳出
                }
            }
        } catch (InterruptedException e) {
            logger.warn("LocalBinLogConnection dump interrupted");
        } finally {
            if (fetcher != null) {
                fetcher.close();
            }
        }
    }

    public void dump(long timestampMills, SinkFunction func) throws IOException {
        List<File> currentBinlogs = binlogs.currentBinlogs();
        File current = currentBinlogs.get(currentBinlogs.size() - 1);
        long timestampSeconds = timestampMills / 1000;

        String binlogFilename = null;
        long binlogFileOffset = 0;

        FileLogFetcher fetcher = new FileLogFetcher(bufferSize);
        LogDecoder decoder = new LogDecoder();
        decoder.handle(LogEvent.FORMAT_DESCRIPTION_EVENT);
        decoder.handle(LogEvent.QUERY_EVENT);
        decoder.handle(LogEvent.XID_EVENT);
        LogContext context = new LogContext();
        try {
            fetcher.open(current);
            context.setLogPosition(new LogPosition(current.getName()));
            while (running) {
                boolean needContinue = true;
                String lastXidLogFilename = current.getName();
                long lastXidLogFileOffset = 0;

                binlogFilename = lastXidLogFilename;
                binlogFileOffset = lastXidLogFileOffset;
                while (fetcher.fetch()) {
                    LogEvent event = decoder.decode(fetcher, context);
                    if (event != null) {
                        if (serverId != 0 && event.getServerId() != serverId) {
                            throw new ServerIdNotMatchException("unexpected serverId " + serverId + " in binlog file !");
                        }

                        if (event.getWhen() > timestampSeconds) {
                            break;
                        }

                        needContinue = false;
                        if (LogEvent.QUERY_EVENT == event.getHeader().getType()) {
                            if (StringUtils.endsWithIgnoreCase(((QueryLogEvent) event).getQuery(), "BEGIN")) {
                                binlogFilename = lastXidLogFilename;
                                binlogFileOffset = lastXidLogFileOffset;
                            } else if (StringUtils.endsWithIgnoreCase(((QueryLogEvent) event).getQuery(), "COMMIT")) {
                                lastXidLogFilename = current.getName();
                                lastXidLogFileOffset = event.getLogPos();
                            }
                        } else if (LogEvent.XID_EVENT == event.getHeader().getType()) {
                            lastXidLogFilename = current.getName();
                            lastXidLogFileOffset = event.getLogPos();
                        } else if (LogEvent.FORMAT_DESCRIPTION_EVENT == event.getHeader().getType()) {
                            lastXidLogFilename = current.getName();
                            lastXidLogFileOffset = event.getLogPos();
                        }
                    }
                }

                if (needContinue) {// 读取下一个
                    fetcher.close(); // 关闭上一个文件

                    File nextFile = binlogs.getBefore(current);
                    if (nextFile == null) {
                        break;
                    }

                    current = nextFile;
                    fetcher.open(current);
                    context.setLogPosition(new LogPosition(current.getName()));
                } else {
                    break;// 跳出
                }
            }
        } finally {
            if (fetcher != null) {
                fetcher.close();
            }
        }

        dump(binlogFilename, binlogFileOffset, func);
    }

    @Override
    public void dump(GTIDSet gtidSet, SinkFunction func) throws IOException {
        throw new NotImplementedException();
    }

    @Override
    public void dump(String binlogfilename, Long binlogPosition, MultiStageCoprocessor coprocessor) throws IOException {
        File current = new File(directory, binlogfilename);
        if (!current.exists()) {
            throw new CanalParseException("binlog:" + binlogfilename + " is not found");
        }

        FileLogFetcher fetcher = new FileLogFetcher(bufferSize);
        LogDecoder decoder = new LogDecoder(LogEvent.UNKNOWN_EVENT, LogEvent.ENUM_END_EVENT);
        LogContext context = new LogContext();
        try {
            fetcher.open(current, binlogPosition);
            context.setLogPosition(new LogPosition(binlogfilename, binlogPosition));
            while (running) {
                boolean needContinue = true;
                LogEvent event = null;
                while (fetcher.fetch()) {
                    event = decoder.decode(fetcher, context);
                    if (event == null) {
                        continue;
                    }
                    if (serverId != 0 && event.getServerId() != serverId) {
                        throw new ServerIdNotMatchException("unexpected serverId " + serverId + " in binlog file !");
                    }

                    if (!coprocessor.publish(event)) {
                        needContinue = false;
                        break;
                    }
                }

                fetcher.close(); // 关闭上一个文件
                parserFinish(binlogfilename);
                if (needContinue) {// 读取下一个
                    File nextFile;
                    if (needWait) {
                        nextFile = binlogs.waitForNextFile(current);
                    } else {
                        nextFile = binlogs.getNextFile(current);
                    }

                    if (nextFile == null) {
                        break;
                    }

                    current = nextFile;
                    fetcher.open(current);
                    binlogfilename = nextFile.getName();
                } else {
                    break;// 跳出
                }
            }
        } catch (InterruptedException e) {
            logger.warn("LocalBinLogConnection dump interrupted");
        } finally {
            if (fetcher != null) {
                fetcher.close();
            }
        }
    }

    private void parserFinish(String fileName) {
        if (parserListener != null) {
            parserListener.onFinish(fileName);
        }
    }

    @Override
    public void dump(long timestampMills, MultiStageCoprocessor coprocessor) throws IOException {
        List<File> currentBinlogs = binlogs.currentBinlogs();
        File current = currentBinlogs.get(currentBinlogs.size() - 1);
        long timestampSeconds = timestampMills / 1000;

        String binlogFilename = null;
        long binlogFileOffset = 0;

        FileLogFetcher fetcher = new FileLogFetcher(bufferSize);
        LogDecoder decoder = new LogDecoder();
        decoder.handle(LogEvent.FORMAT_DESCRIPTION_EVENT);
        decoder.handle(LogEvent.QUERY_EVENT);
        decoder.handle(LogEvent.XID_EVENT);
        LogContext context = new LogContext();
        try {
            fetcher.open(current);
            context.setLogPosition(new LogPosition(current.getName()));
            while (running) {
                boolean needContinue = true;
                String lastXidLogFilename = current.getName();
                long lastXidLogFileOffset = 0;

                binlogFilename = lastXidLogFilename;
                binlogFileOffset = lastXidLogFileOffset;
                while (fetcher.fetch()) {
                    LogEvent event = decoder.decode(fetcher, context);
                    if (event != null) {
                        if (serverId != 0 && event.getServerId() != serverId) {
                            throw new ServerIdNotMatchException("unexpected serverId " + serverId + " in binlog file !");
                        }

                        if (event.getWhen() > timestampSeconds) {
                            break;
                        }

                        needContinue = false;
                        if (LogEvent.QUERY_EVENT == event.getHeader().getType()) {
                            if (StringUtils.endsWithIgnoreCase(((QueryLogEvent) event).getQuery(), "BEGIN")) {
                                binlogFilename = lastXidLogFilename;
                                binlogFileOffset = lastXidLogFileOffset;
                            } else if (StringUtils.endsWithIgnoreCase(((QueryLogEvent) event).getQuery(), "COMMIT")) {
                                lastXidLogFilename = current.getName();
                                lastXidLogFileOffset = event.getLogPos();
                            }
                        } else if (LogEvent.XID_EVENT == event.getHeader().getType()) {
                            lastXidLogFilename = current.getName();
                            lastXidLogFileOffset = event.getLogPos();
                        } else if (LogEvent.FORMAT_DESCRIPTION_EVENT == event.getHeader().getType()) {
                            lastXidLogFilename = current.getName();
                            lastXidLogFileOffset = event.getLogPos();
                        }
                    }
                }

                if (needContinue) {// 读取下一个
                    fetcher.close(); // 关闭上一个文件

                    File nextFile = binlogs.getBefore(current);
                    if (nextFile == null) {
                        break;
                    }

                    current = nextFile;
                    fetcher.open(current);
                    context.setLogPosition(new LogPosition(current.getName()));
                } else {
                    break;// 跳出
                }
            }
        } finally {
            if (fetcher != null) {
                fetcher.close();
            }
        }

        dump(binlogFilename, binlogFileOffset, coprocessor);
    }

    @Override
    public void dump(GTIDSet gtidSet, MultiStageCoprocessor coprocessor) throws IOException {
        throw new NotImplementedException();
    }

    public ErosaConnection fork() {
        LocalBinLogConnection connection = new LocalBinLogConnection();

        connection.setBufferSize(this.bufferSize);
        connection.setDirectory(this.directory);
        connection.setNeedWait(this.needWait);
        return connection;
    }

    @Override
    public long queryServerId() {
        return 0;
    }

    public boolean isNeedWait() {
        return needWait;
    }

    public void setNeedWait(boolean needWait) {
        this.needWait = needWait;
    }

    public String getDirectory() {
        return directory;
    }

    public void setDirectory(String directory) {
        this.directory = directory;
    }

    public int getBufferSize() {
        return bufferSize;
    }

    public void setBufferSize(int bufferSize) {
        this.bufferSize = bufferSize;
    }

    public long getServerId() {
        return serverId;
    }

    public void setServerId(long serverId) {
        this.serverId = serverId;
    }

    public void setParserListener(FileParserListener parserListener) {
        this.parserListener = parserListener;
    }

    public interface FileParserListener {

        void onFinish(String fileName);
    }

}


text:
import { useEffect } from 'react'
import { isEmpty, castArray } from 'lodash'

import { useFormContext } from './useFormContext'

function useField({
  name,
  initialValue = '',
  validate = null,
  required = null,
}) {
  const {
    registerField,
    deregisterField,
    setFieldTouched,
    setFieldValue,
    getFieldState,
  } = useFormContext()

  function prepareValidators() {
    const validators = castArray(validate).filter((v) => v)

    if (required) {
      validators.unshift((value) => (isEmpty(value) ? required : null))
    }

    return validators
  }

  useEffect(() => {
    registerField({ name, initialValue, validate: prepareValidators() })

    return () => {
      deregisterField(name)
    }
  }, [name])

  const fieldState = getFieldState(name, initialValue)

  return {
    name,
    value: fieldState.value,
    error: fieldState.error,
    touched: fieldState.touched,
    onChange: (e) => setFieldValue(name, e.target.value),
    onBlur: () => setFieldTouched(name, true),
  }
}

export default useField


text:
if rpm -qa | grep -q xinetd; then
	yum -y remove xinetd
fi


text:
package com.cdancy.bitbucket.rest.features;

import com.cdancy.bitbucket.rest.BitbucketApi;
import com.cdancy.bitbucket.rest.BitbucketApiMetadata;
import com.cdancy.bitbucket.rest.domain.repository.Hook;
import com.cdancy.bitbucket.rest.domain.repository.HookPage;
import com.cdancy.bitbucket.rest.BaseBitbucketMockTest;
import com.cdancy.bitbucket.rest.TestUtilities;
import com.cdancy.bitbucket.rest.domain.repository.HookSettings;
import com.google.common.collect.ImmutableMap;
import com.squareup.okhttp.mockwebserver.MockResponse;
import com.squareup.okhttp.mockwebserver.MockWebServer;
import org.testng.annotations.Test;

import java.util.HashMap;
import java.util.Map;

import static org.assertj.core.api.Assertions.assertThat;

/**
 * Mock tests for the {@link HookApi} class.
 */
@Test(groups = "unit", testName = "HookApiMockTest")
public class HookApiMockTest extends BaseBitbucketMockTest {

    private final String projectKey = "PRJ";
    private final String repoKey = "my-repo";
    private final String getMethod = "GET";
    private final String deleteMethod = "DELETE";
    private final String putMethod = "PUT";

    private final String restApiPath = "/rest/api/";
    private final String projectsPath = "/projects/";
    private final String settingsPath = "/settings/";
    private final String hooksPath = settingsPath + "hooks";
    private final String reposPath = "/repos/";
    private final String enabledEndpoint = "/enabled";
    private final String settingsEndpoint = "/settings";

    private final String qwertyKeyword = "qwerty";
    private final String limitKeyword = "limit";
    private final String startKeyword = "start";

    final String testKey = "string-value";
    final String testValue = "this is an arbitrary string";

    private final String hookErrorJsonFile = "/repository-hook-error.json";

    public void testListHook() throws Exception {
        final MockWebServer server = mockWebServer();

        server.enqueue(new MockResponse().setBody(payloadFromResource("/repository-hooks.json")).setResponseCode(200));
        final BitbucketApi baseApi = api(server.getUrl("/"));
        final HookApi api = baseApi.hookApi();
        try {

            final HookPage hookPage = api.list(projectKey, repoKey, 0, 100);
            assertThat(hookPage).isNotNull();
            assertThat(hookPage.values()).isNotEmpty();
            assertThat(hookPage.errors()).isEmpty();

            final Map<String, ?> queryParams = ImmutableMap.of(limitKeyword, 100, startKeyword, 0);
            assertSent(server, getMethod, restApiPath + BitbucketApiMetadata.API_VERSION
                    + projectsPath + projectKey + reposPath + repoKey + hooksPath, queryParams);
        } finally {
            baseApi.close();
            server.shutdown();
        }
    }

    public void testListHookOnError() throws Exception {
        final MockWebServer server = mockWebServer();

        server.enqueue(new MockResponse().setBody(payloadFromResource("/repository-not-exist.json")).setResponseCode(404));
        final BitbucketApi baseApi = api(server.getUrl("/"));
        final HookApi api = baseApi.hookApi();
        try {

            final HookPage hookPage = api.list(projectKey, repoKey, 0, 100);
            assertThat(hookPage).isNotNull();
            assertThat(hookPage.values()).isEmpty();
            assertThat(hookPage.errors()).isNotEmpty();

            final Map<String, ?> queryParams = ImmutableMap.of(limitKeyword, 100, startKeyword, 0);
            assertSent(server, getMethod, restApiPath + BitbucketApiMetadata.API_VERSION
                    + projectsPath + projectKey + reposPath + repoKey + hooksPath, queryParams);
        } finally {
            baseApi.close();
            server.shutdown();
        }
    }

    public void testGetHook() throws Exception {
        final MockWebServer server = mockWebServer();

        server.enqueue(new MockResponse().setBody(payloadFromResource("/repository-hook.json")).setResponseCode(200));
        final BitbucketApi baseApi = api(server.getUrl("/"));
        final HookApi api = baseApi.hookApi();
        try {

            final String hookKey = qwertyKeyword;
            final Hook hookPage = api.get(projectKey, repoKey, hookKey);
            assertThat(hookPage).isNotNull();
            assertThat(hookPage.enabled()).isFalse();
            assertThat(hookPage.errors()).isEmpty();

            assertSent(server, getMethod, restApiPath + BitbucketApiMetadata.API_VERSION
                    + projectsPath + projectKey + reposPath + repoKey + hooksPath + "/" + hookKey);
        } finally {
            baseApi.close();
            server.shutdown();
        }
    }

    public void testGetHookOnError() throws Exception {
        final MockWebServer server = mockWebServer();

        server.enqueue(new MockResponse().setBody(payloadFromResource(hookErrorJsonFile)).setResponseCode(404));
        final BitbucketApi baseApi = api(server.getUrl("/"));
        final HookApi api = baseApi.hookApi();
        try {

            final String hookKey = qwertyKeyword;
            final Hook hookPage = api.get(projectKey, repoKey, hookKey);
            assertThat(hookPage).isNotNull();
            assertThat(hookPage.enabled()).isFalse();
            assertThat(hookPage.errors()).isNotEmpty();

            assertSent(server, getMethod, restApiPath + BitbucketApiMetadata.API_VERSION
                    + projectsPath + projectKey + reposPath + repoKey + hooksPath + "/" + hookKey);
        } finally {
            baseApi.close();
            server.shutdown();
        }
    }

    public void testEnableHook() throws Exception {
        final MockWebServer server = mockWebServer();

        server.enqueue(new MockResponse().setBody(payloadFromResource("/repository-hook.json")).setResponseCode(200));
        final BitbucketApi baseApi = api(server.getUrl("/"));
        final HookApi api = baseApi.hookApi();
        try {

            final String hookKey = qwertyKeyword;
            final Hook hookPage = api.enable(projectKey, repoKey, hookKey);
            assertThat(hookPage).isNotNull();
            assertThat(hookPage.enabled()).isFalse();
            assertThat(hookPage.errors()).isEmpty();

            assertSent(server, putMethod, restApiPath + BitbucketApiMetadata.API_VERSION
                    + projectsPath + projectKey + reposPath + repoKey + hooksPath + "/" + hookKey + enabledEndpoint);
        } finally {
            baseApi.close();
            server.shutdown();
        }
    }

    public void testEnableHookOnError() throws Exception {
        final MockWebServer server = mockWebServer();

        server.enqueue(new MockResponse().setBody(payloadFromResource(hookErrorJsonFile)).setResponseCode(404));
        final BitbucketApi baseApi = api(server.getUrl("/"));
        final HookApi api = baseApi.hookApi();
        try {

            final String hookKey = qwertyKeyword;
            final Hook hookPage = api.enable(projectKey, repoKey, hookKey);
            assertThat(hookPage).isNotNull();
            assertThat(hookPage.enabled()).isFalse();
            assertThat(hookPage.errors()).isNotEmpty();

            assertSent(server, putMethod, restApiPath + BitbucketApiMetadata.API_VERSION
                    + projectsPath + projectKey + reposPath + repoKey + hooksPath + "/" + hookKey + enabledEndpoint);
        } finally {
            baseApi.close();
            server.shutdown();
        }
    }

    public void testDisableHook() throws Exception {
        final MockWebServer server = mockWebServer();

        server.enqueue(new MockResponse().setBody(payloadFromResource("/repository-hook.json")).setResponseCode(200));
        final BitbucketApi baseApi = api(server.getUrl("/"));
        final HookApi api = baseApi.hookApi();
        try {

            final String hookKey = qwertyKeyword;
            final Hook hookPage = api.disable(projectKey, repoKey, hookKey);
            assertThat(hookPage).isNotNull();
            assertThat(hookPage.enabled()).isFalse();
            assertThat(hookPage.errors()).isEmpty();

            assertSent(server, deleteMethod, restApiPath + BitbucketApiMetadata.API_VERSION
                    + projectsPath + projectKey + reposPath + repoKey + hooksPath + "/" + hookKey + enabledEndpoint);
        } finally {
            baseApi.close();
            server.shutdown();
        }
    }

    public void testDisableHookOnError() throws Exception {
        final MockWebServer server = mockWebServer();

        server.enqueue(new MockResponse().setBody(payloadFromResource(hookErrorJsonFile)).setResponseCode(404));
        final BitbucketApi baseApi = api(server.getUrl("/"));
        final HookApi api = baseApi.hookApi();
        try {

            final String hookKey = qwertyKeyword;
            final Hook hookPage = api.disable(projectKey, repoKey, hookKey);
            assertThat(hookPage).isNotNull();
            assertThat(hookPage.enabled()).isFalse();
            assertThat(hookPage.errors()).isNotEmpty();

            assertSent(server, deleteMethod, restApiPath + BitbucketApiMetadata.API_VERSION
                    + projectsPath + projectKey + reposPath + repoKey + hooksPath + "/" + hookKey + enabledEndpoint);
        } finally {
            baseApi.close();
            server.shutdown();
        }
    }

    public void testGetHookSettings() throws Exception {
        final MockWebServer server = mockWebServer();

        server.enqueue(new MockResponse().setBody(payloadFromResource("/hook-settings.json")).setResponseCode(200));
        final BitbucketApi baseApi = api(server.getUrl("/"));
        final HookApi api = baseApi.hookApi();
        try {

            final String hookKey = qwertyKeyword;
            final HookSettings hookSettings = api.settings(projectKey, repoKey, hookKey);
            assertThat(hookSettings).isNotNull();
            assertThat(hookSettings.errors()).isEmpty();
            final String possibleValue = hookSettings
                    .settings()
                    .getAsJsonObject()
                    .get(testKey)
                    .getAsString();
            assertThat(possibleValue).isEqualTo(testValue);

            assertSent(server, getMethod, restApiPath + BitbucketApiMetadata.API_VERSION
                    + projectsPath + projectKey + reposPath + repoKey + hooksPath + "/" + hookKey + settingsEndpoint);
        } finally {
            baseApi.close();
            server.shutdown();
        }
    }

    public void testGetHookSettingsNonExistent() throws Exception {
        final MockWebServer server = mockWebServer();

        server.enqueue(new MockResponse().setResponseCode(204));
        final BitbucketApi baseApi = api(server.getUrl("/"));
        final HookApi api = baseApi.hookApi();
        try {

            final String hookKey = qwertyKeyword;
            final HookSettings hookSettings = api.settings(projectKey, repoKey, hookKey);
            assertThat(hookSettings).isNotNull();
            assertThat(hookSettings.settings().getAsJsonObject().entrySet()).isEmpty();
            assertThat(hookSettings.errors()).isEmpty();

            assertSent(server, getMethod, restApiPath + BitbucketApiMetadata.API_VERSION
                    + projectsPath + projectKey + reposPath + repoKey + hooksPath + "/" + hookKey + settingsEndpoint);
        } finally {
            baseApi.close();
            server.shutdown();
        }
    }

    public void testGetHookSettiingsOnError() throws Exception {
        final MockWebServer server = mockWebServer();

        server.enqueue(new MockResponse().setBody(payloadFromResource(hookErrorJsonFile)).setResponseCode(404));
        final BitbucketApi baseApi = api(server.getUrl("/"));
        final HookApi api = baseApi.hookApi();
        try {

            final String hookKey = qwertyKeyword;
            final HookSettings hookSettings = api.settings(projectKey, repoKey, hookKey);
            assertThat(hookSettings).isNotNull();
            assertThat(hookSettings.errors()).isNotEmpty();

            assertSent(server, getMethod, restApiPath + BitbucketApiMetadata.API_VERSION
                    + projectsPath + projectKey + reposPath + repoKey + hooksPath + "/" + hookKey + settingsEndpoint);
        } finally {
            baseApi.close();
            server.shutdown();
        }
    }

    public void testUpdateHookSettings() throws Exception {
        final MockWebServer server = mockWebServer();

        server.enqueue(new MockResponse().setBody(payloadFromResource("/hook-settings.json")).setResponseCode(200));
        final BitbucketApi baseApi = api(server.getUrl("/"));
        final HookApi api = baseApi.hookApi();
        try {

            final Map settings = new HashMap();
            settings.put(testKey, testValue);
            final HookSettings updateHook = HookSettings.of(settings);

            final String hookKey = qwertyKeyword;
            final HookSettings hookSettings = api.update(projectKey, repoKey, hookKey, updateHook);
            assertThat(hookSettings).isNotNull();
            assertThat(hookSettings.settings().getAsJsonObject().entrySet()).isNotEmpty();
            assertThat(hookSettings.errors()).isEmpty();
            final String possibleValue = hookSettings
                    .settings()
                    .getAsJsonObject()
                    .get(testKey)
                    .getAsString();
            assertThat(possibleValue).isEqualTo(testValue);

            assertSent(server, putMethod, restApiPath + BitbucketApiMetadata.API_VERSION
                    + projectsPath + projectKey + reposPath + repoKey + hooksPath + "/" + hookKey + settingsEndpoint);
        } finally {
            baseApi.close();
            server.shutdown();
        }
    }

    public void testUpdateHookSettingsNonExistent() throws Exception {
        final MockWebServer server = mockWebServer();

        server.enqueue(new MockResponse().setResponseCode(204));
        final BitbucketApi baseApi = api(server.getUrl("/"));
        final HookApi api = baseApi.hookApi();
        try {

            final Map settings = new HashMap();
            settings.put(testKey, testValue);
            final HookSettings updateHook = HookSettings.of(settings);

            final String hookKey = TestUtilities.randomStringLettersOnly();
            final HookSettings hookSettings = api.update(projectKey,
                    repoKey,
                    hookKey,
                    updateHook);
            assertThat(hookSettings).isNotNull();
            assertThat(hookSettings.settings().getAsJsonObject().entrySet()).isEmpty();
            assertThat(hookSettings.errors()).isEmpty();

            assertSent(server, putMethod, restApiPath + BitbucketApiMetadata.API_VERSION
                    + projectsPath + projectKey + reposPath + repoKey + hooksPath + "/" + hookKey + settingsEndpoint);
        } finally {
            baseApi.close();
            server.shutdown();
        }
    }
}


text:
package org.nebulae2us.stardust;

import org.nebulae2us.stardust.dao.SqlBundle;
import org.nebulae2us.stardust.expr.domain.Expression;
import org.nebulae2us.stardust.translate.domain.ParamValues;
import org.nebulae2us.stardust.translate.domain.Translator;
import org.nebulae2us.stardust.translate.domain.TranslatorContext;
import org.nebulae2us.stardust.translate.domain.TranslatorController;

/**
 * @author Trung Phan
 *
 */
public abstract class TranslationReady {

	private final Expression expression;

	private final TranslatorContext translatorContext;

	private final ParamValues paramValues;

	public TranslationReady(TranslatorContext translatorContext, Expression expression, ParamValues paramValues) {
		this.translatorContext = translatorContext;
		this.expression = expression;
		this.paramValues = paramValues;
	}

	public SqlBundle translate() {
		TranslatorController controller = translatorContext.getTranslatorController();
		Translator translator = controller.findTranslator(this.expression, this.paramValues);
		return translator.translate(this.translatorContext, this.expression, this.paramValues);
	}

	public TranslatorContext getTranslatorContext() {
		return translatorContext;
	}

}


text:
// Header for CPropMailboxQuota class

#ifndef __CPROPMAILBOXQUOTA__MULBERRY__
#define __CPROPMAILBOXQUOTA__MULBERRY__

#include "CMailboxPropPanel.h"

// Classes
class CMbox;
class CQuotaTable;

class CPropMailboxQuota : public CMailboxPropPanel
{
public:
		CPropMailboxQuota(JXContainer* enclosure,
				 const HSizingOption hSizing, const VSizingOption vSizing,
				 const JCoordinate x, const JCoordinate y,
				 const JCoordinate w, const JCoordinate h)
			: CMailboxPropPanel(enclosure, hSizing, vSizing, x, y, w, h) {}

	virtual void	OnCreate();								// Do odds & ends
	virtual void	SetMboxList(CMboxList* mbox_list);		// Set mbox list
	virtual void	SetProtocol(CMboxProtocol* protocol);	// Set protocol
	virtual void	ApplyChanges(void);						// Force update of mboxes

protected:
// begin JXLayout1

// end JXLayout1

private:
	CQuotaTable*	mTable;

			void	SetMbox(CMbox* mbox);					// Set mbox item

};

#endif


text:
import android.os.Bundle;
import android.app.Activity;
import android.view.View;

public class MainActivity extends Activity  {

    @Bind(R.id.password) View password;
    @Bind(R.id.login) View login;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);
        ButterKnife.bind(this);

    }

}


text:
using System;
using Sensus.Anonymization;
using Sensus.Anonymization.Anonymizers;
using Sensus.Probes.User.Scripts.ProbeTriggerProperties;

namespace Sensus.Probes.User.MicrosoftBand
{
    public class MicrosoftBandSkinTemperatureDatum : Datum
    {
        private double _temperature;

        [Anonymizable(null, new Type[] { typeof(DoubleRoundingOnesAnonymizer), typeof(DoubleRoundingTensAnonymizer) }, -1)]
        [DoubleProbeTriggerProperty]
        public double Temperature
        {
            get
            {
                return _temperature;
            }

            set
            {
                _temperature = value;
            }
        }

        public override string DisplayDetail
        {
            get
            {
                return "Temperature:  " + Math.Round(_temperature, 1);
            }
        }

        /// <summary>
        /// Gets the string placeholder value, which is the skin temperature.
        /// </summary>
        /// <value>The string placeholder value.</value>
        public override object StringPlaceholderValue
        {
            get
            {
                return Math.Round(_temperature, 1);
            }
        }

        /// <summary>
        /// For JSON.net deserialization.
        /// </summary>
        private MicrosoftBandSkinTemperatureDatum()
        {
        }

        public MicrosoftBandSkinTemperatureDatum(DateTimeOffset timestamp, double temperature)
            : base(timestamp)
        {
            _temperature = temperature;
        }

        public override string ToString()
        {
            return base.ToString() + Environment.NewLine +
                   "Temperature:  " + _temperature;
        }
    }
}


text:
How to do a standalone file install of NodeJS on Ubuntu

## Installing standalone

1. Download the linux binaries from [NodeJS](https://nodejs.org/)

2. Add node to path and add a new environment variable called NODE_PATH in /etc/environment
```
PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/home/node/bin"
NODE_PATH=/home/node/lib/node_modules
```

3. Log out and back in again to refresh the variables.

## Extra info

Environment variables can also be set for current session with the "export" command and be called with a $ from commandline.

```
export NODE_PATH=/home/node/lib/node_modules
cd $NODE_PATH
```

It is also possible on some systems to just add these through an environment profile like the Ubuntu .profile.

```
NODE_VERSION=node-v6.2.0

export PATH=$PATH:/home/node/$NODE_VERSION/bin
export NODE_PATH=/home/node/$NODE_VERSION/lib/node_modules
```


text:
import { Component, OnInit, OnDestroy, Input } from "@angular/core";
import { Store } from "@ngrx/store";
import { Observable, of, Subscription } from "rxjs";
import { map } from "rxjs/operators";
import { ActivatedRoute } from "@angular/router";
import { FormGroup, FormControl, FormBuilder, FormArray, Validators } from "@angular/forms";

import { RouterExtensions, Config } from "../../modules/core/index";
import { Platform, Zone } from "../../modules/datas/models/index";
import { Country } from "../../modules/countries/models/country";

import { IAppState, getPlatformPageError, getSelectedPlatform, getSelectedZone, getAllCountriesInApp } from "../../modules/ngrx/index";
import { PlatformAction } from "../../modules/datas/actions/index";
import { CountriesAction } from "../../modules/countries/actions/index";

@Component({
  selector: "bc-zone-page",
  template: `
    <bc-zone-form
      (submitted)="onSubmit($event)"
      [errorMessage]="error$ | async"
      [platform]="platform$ | async"
      [zone]="zone$ | async"
      [countries]="countries$ | async">
    </bc-zone-form>
  `,
  styles: [
    `
      mat-card {
        text-align: center;
      }
      mat-card-title {
        display: flex;
        justify-content: center;
      }
    `
  ]
})
export class ZoneFormPageComponent implements OnInit, OnDestroy {
  error$: Observable<string | null>;
  platform$: Observable<Platform>;
  zone$: Observable<Zone | null>;
  platformSubscription: Subscription;
  zoneSubscription: Subscription;
  countries$: Observable<Country[]>;

  constructor(private store: Store<IAppState>, public routerext: RouterExtensions, private route: ActivatedRoute, private _fb: FormBuilder) {
    this.platformSubscription = route.params.pipe(map(params => new PlatformAction.SelectPlatformAction(params.idPlatform))).subscribe(store);
    this.zoneSubscription = route.params.pipe(map(params => new PlatformAction.SelectZoneAction(params.idZone))).subscribe(store);
  }

  ngOnInit() {
    this.store.dispatch(new CountriesAction.LoadAction());
    this.platform$ = this.store.select(getSelectedPlatform);
    this.zone$ = this.store.select(getSelectedZone);
    this.countries$ = this.store.select(getAllCountriesInApp);
  }

  ngOnDestroy() {
    this.platformSubscription.unsubscribe();
    this.zoneSubscription.unsubscribe();
  }

  onSubmit(zone: Zone) {
    this.store.dispatch(new PlatformAction.AddZoneAction(zone));
  }
}


text:
import { connect } from 'react-redux';
import { bindActionCreators } from 'redux';
import * as actions from './actions';

const options = {
  withRef: true
};

export default ({ mapStateToProps, mapDispatchToProps, mergeProps, LayoutComponent }) => connect(
    mapStateToProps || function(state) {
      return {};
    },
    mapDispatchToProps || function(dispatch) {
      return {
        actions: bindActionCreators(actions, dispatch)
      };
    },
    mergeProps,
    options
  )(LayoutComponent);


text:
import DS from 'ember-data';
import DataAdapterMixin from 'ember-simple-auth/mixins/data-adapter-mixin';

// NB Change type of ADAPTER to be the same as in eployees adapter - RESTAdapter
// NB Delete findALl()
// NB Delete findRecord()
// export default DS.Adapter.extend({
export default DS.RESTAdapter.extend(DataAdapterMixin, {
// namespace: 'api',
authorizer: 'authorizer:oauth2',
host: 'http://localhost:80/employees'
// host: 'http://localhost:80/intranet-api'
//
//   findAll() {
//     return [
//                 {
//                     id: '1',
//                     optionName: 'cQuest'
//                 },
//                 {
//                     id: '2',
//                     optionName: 'gemSeek'
//                 }
//
//             ]
//   },
//   findRecord() {
//     return {
//                   id: '1',
//                   optionName: "cQuest"
//               };
//   }
});


text:
Lab 6 - Readme

CSC:
Jack BOWEN
NICKI brower
Nicolas HIGUERA

BIO:
ALIX Stevenson
Harry SINGH
JULIE Weise
Shereen CHEW

Setup
---------------------------------------------------
Extract the zip to a directory on your computer.
Inside of where you extracted the files, double click "Lab6.jar".
If a security warning pops up, right click to open and dismiss any security warnings while opening.

Fill the following boxes as follows
---------------------------------------------------
Exon 1 start position: the position of the first exon's start.
Exon 1 end position: the position of the first exon's end.
Exon 2 start position: the position of the second exon's start.
Exon 2 end position: the position of the second exon's end.

Hidden exon length: the expected length of the hidden exon.
Hidden intron length(s): the length of the hidden introns.

Percent A in exon: Percentage between 0 and 1 associated for encountering a "A" inside an exon.
Percent T in exon: Percentage between 0 and 1 associated for encountering a "T" inside an exon.
Percent G in exon: Percentage between 0 and 1 associated for encountering a "G" inside an exon.
Percent C in exon: Percentage between 0 and 1 associated for encountering a "C" inside an exon.
Note: Percentages of A, T, G, and C must add up to 1.0

Percent A in intron: Percentage between 0 and 1 associated for encountering a "A" inside an intron.
Percent T in intron: Percentage between 0 and 1 associated for encountering a "T" inside an intron.
Percent G in intron: Percentage between 0 and 1 associated for encountering a "G" inside an intron.
Percent C in intron: Percentage between 0 and 1 associated for encountering a "C" inside an intron.
Note: Percentages of A, T, G, and C must add up to 1.0

Upload Fasta
---------------------------------------------------
Upload the FASTA file by clicking the "Upload FASTA" button.
Select the FASTA file in the file browser that appears.

Run
---------------------------------------------------
Click "Run" to learn about the query on the provided FASTA file.

Note: When running, make sure to close any existing CSV files that were previously generated otherwise the CSV runs a risk of not being generated properly.

PS: Swag


text:
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;

namespace RecruitmentManagementSystem.Model
{
    public class Course : BaseEntity
    {
        [Required]
        [StringLength(50, ErrorMessage = "The {0} must be at most {1} characters long.")]
        public string Title { get; set; }

        [StringLength(300, ErrorMessage = "The {0} must be at most {1} characters long.")]
        public string Description { get; set; }

        public ICollection<Quiz> Quizzes { get; set; }
    }
}


text:
import { async, ComponentFixture, TestBed } from '@angular/core/testing';

import { E2EImportsModule } from 'e2e-imports.module';

import { WorkflowDetailComponent } from './workflow-detail.component';

describe('WorkflowDetailComponent', () => {
    let component: WorkflowDetailComponent;
    let fixture: ComponentFixture<WorkflowDetailComponent>;

    beforeEach(async(() => {
        TestBed.configureTestingModule({
            imports: [E2EImportsModule],
            declarations: [WorkflowDetailComponent]
        }).compileComponents();
    }));

    beforeEach(() => {
        fixture = TestBed.createComponent(WorkflowDetailComponent);
        component = fixture.componentInstance;
        fixture.detectChanges();
    });

    it('should create', () => {
        expect(component).toBeTruthy();
    });
});


text:
<link rel="import" href="../polymer/polymer.html">
<link rel="import" href="../expandjs/expandjs.html">
<link rel="import" href="../xp-elements/xp-base-behavior.html">
<link rel="import" href="mat-drawer.html">

<dom-module id="mat-drawer-panel">

    <template strip-whitespace>

<slot></slot>

<slot name="drawer"></slot>

    </template>

</dom-module>


text:
import unittest
import flavio
import numpy as np
from cmath import exp, pi
from wilson import Wilson

from flavio.physics.taudecays.test_taulgamma import compare_BR

class TestMuEGamma(unittest.TestCase):
    def test_muegamma(self):
        self.assertEqual(flavio.sm_prediction('BR(mu->egamma)'), 0)
    def test_tauegamma_implementation(self):
        input_dict_list=[{
        'Cgamma_mue':np.random.random()*1e-8*exp(1j*2*pi*np.random.random()),
        'Cgamma_emu':np.random.random()*1e-8*exp(1j*2*pi*np.random.random()),
        } for i in range(10)]
        BRs = np.array([
            flavio.np_prediction(
                'BR(mu->egamma)',
                Wilson(input_dict, 100,  'WET', 'flavio')
            )
            for input_dict in input_dict_list
        ])
        compare_BRs = np.array([
            compare_BR(
                Wilson(input_dict, 100,  'WET', 'flavio'),
                'mu', 'e',
            )
            for input_dict in input_dict_list
        ])
        self.assertAlmostEqual(np.max(np.abs(1-BRs/compare_BRs)), 0, delta=0.005)


text:
[![Build Status](https://travis-ci.org/jasonhotsauce/LRUCache.svg?branch=master)](https://travis-ci.org/jasonhotsauce/LRUCache)

Swift implementation of LRUCache