text:
package org.apache.camel.component.sip;

import org.apache.camel.Component;
import org.apache.camel.Consumer;
import org.apache.camel.Processor;
import org.apache.camel.Producer;
import org.apache.camel.impl.DefaultEndpoint;
import org.apache.camel.spi.UriEndpoint;
import org.apache.camel.spi.UriParam;

@UriEndpoint(scheme = "sip", label = "messaging")
public class SipEndpoint extends DefaultEndpoint {
    @UriParam
    private SipConfiguration configuration;

    public SipEndpoint(String endpointUri, Component component, SipConfiguration configuration) {
        super(endpointUri, component);
        this.configuration = configuration;
    }

    public Consumer createConsumer(Processor processor) throws Exception {
        if (configuration.isPresenceAgent()) {
            SipPresenceAgent answer = new SipPresenceAgent(this, processor, configuration);
            configureConsumer(answer);
            return answer;
        } else {
            SipSubscriber answer = new SipSubscriber(this, processor, configuration);
            configureConsumer(answer);
            return answer;
        }
    }

    public Producer createProducer() throws Exception {
        return new SipPublisher(this, configuration);
    }

    public boolean isSingleton() {
        return false;
    }

    public SipConfiguration getConfiguration() {
        return configuration;
    }

    public void setConfiguration(SipConfiguration configuration) {
        this.configuration = configuration;
    }

}


text:
SROOT=$(cd $(dirname "$0"); pwd)
cd $SROOT

# the name of https://app.opsgenie.com/heartbeat
SERVICE="btc-bitcoind.1"
# api key of opsgenie
API_KEY="xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
# api endpoint
MURL="https://api.opsgenie.com/v1/json/heartbeat/send"
# error log
LOG=/var/log/opsgenie-monitor-bitcoind.log

BITCOIND_RPC="bitcoin-cli "
#WANIP=`curl -sL https://ip.btc.com`

#NOERROR=`$BITCOIND_RPC getinfo |  grep '"errors" : ""' | wc -l`
HEIGHT=`$BITCOIND_RPC getinfo | grep "blocks" | awk '{print $2}' | awk -F"," '{print $1}'`
CONNS=`$BITCOIND_RPC getinfo | grep "connections" | awk '{print $2}' | awk -F"," '{print $1}'`
DATE=`date "+%Y-%m-%d %H:%M:%S"`

#VALUE="height:$HEIGHT;conn:$CONNS;"

DATA=`cat << EOF
{"apiKey":"$API_KEY","name":"$SERVICE"}
EOF`

if [[ $CONNS -ne 0 ]]; then
  result=`curl -XPOST --max-time 30 -s -S $MURL -d "$DATA" 2>&1`
  success=`echo "$result" | grep successful`

  if [ "x$success" = "x" ]; then
    echo "[$DATE] api response is not successful: $result" >>$LOG
  fi

  echo "$result"
else
  echo "[$DATE] bitcoind's connections is 0: $RPCINFO" >>$LOG
  echo "$RPCINFO"
fi

redpajama_set_name: RedPajamaGithub


text:
#include <stdio.h>
#include <stdlib.h>
#include <execinfo.h>
#include <ucontext.h>
#include <signal.h>
static void *getMcontextEip(ucontext_t *uc) {
#if defined(__FreeBSD__)
    return (void*) uc->uc_mcontext.mc_eip;
#elif defined(__dietlibc__)
    return (void*) uc->uc_mcontext.eip;
#elif defined(__APPLE__) && !defined(MAC_OS_X_VERSION_10_6)
  #if __x86_64__
    return (void*) uc->uc_mcontext->__ss.__rip;
  #elif __i386__
    return (void*) uc->uc_mcontext->__ss.__eip;
  #else
    return (void*) uc->uc_mcontext->__ss.__srr0;
  #endif
#elif defined(__APPLE__) && defined(MAC_OS_X_VERSION_10_6)
  #if defined(_STRUCT_X86_THREAD_STATE64) && !defined(__i386__)
    return (void*) uc->uc_mcontext->__ss.__rip;
  #else
    return (void*) uc->uc_mcontext->__ss.__eip;
  #endif
#elif defined(__i386__)
    return (void*) uc->uc_mcontext.gregs[14]; /* Linux 32 */
#elif defined(__X86_64__) || defined(__x86_64__)
    return (void*) uc->uc_mcontext.gregs[16]; /* Linux 64 */
#elif defined(__ia64__) /* Linux IA64 */
    return (void*) uc->uc_mcontext.sc_ip;
#else
    return NULL;
#endif
}
static void sigsegvHandler(int sig, siginfo_t *info, void *secret)
{
	ucontext_t *uc = (ucontext_t*)secret;
	void *trace[100];
	char **messages = NULL;
	int i, trace_size = 0;
	trace_size = backtrace(trace, 100);
	if (getMcontextEip(uc) != NULL) {
	trace[1] = getMcontextEip(uc);
	}
	messages = backtrace_symbols(trace, trace_size);
	for (i=1; i<trace_size; ++i)
		printf("%s\n", messages[i]);
}
void setupSignalHandlers(void) {
    struct sigaction act;
    sigemptyset(&act.sa_mask);
    act.sa_flags = SA_NODEFER | SA_ONSTACK | SA_RESETHAND | SA_SIGINFO;
    act.sa_sigaction = sigsegvHandler;
    sigaction(SIGSEGV, &act, NULL);
	sigaction(SIGBUS, &act, NULL);
	sigaction(SIGFPE, &act, NULL);
	sigaction(SIGILL, &act, NULL);
}
void foo(void)
{
	kill(getpid(),SIGSEGV);
}
int main(int argc,char *argv[])
{
	setupSignalHandlers() ;
	foo();
	return 0;
}


text:
package commands

import (
	"errors"
	"strings"

	"github.com/emersion/go-imap"
)

// Uid is a UID command, as defined in RFC 3501 section 6.4.8. It wraps another
// command (e.g. wrapping a Fetch command will result in a UID FETCH).
type Uid struct {
	Cmd imap.Commander
}

func (cmd *Uid) Command() *imap.Command {
	inner := cmd.Cmd.Command()

	args := []interface{}{imap.RawString(inner.Name)}
	args = append(args, inner.Arguments...)

	return &imap.Command{
		Name:      "UID",
		Arguments: args,
	}
}

func (cmd *Uid) Parse(fields []interface{}) error {
	if len(fields) < 0 {
		return errors.New("No command name specified")
	}

	name, ok := fields[0].(string)
	if !ok {
		return errors.New("Command name must be a string")
	}

	cmd.Cmd = &imap.Command{
		Name:      strings.ToUpper(name), // Command names are case-insensitive
		Arguments: fields[1:],
	}

	return nil
}


text:
#pragma once
#include <aws/config/ConfigService_EXPORTS.h>
#include <aws/core/utils/memory/stl/AWSVector.h>
#include <aws/core/utils/memory/stl/AWSString.h>
#include <aws/config/model/ComplianceByResource.h>

namespace Aws
{
template<typename RESULT_TYPE>
class AmazonWebServiceResult;

namespace Utils
{
namespace Json
{
  class JsonValue;
} // namespace Json
} // namespace Utils
namespace ConfigService
{
namespace Model
{
  /**
   *

   */
  class AWS_CONFIGSERVICE_API DescribeComplianceByResourceResult
  {
  public:
    DescribeComplianceByResourceResult();
    DescribeComplianceByResourceResult(const AmazonWebServiceResult<Aws::Utils::Json::JsonValue>& result);
    DescribeComplianceByResourceResult& operator=(const AmazonWebServiceResult<Aws::Utils::Json::JsonValue>& result);

    /**
     *
Indicates whether the specified AWS resource complies with all of the AWS
     * Config rules that evaluate it.

     */
    inline const Aws::Vector<ComplianceByResource>& GetComplianceByResources() const{ return m_complianceByResources; }

    /**
     *
Indicates whether the specified AWS resource complies with all of the AWS
     * Config rules that evaluate it.

     */
    inline void SetComplianceByResources(const Aws::Vector<ComplianceByResource>& value) { m_complianceByResources = value; }

    /**
     *
Indicates whether the specified AWS resource complies with all of the AWS
     * Config rules that evaluate it.

     */
    inline void SetComplianceByResources(Aws::Vector<ComplianceByResource>&& value) { m_complianceByResources = value; }

    /**
     *
Indicates whether the specified AWS resource complies with all of the AWS
     * Config rules that evaluate it.

     */
    inline DescribeComplianceByResourceResult& WithComplianceByResources(const Aws::Vector<ComplianceByResource>& value) { SetComplianceByResources(value); return *this;}

    /**
     *
Indicates whether the specified AWS resource complies with all of the AWS
     * Config rules that evaluate it.

     */
    inline DescribeComplianceByResourceResult& WithComplianceByResources(Aws::Vector<ComplianceByResource>&& value) { SetComplianceByResources(value); return *this;}

    /**
     *
Indicates whether the specified AWS resource complies with all of the AWS
     * Config rules that evaluate it.

     */
    inline DescribeComplianceByResourceResult& AddComplianceByResources(const ComplianceByResource& value) { m_complianceByResources.push_back(value); return *this; }

    /**
     *
Indicates whether the specified AWS resource complies with all of the AWS
     * Config rules that evaluate it.

     */
    inline DescribeComplianceByResourceResult& AddComplianceByResources(ComplianceByResource&& value) { m_complianceByResources.push_back(value); return *this; }

    /**
     *
The string that you use in a subsequent request to get the next page of
     * results in a paginated response.

     */
    inline const Aws::String& GetNextToken() const{ return m_nextToken; }

    /**
     *
The string that you use in a subsequent request to get the next page of
     * results in a paginated response.

     */
    inline void SetNextToken(const Aws::String& value) { m_nextToken = value; }

    /**
     *
The string that you use in a subsequent request to get the next page of
     * results in a paginated response.

     */
    inline void SetNextToken(Aws::String&& value) { m_nextToken = value; }

    /**
     *
The string that you use in a subsequent request to get the next page of
     * results in a paginated response.

     */
    inline void SetNextToken(const char* value) { m_nextToken.assign(value); }

    /**
     *
The string that you use in a subsequent request to get the next page of
     * results in a paginated response.

     */
    inline DescribeComplianceByResourceResult& WithNextToken(const Aws::String& value) { SetNextToken(value); return *this;}

    /**
     *
The string that you use in a subsequent request to get the next page of
     * results in a paginated response.

     */
    inline DescribeComplianceByResourceResult& WithNextToken(Aws::String&& value) { SetNextToken(value); return *this;}

    /**
     *
The string that you use in a subsequent request to get the next page of
     * results in a paginated response.

     */
    inline DescribeComplianceByResourceResult& WithNextToken(const char* value) { SetNextToken(value); return *this;}

  private:
    Aws::Vector<ComplianceByResource> m_complianceByResources;
    Aws::String m_nextToken;
  };

} // namespace Model
} // namespace ConfigService
} // namespace Aws


text:
require_relative '../../test_helper'

module PagarMe
  class TransferTest < PagarMeTestCase
    def setup
      super
      ensure_positive_balance
    end

    should 'be able to create a transfer' do
      transfer = PagarMe::Transfer.create transfer_params
      assert_transfer transfer
    end

    should 'be able to find with id' do
      transfer = PagarMe::Transfer.create transfer_params
      assert_transfer transfer

      found_transfer = PagarMe::Transfer.find_by_id transfer.id
      assert_transfer found_transfer
    end
  end
end


text:
package org.drools.workbench.models.testscenarios.backend;

import java.util.ArrayList;
import java.util.List;

import org.kie.api.runtime.rule.FactHandle;
import org.drools.workbench.models.testscenarios.shared.Scenario;
import org.junit.internal.AssumptionViolatedException;
import org.junit.internal.runners.model.EachTestNotifier;
import org.junit.runner.Description;
import org.junit.runner.Runner;
import org.junit.runner.notification.RunNotifier;
import org.junit.runners.model.InitializationError;
import org.kie.api.runtime.KieSession;

public class ScenarioRunner4JUnit extends Runner {

    private final int maxRuleFirings;
    // The description of the test suite
    private Description descr;
    // the actual scenario test to be executed
    private List<Scenario> scenarios;
    private KieSession ksession;

    public ScenarioRunner4JUnit( final Scenario scenario,
                                 final KieSession ksession,
                                 final int maxRuleFirings ) throws InitializationError {
        this.scenarios = new ArrayList<Scenario>();
        this.scenarios.add( scenario );
        this.ksession = ksession;
        this.descr = Description.createSuiteDescription( "Scenario test cases" );
        this.maxRuleFirings = maxRuleFirings;
    }

    public ScenarioRunner4JUnit( final Scenario scenario,
                                 final KieSession ksession ) throws InitializationError {
        this( scenario,
              ksession,
              0 );
    }

    public ScenarioRunner4JUnit( final List<Scenario> scenarios,
                                 final KieSession ksession ) throws InitializationError {
        this( scenarios,
              ksession,
              0 );
    }

    public ScenarioRunner4JUnit( final List<Scenario> scenarios,
                                 final KieSession ksession,
                                 final int maxRuleFirings ) throws InitializationError {
        this.scenarios = scenarios;
        this.ksession = ksession;
        this.descr = Description.createSuiteDescription( "Scenario test cases" );
        this.maxRuleFirings = maxRuleFirings;
    }

    @Override
    public Description getDescription() {
        return descr;
    }

    @Override
    public void run( RunNotifier notifier ) {
        for ( Scenario scenario : scenarios ) {
            Description childDescription = Description.createTestDescription( getClass(),
                                                                              scenario.getName() );
            descr.addChild( childDescription );
            EachTestNotifier eachNotifier = new EachTestNotifier( notifier,
                                                                  childDescription );
            try {
                eachNotifier.fireTestStarted();

                //If a KieSession is not available, fail fast
                if ( ksession == null ) {
                    throw new NullKieSessionException( "Unable to get a Session to run tests. Check the project for build errors." );

                } else {

                    final ScenarioRunner runner = new ScenarioRunner( ksession,
                                                                      maxRuleFirings );
                    runner.run( scenario );
                    if ( !scenario.wasSuccessful() ) {
                        StringBuilder builder = new StringBuilder();
                        for ( String message : scenario.getFailureMessages() ) {
                            builder.append( message ).append( "\n" );
                        }
                        eachNotifier.addFailedAssumption( new AssumptionViolatedException( builder.toString() ) );
                    }

                    // FLUSSSSSH!
                    for (FactHandle factHandle : ksession.getFactHandles()) {
                        ksession.delete(factHandle);
                    }
                }
            } catch ( Throwable t ) {
                eachNotifier.addFailure( t );
            } finally {
                // has to always be called as per junit docs
                eachNotifier.fireTestFinished();
            }
        }
    }

}


text:
namespace AutoSandbox.Units {
    /// <summary>
    /// Enumeration that represents different units used to measure length.
    /// </summary>
    public enum LengthUnits : int {
        /// <summary>
        /// Millimeters -- TODO: Explain
        /// </summary>
        Millimeters = 0,

        /// <summary>
        /// Centimeters -- TODO: Explain
        /// </summary>
        Centimeters = 1,

        /// <summary>
        /// Meters -- TODO: Explain
        /// </summary>
        Meters = 2,

        /// <summary>
        /// Kilometers -- TODO: Explain
        /// </summary>
        Kilometers = 3,

        /// <summary>
        /// Inches -- TODO: Explain
        /// </summary>
        Inches = 4,

        /// <summary>
        /// Feet -- TODO: Explain
        /// </summary>
        Feet = 5,

        /// <summary>
        /// Yards -- TODO: Explain
        /// </summary>
        Yards = 6,

        /// <summary>
        /// Miles -- TODO: Explain
        /// </summary>
        Miles = 7,

        /// <summary>
        /// NauticalMiles -- TODO: Explain
        /// </summary>
        NauticalMiles = 8
    } // end enumeration LengthUnits
} // end namespace


text:
vimbb
=====

awesome vim setup

Installation
============

run:

    $ ./link.sh

or to do it yourself, just link the appropriate file/folder into your home directory:

    $ ln -s vim ~/.vim
    $ ln -s vimrc ~/.vimrc

to initialize and update a submodule, run:

    $ git submodule init
    $ git submodule update


text:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

<meta http-equiv="Content-Type" content="text/html" charset="UTF-8">
<title>Uses of Interface at.irian.ankor.context.ModelContextFactory (Ankor - Project 0.1 API)</title>
<meta name="date" content="2014-02-27">
<link rel="stylesheet" type="text/css" href="../../../../../stylesheet.css" title="Style">

JavaScript is disabled on your browser.

Overview

Package

Class

Use

Tree

Deprecated

Index

Help

Prev

Next

Frames

No Frames

All Classes

Uses of Interface
at.irian.ankor.context.ModelContextFactory

Packages that use ModelContextFactory

Package
Description

at.irian.ankor.context

Uses of ModelContextFactory in at.irian.ankor.context

Classes in at.irian.ankor.context that implement ModelContextFactory

Modifier and Type
Class and Description

class
DefaultModelContextFactory

Constructors in at.irian.ankor.context with parameters of type ModelContextFactory

Constructor and Description

DefaultModelContextManager(ModelContextFactory modelContextFactory)

Overview

Package

Class

Use

Tree

Deprecated

Index

Help

Prev

Next

Frames

No Frames

All Classes

Copyright © 2014. All rights reserved.


text:
package vrpsim.core.model.util.exceptions.detail;

import vrpsim.core.model.util.exceptions.StorageException;

public class NoStorageForTypeException extends StorageException {

	private static final long serialVersionUID = 3010830379194991333L;

	public NoStorageForTypeException(String msg) {
		super(msg);
	}

}


text:
<?php

/**
 *
 *
 * NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually.
 *
 */
class GetJobsDocumentsResponse {

  static $swaggerTypes = array(
      'result' => 'GetJobsDocumentsResult',
      'status' => 'string',
      'error_message' => 'string',
      'composedOn' => 'string'

    );

  public $result; // GetJobsDocumentsResult
  public $status; // string
  public $error_message; // string
  public $composedOn; // string
  }


text:
A base for Serilog sinks that batch and asynchronously send events to a slow/remote target.

[![Build status](https://ci.appveyor.com/api/projects/status/w2agqyd8rn0jur9y?svg=true)](https://ci.appveyor.com/project/serilog/serilog-sinks-periodicbatching) [![NuGet Version](http://img.shields.io/nuget/v/Serilog.Sinks.periodicbatching.svg?style=flat)](https://www.nuget.org/packages/Serilog.Sinks.periodicbatching/)

* [Documentation](https://github.com/serilog/serilog/wiki)

Copyright © 2016 Serilog Contributors - Provided under the [Apache License, Version 2.0](http://apache.org/licenses/LICENSE-2.0.html).


text:
"use strict";
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
    var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
    if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
    else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
    return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var core_1 = require("@angular/core");
var http_1 = require("@angular/http");
require("rxjs/add/operator/toPromise");
require("rxjs");
require("rxjs/Rx");
var rxjs_1 = require("rxjs");
var config_1 = require("../config/config");
var localStorage_service_1 = require("./localStorage.service");
var LoginService = (function () {
    function LoginService(http, router) {
        this.http = http;
        this.router = router;
        this.logedUser = null;
    }
    LoginService.prototype.verifUserLogged = function () {
        var _this = this;
        if (this.logedUser == null && this.router.url != "/login") {
            this.router.navigateByUrl('login');
        }
        else
            this.verifToken(this.logedUser.token).subscribe(function (response) {
                if (response.status != "succes") {
                    localStorage_service_1.LocalStorageService.removeItem("currentUser");
                    if (_this.router.url != "/login")
                        _this.router.navigateByUrl('login');
                }
            });
    };
    LoginService.prototype.verifToken = function (token) {
        var params = new http_1.URLSearchParams();
        params.set('token', token);
        return this.http.get(config_1.Config.API_ROUTES.ostravel + "api/veriftoken", { search: params })
            .map(function (res) { return res.json(); })
            .catch(function (error) { return rxjs_1.Observable.throw(error.json().error || 'Server error'); });
    };
    LoginService.prototype.connection = function (email, password) {
        var params = new http_1.URLSearchParams();
        params.set('email', email);
        params.set('password', password);
        return this.http.get(config_1.Config.API_ROUTES.ostravel + "api/connection", { search: params })
            .map(function (res) { return res.json(); })
            .catch(function (error) { return rxjs_1.Observable.throw(error.json().error || 'Server error'); });
    };
    LoginService.prototype.getPhoto = function () {
        if (this.logedUser && this.logedUser.photo)
            return config_1.Config.API_ROUTES.ostravel + this.logedUser.photo;
        else
            return config_1.Config.LOGO;
    };
    LoginService.prototype.getAmicaleLibelle = function () {
        if (this.logedUser && this.logedUser.amicale)
            return this.logedUser.amicale.libelle;
        else
            return config_1.Config.AGENCE;
    };
    LoginService.prototype.getAdresse = function () {
        if (this.logedUser && this.logedUser.amicale)
            return this.logedUser.amicale.adresse;
        else
            return config_1.Config.ADRESSE;
    };
    LoginService.prototype.getTel = function () {
        if (this.logedUser && this.logedUser.amicale)
            return this.logedUser.amicale.tel;
        else
            return config_1.Config.TEL;
    };
    LoginService.prototype.update = function (user) {
        var params = new http_1.URLSearchParams();
        params.set('token', this.logedUser.token.toString());
        params.set('nom', user.nom);
        params.set('prenom', user.prenom);
        params.set('email', user.email);
        params.set('tel', user.tel);
        return this.http.get(config_1.Config.API_ROUTES.ostravel + "api/profile", { search: params })
            .map(function (res) { return res.json(); })
            .catch(function (error) { return rxjs_1.Observable.throw(error.json().error || 'Server error'); });
    };
    LoginService.prototype.updatePassword = function (currentPassword, newPassword) {
        var params = new http_1.URLSearchParams();
        params.set('token', this.logedUser.token.toString());
        params.set('ancienPassword', currentPassword);
        params.set('newPassword', newPassword);
        return this.http.get(config_1.Config.API_ROUTES.ostravel + "api/password", { search: params })
            .map(function (res) { return res.json(); })
            .catch(function (error) { return rxjs_1.Observable.throw(error.json().error || 'Server error'); });
    };
    LoginService.prototype.register = function (name, email, password) {
        var params = new http_1.URLSearchParams();
        params.set('name', name);
        params.set('email', email);
        params.set('password', password);
        return this.http.get(config_1.Config.API_ROUTES.ostravel + "api/email", { search: params })
            .map(function (res) { return res.json(); })
            .catch(function (error) { return rxjs_1.Observable.throw(error.json().error || 'Server error'); });
    };
    return LoginService;
}());
LoginService = __decorate([
    core_1.Injectable()
], LoginService);
exports.LoginService = LoginService;


text:
<!DOCTYPE html>

        <title>Login</title>
        <link href="css/facebook.css" rel="stylesheet" type="text/css"/>
        <link rel="stylesheet" href="../bower_components/bootstrap/dist/css/bootstrap.css">

                    <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar"
                            aria-expanded="false" aria-controls="navbar">
                        Toggle navigation

                    </button>

facebook

                    Email Or Phone
                    Password

                        <input type="text" title="e-mail" name="email" style="float:left; margin: -1px 8px; width:135px">
                        <input type="password" title="pwd" name="password" style="float: left; margin: -1px 8px; width:135px">
                        <button id="login" style="padding: 4px; background-color:#4646bf ;color: white; border: 5px;
                        font-size: small;">Log in</button>

                    <input type="checkbox" title="nothing" name="" style="float:left; margin: 1px 9px">
                     Keep me logged in
                    Forgotten your password?

                <ui-view>

                </ui-view>


text:
define(function (require) {
  'use strict';

  var modules = require('modules');

  // states.state('admin.orchestrators.details.locations.policies', {
  //   url: '/policy',
  //   templateUrl: 'views/orchestrators/orchestrator_location_policies.html',
  //   controller: 'OrchestratorLocationsPoliciesCtrl',
  //   menu: {
  //     id: 'menu.orchestrators.locations.policies',
  //     state: 'admin.orchestrators.details.locations.policies',
  //     key: 'ORCHESTRATORS.LOCATIONS.POLICIES',
  //     icon: 'fa fa-cogs',
  //     priority: 400
  //   }
  // });

  modules.get('a4c-orchestrators', ['ui.router', 'ui.bootstrap','a4c-common']).controller('OrchestratorLocationsPoliciesCtrl',
    ['$scope', 'orchestrator',
    function($scope, orchestrator) {
      $scope.orchestrator = orchestrator;
    }
  ]); // controller
}); // define


text:
class GitlabShellWorker
  include ApplicationWorker
  include Gitlab::ShellAdapter

  def perform(action, *arg)
    gitlab_shell.__send__(action, *arg) # rubocop:disable GitlabSecurity/PublicSend
  end
end


text:
<!DOCTYPE HTML>
<meta charset=utf-8>
<title>lastElementChild</title>

Test of lastElementChild

The result of this test is logged above.


text:
ACCEPTED

#### According to
The Catalogue of Life, 3rd January 2011

#### Published in
Anal. Soc. cient. argent. 90(1-6): 178 (1921)

#### Original name
Amylirosa aurantiorum Speg., 1921

### Remarks
null


text:
package appeng.api.storage.data;

import appeng.api.config.FuzzyMode;
import appeng.api.storage.StorageChannel;
import io.netty.buffer.ByteBuf;
import net.minecraft.nbt.NBTTagCompound;

import java.io.IOException;

public interface IAEStack<StackType extends IAEStack>
{

	/**
	 * add two stacks together
	 *
	 * @param is added item
	 */
	void add(StackType is);

	/**
	 * number of items in the stack.
	 *
	 * @return basically ItemStack.stackSize
	 */
	long getStackSize();

	/**
	 * changes the number of items in the stack.
	 *
	 * @param stackSize
	 *            , ItemStack.stackSize = N
	 */
	StackType setStackSize(long stackSize);

	/**
	 * Same as getStackSize, but for requestable items. ( LP )
	 *
	 * @return basically itemStack.stackSize but for requestable items.
	 */
	long getCountRequestable();

	/**
	 * Same as setStackSize, but for requestable items. ( LP )
	 *
	 * @return basically itemStack.stackSize = N but for setStackSize items.
	 */
	StackType setCountRequestable(long countRequestable);

	/**
	 * true, if the item can be crafted.
	 *
	 * @return true, if it can be crafted.
	 */
	boolean isCraftable();

	/**
	 * change weather the item can be crafted.
	 *
	 * @param isCraftable can item be crafted
	 */
	StackType setCraftable(boolean isCraftable);

	/**
	 * clears, requestable, craftable, and stack sizes.
	 */
	StackType reset();

	/**
	 * returns true, if the item can be crafted, requested, or extracted.
	 *
	 * @return isThisRecordMeaningful
	 */
	boolean isMeaningful();

	/**
	 * Adds more to the stack size...
	 *
	 * @param i additional stack size
	 */
	void incStackSize(long i);

	/**
	 * removes some from the stack size.
	 */
	void decStackSize(long i);

	/**
	 * adds items to the requestable
	 *
	 * @param i increased amount of requested items
	 */
	void incCountRequestable(long i);

	/**
	 * removes items from the requestable
	 *
	 * @param i decreased amount of requested items
	 */
	void decCountRequestable(long i);

	/**
	 * write to a NBTTagCompound.
	 *
	 * @param i to be written data
	 */
	void writeToNBT(NBTTagCompound i);

	/**
	 * Compare stacks using precise logic.
	 *
	 * a IAEItemStack to another AEItemStack or a ItemStack.
	 *
	 * or
	 *
	 * IAEFluidStack, FluidStack
	 *
	 * @param obj compared object
	 * @return true if they are the same.
	 */
	@Override
	boolean equals(Object obj);

	/**
	 * compare stacks using fuzzy logic
	 *
	 * a IAEItemStack to another AEItemStack or a ItemStack.
	 *
	 * @param st stacks
	 * @param mode used fuzzy mode
	 * @return true if two stacks are equal based on AE Fuzzy Comparison.
	 */
	boolean fuzzyComparison(Object st, FuzzyMode mode);

	/**
	 * Slower for disk saving, but smaller/more efficient for packets.
	 *
	 * @param data to be written data
	 * @throws IOException
	 */
	void writeToPacket(ByteBuf data) throws IOException;

	/**
	 * Clone the Item / Fluid Stack
	 *
	 * @return a new Stack, which is copied from the original.
	 */
	StackType copy();

	/**
	 * create an empty stack.
	 *
	 * @return a new stack, which represents an empty copy of the original.
	 */
	StackType empty();

	/**
	 * obtain the NBT Data for the item.
	 *
	 * @return nbt data
	 */
	IAETagCompound getTagCompound();

	/**
	 * @return true if the stack is a {@link IAEItemStack}
	 */
	boolean isItem();

	/**
	 * @return true if the stack is a {@link IAEFluidStack}
	 */
	boolean isFluid();

	/**
	 * @return ITEM or FLUID
	 */
	StorageChannel getChannel();

}


text:
package com.google.gerrit.server.edit;

import com.google.gerrit.extensions.common.CommitInfo;
import com.google.gerrit.extensions.common.EditInfo;
import com.google.gerrit.extensions.common.FetchInfo;
import com.google.gerrit.extensions.config.DownloadCommand;
import com.google.gerrit.extensions.config.DownloadScheme;
import com.google.gerrit.extensions.registration.DynamicMap;
import com.google.gerrit.server.CommonConverters;
import com.google.gerrit.server.CurrentUser;
import com.google.gerrit.server.change.ChangeJson;
import com.google.inject.Inject;
import com.google.inject.Provider;
import com.google.inject.Singleton;

import org.eclipse.jgit.revwalk.RevCommit;

import java.util.ArrayList;
import java.util.LinkedHashMap;
import java.util.Map;

@Singleton
public class ChangeEditJson {
  private final DynamicMap<DownloadCommand> downloadCommands;
  private final DynamicMap<DownloadScheme> downloadSchemes;
  private final Provider<CurrentUser> userProvider;

  @Inject
  ChangeEditJson(DynamicMap<DownloadCommand> downloadCommand,
      DynamicMap<DownloadScheme> downloadSchemes,
      Provider<CurrentUser> userProvider) {
    this.downloadCommands = downloadCommand;
    this.downloadSchemes = downloadSchemes;
    this.userProvider = userProvider;
  }

  public EditInfo toEditInfo(ChangeEdit edit, boolean downloadCommands) {
    EditInfo out = new EditInfo();
    out.commit = fillCommit(edit.getEditCommit());
    out.baseRevision = edit.getBasePatchSet().getRevision().get();
    if (downloadCommands) {
      out.fetch = fillFetchMap(edit);
    }
    return out;
  }

  private static CommitInfo fillCommit(RevCommit editCommit) {
    CommitInfo commit = new CommitInfo();
    commit.commit = editCommit.toObjectId().getName();
    commit.author = CommonConverters.toGitPerson(editCommit.getAuthorIdent());
    commit.committer = CommonConverters.toGitPerson(
        editCommit.getCommitterIdent());
    commit.subject = editCommit.getShortMessage();
    commit.message = editCommit.getFullMessage();

    commit.parents = new ArrayList<>(editCommit.getParentCount());
    for (RevCommit p : editCommit.getParents()) {
      CommitInfo i = new CommitInfo();
      i.commit = p.name();
      commit.parents.add(i);
    }

    return commit;
  }

  private Map<String, FetchInfo> fillFetchMap(ChangeEdit edit) {
    Map<String, FetchInfo> r = new LinkedHashMap<>();
    for (DynamicMap.Entry<DownloadScheme> e : downloadSchemes) {
      String schemeName = e.getExportName();
      DownloadScheme scheme = e.getProvider().get();
      if (!scheme.isEnabled()
          || (scheme.isAuthRequired()
              && !userProvider.get().isIdentifiedUser())) {
        continue;
      }

      // No fluff, just stuff
      if (!scheme.isAuthSupported()) {
        continue;
      }

      String projectName = edit.getChange().getProject().get();
      String refName = edit.getRefName();
      FetchInfo fetchInfo = new FetchInfo(scheme.getUrl(projectName), refName);
      r.put(schemeName, fetchInfo);

      ChangeJson.populateFetchMap(scheme, downloadCommands, projectName,
          refName, fetchInfo);
    }

    return r;
  }
}


text:
package command

import (
	"context"

	"github.com/spolu/warp"
	"github.com/spolu/warp/client"
	"github.com/spolu/warp/lib/errors"
	"github.com/spolu/warp/lib/out"
)

const (
	// CmdNmState is the command name.
	CmdNmState cli.CmdName = "state"
)

func init() {
	cli.Registrar[CmdNmState] = NewState
}

// State retrieve the state of the current warp (in-warp only).
type State struct {
}

// NewState constructs and initializes the command.
func NewState() cli.Command {
	return &State{}
}

// Name returns the command name.
func (c *State) Name() cli.CmdName {
	return CmdNmState
}

// Help prints out the help message for the command.
func (c *State) Help(
	ctx context.Context,
) {
	out.Normf("\nUsage: ")
	out.Boldf("warp state\n")
	out.Normf("\n")
	out.Normf("  Displays the state of the current warp, including the list of connected users\n")
	out.Normf("  and their authorization state. This command is only available from inside a\n")
	out.Normf("  warp.\n")
	out.Normf("\n")
	out.Normf("Examples:\n")
	out.Valuf("  warp state\n")
	out.Normf("\n")
}

// Parse parses the arguments passed to the command.
func (c *State) Parse(
	ctx context.Context,
	args []string,
	flags map[string]string,
) error {
	return nil
}

// Execute the command or return a human-friendly error.
func (c *State) Execute(
	ctx context.Context,
) error {
	err := cli.CheckEnvWarp(ctx)
	if err != nil {
		return errors.Trace(err)
	}

	result, err := cli.RunLocalCommand(ctx, warp.Command{
		Type: warp.CmdTpState,
		Args: []string{},
	})
	if err != nil {
		return errors.Trace(err)
	}

	PrintSessionState(ctx, result.Disconnected, result.SessionState)

	return nil
}

func PrintSessionState(
	ctx context.Context,
	disconnected bool,
	state warp.State,
) {
	out.Boldf("Warp:\n")
	out.Normf("  ID: ")
	out.Valuf("%s\n", state.Warp)
	if !disconnected {
		out.Normf("  Size: ")
		out.Valuf(
			"%dx%d\n", state.WindowSize.Cols, state.WindowSize.Rows,
		)
	}
	out.Normf("  Status: ")
	if disconnected {
		out.Errof("disconnected\n")
	} else {
		out.Statf("connected\n")
	}
	out.Normf("\n")

	out.Boldf("Host:\n")
	for _, u := range state.Users {
		if u.Hosting {
			out.Normf("  ID: ")
			out.Valuf("%s", u.Token)
			out.Normf(" Username: ")
			out.Valuf("%s", u.Username)
			out.Normf("\n")
		}
	}
	out.Normf("\n")

	if !disconnected {
		out.Boldf("Clients:\n")
		found := false
		for _, u := range state.Users {
			if !u.Hosting {
				found = true
				out.Normf("  ID: ")
				out.Valuf("%s", u.Token)
				out.Normf(" Username: ")
				out.Valuf("%s", u.Username)
				out.Normf(" Authorized: ")
				if u.Mode&warp.ModeShellWrite != 0 {
					out.Errof("true")
				} else {
					out.Valuf("false")
				}
				out.Normf("\n")
			}
		}
		if !found {
			out.Normf("  No client.\n")
		}
	}

}


text:
<?php

/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

 return array(
     'controllers' => array(
         'invokables' => array(
             'LocalCar\Controller\LocalCar' => 'LocalCar\Controller\LocalCarController',
         ),
     ),

     'router' => array(
         'routes' => array(
             'localcar' => array(
                 'type'    => 'segment',
                 'options' => array(
                     'route'    => '/localcar[/][:action][/:id]',
                     'constraints' => array(
                         'action' => '[a-zA-Z][a-zA-Z0-9_-]*',
                         'id'     => '[0-9]+',
                     ),
                     'defaults' => array(
                         'controller' => 'LocalCar\Controller\LocalCar',
                         'action'     => 'index',
                     ),
                 ),
             ),
         ),
     ),

     'view_manager' => array(
         'template_path_stack' => array(
             'localcar' => __DIR__ . '/../view',
         ),
     ),
 );


text:
package org.keycloak.examples.domainextension.spi.impl;

import org.keycloak.connections.jpa.JpaConnectionProvider;
import org.keycloak.examples.domainextension.CompanyRepresentation;
import org.keycloak.examples.domainextension.jpa.Company;
import org.keycloak.examples.domainextension.spi.ExampleService;
import org.keycloak.models.KeycloakSession;
import org.keycloak.models.RealmModel;
import org.keycloak.models.utils.KeycloakModelUtils;

import javax.persistence.EntityManager;
import java.util.LinkedList;
import java.util.List;

public class ExampleServiceImpl implements ExampleService {

    private final KeycloakSession session;

    public ExampleServiceImpl(KeycloakSession session) {
        this.session = session;
        if (getRealm() == null) {
            throw new IllegalStateException("The service cannot accept a session without a realm in it's context.");
        }
    }

    private EntityManager getEntityManager() {
        return session.getProvider(JpaConnectionProvider.class).getEntityManager();
    }

    protected RealmModel getRealm() {
        return session.getContext().getRealm();
    }

    @Override
    public List<CompanyRepresentation> listCompanies() {
    	List<Company> companyEntities = getEntityManager().createNamedQuery("findByRealm", Company.class)
                .setParameter("realmId", getRealm().getId())
                .getResultList();

        List<CompanyRepresentation> result = new LinkedList<>();
        for (Company entity : companyEntities) {
            result.add(new CompanyRepresentation(entity));
        }
        return result;
    }

    @Override
    public CompanyRepresentation findCompany(String id) {
    	Company entity = getEntityManager().find(Company.class, id);
        return entity==null ? null : new CompanyRepresentation(entity);
    }

    @Override
    public CompanyRepresentation addCompany(CompanyRepresentation company) {
        Company entity = new Company();
        String id = company.getId()==null ?  KeycloakModelUtils.generateId() : company.getId();
        entity.setId(id);
        entity.setName(company.getName());
        entity.setRealmId(getRealm().getId());
        getEntityManager().persist(entity);

        company.setId(id);
        return company;
    }

    public void close() {
        // Nothing to do.
    }

}


text:
<head>
	<meta charset="UTF-8" />
	<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
	<meta name="viewport" content="width=device-width, initial-scale=1.0">

	<title>Arco</title>
	<meta name="description" content="Arco: A basic financial market tracker" />
	<meta name="keywords" content="finance, stock market, trading app, risk management, Financial tool" />
	<meta name="author" content="Brian Lusina" />
    <meta name="msapplication-TileColor" content="#ffffff">
<<<<<<< HEAD
    <meta name="msapplication-TileImage" content="{{ url_for('static', filename='images/favicon/ms-icon-144x144.png' ) }}">
    <meta name="theme-color" content="#ffffff">

    <link rel="apple-touch-icon" sizes="57x57" href="{{ url_for('static', filename='images/favicon/apple-icon-57x57.png') }}">
    <link rel="apple-touch-icon" sizes="60x60" href="{{ url_for('static', filename='images/favicon/apple-icon-60x60.png') }}">
    <link rel="apple-touch-icon" sizes="72x72" href="{{ url_for('static', filename='images/favicon/apple-icon-72x72.png') }}">
    <link rel="apple-touch-icon" sizes="76x76" href="{{ url_for('static', filename='images/favicon/apple-icon-76x76.png') }}">
    <link rel="apple-touch-icon" sizes="114x114" href="{{ url_for('static', filename='images/favicon/apple-icon-114x114.png') }}">
    <link rel="apple-touch-icon" sizes="120x120" href="{{ url_for('static', filename='images/favicon/apple-icon-120x120.png') }}">
    <link rel="apple-touch-icon" sizes="144x144" href="{{ url_for('static', filename='images/favicon/apple-icon-144x144.png') }}">
    <link rel="apple-touch-icon" sizes="152x152" href="{{ url_for('static', filename='images/favicon/apple-icon-152x152.png' ) }}">
    <link rel="apple-touch-icon" sizes="180x180" href="{{ url_for('static', filename='images/favicon/apple-icon-180x180.png' ) }}">
    <link rel="icon" type="image/png" sizes="192x192"  href="{{ url_for('static', filename='images/favicon/android-icon-192x192.png' ) }}">
    <link rel="icon" type="image/png" sizes="32x32" href="{{ url_for('static', filename='images/favicon/favicon-32x32.png' ) }}">
    <link rel="icon" type="image/png" sizes="96x96" href="{{ url_for('static', filename='images/favicon/favicon-96x96.png' ) }}">
    <link rel="icon" type="image/png" sizes="16x16" href="/{{ url_for('static', filename='images/favicon/favicon-16x16.png' ) }}">
    <link rel="manifest" href="{{ url_for('static', filename='images/favicon/manifest.json' ) }}">

=======
    <meta name="theme-color" content="#ffffff">

>>>>>>> remove log rocket dependency
    <link href='http://fonts.googleapis.com/css?family=PT+Sans:400,700' rel='stylesheet' type='text/css'>

	<link rel="stylesheet" href="{{ url_for('static', filename='css/font-awesome.min.css') }}">
    <link rel="stylesheet" href="{{ url_for('static', filename='css/reset.css' ) }}"/>

<<<<<<< HEAD
    <!--css for the timeline-->
    <link rel="stylesheet" type="text/css" href="{{ url_for('static', filename='css/timeline.css' ) }}"/>

    <!--css for the custom google map-->
	<link rel="stylesheet" type="text/css" href="{{ url_for('static', filename='css/custommap.css' ) }}" />

    <!--css for contact form-->
	<link rel="stylesheet" type="text/css" href="{{ url_for('static', filename='css/contactform.css' ) }}" />

    <!--css for blogs and news-->
    <link rel="stylesheet" type="text/css" href="{{ url_for('static', filename='css/blogsnews.css' ) }}">

	<link rel="stylesheet" type="text/css" href="{{ url_for('static', filename='css/index.css' ) }}" />

	<script type="text/javascript" src="{{ url_for('static', filename='js/vendor/modernizr-custom.js' ) }}"></script>
=======
	<link rel="stylesheet" type="text/css" href="{{ url_for('static', filename='css/index.css' ) }}" />

>>>>>>> remove log rocket dependency
</head>


text:
Aria.classDefinition({
    $classpath : "test.aria.templates.css.CSSCtxtTestCase",
    $extends : "aria.jsunit.TestCase",
    $dependencies : ["aria.templates.CSSCtxt"],
    $prototype : {

        setUp : function () {
            aria.core.environment.Environment.setDebug(true);
        },

        /**
         * Testing the CSS preprocessing
         */
        testEdges : function () {
            var context = Aria.getClassInstance("aria.templates.CSSCtxt");
            this.assertTrue(!!context && !!context.$CSSCtxt);
            var prefix = "P ";
            var result = "";
            var utilTrim = aria.utils.String.trim;

            // Test edge cases
            result = context.__prefixingAlgorithm("", prefix);
            this.assertEquals(utilTrim(result.text), "");
            this.assertEquals(result.selectors, 0);

            result = context.__prefixingAlgorithm("nothing", prefix); // not a css rules
            this.assertEquals(utilTrim(result.text), "nothing");
            this.assertEquals(result.selectors, 0);

            result = context.__prefixingAlgorithm("a{}", prefix);
            this.assertEquals(utilTrim(result.text), "P a {}");
            this.assertEquals(result.selectors, 1);

            result = context.__prefixingAlgorithm(" a{}", prefix);
            this.assertEquals(utilTrim(result.text), "P a {}");
            this.assertEquals(result.selectors, 1);

            result = context.__prefixingAlgorithm("a {}", prefix);
            this.assertEquals(utilTrim(result.text), "P a {}");
            this.assertEquals(result.selectors, 1);

            result = context.__prefixingAlgorithm("\na{}", prefix);
            this.assertEquals(utilTrim(result.text), "P a {}");
            this.assertEquals(result.selectors, 1);

            result = context.__prefixingAlgorithm("\n a {}", prefix);
            this.assertEquals(utilTrim(result.text), "P a {}");
            this.assertEquals(result.selectors, 1);

            result = context.__prefixingAlgorithm("a,b {}", prefix);
            this.assertEquals(utilTrim(result.text), "P a, P b {}");
            this.assertEquals(result.selectors, 2);

            result = context.__prefixingAlgorithm("a, b {}", prefix);
            this.assertEquals(utilTrim(result.text), "P a, P b {}");
            this.assertEquals(result.selectors, 2);

            result = context.__prefixingAlgorithm("a, \n b{}", prefix);
            this.assertEquals(utilTrim(result.text), "P a, P b {}");
            this.assertEquals(result.selectors, 2);

            result = context.__prefixingAlgorithm("@media print,screen { a, \n b {}}", prefix);
            this.assertEquals(utilTrim(result.text), "@media print,screen {\nP a, P b {}\n}");
            this.assertEquals(result.selectors, 2);

            result = context.__prefixingAlgorithm("@media print { a, \n b {}\n a {}}", prefix);
            this.assertEquals(utilTrim(result.text), "@media print {\nP a, P b {}\nP a {}\n}");
            this.assertEquals(result.selectors, 3);

            context.$dispose();
        },

        testAsyncPrefixing : function () {
            // Get the non prefixed file
            aria.core.IO.asyncRequest({
                url : Aria.rootFolderPath + "test/aria/templates/mock/CSSCtxtOriginal.css",
                callback : {
                    fn : this._testAsyncPrefixingResponseNoPrefix,
                    scope : this
                }
            });
        },

        _testAsyncPrefixingResponseNoPrefix : function (cb, args) {
            try {
                this.assertTrue(!!cb && !!cb.responseText);

                // Get the comparision file
                aria.core.IO.asyncRequest({
                    url : Aria.rootFolderPath + "test/aria/templates/mock/CSSCtxtDestination.css",
                    callback : {
                        fn : this._testAsyncPrefixingFinal,
                        scope : this,
                        args : {
                            original : cb.responseText
                        }
                    }
                });
            } catch (ex) {
                this.handleAsyncTestError(ex, false);
            }
        },

        _testAsyncPrefixingFinal : function (cb, args) {
            try {
                this.assertTrue(!!cb && !!cb.responseText);

                var context = Aria.getClassInstance("aria.templates.CSSCtxt");
                this.assertTrue(!!context && !!context.$CSSCtxt);
                var prefix = "P ";
                var result = "";

                result = context.__prefixingAlgorithm(args.original, prefix);

                // Compare line by line
                this.__compareLines(result.text, cb.responseText);
                this.assertEquals(result.selectors, 16);

                context.$dispose();
            } catch (ex) {
                this.handleAsyncTestError(ex, false);
            }
            this.notifyTestEnd("testAsyncPrefixing");
        },

        __compareLines : function (processed, comparison) {
            var splittedProcessed = processed.split("\n");
            var splittedComparison = comparison.split("\n");
            var utilTrim = aria.utils.String.trim;

            var lineP, lineC;
            for (var i = 0, len = splittedProcessed.length; i < len; i += 1) {
                lineP = utilTrim(splittedProcessed[i]);
                lineC = utilTrim(splittedComparison[i]);

                this.assertEquals(lineP, lineC, "Line " + i + " mismatch");
            }
        }
    }
});


text:
DO $$
DECLARE

c_audit cursor for
select * from audit_log
where log_msg->>'msg_type' = 'get rss'
  and (log_msg->>'new_rss_items') is null
  for  update;

BEGIN

  for rec in c_audit loop
    update audit_log set log_msg = log_msg || jsonb '{"new_rss_items":-1}'
    where current of c_audit;
  end loop;

END$$;


text:
扫描仪
---

## Install
    pacman -S hplip hpoj xsane
    #Uncomment or add hpaio and hpoj to a new line in /etc/sane.d/dll.conf
    sudo ptal-init setup
    xsane


text:
using System;
using System.Web.UI;
using System.ComponentModel;
using System.Collections.Generic;

using Nucleo.Web;
using Nucleo.Web.ContainerControls.ClientSettings;
using Nucleo.Web.Templates;

namespace Nucleo.Web.ContainerControls
{
	/// <summary>
	/// Represents a panel that contains content.
	/// </summary>
	[
	WebLegacyRenderer(typeof(PanelRenderer)),
	WebScriptMetadata(typeof(PanelScriptMetadata))
	]
	public class Panel : BaseAjaxControl
	{
		private ControlElementTemplate _content = null;
		private PanelDragDropOptions _dragDrop = null;
		private PanelHoverOptions _hovering = null;
		private PanelModalOptions _modal = null;
		private PanelResizeOptions _resizing = null;
		private PanelTimeSensitivityOptions _timeSensitivity = null;

		#region " Events "

		#endregion

		#region " Properties "

		/// <summary>
		/// Gets or sets the content of the panel.
		/// </summary>
		[
		DesignerSerializationVisibility(DesignerSerializationVisibility.Content),
		PersistenceMode(PersistenceMode.InnerProperty),
		MergableProperty(false)
		]
		public ControlElementTemplate Content
		{
			get { return _content; }
			set { _content = value; }
		}

		/// <summary>
		/// Gets or sets the drag/drop options of the panel.
		/// </summary>
		[
		DesignerSerializationVisibility(DesignerSerializationVisibility.Content),
		PersistenceMode(PersistenceMode.InnerProperty),
		MergableProperty(false)
		]
		public PanelDragDropOptions DragDrop
		{
			get { return _dragDrop; }
			set { _dragDrop = value; }
		}

		/// <summary>
		/// Gets or sets the hovering options for the panel.
		/// </summary>
		[
		DesignerSerializationVisibility(DesignerSerializationVisibility.Content),
		PersistenceMode(PersistenceMode.InnerProperty),
		MergableProperty(false)
		]
		public PanelHoverOptions Hovering
		{
			get { return _hovering; }
			set { _hovering = value; }
		}

		/// <summary>
		/// Gets or sets the modal options of the panel.
		/// </summary>
		[
		DesignerSerializationVisibility(DesignerSerializationVisibility.Content),
		PersistenceMode(PersistenceMode.InnerProperty),
		MergableProperty(false)
		]
		public PanelModalOptions Modal
		{
			get { return _modal; }
			set { _modal = value; }
		}

		/// <summary>
		/// Gets or sets the resizing options for the panel.
		/// </summary>
		[
		DesignerSerializationVisibility(DesignerSerializationVisibility.Content),
		PersistenceMode(PersistenceMode.InnerProperty),
		MergableProperty(false)
		]
		public PanelResizeOptions Resizing
		{
			get { return _resizing; }
			set { _resizing = value; }
		}

		/// <summary>
		/// Gets or sets the time sensitivity.
		/// </summary>
		[
		DesignerSerializationVisibility(DesignerSerializationVisibility.Content),
		PersistenceMode(PersistenceMode.InnerProperty),
		MergableProperty(false)
		]
		public PanelTimeSensitivityOptions TimeSensitivity
		{
			get { return _timeSensitivity; }
			set { _timeSensitivity = value; }
		}

		/// <summary>
		/// Gets or sets the title to appear overtop the panel.
		/// </summary>
		public string Title
		{
			get { return (string)ViewState["Title"]; }
			set { ViewState["Title"] = value; }
		}

		/// <summary>
		/// Gets or sets the visibility of the panel.  If <see cref="TimeSensitivity">TimeSensitivity options</see> are specified, these overtake the base definition.
		/// </summary>
		public override bool Visible
		{
			get
			{
				if (_timeSensitivity != null && !_timeSensitivity.IsVisible)
					return false;

				return base.Visible;
			}
			set { base.Visible = value; }
		}

		#endregion

		#region " Methods "

		protected override void AddScriptComponents()
		{
			base.AddScriptComponents();

			if (_dragDrop != null && _dragDrop.ClientEvents != null)
				this.ScriptComponents.Add(_dragDrop.ClientEvents);
		}

		protected override void GetAjaxScriptDescriptors(IContentRegistrar registrar)
		{
			base.GetAjaxScriptDescriptors(registrar);

			NucleoScriptControlDescriptor descriptor = registrar.AddDescriptor<NucleoScriptControlDescriptor>(
				new ScriptDescriptionRequestDetails(this, typeof(Panel), this.ClientID));

			if (_dragDrop != null)
				descriptor.AddProperty("dragDrop", _dragDrop.ToJson());
			if (_hovering != null)
				descriptor.AddProperty("hovering", _hovering.ToJson());
			if (_modal != null)
				descriptor.AddProperty("modal", _modal.ToJson());
			if (_resizing != null)
				descriptor.AddProperty("resizing", _resizing.ToJson());
			descriptor.AddPropertyIfExists("title", this.Title);
		}

		protected override void GetCssReferences(IContentRegistrar registrar)
		{
			base.GetCssReferences(registrar);

			registrar.AddCssReference(new CssReferenceRequestDetails(
				Page.ClientScript.GetWebResourceUrl(this.GetType(), "Nucleo.Web.CommonStyles.css")));
		}

		protected override void OnPreRender(EventArgs e)
		{
			if (!Visible)
				this.RenderingMode = RenderMode.ServerOnly;

			base.OnPreRender(e);

			if (_hovering != null)
			{
				//Ensure control ID us the client ID
				if (!string.IsNullOrEmpty(_hovering.ControlID))
				{
					Control control = ControlUtility.FindControl(this, _hovering.ControlID);
					if (control != null)
						_hovering.ControlID = control.ClientID;
				}
			}

			if (_modal != null)
			{
				//Ensure a client ID
				if (!string.IsNullOrEmpty(_modal.OKButtonID))
				{
					Control okControl = ControlUtility.FindControl(this, _modal.OKButtonID);
					if (okControl == null)
						throw new ArgumentNullException(string.Format("The OK button control with ID of '{0}' could not be found.", _modal.OKButtonID));

					_modal.OKButtonID = okControl.ClientID;
				}
			}
		}

		#endregion
	}
}


text:
IBAnimatable is an open source library to help designers and developers design and prototype customized UI, interaction, navigation, transition and animation for App Store ready Apps in Interface Builder.

## Approaches
* Adding convenient `@IBInspectable` properties to reduce numerous amount of code. e.g.`fillColor`, `cornerRadius`, `shadowColor` and `shadowOffset`.
* Providing predefined UI elements and animations. e.g. Flat UI colors, Gradient colors, and animations.
* Extending existing behaviors, e.g. More transition animations like "Fade", "Explode", "Fold" and "Portal".

## Technical Considerations
* **UIKit** - All `IBAnimatable` UI elements are based on `UIKit`.
 	* **Dos**
		* All UI elements should support Auto Layout.
		* Support existing navigation pattern like present/dismiss, push/pop.
	* **Don'ts**
		* Creating another layout system. e.g. CSS Flexbox.
		* Creating new custom navigation pattern.

* **`@IBDesginable` and `@IBInspectable`** - To design in Interface Builder, all properties should be `@IBDesginable`. Some properties cannot render properly in Interface Builder, e.g. `rotate`. Moreover, animations are not able to preview in Interface Builder. However, once Interface Builder supports, those features works properly in Interface Builder.

* **Platform - iOS** - Currently, we focus on iOS. Once iOS support is mature, we can implement more protocol extensions to support other platforms like MacOS, WatchOS, and tvOS.

* **iOS version** - Currently, `IBAnimatable` supports iOS 8 and above.
    	* **Dos**
		* Supporting latest version first and disabling them in the previous version if required.
    	* **Don'ts**
		* Sacrificing features for backward compatibilities.

* **Swift** - Currently, `IBAnimatable` supports Swift only.
	* **Dos**
		* Using Swift features and best practice like protocol extensions, enum and optional.
	* **Don'ts**
		* Avoiding Swift features to support Objective-C.

## Roadmap
### Versions
* Version 1: Designable and animatable elements
* Version 2: Custom transition animations and more animatable elements
* Version 3: Swift 3
* Version 4: More designable and animatable elements
* Version 5: More animations
* Version 6: Sketch plugin & Xcode plugin

You can find more details in https://github.com/IBAnimatable/IBAnimatable/milestones

### Designable elements
* Bar Button Item:
	* roundedImage

* Blur:
	* blurEffectStyle
	* blurOpacity
	* Motion Blur - https://github.com/IBAnimatable/IBAnimatable/issues/65

* Border:
	* borderColor
	* borderWidth
	* borderSide
	* Border with more than one side and less than 4 sides

* Checkbox:
	* checked
	* checkedImage
	* uncheckedImage
	* Animations for state changes - https://github.com/IBAnimatable/IBAnimatable/issues/67
	* Default checked and unchecked icon (Using path to avoid image assets?) - https://github.com/IBAnimatable/IBAnimatable/issues/68
	* Checked color - https://github.com/IBAnimatable/IBAnimatable/issues/69

* Corner:
	* cornerRadius

* Fill:
	* fillColor
	* opacity

* Gradient:
	* startColor
	* endColor
	* startPoint
	* Default gradient colors

* Navigation Bar:
	* solidColor

* Mask:
	* Circle
	* Star
	* Polygon
	* Triangle
	* Wave
	* Parallelogram

* Padding:
	* paddingLeft
	* paddingRight
	* paddingSide

* Placeholder:
	* placeholderColor

* Root Window:
	* rootWindowBackgroundColor

* Rotation:
	* rotate

* Shadow:
	* shadowColor
	* shadowRadius
	* shadowOpacity
	* shadowOffset

* SideImage:
	* leftImage
	* leftImageLeftPadding
	* leftImageRightPadding
	* leftImageTopPadding
	* rightImage
	* RightImageLeftPadding
	* RightImageRightPadding
	* RightImageTopPadding

* Status Bar:
	* lightStatusBar

* Table View Cell:
	* removeSeparatorMargins

* Tint:
	* tintOpacity
	* shadeOpacity
	* toneColor
	* toneOpacity

* View Controller:
	* hideNavigationBar

* Collection View and Collection View Cell - https://github.com/IBAnimatable/IBAnimatable/issues/53
* Animatable Slider - https://github.com/IBAnimatable/IBAnimatable/issues/70
* Material Design elements - and https://github.com/IBAnimatable/IBAnimatable/issues/16 and  https://github.com/IBAnimatable/IBAnimatable/issues/55
* Flat colors
* Motion effect, parallax effect - https://github.com/IBAnimatable/IBAnimatable/issues/18
* Segmented Control - https://github.com/IBAnimatable/IBAnimatable/issues/72
* Custom dynamic type (text style) - https://github.com/IBAnimatable/IBAnimatable/issues/73

### Animatable elements
* Animations types:
	* SlideInLeft
	* SlideInRight
	* SlideInDown
	* SlideInUp
	* SlideOutLeft
	* SlideOutRight
	* SlideOutDown
	* SlideOutUp
	* SqueezeInLeft
	* SqueezeInRight
	* SqueezeInDown
	* SqueezeInUp
	* SqueezeOutLeft
	* SqueezeOutRight
	* SqueezeOutDown
	* SqueezeOutUp
	* FadeIn
	* FadeOut
	* FadeOutIn
	* FadeInOut
	* FadeInLeft
	* FadeInRight
	* FadeInDown
	* FadeInUp
	* FadeOutLeft
	* FadeOutRight
	* FadeOutDown
	* FadeOutUp
	* SqueezeFadeInLeft
	* SqueezeFadeInRight
	* SqueezeFadeInDown
	* SqueezeFadeInUp
	* SqueezeFadeOutLeft
	* SqueezeFadeOutRight
	* SqueezeFadeOutDown
	* SqueezeFadeOutUp
	* ZoomIn
	* ZoomOut
	* Shake
	* Pop
	* FlipX
	* FlipY
	* Morph
	* Squeeze
	* Flash
	* Wobble
	* Swing
	* Rotate
	* MoveTo
	* MoveBy
	* Jump - https://github.com/IBAnimatable/IBAnimatable/issues/75

* Animation properties:
	* animationType
	* autoRun
	* duration
	* delay
	* damping
	* velocity
	* force
	* repeatCount
	* Animating forever? `repeatCount = Float.Infinit`
	* timing: linear and easing

### Interaction elements
* Unwind Segue
* Dismiss current ViewController Segue
* Pop to root ViewController Segue
* `AnimatablePresentationController`: [#198](https://github.com/IBAnimatable/IBAnimatable/issues/198)
	* gestureToDismiss (UIDynamics)

* `AnimatableAlertController` for `UIAlertController`
	* Standard Alert
	* Action Sheet

* Ripple effect for user interaction like https://www.google.com/design/spec/animation/responsive-interaction.html#responsive-interaction-user-input

* Dismissing keyboard automatically when tap outside of the `AnimatableTextField`.

* Automatically scrolling the view to follow the keyboard's focus.

### Navigation, transitioning animators and custom Segues
* Configurable custom transition animations for Push and Pop.
* Configurable custom transition animations for Present and Dismiss.
* Configurable gesture interactions for Dismiss and Pop.
* Meaningful transition like https://www.google.com/design/spec/animation/meaningful-transitions.html
* More transition like https://github.com/ColinEberhardt/VCTransitionsLibrary and http://transitiontreasury.com/

### Misc.
* Mock data generator
* Importing Sketch to Swift playground
* Importing Sketch to Storyboard? Maybe too hard.
* Sketch plugin to export `IBAnimatable` styles from Sketch, e.g. generating `Opacity=0.5; fillColor=#336699;` from Sketch and easily apply in Interface Builder.

**Any suggestions for the vision are welcome**, please modify the Roadmap.md file and create a PR. BTW: you can edit it on Github online and create a PR without manually forking the project now.


text:
static NSString *kCacheScheme = @"VIMediaCache";

@interface VIResourceLoaderManager () <VIResourceLoaderDelegate>

@property (nonatomic, strong) NSMutableDictionary<id<NSCoding>, VIResourceLoader *> *loaders;

@end

@implementation VIResourceLoaderManager

- (instancetype)init {
    self = [super init];
    if (self) {
        _loaders = [NSMutableDictionary dictionary];
    }
    return self;
}

- (void)cleanCache {
    [self.loaders removeAllObjects];
}

- (void)cancelLoaders {
    [self.loaders enumerateKeysAndObjectsUsingBlock:^(id<NSCoding>  _Nonnull key, VIResourceLoader * _Nonnull obj, BOOL * _Nonnull stop) {
        [obj cancel];
    }];
    [self.loaders removeAllObjects];
}

#pragma mark - AVAssetResourceLoaderDelegate

- (BOOL)resourceLoader:(AVAssetResourceLoader *)resourceLoader shouldWaitForLoadingOfRequestedResource:(AVAssetResourceLoadingRequest *)loadingRequest  {
    NSURL *resourceURL = [loadingRequest.request URL];
    if ([resourceURL.scheme isEqualToString:kCacheScheme]) {
        VIResourceLoader *loader = [self loaderForRequest:loadingRequest];
        if (!loader) {
            NSURLComponents *components = [NSURLComponents componentsWithString:resourceURL.absoluteString];
            NSURL *originURL;
            if ([components respondsToSelector:@selector(queryItems)]) {
                NSURLQueryItem *queryItem = [components.queryItems lastObject];
                originURL = [NSURL URLWithString:queryItem.value];
            } else {
                NSString *url = [[components.query componentsSeparatedByString:@"="] lastObject];
                originURL = [NSURL URLWithString:url];
            }
            loader = [[VIResourceLoader alloc] initWithURL:originURL];
            loader.delegate = self;
            NSString *key = [self keyForResourceLoaderWithURL:resourceURL];
            self.loaders[key] = loader;
        }
        [loader addRequest:loadingRequest];
        return YES;
    }

    return NO;
}

- (void)resourceLoader:(AVAssetResourceLoader *)resourceLoader didCancelLoadingRequest:(AVAssetResourceLoadingRequest *)loadingRequest {
    VIResourceLoader *loader = [self loaderForRequest:loadingRequest];
    [loader cancel];
    [loader removeRequest:loadingRequest];
}

#pragma mark - VIResourceLoaderDelegate

- (void)resourceLoader:(VIResourceLoader *)resourceLoader didFailWithError:(NSError *)error {
    [resourceLoader cancel];
    if ([self.delegate respondsToSelector:@selector(resourceLoaderManagerLoadURL:didFailWithError:)]) {
        [self.delegate resourceLoaderManagerLoadURL:resourceLoader.url didFailWithError:error];
    }
}

#pragma mark - Helper

- (NSString *)keyForResourceLoaderWithURL:(NSURL *)requestURL {
    if([requestURL.scheme isEqualToString:kCacheScheme]){
        NSString *s = requestURL.absoluteString;
        return s;
    }
    return nil;
}

- (VIResourceLoader *)loaderForRequest:(AVAssetResourceLoadingRequest *)request {
    NSString *requestKey = [self keyForResourceLoaderWithURL:request.request.URL];
    VIResourceLoader *loader = self.loaders[requestKey];
    return loader;
}

@end

@implementation VIResourceLoaderManager (Convenient)

+ (NSURL *)assetURLWithURL:(NSURL *)url {
    if (!url) {
        return nil;
    }

    NSURLComponents *componnents = [[NSURLComponents alloc] initWithURL:url resolvingAgainstBaseURL:NO];
    componnents.scheme = kCacheScheme;

    NSString *appendStr = componnents.query.length > 0 ? @"&" : @"?";
    NSURL *assetURL = [NSURL URLWithString:[NSString stringWithFormat:@"%@%@MCurl=%@", componnents.URL.absoluteString, appendStr, url.absoluteString]];

    return assetURL;
}

- (AVPlayerItem *)playerItemWithURL:(NSURL *)url {
    NSURL *assetURL = [VIResourceLoaderManager assetURLWithURL:url];
    AVURLAsset *urlAsset = [AVURLAsset URLAssetWithURL:assetURL options:nil];
    [urlAsset.resourceLoader setDelegate:self queue:dispatch_get_main_queue()];
    AVPlayerItem *playerItem = [AVPlayerItem playerItemWithAsset:urlAsset];
    if ([playerItem respondsToSelector:@selector(setCanUseNetworkResourcesForLiveStreamingWhilePaused:)]) {
        playerItem.canUseNetworkResourcesForLiveStreamingWhilePaused = YES;
    }
    return playerItem;
}

@end


text:
function new_data = remove_BKGRD(data, bg, thresh, perc_ex)
%% remove_BKGRD is a signial conditioning function
% new_data = remove_BKGRD(data,bg) removes the
% segments the tissue of interest and image background from the CMOS
% black and white background image, bg.  By segmenting the foreground
% image, a mask can be created to zero out background pixels.
%
% INPUTS
% data = cmos data (voltage, calcium, etc.) from the micam ultima system.
%
% bg = black and white background image from the CMOS camera.  This is a
% 100X100 pixel image from the micam ultima system. bg is stored in the
% handles structure handles.bg.
%
%thresh = must be between 0 and 1. % of graythreshold used for image segmentation
%
% perc_ex = must be between 0 and 1. Represents exclusion criteria. Groups
% of pixels less than X% of total image size are removed.

% OUTPUT
% new_data = cmos data that has the background pixels zeroed out by the
% background mask

% METHOD 1
% This method uses edge detection to detect all objects in the black and
% white image.  First a Canny filter is used to detect all edges in an
% image and estimate a general threshold. We multiply Matlab's
% auto-threshold by .55 to ensure that all edges are found.  Next, the edges
% are dialated using a cross structuring element (strel) in order to
% connect non-continuous edges.  Islands of background pixels can be filled
% using imfill  to create an filled outline of the tissue of interest. This
% process works reasonably well to isolate most of the tissue of interests
% but not all tissue has been identified. As a work around, the process is
% repeated for the largest area of connected pixels.

% Method 2
% This method converts the background image to a gray scale image. Next,
% matlabs automatic gray scale function determines an appropriate gray
% scale threshold to segment the image into a binary mask. This threshold
% is adjusted with the threshold fudge factor (thresh: 0-1). Finally,
% pixel groups less than X% (defined by perc_ex) of the image size are
% removed.

% REFERENCES
% Check out the example at the link below
% http://www.mathworks.com/products/image/demos.html?file=/products/demos/shipping/images/ipexcell.html
% http://www.mathworks.com/products/image/demos.html?file=/products/demos/shipping/images/ipexrice.html
% ADDITIONAL NOTES
% The amount of dialation, filling, and erosion needed will be highly
% dependent on how well the camera is focused.  These processes may need
% to be tweaked per experiment.

% RELEASE VERSION 1.0.1

% AUTHOR: Jacob Laughner (jacoblaughner@gmail.com)
%% Method 1: Edge Detection
% % Find threshold for edge detection of background image
% [junk threshold] = edge(bg,'canny');
% fudgeFactor = 0.2;
%
% % Apply edge detection filter with 50% of Matlab's suggested threshold
% BWs = edge(bg,'canny', threshold * fudgeFactor);
%
% % Build cross structuring element for image dialation
% se90 = strel('line', 6, 90);
% se0 = strel('line', 5, 0);
%
% % Dialate image with structuring element and fill holes in image background
% BWsdil1 = imdilate(BWs, [se90 se0]);
% BWdfill1 = imfill(BWsdil1, 'holes');
%
% % Identify largest area of connected components and isolate these pixels
% % from image.  These isolate pixels should account for the majority of the
% % tissue of interest
% cc =bwconncomp(BWdfill1);
% labeled = labelmatrix(cc);
% stats = regionprops(cc,'Area');
% [val id] = max([stats.Area]);
% mask_temp = labeled == id;
% BW_new = mask_temp.*BWdfill1;
%
% % Dialate and fill the image again to finish segementation of all pixels of
% % interest
% BWsdil2 = imdilate(BW_new, [se90 se0]);
% BWdfill2 = imfill(BWsdil2, 'holes');
%
% % Smoothen object using erosion
% seD = strel('diamond',3);
% BWfinal = imerode(BWdfill2,seD);
% BWfinal = imerode(BWfinal,seD);
%
% % Create a matrix mask the length of the cmos data and apply mask to remove
% % background pixels
% mask = repmat(BWfinal,[1 1 size(data,3)]);
% new_data = data.*mask;

%% Method 2: Thresholding
% Threshold Image
BG = mat2gray(bg);
level = graythresh(BG);
BW = imbinarize(BG, level * thresh);
BW2 = bwareaopen(BW, perc_ex * size(BG, 1) * size(BG, 2));
BW3 = imfill(BW2, 'holes');
mask = repmat(BW3, [1, 1, size(data, 3)]);
new_data = data .* mask;


text:
//
//  DefaultAcceleratorWindow.java
//  xal
//
//  Created by Thomas Pelaia on 9/5/06.
//  Copyright 2006 Oak Ridge National Lab. All rights reserved.
//

package xal.extension.application.smf;

import xal.extension.application.*;

/** provides a default implementation of the XAL Accelerator window */
public class DefaultAcceleratorWindow extends AcceleratorWindow {
    /** serialization ID */
    private static final long serialVersionUID = 1L;

    /** Constructor */
    public DefaultAcceleratorWindow( final XalDocument aDocument ) {
		super( aDocument );
    }

    /**
	 * Indicates whether or not to display the toolbar.
	 * @return true to display the toolbar and false to hide it
     */
    public boolean usesToolbar() {
        return true;
    }
}


text:
import {
  linkIsInternal,
  getCounterValue,
  removeUserAgentSpecifics,
} from './helpers';

const internalUrl = 'https://medium.com/';
const internalUrlWww = 'https://www.medium.com/';
const sameBaseDomainUrl = 'https://app.medium.com/';
const internalUrlCoUk = 'https://medium.co.uk/';
const differentBaseDomainUrlCoUk = 'https://other.domain.co.uk/';
const sameBaseDomainUrlCoUk = 'https://app.medium.co.uk/';
const sameBaseDomainUrlTidalListen = 'https://listen.tidal.com/';
const sameBaseDomainUrlTidalLogin = 'https://login.tidal.com/';
const internalUrlSubPath = 'topic/technology';
const externalUrl = 'https://www.wikipedia.org/wiki/Electron';
const wildcardRegex = /.*/;

test('the original url should be internal', () => {
  expect(linkIsInternal(internalUrl, internalUrl, undefined)).toEqual(true);
});

test('sub-paths of the original url should be internal', () => {
  expect(
    linkIsInternal(internalUrl, internalUrl + internalUrlSubPath, undefined),
  ).toEqual(true);
});

test("'about:blank' should be internal", () => {
  expect(linkIsInternal(internalUrl, 'about:blank', undefined)).toEqual(true);
});

test('urls from different sites should not be internal', () => {
  expect(linkIsInternal(internalUrl, externalUrl, undefined)).toEqual(false);
});

test('all urls should be internal with wildcard regex', () => {
  expect(linkIsInternal(internalUrl, externalUrl, wildcardRegex)).toEqual(true);
});

test('a "www." of a domain should be considered internal', () => {
  expect(linkIsInternal(internalUrl, internalUrlWww, undefined)).toEqual(true);
});

test('urls on the same "base domain" should be considered internal', () => {
  expect(linkIsInternal(internalUrl, sameBaseDomainUrl, undefined)).toEqual(
    true,
  );
});

test('urls on the same "base domain" should be considered internal, even with a www', () => {
  expect(linkIsInternal(internalUrlWww, sameBaseDomainUrl, undefined)).toEqual(
    true,
  );
});

test('urls on the same "base domain" should be considered internal, even with different sub domains', () => {
  expect(
    linkIsInternal(
      sameBaseDomainUrlTidalListen,
      sameBaseDomainUrlTidalLogin,
      undefined,
    ),
  ).toEqual(true);
});

test('urls on the same "base domain" should be considered internal, long SLD', () => {
  expect(
    linkIsInternal(internalUrlCoUk, sameBaseDomainUrlCoUk, undefined),
  ).toEqual(true);
});

test('urls on the a different "base domain" are considered NOT internal, long SLD', () => {
  expect(
    linkIsInternal(internalUrlCoUk, differentBaseDomainUrlCoUk, undefined),
  ).toEqual(false);
});

const testLoginPages = [
  'https://amazon.co.uk/signin',
  'https://amazon.com/signin',
  'https://amazon.de/signin',
  'https://amazon.com/ap/signin',
  'https://facebook.co.uk/login',
  'https://facebook.com/login',
  'https://facebook.de/login',
  'https://github.co.uk/login',
  'https://github.com/login',
  'https://github.de/login',
  // GitHub 2FA flow with FIDO token
  'https://github.com/session',
  'https://github.com/sessions/two-factor/webauth',
  'https://accounts.google.co.uk',
  'https://accounts.google.com',
  'https://mail.google.com/accounts/SetOSID',
  'https://mail.google.co.uk/accounts/SetOSID',
  'https://accounts.google.de',
  'https://linkedin.co.uk/uas/login',
  'https://linkedin.com/uas/login',
  'https://linkedin.de/uas/login',
  'https://login.live.co.uk',
  'https://login.live.com',
  'https://login.live.de',
  'https://login.microsoftonline.com/common/oauth2/authorize',
  'https://login.microsoftonline.co.uk/common/oauth2/authorize',
  'https://login.microsoftonline.de/common/oauth2/authorize',
  'https://okta.co.uk',
  'https://okta.com',
  'https://subdomain.okta.com',
  'https://okta.de',
  'https://twitter.co.uk/oauth/authenticate',
  'https://twitter.com/oauth/authenticate',
  'https://twitter.de/oauth/authenticate',
  'https://appleid.apple.com/auth/authorize',
  'https://id.atlassian.com',
  'https://auth.atlassian.com',
];

test.each(testLoginPages)(
  '%s login page should be internal',
  (loginUrl: string) => {
    expect(linkIsInternal(internalUrl, loginUrl, undefined)).toEqual(true);
  },
);

// Ensure that we don't over-match service pages
const testNonLoginPages = [
  'https://www.amazon.com/Node-Cookbook-techniques-server-side-development-ebook',
  'https://github.com/nativefier/nativefier',
  'https://github.com/org/nativefier',
  'https://microsoft.com',
  'https://office.microsoftonline.com',
  'https://twitter.com/marcoroth_/status/1325938620906287104',
  'https://appleid.apple.com/account',
  'https://mail.google.com/',
  'https://atlassian.com',
];

test.each(testNonLoginPages)(
  '%s page should not be internal',
  (url: string) => {
    expect(linkIsInternal(internalUrl, url, undefined)).toEqual(false);
  },
);

const smallCounterTitle = 'Inbox (11) - nobody@example.com - Gmail';
const largeCounterTitle = 'Inbox (8,756) - nobody@example.com - Gmail';
const noCounterTitle = 'Inbox - nobody@example.com - Gmail';

test('getCounterValue should return undefined for titles without counter numbers', () => {
  expect(getCounterValue(noCounterTitle)).toEqual(undefined);
});

test('getCounterValue should return a string for small counter numbers in the title', () => {
  expect(getCounterValue(smallCounterTitle)).toEqual('11');
});

test('getCounterValue should return a string for large counter numbers in the title', () => {
  expect(getCounterValue(largeCounterTitle)).toEqual('8,756');
});

describe('removeUserAgentSpecifics', () => {
  test('removes Electron and App specific info', () => {
    const userAgentFallback =
      'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) app-nativefier-804458/1.0.0 Chrome/89.0.4389.128 Electron/12.0.7 Safari/537.36';
    expect(
      removeUserAgentSpecifics(
        userAgentFallback,
        'app-nativefier-804458',
        '1.0.0',
      ),
    ).not.toBe(
      'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/89.0.4389.128 Safari/537.36',
    );
  });
});


text:
#ifndef __itkDiscreteLevelSetImageBase_h
#define __itkDiscreteLevelSetImageBase_h

#include "itkLevelSetImageBase.h"
#include "itkObjectFactory.h"
#include "itkIndex.h"
#include "itkImageBase.h"

namespace itk
{
/**
 *  \class DiscreteLevelSetImageBase
 *  \brief Abstract class for a level-set function on one Image.
 *
 *  \tparam TOutput OutputType of the level-set function value
 *  \tparam VDimension Dimension of the underlying Image.
 *
 *  \ingroup ITKLevelSetsv4
 */
template< typename TOutput, unsigned int VDimension >
class DiscreteLevelSetImageBase :
  public LevelSetImageBase< Index< VDimension >,
                       VDimension,
                       TOutput >
{
public:
  typedef Index< VDimension >             IndexType;

  typedef DiscreteLevelSetImageBase                           Self;
  typedef SmartPointer< Self >                                Pointer;
  typedef SmartPointer< const Self >                          ConstPointer;
  typedef LevelSetImageBase< IndexType, VDimension, TOutput > Superclass;

  /** Run-time type information */
  itkTypeMacro ( DiscreteLevelSetImageBase, LevelSetImageBase );

  itkStaticConstMacro ( Dimension, unsigned int, Superclass::Dimension );

  typedef typename Superclass::InputType        InputType;
  typedef typename Superclass::OutputType       OutputType;
  typedef typename Superclass::OutputRealType   OutputRealType;
  typedef typename Superclass::GradientType     GradientType;
  typedef typename Superclass::HessianType      HessianType;
  typedef typename Superclass::LevelSetDataType LevelSetDataType;

  /** Returns the gradient of the level set function at a given location iP */
  virtual OutputType  Evaluate( const InputType& iP ) const = 0;

  /** Returns the image gradient of the level set function at a given location iP */
  virtual GradientType EvaluateGradient( const InputType& iP ) const;

  /** Returns the image hessian of the level set function at a given location iP */
  virtual HessianType EvaluateHessian( const InputType& iP ) const;

  /** Returns the image Laplacian of the level set function at a given location iP */
  virtual OutputRealType EvaluateLaplacian( const InputType& iP ) const;

  /** Returns the mean curvature of the level set function at a given location iP */
  virtual OutputRealType EvaluateMeanCurvature( const InputType& iP ) const;

  /** Returns the value of the level set function at a given location iP */
  virtual void Evaluate( const InputType& iP, LevelSetDataType& ioData ) const;

  /** Returns the gradient of the level set function at a given location iP
   * as part of the LevelSetDataType */
  virtual void EvaluateGradient( const InputType& iP, LevelSetDataType& ioData ) const;

  /** Returns the Hessian of the level set function at a given location iP
   * as part of the LevelSetDataType */
  virtual void EvaluateHessian( const InputType& iP, LevelSetDataType& ioData ) const;

  /** Returns the Hessian of the level set function at a given location iP
   * as part of the LevelSetDataType */
  virtual void EvaluateMeanCurvature( const InputType& iP, LevelSetDataType& ioData ) const;

  /** Returns the Laplacian of the level set function at a given location iP
   * as part of the LevelSetDataType */
  virtual void EvaluateLaplacian( const InputType& iP, LevelSetDataType& ioData ) const;

  /** Returns the gradient of the level set function at a given location iP
   * as part of the LevelSetDataType */
  virtual void EvaluateForwardGradient( const InputType& iP, LevelSetDataType& ioData ) const;

  /** Returns the gradient of the level set function at a given location iP
   * as part of the LevelSetDataType */
  virtual void EvaluateBackwardGradient( const InputType& iP, LevelSetDataType& ioData ) const;

protected:
  DiscreteLevelSetImageBase();

  virtual ~DiscreteLevelSetImageBase();

  /** Initial the level set pointer */
  virtual void Initialize();

  /** Copy level set information from data object */
  virtual void CopyInformation(const DataObject *data);

  /** Graft data object as level set object */
  virtual void Graft( const DataObject* data );

private:

  DiscreteLevelSetImageBase( const Self& ); // purposely not implemented
  void operator = ( const Self& ); // purposely not implemented
  };
}

#ifndef ITK_MANUAL_INSTANTIATION
#include "itkDiscreteLevelSetImageBase.hxx"
#endif

#endif // __itkDiscreteLevelSetImageBase_h


text:
package at.zhou.child;

import android.util.Log;

import com.zhou.ipay.IPay;

import java.util.Random;

/**
 * Created by mxz on 2021/9/10.
 */
public class PayImpl implements IPay {

    private Random random = new Random();

    @Override
    public int getMoney() {
        return random.nextInt(5000);
    }

    @Override
    public void pay(int money) {
        Log.i("child", "PayImpl pay money: " + money);
    }
}


text:
class Brand < ActiveRecord::Base
  # attr_accessible :name
  has_many :products

end


text:
package trackello

import (
	"reflect"
	"sort"
	"testing"

	"github.com/VojtechVitek/go-trello"
)

func newTestList() []List {
	return []List{
		*NewList(&trello.List{Name: "Z"}),
		*NewList(&trello.List{Name: "B"}),
		*NewList(&trello.List{Name: "A"}),
		*NewList(&trello.List{Name: "Q"}),
	}
}

func TestSortListByName(t *testing.T) {
	lists := newTestList()
	sort.Sort(ByListName(lists))
	if !sort.IsSorted(ByListName(lists)) {
		t.Fatal("Error: Not Sorted")
	}
	sortedLists := []List{
		*NewList(&trello.List{Name: "A"}),
		*NewList(&trello.List{Name: "B"}),
		*NewList(&trello.List{Name: "Q"}),
		*NewList(&trello.List{Name: "Z"}),
	}
	if !reflect.DeepEqual(lists, sortedLists) {
		t.Fatal("Lists are not equal")
	}
}

func TestPrintNonZeroActions(t *testing.T) {
	l := *NewList(&trello.List{Name: "test"})
	if l.PrintNonZeroActions() != "" {
		t.Fatalf("PrintNonZeroActions did not pass: expected %s, got %s", "", l.PrintNonZeroActions())
	}
}


text:
package issueclasses;

public class UnusedCodeTester {

    public static String string1 = "Si!";

    public static String string2 = "No!";

    @SuppressWarnings("unchecked")
    public static String MYvariBal = "x";

    private String someVaribal = "xdfdsf";

    private static String WtFperMinute;

    public static void main(String[] args) {
        System.out.println(string1);
        used(100);
        used(200);
        used(300);

        OtherClass otherClass = new OtherClass();
        otherClass.method1("xx");
        otherClass.steel = "hallo";
        WtFperMinute = otherClass.steel;
    }

    private String unused(String a, String b, String c) {
        int i = 0;
        if (i == 0) {
        } else if (i == 23) {
        }

        return "YES";
    }

    private static boolean used(int i) {
        return true;
    }
}


text:
require_relative 'scp/version'
require 'vagrant'

module Vagrant
  module Puppet
    module Scp
      class Plugin < Vagrant.plugin('2')
        name 'puppet_scp'
        description <<-DESC
        Provides support for provisioning your virtual machines with
        Puppet using `puppet apply`. Manifests are copied using SCP.
        DESC

        config(:puppet_scp, :provisioner) do
          require_relative 'scp/config'
          Config
        end

        provisioner(:puppet_scp) do
          require_relative 'scp/provisioner'
          Provisioner
        end
      end
    end
  end
end


text:
'use strict';

/* Object.assign
 *
 * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/
 * Global_Objects/Object/assign
 *
 * This polyfill doesn't support symbol properties, since ES5 doesn't
 * have symbols anyway:
 */

if (!Object.assign) {
  Object.defineProperty(Object, 'assign', {
    enumerable: false,
    configurable: true,
    writable: true,
    value: function(target) {
      if (typeof target === 'undefined' || target === null) {
        throw new TypeError('Cannot convert first argument to object');
      }

      var to = Object(target);
      for (var i = 1; i < arguments.length; i++) {
        var nextSource = arguments[i];
        if (typeof nextSource === 'undefined' || nextSource === null) {
          continue;
        }

        var keysArray = Object.keys(Object(nextSource));
        for (var nextIndex = 0, len = keysArray.length; nextIndex < len; nextIndex++) {
          var nextKey = keysArray[nextIndex];
          var desc = Object.getOwnPropertyDescriptor(nextSource, nextKey);
          if (typeof desc !== 'undefined' && desc.enumerable) {
            to[nextKey] = nextSource[nextKey];
          }
        }
      }
      return to;
    }
  });
}


text:
package com.ycsoft.sysmanager.dto.config;

import java.util.List;

import com.ycsoft.beans.config.TRuleDefine;
import com.ycsoft.beans.config.TRuleEdit;

public class RuleEditDto {

	private RuleDefineDto rule;
	private List<TRuleEdit> ruleEdits;
	public RuleDefineDto getRule() {
		return rule;
	}
	public void setRule(RuleDefineDto rule) {
		this.rule = rule;
	}
	public List<TRuleEdit> getRuleEdits() {
		return ruleEdits;
	}
	public void setRuleEdits(List<TRuleEdit> ruleEdits) {
		this.ruleEdits = ruleEdits;
	}
}


text:
<?php

namespace Magento\Contact\Test\Unit\Controller\Index;

class IndexTest extends \PHPUnit_Framework_TestCase
{
    /**
     * Controller
     *
     * @var \Magento\Contact\Controller\Index\Index
     */
    protected $_controller;

    /**
     * Scope config mock
     *
     * @var \Magento\Framework\App\Config\ScopeConfigInterface|\PHPUnit_Framework_MockObject_MockObject
     */
    protected $_scopeConfig;

    /**
     * View mock
     *
     * @var \Magento\Framework\App\ViewInterface|\PHPUnit_Framework_MockObject_MockObject
     */
    protected $_view;

    /**
     * Url mock
     *
     * @var \Magento\Framework\UrlInterface|\PHPUnit_Framework_MockObject_MockObject
     */
    protected $_url;

    public function setUp()
    {
        $this->_scopeConfig = $this->getMockForAbstractClass(
            '\Magento\Framework\App\Config\ScopeConfigInterface',
            ['isSetFlag'],
            '',
            false
        );
        $context = $this->getMock(
            '\Magento\Framework\App\Action\Context',
            ['getRequest', 'getResponse', 'getView', 'getUrl'],
            [],
            '',
            false
        );

        $this->_url = $this->getMockForAbstractClass('\Magento\Framework\UrlInterface', [], '', false);

        $context->expects($this->any())
            ->method('getUrl')
            ->will($this->returnValue($this->_url));

        $context->expects($this->any())
            ->method('getRequest')
            ->will($this->returnValue(
                $this->getMockForAbstractClass('\Magento\Framework\App\RequestInterface', [], '', false)
            ));

        $context->expects($this->any())
            ->method('getResponse')
            ->will($this->returnValue(
                $this->getMockForAbstractClass('\Magento\Framework\App\ResponseInterface', [], '', false)
            ));

        $this->_view = $this->getMock(
            '\Magento\Framework\App\ViewInterface',
            [],
            [],
            '',
            false
        );

        $context->expects($this->once())
            ->method('getView')
            ->will($this->returnValue($this->_view));

        $this->_controller = new \Magento\Contact\Controller\Index\Index(
            $context,
            $this->getMock('\Magento\Framework\Mail\Template\TransportBuilder', [], [], '', false),
            $this->getMockForAbstractClass('\Magento\Framework\Translate\Inline\StateInterface', [], '', false),
            $this->_scopeConfig,
            $this->getMockForAbstractClass('\Magento\Store\Model\StoreManagerInterface', [], '', false)
        );
    }

    public function testExecute()
    {
        $this->_view->expects($this->once())
            ->method('loadLayout');

        $this->_view->expects($this->once())
            ->method('renderLayout');

        $this->_controller->execute();
    }
}


text:
package filter

import (
	"github.com/getgauge/gauge/gauge"
	"github.com/getgauge/gauge/logger"
	"github.com/getgauge/gauge/util"
)

var ExecuteTags string
var Distribute int
var NumberOfExecutionStreams int
var ScenariosName []string

func FilterSpecs(specs []*gauge.Specification) []*gauge.Specification {
	specs = applyFilters(specs, specsFilters())
	if ExecuteTags != "" && len(specs) > 0 {
		logger.Debugf(true, "The following specifications satisfy filter criteria:")
		for _, s := range specs {
			logger.Debugf(true, util.RelPathToProjectRoot(s.FileName))
		}
	}
	return specs
}

func FilterSpecForParallelRun(specs []*gauge.Specification, tags string) ([]*gauge.Specification, []*gauge.Specification) {
	tf := &tagFilterForParallelRun{tagExp: tags}
	return tf.filter(specs)
}

func specsFilters() []specsFilter {
	return []specsFilter{&tagsFilter{ExecuteTags}, &specsGroupFilter{Distribute, NumberOfExecutionStreams}, &scenariosFilter{ScenariosName}}
}

func applyFilters(specsToExecute []*gauge.Specification, filters []specsFilter) []*gauge.Specification {
	for _, specsFilter := range filters {
		specsToExecute = specsFilter.filter(specsToExecute)
	}
	return specsToExecute
}


text:
#ifndef _OSX_HELPERS_H_
#define _OSX_HELPERS_H_

// FIXME: This is a hack to work around Automake's lack of support for ObjC++.
//        Remove it after switching build system to Bakefile.

#ifdef __cplusplus
extern "C" {
#endif

#ifdef USE_SPARKLE
// Sparkle helpers
void Sparkle_Initialize(bool checkForBeta);
void Sparkle_AddMenuItem(NSMenu *appmenu, const char *title);
void Sparkle_Cleanup();
#endif // USE_SPARKLE

// Spell checking
int SpellChecker_SetLang(const char *lang);

// Native preferences
void UserDefaults_SetBoolValue(const char *key, int value);
int  UserDefaults_GetBoolValue(const char *key);
void UserDefaults_RemoveValue(const char *key);

// Misc UI helpers
void MakeButtonRounded(void *button);

void MoveToApplicationsFolderIfNecessary();

#ifdef __cplusplus
}
#endif

#endif // _OSX_HELPERS_H_


text:
package com.amazonaws.services.marketplacecommerceanalytics.smoketests;

import javax.annotation.Generated;

import com.google.inject.AbstractModule;
import com.google.inject.Guice;
import com.google.inject.Injector;
import com.google.inject.Stage;

import cucumber.api.guice.CucumberModules;
import cucumber.runtime.java.guice.InjectorSource;

import com.amazonaws.AmazonWebServiceClient;
import com.amazonaws.services.marketplacecommerceanalytics.AWSMarketplaceCommerceAnalyticsClient;

/**
 * Injector that binds the AmazonWebServiceClient interface to the
 * com.amazonaws.services.marketplacecommerceanalytics.AWSMarketplaceCommerceAnalyticsClient
 */
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class AWSMarketplaceCommerceAnalyticsModuleInjector implements InjectorSource {

    @Override
    public Injector getInjector() {
        return Guice.createInjector(Stage.PRODUCTION, CucumberModules.SCENARIO, new AWSMarketplaceCommerceAnalyticsModule());
    }

    static class AWSMarketplaceCommerceAnalyticsModule extends AbstractModule {

        @Override
        protected void configure() {
            bind(AmazonWebServiceClient.class).to(AWSMarketplaceCommerceAnalyticsClient.class);
        }
    }
}


text:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="net.app.pulltorefresh.test">

    <uses-sdk android:minSdkVersion="15" android:targetSdkVersion="22" />

    <application>
        <uses-library android:name="android.test.runner" />
    </application>

    <instrumentation android:name="android.test.InstrumentationTestRunner"
                     android:targetPackage="net.app.pulltorefresh"
                     android:handleProfiling="false"
                     android:functionalTest="false"
                     android:label="Tests for net.app.pulltorefresh"/>
</manifest>


text:
require 'fog/core/collection'
require 'fog-concerto/models/compute/workspace'

module Fog
	module Concerto
		class Compute
			class Workspaces < Fog::Collection
				model Fog::Compute::Concerto::Workspace

				def all
					data = service.list_workspaces.body
					load(data)
				end

				def get(id)
					data = service.get_workspace(id).body
					new(data)
				end
			end
		end
	end
end


text:
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Runtime.Serialization;
using System.Text;
using System.Threading.Tasks;
using Ferric.Math.Common;
using Ferric.Utils.Common;

namespace Ferric.Math.MachineLearning
{
    public interface IClassifier<TInput, TOutput> : ISerializable
        where TOutput : IComparable<TOutput>
    {
        /// <summary>
        /// Takes an input vector and calculates its class(es).
        /// </summary>
        /// <param name="input">Vector of inputs.</param>
        /// <returns>One or more possible classes for the input, with weights.</returns>
        IEnumerable<IOutputClass<TOutput>> Classify(IEnumerable<TInput> input);

        void TrainModel(IEnumerable<IEnumerable<TInput>> trainingInputs, IEnumerable<IEnumerable<TOutput>> trainingOutputs);
        double TestModel(IEnumerable<IEnumerable<TInput>> testingInputs, IEnumerable<IEnumerable<TOutput>> testingOutputs, Func<TOutput, TOutput, double> calcMatch);
    }

    public interface IOutputClass<T> : IComparable<IOutputClass<T>>
    {
        double Weight { get; set; }
        IEnumerable<T> Output { get; set; }
    }

    [Serializable]
    public class OutputClass<TOutput> : IOutputClass<TOutput>
        where TOutput : IComparable<TOutput>
    {
        public OutputClass(double weight, IEnumerable<TOutput> output)
        {
            this.Weight = weight;
            this.Output = output;
        }

        #region IClass<TOutput> Members

        public double Weight { get; set; }
        public IEnumerable<TOutput> Output { get; set; }

        #endregion

        #region IComparable<IClass<TOutput>> Members

        public int CompareTo(IOutputClass<TOutput> other)
        {
            return this.Output.CompareTo(other.Output);
        }

        #endregion

        #region Object Members

        int? hashCode;

        public override bool Equals(object obj)
        {
            var oc = obj as OutputClass<TOutput>;
            if (oc == null)
                return false;

            return Output.SequenceEqual(oc.Output);
        }

        public override int GetHashCode()
        {
            if (hashCode == null)
            {
                int hash = int.MinValue;
                foreach (var output in Output)
                    hash = hash ^ output.GetHashCode();
                hashCode = hash;
            }
            return hashCode.Value;
        }

        #endregion
    }
}


text:
require File.expand_path(File.dirname(__FILE__) + '/../spec_helper')
`rake db:migrate`
# `rake db:migrate:down VERSION=20101003172516`
# 'rake db:migrate:up VERSION=20101003172516'

describe RailsSunspotAdmin do
  class Dummy < ActiveRecord::Base
  end

  describe '#list of items' do
    before(:each) do
      Factory.create(:dummy_name, :searchable_status => SearchableItem::NOTPREPARED)
      Factory.create(:dummy_description, :searchable_status => SearchableItem::PREPARED)
      Factory.create(:dummy_age, :searchable_status => SearchableItem::INDEXED)
    end

    it "should find all models and attributes for this app" do
      results = RailsSunspotAdmin.all_attributes
      results['Dummy'][:attributes].length.should == 6
    end

    it "should find all models and attributes for this app not yet added to search" do
      results = RailsSunspotAdmin.not_searchable
      results['Dummy'][:attributes].length.should == 3
    end
  end

  describe '#enable search' do
    it "should enable search for particular list of classes" do
      RailsSunspotAdmin.make_searchable({ 'Dummy' => { 'string' => [:name] } })
      Dummy.searchable?.should == true
    end

    it "should initialize search for models already added to index" do
      Factory.create(:dummy_age, :searchable_status => SearchableItem::INDEXED)
      RailsSunspotAdmin.initialize_search
      Dummy.searchable?.should == true
    end
  end

  describe '#solr' do
    it "should test if solr is running" do
      RailsSunspotAdmin.solr_running?.should == false
    end

    it "should test if the app is ready for search and return false if solr server is not started" do
      RailsSunspotAdmin.make_searchable({ 'Dummy' => { 'string' => [:name] } })
      RailsSunspotAdmin.search_enabled?.should == true
      RailsSunspotAdmin.ready?.should == false
    end

    describe '#running server' do
      before(:all) do
        CukeSunspot.new.start
      end

      it "should test if the app is ready for search and return true if solr server is started" do
        RailsSunspotAdmin.make_searchable({ 'Dummy' => { 'string' => [:name] } })
        RailsSunspotAdmin.search_enabled?.should == true
        RailsSunspotAdmin.solr_running?.should == true
        RailsSunspotAdmin.ready?.should == true
      end

      after(:all) do
        CukeSunspot.stop
      end
    end
  end
end


text:
@interface HMStatusResponseController : UIViewController

@end


text:
<!doctype html>

   <link href="css/bootstrap.min.css" rel="stylesheet" media="screen">

    <title>Upload new File</title>

Upload new File

    <form action="/upload" method=post enctype=multipart/form-data>

<input type=file name=file>
         <input type=submit value=Upload>
    </form>


text:
#import <React/RCTViewManager.h>

@interface RCTSnapshotManager : RCTViewManager

@end