text:
package com.shunwang.api;

import com.shunwang.api.request.recharge.SWDisbursePageRequest;

import java.text.SimpleDateFormat;
import java.util.Calendar;
import java.util.Date;

/**
 * @author min.da
 * @since 2015-12-30
 */
public class SWMain {

    public static void main(String[] args) {
        testSWDisbursePageRequest();
    }

    public static void testSWDisbursePageRequest() {
        SWDisbursePageRequest request = new SWDisbursePageRequest("123456");
        request.setTranNo("Alphabet" + System.currentTimeMillis());
        request.setReceiveMemberName("damin21");
        request.setPayoutMemberName("damin21");
        request.setFeeFact(1d);
        request.setDisburseName("商品名称");
        request.setDisburseDes("{'游戏名称':'秀秀','区服':'华北一区天下无双'}");
        request.setDisburseType("1");
        request.setServerUrl("https://apitools.kedou.com");
        request.setTimeOut(getOutTime(30));
        request.setClientIp("127.0.0.1");
        request.setCompanyMemberName("min.da");
        request.setTime(getTime());
        request.setSign(request.buildSignature());

        DefaultSWClient client = new DefaultSWClient(request.getUrl());
        String response = client.execute(request);
        System.out.println(response);
    }

    public static String getTime() {
        return new SimpleDateFormat(SWConstants.DATE_TIME_FORMAT).format(new Date());
    }

    /**
     * @param amount 天数
     * @return
     */
    public static String getOutTime(int amount) {
        Calendar calendar = Calendar.getInstance();
        calendar.add(Calendar.DAY_OF_MONTH, amount);
        return new SimpleDateFormat(SWConstants.DATE_TIME_FORMAT).format(calendar.getTime());
    }
}


text:
package com.manywho.metrics.api.decryption;

public class NullDecryptor implements Decryptor {
    @Override
    public String decrypt(String token, String key) {
        return token;
    }
}

redpajama_set_name: RedPajamaGithub


text:
extern unsigned long ucontext_pc(const struct ucontext *uc);

extern void do_setup(const struct perfctr_info *info,
		     struct perfctr_cpu_control *cpu_control);


text: This is the Quintus implementation of [city41](https://github.com/city41)'s [Breakouts](https://github.com/city41/breakouts) project. It uses MIT licensed art, data and audio assets from that project.# Breakouts -- Quintus


text:
"""Unit test for the linux distribution parser."""

import os

from grr.lib import flags
from grr.lib import test_lib
from grr.lib.rdfvalues import anomaly as rdf_anomaly
from grr.lib.rdfvalues import client as rdf_client
from grr.lib.rdfvalues import paths as rdf_paths
from grr.lib.rdfvalues import protodict as rdf_protodict
from grr.parsers import linux_release_parser

class LinuxReleaseParserTest(test_lib.GRRBaseTest):
  """Test parsing of linux distribution collection."""

  def setUp(self):
    super(LinuxReleaseParserTest, self).setUp()
    self.parser_test_dir = os.path.join(self.base_path, "parser_test")

  def testMalformedLsbReleaseFile(self):
    path = os.path.join(self.parser_test_dir, "lsb-release-bad")
    with open(path, "rb") as f:
      data = f.read()
    parser = linux_release_parser.LsbReleaseParseHandler(data)

    complete, result = parser.Parse()

    self.assertFalse(complete)
    self.assertTupleEqual((None, 0, 0), result)

  def testGoodLsbReleaseFile(self):
    path = os.path.join(self.parser_test_dir, "lsb-release")
    with open(path, "rb") as f:
      data = f.read()
    parser = linux_release_parser.LsbReleaseParseHandler(data)

    complete, result = parser.Parse()

    self.assertTrue(complete)
    self.assertTupleEqual(("Ubuntu", 14, 4), result)

  def testFallbackLsbReleaseFile(self):
    path = os.path.join(self.parser_test_dir, "lsb-release-notubuntu")
    with open(path, "rb") as f:
      data = f.read()
    parser = linux_release_parser.LsbReleaseParseHandler(data)

    complete, result = parser.Parse()

    self.assertFalse(complete)
    self.assertTupleEqual(("NotUbuntu", 0, 0), result)

  def testReleaseFileRedHatish(self):
    path = os.path.join(self.parser_test_dir, "oracle-release")
    with open(path, "rb") as f:
      data = f.read()
    parser = linux_release_parser.ReleaseFileParseHandler("OracleLinux")
    parser(data)

    complete, result = parser.Parse()

    self.assertTrue(complete)
    self.assertTupleEqual(("OracleLinux", 6, 5), result)

  def testMalformedReleaseFileRedHatish(self):
    path = os.path.join(self.parser_test_dir, "oracle-release-bad")
    with open(path, "rb") as f:
      data = f.read()
    parser = linux_release_parser.ReleaseFileParseHandler("OracleLinux")
    parser(data)

    complete, result = parser.Parse()

    self.assertFalse(complete)
    self.assertTupleEqual(("OracleLinux", 0, 0), result)

  def _CreateTestData(self, testdata):
    """Create 'stats' and 'file_objects' lists for passing to ParseMultiple."""
    stats = []
    files = []
    for filepath, localfile in testdata:
      files.append(open(localfile, "rb"))

      p = rdf_paths.PathSpec(path=filepath)
      s = rdf_client.StatEntry(pathspec=p)
      stats.append(s)

    return stats, files

  def testEndToEndUbuntu(self):
    parser = linux_release_parser.LinuxReleaseParser()

    testdata = [
        ("/etc/lsb-release", os.path.join(self.parser_test_dir, "lsb-release")),
    ]
    stats, files = self._CreateTestData(testdata)

    result = list(parser.ParseMultiple(stats, files, None)).pop()

    self.assertIsInstance(result, rdf_protodict.Dict)
    self.assertEqual("Ubuntu", result["os_release"])
    self.assertEqual(14, result["os_major_version"])
    self.assertEqual(4, result["os_minor_version"])

  def testEndToEndOracleLinux(self):
    parser = linux_release_parser.LinuxReleaseParser()

    testdata = [
        ("/etc/lsb-release", os.path.join(self.parser_test_dir,
                                          "lsb-release-notubuntu")),
        ("/etc/oracle-release", os.path.join(self.parser_test_dir,
                                             "oracle-release")),
    ]
    stats, files = self._CreateTestData(testdata)

    result = list(parser.ParseMultiple(stats, files, None)).pop()

    self.assertIsInstance(result, rdf_protodict.Dict)
    self.assertEqual("OracleLinux", result["os_release"])
    self.assertEqual(6, result["os_major_version"])
    self.assertEqual(5, result["os_minor_version"])

  def testAnomaly(self):
    parser = linux_release_parser.LinuxReleaseParser()

    stats = []
    files = []
    result = list(parser.ParseMultiple(stats, files, None))

    self.assertEqual(len(result), 1)
    self.assertIsInstance(result[0], rdf_anomaly.Anomaly)

def main(args):
  test_lib.main(args)

if __name__ == "__main__":
  flags.StartMain(main)


text:
package org.ovirt.engine.core.dao;

import org.ovirt.engine.core.common.businessentities.BaseDisk;
import org.ovirt.engine.core.common.utils.EnumUtils;
import org.ovirt.engine.core.compat.Guid;
import org.springframework.jdbc.core.RowMapper;
import org.springframework.jdbc.core.namedparam.MapSqlParameterSource;

public class BaseDiskDaoDbFacadeImpl extends DefaultGenericDaoDbFacade<BaseDisk, Guid> implements BaseDiskDao {

    public BaseDiskDaoDbFacadeImpl() {
        super("BaseDisk");
    }

    @Override
    protected MapSqlParameterSource createIdParameterMapper(Guid id) {
        return getCustomMapSqlParameterSource().addValue("disk_id", id);
    }

    @Override
    protected MapSqlParameterSource createFullParametersMapper(BaseDisk entity) {
        return createIdParameterMapper(entity.getId())
                .addValue("disk_alias", entity.getDiskAlias())
                .addValue("disk_description", entity.getDiskDescription())
                .addValue("disk_interface", EnumUtils.nameOrNull(entity.getDiskInterface()))
                .addValue("wipe_after_delete", entity.isWipeAfterDelete())
                .addValue("propagate_errors", EnumUtils.nameOrNull(entity.getPropagateErrors()))
                .addValue("shareable", entity.isShareable())
                .addValue("boot", entity.isBoot())
                .addValue("sgio", entity.getSgio())
                .addValue("alignment", entity.getAlignment())
                .addValue("last_alignment_scan", entity.getLastAlignmentScan());
    }

    @Override
    protected RowMapper<BaseDisk> createEntityRowMapper() {
        return BaseDiskRowMapper.instance;
    }

    @Override
    public boolean exists(Guid id) {
        return get(id) != null;
    }

    private static class BaseDiskRowMapper extends AbstractBaseDiskRowMapper<BaseDisk> {
        public static BaseDiskRowMapper instance = new BaseDiskRowMapper();

        private BaseDiskRowMapper() {
        }

        @Override
        protected BaseDisk createDiskEntity() {
            return new BaseDisk();
        }
    }
}


text:
package com.huawei.streaming.storm;

import java.io.Serializable;

import org.apache.storm.task.OutputCollector;
import org.apache.storm.tuple.Values;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import com.huawei.streaming.exception.StreamingException;
import com.huawei.streaming.exception.StreamingRuntimeException;
import com.huawei.streaming.operator.IEmitter;

/**
 * bolt上使用的emitter
 *
 */
public class BoltEmitter implements IEmitter, Serializable
{
    private static final Logger LOG = LoggerFactory.getLogger(BoltEmitter.class);

    private static final long serialVersionUID = -3925255141020122686L;

    private boolean acker = false;

    private String streamName = null;

    private OutputCollector outputCollector;

    /**
     * <默认构造函数>
     *
     */
    public BoltEmitter(OutputCollector collector, String name)
    {
        this(collector, name, false);
    }

    /**
     * <默认构造函数>
     *
     */
    public BoltEmitter(OutputCollector collector, String name, boolean isAck)
    {
        if (collector == null)
        {
            LOG.error("Failed to create event emitter, storm collector is null.");
            throw new StreamingRuntimeException("Failed to create event emitter, storm collector is null.");
        }

        this.outputCollector = collector;
        this.streamName = name;
        this.acker = isAck;
    }

    /**
     * {@inheritDoc}
     */
    @Override
    public void emit(Object[] data)
        throws StreamingException
    {
        /**
         * 目前暂时不支持acker
         */

        if (streamName == null)
        {
            outputCollector.emit(new Values(data));
        }
        else
        {
            outputCollector.emit(streamName, new Values(data));
        }

    }

}


text:
class Admin::LocalizationController < ApplicationController
end

#       Locale.code = params[:locale]
#       session[:locale] = Locale.code


text:
<?php
namespace StringForge;

interface Extension
{
}


text:
using System;
using System.ComponentModel;

using Windows.UI.Xaml.Controls;
using Windows.UI.Xaml.Media;

using Xamarin.Forms;
using Xamarin.Forms.Platform.WinRT;

[assembly: ExportRenderer(typeof(AppLimpia.PickerEx), typeof(AppLimpia.WinPhone.PickerExRenderer))]

namespace AppLimpia.WinPhone
{
    /// <summary>
    /// A renderer for <see cref="MapEx"/> control.
    /// </summary>
    public class PickerExRenderer : PickerRenderer
    {
        /// <summary>
        /// A value indicating whether to handle the selection changed event.
        /// </summary>
        private bool handle = true;

        /// <summary>
        /// Handles the ElementChanged event.
        /// </summary>
        /// <param name="e">A <see cref="ElementChangedEventArgs{Picker}"/> with arguments of the event.</param>
        protected override void OnElementChanged(ElementChangedEventArgs<Picker> e)
        {
            // Call the base member
            base.OnElementChanged(e);

            // If new element is present
            if (e.NewElement != null)
            {
                // Subscribe to events
                // NOTE: This is a hack because binding to attached property throws an exception in Xamarin
                System.Diagnostics.Debug.Assert(this.Control != null, "Control is not created");
                this.Control.DropDownClosed += this.OnDropDownClosed;
                this.Control.SelectionChanged += this.OnSelectionChanged;

                // Configure the control
                this.UpdatePlaceholderText();
                this.UpdateTextColor();
                this.UpdateForecolor();
            }
        }

        /// <summary>
        /// Handles the PropertyChanged event of Element.
        /// </summary>
        /// <param name="sender">The source of the event.</param>
        /// <param name="e">A <see cref="PropertyChangedEventArgs"/> with arguments of the event.</param>
        protected override void OnElementPropertyChanged(object sender, PropertyChangedEventArgs e)
        {
            // Call the base member
            base.OnElementPropertyChanged(sender, e);

            // If text color is changed
            if (e.PropertyName == PickerEx.TextColorProperty.PropertyName)
            {
                this.UpdateTextColor();
            }
            else if (e.PropertyName == PickerEx.PlaceholderProperty.PropertyName)
            {
                this.UpdatePlaceholderText();
            }
            else if (e.PropertyName == PickerEx.PlaceholderColorProperty.PropertyName)
            {
                this.UpdateForecolor();
            }
        }

        /// <summary>
        /// Gets the Brush for the specified color.
        /// </summary>
        /// <param name="color">The Color to create brush.</param>
        /// <returns>The created brush.</returns>
        private static Brush ColorToBrush(Xamarin.Forms.Color color)
        {
            var winColor = Windows.UI.Color.FromArgb(
                (byte)(color.A * 255.0),
                (byte)(color.R * 255.0),
                (byte)(color.G * 255.0),
                (byte)(color.B * 255.0));
            return new SolidColorBrush(winColor);
        }

        /// <summary>
        /// Handles the DropDownClosed event of Control.
        /// </summary>
        /// <param name="sender">The source of the event.</param>
        /// <param name="e">A <see cref="object"/> with arguments of the event.</param>
        private void OnDropDownClosed(object sender, object e)
        {
            if (this.handle)
            {
                this.UpdateForecolor();
            }

            this.handle = true;
        }

        /// <summary>
        /// Handles the SelectionChanged event of Control.
        /// </summary>
        /// <param name="sender">The source of the event.</param>
        /// <param name="e">A <see cref="SelectionChangedEventArgs"/> with arguments of the event.</param>
        private void OnSelectionChanged(object sender, SelectionChangedEventArgs e)
        {
            var combobox = sender as ComboBox;
            System.Diagnostics.Debug.Assert(combobox != null, "Invalid sender");
            this.handle = !combobox.IsDropDownOpen;
            this.UpdateForecolor();
        }

        /// <summary>
        /// Sets the text of the placeholder for the current control.
        /// </summary>
        private void UpdatePlaceholderText()
        {
            var element = (PickerEx)this.Element;
            if (element.Placeholder != null)
            {
                this.Control.PlaceholderText = element.Placeholder;
            }
            else
            {
                this.Control.ClearValue(ComboBox.PlaceholderTextProperty);
            }
        }

        /// <summary>
        /// Sets the text color for the current control.
        /// </summary>
        private void UpdateTextColor()
        {
            this.Control.Foreground = PickerExRenderer.ColorToBrush(((PickerEx)this.Element).TextColor);
        }

        /// <summary>
        /// Updates the fore color based on the selection.
        /// </summary>
        private void UpdateForecolor()
        {
            // If control exists
            if (this.Control != null)
            {
                var element = (PickerEx)this.Element;
                var color = this.Control.SelectedIndex >= 0 ? element.TextColor : element.PlaceholderColor;
                this.Control.Foreground = PickerExRenderer.ColorToBrush(color);
            }
        }
    }
}


text:
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
// Code generated by Microsoft (R) AutoRest Code Generator.

package com.azure.resourcemanager.botservice.generated;

import com.azure.resourcemanager.botservice.models.ConnectionSettingParameter;
import com.azure.resourcemanager.botservice.models.ConnectionSettingProperties;
import java.util.Arrays;

/** Samples for BotConnection Create. */
public final class BotConnectionCreateSamples {
    /*
     * x-ms-original-file: specification/botservice/resource-manager/Microsoft.BotService/preview/2021-05-01-preview/examples/PutConnection.json
     */
    /**
     * Sample code: Create Connection Setting.
     *
     * @param manager Entry point to BotServiceManager.
     */
    public static void createConnectionSetting(com.azure.resourcemanager.botservice.BotServiceManager manager) {
        manager
            .botConnections()
            .define("sampleConnection")
            .withRegion("West US")
            .withExistingBotService("OneResourceGroupName", "samplebotname")
            .withProperties(
                new ConnectionSettingProperties()
                    .withClientId("sampleclientid")
                    .withClientSecret("samplesecret")
                    .withScopes("samplescope")
                    .withServiceProviderId("serviceproviderid")
                    .withParameters(
                        Arrays
                            .asList(
                                new ConnectionSettingParameter().withKey("key1").withValue("value1"),
                                new ConnectionSettingParameter().withKey("key2").withValue("value2"))))
            .withEtag("etag1")
            .create();
    }
}


text:
var elixir = require('laravel-elixir');

/*
 |--------------------------------------------------------------------------
 | Elixir Asset Management
 |--------------------------------------------------------------------------
 |
 | Elixir provides a clean, fluent API for defining some basic Gulp tasks
 | for your Laravel application. By default, we are compiling the Sass
 | file for our application, as well as publishing vendor resources.
 |
 */

elixir(function(mix) {
    mix.sass([
        'app.scss'
    ]);

    mix.styles([
        './node_modules/normalize.css/normalize.css'
    ], 'public/css/normalize.css');

    mix.version([
        'css/app.css',
        'css/normalize.css'
    ]);
});


text:
<?xml version="1.0" encoding="UTF-8"?>
<sequence xmlns="http://ws.apache.org/ns/synapse" name="EndpointErrorTestErrorSequence" onError="EndpointErrorTestRightErrorSequence">
    <property xmlns:ns="http://org.apache.synapse/xsd"
              name="ID"
              expression="get-property('MessageID')"/>
    <log level="custom" separator=",">
        <property name="MessageFlow" value=" ======= Auth Sequence Called ======="/>
    </log>
    <call>
        <endpoint>
            <address uri="http://localhost:9000/services/SimpleStockQuoteService"/>
        </endpoint>
    </call>
    <send>
        <endpoint key="EndpointErrorTestErrorEndpoint"/>
    </send>
</sequence>


text:
<?php

/**
 * Skeleton subclass for performing query and update operations on the 'connections' table.
 *
 *
 *
 * You should add additional methods to this class to meet the
 * application requirements.  This class will only be generated as
 * long as it does not already exist in the output directory.
 *
 * @package    propel.generator.prestashop
 */
class Oops_Db_ConnectionsQuery extends Oops_Db_Propel_ConnectionsQuery {

} // Oops_Db_ConnectionsQuery


text:
package com.darksci.pardot.api.request.customredirect;

import com.darksci.pardot.api.request.BaseRequest;

/**
 * Used to generate a Custom Redirect read request.
 */
public class CustomRedirectReadRequest extends BaseRequest<CustomRedirectReadRequest> {

    @Override
    public String getApiEndpoint() {
        return "customRedirect/do/read";
    }

    public CustomRedirectReadRequest selectById(final Long id) {
        return setParam("id", id);
    }
}


text:
<!DOCTYPE html>

<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">

<title>navigation_js.html - RDoc Documentation</title>

<link type="text/css" media="screen" href="../../../rdoc.css" rel="stylesheet">

    Home
    Classes
    Methods

  <form action="#" method="get" accept-charset="utf-8">

      <input type="text" name="search" placeholder="Search" id="search-field"
             title="Type to search, Up and Down to navigate, Enter to load">

  </form>

Pages

Gemfile

LICENSE

README

Gemfile.html

LICENSE_txt.html

LTFS.html

LTFSExtentInfo.html

LTFSFile.html

LTFSIndex.html

LTFSTape.html

README_md.html

created.rid

Gemfile_html.html

LICENSE_txt_html.html

LTFSExtentInfo_html.html

LTFSFile_html.html

LTFSIndex_html.html

LTFSTape_html.html

LTFS_html.html

README_md_html.html

created_rid.html

created_rid_html.html

index_html.html

darkfish_js.html

jquery_js.html

navigation_js.html

search_index_js.html

search_js.html

searcher_js.html

ltfs_gemspec_html.html

rdoc_css.html

table_of_contents_html.html

index.html

darkfish.js

jquery.js

navigation.js

search.js

search_index.js

searcher.js

ltfs_gemspec.html

rdoc.css

table_of_contents.html

ltfs.gemspec

Class and Module Index

LTFS

LTFS::LTFSExtentInfo

LTFS::LTFSFile

LTFS::LTFSIndex

LTFS::LTFSTape

<!DOCTYPE html>

<html> <head> <meta content="text/html; charset=UTF-8"
http-equiv="Content-Type">

<title>navigation.js - RDoc Documentation</title>

<link type="text/css" media="screen" href="../../rdoc.css"
rel="stylesheet">

<script type="text/javascript">

var rdoc_rel_prefix = "../../";

</script>

<script type="text/javascript" charset="utf-8"
src="../../js/jquery.js"></script> <script
type="text/javascript" charset="utf-8"
src="../../js/navigation.js"></script> <script
type="text/javascript" charset="utf-8"
src="../../js/search_index.js"></script> <script
type="text/javascript" charset="utf-8"
src="../../js/search.js"></script> <script
type="text/javascript" charset="utf-8"
src="../../js/searcher.js"></script> <script
type="text/javascript" charset="utf-8"
src="../../js/darkfish.js"></script>

<body class="file"> <nav id="metadata">

<nav id="home-section" class="section">
<h3 class="section-header">
  <a href="../../index.html">Home</a>
  <a href="../../table_of_contents.html#classes">Classes</a>
  <a href="../../table_of_contents.html#methods">Methods</a>
</h3>

</nav>

<nav id="search-section" class="section project-section" class="initially-hidden">
<form action="#" method="get" accept-charset="utf-8">
  <h3 class="section-header">
    <input type="text" name="search" placeholder="Search" id="search-field"
           title="Type to search, Up and Down to navigate, Enter to load">
  </h3>
</form>

<ul id="search-results" class="initially-hidden"></ul>

</nav>

<div id="project-metadata">
  <nav id="fileindex-section" class="section project-section">
<h3 class="section-header">Pages</h3>

<ul>

  <li class="file"><a href="../../Gemfile.html">Gemfile</a>

  <li class="file"><a href="../../LICENSE_txt.html">LICENSE</a>

  <li class="file"><a href="../../README_md.html">README</a>

  <li class="file"><a href="../../doc/Gemfile_html.html">Gemfile.html</a>

  <li class="file"><a href="../../doc/LICENSE_txt_html.html">LICENSE_txt.html</a>

  <li class="file"><a href="../../doc/LTFS_html.html">LTFS.html</a>

  <li class="file"><a href="../../doc/LTFS/LTFSExtentInfo_html.html">LTFSExtentInfo.html</a>

  <li class="file"><a href="../../doc/LTFS/LTFSFile_html.html">LTFSFile.html</a>

  <li class="file"><a href="../../doc/LTFS/LTFSIndex_html.html">LTFSIndex.html</a>

  <li class="file"><a href="../../doc/LTFS/LTFSTape_html.html">LTFSTape.html</a>

  <li class="file"><a href="../../doc/README_md_html.html">README_md.html</a>

  <li class="file"><a href="../../doc/created_rid.html">created.rid</a>

  <li class="file"><a href="../../doc/doc/created_rid_html.html">created_rid.html</a>

  <li class="file"><a href="../../doc/index_html.html">index.html</a>

  <li class="file"><a href="../../doc/js/darkfish_js.html">darkfish.js</a>

  <li class="file"><a href="../../doc/js/jquery_js.html">jquery.js</a>

  <li class="file"><a href="../../doc/js/navigation_js.html">navigation.js</a>

  <li class="file"><a href="../../doc/js/search_js.html">search.js</a>

  <li class="file"><a href="../../doc/js/search_index_js.html">search_index.js</a>

  <li class="file"><a href="../../doc/js/searcher_js.html">searcher.js</a>

  <li class="file"><a href="../../doc/ltfs_gemspec_html.html">ltfs_gemspec.html</a>

  <li class="file"><a href="../../doc/rdoc_css.html">rdoc.css</a>

  <li class="file"><a href="../../doc/table_of_contents_html.html">table_of_contents.html</a>

  <li class="file"><a href="../../ltfs_gemspec.html">ltfs.gemspec</a>

</ul>

</nav>

  <nav id="classindex-section" class="section project-section">
<h3 class="section-header">Class and Module Index</h3>

<ul class="link-list">

  <li><a href="../../LTFS.html">LTFS</a>

  <li><a href="../../LTFS/LTFSExtentInfo.html">LTFS::LTFSExtentInfo</a>

  <li><a href="../../LTFS/LTFSFile.html">LTFS::LTFSFile</a>

  <li><a href="../../LTFS/LTFSIndex.html">LTFS::LTFSIndex</a>

  <li><a href="../../LTFS/LTFSTape.html">LTFS::LTFSTape</a>

</ul>

</nav>

</div>

</nav>

<div id="documentation" class="description">

<pre>Navigation allows movement using the arrow keys through the
search results.

When using this library you will need to set scrollIntoView to the
appropriate function for your layout.  Use scrollInWindow if the container
is not scrollable and scrollInElement if the container is a separate
scrolling region.</pre>

<p>Navigation = new function() {</p>

<pre>this.initNavigation = function() {

var _this = this;

$(document).keydown(function(e) {
  _this.onkeydown(e);
}).keyup(function(e) {
  _this.onkeyup(e);
});

this.navigationActive = true;

}

this.setNavigationActive = function(state) {

this.navigationActive = state;
this.clearMoveTimeout();

}

this.onkeyup = function(e) {

if (!this.navigationActive) return;

switch(e.keyCode) {
  case 37: //Event.KEY_LEFT:
  case 38: //Event.KEY_UP:
  case 39: //Event.KEY_RIGHT:
  case 40: //Event.KEY_DOWN:
    this.clearMoveTimeout();
    break;
}

}

this.onkeydown = function(e) {

if (!this.navigationActive) return;
switch(e.keyCode) {
  case 37: //Event.KEY_LEFT:
    if (this.moveLeft()) e.preventDefault();
    break;
  case 38: //Event.KEY_UP:
    if (e.keyCode == 38 || e.ctrlKey) {
      if (this.moveUp()) e.preventDefault();
      this.startMoveTimeout(false);
    }
    break;
  case 39: //Event.KEY_RIGHT:
    if (this.moveRight()) e.preventDefault();
    break;
  case 40: //Event.KEY_DOWN:
    if (e.keyCode == 40 || e.ctrlKey) {
      if (this.moveDown()) e.preventDefault();
      this.startMoveTimeout(true);
    }
    break;
  case 13: //Event.KEY_RETURN:
    if (this.$current)
      e.preventDefault();
      this.select(this.$current);
    break;
}
if (e.ctrlKey &amp;&amp; e.shiftKey) this.select(this.$current);

}

this.clearMoveTimeout = function() {

clearTimeout(this.moveTimeout);
this.moveTimeout = null;

}

this.startMoveTimeout = function(isDown) {

if (!$.browser.mozilla &amp;&amp; !$.browser.opera) return;
if (this.moveTimeout) this.clearMoveTimeout();
var _this = this;

var go = function() {
  if (!_this.moveTimeout) return;
  _this[isDown ? &#39;moveDown&#39; : &#39;moveUp&#39;]();
  _this.moveTimout = setTimeout(go, 100);
}
this.moveTimeout = setTimeout(go, 200);

}

this.moveRight = function() { }

this.moveLeft = function() { }

this.move = function(isDown) { }

this.moveUp = function() {

return this.move(false);

}

this.moveDown = function() {

return this.move(true);

}

/*

 Scrolls to the given element in the scrollable element view.
/

this.scrollInElement = function(element, view) {

var offset, viewHeight, viewScroll, height;
offset = element.offsetTop;
height = element.offsetHeight;
viewHeight = view.offsetHeight;
viewScroll = view.scrollTop;

if (offset - viewScroll + height &gt; viewHeight) {
  view.scrollTop = offset - viewHeight + height;
}
if (offset &lt; viewScroll) {
  view.scrollTop = offset;
}

}

/*

 Scrolls to the given element in the window.  The second argument is
 ignored
/

this.scrollInWindow = function(element, ignored) {

var offset, viewHeight, viewScroll, height;
offset = element.offsetTop;
height = element.offsetHeight;
viewHeight = window.innerHeight;
viewScroll = window.scrollY;

if (offset - viewScroll + height &gt; viewHeight) {
  window.scrollTo(window.scrollX, offset - viewHeight + height);
}
if (offset &lt; viewScroll) {
  window.scrollTo(window.scrollX, offset);
}

}</pre>

<p>}</p>

</div>

<footer id="validator-badges">

<p><a href="http://validator.w3.org/check/referer">[Validate]</a>
<p>Generated by <a href="https://github.com/rdoc/rdoc">RDoc</a> 4.0.0.
<p>Generated with the <a href="http://deveiate.org/projects/Darkfish-Rdoc/">Darkfish Rdoc Generator</a> 3.

</footer>

[Validate]

Generated by RDoc 4.0.0.

Generated with the Darkfish Rdoc Generator 3.


text:
<resources>
    <!-- Base application theme. -->
    <style name="AppTheme" parent="Theme.AppCompat">
        <item name="android:windowTranslucentStatus">true</item>
        <item name="windowActionBar">false</item>
        <item name="windowNoTitle">true</item>
    </style>
</resources>


text:
package org.zstack.sdk;

public class QueryAccountResourceRefResult {
    public java.util.List<AccountResourceRefInventory> inventories;
    public void setInventories(java.util.List<AccountResourceRefInventory> inventories) {
        this.inventories = inventories;
    }
    public java.util.List<AccountResourceRefInventory> getInventories() {
        return this.inventories;
    }

}


text:
package com.xinqihd.sns.gameserver.proto;

public final class XinqiBceBattleStageReady {
  private XinqiBceBattleStageReady() {}
  public static void registerAllExtensions(
      com.google.protobuf.ExtensionRegistry registry) {
  }
  public interface BceBattleStageReadyOrBuilder
      extends com.google.protobuf.MessageOrBuilder {

    // optional string sessionId = 1;
    boolean hasSessionId();
    String getSessionId();
  }
  public static final class BceBattleStageReady extends
      com.google.protobuf.GeneratedMessage
      implements BceBattleStageReadyOrBuilder {
    // Use BceBattleStageReady.newBuilder() to construct.
    private BceBattleStageReady(Builder builder) {
      super(builder);
    }
    private BceBattleStageReady(boolean noInit) {}

    private static final BceBattleStageReady defaultInstance;
    public static BceBattleStageReady getDefaultInstance() {
      return defaultInstance;
    }

    public BceBattleStageReady getDefaultInstanceForType() {
      return defaultInstance;
    }

    public static final com.google.protobuf.Descriptors.Descriptor
        getDescriptor() {
      return com.xinqihd.sns.gameserver.proto.XinqiBceBattleStageReady.internal_static_com_xinqihd_sns_gameserver_proto_BceBattleStageReady_descriptor;
    }

    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
        internalGetFieldAccessorTable() {
      return com.xinqihd.sns.gameserver.proto.XinqiBceBattleStageReady.internal_static_com_xinqihd_sns_gameserver_proto_BceBattleStageReady_fieldAccessorTable;
    }

    private int bitField0_;
    // optional string sessionId = 1;
    public static final int SESSIONID_FIELD_NUMBER = 1;
    private java.lang.Object sessionId_;
    public boolean hasSessionId() {
      return ((bitField0_ & 0x00000001) == 0x00000001);
    }
    public String getSessionId() {
      java.lang.Object ref = sessionId_;
      if (ref instanceof String) {
        return (String) ref;
      } else {
        com.google.protobuf.ByteString bs =
            (com.google.protobuf.ByteString) ref;
        String s = bs.toStringUtf8();
        if (com.google.protobuf.Internal.isValidUtf8(bs)) {
          sessionId_ = s;
        }
        return s;
      }
    }
    private com.google.protobuf.ByteString getSessionIdBytes() {
      java.lang.Object ref = sessionId_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b =
            com.google.protobuf.ByteString.copyFromUtf8((String) ref);
        sessionId_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }

    private void initFields() {
      sessionId_ = "";
    }
    private byte memoizedIsInitialized = -1;
    public final boolean isInitialized() {
      byte isInitialized = memoizedIsInitialized;
      if (isInitialized != -1) return isInitialized == 1;

      memoizedIsInitialized = 1;
      return true;
    }

    public void writeTo(com.google.protobuf.CodedOutputStream output)
                        throws java.io.IOException {
      getSerializedSize();
      if (((bitField0_ & 0x00000001) == 0x00000001)) {
        output.writeBytes(1, getSessionIdBytes());
      }
      getUnknownFields().writeTo(output);
    }

    private int memoizedSerializedSize = -1;
    public int getSerializedSize() {
      int size = memoizedSerializedSize;
      if (size != -1) return size;

      size = 0;
      if (((bitField0_ & 0x00000001) == 0x00000001)) {
        size += com.google.protobuf.CodedOutputStream
          .computeBytesSize(1, getSessionIdBytes());
      }
      size += getUnknownFields().getSerializedSize();
      memoizedSerializedSize = size;
      return size;
    }

    private static final long serialVersionUID = 0L;
    @java.lang.Override
    protected java.lang.Object writeReplace()
        throws java.io.ObjectStreamException {
      return super.writeReplace();
    }

    public static com.xinqihd.sns.gameserver.proto.XinqiBceBattleStageReady.BceBattleStageReady parseFrom(
        com.google.protobuf.ByteString data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return newBuilder().mergeFrom(data).buildParsed();
    }
    public static com.xinqihd.sns.gameserver.proto.XinqiBceBattleStageReady.BceBattleStageReady parseFrom(
        com.google.protobuf.ByteString data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return newBuilder().mergeFrom(data, extensionRegistry)
               .buildParsed();
    }
    public static com.xinqihd.sns.gameserver.proto.XinqiBceBattleStageReady.BceBattleStageReady parseFrom(byte[] data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return newBuilder().mergeFrom(data).buildParsed();
    }
    public static com.xinqihd.sns.gameserver.proto.XinqiBceBattleStageReady.BceBattleStageReady parseFrom(
        byte[] data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return newBuilder().mergeFrom(data, extensionRegistry)
               .buildParsed();
    }
    public static com.xinqihd.sns.gameserver.proto.XinqiBceBattleStageReady.BceBattleStageReady parseFrom(java.io.InputStream input)
        throws java.io.IOException {
      return newBuilder().mergeFrom(input).buildParsed();
    }
    public static com.xinqihd.sns.gameserver.proto.XinqiBceBattleStageReady.BceBattleStageReady parseFrom(
        java.io.InputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws java.io.IOException {
      return newBuilder().mergeFrom(input, extensionRegistry)
               .buildParsed();
    }
    public static com.xinqihd.sns.gameserver.proto.XinqiBceBattleStageReady.BceBattleStageReady parseDelimitedFrom(java.io.InputStream input)
        throws java.io.IOException {
      Builder builder = newBuilder();
      if (builder.mergeDelimitedFrom(input)) {
        return builder.buildParsed();
      } else {
        return null;
      }
    }
    public static com.xinqihd.sns.gameserver.proto.XinqiBceBattleStageReady.BceBattleStageReady parseDelimitedFrom(
        java.io.InputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws java.io.IOException {
      Builder builder = newBuilder();
      if (builder.mergeDelimitedFrom(input, extensionRegistry)) {
        return builder.buildParsed();
      } else {
        return null;
      }
    }
    public static com.xinqihd.sns.gameserver.proto.XinqiBceBattleStageReady.BceBattleStageReady parseFrom(
        com.google.protobuf.CodedInputStream input)
        throws java.io.IOException {
      return newBuilder().mergeFrom(input).buildParsed();
    }
    public static com.xinqihd.sns.gameserver.proto.XinqiBceBattleStageReady.BceBattleStageReady parseFrom(
        com.google.protobuf.CodedInputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws java.io.IOException {
      return newBuilder().mergeFrom(input, extensionRegistry)
               .buildParsed();
    }

    public static Builder newBuilder() { return Builder.create(); }
    public Builder newBuilderForType() { return newBuilder(); }
    public static Builder newBuilder(com.xinqihd.sns.gameserver.proto.XinqiBceBattleStageReady.BceBattleStageReady prototype) {
      return newBuilder().mergeFrom(prototype);
    }
    public Builder toBuilder() { return newBuilder(this); }

    @java.lang.Override
    protected Builder newBuilderForType(
        com.google.protobuf.GeneratedMessage.BuilderParent parent) {
      Builder builder = new Builder(parent);
      return builder;
    }
    public static final class Builder extends
        com.google.protobuf.GeneratedMessage.Builder<Builder>
       implements com.xinqihd.sns.gameserver.proto.XinqiBceBattleStageReady.BceBattleStageReadyOrBuilder {
      public static final com.google.protobuf.Descriptors.Descriptor
          getDescriptor() {
        return com.xinqihd.sns.gameserver.proto.XinqiBceBattleStageReady.internal_static_com_xinqihd_sns_gameserver_proto_BceBattleStageReady_descriptor;
      }

      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
          internalGetFieldAccessorTable() {
        return com.xinqihd.sns.gameserver.proto.XinqiBceBattleStageReady.internal_static_com_xinqihd_sns_gameserver_proto_BceBattleStageReady_fieldAccessorTable;
      }

      // Construct using com.xinqihd.sns.gameserver.proto.XinqiBceBattleStageReady.BceBattleStageReady.newBuilder()
      private Builder() {
        maybeForceBuilderInitialization();
      }

      private Builder(BuilderParent parent) {
        super(parent);
        maybeForceBuilderInitialization();
      }
      private void maybeForceBuilderInitialization() {
        if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) {
        }
      }
      private static Builder create() {
        return new Builder();
      }

      public Builder clear() {
        super.clear();
        sessionId_ = "";
        bitField0_ = (bitField0_ & ~0x00000001);
        return this;
      }

      public Builder clone() {
        return create().mergeFrom(buildPartial());
      }

      public com.google.protobuf.Descriptors.Descriptor
          getDescriptorForType() {
        return com.xinqihd.sns.gameserver.proto.XinqiBceBattleStageReady.BceBattleStageReady.getDescriptor();
      }

      public com.xinqihd.sns.gameserver.proto.XinqiBceBattleStageReady.BceBattleStageReady getDefaultInstanceForType() {
        return com.xinqihd.sns.gameserver.proto.XinqiBceBattleStageReady.BceBattleStageReady.getDefaultInstance();
      }

      public com.xinqihd.sns.gameserver.proto.XinqiBceBattleStageReady.BceBattleStageReady build() {
        com.xinqihd.sns.gameserver.proto.XinqiBceBattleStageReady.BceBattleStageReady result = buildPartial();
        if (!result.isInitialized()) {
          throw newUninitializedMessageException(result);
        }
        return result;
      }

      private com.xinqihd.sns.gameserver.proto.XinqiBceBattleStageReady.BceBattleStageReady buildParsed()
          throws com.google.protobuf.InvalidProtocolBufferException {
        com.xinqihd.sns.gameserver.proto.XinqiBceBattleStageReady.BceBattleStageReady result = buildPartial();
        if (!result.isInitialized()) {
          throw newUninitializedMessageException(
            result).asInvalidProtocolBufferException();
        }
        return result;
      }

      public com.xinqihd.sns.gameserver.proto.XinqiBceBattleStageReady.BceBattleStageReady buildPartial() {
        com.xinqihd.sns.gameserver.proto.XinqiBceBattleStageReady.BceBattleStageReady result = new com.xinqihd.sns.gameserver.proto.XinqiBceBattleStageReady.BceBattleStageReady(this);
        int from_bitField0_ = bitField0_;
        int to_bitField0_ = 0;
        if (((from_bitField0_ & 0x00000001) == 0x00000001)) {
          to_bitField0_ |= 0x00000001;
        }
        result.sessionId_ = sessionId_;
        result.bitField0_ = to_bitField0_;
        onBuilt();
        return result;
      }

      public Builder mergeFrom(com.google.protobuf.Message other) {
        if (other instanceof com.xinqihd.sns.gameserver.proto.XinqiBceBattleStageReady.BceBattleStageReady) {
          return mergeFrom((com.xinqihd.sns.gameserver.proto.XinqiBceBattleStageReady.BceBattleStageReady)other);
        } else {
          super.mergeFrom(other);
          return this;
        }
      }

      public Builder mergeFrom(com.xinqihd.sns.gameserver.proto.XinqiBceBattleStageReady.BceBattleStageReady other) {
        if (other == com.xinqihd.sns.gameserver.proto.XinqiBceBattleStageReady.BceBattleStageReady.getDefaultInstance()) return this;
        if (other.hasSessionId()) {
          setSessionId(other.getSessionId());
        }
        this.mergeUnknownFields(other.getUnknownFields());
        return this;
      }

      public final boolean isInitialized() {
        return true;
      }

      public Builder mergeFrom(
          com.google.protobuf.CodedInputStream input,
          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
          throws java.io.IOException {
        com.google.protobuf.UnknownFieldSet.Builder unknownFields =
          com.google.protobuf.UnknownFieldSet.newBuilder(
            this.getUnknownFields());
        while (true) {
          int tag = input.readTag();
          switch (tag) {
            case 0:
              this.setUnknownFields(unknownFields.build());
              onChanged();
              return this;
            default: {
              if (!parseUnknownField(input, unknownFields,
                                     extensionRegistry, tag)) {
                this.setUnknownFields(unknownFields.build());
                onChanged();
                return this;
              }
              break;
            }
            case 10: {
              bitField0_ |= 0x00000001;
              sessionId_ = input.readBytes();
              break;
            }
          }
        }
      }

      private int bitField0_;

      // optional string sessionId = 1;
      private java.lang.Object sessionId_ = "";
      public boolean hasSessionId() {
        return ((bitField0_ & 0x00000001) == 0x00000001);
      }
      public String getSessionId() {
        java.lang.Object ref = sessionId_;
        if (!(ref instanceof String)) {
          String s = ((com.google.protobuf.ByteString) ref).toStringUtf8();
          sessionId_ = s;
          return s;
        } else {
          return (String) ref;
        }
      }
      public Builder setSessionId(String value) {
        if (value == null) {
    throw new NullPointerException();
  }
  bitField0_ |= 0x00000001;
        sessionId_ = value;
        onChanged();
        return this;
      }
      public Builder clearSessionId() {
        bitField0_ = (bitField0_ & ~0x00000001);
        sessionId_ = getDefaultInstance().getSessionId();
        onChanged();
        return this;
      }
      void setSessionId(com.google.protobuf.ByteString value) {
        bitField0_ |= 0x00000001;
        sessionId_ = value;
        onChanged();
      }

      // @@protoc_insertion_point(builder_scope:com.xinqihd.sns.gameserver.proto.BceBattleStageReady)
    }

    static {
      defaultInstance = new BceBattleStageReady(true);
      defaultInstance.initFields();
    }

    // @@protoc_insertion_point(class_scope:com.xinqihd.sns.gameserver.proto.BceBattleStageReady)
  }

  private static com.google.protobuf.Descriptors.Descriptor
    internal_static_com_xinqihd_sns_gameserver_proto_BceBattleStageReady_descriptor;
  private static
    com.google.protobuf.GeneratedMessage.FieldAccessorTable
      internal_static_com_xinqihd_sns_gameserver_proto_BceBattleStageReady_fieldAccessorTable;

  public static com.google.protobuf.Descriptors.FileDescriptor
      getDescriptor() {
    return descriptor;
  }
  private static com.google.protobuf.Descriptors.FileDescriptor
      descriptor;
  static {
    java.lang.String[] descriptorData = {
      "\n\031BceBattleStageReady.proto\022 com.xinqihd" +
      ".sns.gameserver.proto\"(\n\023BceBattleStageR" +
      "eady\022\021\n\tsessionId\030\001 \001(\tB\032B\030XinqiBceBattl" +
      "eStageReady"
    };
    com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner =
      new com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner() {
        public com.google.protobuf.ExtensionRegistry assignDescriptors(
            com.google.protobuf.Descriptors.FileDescriptor root) {
          descriptor = root;
          internal_static_com_xinqihd_sns_gameserver_proto_BceBattleStageReady_descriptor =
            getDescriptor().getMessageTypes().get(0);
          internal_static_com_xinqihd_sns_gameserver_proto_BceBattleStageReady_fieldAccessorTable = new
            com.google.protobuf.GeneratedMessage.FieldAccessorTable(
              internal_static_com_xinqihd_sns_gameserver_proto_BceBattleStageReady_descriptor,
              new java.lang.String[] { "SessionId", },
              com.xinqihd.sns.gameserver.proto.XinqiBceBattleStageReady.BceBattleStageReady.class,
              com.xinqihd.sns.gameserver.proto.XinqiBceBattleStageReady.BceBattleStageReady.Builder.class);
          return null;
        }
      };
    com.google.protobuf.Descriptors.FileDescriptor
      .internalBuildGeneratedFileFrom(descriptorData,
        new com.google.protobuf.Descriptors.FileDescriptor[] {
        }, assigner);
  }

  // @@protoc_insertion_point(outer_class_scope)
}


text:
<?php

namespace Ss\FichierBundle\Entity;

use Doctrine\ORM\Mapping as ORM;

/**
 * Droit
 *
 * @ORM\Table()
 * @ORM\Entity(repositoryClass="Ss\FichierBundle\Entity\DroitRepository")
 */
class Droit
{
    /**
     * @var integer
     *
     * @ORM\Column(name="id", type="integer")
     * @ORM\Id
     * @ORM\GeneratedValue(strategy="AUTO")
     */
    private $id;

    /**
     * @ORM\ManyToOne(targetEntity="Ss\FichierBundle\Entity\Fichier")
     * @ORM\JoinColumn(nullable=false)
     */
    private $fichier;

    /**
     * @ORM\ManyToOne(targetEntity="Ss\MembreBundle\Entity\Utilisateur")
     */
    private $utilisateurCible;

    /**
     * @ORM\ManyToOne(targetEntity="Ss\MembreBundle\Entity\Groupe")
     */
    private $groupeCible;

    /**
     * @var integer
     *
     * @ORM\Column(name="droit", type="integer")
     */
    private $droit;

    /**
     * Get id
     *
     * @return integer
     */
    public function getId()
    {
        return $this->id;
    }

    /**
     * Set droit
     *
     * @param integer $droit
     * @return Droit
     */
    public function setDroit($droit)
    {
        $this->droit = $droit;

        return $this;
    }

    /**
     * Get droit
     *
     * @return integer
     */
    public function getDroit()
    {
        return $this->droit;
    }

    /**
     * Set fichier
     *
     * @param \Ss\FichierBundle\Entity\Fichier $fichier
     * @return Droit
     */
    public function setFichier(\Ss\FichierBundle\Entity\Fichier $fichier)
    {
        $this->fichier = $fichier;

        return $this;
    }

    /**
     * Get fichier
     *
     * @return \Ss\FichierBundle\Entity\Fichier
     */
    public function getFichier()
    {
        return $this->fichier;
    }

    /**
     * Set utilisateurCible
     *
     * @param \Ss\MembreBundle\Entity\Utilisateur $utilisateurCible
     * @return Droit
     */
    public function setUtilisateurCible(\Ss\MembreBundle\Entity\Utilisateur $utilisateurCible = null)
    {
        $this->utilisateurCible = $utilisateurCible;

        return $this;
    }

    /**
     * Get utilisateurCible
     *
     * @return \Ss\MembreBundle\Entity\Utilisateur
     */
    public function getUtilisateurCible()
    {
        return $this->utilisateurCible;
    }

    /**
     * Set groupeCible
     *
     * @param \Ss\MembreBundle\Entity\Groupe $groupeCible
     * @return Droit
     */
    public function setGroupeCible(\Ss\MembreBundle\Entity\Groupe $groupeCible = null)
    {
        $this->groupeCible = $groupeCible;

        return $this;
    }

    /**
     * Get groupeCible
     *
     * @return \Ss\MembreBundle\Entity\Groupe
     */
    public function getGroupeCible()
    {
        return $this->groupeCible;
    }
}


text:
import {ManyToMany} from "../../../../../../../src/decorator/relations/ManyToMany";
import {Entity} from "../../../../../../../src/decorator/entity/Entity";
import {PrimaryGeneratedColumn} from "../../../../../../../src/decorator/columns/PrimaryGeneratedColumn";
import {Column} from "../../../../../../../src/decorator/columns/Column";
import {ManyToOne} from "../../../../../../../src/decorator/relations/ManyToOne";
import {JoinTable} from "../../../../../../../src/decorator/relations/JoinTable";
import {Category} from "./Category";
import {Tag} from "./Tag";

@Entity()
export class Post {

    @PrimaryGeneratedColumn()
    id: number;

    @Column()
    title: string;

    @ManyToOne(type => Tag)
    tag: Tag;

    tagId: number;

    @ManyToMany(type => Category, category => category.posts)
    @JoinTable()
    categories: Category[];

    @ManyToMany(type => Category)
    @JoinTable()
    subcategories: Category[];

    categoryIds: number[];

}


text:
@interface NSURL (OAuthString)

- (NSString *)OAuthString;

@end


text:
from __future__ import print_function
from simtk.openmm import app
import simtk.openmm as mm
from simtk import unit
from sys import stdout

print("[START] Application is now running")

pdb = app.PDBFile('input.pdb')
print("[STATUS] Loaded model")
forcefield = app.ForceField('amber03.xml', 'amber03_obc.xml')
print("[STATUS] Loaded force field")

system = forcefield.createSystem(pdb.topology, nonbondedMethod=app.NoCutoff,
     constraints=None, rigidWater=False)
print("[STATUS] Created system")
integrator = mm.LangevinIntegrator(300*unit.kelvin, 91/unit.picoseconds,
    1.0*unit.femtoseconds)
print("[STATUS] Created integrator")

try:
    platform = mm.Platform.getPlatformByName('CPU')
except Exception as e:
    print("[ERROR] Could not load platform CPU. Running Reference")
    platform = mm.Platform.getPlatformByName("Reference")

simulation = app.Simulation(pdb.topology, system, integrator, platform)
print("[STATUS] Set up compute platform")
simulation.context.setPositions(pdb.positions)
print("[STATUS] Set atomic positions")

print('[STATUS] Minimizing...')
simulation.minimizeEnergy()
print('[STATUS] Equilibrating...')
simulation.step(100)

simulation.reporters.append(app.DCDReporter('trajectory.dcd', 1000))
simulation.reporters.append(app.StateDataReporter(stdout, 1000, step=True,
    potentialEnergy=True, totalEnergy=True, temperature=True, separator='\t'))
print("[STATUS] Set up reporters")

print('[STATUS] Running Production...')

increment = 1000

for i in range(0,100000,increment):
    print("[STATUS] Step %s" % (i))
    simulation.step(increment)

print('[END] Done!')


text:
package healthserver

import (
	"context"
	"encoding/json"
	"errors"
	"fmt"
	"net/http"
	"sync/atomic"

	"github.com/cilium/cilium/pkg/counter"
	lb "github.com/cilium/cilium/pkg/loadbalancer"
	"github.com/cilium/cilium/pkg/logging"
	"github.com/cilium/cilium/pkg/logging/logfields"
	"github.com/cilium/cilium/pkg/option"

	"github.com/sirupsen/logrus"
	"golang.org/x/sys/unix"
)

var log = logging.DefaultLogger.WithField(logfields.LogSubsys, "service-healthserver")

// ServiceName is the name and namespace of the service
type ServiceName struct {
	Namespace string `json:"namespace"`
	Name      string `json:"name"`
}

// Service represents the object returned by the health server
type Service struct {
	Service        ServiceName `json:"service"`
	LocalEndpoints int         `json:"localEndpoints"`
}

// NewService creates a new service
func NewService(ns, name string, localEndpoints int) *Service {
	return &Service{
		Service: ServiceName{
			Namespace: ns,
			Name:      name,
		},
		LocalEndpoints: localEndpoints,
	}
}

// healthHTTPServer is a running HTTP health server for a certain service
type healthHTTPServer interface {
	updateService(*Service)
	shutdown()
}

// healthHTTPServerFactory creates a new HTTP health server, used for mocking
type healthHTTPServerFactory interface {
	newHTTPHealthServer(port uint16, svc *Service) healthHTTPServer
}

// ServiceHealthServer manages HTTP health check ports. For each added service,
// it opens a HTTP server on the specified HealthCheckNodePort and either
// responds with 200 OK if there are local endpoints for the service, or with
// 503 Service Unavailable if the service does not have any local endpoints.
type ServiceHealthServer struct {
	healthHTTPServerByPort  map[uint16]healthHTTPServer
	portRefCount            counter.IntCounter
	portByServiceID         map[lb.ID]uint16
	healthHTTPServerFactory healthHTTPServerFactory
}

// New creates a new health service server which services health checks by
// serving an HTTP endpoint for each service on the given HealthCheckNodePort.
func New() *ServiceHealthServer {
	return WithHealthHTTPServerFactory(&httpHealthHTTPServerFactory{})
}

// WithHealthHTTPServerFactory creates a new health server with a specific health
// server factory for testing purposes.
func WithHealthHTTPServerFactory(healthHTTPServerFactory healthHTTPServerFactory) *ServiceHealthServer {
	return &ServiceHealthServer{
		healthHTTPServerByPort:  map[uint16]healthHTTPServer{},
		portRefCount:            counter.IntCounter{},
		portByServiceID:         map[lb.ID]uint16{},
		healthHTTPServerFactory: healthHTTPServerFactory,
	}
}

func (s *ServiceHealthServer) removeHTTPListener(port uint16) {
	if s.portRefCount.Delete(int(port)) {
		srv, ok := s.healthHTTPServerByPort[port]
		if !ok {
			log.WithField(logfields.Port, port).Warn("Invalid refcount for service health check port")
			return
		}
		srv.shutdown()
		delete(s.healthHTTPServerByPort, port)
	}
}

// UpsertService inserts or updates a service health check server on 'port'. If
// 'port' is zero, the listener for the added service is stopped.
// Access to this method is not synchronized. It is the caller's responsibility
// to ensure this method is called in a thread-safe manner.
func (s *ServiceHealthServer) UpsertService(svcID lb.ID, ns, name string, localEndpoints int, port uint16) {
	oldPort, foundSvc := s.portByServiceID[svcID]
	if foundSvc && oldPort != port {
		// HealthCheckNodePort has changed, we treat this as a DeleteService
		// followed by an Insert.
		s.removeHTTPListener(oldPort)
		delete(s.portByServiceID, svcID)
		foundSvc = false
	}

	// Nothing to do for services without a health check port
	if port == 0 {
		return
	}

	// Since we have one lb.SVC per frontend, we may end up receiving
	// multiple identical services per port. The following code assumes that
	// two services with the same port also have the same name and amount of
	// endpoints. We reference count the listeners to make sure we only have
	// a single listener per port.

	svc := NewService(ns, name, localEndpoints)
	if !foundSvc {
		// We only bump the reference count if this is a service ID we have
		// not seen before
		if s.portRefCount.Add(int(port)) {
			s.healthHTTPServerByPort[port] = s.healthHTTPServerFactory.newHTTPHealthServer(port, svc)
		}
	}

	srv, foundSrv := s.healthHTTPServerByPort[port]
	if !foundSrv {
		log.WithFields(logrus.Fields{
			logfields.ServiceID:                  svcID,
			logfields.ServiceNamespace:           ns,
			logfields.ServiceName:                name,
			logfields.ServiceHealthCheckNodePort: port,
		}).Warn("Unable to find service health check listener")
		return
	}

	srv.updateService(svc)
	s.portByServiceID[svcID] = port
}

// DeleteService stops the health server for the given service with 'svcID'.
// Access to this method is not synchronized. It is the caller's responsibility
// to ensure this method is called in a thread-safe manner.
func (s *ServiceHealthServer) DeleteService(svcID lb.ID) {
	if port, ok := s.portByServiceID[svcID]; ok {
		s.removeHTTPListener(port)
		delete(s.portByServiceID, svcID)
	}
}

type httpHealthServer struct {
	http.Server
	service atomic.Value
}

type httpHealthHTTPServerFactory struct{}

func (h *httpHealthHTTPServerFactory) newHTTPHealthServer(port uint16, svc *Service) healthHTTPServer {
	srv := &httpHealthServer{}
	srv.service.Store(svc)
	srv.Server = http.Server{
		Addr:    fmt.Sprintf(":%d", port),
		Handler: srv,
	}

	go func() {
		log.WithFields(logrus.Fields{
			logfields.ServiceName:                svc.Service.Name,
			logfields.ServiceNamespace:           svc.Service.Namespace,
			logfields.ServiceHealthCheckNodePort: port,
		}).Debug("Starting new service health server")

		if err := srv.ListenAndServe(); !errors.Is(err, http.ErrServerClosed) {
			svc := srv.loadService()
			if errors.Is(err, unix.EADDRINUSE) {
				log.WithError(err).WithFields(logrus.Fields{
					logfields.ServiceName:                svc.Service.Name,
					logfields.ServiceNamespace:           svc.Service.Namespace,
					logfields.ServiceHealthCheckNodePort: port,
				}).Errorf("ListenAndServe failed for service health server, since the user might be running with kube-proxy. Please ensure that '--%s' option is set to false if '--%s' is set to '%s'", option.EnableHealthCheckNodePort, option.KubeProxyReplacement, option.KubeProxyReplacementPartial)
			}
			log.WithError(err).WithFields(logrus.Fields{
				logfields.ServiceName:                svc.Service.Name,
				logfields.ServiceNamespace:           svc.Service.Namespace,
				logfields.ServiceHealthCheckNodePort: port,
			}).Error("ListenAndServe failed for service health server")
		}
	}()

	return srv
}

func (h *httpHealthServer) loadService() *Service {
	return h.service.Load().(*Service)
}

func (h *httpHealthServer) updateService(svc *Service) {
	h.service.Store(svc)
}

func (h *httpHealthServer) shutdown() {
	h.Server.Shutdown(context.Background())
}

func (h *httpHealthServer) ServeHTTP(w http.ResponseWriter, r *http.Request) {
	// Use headers and JSON output compatible with kube-proxy
	svc := h.loadService()
	if svc.LocalEndpoints == 0 {
		w.WriteHeader(http.StatusServiceUnavailable)
	} else {
		w.WriteHeader(http.StatusOK)
	}
	w.Header().Set("Content-Type", "application/json")
	w.Header().Set("X-Content-Type-Options", "nosniff")
	if err := json.NewEncoder(w).Encode(&svc); err != nil {
		http.Error(w, err.Error(), http.StatusInternalServerError)
	}
}


text:
/*
 * $Revision: 2552 $
 *
 * last checkin:
 *   $Author: gutwenger $
 *   $Date: 2012-07-05 16:45:20 +0200 (Do, 05. Jul 2012) $
 ***************************************************************/

/** \file
 * \brief Implements simple labeling algorithm
 *
 * \author Joachim Kupke
 *
 * \par License:
 * This file is part of the Open Graph Drawing Framework (OGDF).
 *
 * \par
 * Copyright (C)<br>
 * See README.txt in the root directory of the OGDF installation for details.
 *
 * \par
 * This program is free software; you can redistribute it and/or
 * modify it under the terms of the GNU General Public License
 * Version 2 or 3 as published by the Free Software Foundation;
 * see the file LICENSE.txt included in the packaging of this file
 * for details.
 *
 * \par
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * \par
 * You should have received a copy of the GNU General Public
 * License along with this program; if not, write to the Free
 * Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
 * Boston, MA 02110-1301, USA.
 *
 * \see  http://www.gnu.org/copyleft/gpl.html
 ***************************************************************/

#include <ogdf/labeling/ELabelPosSimple.h>

namespace ogdf {

	ELabelPosSimple::ELabelPosSimple() :
m_absolut(true),
	m_marginDistance(0.2),
	m_edgeDistance(0.2),
	m_midOnEdge(true)
{ }

ELabelPosSimple::~ELabelPosSimple()
{ }

// returns the segment of the polyline containing the point
// that is fraction*bends.length() away from the start
static DLine segment(DPolyline &bends, double fraction)
{
	double targetpos = bends.length()*fraction;
	double pos = 0.0;

	ListConstIterator<DPoint> iter, next;
	for (iter = next = bends.begin(), next++; next.valid(); iter++, next++) {
		pos += (*iter).distance(*next);
		if (pos >= targetpos)
			return DLine(*iter, *next);
	}

	return DLine(*--iter, bends.back());
}

// liefert den Punkt neben dem Segment (links oder rechts, siehe 'left'), der orthogonal von
// 'p' die Entfernung 'newLen' von diesem Segment hat.
static DPoint leftOfSegment(const DLine &segment, const DPoint &p, double newLen, bool left = true)
{
	DVector v;
	if (p == segment.start())
		v = segment.end() - p;
	else
		v = p - segment.start();

	DVector newPos;
	if (left) newPos = ++v;
	else      newPos = --v;

	// newPos hat immer L?nge != 0
	newPos = (newPos * newLen) / newPos.length();

	return p + newPos;
}

void ELabelPosSimple::call(GraphAttributes &ug, ELabelInterface<double> &eli)
{
	//ug.addNodeCenter2Bends();
	edge e;
	forall_edges(e, ug.constGraph()) {
		EdgeLabel<double> &el = eli.getLabel(e);
		DPolyline       bends = ug.bends(e);

		bends.normalize();

		if (bends.size() < 2)
			OGDF_THROW_PARAM(AlgorithmFailureException, afcLabel);

		double frac;

		if (m_absolut) {
			double len = bends.length();
			if (len == 0.0)
				frac = 0.0;
			else
				frac = m_marginDistance / len;

		}
		else {
			frac = m_marginDistance;
		}

		if (frac < 0.0) frac = 0.0;
		if (frac > 0.4) frac = 0.4;

		double midFrac   = 0.5;
		double startFrac = frac;
		double endFrac   = 1.0 -frac;

		// hole Positionen auf der Kante
		DPoint midPoint   = bends.position(midFrac);
		DPoint startPoint = bends.position(startFrac);
		DPoint endPoint   = bends.position(endFrac);

		// hole die beteiligten Segmente
		DLine midLine   = segment(bends, midFrac);
		DLine startLine = segment(bends, startFrac);
		DLine endLine   = segment(bends, endFrac);

		// berechne die Labelpositionen
		if (el.usedLabel(elEnd1)) {
			DPoint np = leftOfSegment(startLine, startPoint, m_edgeDistance, true);
			el.setX(elEnd1, np.m_x);
			el.setY(elEnd1, np.m_y);
		}

		if (el.usedLabel(elMult1)) {
			DPoint np = leftOfSegment(startLine, startPoint, m_edgeDistance, false);
			el.setX(elMult1, np.m_x);
			el.setY(elMult1, np.m_y);
		}

		if (el.usedLabel(elName)) {
			DPoint np = m_midOnEdge ? midPoint : leftOfSegment(midLine, midPoint, m_edgeDistance, true);
			el.setX(elName, np.m_x);
			el.setY(elName, np.m_y);
		}

		if (el.usedLabel(elEnd2)) {
			DPoint np = leftOfSegment(endLine, endPoint, m_edgeDistance, true);
			el.setX(elEnd2, np.m_x);
			el.setY(elEnd2, np.m_y);
		}

		if (el.usedLabel(elMult2)) {
			DPoint np = leftOfSegment(endLine, endPoint, m_edgeDistance, false);
			el.setX(elMult2, np.m_x);
			el.setY(elMult2, np.m_y);
		}
	}
}

}


text:
// Copyright 2009 the Sputnik authors.  All rights reserved.
/**
 * The | regular expression operator separates two alternatives.
 * The pattern first tries to match the left Alternative (followed by the sequel of the regular expression).
 * If it fails, it tries to match the right Disjunction (followed by the sequel of the regular expression)
 *
 * @path ch15/15.10/15.10.2/15.10.2.3/S15.10.2.3_A1_T14.js
 * @description Execute /.+: gr(a|e)y/.exec("color: grey") and check results
 */

__executed = /.+: gr(a|e)y/.exec("color: grey");

__expected = ["color: grey","e"];
__expected.index = 0;
__expected.input = "color: grey";

//CHECK#1
if (__executed.length !== __expected.length) {
	$ERROR('#1: __executed = /.+: gr(a|e)y/.exec("color: grey"); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length);
}

//CHECK#2
if (__executed.index !== __expected.index) {
	$ERROR('#2: __executed = /.+: gr(a|e)y/.exec("color: grey"); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index);
}

//CHECK#3
if (__executed.input !== __expected.input) {
	$ERROR('#3: __executed = /.+: gr(a|e)y/.exec("color: grey"); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input);
}

//CHECK#4
for(var index=0; index<__expected.length; index++) {
	if (__executed[index] !== __expected[index]) {
		$ERROR('#4: __executed = /.+: gr(a|e)y/.exec("color: grey"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]);
	}
}


text:
package com.ain.engine.repository.csos;

import com.ain.engine.domain.csos.Address;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.querydsl.QueryDslPredicateExecutor;
import org.springframework.stereotype.Repository;

/**
 * Created by Young Gyu Park on 1/10/2015.
 */
@Repository
public interface AddressRepository extends JpaRepository<Address, Long>, QueryDslPredicateExecutor<Address> {

    @Query(value = "SELECT * FROM whatever_custom_query here s WHERE s.reconciliation_setting_id=?1", nativeQuery = true)
    Address doAFoo(String s);

}


text:
<?xml version="1.0" ?>

<container xmlns="http://symfony.com/schema/dic/services"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://symfony.com/schema/dic/services http://symfony.com/schema/dic/services/services-1.0.xsd">

    <services>
        <service id="annotations.reader" class="Doctrine\Common\Annotations\AnnotationReader" public="false" />
        <service id="Doctrine\Common\Annotations\Reader" alias="annotations.reader" public="false" />

        <service id="annotations.cached_reader" class="Doctrine\Common\Annotations\CachedReader" public="false">
            <argument type="service" id="annotations.reader" />
            <argument type="service">
                <service class="Doctrine\Common\Cache\ArrayCache" />
            </argument>
            <argument /><!-- Debug-Flag -->
        </service>

        <service id="annotations.filesystem_cache" class="Doctrine\Common\Cache\FilesystemCache" public="false">
            <argument /><!-- Cache-Directory -->
        </service>

        <service id="annotations.cache_warmer" class="Symfony\Bundle\FrameworkBundle\CacheWarmer\AnnotationsCacheWarmer" public="false">
            <argument type="service" id="annotations.reader" />
            <argument>%kernel.cache_dir%/annotations.php</argument>
            <argument type="service" id="cache.annotations" />
        </service>

        <service id="annotations.cache" class="Symfony\Component\Cache\DoctrineProvider" public="false">
            <argument type="service">
                <service class="Symfony\Component\Cache\Adapter\PhpArrayAdapter">
                    <factory class="Symfony\Component\Cache\Adapter\PhpArrayAdapter" method="create" />
                    <argument>%kernel.cache_dir%/annotations.php</argument>
                    <argument type="service" id="cache.annotations" />
                </service>
            </argument>
        </service>

        <service id="annotation_reader" alias="annotations.reader" />
    </services>
</container>


text:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
	package="com.dailystudio.test"
	android:versionCode="1"
	android:versionName="1.0.0">

    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />

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

    <application>

        <activity android:name=".MainActivity"/>
        <activity android:name=".PermCheckActivity"
            android:label="@string/activity_title_perm_check"
            android:theme="@style/Theme.AppCompat"/>

   		<provider
            android:name="com.dailystudio.dataobject.database.DatabaseConnectivityProvider"
            android:authorities="com.dailystudio.dataobject.database" />

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

    </application>

    <instrumentation
    	android:targetPackage="com.dailystudio.test"
    	android:name="android.test.InstrumentationTestRunner" />

</manifest>


text:
#region Licence

#endregion

using System.Collections.Generic;
using Thinktecture.IdentityModel.Hawk.Core;

namespace paramore.brighter.restms.server.Adapters.Security
{
    internal class CredentialStore : IAmACredentialStore
    {
        private List<Credential> _credentials = new List<Credential>();

        #region Implementation of IAmACredentialStore

        public void Add(Credential credential)
        {
            _credentials.Add(credential);
        }

        public IEnumerable<Credential> Credentials
        {
            get { return _credentials; }
        }

        #endregion
    }

    internal interface IAmACredentialStore
    {
        void Add(Credential credential);
        IEnumerable<Credential> Credentials { get; }
    }
}


text:
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;

// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.

// Disabled code signing as that would make the assembly impostor the unmodified version of MiscUtils
// and not this one.

[assembly: InternalsVisibleTo("MiscUtil.UnitTests")]
[assembly: AssemblyTitle("MiscUtil")]
[assembly: AssemblyDescription("Miscellaneous Utility Library")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("MiscUtil")]
[assembly: AssemblyCopyright("Copyright ©  2006")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]

// Setting ComVisible to false makes the types in this assembly not visible
// to COM components.  If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(false)]

// The following GUID is for the ID of the typelib if this project is exposed to COM
[assembly: Guid("90fc96ca-4f38-453f-a805-720f3dbf2f08")]

// Version information for an assembly consists of the following four values:
//
//      Major Version
//      Minor Version
//      Build Number
//      Revision
//
// You can specify all the values or you can default the Revision and Build Numbers
// by using the '*' as shown below:
[assembly: AssemblyVersion("1.0.0.0")]
// This is filled in automatically with the revision number from buildkit.build
[assembly: AssemblyFileVersion("1.0.0.285")]


text:
from os import makedirs, rmdir, rename, remove
from os.path import dirname, abspath, join, expanduser, exists
import numpy as np
import numpy.testing as npt
import unittest
import nibabel as nib
from dipy.core.gradients import gradient_table
from dipy.data import fetch_isbi2013_2shell
from dipy.core.gradients import GradientTable
from diGP.preprocessing import (readHCP,
                                averageb0Volumes,
                                crop_using_mask,
                                createBrainMaskFromb0Data,
                                normalize_data,
                                replaceNegativeData)

class TestReadHCP(unittest.TestCase):

    def test_returnsCorrect(self):
        homeDirectory = expanduser('~')
        dataDirectory = join(homeDirectory, '.dipy', 'isbi2013')

        if not exists(dataDirectory):
            fetch_isbi2013_2shell()

            oldFileNamebval = join(dataDirectory, 'phantom64.bval')
            newFileNamebval = join(dataDirectory, 'bvals.txt')
            rename(oldFileNamebval, newFileNamebval)

            oldFileNamebvecs = join(dataDirectory, 'phantom64.bvec')
            newFileNamebvecs = join(dataDirectory, 'bvecs_moco_norm.txt')
            rename(oldFileNamebvecs, newFileNamebvecs)

            oldFileNameData = join(dataDirectory, 'phantom64.nii.gz')
            newDataDirectory = join(dataDirectory, 'mri')
            makedirs(newDataDirectory)
            newFileNameData = join(newDataDirectory, 'diff_preproc.nii.gz')
            rename(oldFileNameData, newFileNameData)

        gtab, data, voxelSize = readHCP(dataDirectory)
        self.assertIsInstance(gtab, GradientTable)
        self.assertEqual(gtab.bvals.shape, np.array([64, ]))
        self.assertTrue(np.allclose(np.unique(np.round(gtab.bvals)),
                                    np.array([0., 1500., 2500.])))
        self.assertTrue(np.array_equal(gtab.bvecs.shape, np.array([64, 3])))
        self.assertEqual(voxelSize, (1.5, 1.5, 1.5))

        normOfbvecs = np.sum(gtab.bvecs ** 2, 1)
        self.assertTrue(np.allclose(normOfbvecs[np.invert(gtab.b0s_mask)], 1.))

        smallDelta = 12.9
        bigDelta = 21.8
        tau = bigDelta-smallDelta / 3.0
        expectedqvals = np.sqrt(gtab.bvals / tau) / (2 * np.pi)
        self.assertTrue(np.allclose(gtab.qvals, expectedqvals))

        self.assertTrue(np.array_equal(data.shape, np.array([50, 50, 50, 64])))
        self.assertTrue(np.all(data >= 0))

class TestAverageb0Volumes(unittest.TestCase):

    def setUp(self):
        self.data = np.ones((4, 5, 6, 3))
        self.data[:, :, :, 1] = 3*np.ones((4, 5, 6))

    def test_averageb0Volumes(self):
        bvals = np.array([0., 0., 1000.])
        bvecs = np.array([[1., 0., 0.], [0., 1., 0], [0., 0., 1.]])
        gtab = gradient_table(bvals, bvecs)

        averagedVolume = averageb0Volumes(self.data, gtab)
        npt.assert_array_almost_equal(averagedVolume, 2*np.ones((4, 5, 6)))

    def test_with_single_bval(self):
        bvals = np.array([1000., 0., 1000.])
        bvecs = np.array([[1., 0., 0.], [0., 1., 0], [0., 0., 1.]])
        gtab = gradient_table(bvals, bvecs)

        averagedVolume = averageb0Volumes(self.data, gtab)
        npt.assert_array_almost_equal(averagedVolume, 3*np.ones((4, 5, 6)))

class TestCreateBrainMask(unittest.TestCase):
    dataDirectory = None
    b0Data = np.array([0])
    affine = np.eye(4)

    def setUp(self):
        homeDirectory = expanduser('~')
        self.dataDirectory = join(homeDirectory, '.dipy')
        self.b0Data = np.reshape(np.arange(3375), (15, 15, 15))
        self.affine = np.array([[1., 0., 0., 1.],
                                [0., 2., 0., 2.],
                                [0., 0., 3., 3.],
                                [0., 0., 0., 1.]])

    def tearDown(self):
        try:
            remove(join(self.dataDirectory, 'brainMask.nii.gz'))
        except OSError:
            pass

    def test_createBrainMaskFromb0Data(self):
        brainMask = createBrainMaskFromb0Data(self.b0Data)[1]
        self.assertTrue(np.array_equal(brainMask.shape, self.b0Data.shape))
        # Want to test that brainMask is boolean, but couldn't find a built-in
        # function
        dataIsTrueOrFalse = np.logical_or(brainMask == 0, brainMask == 1)
        self.assertTrue(np.array_equal(dataIsTrueOrFalse,
                                       np.ones(brainMask.shape)))
        self.assertTrue(np.all(self.b0Data[brainMask == 1] > 0))

    def test_saveAndLoadBrainMask(self):
        brainMask = createBrainMaskFromb0Data(self.b0Data,
                                              affineMatrix=self.affine,
                                              saveDir=self.dataDirectory)[1]
        loadedBrainMaskNifti = nib.load(join(self.dataDirectory,
                                             'brainMask.nii.gz'))
        self.assertTrue(np.allclose(brainMask,
                                    loadedBrainMaskNifti.get_data()))
        self.assertTrue(np.allclose(loadedBrainMaskNifti.affine, self.affine))

class TestCroppin(unittest.TestCase):
    def setUp(self):
        self.data = np.arange(9).reshape(3, 3, 1)
        self.mask = np.zeros_like(self.data)
        self.mask[1, 1, 0] = 1

    def test_crop_using_mask(self):
        expected_result = self.data[1, 1, 0]
        result = crop_using_mask(self.data, self.mask)
        npt.assert_array_almost_equal(result, expected_result)

class TestNormalizeData(unittest.TestCase):
    def setUp(self):
        L = 5
        self.L = L
        self.b0 = np.arange(L ** 3).reshape(L, L, L)
        self.data = np.stack((self.b0, 0.5*self.b0, 0.2*self.b0), axis=-1)
        self.mask = np.zeros_like(self.b0)
        self.mask[np.logical_and(self.b0 >= 0.3 * (L ** 3),
                                 self.b0 <= 0.7 * (L ** 3))] = 1

    def test_normalize_data(self):
        normalized = normalize_data(self.data, self.b0, self.mask)
        expected = np.ones_like(self.data)
        expected[:, :, :, 1] = 0.5
        expected[:, :, :, 2] = 0.2
        expected[np.logical_or(self.b0 < 0.3 * (self.L ** 3),
                               self.b0 > 0.7 * (self.L ** 3))] = 0

        npt.assert_array_almost_equal(normalized, expected)

class TestReplaceNegativeData(unittest.TestCase):

    def setUp(self):
        bvals = np.array([0., 0., 0., 1000.])
        bvecs = np.array([[1., 0., 0.],
                          [0., 1., 0],
                          [0., 0., 1.],
                          [0., 0., 1.]])
        self.gtab = gradient_table(bvals, bvecs)

    def test_replaceNegativeData(self):
        data = np.ones((2, 2, 1, 4))
        data[:, :, :, 1] = -2*np.ones((2, 2, 1))
        data[:, :, :, 3] = -3*np.ones((2, 2, 1))

        processedData = replaceNegativeData(data, self.gtab)

        expectedProcessedData = np.ones((2, 2, 1, 4))
        expectedProcessedData[:, :, :, 1] = 2/3*np.ones((2, 2, 1))
        expectedProcessedData[:, :, :, 3] = np.zeros((2, 2, 1))

        npt.assert_allclose(processedData, expectedProcessedData)

def main():
    unittest.main()

if __name__ == '__main__':
    main()


text:
module.exports = function (server) {
  const Candidate = server.plugins['hapi-shelf'].model('Candidate')
  const SurveyAnswer = server.plugins['hapi-shelf'].model('SurveyAnswer')

  function getCategoryAnswers(surveyResponseId, callback)
  {
    SurveyAnswer
    .query(function(answer_builder) {
      answer_builder.column('candidate_answer.candidate_id')
      answer_builder.column('question.category_id')
      answer_builder.column('question.id as question_id')
      answer_builder.column('question.question_text')
      answer_builder.column('a2.id as candidate_answer_id')
      answer_builder.column('a2.answer_label as candidate_answer_label')
      answer_builder.column('a1.id as voter_answer_id')
      answer_builder.column('a1.answer_label as voter_answer_text')
      answer_builder.innerJoin('answer as a1', 'survey_answer.answer_id', 'a1.id')
      answer_builder.innerJoin('question', 'survey_answer.question_id', 'question.id')
      answer_builder.innerJoin('answer as a2', 'question.id', 'a2.question_id')
      answer_builder.innerJoin('candidate_answer', 'a2.id', 'candidate_answer.answer_id')
      answer_builder.where('survey_answer.survey_response_id', surveyResponseId)
    })
    .fetchAll()
    .then(answers => {
      callback(answers)
    })
  }

  function getCategoryScores(surveyResponseId, callback)
  {
    var score_raw = 'round((sum(cast(survey_answer.intensity as numeric(3,2)))) / cat_scores.score * 100) as category_score'

    SurveyAnswer
    .query(function(cat_builder) {
      cat_builder.column('candidate_answer.candidate_id')
      cat_builder.column('category.id as category_id')
      cat_builder.column('category.category_name')
      cat_builder.column(server.plugins['hapi-shelf'].knex.raw(score_raw))
      cat_builder.innerJoin('question', 'survey_answer.question_id', 'question.id')
      cat_builder.innerJoin('category', 'question.category_id', 'category.id')
      cat_builder.innerJoin('survey_response', 'survey_answer.survey_response_id', 'survey_response.id')
      cat_builder.innerJoin('candidate_answer', 'survey_answer.answer_id', 'candidate_answer.answer_id')
      cat_builder.innerJoin('candidate_geography', function() {
        this.on('candidate_answer.candidate_id', '=', 'candidate_geography.candidate_id')
        .andOn('candidate_geography.geography_id', '=', 'survey_response.geography_id')
      })
      cat_builder.innerJoin('candidate', 'candidate_answer.candidate_id', 'candidate.id')
      cat_builder.join(server.plugins['hapi-shelf'].knex.raw(" \
      (select question.category_id, category.category_name, sum(sa.intensity) as score \
       from survey_answer sa \
       inner join question on sa.question_id = question.id \
       inner join category on question.category_id = category.id \
       where sa.survey_response_id = " + surveyResponseId + " \
       group by question.category_id, category.category_name) as cat_scores on category.id = cat_scores.category_id"))
      cat_builder.where('survey_response.id', surveyResponseId)
      cat_builder.groupBy('candidate_answer.candidate_id', 'category.id', 'category.category_name', 'cat_scores.score')
    })
    .fetchAll()
    .then(categories => {
      callback(categories)
    })
  }

  function formatCandidateMatch(matchArray, categoryArray, answerArray) {
    var output = {}
    output.id = matchArray[0].attributes.surveyId
    output.geographyId = matchArray[0].attributes.geographyId

    output.survey = []

    matchArray.map(function(match) {
      var typeIndex = output.survey.findIndex(type =>
        type.candidateTypeName === match.attributes.typeName)

      var catIndex = -1
      var answerIndex = -1

      if(typeIndex === -1)
      {
        typeIndex = output.survey.push({
          candidateTypeId: match.attributes.typeId,
          candidateTypeName: match.attributes.typeName,
          candidates: [{
            candidateId: match.attributes.candidateId,
            candidateName: match.attributes.candidateName,
            compositeMatchScore: match.attributes.compositeScore,
            categoryMatchScores: []
          }]
        })-1

        categoryArray.map(function(category) {
          if (match.attributes.candidateId === category.attributes.candidateId)
          {
            catIndex = output.survey[typeIndex].candidates[0].categoryMatchScores.findIndex(candCat =>
            candCat.categoryId === category.attributes.categoryId)

            if (catIndex === -1)
            {
              catIndex = output.survey[typeIndex].candidates[0].categoryMatchScores.push({
                categoryId: category.attributes.categoryId,
                categoryName: category.attributes.categoryName,
                categoryMatch: category.attributes.categoryScore,
                questions: []
              })-1
            }

            answerArray.map(function(answer) {
              if(match.attributes.candidateId === answer.attributes.candidateId
              && category.attributes.categoryId === answer.attributes.categoryId)
              {
                output.survey[typeIndex].candidates[0].categoryMatchScores[catIndex].questions.push({
                  questionId: answer.attributes.questionId,
                  questionText: answer.attributes.questionText,
                  candidateAnswerId: answer.attributes.candidateAnswerId,
                  candidateAnswerLabel: answer.attributes.candidateAnswerLabel,
                  voterAnswerId: answer.attributes.voterAnswerId,
                  voterAnswerText: answer.attributes.voterAnswerText
                })
              }
            })
          }
        })
      } else {
        var candIndex = output.survey[typeIndex].candidates.findIndex(cand =>
          cand.candidateId === match.attributes.candidateId)

        if (candIndex === -1)
        {
          candIndex = output.survey[typeIndex].candidates.push({
            candidateId: match.attributes.candidateId,
            candidateName: match.attributes.candidateName,
            compositeMatchScore: match.attributes.compositeScore,
            categoryMatchScores: []
          })-1

          categoryArray.map(function(category) {
            if (match.attributes.candidateId === category.attributes.candidateId)
            {
              catIndex = output.survey[typeIndex].candidates[candIndex].categoryMatchScores.findIndex(candCat =>
              candCat.categoryId === category.attributes.categoryId)

              if (catIndex === -1)
              {
                catIndex = output.survey[typeIndex].candidates[candIndex].categoryMatchScores.push({
                  categoryId: category.attributes.categoryId,
                  categoryName: category.attributes.categoryName,
                  categoryMatch: category.attributes.categoryScore,
                  questions: []
                })-1
              }

              answerArray.map(function(answer) {
                if(match.attributes.candidateId === answer.attributes.candidateId
                && category.attributes.categoryId === answer.attributes.categoryId)
                {
                  output.survey[typeIndex].candidates[candIndex].categoryMatchScores[catIndex].questions.push({
                    questionId: answer.attributes.questionId,
                    questionText: answer.attributes.questionText,
                    candidateAnswerId: answer.attributes.candidateAnswerId,
                    candidateAnswerLabel: answer.attributes.candidateAnswerLabel,
                    voterAnswerId: answer.attributes.voterAnswerId,
                    voterAnswerText: answer.attributes.voterAnswerText
                  })
                }
              })
            }
          })
        }
      }
    })

    return(output)
  }

  return [{
    method: 'GET',
    path: '/api/candidate',
    handler: (request, reply) => {
      Candidate
        .fetchAll()
        .then(candidates => {
          reply(candidates)
        })
    }
  },
  {
    method: 'GET',
    path: '/api/candidate/{id}',
    handler: (request, reply) => {
      Candidate
        .where({id: request.params.id})
        .fetch()
        .then(candidate => {
          reply(candidate)
        })
    }
  },
  {
    method: 'GET',
    path: '/api/candidate_match/{survey_response_id}',
    handler: (request, reply) => {
      SurveyAnswer
      .query(function(score_builder) {
        score_builder.sum('intensity as score');
        score_builder.where('survey_response_id', request.params.survey_response_id)
      })
      .fetch()
      .then(function(total) {
        var score_raw = 'round((sum(cast(survey_answer.intensity as numeric(3,2))) / '
        + total.attributes.score + ') * 100) as composite_score'

        SurveyAnswer
        .query(function(match_builder) {
          match_builder.column('survey_response.id as survey_id', 'survey_response.geography_id')
          match_builder.column('candidate_answer.candidate_id', 'candidate.candidate_name')
          match_builder.column('candidate_type.id as type_id', 'candidate_type.type_name')
          match_builder.column(server.plugins['hapi-shelf'].knex.raw(score_raw))
          match_builder.innerJoin('survey_response', 'survey_answer.survey_response_id', 'survey_response.id')
          match_builder.innerJoin('candidate_answer', 'survey_answer.answer_id', 'candidate_answer.answer_id')
          match_builder.innerJoin('candidate_geography', function() {
            this.on('candidate_answer.candidate_id', '=', 'candidate_geography.candidate_id')
            .andOn('candidate_geography.geography_id', '=', 'survey_response.geography_id')
          })
          match_builder.innerJoin('candidate', 'candidate_answer.candidate_id', 'candidate.id')
          match_builder.innerJoin('candidate_type', 'candidate.candidate_type_id', 'candidate_type.id')
          match_builder.where('survey_response.id', request.params.survey_response_id)
          match_builder.groupBy('survey_response.id', 'survey_response.geography_id'
          , 'candidate_answer.candidate_id', 'candidate.candidate_name'
          , 'candidate_type.id', 'candidate_type.type_name')
        })
        .fetchAll()
        .then(matches => {
          getCategoryScores(request.params.survey_response_id, function(categories) {
            getCategoryAnswers(request.params.survey_response_id, function(answers) {
              reply(formatCandidateMatch(matches.models, categories.models, answers.models))
            })
          })
        })
      })
    }
  }]
}


text:
package com.vertica.hadoop;

public class Relation {
	private String table = null;
	private String schema = null;
	private String database = null;
	private boolean defSchema = false;

	public Relation(String name) {
		if (name == null) return;

		String[] splut = name.split("\\.");

		if (splut.length == 3) {
			database = splut[0];
			schema = splut[1];
			table = splut[2];
		} else if (splut.length == 2) {
			schema = splut[0];
			table = splut[1];
		} else if (splut.length == 1) {
			defSchema = true;
			schema = "public";
			table = splut[0];
		}
	}

	public boolean isNull() {
		return table == null;
	}

	public boolean isDefaultSchema() {
		return defSchema;
	}

	public String getDatabase() {
		return database;
	}

	public String getSchema() {
		return schema;
	}

	public String getTable() {
		return table;
	}

	public StringBuilder getQualifiedName() {
		StringBuilder sb = new StringBuilder();
		if (database != null) {
			sb.append(database);
			sb.append('.');
		}

		sb.append(schema);
		sb.append('.');
		sb.append(table);

		return sb;
	}
}


text:
from __future__ import unicode_literals

# ====================================================
# Django settings file to run our automated tests with
# ====================================================

SECRET_KEY = 'dummy_key'

INSTALLED_APPS = [
    # Built-in apps
    'django.contrib.auth',
    'django.contrib.contenttypes',

    # Internal apps
    'states',
]

DATABASES = {
    'default': {
        'ENGINE': 'django.db.backends.sqlite3',
    }
}


text:
using System;

namespace OpenMetaverse
{

	public class Voxel
	{
		public uint X;
		public uint Y;
		public uint Z;
		public uint MaterialID;
		public Voxel ()
		{
		}

		public Voxel(uint x,uint y,uint z,uint m)
		{
			X=x;
			Y=y;
			Z=z;
			MaterialID=m;
		}

		public Voxel(byte[] bytes, int pos)
		{
			FromBytes(bytes,pos);
		}
		public void FromBytes(byte[] bytes, int pos)
		{
			if (!BitConverter.IsLittleEndian)
            {
                // Big endian architecture
                byte[] conversionBuffer = new byte[16];

                Buffer.BlockCopy(bytes, pos, conversionBuffer, 0, 16);

                Array.Reverse(conversionBuffer, 0, 4);
                Array.Reverse(conversionBuffer, 4, 4);
                Array.Reverse(conversionBuffer, 8, 4);
                Array.Reverse(conversionBuffer, 12, 4);

                X = BitConverter.ToUInt32(conversionBuffer, 0);
                Y = BitConverter.ToUInt32(conversionBuffer, 4);
                Z = BitConverter.ToUInt32(conversionBuffer, 8);
                MaterialID = BitConverter.ToUInt32(conversionBuffer, 12);
            }
            else
            {
                // Little endian architecture
                X = BitConverter.ToUInt32(bytes, pos);
                Y = BitConverter.ToUInt32(bytes, pos + 4);
                Z = BitConverter.ToUInt32(bytes, pos + 8);
                MaterialID = BitConverter.ToUInt32(bytes, pos + 12);
            }
		}

		public void ToBytes(byte[] dest,int pos)
		{
			Buffer.BlockCopy(BitConverter.GetBytes(X), 			0, dest, pos + 0, 4);
            Buffer.BlockCopy(BitConverter.GetBytes(Y), 			0, dest, pos + 4, 4);
            Buffer.BlockCopy(BitConverter.GetBytes(Z), 			0, dest, pos + 8, 4);
            Buffer.BlockCopy(BitConverter.GetBytes(MaterialID),	0, dest, pos + 12, 4);

            if (!BitConverter.IsLittleEndian)
            {
                Array.Reverse(dest, pos + 0, 4);
                Array.Reverse(dest, pos + 4, 4);
                Array.Reverse(dest, pos + 8, 4);
                Array.Reverse(dest, pos + 12, 4);
            }
		}

		public byte[] GetBytes()
		{
			byte[] b = new byte[16];
			FromBytes(b,0);
			return b;
		}
	}
}


text:
+++
pre = "<b>6. </b>"
title = "Downloads"
weight = 6
chapter = true

extracss = true

+++

## Latest Releases

ElasticJob is released as source code tarballs with corresponding binary tarballs for convenience.
The downloads are distributed via mirror sites and should be checked for tampering using GPG or SHA-512.

##### ElasticJob - Version: 3.0.0-RC1 ( Release Date: Dec 25, 2020 )

- Source Codes: [ [SRC](https://www.apache.org/dyn/closer.cgi/shardingsphere/elasticjob-3.0.0-RC1/apache-shardingsphere-elasticjob-3.0.0-RC1-src.zip) ] [ [ASC](https://downloads.apache.org/shardingsphere/elasticjob-3.0.0-RC1/apache-shardingsphere-elasticjob-3.0.0-RC1-src.zip.asc) ] [ [SHA512](https://downloads.apache.org/shardingsphere/elasticjob-3.0.0-RC1/apache-shardingsphere-elasticjob-3.0.0-RC1-src.zip.sha512) ]
- ElasticJob-Lite Binary Distribution: [ [TAR](https://www.apache.org/dyn/closer.cgi/shardingsphere/elasticjob-3.0.0-RC1/apache-shardingsphere-elasticjob-3.0.0-RC1-lite-bin.tar.gz) ] [ [ASC](https://downloads.apache.org/shardingsphere/elasticjob-3.0.0-RC1/apache-shardingsphere-elasticjob-3.0.0-RC1-lite-bin.tar.gz.asc) ] [ [SHA512](https://downloads.apache.org/shardingsphere/elasticjob-3.0.0-RC1/apache-shardingsphere-elasticjob-3.0.0-RC1-lite-bin.tar.gz.sha512) ]
- ElasticJob-Cloud-Scheduler Binary Distribution: [ [TAR](https://www.apache.org/dyn/closer.cgi/shardingsphere/elasticjob-3.0.0-RC1/apache-shardingsphere-elasticjob-3.0.0-RC1-cloud-scheduler-bin.tar.gz) ] [ [ASC](https://downloads.apache.org/shardingsphere/elasticjob-3.0.0-RC1/apache-shardingsphere-elasticjob-3.0.0-RC1-cloud-scheduler-bin.tar.gz.asc) ] [ [SHA512](https://downloads.apache.org/shardingsphere/elasticjob-3.0.0-RC1/apache-shardingsphere-elasticjob-3.0.0-RC1-cloud-scheduler-bin.tar.gz.sha512) ]
- ElasticJob-Cloud-Executor Binary Distribution: [ [TAR](https://www.apache.org/dyn/closer.cgi/shardingsphere/elasticjob-3.0.0-RC1/apache-shardingsphere-elasticjob-3.0.0-RC1-cloud-executor-bin.tar.gz) ] [ [ASC](https://downloads.apache.org/shardingsphere/elasticjob-3.0.0-RC1/apache-shardingsphere-elasticjob-3.0.0-RC1-cloud-executor-bin.tar.gz.asc) ] [ [SHA512](https://downloads.apache.org/shardingsphere/elasticjob-3.0.0-RC1/apache-shardingsphere-elasticjob-3.0.0-RC1-cloud-executor-bin.tar.gz.sha512) ]

##### ElasticJob-UI - Version: 3.0.0-RC1 ( Release Date: Dec 31, 2020 )

- Source Codes: [ [SRC](https://www.apache.org/dyn/closer.cgi/shardingsphere/elasticjob-ui-3.0.0-RC1/apache-shardingsphere-elasticjob-3.0.0-RC1-ui-src.zip) ] [ [ASC](https://downloads.apache.org/shardingsphere/elasticjob-ui-3.0.0-RC1/apache-shardingsphere-elasticjob-3.0.0-RC1-ui-src.zip.asc) ] [ [SHA512](https://downloads.apache.org/shardingsphere/elasticjob-ui-3.0.0-RC1/apache-shardingsphere-elasticjob-3.0.0-RC1-ui-src.zip.sha512) ]
- ElasticJob-Lite-UI Binary Distribution: [ [TAR](https://www.apache.org/dyn/closer.cgi/shardingsphere/elasticjob-ui-3.0.0-RC1/apache-shardingsphere-elasticjob-3.0.0-RC1-lite-ui-bin.tar.gz) ] [ [ASC](https://downloads.apache.org/shardingsphere/elasticjob-ui-3.0.0-RC1/apache-shardingsphere-elasticjob-3.0.0-RC1-lite-ui-bin.tar.gz.asc) ] [ [SHA512](https://downloads.apache.org/shardingsphere/elasticjob-ui-3.0.0-RC1/apache-shardingsphere-elasticjob-3.0.0-RC1-lite-ui-bin.tar.gz.sha512) ]
- ElasticJob-Cloud-UI Binary Distribution: [ [TAR](https://www.apache.org/dyn/closer.cgi/shardingsphere/elasticjob-ui-3.0.0-RC1/apache-shardingsphere-elasticjob-3.0.0-RC1-cloud-ui-bin.tar.gz) ] [ [ASC](https://downloads.apache.org/shardingsphere/elasticjob-ui-3.0.0-RC1/apache-shardingsphere-elasticjob-3.0.0-RC1-cloud-ui-bin.tar.gz.asc) ] [ [SHA512](https://downloads.apache.org/shardingsphere/elasticjob-ui-3.0.0-RC1/apache-shardingsphere-elasticjob-3.0.0-RC1-cloud-ui-bin.tar.gz.sha512) ]

## All Releases

Find all releases in the [Archive repository](https://archive.apache.org/dist/shardingsphere/).

## Verify the Releases

[PGP signatures KEYS](https://downloads.apache.org/shardingsphere/KEYS)

It is essential that you verify the integrity of the downloaded files using the PGP or SHA signatures.
The PGP signatures can be verified using GPG or PGP. Please download the KEYS as well as the asc signature files for relevant distribution.
It is recommended to get these files from the main distribution directory and not from the mirrors.

```shell
gpg -i KEYS
```

or

```shell
pgpk -a KEYS
```

or

```shell
pgp -ka KEYS
```

To verify the binaries/sources you can download the relevant asc files for it from main distribution directory and follow the below guide.

```shell
gpg --verify apache-shardingsphere-********.asc apache-shardingsphere-elasticjob-*********
```

or

```shell
pgpv apache-shardingsphere-elasticjob-********.asc
```

or

```shell
pgp apache-shardingsphere-elasticjob-********.asc
```


text:
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2007 The Android Open Source Project

     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.
-->
<view xmlns:android="http://schemas.android.com/apk/res/android"
    class="com.example.android.notepad.NoteEditor$LinedEditText"
    android:id="@+id/note"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    android:background="@android:color/transparent"
    android:padding="5dp"
    android:scrollbars="vertical"
    android:fadingEdge="vertical"
    android:gravity="top"
    android:textSize="22sp"
    android:capitalize="sentences" />