text:
<?xml version="1.0" encoding="UTF-8"?>
<!--

   Licensed under the Apache License, Version 2.0 (the "License");
   you may not use this file except in compliance with the License.
   You may obtain a copy of the License at

         http://www.apache.org/licenses/LICENSE-2.0

   Unless required by applicable law or agreed to in writing, software
   distributed under the License is distributed on an "AS IS" BASIS,
   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   See the License for the specific language governing permissions and
   limitations under the License.
-->
<features name="archiva-${project.version}" xmlns="http://karaf.apache.org/xmlns/features/v1.0.0">

  <repository>mvn:org.apache.cxf.karaf/apache-cxf/${cxfVersion}/xml/features</repository>

  <feature name="archiva-common" description="Archiva Common module" version="${project.version}" resolver="(obr)">
    <bundle dependency="true">mvn:commons-lang/commons-lang/${commons-lang.version}</bundle>
    <bundle dependency="true">mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.javax-inject/${javax-inject.bundle.version}</bundle>
    <bundle dependency="true">mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.aopalliance/${aopalliance.bundle.version}</bundle>
    <bundle dependency="true">wrap:mvn:org.codehaus.plexus/plexus-classworlds/${plexus-classworlds.version}</bundle>
    <bundle dependency="true">wrap:mvn:org.codehaus.plexus/plexus-component-annotations/${plexus-component-annotations.version}</bundle>
    <bundle dependency="true">wrap:mvn:org.codehaus.plexus/plexus-utils/${plexus-utils.version}</bundle>
    <bundle dependency="true">mvn:com.google.guava/guava/${guava.version}</bundle>
    <bundle dependency="true">mvn:org.sonatype.sisu/sisu-guice/${sisu-guice.version}</bundle>
    <bundle dependency="true">mvn:org.sonatype.sisu/sisu-inject-bean/${sisu-inject-bean.version}</bundle>
    <bundle dependency="true">mvn:org.sonatype.sisu/sisu-inject-plexus/${sisu-inject-plexus.version}</bundle>
    <bundle>mvn:org.apache.archiva/archiva-common/${project.version}</bundle>
  </feature>

  <feature name="archiva-checksum" description="Archiva Checksum module" version="${project.version}" resolver="(obr)">
    <feature version="${project.version}">archiva-common</feature>
    <bundle dependency="true">mvn:commons-io/commons-io/${commons-io.version}</bundle>
    <bundle>mvn:org.apache.archiva/archiva-checksum/${project.version}</bundle>
  </feature>

  <feature name="archiva-policies" description="Archiva Policies module" version="${project.version}" resolver="(obr)">
    <feature version="${project.version}">archiva-checksum</feature>
    <feature version="[3,4)">spring</feature>
    <bundle>wrap:mvn:org.apache.archiva.redback.components.cache/spring-cache-api/${redback.cache.version}</bundle>
    <bundle dependency="true">mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.ehcache/${ehcache.bundle.version}</bundle>
    <bundle>wrap:mvn:org.apache.archiva.redback.components.cache/spring-cache-ehcache/${redback.cache.version}</bundle>
    <bundle>mvn:org.apache.archiva/archiva-policies/${project.version}</bundle>
  </feature>

  <feature name="archiva-configuration" description="Archiva Configuration module" version="${project.version}" resolver="(obr)">
    <feature version="${project.version}">archiva-policies</feature>
    <feature>http</feature>
    <feature version="[3,4)">spring-web</feature>
    <bundle dependency="true">mvn:commons-collections/commons-collections/${commons-collections.version}</bundle>
    <bundle dependency="true">mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.commons-beanutils/${commons-beanutils.bundle.version}</bundle>
    <bundle dependency="true">mvn:commons-codec/commons-codec/${commons-codec.version}</bundle>
    <bundle dependency="true">mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.commons-digester/${commons-digester.bundle.version}</bundle>
    <bundle dependency="true">mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.commons-jxpath/${commons-jxpath.bundle.version}</bundle>
    <bundle dependency="true">mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.commons-configuration/${commons-configuration.bundle.version}</bundle>
    <bundle dependency="true">wrap:mvn:org.codehaus.plexus/plexus-interpolation/${plexus-interpolation.version}</bundle>
    <bundle dependency="true">wrap:mvn:org.apache.archiva.redback.components.registry/spring-registry-api/${redback.registry.version}</bundle>
    <bundle dependency="true">wrap:mvn:org.apache.archiva.redback.components.registry/spring-registry-commons/${redback.registry.version}</bundle>
    <bundle>mvn:org.apache.archiva/archiva-configuration/${project.version}</bundle>
  </feature>

  <feature name="archiva-model" description="Archiva Model module" version="${project.version}" resolver="(obr)">
    <feature version="${project.version}">archiva-common</feature>
    <bundle>mvn:org.apache.archiva/archiva-model/${project.version}</bundle>
  </feature>

  <feature name="archiva-plexus-bridge" description="Archive Plexus Bridge module" version="${project.version}" resolver="(obr)">
    <feature version="${project.version}">archiva-common</feature>
    <feature version="[3,4)">spring</feature>
    <bundle dependency="true">wrap:mvn:org.codehaus.plexus/plexus-digest/${plexus-digest.version}</bundle>
    <bundle>mvn:org.apache.archiva/archiva-plexus-bridge/${project.version}</bundle>
  </feature>

  <feature name="archiva-repository-admin-api" description="Archiva Repository Admin API module" version="${project.version}" resolver="(obr)">
    <feature version="${project.version}">archiva-common</feature>
    <bundle dependency="true">mvn:commons-collections/commons-collections/${commons-collections.version}</bundle>
    <bundle dependency="true">wrap:mvn:org.codehaus.redback/redback-users-api/${redback.version}</bundle>
    <bundle dependency="true">wrap:mvn:org.codehaus.redback/redback-configuration/${redback.version}</bundle>
    <bundle dependency="true">wrap:mvn:org.codehaus.redback/redback-policy/${redback.version}</bundle>
    <bundle dependency="true">wrap:mvn:org.codehaus.redback/redback-users-memory/${redback.version}</bundle>
    <bundle>mvn:org.apache.archiva/archiva-repository-admin-api/${project.version}</bundle>
  </feature>

  <feature name="archiva-metadata" description="Archiva Metadata module" version="${project.version}" resolver="(obr)">
    <feature version="${project.version}">archiva-common</feature>
    <feature version="[3,4)">spring</feature>
    <bundle>mvn:org.apache.archiva/metadata-model/${project.version}</bundle>
    <bundle>mvn:org.apache.archiva/metadata-repository-api/${project.version}</bundle>
  </feature>

  <feature name="archiva-audit" description="Archiva Audit module" version="${project.version}" resolver="(obr)">
    <feature version="${project.version}">archiva-metadata</feature>
    <bundle>mvn:org.apache.archiva/audit/${project.version}</bundle>
  </feature>

  <feature name="archiva-xml-tools" description="Archiva XML Tools module" version="${project.version}" resolver="(obr)">
    <feature version="${project.version}">archiva-common</feature>
    <bundle dependency="true">mvn:commons-collections/commons-collections/${commons-collections.version}</bundle>
    <bundle dependency="true">mvn:commons-io/commons-io/${commons-io.version}</bundle>
    <bundle dependency="true">mvn:org.apache.servicemix.specs/org.apache.servicemix.specs.stax-api-1.0/${servicemix.specs.version}</bundle>
    <bundle dependency="true">mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.dom4j/${dom4j.bundle.version}</bundle>
    <bundle>mvn:org.apache.archiva/archiva-xml-tools/${project.version}</bundle>
  </feature>

  <feature name="archiva-maven2-repository" description="Archiva Maven 2 Repository module" version="${project.version}" resolver="(obr)">
    <feature version="${project.version}">archiva-checksum</feature>
    <feature version="${project.version}">archiva-plexus-bridge</feature>
    <feature version="${project.version}">archiva-configuration</feature>
    <feature version="${project.version}">archiva-proxy-common</feature>
    <feature version="${project.version}">archiva-reports</feature>
    <feature version="${project.version}">archiva-xml-tools</feature>
    <bundle dependency="true">wrap:mvn:org.apache.maven/maven-artifact/${maven.version}</bundle>
    <bundle dependency="true">wrap:mvn:org.apache.maven/maven-model/${maven.version}</bundle>
    <bundle dependency="true">wrap:mvn:org.apache.maven/maven-project/${maven.version}</bundle>
    <bundle dependency="true">wrap:mvn:org.apache.maven/maven-settings/${maven.version}</bundle>
    <bundle dependency="true">wrap:mvn:org.apache.maven/maven-artifact-manager/${maven.version}</bundle>
    <bundle dependency="true">wrap:mvn:org.apache.maven.shared/maven-dependency-tree/${maven-dependency-tree.version}</bundle>
    <bundle dependency="true">mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.jdom/${jdom.bundle.version}</bundle>
    <bundle dependency="true">mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.lucene/${lucene.bundle.version}</bundle>
    <bundle dependency="true">wrap:mvn:org.apache.maven.archetype/archetype-catalog/${maven.archetype.version}</bundle>
    <bundle dependency="true">wrap:mvn:org.apache.maven.archetype/archetype-registry/${maven.archetype.version}</bundle>
    <bundle dependency="true">wrap:mvn:org.apache.maven.archetype/archetype-descriptor/${maven.archetype.version}</bundle>
    <bundle dependency="true">wrap:mvn:org.apache.maven.shared/maven-invoker/${maven.version}</bundle>
    <bundle dependency="true">wrap:mvn:org.apache.maven.indexer/indexer-core/${maven.indexer.version}</bundle>
    <bundle dependency="true">wrap:mvn:org.apache.maven.indexer/indexer-artifact/${maven.indexer.version}</bundle>
    <bundle dependency="true">mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.oro/${oro.bundle.version}</bundle>
    <bundle dependency="true">mvn:commons-collections/commons-collections/${commons-collections.version}</bundle>
    <bundle dependency="true">mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.velocity/${velocity.bundle.version}</bundle>
    <bundle dependency="true">wrap:mvn:org.codehaus.plexus/plexus-velocity/${plexus-velocity.version}</bundle>
    <bundle dependency="true">wrap:mvn:net.sourceforge.jchardet/jchardet/${jcharset.version}</bundle>
    <bundle dependency="true">wrap:mvn:org.apache.maven.archetype/archetype-common/${maven.archetype.version}</bundle>
    <bundle dependency="true">wrap:mvn:org.apache.maven/maven-model-builder/${maven3x.version}</bundle>
    <bundle>mvn:org.apache.archiva/maven2-repository/${project.version}</bundle>
  </feature>

  <feature name="archiva-consumers-api" description="Archiva Consumers API module" version="${project.version}" resolver="(obr)">
    <feature version="${project.version}">archiva-repository-admin-api</feature>
    <bundle dependency="true">mvn:commons-collections/commons-collections/${commons-collections.version}</bundle>
    <bundle dependency="true">mvn:commons-io/commons-io/${commons-io.version}</bundle>
    <bundle>mvn:org.apache.archiva/archiva-consumer-api/${project.version}</bundle>
  </feature>

  <feature name="archiva-consumers" description="Archiva Consumers module" version="${project.version}" resolver="(obr)">
    <feature version="${project.version}">archiva-consumers-api</feature>
    <feature version="${project.version}">archiva-configuration</feature>
    <feature version="${project.version}">archiva-plexus-bridge</feature>
    <feature version="${project.version}">archiva-metadata</feature>
    <feature version="${project.version}">archiva-model</feature>
    <feature version="${project.version}">archiva-repository-layer</feature>
    <bundle>mvn:org.apache.archiva/archiva-core-consumers/${project.version}</bundle>
    <bundle>mvn:org.apache.archiva/archiva-lucene-consumers/${project.version}</bundle>
    <bundle>mvn:org.apache.archiva/archiva-metadata-consumer/${project.version}</bundle>
  </feature>

  <feature name="archiva-reports" description="Archiva Problem Reports module" version="${project.version}" resolver="(obr)">
    <feature version="${project.version}">archiva-configuration</feature>
    <feature version="${project.version}">archiva-consumers-api</feature>
    <feature version="${project.version}">archiva-metadata</feature>
    <bundle>mvn:org.apache.archiva/problem-reports/${project.version}</bundle>
  </feature>

  <feature name="archiva-repository-layer" description="Archiva Repository Layer module" version="${project.version}" resolver="(obr)">
    <feature version="${project.version}">archiva-configuration</feature>
    <feature version="${project.version}">archiva-metadata</feature>
    <feature version="${project.version}">archiva-repository-admin-api</feature>
    <feature version="${project.version}">archiva-maven2-repository</feature>
    <feature version="${project.version}">archiva-model</feature>
    <bundle dependency="true">mvn:commons-collections/commons-collections/${commons-collections.version}</bundle>
    <bundle dependency="true">mvn:commons-io/commons-io/${commons-io.version}</bundle>
    <bundle dependency="true">mvn:org.apache.servicemix.specs/org.apache.servicemix.specs.stax-api-1.0/${servicemix.specs.version}</bundle>
    <bundle dependency="true">mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.dom4j/${dom4j.bundle.version}</bundle>
    <bundle>mvn:org.apache.archiva/archiva-repository-layer/${project.version}</bundle>
  </feature>

  <feature name="archiva-proxy-common" description="Archiva Proxy Common module" version="${project.version}" resolver="(obr)">
    <feature version="${project.version}">archiva-plexus-bridge</feature>
    <bundle dependency="true">mvn:commons-collections/commons-collections/${commons-collections.version}</bundle>
    <bundle dependency="true">mvn:commons-io/commons-io/${commons-io.version}</bundle>
    <bundle dependency="true">wrap:mvn:org.apache.maven.wagon/wagon-provider-api/${wagon.version}</bundle>
    <bundle dependency="true">wrap:mvn:org.apache.maven.wagon/wagon-file/${wagon.version}</bundle>
    <bundle dependency="true">mvn:org.apache.httpcomponents/httpcore-osgi/${httpclient.version}</bundle>
    <bundle dependency="true">mvn:org.apache.httpcomponents/httpclient-osgi/${httpclient.version}</bundle>
    <bundle dependency="true">mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.jsoup/${jsoup.bundle.version}</bundle>
    <bundle dependency="true">wrap:mvn:org.apache.maven.wagon/wagon-http-shared4/${wagon.version}</bundle>
    <bundle dependency="true">wrap:mvn:org.apache.maven.wagon/wagon-http/${wagon.version}</bundle>
    <bundle>mvn:org.apache.archiva/archiva-proxy-common/${project.version}</bundle>
  </feature>

  <feature name="archiva-proxy" description="Archiva Proxy module" version="${project.version}" resolver="(obr)">
    <feature version="${project.version}">archiva-configuration</feature>
    <feature version="${project.version}">archiva-repository-admin-api</feature>
    <feature version="${project.version}">archiva-model</feature>
    <feature version="${project.version}">archiva-proxy-common</feature>
    <feature version="${project.version}">archiva-repository-layer</feature>
    <feature version="${project.version}">archiva-scheduler</feature>
    <bundle>mvn:org.apache.archiva/archiva-proxy/${project.version}</bundle>
  </feature>

  <feature name="archiva-scheduler-api" description="Archiva Scheduler API module" version="${project.version}" resolver="(obr)">
    <bundle dependency="true">wrap:mvn:org.apache.archiva.redback.components/spring-taskqueue/${redback.taskqueue.version}</bundle>
    <bundle>mvn:org.apache.archiva/archiva-scheduler-api/${project.version}</bundle>
  </feature>

  <feature name="archiva-repository-statistics" description="Archiva Repository Statistics module" version="${project.version}" resolver="(obr)">
    <feature version="${project.version}">archiva-repository-layer</feature>
    <bundle dependency="true">mvn:javax.jcr/jcr/${javax.jcr.version}</bundle>
    <bundle dependency="true">mvn:org.apache.jackrabbit/jackrabbit-jcr-commons/${jackrabbit.version}</bundle>
    <bundle>mvn:org.apache.archiva/repository-statistics/${project.version}</bundle>
  </feature>

  <feature name="archiva-repository-scanner" description="Archiva Repository Scanner module" version="${project.version}" resolver="(obr)">
    <feature version="${project.version}">archiva-repository-admin-api</feature>
    <feature version="${project.version}">archiva-configuration</feature>
    <feature version="${project.version}">archiva-consumers</feature>
    <feature version="${project.version}">archiva-scheduler-api</feature>
    <bundle>mvn:org.apache.archiva/archiva-repository-scanner/${project.version}</bundle>
  </feature>

  <feature name="archiva-scheduler" description="Archiva Scheduler module" version="${project.version}" resolver="(obr)">
    <feature version="${project.version}">archiva-plexus-bridge</feature>
    <feature version="${project.version}">archiva-proxy-common</feature>
    <feature version="${project.version}">archiva-repository-scanner</feature>
    <feature version="${project.version}">archiva-repository-statistics</feature>
    <bundle dependency="true">wrap:mvn:org.apache.archiva.redback.components/spring-quartz/${redback.quartz.version}</bundle>
    <bundle dependency="true">mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.quartz/${quartz.bundle.version}</bundle>
    <bundle dependency="true">mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.lucene/${lucene.bundle.version}</bundle>
    <bundle dependency="true">wrap:mvn:org.apache.maven.indexer/indexer-core/${maven.indexer.version}</bundle>
    <bundle dependency="true">wrap:mvn:org.apache.maven.indexer/indexer-artifact/${maven.indexer.version}</bundle>
    <bundle>mvn:org.apache.archiva/archiva-scheduler-indexing/${project.version}</bundle>
    <bundle>mvn:org.apache.archiva/archiva-scheduler-repository/${project.version}</bundle>
  </feature>

  <feature name="archiva-repository-admin-default" description="Archiva Repository Admin Default module" version="${project.version}" resolver="(obr)">
    <bundle dependency="true">mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.commons-validator/${commons-validator.bundle.version}</bundle>
    <bundle dependency="true">mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.cglib/${cglib.bundle.version}</bundle>
    <bundle dependency="true">mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.xpp3/${xpp3.bundle.version}</bundle>
    <bundle dependency="true">mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.xstream/${xstream.bundle.version}</bundle>
    <bundle dependency="true">mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.jcip-annotations/${jcip-annotations.bundle.version}</bundle>
    <bundle dependency="true">mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.beanlib/${beanlib.bundle.version}</bundle>
    <bundle dependency="true">mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.stax-utils/${stax-utils.bundle.version}</bundle>
    <bundle dependency="true">wrap:mvn:org.codehaus.redback/redback-rbac-jdo/${redback.version}</bundle>
    <bundle dependency="true">wrap:mvn:org.codehaus.redback/redback-rbac-model/${redback.version}</bundle>
    <bundle dependency="true">wrap:mvn:org.codehaus.redback/redback-rbac-role-manager/${redback.version}</bundle>
    <bundle>mvn:org.apache.archiva/archiva-repository-admin-default/${project.version}</bundle>
  </feature>

  <feature name="archiva-transaction" description="Archiva Transaction module" version="${project.version}" resolver="(obr)">
    <feature version="${project.version}">archiva-plexus-bridge</feature>
    <bundle dependency="true">mvn:commons-io/commons-io/${commons-io.version}</bundle>
    <bundle>mvn:org.apache.archiva/archiva-transaction/${project.version}</bundle>
  </feature>

  <feature name="archiva-artifact-converter" description="Archiva Artifact Converter module" version="${project.version}" resolver="(obr)">
    <feature version="${project.version}">archiva-transaction</feature>
    <bundle dependency="true">mvn:commons-io/commons-io/${commons-io.version}</bundle>
    <bundle dependency="true">wrap:mvn:org.apache.maven/maven-model-v3/${maven-model-v3.version}</bundle>
    <bundle dependency="true">wrap:mvn:org.apache.maven/maven-model/${maven3x.version}</bundle>
    <bundle dependency="true">wrap:mvn:org.apache.maven.shared/maven-model-converter/${maven-model-converter.version}</bundle>
    <bundle dependency="true">wrap:mvn:org.apache.maven/maven-repository-metadata/${maven.version}</bundle>
    <bundle dependency="true">wrap:mvn:org.apache.maven/maven-artifact/${maven.version}</bundle>
    <bundle>mvn:org.apache.archiva/archiva-artifact-converter/${project.version}</bundle>
  </feature>

  <feature name="archiva-converter" description="Archiva Converter module" version="${project.version}" resolver="(obr)">
    <feature version="${project.version}">archiva-consumers</feature>
    <feature version="${project.version}">archiva-scheduler</feature>
    <feature version="${project.version}">archiva-transaction</feature>
    <bundle dependency="true">mvn:commons-io/commons-io/${commons-io.version}</bundle>
    <bundle dependency="true">wrap:mvn:org.apache.maven/maven-model-v3/${maven-model-v3.version}</bundle>
    <bundle dependency="true">wrap:mvn:org.apache.maven/maven-model/${maven3x.version}</bundle>
    <bundle dependency="true">wrap:mvn:org.apache.maven.shared/maven-model-converter/${maven-model-converter.version}</bundle>
    <bundle dependency="true">wrap:mvn:org.apache.maven/maven-repository-metadata/${maven.version}</bundle>
    <bundle>mvn:org.apache.archiva/archiva-converter/${project.version}</bundle>
  </feature>

  <feature name="archiva-indexer" description="Archiva Indexer module" version="${project.version}" resolver="(obr)">
    <feature version="${project.version}">archiva-repository-admin-api</feature>
    <feature version="${project.version}">archiva-plexus-bridge</feature>
    <bundle dependency="true">mvn:commons-io/commons-io/${commons-io.version}</bundle>
    <bundle dependency="true">mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.lucene/${lucene.bundle.version}</bundle>
    <bundle dependency="true">wrap:mvn:org.apache.maven.indexer/indexer-core/${maven.indexer.version}</bundle>
    <bundle>mvn:org.apache.archiva/archiva-indexer/${project.version}</bundle>
  </feature>

  <feature name="archiva-security-common" description="Archiva Security Common module" version="${project.version}" resolver="(obr)">
    <bundle>mvn:org.apache.archiva/archiva-security-common/${project.version}</bundle>
  </feature>

  <feature name="archiva-rest-api" description="Archiva REST API module" version="${project.version}" resolver="(obr)">
    <feature version="${project.version}">archiva-repository-admin-api</feature>
    <feature version="[2.4,3)">cxf</feature>
    <bundle dependency="true">wrap:mvn:org.codehaus.redback/redback-authorization-api/${redback.version}</bundle>
    <bundle>mvn:org.apache.archiva/archiva-rest-api/${project.version}</bundle>
  </feature>

  <feature name="archiva-rest-services" description="Archiva REST Services module" version="${project.version}" resolver="(obr)">
    <feature version="${project.version}">archiva-rest-api</feature>
    <feature version="${project.version}">archiva-audit</feature>
    <feature version="${project.version}">archiva-indexer</feature>
    <feature version="${project.version}">archiva-checksum</feature>
    <feature version="${project.version}">archiva-repository-layer</feature>
    <bundle dependency="true">mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.xpp3/${xpp3.bundle.version}</bundle>
    <bundle dependency="true">mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.xstream/${xstream.bundle.version}</bundle>
    <bundle dependency="true">mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.jcip-annotations/${jcip-annotations.bundle.version}</bundle>
    <bundle dependency="true">mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.beanlib/${beanlib.bundle.version}</bundle>
    <bundle>mvn:org.apache.archiva/archiva-rest-services/${project.version}</bundle>
  </feature>

  <feature name="archiva-rss" description="Archiva RSS module" version="${project.version}" resolver="(obr)">
    <feature version="${project.version}">archiva-metadata</feature>
    <bundle dependency="true">mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.rome/${rome.bundle.version}</bundle>
    <bundle>mvn:org.apache.archiva/archiva-rss/${project.version}</bundle>
  </feature>

  <feature name="archiva-security" description="Archiva Security module" version="${project.version}" resolver="(obr)">
    <feature version="${project.version}">archiva-configuration</feature>
    <feature>http</feature>
    <bundle dependency="true">wrap:mvn:org.codehaus.redback/redback-authentication-api/${redback.version}</bundle>
    <bundle dependency="true">wrap:mvn:org.codehaus.redback/redback-authorization-api/${redback.version}</bundle>
    <bundle dependency="true">wrap:mvn:org.codehaus.redback/redback-policy/${redback.version}</bundle>
    <bundle dependency="true">wrap:mvn:org.codehaus.redback/redback-rbac-jdo/${redback.version}</bundle>
    <bundle dependency="true">wrap:mvn:org.codehaus.redback/redback-rbac-model/${redback.version}</bundle>
    <bundle dependency="true">wrap:mvn:org.codehaus.redback/redback-rbac-role-manager/${redback.version}</bundle>
    <bundle dependency="true">wrap:mvn:org.codehaus.redback/redback-system/${redback.version}</bundle>
    <bundle dependency="true">wrap:mvn:org.codehaus.redback/redback-users-api/${redback.version}</bundle>
    <bundle dependency="true">wrap:mvn:org.codehaus.redback/redback-users-jdo/${redback.version}</bundle>
    <bundle>mvn:org.apache.archiva/archiva-security/${project.version}</bundle>
  </feature>

  <feature name="archiva-webdav" description="Archiva WebDav module" version="${project.version}" resolver="(obr)">
    <feature version="${project.version}">archiva-audit</feature>
    <feature version="${project.version}">archiva-indexer</feature>
    <feature version="${project.version}">archiva-proxy</feature>
    <feature version="${project.version}">archiva-security</feature>
    <feature>http</feature>
    <bundle dependency="true">mvn:commons-io/commons-io/${commons-io.version}</bundle>
    <bundle dependency="true">mvn:org.apache.jackrabbit/jackrabbit-webdav/${jackrabbit.version}</bundle>
    <bundle dependency="true">mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.joda-time/${joda-time.bundle.version}</bundle>
    <bundle dependency="true">mvn:commons-codec/commons-codec/${commons-codec.version}</bundle>
    <bundle dependency="true">mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.commons-httpclient/${commons-httpclient.bundle.version}</bundle>
    <bundle dependency="true">wrap:mvn:org.codehaus.redback/redback-common-integrations/${redback.version}</bundle>
    <bundle>mvn:org.apache.archiva/archiva-webdav/${project.version}</bundle>
  </feature>

  <feature name="archiva-stage-repository-merge" description="Archiva Stage Repository Merge module" version="${project.version}" resolver="(obr)">
    <feature version="${project.version}">archiva-repository-layer</feature>
    <bundle dependency="true">mvn:commons-io/commons-io/${commons-io.version}</bundle>
    <bundle>mvn:org.apache.archiva/stage-repository-merge/${project.version}</bundle>
  </feature>

  <feature name="archiva-generic-metadata-support" description="Archiva Generic Metadata Support module" version="${project.version}" resolver="(obr)">
    <feature version="${project.version}">archiva-metadata</feature>
    <bundle>mvn:org.apache.archiva/generic-metadata-support/${project.version}</bundle>
  </feature>

  <feature name="archiva-metadata-store-file" description="Archiva Metadata Store File module" version="${project.version}" resolver="(obr)">
    <feature version="${project.version}">archiva-configuration</feature>
    <feature version="${project.version}">archiva-metadata</feature>
    <bundle dependency="true">mvn:commons-io/commons-io/${commons-io.version}</bundle>
    <bundle>mvn:org.apache.archiva/metadata-store-file/${project.version}</bundle>
  </feature>

  <feature name="archiva-metadata-store-jcr" description="Archiva Metadata Store JCR module" version="${project.version}" resolver="(obr)">
    <feature version="${project.version}">archiva-configuration</feature>
    <feature version="${project.version}">archiva-metadata</feature>
    <bundle dependency="true">mvn:javax.jcr/jcr/${javax.jcr.version}</bundle>
    <bundle dependency="true">mvn:org.apache.jackrabbit/jackrabbit-jcr-commons/${jackrabbit.version}</bundle>
    <bundle dependency="true">wrap:mvn:org.apache.jackrabbit/jackrabbit-core/${jackrabbit.version}</bundle>
    <bundle>mvn:org.apache.archiva/metadata-store-jcr/${project.version}</bundle>
  </feature>

  <feature name="archiva-npanday-support" description="Archiva Npanday Support module" version="${project.version}" resolver="(obr)">
    <feature version="${project.version}">archiva-repository-layer</feature>
    <bundle>mvn:org.apache.archiva/npanday-support/${project.version}</bundle>
  </feature>

  <feature name="archiva-webapp-common" description="Archiva WebApp Common" version="${project.version}" resolver="(obr)">
    <feature>war</feature>
    <feature version="[3,4)">spring</feature>
    <feature version="[3,4)">spring-web</feature>
    <feature version="${project.version}">archiva-rss</feature>
    <feature version="${project.version}">archiva-plexus-bridge</feature>
    <feature version="${project.version}">archiva-configuration</feature>
    <feature version="${project.version}">archiva-scheduler</feature>
    <feature version="${project.version}">archiva-security-common</feature>
    <feature version="${project.version}">archiva-security</feature>
    <bundle dependency="true">mvn:commons-codec/commons-codec/${commons-codec.version}</bundle>
    <bundle dependency="true">wrap:mvn:org.codehaus.redback/redback-common-integrations/${redback.version}</bundle>
    <bundle>mvn:org.apache.archiva/archiva-webapp-common/${project.version}</bundle>
  </feature>

  <feature name="archiva" description="Archiva application" version="${project.version}" resolver="(obr)">
    <feature version="${project.version}">archiva-common</feature>
    <feature version="${project.version}">archiva-repository-admin-default</feature>
    <feature version="${project.version}">archiva-repository-admin-api</feature>
    <feature version="${project.version}">archiva-audit</feature>
    <feature version="${project.version}">archiva-plexus-bridge</feature>
    <feature version="${project.version}">archiva-configuration</feature>
    <feature version="${project.version}">archiva-repository-statistics</feature>
    <feature version="${project.version}">archiva-scheduler</feature>
    <feature version="${project.version}">archiva-indexer</feature>
    <feature version="${project.version}">archiva-generic-metadata-support</feature>
    <feature version="${project.version}">archiva-rest-api</feature>
    <feature version="${project.version}">archiva-rss</feature>
    <feature version="${project.version}">archiva-security</feature>
    <feature version="${project.version}">archiva-stage-repository-merge</feature>
    <feature>war</feature>
    <feature version="[3,4)">spring-web</feature>
    <bundle dependency="true">mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.junit/${junit.bundle.version}</bundle>
    <bundle dependency="true">mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.ognl/${ognl.bundle.version}</bundle>
    <bundle dependency="true">mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.javassist/${javassist.bundle.version}</bundle>
    <bundle dependency="true">mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.freemarker/${freemarker.bundle.version}</bundle>
    <bundle dependency="true">mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.oro/${oro.bundle.version}</bundle>
    <bundle dependency="true">mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.commons-beanutils/${commons-beanutils.bundle.version}</bundle>
    <bundle dependency="true">mvn:commons-collections/commons-collections/${commons-collections.version}</bundle>
    <bundle dependency="true">mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.commons-digester/${commons-digester.bundle.version}</bundle>
    <bundle dependency="true">mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.velocity/${velocity.bundle.version}</bundle>
    <bundle dependency="true">mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.rome/${rome.bundle.version}</bundle>
    <bundle dependency="true">wrap:mvn:org.apache.velocity.tools/velocity-tools/${velocity-tools.version}</bundle>
    <bundle dependency="true">mvn:org.testng/testng/${testng.version}</bundle>
    <bundle dependency="true">mvn:commons-io/commons-io/${commons-io.version}</bundle>
    <bundle dependency="true">mvn:commons-fileupload/commons-fileupload/${commons-fileupload.version}</bundle>
    <bundle dependency="true">mvn:org.apache.struts/struts2-core/${struts.version}</bundle>
    <bundle dependency="true">mvn:org.apache.struts.xwork/xwork-core/${struts.version}</bundle>
    <bundle dependency="true">wrap:mvn:org.codehaus.redback/redback-common-integrations/${redback.version}</bundle>
    <bundle dependency="true">wrap:mvn:org.codehaus.redback/redback-rest-services/${redback.version}</bundle>
    <bundle>mvn:org.apache.archiva/archiva-webapp/${project.version}/war</bundle>
  </feature>

</features>


text:
SIMLet
======

Simulation engine. Extremely WIP.

Requires
========

* JDK8
* Maven

redpajama_set_name: RedPajamaGithub


text:
django-simple-url
=================

django-simple-url allows developers to specify Django routes without having to
learn the complicated intricacies of regular expressions, and is meant as a
drop-in replacement of the native Django ``url`` function.

Usage
-----

Using django-simple-url is almost the same as using the native Django ``url``
function.

.. code-block:: python

    # main/urls.py
    from django_simple_url import simple_url

    from . import views

    urlpatterns = [
        simple_url('', views.index),
        simple_url('posts/<int:id>/', views.post),
    ]

It also works nicely with other apps, like for instance the Django Admin.

.. code-block:: python

    # main/urls.py
    from django.contrib import admin
    from django_simple_url import simple_url

    urlpatterns = [
        simple_url('admin/', admin.site.urls),
    ]

Allowed formats
---------------

The following methods are allowed to specify the route.

Flask-like syntax
'''''''''''''''''

The most complete definition is as follows:

.. code-block:: python

    simple_url(r'posts/<int:year>/<int:month>/', views.post_list)

Converter-free syntax
'''''''''''''''''''''

This is similar to the Flask-like syntax, except that it does not explicitly
specify the type. In this case, the type defaults to ``slug``.

.. code-block:: python
    simple_url(r'posts/<year>/<month>/', views.post_list)

Rails-like syntax (Deprecated)
''''''''''''''''''''''''''''''

This is the easiest syntax, but for simplicity of implementation will eventually
be gone.

.. code-block:: python

    simple_url(r'posts/:year/:month/', views.posts_list)

Inspiration
-----------

The development of this library is inspired by the following post on the Django
mailing list: `Challenge teaching Django to beginners: urls.py <https://groups.google.com/forum/#!topic/django-developers/u6sQax3sjO4>`_.


text:
class AddAllNationApplicabilityToWithdrawnEditions < ActiveRecord::Migration[5.1]
  def up
    Edition.where(type: %w[DetailedGuide Publication Consultation], state: "withdrawn").each do |edition|
      if edition.nation_inapplicabilities.any?
        edition.update_column(:all_nation_applicability, false)
      end
    end
  end

  def down; end
end


text:
#ifndef SIDECAR_GUI_SPECTRUM_FREQSCALEWIDGET_H // -*- C++ -*-
#define SIDECAR_GUI_SPECTRUM_FREQSCALEWIDGET_H

#include "ScaleWidget.h"

namespace Logger {
class Log;
}

namespace SideCar {
namespace GUI {
namespace Spectrum {

class FreqScaleWidget : public ScaleWidget {
public:
    FreqScaleWidget(QWidget* parent = 0, Qt::Orientation orientation = Qt::Horizontal) :
        ScaleWidget(parent, orientation)
    {
    }

    QString formatTickTag(double value);
};

} // end namespace Spectrum
} // end namespace GUI
} // end namespace SideCar

/** \file
 */

#endif


text:
[![Build Status](https://travis-ci.org/gssbzn/lonely_planet.svg?branch=master)](https://travis-ci.org/gssbzn/lonely_planet)
[![Coverage Status](https://coveralls.io/repos/github/gssbzn/lonely_planet/badge.svg?branch=master)](https://coveralls.io/github/gssbzn/lonely_planet?branch=master)

A simple program to convert XML files with destinations information
to plain HTML pages.

## Requirements

Please consider having Ruby 2.3.0 on your system,
a `.ruby-version` file is provided in case you mange
your gems with [rbenv](https://github.com/rbenv/rbenv#installation)
or [rvm](http://rvm.io/rvm/install)

## Installation

Clone the repository and setup.

```sh
$ git clone https://github.com/gssbzn/lonely_planet.git
$ cd lonely_planet
$ ./bin/setup
```

## Usage

```sh
$ ./bin/lonely_planet render
```

### Command options

- Taxonomy file location, where to look for the taxonomy XML file

    ```sh
    ./bin/lonely_planet render -y /some/path/taxonomy.xml
    ```
- Destinations file location, where to look for the destinations XML file

    ```sh
    ./bin/lonely_planet render -d /some/path/destinations.xml
    ```
- Output folder, where the resulting HTML file will be written to

    ```sh
    ./bin/lonely_planet render -o /some/path/
    ```

These options can be combined as you see fit.

## Contributing

1. Fork it ( https://github.com/gssbzn/lonely_planet/fork )
2. Create your feature branch (`git checkout -b my-new-feature`)
3. Commit your changes (`git commit -am 'Add some feature'`)
4. Push to the branch (`git push origin my-new-feature`)
5. Create a new Pull Request

## License

MIT License. Copyright 2016 Gustavo Bazan. http://gustavobazan.com


text:
<!DOCTYPE html>

    <meta charset="utf-8">
    <title>ContextMenu</title>
    <link rel="stylesheet" href="http://yui.yahooapis.com/3.9.1/build/cssgrids/cssgrids-min.css">
    <link rel="stylesheet" href="../assets/vendor/prettify/prettify-min.css">
    <link rel="stylesheet" href="../assets/css/main.css" id="site_styles">
    <link rel="icon" href="../assets/favicon.ico">

            API Docs for:

APIs

Classes

Modules

                            <input type="search" id="api-filter" placeholder="Type to filter APIs">

Area

ContextMenu

Dialog

Inspector

LineEditor

List

LiteGUI

SearchBox

Slider

Split

Tabs

Tree

                    Show:

                        <input type="checkbox" id="api-show-inherited" checked>
                        Inherited

                        <input type="checkbox" id="api-show-protected">
                        Protected

                        <input type="checkbox" id="api-show-private">
                        Private

                        <input type="checkbox" id="api-show-deprecated">
                        Deprecated

ContextMenu Class

            Defined in: ../src/widgets.js:69

ContextMenu

Constructor

ContextMenu

            (

                        values

                        options

)

                Defined in
        ../src/widgets.js:69

Parameters:

                        values
                        Array

(allows object { title: "Nice text", callback: function ... })

                        options
                        Object

[optional] Some options:\

title: title to show on top of the menu

callback: function to call when an option is clicked, it receives the item information

ignore_item_callbacks: ignores the callback inside the item, it just calls the options.callback

event: you can pass a MouseEvent, this way the ContextMenu appears in that position

Index

Item Index


text:
package org.usfirst.frc4959.StaleyRobotics2015.commands;

import edu.wpi.first.wpilibj.command.Command;

/**
 * Author - Dustin Klein
 */
public class  AutonomousCommand extends Command {

    public AutonomousCommand() {
    }

    protected void initialize() {
    }

    protected void execute() {
    }

    protected boolean isFinished() {
        return false;
    }

    protected void end() {
    }

    protected void interrupted() {
    }
}


text:
namespace Microsoft.Graph
{
    using System;
    using System.Collections.Generic;
    using System.IO;
    using System.Net.Http;
    using System.Threading;

    /// <summary>
    /// The type WorkbookFunctionsXorRequest.
    /// </summary>
    public partial class WorkbookFunctionsXorRequest : BaseRequest, IWorkbookFunctionsXorRequest
    {
        /// <summary>
        /// Constructs a new WorkbookFunctionsXorRequest.
        /// </summary>
        public WorkbookFunctionsXorRequest(
            string requestUrl,
            IBaseClient client,
            IEnumerable<Option> options)
            : base(requestUrl, client, options)
        {
            this.ContentType = "application/json";
            this.RequestBody = new WorkbookFunctionsXorRequestBody();
        }

        /// <summary>
        /// Gets the request body.
        /// </summary>
        public WorkbookFunctionsXorRequestBody RequestBody { get; private set; }

        /// <summary>
        /// Issues the POST request.
        /// </summary>
        public System.Threading.Tasks.Task<WorkbookFunctionResult> PostAsync()
        {
            return this.PostAsync(CancellationToken.None);
        }

        /// <summary>
        /// Issues the POST request.
        /// </summary>
        /// <param name=""cancellationToken"">The <see cref=""CancellationToken""/> for the request.</param>
        /// <returns>The task to await for async call.</returns>
        public System.Threading.Tasks.Task<WorkbookFunctionResult> PostAsync(
            CancellationToken cancellationToken)
        {
            this.Method = "POST";
            return this.SendAsync<WorkbookFunctionResult>(this.RequestBody, cancellationToken);
        }

        /// <summary>
        /// Adds the specified expand value to the request.
        /// </summary>
        /// <param name="value">The expand value.</param>
        /// <returns>The request object to send.</returns>
        public IWorkbookFunctionsXorRequest Expand(string value)
        {
            this.QueryOptions.Add(new QueryOption("$expand", value));
            return this;
        }

        /// <summary>
        /// Adds the specified select value to the request.
        /// </summary>
        /// <param name="value">The select value.</param>
        /// <returns>The request object to send.</returns>
        public IWorkbookFunctionsXorRequest Select(string value)
        {
            this.QueryOptions.Add(new QueryOption("$select", value));
            return this;
        }
    }
}


text:
package it.cnr.isti.vir.features.localfeatures;

import it.cnr.isti.vir.features.AbstractFeaturesCollector;
import it.cnr.isti.vir.similarity.LocalFeatureMatch;
import it.cnr.isti.vir.similarity.LocalFeaturesMatches;
import it.cnr.isti.vir.util.RandomOperations;

import java.io.BufferedReader;
import java.io.DataInput;
import java.io.IOException;
import java.nio.ByteBuffer;

public class ORBGroup extends ALocalFeaturesGroup<ORB> {

	public static final byte version = 0;

	public ORBGroup(ORB[] arr, AbstractFeaturesCollector fc) {
		super(arr, fc);
	}

	public ORBGroup(ORB[] arr ) {
		super(arr);
	}

	public ORBGroup(AbstractFeaturesCollector fc) {
		super(fc);
	}

	public ORBGroup(DataInput in) throws Exception {
		in.readByte(); // version
		int nBytes = in.readInt();
		byte[] bytes = new byte[nBytes];
		in.readFully(bytes);
		ByteBuffer bBuffer = ByteBuffer.wrap(bytes);
		lfArr = new ORB[bBuffer.getInt()];
		for (int i = 0; i < lfArr.length; i++) {
			lfArr[i] = new ORB(bBuffer);
			lfArr[i].setLinkedGroup(this);
		}
	}

	public ORBGroup(ByteBuffer in ) throws IOException {
		byte version = in.get();
		int nBytes = in.getInt();
		int nLFs = in.getInt();
		lfArr = new ORB[nLFs];
		for ( int i = 0; i < nLFs; i++ ) {
			lfArr[i] = new ORB(in);
			lfArr[i].setLinkedGroup(this);
		}
	}

	@Override
	public Class<ORB> getLocalFeatureClass() {
		return ORB.class;
	}

	@Override
	public ALocalFeaturesGroup<ORB> create(ORB[] arr, AbstractFeaturesCollector fc) {
		return new ORBGroup( arr, fc);
	}
	@Override
	public byte getSerVersion() {
		return version;
	}

	public ORBGroup(BufferedReader br, AbstractFeaturesCollector fc) throws IOException {
		super(fc);
		String[] temp = br.readLine().split("(\\s)+");

		int n = Integer.parseInt(temp[0]);
		int len = Integer.parseInt(temp[1]);

		lfArr = new ORB[n];
	    for (int i = 0; i < n; i++) {
	    	lfArr[i] = new ORB(br);
	    	lfArr[i].setLinkedGroup(this);
	    }
	}

	static final public double getRangePercMatches(
			ALocalFeaturesGroup<ORB> sg1,
			ALocalFeaturesGroup<ORB> sg2,
			int range) {

		int count = 0;
		for (ORB f: sg1.lfArr) {
			if ( hasMatchBelowRadius(f, sg2, range)) {
				count++;
			}
		}

		return count / (double) sg1.size();
	}

	/**
	 * @param s1	ORB query feature
	 * @param sg	Group of ORB
	 * @param range  Range
	 * @return	true if it exists at least one match below or equal the range
	 */
	static final public boolean hasMatchBelowRadius(ORB s1, ALocalFeaturesGroup<ORB> sg, int range) {
		for (ORB f:sg.lfArr) {
			if ( ORB.getDistance(s1, f) <= range) {
				return true;
			}
		}

		return false;
	}

	public static ORBGroup getRandom() {
		ORB[] lfArr = new ORB[RandomOperations.getInt(1001)];

		return new ORBGroup(lfArr);
	}

	static final public ORB getLoweMatch(ORB s1, ALocalFeaturesGroup<ORB> sg,
			double conf, int maxD) {
		int dist1 = Integer.MAX_VALUE;
		int dist2 = Integer.MAX_VALUE;
		int dsq = 0;
		ORB curr, best = null;
		ORB[] arr = sg.lfArr;
		for (int i = 0; i < arr.length; i++) {
			curr = arr[i];
			dsq = ORB.getDistance(s1, curr);
			if (dsq < 0)
				continue;
			if (dsq < dist1) {
				dist2 = dist1;
				dist1 = dsq;
				best = curr;
			} else if (dsq < dist2) {
				dist2 = dsq;
			}
		}

		// System.out.print(bestSIFT.scale + "\t");
		// if ( bestSIFT.scale > 4 ) return null;
		if (dist1 > maxD)
			return null;
		if (dist2 == 0)
			return null;
		/*
		 * Check whether closest distance is less than ratio threshold of
		 * second.
		 */
		if ((double) dist1 / (double) dist2 < conf)
			return best;
		return null;
	}

	static final public ORB getLoweMatch(ORB s1, ALocalFeaturesGroup<ORB> sg,
			double conf) {
		int distsq1 = Integer.MAX_VALUE;
		int distsq2 = Integer.MAX_VALUE;
		int dsq = 0;
		ORB curr, best = null;

		ORB[] arr = sg.lfArr;
		for (int i = 0; i < arr.length; i++) {
			curr = arr[i];
			dsq = ORB.getDistance(s1, curr );
			if (dsq < distsq1) {
				distsq2 = distsq1;
				distsq1 = dsq;
				best = curr;
			} else if (dsq < distsq2) {
				distsq2 = dsq;
			}
		}

		if (distsq2 == 0)
			return null;
		/*
		 * Check whether closest distance is less than ratio threshold of
		 * second.
		 */
		if ((double) distsq1 / (double) distsq2 < conf)
			return best;
		return null;
	}

	static final public double getLowePercMatches(ALocalFeaturesGroup<ORB> sg1,
			ALocalFeaturesGroup<ORB> sg2, double conf) {
		return (double) getLoweNMatches(sg1, sg2, conf) / sg1.size();
	}

	static final public int getLoweNMatches(ALocalFeaturesGroup<ORB> sg1,
			ALocalFeaturesGroup<ORB> sg2, double conf) {
		if (sg2.size() < 2)
			return 0;
		int nMatches = 0;
		ORB[] arr = sg1.lfArr;
		for (int i = 0; i < arr.length; i++) {
			if (ORBGroup.getLoweMatch(arr[i], sg2, conf) != null)
				nMatches++;
		}

		return nMatches;
	}

	static final public LocalFeaturesMatches getLoweMatches(ALocalFeaturesGroup<ORB> sg1, ALocalFeaturesGroup<ORB> sg2, double dRatioThr) {
		LocalFeaturesMatches matches = new LocalFeaturesMatches();
		if ( sg2.size() < 2 ) return null;
		int nMatches = 0;
		ORB[] arr = sg1.lfArr;
		for (int i=0; i<arr.length; i++ ) {
			ORB match = ORBGroup.getLoweMatch(arr[i], sg2, dRatioThr );
			if ( match != null)
				matches.add( new LocalFeatureMatch( arr[i], match ) );
		}

		return matches;
	}

	static final public LocalFeaturesMatches getLoweMatches(ALocalFeaturesGroup<ORB> sg1, ALocalFeaturesGroup<ORB> sg2, double dRatioThr, final int maxD) {
		LocalFeaturesMatches matches = new LocalFeaturesMatches();
		if ( sg2.size() < 2 ) return null;
		int nMatches = 0;
		ORB[] arr = sg1.lfArr;
		for (int i=0; i<arr.length; i++ ) {
			ORB match = ORBGroup.getLoweMatch(arr[i], sg2, dRatioThr, maxD );
			if ( match != null)
				matches.add( new LocalFeatureMatch( arr[i], match ) );
		}

		return matches;
	}
}


text:
<?php

namespace CodeHobby\Http\Controllers\Auth;

use CodeHobby\User;
use Validator;
use CodeHobby\Http\Controllers\Controller;
use Illuminate\Foundation\Auth\ThrottlesLogins;
use Illuminate\Foundation\Auth\AuthenticatesAndRegistersUsers;

class AuthController extends Controller
{
    /*
    |--------------------------------------------------------------------------
    | Registration & Login Controller
    |--------------------------------------------------------------------------
    |
    | This controller handles the registration of new users, as well as the
    | authentication of existing users. By default, this controller uses
    | a simple trait to add these behaviors. Why don't you explore it?
    |
    */

    use AuthenticatesAndRegistersUsers, ThrottlesLogins;

    /**
     * Where to redirect users after login / registration.
     *
     * @var string
     */
    //protected $redirectTo = '/';
	protected $redirectTo = '/admin';

	/**
	 * Where to the user should be redirected to after login fails.
	 *
	 * @var string
	 */
	protected $loginPath = '/login';

	/**
	 * Where to the user should be redirected to after logout.
	 *
	 * @var string
	 */
	protected $redirectAfterLogout = '/logout/confirm';

    protected $username = 'username';

    /**
     * Show a logut confirmation to the user
     *
     */
    public function confirmLogout()
    {
		/*Set a logout confirmation message.*/
		\Session::flash('message','You have been logged out.');

        return redirect( '/' );
    }

    /**
     * Create a new authentication controller instance.
     *
     * @return void
     */
    public function __construct()
    {
        $this->middleware($this->guestMiddleware(), ['except' => 'logout']);
    }

    /**
     * Get a validator for an incoming registration request.
     *
     * @param  array  $data
     * @return \Illuminate\Contracts\Validation\Validator
     */
    protected function validator(array $data)
    {
        return Validator::make($data, [
            'name' => 'required|max:255',
            'email' => 'required|email|max:255|unique:users',
            'password' => 'required|min:6|confirmed',
        ]);
    }

    /**
     * Create a new user instance after a valid registration.
     *
     * @param  array  $data
     * @return User
     */
    protected function create(array $data)
    {
        return User::create([
            'name' => $data['name'],
            'email' => $data['email'],
            'password' => bcrypt($data['password']),
        ]);
    }
}


text:
package com.dmdirc.events;

import com.dmdirc.interfaces.Connection;
import com.dmdirc.interfaces.User;
import com.dmdirc.parser.events.UserInfoEvent;
import com.dmdirc.parser.events.UserInfoEvent.UserInfoType;

import java.time.LocalDateTime;
import java.util.Collection;
import java.util.EnumMap;
import java.util.Map;
import java.util.Optional;

/**
 * Event raised when detailed user info has been received for a user.
 */
public class UserInfoResponseEvent extends ServerDisplayableEvent {

    private final User user;
    private final Map<UserInfoType, UserInfoProperty> info;

    public UserInfoResponseEvent(final LocalDateTime date, final Connection connection,
            final User user, final Map<UserInfoType, String> info) {
        super(date, connection);
        this.user = user;
        this.info = new EnumMap<>(UserInfoType.class);
        info.forEach((key, value) -> this.info.put(key, new UserInfoProperty(key, value)));
    }

    /**
     * Gets the client that the event is for.
     *
     * @return The user this event is for.
     */
    public User getUser() {
        return user;
    }

    /**
     * Gets a specific piece of information about the user.
     *
     * @param type The type of information to return.
     *
     * @return An optional containing the information, if it was provided.
     */
    public Optional<String> getInfo(final UserInfoEvent.UserInfoType type) {
        return Optional.ofNullable(info.get(type)).map(UserInfoProperty::getRawValue);
    }

    /**
     * Gets a collection of all info properties in the response.
     *
     * @return A collection of all user info properties.
     */
    public Collection<UserInfoProperty> getProperties() {
        return info.values();
    }

    public static class UserInfoProperty {

        private final UserInfoEvent.UserInfoType type;
        private final String rawValue;

        public UserInfoProperty(final UserInfoEvent.UserInfoType type, final String rawValue) {
            this.type = type;
            this.rawValue = rawValue;
        }

        public UserInfoEvent.UserInfoType getType() {
            return type;
        }

        public String getRawValue() {
            return rawValue;
        }

        public String getFriendlyName() {
            return type.name().charAt(0) + type.name().substring(1).toLowerCase().replace('_', ' ');
        }

    }

}


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

package inventorysystem.report;

import inventorysystem.DB.DBType;
import inventorysystem.DB.DBUtil;
import java.awt.Container;
import java.sql.Connection;
import java.sql.SQLException;
import java.util.HashMap;
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.swing.JFrame;
import javax.swing.JOptionPane;
import net.sf.jasperreports.engine.*;
import net.sf.jasperreports.engine.design.*;
import net.sf.jasperreports.view.*;

/**
 *
 * @author srole_000
 */
public class Ireport extends JFrame{
    public Ireport(String fileName, HashMap para){
        super("Report");
        try(Connection conn = DBUtil.getConnection(DBType.MYSQL)){
            Class.forName("com.mysql.jdbc.Driver").newInstance();
            JasperPrint print = JasperFillManager.fillReport(fileName, para,conn);
            JRViewer viewer = new JRViewer(print);
            Container c = getContentPane();
            c.add(viewer);
        } catch (Exception ex) {
            JOptionPane.showMessageDialog(null, ex.getMessage(), "Error", JOptionPane.ERROR_MESSAGE);
        }
        setBounds(10,10,600,500);
        setDefaultCloseOperation(DISPOSE_ON_CLOSE);
    }
}


text:
<?php

namespace tests\mirolabs\phalcon\Framework\Container\Parser\Model;

use mirolabs\phalcon\Framework\Container\Parser\AnnotationParser;
use mirolabs\phalcon\Framework\Container\Parser\DefinitionBuilder;
use mirolabs\phalcon\Framework\Container\Parser\Model\Factory;
use org\bovigo\vfs\vfsStream;
use org\bovigo\vfs\vfsStreamWrapper;
use Phalcon\Config;
use Phalcon\DiInterface;

class FactoryTest extends \UnitTestCase
{

    private $file;

    public function setUp(DiInterface $di = NULL, Config $config = NULL)
    {
        vfsStream::setup('root');
        vfsStream::newFile('file.php')->at(vfsStreamWrapper::getRoot());
        $this->file = vfsStream::url('root/file.php');

        parent::setUp($di, $config);
    }

    public function testWriteFactory()
    {
        $fileBuilderMock = \Mockery::mock('mirolabs\phalcon\Framework\Tasks\FileBuilder');
        $attributeParserMock = \Mockery::mock('mirolabs\phalcon\Framework\Container\Parser\AttributeParser');
        $value = [
            'factory_service' => 'test.factoryService',
            'factory_method' => 'getService',
            'class' => 'test\Class',
            'arguments' => ['attribute1', 'attribute2']
        ];

        $attributeParserMock
            ->shouldReceive('getClassValue')
            ->never();

        $attributeParserMock
            ->shouldReceive('getArgumentValue')
            ->times(2)
            ->andReturn(
                ['type' => 'service', 'name' => 'service.reference'],
                ['type' => 'parameter', 'value' => 'value']
            );

        $factory = new Factory(
            $attributeParserMock,
            new AnnotationParser([], $this->getAnnotationMock()),
            'test.factory',
            $value);
        $factory->writeDefinition(new DefinitionBuilder($this->file, $fileBuilderMock));

        $expectedResult =
            "\t\t\$di->set('test.factory', function() use (\$di) {\n" .
            "\t\t\treturn \$di->get('test.factoryService')->getService(\$di->get('service.reference'), 'value');\n" .
            "\t\t});\n";

        $this->assertEquals($expectedResult, file_get_contents($this->file));
        $fileBuilderMock->mockery_verify();
        $attributeParserMock->mockery_verify();
    }

    private function getAnnotationMock()
    {
        $annotationMock = \Mockery::mock('Phalcon\Annotations\Adapter');
        $annotationMock
            ->shouldReceive('getProperties')
            ->andReturn([]);

        return $annotationMock;
    }
}


text:
.. _target-hosts:

========================
Prepare the target hosts
========================

.. toctree::
   :maxdepth: 2

   targethosts-prepare.rst
   targethosts-networkconfig.rst

.. figure:: figures/installation-workflow-targethosts.png
   :width: 100%


text:
/**************************************************//**
@file include/hash0hash.h
The simple hash table utility

Created 5/20/1997 Heikki Tuuri
*******************************************************/

#ifndef hash0hash_h
#define hash0hash_h

#include "univ.i"
#include "mem0mem.h"
#ifndef UNIV_HOTBACKUP
# include "sync0sync.h"
#endif /* !UNIV_HOTBACKUP */

typedef struct hash_table_struct hash_table_t;
typedef struct hash_cell_struct hash_cell_t;

typedef void*	hash_node_t;

/* Fix Bug #13859: symbol collision between imap/mysql */
#define hash_create hash0_create

/*************************************************************//**
Creates a hash table with >= n array cells. The actual number
of cells is chosen to be a prime number slightly bigger than n.
@return	own: created table */
UNIV_INTERN
hash_table_t*
hash_create(
/*========*/
	ulint	n);	/*!< in: number of array cells */
#ifndef UNIV_HOTBACKUP
/*************************************************************//**
Creates a mutex array to protect a hash table. */
UNIV_INTERN
void
hash_create_mutexes_func(
/*=====================*/
	hash_table_t*	table,		/*!< in: hash table */
#ifdef UNIV_SYNC_DEBUG
	ulint		sync_level,	/*!< in: latching order level of the
					mutexes: used in the debug version */
#endif /* UNIV_SYNC_DEBUG */
	ulint		n_mutexes);	/*!< in: number of mutexes */
#ifdef UNIV_SYNC_DEBUG
# define hash_create_mutexes(t,n,level) hash_create_mutexes_func(t,level,n)
#else /* UNIV_SYNC_DEBUG */
# define hash_create_mutexes(t,n,level) hash_create_mutexes_func(t,n)
#endif /* UNIV_SYNC_DEBUG */
#endif /* !UNIV_HOTBACKUP */

/*************************************************************//**
Frees a hash table. */
UNIV_INTERN
void
hash_table_free(
/*============*/
	hash_table_t*	table);	/*!< in, own: hash table */
/**************************************************************//**
Calculates the hash value from a folded value.
@return	hashed value */
UNIV_INLINE
ulint
hash_calc_hash(
/*===========*/
	ulint		fold,	/*!< in: folded value */
	hash_table_t*	table);	/*!< in: hash table */
#ifndef UNIV_HOTBACKUP
/********************************************************************//**
Assert that the mutex for the table in a hash operation is owned. */
# define HASH_ASSERT_OWNED(TABLE, FOLD)					\
ut_ad(!(TABLE)->mutexes || mutex_own(hash_get_mutex(TABLE, FOLD)));
#else /* !UNIV_HOTBACKUP */
# define HASH_ASSERT_OWNED(TABLE, FOLD)
#endif /* !UNIV_HOTBACKUP */

/*******************************************************************//**
Inserts a struct to a hash table. */

#define HASH_INSERT(TYPE, NAME, TABLE, FOLD, DATA)\
do {\
	hash_cell_t*	cell3333;\
	TYPE*		struct3333;\
\
	HASH_ASSERT_OWNED(TABLE, FOLD)\
\
	(DATA)->NAME = NULL;\
\
	cell3333 = hash_get_nth_cell(TABLE, hash_calc_hash(FOLD, TABLE));\
\
	if (cell3333->node == NULL) {\
		cell3333->node = DATA;\
	} else {\
		struct3333 = (TYPE*) cell3333->node;\
\
		while (struct3333->NAME != NULL) {\
\
			struct3333 = (TYPE*) struct3333->NAME;\
		}\
\
		struct3333->NAME = DATA;\
	}\
} while (0)

#ifdef UNIV_HASH_DEBUG
# define HASH_ASSERT_VALID(DATA) ut_a((void*) (DATA) != (void*) -1)
# define HASH_INVALIDATE(DATA, NAME) DATA->NAME = (void*) -1
#else
# define HASH_ASSERT_VALID(DATA) do {} while (0)
# define HASH_INVALIDATE(DATA, NAME) do {} while (0)
#endif

/*******************************************************************//**
Deletes a struct from a hash table. */

#define HASH_DELETE(TYPE, NAME, TABLE, FOLD, DATA)\
do {\
	hash_cell_t*	cell3333;\
	TYPE*		struct3333;\
\
	HASH_ASSERT_OWNED(TABLE, FOLD)\
\
	cell3333 = hash_get_nth_cell(TABLE, hash_calc_hash(FOLD, TABLE));\
\
	if (cell3333->node == DATA) {\
		HASH_ASSERT_VALID(DATA->NAME);\
		cell3333->node = DATA->NAME;\
	} else {\
		struct3333 = (TYPE*) cell3333->node;\
\
		while (struct3333->NAME != DATA) {\
\
			struct3333 = (TYPE*) struct3333->NAME;\
			ut_a(struct3333);\
		}\
\
		struct3333->NAME = DATA->NAME;\
	}\
	HASH_INVALIDATE(DATA, NAME);\
} while (0)

/*******************************************************************//**
Gets the first struct in a hash chain, NULL if none. */

#define HASH_GET_FIRST(TABLE, HASH_VAL)\
	(hash_get_nth_cell(TABLE, HASH_VAL)->node)

/*******************************************************************//**
Gets the next struct in a hash chain, NULL if none. */

#define HASH_GET_NEXT(NAME, DATA)	((DATA)->NAME)

/********************************************************************//**
Looks for a struct in a hash table. */
#define HASH_SEARCH(NAME, TABLE, FOLD, TYPE, DATA, ASSERTION, TEST)\
{\
\
	HASH_ASSERT_OWNED(TABLE, FOLD)\
\
	(DATA) = (TYPE) HASH_GET_FIRST(TABLE, hash_calc_hash(FOLD, TABLE));\
	HASH_ASSERT_VALID(DATA);\
\
	while ((DATA) != NULL) {\
		ASSERTION;\
		if (TEST) {\
			break;\
		} else {\
			HASH_ASSERT_VALID(HASH_GET_NEXT(NAME, DATA));\
			(DATA) = (TYPE) HASH_GET_NEXT(NAME, DATA);\
		}\
	}\
}

/********************************************************************//**
Looks for an item in all hash buckets. */
#define HASH_SEARCH_ALL(NAME, TABLE, TYPE, DATA, ASSERTION, TEST)	\
do {									\
	ulint	i3333;							\
									\
	for (i3333 = (TABLE)->n_cells; i3333--; ) {			\
		(DATA) = (TYPE) HASH_GET_FIRST(TABLE, i3333);		\
									\
		while ((DATA) != NULL) {				\
			HASH_ASSERT_VALID(DATA);			\
			ASSERTION;					\
									\
			if (TEST) {					\
				break;					\
			}						\
									\
			(DATA) = (TYPE) HASH_GET_NEXT(NAME, DATA);	\
		}							\
									\
		if ((DATA) != NULL) {					\
			break;						\
		}							\
	}								\
} while (0)

/************************************************************//**
Gets the nth cell in a hash table.
@return	pointer to cell */
UNIV_INLINE
hash_cell_t*
hash_get_nth_cell(
/*==============*/
	hash_table_t*	table,	/*!< in: hash table */
	ulint		n);	/*!< in: cell index */

/*************************************************************//**
Clears a hash table so that all the cells become empty. */
UNIV_INLINE
void
hash_table_clear(
/*=============*/
	hash_table_t*	table);	/*!< in/out: hash table */

/*************************************************************//**
Returns the number of cells in a hash table.
@return	number of cells */
UNIV_INLINE
ulint
hash_get_n_cells(
/*=============*/
	hash_table_t*	table);	/*!< in: table */
/*******************************************************************//**
Deletes a struct which is stored in the heap of the hash table, and compacts
the heap. The fold value must be stored in the struct NODE in a field named
'fold'. */

#define HASH_DELETE_AND_COMPACT(TYPE, NAME, TABLE, NODE)\
do {\
	TYPE*		node111;\
	TYPE*		top_node111;\
	hash_cell_t*	cell111;\
	ulint		fold111;\
\
	fold111 = (NODE)->fold;\
\
	HASH_DELETE(TYPE, NAME, TABLE, fold111, NODE);\
\
	top_node111 = (TYPE*)mem_heap_get_top(\
				hash_get_heap(TABLE, fold111),\
							sizeof(TYPE));\
\
	/* If the node to remove is not the top node in the heap, compact the\
	heap of nodes by moving the top node in the place of NODE. */\
\
	if (NODE != top_node111) {\
\
		/* Copy the top node in place of NODE */\
\
		*(NODE) = *top_node111;\
\
		cell111 = hash_get_nth_cell(TABLE,\
				hash_calc_hash(top_node111->fold, TABLE));\
\
		/* Look for the pointer to the top node, to update it */\
\
		if (cell111->node == top_node111) {\
			/* The top node is the first in the chain */\
\
			cell111->node = NODE;\
		} else {\
			/* We have to look for the predecessor of the top\
			node */\
			node111 = cell111->node;\
\
			while (top_node111 != HASH_GET_NEXT(NAME, node111)) {\
\
				node111 = HASH_GET_NEXT(NAME, node111);\
			}\
\
			/* Now we have the predecessor node */\
\
			node111->NAME = NODE;\
		}\
	}\
\
	/* Free the space occupied by the top node */\
\
	mem_heap_free_top(hash_get_heap(TABLE, fold111), sizeof(TYPE));\
} while (0)

#ifndef UNIV_HOTBACKUP
/****************************************************************//**
Move all hash table entries from OLD_TABLE to NEW_TABLE. */

#define HASH_MIGRATE(OLD_TABLE, NEW_TABLE, NODE_TYPE, PTR_NAME, FOLD_FUNC) \
do {\
	ulint		i2222;\
	ulint		cell_count2222;\
\
	cell_count2222 = hash_get_n_cells(OLD_TABLE);\
\
	for (i2222 = 0; i2222 < cell_count2222; i2222++) {\
		NODE_TYPE*	node2222 = HASH_GET_FIRST((OLD_TABLE), i2222);\
\
		while (node2222) {\
			NODE_TYPE*	next2222 = node2222->PTR_NAME;\
			ulint		fold2222 = FOLD_FUNC(node2222);\
\
			HASH_INSERT(NODE_TYPE, PTR_NAME, (NEW_TABLE),\
				fold2222, node2222);\
\
			node2222 = next2222;\
		}\
	}\
} while (0)

/************************************************************//**
Gets the mutex index for a fold value in a hash table.
@return	mutex number */
UNIV_INLINE
ulint
hash_get_mutex_no(
/*==============*/
	hash_table_t*	table,	/*!< in: hash table */
	ulint		fold);	/*!< in: fold */
/************************************************************//**
Gets the nth heap in a hash table.
@return	mem heap */
UNIV_INLINE
mem_heap_t*
hash_get_nth_heap(
/*==============*/
	hash_table_t*	table,	/*!< in: hash table */
	ulint		i);	/*!< in: index of the heap */
/************************************************************//**
Gets the heap for a fold value in a hash table.
@return	mem heap */
UNIV_INLINE
mem_heap_t*
hash_get_heap(
/*==========*/
	hash_table_t*	table,	/*!< in: hash table */
	ulint		fold);	/*!< in: fold */
/************************************************************//**
Gets the nth mutex in a hash table.
@return	mutex */
UNIV_INLINE
mutex_t*
hash_get_nth_mutex(
/*===============*/
	hash_table_t*	table,	/*!< in: hash table */
	ulint		i);	/*!< in: index of the mutex */
/************************************************************//**
Gets the mutex for a fold value in a hash table.
@return	mutex */
UNIV_INLINE
mutex_t*
hash_get_mutex(
/*===========*/
	hash_table_t*	table,	/*!< in: hash table */
	ulint		fold);	/*!< in: fold */
/************************************************************//**
Reserves the mutex for a fold value in a hash table. */
UNIV_INTERN
void
hash_mutex_enter(
/*=============*/
	hash_table_t*	table,	/*!< in: hash table */
	ulint		fold);	/*!< in: fold */
/************************************************************//**
Releases the mutex for a fold value in a hash table. */
UNIV_INTERN
void
hash_mutex_exit(
/*============*/
	hash_table_t*	table,	/*!< in: hash table */
	ulint		fold);	/*!< in: fold */
/************************************************************//**
Reserves all the mutexes of a hash table, in an ascending order. */
UNIV_INTERN
void
hash_mutex_enter_all(
/*=================*/
	hash_table_t*	table);	/*!< in: hash table */
/************************************************************//**
Releases all the mutexes of a hash table. */
UNIV_INTERN
void
hash_mutex_exit_all(
/*================*/
	hash_table_t*	table);	/*!< in: hash table */
#else /* !UNIV_HOTBACKUP */
# define hash_get_heap(table, fold)	((table)->heap)
# define hash_mutex_enter(table, fold)	((void) 0)
# define hash_mutex_exit(table, fold)	((void) 0)
#endif /* !UNIV_HOTBACKUP */

struct hash_cell_struct{
	void*	node;	/*!< hash chain node, NULL if none */
};

/* The hash table structure */
struct hash_table_struct {
#if defined UNIV_AHI_DEBUG || defined UNIV_DEBUG
# ifndef UNIV_HOTBACKUP
	ibool		adaptive;/* TRUE if this is the hash table of the
				adaptive hash index */
# endif /* !UNIV_HOTBACKUP */
#endif /* UNIV_AHI_DEBUG || UNIV_DEBUG */
	ulint		n_cells;/* number of cells in the hash table */
	hash_cell_t*	array;	/*!< pointer to cell array */
#ifndef UNIV_HOTBACKUP
	ulint		n_mutexes;/* if mutexes != NULL, then the number of
				mutexes, must be a power of 2 */
	mutex_t*	mutexes;/* NULL, or an array of mutexes used to
				protect segments of the hash table */
	mem_heap_t**	heaps;	/*!< if this is non-NULL, hash chain nodes for
				external chaining can be allocated from these
				memory heaps; there are then n_mutexes many of
				these heaps */
#endif /* !UNIV_HOTBACKUP */
	mem_heap_t*	heap;
#ifdef UNIV_DEBUG
	ulint		magic_n;
# define HASH_TABLE_MAGIC_N	76561114
#endif /* UNIV_DEBUG */
};

#ifndef UNIV_NONINL
#include "hash0hash.ic"
#endif

#endif


text:
using System.Diagnostics;
using System.IO;

using NUnit.Framework;

using XSharp.Launch.Hosts.VMware;

namespace XSharp.Launch.Tests.Hosts
{
    [TestFixture(TestOf = typeof(VMwareHost))]
    public class VMwareTests
    {
        private string TestDir = TestUtilities.NewTestDir();

        [Test]
        public void LaunchVMware()
        {
            var xLaunchSettings = new VMwareLaunchSettings()
            {
                ConfigurationFile = Path.Combine(TestDir, "VMware.vmx"),
                VMwareExecutable = null
            };

            var xVMware = new VMwareHost(xLaunchSettings);

            xVMware.Start();

            var xProcessCount = Process.GetProcessesByName("vmplayer").Length;
            Assert.That(xProcessCount, Is.Not.Zero);

            xVMware.Kill();
            Assert.That(Process.GetProcessesByName("vmplayer").Length, Is.EqualTo(xProcessCount - 1));
        }
    }
}


text:
package org.schedoscope.export.testsupport;

import kafka.server.KafkaConfig;
import kafka.server.KafkaServer;
import kafka.utils.SystemTime$;

import java.io.File;
import java.io.FileNotFoundException;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import java.util.Properties;

public class EmbeddedKafkaCluster {

    private final List<Integer> ports;
    private final String zkConnection;
    private final Properties baseProperties;

    private final String brokerList;

    private final List<KafkaServer> brokers;
    private final List<File> logDirs;

    public EmbeddedKafkaCluster(String zkConnection) {
        this(zkConnection, new Properties());
    }

    public EmbeddedKafkaCluster(String zkConnection, Properties baseProperties) {
        this(zkConnection, baseProperties, Collections.singletonList(-1));
    }

    public EmbeddedKafkaCluster(String zkConnection, Properties baseProperties,
                                List<Integer> ports) {
        this.zkConnection = zkConnection;
        this.ports = resolvePorts(ports);
        this.baseProperties = baseProperties;

        this.brokers = new ArrayList<KafkaServer>();
        this.logDirs = new ArrayList<File>();

        this.brokerList = constructBrokerList(this.ports);
    }

    private List<Integer> resolvePorts(List<Integer> ports) {

        List<Integer> resolvedPorts = new ArrayList<Integer>();
        for (Integer port : ports) {
            resolvedPorts.add(resolvePort(port));
        }
        return resolvedPorts;
    }

    private int resolvePort(int port) {

        if (port == -1) {
            return TestUtils.getAvailablePort();
        }
        return port;
    }

    private String constructBrokerList(List<Integer> ports) {

        StringBuilder sb = new StringBuilder();
        for (Integer port : ports) {
            if (sb.length() > 0) {
                sb.append(",");
            }
            sb.append("localhost:").append(port);
        }
        return sb.toString();
    }

    public void startup() {

        for (int i = 0; i < ports.size(); i++) {
            Integer port = ports.get(i);
            File logDir = TestUtils.constructTempDir("kafka-local");

            Properties properties = new Properties();
            properties.putAll(baseProperties);
            properties.setProperty("zookeeper.connect", zkConnection);
            properties.setProperty("broker.id", String.valueOf(i + 1));
            properties.setProperty("host.name", "localhost");
            properties.setProperty("port", Integer.toString(port));
            properties.setProperty("log.dir", logDir.getAbsolutePath());
            properties.setProperty("log.flush.interval.messages",
                    String.valueOf(1));

            KafkaServer broker = startBroker(properties);

            brokers.add(broker);
            logDirs.add(logDir);
        }
    }

    private KafkaServer startBroker(Properties props) {
        KafkaServer server = new KafkaServer(new KafkaConfig(props),
                SystemTime$.MODULE$);
        server.startup();
        return server;
    }

    public Properties getProps() {
        Properties props = new Properties();
        props.putAll(baseProperties);
        props.put("metadata.broker.list", brokerList);
        props.put("zookeeper.connect", zkConnection);
        return props;
    }

    public String getBrokerList() {
        return brokerList;
    }

    public List<Integer> getPorts() {
        return ports;
    }

    public String getZkConnection() {
        return zkConnection;
    }

    public void shutdown() {
        for (KafkaServer broker : brokers) {
            try {
                broker.shutdown();
            } catch (Exception e) {
                e.printStackTrace();
            }
        }
        for (File logDir : logDirs) {
            try {
                TestUtils.deleteFile(logDir);
            } catch (FileNotFoundException e) {
                e.printStackTrace();
            }
        }
    }
}


text:
paper-dropdown
==============

owner: @morethanreal

See the [component page](https://www.polymer-project.org/docs/elements/paper-elements.html#paper-dropdown) for more information.


text:
@echo off

IF EXIST node_modules\webforge-testing\node_modules\.bin\wdio.cmd (
  node_modules\webforge-testing\node_modules\.bin\wdio tests\js\webdriverio\wdio.cucumber.conf.js %*
) ELSE (
  node_modules\.bin\wdio tests\js\webdriverio\wdio.cucumber.conf.js %*
)


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

    // initialize progress bar

    var progress = 0;
    $("#pbar").css("width", progress + "%").attr('aria-valuenow', progress);

    //var progress = $("#pbar").attr('aria-valuenow');
    //progress = parseInt(progress) + 40;
    //$("#pbar").css("width", progress + "%").attr('aria-valuenow', progress);

    // initialize the connection to the server
    var progressNotifier = $.connection.initializeHub;

    // client-side sendMessage function that will be called from the server-side
    progressNotifier.client.sendMessage = function (message) {
        // update progress
        UpdateProgress(message);
    };

    // establish the connection to the server and start server-side operation
    $.connection.hub.start().done(function () {
        // call the method loadData defined in the Hub
        progressNotifier.server.loadData();
    });

});

function UpdateProgress(message) {
    // get result div
    var result = $("#resultmessage");
    // set message
    result.html(message.Message);

    var percetage = $("#percentage");
    percetage.html(message.Progress + "%");

    //var progress = $("#pbar").attr('aria-valuenow');
    var n = parseInt(message.Progress); // parseInt(progress)+1;
    $("#pbar").css("width", n + "%").attr('aria-valuenow', n);
}


text:
<?php

$additional_header_info = '';
include('header.php'); ?>

HELLO VALUE CUSTOMER

It Looks Like you wish to order without creating an account. So complete the form address below

			<?php echo form_open('secure/login', array('class'=>'form-horizontal form-clean', 'role'=>'form'))?>

				<input type="text" class="form-control" name="email" placeholder="username">

				<input type="password" class="form-control" name="password" placeholder="password">

				<input type="hidden" value="<?php echo $redirect;?>" name="redirect"/>
                <input type="hidden" value="submitted" name="submitted"/>
				<button type="submit" class="btn btn-block btn-maroon">LOG IN</button>

			</form>

NEW CUSTOMER

It Looks Like you wish to order without creating an account. So complete the form address below

		  <?php echo form_open('secure/register', array('class'=>'form-horizontal form-clean', 'role'=>'form')); ?>

				<input type="email" class="form-control" name="email" placeholder="email">

				<input type="password" class="form-control" name="password" placeholder="password">

				<input type="password" class="form-control" name="confirm" placeholder="confirm password">

				<input type="text" class="form-control" name="firstname" placeholder="first name">

				<input type="text" class="form-control" name="lastname" placeholder="last name">

				<input type="text" class="form-control" name="address1" placeholder="address">

				<input type="text" class="form-control number" name="zip" placeholder="zip code">

				<?php echo form_dropdown('province_id', $provinces_menu,  set_value('province_id', ''), 'style="width:200px; display:block;"  id="f_province_id" class="form-control"');?>

				<input type="text" class="form-control number" name="phone" placeholder="phone number">

				<button type="submit" class="btn btn-block btn-maroon">CONTINUE</button>

		  </form>

<?php include('footer.php'); ?>


text:
"""
This script starts the OsRefl Off-Specular Reflectometry application.
"""
import os
import sys
import matplotlib
matplotlib.use('WXAgg')

# Normally the inversion package will be installed, but if it is not installed,
# augment sys.path to include the parent directory of the package.  This
# assures that the module search path will include the package namespace and
# allows the application to be run directly from the source tree, even if the
# package has not been installed.
try:
    import osrefl
except:
    this_dir_path = os.path.dirname(os.path.abspath(__file__))
    if os.path.basename(this_dir_path) == 'osrefl':
        sys.path.insert(1, (os.path.dirname(this_dir_path)))
    else:
        print """\
        *** To run this script, either install the inversion package or
        *** place this module in the top-level directory of the package."""

if __name__ == "__main__":
    if len(sys.argv) == 1:
        file = os.path.join('examples', 'AuFit.py')
    else:
        file = sys.argv[1]

    try:
        f = open(file)
        f.close()
    except:
        print "*** Script not found:", file
        sys.exit()

    print "Executing script", file, "...\n"
    execfile(file)


text:
from typing import Optional, Callable

from thinc.api import Model

from ..ru.lemmatizer import RussianLemmatizer
from ...pipeline.lemmatizer import lemmatizer_score
from ...vocab import Vocab

class UkrainianLemmatizer(RussianLemmatizer):
    def __init__(
        self,
        vocab: Vocab,
        model: Optional[Model],
        name: str = "lemmatizer",
        *,
        mode: str = "pymorphy3",
        overwrite: bool = False,
        scorer: Optional[Callable] = lemmatizer_score,
    ) -> None:
        if mode in {"pymorphy2", "pymorphy2_lookup"}:
            try:
                from pymorphy2 import MorphAnalyzer
            except ImportError:
                raise ImportError(
                    "The Ukrainian lemmatizer mode 'pymorphy2' requires the "
                    "pymorphy2 library and dictionaries. Install them with: "
                    "pip install pymorphy2 pymorphy2-dicts-uk"
                ) from None
            if getattr(self, "_morph", None) is None:
                self._morph = MorphAnalyzer(lang="uk")
        elif mode == "pymorphy3":
            try:
                from pymorphy3 import MorphAnalyzer
            except ImportError:
                raise ImportError(
                    "The Ukrainian lemmatizer mode 'pymorphy3' requires the "
                    "pymorphy3 library and dictionaries. Install them with: "
                    "pip install pymorphy3 pymorphy3-dicts-uk"
                ) from None
            if getattr(self, "_morph", None) is None:
                self._morph = MorphAnalyzer(lang="uk")
        super().__init__(
            vocab, model, name, mode=mode, overwrite=overwrite, scorer=scorer
        )


text:
Some useful commons for Java.

### Including:
- ArrayUtils: Some useful array utilities for Java's arrary[], and some of them likes Python's list.
- ByteUtils: Simple encode and decode.
- CharsetUtils: Some charset utilities.
- ConvertUtils: Some Conversation utilities.
- DateFormat: Thread-Safe date formatter.
- EncryptionUtils: Encryption and decryption utilities.
- InetAddressUtils: Get the host's IP or domain name.
- IOUtils: Extends commons-io.
- JsonUtils: Some useful json utilities, convert xxx to json.
- MathUtils: Some math utilities of high-precision calculation and max, min calculation.
- StringUtils: Some String utilities.
- LogUtils: Some log utilities.
- StreamUtils: Some stream utilities.
- SignatureUtils: Signature utilities.
- JaxbUtils: Some Jaxb utilities.

### Version History:
- 0.0.1-SNAPSHOT
  - Initial version:
    - ArrayUtils : has been completed, and passed test.
    - MathUtils : has been completed, and passed test.
- 0.0.2-SNAPSHOT
    - ConvertUtils : has been completed, and passed test.
    - DateFormat : has been completed, and passed test.
    - StringUtils : 20%.
- 0.0.3-SNAPSHOT
    - JsonUtils : has been completed, and passed test.
    - StringUtils : 40%.
- 0.0.4-SNAPSHOT
    - InetAddressUtils : has been completed, and passed test.
    - IOUtils : has been completed, and passed test.
    - StringUtils : 80%.
- 0.0.5-SNAPSHOT
    - ByteUtils : has been completed, and passed test.
    - EncryptionUtils : has been completed, and passed test.
    - StringUtils : has been completed, and passed test.
- 0.0.6-SNAPSHOT
    <br/>Some util extends org.apache.commons.lang3.
    - CharsetUtils : has been completed, and passed test.
- 0.0.7-SNAPSHOT
    - LogUtils: has been completed, and passed test.
- 0.0.8-SNAPSHOT
    - StreamUtils: has been completed, and passed test.
    - SignatureUtils: has been completed, and passed test.
    - Add ParamField.
    - Add constant, enums, exception.
- 0.0.9-SNAPSHOT
    - Add JaxbUtils.


text:
using System;
using System.IO;
using System.Net.Http;
using System.Text;
using System.Threading.Tasks;
using HexHelper.Libs.Service;

namespace HexHelper.Libs.Utils
{
    /// <summary>
    /// Helper class to download a remote file, and keep a cache if so desired.
    /// </summary>
    public class CachedRemoteFile
    {
        /// <summary>
        /// Constructor.
        /// </summary>
        /// <param name="aUrl">URL of file to download</param>
        /// <param name="aFileService">Optional file service. If none is provided, there will be no caching.</param>
        public CachedRemoteFile( string aUrl, IFileService aFileService = null )
        {
            mUrl = aUrl;
            mFile = aFileService;
            CacheFileName = Path.GetFileName( mUrl );
        }

        /// <summary>
        /// Downloads file (or retrieves it from cache if fresh)
        /// </summary>
        /// <returns>true if file could be downloaded successfully</returns>
        public async Task<bool> DownloadFile()
        {
            try
            {
                if( mFile.Exists( scRelativeDirectory, CacheFileName ) )
                {
                    var theLastWriteTime = mFile.LastWriteTime( scRelativeDirectory, CacheFileName );
                    var theDiff = DateTime.Now - theLastWriteTime;
                    if( theDiff < CacheExpiration )
                    {
                        Content = await mFile.LoadFile( scRelativeDirectory, CacheFileName );
                        return true;
                    }
                }
            }
            catch { }

            try
            {
                using( var theHttpClient = new HttpClient() )
                {
                    if( PostMessage != null )
                    {
                        var theMessage = await theHttpClient.PostAsync( mUrl, new StringContent( PostMessage, Encoding.UTF8, "application/json" ) );
                        if( theMessage.IsSuccessStatusCode )
                        {
                            Content = await theMessage.Content.ReadAsStringAsync();
                        }
                    }
                    else
                    {
                        Content = await theHttpClient.GetStringAsync( mUrl );
                    }

                    if( HasContent )
                    {
                        try
                        {
                            await mFile.SaveFile( scRelativeDirectory, CacheFileName, Content );
                        }
                        catch { }

                        return true;
                    }
                }
            }
            catch
            {
            }

            Content = null;
            return false;
        }

        /// <summary>
        /// Content of the downloaded file.
        /// </summary>
        public string Content { get; private set; } = null;

        /// <summary>
        /// Whether file was downloaded/cached and has any content.
        /// </summary>
        public bool HasContent {
            get
            {
                return !String.IsNullOrWhiteSpace( Content );
            }
        }

        /// <summary>
        /// By default content will be retrieved via GET. If POST is needed, set this.
        /// This is expected to be Json.
        /// </summary>
        public string PostMessage { get; set; } = null;

        public string CacheFileName { get; set; }

        /// <summary>
        /// When cache will go stale.
        /// </summary>
        public TimeSpan CacheExpiration { get; set; } = TimeSpan.FromHours( 8 );

        private readonly string mUrl;
        private readonly IFileService mFile;
        private const string scRelativeDirectory = "CachedRemoteFiles";
    }
}


text:
<?php

declare(strict_types=1);

namespace StructType;

use InvalidArgumentException;
use WsdlToPhp\PackageBase\AbstractStructBase;

/**
 * This class stands for GetSharingInvitationsType StructType
 * @package Ews
 * @subpackage Structs
 * @author WsdlToPhp <contact@wsdltophp.com>
 */
class EwsGetSharingInvitationsType extends EwsBaseCalendarRequestType
{
    /**
     * The SharingInvitationId
     * Meta information extracted from the WSDL
     * - base: xs:string
     * - minLength: 1
     * - use: optional
     * @var string|null
     */
    protected ?string $SharingInvitationId = null;
    /**
     * Constructor method for GetSharingInvitationsType
     * @uses EwsGetSharingInvitationsType::setSharingInvitationId()
     * @param string $sharingInvitationId
     */
    public function __construct(?string $sharingInvitationId = null)
    {
        $this
            ->setSharingInvitationId($sharingInvitationId);
    }
    /**
     * Get SharingInvitationId value
     * @return string|null
     */
    public function getSharingInvitationId(): ?string
    {
        return $this->SharingInvitationId;
    }
    /**
     * Set SharingInvitationId value
     * @param string $sharingInvitationId
     * @return \StructType\EwsGetSharingInvitationsType
     */
    public function setSharingInvitationId(?string $sharingInvitationId = null): self
    {
        // validation for constraint: string
        if (!is_null($sharingInvitationId) && !is_string($sharingInvitationId)) {
            throw new InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($sharingInvitationId, true), gettype($sharingInvitationId)), __LINE__);
        }
        // validation for constraint: minLength(1)
        if (!is_null($sharingInvitationId) && mb_strlen((string) $sharingInvitationId) < 1) {
            throw new InvalidArgumentException(sprintf('Invalid length of %s, the number of characters/octets contained by the literal must be greater than or equal to 1', mb_strlen((string) $sharingInvitationId)), __LINE__);
        }
        $this->SharingInvitationId = $sharingInvitationId;

        return $this;
    }
}


text:
package uw.task.log;

import org.junit.Test;
import uw.task.TaskData;
import uw.task.entity.TaskRunnerLog;

/**
 * @author liliang
 * @since 2018-05-31
 */
public class TaskLogSerSpec {

    @Test
    public void testLogSpecByte() throws Exception {
        TaskData<String,String> taskData = new TaskData<>();
        taskData.setTaskParam("hello");
        taskData.setResultData("hello");

        TaskRunnerLog log = new TaskRunnerLog(taskData);
    }
}


text:
var Calendar = require('../../utils/calendar');
var Comity = require('../../models/comity');
var Post = require('../../models/post');
var dateFormatter = require('../../utils/date-formatter');

function generateCalendar(req){
	var month = req.query.month ? parseInt(req.query.month)-1 : (new Date()).getMonth();
	var year = req.query.year ? parseInt(req.query.year) : (new Date()).getFullYear();
	return Calendar.create(year, month, {
		comity: req.params.id
	});
}

function fetchComity(req){
	return Comity.findOne({
		_id: req.params.id
	}).exec();
}

function fetchPosts(req){
	return Post.find({
		comity: req.params.id
	})
		.sort({
			importance: 1,
			dateUpdated: -1
		})
		.limit(10)
		.exec();
}

exports.get = function(req, res, next){
	var data = {};
	fetchComity(req)
		.then(function(comity){
			data.comity = comity;
			return fetchPosts(req);
		})
		.then(function(posts){
			data.posts = posts;
			return generateCalendar(req);
		})
		.then(function(calendar){
			data.calendar = calendar;
			data.dateFormatter = dateFormatter;
			res.renderMain('comities/view', data, next);
		}, next);
};


text:
const path = require('path');

module.exports = {
    process(sourceText, sourcePath) {
        return {
            code: `module.exports = ${JSON.stringify(path.basename(sourcePath))};`,
        };
    },
};


text: require 'semantic_menu'