text:
'use strict';

// Method for formatting HTTP body for the multipart/form-data specification
// Mostly taken from Fermata.js
// https://github.com/natevw/fermata/blob/5d9732a33d776ce925013a265935facd1626cc88/fermata.js#L315-L343
function multipartDataGenerator(method, data, headers) {
  var segno = (Math.round(Math.random() * 1e16) + Math.round(Math.random() * 1e16)).toString();
  headers['Content-Type'] = ('multipart/form-data; boundary=' + segno);
  var buffer = new Buffer(0);

  function push(l) {
    var prevBuffer = buffer;
    var newBuffer = (l instanceof Buffer) ? l : new Buffer(l);
    buffer = new Buffer(prevBuffer.length + newBuffer.length + 2);
    prevBuffer.copy(buffer);
    newBuffer.copy(buffer, prevBuffer.length);
    buffer.write('\r\n', buffer.length - 2);
  }

  function q(s) {
    return '"' + s.replace(/"|"/g, '%22').replace(/\r\n|\r|\n/g, ' ') + '"';
  }

  for (var k in data) {
    var v = data[k];
    push('--' + segno);
    if (v.hasOwnProperty('data')) {
      push('Content-Disposition: form-data; name=' + q(k) + '; filename=' + q(v.name || 'blob'));
      push('Content-Type: ' + (v.type || 'application/octet-stream'));
      push('');
      push(v.data);
    } else {
      push('Content-Disposition: form-data; name=' + q(k));
      push('');
      push(v);
    }
  };
  push('--' + segno + '--');

  return buffer;
};

module.exports = multipartDataGenerator;

redpajama_set_name: RedPajamaGithub


text:
package com.msxf.sso.controller;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;

public class wxRegisterServlet extends HttpServlet {

	private static final long serialVersionUID = -7964338058818609226L;
	protected void doGet(HttpServletRequest request,HttpServletResponse response)throws ServletException{
		try {
			request.getRequestDispatcher("/WEB-INF/view/jsp/msxf/ui/register/wxRegister.jsp").forward(request, response);
		} catch (IOException e) {
			e.printStackTrace();
		}
    }

	protected void doPost(HttpServletRequest request,HttpServletResponse response)throws ServletException{
		  doGet(request,response);
	}
}


text:
from __future__ import unicode_literals

from django.db import migrations, models
import oscar.models.fields.autoslugfield
import datetime
import jsonfield.fields
import django.db.models.deletion
from django.conf import settings

def load_hook_signals(apps, schema_editor):
    HookSignalType = apps.get_model('hooks', 'HookSignalType')

    product_viewed = HookSignalType(id=1, name='product_viewed')
    product_viewed.save()

    # user_search = HookSignalType(id=2, name='user_search')
    # user_search.save()

    user_registered = HookSignalType(id=3, name='user_registered')
    user_registered.save()
    #
    # basket_addition = HookSignalType(id=4, name='basket_addition')
    # basket_addition.save()
    #
    # voucher_addition = HookSignalType(id=5, name='voucher_addition')
    # voucher_addition.save()
    #
    # start_checkout = HookSignalType(id=6, name='start_checkout')
    # start_checkout.save()
    #
    # pre_payment = HookSignalType(id=7, name='pre_payment')
    # pre_payment.save()
    #
    # post_payment = HookSignalType(id=8, name='post_payment')
    # post_payment.save()

    order_placed = HookSignalType(id=9, name='order_placed')
    order_placed.save()

    # post_checkout = HookSignalType(id=10, name='post_checkout')
    # post_checkout.save()
    #
    # review_added = HookSignalType(id=11, name='review_added')
    # review_added.save()

class Migration(migrations.Migration):

    dependencies = [
        ('catalogue', '__first__'),
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
    ]

    operations = [
        migrations.CreateModel(
            name='Hook',
            fields=[
                ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
                ('name', models.CharField(max_length=128, verbose_name='Name')),
                ('error_report_email', models.EmailField(default=b'', max_length=254, verbose_name='Error Report Email')),
                ('slug', oscar.models.fields.autoslugfield.AutoSlugField(populate_from=b'name', verbose_name='Slug', max_length=255, editable=False, blank=True)),
                ('description', models.TextField(null=True, verbose_name='Description', blank=True)),
                ('date_created', models.DateTimeField(default=datetime.datetime.now, null=True, verbose_name='Date created')),
                ('date_updated', models.DateTimeField(default=datetime.datetime.now, null=True, verbose_name='Date updated', db_index=True)),
                ('event_count', models.PositiveSmallIntegerField(default=0, verbose_name='HookEvent Count')),
                ('product_class', models.ForeignKey(related_name='Product.product_class+', on_delete=django.db.models.deletion.PROTECT, blank=True, to='catalogue.ProductClass', help_text='Choose what type of product this is', null=True, verbose_name='Product type')),
                ('user', models.ForeignKey(related_name='hookClasses', verbose_name='User', blank=True, to=settings.AUTH_USER_MODEL, null=True)),
            ],
            options={
                'ordering': ['-date_created'],
                'abstract': False,
                'verbose_name': 'Hook',
                'verbose_name_plural': 'Hook',
            },
        ),
        migrations.CreateModel(
            name='HookEvent',
            fields=[
                ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
                ('URL', models.URLField(blank=True)),
                ('extra_headers', jsonfield.fields.JSONField(default={})),
                ('hook', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, verbose_name='Hook', blank=True, to='hooks.Hook', null=True)),
            ],
            options={
                'abstract': False,
                'verbose_name': 'Hook URL',
            },
        ),
        migrations.CreateModel(
            name='HookLog',
            fields=[
                ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
                ('signal_type', models.CharField(max_length=40, verbose_name='Signal Type')),
                ('data', models.TextField(verbose_name='Data')),
                ('headers', jsonfield.fields.JSONField(default=dict, verbose_name='Headers')),
                ('request_url', models.URLField(verbose_name='Request Url', blank=True)),
                ('response', jsonfield.fields.JSONField(default=dict, verbose_name='Response')),
                ('status', models.IntegerField(null=True, verbose_name='Status')),
                ('retry', models.IntegerField(default=0, verbose_name='Retry Count')),
                ('error_message', models.TextField(null=True, verbose_name='Error Message', blank=True)),
                ('date_created', models.DateTimeField(default=datetime.datetime.now, null=True, verbose_name='Date created')),
                ('hook_event', models.ForeignKey(verbose_name='Hook Event', blank=True, to='hooks.HookEvent', null=True)),
            ],
            options={
                'ordering': ['-date_created'],
                'abstract': False,
                'verbose_name': 'HookLog',
                'verbose_name_plural': 'HookLog',
            },
        ),
        migrations.CreateModel(
            name='HookSignalType',
            fields=[
                ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
                ('name', models.CharField(max_length=30)),
            ],
            options={
                'abstract': False,
                'verbose_name': 'Hook Signal',
                'verbose_name_plural': 'Hook Signals',
            },
        ),
        migrations.AddField(
            model_name='hookevent',
            name='signal_type',
            field=models.ForeignKey(verbose_name='Signal Type', blank=True, to='hooks.HookSignalType', null=True),
        ),
        migrations.AlterUniqueTogether(
            name='hookevent',
            unique_together=set([('hook', 'signal_type')]),
        ),
        migrations.RunPython(load_hook_signals)
    ]


text:
<?php

namespace Jcupitt\Vips;

use Psr\Log\LoggerInterface;
use Psr\Log\LoggerTrait;

const LOG_FORMAT = "[%datetime%] %level_name%: %message% %context%\n";
const DATE_FORMAT = "Y-m-d\TH:i:sP";

/**
 * A simple logger, handy for debugging. See Main::setLogger().
 *
 * @category  Images
 * @package   Jcupitt\Vips
 * @author    John Cupitt <jcupitt@gmail.com>
 * @copyright 2016 John Cupitt
 * @license   https://opensource.org/licenses/MIT MIT
 * @link      https://github.com/jcupitt/php-vips
 */
class DebugLogger implements LoggerInterface
{
    // Use the LoggerTrait so that we only have to implement the generic
    // log method.
    use LoggerTrait;

    /**
     * Logs with an arbitrary level.
     *
     * @param mixed  $level
     * @param string $message
     * @param array  $context
     *
     * @return void
     */
    public function log($level, $message, array $context = [])
    {
        // `Vips\Image` to string convert
        array_walk_recursive($context, function (&$value) {
            if ($value instanceof Image) {
                $value = (string) $value;
            }
        });

        $strParams = [
            '%datetime%' => date(DATE_FORMAT),
            '%level_name%' => $level,
            '%message%' => $message,
            '%context%' => json_encode(
                $context,
                JSON_UNESCAPED_SLASHES |
                JSON_UNESCAPED_UNICODE |
                JSON_PRESERVE_ZERO_FRACTION
            ),
        ];

        echo strtr(LOG_FORMAT, $strParams);
    }
}

/*
 * Local variables:
 * tab-width: 4
 * c-basic-offset: 4
 * End:
 * vim600: expandtab sw=4 ts=4 fdm=marker
 * vim<600: expandtab sw=4 ts=4
 */


text:
package com.hazelcast.simulator.utils;

import org.junit.Test;

import static com.hazelcast.simulator.utils.PropertyBindingSupport.bindProperty;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNull;

public class PropertyBindingSupport_bindProperty_NumericalTest {

    private final BindPropertyTestClass bindPropertyTestClass = new BindPropertyTestClass();

    @Test
    public void bindProperty_byte() {
        bindProperty(bindPropertyTestClass, "byteField", "10");
        assertEquals(10, bindPropertyTestClass.byteField);
    }

    @Test
    public void bindProperty_byte_whitespace() {
        bindProperty(bindPropertyTestClass, "byteField", " 10 ");
        assertEquals(10, bindPropertyTestClass.byteField);
    }

    @Test
    public void bindProperty_Byte() {
        bindProperty(bindPropertyTestClass, "byteObjectField", "null");
        assertNull(bindPropertyTestClass.byteObjectField);

        bindProperty(bindPropertyTestClass, "byteObjectField", "10");
        assertEquals(new Byte("10"), bindPropertyTestClass.byteObjectField);
    }

    @Test(expected = BindException.class)
    public void bindProperty_Byte_invalid() {
        bindProperty(bindPropertyTestClass, "byteObjectField", "invalid");
    }

    @Test
    public void bindProperty_short() {
        bindProperty(bindPropertyTestClass, "shortField", "10");
        assertEquals(10, bindPropertyTestClass.shortField);
    }

    @Test
    public void bindProperty_short_whitespace() {
        bindProperty(bindPropertyTestClass, "shortField", " 10");
        assertEquals(10, bindPropertyTestClass.shortField);
    }

    @Test
    public void bindProperty_Short() {
        bindProperty(bindPropertyTestClass, "shortObjectField", "null");
        assertNull(bindPropertyTestClass.shortObjectField);

        bindProperty(bindPropertyTestClass, "shortObjectField", "10");
        assertEquals(new Short("10"), bindPropertyTestClass.shortObjectField);
    }

    @Test(expected = BindException.class)
    public void bindProperty_Short_invalid() {
        bindProperty(bindPropertyTestClass, "shortObjectField", "invalid");
    }

    @Test
    public void bindProperty_int() {
        bindProperty(bindPropertyTestClass, "intField", "10");
        assertEquals(10, bindPropertyTestClass.intField);
    }

    @Test
    public void bindProperty_int_whitespace() {
        bindProperty(bindPropertyTestClass, "intField", "10\n");
        assertEquals(10, bindPropertyTestClass.intField);
    }

    @Test
    public void bindProperty_Integer() {
        bindProperty(bindPropertyTestClass, "integerField", "null");
        assertNull(bindPropertyTestClass.integerField);

        bindProperty(bindPropertyTestClass, "integerField", "10");
        assertEquals(new Integer(10), bindPropertyTestClass.integerField);
    }

    @Test(expected = BindException.class)
    public void bindProperty_Integer_invalid() {
        bindProperty(bindPropertyTestClass, "integerObjectField", "invalid");
    }

    @Test
    public void bindProperty_long() {
        bindProperty(bindPropertyTestClass, "longField", "1234567890123");
        assertEquals(1234567890123L, bindPropertyTestClass.longField);
    }

    @Test
    public void bindProperty_Long() {
        bindProperty(bindPropertyTestClass, "longObjectField", "null");
        assertNull(bindPropertyTestClass.longObjectField);

        bindProperty(bindPropertyTestClass, "longObjectField", "1234567890123");
        assertEquals(new Long("1234567890123"), bindPropertyTestClass.longObjectField);
    }

    @Test(expected = BindException.class)
    public void bindProperty_Long_invalid() {
        bindProperty(bindPropertyTestClass, "longObjectField", "invalid");
    }

    @Test
    public void bindProperty_float() {
        bindProperty(bindPropertyTestClass, "floatField", "23.42");
        assertEquals(23.42f, bindPropertyTestClass.floatField, 0.01);
    }

    @Test
    public void bindProperty_Float() {
        bindProperty(bindPropertyTestClass, "floatObjectField", "null");
        assertNull(bindPropertyTestClass.floatObjectField);

        bindProperty(bindPropertyTestClass, "floatObjectField", "23.42");
        assertEquals(new Float(23.42f), bindPropertyTestClass.floatObjectField);
    }

    @Test(expected = BindException.class)
    public void bindProperty_Float_invalid() {
        bindProperty(bindPropertyTestClass, "floatObjectField", "invalid");
    }

    @Test
    public void bindProperty_double() {
        bindProperty(bindPropertyTestClass, "doubleField", "23420000000000.2342");
        assertEquals(23420000000000.2342d, bindPropertyTestClass.doubleField, 0.0001);
    }

    @Test
    public void bindProperty_Double() {
        bindProperty(bindPropertyTestClass, "doubleObjectField", "null");
        assertNull(bindPropertyTestClass.doubleObjectField);

        bindProperty(bindPropertyTestClass, "doubleObjectField", "23420000000000.2342");
        assertEquals(new Double(23420000000000.2342d), bindPropertyTestClass.doubleObjectField);
    }

    @Test(expected = BindException.class)
    public void bindProperty_Double_invalid() {
        bindProperty(bindPropertyTestClass, "doubleObjectField", "invalid");
    }

    @SuppressWarnings("unused")
    private class BindPropertyTestClass {

        public byte byteField;
        public Byte byteObjectField;

        public short shortField;
        public Short shortObjectField;

        public int intField;
        public Integer integerField;

        public long longField;
        public Long longObjectField;

        public float floatField;
        public Float floatObjectField;

        public double doubleField;
        public Double doubleObjectField;
    }
}


text:
.. _example_singlecell_simulation050:

Example 11. Demonstrate using NEURON mod files directly in a simulation
=======================================================================

Demonstrate using NEURON mod files directly in a simulation
We run two simulations, using 2 slightly different mod files, and plot the membrane voltage seen.

Code
~~~~

.. code-block:: python

    from morphforge.stdimports import *
    from morphforgecontrib.simulation.channels.exisitingmodfile.core import SimulatorSpecificChannel

    def build_simulation(modfilename):
        # Create the morphology for the cell:
        morphDict1 = {'root': {'length': 20, 'diam': 20, 'id':'soma'} }
        m1 = MorphologyTree.fromDictionary(morphDict1)

        # Create the environment:
        env = NEURONEnvironment()

        # Create the simulation:
        sim = env.Simulation()
        cell = sim.create_cell(morphology=m1)

        modChls = env.Channel(SimulatorSpecificChannel, modfilename=modfilename)

        # Apply the mechanisms to the cells
        cell.apply_channel( modChls)

        sim.record(cell, what=StandardTags.Voltage, name="SomaVoltage", cell_location = cell.soma, description='Membrane Voltage')
        sim.create_currentclamp(name="Stim1", amp=qty("200:pA"), dur=qty("100:ms"), delay=qty("100:ms"), cell_location=cell.soma)

        results = sim.run()
        return results

    mod3aFilename = Join(LocMgr.get_test_mods_path(), "exampleChannels3a.mod")
    results3a = build_simulation(mod3aFilename)

    mod3bFilename = Join(LocMgr.get_test_mods_path(), "exampleChannels3b.mod")
    results3b = build_simulation(mod3bFilename)

    TagViewer([results3a, results3b], timerange=(95, 200)*units.ms)

    try:
        import os
        print 'Differences between the two mod files:'
        os.system("diff %s %s"%(mod3aFilename, mod3bFilename))
    except:
        print "<Can't run 'diff', so can't show differences!>"

Figures
~~~~~~~~

.. figure:: /srcs_generated_examples/images/singlecell_simulation050_out1.png
    :width: 3in
    :figwidth: 4in

    Download :download:`Figure </srcs_generated_examples/images/singlecell_simulation050_out1.png>`

Output
~~~~~~

.. code-block:: bash

        No handlers could be found for logger "neurounits"
    2013-12-01 17:11:18,167 - morphforge.core.logmgr - INFO - Logger Started OK
    2013-12-01 17:11:18,168 - DISABLEDLOGGING - INFO - _run_spawn() [Pickling Sim]
    No handlers could be found for logger "neurounits"
    2013-12-01 17:11:20,153 - morphforge.core.logmgr - INFO - Logger Started OK
    2013-12-01 17:11:20,154 - DISABLEDLOGGING - INFO - Ensuring Modfile is built
    NEURON -- Release 7.3 (869:0141cf0aff14) 2013-05-10
    Duke, Yale, and the BlueBrain Project -- Copyright 1984-2013
    See http://www.neuron.yale.edu/neuron/credits

    ['DBUS_SESSION_BUS_ADDRESS', 'DEFAULTS_PATH', 'DESKTOP_SESSION', 'DESKTOP_STARTUP_ID', 'DISPLAY', 'GDMSESSION', 'GNOME_KEYRING_CONTROL', 'GNOME_KEYRING_PID', 'GREP_COLOR', 'GREP_OPTIONS', 'GRIN_ARGS', 'GTK_MODULES', 'HOME', 'INFANDANGO_CONFIGFILE', 'INFANDANGO_ROOT', 'LANG', 'LANGUAGE', 'LC_CTYPE', 'LD_LIBRARY_PATH', 'LESS', 'LOGNAME', 'LSCOLORS', 'MANDATORY_PATH', 'MREORG_CONFIG', 'OLDPWD', 'PAGER', 'PATH', 'PWD', 'PYTHONPATH', 'SHELL', 'SHLVL', 'SSH_AGENT_PID', 'SSH_AUTH_SOCK', 'TERM', 'TEXTDOMAIN', 'TEXTDOMAINDIR', 'UBUNTU_MENUPROXY', 'USER', 'WINDOWID', 'XAUTHORITY', 'XDG_CONFIG_DIRS', 'XDG_DATA_DIRS', 'XDG_RUNTIME_DIR', 'XDG_SEAT_PATH', 'XDG_SESSION_COOKIE', 'XDG_SESSION_PATH', 'XTERM_LOCALE', 'XTERM_SHELL', 'XTERM_VERSION', '_', '_JAVA_AWT_WM_NONREPARENTING']
    Loading Bundle from: /mnt/scratch/tmp/morphforge/tmp/simulationresults/20/2007868be371f03d6c270907ca8fb379.bundle (11k) : 0.828 seconds
    loading membrane mechanisms from /mnt/scratch/tmp/morphforge/tmp/modout/mod_b9e50529a8d1f686ed3955884ae081fa.so
    Running Hoc File: /mnt/scratch/tmp/morphforge/tmp/tmp_0b471241e9da39b7cf3360eac4bafab3.hoc
    	1
    	1
    	0.01
    	0
    	1
    	50000
    	1
    Running Simulation
    Time for Extracting Data: (1 records) 0.00195908546448
    Running simulation : 0.312 seconds
    Size of results file: 0.1 (MB)
    Post-processing : 0.007 seconds
    Entire load-run-save time : 1.147 seconds
    Suceeded
    No handlers could be found for logger "neurounits"
    2013-12-01 17:11:22,715 - morphforge.core.logmgr - INFO - Logger Started OK
    2013-12-01 17:11:22,715 - DISABLEDLOGGING - INFO - Ensuring Modfile is built
    NEURON -- Release 7.3 (869:0141cf0aff14) 2013-05-10
    Duke, Yale, and the BlueBrain Project -- Copyright 1984-2013
    See http://www.neuron.yale.edu/neuron/credits

    ['DBUS_SESSION_BUS_ADDRESS', 'DEFAULTS_PATH', 'DESKTOP_SESSION', 'DESKTOP_STARTUP_ID', 'DISPLAY', 'GDMSESSION', 'GNOME_KEYRING_CONTROL', 'GNOME_KEYRING_PID', 'GREP_COLOR', 'GREP_OPTIONS', 'GRIN_ARGS', 'GTK_MODULES', 'HOME', 'INFANDANGO_CONFIGFILE', 'INFANDANGO_ROOT', 'LANG', 'LANGUAGE', 'LC_CTYPE', 'LD_LIBRARY_PATH', 'LESS', 'LOGNAME', 'LSCOLORS', 'MANDATORY_PATH', 'MREORG_CONFIG', 'OLDPWD', 'PAGER', 'PATH', 'PWD', 'PYTHONPATH', 'SHELL', 'SHLVL', 'SSH_AGENT_PID', 'SSH_AUTH_SOCK', 'TERM', 'TEXTDOMAIN', 'TEXTDOMAINDIR', 'UBUNTU_MENUPROXY', 'USER', 'WINDOWID', 'XAUTHORITY', 'XDG_CONFIG_DIRS', 'XDG_DATA_DIRS', 'XDG_RUNTIME_DIR', 'XDG_SEAT_PATH', 'XDG_SESSION_COOKIE', 'XDG_SESSION_PATH', 'XTERM_LOCALE', 'XTERM_SHELL', 'XTERM_VERSION', '_', '_JAVA_AWT_WM_NONREPARENTING']
    Loading Bundle from: /mnt/scratch/tmp/morphforge/tmp/simulationresults/b1/b1363a8e60c10cd92c6ee878e802fcf9.bundle (11k) : 0.844 seconds
    loading membrane mechanisms from /mnt/scratch/tmp/morphforge/tmp/modout/mod_5e54856fc3939091ebcff35b32cc9ab3.so
    Running Hoc File: /mnt/scratch/tmp/morphforge/tmp/tmp_5088290ab0782eb50e572e2dfe44dba8.hoc
    	1
    	1
    	0.01
    	0
    	1
    	50000
    	1
    Running Simulation
    Time for Extracting Data: (1 records) 0.00190591812134
    Running simulation : 0.330 seconds
    Size of results file: 0.1 (MB)
    Post-processing : 0.007 seconds
    Entire load-run-save time : 1.181 seconds
    Suceeded
    15c15
    <         SUFFIX exampleChannels3a
    ---
    >         SUFFIX exampleChannels3b
    28c28
    <         el = -64.3 (mV)
    ---
    >         el = -44.3 (mV)
    ['DBUS_SESSION_BUS_ADDRESS', 'DEFAULTS_PATH', 'DESKTOP_SESSION', 'DESKTOP_STARTUP_ID', 'DISPLAY', 'GDMSESSION', 'GNOME_KEYRING_CONTROL', 'GNOME_KEYRING_PID', 'GREP_COLOR', 'GREP_OPTIONS', 'GRIN_ARGS', 'GTK_MODULES', 'HOME', 'INFANDANGO_CONFIGFILE', 'INFANDANGO_ROOT', 'LANG', 'LANGUAGE', 'LC_CTYPE', 'LESS', 'LOGNAME', 'LSCOLORS', 'MANDATORY_PATH', 'MREORG_CONFIG', 'OLDPWD', 'PAGER', 'PATH', 'PWD', 'PYTHONPATH', 'SHELL', 'SHLVL', 'SSH_AGENT_PID', 'SSH_AUTH_SOCK', 'TERM', 'TEXTDOMAIN', 'TEXTDOMAINDIR', 'UBUNTU_MENUPROXY', 'USER', 'WINDOWID', 'XAUTHORITY', 'XDG_CONFIG_DIRS', 'XDG_DATA_DIRS', 'XDG_RUNTIME_DIR', 'XDG_SEAT_PATH', 'XDG_SESSION_COOKIE', 'XDG_SESSION_PATH', 'XTERM_LOCALE', 'XTERM_SHELL', 'XTERM_VERSION', '_', '_JAVA_AWT_WM_NONREPARENTING']
    _run_spawn() [Loading results from /mnt/scratch/tmp/morphforge/tmp/simulationresults/20//2007868be371f03d6c270907ca8fb379.neuronsim.results.pickle ]
    _run_spawn() [Loading results from /mnt/scratch/tmp/morphforge/tmp/simulationresults/b1//b1363a8e60c10cd92c6ee878e802fcf9.neuronsim.results.pickle ]
    PlotManger saving:  _output/figures/singlecell_simulation050/{png,svg}/fig000_Autosave_figure_1.{png,svg}
    Differences between the two mod files:


text:
// Copyright 2021 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

import 'chrome://os-settings/strings.m.js';
import 'chrome://resources/cr_components/chromeos/network/sim_lock_dialogs.js';

import {MojoInterfaceProviderImpl} from 'chrome://resources/cr_components/chromeos/network/mojo_interface_provider.js';
import {OncMojo} from 'chrome://resources/cr_components/chromeos/network/onc_mojo.js';
import {flush} from 'chrome://resources/polymer/v3_0/polymer/polymer_bundled.min.js';
import {FakeNetworkConfig} from 'chrome://test/chromeos/fake_network_config_mojom.js';

suite('NetworkSimLockDialogsTest', function() {
  let simLockDialog;
  let unlockPinDialog;

  /** @type {?chromeos.networkConfig.mojom.CrosNetworkConfigRemote} */
  let networkConfigRemote_ = null;

  setup(function() {
    networkConfigRemote_ = new FakeNetworkConfig();
    MojoInterfaceProviderImpl.getInstance().remote_ = networkConfigRemote_;

    simLockDialog = document.createElement('sim-lock-dialogs');
    simLockDialog.deviceState = {};
    document.body.appendChild(simLockDialog);
    flush();
  });

  async function flushAsync() {
    flush();
    // Use setTimeout to wait for the next macrotask.
    return new Promise(resolve => setTimeout(resolve));
  }

  /**
   * Utility function used to check if a dialog with name |dialogName|
   * can be opened by setting the device state to |deviceState|.
   * @param {string} dialogName
   * @param {OncMojo.DeviceStateProperties} deviceState
   */
  async function verifyDialogShown(dialogName, deviceState) {
    const dialog = simLockDialog.$$(`#${dialogName}`);
    assertTrue(!!dialog);
    assertFalse(dialog.open);
    simLockDialog.deviceState = deviceState;
    await flushAsync();
    assertTrue(dialog.open);
  }

  test('Show Enter pin dialog', async function() {
    const deviceState = {
      simLockStatus: {lockEnabled: false, lockType: '', retriesLeft: 3},
    };
    verifyDialogShown('enterPinDialog', deviceState);
  });

  test('Show Change PIN dialog', async function() {
    const deviceState = {
      simLockStatus: {lockEnabled: true, lockType: '', retriesLeft: 3},
    };
    simLockDialog.showChangePin = true;
    verifyDialogShown('changePinDialog', deviceState);
  });

  test('Show Unlock PIN dialog', async function() {
    const deviceState = {
      simLockStatus: {lockEnabled: true, lockType: 'sim-pin', retriesLeft: 3},
    };
    verifyDialogShown('unlockPinDialog', deviceState);
    assertFalse(!!simLockDialog.$$(`#adminSubtitle`));
    simLockDialog.globalPolicy = {
      allowCellularSimLock: false,
    };
    await flushAsync();
    assertTrue(!!simLockDialog.$$(`#adminSubtitle`));
  });

  test('Show Unlock PUK dialog', async function() {
    const deviceState = {
      simLockStatus: {lockEnabled: true, lockType: 'sim-puk', retriesLeft: 3},
    };
    verifyDialogShown('unlockPukDialog', deviceState);

    assertFalse(simLockDialog.$.unlockPin1.hidden);
    assertFalse(simLockDialog.$.unlockPin2.hidden);

    simLockDialog.globalPolicy = {
      allowCellularSimLock: false,
    };

    assertTrue(simLockDialog.$.unlockPin1.hidden);
    assertTrue(simLockDialog.$.unlockPin2.hidden);
  });

  test('Show invalid unlock PIN error message properly', async function() {
    // Set sim to PIN locked state with multiple retries left.
    simLockDialog.deviceState = {
      simLockStatus: {lockEnabled: true, lockType: 'sim-pin', retriesLeft: 3},
    };
    await flushAsync();
    unlockPinDialog = simLockDialog.$$('#unlockPinDialog');
    assertTrue(!!unlockPinDialog);
    assertTrue(unlockPinDialog.open);

    // Invalid PIN should show error message with correct retries count.
    unlockPinDialog.querySelector('#unlockPin').value = 'invalid_pin';
    unlockPinDialog.querySelector('.action-button').click();
    await flushAsync();
    assertEquals(
        simLockDialog.i18n('networkSimErrorInvalidPinPlural', 3),
        unlockPinDialog.querySelector('.pinEntrySubtext').textContent.trim());

    // Set SIM to PIN locked state with single retry left.
    simLockDialog.deviceState = {
      simLockStatus: {lockEnabled: true, lockType: 'sim-pin', retriesLeft: 1},
    };
    await flushAsync();
    unlockPinDialog.querySelector('#unlockPin').value = 'invalid_pin2';
    unlockPinDialog.querySelector('.action-button').click();
    await flushAsync();
    assertEquals(
        simLockDialog.i18n('networkSimErrorInvalidPin', 1),
        unlockPinDialog.querySelector('.pinEntrySubtext').textContent.trim());
  });

  test(
      'Show PUK dialog when lockType changes from PIN to PUK',
      async function() {
        simLockDialog.deviceState = {
          simLockStatus:
              {lockEnabled: true, lockType: 'sim-pin', retriesLeft: 3},
        };
        await flushAsync();
        unlockPinDialog = simLockDialog.$$('#unlockPinDialog');
        assertTrue(!!unlockPinDialog);
        assertTrue(unlockPinDialog.open);

        simLockDialog.deviceState = {
          simLockStatus:
              {lockEnabled: true, lockType: 'sim-puk', retriesLeft: 3},
        };
        await flushAsync();
        const unlockPukDialog = simLockDialog.$$('#unlockPukDialog');
        assertTrue(!!unlockPukDialog);

        assertFalse(unlockPinDialog.open);
        assertTrue(unlockPukDialog.open);
      });

  test(
      'Show unlock PUK dialog when lockEnabled changes to true from false',
      async function() {
        simLockDialog.deviceState = {
          simLockStatus: {lockEnabled: false, lockType: '', retriesLeft: 3},
        };
        await flushAsync();
        const enterPinDialog = simLockDialog.$$('#enterPinDialog');
        assertTrue(!!enterPinDialog);
        assertTrue(enterPinDialog.open);

        // Set lockedEnabled to true, this means current network is locked and
        // enter pin dialog errored out.
        simLockDialog.deviceState = {
          simLockStatus:
              {lockEnabled: true, lockType: 'sim-puk', retriesLeft: 0},
        };

        const unlockPukDialog = simLockDialog.$$('#unlockPukDialog');

        assertTrue(!!unlockPukDialog);
        assertFalse(enterPinDialog.open);
        assertTrue(unlockPukDialog.open);
      });

  test('Show unlock PUK dialog when enter pin fails', async function() {
    const mojom = chromeos.networkConfig.mojom;
    let deviceState = {
      type: mojom.NetworkType.kCellular,
      deviceState: chromeos.networkConfig.mojom.DeviceStateType.kEnabled,
      simInfos: [{slot_id: 0, iccid: '1111111111111111'}],
      simLockStatus: {lockEnabled: false, lockType: '', retriesLeft: 3},
    };
    networkConfigRemote_.setDeviceStateForTest(deviceState);
    simLockDialog.deviceState = deviceState;
    await flushAsync();

    const enterPinDialog = simLockDialog.$$('#enterPinDialog');
    assertTrue(!!enterPinDialog);
    assertTrue(enterPinDialog.open);

    // Enter wrong pin 3 times.
    for (let i = 0; i < 3; i++) {
      // Change the pin for each entry, otherwise UI does not know its value
      // has changed.
      enterPinDialog.querySelector('#enterPin').value = '11111' + i;
      enterPinDialog.querySelector('.action-button').click();
      await flushAsync();
    }

    // Update device state with current device state.
    deviceState =
        networkConfigRemote_.getDeviceStateForTest(mojom.NetworkType.kCellular);
    // Trigger device state change.
    simLockDialog.deviceState = {...deviceState};
    await flushAsync();

    const unlockPukDialog = simLockDialog.$$('#unlockPukDialog');

    assertTrue(!!unlockPukDialog);
    assertFalse(enterPinDialog.open);
    assertTrue(unlockPukDialog.open);
  });

  test('Change pin', async function() {
    // Set sim to unlocked with multiple retries left
    const mojom = chromeos.networkConfig.mojom;
    const deviceState = {
      type: mojom.NetworkType.kCellular,
      deviceState: chromeos.networkConfig.mojom.DeviceStateType.kEnabled,
      simInfos: [{slot_id: 0, iccid: '1111111111111111'}],
      simLockStatus: {lockEnabled: true, lockType: '', retriesLeft: 2},
    };
    networkConfigRemote_.setDeviceStateForTest(deviceState);
    simLockDialog.showChangePin = true;

    const changePinDialog = simLockDialog.$$('#changePinDialog');

    assertTrue(!!changePinDialog);
    assertFalse(changePinDialog.open);
    await flushAsync();

    simLockDialog.deviceState = deviceState;
    await flushAsync();
    assertTrue(changePinDialog.open);

    // Attempt to change pin.
    changePinDialog.querySelector('#changePinOld').value = '1111';
    changePinDialog.querySelector('#changePinNew1').value = '1234';
    changePinDialog.querySelector('#changePinNew2').value = '1234';
    changePinDialog.querySelector('.action-button').click();
    await flushAsync();

    assertEquals(networkConfigRemote_.testPin, '1234');
    assertFalse(changePinDialog.open);
  });

  test('Submit on enter pressed', async function() {
    const mojom = chromeos.networkConfig.mojom;
    let deviceState = {
      type: mojom.NetworkType.kCellular,
      deviceState: chromeos.networkConfig.mojom.DeviceStateType.kEnabled,
      simInfos: [{slot_id: 0, iccid: '1111111111111111'}],
      simLockStatus: {lockEnabled: false, lockType: '', retriesLeft: 3},
    };
    networkConfigRemote_.setDeviceStateForTest(deviceState);
    simLockDialog.deviceState = deviceState;
    await flushAsync();

    const enterPinDialog = simLockDialog.$$('#enterPinDialog');

    const pinInput = enterPinDialog.querySelector('#enterPin');
    pinInput.value = '1111111';
    pinInput.dispatchEvent(new CustomEvent(
        'enter', {bubbles: true, composed: true, detail: {path: [pinInput]}}));
    await flushAsync();

    deviceState =
        networkConfigRemote_.getDeviceStateForTest(mojom.NetworkType.kCellular);

    assertEquals(2, deviceState.simLockStatus.retriesLeft);
  });

  test('Close dialog on cancel event pressed', async function() {
    // cancel event can be triggered by pressing the Escape key
    const mojom = chromeos.networkConfig.mojom;
    simLockDialog.deviceState = {
      type: mojom.NetworkType.kCellular,
      deviceState: chromeos.networkConfig.mojom.DeviceStateType.kEnabled,
      simInfos: [{slot_id: 0, iccid: '1111111111111111'}],
      simLockStatus: {lockEnabled: false, lockType: '', retriesLeft: 3},
    };

    await flushAsync();
    const enterPinDialog = simLockDialog.$$('#enterPinDialog');
    assertTrue(!!enterPinDialog);
    assertTrue(enterPinDialog.open);
    assertTrue(simLockDialog.isDialogOpen);
    enterPinDialog.dispatchEvent(
        new CustomEvent('cancel', {bubbles: true, composed: true}));
    await flushAsync();
    assertFalse(enterPinDialog.open);
    assertFalse(simLockDialog.isDialogOpen);
  });

  test('Pending error is cleared', async function() {
    const mojom = chromeos.networkConfig.mojom;
    let deviceState = {
      type: mojom.NetworkType.kCellular,
      deviceState: chromeos.networkConfig.mojom.DeviceStateType.kEnabled,
      simInfos: [{slot_id: 0, iccid: '1111111111111111'}],
      simLockStatus: {lockEnabled: false, lockType: '', retriesLeft: 3},
    };
    networkConfigRemote_.setDeviceStateForTest(deviceState);
    simLockDialog.deviceState = deviceState;
    await flushAsync();

    const enterPinDialog = simLockDialog.$$('#enterPinDialog');
    const enterPin = async function(pin) {
      const pinInput = enterPinDialog.querySelector('#enterPin');
      pinInput.value = pin;
      pinInput.dispatchEvent(new CustomEvent(
          'enter',
          {bubbles: true, composed: true, detail: {path: [pinInput]}}));
      await flushAsync();
    };

    await enterPin('111111111');
    // Update device state.
    deviceState =
        networkConfigRemote_.getDeviceStateForTest(mojom.NetworkType.kCellular);
    simLockDialog.deviceState = {...deviceState};

    await flushAsync();
    let error =
        enterPinDialog.querySelector('.pinEntrySubtext').textContent.trim();
    assertEquals(
        error, simLockDialog.i18n('networkSimErrorIncorrectPinPlural', 2));

    await enterPin('1111');
    // Update device state.
    deviceState =
        networkConfigRemote_.getDeviceStateForTest(mojom.NetworkType.kCellular);
    simLockDialog.deviceState = {...deviceState};
    await flushAsync();

    error = enterPinDialog.querySelector('.pinEntrySubtext').textContent.trim();
    assertEquals(error, simLockDialog.i18n('networkSimEnterPinSubtext'));
  });
});


text:
package com.custardsource.parfait.cxf;

import java.net.URISyntaxException;

import org.apache.cxf.testutil.common.AbstractBusTestServerBase;
import org.mortbay.jetty.Connector;
import org.mortbay.jetty.Handler;
import org.mortbay.jetty.handler.DefaultHandler;
import org.mortbay.jetty.handler.HandlerCollection;
import org.mortbay.jetty.nio.SelectChannelConnector;
import org.mortbay.jetty.webapp.WebAppContext;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

public class SpringCreatedTestServer extends AbstractBusTestServerBase {

    private org.mortbay.jetty.Server server;

    private static final Logger LOG = LoggerFactory.getLogger(SpringCreatedTestServer.class);

    protected void run() {
        LOG.debug("Starting Server");

        server = new org.mortbay.jetty.Server();

        SelectChannelConnector connector = new SelectChannelConnector();
        connector.setPort(9080);
        server.setConnectors(new Connector[] { connector });

        WebAppContext webappcontext = new WebAppContext();
        String contextPath = null;
        try {
            contextPath = getClass().getResource(".").toURI().getPath();
        } catch (URISyntaxException e1) {
            e1.printStackTrace();
        }
        System.out.println(contextPath);
        webappcontext.setContextPath("/api");

        webappcontext.setWar(contextPath);

        HandlerCollection handlers = new HandlerCollection();
        handlers.setHandlers(new Handler[] { webappcontext, new DefaultHandler() });

        server.setHandler(handlers);
        try {
            server.start();

        } catch (Exception e) {
            e.printStackTrace();
        }
    }

    public void tearDown() throws Exception {
        super.tearDown();
        if (server != null) {
            server.stop();
            server.destroy();
            server = null;
        }
    }

    public static void main(String args[]) {
        try {
            SpringCreatedTestServer s = new SpringCreatedTestServer();
            s.start();
        } catch (Exception ex) {
            ex.printStackTrace();
            System.exit(-1);
        } finally {
            LOG.debug("Server setup done!");
        }
    }

}


text:
$(document).ready(function(){

    initUploadExcerptPhoto();
    initUploadMedia();
    $('#edcomment_save').removeAttr('disabled');
    $(document).on('click', '.js-single-click', function(){
        $(this).attr('disabled', 'disabled');
    });

    $(document).on('submit', '.js-single-submit', function(){
        var submitBtn=$(this).find(':submit');
        submitBtn.attr('disabled', 'disabled');
    });

    $(document).on('click', '.js-add-media', function(e){
        e.preventDefault();
        $('.js-modal-add-media').modal();
        $('.js-modal-add-media').on('shown.bs.modal', function (e) {
          refreshIsotope();
        })
    });

    $(document).on('click', '.js-pick-or-upload', function(e){
        e.preventDefault();
        $('.js-modal-add-excerpt-media').modal();
        $('.js-modal-add-excerpt-media').on('shown.bs.modal', function (e) {
            refreshIsotope();
        })
    });

    $(document).on('click', '.js-trigger-upload', function(){
        $('.js-upload-input').click();
    });

    $(document).on('click', '.js-trigger-upload-medias', function(){
        $('#article_media_media').click();
    });

    $(document).on('click', '.js-trigger-upload-excerpt', function(){
        $('#article_excerpt_media').click();
    });

    $(document).on('click', '.js-media-object-remove', function(e){
      e.preventDefault();
      $.post($(this).attr('data-href'), function(){
          $('.js-media-object-remove').addClass('hidden');
          $('.js-media-object').attr('src', '/bundles/edblog/img/svg/image-placeholder.svg');
          $('#article_excerpt_photo').val('');
      });
    });

    $(document).on('click', '.js-media-object-reset', function(e)
    {
      $('.js-media-object-remove').addClass('hidden');
      $('.js-media-object').attr('src', '/bundles/edblog/img/svg/image-placeholder.svg');
      $('#article_excerpt_photo').val('');
    });

    $(document).on('click', '.js-delete-object', function(e){
      e.preventDefault();
      $('.js-delete-object-text').text($(this).attr('data-text'));
      $('.js-delete-object-title').text($(this).attr('data-title'));
      $('.js-delete-object-href').attr('href',$(this).attr('data-href'));
    });

    $(document).on('click', '.js-insert-media', function(e){
    e.preventDefault();
      $('.phototiles__iteminner.selected').each(function(){
          var caption = $(this).parents('li').find('.ajax_media_form textarea').val();

          if(caption)
          {
              tinymce.editors[0].insertContent('
'+ $(this).find('.js-add-media-editor').attr('data-content') +''+ caption +'
');
          }
          else
            tinymce.editors[0].insertContent($(this).find('.js-add-media-editor').attr('data-content'));
      });
    $('.js-close-insert-modal').click();
    });

    $(document).on('click', '.js-pagination-pager', function(e){
    e.preventDefault();
    $.post($(this).attr('href'), function(data){
      $('.js-load-more').remove();
      $('.js-media-content').after(data.pagination);

      if ($('.js-media-content').hasClass("js-noisotope")){
        $('.js-media-content').append(data.html);
      }
      else{

        // Isotope after Load more
        // Second approach
        $container = $('.isotope:visible');
        // We need jQuery object, so instead of response.photoContent we use $(response.photoContent)
        var $new_items = $(data.html);
        // imagesLoaded is independent plugin, which we use as timeout until all images in $container are fetched, so their real size can be calculated; When they all are on the page, than code within will be executed
        $container.append( $new_items );
        $container.imagesLoaded( function() {
          $container.isotope( 'appended', $new_items );
          //$container.isotope( 'prepended', $new_items );
          $container.isotope('layout');
          $('.phototiles__item').removeClass('muted--total');
          if ( $('.modal:visible').length ) {
            $('.modal:visible').each(centerModal);
          } else {
              if ( $(window).width() >= 992 ) {
                  $('html, body').animate({ scrollTop: $(document).height() }, 1200);
                  $('.dashboard-menu.alltheway').css('min-height', $('.dashboard-content').height());
              }
          }
        });
      }

    });
    });

    $(document).on('click', '.js-content-replace', function(e){
        e.preventDefault();
        element=$(this);
        $.post($(this).attr('data-href'), function(data){
            element.parent().html(data.html);
        });
    });

    // Correct display after slow page load
    $('.gl.muted--total').each(function() {
        $(this).removeClass('muted--total');
    });

    // Make modal as wide as possible
    $('.modal--full').on('shown.bs.modal', function (e) {
        recalculateModal($(this));
    });

    // Select image for insert into article
    $(document).on('click', '.js-modal-add-media .phototiles__iteminner', function(e){
        $(this).toggleClass('selected');
    });

    $(document).on('click', '.js-modal-add-excerpt-media .phototiles__iteminner', function(e){
        var item = $(this).find('.js-add-media-editor');
        $('.js-excerpt-holder').html( item.attr('data-content') );
        $('#article_excerptPhoto').val(item.attr('data-val'));
        $('.js-modal-add-excerpt-media .js-close-insert-modal').trigger('click');
    });

    $(document).on('submit', '.js-comment-form', function(e){
        e.preventDefault();
        var form=$(this);
        var submit=form.find(':submit');
        submit.attr('disabled', 'disabled');

        $.post($(this).attr('action'),$(this).serialize() , function(data){
            $('.js-comments-content').replaceWith(data.html);
            if (data.currentComment)
            {
                $('html, body').animate({
                    scrollTop: $("#"+data.currentComment).offset().top
                }, 2000);
            }
        });
    });

    $(document).on('submit', '.ajax_media_form', function(e){
        e.preventDefault();
        $.post($(this).attr('action'), $(this).serialize(), function(data){});
    });

    getFancyCategories();
}); // End of $(document).ready()

// Resize or orientationchange of document
$(window).bind('resize orientationchange', function(){
  if ( $('.modal--full:visible').length ) {
    recalculateModal($('.modal--full'));
  }
});

// Calculate position for full-width modal
function recalculateModal($this) {
  mod_width = Math.floor($(window).width()*0.96);
  mod_height = Math.floor($(window).height()*0.96);
  $this.find('.modal-dialog').css('width', mod_width);
  head_foot_offset = 150;
  $this.find('.modal-body').css('max-height', mod_height - head_foot_offset);
  $this.removeClass('muted--total');
  refreshIsotope();
}

// Refresh Isotope
function refreshIsotope() {
    $container = $('.isotope');
    $container.imagesLoaded(function () {
        $container.isotope().isotope('layout');
        $('.phototiles__item').removeClass('muted--total');
        $('.modal:visible').each(centerModal);
    });
}

function initUploadExcerptPhoto()
{
    $('#form_excerptImage').fileupload({
        url: $('#form_excerptImage').attr('data-href'),
        dataType: 'json',
        maxFileSize: 20000000,
        done: function (e, response) {
                var data = response.result;
                if (data.success == 'true') {
                    $('.js-media-object').replaceWith(data.media);
                    $('.js-excerpt-photo').val(data.id);
                    $('.js-media-object-remove').removeClass('hidden');
                    $('.js-media-object-remove').attr('data-href', data.href);
                }
        },
        progressall: function (e, data) {
            var progress = parseInt(data.loaded / data.total * 100, 10);
            $('#progress .bar').css('width', progress + '%');
        }
    });
}

function initUploadMedia()
{
    $('#article_media_media').fileupload({
        url: $('#article_media_media').attr('data-href'),
        dataType: 'json',
        maxFileSize: 20000000,
        done: function (e, response) {
            var data = response.result;
            $('.js-load-more').remove();
            $('.pagination').remove();
            $('.js-media-content').replaceWith(data.html);
            // $('.js-trigger-upload-medias').parent().removeClass('muted--total');
            // $('.js-trigger-upload-medias').removeClass('muted--total');
            // $('.js-trigger-upload-medias').parent().css('position', 'relative');
            refreshIsotope();
        },
        progressall: function (e, data) {
            var progress = parseInt(data.loaded / data.total * 100, 10);
            $('#progress .bar').css('width', progress + '%');
        }
    });

    $('#article_excerpt_media').fileupload({
        url: $('#article_excerpt_media').attr('data-href'),
        dataType: 'json',
        maxFileSize: 20000000,
        done: function (e, response) {
            var data = response.result;
            $('.js-load-more').remove();
            $('.pagination').remove();
            $('.js-media-content').replaceWith(data.html);
            // $('.js-trigger-upload-medias').parent().removeClass('muted--total');
            // $('.js-trigger-upload-medias').removeClass('muted--total');
            // $('.js-trigger-upload-medias').parent().css('position', 'relative');
            refreshIsotope();
        },
        progressall: function (e, data) {
            var progress = parseInt(data.loaded / data.total * 100, 10);
            $('#progress .bar').css('width', progress + '%');
        }
    });
}

function getFancyCategories()
{
    $('.js-get-pretty-categories').each(function(){
        var input = $(this);
        var url = input.attr('data-category-url');
        var selected = [];

        input.find('[checked]').each(function(){
            selected.push($(this).val());
        });
        input.find('[selected]').each(function(){
            selected.push($(this).val());
        });

        $.post(url, { 'select': selected }, function(data){
            if(data.success === true)
            {
                if(input.attr('data-empty-option') != undefined)
                {
                    input.html('<option value="">' + input.attr('data-empty-option') + '</option>');
                }
                else
                    input.html('');

                input.append(data.html).removeClass('hide');

            }
        });
    });
}

function initNprogress()
{
    $(document).ajaxStart(function(e)
    {
        if( (e.target.activeElement == undefined) || !$(e.target.activeElement).hasClass('js-skip-nprogress') )
            NProgress.start();
    }).ajaxStop(function(e){
        NProgress.done();
    });
}


text:
package org.docksidestage.mysql.dbflute.bsentity;

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

import org.dbflute.Entity;
import org.dbflute.dbmeta.DBMeta;
import org.dbflute.dbmeta.AbstractEntity;
import org.dbflute.dbmeta.accessory.DomainEntity;
import org.dbflute.optional.OptionalEntity;
import org.docksidestage.mysql.dbflute.allcommon.DBMetaInstanceHandler;
import org.docksidestage.mysql.dbflute.exentity.*;

/**
 * The entity of WHITE_ONLY_ONE_TO_ONE_TO as TABLE.

 *

 * [primary-key]
 *     TO_ID
 *
 * [column]
 *     TO_ID, TO_NAME, FROM_ID
 *
 * [sequence]
 *
 *
 * [identity]
 *     TO_ID
 *
 * [version-no]
 *
 *
 * [foreign table]
 *     WHITE_ONLY_ONE_TO_ONE_FROM
 *
 * [referrer table]
 *
 *
 * [foreign property]
 *     whiteOnlyOneToOneFrom
 *
 * [referrer property]
 *
 *
 * [get/set template]
 * /= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
 * Long toId = entity.getToId();
 * String toName = entity.getToName();
 * Long fromId = entity.getFromId();
 * entity.setToId(toId);
 * entity.setToName(toName);
 * entity.setFromId(fromId);
 * = = = = = = = = = =/
 *

 * @author DBFlute(AutoGenerator)
 */
public abstract class BsWhiteOnlyOneToOneTo extends AbstractEntity implements DomainEntity {

    // ===================================================================================
    //                                                                          Definition
    //                                                                          ==========
    /** The serial version UID for object serialization. (Default) */
    private static final long serialVersionUID = 1L;

    // ===================================================================================
    //                                                                           Attribute
    //                                                                           =========
    /** TO_ID: {PK, ID, NotNull, BIGINT(19)} */
    protected Long _toId;

    /** TO_NAME: {NotNull, VARCHAR(200)} */
    protected String _toName;

    /** FROM_ID: {UQ, NotNull, BIGINT(19), FK to white_only_one_to_one_from} */
    protected Long _fromId;

    // ===================================================================================
    //                                                                             DB Meta
    //                                                                             =======
    /** {@inheritDoc} */
    public DBMeta asDBMeta() {
        return DBMetaInstanceHandler.findDBMeta(asTableDbName());
    }

    /** {@inheritDoc} */
    public String asTableDbName() {
        return "white_only_one_to_one_to";
    }

    // ===================================================================================
    //                                                                        Key Handling
    //                                                                        ============
    /** {@inheritDoc} */
    public boolean hasPrimaryKeyValue() {
        if (_toId == null) { return false; }
        return true;
    }

    /**
     * To be unique by the unique column.

     * You can update the entity by the key when entity update (NOT batch update).
     * @param fromId : UQ, NotNull, BIGINT(19), FK to white_only_one_to_one_from. (NotNull)
     */
    public void uniqueBy(Long fromId) {
        __uniqueDrivenProperties.clear();
        __uniqueDrivenProperties.addPropertyName("fromId");
        setFromId(fromId);
    }

    // ===================================================================================
    //                                                                    Foreign Property
    //                                                                    ================
    /** WHITE_ONLY_ONE_TO_ONE_FROM by my FROM_ID, named 'whiteOnlyOneToOneFrom'. */
    protected OptionalEntity<WhiteOnlyOneToOneFrom> _whiteOnlyOneToOneFrom;

    /**
     * [get] WHITE_ONLY_ONE_TO_ONE_FROM by my FROM_ID, named 'whiteOnlyOneToOneFrom'.

     * Optional: alwaysPresent(), ifPresent().orElse(), get(), ...
     * @return The entity of foreign property 'whiteOnlyOneToOneFrom'. (NotNull, EmptyAllowed: when e.g. null FK column, no setupSelect)
     */
    public OptionalEntity<WhiteOnlyOneToOneFrom> getWhiteOnlyOneToOneFrom() {
        if (_whiteOnlyOneToOneFrom == null) { _whiteOnlyOneToOneFrom = OptionalEntity.relationEmpty(this, "whiteOnlyOneToOneFrom"); }
        return _whiteOnlyOneToOneFrom;
    }

    /**
     * [set] WHITE_ONLY_ONE_TO_ONE_FROM by my FROM_ID, named 'whiteOnlyOneToOneFrom'.
     * @param whiteOnlyOneToOneFrom The entity of foreign property 'whiteOnlyOneToOneFrom'. (NullAllowed)
     */
    public void setWhiteOnlyOneToOneFrom(OptionalEntity<WhiteOnlyOneToOneFrom> whiteOnlyOneToOneFrom) {
        _whiteOnlyOneToOneFrom = whiteOnlyOneToOneFrom;
    }

    // ===================================================================================
    //                                                                   Referrer Property
    //                                                                   =================
    protected <ELEMENT> List<ELEMENT> newReferrerList() { // overriding to import
        return new ArrayList<ELEMENT>();
    }

    // ===================================================================================
    //                                                                      Basic Override
    //                                                                      ==============
    @Override
    protected boolean doEquals(Object obj) {
        if (obj instanceof BsWhiteOnlyOneToOneTo) {
            BsWhiteOnlyOneToOneTo other = (BsWhiteOnlyOneToOneTo)obj;
            if (!xSV(_toId, other._toId)) { return false; }
            return true;
        } else {
            return false;
        }
    }

    @Override
    protected int doHashCode(int initial) {
        int hs = initial;
        hs = xCH(hs, asTableDbName());
        hs = xCH(hs, _toId);
        return hs;
    }

    @Override
    protected String doBuildStringWithRelation(String li) {
        StringBuilder sb = new StringBuilder();
        if (_whiteOnlyOneToOneFrom != null && _whiteOnlyOneToOneFrom.isPresent())
        { sb.append(li).append(xbRDS(_whiteOnlyOneToOneFrom, "whiteOnlyOneToOneFrom")); }
        return sb.toString();
    }
    protected <ET extends Entity> String xbRDS(org.dbflute.optional.OptionalEntity<ET> et, String name) { // buildRelationDisplayString()
        return et.get().buildDisplayString(name, true, true);
    }

    @Override
    protected String doBuildColumnString(String dm) {
        StringBuilder sb = new StringBuilder();
        sb.append(dm).append(xfND(_toId));
        sb.append(dm).append(xfND(_toName));
        sb.append(dm).append(xfND(_fromId));
        if (sb.length() > dm.length()) {
            sb.delete(0, dm.length());
        }
        sb.insert(0, "{").append("}");
        return sb.toString();
    }

    @Override
    protected String doBuildRelationString(String dm) {
        StringBuilder sb = new StringBuilder();
        if (_whiteOnlyOneToOneFrom != null && _whiteOnlyOneToOneFrom.isPresent())
        { sb.append(dm).append("whiteOnlyOneToOneFrom"); }
        if (sb.length() > dm.length()) {
            sb.delete(0, dm.length()).insert(0, "(").append(")");
        }
        return sb.toString();
    }

    @Override
    public WhiteOnlyOneToOneTo clone() {
        return (WhiteOnlyOneToOneTo)super.clone();
    }

    // ===================================================================================
    //                                                                            Accessor
    //                                                                            ========
    /**
     * [get] TO_ID: {PK, ID, NotNull, BIGINT(19)}

     * @return The value of the column 'TO_ID'. (basically NotNull if selected: for the constraint)
     */
    public Long getToId() {
        checkSpecifiedProperty("toId");
        return _toId;
    }

    /**
     * [set] TO_ID: {PK, ID, NotNull, BIGINT(19)}

     * @param toId The value of the column 'TO_ID'. (basically NotNull if update: for the constraint)
     */
    public void setToId(Long toId) {
        registerModifiedProperty("toId");
        _toId = toId;
    }

    /**
     * [get] TO_NAME: {NotNull, VARCHAR(200)}

     * @return The value of the column 'TO_NAME'. (basically NotNull if selected: for the constraint)
     */
    public String getToName() {
        checkSpecifiedProperty("toName");
        return _toName;
    }

    /**
     * [set] TO_NAME: {NotNull, VARCHAR(200)}

     * @param toName The value of the column 'TO_NAME'. (basically NotNull if update: for the constraint)
     */
    public void setToName(String toName) {
        registerModifiedProperty("toName");
        _toName = toName;
    }

    /**
     * [get] FROM_ID: {UQ, NotNull, BIGINT(19), FK to white_only_one_to_one_from}

     * @return The value of the column 'FROM_ID'. (basically NotNull if selected: for the constraint)
     */
    public Long getFromId() {
        checkSpecifiedProperty("fromId");
        return _fromId;
    }

    /**
     * [set] FROM_ID: {UQ, NotNull, BIGINT(19), FK to white_only_one_to_one_from}

     * @param fromId The value of the column 'FROM_ID'. (basically NotNull if update: for the constraint)
     */
    public void setFromId(Long fromId) {
        registerModifiedProperty("fromId");
        _fromId = fromId;
    }
}


text:
#C++ wrapper for Weather Underground API

This is a C++ wrapper for [Weather Underground](http://www.wunderground.com) API.
Compiler: GCC 4.6.4 on Ubuntu and tested with MinGW 4.7.2 on Windows

##Requirements
You need API key to use it. You can get it for free [http://www.wunderground.com/weather/api/](http://www.wunderground.com/weather/api)

libcurl library:[curl.haxx.se/libcurl/](http://curl.haxx.se/libcurl/)

For testing you need [Boost libraries](http://www.boost.org/) Boost.Test and Boost.Date_Time

##Usage

Wrapper has 6 classes named same as  wunderground api [data features](http://www.wunderground.com/weather/api/d/docs?d=data/index):
All of them inherit from same abstract base class named Weather and all of them are in wunderground namespace.

* Conditions for today weather data
* Forecast for 3 day weather data
* Forecast10day for 10 day weather
* Hourly for 3 day hourly data
* Hourly10day for 10 day hourly data
* Astronomy  for today astronomy data

###Examples of use
```C++
//only  this one header is what you need for using a wrapper
#include "wunderground.hpp"
#include <iostream>

int main()
{
  string ApiKey="put your api key here";

  //Condition class provides weather data for today
  wunderground::Conditions weather(ApiKey);

  //method loadData(), as it name says, loads data for specified city and state
  weather.loadData("zagreb","croatia");

  //method printConditions prints all weather data
  weather.printConditions();

  //you can get specified weather data with getCondition() method
  std::cout<<"Current temperature in Zagreb is: "<<weather.getCondition("temperature");

  //Forecast10day class provides data for next 10 days
  wunderground::Forecast10day weather10day(ApiKey);

  weather10day.loadData("paris","france");

  /*getCondition() method now needs two parametars: condition and a day, if today is Thursday 15th january and
    you need weather data for Sunday 18th than you do: */
  std::cout<<"Highest temperature for Paris on Sunday: "<<weather10day.getCondition("high","18");
  //...and on Tuesday:
  std::cout<<"Humidity for Paris on Tuesday: "<<weather10day.getCondition("humidity","20");

  //Astronomy class is for sunrise and sunset time
  wunderground::Astronomy astronomy(ApiKey);

  astronomy.loadData("munich","germany");

  std::cout<<"Sunset time in Munich today is: "<<astronomy.getCondition("sunset");

  return 0;

}
```

##Terms of service

[Weather Underground Terms of Service](http://www.wunderground.com/weather/api/d/terms.html)


text:
// @flow

import React from 'react';
import {
  PanResponder,
  View,
  Dimensions,
  Animated,
  TouchableWithoutFeedback,
} from 'react-native';
import PropTypes from 'prop-types';
import styles from './styles';

type WindowDimensions = { width: number, height: number };

type Props = {
  edgeHitWidth: number,
  toleranceX: number,
  toleranceY: number,
  menuPosition: 'left' | 'right',
  onChange: Function,
  onMove: Function,
  onSliding: Function,
  openMenuOffset: number,
  hiddenMenuOffset: number,
  disableGestures: Function | bool,
  animationFunction: Function,
  onAnimationComplete: Function,
  onStartShouldSetResponderCapture: Function,
  isOpen: bool,
  bounceBackOnOverdraw: bool,
  autoClosing: bool
};

type Event = {
  nativeEvent: {
    layout: {
      width: number,
      height: number,
    },
  },
};

type State = {
  width: number,
  height: number,
  openOffsetMenuPercentage: number,
  openMenuOffset: number,
  hiddenMenuOffsetPercentage: number,
  hiddenMenuOffset: number,
  left: Animated.Value,
};

const deviceScreen: WindowDimensions = Dimensions.get('window');
const barrierForward: number = deviceScreen.width / 4;

function shouldOpenMenu(dx: number): boolean {
  return dx > barrierForward;
}

export default class SideMenu extends React.Component {
  onLayoutChange: Function;
  onStartShouldSetResponderCapture: Function;
  onMoveShouldSetPanResponder: Function;
  onPanResponderMove: Function;
  onPanResponderRelease: Function;
  onPanResponderTerminate: Function;
  state: State;
  prevLeft: number;
  isOpen: boolean;

  constructor(props: Props) {
    super(props);

    this.prevLeft = 0;
    this.isOpen = !!props.isOpen;

    const initialMenuPositionMultiplier = props.menuPosition === 'right' ? -1 : 1;
    const openOffsetMenuPercentage = props.openMenuOffset / deviceScreen.width;
    const hiddenMenuOffsetPercentage = props.hiddenMenuOffset / deviceScreen.width;
    const left: Animated.Value = new Animated.Value(
      props.isOpen
        ? props.openMenuOffset * initialMenuPositionMultiplier
        : props.hiddenMenuOffset,
    );

    this.onLayoutChange = this.onLayoutChange.bind(this);
    this.onStartShouldSetResponderCapture = props.onStartShouldSetResponderCapture.bind(this);
    this.onMoveShouldSetPanResponder = this.handleMoveShouldSetPanResponder.bind(this);
    this.onPanResponderMove = this.handlePanResponderMove.bind(this);
    this.onPanResponderRelease = this.handlePanResponderEnd.bind(this);
    this.onPanResponderTerminate = this.handlePanResponderEnd.bind(this);

    this.state = {
      width: deviceScreen.width,
      height: deviceScreen.height,
      openOffsetMenuPercentage,
      openMenuOffset: deviceScreen.width * openOffsetMenuPercentage,
      hiddenMenuOffsetPercentage,
      hiddenMenuOffset: deviceScreen.width * hiddenMenuOffsetPercentage,
      left,
    };

    this.state.left.addListener(({value}) => this.props.onSliding(Math.abs((value - this.state.hiddenMenuOffset) / (this.state.openMenuOffset - this.state.hiddenMenuOffset))));
  }

  UNSAFE_componentWillMount(): void {
    this.responder = PanResponder.create({
      onStartShouldSetResponderCapture: this.onStartShouldSetResponderCapture,
      onMoveShouldSetPanResponder: this.onMoveShouldSetPanResponder,
      onPanResponderMove: this.onPanResponderMove,
      onPanResponderRelease: this.onPanResponderRelease,
      onPanResponderTerminate: this.onPanResponderTerminate,
    });
  }

  UNSAFE_componentWillReceiveProps(props: Props): void {
    if (typeof props.isOpen !== 'undefined' && this.isOpen !== props.isOpen && (props.autoClosing || this.isOpen === false)) {
      this.openMenu(props.isOpen);
    }
  }

  onLayoutChange(e: Event) {
    const { width, height } = e.nativeEvent.layout;
    const openMenuOffset = width * this.state.openOffsetMenuPercentage;
    const hiddenMenuOffset = width * this.state.hiddenMenuOffsetPercentage;
    this.setState({ width, height, openMenuOffset, hiddenMenuOffset });
  }

  /**
   * Get content view. This view will be rendered over menu
   * @return {React.Component}
   */
  getContentView() {
    let overlay: React.Element<void, void> = null;

    if (this.isOpen) {
      overlay = (
        <TouchableWithoutFeedback onPress={() => this.openMenu(false)}>
          <View style={styles.overlay} />
        </TouchableWithoutFeedback>
      );
    }

    const { width, height } = this.state;
    const ref = sideMenu => (this.sideMenu = sideMenu);
    const style = [
      styles.frontView,
      { width, height },
      this.props.animationStyle(this.state.left),
    ];

    return (
      <Animated.View style={style} ref={ref} {...this.responder.panHandlers}>
        {this.props.children}
        {overlay}
      </Animated.View>
    );
  }

  moveLeft(offset: number) {
    const newOffset = this.menuPositionMultiplier() * offset;

    this.props
      .animationFunction(this.state.left, newOffset)
      .start(this.props.onAnimationComplete);

    this.prevLeft = newOffset;
  }

  menuPositionMultiplier(): -1 | 1 {
    return this.props.menuPosition === 'right' ? -1 : 1;
  }

  handlePanResponderMove(e: Object, gestureState: Object) {
    if (this.state.left.__getValue() * this.menuPositionMultiplier() >= 0) {
      let newLeft = this.prevLeft + gestureState.dx;

      if (!this.props.bounceBackOnOverdraw && Math.abs(newLeft) > this.state.openMenuOffset) {
        newLeft = this.menuPositionMultiplier() * this.state.openMenuOffset;
      }

      this.props.onMove(newLeft);
      this.state.left.setValue(newLeft);
    }
  }

  handlePanResponderEnd(e: Object, gestureState: Object) {
    const offsetLeft = this.menuPositionMultiplier() *
      (this.state.left.__getValue() + gestureState.dx);

    this.openMenu(shouldOpenMenu(offsetLeft));
  }

  handleMoveShouldSetPanResponder(e: any, gestureState: any): boolean {
    if (this.gesturesAreEnabled()) {
      const x = Math.round(Math.abs(gestureState.dx));
      const y = Math.round(Math.abs(gestureState.dy));

      const touchMoved = x > this.props.toleranceX && y < this.props.toleranceY;

      if (this.isOpen) {
        return touchMoved;
      }

      const withinEdgeHitWidth = this.props.menuPosition === 'right' ?
        gestureState.moveX > (deviceScreen.width - this.props.edgeHitWidth) :
        gestureState.moveX < this.props.edgeHitWidth;

      const swipingToOpen = this.menuPositionMultiplier() * gestureState.dx > 0;
      return withinEdgeHitWidth && touchMoved && swipingToOpen;
    }

    return false;
  }

  openMenu(isOpen: boolean): void {
    const { hiddenMenuOffset, openMenuOffset } = this.state;
    this.moveLeft(isOpen ? openMenuOffset : hiddenMenuOffset);
    this.isOpen = isOpen;

    this.forceUpdate();
    this.props.onChange(isOpen);
  }

  gesturesAreEnabled(): boolean {
    const { disableGestures } = this.props;

    if (typeof disableGestures === 'function') {
      return !disableGestures();
    }

    return !disableGestures;
  }

  render(): React.Element<void, void> {
    const boundryStyle = this.props.menuPosition === 'right' ?
      { left: this.state.width - this.state.openMenuOffset } :
      { right: this.state.width - this.state.openMenuOffset };

    const menu = (
      <View style={[styles.menu, boundryStyle]}>
        {this.props.menu}
      </View>
    );

    return (
      <View
        style={styles.container}
        onLayout={this.onLayoutChange}
      >
        {menu}
        {this.getContentView()}
      </View>
    );
  }
}

SideMenu.propTypes = {
  edgeHitWidth: PropTypes.number,
  toleranceX: PropTypes.number,
  toleranceY: PropTypes.number,
  menuPosition: PropTypes.oneOf(['left', 'right']),
  onChange: PropTypes.func,
  onMove: PropTypes.func,
  children: PropTypes.node,
  menu: PropTypes.node,
  openMenuOffset: PropTypes.number,
  hiddenMenuOffset: PropTypes.number,
  animationStyle: PropTypes.func,
  disableGestures: PropTypes.oneOfType([PropTypes.func, PropTypes.bool]),
  animationFunction: PropTypes.func,
  onAnimationComplete: PropTypes.func,
  onStartShouldSetResponderCapture: PropTypes.func,
  isOpen: PropTypes.bool,
  bounceBackOnOverdraw: PropTypes.bool,
  autoClosing: PropTypes.bool,
};

SideMenu.defaultProps = {
  toleranceY: 10,
  toleranceX: 10,
  edgeHitWidth: 60,
  children: null,
  menu: null,
  openMenuOffset: deviceScreen.width * (2 / 3),
  disableGestures: false,
  menuPosition: 'left',
  hiddenMenuOffset: 0,
  onMove: () => {},
  onStartShouldSetResponderCapture: () => true,
  onChange: () => {},
  onSliding: () => {},
  animationStyle: value => ({
    transform: [{
      translateX: value,
    }],
  }),
  animationFunction: (prop, value) => Animated.spring(prop, {
    toValue: value,
    friction: 8,
    useNativeDriver: true,
  }),
  onAnimationComplete: () => {},
  isOpen: false,
  bounceBackOnOverdraw: true,
  autoClosing: true,
};


text:
package healthserver

// MockHealthHTTPServerFactory mocks the healthHTTPServerFactory interface
type MockHealthHTTPServerFactory struct {
	serversByPort map[uint16]*mockHealthServer
}

// NewMockHealthHTTPServerFactory creates a new health server factory for testing
func NewMockHealthHTTPServerFactory() *MockHealthHTTPServerFactory {
	return &MockHealthHTTPServerFactory{
		serversByPort: map[uint16]*mockHealthServer{},
	}
}

// ServiceByPort returns the service for a given health check node port
func (m *MockHealthHTTPServerFactory) ServiceByPort(port uint16) *Service {
	if srv, ok := m.serversByPort[port]; ok {
		return srv.svc
	}
	return nil
}

func (m *MockHealthHTTPServerFactory) newHTTPHealthServer(port uint16, svc *Service) healthHTTPServer {
	m.serversByPort[port] = &mockHealthServer{
		port:    port,
		svc:     svc,
		factory: m,
	}

	return m.serversByPort[port]
}

type mockHealthServer struct {
	port    uint16
	svc     *Service
	factory *MockHealthHTTPServerFactory
}

func (m *mockHealthServer) updateService(svc *Service) {
	m.svc = svc
}

func (m *mockHealthServer) shutdown() {
	delete(m.factory.serversByPort, m.port)
}


text:
var assert = require('assert');

suite('Maestro', function () {
    test('"Hello" should not equal "world"', function (done) {
        assert.notEqual('Hello', 'world');

        done();
    });
});


text:
* *input_file_types* and *output_file_types* enums *topologically associated domains*, *chromatin interactions*, *DNA accessibility raw signal*, *long range chromatin interactions*, *nested topologically associated domains*, *allele-specific chromatin interactions*, *variants chromatin interactions*, *haplotype-specific chromatin interactions*, *haplotype-specific DNA accessibility raw signal*, and *haplotype-specific DNA accessibility corrected signal* were replaced by *contact domains*, *contact matrix*, *nuclease cleavage frequency*, *loops*, *nested contact domains*, *allele-specific contact matrix*, *variants contact matrix*, *haplotype-specific contact matrix*, *haplotype-specific nuclease cleavage frequency* and *haplotype-specific nuclease cleavage corrected frequency* respectively.
* Added *mapping quality thresholded contact matrix* to the enum list for *input_file_types* and *output_file_types*.
* *analysis_step_types* enum *topologically associated domain identification* was replaced with *contact domain identification*

### Minor changes since schema version 15
* Added *merging* to the enum list for *analysis_step_types*
* Added *curated binding sites*, *curated SNVs*, *dsQTLs*, *eQTLs* and *PWMs* to the enum list for *input_file_types* and *output_file_types*
* Added *sparse transcript count matrix* and *read annotations* to the enum list for *input_file_types* and *output_file_types*
* Added *sparse gRNA count matrix*, *element barcode mapping*, and *fine-mapped variants* to the enum list for *input_file_types* and *output_file_types*
* Added *repeat elements annotation* to the enum list for *input_file_types* and *output_file_types*
* Added *R2C2 subreads* to the enum list for *input_file_types* and *output_file_types*
* Added *guide locations* to the enum list for *input_file_types* and *output_file_types*
* Added *pairs* to the enum list for *input_file_types* and *output_file_types*
* Added several entries to the enum lists for *input_file_types* and *output_file_types*: *allele-specific chromatin interactions, allele-specific variants, bidirectional peaks, diploid personal genome alignments, haplotype-specific alignments, novel peptides, peptide quantifications, protein expression quantifications, unidirectional peaks*
* Added *polyA sites* to the enum list for *input_file_types* and *output_file_types*
* Added *redacted alignments* and *redacted transcriptome alingments* to the enum list for *input_file_types* and *output_file_types*
* Added *fragments* to the enum list for *input_file_types* and *output_file_types*
* Added *genome compartment identification* to the enum list for *analysis_step_types*
* Added *sparse peak count matrix* to the enum lists for *input_file_types* and *output_file_types*
* Added *functional conservation quantifications* to the enum lists for *input_file_types* and *output_file_types*
* Added *regulatory elements prediction model* to the enum lists for *input_file_types* and *output_file_types*
* Added *genome subcompartments* and *chromatin stripes* to the enum lists for *input_file_types* and *output_file_types*
* Added *TF binding prediction model*, *enhancer prediction model* and *promoter prediction model* to the enum lists for *input_file_types* and *output_file_types*
* Added *filtered reads* and *archr project* to the enum lists for *input_file_types* and *output_file_types*
* Added *inclusion list*, *sparse gene count matrix of all reads*, *sparse gene count matrix of unique reads*, *unfiltered sparse gene count matrix of all reads*, *unfiltered sparse gene count matrix of unique reads*, and *unfiltered sparse splice junction count matrix of unique reads* to the enum lists for *input_file_types* and *output_file_types*
* Added *kmer weights* and *training set* to the enum lists for *input_file_types* and *output_file_types*
* Added *functional conservation mapping* to the enum lists for *input_file_types* and *output_file_types*
* Added *3D structure* and *DNA accessibility raw signal* to the enum lists for *input_file_types* and *output_file_types*
* Added *variants chromatin interactions*, *haplotype-specific chromatin interactions*, *haplotype-specific DNA accessibility raw signal*, *haplotype-specific DNA accessibility corrected signal* to enum list for *input_file_types* and *output_file_types*.
* Added *cell coordinates*, *cell type annotations*, and *raw imaging signal* to enum list for *input_file_types* and *output_file_types*.
* Added *plus strand end position signal*, *minus strand end position signal*, *plus strand normalized end position signal*, and *minus strand normalized end position signal* to enum list for *input_file_types* and *output_file_types*.
* Added *cell type annotation* to the enum list for *analysis_step_types*.
* Added *DNN-MPRA contribution scores*, *DNN-MPRA predicted signal*, *element gene links*, and *thresholded element gene links* to enum list for *input_file_types* and *output_file_types*.
* Added *element gene link prediction* and *selection* to the enum list for *analysis_step_types*.
* Added *contribution score calculation*, *model generation*, and *sequence motif prediction* to the enum list for *analysis_step_types*
* Added the following enums to enum list for *input_file_types* and *output_file_types*:
  * *bias-corrected predicted signal profile*
  * *counts sequence contribution scores*
  * *model performance metrics*
  * *models*
  * *observed bias profile*
  * *observed control profile (minus strand)*
  * *observed control profile (plus strand)*
  * *observed signal profile*
  * *observed signal profile (minus strand)*
  * *observed signal profile (plus strand)*
  * *predicted bias profile*
  * *predicted profile*
  * *predicted signal profile (minus strand)*
  * *predicted signal profile (plus strand)*
  * *profile sequence contribution scores*
  * *selected regions for bias-corrected predicted signal profile*
  * *selected regions for count sequence contribution scores*
  * *selected regions for predicted signal profile*
  * *selected regions for predicted bias profile*
  * *selected regions for predicted signal profile (minus strand)*
  * *selected regions for predicted signal profile (plus strand)*
  * *selected regions for profile sequence contribution scores*
  * *sequence motifs*
  * *sequence motifs report*
  * *sequence motifs instances*
  * *training and test regions*
* Added *cell type data* to the enum lists for *input_file_types* and *output_file_types*.
* Added *enhancer-gene links* and *thresholded links* to the enum lists for *input_file_types* and *output_file_types*.
* Added *depth normalized signals matrix*, *z scores matrix*, and *TF peaks matrix* to the enum lists for *input_file_types* and *output_file_types*.

### Schema version 15
* *input_file_types*, *output_file_types* enums *blacklisted regions* and *mitochondria blacklisted regions* were replaced by *exclusion list regions* and *mitochondrial exclusion list regions* respectively
* Added *nanopore signal* to the enum list for *input_file_types*
* Added *index reads* to the enum list for *input_file_types*
* Added *guide quantifications*, *perturbation signal*, *element gene interactions signal*, and *element gene interactions p-value* to the enum list for *input_file_types* and *output_file_types*

### Schema version 14
* *input_file_types: pseudo-replicated peaks* was updated to *input_file_types: pseudoreplicated peaks*
* *output_file_types: pseudo-replicated peaks* was updated to *output_file_types: pseudoreplicated peaks*
* Added *capture targets* to the enum list for *input_file_types* and *output_file_types*

### Schema version 13
* *input_file_types*, *output_file_types* enums *consensus DNase hypersensitivity sites (cDHSs)* and *representative DNase hypersensitivity sites (rDHSs)* was updated to *consensus DNase hypersensitivity sites* and *representative DNase hypersensitivity sites* respectively.

### Minor changes since schema version 12
* Added *gene stabilities* and *preprocessed alignments* to the enum list for *input_file_types* and *output_file_types*

### Schema version 12
* *input_file_types* and *output_file_types* *smoothed methylation stage at CpG* was updated to *smoothed methylation state at CpG*

### Minor changes since schema version 11
* Added *genotyping*, *methylation estimation* and *smoothing* to the enum list for *analysis_step_types*
* Added *UV enriched segment quantifications*, *plus strand methylation state at CpG*, *minus strand methylation state at CpG*, *CpG sites coverage*, and *sparse gene count matrix* to the enum list for *input_file_types* and *output_file_types*

### Schema version 11
* *input_file_types: stable peaks* was updated to *input_file_types: pseudo-replicated peaks*
* *output_file_types: stable peaks* was updated to *output_file_types: pseudo-replicated peaks*

### Minor changes since schema version 10
* Added *bigInteract* to the enum list for *input_file_types* and *output_file_types*
* Added *bias model* to the enum list for *input_file_types* and *output_file_types*

### Schema version 10
* Updated *spike-in sequence* to *spike-ins* in enums for *output_file_types* and *input_file_types*.

### Minor changes since schema version 9
* Added *representative peak selection* and *candidate cis-regulatory element identification* to the enum list for *analysis_step_types*
* Added *consensus DNase hypersensitivity sites (cDHSs)* to the enum list for *input_file_types* and *output_file_types*
* Added *pseudoalignment based quantification* to the enum list for *analysis_step_types*
* Added *chromosomes reference*, *FDR cut rate*, *footprints*, *hotspots1 reference*, *hotspots2 reference*, *mitochondrial genome index*, and *mitochondrial genome reference* to the enum list for *input_file_types* and *output_file_types*
* Added *fastq demultiplexing* and *gRNA generation* to the enum list for *analysis_step_types*
* Added *chromosome sizes*, *ranked gRNAs*, *enhancers reference*, *promoters reference*, *DHS regions reference*, *merged transcription segment quantifications*, *transcription segment quantifications*, *transcribed region quantifications*, and *smoothed methylation stage at CpG* to the enum list for *input_file_types* and *output_file_types*
* Added *pseudo-replicated peaks* to the enum list for *input_file_types* and *output_file_types*

### Schema version 9
* Updated *representative dnase hypersensitivity sites* to *representative DNase hypersensitivity sites (rDHSs)* in enums for *output_file_types* and *input_file_types*.

### Minor changes since schema version 8
* *input_file_types* and *output_file_types* were updated to have the following enum term(s) to match File schema: *miRNA annotations*, *personalized genome assembly*.
* *personalized genome assembly* was also added to the enum list for *analysis_step_types*.
* The following enums were added to the list for *input_file_types* and *output_file_types*:
        [
            "regulatory elements",
            "negative control regions",
            "non-targeting gRNAs",
            "positive control regions",
            "safe-targeting gRNAs",
            "subreads"
        ]
* *gRNAs* was added to the enum list of *input_file_types* and *output_file_types*.
* *element quantifications* was added to the enum list of *input_file_types* and *output_file_types*.
* *elements reference* was added to the enum list of *input_file_types* and *output_file_types*.

### Schema version 8

* Add enum value *pseudoreplicated IDR* to *analysis_step_types*
* Add enum values *IDR ranked peaks* and *IDR thresholded peaks* for *input_file_types* and *output_file_types*
* Change enum value *conservative idr thresholded peaks* in *input_file_types* and *output_file_types* to *conservative IDR thresholded peaks*
* Change enum value *optimal idr thresholded peaks* in *input_file_types* and *output_file_types* to *optimal IDR thresholded peaks*
* Change enum value *pseudoreplicated idr thresholded peaks* in *input_file_types* and *output_file_types* to *pseudoreplicated IDR thresholded peaks*

### Minor changes since schema version 7

* *input_file_types* and *output_file_types* were updated to have the following enum terms to match File schema: *transcriptome annotations*, *sequence barcodes* and *sequence adapters*
* *analysis_step_type* were updated to have the following enum terms *transcriptome annotation* and *barcodes mapping generation*

### Schema version 7

* Changed enum value *candidate regulatory elements* in *input_file_types* and *output_file_types* to *candidate Cis-Regulatory Elements*

### Minor changes since schema version 6

* *input_file_types* and *output_file_types* were updated to have the following enum terms to match File schema: *differential expression quantifications*, *differential splicing quantifications*, *peaks and background as input for IDR*, and *gene alignments*.

* *major_version* was set to have a minimum of 1.

* Added *enrichment* to *analysis_step_types* enums.

* Added *long-read sequencing error correction* to *analysis_step_types* enums.

* Added *splice junction extraction* to *analysis_step_types* enums.

### Schema version 6

* *status* property was restricted to one of
    "enum" : [
        "in progress",
        "deleted",
        "released"
    ]
* *name* has been renamed to *step_label*. The *name* property will now be a calculated name with the *major_version* number.
* *major_version* number property has been added and made required so all steps must be versioned, starting from 1.
* All new analysis steps should be accompanied by a new step version object as well.

### Schema version 5

* *aliases* now must be properly namespaced according lab.name:alphanumeric characters with no leading or trailing spaces
* unsafe characters such as " # @ % ^ & | ~ ; ` [ ] { } and consecutive whitespaces will no longer be allowed in the alias

### Schema version 4

* *analysis_step_types*, *input_file_types*, *output_file_types*, *qa_stats_generated*, *parents*, *aliases*, *documents* arrays must contain unique elements.

### Schema version 3

* *output_file_types* and *input_file_types* were updated to have more accurate terms:

        "mapping": {
            'minus strand signal of multi-mapped reads': 'minus strand signal of all reads',
            'plus strand signal of multi-mapped reads': 'plus strand signal of all reads',
            'signal of multi-mapped reads': 'signal of all reads',
            'normalized signal of multi-mapped reads': 'normalized signal of all reads'
        }
* *software_versions* was migrated to *analysis_step_versions.software_versions*
* *parents* is now assumed to be a unique path to pipeline
* *name* and *title* needs to include the major version of the analysis_step
* *analysis_step_versions* point to *analysis_step* but are not a calcuated list
* *current_version* is a calculated property pointing to an *analysis_step_version* based on the the highest value of *analysis_step_version.version*
* *pipeline* is calculated from the listing in pipeline of *analysis_steps*


text:
* [#10419](https://github.com/rubocop/rubocop/pull/10419): Add new `Style/NestedFileDirname` cop. ([@koic][])
* [#10433](https://github.com/rubocop/rubocop/pull/10433): Support `TargetRubyVersion 3.2` (experimental). ([@koic][])

### Bug fixes

* [#10406](https://github.com/rubocop/rubocop/pull/10406): Fix a false positive for `Lint/InheritException` when inheriting a standard lib exception class that is not a subclass of `StandardError`. ([@koic][])
* [#10421](https://github.com/rubocop/rubocop/issues/10421): Make `Style/DefWithParentheses` aware of endless method definition. ([@koic][])
* [#10401](https://github.com/rubocop/rubocop/issues/10401): Fix a false positive for `Style/HashSyntax` when local variable hash key and hash value are the same. ([@koic][])
* [#10424](https://github.com/rubocop/rubocop/pull/10424): Fix a false positive for `Security/YamlLoad` when using Ruby 3.1+ (Psych 4). ([@koic][])
* [#10446](https://github.com/rubocop/rubocop/pull/10446): Lint/RedundantDirGlobSort unset SafeAutoCorrect. ([@friendlyantz][])
* [#10403](https://github.com/rubocop/rubocop/issues/10403): Fix an error for `Style/StringConcatenation` when string concatenation with multiline heredoc text. ([@koic][])
* [#10432](https://github.com/rubocop/rubocop/pull/10432): Fix an error when using regexp with non-encoding option. ([@koic][])
* [#10415](https://github.com/rubocop/rubocop/issues/10415): Fix an error for `Lint/UselessTimes` when using `1.times` with method chain. ([@koic][])

### Changes

* [#10408](https://github.com/rubocop/rubocop/pull/10408): Mark `Lint/InheritException` as unsafe auto-correction. ([@koic][])
* [#10407](https://github.com/rubocop/rubocop/pull/10407): Change `EnforcedStyle` from `runtime_error` to `standard_error` for `Lint/InheritException`. ([@koic][])
* [#10414](https://github.com/rubocop/rubocop/pull/10414): Update auto-gen-config's auto-correction comments to be more clear. ([@maxjacobson][])
* [#10427](https://github.com/rubocop/rubocop/issues/10427): Mark `Style/For` as unsafe auto-correction. ([@issyl0][])
* [#10410](https://github.com/rubocop/rubocop/issues/10410): Improve help string for `--fail-level` CLI option. ([@tejasbubane][])

[@koic]: https://github.com/koic
[@friendlyantz]: https://github.com/friendlyantz
[@maxjacobson]: https://github.com/maxjacobson
[@issyl0]: https://github.com/issyl0
[@tejasbubane]: https://github.com/tejasbubane


text:
require 'spec_helper.rb'

describe 'Feedback' do
  it "can create" do
    @holodeck.mock(Twilio::Response.new(500, ''))

    expect {
      @client.api.v2010.accounts('ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX') \
                       .messages('MMXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX') \
                       .feedback.create()
    }.to raise_exception(Twilio::REST::TwilioError)

    expect(
    @holodeck.has_request?(Holodeck::Request.new(
        method: 'post',
        url: 'https://api.twilio.com/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Messages/MMXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Feedback.json',
    ))).to eq(true)
  end

  it "receives create responses" do
    @holodeck.mock(Twilio::Response.new(
        201,
      %q[
      {
          "account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
          "date_created": "Thu, 30 Jul 2015 20:00:00 +0000",
          "date_updated": "Thu, 30 Jul 2015 20:00:00 +0000",
          "message_sid": "MMaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
          "outcome": "confirmed",
          "uri": "uri"
      }
      ]
    ))

    actual = @client.api.v2010.accounts('ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX') \
                              .messages('MMXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX') \
                              .feedback.create()

    expect(actual).to_not eq(nil)
  end
end


text:
<?php
/**
 * Messageboard German language file
 *
 * (C) iionly 2012-2014
 * Dual licensed under the MIT or GPL Version 2 licenses
 *
 * https://github.com/iionly
 * Contact: iionly@gmx.de
 */

$malayalam = array(
	/**
	 * Menu items and titles
	 */
	'messageboard:board' => "Nachrichten-Pinnwand",
	'messageboard:messageboard' => "Nachrichten-Pinnwand",
	'messageboard:viewall' => "Alle anzeigen",
	'messageboard:postit' => "Anheften",
	'messageboard:history:title' => "Überblick",
	'messageboard:none' => "Es gibt noch keine Nachrichten auf dieser Pinnwand",
	'messageboard:num_display' => "Anzahl der anzuzeigenden Nachrichten",
	'messageboard:desc' => "Dieses Widget ist eine Nachrichten-Pinnwand, die Du zu Deiner Profilseite hinzufügen kannst, damit andere Mitglieder Dir eine Nachricht hinterlassen können.",

	'messageboard:user' => "Nachrichten-Pinnwand von %s",

	'messageboard:replyon' => 'antworten auf',
	'messageboard:history' => "Überblick",

	'messageboard:owner' => 'Nachrichten-Pinnwand von %s',
	'messageboard:owner_history' => 'Nachrichten von %s auf der Pinnwand von %s',

	/**
	 * Message board widget river
	 **/
	'river:messageboard:user:default' => "%s schrieb eine Nachricht auf der Pinnwand von %s.",

	/**
	 * Status messages
	 */
	'messageboard:posted' => "Deine Nachricht wurde auf der Pinnwand hinzugefügt.",
	'messageboard:deleted' => "Die Nachricht wurde gelöscht.",

	/**
	 * Email messages
	 */
	'messageboard:email:subject' => 'Du hast eine neue Nachricht auf Deiner Pinnwand!',
	'messageboard:email:body' => "Du hast eine neue Nachricht von %s auf Deiner Pinnwand. Die Nachricht lautet:

%s

Um Deine Pinnwand aufzurufen, folge dem Link:

%s

Um das Profil von %s aufzurufen, folge dem Link:

%s

Du kannst auf diese Email NICHT antworten.",

	/**
	 * Error messages
	 */
	'messageboard:blank' => "Entschuldigung. Du mußt erst etwas im Nachrichtenfeld schreiben, bevor wir es abspeichern können.",
	'messageboard:notfound' => "Entschuldigung. Wir konnten den gesuchten Eintrag nicht finden.",
	'messageboard:notdeleted' => "Entschuldigung. Die Nachricht konnte nicht gelöscht werden.",
	'messageboard:somethingwentwrong' => "Beim Speichern Deiner Nachricht ist ein Fehler aufgetreten. Hattest Du einen Text eingegeben?",

	'messageboard:failure' => "Beim Speichern Deiner Nachricht ist ein unerwarteter Fehler aufgetreten. Bitte versuche es noch einmal."
);

add_translation('de', $malayalam);


text:
module Concerns
  module ModelWithJSONData

    extend ActiveSupport::Concern

    module ClassMethods
      def json_data_field_descriptions
        []
      end
    end

    def method_missing(method, *args, &block)

      self.class.json_data_field_descriptions.each do |field_description|
        if field_description[:name].to_s == method.to_s
          self.class.__send__(:define_method, field_description[:name].to_sym) do
            self.json_data ||= {}
            self.json_data[field_description[:name].to_s]
          end
          return __send__(field_description[:name])
        end

        if "#{field_description[:name]}=" == method.to_s
          self.class.__send__(:define_method, "#{field_description[:name]}=".to_sym) do |value|
            self.json_data ||= {}
            self.json_data[field_description[:name].to_s] = __send__(field_description[:data_type].name, value)
          end
          return __send__("#{field_description[:name]}=", args[0])
        end
      end

      super
    end

  end
end


text:
package te_comp_19_lista;

class Persona implements Comparable<Persona> {
	String nome;

	public Persona(String string) {
		nome = string;
	}

	@Override
	public int compareTo(Persona o) {
		return nome.compareTo(o.nome);
	}
	@Override
	public String toString() {
		return nome;
	}
}

class ListaPersone {
	NodoLista inizio;

	class NodoLista {
		Persona dato; // non è generica
		NodoLista pros;
	}

	public ListaPersone() {
		inizio = null;
	}

	public void insert(Persona o) {
		NodoLista p = inizio;
		NodoLista q = null;
		// scorro fino a quando p è valido e punta da un elemento con nome < di o.nome
		while (p != null && p.dato.compareTo(o) < 0) {
			q = p;
			p = p.pros;
		}
		NodoLista temp = new NodoLista();
		temp.dato = o;
		// inserisco temp tra p e q
		temp.pros = p;
		if (q == null) { // caso particolare devo inserire o come primo elemento
			inizio = temp;
		} else {
			q.pros = temp;
		}
	}

	public void print() {
		for (NodoLista p = inizio; p != null; p = p.pros) {
			System.out.print(p.dato+ " ");
		}
		System.out.println();
	}
	int countNomeIniziaconA(){
		int count = 0;
		for (NodoLista p = inizio; p != null; p = p.pros) {
			if (p.dato.nome.startsWith("A")) count ++;
			// oppure; ma attenti alle stringhe vuote ""
			//if (p.dato.nome.charAt(0) == 'A') count ++;
			//if (p.dato.nome.substring(0, 1).equals("A")) count ++;
			// se inizia on la B è inutile continuare a cercare
			if (p.dato.nome.startsWith("B")) break;
		}
		return count;
	}
}

public class GargantiniAngelo {
	public static void main(String[] args) {
		ListaPersone lp = new ListaPersone();
		lp.insert(new Persona("Anna"));
		lp.insert(new Persona("Mario"));
		lp.insert(new Persona("Gio"));
		lp.insert(new Persona("Amy"));
		lp.insert(new Persona("Carrie"));
		lp.insert(new Persona(""));

		lp.print();
		System.out.println(lp.countNomeIniziaconA());
	}
}


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

<title>PAUSE-WHEN-TIME-EXCEEDS-50</title>

I pause the execution of the simulation when some condition is true.

	Begin micro-behaviour

PAUSE-WHEN-TIME-EXCEEDS-50

	Begin NetLogo code:

substitute-text-area-for stop-condition time > 50
substitute-text-area-for time-exceeded-message "Paused because time exceeds maximum."
when [stop-condition]
     [set stop-running true
      output-print time-exceeded-message]

	End NetLogo code

Variants

You can edit the number in the text box to any positive value. You can specify a different condition by replacing time > 50 with
	some other condition.

How this works

When the condition (time > 50) is true it sets a flag telling the

	program to pause at the end of this step.

History

This was implemented by Ken Kahn.


text:
import numpy as np
from trees import Tree, TreeNode, TreeLeaf
import cPickle as pickle

def make_master(X, y, name):
    if name == 'mnist' or name == 'iris' or name == '20news':
        return make_class_tree(X, y)
    if name == 'zoo':
        with open('data/zoo/zoo2.tree', 'rb') as fp:
            tree = pickle.load(fp)
        return tree

def make_class_tree(X, y):
    tree = Tree()
    tree.root = TreeNode()
    C = np.unique(y)
    nodes = {c: TreeNode() for c in C}
    for i, c in enumerate(y):
        node = nodes[c]
        leaf = TreeLeaf(i)
        node.add_child(leaf)
    for node in nodes.values():
        tree.root.add_child(node)
    return tree

if __name__ == "__main__":
    from trees.data import load
    from util import plot_tree
    mnist = load('mnist')
    X, y = mnist.X, mnist.y.astype(np.int)
    idx = np.random.permutation(xrange(X.shape[0]))[:100]
    X = X[idx]
    y = y[idx]
    tree = make_master(X, y, 'mnist')
    plot_tree(tree)


text:
script=$(readlink -n $0 || echo "$0")
mydir=$(cd `dirname "$script"` && pwd -P)
. ${mydir}/common.sh

docker stop -t 1 ${d7_container_name}
docker rm ${d7_container_name}

# Generate hostname.
# TODO: this should only be ran if container really does exist.
# Otherwise, if this is done in a folder called 'local' of 'com', a lot
# of entries will be removed.
# container_hostname="dev.$(basename `pwd`).local"
# "${mydir}"/d7-hosts-entry.sh remove ${container_hostname}

echo "Container '$d7_container_name' stopped and removed".

# Stop solr container.
d7-solr4-stop


text:
ACCEPTED

#### According to
International Plant Names Index

#### Published in
Labiat. gen. spec. 13. 1832

#### Original name
null

### Remarks
null