text:
from __future__ import absolute_import

import mock
import os

from django.conf import settings

TEST_ROOT = os.path.normpath(
    os.path.join(
        os.path.dirname(__file__),
        os.pardir,
        os.pardir,
        os.pardir,
        os.pardir,
        'tests'))

def pytest_configure(config):
    # HACK: Only needed for testing!
    os.environ.setdefault('_SENTRY_SKIP_CONFIGURATION', '1')

    os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'sentry.conf.server')

    # override docs which are typically synchronized from an upstream server
    # to ensure tests are consistent
    os.environ.setdefault(
        'INTEGRATION_DOC_FOLDER',
        os.path.join(
            TEST_ROOT,
            'fixtures',
            'integration-docs'))
    from sentry.utils import integrationdocs
    integrationdocs.DOC_FOLDER = os.environ['INTEGRATION_DOC_FOLDER']

    if not settings.configured:
        # only configure the db if its not already done
        test_db = os.environ.get('DB', 'postgres')
        if test_db == 'mysql':
            settings.DATABASES['default'].update(
                {
                    'ENGINE': 'django.db.backends.mysql',
                    'NAME': 'sentry',
                    'USER': 'root',
                    'HOST': '127.0.0.1',
                }
            )
            # mysql requires running full migration all the time
        elif test_db == 'postgres':
            settings.DATABASES['default'].update(
                {
                    'ENGINE': 'sentry.db.postgres',
                    'USER': 'postgres',
                    'NAME': 'sentry',
                    'HOST': '127.0.0.1',
                }
            )
            # postgres requires running full migration all the time
            # since it has to install stored functions which come from
            # an actual migration.
        elif test_db == 'sqlite':
            settings.DATABASES['default'].update(
                {
                    'ENGINE': 'django.db.backends.sqlite3',
                    'NAME': ':memory:',
                }
            )
        else:
            raise RuntimeError('oops, wrong database: %r' % test_db)

    settings.TEMPLATE_DEBUG = True

    # Disable static compiling in tests
    settings.STATIC_BUNDLES = {}

    # override a few things with our test specifics
    settings.INSTALLED_APPS = tuple(settings.INSTALLED_APPS) + ('tests', )
    # Need a predictable key for tests that involve checking signatures
    settings.SENTRY_PUBLIC = False

    if not settings.SENTRY_CACHE:
        settings.SENTRY_CACHE = 'sentry.cache.django.DjangoCache'
        settings.SENTRY_CACHE_OPTIONS = {}

    # This speeds up the tests considerably, pbkdf2 is by design, slow.
    settings.PASSWORD_HASHERS = [
        'django.contrib.auth.hashers.MD5PasswordHasher',
    ]

    settings.AUTH_PASSWORD_VALIDATORS = []

    # Replace real sudo middleware with our mock sudo middleware
    # to assert that the user is always in sudo mode
    middleware = list(settings.MIDDLEWARE_CLASSES)
    sudo = middleware.index('sentry.middleware.sudo.SudoMiddleware')
    middleware[sudo] = 'sentry.testutils.middleware.SudoMiddleware'
    settings.MIDDLEWARE_CLASSES = tuple(middleware)

    settings.SENTRY_OPTIONS['cloudflare.secret-key'] = 'cloudflare-secret-key'

    # enable draft features
    settings.SENTRY_OPTIONS['mail.enable-replies'] = True

    settings.SENTRY_ALLOW_ORIGIN = '*'

    settings.SENTRY_TSDB = 'sentry.tsdb.inmemory.InMemoryTSDB'
    settings.SENTRY_TSDB_OPTIONS = {}

    if settings.SENTRY_NEWSLETTER == 'sentry.newsletter.base.Newsletter':
        settings.SENTRY_NEWSLETTER = 'sentry.newsletter.dummy.DummyNewsletter'
        settings.SENTRY_NEWSLETTER_OPTIONS = {}

    settings.BROKER_BACKEND = 'memory'
    settings.BROKER_URL = None
    settings.CELERY_ALWAYS_EAGER = False
    settings.CELERY_EAGER_PROPAGATES_EXCEPTIONS = True

    settings.DEBUG_VIEWS = True

    settings.SENTRY_ENCRYPTION_SCHEMES = ()

    settings.DISABLE_RAVEN = True

    settings.CACHES = {
        'default': {
            'BACKEND': 'django.core.cache.backends.locmem.LocMemCache',
        }
    }

    if not hasattr(settings, 'SENTRY_OPTIONS'):
        settings.SENTRY_OPTIONS = {}

    settings.SENTRY_OPTIONS.update(
        {
            'redis.clusters': {
                'default': {
                    'hosts': {
                        0: {
                            'db': 9,
                        },
                    },
                },
            },
            'mail.backend': 'django.core.mail.backends.locmem.EmailBackend',
            'system.url-prefix': 'http://testserver',

            'slack.client-id': 'slack-client-id',
            'slack.client-secret': 'slack-client-secret',
            'slack.verification-token': 'slack-verification-token',

            'github-app.name': 'sentry-test-app',
            'github-app.client-id': 'github-client-id',
            'github-app.client-secret': 'github-client-secret',

            'vsts.client-id': 'vsts-client-id',
            'vsts.client-secret': 'vsts-client-secret',
        }
    )

    # django mail uses socket.getfqdn which doesn't play nice if our
    # networking isn't stable
    patcher = mock.patch('socket.getfqdn', return_value='localhost')
    patcher.start()

    if not settings.SOUTH_TESTS_MIGRATE:
        settings.INSTALLED_APPS = tuple(i for i in settings.INSTALLED_APPS if i != 'south')

    from sentry.runner.initializer import (
        bootstrap_options, configure_structlog, initialize_receivers, fix_south,
        bind_cache_to_option_store, setup_services
    )

    bootstrap_options(settings)
    configure_structlog()
    fix_south(settings)

    bind_cache_to_option_store()

    initialize_receivers()
    setup_services()
    register_extensions()

    from sentry.utils.redis import clusters

    with clusters.get('default').all() as client:
        client.flushdb()

    # force celery registration
    from sentry.celery import app  # NOQA

    # disable DISALLOWED_IPS
    from sentry import http
    http.DISALLOWED_IPS = set()

def register_extensions():
    from sentry.plugins import plugins
    from sentry.plugins.utils import TestIssuePlugin2

    plugins.register(TestIssuePlugin2)

    from sentry import integrations
    from sentry.integrations.bitbucket import BitbucketIntegrationProvider
    from sentry.integrations.example import ExampleIntegrationProvider, AliasedIntegrationProvider
    from sentry.integrations.github import GitHubIntegrationProvider
    from sentry.integrations.github_enterprise import GitHubEnterpriseIntegrationProvider
    from sentry.integrations.jira import JiraIntegrationProvider
    from sentry.integrations.slack import SlackIntegrationProvider
    from sentry.integrations.vsts import VstsIntegrationProvider
    from sentry.integrations.vsts_extension import VstsExtensionIntegrationProvider
    integrations.register(BitbucketIntegrationProvider)
    integrations.register(ExampleIntegrationProvider)
    integrations.register(AliasedIntegrationProvider)
    integrations.register(GitHubIntegrationProvider)
    integrations.register(GitHubEnterpriseIntegrationProvider)
    integrations.register(JiraIntegrationProvider)
    integrations.register(SlackIntegrationProvider)
    integrations.register(VstsIntegrationProvider)
    integrations.register(VstsExtensionIntegrationProvider)

    from sentry.plugins import bindings
    from sentry.plugins.providers.dummy import DummyRepositoryProvider

    bindings.add('repository.provider', DummyRepositoryProvider, id='dummy')

def pytest_runtest_teardown(item):
    from sentry import tsdb
    # TODO(dcramer): this only works if this is the correct tsdb backend
    tsdb.flush()

    # XXX(dcramer): only works with DummyNewsletter
    from sentry import newsletter
    if hasattr(newsletter.backend, 'clear'):
        newsletter.backend.clear()

    from sentry.utils.redis import clusters

    with clusters.get('default').all() as client:
        client.flushdb()

    from celery.task.control import discard_all
    discard_all()

    from sentry.models import OrganizationOption, ProjectOption, UserOption
    for model in (OrganizationOption, ProjectOption, UserOption):
        model.objects.clear_local_cache()


text:
laravel-hhvm-fix
================

A simple artisian task to replace the usage of compact function by array declarations across all files from a given folder (i.e vendor)

To add to artisan command list, just open artisan.php and include:

Artisan::add(new LaravelHHVMFixCommand());

redpajama_set_name: RedPajamaGithub


text:
SYNONYM

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

#### Published in
Karstenia 14: 91 (1974)

#### Original name
Agaricus nebularis Batsch, 1789

### Remarks
null


text:
package edu.clemson.resolve.jetbrains.psi;

import java.util.List;
import org.jetbrains.annotations.*;
import com.intellij.psi.PsiElement;

public interface ResSpecModuleParameters extends ResModuleParameters {

  @NotNull
  List<ResMathStandardDefnDecl> getMathStandardDefnDeclList();

  @NotNull
  List<ResParamDecl> getParamDeclList();

  @NotNull
  List<ResTypeParamDecl> getTypeParamDeclList();

  @NotNull
  PsiElement getLparen();

  @Nullable
  PsiElement getRparen();

}


text:
<!DOCTYPE HTML>
<html>
<head>
<title>noConflict define test</title>

<script>
var define = function () {}, orig = define;
</script>
<script src="../src/curl.js" type="text/javascript"></script>
</head>
<body>
</body>

<script type="text/javascript">

/*

scenarios:

1. dev wants to load curl as a third-party tool (inside a widget, for instance)
	- namespace curl/require
	- namespace define
	- if either already exists, do nothing since widget may have just been
	  loaded twice
	- if conflict and cfg.overwriteApi is:
		- missing, ignore conflict  <-- ***** special case *****
		- falsey, throw,
		- truthy, ignore conflict

2. dev wants to rename curl to something "standardized"
	- rename curl to require
	- if require() or define() already exist, throw unless dev meant to overwrite
	- if conflict and cfg.overwriteApi is:
	 	- missing, throw
	 	- falsey, throw
	 	- truthy, ignore conflict

3. dev wants to load curl async alongside modules
	- don't throw if standard (or namespaced) api functions are overwritten
	- if conflict and cfg.overwriteApi is:
		- missing, throw
		- falsey, throw
		- truthy, ignore conflict

4. dev wants to adapt curl to her/his proprietary module system (actual use case)
	- namespace curl/require
	- namespace define
	- if either already exists, fail loudly
	- if conflict and cfg.overwriteApi is:
		- missing, throw
		- falsey, throw
		- truthy, ignore conflict

 */
try {
	curl({ paths: { curl: '../src/curl/' } });
	write('FAILED: curl overwrote global define (plz ignore this in IE6. feature works, test doesn\'t');
}
catch (ex) {
	if (/define.*exists/.test(ex.message)) {
		write('SUCCESS: curl threw when it conflicted with no recourse: ' + ex.message);
	}
	else {
		write('FAILED: something happened: ' + ex.message + ' (plz ignore in IE)');
	}
}

function write (msg) {
	document.body.appendChild(document.createElement('div')).innerHTML = msg;
}

</script>
</html>


text:
function updatewobbletable(row)
{

    var j = row.id;
    var e = row.options[row.selectedIndex].value;
    row.value = e;

}

function freezeday()
{
    //day table
    var dott = document.getElementById('irisweektab');

    for (var i=1,row;row=dott.rows[i];i++){
        for (var j=1,col;col =row.cells[j]; j++){
            freezevals(col)

        }

    }

   //freeze doy cell
    var doycell = document.getElementById('1-doyrowdata');
    freezevals(doycell);
   // freeze memory cell
    var memcell = document.getElementById('1-memuserow');
    freezevals(memcell);

}

//function to thaw day data
function thawday()
{
    //day table
    var dott = document.getElementById('irisweektab');

    for (var i=1,row;row=dott.rows[i];i++){
        for (var j=1,col;col =row.cells[j]; j++){
            thawvals(col)

        }

    }

   //thaw doy cell
    var doycell = document.getElementById('1-doyrowdata');
    thawvals(doycell);
   // thaw memory cell
    var memcell = document.getElementById('1-memuserow');
    thawvals(memcell);

//    console.log("Not Implimented")
}

function thawvals(elem)
{
//    console.log(elem)
    //dictionary to make thaw table if add table call is frozen
    var propdict = {
                    "doyrowdata":[3,"text",""],
                    "memuserow":[3,"text",""],
                    "domrow":[2,"text",""],
                    "doyrow":[3,"text",""],
                    "dotrow":[2,"text",""],
                    };

   //look whether to freeze column or not
    var dofreeze = 1;

    // check to see if box has a child (i.e. the box is frozen)
    if (document.getElementById(elem.id).innerHTML[0] == '<'){
        document.getElementById(elem.id).children[0].id = elem.id.replace('row','box')
    }
    if (document.getElementById(elem.id).innerHTML[0] != '<'){
//store previous value
        var prev = document.getElementById(elem.id).innerHTML
//remove data from HTML row
        document.getElementById(elem.id).innerHTML = ''
        var node = document.createElement("input");
// id of variable to put into dictionary propdict
        var inid = elem.id.split('-');
//        console.log(inid)

        var thisid = propdict[inid[1]];
//set up attributes from dictionary
        node.setAttribute('type',thisid[1]);
        node.setAttribute('value',prev);
        node.setAttribute('size',thisid[0]);
        node.setAttribute('id',inid[0]+'-'+inid[1].replace('row','box'));

//Addend onto parent
        document.getElementById(elem.id).appendChild(node);
    }

}

//save table html5 feature
function savehtml5()
{
    var key = 'irisTable';
    save(key);
    save('irisdoytab');
    save('irisweektab');

}

//do the saving outside the button
function save(key)
{
    var values = document.getElementById(key).innerHTML;
    localStorage.setItem(key,values);
}

//load saved table
function loadhtml5()
{
    var key = 'irisTable';
    load(key);
    load('irisdoytab');
    load('irisweektab');
}

//load saved outside the button
function load(key)
{
    var values = localStorage.getItem(key);
    document.getElementById(key).innerHTML = values;
}

function deleteRow(row)
{
// Delete selected row
    var i=row.parentNode.parentNode.rowIndex;
    document.getElementById('irisTable').deleteRow(i);
}

function checkTime(i)
{
    if (i < 10){
        i = "0"+i;
    }
    return i;
}

function findend(row)
{
//Used start time, exp time and number of exps to find the approximate end time for the observation
    var i = row.parentNode.id.split('-')[1]

//grab values from the HTML file
    var statime = document.getElementById("1-"+i+"-statimerow").children[0].value;//document.getElementById('1-'+i+'-statimebox').value;
    var exptime = parseFloat(document.getElementById('1-'+i+'-exptimerow').children[0].value);
    var repeats = parseFloat(document.getElementById('1-'+i+'-repeatsrow').children[0].value);

//break the start time into HH,MM,SS
    var arstime = statime.split(":")

//Just use current date to set up a day to operate on
//really just a dummy variable
    var currentDate = new Date();
    currentDate.setDate(currentDate.getDate() + 1);
    var dd = currentDate.getDate();
    var mm = currentDate.getMonth()+1;
    var yy = currentDate.getYear();

    mm = checkTime(mm)
    dd = checkTime(dd)

    var date = new Date(yy,mm,dd,arstime[0],arstime[1],arstime[2])

    var addsec = exptime*repeats
// Add exposure time to start time
    date.setSeconds(date.getSeconds()+addsec);
// Add slew time (Assume slow)
    var addslew = 10 //min
    date.setMinutes(date.getMinutes()+addslew)

//split endtime into a string variable
    var endHour = checkTime(date.getHours()) + ':' + checkTime(date.getMinutes())+ ":" + checkTime(date.getSeconds());

// update endtime
    document.getElementById('1-'+i+'-endtimebox').value = endHour;

}

//fixes issue with wrong ids for rows
var idInit = 1;

function duplicateRow(row){

//copy based of  the row clicked
    var j = row.parentNode.id.split('-')[1]
//Create a duplicated of the last row created
    var table = document.getElementById("irisTable"); // find table to append to
    var row   = document.getElementById('1-'+j+'-samplerow');
    var newRow = row.cloneNode(true); // Clone the row

    incrementId(newRow); // Increment the row's ID
    var cells = newRow.cells;
    var ocells = row.cells;

    for(var i = 0; i < cells.length; i++){
        incrementId(cells[i]); // Increment the cells' IDs
    }
    insertAfter(row, newRow); // Insert the row at the right position
    idInit++;//inc row id

    for(var i = 0; i < cells.length; i++){
   //update input frame to include proper numbering
        var dofreeze = updateinput(cells[i]);
   //set old cell values to static so you can save
        if (dofreeze == 1){
            freezevals(ocells[i]);
        }
    }
}

//locks in values of previously submitted values
function freezevals(elem){

//Changed to allow manual setting of endtimebox
//Changed to ignore phase orbital wobble
//   if (elem.id.split('-')[2] != 'tabwobblerow'){
       if (document.getElementById(elem.id).children[0].type != 'button') {
           document.getElementById(elem.id).innerHTML =  document.getElementById(elem.id).children[0].value;
        }
//    }
}

function updateinput(elem){
    //dictionary to make thaw table if add table call is frozen
    var propdict = {
                    "dayrow":[1,"text",""],
                    "statimerow":[8,"text",""],
                    "exptimerow":[7,"text",""],
                    "repeatsrow":[5,"text",""],
                    "endtimerow":[8,"text",""],
                    "xsrow":[6,"text",""],
                    "ysrow":[6,"text",""],
                    "obsidrow":[10,"text",""],
                    "titlerow":[35,"text",""],
                    "rollrow":[3,"text",""],
                    "aecrow":[1,"checkbox","off"],
                    "trackrow":[1,"checkbox","off"],
                    "wobblerow":[1,"checkbox","off"],
                    "tabwobblerow":[1,"select",""]
                    };

   //look whether to freeze column or not
    var dofreeze = 1;

    //Update input element value
    //Changed to allow manual setting of endtimebox (2017/01/03 J. Prchlik)
    if (elem.id.split('-')[2] != 'tabwobblerow'){
// check to see if box has a child (i.e. the box is frozen)
        if (document.getElementById(elem.id).innerHTML[0] == '<'){
            document.getElementById(elem.id).children[0].id = elem.id.replace('row','box')
    // clears out previous data from text
            if (document.getElementById(elem.id).children[0].type == 'text') {
                document.getElementById(elem.id).children[0].value = null;
                document.getElementById(elem.id).value = null;
            }
    // clears out previous data form checkbox
            if (document.getElementById(elem.id).children[0].type == 'checkbox') {
                document.getElementById(elem.id).children[0].value = 'off';
                document.getElementById(elem.id).children[0].checked = false;
                document.getElementById(elem.id).value = null;
            }
        }

        if (document.getElementById(elem.id).innerHTML[0] != '<'){
    //remove data from HTML row
            document.getElementById(elem.id).innerHTML = ''
            var node = document.createElement("input");
    // id of variable to put into dictionary propdict
            var inid = elem.id.split('-');
            var thisid = propdict[inid[2]];
    //set up attributes from dictionary
            node.setAttribute('type',thisid[1]);
            node.setAttribute('value',thisid[2]);
            node.setAttribute('size',thisid[0]);
            node.setAttribute('id',inid[0]+'-'+inid[1]+'-'+inid[2].replace('row','box'));
            if (thisid[1] == 'checkbox'){
                node.setAttribute('onclick', "if(this.checked) {value='on'}");
            }

    //Addend onto parent
            document.getElementById(elem.id).appendChild(node);
    //do not freeze frozen data
                dofreeze = 0;
        }

    } else {
// Update Wobble Table data
        var tabwob = document.getElementById(elem.id);
        var childs = tabwob.childNodes.length;
        console.log(tabwob.childNodes.length);
        console.log(tabwob.childNodes);
 //Remove previous child
        var array = ["0 Table","90 Table","No Table"];
        var select = document.createElement("select");
        var dofreeze = 1;
        if (childs == 1){
//Go Passover on frozen text
            tabwob.removeChild(tabwob.firstChild);
            tabwob.appendChild(select);
            for (var i=0; i<array.length; i++){
                var option = document.createElement("option");
                option.setAttribute("value",array[i]);
                option.text = array[i];
                select.appendChild(option);
            }
            tabwob.appendChild(document.createTextNode(""));
            tabwob.appendChild(select);
            tabwob.appendChild(document.createTextNode(""));
            dofreeze = 0;
        }
    }
    //console.log(document.getElementById(elem.id))
    //document.getElementById(elem.id).children[0].id = elem.id.replace('row','box')
    return dofreeze;
}

function incrementId(elem)
{

//Change ids of cell to increment by 1
    idParts = elem.id.split('-'); // Cut up the element's ID to get the second part.

    idInit ? idParts[1] = idInit + 1 : idInit = idParts[1]++;  // Increment the ID, and set a temp variable to keep track of the id's.

    elem.id = idParts.join('-'); // Set the new id to the element.

}

//DOES NOT WORK
function saveform()
{
    var data = document.getElementById("irisTable").innerHTML;
    var fname = 'loggingdata.html'
    console.log(document.getElementById("irisTable"))

}

//function to save updated html file
//Does not work
function saveupdate()
{
    document.execCommand("SaveAs")

}

//Insert new row at bottom
function insertAfter(after, newNode)
{
    after.parentNode.insertBefore(newNode, after.nextSibling);
}


text:
.statement .statement-wrapper {
    max-width: 1024px;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.statement .statement-wrapper .title {
    font-size: 20px;
    font-weight: bold;
    color: #8BC34A;
}


text:
package authoring.panel;

import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Optional;

import authoring.Workspace;
import authoring.components.ComponentMaker;
import authoring.views.View;
import javafx.beans.value.ChangeListener;
import javafx.beans.value.ObservableValue;
import javafx.event.Event;
import javafx.scene.control.Alert;
import javafx.scene.control.Alert.AlertType;
import javafx.scene.control.Button;
import javafx.scene.control.ButtonType;
import javafx.scene.control.ComboBox;
import javafx.scene.control.Slider;
import javafx.scene.layout.HBox;
import javafx.scene.layout.VBox;
import javafx.scene.paint.Color;
import javafx.scene.text.Text;

/**
 *
 * @author Mina Mungekar
 *
 */
public class LayerPanel extends View
{

	private Workspace workspace;
	private VBox editorContainer;
	private ComboBox myBox;
	private Map<Integer, List<String>> layerOptions;
	private ComponentMaker maker;

	public LayerPanel(Workspace workspace)
	{
		super(workspace.getResources().getString("LayerPanelTitle"));
		this.workspace = workspace;
		maker = new ComponentMaker(workspace.getResources());
		layerOptions = new HashMap<Integer, List<String>>();
		myBox = new ComboBox();
		configureEditing();
	}

	private void configureEditing()
	{
		editorContainer = new VBox();
		editorContainer.setSpacing(Integer.parseInt(workspace.getResources().getString("SettingsSpacing")));
		Button addLayerButton = maker.makeButton("AddLayerButton", e -> workspace.addLayer(), true);
		Button deleteLayerButton = maker.makeButton("DeleteLayerButton", e -> {
			initCloseRequest(e);
			delete();
		}, true);
		initLayerSelector();
		configureVelocitySettings();
		editorContainer.getChildren().addAll(addLayerButton, deleteLayerButton);
		setCenter(editorContainer);
	}

	private void initCloseRequest(Event e)
	{
		ComponentMaker maker = new ComponentMaker(workspace.getResources());
		String message = workspace.getResources().getString("ConfirmationContent");
		Alert alert = maker.makeAlert(AlertType.CONFIRMATION, "ConfirmationTitle", "ConfirmationHeader", message);
		Optional<ButtonType> result = alert.showAndWait();
		if (result.get() != ButtonType.OK) {
			e.consume();
		}
	}

	private void delete()
	{
		int layer = Integer.parseInt(((String) myBox.getSelectionModel().getSelectedItem()).split(" ")[1]);
		myBox.setValue((layer == 1 ? String.format("Layer %d", layer) : String.format("Layer %d", layer - 1)));
		workspace.deleteLayer(layer);
	}

	private void configureVelocitySettings()
	{
		Slider velocitySlider = new Slider()
		{
			{
				setMin(0);
				setMax(100);
				setValue(0);
			}
		};

		HBox sliderBox = new HBox()
		{
			{
				setSpacing(Integer.parseInt(workspace.getResources().getString("SettingsSpacing")));
				Text t = new Text(workspace.getResources().getString("LayerSpeedPrompt"));
				t.setFill(Color.WHITE);
				getChildren().addAll(t, velocitySlider);
			}
		};

		Button velocityButton = maker.makeButton("SaveLayerSpeed", null, true);
		editorContainer.getChildren().addAll(myBox, sliderBox, velocityButton);
	}

	public void updateBox(String newLayer)
	{
		myBox.getItems().add(newLayer);
		// myBox.setValue(newLayer);
	}

	private void initLayerSelector()
	{
		myBox.setPromptText(workspace.getResources().getString("LayerBoxPrompt"));
		myBox.valueProperty().addListener(new ChangeListener()
		{

			@Override
			public void changed(ObservableValue arg0, Object arg1, Object arg2)
			{
				if (arg2 != null) {
					workspace.selectLayer(Integer.parseInt(((String) arg2).split(" ")[1]));
				}
			}
		});
	}

	public void selectLevelBox(int layerNum)
	{
		myBox.getItems().clear();
		for (int i = 0; i < layerNum; i++) {
			myBox.getItems().add(String.format("Layer %d", i + 1));
		}
	}

}


text:
/**
 * @class Denkmal_Page_Index
 * @extends Denkmal_Page_Abstract
 */
var Denkmal_Page_Index = Denkmal_Page_Abstract.extend({

  /** @type String */
  _class: 'Denkmal_Page_Index'
});


text:
#ifndef M_PI
#define M_PI 3.1415926535897932384626433832795
#endif

typedef struct
{
  double x;
  double y;
} pos_t;

typedef struct
{
  int n;
  double range;
} range_t;

typedef struct
{
  int n;
  double range;
  int length;
} cluster_t;

using namespace std;
class CLaser
{
public:
  CLaser();
  virtual ~CLaser();

public:
  static const int m_cnMaxConnect = MAX_CONNECT;
  static const int m_cnMaxDataSizeLRF = MAX_DATA_SIZE_LRF;
  static const int m_cnMaxTrackingObject = MAX_TRACKING_OBJECT;
  bool m_bNodeActive[m_cnMaxConnect];
  int m_nConnectNum;

  std::vector< std::vector< double > > m_LRFData;
  std::vector< std::vector< double > > m_BackLRFData;
  std::vector< std::vector< range_t > > m_DiffLRFData;
  std::vector< std::vector< pos_t > > m_LRFPoints;
  std::vector< std::vector< cluster_t > > m_LRFClsData;
  std::vector< std::vector< pos_t > > m_LRFClsPoints;

  CvMat* m_LRFPos[m_cnMaxConnect][m_cnMaxDataSizeLRF];
  CvMat* m_LRFClsPos[m_cnMaxConnect][m_cnMaxDataSizeLRF];

  int m_nStep[m_cnMaxConnect];
  double m_StartAngle[m_cnMaxConnect];
  double m_DivAngle[m_cnMaxConnect];
  LRFParam m_LRFParam[m_cnMaxConnect];

  CTarget* m_pTarget[m_cnMaxTrackingObject];
  int m_Target_cnt[m_cnMaxTrackingObject];

  int m_n_ring;
  std::vector< std::vector< std::vector< double > > > m_BackLRFDataRing;
  std::vector< std::vector< double > > m_BackLRFDataAve;
  std::vector< std::vector< double > > m_BackLRFDataVar;

public:
  bool Init();  // OnNewDocument()

  int GetLRFParam();
  int GetDiffLRFData();
  int GetBackLRFData();
  int GetDiffLRFCluster(int n);
  bool m_bResetBackRangeData;
  int GetBackLRFDataGaussian();
  int GetDiffLRFDataGaussian();
  int UpdateBackLRFDataGaussian();

  int IsFrontFData(double currentdata, double backdata, double min_dist);
  int IsFrontFData(double currentdata, double backdata_ave, double backdata_var, double min_prob);

  bool ReadBackgroundData();
  bool WriteBackgroundData();

  int m_diff_dist;
  double m_obj_prob;
  int m_ring;
};


text:
@extends('layouts.master')

@section('breadcrumbs')

      Sprint

      Home /
      Projects /
      project->id) }}">Backlogs /
      Sprint

@endsection

@section('content')

Create Sprint

{{ $backlog->title }}

{{ $backlog->sprint->description }}

          @foreach($backlog->sprint->comments as $comment)

{{ $comment->content }}

          @endforeach

          {!! Form::open(['route' => ['comments.store']]) !!}
          {!! Form::hidden('sprint_id', $backlog->sprint->id) !!}

              {!! Form::label('content', 'Content') !!}
              {!! Form::text('content', null, ['class' => 'form-control', 'required']) !!}

            <button type="submit" class="btn btn-primary">Add Comment</button>
          {!! Form::close() !!}

@endsection


text:
'use strict';
var should = require('should');

var config = require('../lib/config');

describe('lib/config', function() {
  it ('should work', function() {
    var testconfig = '';
    testconfig += 'type: normal\n';
    testconfig += 'before_script:\n';
    testconfig += '  - echo "Hello World!"\n';
    var parsed = config.parse(testconfig);
    parsed.should.eql({
      type: 'normal',
      before_script: ['echo "Hello World!"']
    });
  });
});


text:
<?php

namespace Drupal\serialization\Normalizer;

use Symfony\Component\Serializer\Normalizer\NormalizerInterface;
use Symfony\Component\Serializer\Normalizer\SerializerAwareNormalizer;

/**
 * Base class for Normalizers.
 */
abstract class NormalizerBase extends SerializerAwareNormalizer implements NormalizerInterface {

  /**
   * The interface or class that this Normalizer supports.
   *
   * @var string|array
   */
  protected $supportedInterfaceOrClass;

  /**
   * List of formats which supports (de-)normalization.
   *
   * @var string|string[]
   */
  protected $format;

  /**
   * {@inheritdoc}
   */
  public function supportsNormalization($data, $format = NULL) {
    // If we aren't dealing with an object or the format is not supported return
    // now.
    if (!is_object($data) || !$this->checkFormat($format)) {
      return FALSE;
    }

    $supported = (array) $this->supportedInterfaceOrClass;

    return (bool) array_filter($supported, function($name) use ($data) {
      return $data instanceof $name;
    });
  }

  /**
   * Implements \Symfony\Component\Serializer\Normalizer\DenormalizerInterface::supportsDenormalization()
   *
   * This class doesn't implement DenormalizerInterface, but most of its child
   * classes do, so this method is implemented at this level to reduce code
   * duplication.
   */
  public function supportsDenormalization($data, $type, $format = NULL) {
    // If the format is not supported return now.
    if (!$this->checkFormat($format)) {
      return FALSE;
    }

    $supported = (array) $this->supportedInterfaceOrClass;

    $subclass_check = function($name) use ($type) {
      return (class_exists($name) || interface_exists($name)) && is_subclass_of($type, $name, TRUE);
    };

    return in_array($type, $supported) || array_filter($supported, $subclass_check);
  }

  /**
   * Checks if the provided format is supported by this normalizer.
   *
   * @param string $format
   *   The format to check.
   *
   * @return bool
   *   TRUE if the format is supported, FALSE otherwise. If no format is
   *   specified this will return TRUE.
   */
  protected function checkFormat($format = NULL) {
    if (!isset($format) || !isset($this->format)) {
      return TRUE;
    }

    return in_array($format, (array) $this->format, TRUE);
  }

}


text:
//
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.11
// See http://java.sun.com/xml/jaxb
// Any modifications to this file will be lost upon recompilation of the source schema.
// Generated on: 2015.03.31 at 05:31:18 PM CDT
//

package org.adligo.fabricate.xml.io_v1.library_v1_0;

import java.util.ArrayList;
import java.util.List;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlSeeAlso;
import javax.xml.bind.annotation.XmlType;
import org.adligo.fabricate.xml.io_v1.project_v1_0.ProjectDependenciesType;

/**
 *
Java class for dependencies_type complex type.
 *
 *
The following schema fragment specifies the expected content contained within this class.
 *
 *

 * <complexType name="dependencies_type">
 *   <complexContent>
 *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
 *       <sequence>
 *         <element name="library" type="{http://www.adligo.org/fabricate/xml/io_v1/library_v1_0.xsd}library_reference_type" maxOccurs="unbounded" minOccurs="0"/>
 *         <element name="dependency" type="{http://www.adligo.org/fabricate/xml/io_v1/library_v1_0.xsd}dependency_type" maxOccurs="unbounded" minOccurs="0"/>
 *       </sequence>
 *     </restriction>
 *   </complexContent>
 * </complexType>
 *

 *
 *
 */
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "dependencies_type", propOrder = {
    "library",
    "dependency"
})
@XmlSeeAlso({
    ProjectDependenciesType.class
})
public class DependenciesType {

    protected List<LibraryReferenceType> library;
    protected List<DependencyType> dependency;

    /**
     * Gets the value of the library property.
     *
     *

     * This accessor method returns a reference to the live list,
     * not a snapshot. Therefore any modification you make to the
     * returned list will be present inside the JAXB object.
     * This is why there is not a set method for the library property.
     *
     *

     * For example, to add a new item, do as follows:
     *

     *    getLibrary().add(newItem);
     *

     *
     *
     *

     * Objects of the following type(s) are allowed in the list
     * {@link LibraryReferenceType }
     *
     *
     */
    public List<LibraryReferenceType> getLibrary() {
        if (library == null) {
            library = new ArrayList<LibraryReferenceType>();
        }
        return this.library;
    }

    /**
     * Gets the value of the dependency property.
     *
     *

     * This accessor method returns a reference to the live list,
     * not a snapshot. Therefore any modification you make to the
     * returned list will be present inside the JAXB object.
     * This is why there is not a set method for the dependency property.
     *
     *

     * For example, to add a new item, do as follows:
     *

     *    getDependency().add(newItem);
     *

     *
     *
     *

     * Objects of the following type(s) are allowed in the list
     * {@link DependencyType }
     *
     *
     */
    public List<DependencyType> getDependency() {
        if (dependency == null) {
            dependency = new ArrayList<DependencyType>();
        }
        return this.dependency;
    }

}


text:
package com.haulmont.cuba.gui.components.validation.numbers;

import java.math.BigDecimal;

public class DoubleConstraint implements NumberConstraint {

    protected Double value;

    public DoubleConstraint(Double value) {
        this.value = value;
    }

    @Override
    public boolean isMax(long max) {
        throw new UnsupportedOperationException();
    }

    @Override
    public boolean isMin(long min) {
        throw new UnsupportedOperationException();
    }

    @Override
    public boolean isDigits(int integer, int fraction) {
        throw new UnsupportedOperationException();
    }

    @Override
    public boolean isDecimalMax(BigDecimal max, boolean inclusive) {
        throw new UnsupportedOperationException();
    }

    @Override
    public boolean isDecimalMin(BigDecimal min, boolean inclusive) {
        throw new UnsupportedOperationException();
    }

    @Override
    public boolean isNegativeOrZero() {
        return value <= 0;
    }

    @Override
    public boolean isNegative() {
        return value < 0;
    }

    @Override
    public boolean isPositiveOrZero() {
        return value >= 0;
    }

    @Override
    public boolean isPositive() {
        return value > 0;
    }

    @Override
    public boolean isDoubleMax(Double max, boolean inclusive) {
        if (inclusive) {
            return compareValueWith(max) <= 0;
        } else {
            return compareValueWith(max) < 0;
        }
    }

    @Override
    public boolean isDoubleMin(Double min, boolean inclusive) {
        if (inclusive) {
            return compareValueWith(min) >= 0;
        } else {
            return compareValueWith(min) > 0;
        }
    }

    private int compareValueWith(Double val) {
        return this.value.compareTo(val);
    }
}


text:
<!DOCTYPE html>
<html>
<head>
  <title>Jungle</title>
<link rel="stylesheet" href="game.css" type="text/css" media="screen">
<script type="text/javascript">
var main = require('./src/main');
main({
  game: {},
  driver: {
    hiDpi: false,
    window: window
  }
});
</script>
</head>
<body>
</body>
</html>


text:
package org.neo4j.visualization;

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

public enum PropertyType
{
	/**
	 * Represents a String property.
	 */
	STRING( null, "String", String.class )
	{
		@Override
		<T> T apply( ValueFormatter<T> formatter, Object value )
		{
			return formatter.formatString( ( String ) value );
		}
	},
	/**
	 * Represents an integer property.
	 */
	INT( null, "int", Integer.class, int.class ),
	/**
	 * Represents a long property.
	 */
	LONG( null, "long", Long.class, long.class ),
	/**
	 * Represents a boolean property.
	 */
	BOOLEAN( null, "boolean", Boolean.class, boolean.class ),
	/**
	 * Represents a short property.
	 */
	SHORT( null, "short", Short.class, short.class ),
	/**
	 * Represents a character property.
	 */
	CHAR( null, "char", Character.class, char.class ),
	/**
	 * Represents a byte property.
	 */
	BYTE( null, "byte", Byte.class, byte.class ),
	/**
	 * Represents a float property.
	 */
	FLOAT( null, "float", Float.class, float.class ),
	/**
	 * Represents a double property.
	 */
	DOUBLE( null, "double", Double.class, double.class ),
	// Array types
	/**
	 * Represents an array of Strings.
	 */
	STRING_ARRAY( String.class, "String[]", String[].class )
	{
		@Override
		<T> T apply( ValueFormatter<T> formatter, Object value )
		{
			return formatter.formatStringArray( ( String[] ) value );
		}
	},
	/**
	 * Represents an array of integers.
	 */
	INT_ARRAY( Integer.class, "int[]", Integer[].class, int[].class ),
	/**
	 * Represents an array of longs.
	 */
	LONG_ARRAY( Long.class, "long[]", Long[].class, long[].class ),
	/**
	 * Represents an array of booleans.
	 */
	BOOLEAN_ARRAY( Boolean.class, "boolean[]", Boolean[].class, boolean[].class ),
	/**
	 * Represents an array of shorts.
	 */
	SHORT_ARRAY( Short.class, "short[]", Short[].class, short[].class ),
	/**
	 * Represents an array of characters.
	 */
	CHAR_ARRAY( Character.class, "char[]", Character[].class, char[].class ),
	/**
	 * Represents an array of bytes.
	 */
	BYTE_ARRAY( Byte.class, "byte[]", Byte[].class, byte[].class ),
	/**
	 * Represents an array of floats.
	 */
	FLOAT_ARRAY( Float.class, "float[]", Float[].class, float[].class ),
	/**
	 * Represents an array of doubles.
	 */
	DOUBLE_ARRAY( Double.class, "double[]", Double[].class, double[].class ),
	/**
	 * Represents an undefined type.
	 */
	UNDEFINED( null, "Object" )
	{
		@Override
		<T> T apply( ValueFormatter<T> formatter, Object value )
		{
			return formatter.formatUnknownObject( value );
		}
	};
	/**
	 * Get the {@link PropertyType} representing the type of a value.
	 * @param propertyValue
	 *            the value to get the type of.
	 * @return the type of the given value.
	 */
	public static PropertyType getTypeOf( Object propertyValue )
	{
		return getTypeFor( propertyValue.getClass() );
	}

	static PropertyType getTypeFor( Class<? extends Object> type )
	{
		PropertyType result = typeMap.get( type );
		if ( result != null )
		{
			return result;
		}
		else
		{
			return UNDEFINED;
		}
	}

	<T> T apply( ValueFormatter<T> formatter, Object value )
	{
		if ( scalarType != null )
		{
			PropertyType type = getTypeFor( scalarType );
			if ( value instanceof Object[] )
			{
				return formatter.formatBoxedPrimitiveArray( type,
				    ( Object[] ) value );
			}
			else
			{
				return formatter.formatPrimitiveArray( type, value );
			}
		}
		else
		{
			return formatter.formatBoxedPrimitive( this, value );
		}
	}

	/**
	 * Apply a formatter to a value and return the result.
	 * @param <T>
	 *            the type of the result.
	 * @param formatter
	 *            the formatter to apply to the value.
	 * @param propertyValue
	 *            the value to apply the formatter to.
	 * @return the value as produced by the formatter.
	 */
	public static <T> T format( ValueFormatter<T> formatter,
	    Object propertyValue )
	{
		return getTypeOf( propertyValue ).apply( formatter, propertyValue );
	}

	/**
	 * Format a given value to a String by applying a string formatter.
	 * @see #format(ValueFormatter, Object)
	 * @param propertyValue
	 *            the value to turn into a string.
	 * @return the given value formatted as a string.
	 */
	public static String format( Object propertyValue )
	{
		return format( ValueFormatter.DEFAULT_STRING_FORMATTER, propertyValue );
	}

	private final Class<?>[] types;
	private final Class<?> scalarType;
	/**
	 * Specifies the name of the type.
	 */
	public final String typeName;

	private PropertyType( Class<?> scalarType, String descriptor,
	    Class<?>... types )
	{
		this.typeName = descriptor;
		this.types = types;
		this.scalarType = scalarType;
	}

	private static final Map<Class<?>, PropertyType> typeMap;
	static
	{
		Map<Class<?>, PropertyType> types = new HashMap<Class<?>, PropertyType>();
		for ( PropertyType type : values() )
		{
			for ( Class<?> cls : type.types )
			{
				types.put( cls, type );
			}
		}
		typeMap = Collections.unmodifiableMap( types );
	}
}


text:
<!DOCTYPE html>

    <meta charset="UTF-8">

    <link rel="stylesheet" href="bower_components/bootstrap/dist/css/bootstrap.min.css">
    <link rel="stylesheet" href="styles/index.css">
    <title>TecnoCrown - projects</title>

{{language.home}}

{{language.project}}

{{language.about}}

{{language.contact}}

Login

signin

              {{language.select_lang}}

{{language.lang.en}}

{{language.lang.es}}

{{language.slogan}}

{{language.slogan2}}

Title Proyect

Tiny description about the proyecto, no much more of 150 characters.

                  + {{language.more}}

Title Proyect

Tiny description about the proyecto, no much more of 150 characters.

                  + {{language.more}}

Title Proyect

Tiny description about the proyecto, no much more of 150 characters.

                  + {{language.more}}

Los mas votados:

Title Proyect

Tiny description about the proyecto, no much more of 150 characters.

                  + {{language.more}}

Title Proyect

Tiny description about the proyecto, no much more of 150 characters.

                  + {{language.more}}

Title Proyect

Tiny description about the proyecto, no much more of 150 characters.

                  + {{language.more}}

Title Proyect

Tiny description about the proyecto, no much more of 150 characters.

                  + {{language.more}}

TECNOCROWD ADVANTAGE

              Lorem ipsum dolor sit amet, consectetur adipiscing elit. Fusce odio mi, porta vitae lacus sed,
              hendrerit volutpat justo. Aliquam dignissim ipsum tellus, in efficitur purus sodales et.
              In lectus mi, ultricies eu nisl ultricies, sodales rhoncus elit. Aenean convallis dui a posuere
              porttitor. Cras egestas sagittis eleifend. In sodales ligula id ipsum placerat, id iaculis tortor
              varius. Praesent sit amet lacus a turpis gravida pretium. Etiam ultrices mauris sed mollis placerat.
              Cras ut consectetur mi. Integer vitae mauris aliquet, imperdiet erat in, dignissim tortor.
              Nam luctus congue massa, sed lacinia urna venenatis id. Fusce tempor enim eros. Praesent semper
              porttitor libero, sit amet ornare lorem imperdiet vel.

      COPYLEFT ALL RIGHTS ARE FREE FOR ALL PEOPLE ;)


text:
<?php
namespace Nemundo\User\Data\User;
class UserRow extends \Nemundo\Model\Row\AbstractModelDataRow {
/**
* @var \Nemundo\Model\Row\AbstractModelDataRow
*/
private $row;

/**
* @var UserModel
*/
public $model;

/**
* @var string
*/
public $id;

/**
* @var bool
*/
public $active;

/**
* @var string
*/
public $login;

/**
* @var string
*/
public $password;

/**
* @var string
*/
public $email;

/**
* @var string
*/
public $displayName;

/**
* @var string
*/
public $secureToken;

public function __construct(\Nemundo\Db\Row\AbstractDataRow $row, $model) {
parent::__construct($row->getData());
$this->row = $row;
$this->id = $this->getModelValue($model->id);
$this->active = boolval($this->getModelValue($model->active));
$this->login = $this->getModelValue($model->login);
$this->password = $this->getModelValue($model->password);
$this->email = $this->getModelValue($model->email);
$this->displayName = $this->getModelValue($model->displayName);
$this->secureToken = $this->getModelValue($model->secureToken);
}
}


text:
import json
import os
import logging
from greent.graph_components import KEdge
from greent import node_types
from greent.util import Text

def get_supporter(greent):
    return CDWSupport(greent)

class CDWSupport():

    def __init__(self,greent):
        self.oxo = greent.oxo
        self.total = 269332
        self.read_icd9()

    def prepare(self,nodes):
        for node in nodes:
            if (node.node_type == node_types.DISEASE) or (node.node_type == node_types.GENETIC_CONDITION):
                split_curie = node.identifier.split(':')
                if self.oxo.is_valid_curie_prefix( split_curie[0] ):
                    results = self.oxo.get_specific_synonym_expanding( node.identifier, 'ICD9CM' )
                    if len(results) == 0:
                        logging.getLogger('application').warn('No ICD9 found for term: %s' % node.identifier)
                    else:
                        for r in results:
                            logging.getLogger('application').debug('ICD9 for {}: {}'.format( node.identifier, r['curie']))
                            if ( '-' in r['curie'] ):
                                logging.getLogger('application').warn('ICD9 has a dash: {}'.format(r['curie']) )
                            node.synonyms.add( r['curie'] )
                else:
                    logging.getLogger('application').warn('Bad curie?')

    def read_icd9(self):
        #TODO: see that the files are available or pull them
        fname = os.path.join( os.path.dirname(__file__), 'AllDxCounts.txt')
        self.icd9_codes={}
        with open(fname, 'r') as infile:
            h = infile.readline()
            for line in infile:
                x = line.strip().split('|')
                icd_code = x[0]
                self.icd9_codes[icd_code] = int(x[1])
        self.icd9_paircounts = {}
        fname = os.path.join( os.path.dirname(__file__), 'ICD_Combo_Chi2.txt')
        with open(fname,'r') as infile:
            h = infile.readline()
            for line in infile:
                x = line.strip().split('\t')
                k1 = ( x[0], x[1] )
                k2 = ( x[1], x[0] )
                data = {
                'c1' : x[3],
                'c2' : x[4],
                'c'  : x[6],
                'e'  : float(x[3]) * float(x[4]) / self.total,  #expected counts
                'p'  : x[9]}
                self.icd9_paircounts[k1] = data
                self.icd9_paircounts[k2] = data

    def make_edge(self,cooc_list, node_a, node_b):
        k,c = cooc_list[0]
        #TODO: fix this up with details
        c[ 'icd9' ] = list(k)
        ke= KEdge( 'cdw', 'term_to_term', c,  is_support = True )
        ke.source_node = node_a
        ke.target_node = node_b
        return ke

    def term_to_term(self,node_a,node_b,limit = 10000):
        """Given two diseases, check the co-occurrence """
        icd9_a = list(filter( lambda x: x.startswith('ICD9'), node_a.synonyms ) )
        icd9_b = list(filter( lambda x: x.startswith('ICD9'), node_b.synonyms ) )
        if (len(icd9_a) == 0)  or (len(icd9_b) == 0):
            #can't do co-occurence unless we get icd9 codes
            return
        co_occurrences = []
        for icd9a_curie in icd9_a:
            icd9a = Text.un_curie(icd9a_curie)
            if icd9a not in self.icd9_codes:
                logging.getLogger('application').debug('Dont have data for {}'.format(icd9a))
                continue
            for icd9b_curie in icd9_b:
                icd9b = Text.un_curie(icd9b_curie)
                if icd9b not in self.icd9_codes:
                    logging.getLogger('application').debug('Dont have data for {}'.format(icd9b))
                    continue
                #Now we have nodes that both have ICD9 codees and the both map to our results!
                k = (icd9a, icd9b)
                if k not in self.icd9_paircounts:
                    #There were less than 11 shared counts.
                    counta = self.icd9_codes[icd9a]
                    countb = self.icd9_codes[icd9b]
                    expected = float(counta) * float(countb) / self.total
                    co_occurrences.append( (k, {'c1': counta, 'c2': countb, 'c': '<11', 'e': expected, 'p':None}) )
                else:
                    co_occurrences.append( (k, self.icd9_paircounts[k] ) )
        if len(co_occurrences) > 0:
            return self.make_edge(co_occurrences, node_a, node_b)
        return None

def test():
    from greent.rosetta import Rosetta
    from greent.graph_components import KNode
    from greent import node_types
    rosetta = Rosetta()
    gt = rosetta.core
    cdw = CDWSupport(gt)
    #node = KNode( 'MESH:D008175', node_type=node_types.GENETIC_CONDITION )
    node = KNode( 'DOID:9352', node_type=node_types.DISEASE )
    cdw.prepare( [node] )

def test_edge():
    from greent.rosetta import Rosetta
    from greent.graph_components import KNode
    from greent import node_types
    rosetta = Rosetta()
    gt = rosetta.core
    cdw = CDWSupport(gt)
    #node = KNode( 'MESH:D008175', node_type=node_types.GENETIC_CONDITION )
    nodea = KNode( 'DOID:11476', node_type=node_types.DISEASE )
    nodeb = KNode( 'Orphanet:90318', node_type=node_types.DISEASE )
    cdw.prepare( [nodea,nodeb] )
    e = cdw.term_to_term( nodea,nodeb)
    print (e)

if __name__ == '__main__':
    test_edge()


text:
[![Build Status](https://travis-ci.org/rlafranchi/system_tester.svg?branch=master)](https://travis-ci.org/rlafranchi/system_tester)
[![Code Climate](https://codeclimate.com/github/rlafranchi/system_tester/badges/gpa.svg)](https://codeclimate.com/github/rlafranchi/system_tester)
[![Test Coverage](https://codeclimate.com/github/rlafranchi/system_tester/badges/coverage.svg)](https://codeclimate.com/github/rlafranchi/system_tester/coverage)
# System Tester
A development tool for creating and managing system tests in Ruby on Rails >= 5.1 applications

## Usage
This gem is used only in development and is a mountable rails engine that creates JSON endpoints for a chrome extension.

## Installation
Add this line to your application's Gemfile:

```ruby
gem 'system_tester', group: :development
```

Add the system_tester db to `config/database.yml`
```yml
# you may want to consider a shared MySQL/Postgres database
# if you have a team that needs shared access
system_tester:
  <<: *default
  database: db/system_tester.sqlite3
```

And then install and run the migrations:
```bash
$ bundle install
$ rails system_tester:migrate
```

Mount the engine in config/routes.rb:
```ruby
Rails.application.routes.draw do
  # ... other routes

  # Mount in development environment only
  if Rails.env.development?
    mount SystemTester::Engine => "/system_tester"
  end
end
```

Start your dev server and you are good to go.

## Chrome extension
[![System Tester Demo](https://img.youtube.com/vi/bxHQKaIT7iM/0.jpg)](https://youtu.be/bxHQKaIT7iM)

The chrome extension provides a Devtools tab and acts as a client to this gem.

**[ADD TO CHROME](https://chrome.google.com/webstore/detail/system-tester/ebpjncfolmfiiphibdajgblbchkklbcf)**

## Design
System Tester is designed to work with a chrome extension, but could potentially be used for other applications as well.
Run `rails routes` to see what endpoints are provided.  The following design was set in place for the easy of reusing
testing steps:

 * Features - the top level: one test script for a feature
 * Scenarios - 1:M assocation from Feature to Scenario. A Scenario is one test method.
 * Steps - Basically a line of code that can be an action or an assertion. STI is used to provide different step types.
 * ScenarioSteps - M:M assocation for Steps and Scenarios which also as a position attribute to allow for reordering.
 * Stairs - an ordered group of steps that can be reused.
 * StairSteps - M:M association to support stairs, Stair inherits from Step so the fk points back to the same table.

## License
The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).


text:
SplashScreen::SplashScreen(const QPixmap &pixmap, Qt::WindowFlags f):
    QSplashScreen(pixmap, f)
{

    // set reference point, paddings
    int paddingRight            = 30;
    int paddingTop              = 50;
    int titleVersionVSpace      = 17;
    int titleCopyrightVSpace    = 40;

    float fontFactor            = 1.0;

    // define text to place
    QString titleText       = QString(QApplication::applicationName()).replace(QString("-testnet"), QString(""), Qt::CaseSensitive); // cut of testnet, place it as single object further down
    QString versionText     = QString("Version %1").arg(QString::fromStdString(FormatFullVersion()));
    QString copyrightText   = QChar(0xA9)+QString(" 2009-%1 ").arg(COPYRIGHT_YEAR) + QString(tr("The Fastcoin developers"));
    QString testnetAddText  = QString(tr("[testnet]")); // define text to place as single text object

    QString font            = "Arial";

    // load the bitmap for writing some text over it
    QPixmap newPixmap;
    if(GetBoolArg("-testnet")) {
        newPixmap     = QPixmap(":/images/splash_testnet");
    }
    else {
        newPixmap     = QPixmap(":/images/splash");
    }

    QPainter pixPaint(&newPixmap);
    pixPaint.setPen(QColor(100,100,100));

    // check font size and drawing with
    pixPaint.setFont(QFont(font, 28*fontFactor));
    QFontMetrics fm = pixPaint.fontMetrics();
    int titleTextWidth  = fm.width(titleText);
    if(titleTextWidth > 160) {
        // strange font rendering, Arial probably not found
        fontFactor = 0.75;
    }

    QFont fz(font, 28*fontFactor);
    fz.setStyleStrategy(QFont::PreferAntialias);
    pixPaint.setFont(fz);
    fm = pixPaint.fontMetrics();
    titleTextWidth  = fm.width(titleText);
    pixPaint.drawText(newPixmap.width()-titleTextWidth-paddingRight,paddingTop,titleText); //newPixmap.width()-titleTextWidth-

    fz.setPixelSize(10);
    pixPaint.setFont(fz);

    // if the version string is to long, reduce size
    fm = pixPaint.fontMetrics();
    int versionTextWidth  = fm.width(versionText);
    if(versionTextWidth > titleTextWidth+paddingRight-10) {
        pixPaint.setFont(QFont(font, 10*fontFactor));
        titleVersionVSpace -= 5;
    }
    pixPaint.drawText(newPixmap.width()-titleTextWidth-paddingRight+2,paddingTop+titleVersionVSpace,versionText); //

    fz.setPixelSize(8.5);
    pixPaint.setFont(fz);

    pixPaint.drawText(newPixmap.width()-titleTextWidth-paddingRight,paddingTop+titleCopyrightVSpace,copyrightText); //newPixmap.width()-titleTextWidth-

    // draw testnet string if -testnet is on
    if(QApplication::applicationName().contains(QString("-testnet"))) {
        // draw copyright stuff
        QFont boldFont = QFont(font, 10);
        boldFont.setWeight(QFont::Bold);
        pixPaint.setFont(boldFont);
        fm = pixPaint.fontMetrics();
        int testnetAddTextWidth  = fm.width(testnetAddText);
        pixPaint.drawText(newPixmap.width()-testnetAddTextWidth-10,15,testnetAddText);
    }

    pixPaint.end();

    //showmstatusmessage
    fz.setPixelSize(11);
    QRect r(15, 310, 500, 15);
    this->setMessageRect(r, Qt::AlignCenter); // Setting the message position.
    this->setFont(fz);

    this->setPixmap(newPixmap);
}

void SplashScreen::drawContents(QPainter *painter)
{
 QPixmap textPix = QSplashScreen::pixmap();
 painter->setPen(this->color);
 painter->drawText(this->rect, this->alignement, this->message);
}

void SplashScreen::showStatusMessage(const QString &message, const QColor &color)
{
 this->message = message;
 this->color = color;
 this->showMessage(this->message, this->alignement, this->color);
}

void SplashScreen::setMessageRect(QRect rect, int alignement)
{
 this->rect = rect;
 this->alignement = alignement;
}


text:
PHP is an interpreted language. It can be executed with

    $ php -f yourfilename.php

## Strengths

**Web projects**. PHP hosting services are widespread, PHP is easy to learn
and even used for big projects like Wikipedia.

## Weaknesses

* Computationally intensive stuff should not be done with PHP
* Pretty much everything which is not a web project


text:
define(function(){
  /**
   * @module window
   * @description window对象 :
   * @type {Object}
   */
  var exports = {
  /**
   * 得出所有在应用有效的样式和分解任何可能会包含值的基础计算后的元素的CSS属性值【返回的是used value,参考[jQuery 源码:操作样式](http://www.cnblogs.com/yaozhiyi/archive/2013/01/22/2868733.html)】
   ###### 浏览器支持如下:
   - 支持:IEchromefirefoxsafari
   - 不支持:IE8-  请用[HTMLElement#currentStyle](/javascript/HTMLElement.html#currentStyle)
     * @param  {HTMLElement} dom 用于计算样式的元素
     * @param  {string}  [pseudoElt]   指定一个伪元素进行匹配。对于常规的元素来说可省略
     * @return {CSSStyleDeclaration}
     */
    getComputedStyle: function(dom,pseudoElt){}

  }
  return exports;
})


text:
class Nanoc::NotificationCenterTest < Nanoc::TestCase

  def test_post
    # Set up notification
    Nanoc::NotificationCenter.on :ping_received, :test do
      @ping_received = true
    end

    # Post
    @ping_received = false
    Nanoc::NotificationCenter.post :ping_received
    assert(@ping_received)
  end

  def test_remove
    # Set up notification
    Nanoc::NotificationCenter.on :ping_received, :test do
      @ping_received = true
    end

    # Remove observer
    Nanoc::NotificationCenter.remove :ping_received, :test

    # Post
    @ping_received = false
    Nanoc::NotificationCenter.post :ping_received
    assert(!@ping_received)
  end

end


text:
\chapter{Advanced Simplification and Induction}

Although we have already learned a lot about simplification and
induction, there are some advanced proof techniques that we have not covered
yet and which are worth learning. The sections of this chapter are
independent of each other and can be read in any order.

\input{simp2.tex}

\section{Advanced Induction Techniques}
\label{sec:advanced-ind}
\index{induction|(}
\input{AdvancedInd.tex}
\input{CTLind.tex}
\index{induction|)}

%\section{Advanced Forms of Recursion}
%\index{recdef@\isacommand {recdef} (command)|(}

%This section introduces advanced forms of
%\isacommand{recdef}: how to establish termination by means other than measure
%functions, how to define recursive functions over nested recursive datatypes
%and how to deal with partial functions.
%
%If, after reading this section, you feel that the definition of recursive
%functions is overly complicated by the requirement of
%totality, you should ponder the alternatives.  In a logic of partial functions,
%recursive definitions are always accepted.  But there are many
%such logics, and no clear winner has emerged. And in all of these logics you
%are (more or less frequently) required to reason about the definedness of
%terms explicitly. Thus one shifts definedness arguments from definition time to
%proof time. In HOL you may have to work hard to define a function, but proofs
%can then proceed unencumbered by worries about undefinedness.

%\subsection{Beyond Measure}
%\label{sec:beyond-measure}
%\input{WFrec.tex}
%
%\subsection{Recursion Over Nested Datatypes}
%\label{sec:nested-recdef}
%\input{Nested0.tex}
%\input{Nested1.tex}
%\input{Nested2.tex}
%
%\subsection{Partial Functions}
%\index{functions!partial}
%\input{Partial.tex}
%
%\index{recdef@\isacommand {recdef} (command)|)}


text:
/* dlarrk.f -- translated by f2c (version 20061008).
   You must link the resulting object file with libf2c:
	on Microsoft Windows system, link with libf2c.lib;
	on Linux or Unix systems, link with .../path/to/libf2c.a -lm
	or, if you install libf2c.a in a standard place, with -lf2c -lm
	-- in that order, at the end of the command line, as in
		cc *.o -lf2c -lm
	Source for libf2c is in /netlib/f2c/libf2c.zip, e.g.,

		http://www.netlib.org/f2c/libf2c.zip
*/

#include "clapack.h"

/* Subroutine */ int dlarrk_(integer *n, integer *iw, doublereal *gl,
	doublereal *gu, doublereal *d__, doublereal *e2, doublereal *pivmin,
	doublereal *reltol, doublereal *w, doublereal *werr, integer *info)
{
    /* System generated locals */
    integer i__1;
    doublereal d__1, d__2;

    /* Builtin functions */
    double log(doublereal);

    /* Local variables */
    integer i__, it;
    doublereal mid, eps, tmp1, tmp2, left, atoli, right;
    integer itmax;
    doublereal rtoli, tnorm;
    extern doublereal dlamch_(char *);
    integer negcnt;

/*  -- LAPACK auxiliary routine (version 3.2) -- */
/*     Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd.. */
/*     November 2006 */

/*     .. Scalar Arguments .. */
/*     .. */
/*     .. Array Arguments .. */
/*     .. */

/*  Purpose */
/*  ======= */

/*  DLARRK computes one eigenvalue of a symmetric tridiagonal */
/*  matrix T to suitable accuracy. This is an auxiliary code to be */
/*  called from DSTEMR. */

/*  To avoid overflow, the matrix must be scaled so that its */
/*  largest element is no greater than overflow**(1/2) * */
/*  underflow**(1/4) in absolute value, and for greatest */
/*  accuracy, it should not be much smaller than that. */

/*  See W. Kahan "Accurate Eigenvalues of a Symmetric Tridiagonal */
/*  Matrix", Report CS41, Computer Science Dept., Stanford */
/*  University, July 21, 1966. */

/*  Arguments */
/*  ========= */

/*  N       (input) INTEGER */
/*          The order of the tridiagonal matrix T.  N >= 0. */

/*  IW      (input) INTEGER */
/*          The index of the eigenvalues to be returned. */

/*  GL      (input) DOUBLE PRECISION */
/*  GU      (input) DOUBLE PRECISION */
/*          An upper and a lower bound on the eigenvalue. */

/*  D       (input) DOUBLE PRECISION array, dimension (N) */
/*          The n diagonal elements of the tridiagonal matrix T. */

/*  E2      (input) DOUBLE PRECISION array, dimension (N-1) */
/*          The (n-1) squared off-diagonal elements of the tridiagonal matrix T. */

/*  PIVMIN  (input) DOUBLE PRECISION */
/*          The minimum pivot allowed in the Sturm sequence for T. */

/*  RELTOL  (input) DOUBLE PRECISION */
/*          The minimum relative width of an interval.  When an interval */
/*          is narrower than RELTOL times the larger (in */
/*          magnitude) endpoint, then it is considered to be */
/*          sufficiently small, i.e., converged.  Note: this should */
/*          always be at least radix*machine epsilon. */

/*  W       (output) DOUBLE PRECISION */

/*  WERR    (output) DOUBLE PRECISION */
/*          The error bound on the corresponding eigenvalue approximation */
/*          in W. */

/*  INFO    (output) INTEGER */
/*          = 0:       Eigenvalue converged */
/*          = -1:      Eigenvalue did NOT converge */

/*  Internal Parameters */
/*  =================== */

/*  FUDGE   DOUBLE PRECISION, default = 2 */
/*          A "fudge factor" to widen the Gershgorin intervals. */

/*  ===================================================================== */

/*     .. Parameters .. */
/*     .. */
/*     .. Local Scalars .. */
/*     .. */
/*     .. External Functions .. */
/*     .. */
/*     .. Intrinsic Functions .. */
/*     .. */
/*     .. Executable Statements .. */

/*     Get machine constants */
    /* Parameter adjustments */
    --e2;
    --d__;

    /* Function Body */
    eps = dlamch_("P");
/* Computing MAX */
    d__1 = abs(*gl), d__2 = abs(*gu);
    tnorm = max(d__1,d__2);
    rtoli = *reltol;
    atoli = *pivmin * 4.;
    itmax = (integer) ((log(tnorm + *pivmin) - log(*pivmin)) / log(2.)) + 2;
    *info = -1;
    left = *gl - tnorm * 2. * eps * *n - *pivmin * 4.;
    right = *gu + tnorm * 2. * eps * *n + *pivmin * 4.;
    it = 0;
L10:

/*     Check if interval converged or maximum number of iterations reached */

    tmp1 = (d__1 = right - left, abs(d__1));
/* Computing MAX */
    d__1 = abs(right), d__2 = abs(left);
    tmp2 = max(d__1,d__2);
/* Computing MAX */
    d__1 = max(atoli,*pivmin), d__2 = rtoli * tmp2;
    if (tmp1 < max(d__1,d__2)) {
	*info = 0;
	goto L30;
    }
    if (it > itmax) {
	goto L30;
    }

/*     Count number of negative pivots for mid-point */

    ++it;
    mid = (left + right) * .5;
    negcnt = 0;
    tmp1 = d__[1] - mid;
    if (abs(tmp1) < *pivmin) {
	tmp1 = -(*pivmin);
    }
    if (tmp1 <= 0.) {
	++negcnt;
    }

    i__1 = *n;
    for (i__ = 2; i__ <= i__1; ++i__) {
	tmp1 = d__[i__] - e2[i__ - 1] / tmp1 - mid;
	if (abs(tmp1) < *pivmin) {
	    tmp1 = -(*pivmin);
	}
	if (tmp1 <= 0.) {
	    ++negcnt;
	}
/* L20: */
    }
    if (negcnt >= *iw) {
	right = mid;
    } else {
	left = mid;
    }
    goto L10;
L30:

/*     Converged or maximum number of iterations reached */

    *w = (left + right) * .5;
    *werr = (d__1 = right - left, abs(d__1)) * .5;
    return 0;

/*     End of DLARRK */

} /* dlarrk_ */


text:
//*******************************************************************************************//
//                                                                                //
// Download Free Evaluation Version From: https://bytescout.com/download/web-installer       //
//                                                                                //
// Also available as Web API! Get Your Free API Key: https://app.pdf.co/signup               //
//                                                                                //
// Copyright © 2017-2020 ByteScout, Inc. All rights reserved.                                //
// https://www.bytescout.com                                                                 //
// https://pdf.co                                                                            //
//                                                                                //
//*******************************************************************************************//

using System;
using System.Collections.Generic;
using System.Diagnostics;
using Bytescout.PDF;

namespace FillFormExample
{
    /// <summary>
    /// This example demonstrates how to fill PDF form programmatically.
    /// </summary>
    class Program
    {
        static void Main()
        {
            // Map of form fields and sample values to set
            Dictionary<string, object> fieldMap = new Dictionary<string, object>()
            {
                               { "f1_01[0]", "John J" }, // FirstName and middle initial
                               { "f1_02[0]", "Smith" }, // LastName
                               { "f1_03[0]", "111-111-3333" }, // Security number
                               { "f1_04[0]", "12 Palm st., Hill Valley" }, // Home address
                               { "f1_05[0]", "CA 12345" }, // City, Town, State and ZIP
                               { "c1_1[1]", "True" }, // Married
                               { "f1_06[0]", "123" }, // Total number of allowance
                               { "f1_07[0]", "443.44" }, // Additional amount
                               { "f1_09[0]", "Google, Somewhere in CA" }, // Employer's name and address
                               { "f1_10[0]", "12-3-2012" }, // First date of employment
                               { "f1_11[0]", "EMP223344" } // Employer identification number
           };

            // Load PDF form
            Document pdfDocument = new Document(@".\W-4.pdf");
            pdfDocument.RegistrationName = "demo";
            pdfDocument.RegistrationKey = "demo";

            // Get first page
            Page page = pdfDocument.Pages[0];

            // Get widget by its name and change value
            foreach (KeyValuePair<string, object> keyValuePair in fieldMap)
            {
                Annotation annotation = page.Annotations[keyValuePair.Key];

                if (annotation is CheckBox)
                {
                    ((CheckBox)annotation).Checked = Convert.ToBoolean(keyValuePair.Value);
                }
                else if (annotation is EditBox)
                {
                    ((EditBox)annotation).Text = (string)keyValuePair.Value;
                }
            }

            // Save modified document
            pdfDocument.Save("result.pdf");

            // Cleanup
            pdfDocument.Dispose();

            // Open result document in default associated application (for demo purpose)
            ProcessStartInfo processStartInfo = new ProcessStartInfo("result.pdf");
            processStartInfo.UseShellExecute = true;
            Process.Start(processStartInfo);
        }
    }
}


text:
<?xml version="1.0" encoding="utf-8"?>
<resources>

    <string name="app_name">UKMaApp</string>
    <string name="title_activity_maps">UKMaApp</string>
    <string name="maps_api_key">AIzaSyDcFhqWsu-uWaze1GYtb-v2lOaTk9jgRUU</string>
    <string name="str_btn_find">Search</string>
    <string name="hnt_et_location">Enter location</string>
    <string name="change_markers">Change Markers</string>

</resources>


text:
define(['modules/default/defaultcontroller'], function(Default) {

	function controller() {};
	controller.prototype = $.extend(true, {}, Default, {

		move: function(x,y) {
			var actions;
			if(!(actions = this.module.vars_out()))
				return;
			for(var i = 0; i < actions.length; i++)
				if(actions[i].event == "onMove") {
					CI.API.setSharedVarFromJPath(actions[i].name, [x,y], actions[i].jpath);
				}
		},

		zoom: function(zoom) {
			var actions;
			if(!(actions = this.module.vars_out()))
				return;
			for(var i = 0; i < actions.length; i++)
				if(actions[i].event == "onZoomChange") {
					CI.API.setSharedVarFromJPath(actions[i].name, zoom, actions[i].jpath);
				}
		},

		configurationSend: {

			events: {

				onMove: {
					label: 'Move',
					description: ''
				},

				onZoomChange: {
					label: 'Changes Zoom',
					description: ''
				}
			},

			rels: {
				'xycoords': {
					label: 'XY Coords',
					description: ''
				},

				'zoom': {
					label: 'Zoom',
					description: ''
				}
			}

		},

		configurationReceive: {
			zoom: {
				type: "number",
				label: 'Zoom',
				description: ''
			},

			xycoords: {
				type: "array",
				label: 'X-Y Coords',
				description: ''
			}
		},

		moduleInformations: {
			moduleName: 'Navigator'
		},

		doConfiguration: function(section) {

			//return true;
		},

		doFillConfiguration: function() {
			return {
				groups: {
				}
			};
		},

		doSaveConfiguration: function(confSection) {

		},

		"export": function() {

		}

	});

	return controller;
});


text:
<?php

namespace Zend\Cloud\StorageService;

interface Exception
{}


text:
/*jshint esnext: true */

class Router {
  constructor($stateProvider, $urlRouterProvider) {

    $stateProvider
      .state('venues', {
        url: '/venues',
        templateUrl: 'venues/venues.html',
        abstract: true
      })
      .state('venues.list', {
        url: '',
        templateUrl: 'venues/venues.list.html',
        controller: 'VenuesController as ctrl'
      });

    $urlRouterProvider.otherwise('/venues');
  }
}

Router.$inject = ['$stateProvider', '$urlRouterProvider'];

export default Router;


text:
from __future__ import (nested_scopes, generators, division, absolute_import, with_statement,
                        print_function, unicode_literals)

from pants_test.pants_run_integration_test import PantsRunIntegrationTest

class TestScalaLibraryIntegrationTest(PantsRunIntegrationTest):
  def test_bundle(self):
    pants_run = self.run_pants(['goal', 'compile', 'testprojects/src/scala/com/pants/testproject/javasources'])
    self.assertEquals(pants_run.returncode, self.PANTS_SUCCESS_CODE,
                      "goal compile expected success, got {0}\n"
                      "got stderr:\n{1}\n"
                      "got stdout:\n{2}\n".format(pants_run.returncode,
                                                  pants_run.stderr_data,
                                                  pants_run.stdout_data))


text:
@implementation STShare

@synthesize timestamp;
@synthesize stdid;
@synthesize md5id;
@synthesize referrer;
@synthesize channel;
@synthesize shortlink;
@synthesize device;
@synthesize app;
@synthesize client;

@end


text:
<RepositoryInfo xmlns="http://csemver.org/schemas/2015">
  <StartingVersionForCSemVer>v2.0.0</StartingVersionForCSemVer>
  <Branches>
    <Branch Name="develop" VersionName="develop" CIVersionMode="LastReleaseBased" />

  </Branches>
  <!--<Debug IgnoreDirtyWorkingFolder="true"/>-->

</RepositoryInfo>


text:
"use strict";
var __importStar = (this && this.__importStar) || function (mod) {
    if (mod && mod.__esModule) return mod;
    var result = {};
    if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];
    result["default"] = mod;
    return result;
};
Object.defineProperty(exports, "__esModule", { value: true });
const experimental_utils_1 = require("@typescript-eslint/experimental-utils");
const util = __importStar(require("../util"));
exports.default = util.createRule({
    name: 'prefer-readonly-parameter-types',
    meta: {
        type: 'suggestion',
        docs: {
            description: 'Requires that function parameters are typed as readonly to prevent accidental mutation of inputs',
            category: 'Possible Errors',
            recommended: false,
            requiresTypeChecking: true,
        },
        schema: [
            {
                type: 'object',
                additionalProperties: false,
                properties: {
                    checkParameterProperties: {
                        type: 'boolean',
                    },
                },
            },
        ],
        messages: {
            shouldBeReadonly: 'Parameter should be a read only type',
        },
    },
    defaultOptions: [
        {
            checkParameterProperties: true,
        },
    ],
    create(context, [{ checkParameterProperties }]) {
        const { esTreeNodeToTSNodeMap, program } = util.getParserServices(context);
        const checker = program.getTypeChecker();
        return {
            [[
                experimental_utils_1.AST_NODE_TYPES.ArrowFunctionExpression,
                experimental_utils_1.AST_NODE_TYPES.FunctionDeclaration,
                experimental_utils_1.AST_NODE_TYPES.FunctionExpression,
                experimental_utils_1.AST_NODE_TYPES.TSCallSignatureDeclaration,
                experimental_utils_1.AST_NODE_TYPES.TSConstructSignatureDeclaration,
                experimental_utils_1.AST_NODE_TYPES.TSDeclareFunction,
                experimental_utils_1.AST_NODE_TYPES.TSEmptyBodyFunctionExpression,
                experimental_utils_1.AST_NODE_TYPES.TSFunctionType,
                experimental_utils_1.AST_NODE_TYPES.TSMethodSignature,
            ].join(', ')](node) {
                for (const param of node.params) {
                    if (!checkParameterProperties &&
                        param.type === experimental_utils_1.AST_NODE_TYPES.TSParameterProperty) {
                        continue;
                    }
                    const actualParam = param.type === experimental_utils_1.AST_NODE_TYPES.TSParameterProperty
                        ? param.parameter
                        : param;
                    const tsNode = esTreeNodeToTSNodeMap.get(actualParam);
                    const type = checker.getTypeAtLocation(tsNode);
                    const isReadOnly = util.isTypeReadonly(checker, type);
                    if (!isReadOnly) {
                        context.report({
                            node: actualParam,
                            messageId: 'shouldBeReadonly',
                        });
                    }
                }
            },
        };
    },
});
//# sourceMappingURL=prefer-readonly-parameter-types.js.map


text:
@import Masonry;
@import OBAKit;

@interface OBAToastView ()
@property(nonatomic,strong,readwrite) UILabel *label;
@property(nonatomic,strong,readwrite) UIButton *button;
@property(nonatomic,strong) UIStackView *stackView;
@property(nonatomic,strong) UIView *containerView;
@end

@implementation OBAToastView

- (instancetype)initWithFrame:(CGRect)frame {
    self = [super initWithFrame:frame];

    if (self) {
        if ([OBATheme useHighContrastUI]) {
            _containerView = [[UIView alloc] initWithFrame:self.bounds];
            _containerView.backgroundColor = [UIColor darkGrayColor];
        }
        else {
            OBAVibrantBlurContainerView *blurView = [[OBAVibrantBlurContainerView alloc] initWithFrame:self.bounds];
            blurView.blurEffectStyle = UIBlurEffectStyleDark;
            _containerView = blurView;
        }
        [self addSubview:_containerView];
        [_containerView mas_makeConstraints:^(MASConstraintMaker *make) {
            make.edges.equalTo(self);
        }];

        self.layer.cornerRadius = [OBATheme defaultCornerRadius];
        self.layer.masksToBounds = YES;

        _label = [[UILabel alloc] initWithFrame:CGRectZero];
        _label.numberOfLines = 0;
        _label.font = [OBATheme bodyFont];
        _label.textColor = [OBATheme darkBlurLabelTextColor];

        _button = [UIButton buttonWithType:UIButtonTypeSystem];
        _button.titleLabel.font = [OBATheme boldBodyFont];
        [_button setTitle:NSLocalizedString(@"toast_view.clear_search", @"Clear Search button text") forState:UIControlStateNormal];

        [_label setContentHuggingPriority:UILayoutPriorityDefaultHigh forAxis:UILayoutConstraintAxisHorizontal];
        [_label setContentCompressionResistancePriority:UILayoutPriorityRequired forAxis:UILayoutConstraintAxisHorizontal];

        [_button setContentHuggingPriority:UILayoutPriorityRequired forAxis:UILayoutConstraintAxisHorizontal];
        [_button setContentCompressionResistancePriority:UILayoutPriorityRequired forAxis:UILayoutConstraintAxisHorizontal];

        _stackView = [[UIStackView alloc] initWithArrangedSubviews:@[_label, _button]];
        _stackView.axis = UILayoutConstraintAxisHorizontal;
        _stackView.spacing = [OBATheme defaultPadding];
        [self.contentView addSubview:_stackView];
        [_stackView mas_makeConstraints:^(MASConstraintMaker *make) {
            make.edges.equalTo([self contentView]).insets(UIEdgeInsetsMake(0, [OBATheme compactPadding], 0, [OBATheme compactPadding]));
        }];

        self.hidden = YES;
        self.alpha = 0;
    }
    return self;
}

- (UIView*)contentView {
    if ([self.containerView isKindOfClass:[OBAVibrantBlurContainerView class]]) {
        return ((OBAVibrantBlurContainerView*)self.containerView).vibrancyEffectView.contentView;
    }
    else {
        return self.containerView;
    }
}

#pragma mark - Hide/Show

- (void)showWithText:(NSString*)text withCancelButton:(BOOL)withCancelButton {
    self.label.text = text;

    self.button.hidden = !withCancelButton;

    if (self.hidden) {
        self.alpha = 0.f;
        self.hidden = NO;

        [OBAAnimation performAnimations:^{
            self.alpha = 1.f;
        }];
    }
}

- (void)dismiss {
    [OBAAnimation performAnimations:^{
        self.alpha = 0.f;
    } completion:^(BOOL finished) {
        self.hidden = YES;
    }];
}

@end


text:
<?php

namespace Drupal\commerce_checkout;

use Drupal\Core\Config\Entity\ConfigEntityListBuilder;
use Drupal\Core\Entity\EntityInterface;

/**
 * Defines the list builder for checkout flows.
 */
class CheckoutFlowListBuilder extends ConfigEntityListBuilder {

  /**
   * {@inheritdoc}
   */
  public function buildHeader() {
    $header['label'] = $this->t('Checkout flow');
    return $header + parent::buildHeader();
  }

  /**
   * {@inheritdoc}
   */
  public function buildRow(EntityInterface $entity) {
    $row['label'] = $entity->label();
    return $row + parent::buildRow($entity);
  }

}


text:
@interface HLAVImagePickerController ()
{
    AVCaptureSession *session;
    AVCaptureStillImageOutput *imageOutput;
}
@end

@implementation HLAVImagePickerController

- (void)dealloc{

}

- (void)viewDidLoad{
    [super viewDidLoad];

    [self installSession];
    [self createCoverUI];
}

- (void)installSession{
    session = [[AVCaptureSession alloc]init];

    //判断分辨率是否支持1280*720,支持就设置为1280*720
    if( [session canSetSessionPreset:AVCaptureSessionPreset1280x720] ) {
        session.sessionPreset = AVCaptureSessionPreset1280x720;
    }

    AVCaptureDevice *device =nil;
    NSArray *cameras = [AVCaptureDevice devicesWithMediaType:AVMediaTypeVideo];

    for(AVCaptureDevice *camera in cameras) {
        if(camera.position == AVCaptureDevicePositionBack) {//取得后置摄像头
            device = camera;
        }
    }

    if(!device) {
        NSLog(@"取得后置摄像头错误");
        return;
    }

    //3.创建输入数据对象
    NSError *error = nil;
    AVCaptureDeviceInput * captureInput = [[AVCaptureDeviceInput alloc] initWithDevice:device error:&error];

    if(error) {
        NSLog(@"创建输入数据对象错误");
        return;
    }

    //4.创建输出数据对象
    imageOutput = [[AVCaptureStillImageOutput alloc] init];
    NSDictionary *setting =@{AVVideoCodecKey:AVVideoCodecJPEG};
    [imageOutput setOutputSettings:setting];

    //5.添加输入数据对象和输出对象到会话中
    if([session canAddInput:captureInput]) {
        [session addInput:captureInput];
    }

    if([session canAddOutput:imageOutput]) {
        [session addOutput:imageOutput];
    }

    //6.创建视频预览图层
    AVCaptureVideoPreviewLayer *videoLayer =
    [[AVCaptureVideoPreviewLayer alloc] initWithSession:session];
    self.view.layer.masksToBounds=YES;
    videoLayer.frame = self.view.bounds;
    videoLayer.videoGravity = AVLayerVideoGravityResizeAspectFill;
    [self.view.layer addSublayer:videoLayer];

    //这里需要设置相机开始捕捉画面
    [session startRunning];//开始捕捉

}

- (void)createCoverUI{
    UIView *contentView = [[UIView alloc]initWithFrame:CGRectMake(0, self.view.frame.size.height-100, self.view.frame.size.width, 100)];
    contentView.backgroundColor = [UIColor clearColor];
    UIButton* cancel = [UIButton buttonWithType:UIButtonTypeCustom];
    cancel.frame = CGRectMake(20, 0, 44, 44);
    cancel.center = CGPointMake(40, CGRectGetHeight(contentView.frame)/2);
    [cancel setImage:[UIImage imageNamed:@"closecamera"]  forState:UIControlStateNormal];
    [cancel addTarget:self action:@selector(cancelCamera:) forControlEvents:UIControlEventTouchUpInside];

    UIButton* takePicture = [UIButton buttonWithType:UIButtonTypeCustom];
    takePicture.frame = CGRectMake(0, 0, 80, 80);
    takePicture.center = CGPointMake(CGRectGetWidth(contentView.frame)/2, CGRectGetHeight(contentView.frame)/2);
    [takePicture setImage:[UIImage imageNamed:@"takepicture"]  forState:UIControlStateNormal];
    [takePicture addTarget:self action:@selector(cameraPhoto:) forControlEvents:UIControlEventTouchUpInside];

    [contentView addSubview:cancel];
    [contentView addSubview:takePicture];
    [self.view addSubview:contentView];
}

- (void)cameraPhoto:(UIButton *)sender{

    // 输出图片
    AVCaptureConnection *connection = [imageOutput connectionWithMediaType:AVMediaTypeVideo];
    if (connection.isVideoOrientationSupported) {
        UIInterfaceOrientation orientation = [UIApplication sharedApplication].statusBarOrientation;
        connection.videoOrientation = (AVCaptureVideoOrientation)orientation;
    }
    id takePictureSuccess = ^(CMSampleBufferRef sampleBuffer,NSError *error){
        if (sampleBuffer == NULL) {
            NSLog(@"获取捕获图片对象错误");
            return ;
        }
        NSData *imageData = [AVCaptureStillImageOutput jpegStillImageNSDataRepresentation:sampleBuffer];
        UIImage *image = [[UIImage alloc]initWithData:imageData];
        if (self.imagePickerBlock) {
            self.imagePickerBlock(imageData ,image);
        }
        [self cancelCamera:sender];
    };
    if (!connection || !connection.enabled || !connection.active) {
        // Raise error here / warn user...
        return;
    }
    [imageOutput captureStillImageAsynchronouslyFromConnection:connection completionHandler:takePictureSuccess];

}

- (void)cancelCamera:(UIButton *)sender{
    [session stopRunning];

    if (![self.navigationController popViewControllerAnimated:YES]) {
        [self dismissViewControllerAnimated:YES completion:nil];
    }
}

@end


text:
This example demonstrates how to build a particle that changes its behavior depending on the charges present around.

				<APPLET
  						CODE="net.particlez.gui.example.MembraneTransportExampleApplet"
  						NAME="Simple applet"
  						WIDTH="520" HEIGHT="210"
  						ARCHIVE = "./target/particlez-0.1-SNAPSHOT.jar,./scala/scala-library.jar,./scala/scala-swing.jar">
							Loading java applet failed. Check your browser settings.
					<PARAM NAME="string"  VALUE="Hello, world ... it's me.   :)">
				</APPLET>

  Imagine given the following particles:

  o - empty placeholder
  f - floating particle, that jumps to the empty placeholder's position located within 1 distance unit away
  e - charge with value -1 and radius 10
  m - charge with value +4 and radius 0
  g - simple compound
  q - block compound, that substitutes e, m, and f particles with o
  u - particle that jumps out from compound q
  d - particle that jumps into compound q

  We are to create a particle that begins to move when e charges appear in the context.

  Such particle would be: g(o, q(g(f, m, u, d, e), o))


text:
<?php
	header( 'Expires: Sat, 26 Jul 1997 05:00:00 GMT' );
	header( 'Last-Modified: ' . gmdate( 'D, d M Y H:i:s' ) . ' GMT' );
	header( 'Cache-Control: no-store, no-cache, must-revalidate' );
	header( 'Cache-Control: post-check=0, pre-check=0', false );
	header( 'Pragma: no-cache' );
?><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">

		<meta http-equiv="content-type" content="text/html; charset=utf-8" />
		<link rel="shortcut icon" type="image/ico" href="http://www.sprymedia.co.uk/media/images/favicon.ico" />

		<title>DataTables unit testing</title>

		<?php
			$aScripts = explode( ":", $_GET['scripts'] );
			for ( $i=0 ; $i<count($aScripts) ; $i++ )
			{
				echo ''."\n";
			}
		?>

				DataTables empty table template

Live example

			Rendering engine
			Browser
			Platform(s)
			Engine version
			CSS grade


text:
package com.vmware.cim.helpers;

import com.vmware.connection.Connection;
import com.vmware.vim25.HostServiceTicket;
import com.vmware.vim25.RuntimeFaultFaultMsg;

import javax.cim.CIMObjectPath;
import javax.security.auth.Subject;
import javax.wbem.WBEMException;
import javax.wbem.client.UserPrincipal;
import javax.wbem.client.WBEMClient;
import javax.wbem.client.WBEMClientFactory;
import java.net.URL;
import java.util.Locale;

/**
 * provides helper functions for getting objects needed to work with CIM related services from the initial vSphere
 * connection. This class is designed to be as stand-alone as possible.
 */
public class GetCim {
    public final static String WBEMCLIENT_FORMAT = "CIM-XML";
    public final static String INTEROP_NAMESPACE = "root/interop";
    public final static String IMPL_NAMESPACE = "root/cimv2";

    /**
     * Namespaces are static per server. You may query available namespaces using a
     * service location protocol (SLP) agent or simply use the hard coded namespaces
     * known to be hard coded onto the ESX and ESXi hosts.
     */
    public final static String[] NAMESPACES = new String[] {INTEROP_NAMESPACE,IMPL_NAMESPACE};

    // these values are immutable so they can be public
    public final Connection connection;
    public final String cimHostname;
    public final GetHost getHost;

    /**
     * if you already constructed a getHost utility use this constructor, appropriate for
     * connecting to a vCenter and a managed host.
     * @param connection
     * @param cimHostname
     * @param getHost
     */
    public GetCim(final Connection connection, final String cimHostname, final GetHost getHost) {
        if(cimHostname == null || "".equals(cimHostname)) {
            throw new GetCimRuntimeFault("The CIM host name was not properly set!");
        }
        this.connection = connection;
        this.cimHostname = cimHostname;
        this.getHost = getHost;
    }

    /**
     * Appropriate for connections that are to a vCenter then to a managed host.
     * @param connection
     * @param cimHostname
     */
    public GetCim(final Connection connection, final String cimHostname) {
        this(connection, cimHostname, new GetHost(connection));
    }

    /**
     * Only appropriate for direct connections to ESX hosts
     * @param connection
     */
    public GetCim(final Connection connection) {
        this(connection,connection.getHost(),new GetHost(connection));
    }

    /**
     * works only for vCenter, this grants us a ticket to access a ESX host controlled by our vCenter
     * @return a valid ticket to use for login
     * @see com.vmware.vim25.HostServiceTicket
     */
    public HostServiceTicket ticket() {
        getHost.vCenterCheck(); // die if not connected to a vCenter server
        HostServiceTicket ticket = null;

        try {

            ticket = connection
                    .connect()
                    .getVimPort()
                    .acquireCimServicesTicket(
                            getHost.byName(cimHostname)
                    );

        } catch (Throwable t) {
            throw new GetCimRuntimeFault(t);
        }

        return ticket;
    }

    /**
     * Note base + namespace must make sense. There are various formula for creating a valid CIMObjectPath
     * ultimately, these are URI when represented in string form.
     *
     * @param base
     * @param namespace
     * @return object path representing the query
     * @see javax.cim.CIMObjectPath
     */
    public CIMObjectPath baseObjectPath(final URL base, final String namespace) {
        return new CIMObjectPath(base.toString() + namespace);
    }

    /**
     * builds a CIMObjectPath based on URI elements
     * @param base - base URL of the CIM server
     * @param namespace - namespace to read
     * @param cimclassname - name of the class to look at
     * @return fully constructed but CIMObjectPath (will not have properties since it was locally constructed)
     * @see javax.cim.CIMObjectPath
     */
    public CIMObjectPath objectPath(final URL base, final String namespace, final String cimclassname) {
        return new CIMObjectPath(base.toString() + namespace + ":" + cimclassname);
    }

    /**
     * Creates a web client using the HostServiceTicket object.
     *

     * NOTE: you must be connected to a vCenter for this to make sense
     * @param ticket granted by vCenter
     * @param path the initial path for the client to talk to
     * @return a WBEMClient
     * @see javax.wbem.client.WBEMClient
     */
    public WBEMClient client(final HostServiceTicket ticket, final CIMObjectPath path) {
        return client(
                ticket.getSessionId(), // use sessionId as username
                ticket.getSessionId(), // use sessionId as password
                path
        );
    }

    /**
     * Creates a web client using username, password, and a path
     * @param username
     * @param password
     * @param path
     * @return a web client
     * @see javax.wbem.client.WBEMClient
     */
    public WBEMClient client(final String username, final String password, final CIMObjectPath path) {
        return client(subject(username, password), path);
    }

    /**
     * @see javax.wbem.client.WBEMClient
     * @param subject - a security subject built for authentication on the CIM server
     * @param path    - initial search path
     * @return a client ready to work with CIM data
     * @throws GetCimWBEMException if we cannot initialize the client
     */
    public WBEMClient client(final Subject subject, final CIMObjectPath path) {
        WBEMClient client = WBEMClientFactory.getClient(WBEMCLIENT_FORMAT);

        try {

            client.initialize(path, subject, new Locale[]{new Locale("en")});

        } catch (WBEMException e) {
            throw new GetCimWBEMException(e);
        }

        return client;
    }

    /**
     * creates a web client using all string based parameters
     * @param username
     * @param password
     * @param url
     * @param namespace
     * @param path
     * @return a web client
     * @see javax.wbem.client.WBEMClient
     */
    public WBEMClient client(final String username, final String password, final URL url, final String namespace, final String path) {
        return client(subject(username, password), url, namespace, path);
    }

    /**
     * creates a web client from a ticket, a URL, and a namespace and classname to query
     * @param ticket
     * @param url
     * @param namespace
     * @param classname
     * @return a web client
     * @see javax.wbem.client.WBEMClient
     */
    public WBEMClient client(final HostServiceTicket ticket, final URL url, final String namespace, final String classname) {
        return client(subject(ticket), url, namespace, classname);
    }

    /**
     * if you know how to build your own security subject, use this method instead
     * @param subject
     * @param url
     * @param namespace
     * @param classname
     * @return a client
     * @see javax.wbem.client.WBEMClient
     */
    public WBEMClient client(final Subject subject, final URL url, final String namespace, final String classname) {
        return client(subject, objectPath(url, namespace, classname));
    }

    /**
     * A subject is an authentication construct. The vSphere API allows you to obtain a ticket
     * from the vSphere SDK and use that ticket to construct a subject based on it.
     *

     * @see javax.wbem.client.WBEMClient
     * @see javax.security.auth.Subject
     * @return the subject built with the ticket for use in WBEMClient
     */
    public Subject subject(final HostServiceTicket ticket) {
        return subject(ticket.getSessionId(), ticket.getSessionId());
    }

    /**
     * Builds a security subject object based on the principal name and credential you pass.
     *

     * @param principal
     * @param passwordCredential
     * @return a subject for use in the WBEMClient
     */
    public Subject subject(final String principal, final String passwordCredential) {
        final Subject subject = new Subject();

        subject
                .getPrincipals()
                .add(
                        new UserPrincipal(principal)
                );

        subject
                .getPrivateCredentials()
                .add(
                        new GetCim.PasswordCredential(passwordCredential)
                );

        return subject;

    }

    public WBEMClient client(HostServiceTicket ticket, URL baseUrl, String namespace) {
        return client(ticket,baseObjectPath(baseUrl,namespace));
    }

    public WBEMClient client(String username, String password, URL baseUrl, String namespace) {
        return client(subject(username,password),baseObjectPath(baseUrl,namespace));
    }

    /**
     * thrown whenever the GetCim helper can't resolve an issue on it's own all exceptions originating from this class
     * are based on this parent exception.
     */
    private class GetCimException extends RuntimeException {
		private static final long serialVersionUID = 1L;
		public GetCimException(Throwable t) {
            super(t);
        }

        public GetCimException(String message) {
            super(message);
        }
    }

    /**
     * Thrown when there was an issue in WBEMClient initialization that was not easily conveyed to a method signature
     */
    private class GetCimWBEMException extends GetCimException {
		private static final long serialVersionUID = 1L;
        public GetCimWBEMException(WBEMException e) {
            super(e);
        }
    }

    /**
     * thrown when the WBEMClient throws an exception we can't deal with locally and need to pass the fault to the user.
     */
    private class GetCimRuntimeFault extends GetCimException {
		private static final long serialVersionUID = 1L;
        public GetCimRuntimeFault(Throwable cause) {
            super(cause);
        }

        public GetCimRuntimeFault(String message) {
            super(message);
        }
    }

    /**
     * The default PasswordCredential will prevent us from using sessionId's that
     * can be over 16 characters in length. Instead use  inheritance to force
     * the PasswordCredential class to hold values longer than 16 chars.
     *

     * @see javax.wbem.client.PasswordCredential
     */
    public static class PasswordCredential extends javax.wbem.client.PasswordCredential {
        private final String longPassword;
        public PasswordCredential(String userPassword) {
            super("fake password"); // the parent class' password is ignored
            longPassword = userPassword;
        }
        @Override
        public char[] getUserPassword() {
            return longPassword.toCharArray(); // use our long password instead
        }
    }
}