text:
using System;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.HtmlControls;
using CodeTorch.Core;
using CodeTorch.Web.Templates;

namespace CodeTorch.Web.SectionControls
{
    public class ButtonListSectionControl : BaseSectionControl
    {

        System.Web.UI.WebControls.PlaceHolder ListHolder;
        BasePage page;

        ButtonListSection _Me = null;
        public ButtonListSection Me
        {
            get
            {
                if ((_Me == null) && (this.Section != null) && (this.Section is ButtonListSection))
                {
                    _Me = (ButtonListSection)this.Section;
                }
                return _Me;
            }
        }

        public override void RenderControl()
        {
            page = HttpContext.Current.Handler as BasePage;
            base.RenderControl();

            ListHolder = new PlaceHolder();
            this.ContentPlaceHolder.Controls.Add(ListHolder);

            RenderList();

        }

        public override void PopulateControl()
        {
            base.PopulateControl();

        }

        private void RenderList()
        {
            ListHolder.Controls.Clear();

            if (String.IsNullOrEmpty(Me.SelectDataCommand))
            {

                HtmlGenericControl container = null;

                if(!String.IsNullOrEmpty(Me.ContainerElement))
                {
                    container = new HtmlGenericControl(Me.ContainerElement); ;
                }

                foreach (var button in Me.Buttons)
                {

                    RenderButton(container, button);
                }

                if (container != null)
                {
                    ListHolder.Controls.Add(container);
                }

            }
            else
            {
                //render list from db
            }

        }

        public void RenderButton(HtmlGenericControl container, ButtonControl button)
        {
            bool RenderItem = button.Visible;

            if ((button.VisiblePermission != null) && (button.VisiblePermission.CheckPermission))
            {
                RenderItem = Common.HasPermission(button.VisiblePermission.Name);
            }

            if (RenderItem)
            {

                string ResourcePrefix = String.Format("Screen.Sections.{0}.Buttons.{1}", this.Section.Name, button.Name);

                System.Web.UI.WebControls.Button b = new System.Web.UI.WebControls.Button();
                b.ID = button.Name;
                b.Text = GetGlobalResourceString(
                    String.Format("{0}.Text", ResourcePrefix),
                    button.Text);
                b.CausesValidation = button.CausesValidation;
                b.OnClientClick = button.OnClientClick;
                b.CommandName = button.CommandName;
                b.CommandArgument = button.CommandArgument;
                b.CssClass = button.CssClass;

                b.Click += button_Click;

                LiteralControl spacer = new LiteralControl();
                spacer.Text = " ";

                HtmlGenericControl item = null;

                if (!String.IsNullOrEmpty(Me.ItemElement))
                {
                    item = new HtmlGenericControl(Me.ItemElement);

                }

                if (container == null)
                {
                    if (item == null)
                    {
                        //neither - eg button button button
                        ListHolder.Controls.Add(b);
                        ListHolder.Controls.Add(spacer);
                    }
                    else
                    {
                        //only item exists - eg div button div button div button
                        item.Controls.Add(b);
                        item.Controls.Add(spacer);
                        ListHolder.Controls.Add(item);
                    }
                }
                else
                {
                    if (item == null)
                    {
                        //container exists but not child - eg div button button
                        container.Controls.Add(b);
                        container.Controls.Add(spacer);
                    }
                    else
                    {
                        //bth exists - eg ul li button li button
                        item.Controls.Add(b);
                        item.Controls.Add(spacer);
                        container.Controls.Add(item);
                    }
                }

            }
        }

        void button_Click(object sender, EventArgs e)
        {
            log4net.ILog log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);

            try
            {
                //find specified button by name

                string buttonID = ((System.Web.UI.WebControls.Button)sender).ID;

                CodeTorch.Core.ButtonControl button = Me.Buttons.Where(x => x.Name?.ToLower() == buttonID?.ToLower()).SingleOrDefault();

                if (button != null)
                {
                    //button was found...so call any commands it may have tied to this action

                    ActionRunner runner = new ActionRunner();
                    Core.Action action = ObjectCopier.Clone<Core.Action>(button.OnClick);

                    if (action != null)
                    {
                        runner.Page = (BasePage)this.Page;
                        runner.Action = action;
                        runner.Execute();
                    }

                }
                else
                {
                    throw new Exception($"Could not find button '{buttonID}' in {Me.Name} Section - unable to invoke click actions. Please check button names are set in configuration.");
                }
            }
            catch (Exception ex)
            {
                log.Error(ex);
                page.DisplayErrorAlert(ex);

            }

        }

    }
}


text:
namespace boost {

enum two_bit_color_type {
  two_bit_white = 0,
  two_bit_gray  = 1,
  two_bit_green = 2,
  two_bit_black = 3
};

template <>
struct color_traits<two_bit_color_type>
{
  static two_bit_color_type white() { return two_bit_white; }
  static two_bit_color_type gray()  { return two_bit_gray; }
  static two_bit_color_type green() { return two_bit_green; }
  static two_bit_color_type black() { return two_bit_black; }
};

template<typename IndexMap = identity_property_map>
struct two_bit_color_map
{
  std::size_t n;
  IndexMap index;
  shared_array<unsigned char> data;

  typedef typename property_traits<IndexMap>::key_type key_type;
  typedef two_bit_color_type value_type;
  typedef void reference;
  typedef read_write_property_map_tag category;

  explicit two_bit_color_map(std::size_t n, const IndexMap& index = IndexMap())
    : n(n), index(index), data(new unsigned char[(n + 3) / 4])
  {
    // Fill to white
    std::fill(data.get(), data.get() + (n + 3) / 4, 0);
  }
};

template<typename IndexMap>
inline two_bit_color_type
get(const two_bit_color_map<IndexMap>& pm,
    typename two_bit_color_map<IndexMap>::key_type key)
{
  typename property_traits<IndexMap>::value_type i = get(pm.index, key);
  assert ((std::size_t)i < pm.n);
  return two_bit_color_type((pm.data.get()[i / 4] >> ((i % 4) * 2)) & 3);
}

template<typename IndexMap>
inline void
put(const two_bit_color_map<IndexMap>& pm,
    typename two_bit_color_map<IndexMap>::key_type key,
    two_bit_color_type value)
{
  typename property_traits<IndexMap>::value_type i = get(pm.index, key);
  assert ((std::size_t)i < pm.n);
  assert (value >= 0 && value < 4);
  std::size_t byte_num = i / 4;
  std::size_t bit_position = ((i % 4) * 2);
    pm.data.get()[byte_num] =
      (unsigned char)
        ((pm.data.get()[byte_num] & ~(3 << bit_position))
         | (value << bit_position));
}

template<typename IndexMap>
inline two_bit_color_map<IndexMap>
make_two_bit_color_map(std::size_t n, const IndexMap& index_map)
{
  return two_bit_color_map<IndexMap>(n, index_map);
}

} // end namespace boost

#endif // BOOST_TWO_BIT_COLOR_MAP_HPP

#ifdef BOOST_GRAPH_USE_MPI
#  include <boost/graph/distributed/two_bit_color_map.hpp>
#endif

redpajama_set_name: RedPajamaGithub


text:
using System.Collections.Generic;

namespace NBitcoin
{
    /// <summary>
    /// Compact representation of one's chain position which can be used to find forks with another chain.
    /// </summary>
    public class BlockLocator : IBitcoinSerializable
    {
        /// <summary>Maximum number of block hashes in the locator that we will accept in a message from a peer.</summary>
        /// <seealso cref="https://lists.linuxfoundation.org/pipermail/bitcoin-dev/2018-August/016285.html"/>
        /// <seealso cref="https://github.com/bitcoin/bitcoin/pull/13907"/>
        public const int MaxLocatorSize = 101;

        public BlockLocator()
        {
        }

        private List<uint256> blocks = new List<uint256>();
        public List<uint256> Blocks { get { return this.blocks; } set { this.blocks = value; } }

        /// <inheritdoc />
        public override string ToString()
        {
            return $"{nameof(this.Blocks)}.{nameof(this.Blocks.Count)}={this.Blocks.Count}";
        }

        #region IBitcoinSerializable Members

        public void ReadWrite(BitcoinStream stream)
        {
            stream.ReadWrite(ref this.blocks);
        }

        #endregion
    }
}


text:
Form.NestedForm = Form.extend({

  template: _.template('\
    <span data-fieldsets></span>\
  ', null, Form.templateSettings)

});


text:
package org.apache.hadoop.mapred;

import java.io.File;
import java.io.IOException;
import java.net.InetSocketAddress;
import java.util.List;
import java.util.Map;

import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.fs.FileSystem;
import org.apache.hadoop.fs.FileUtil;
import org.apache.hadoop.fs.LocalDirAllocator;
import org.apache.hadoop.fs.Path;
import org.apache.hadoop.mapreduce.JobID;
import org.apache.hadoop.mapreduce.server.tasktracker.JVMInfo;
import org.apache.hadoop.mapreduce.server.tasktracker.Localizer;
import org.apache.hadoop.util.ProcessTree.Signal;
import org.apache.hadoop.util.ProcessTree;
import org.apache.hadoop.util.StringUtils;
import org.apache.hadoop.util.Shell.ShellCommandExecutor;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;

/**
 * The default implementation for controlling tasks.
 *
 * This class provides an implementation for launching and killing
 * tasks that need to be run as the tasktracker itself. Hence,
 * many of the initializing or cleanup methods are not required here.
 *
 *

 *
 *  NOTE: This class is internal only class and not intended for users!!
 */
public class DefaultTaskController extends TaskController {

  private static final Log LOG =
      LogFactory.getLog(DefaultTaskController.class);
  private FileSystem fs;
  @Override
  public void setConf(Configuration conf) {
    super.setConf(conf);
    try {
      fs = FileSystem.getLocal(conf).getRaw();
    } catch (IOException ie) {
      throw new RuntimeException("Failed getting LocalFileSystem", ie);
    }
  }

  /**
   * Create all of the directories for the task and launches the child jvm.
   * @param user the user name
   * @param attemptId the attempt id
   * @throws IOException
   */
  @Override
  public int launchTask(String user,
                                  String jobId,
                                  String attemptId,
                                  List<String> setup,
                                  List<String> jvmArguments,
                                  File currentWorkDirectory,
                                  String stdout,
                                  String stderr) throws IOException {

    ShellCommandExecutor shExec = null;
    try {
      FileSystem localFs = FileSystem.getLocal(getConf());

      //create the attempt dirs
      new Localizer(localFs,
          getConf().getStrings(JobConf.MAPRED_LOCAL_DIR_PROPERTY)).
          initializeAttemptDirs(user, jobId, attemptId);

      // create the working-directory of the task
      if (!currentWorkDirectory.mkdir()) {
        throw new IOException("Mkdirs failed to create "
                    + currentWorkDirectory.toString());
      }

      //mkdir the loglocation
      String logLocation = TaskLog.getAttemptDir(jobId, attemptId).toString();
      if (!localFs.mkdirs(new Path(logLocation))) {
        throw new IOException("Mkdirs failed to create "
                   + logLocation);
      }
      //read the configuration for the job
      FileSystem rawFs = FileSystem.getLocal(getConf()).getRaw();
      long logSize = 0; //TODO: Ref BUG:2854624
      // get the JVM command line.
      String cmdLine =
        TaskLog.buildCommandLine(setup, jvmArguments,
            new File(stdout), new File(stderr), logSize, true);

      // write the command to a file in the
      // task specific cache directory
      // TODO copy to user dir
      Path p = new Path(allocator.getLocalPathForWrite(
          TaskTracker.getPrivateDirTaskScriptLocation(user, jobId, attemptId),
          getConf()), COMMAND_FILE);

      String commandFile = writeCommand(cmdLine, rawFs, p);
      rawFs.setPermission(p, TaskController.TASK_LAUNCH_SCRIPT_PERMISSION);
      shExec = new ShellCommandExecutor(new String[]{
          "bash", "-c", commandFile},
          currentWorkDirectory);
      shExec.execute();
    } catch (Exception e) {
      if (shExec == null) {
        return -1;
      }
      int exitCode = shExec.getExitCode();
      LOG.warn("Exit code from task is : " + exitCode);
      LOG.info("Output from DefaultTaskController's launchTask follows:");
      logOutput(shExec.getOutput());
      return exitCode;
    }
    return 0;
  }

  /**
   * This routine initializes the local file system for running a job.
   * Details:
   *

   *
Copies the credentials file from the TaskTracker's private space to
   * the job's private space

   *
Creates the job work directory and set
   * {@link TaskTracker#JOB_LOCAL_DIR} in the configuration

   *
Downloads the job.jar, unjars it, and updates the configuration to
   * reflect the localized path of the job.jar

   *
Creates a base JobConf in the job's private space

   *
Sets up the distributed cache

   *
Sets up the user logs directory for the job

   *

   * This method must be invoked in the access control context of the job owner
   * user. This is because the distributed cache is also setup here and the
   * access to the hdfs files requires authentication tokens in case where
   * security is enabled.
   * @param user the user in question (the job owner)
   * @param jobid the ID of the job in question
   * @param credentials the path to the credentials file that the TaskTracker
   * downloaded
   * @param jobConf the path to the job configuration file that the TaskTracker
   * downloaded
   * @param taskTracker the connection to the task tracker
   * @throws IOException
   * @throws InterruptedException
   */
  @Override
  public void initializeJob(String user, String jobid,
                            Path credentials, Path jobConf,
                            TaskUmbilicalProtocol taskTracker,
                            InetSocketAddress ttAddr
                            ) throws IOException, InterruptedException {
    final LocalDirAllocator lDirAlloc = allocator;
    FileSystem localFs = FileSystem.getLocal(getConf());
    JobLocalizer localizer = new JobLocalizer((JobConf)getConf(), user, jobid);
    localizer.createLocalDirs();
    localizer.createUserDirs();
    localizer.createJobDirs();

    JobConf jConf = new JobConf(jobConf);
    localizer.createWorkDir(jConf);
    //copy the credential file
    Path localJobTokenFile = lDirAlloc.getLocalPathForWrite(
        TaskTracker.getLocalJobTokenFile(user, jobid), getConf());
    FileUtil.copy(
        localFs, credentials, localFs, localJobTokenFile, false, getConf());

    //setup the user logs dir
    localizer.initializeJobLogDir();

    // Download the job.jar for this job from the system FS
    // setup the distributed cache
    // write job acls
    // write localized config
    localizer.localizeJobFiles(JobID.forName(jobid), jConf, localJobTokenFile,
                               taskTracker);
  }

  @Override
  public void signalTask(String user, int taskPid, Signal signal) {
    if (ProcessTree.isSetsidAvailable) {
      ProcessTree.killProcessGroup(Integer.toString(taskPid), signal);
    } else {
      ProcessTree.killProcess(Integer.toString(taskPid), signal);
    }
  }

  /**
   * Delete the user's files under all of the task tracker root directories.
   * @param user the user name
   * @param subDir the path relative to the user's subdirectory under
   *        the task tracker root directories.
   * @throws IOException
   */
  @Override
  public void deleteAsUser(String user,
                           String subDir) throws IOException {
    String dir = TaskTracker.getUserDir(user) + Path.SEPARATOR + subDir;
    for(Path fullDir: allocator.getAllLocalPathsToRead(dir, getConf())) {
      fs.delete(fullDir, true);
    }
  }

  /**
   * Delete the user's files under the userlogs directory.
   * @param user the user to work as
   * @param subDir the path under the userlogs directory.
   * @throws IOException
   */
  @Override
  public void deleteLogAsUser(String user,
                              String subDir) throws IOException {
    Path dir = new Path(TaskLog.getUserLogDir().getAbsolutePath(), subDir);
    fs.delete(dir, true);
  }

  @Override
  public void truncateLogsAsUser(String user, List<Task> allAttempts)
    throws IOException {
    Task firstTask = allAttempts.get(0);
    TaskLogsTruncater trunc = new TaskLogsTruncater(getConf());

    trunc.truncateLogs(new JVMInfo(
            TaskLog.getAttemptDir(firstTask.getTaskID(),
                                  firstTask.isTaskCleanupTask()),
                       allAttempts));
  }

  @Override
  public void setup(LocalDirAllocator allocator) {
    this.allocator = allocator;
  }

}


text:
<?php declare(strict_types=1);

namespace Nextras\Application\UI;

use Attribute;

#[Attribute(Attribute::TARGET_METHOD)]
class Secured
{

}


text:
package org.societies.api.internal.privacytrust.privacyprotection.model.privacypolicy;

import java.security.Key;
import java.util.zip.Checksum;

/**
 * @author Elizabeth
 *
 */
@Deprecated
public interface IAgreementEnvelope {

	public IAgreement getAgreement();

	public Checksum getChecksum();

	public byte[] getSignature();

	public Key getPublicKey();

	public String getPublicKeyAsString();

	public byte[] getPublicKeyInBytes();
}


text:
@(
    drugGroups: Seq[DrugGroup],
    drugGroupTermForm: Form[DrugGroupTerm],
    action: Call
)(implicit messages: Messages)

@implicitFieldConstructor = @{ b3.horizontal.fieldConstructor("col-md-3", "col-md-9") }

@b3.form(action = action) {
    <fieldset>
        <input type="hidden" name="id" value="@drugGroupTermForm("id").value">
        @b3.text(drugGroupTermForm("label"), '_label -> "Label")
        @b3.select(drugGroupTermForm("drugGroupId"),
            drugGroups.map(dt => dt.id.get.value.toString -> dt.name),
            '_label -> "Drug Group", 'class -> "searchable-select")
    </fieldset>

        <button type="submit" class="btn btn-primary">
             Save
        </button>

             Cancel

}


text:
<!DOCTYPE html>

    <meta charset="utf-8">
    <meta name="viewport" content="initial-scale=1, maximum-scale=1, user-scalable=no, width=device-width, viewport-fit=cover">
    <meta http-equiv="Content-Security-Policy">
    <title>{{title|translate}}</title>

    <link href="css/ionic.app.css" rel="stylesheet">

    <link rel="stylesheet" href="lib/ion.rangeSlider/css/normalize.css" />
    <link rel="stylesheet" href="lib/ion.rangeSlider/css/ion.rangeSlider.css" />
    <link rel="stylesheet" href="lib/ion.rangeSlider/css/ion.rangeSlider.skinFlat.css" />

<ion-side-menus>

    <ion-side-menu side="left" ng-controller="SettingCtrl" ng-class="isMenuOpen() ? 'menu-open' : ''" class="menu menu-left">

            <button class="button button-icon icon"
                    ng-class="isAndroid() ? 'ion-android-arrow-back' : 'ion-ios-arrow-back'" menu-toggle>
            </button>

{{title|translate}}

        <ion-content class="has-header menu-content">

                    {{'LOC_TYPE_SPECIAL_WEATHER'|translate}}

                    {{'LOC_NATIONAL_WEATHER'|translate}}

                    {{'LOC_NATIONAL_AIR'|translate}}

                    {{'LOC_NULLSCHOOL_WIND'|translate}}

                    {{'LOC_UNITS'|translate}}

                    {{'LOC_STARTUP_PAGE'|translate}}
                    {{getStartupPageValueStr(settingsInfo.startupPage)|translate}}

                    {{'LOC_REFRESH_INTERVAL'|translate}}
                    {{getRefreshIntervalValueStr(settingsInfo.refreshInterval)|translate}}

                    {{'LOC_THEME_SETTING'|translate}}
                    {{getThemeValueStr(settingsInfo.theme)|translate}}

                    {{'LOC_REMOVE_ADS'|translate}}

                    {{'LOC_SEND_FEEDBACK'|translate}}

                    {{'LOC_RATE_THIS_APP'|translate}}

                    {{'LOC_VERSION'|translate}}
                    {{version}}

                    {{'LOC_GUIDE'|translate}}

                    {{'LOC_ABOUT'|translate}}

        </ion-content>
    </ion-side-menu>

    <ion-side-menu-content drag-content="false" ng-class="isMenuOpen() ? 'menu-open' : ''" class="body-content">
        <ion-nav-bar class="bar-clear" style="visibility: hidden"></ion-nav-bar>
        <ion-nav-view></ion-nav-view>
    </ion-side-menu-content>

</ion-side-menus>


text:
<head>
  <meta charset="utf-8" />
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="norton-safeweb-site-verification" content="jto91ifac4exfj0dg6cbo69shuhhkrl7moylac3vk7l8zipbiufkuoqyrf38t5msmej7-e7hem0192eabxb-nrny2egtsvfqwt6j3qw9aksn9v3e5dwoei3agh3jgim7" />
  <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0">

  <script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-7968060656468551"
  crossorigin="anonymous"></script>

  <title>{% if page.use-site-title %}{{ site.title }} {{ site.title-separator }} {{ site.description }}{% elsif page.title %}{{ page.title }}{% else %}{{ site.title }}{% endif %}</title>

  <meta name="author" content="{{ site.author.name }}" />

  {% if page.subtitle %}
  <meta name="description" content="{{ page.subtitle }}">
  {% endif %}

  <link rel="alternate" type="application/rss+xml" title="{{ site.title }} {{ site.title-separator }} {{ site.description }}" href="{{ site.baseurl }}/feed.xml" />

  {% include gtm_head.html %}

  {% if layout.common-ext-css %}
    {% for css in layout.common-ext-css %}
      {% include ext-css.html css=css %}
    {% endfor %}
  {% endif %}

  {% if layout.common-css %}
    {% for css in layout.common-css %}
      <link rel="stylesheet" href="{{ css | prepend: site.baseurl | replace: '//', '/' }}" />
    {% endfor %}
  {% endif %}

  {% if layout.common-googlefonts %}
    {% for font in layout.common-googlefonts %}
      <link rel="stylesheet" href="//fonts.googleapis.com/css?family={{ font }}" />
    {% endfor %}
  {% endif %}

  {% if page.ext-css %}
    {% for css in page.ext-css %}
      {% include ext-css.html css=css %}
    {% endfor %}
  {% endif %}

  {% if page.css %}
    {% for css in page.css %}
      <link rel="stylesheet" href="{{ css | prepend: site.baseurl | replace: '//', '/' }}" />
    {% endfor %}
  {% endif %}

  {% if page.googlefonts %}
    {% for font in page.googlefonts %}
      <link rel="stylesheet" href="//fonts.googleapis.com/css?family={{ font }}" />
    {% endfor %}
  {% endif %}

    <!-- Facebook OpenGraph tags -->
  {% if site.fb_app_id %}
  <meta property="fb:app_id" content="{{ site.fb_app_id }}" />
  {% endif %}

  {% if page.meta-title %}
  <meta property="og:title" content="{{ page.meta-title }}" />
  {% elsif page.title %}
  <meta property="og:title" content="{{ page.title }}" />
  {% else %}
  <meta property="og:title" content="{{ site.title }}" />
  {% endif %}

   {% if page.meta-description %}
  <meta property="og:description" content="{{ page.meta-description }}">
  {% elsif page.subtitle %}
  <meta property="og:description" content="{{ page.subtitle }}">
  {% else %}
  <meta property="og:description" content="{{ page.content | strip_html | xml_escape | truncatewords: 50 }}">
  {% endif %}

  <meta property="og:type" content="website" />

  {% if page.id %}
  <meta property="og:url" content="{{ site.url }}{{ page.url }}" />
  <link rel="canonical" href="{{ site.url }}{{ page.url }}" />
  {% else %}
  <meta property="og:url" content="{{ site.url }}{{ page.url | remove: '/index.html' | remove: '.html' }}" />
  <link rel="canonical" href="{{ site.url }}{{ page.url | remove: '/index.html' | remove: '.html' }}" />
  {% endif %}

  {% if page.share-img %}
  <meta property="og:image" content="{{ page.share-img }}" />
  {% elsif site.avatar %}
  <meta property="og:image" content="{{ site.url }}{{ site.avatar }}" />
  {% endif %}

  <!-- Twitter summary cards -->
  <meta name="twitter:card" content="summary" />
  <meta name="twitter:site" content="@{{ site.author.twitter }}" />
  <meta name="twitter:creator" content="@{{ site.author.twitter }}" />

  {% if page.meta-title %}
  <meta name="twitter:title" content="{{ page.meta-title }}" />
  {% elsif page.title %}
  <meta name="twitter:title" content="{{ page.title }}" />
  {% else %}
  <meta name="twitter:title" content="{{ site.title }}" />
  {% endif %}

  {% if page.meta-description %}
  <meta name="twitter:description" content="{{ page.meta-description }}">
  {% elsif page.subtitle %}
  <meta name="twitter:description" content="{{ page.subtitle }}">
  {% else %}
  <meta name="twitter:description" content="{{ page.content | strip_html | xml_escape | truncatewords: 50 }}">
  {% endif %}

  {% if page.share-img %}
  <meta name="twitter:image" content="{{ page.share-img }}" />
  {% elsif site.avatar %}
  <meta name="twitter:image" content="{{ site.url }}{{ site.avatar }}" />
  {% endif %}

  <meta name="keywords" content="keyword1, keyword2,nsw-jto91ifac4exfj0dg6cbo69shuhhkrl7moylac3vk7l8zipbiufkuoqyrf38t5msmej7-e7hem0192eabxb-nrny2egtsvfqwt6j3qw9aksn9v3e5dwoei3agh3jgim7"/>
</head>


text:
<?php

class Google_Service_SASPortalTesting_SasPortalSignDeviceRequest extends Google_Model
{
  protected $deviceType = 'Google_Service_SASPortalTesting_SasPortalDevice';
  protected $deviceDataType = '';

  /**
   * @param Google_Service_SASPortalTesting_SasPortalDevice
   */
  public function setDevice(Google_Service_SASPortalTesting_SasPortalDevice $device)
  {
    $this->device = $device;
  }
  /**
   * @return Google_Service_SASPortalTesting_SasPortalDevice
   */
  public function getDevice()
  {
    return $this->device;
  }
}


text:
package osutil

import (
	"encoding"
	"net"
	"os"
)

// GetFQDN returns a FQDN if it's possible, otherwise falls back to hostname.
func GetFQDN() (string, error) {
	hostname, err := os.Hostname()
	if err != nil {
		return "", err
	}

	ips, err := net.LookupIP(hostname)
	if err != nil {
		// Return the system hostname if we can't look up the IP address.
		return hostname, nil
	}

	lookup := func(ipStr encoding.TextMarshaler) (string, error) {
		ip, err := ipStr.MarshalText()
		if err != nil {
			return "", err
		}
		hosts, err := net.LookupAddr(string(ip))
		if err != nil || len(hosts) == 0 {
			return "", err
		}
		return hosts[0], nil
	}

	for _, addr := range ips {
		if ip := addr.To4(); ip != nil {
			if fqdn, err := lookup(ip); err == nil {
				return fqdn, nil
			}
		}

		if ip := addr.To16(); ip != nil {
			if fqdn, err := lookup(ip); err == nil {
				return fqdn, nil
			}
		}
	}
	return hostname, nil
}


text:
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
  <modelVersion>4.0.0</modelVersion>

  <groupId>hoang.pham.vn</groupId>
  <artifactId>hibernate-training</artifactId>
  <version>1.0-SNAPSHOT</version>
    <modules>
        <module>utils</module>
        <module>chapter1</module>
        <module>chapter2</module>
        <module>chapter3</module>
    </modules>
    <packaging>pom</packaging>

  <name>chap1</name>
  <url>http://maven.apache.org</url>

  <properties>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <version.slf4j>1.7.7</version.slf4j>
    <version.logback>1.1.2</version.logback>
  </properties>

  <dependencies>
      <!-- hibernate core-->
      <!--<dependency>
          <groupId>org.hibernate</groupId>
          <artifactId>hibernate-core</artifactId>
          <version>4.3.11.Final</version>
      </dependency>-->

      <dependency>
          <groupId>org.hibernate</groupId>
          <artifactId>hibernate-entitymanager</artifactId>
          <version>4.3.11.Final</version>
      </dependency>

      <!--<dependency>
          <groupId>org.hibernate.javax.persistence</groupId>
          <artifactId>hibernate-jpa-2.1-api</artifactId>
          <version>1.0.0.Final</version>
      </dependency>-->

      <!-- h2 database-->
      <dependency>
          <groupId>com.h2database</groupId>
          <artifactId>h2</artifactId>
          <version>1.4.188</version>
      </dependency>

      <!-- TestNG-->
      <dependency>
          <groupId>org.testng</groupId>
          <artifactId>testng</artifactId>
          <version>6.9.6</version>
      </dependency>

      <dependency>
          <groupId>org.slf4j</groupId>
          <artifactId>slf4j-api</artifactId>
          <version>${version.slf4j}</version>
      </dependency>
      <dependency>
          <groupId>ch.qos.logback</groupId>
          <artifactId>logback-core</artifactId>
          <version>${version.logback}</version>
      </dependency>
      <dependency>
          <groupId>ch.qos.logback</groupId>
          <artifactId>logback-classic</artifactId>
          <version>${version.logback}</version>
      </dependency>

      <!--junit-->
      <dependency>
          <groupId>junit</groupId>
          <artifactId>junit</artifactId>
          <version>4.12</version>
          <scope>test</scope>
        </dependency>
  </dependencies>
</project>


text:
ENV_TEST = NODE_ENV=test
ENV_DEV = NODE_ENV=development

test:
	$(ENV_TEST) mocha --bail
test-all:
	$(ENV_TEST) mocha
test-spec:
	$(ENV_TEST) mocha --reporter spec
test-dev:
	$(ENV_DEV) mocha

.PHONY: test test-all test-spec test-dev


text:
build:
	docker build -t docker.io/jbonachera/consul-template .


text:
/**
 * Caches the decoded peaks data to improve rendering speed for lage audio
 *
 * Is used if the option parameter `partialRender` is set to `true`
 */
export default class PeakCache {
    /**
     * Instantiate cache
     */
    constructor() {
        this.clearPeakCache();
    }

    /**
     * Empty the cache
     */
    clearPeakCache() {
        /**
         * Flat array with entries that are always in pairs to mark the
         * beginning and end of each subrange.  This is a convenience so we can
         * iterate over the pairs for easy set difference operations.
         * @private
         */
        this.peakCacheRanges = [];
        /**
         * Length of the entire cachable region, used for resetting the cache
         * when this changes (zoom events, for instance).
         * @private
         */
        this.peakCacheLength = -1;
    }

    /**
     * Add a range of peaks to the cache
     *
     * @param {number} length The length of the range
     * @param {number} start The x offset of the start of the range
     * @param {number} end The x offset of the end of the range
     * @return {number[][]}
     */
    addRangeToPeakCache(length, start, end) {
        if (length != this.peakCacheLength) {
            this.clearPeakCache();
            this.peakCacheLength = length;
        }

        // Return ranges that weren't in the cache before the call.
        let uncachedRanges = [];
        let i = 0;
        // Skip ranges before the current start.
        while (
            i < this.peakCacheRanges.length &&
            this.peakCacheRanges[i] < start
        ) {
            i++;
        }
        // If |i| is even, |start| falls after an existing range.  Otherwise,
        // |start| falls between an existing range, and the uncached region
        // starts when we encounter the next node in |peakCacheRanges| or
        // |end|, whichever comes first.
        if (i % 2 == 0) {
            uncachedRanges.push(start);
        }
        while (
            i < this.peakCacheRanges.length &&
            this.peakCacheRanges[i] <= end
        ) {
            uncachedRanges.push(this.peakCacheRanges[i]);
            i++;
        }
        // If |i| is even, |end| is after all existing ranges.
        if (i % 2 == 0) {
            uncachedRanges.push(end);
        }

        // Filter out the 0-length ranges.
        uncachedRanges = uncachedRanges.filter((item, pos, arr) => {
            if (pos == 0) {
                return item != arr[pos + 1];
            } else if (pos == arr.length - 1) {
                return item != arr[pos - 1];
            }
            return item != arr[pos - 1] && item != arr[pos + 1];
        });

        // Merge the two ranges together, uncachedRanges will either contain
        // wholly new points, or duplicates of points in peakCacheRanges.  If
        // duplicates are detected, remove both and extend the range.
        this.peakCacheRanges = this.peakCacheRanges.concat(uncachedRanges);
        this.peakCacheRanges = this.peakCacheRanges
            .sort((a, b) => a - b)
            .filter((item, pos, arr) => {
                if (pos == 0) {
                    return item != arr[pos + 1];
                } else if (pos == arr.length - 1) {
                    return item != arr[pos - 1];
                }
                return item != arr[pos - 1] && item != arr[pos + 1];
            });

        // Push the uncached ranges into an array of arrays for ease of
        // iteration in the functions that call this.
        const uncachedRangePairs = [];
        for (i = 0; i < uncachedRanges.length; i += 2) {
            uncachedRangePairs.push([uncachedRanges[i], uncachedRanges[i + 1]]);
        }

        return uncachedRangePairs;
    }

    /**
     * For testing
     *
     * @return {number[][]}
     */
    getCacheRanges() {
        const peakCacheRangePairs = [];
        let i;
        for (i = 0; i < this.peakCacheRanges.length; i += 2) {
            peakCacheRangePairs.push([
                this.peakCacheRanges[i],
                this.peakCacheRanges[i + 1]
            ]);
        }
        return peakCacheRangePairs;
    }
}


text:
.. _`pywbemlistener Help Command Details`:

pywbemlistener Help Command Details
===================================

This section shows the help text for each pywbemlistener command.

Help text for ``pywbemlistener``:

::

    Usage: pywbemlistener [GENERAL-OPTIONS] COMMAND [ARGS] [COMMAND-OPTIONS]

      The pywbemlistener command can run and manage WBEM listeners.

      Each listener is a process that executes the 'pywbemlistener run' command to receive WBEM indications sent from a WBEM
      server.

      A listener process can be started with the 'pywbemlistener start' command and stopped with the 'pywbemlistener stop'
      command.

      There is no central registration of the currently running listeners. Instead, the currently running processes
      executing the 'pywbemlistener run' command are by definition the currently running listeners. Because of this, there
      is no notion of a stopped listener nor does a listener have an operational status.

      The general options shown below can also be specified on any of the commands, positioned right after the
      'pywbemlistener' command name.

      The width of help texts of this command can be set with the PYWBEMTOOLS_TERMWIDTH environment variable.

      For more detailed documentation, see:

          https://pywbemtools.readthedocs.io/en/stable/

    General Options:
      -o, --output-format FORMAT  Output format for the command result. FORMAT is one of the table formats:
                                  [table|plain|simple|grid|psql|rst|html].
      -l, --logdir DIR            Enable logging of the 'pywbemlistener run' command output to a file in a log directory.
                                  The file will be named 'pywbemlistener_NAME.log' where NAME is the listener name. Default:
                                  EnvVar PYWBEMLISTENER_LOGDIR, or no logging.
      -v, --verbose               Verbosity level. Can be specified multiple times: -v: Display indication processing
                                  settings; -vv: Display interactions between start and run commands.
      --pdb                       Pause execution in the built-in pdb debugger just before executing the command within
                                  pywbemlistener. Default: EnvVar PYWBEMLISTENER_PDB, or no debugger.
      --warn                      Enable display of all Python warnings. Default: Leave warning control to the
                                  PYTHONWARNINGS EnvVar, which by default displays no warnings.
      --version                   Show the version of this command and the pywbem package.
      -h, --help                  Show this help message.

    Commands:
      list   List the currently running named WBEM indication listeners.
      show   Show a named WBEM indication listener.
      start  Start a named WBEM indication listener in the background.
      stop   Stop a named WBEM indication listener.
      test   Send a test indication to a named WBEM indication listener.
      run    Run as a named WBEM indication listener.

.. _`pywbemlistener list --help`:

pywbemlistener list --help
--------------------------

Help text for ``pywbemlistener list`` (see :ref:`pywbemlistener list command`):

::

    Usage: pywbemlistener [GENERAL-OPTIONS] list [COMMAND-OPTIONS]

      List the currently running named WBEM indication listeners.

      This is done by listing the currently running `pywbemlistener run` commands.

    Command Options:
      -h, --help  Show this help message.

.. _`pywbemlistener run --help`:

pywbemlistener run --help
-------------------------

Help text for ``pywbemlistener run`` (see :ref:`pywbemlistener run command`):

::

    Usage: pywbemlistener [GENERAL-OPTIONS] run NAME [COMMAND-OPTIONS]

      Run as a named WBEM indication listener.

      Run this command as a named WBEM indication listener until it gets terminated, e.g. by a keyboard interrupt, break
      signal (e.g. kill), or the `pywbemlistener stop` command.

      A listener with that name must not be running, otherwise the command fails.

      Note: The `pywbemlistener start` command should be used to start listeners, and it starts a `pywbemlistener run`
      command as a background process. Use the `pywbemlistener run` command only when you need to have control over how
      exactly the process runs in the background.

      Note: The --start-pid option is needed because on Windows, the `pywbemlistener run` command is not the direct child
      process of the `pywbemlistener start` command starting it.

      Examples:

        pywbemlistener run lis1

    Command Options:
      --start-pid PID              PID of the "pywbemlistener start" process to be notified about the startup of the run
                                   command. Default: No such notification will happen.
      -p, --port PORT              The port number the listener will open to receive indications. This can be any available
                                   port. Default: 25989
      -s, --scheme SCHEME          The scheme used by the listener (http, https). Default: https
      -c, --certfile FILE          Path name of a PEM file containing the certificate that will be presented as a server
                                   certificate during SSL/TLS handshake. Required when using https. The file may in addition
                                   contain the private key of the certificate. Default: EnvVar PYWBEMLISTENER_CERTFILE, or
                                   no certificate file.
      -k, --keyfile FILE           Path name of a PEM file containing the private key of the server certificate. Required
                                   when using https and when the certificate file does not contain the private key. Default:
                                   EnvVar PYWBEMLISTENER_KEYFILE, or no key file.
      --indi-call MODULE.FUNCTION  Call a Python function for each received indication. Invoke with --help-call for details
                                   on the function interface. Default: No function is called.
      --indi-file FILE             Append received indications to a file. The format can be modified using the --indi-format
                                   option. Default: Not appended.
      --indi-format FORMAT         Sets the format to be used when displaying received indications. Invoke with --help-
                                   format for details on the format specification. Default: "{dt} {h} {i_mof}".
      --help-format                Show help message for the format specification used with the --indi-format option and
                                   exit.
      --help-call                  Show help message for calling a Python function for each received indication when using
                                   the --indi-call option and exit.
      -h, --help                   Show this help message.

.. _`pywbemlistener show --help`:

pywbemlistener show --help
--------------------------

Help text for ``pywbemlistener show`` (see :ref:`pywbemlistener show command`):

::

    Usage: pywbemlistener [GENERAL-OPTIONS] show NAME [COMMAND-OPTIONS]

      Show a named WBEM indication listener.

      A listener with that name must be running, otherwise the command fails.

      Examples:

        pywbemlistener show lis1

    Command Options:
      -h, --help  Show this help message.

.. _`pywbemlistener start --help`:

pywbemlistener start --help
---------------------------

Help text for ``pywbemlistener start`` (see :ref:`pywbemlistener start command`):

::

    Usage: pywbemlistener [GENERAL-OPTIONS] start NAME [COMMAND-OPTIONS]

      Start a named WBEM indication listener in the background.

      A listener with that name must not be running, otherwise the command fails.

      A listener is identified by its hostname or IP address and a port number. It can be started with any free port.

      Examples:

        pywbemlistener start lis1

    Command Options:
      -p, --port PORT              The port number the listener will open to receive indications. This can be any available
                                   port. Default: 25989
      -s, --scheme SCHEME          The scheme used by the listener (http, https). Default: https
      -c, --certfile FILE          Path name of a PEM file containing the certificate that will be presented as a server
                                   certificate during SSL/TLS handshake. Required when using https. The file may in addition
                                   contain the private key of the certificate. Default: EnvVar PYWBEMLISTENER_CERTFILE, or
                                   no certificate file.
      -k, --keyfile FILE           Path name of a PEM file containing the private key of the server certificate. Required
                                   when using https and when the certificate file does not contain the private key. Default:
                                   EnvVar PYWBEMLISTENER_KEYFILE, or no key file.
      --indi-call MODULE.FUNCTION  Call a Python function for each received indication. Invoke with --help-call for details
                                   on the function interface. Default: No function is called.
      --indi-file FILE             Append received indications to a file. The format can be modified using the --indi-format
                                   option. Default: Not appended.
      --indi-format FORMAT         Sets the format to be used when displaying received indications. Invoke with --help-
                                   format for details on the format specification. Default: "{dt} {h} {i_mof}".
      --help-format                Show help message for the format specification used with the --indi-format option and
                                   exit.
      --help-call                  Show help message for calling a Python function for each received indication when using
                                   the --indi-call option and exit.
      -h, --help                   Show this help message.

.. _`pywbemlistener stop --help`:

pywbemlistener stop --help
--------------------------

Help text for ``pywbemlistener stop`` (see :ref:`pywbemlistener stop command`):

::

    Usage: pywbemlistener [GENERAL-OPTIONS] stop NAME [COMMAND-OPTIONS]

      Stop a named WBEM indication listener.

      The listener will shut down gracefully.

      A listener with that name must be running, otherwise the command fails.

      Examples:

        pywbemlistener stop lis1

    Command Options:
      -h, --help  Show this help message.

.. _`pywbemlistener test --help`:

pywbemlistener test --help
--------------------------

Help text for ``pywbemlistener test`` (see :ref:`pywbemlistener test command`):

::

    Usage: pywbemlistener [GENERAL-OPTIONS] test NAME [COMMAND-OPTIONS]

      Send a test indication to a named WBEM indication listener.

      The indication is an alert indication with fixed properties. This allows testing the listener and what it does with
      the indication.

      Examples:

        pywbemlistener test lis1

    Command Options:
      -c, --count INT  Count of test indications to send. Default: 1
      -h, --help       Show this help message.


text:
Bread Scraps

    <md-progress-circular ng-show="auth.loading" md-mode="indeterminate" md-diameter="48"></md-progress-circular>

        Excellent! Now just click this box to copy your id and paste it back into the Bread Scraps App.

        {{auth.userId}}


text:
namespace FinnishYnabConverter.Converters
{
    using System.Collections.Generic;
    public interface IBankConverter
    {
        ICollection<string> Convert(string[] transactions);
    }
}


text:
<?php

namespace Nette\PhpGenerator;

use Nette;

/**
 * Closure.
 *
 * @property string $body
 */
class Closure
{
	use Nette\SmartObject;
	use Traits\FunctionLike;

	/** @var Parameter[] */
	private $uses = [];

	/**
	 * @return static
	 */
	public static function from(\Closure $closure)
	{
		return (new Factory)->fromFunctionReflection(new \ReflectionFunction($closure));
	}

	/**
	 * @return string  PHP code
	 */
	public function __toString()
	{
		$uses = [];
		foreach ($this->uses as $param) {
			$uses[] = ($param->isReference() ? '&' : '') . '$' . $param->getName();
		}
		$useStr = strlen($tmp = implode(', ', $uses)) > Helpers::WRAP_LENGTH && count($uses) > 1
			? "\n\t" . implode(",\n\t", $uses) . "\n"
			: $tmp;

		return 'function '
			. ($this->returnReference ? '&' : '')
			. $this->parametersToString()
			. ($this->uses ? " use ($useStr)" : '')
			. $this->returnTypeToString()
			. " {\n" . Nette\Utils\Strings::indent(ltrim(rtrim($this->body) . "\n"), 1) . '}';
	}

	/**
	 * @param  Parameter[]
	 * @return static
	 */
	public function setUses(array $uses)
	{
		foreach ($uses as $use) {
			if (!$use instanceof Parameter) {
				throw new Nette\InvalidArgumentException('Argument must be Nette\PhpGenerator\Parameter[].');
			}
		}
		$this->uses = $uses;
		return $this;
	}

	/**
	 * @return array
	 */
	public function getUses()
	{
		return $this->uses;
	}

	/**
	 * @return Parameter
	 */
	public function addUse($name)
	{
		return $this->uses[] = new Parameter($name);
	}
}


text:
let events = require('events');
let EventEmitter = require('events').EventEmitter;
let print = console.log;

var eventEmitter = new events.EventEmitter();

eventEmitter.on('some',function(){
    print('我叫后知后觉 do something ..........');
});

eventEmitter.on('arg',function(arg1,arg2,fn){
    print('接受多个参数:',arg1,arg2);
    fn(arg1,arg2);
});
eventEmitter.emit('arg','username','password',function(arg1,arg2){
    print('传递的函数处理参数: ',arg1,arg2);
});

setTimeout(function(){
    eventEmitter.emit('some');
},3000);

// 监听器1
var listen1 = function (){
    print('监听器1 处理函数.....');
}
var listen2 = function (){
    print('监听器2 处理函数.....');
}

eventEmitter.addListener('connect',listen1);

eventEmitter.on('connect',listen1);

var eventListeners = EventEmitter.listenerCount(eventEmitter,'connect');

print('connect 事件监听个数: ' , eventListeners);

eventEmitter.removeListener('connect',listen1);

print('移除监听器listen1');

eventEmitter.emit('connect');

print('当前connect 事件 监听器个数: ', EventEmitter.listenerCount(eventEmitter, 'connect'));


text:
'use strict'

module.exports = function(baseDir) {
  return new SkyEnv(baseDir)
}
module.exports.SkyEnv = SkyEnv

var fs = require('fs-extra')
  , path = require('path')
  , jsoncfg = require('jsoncfg')
  , S = require('string')
  , sutil = require('./util')

var CFG_FILE = 'sky/config.json'; //relative to the base dir

function SkyEnv (baseDir) {
  if (!baseDir) throw new Error("Must pass in baseDir into SkyEnv")

  this.baseDir = baseDir
  this.configFile = path.join(this.baseDir, CFG_FILE)
  this.configs = null
  this.themePaths = {}
}

SkyEnv.prototype.loadConfigsSync = function() {
  var dirs = ['./', './sky']
    , configs = {}
    , errors = {}
    , _this = this

  dirs.forEach(function(dir) {
    var cfgs = jsoncfg.loadFilesSync(path.join(_this.baseDir, dir))
    errors = sutil.extend(errors, cfgs.errors)
    configs = sutil.extend(configs, cfgs)
  })

  configs.errors = errors
  this.configs = configs
  return this
}

/****************************
 * Properties
 ****************************/

//articleIndex
Object.defineProperty(SkyEnv.prototype, 'articleIndex', {
  get: function() {
    return this.configs.get('config:articles.index') || 'index.html'
  }
})

//indexTitle
Object.defineProperty(SkyEnv.prototype, 'indexTitle', {
  get: function() {
    var title = ''
    if (this.configs.get('config:site.name')) {
      title = this.configs.get('config:site.name')
      if (this.configs.get('config:site.tagline'))
        title += ': ' + this.configs.get('config:site.tagline')
    }
    return this.configs.get('config:site.title') || title || "Sky Site"
  }
})

//lastBuild
Object.defineProperty(SkyEnv.prototype, 'lastBuild', {
  get: function() {
    var lastBuild = new Date(0)
    if (this.configs.get('config:build.lastBuild'))
      lastBuild = new Date(this.configs.get('config:build.lastBuild'))
    return lastBuild
  }
})

//outputDir
Object.defineProperty(SkyEnv.prototype, 'outputDir', {
  get: function() {
    if (this.configs.get('config:build.outputDir'))
      return path.resolve(path.join(this.baseDir, this.configs.get('config:build.outputDir')))
    else
      return path.resolve(path.join(this.baseDir, 'public'))
  }
})

//themeDir
Object.defineProperty(SkyEnv.prototype, 'themeDir', {
  get: function() {
    return path.join(this.baseDir, 'sky', 'themes', this.themeName)
  }
})

//themeName
Object.defineProperty(SkyEnv.prototype, 'themeName', {
  get: function() {
    return this.configs.get('config:site.theme') || 'basic'
  }
})

/****************************
 * Methods
 ****************************/

SkyEnv.prototype.mdArticleToOutputFile = function(mdfile, data) {
  var outputDir = this.outputDir

  if (data) {
    var articleUrlFormat = this.configs.get('config:articles.urlformat') || "articles/{{date-year}}/{{date-month}}/{{slug}}.html"
    var relOut = S(articleUrlFormat).template(data).s
    return relOut
  } else {
    var base = path.basename(mdfile, '.md')
    return S(base).slugify() + '.html'
  }
}

//this is a bit verbose
SkyEnv.prototype.mdArticleToOutputFileWithPath = function() {
  return path.join(this.outputDir, this.mdArticleToOutputFile.apply(this, arguments))
}

SkyEnv.prototype.mdPageToOutputFileWithPath = function(mdfile, data) {
  var basedir = mdfile.split('pages/')[1]
  var dirs = basedir.split('/')
  dirs.pop()
  basedir = dirs.join('/')

  if (data) {
    if (!data.basedir) data.basedir = basedir

    var urlFormat = this.configs.get('config:pages.urlformat') || 'pages/{{basedir}}/{{slug}}.html'
    var relOut = S(urlFormat).template(data).s

    //clean extra '/'s
    relOut = path.join.apply(path, relOut.split('/'))
    return path.join(this.outputDir, relOut)
  } else {
    var base = path.basename(mdfile, '.md')
    var slug = S(base).slugify() + '.html'
    return path.join(this.outputDir, basedir, slug)
  }
}

SkyEnv.prototype.partialFile = function(partialName) {
  return this.path('sky', 'partials', partialName)
}

SkyEnv.prototype.path = function(paths) {
  paths = [].slice.call(arguments)
  paths.unshift(this.baseDir)

  return path.join.apply(path, paths)
}


text:
<?xml version='1.0' encoding='UTF-8'?>
<faces-config version="2.2" xmlns="http://xmlns.jcp.org/xml/ns/javaee"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee
    http://xmlns.jcp.org/xml/ns/javaee/web-facesconfig_2_2.xsd">

    <application>
        <locale-config>
            <default-locale>de</default-locale>
            <supported-locale>en</supported-locale>
        </locale-config>
        <resource-bundle>
            <base-name>de.messages</base-name>
            <var>msg</var>
        </resource-bundle>
    </application>

    <navigation-rule>
        <from-view-id>/site/projektDetails.xhtml</from-view-id>
        <navigation-case>
            <from-action>#{navigationController.processStartseite}</from-action>
            <from-outcome>success</from-outcome>
            <to-view-id>/site/startseite.xhtml</to-view-id>
        </navigation-case>
    </navigation-rule>
    <!--<navigation-rule>-->
        <!--<from-view-id>/site/projektDetails.xhtml</from-view-id>-->
        <!--<navigation-case>-->
            <!--<from-action>#{navigationController.processStartseite}</from-action>-->
            <!--<to-view-id>/home.xhtml</to-view-id>-->
        <!--</navigation-case>-->
    <!--</navigation-rule>-->
</faces-config>


text:
package main

import (
	"fmt"
	"os"

	"github.com/Azure/azure-sdk-for-go/sdk/messaging/azservicebus/internal/stress/tests"
	"github.com/Azure/azure-sdk-for-go/sdk/messaging/azservicebus/internal/stress/tools"
)

func main() {
	if len(os.Args) < 2 {
		fmt.Printf("Bad command line\n")
		fmt.Printf("Usage: stress (tests|tools)\n")
		os.Exit(1)
	}

	switch os.Args[1] {
	case "tests":
		tests.Run(os.Args[2:])
	case "tools":
		tools.Run(os.Args[2:])
	default:
		fmt.Printf("Usage: stress (tests|tools)\n")
		os.Exit(1)
	}
}


text:
'use strict';

module.exports = function(sequelize, DataTypes) {

  var Product = sequelize.define('Product', {
      DisplayLabel: {
        type: DataTypes.STRING(50)
      },
      ProductCode: {
        type: DataTypes.STRING(10)
      },
      ProductDescription: {
        type: DataTypes.STRING(100)
      },
      Stock: {
        type: DataTypes.INTEGER
      },
      PriceBuy: {
        type: DataTypes.DECIMAL(10,4)
      },
      PriceSell: {
        type: DataTypes.DECIMAL(10,4)
      },
      Category: {
        type: DataTypes.STRING(20)
      },
      RecordStatus: {
        type: DataTypes.BOOLEAN,
        default: true
      },
      DeletedAt: {
        type: DataTypes.DATE
      }
    },
    {
      associate: function(models){
        Product.belongsTo(models.Branch, { as: 'Branch' });
        Product.belongsTo(models.Person, {as: 'Provider'});

        Product.belongsTo(models.user, { as: 'CreatedBy' });
        Product.belongsTo(models.user, { as: 'UpdateBy' });
        Product.belongsTo(models.user, { as: 'DeleteBy' });
      }
    }
  );

  return Product;
};


text:
//===-- SPUAsmPrinter.cpp - Print machine instrs to Cell SPU assembly -----===//
//
//                     The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
//
// This file contains a printer that converts from our internal representation
// of machine-dependent LLVM code to Cell SPU assembly language. This printer
// is the output mechanism used by `llc'.
//
//===----------------------------------------------------------------------===//

#define DEBUG_TYPE "asmprinter"
#include "SPU.h"
#include "SPUTargetMachine.h"
#include "llvm/Constants.h"
#include "llvm/DerivedTypes.h"
#include "llvm/Module.h"
#include "llvm/CodeGen/AsmPrinter.h"
#include "llvm/CodeGen/MachineModuleInfo.h"
#include "llvm/MC/MCStreamer.h"
#include "llvm/MC/MCAsmInfo.h"
#include "llvm/MC/MCSymbol.h"
#include "llvm/Target/Mangler.h"
#include "llvm/Target/TargetLoweringObjectFile.h"
#include "llvm/Target/TargetInstrInfo.h"
#include "llvm/Target/TargetOptions.h"
#include "llvm/Target/TargetRegisterInfo.h"
#include "llvm/ADT/SmallString.h"
#include "llvm/ADT/StringExtras.h"
#include "llvm/Support/ErrorHandling.h"
#include "llvm/Support/TargetRegistry.h"
#include "llvm/Support/raw_ostream.h"
using namespace llvm;

namespace {
  class SPUAsmPrinter : public AsmPrinter {
  public:
    explicit SPUAsmPrinter(TargetMachine &TM, MCStreamer &Streamer) :
      AsmPrinter(TM, Streamer) {}

    virtual const char *getPassName() const {
      return "STI CBEA SPU Assembly Printer";
    }

    /// printInstruction - This method is automatically generated by tablegen
    /// from the instruction set description.
    void printInstruction(const MachineInstr *MI, raw_ostream &OS);
    static const char *getRegisterName(unsigned RegNo);

    void EmitInstruction(const MachineInstr *MI) {
      SmallString<128> Str;
      raw_svector_ostream OS(Str);
      printInstruction(MI, OS);
      OutStreamer.EmitRawText(OS.str());
    }
    void printOp(const MachineOperand &MO, raw_ostream &OS);

    void printOperand(const MachineInstr *MI, unsigned OpNo, raw_ostream &O) {
      const MachineOperand &MO = MI->getOperand(OpNo);
      if (MO.isReg()) {
        O << getRegisterName(MO.getReg());
      } else if (MO.isImm()) {
        O << MO.getImm();
      } else {
        printOp(MO, O);
      }
    }

    bool PrintAsmOperand(const MachineInstr *MI, unsigned OpNo,
                         unsigned AsmVariant, const char *ExtraCode,
                         raw_ostream &O);
    bool PrintAsmMemoryOperand(const MachineInstr *MI, unsigned OpNo,
                               unsigned AsmVariant, const char *ExtraCode,
                               raw_ostream &O);

    void
    printU7ImmOperand(const MachineInstr *MI, unsigned OpNo, raw_ostream &O)
    {
      unsigned int value = MI->getOperand(OpNo).getImm();
      assert(value < (1 << 8) && "Invalid u7 argument");
      O << value;
    }

    void
    printShufAddr(const MachineInstr *MI, unsigned OpNo, raw_ostream &O)
    {
      char value = MI->getOperand(OpNo).getImm();
      O << (int) value;
      O << "(";
      printOperand(MI, OpNo+1, O);
      O << ")";
    }

    void
    printS16ImmOperand(const MachineInstr *MI, unsigned OpNo, raw_ostream &O)
    {
      O << (short) MI->getOperand(OpNo).getImm();
    }

    void
    printU16ImmOperand(const MachineInstr *MI, unsigned OpNo, raw_ostream &O)
    {
      O << (unsigned short)MI->getOperand(OpNo).getImm();
    }

    void
    printMemRegReg(const MachineInstr *MI, unsigned OpNo, raw_ostream &O) {
      // When used as the base register, r0 reads constant zero rather than
      // the value contained in the register.  For this reason, the darwin
      // assembler requires that we print r0 as 0 (no r) when used as the base.
      const MachineOperand &MO = MI->getOperand(OpNo);
      O << getRegisterName(MO.getReg()) << ", ";
      printOperand(MI, OpNo+1, O);
    }

    void
    printU18ImmOperand(const MachineInstr *MI, unsigned OpNo, raw_ostream &O)
    {
      unsigned int value = MI->getOperand(OpNo).getImm();
      assert(value <= (1 << 19) - 1 && "Invalid u18 argument");
      O << value;
    }

    void
    printS10ImmOperand(const MachineInstr *MI, unsigned OpNo, raw_ostream &O)
    {
      short value = (short) (((int) MI->getOperand(OpNo).getImm() << 16)
                             >> 16);
      assert((value >= -(1 << 9) && value <= (1 << 9) - 1)
             && "Invalid s10 argument");
      O << value;
    }

    void
    printU10ImmOperand(const MachineInstr *MI, unsigned OpNo, raw_ostream &O)
    {
      short value = (short) (((int) MI->getOperand(OpNo).getImm() << 16)
                             >> 16);
      assert((value <= (1 << 10) - 1) && "Invalid u10 argument");
      O << value;
    }

    void
    printDFormAddr(const MachineInstr *MI, unsigned OpNo, raw_ostream &O)
    {
      assert(MI->getOperand(OpNo).isImm() &&
             "printDFormAddr first operand is not immediate");
      int64_t value = int64_t(MI->getOperand(OpNo).getImm());
      int16_t value16 = int16_t(value);
      assert((value16 >= -(1 << (9+4)) && value16 <= (1 << (9+4)) - 1)
             && "Invalid dform s10 offset argument");
      O << (value16 & ~0xf) << "(";
      printOperand(MI, OpNo+1, O);
      O << ")";
    }

    void
    printAddr256K(const MachineInstr *MI, unsigned OpNo, raw_ostream &O)
    {
      /* Note: operand 1 is an offset or symbol name. */
      if (MI->getOperand(OpNo).isImm()) {
        printS16ImmOperand(MI, OpNo, O);
      } else {
        printOp(MI->getOperand(OpNo), O);
        if (MI->getOperand(OpNo+1).isImm()) {
          int displ = int(MI->getOperand(OpNo+1).getImm());
          if (displ > 0)
            O << "+" << displ;
          else if (displ < 0)
            O << displ;
        }
      }
    }

    void printCallOperand(const MachineInstr *MI, unsigned OpNo, raw_ostream &O) {
      printOp(MI->getOperand(OpNo), O);
    }

    void printHBROperand(const MachineInstr *MI, unsigned OpNo, raw_ostream &O) {
      printOp(MI->getOperand(OpNo), O);
    }

    void printPCRelativeOperand(const MachineInstr *MI, unsigned OpNo, raw_ostream &O) {
      // Used to generate a ".-<target>", but it turns out that the assembler
      // really wants the target.
      //
      // N.B.: This operand is used for call targets. Branch hints are another
      // animal entirely.
      printOp(MI->getOperand(OpNo), O);
    }

    void printSymbolHi(const MachineInstr *MI, unsigned OpNo, raw_ostream &O) {
      if (MI->getOperand(OpNo).isImm()) {
        printS16ImmOperand(MI, OpNo, O);
      } else {
        printOp(MI->getOperand(OpNo), O);
        O << "@h";
      }
    }

    void printSymbolLo(const MachineInstr *MI, unsigned OpNo, raw_ostream &O) {
      if (MI->getOperand(OpNo).isImm()) {
        printS16ImmOperand(MI, OpNo, O);
      } else {
        printOp(MI->getOperand(OpNo), O);
        O << "@l";
      }
    }

    /// Print local store address
    void printSymbolLSA(const MachineInstr *MI, unsigned OpNo, raw_ostream &O) {
      printOp(MI->getOperand(OpNo), O);
    }

    void printROTHNeg7Imm(const MachineInstr *MI, unsigned OpNo,
                          raw_ostream &O) {
      if (MI->getOperand(OpNo).isImm()) {
        int value = (int) MI->getOperand(OpNo).getImm();
        assert((value >= 0 && value < 16)
               && "Invalid negated immediate rotate 7-bit argument");
        O << -value;
      } else {
        llvm_unreachable("Invalid/non-immediate rotate amount in printRotateNeg7Imm");
      }
    }

    void printROTNeg7Imm(const MachineInstr *MI, unsigned OpNo, raw_ostream &O){
      assert(MI->getOperand(OpNo).isImm() &&
             "Invalid/non-immediate rotate amount in printRotateNeg7Imm");
      int value = (int) MI->getOperand(OpNo).getImm();
      assert((value >= 0 && value <= 32)
             && "Invalid negated immediate rotate 7-bit argument");
      O << -value;
    }
  };
} // end of anonymous namespace

// Include the auto-generated portion of the assembly writer
#include "SPUGenAsmWriter.inc"

void SPUAsmPrinter::printOp(const MachineOperand &MO, raw_ostream &O) {
  switch (MO.getType()) {
  case MachineOperand::MO_Immediate:
    report_fatal_error("printOp() does not handle immediate values");

  case MachineOperand::MO_MachineBasicBlock:
    O << *MO.getMBB()->getSymbol();
    return;
  case MachineOperand::MO_JumpTableIndex:
    O << MAI->getPrivateGlobalPrefix() << "JTI" << getFunctionNumber()
      << '_' << MO.getIndex();
    return;
  case MachineOperand::MO_ConstantPoolIndex:
    O << MAI->getPrivateGlobalPrefix() << "CPI" << getFunctionNumber()
      << '_' << MO.getIndex();
    return;
  case MachineOperand::MO_ExternalSymbol:
    // Computing the address of an external symbol, not calling it.
    if (TM.getRelocationModel() != Reloc::Static) {
      O << "L" << MAI->getGlobalPrefix() << MO.getSymbolName()
        << "$non_lazy_ptr";
      return;
    }
    O << *GetExternalSymbolSymbol(MO.getSymbolName());
    return;
  case MachineOperand::MO_GlobalAddress:
    // External or weakly linked global variables need non-lazily-resolved
    // stubs
    if (TM.getRelocationModel() != Reloc::Static) {
      const GlobalValue *GV = MO.getGlobal();
      if (((GV->isDeclaration() || GV->hasWeakLinkage() ||
            GV->hasLinkOnceLinkage() || GV->hasCommonLinkage()))) {
        O << *GetSymbolWithGlobalValueBase(GV, "$non_lazy_ptr");
        return;
      }
    }
    O << *Mang->getSymbol(MO.getGlobal());
    return;
  case MachineOperand::MO_MCSymbol:
    O << *(MO.getMCSymbol());
    return;
  default:
    O << "<unknown operand type: " << MO.getType() << ">";
    return;
  }
}

/// PrintAsmOperand - Print out an operand for an inline asm expression.
///
bool SPUAsmPrinter::PrintAsmOperand(const MachineInstr *MI, unsigned OpNo,
                                    unsigned AsmVariant,
                                    const char *ExtraCode, raw_ostream &O) {
  // Does this asm operand have a single letter operand modifier?
  if (ExtraCode && ExtraCode[0]) {
    if (ExtraCode[1] != 0) return true; // Unknown modifier.

    switch (ExtraCode[0]) {
    default: return true;  // Unknown modifier.
    case 'L': // Write second word of DImode reference.
      // Verify that this operand has two consecutive registers.
      if (!MI->getOperand(OpNo).isReg() ||
          OpNo+1 == MI->getNumOperands() ||
          !MI->getOperand(OpNo+1).isReg())
        return true;
      ++OpNo;   // Return the high-part.
      break;
    }
  }

  printOperand(MI, OpNo, O);
  return false;
}

bool SPUAsmPrinter::PrintAsmMemoryOperand(const MachineInstr *MI,
                                          unsigned OpNo, unsigned AsmVariant,
                                          const char *ExtraCode,
                                          raw_ostream &O) {
  if (ExtraCode && ExtraCode[0])
    return true; // Unknown modifier.
  printMemRegReg(MI, OpNo, O);
  return false;
}

// Force static initialization.
extern "C" void LLVMInitializeCellSPUAsmPrinter() {
  RegisterAsmPrinter<SPUAsmPrinter> X(TheCellSPUTarget);
}


text:
package edu.cmu.sv.ws.ssnoc.data.util;

/**
 * Created by Vignan on 10/19/2014.
 */

import com.zaxxer.hikari.HikariConfig;
import com.zaxxer.hikari.HikariDataSource;
import edu.cmu.sv.ws.ssnoc.common.logging.Log;
import edu.cmu.sv.ws.ssnoc.common.utils.PropertyUtils;

import java.sql.Connection;
import java.sql.SQLException;

/**
 * This class is the Connection Pool implementation for the H2 database.
 *
 */
public class PerfTestConnPoolImpl implements IConnectionPool {
    private static PerfTestConnPoolImpl instance = null;
    private HikariDataSource ds = null;

    static {
        try {
            Log.info("Initializing the connection pool ... ");
            instance = new PerfTestConnPoolImpl();
            Log.info("Connection pool initialized successfully.");
        } catch (Exception e) {
            Log.error(
                    "Exception when trying to initialize the connection pool",
                    e);
        }
    }

    /**
     * Constructor to initialize H2 connection pool.
     */
    private PerfTestConnPoolImpl() {
        HikariConfig config = new HikariConfig();

        config.setDataSourceClassName("org.h2.jdbcx.JdbcDataSource");
        config.addDataSourceProperty("URL", PropertyUtils.PERF_DB_CONN_URL);
        config.addDataSourceProperty("user", PropertyUtils.DB_USERNAME);
        config.addDataSourceProperty("password", PropertyUtils.DB_PASSWORD);

        ds = new HikariDataSource(config);
        ds.setMaximumPoolSize(PropertyUtils.DB_CONNECTION_POOL_SIZE);
    }

    public static PerfTestConnPoolImpl getInstance() {
        return instance;
    }

    /**
     * This method will return the connection object to the database.
     */
    public Connection getConnection() throws SQLException {
        if (ds == null) {
            Log.error("HikariDataSource is NULL. Nooooooooooo :)");
            return null;
        }

        return ds.getConnection();
    }
}


text:
<?php

# note, do not translate [CONTENT]

$lan = array(
  "No such template" => "そのようなテンプレートはありません。",
  "Images stored" => "イメージが保存されました。",
  "No images found" => "イメージはみつかりません。",
  "Image" => "イメージ",
  "not full URL" => "完全なURLではありません。",
  "does not exist" => "外部に存在しません。",
  "Not a full URL:" => "完全なURLではありません。",
  "No Title" => "タイトルがありません。",
  "Template does not contain the [CONTENT] placeholder" => "テンプレートは、[CONTENT]プレースホルダを含みません。",
  "Template saved" => "テンプレートが保存されました。",
  "Images" => "イメージ",
  "Below is the list of images used in your template. If an image is currently unavailable, please upload it to the database." => "以下はあなたのテンプレートで使用されているイメージのリストです。もし「イメージがみつかりませんでした」と表示されているのでしたらデータベースにそれをアップロードしてください。",
  "This includes all images, also fully referenced ones, so you may choose not to upload some. If you upload images, they will be included in the emails that use this template." => "ここには、すべてのイメージが表示されていて、またフル参照のイメージも表示されていますので、いくつかについてはアップロードしないような選択になっているかもしれません。もしイメージをアップロードするのでしたら、このテンプレートを利用した電子メールに含まれます。",
  "Image name:" => "イメージ名:",
  "times used" => "回使用",
  "Template does not contain local images" => "テンプレートはローカルイメージを含みません。",
  "Some errors were found, template NOT saved!" => "すいません。エラーが発生しました、テンプレートは保存されませんでした!",
  "List of Templates" => "テンプレートのリスト",
  'Title of this template' => 'このテンプレートのタイトル',
  'Content of the template.' => 'テンプレートのコンテンツ',
  'The content should at least have [CONTENT] somewhere.' => 'コンテンツの少なくともどこかに[CONTENT]を入れてください。',
  'Check that all links have a full URL' => 'すべてのリンクが完全なURLであることをチェック',
  'Check that all images have a full URL' => 'すべてのイメージが完全なURLであることをチェック',
  'Check that all external images exist' => 'すべての外部イメージが存在することをチェック',
  'Save Changes' => '変更を保存',
  'Save Images' => 'イメージを保存',

  # added 2.10.0
  'You can upload a template file or paste the text in the box below' => 'テンプレートファイルをアップロード、または、以下のボックスにテキストをペーストできます。',
  'Template file.' => 'テンプレートファイル',

);
?>


text:
[![Version](https://img.shields.io/cocoapods/v/Filtr.svg?style=flat)](http://cocoapods.org/pods/Filtr)
[![License](https://img.shields.io/cocoapods/l/Filtr.svg?style=flat)](http://cocoapods.org/pods/Filtr)
[![Platform](https://img.shields.io/cocoapods/p/Filtr.svg?style=flat)](http://cocoapods.org/pods/Filtr)

Filtr is a Swift multi-platform (iOS/macOS/tvOS) framework that has 25 built in photo filter effects that you can apply to images in your app. It also has utilities that let you create your own filters with your favorite photo editor, using 3D LUT files.

This framework is what powers the [Lochkamera](http://www.lochkamera.co) macOS app.

## Installation

Filtr is available through [CocoaPods](http://cocoapods.org). To install
it, simply add the following line to your Podfile:

```ruby
pod "Filtr"
```

## Getting Started

### Filtr

There are 25 built in filters. 10 crazy color ones, 10 extra regular filters, 5 black and white.

**color1** - **color10**

**extra1** - **extra10**

**blackWhite1** - **blackWhite5**

This is how you would use one.

```swift

  // Create an EffectFilter with the type you want.
  let effectFilter = EffectFilter(type: .color3)
  // Apply an input intensity between 0 and 1.0
  effectFilter.inputIntensity = 1.0

  // Filtr also has a FadeFilter, popularized by VSCO and Instagram.
  let fadeFilter = FadeFilter()
  fadeFilter.intensity = 0.33

  // Add both or either effect you want to use to a FilterStack.
  let filterStack = FilterStack()
  filterStack.effectFilter = effectFilter
  filterStack.fadeFilter = fadeFilter

  // Finaly use Filtr to process the image with the filter stack.
  let filteredImage = Filtr.process(inputImage, filterStack: filterStack)

```

### LUTConverter

Filtr uses a 3D Lookup Table (3D LUT) or [Color Cube](https://developer.apple.com/library/content/documentation/GraphicsImaging/Reference/CoreImageFilterReference/#//apple_ref/doc/filter/ci/CIColorCube) to create the filter effects.

You can create your own filters using one of these LUT images as a base.

[32 x 32 identity LUT image](https://github.com/danlozano/Filtr/blob/master/Filtr/Resources/Identity32.png)

[64 x 64 identity LUT image](https://github.com/danlozano/Filtr/blob/master/Filtr/Resources/Identity64.png)

Import them into Photoshop (or your favorite photo editor), apply any color effects to it (only color effects will work, no grains/alphas or any other advanced effects), then save the resulting image.

Then use the LUTConverter class to convert your image into 3D LUT data.

```swift
  let lutImage = UIImage(named: myLut)
  let lutData32 = LUTConverter.cubeDataForLut32(lutImage) // If you use the 32 x 32 LUT image
  let lutData64 = LUTConverter.cubeDataForLut64(lutImage) // Or if you use the 64 x 64 lut image
```

Then use your 3D LUT data to initialize a EffectFilter.

```swift
let effectFilter = EffectFilter(customFilter: lutData32, withDimension: .thirtyTwo)
effectFilter.inputIntensity = 0.7
```

## Author

Daniel Lozano, dan@danielozano.com

## License

Filtr is available under the MIT license. See the LICENSE file for more info.


text:
    <meta content="text/html; charset=ISO-8859-1"
          http-equiv="content-type">
    <title>Select a Test Suite</title>

<form id="prompt" target="_top" method="GET" onsubmit="return go();" action="TestRunner.html">

        Test Suite:
        <input id="test" name="test" size="30" value="../gi/tests/gi36/TestSuite.html"/>

<input type="submit" value="Go"/>

    <fieldset>
        <legend>Options</legend>

            <input id="multiWindow" type="checkbox" name="multiWindow" onclick="autoCheck();"/> AUT in separate window

                <input id="slowResources" type="checkbox" name="slowResources" onclick="slowCheck();" /> Slow down web server

            <input id="auto" type="checkbox" name="auto" onclick="autoCheck();"/> Run
            automatically

                <input id="close" type="checkbox" name="close"/> Close afterwards

Save to file <input id="save" type="checkbox" name="save"
                                                                   onclick="saveCheck();"/>

                Results URL:
                <input id="resultsUrl" name="resultsUrl" value="../postResults"/>

    </fieldset>

</form>


text:
package ucar.nc2.dt.radial;

import org.junit.Test;
import org.junit.experimental.categories.Category;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import ucar.nc2.dt.*;
import ucar.nc2.constants.FeatureType;
import ucar.nc2.ft.FeatureDatasetFactoryManager;
import ucar.nc2.time.CalendarDate;
import ucar.unidata.geoloc.LatLonRect;
import ucar.unidata.geoloc.LatLonPoint;
import ucar.unidata.util.test.category.NeedsCdmUnitTest;
import ucar.unidata.util.test.TestDir;
import java.io.IOException;
import java.io.File;
import java.lang.invoke.MethodHandles;
import java.util.List;
import java.util.Formatter;

/** Test radial datasets in the JUnit framework. */
@Category(NeedsCdmUnitTest.class)
public class TestRadialDataset {
  private static final Logger logger = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());

  // private RadialDatasetSweepFactory datasetFactory = new RadialDatasetSweepFactory();
  private String topDir = TestDir.cdmUnitTestDir + "formats/";
  private boolean show, showTime, doQuick = true;

  @Test
  public void testNexrad2Dataset() throws IOException {
    testAllMethods(topDir + "nexrad/level2/Level2_KYUX_20060527_2335.ar2v");
  }

  // @Test
  public void testReadDirectory() throws IOException {
    long start = System.currentTimeMillis();
    // doDirectory(TestAll.testdataDir + "radar/nexrad/level2/VCP11", false);
    // DiskCache.setCachePolicy( true);
    // DiskCache.setRootDirectory( System.getProperty( "java.io.tmpdir" ) + "/cache/");
    doDirectory(topDir + "nexrad/level2/", false, 10, ".raw");
    long took = System.currentTimeMillis() - start;
    System.out.println("that took = " + took + " msec");
  }

  @Test
  public void problem() throws IOException {
    String filename = topDir + "nexrad/level2/VCP11/20030912143758.raw";
    testAllMethods(filename);
  }

  private int doDirectory(String dirName, boolean alwaysUncompress, int max, String suffix) throws IOException {

    File dir = new File(dirName);
    if (!dir.exists()) {
      System.out.println("TestRadialDataset.doDirectory(): non-existent directory <" + dirName + ">.");
      throw new IllegalArgumentException("Non-existent directory <" + dirName + ">.");
    }
    File[] files = dir.listFiles();
    if (alwaysUncompress) {
      for (int i = 0; i < files.length; i++) {
        File file = files[i];
        String path = file.getPath();
        if (path.endsWith(".uncompress"))
          file.delete();
      }
    }

    int count = 0;
    for (int i = 0; i < files.length; i++) {
      File file = files[i];
      String path = file.getPath();
      if (path.endsWith(".uncompress"))
        continue;

      if (file.isDirectory())
        count += doDirectory(path, alwaysUncompress, max, suffix);
      else if (path.endsWith(suffix)) {
        testAllMethods(path);
        count++;
      }

      if (count > max)
        break;
    }

    return count;
  }

  private void testAllMethods(String location) throws IOException {
    Formatter errlog = new Formatter();
    RadialDatasetSweep rds =
        (RadialDatasetSweep) FeatureDatasetFactoryManager.open(FeatureType.RADIAL, location, null, errlog);

    System.out.println(location + "-----------");
    rds.getDetailInfo(errlog);
    if (show)
      System.out.println(errlog);

    CalendarDate d1 = rds.getCalendarDateStart();
    CalendarDate d2 = rds.getCalendarDateEnd();
    if ((d1 != null) && (d2 != null))
      assert d1.isBefore(d2) || d1.equals(d2);

    ucar.unidata.geoloc.EarthLocation eloc = rds.getCommonOrigin();
    assert eloc != null;
    LatLonPoint llp = LatLonPoint.create(eloc.getLatitude(), eloc.getLongitude());

    LatLonRect bb = rds.getBoundingBox();
    assert bb.contains(llp);

    List rvars = rds.getDataVariables();
    assert null != rvars;
    assert 0 < rvars.size();
    for (int i = 0; i < rvars.size(); i++) {
      RadialDatasetSweep.RadialVariable rv = (RadialDatasetSweep.RadialVariable) rvars.get(i);
      testRadialVariable(rv);
    }

  }

  private void testRadialVariable(RadialDatasetSweep.RadialVariable rv) throws IOException {
    System.out.println(" radial variable = " + rv.getShortName());

    int nsweeps = rv.getNumSweeps();
    for (int i = 0; i < nsweeps; i++) {
      RadialDatasetSweep.Sweep sweep = rv.getSweep(i);
      testSweep(sweep);
    }
  }

  private void testSweep(RadialDatasetSweep.Sweep s) throws IOException {

    if (show)
      System.out.println("  sweep type= " + s.getType() + " nRadials= " + s.getRadialNumber() + " nGates= "
          + s.getGateNumber() + " width= " + s.getBeamWidth() + " nyqFreq= " + s.getNyquistFrequency() + " firstGate= "
          + s.getRangeToFirstGate() + " sizeGate= " + s.getGateSize() + " meanElev= " + s.getMeanElevation()
          + " meanAzi= " + s.getMeanAzimuth() + " startingTime= " + s.getStartingTime() + " endingTime= "
          + s.getEndingTime());
    long start = System.currentTimeMillis();

    int nrays = s.getRadialNumber();
    int ngates = s.getGateNumber();

    float[] data = s.readData();
    assert data != null;
    assert data.length == nrays * ngates;

    nrays = s.getRadialNumber();
    ngates = s.getGateNumber();
    assert data.length == nrays * ngates;

    data = s.readData();
    assert data != null;
    assert data.length == nrays * ngates;

    if (doQuick)
      return;

    long took = System.currentTimeMillis();
    if (showTime)
      System.out.println(" read()=" + (took - start));

    for (int ray = 0; ray < nrays; ray++) {
      float[] ray_data = s.readData(ray);
      assert ray_data != null;
      assert ray_data.length == ngates;

      /*
       * double elev = s.getElevation(ray);
       * double azi = s.getAzimuth(ray);
       * double t = s.getTime(ray);
       */
    }

    long took2 = System.currentTimeMillis();
    if (showTime)
      System.out.println(" read(ray)=" + (took2 - took));

    double result = 0.0;
    for (int ray = 0; ray < nrays; ray++) {
      double elev = s.getElevation(ray);
      double azi = s.getAzimuth(ray);
      double t = s.getTime(ray);
      result += elev * azi * t;
    }

    long took3 = System.currentTimeMillis();
    if (showTime)
      System.out.println(" getCoord(ray)=" + (took3 - took2) + " msecs (" + result + ")");
  }

}


text:
package controllers

import com.google.inject.{Inject, Singleton}
import config.{ApplicationConfig, GmpContext}
import connectors.GmpBulkConnector
import controllers.auth.AuthAction
import play.api.mvc.MessagesControllerComponents
import services.SessionService
import uk.gov.hmrc.auth.core.AuthConnector
import views.Views

import scala.concurrent.ExecutionContext

@Singleton
class MoreBulkResultsController @Inject()(authAction: AuthAction,
                                          override val authConnector: AuthConnector,
                                          sessionService: SessionService,
                                          implicit val config:GmpContext,
                                          gmpBulkConnector: GmpBulkConnector,
                                          ac:ApplicationConfig,
                                          override val messagesControllerComponents: MessagesControllerComponents,
                                          implicit val executionContext: ExecutionContext,
                                          views: Views) extends GmpPageFlow(authConnector,sessionService,config,messagesControllerComponents,ac) {

  def retrieveMoreBulkResults = authAction.async {
      implicit request => {
        val link = request.linkId
        gmpBulkConnector.getPreviousBulkRequests(link).map {
          bulkPreviousRequests => {
            Ok(views.moreBulkResults(bulkPreviousRequests.sorted))
          }
        }
      }
  }

}


text:
import argparse
import brightnessmonitorclient
from brightnessmonitorclient import __version__
from brightnessmonitorclient.raspberry.main import start

def get_parser():
    """
    Creates a new argument parser.
    """
    parser = argparse.ArgumentParser('BrightnessMonitorClient')
    version = '%(prog)s ' + __version__
    parser.add_argument('--version', '-v', action='version', version=version)
    return parser

def main(args=None):
    """
    Main entry point for your project.

    Args:
        args : list
            A of arguments as if they were input in the command line. Leave it
            None to use sys.argv.
    """

    parser = get_parser()
    args = parser.parse_args(args)

    # start raspberry.main:start
    start()

if __name__ == '__main__':
    main()


text:
package scouter.lang.conf;

import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;

@Retention(RetentionPolicy.RUNTIME)
public @interface ConfigDesc {
  String value();
}


text:
// Code generated by go-swagger; DO NOT EDIT.

package operations

// This file was generated by the swagger tool.
// Editing this file might prove futile when you re-run the swagger generate command

import (
	"fmt"
	"io"

	"github.com/go-openapi/runtime"

	strfmt "github.com/go-openapi/strfmt"

	"github.com/3dsim/simulation-goclient/models"
)

// GetAssumedStrainSimulationReader is a Reader for the GetAssumedStrainSimulation structure.
type GetAssumedStrainSimulationReader struct {
	formats strfmt.Registry
}

// ReadResponse reads a server response into the received o.
func (o *GetAssumedStrainSimulationReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
	switch response.Code() {

	case 200:
		result := NewGetAssumedStrainSimulationOK()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return result, nil

	case 401:
		result := NewGetAssumedStrainSimulationUnauthorized()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return nil, result

	case 403:
		result := NewGetAssumedStrainSimulationForbidden()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return nil, result

	case 404:
		result := NewGetAssumedStrainSimulationNotFound()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return nil, result

	default:
		result := NewGetAssumedStrainSimulationDefault(response.Code())
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		if response.Code()/100 == 2 {
			return result, nil
		}
		return nil, result
	}
}

// NewGetAssumedStrainSimulationOK creates a GetAssumedStrainSimulationOK with default headers values
func NewGetAssumedStrainSimulationOK() *GetAssumedStrainSimulationOK {
	return &GetAssumedStrainSimulationOK{}
}

/*GetAssumedStrainSimulationOK handles this case with default header values.

Successfully retrieved simulation
*/
type GetAssumedStrainSimulationOK struct {
	Payload *models.AssumedStrainSimulation
}

func (o *GetAssumedStrainSimulationOK) Error() string {
	return fmt.Sprintf("[GET /assumedstrainsimulations/{id}][%d] getAssumedStrainSimulationOK  %+v", 200, o.Payload)
}

func (o *GetAssumedStrainSimulationOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {

	o.Payload = new(models.AssumedStrainSimulation)

	// response payload
	if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
		return err
	}

	return nil
}

// NewGetAssumedStrainSimulationUnauthorized creates a GetAssumedStrainSimulationUnauthorized with default headers values
func NewGetAssumedStrainSimulationUnauthorized() *GetAssumedStrainSimulationUnauthorized {
	return &GetAssumedStrainSimulationUnauthorized{}
}

/*GetAssumedStrainSimulationUnauthorized handles this case with default header values.

Not authorized
*/
type GetAssumedStrainSimulationUnauthorized struct {
	Payload *models.Error
}

func (o *GetAssumedStrainSimulationUnauthorized) Error() string {
	return fmt.Sprintf("[GET /assumedstrainsimulations/{id}][%d] getAssumedStrainSimulationUnauthorized  %+v", 401, o.Payload)
}

func (o *GetAssumedStrainSimulationUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {

	o.Payload = new(models.Error)

	// response payload
	if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
		return err
	}

	return nil
}

// NewGetAssumedStrainSimulationForbidden creates a GetAssumedStrainSimulationForbidden with default headers values
func NewGetAssumedStrainSimulationForbidden() *GetAssumedStrainSimulationForbidden {
	return &GetAssumedStrainSimulationForbidden{}
}

/*GetAssumedStrainSimulationForbidden handles this case with default header values.

Forbidden
*/
type GetAssumedStrainSimulationForbidden struct {
	Payload *models.Error
}

func (o *GetAssumedStrainSimulationForbidden) Error() string {
	return fmt.Sprintf("[GET /assumedstrainsimulations/{id}][%d] getAssumedStrainSimulationForbidden  %+v", 403, o.Payload)
}

func (o *GetAssumedStrainSimulationForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {

	o.Payload = new(models.Error)

	// response payload
	if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
		return err
	}

	return nil
}

// NewGetAssumedStrainSimulationNotFound creates a GetAssumedStrainSimulationNotFound with default headers values
func NewGetAssumedStrainSimulationNotFound() *GetAssumedStrainSimulationNotFound {
	return &GetAssumedStrainSimulationNotFound{}
}

/*GetAssumedStrainSimulationNotFound handles this case with default header values.

Simulation not found (id invalid)
*/
type GetAssumedStrainSimulationNotFound struct {
	Payload *models.Error
}

func (o *GetAssumedStrainSimulationNotFound) Error() string {
	return fmt.Sprintf("[GET /assumedstrainsimulations/{id}][%d] getAssumedStrainSimulationNotFound  %+v", 404, o.Payload)
}

func (o *GetAssumedStrainSimulationNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {

	o.Payload = new(models.Error)

	// response payload
	if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
		return err
	}

	return nil
}

// NewGetAssumedStrainSimulationDefault creates a GetAssumedStrainSimulationDefault with default headers values
func NewGetAssumedStrainSimulationDefault(code int) *GetAssumedStrainSimulationDefault {
	return &GetAssumedStrainSimulationDefault{
		_statusCode: code,
	}
}

/*GetAssumedStrainSimulationDefault handles this case with default header values.

unexpected error
*/
type GetAssumedStrainSimulationDefault struct {
	_statusCode int

	Payload *models.Error
}

// Code gets the status code for the get assumed strain simulation default response
func (o *GetAssumedStrainSimulationDefault) Code() int {
	return o._statusCode
}

func (o *GetAssumedStrainSimulationDefault) Error() string {
	return fmt.Sprintf("[GET /assumedstrainsimulations/{id}][%d] getAssumedStrainSimulation default  %+v", o._statusCode, o.Payload)
}

func (o *GetAssumedStrainSimulationDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {

	o.Payload = new(models.Error)

	// response payload
	if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
		return err
	}

	return nil
}