text:
/**
 * @author zhixin wen <wenzhixin2010@gmail.com>
 */

.ms-parent {
    display: inline-block;
    position: relative;
    vertical-align: middle;
    padding:0;
}

.ms-choice {
    display: block;
    width: 100%;
    height: 26px;
    padding: 0;
    overflow: hidden;
    cursor: pointer;

    text-align: left;
    white-space: nowrap;
    line-height: 26px;
    color: #444;
    text-decoration: none;
    -webkit-border-radius: 4px;
    -moz-border-radius: 4px;
    border-radius: 4px;
    background-color: #fff;
    border: 1px solid #c8c7cc;
    border-radius: 0 0 0 0;

    border-width: 1px !important;
}

.ms-choice.disabled {
    background-color: #f4f4f4;
    background-image: none;
    border: 1px solid #ddd;
    cursor: default;
}

.ms-choice > span {
    position: absolute;
    top: 0;
    left: 0;
    right: 20px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
    padding-left: 8px;
}

.ms-choice > div {
    position: absolute;
    top: 0;
    right: 0;
    width: 20px;
    height: 25px;
    background: url('/images/multiple-select.png') left top no-repeat;
}

.ms-choice > div.open {
    background: url('/images/multiple-select.png') right top no-repeat;
}

.ms-drop {
    width: 100%;
    overflow: hidden;
    display: none;
    margin-top: -1px;
    padding: 0;
    position: absolute;
    z-index: 1000;
    background: #f8f8f8;
    color: #000;
    border-bottom-color: #3c763d !important;
    border-bottom-width: 1px !important;
    border-bottom-style: dotted;
    border-color: #3c763d !important;
    border-width: 1px !important;
    border-style: dotted;
}

.ms-drop.bottom {
    top: 100%;
    -webkit-box-shadow: 0 4px 5px rgba(0, 0, 0, .15);
    -moz-box-shadow: 0 4px 5px rgba(0, 0, 0, .15);
    box-shadow: 0 4px 5px rgba(0, 0, 0, .15);
}

.ms-drop.top {
    bottom: 100%;
    -webkit-box-shadow: 0 -4px 5px rgba(0, 0, 0, .15);
    -moz-box-shadow: 0 -4px 5px rgba(0, 0, 0, .15);
    box-shadow: 0 -4px 5px rgba(0, 0, 0, .15);
}

.ms-search {
    display: inline-block;
    margin: 0;
    min-height: 26px;
    padding: 4px;
    position: relative;
    white-space: nowrap;
    width: 100%;
    z-index: 10000;
}

.ms-search input {
    width: 100%;
    height: auto !important;
    min-height: 24px;
    padding: 0 20px 0 5px;
    margin: 0;
    outline: 0;
    font-family: sans-serif;
    font-size: 1em;
    border: 1px solid #aaa;
    -webkit-border-radius: 0;
    -moz-border-radius: 0;
    border-radius: 0;
    -webkit-box-shadow: none;
    -moz-box-shadow: none;
    box-shadow: none;
    background: #fff url('multiple-select.png') no-repeat 100% -22px;
    background: url('multiple-select.png') no-repeat 100% -22px, -webkit-gradient(linear, left bottom, left top, color-stop(0.85, white), color-stop(0.99, #eeeeee));
    background: url('multiple-select.png') no-repeat 100% -22px, -webkit-linear-gradient(center bottom, white 85%, #eeeeee 99%);
    background: url('multiple-select.png') no-repeat 100% -22px, -moz-linear-gradient(center bottom, white 85%, #eeeeee 99%);
    background: url('multiple-select.png') no-repeat 100% -22px, -o-linear-gradient(bottom, white 85%, #eeeeee 99%);
    background: url('multiple-select.png') no-repeat 100% -22px, -ms-linear-gradient(top, #ffffff 85%, #eeeeee 99%);
    background: url('multiple-select.png') no-repeat 100% -22px, linear-gradient(top, #ffffff 85%, #eeeeee 99%);
}

.ms-search, .ms-search input {
    -webkit-box-sizing: border-box;
    -khtml-box-sizing: border-box;
    -moz-box-sizing: border-box;
    -ms-box-sizing: border-box;
    box-sizing: border-box;
}

.ms-drop ul {
    overflow: auto;
    margin: 0;
    padding: 5px 8px;
}

.ms-drop ul > li {
    list-style: none;
    display: list-item;
    background-image: none;
    position: static;
}

.ms-drop ul > li .disabled {
    opacity: .35;
    filter: Alpha(Opacity=35);
}

.ms-drop ul > li.multiple {
    display: block;
    float: left;
}

.ms-drop ul > li.group {
    clear: both;
}

.ms-drop ul > li.multiple label {
    width: 100%;
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ms-drop ul > li label {
    font-weight: normal;
    display: block;
    white-space: nowrap;
}

.ms-drop ul > li label.optgroup {
    font-weight: bold;
}

.ms-drop input[type="checkbox"] {
    vertical-align: middle;
}

.ms-drop .ms-no-results {
    display: none;
}

.ms-drop ul li label input[type="checkbox"]::before {
    content: "\A";
    font-family: "Ionicons";
    color: rgba(27, 34, 44, 0.88);
    font-size: 10px;
    line-height: 16px;
    text-align: center;
    display: inline-block;
    vertical-align: middle;
    position: relative;
    border-radius: 2.5px;
    background: #fff;
    height: 16px;
    width: 16px;
    border: 1px solid rgba(27, 34, 44, 0.16);
    margin-right: 0;
    transition: all 0.05s ease-in-out;
}
.ms-drop ul li.selected label input[type="checkbox"]::before {
    content: "\f121";
    color: rgba(27, 34, 44, 0.88);
    background: #fff;
    transition: all 0.05s ease-in-out;
    line-height: 14px;
}
.ms-drop ul li input[type="radio"],
.ms-drop ul li input[type="checkbox"] {
    line-height: 0!important;
    margin: 0;
}

.ms-drop ul > li label {
  border-radius: 2px;
  font-size: 13px;
  line-height: 16px;
  padding: 8px;
}
.ms-drop ul > li label input[type="checkbox"] {
  margin-right: 16px!important;
  width: 16px;
  height: 16px;
  line-height: 16px;
  background: #fff none repeat scroll 0 0;
  border: 1px solid #e0e0e0;
  border-radius: 2px;
  color: #212121;
  content: "\a ";
  display: inline-block;
  font-family: "Ionicons";
  font-size: 10px;
  position: relative;
  text-align: center;
  transition: all 0.05s ease-in-out 0s;
  vertical-align: middle;
  float: left;
}

.ms-choice {
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.01) inset !important;
  height: 32px!important;
  line-height: 32px!important;
  padding: 6px 8px;
  border-radius: 2px!important;
  width: 100%;
    border: 1px solid #c8c7cc;
    border-radius: 0 0 0 0;

}
.ms-choice > div {
  height: 32px!important;
  top: 4px!important;
}
.ms-choice:focus {
  background: #fff none repeat scroll 0 0;
  border: 1px solid #03a9f4;
  box-shadow: 0 0 1px 0 #c5ecfe !important;
}

select[multiple] {
    border-radius: 2.5px;
    border: 1px solid #edeff0;
}

select[multiple], select[size] {
    height: auto;
}
input, button, select, textarea {
    font-family: inherit;
    font-size: inherit;
    line-height: inherit;
}
button, select {
    text-transform: none;
}
button, input, optgroup, select  {
    color: inherit;
    font: inherit;
    margin: 0;
}

/*  selectboxit  */
select.form-control {
    color: rgba(27, 34, 44, 0.72);
    padding: 6px 6px;
}
.form-control {
    border: 1px solid #edeff0;
    padding: 6px 8px;
    color: rgba(27, 34, 44, 0.72);
    height: 32px;
    background: #fff;
    box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.02) !important;
}
.form-control {
    display: block;
    width: 100%;
    height: 33px;
    padding: 6px 8px;
    font-size: 12.5px;
    line-height: 1.54;
    color: rgba(27, 34, 44, 0.88);
    background-color: #ffffff;
    background-image: none;
    border: 1px solid #edeff0;
    border-radius: 2.5px;
    -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
    box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
    -webkit-transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s;
    -o-transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s;
    transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s;
}

.selectboxit-container.selectboxit-container, .selectboxit-options {
    width: 100%!important;
}
.selectboxit-container {
    position: relative;
    display: inline-block;
    vertical-align: top;
}


text:
package brooklyn.entity.effector;

import brooklyn.config.ConfigKey;
import brooklyn.entity.basic.ConfigKeys;
import brooklyn.entity.basic.EntityInternal;
import brooklyn.entity.basic.EntityLocal;
import brooklyn.entity.proxying.EntityInitializer;
import brooklyn.event.AttributeSensor;
import brooklyn.event.Sensor;
import brooklyn.event.basic.Sensors;
import brooklyn.util.config.ConfigBag;
import brooklyn.util.time.Duration;

import com.google.common.annotations.Beta;
import com.google.common.base.Preconditions;

/** Entity initializer which adds a sensor to an entity's type definition.
 * Subclasses must add the feed; this class does not do that.
 * @since 0.7.0 */
@Beta
public class AddSensor<RT,T extends Sensor<RT>> implements EntityInitializer {
    protected final T sensor;

    public static final ConfigKey<String> SENSOR_NAME = ConfigKeys.newStringConfigKey("name");
    public static final ConfigKey<Duration> SENSOR_PERIOD = ConfigKeys.newConfigKey(Duration.class, "period", "Period, including units e.g. 1m or 5s or 200ms");

    // TODO
//    public static final ConfigKey<String> SENSOR_TYPE = ConfigKeys.newStringConfigKey("targetType");

    public AddSensor(T sensor) {
        this.sensor = Preconditions.checkNotNull(sensor, "sensor");
    }

    @Override
    public void apply(EntityLocal entity) {
        ((EntityInternal)entity).getMutableEntityType().addSensor(sensor);
    }

    public static <T> AttributeSensor<T> newSensor(Class<T> type, ConfigBag params) {
        String name = Preconditions.checkNotNull(params.get(SENSOR_NAME), "name must be supplied when defining a sensor");
        return Sensors.newSensor(type, name);
    }

}

redpajama_set_name: RedPajamaGithub


text:
using System.Runtime.Serialization;

namespace StrumpyShaderEditor
{
    [DataContract(Namespace = "http://strumpy.net/ShaderEditor/")]
    [NodeMetaData("Normalize", "Function", typeof(NormalizeNode),"Sets the length of the input to one. Most of the time you only want this to occur for the first three channels, so it is likely pertinent to mask out alpha. A normalized vector multiplied by it's length yields the original, and this function is primarily used for combining directions, though can be used to take advantage of certain compression schemes.")]
    public class NormalizeNode : FunctionOneInput {
        private const string NodeName = "Normalize";

        public override string NodeTypeName
        {
            get{ return NodeName; }
        }

        public override string FunctionName
        {
            get{ return "normalize"; }
        }
    }
}


text:
syncDevSpace
============

syncDevSpace is a tool to sync development directories between a workspace, a server, and a crypted place used as "backup storage", like Dropbox or whatever.

TODO
----

- [ ] Handling arguments from command line.
- [x] MOAR COMMENTZ


text:
package net.ontrack.core.model;

import lombok.Data;

@Data
public class OptionalBuildSummary {

    private final BuildSummary build;

}


text:
var gulp = require("gulp"),
    runSequence = require("run-sequence"),
    visualsCommon = require("./visualsCommon.js");

gulp.task("run:playground", function (callback) {
    visualsCommon.runHttpServer({
        path: "src/Clients/PowerBIVisualsPlayground"
    }, callback);
});

gulp.task("build:run:playground", ["build:visuals"], function (callback) {
    runSequence("run:playground", callback);
});


text:
#region Usings

using System;
using System.Collections.Generic;
using System.Linq;
using Xunit;

#endregion

namespace Extend.Testing
{
    // ReSharper disable once InconsistentNaming
    public partial class IDictionaryExTest
    {
        [Fact]
        public void GetAllKeysTest()
        {
            var dictionary = new Dictionary<String, String>
            {
                { RandomValueEx.GetRandomString(), RandomValueEx.GetRandomString() },
                { RandomValueEx.GetRandomString(), RandomValueEx.GetRandomString() }
            };

            var allKeys = dictionary.GetAllKeys()
                                    .ToList();
            Assert.True( dictionary.All( x => allKeys.Contains( x.Key ) ) );
        }

        [Fact]
        public void GetAllKeysTestNullCheck()
        {
            Dictionary<Object, Object> dictionary = null;
            // ReSharper disable once AssignNullToNotNullAttribute
            // ReSharper disable once ReturnValueOfPureMethodIsNotUsed
            Action test = () => dictionary.GetAllKeys();

            Assert.Throws<ArgumentNullException>( test );
        }
    }
}


text:
var util   = require('util')
var assert = require('assert')
var common = require('./common.js')

var aws = require("../lib/aws.js");

function createClient() {
  return aws.createSimpleDBClient(common.awskeyid, common.secretkey, {secure:false})
}

function createDomain(name,callback) {
  var sdb = createClient()
  sdb.call("CreateDomain", {DomainName:name}, callback)
}

function deleteDomain(name,callback) {
  var sdb = createClient()
  sdb.call("DeleteDomain", {DomainName:name}, callback)
}

if( 'create' == process.argv[2] ) {
  util.debug('Creating domains:...');
  createDomain('test',function(result){
    util.debug(JSON.stringify(result))
    util.debug('test')

    createDomain('test1',function(result){
      util.debug(JSON.stringify(result))
      util.debug('test1')

      createDomain('test2',function(result){
        util.debug(JSON.stringify(result))
        util.debug('test2')
      })
    })
  })
}
else if( 'delete' == process.argv[2] ) {
  util.debug('Deleting domains:...');
  deleteDomain('test',function(result){
    util.debug(JSON.stringify(result))
    util.debug('test')

    deleteDomain('test1',function(result){
      util.debug(JSON.stringify(result))
      util.debug('test1')

      deleteDomain('test2',function(result){
        util.debug(JSON.stringify(result))
        util.debug('test2')
      })
    })
  })
}

module.exports = {
  createClient: function() {
    var sdb = createClient()
    assert.isNotNull(sdb)
  },
  listDomains: function() {
    var sdb = createClient()
    sdb.call("ListDomains", {}, function(result) {
      util.debug(JSON.stringify(result))
      assert.ok( 0 < result.ListDomainsResult.DomainName.length )
    })
  },
  domainMetaData: function() {
    var sdb = createClient()
    sdb.call("DomainMetadata", {DomainName:'test'}, function(result) {
      util.debug(JSON.stringify(result))
      assert.ok(!!result.DomainMetadataResult)
    })
  },
  putAndGetAttributes: function() {
    var sdb = createClient()
    sdb.call("PutAttributes", {
      DomainName:'test',
      ItemName:'item1',

      'Attribute.0.Name':'foo',
      'Attribute.0.Value':'onefoo',
      'Attribute.0.Replace':'true',

      'Attribute.1.Name':'bar',
      'Attribute.1.Value':'onebar',
      'Attribute.1.Replace':'true',

      'Attribute.2.Name':'bar',
      'Attribute.2.Value':'twobar',
      'Attribute.2.Replace':'true',

    }, function(result) {
      util.debug(JSON.stringify(result))
      assert.ok(!result.Errors)

      sdb.call("GetAttributes", {
        DomainName:'test',
        ItemName:'item1',

      }, function(result) {
        util.debug(JSON.stringify(result))
        assert.ok( 3 == result.GetAttributesResult.Attribute.length )
      })
    })
  },
  deleteAttributes: function() {
    var sdb = createClient()
    sdb.call("PutAttributes", {
      DomainName:'test1',
      ItemName:'item1',

      'Attribute.0.Name':'foo',
      'Attribute.0.Value':'onefoo',
      'Attribute.0.Replace':'true',

      'Attribute.1.Name':'bar',
      'Attribute.1.Value':'onebar',
      'Attribute.1.Replace':'true',

    }, function(result) {
      util.debug(JSON.stringify(result))
      assert.ok(!result.Errors)

      sdb.call("DeleteAttributes", {
        DomainName:'test1',
        ItemName:'item1',
        'Attribute.1.Name':'bar',
      }, function(result) {

        sdb.call("GetAttributes", {
          DomainName:'test1',
          ItemName:'item1',

        }, function(result) {
          util.debug(JSON.stringify(result))
          assert.ok( !!result.GetAttributesResult.Attribute )
        })
      })
    })
  },
  batchPutAndSelect: function() {
    var sdb = createClient()
    sdb.call("BatchPutAttributes", {
      DomainName:'test2',

      'Item.0.ItemName':'foo',
      'Item.0.Attribute.0.Name':'val',
      'Item.0.Attribute.0.Value':'oneval',
      'Item.0.Attribute.0.Replace':'true',

      'Item.1.ItemName':'bar',
      'Item.1.Attribute.0.Name':'val',
      'Item.1.Attribute.0.Value':'twoval',
      'Item.1.Attribute.0.Replace':'true',

      'Item.2.ItemName':'woz',
      'Item.2.Attribute.0.Name':'val',
      'Item.2.Attribute.0.Value':'different',
      'Item.2.Attribute.0.Replace':'true',

    }, function(result) {
      util.debug(JSON.stringify(result))
      assert.ok(!result.Errors)

      sdb.call("Select", {
        SelectExpression:"select * from test2 where val like '%val%'",

      }, function(result) {
        util.debug(JSON.stringify(result))
        assert.ok( 2 == result.SelectResult.Item.length )
      })
    })
  }
}


text:
package org.apache.spark.sql.secondaryindex.util;

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

import org.apache.spark.sql.secondaryindex.exception.IndexTableExistException;
import org.apache.carbondata.core.metadata.schema.indextable.IndexTableInfo;

public class IndexTableUtil {
  /**
   * adds index table info into parent table properties
   *
   */
  public static String checkAndAddIndexTable(String gsonData, IndexTableInfo newIndexTable)
      throws IndexTableExistException {
    IndexTableInfo[] indexTableInfos = IndexTableInfo.fromGson(gsonData);
    if (null == indexTableInfos) {
      indexTableInfos = new IndexTableInfo[0];
    }
    List<IndexTableInfo> indexTables =
        new ArrayList<>(Arrays.asList(indexTableInfos));
    for (IndexTableInfo indexTable : indexTableInfos) {
      if (indexTable.getIndexCols().size() == newIndexTable.getIndexCols().size()) {
        //If column order is not same, then also index table creation should be successful
        //eg., index1 is a,b,d and index2 is a,d,b. Both table creation should be successful
        boolean isColumnOrderSame = true;
        for (int i = 0; i < indexTable.getIndexCols().size(); i++) {
          if (!indexTable.getIndexCols().get(i)
              .equalsIgnoreCase(newIndexTable.getIndexCols().get(i))) {
            isColumnOrderSame = false;
            break;
          }
        }
        if (isColumnOrderSame) {
          throw new IndexTableExistException("Index Table with selected columns already exist");
        }
      }
    }
    indexTables.add(newIndexTable);
    return IndexTableInfo.toGson(indexTables.toArray(new IndexTableInfo[0]));
  }
}


text:
#ifndef IBL_CUBEMAPIBL_H
#define IBL_CUBEMAPIBL_H

#include <math/vec3.h>

#include <utils/Slice.h>
#include <utils/compiler.h>

#include <vector>

#include <stdint.h>
#include <stddef.h>

namespace utils {
class JobSystem;
} // namespace utils

namespace filament {
namespace ibl {

class Cubemap;
class Image;

/**
 * Generates cubemaps for the IBL.
 */
class UTILS_PUBLIC CubemapIBL {
public:
    typedef void (*Progress)(size_t, float, void*);

    /**
     * Computes a roughness LOD using prefiltered importance sampling GGX
     *
     * @param dst               the destination cubemap
     * @param levels            a list of prefiltered lods of the source environment
     * @param linearRoughness   roughness
     * @param maxNumSamples     number of samples for importance sampling
     * @param updater           a callback for the caller to track progress
     */
    static void roughnessFilter(
            utils::JobSystem& js, Cubemap& dst, const utils::Slice<Cubemap>& levels,
            float linearRoughness, size_t maxNumSamples, math::float3 mirror, bool prefilter,
            Progress updater = nullptr, void* userdata = nullptr);

    static void roughnessFilter(
            utils::JobSystem& js, Cubemap& dst, const std::vector<Cubemap>& levels,
            float linearRoughness, size_t maxNumSamples, math::float3 mirror, bool prefilter,
            Progress updater = nullptr, void* userdata = nullptr);

    //! Computes the "DFG" term of the "split-sum" approximation and stores it in a 2D image
    static void DFG(utils::JobSystem& js, Image& dst, bool multiscatter, bool cloth);

    /**
     * Computes the diffuse irradiance using prefiltered importance sampling GGX
     *
     * @note Usually this is done using spherical harmonics instead.
     *
     * @param dst               the destination cubemap
     * @param levels            a list of prefiltered lods of the source environment
     * @param maxNumSamples     number of samples for importance sampling
     * @param updater           a callback for the caller to track progress
     *
     * @see CubemapSH
     */
    static void diffuseIrradiance(utils::JobSystem& js, Cubemap& dst, const std::vector<Cubemap>& levels,
            size_t maxNumSamples = 1024, Progress updater = nullptr, void* userdata = nullptr);

    // for debugging. ignore.
    static void brdf(utils::JobSystem& js, Cubemap& dst, float linearRoughness);
};

} // namespace ibl
} // namespace filament

#endif /* IBL_CUBEMAPIBL_H */


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

import logging
import sys

import pkg_resources

from pants.base.build_environment import pants_version
from pants.base.exceptions import BuildConfigurationError
from pants.goal.goal import Goal
from pants.init.extension_loader import load_backends_and_plugins
from pants.init.plugin_resolver import PluginResolver
from pants.logging.setup import setup_logging
from pants.option.global_options import GlobalOptionsRegistrar
from pants.subsystem.subsystem import Subsystem

logger = logging.getLogger(__name__)

class OptionsInitializer(object):
  """Initializes backends/plugins, global options and logging.

  This class uses a class-level cache for the internally generated `BuildConfiguration` object,
  which permits multiple invocations in the same runtime context without re-incurring backend &
  plugin loading, which can be expensive and cause issues (double task registration, etc).
  """

  # Class-level cache for the `BuildConfiguration` object.
  _build_configuration = None

  def __init__(self, options_bootstrapper, working_set=None, exiter=sys.exit):
    """
    :param OptionsBootStrapper options_bootstrapper: An options bootstrapper instance.
    :param pkg_resources.WorkingSet working_set: The working set of the current run as returned by
                                                 PluginResolver.resolve().
    :param func exiter: A function that accepts an exit code value and exits (for tests).
    """
    self._options_bootstrapper = options_bootstrapper
    self._working_set = working_set or PluginResolver(self._options_bootstrapper).resolve()
    self._exiter = exiter

  @classmethod
  def _has_build_configuration(cls):
    return cls._build_configuration is not None

  @classmethod
  def _get_build_configuration(cls):
    return cls._build_configuration

  @classmethod
  def _set_build_configuration(cls, build_configuration):
    cls._build_configuration = build_configuration

  @classmethod
  def reset(cls):
    cls._set_build_configuration(None)

  def _setup_logging(self, quiet, level, log_dir):
    """Initializes logging."""
    # N.B. quiet help says 'Squelches all console output apart from errors'.
    level = 'ERROR' if quiet else level.upper()
    setup_logging(level, console_stream=sys.stderr, log_dir=log_dir)

  def _load_plugins(self, working_set, python_paths, plugins, backend_packages):
    """Load backends and plugins.

    :returns: A `BuildConfiguration` object constructed during backend/plugin loading.
    """
    # Add any extra paths to python path (e.g., for loading extra source backends).
    for path in python_paths:
      if path not in sys.path:
        sys.path.append(path)
        pkg_resources.fixup_namespace_packages(path)

    # Load plugins and backends.
    return load_backends_and_plugins(plugins, working_set, backend_packages)

  def _install_options(self, options_bootstrapper, build_configuration):
    """Parse and register options.

    :returns: An Options object representing the full set of runtime options.
    """
    # TODO: This inline import is currently necessary to resolve a ~legitimate cycle between
    # `GoalRunner`->`EngineInitializer`->`OptionsInitializer`->`GoalRunner`.
    from pants.bin.goal_runner import GoalRunner

    # Now that plugins and backends are loaded, we can gather the known scopes.

    # Gather the optionables that are not scoped to any other.  All known scopes are reachable
    # via these optionables' known_scope_infos() methods.
    top_level_optionables = ({GlobalOptionsRegistrar} |
                             GoalRunner.subsystems() |
                             build_configuration.subsystems() |
                             set(Goal.get_optionables()))

    known_scope_infos = sorted({
      si for optionable in top_level_optionables for si in optionable.known_scope_infos()
    })

    # Now that we have the known scopes we can get the full options.
    options = options_bootstrapper.get_full_options(known_scope_infos)

    distinct_optionable_classes = sorted({si.optionable_cls for si in known_scope_infos},
                                         key=lambda o: o.options_scope)
    for optionable_cls in distinct_optionable_classes:
      optionable_cls.register_options_on_scope(options)

    # Make the options values available to all subsystems.
    Subsystem.set_options(options)

    return options

  def setup(self, init_logging=True):
    """Initializes logging, loads backends/plugins and parses options.

    :param bool init_logging: Whether or not to initialize logging as part of setup.
    :returns: A tuple of (options, build_configuration).
    """
    global_bootstrap_options = self._options_bootstrapper.get_bootstrap_options().for_global_scope()

    if global_bootstrap_options.pants_version != pants_version():
      raise BuildConfigurationError(
        'Version mismatch: Requested version was {}, our version is {}.'
        .format(global_bootstrap_options.pants_version, pants_version())
      )

    # Get logging setup prior to loading backends so that they can log as needed.
    if init_logging:
      self._setup_logging(global_bootstrap_options.quiet,
                          global_bootstrap_options.level,
                          global_bootstrap_options.logdir)

    # Conditionally load backends/plugins and materialize a `BuildConfiguration` object.
    if not self._has_build_configuration():
      build_configuration = self._load_plugins(self._working_set,
                                               global_bootstrap_options.pythonpath,
                                               global_bootstrap_options.plugins,
                                               global_bootstrap_options.backend_packages)
      self._set_build_configuration(build_configuration)
    else:
      build_configuration = self._get_build_configuration()

    # Parse and register options.
    options = self._install_options(self._options_bootstrapper, build_configuration)

    return options, build_configuration


text:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace UrbanIssues.Data.Models
{
	public class Issue
	{
		private ICollection<Comment> comments;
		private ICollection<Image> images;

		public Issue()
		{
			this.comments = new HashSet<Comment>();
			this.images = new HashSet<Image>();
		}

		public int Id { get; set; }

        public string Title { get; set; }

		public string Description { get; set; }

		public DateTime CreatedOn { get; set; }

		public string UserId { get; set; }

		public virtual User User { get; set; }

		public int Likes { get; set; }

		public int CategoryId { get; set; }

		public virtual Category Category { get; set; }

		public int CityId { get; set; }

		public virtual City City { get; set; }

		public ICollection<Comment> Comments
		{
			get
			{
				return this.comments;
			}
			set
			{
				this.comments = value;
			}
		}

		public ICollection<Image> Images
		{
			get
			{
				return this.images;
			}
			set
			{
				this.images = value;
			}
		}
	}
}


text:
name: Bug Report
about: You must complete this template or your report will be automatically closed.
title: ''
labels: Bug - Help Wanted!
assignees: ''

---

**I have read the [guidelines for contributing](https://github.com/jonkykong/SideMenu/blob/master/.github/CONTRIBUTING.md) and I understand**
- [ ] My issue is happening in the **latest version** of SideMenu (older versions are no longer maintained).
- [ ] My issue was **not** solved in the [README](https://github.com/jonkykong/SideMenu/blob/master/README.md).
- [ ] My issue can **not** be answered on [stackoverflow.com](stackoverflow.com).
- [ ] My issue is **not** a request for new functionality that I am unwilling to build and contribute with a pull request.
- [ ] My issue **is** reproducible in the [demo project](https://github.com/jonkykong/SideMenu/tree/master/Example).

**Describe the bug**
A clear and concise description of what the bug is.

**To Reproduce**
Steps to reproduce the behavior:
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error

**Expected behavior**
A clear and concise description of what you expected to happen.

**Screenshots**
If applicable, add screenshots to help explain your problem.

**Additional context**
Add any other context about the problem here.


text:
package gov.nih.nci.lv.convert;

import gov.nih.nci.lv.domain.Investigator;
import gov.nih.nci.lv.dto.InvestigatorDto;

/**
 *
 * @author NAmiruddin
 *
 */
public class InvestigatorConverter extends AbstractConverter<InvestigatorDto, Investigator> {

    @Override
    public Investigator convertToBO(InvestigatorDto dto) {
        Investigator inv = new Investigator();
        inv.setId(dto.getId());
        inv.setFirstName(dto.getFirstName());
        inv.setLastName(dto.getLastName());
        inv.setCity(dto.getCity());
        inv.setCountryCode(dto.getCountryCode());
        inv.setNciIdentifier(dto.getNciIdentifier());
        inv.setPostalCode(dto.getPostalCode());
        inv.setStreetAddress(dto.getStreetAddress());
        inv.setTelecomAddress(dto.getTelecomAddress());
        inv.setCtomUpdateDate(dto.getCtomUpdateDate());
        return inv;
    }

    @Override
    public InvestigatorDto convertToDTO(Investigator bo) {
        InvestigatorDto dto = new InvestigatorDto();
        dto.setId(bo.getId());
        dto.setFirstName(bo.getFirstName());
        dto.setLastName(bo.getLastName());
        dto.setCity(bo.getCity());
        dto.setCountryCode(bo.getCountryCode());
        dto.setNciIdentifier(bo.getNciIdentifier());
        dto.setPostalCode(bo.getPostalCode());
        dto.setStreetAddress(bo.getStreetAddress());
        dto.setTelecomAddress(bo.getTelecomAddress());
        dto.setCtomUpdateDate(bo.getCtomUpdateDate());
        return dto;

    }

}


text:
<?php

namespace BwtTeam\LaravelConsole\Commands;

use Illuminate\Console\Command;
use Symfony\Component\Console\Input\InputArgument;

/**
 * Class AppCleaning
 * @package BwtTeam\LaravelConsole\Commands
 *
 * @example php artisan app:cleaning db,files
 */
class AppCleaning extends Command
{
    const OPTION_ALL = 'all';

    /**
     * The name and signature of the console command.
     *
     * @var string
     */
    protected $name = 'app:cleaning';

    /**
     * The console command description.
     *
     * @var string
     */
    protected $description = 'Cleaning application';

    /** @var \Illuminate\Config\Repository */
    protected $config;

    /**
     * @var array
     */
    protected $sections = [
        'files' => 'storage',
        'db' => 'database',
    ];

    /**
     * Create a new command instance.
     *
     * @param \Illuminate\Config\Repository $config
     */
    public function __construct(\Illuminate\Config\Repository $config)
    {
        $this->config = $config;

        parent::__construct();
    }

    /**
     * Execute the console command.
     *
     * @return mixed
     */
    public function handle()
    {
        $inputSections = explode(',', $this->argument('section'));
        $sections = $this->getSectionsByArgument($inputSections);
        if (count($sections) > 0 && $this->confirm('Do you really want to cleaning application?')) {
            foreach ($sections as $section) {
                call_user_func([$this, "clean" . ucfirst($section)]);
            }
        }

        return true;
    }

    /**
     * @param $argument
     *
     * @return array
     * @internal param $option
     *
     */
    protected function getSectionsByArgument($argument)
    {
        if ($argument == self::OPTION_ALL) {
            return $this->sections;
        } elseif (is_array($argument)) {
            return call_user_func_array('array_merge', array_map([$this, 'getSectionsByArgument'], $argument));
        } elseif (array_key_exists($argument, $this->sections)) {
            return [$argument => $this->sections[$argument]];
        }

        $this->error("Section with name \"$argument\" does not registered");
        return [];
    }

    /**
     * @return bool
     */
    protected function cleanDatabase()
    {
        $config = $this->config->get('console-commands.app_cleaning.db');
        \DB::statement("SET FOREIGN_KEY_CHECKS=0");

        $tables = \DB::select('SHOW TABLES');
        $excludeTables = array_merge([$this->config->get('database.migrations')], array_get($config, 'exclude', []));

        foreach ($tables as $table) {
            $table_array = get_object_vars($table);
            $tableName = $table_array[key($table_array)];
            if (in_array($tableName, $excludeTables)) {
                \DB::table($tableName)->truncate();
            }
        }

        \DB::statement("SET FOREIGN_KEY_CHECKS=1");
        $this->info("Database successfully cleared");

        return true;
    }

    /**
     * @return bool
     */
    protected function cleanStorage()
    {
        $config = $this->config->get('console-commands.app_cleaning.files');
        $disks = array_get($config, 'disks', []);
        $status = true;
        /** @var \Illuminate\Filesystem\FilesystemAdapter $disk */
        foreach ($disks as $disk) {
            foreach ($disk->allDirectories() as $directory) {
                $status = $status && $disk->deleteDirectory($directory);
            }
            foreach ($disk->allFiles() as $file) {
                $status = $status && $disk->delete($file);
            }
        }

        if ($status) {
            $this->info("Files have been successfully removed");
        } else {
            $this->error("An error occurred while trying to delete files");
        }

        return true;
    }

    /**
     * Get the console command arguments.
     *
     * @return array
     */
    protected function getArguments()
    {
        return [
            ['section', InputArgument::REQUIRED, 'Section name or "all"']
        ];
    }
}


text:
namespace enterprise_signals {

namespace {

absl::optional<std::string> GetEnterpriseProfileId(Profile* profile) {
  auto* profile_id_service =
      enterprise::ProfileIdServiceFactory::GetForProfile(profile);
  if (profile_id_service)
    return profile_id_service->GetProfileId();
  return absl::nullopt;
}

#if BUILDFLAG(IS_LINUX)
const char** GetUfwConfigPath() {
  static const char* path = "/etc/ufw/ufw.conf";
  return &path;
}

SettingValue GetUfwStatus() {
  base::FilePath path(*GetUfwConfigPath());
  std::string file_content;
  base::StringPairs values;

  if (!base::PathExists(path) || !base::PathIsReadable(path) ||
      !base::ReadFileToString(path, &file_content)) {
    return SettingValue::UNKNOWN;
  }
  base::SplitStringIntoKeyValuePairs(file_content, '=', '\n', &values);
  auto is_ufw_enabled = base::ranges::find(
      values, "ENABLED", &std::pair<std::string, std::string>::first);
  if (is_ufw_enabled == values.end())
    return SettingValue::UNKNOWN;

  if (is_ufw_enabled->second == "yes")
    return SettingValue::ENABLED;
  else if (is_ufw_enabled->second == "no")
    return SettingValue::DISABLED;
  else
    return SettingValue::UNKNOWN;
}
#endif  // BUILDFLAG(IS_LINUX)

#if BUILDFLAG(IS_WIN)
SettingValue GetWinOSFirewall() {
  Microsoft::WRL::ComPtr<INetFwPolicy2> firewall_policy;
  HRESULT hr = CoCreateInstance(CLSID_NetFwPolicy2, nullptr, CLSCTX_ALL,
                                IID_PPV_ARGS(&firewall_policy));
  if (FAILED(hr)) {
    DLOG(ERROR) << logging::SystemErrorCodeToString(hr);
    return SettingValue::UNKNOWN;
  }

  long profile_types = 0;
  hr = firewall_policy->get_CurrentProfileTypes(&profile_types);
  if (FAILED(hr))
    return SettingValue::UNKNOWN;

  // The most restrictive active profile takes precedence.
  constexpr NET_FW_PROFILE_TYPE2 kProfileTypes[] = {
      NET_FW_PROFILE2_PUBLIC, NET_FW_PROFILE2_PRIVATE, NET_FW_PROFILE2_DOMAIN};
  for (size_t i = 0; i < std::size(kProfileTypes); ++i) {
    if ((profile_types & kProfileTypes[i]) != 0) {
      VARIANT_BOOL enabled = VARIANT_TRUE;
      hr = firewall_policy->get_FirewallEnabled(kProfileTypes[i], &enabled);
      if (FAILED(hr))
        return SettingValue::UNKNOWN;
      if (enabled == VARIANT_TRUE)
        return SettingValue::ENABLED;
      else if (enabled == VARIANT_FALSE)
        return SettingValue::DISABLED;
      else
        return SettingValue::UNKNOWN;
    }
  }
  return SettingValue::UNKNOWN;
}
#endif

#if BUILDFLAG(IS_MAC)
SettingValue GetMacOSFirewall() {
  // There is no official Apple documentation on how to obtain the enabled
  // status of the firewall (System Preferences> Security & Privacy> Firewall).
  // Reading globalstate from com.apple.alf is the closest way to get such an
  // API in Chrome without delegating to potentially unstable commands.

  Boolean key_exists_with_valid_format = false;
  CFIndex globalstate = CFPreferencesGetAppIntegerValue(
      CFSTR("globalstate"), CFSTR("com.apple.alf"),
      &key_exists_with_valid_format);

  if (!key_exists_with_valid_format)
    return SettingValue::UNKNOWN;

  switch (globalstate) {
    case 0:
      return SettingValue::DISABLED;
    case 1:
      return SettingValue::ENABLED;
    default:
      return SettingValue::UNKNOWN;
  }
}
#endif

#if BUILDFLAG(IS_CHROMEOS_ASH)
SettingValue GetChromeosFirewall() {
  // The firewall is always enabled and can only be disabled in dev mode on
  // ChromeOS. If the device isn't in dev mode, the firewall is guaranteed to be
  // enabled whereas if it's in dev mode, the firewall could be enabled or not.
  base::CommandLine* command_line = base::CommandLine::ForCurrentProcess();
  return command_line->HasSwitch(chromeos::switches::kSystemDevMode)
             ? SettingValue::UNKNOWN
             : SettingValue::ENABLED;
}
#endif

}  // namespace

ContextInfo::ContextInfo() = default;
ContextInfo::ContextInfo(ContextInfo&&) = default;
ContextInfo::~ContextInfo() = default;

ContextInfoFetcher::ContextInfoFetcher(
    content::BrowserContext* browser_context,
    enterprise_connectors::ConnectorsService* connectors_service)
    : browser_context_(browser_context),
      connectors_service_(connectors_service) {
  DCHECK(connectors_service_);
}

ContextInfoFetcher::~ContextInfoFetcher() = default;

// static
std::unique_ptr<ContextInfoFetcher> ContextInfoFetcher::CreateInstance(
    content::BrowserContext* browser_context,
    enterprise_connectors::ConnectorsService* connectors_service) {
  // TODO(domfc): Add platform overrides of the class once they are needed for
  // an attribute.
  return std::make_unique<ContextInfoFetcher>(browser_context,
                                              connectors_service);
}

ContextInfo ContextInfoFetcher::FetchAsyncSignals(ContextInfo info) {
  base::ScopedBlockingCall scoped_blocking_call(FROM_HERE,
                                                base::BlockingType::MAY_BLOCK);

  // Add other async signals here
  info.system_dns_servers = GetDnsServers();
  info.os_firewall = GetOSFirewall();
  return info;
}

void ContextInfoFetcher::Fetch(ContextInfoCallback callback) {
  ContextInfo info;

  info.browser_affiliation_ids = GetBrowserAffiliationIDs();
  info.profile_affiliation_ids = GetProfileAffiliationIDs();
  info.on_file_attached_providers =
      GetAnalysisConnectorProviders(enterprise_connectors::FILE_ATTACHED);
  info.on_file_downloaded_providers =
      GetAnalysisConnectorProviders(enterprise_connectors::FILE_DOWNLOADED);
  info.on_bulk_data_entry_providers =
      GetAnalysisConnectorProviders(enterprise_connectors::BULK_DATA_ENTRY);
  info.on_print_providers =
      GetAnalysisConnectorProviders(enterprise_connectors::PRINT);
  info.realtime_url_check_mode = GetRealtimeUrlCheckMode();
  info.on_security_event_providers = GetOnSecurityEventProviders();
  info.browser_version = version_info::GetVersionNumber();
  info.site_isolation_enabled =
      content::SiteIsolationPolicy::UseDedicatedProcessesForAllSites();
  info.built_in_dns_client_enabled =
      utils::GetBuiltInDnsClientEnabled(g_browser_process->local_state());
  info.chrome_cleanup_enabled =
      utils::GetChromeCleanupEnabled(g_browser_process->local_state());
  info.chrome_remote_desktop_app_blocked =
      utils::GetChromeRemoteDesktopAppBlocked(
          PolicyBlocklistFactory::GetForBrowserContext(browser_context_));
  info.third_party_blocking_enabled =
      utils::GetThirdPartyBlockingEnabled(g_browser_process->local_state());

  Profile* profile = Profile::FromBrowserContext(browser_context_);
  info.safe_browsing_protection_level =
      utils::GetSafeBrowsingProtectionLevel(profile->GetPrefs());
  info.password_protection_warning_trigger =
      utils::GetPasswordProtectionWarningTrigger(profile->GetPrefs());
  info.enterprise_profile_id = GetEnterpriseProfileId(profile);

#if BUILDFLAG(IS_WIN)
  base::ThreadPool::CreateCOMSTATaskRunner({base::MayBlock()})
      .get()
      ->PostTaskAndReplyWithResult(
          FROM_HERE,
          base::BindOnce(&ContextInfoFetcher::FetchAsyncSignals,
                         base::Unretained(this), std::move(info)),
          std::move(callback));
#else
  base::ThreadPool::CreateTaskRunner({base::MayBlock()})
      .get()
      ->PostTaskAndReplyWithResult(
          FROM_HERE,
          base::BindOnce(&ContextInfoFetcher::FetchAsyncSignals,
                         base::Unretained(this), std::move(info)),
          std::move(callback));
#endif
}

std::vector<std::string> ContextInfoFetcher::GetBrowserAffiliationIDs() {
  auto ids =
      g_browser_process->browser_policy_connector()->device_affiliation_ids();
  return {ids.begin(), ids.end()};
}

std::vector<std::string> ContextInfoFetcher::GetProfileAffiliationIDs() {
  auto ids = Profile::FromBrowserContext(browser_context_)
                 ->GetProfilePolicyConnector()
                 ->user_affiliation_ids();
  return {ids.begin(), ids.end()};
}

std::vector<std::string> ContextInfoFetcher::GetAnalysisConnectorProviders(
    enterprise_connectors::AnalysisConnector connector) {
  return connectors_service_->GetAnalysisServiceProviderNames(connector);
}

safe_browsing::EnterpriseRealTimeUrlCheckMode
ContextInfoFetcher::GetRealtimeUrlCheckMode() {
  return connectors_service_->GetAppliedRealTimeUrlCheck();
}

std::vector<std::string> ContextInfoFetcher::GetOnSecurityEventProviders() {
  return connectors_service_->GetReportingServiceProviderNames(
      enterprise_connectors::ReportingConnector::SECURITY_EVENT);
}

SettingValue ContextInfoFetcher::GetOSFirewall() {
#if BUILDFLAG(IS_LINUX)
  return GetUfwStatus();
#elif BUILDFLAG(IS_WIN)
  return GetWinOSFirewall();
#elif BUILDFLAG(IS_MAC)
  return GetMacOSFirewall();
#elif BUILDFLAG(IS_CHROMEOS_ASH)
  return GetChromeosFirewall();
#else
  return SettingValue::UNKNOWN;
#endif
}

#if BUILDFLAG(IS_LINUX)
ScopedUfwConfigPathForTesting::ScopedUfwConfigPathForTesting(const char* path)
    : initial_path_(*GetUfwConfigPath()) {
  *GetUfwConfigPath() = path;
}

ScopedUfwConfigPathForTesting::~ScopedUfwConfigPathForTesting() {
  *GetUfwConfigPath() = initial_path_;
}
#endif  // BUILDFLAG(IS_LINUX)

std::vector<std::string> ContextInfoFetcher::GetDnsServers() {
  std::vector<std::string> dns_addresses;
#if BUILDFLAG(IS_POSIX)
  std::unique_ptr<net::ScopedResState> res = net::ResolvReader().GetResState();
  if (res) {
    absl::optional<std::vector<net::IPEndPoint>> nameservers =
        net::GetNameservers(res->state());
    if (nameservers) {
      // If any name server is 0.0.0.0, assume the configuration is invalid.
      for (const net::IPEndPoint& nameserver : nameservers.value()) {
        if (nameserver.address().IsZero())
          return std::vector<std::string>();
        else
          dns_addresses.push_back(nameserver.ToString());
      }
    }
  }
#elif BUILDFLAG(IS_WIN)
  absl::optional<std::vector<net::IPEndPoint>> nameservers;
  absl::optional<net::WinDnsSystemSettings> settings =
      net::ReadWinSystemDnsSettings();
  if (settings.has_value()) {
    nameservers = settings->GetAllNameservers();
  }

  if (nameservers.has_value()) {
    for (const net::IPEndPoint& nameserver : nameservers.value()) {
      dns_addresses.push_back(nameserver.ToString());
    }
  }
#endif
  return dns_addresses;
}

}  // namespace enterprise_signals


text:
<?php

/*
 * This file is part of the Behat Symfony2Extension
 *
 * (c) Konstantin Kudryashov <ever.zet@gmail.com>
 *
 * This source file is subject to the MIT license that is bundled
 * with this source code in the file LICENSE.
 */

namespace Behat\Symfony2Extension\ServiceContainer;

use Behat\Behat\Context\ServiceContainer\ContextExtension;
use Behat\Behat\Gherkin\ServiceContainer\GherkinExtension;
use Behat\Symfony2Extension\ServiceContainer\Driver\SymfonyFactory;
use Behat\Testwork\EventDispatcher\ServiceContainer\EventDispatcherExtension;
use Behat\Testwork\ServiceContainer\Extension as ExtensionInterface;
use Behat\Testwork\ServiceContainer\ExtensionManager;
use Behat\Testwork\Specification\ServiceContainer\SpecificationExtension;
use Behat\Testwork\Suite\ServiceContainer\SuiteExtension;
use Symfony\Component\Config\Definition\Builder\ArrayNodeDefinition;
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\DependencyInjection\Definition;
use Symfony\Component\DependencyInjection\Reference;

/**
 * Symfony2 extension for Behat class.
 *
 * @author Konstantin Kudryashov <ever.zet@gmail.com>
 * @author Christophe Coevoet <stof@notk.org>
 */
class Symfony2Extension implements ExtensionInterface
{
    const KERNEL_ID = 'symfony2_extension.kernel';

    /**
     * {@inheritdoc}
     */
    public function getConfigKey()
    {
        return 'symfony2';
    }

    /**
     * {@inheritdoc}
     */
    public function initialize(ExtensionManager $extensionManager)
    {
        if (null !== $minkExtension = $extensionManager->getExtension('mink')) {
            $minkExtension->registerDriverFactory(new SymfonyFactory());
        }
    }

    /**
     * {@inheritdoc}
     */
    public function configure(ArrayNodeDefinition $builder)
    {
        $boolFilter = function ($v) {
            $filtered = filter_var($v, FILTER_VALIDATE_BOOLEAN, FILTER_NULL_ON_FAILURE);

            return (null === $filtered) ? $v : $filtered;
        };

        $builder
            ->addDefaultsIfNotSet()
            ->children()
                ->arrayNode('kernel')
                    ->addDefaultsIfNotSet()
                    ->children()
                        ->scalarNode('bootstrap')->defaultValue('app/autoload.php')->end()
                        ->scalarNode('path')->defaultValue('app/AppKernel.php')->end()
                        ->scalarNode('class')->defaultValue('AppKernel')->end()
                        ->scalarNode('env')->defaultValue('test')->end()
                        ->booleanNode('debug')
                            ->beforeNormalization()
                                ->ifString()->then($boolFilter)
                            ->end()
                            ->defaultTrue()
                        ->end()
                    ->end()
                ->end()
                ->arrayNode('context')
                    ->addDefaultsIfNotSet()
                    ->children()
                        ->scalarNode('path_suffix')
                            ->defaultValue('Features')
                        ->end()
                        ->scalarNode('class_suffix')
                            ->defaultValue('Features\Context\FeatureContext')
                        ->end()
                    ->end()
                ->end()
            ->end()
        ->end();
    }

    /**
     * {@inheritdoc}
     */
    public function load(ContainerBuilder $container, array $config)
    {
        $this->loadClassGenerator($container);
        $this->loadContextInitializer($container);
        $this->loadFeatureLocator($container);
        $this->loadKernel($container, $config['kernel']);
        $this->loadSuiteGenerator($container, $config['context']);
        $this->loadServiceArgumentResolver($container);
    }

    /**
     * {@inheritdoc}
     */
    public function process(ContainerBuilder $container)
    {
        // get base path
        $basePath = $container->getParameter('paths.base');

        // find and require bootstrap
        $bootstrapPath = $container->getParameter('symfony2_extension.kernel.bootstrap');
        if ($bootstrapPath) {
            if (file_exists($bootstrap = $basePath . '/' . $bootstrapPath)) {
                require_once($bootstrap);
            } elseif (file_exists($bootstrapPath)) {
                require_once($bootstrapPath);
            }
        }

        // find and require kernel
        $kernelPath = $container->getParameter('symfony2_extension.kernel.path');
        if (file_exists($kernel = $basePath . '/' . $kernelPath)) {
            $container->getDefinition(self::KERNEL_ID)->setFile($kernel);
        } elseif (file_exists($kernelPath)) {
            $container->getDefinition(self::KERNEL_ID)->setFile($kernelPath);
        }
    }

    private function loadClassGenerator(ContainerBuilder $container)
    {
        $definition = new Definition('Behat\Symfony2Extension\Context\ContextClass\KernelAwareClassGenerator');
        $definition->addTag(ContextExtension::CLASS_GENERATOR_TAG, array('priority' => 100));
        $container->setDefinition('symfony2_extension.class_generator.kernel_aware', $definition);
    }

    private function loadContextInitializer(ContainerBuilder $container)
    {
        $definition = new Definition('Behat\Symfony2Extension\Context\Initializer\KernelAwareInitializer', array(
            new Reference(self::KERNEL_ID),
        ));
        $definition->addTag(ContextExtension::INITIALIZER_TAG, array('priority' => 0));
        $definition->addTag(EventDispatcherExtension::SUBSCRIBER_TAG, array('priority' => 0));
        $container->setDefinition('symfony2_extension.context_initializer.kernel_aware', $definition);
    }

    private function loadFeatureLocator(ContainerBuilder $container)
    {
        $definition = new Definition('Behat\Symfony2Extension\Specification\BundleFeatureLocator', array(
            new Definition('Behat\Behat\Gherkin\Specification\Locator\FilesystemFeatureLocator', array(
                new Reference(GherkinExtension::MANAGER_ID),
                '%paths.base%'
            ))
        ));
        $definition->addTag(SpecificationExtension::LOCATOR_TAG, array('priority' => 100));
        $container->setDefinition('symfony2_extension.specification_locator.bundle_feature', $definition);
    }

    private function loadKernel(ContainerBuilder $container, array $config)
    {
        $definition = new Definition($config['class'], array(
            $config['env'],
            $config['debug'],
        ));
        $definition->addMethodCall('boot');
        $container->setDefinition(self::KERNEL_ID, $definition);
        $container->setParameter(self::KERNEL_ID . '.path', $config['path']);
        $container->setParameter(self::KERNEL_ID . '.bootstrap', $config['bootstrap']);
    }

    private function loadSuiteGenerator(ContainerBuilder $container, array $config)
    {
        $definition = new Definition('Behat\Symfony2Extension\Suite\SymfonySuiteGenerator', array(
            new Reference(self::KERNEL_ID),
            $config['path_suffix'],
            $config['class_suffix'],
        ));
        $definition->addTag(SuiteExtension::GENERATOR_TAG, array('priority' => 100));
        $container->setDefinition('symfony2_extension.suite.generator', $definition);
    }

    private function loadServiceArgumentResolver(ContainerBuilder $container)
    {
        $definition = new Definition('Behat\Symfony2Extension\Context\Argument\ServiceArgumentResolver', array(
            new Reference(self::KERNEL_ID)
        ));
        $definition->addTag(ContextExtension::ARGUMENT_RESOLVER_TAG, array('priority' => 0));
        $container->setDefinition('symfony2_extension.context.argument.service_resolver', $definition);
    }
}


text:
typedef enum {
    CarparkTypeDefault,
    CarparkTypeResidential
} CarparkType;

@interface Carpark : NSObject <NSCoding>

@property (nonatomic) NSString *identifier;
@property (nonatomic) NSString *name;
@property (nonatomic) CarparkType type;
@property (nonatomic) UIImage *image;
@property (nonatomic) CLLocation *location;
@property (nonatomic) NSInteger distance;
@property (nonatomic) NSInteger capacity;
@property (nonatomic) NSInteger free;
@property (nonatomic) NSInteger cost;
@property (nonatomic) NSString *address;

- (instancetype)initWithJson:(NSDictionary *)json;
- (void)downloadImage:(NSString *)url;

@end


text:
<?php

namespace Magento\Backend\Model\Config\Structure\Element;

class SectionTest extends \PHPUnit_Framework_TestCase
{
    /**
     * @var \Magento\Backend\Model\Config\Structure\Element\Section
     */
    protected $_model;

    /**
     * @var \PHPUnit_Framework_MockObject_MockObject
     */
    protected $_storeManagerMock;

    /**
     * @var \PHPUnit_Framework_MockObject_MockObject
     */
    protected $_authorizationMock;

    /**
     * @var \PHPUnit_Framework_MockObject_MockObject
     */
    protected $_iteratorMock;

    protected function setUp()
    {
        $this->_iteratorMock = $this->getMock(
            'Magento\Backend\Model\Config\Structure\Element\Iterator\Field',
            [],
            [],
            '',
            false
        );
        $this->_storeManagerMock = $this->getMock('Magento\Store\Model\StoreManager', [], [], '', false);
        $this->_authorizationMock = $this->getMock('Magento\Framework\AuthorizationInterface');

        $this->_model = new \Magento\Backend\Model\Config\Structure\Element\Section(
            $this->_storeManagerMock,
            $this->_iteratorMock,
            $this->_authorizationMock
        );
    }

    protected function tearDown()
    {
        unset($this->_model);
        unset($this->_iteratorMock);
        unset($this->_storeManagerMock);
        unset($this->_authorizationMock);
    }

    public function testIsAllowedReturnsFalseIfNoResourceIsSpecified()
    {
        $this->assertFalse($this->_model->isAllowed());
    }

    public function testIsAllowedReturnsTrueIfResourcesIsValidAndAllowed()
    {
        $this->_authorizationMock->expects(
            $this->once()
        )->method(
            'isAllowed'
        )->with(
            'someResource'
        )->will(
            $this->returnValue(true)
        );

        $this->_model->setData(['resource' => 'someResource'], 'store');
        $this->assertTrue($this->_model->isAllowed());
    }

    public function testIsVisibleFirstChecksIfSectionIsAllowed()
    {
        $this->_storeManagerMock->expects($this->never())->method('isSingleStoreMode');
        $this->assertFalse($this->_model->isVisible());
    }

    public function testIsVisibleProceedsWithVisibilityCheckIfSectionIsAllowed()
    {
        $this->_authorizationMock->expects($this->any())->method('isAllowed')->will($this->returnValue(true));
        $this->_storeManagerMock->expects($this->once())->method('isSingleStoreMode')->will($this->returnValue(true));
        $this->_model->setData(['resource' => 'Magento_Adminhtml::all'], 'scope');
        $this->_model->isVisible();
    }
}


text:
package individual.leobert.uilib.photoview.config;

import android.graphics.RectF;

/**
 *
Package: individual.leobert.uilib.photoview.config

 *
Project: UiLib

 *
Classname: IPhotoConfigProvider

 *
Description: TODO

 * Created by leobert on 2017/4/29.
 */

public interface IDisplayModeGetter {
    /**
     * get display mode for photo
     *
     * @param photoSize PhotoSize see at {@link PhotoSize}
     * @return DisplayMode see at {@link DisplayMode}
     */
    DisplayMode getDisplayMode(PhotoSize photoSize, RectF pic);

    /**
     * a default display config for wide picture
     */
    final class DefaultWidePicDisplayModeGetter implements IDisplayModeGetter {

        /**
         * get display mode for photo
         *
         * @param photoSize PhotoSize see at {@link PhotoSize}
         * @param pic
         * @return DisplayMode see at {@link DisplayMode}
         */
        @Override
        public DisplayMode getDisplayMode(PhotoSize photoSize, RectF pic) {
            switch (photoSize) {
                case small:
                    return DisplayMode.CENTER;
                case middle:
                    return DisplayMode.CENTER_INSIDE;
                case large:
                    return DisplayMode.CENTER_INSIDE;
                default:
                    return DisplayMode.CENTER_INSIDE;
            }
        }
    }

    /**
     * a default display config for normal picture(not wide or high pic)
     */
    final class DefaultNormalPicDisplayModeGetter implements IDisplayModeGetter {
        @Override
        public DisplayMode getDisplayMode(PhotoSize photoSize, RectF pic) {
            switch (photoSize) {
                case small:
                    return DisplayMode.CENTER;
                case middle:
                    return DisplayMode.CENTER_INSIDE;
                case large:
                    return DisplayMode.CENTER_INSIDE;
                default:
                    return DisplayMode.CENTER_INSIDE;
            }
        }
    }

    /**
     * a default display config for high picture
     */
    final class DefaultHighPicDisplayModeGetter implements IDisplayModeGetter {
        @Override
        public DisplayMode getDisplayMode(PhotoSize photoSize, RectF pic) {
            switch (photoSize) {
                case small:
                    return DisplayMode.CENTER;
                case middle:
                    return DisplayMode.CENTER_INSIDE;
                case large:
                    return DisplayMode.CENTER_INSIDE;
                default:
                    return DisplayMode.CENTER_INSIDE;
            }
        }
    }
}


text:
ACCEPTED

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

#### Published in
Mycol. Pap. 176: 104 (2001)

#### Original name
Lophodermium clithris Starbäck, 1899

### Remarks
null


text:
ACCEPTED

#### According to
Index Fungorum

#### Published in
null

#### Original name
Ceuthospora fraxini Tognini

### Remarks
null


text:
using System;

namespace Myrtille.Fleck
{
    public class WebSocketException : Exception
    {
        public WebSocketException(ushort statusCode) : base()
        {
            StatusCode = statusCode;
        }

        public WebSocketException(ushort statusCode, string message) : base(message)
        {
            StatusCode = statusCode;
        }

        public WebSocketException(ushort statusCode, string message, Exception innerException) : base(message, innerException)
        {
            StatusCode = statusCode;
        }

        public ushort StatusCode { get; private set;}
    }
}


text: require 'view_model'


text:
//
//  XBWebController.m
//  jiazhangduan
//
//  Created by 周旭斌 on 2016/11/19.
//  Copyright © 2016年 周旭斌. All rights reserved.
//

#import "XBWebController.h"

@interface XBWebController () <UIWebViewDelegate>

@property (nonatomic, weak) UIButton *backButton;

@end

@implementation XBWebController

#pragma mark - target事件
- (void)backButtonClick {
    [self.navigationController popViewControllerAnimated:YES];
    self.backButton.hidden = YES;
}

- (void)loadView {
    self.view = [[UIWebView alloc] init];
}

- (void)viewDidLoad {
    [super viewDidLoad];

    [self setUpNavItem];

    UIWebView *webView = (UIWebView *)self.view;
    webView.delegate = self;
    NSURL *url = [NSURL URLWithString:_targetUrl];
    NSURLRequest *request = [NSURLRequest requestWithURL:url];
    [webView loadRequest:request];
}

#pragma mark - webViewDelegate
- (void)webViewDidStartLoad:(UIWebView *)webView {
    XBLog(@"开始");
    [MBProgressHUD showHUDAddedTo:self.view animated:YES];
}

- (void)webViewDidFinishLoad:(UIWebView *)webView {
    XBLog(@"结束");
    [MBProgressHUD hideHUDForView:self.view animated:YES];
}

- (void)webView:(UIWebView *)webView didFailLoadWithError:(NSError *)error {
    XBLog(@"失败");
    [MBProgressHUD hideHUDForView:self.view animated:YES];
}

#pragma mark - 设置UI
- (void)setUpNavItem {
    UILabel *label = [[UILabel alloc] init];
    label.textColor = [UIColor whiteColor];
    label.textAlignment = NSTextAlignmentCenter;
    label.text = _navTitle;
    label.xb_width(100).xb_height(40);
    self.navigationItem.titleView = label;

//    UIImageView *imageView = [[UIImageView alloc] init];
//    imageView.bounds = CGRectMake(0, 0, 30, 30);
//    imageView.image = [UIImage imageNamed:@"icon_back"];
//    self.navigationItem.leftBarButtonItem = [[UIBarButtonItem alloc] initWithCustomView:imageView];
//
//    UIButton *backButton = [[UIButton alloc] init];
//    _backButton = backButton;
//    backButton.frame = CGRectMake(35, 0, 44, 44);
//    [backButton setTitle:@"返回" forState:UIControlStateNormal];
//    backButton.titleLabel.font = [UIFont systemFontOfSize:15];
//    backButton.titleLabel.textAlignment = NSTextAlignmentCenter;
//    [self.navigationController.navigationBar addSubview:backButton];
//    [backButton addTarget:self action:@selector(backButtonClick) forControlEvents:UIControlEventTouchUpInside];
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end


text:
package fr.openwide.maven.artifact.notifier.web.application.navigation.page;

import java.util.Collection;

import org.apache.wicket.authroles.authorization.strategies.role.annotations.AuthorizeInstantiation;
import org.apache.wicket.markup.html.WebPage;
import org.apache.wicket.markup.html.basic.Label;
import org.apache.wicket.model.LoadableDetachableModel;
import org.apache.wicket.model.ResourceModel;
import org.apache.wicket.request.mapper.parameter.PageParameters;
import org.apache.wicket.spring.injection.annot.SpringBean;

import fr.openwide.core.jpa.security.business.authority.util.CoreAuthorityConstants;
import fr.openwide.core.wicket.more.link.descriptor.IPageLinkDescriptor;
import fr.openwide.core.wicket.more.link.descriptor.builder.LinkDescriptorBuilder;
import fr.openwide.core.wicket.more.markup.html.template.model.BreadCrumbElement;
import fr.openwide.maven.artifact.notifier.core.business.artifact.model.FollowedArtifact;
import fr.openwide.maven.artifact.notifier.core.business.user.service.IUserService;
import fr.openwide.maven.artifact.notifier.web.application.MavenArtifactNotifierSession;
import fr.openwide.maven.artifact.notifier.web.application.common.template.MainTemplate;
import fr.openwide.maven.artifact.notifier.web.application.navigation.component.DashboardArtifactPortfolioPanel;
import fr.openwide.maven.artifact.notifier.web.application.navigation.component.DashboardNotificationListViewPanel;
import fr.openwide.maven.artifact.notifier.web.application.navigation.model.NotificationsModel;

@AuthorizeInstantiation(CoreAuthorityConstants.ROLE_AUTHENTICATED)
public class DashboardPage extends MainTemplate {

	private static final long serialVersionUID = -6767518941118385548L;

	@SpringBean
	private IUserService userService;

	public static IPageLinkDescriptor linkDescriptor() {
		return new LinkDescriptorBuilder()
				.page(DashboardPage.class)
				.build();
	}

	public DashboardPage(PageParameters parameters) {
		super(parameters);

		addBodyCssClass("force-vertical-scroll");

		addHeadPageTitleElement(new BreadCrumbElement(new ResourceModel("dashboard.pageTitle")));
		addBreadCrumbElement(new BreadCrumbElement(new ResourceModel("dashboard.pageTitle"), DashboardPage.linkDescriptor()));

		add(new Label("pageTitle", new ResourceModel("dashboard.pageTitle")));

		DashboardNotificationListViewPanel notificationsPanel = new DashboardNotificationListViewPanel("notificationPanel",
				new NotificationsModel(MavenArtifactNotifierSession.get().getUserModel()));
		add(notificationsPanel);

		DashboardArtifactPortfolioPanel artifactPanel = new DashboardArtifactPortfolioPanel("artifactPanel",
				new LoadableDetachableModel<Collection<FollowedArtifact>>() {
			private static final long serialVersionUID = -8484961470906264804L;

			@Override
			protected Collection<FollowedArtifact> load() {
				return userService.listFollowedArtifacts(MavenArtifactNotifierSession.get().getUser());
			}
		});
		add(artifactPanel);
	}

	@Override
	protected Class<? extends WebPage> getFirstMenuPage() {
		return DashboardPage.class;
	}
}


text:
#include "../../SDL_internal.h"

#ifndef _SDL_androidvideo_h
#define _SDL_androidvideo_h

#include "SDL_mutex.h"
#include "SDL_rect.h"
#include "../SDL_sysvideo.h"

/* Called by the JNI layer when the screen changes size or format */
extern void Android_SetScreenResolution(int width, int height, Uint32 format);

/* Private display data */

typedef struct SDL_VideoData
{
    SDL_Rect        textRect;
} SDL_VideoData;

extern int Android_ScreenWidth;
extern int Android_ScreenHeight;
extern Uint32 Android_ScreenFormat;
extern SDL_sem *Android_PauseSem, *Android_ResumeSem;
extern SDL_Window *Android_Window;

#endif /* _SDL_androidvideo_h */

/* vi: set ts=4 sw=4 expandtab: */


text:
<HTML>
<HEAD>
<TITLE>Assembler information for html\s7p8.assem.html</TITLE>
<LINK rel=stylesheet href="udf_styles.css" type="text/css">
</HEAD>
<BODY>
<frameset rows="15,85"><frame name ="toc" src="toc_s7p8.assem.html" /><frame name ="main" src="main_s7p8.assem.html" /></frameset></HTML>


text:
#include <netinet/in.h>
#include <stdint.h>

#define htonl(hostlong)		(hostlong)
#define htons(hostshort)	(hostshort)
#define ntohl(netlong)		(netlong)
#define ntohs(netshort)		(netshort)

EXTERN_BEGIN

in_addr_t inet_addr(const char* cp);
in_addr_t inet_lnaof(struct in_addr in);
struct in_addr inet_makeaddr(in_addr_t net, in_addr_t lna);
in_addr_t inet_netof(struct in_addr in);
in_addr_t inet_network(const char* cp);
char* inet_ntoa(struct in_addr in);
int inet_aton(const char* cp, struct in_addr* inp);
const char* inet_ntop(int af, const void* src, char* dst, socklen_t size);
int inet_pton(int af, const char* src, void* dst);

EXTERN_END


text:
<?php

declare(strict_types=1);

namespace UCSDMath\Cache;

use UCSDMath\Cache\ExtendedOperations\CacheExtendedOperationsTrait;
use UCSDMath\Cache\ExtendedOperations\CacheExtendedOperationsTraitInterface;

/**
 * AbstractCache provides an abstract base class implementation of {@link CacheInterface}.
 * This service groups a common code base implementation that Cache extends.
 *
 * Method list: (+) @api, (-) protected or private visibility.
 *
 * (+) CacheInterface __construct();
 * (+) void __destruct();
 *
 * @author Daryl Eisner <deisner@ucsd.edu>
 */
abstract class AbstractCache implements CacheInterface, CacheExtendedOperationsTraitInterface
{
    /**
     * Constants.
     *
     * @var string VERSION The version number
     *
     * @api
     */
    public const VERSION = '2.5.0';

    //--------------------------------------------------------------------------

    /**
     * Properties.
     *
     * @var    string         $cachesGlobalPath The path to global caches
     * @static CacheInterface $instance         The static instance CacheInterface
     * @static int            $objectCount      The static count of CacheInterface
     * @var    array          $storageRegister  The stored set of data structures used by this class
     */
    protected $cachesGlobalPath   = null;
    protected static $instance    = null;
    protected static $objectCount = 0;
    protected $storageRegister    = [];

    //--------------------------------------------------------------------------

    /**
     * Constructor.
     *
     * @api
     */
    public function __construct()
    {
        $this->setProperty('cachesGlobalPath', '/sso/1/assets/cache');
    }

    //--------------------------------------------------------------------------

    /**
     * Destructor.
     *
     * @api
     */
    public function __destruct()
    {
        static::$objectCount--;
    }

    //--------------------------------------------------------------------------

    /**
     * Method implementations inserted:
     *
     * Method list: (+) @api, (-) protected or private visibility.
     *
     * (+) mixed get(string $key, string $subkey = null);
     * (+) mixed getProperty(string $name, string $key = null);
     * (+) CacheInterface set(string $key, $value, string $subkey = null);
     * (+) CacheInterface setProperty(string $name, $value, string $key = null);
     */
    use CacheExtendedOperationsTrait;

    //--------------------------------------------------------------------------
}


text:
Capital of KT Space (Kandir), located in its upper northwest (137z). Large population (low-middle billions), mostly depleted system resources (runs on fully self-sustainable recycling economy).
* Main cities: Studium (50.4m), Kyr'vhetine (36.9m), Razryv (35.9m), Yiah Saul (33.6m), Paikam (32.6m), Remadi (27.4m)
* Military units:
* Region: Dinui
* Classification: Autonomous System

---

## Acyk System
Site of Acyk Skirmishes, and of Acyk Naval Memorial. Located southwest of Kandir (72z). Similar to Reach - crown jewel of the Colonies, heavy military base. Population in the low billions, large expanses of untouched wilderness joined by large expanses of cityscape.
* Main cities: Acyk Greater (315.3m), Platform Four (201.5m)
* Military units: Serare Special Operations, Kandir Office of Intelligence
* Region: Dinui
* Classification: Autonomous Republic of the West Wall

---

## Dralton System
Agricultural system, nearly completely automated, located in the middle (2z). Asteroid belt, remnants of planetary formation disk, and metal-rich planets directly mined for the construction of massive networks of space stations around a small, young star. Very low population, mostly AI controlled.
* Main cities: Dralton Main Ring (9.03m)
* Military units: ABAH Riders & Ravnina Mounts
* Region: Central Colonies
* Classification: Dralton System, Sector Centre

---

## Goyust System
Mining system just south of Dralton (5z). Overabundant metal-rich terrestrial worlds paired with extensive asteroid belt and multiple gas giants. Only habitable world is commonly -25F, but large civilian population aboard orbital station.
* Main cities: Dralton Mining Station 3C (33.3m), Dralton Mining Station 8A (27.8m)
* Military units:
* Region: Central Colonies
* Classification: Goyust System, Sector Centre

---

## Honslow System
Bridge system before the West Wall. Not much to see, just a fuel mining station and some basic infrastructure.
* Main cities:
* Military units:
* Region: Central Colonies
* Classification: Honslow System, Sector Centre

---

## Haamyc System
Northern outpost system (250z). Most sources of metals throughout system strip-mined by KCE for construction of outpost structures. Some small civilian science & exploration stations.
* Main cities:
* Military units:
* Region: Band's Edge
* Classification: Autonomous Republic of the Breach

---

## Mont-au-Ban
Northern outpost system, hub for northward exploration.
* Main cities:
* Military units:
* Region: Band's Edge
* Classifications: Autonomous Republic of the Breach

---

## Iisa System
Southern outpost system (219z). Remarkably similar to Haamyc, but with exceptionally large civilian population aboard orbital stations due to crucial "gatekeeper" position on main trade routes.
* Main cities: Iisa Main (102.2m), Iisa South (78.8m), Iisa East (40.4m), Iisa North (39.1m), Iisa West (27.7m)
* Military units:
* Region: Granitsa
* Classification: Iisa System, Sector Granitsa

---

## Bu'ad
One of the bridge systems to Resnen's Star and the Breach, Bu'ad is a refueling hub of the northeast.
* Main cities:
* Military units:
* Region: Band's Edge
* Classification: Bu'ad, Sector Illustria

---

## Resnen's Star
Young northeastern star in a volatile but rich planetary nebula, full of raw material reardy for harvest. Recently colonised by a mining station, but has an increasingly large population due to the mining boom.
* Main cities:
* Military units:
* Region: Band's Edge
* Classification: Resnen's Star, Sector Illustria

---

## Jaon System
Eastern outpost system (-30z). Far more dust & gas present than in most other systems due to proximity to The Band, moderate sized civilian mining population aboard orbital stations and mining barges.
* Main cities: Jaon Mining Ring 1A (26.6m)
* Military units:
* Region: Band's Edge
* Classification: Jaon System, Sector Illustria

---

## Mirdir
Binary stellar system of white dwarf and late main-sequence yellow star. Plenty of solar energy, but not much resources. Waypoint system on the way to the Band.
* Main cities:
* Military units:
* Region: Band's Edge
* Classification: Mirdir System, Sector Illustria

---

## Lochponte System
Western outpost system (-200z). Attacked in 2578 by third-party alien threat, rendering entire planet a raging inferno. Lochponte Naval Act of 2579 passed as direct result. Currently a fortress system with booming mining economy & population.
* Main cities: Lochponte Fortress (77.1m), Melh Hub (33.6m)
* Military units: Melh Mechs & Armour
* Region: West Colonies
* Classification: Autonomous Republic of the West Wall

---

## Trevelyan System
Midwestern colony. Not very notable, mostly support forces & resources for the West Wall.
* Main cities:
* Military units:
* Region: West Colonies
* Classification: Autonomous Republic of the West Wall

---

## Hofstadt
Southwestern system, Re'sol's counterpart on the other end of the West Wall. Exploration, fuel, and outpost for the west; often known as "The Last Stop".
* Main cities:
* Military units:
* Region: West Colonies
* Classification: Autonomous Republic of the West Wall

---

## Nas'riin System
Southeast system near Iisa and Rakod (188z). Standard "normal" colony, contains balanced economy (agriculture, mining, manufacturing) as well as booming trade & population.
* Main cities:
* Military units:
* Region: Granitsa
* Classification: Nas'riin System, Sector Granitsa

---

## Rakod System
Another "normal" colony, southeast near Iisa and Nas'riin (190z). More trade focused than Nas'riin due to location between Iisa and Nas'riin - middleman of sorts, if you will. Also posesses strong fuel economy.
* Main cities:
* Military units:
* Region: Granitsa
* Classification: Rakod System, Sector Granitsa

---

## Re'sol
Northwestern colony (155z). Oldest colony world (of worlds colonised by KT), remains @ low population despite recent boom in refinery and mining in outer system. Heavily forested, chilly world. Inner system contains the massive Ashi Shipyards structures.
* Main cities: Re'sol City (14.3m), Ashi Home Station (10.3m)
* Military units: Ashi Shipyards
* Region: West Colonies
* Classification: Autonomous Republic of the West Wall (Capital)

---

## Vorer
Additional agricultural system, in the middle-east (127z). Nearly fully automated, decent population due to tourism in inner system.
* Main cities: Apollos Station (64.6m)
* Military units: Cabur Heavy Infantry
* Region: Central Colonies
* Classification: Vorer System, Sector Centre

---

## Iul'tin
Northern midpoint world; one of the Old Colonies. Currently industrial world of factories.
* Main cities:
* Military units:
* Region: Dinui
* Classification:

---

## Norilsk
Fortress world along the northern border, currently extensively stripmined due to past industrial activities.
* Main cities:
* Military units:
* Region: Dinui
* Classification:

---

## Rimword
Isolated research system in the midst of the Northwest Cloud. Colonised after the discovery of the Great Arch Tunnel and Arch's Hole, in the mid-2500s.
* Main cities: Rimcity (35.3m)
* Military units:
* Region: West Colonies
* Classification:

---

## Hammershoete
Fortress world on the western edge of KT space, part of the West Wall. Colonised in the second wave, but real growth only came after widespread use of the Great Arch Tunnel began.
* Main cities:
* Military units:
* Region: West Colonies
* Classification:

---

## Orio
Industry world in the West Colonies that supports the West Wall.
* Main cities: Siriate Station (50.7m)
* Military units:
* Region: West Colonies
* Classification:

---

## Orthes
Blended industry and fortress world on the West Wall.
* Main cities:
* Military units:
* Region: West Colonies
* Classification:

---

## Westfallim
Fortress hub, just north of Hofstasdt and on the West Wall. Critical infrastructure point, heavily defended.
* Main cities
* Military units:
* Region: West Colonies
* Classification:

---

## Huele

---

## Albacete

---

## Xerta

---

## Elalon

---

## Onsadorf

---

## Aran

---

## Ayilhal

---

## Tomsk

---

## Nadym

---

## Hamelyn

---

## Salekhard

---

## Lensk

---

## Boedur

---

## Jukaasjarvi

---

## Kotka

---

## Steinkier

---

## Sundsvall

---

## Fauln

---

## Eskilstuna

---

## Leikander

---

## Tromse

---

## Sundsvall

---

## Nykopping

---

## Ornskoldsvisk

---

## Rauma

---

## Visbi

---

## Pitea

---

## Anadry

---

## Ust'nera

---

## Kemerovo

---

## Alby

---

## Nizhneuartousk

---

## Saint Sever

---

## Kolpashevo

---

## Omoton

---

## Krasonyarsk

---

## Netteyugansk

---

## Thoringstar

---

## Tura

---

## Lesosibirsk

---

## Hythe

---

## Novossibirsk

---

## Omsk

---

## Bratsk

---

## Chernogorsk

---

## Thorusid

---

## Montpellaer

---

## Parendreus

---

## Amursk

---

## Cyanon

---

## Ceret

---

## Thirsk

---

## Lordeue

---

## Aget

---

## Anglesey

---

## Lancs

---

## Monmothshir


text:
'''
Allow a program to run in the background

Example:
    From a terminal 'window 1' run::

      $ chalmers start --wait server1

    program output ...
    program output ...

    From another Another terminal 'window 2' run::

      $ chalmers bg server1

    Now you will be able to close the terminal 'window 1' without shutting down your server

'''
from __future__ import unicode_literals, print_function

from argparse import RawDescriptionHelpFormatter
import logging

from chalmers import errors
from chalmers.program import Program

log = logging.getLogger('chalmers.edit')

def main(args):

    prog = Program(args.name)

    if not prog.is_running:
        raise errors.StateError("Program is not running")

    prog.send('bg')
    print("Process is now a background process")

def add_parser(subparsers):
    description = 'Allow a service to run in the background'
    parser = subparsers.add_parser('bg',
                                   help=description, description=description,
                                   epilog=__doc__,
                                   formatter_class=RawDescriptionHelpFormatter)

    parser.add_argument('name')
    parser.set_defaults(main=main)


text:
<?php

abstract class PhabricatorFileTransactionType
  extends PhabricatorModularTransactionType {}


text:
package com.github.protobufel.multikeymap;

import org.openjdk.jmh.annotations.*;
import org.openjdk.jmh.runner.Runner;
import org.openjdk.jmh.runner.RunnerException;
import org.openjdk.jmh.runner.options.Options;
import org.openjdk.jmh.runner.options.OptionsBuilder;

import java.util.AbstractMap.SimpleImmutableEntry;
import java.util.List;
import java.util.Map;
import java.util.Random;
import java.util.concurrent.TimeUnit;
import java.util.stream.Collectors;
import java.util.stream.IntStream;
import java.util.stream.Stream;

import static java.util.stream.Collectors.toList;
import static java.util.stream.Collectors.toMap;

@BenchmarkMode(Mode.AverageTime)
@OutputTimeUnit(TimeUnit.NANOSECONDS)
@Warmup(iterations = 5, time = 1, timeUnit = TimeUnit.SECONDS)
@Measurement(iterations = 5, time = 1, timeUnit = TimeUnit.SECONDS)
@Fork(1)
@State(Scope.Benchmark)
public class JMHMultiKeyMapVsMap {

    @Param({"1000"})
    public int readContainerSize = 1000;

    @Param({"10"})
    public int keySize = 10;

    @Param({"10"})
    public int subKeySize = 10;

    @Param({"100"})
    public int containerSize = 100;

    private Random random;

    private Map<Iterable<String>, Integer> readMap;
    private MultiKeyMap<String, Iterable<String>, Integer> readMultiKeymap;
    private Iterable<String> searchKey;

    private Map<Iterable<String>, Integer> map;
    private MultiKeyMap<String, Iterable<String>, Integer> multiKeymap;

    private List<String> addKey;

    private int addValue;

    private List<String> removeKey;

    private List<String> partialKey;

    private List<Integer> partialKeyPositions;

    public static void main(final String[] args) throws RunnerException {
        final Options opt =
                new OptionsBuilder().include(JMHMultiKeyMapVsMap.class.getSimpleName()).build();
        new Runner(opt).run();
    }

    @Setup(Level.Trial)
    public void trialSetup() {
        readMap = generateMap(readContainerSize);
        readMultiKeymap = MultiKeyMaps.of(readMap);
        random = new Random();
    }

    @Setup(Level.Iteration)
    public void iterationSetup() {
        map = generateMap(containerSize);
        multiKeymap = MultiKeyMaps.of(map);
        searchKey = generateKey(random.nextInt(readContainerSize));
        addKey = generateKey(containerSize + 1);
        addValue = random.nextInt();
        removeKey = generateKey(random.nextInt(containerSize));
        final int partialKeyIndex = random.nextInt(readContainerSize);
        partialKey = generatePartialKey(partialKeyIndex, 2, 2);
        partialKeyPositions = generatePartialKeyPositions(partialKeyIndex, 2, 2);
    }

    Map<Iterable<String>, Integer> generateMap(final int containerSize) {
        return IntStream.range(0, containerSize)
                .boxed()
                .map(i -> new SimpleImmutableEntry<>(generateKey(i), i))
                .collect(toMap(SimpleImmutableEntry::getKey, SimpleImmutableEntry::getValue));
    }

    List<String> generateKey(final Integer recordIndex) {
        return IntStream.range(recordIndex, recordIndex + keySize)
                .boxed()
                .map(
                        j ->
                                IntStream.range(j, j + subKeySize)
                                        .boxed()
                                        .map(String::valueOf)
                                        .collect(Collectors.joining()))
                .collect(toList());
    }

    List<Integer> generatePartialKeyPositions(
            final Integer recordIndex, final int nthPositivePosition, final int nthSkippedPosition) {
        return IntStream.range(0, keySize)
                .filter(pos -> (pos % nthSkippedPosition) != 0)
                .map(pos -> (pos % nthPositivePosition) == 0 ? pos : -1)
                .boxed()
                .collect(toList());
    }

    List<String> generatePartialKey(
            final Integer recordIndex, final int nthPositivePosition, final int nthSkippedPosition) {
        return IntStream.range(recordIndex, recordIndex + keySize)
                .filter(pos -> (pos % nthSkippedPosition) != 0)
                .map(pos -> (pos % nthPositivePosition) == 0 ? pos : -1)
                .boxed()
                .map(
                        j ->
                                IntStream.range(j, j + subKeySize)
                                        .boxed()
                                        .map(String::valueOf)
                                        .collect(Collectors.joining()))
                .collect(toList());
    }

    @Benchmark()
    public Integer baseline_getValue() {
        return readMap.get(searchKey);
    }

    @Benchmark
    public Integer getValue() {
        return readMultiKeymap.get(searchKey);
    }

    @Benchmark
    public Integer baseline_put() {
        return map.put(addKey, addValue);
    }

    @Benchmark
    public Integer put() {
        return multiKeymap.put(addKey, addValue);
    }

    @Benchmark
    public Integer baseline_remove() {
        return map.remove(removeKey);
    }

    @Benchmark
    public Integer remove() {
        return multiKeymap.remove(removeKey);
    }

    @Benchmark
    public Stream<Iterable<String>> baseline_getFullKeysByPartialKeyWithPositions() {
        return multiKeymap.getFullKeysByPartialKey(partialKey, partialKeyPositions);
    }

    @Benchmark
    public List<Iterable<String>> getFullKeysByPartialKeyWithPositions() {
        return multiKeymap.getFullKeysByPartialKey(partialKey, partialKeyPositions).collect(toList());
    }
}


text:
namespace Ocelot.DownstreamRouteFinder.Finder
{
    using Ocelot.Configuration;
    using Ocelot.Configuration.Builder;
    using Ocelot.Configuration.Creator;
    using Ocelot.LoadBalancer.LoadBalancers;
    using Ocelot.Responses;
    using System.Collections.Concurrent;
    using System.Collections.Generic;
    using System.Linq;
    using Ocelot.DownstreamRouteFinder.UrlMatcher;

    public class DownstreamRouteCreator : IDownstreamRouteProvider
    {
        private readonly IQoSOptionsCreator _qoSOptionsCreator;
        private readonly ConcurrentDictionary<string, OkResponse<DownstreamRouteHolder>> _cache;

        public DownstreamRouteCreator(IQoSOptionsCreator qoSOptionsCreator)
        {
            _qoSOptionsCreator = qoSOptionsCreator;
            _cache = new ConcurrentDictionary<string, OkResponse<DownstreamRouteHolder>>();
        }

        public Response<DownstreamRouteHolder> Get(string upstreamUrlPath, string upstreamQueryString, string upstreamHttpMethod, IInternalConfiguration configuration, string upstreamHost)
        {
            var serviceName = GetServiceName(upstreamUrlPath);

            var downstreamPath = GetDownstreamPath(upstreamUrlPath);

            if (HasQueryString(downstreamPath))
            {
                downstreamPath = RemoveQueryString(downstreamPath);
            }

            var downstreamPathForKeys = $"/{serviceName}{downstreamPath}";

            var loadBalancerKey = CreateLoadBalancerKey(downstreamPathForKeys, upstreamHttpMethod, configuration.LoadBalancerOptions);

            if (_cache.TryGetValue(loadBalancerKey, out var downstreamRouteHolder))
            {
                return downstreamRouteHolder;
            }

            var qosOptions = _qoSOptionsCreator.Create(configuration.QoSOptions, downstreamPathForKeys, new List<string> { upstreamHttpMethod });

            var upstreamPathTemplate = new UpstreamPathTemplateBuilder().WithOriginalValue(upstreamUrlPath).Build();

            var downstreamRouteBuilder = new DownstreamRouteBuilder()
                .WithServiceName(serviceName)
                .WithLoadBalancerKey(loadBalancerKey)
                .WithDownstreamPathTemplate(downstreamPath)
                .WithUseServiceDiscovery(true)
                .WithHttpHandlerOptions(configuration.HttpHandlerOptions)
                .WithQosOptions(qosOptions)
                .WithDownstreamScheme(configuration.DownstreamScheme)
                .WithLoadBalancerOptions(configuration.LoadBalancerOptions)
                .WithDownstreamHttpVersion(configuration.DownstreamHttpVersion)
                .WithUpstreamPathTemplate(upstreamPathTemplate);

            var rateLimitOptions = configuration.Routes != null
                ? configuration.Routes
                    .SelectMany(x => x.DownstreamRoute)
                    .FirstOrDefault(x => x.ServiceName == serviceName)
                : null;

            if (rateLimitOptions != null)
            {
                downstreamRouteBuilder
                    .WithRateLimitOptions(rateLimitOptions.RateLimitOptions)
                    .WithEnableRateLimiting(true);
            }

            var downstreamRoute = downstreamRouteBuilder.Build();

            var route = new RouteBuilder()
                .WithDownstreamRoute(downstreamRoute)
                .WithUpstreamHttpMethod(new List<string>() { upstreamHttpMethod })
                .WithUpstreamPathTemplate(upstreamPathTemplate)
                .Build();

            downstreamRouteHolder = new OkResponse<DownstreamRouteHolder>(new DownstreamRouteHolder(new List<PlaceholderNameAndValue>(), route));

            _cache.AddOrUpdate(loadBalancerKey, downstreamRouteHolder, (x, y) => downstreamRouteHolder);

            return downstreamRouteHolder;
        }

        private static string RemoveQueryString(string downstreamPath)
        {
            return downstreamPath
                .Substring(0, downstreamPath.IndexOf('?'));
        }

        private static bool HasQueryString(string downstreamPath)
        {
            return downstreamPath.Contains("?");
        }

        private static string GetDownstreamPath(string upstreamUrlPath)
        {
            if (upstreamUrlPath.IndexOf('/', 1) == -1)
            {
                return "/";
            }

            return upstreamUrlPath
                .Substring(upstreamUrlPath.IndexOf('/', 1));
        }

        private static string GetServiceName(string upstreamUrlPath)
        {
            if (upstreamUrlPath.IndexOf('/', 1) == -1)
            {
                return upstreamUrlPath
                    .Substring(1);
            }

            return upstreamUrlPath
                .Substring(1, upstreamUrlPath.IndexOf('/', 1))
                .TrimEnd('/');
        }

        private string CreateLoadBalancerKey(string downstreamTemplatePath, string httpMethod, LoadBalancerOptions loadBalancerOptions)
        {
            if (!string.IsNullOrEmpty(loadBalancerOptions.Type) && !string.IsNullOrEmpty(loadBalancerOptions.Key) && loadBalancerOptions.Type == nameof(CookieStickySessions))
            {
                return $"{nameof(CookieStickySessions)}:{loadBalancerOptions.Key}";
            }

            return CreateQoSKey(downstreamTemplatePath, httpMethod);
        }

        private string CreateQoSKey(string downstreamTemplatePath, string httpMethod)
        {
            var loadBalancerKey = $"{downstreamTemplatePath}|{httpMethod}";
            return loadBalancerKey;
        }
    }
}