text:
using System;
using System.Diagnostics;
using NLog;

namespace Game.Core.Processes
{
  /// <summary>
  ///   The states that a process can exist in.
  /// </summary>
  public enum ProcessState
  {
    /// <summary>
    ///   Initial state, inactive.
    /// </summary>
    NotInitialized,
    /// <summary>
    ///   Actively running.
    /// </summary>
    Running,
    /// <summary>
    ///   Active, but temporarily paused.
    /// </summary>
    Paused,
    /// <summary>
    ///   Completed successfully.
    /// </summary>
    Succeeded,
    /// <summary>
    ///   Completed unsuccessfully.
    /// </summary>
    Failed,
    /// <summary>
    ///   Manually stopped before completing.
    /// </summary>
    Aborted
  }

  /// <summary>
  ///   The base for all processes.  A process encapsulates any action that
  ///   takes multiple frames.  Processes may be chained together to create
  ///   sequences of actions.
  /// </summary>
  public abstract class ProcessBase
  {
    private static readonly Logger Log = LogManager.GetCurrentClassLogger();

    /// <summary>
    ///   Create the process.
    /// </summary>
    /// <param name="id">
    ///   The unique id of this process.
    /// </param>
    /// <param name="name">
    ///
    /// </param>
    protected ProcessBase(int id, string name = "")
    {
      Id = id;
      Name = string.Format("{0} {1}{2}", GetType().Name, Id,
        string.IsNullOrEmpty(name) ? string.Empty : ": " + name);
      State = ProcessState.NotInitialized;
      ActivateChildOnFailure = false;
      ActivateChildOnAbort = false;
    }

    #region Events

    /// <summary>
    ///   Event fires when the process transitions from Running -> Paused.
    /// </summary>
    public event EventHandler Paused;

    /// <summary>
    ///   Event fires when the process transitions from Paused -> Running.
    /// </summary>
    public event EventHandler Resumed;

    /// <summary>
    ///   Event fires when the process transitions to Succeeded.
    /// </summary>
    public event EventHandler Succeeded;

    /// <summary>
    ///   Event fires when the process transitions to Failed.
    /// </summary>
    public event EventHandler Failed;

    /// <summary>
    ///   Event fires when the process transitions to Aborted.
    /// </summary>
    public event EventHandler Aborted;

    #endregion
    #region Properties

    /// <summary>
    ///   The unique id for this process.
    /// </summary>
    public int Id { get; private set; }

    /// <summary>
    ///   The process name.
    /// </summary>
    public string Name { get; private set; }

    /// <summary>
    ///   How long the process has been in the running state.
    /// </summary>
    public float RunningTime { get; private set; }

    /// <summary>
    ///   The current state of the process.
    /// </summary>
    public ProcessState State { get; private set; }

    /// <summary>
    ///   The child of this process, which will be activated if this process
    ///   completes successfully, and possibly if it fails or aborts, depending
    ///   on <see cref="ActivateChildOnFailure"/> and
    ///   <see cref="ActivateChildOnAbort"/>.
    /// </summary>
    public ProcessBase Child { get; private set; }

    /// <summary>
    ///   If true, the child process will activate if this process fails.
    ///
    ///   Default: false.
    /// </summary>
    public bool ActivateChildOnFailure { get; set; }

    /// <summary>
    ///   If true, the child process will activate if this process is aborted.
    ///
    ///   Default: false.
    /// </summary>
    public bool ActivateChildOnAbort { get; set; }

    #endregion
    #region State Properties

    /// <summary>
    ///   Was the process initialized successfully.
    /// </summary>
    public bool IsInitialized
    {
      get { return State != ProcessState.NotInitialized; }
    }

    /// <summary>
    ///   Is the process in a live state.
    /// </summary>
    public bool IsAlive
    {
      get
      {
        return State == ProcessState.Running || State == ProcessState.Paused;
      }
    }

    /// <summary>
    ///   Is the process alive and running.
    /// </summary>
    public bool IsRunning
    {
      get { return State == ProcessState.Running; }
    }

    /// <summary>
    ///   Is the process alive and paused.
    /// </summary>
    public bool IsPaused
    {
      get { return State == ProcessState.Paused; }
      set
      {
        if (value)
        {
          Pause();
        }
        else
        {
          Resume();
        }
      }
    }

    /// <summary>
    ///   Is the process in any completed state.
    /// </summary>
    public bool IsCompleted
    {
      get
      {
        return State == ProcessState.Succeeded ||
               State == ProcessState.Failed ||
               State == ProcessState.Aborted;
      }
    }

    /// <summary>
    ///   Did the process succeed.
    /// </summary>
    public bool HasSucceeded
    {
      get { return State == ProcessState.Succeeded; }
    }

    /// <summary>
    ///   Did the process fail.
    /// </summary>
    public bool HasFailed
    {
      get { return State == ProcessState.Failed; }
    }

    /// <summary>
    ///   Was the process aborted.
    /// </summary>
    public bool WasAborted
    {
      get { return State == ProcessState.Aborted; }
    }

    #endregion
    #region Child Methods

    /// <summary>
    ///   Attach a child to this process chain.  The process will be attached
    ///   to the first child which does not have a child process.  The process
    ///   must not be initialized.
    /// </summary>
    /// <param name="child"></param>
    /// <exception cref="ArgumentNullException">
    ///   child is null.
    /// </exception>
    /// <exception cref="InvalidOperationException">
    ///   child is initialized.
    /// </exception>
    public void AttachChild(ProcessBase child)
    {
      if (child == null) throw new ArgumentNullException("child");
      if (child.IsInitialized)
        throw new InvalidOperationException("child can not be initialized");

      if (Child == null)
      {
        Child = child;
      }
      else
      {
        Child.AttachChild(child);
      }
    }

    /// <summary>
    ///   Removes and returns this process's child process.  Returns null if
    ///   there is no child.
    /// </summary>
    /// <returns></returns>
    public ProcessBase RemoveChild()
    {
      var result = Child;
      Child = null;
      return result;
    }

    #endregion
    #region State Control Methods

    /// <summary>
    ///   Initializes a new process to the paused state.
    /// </summary>
    /// <returns>
    ///   Success or failure of initialization.
    /// </returns>
    public bool Initialize()
    {
      Debug.Assert(!IsInitialized);

      if (!DoInitialize())
      {
        Log.Error("{0} failed initialization", Name);
        return false;
      }

      Log.Trace("{0} initialized", Name);
      State = ProcessState.Paused;

      return true;
    }

    /// <summary>
    ///   Updates a running process.  Should only be called by the process
    ///   manager.
    /// </summary>
    /// <param name="deltaTime">
    ///   Elapsed time since the last update.
    /// </param>
    public void Update(float deltaTime)
    {
      Debug.Assert(IsRunning);

      RunningTime += deltaTime;
      DoUpdate(deltaTime);
    }

    /// <summary>
    ///   Pauses a running process.
    /// </summary>
    public void Pause()
    {
      Debug.Assert(IsAlive);

      if (IsPaused)
      {
        return;
      }

      Debug.Assert(IsRunning);
      State = ProcessState.Paused;
      DoPause();
      OnPaused();
    }

    /// <summary>
    ///   Resumes a paused process.
    /// </summary>
    public void Resume()
    {
      Debug.Assert(IsAlive);

      if (IsRunning)
      {
        return;
      }

      Debug.Assert(IsPaused);
      State = ProcessState.Running;
      DoResume();
      OnResume();
    }

    /// <summary>
    ///   Marks this process as completed successfully.  May be called by
    ///   anyone, generally called by the process itself when it meets success
    ///   conditions.
    /// </summary>
    public void Succeed()
    {
      Debug.Assert(IsAlive);

      Log.Trace("{0} succeeded", Name);
      State = ProcessState.Succeeded;
      DoSucceed();
      OnSucceeded();
    }
    /// <summary>
    ///   Marks this process as completed with failure.  May be called by
    ///   anyone.
    /// </summary>
    public void Fail()
    {
      Debug.Assert(IsAlive);

      Log.Trace("{0} failed", Name);
      State = ProcessState.Failed;
      DoFail();
      OnFailed();
    }

    /// <summary>
    ///   Marks this process as aborted.  May be called by anyone.
    /// </summary>
    public void Abort()
    {
      Log.Trace("{0} aborted", Name);
      State = ProcessState.Aborted;
      DoAbort();
      OnAborted();
    }

    /// <summary>
    ///   Aborts this process and all of its children.  Maybe be called by
    ///   anyone.
    /// </summary>
    public void AbortAll()
    {
      Abort();
      if (Child == null)
      {
        return;
      }

      Child.AbortAll();
      Child = null;
    }

    #endregion

    /// <summary>
    ///   Performs initialization of the process.
    /// </summary>
    /// <returns>
    ///   Success or failure of initialization.
    /// </returns>
    protected abstract bool DoInitialize();

    /// <summary>
    ///   Performs an update of the process.
    /// </summary>
    /// <param name="deltaTime">
    ///   Time elapsed since DoUpdate was last called.
    /// </param>
    protected abstract void DoUpdate(float deltaTime);

    /// <summary>
    ///   Performs an action when the process is paused.
    /// </summary>
    protected abstract void DoPause();

    /// <summary>
    ///   Performs an action when the process is unpaused.
    /// </summary>
    protected abstract void DoResume();

    /// <summary>
    ///   Performs an action when the process succeeds.
    /// </summary>
    protected abstract void DoSucceed();

    /// <summary>
    ///   Performs an action when the process fails.
    /// </summary>
    protected abstract void DoFail();

    /// <summary>
    ///   Performs an action when the process is aborted.
    /// </summary>
    protected abstract void DoAbort();

    #region Event Invokers

    private void OnPaused()
    {
      if (Paused != null)
      {
        Paused(this, EventArgs.Empty);
      }
    }

    private void OnResume()
    {
      if (Resumed != null)
      {
        Resumed(this, EventArgs.Empty);
      }
    }

    private void OnSucceeded()
    {
      if (Succeeded != null)
      {
        Succeeded(this, EventArgs.Empty);
      }
    }

    private void OnFailed()
    {
      if (Failed != null)
      {
        Failed(this, EventArgs.Empty);
      }
    }

    private void OnAborted()
    {
      if (Aborted != null)
      {
        Aborted(this, EventArgs.Empty);
      }
    }

    #endregion
  }
}


text:
package lsh.ext.gson.adapters;

import java.util.stream.Stream;

import com.google.gson.TypeAdapterFactory;
import com.google.gson.reflect.TypeToken;
import org.junit.jupiter.params.provider.Arguments;

public final class JsonFailSafeTypeAdapterFactoryTest
		extends AbstractTypeAdapterFactoryTest {

	public JsonFailSafeTypeAdapterFactoryTest() {
		super(true);
	}

	@Override
	protected TypeAdapterFactory createUnit() {
		return JsonFailSafeTypeAdapterFactory.getInstance();
	}

	@Override
	protected Stream<Arguments> supported() {
		return Stream.of(
				Arguments.of(TypeToken.get(String.class))
		);
	}

	@Override
	protected Stream<Arguments> unsupported() {
		return Stream.of(
				Arguments.of(TypeToken.get(int.class))
		);
	}

}

redpajama_set_name: RedPajamaGithub


text:
// Copyright 2018 Google LLC
//
// 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.

package com.google.firebase.database.snapshot;

import static com.google.firebase.database.core.utilities.Utilities.hardAssert;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;

import androidx.test.ext.junit.runners.AndroidJUnit4;
import com.google.firebase.database.IntegrationTestValues;
import com.google.firebase.database.RetryRule;
import com.google.firebase.database.core.Path;
import com.google.firebase.database.core.SynchronousConnection;
import com.google.firebase.database.core.utilities.ChildKeyGenerator;
import java.util.List;
import java.util.Random;
import net.java.quickcheck.Generator;
import net.java.quickcheck.generator.PrimitiveGenerators;
import net.java.quickcheck.generator.support.IntegerGenerator;
import net.java.quickcheck.generator.support.StringGenerator;
import org.junit.Rule;
import org.junit.Test;

@org.junit.runner.RunWith(AndroidJUnit4.class)
public class CompoundHashingIntegrationTest {
  @Rule public RetryRule retryRule = new RetryRule(3);

  private static final Random random = new Random();
  /* Use a fixed set of keys so updates might affect existing keys */
  private static final ChildKey[] keys;
  private static final StringGenerator leafStringGenerator =
      new StringGenerator(
          new IntegerGenerator(0, 500), PrimitiveGenerators.characters('\u0000', '\u5000'));

  static {
    int numKeys = 20;
    keys = new ChildKey[numKeys];
    Generator<ChildKey> keyGen = new ChildKeyGenerator(25, /*includePriority=*/ false);
    for (int i = 0; i < numKeys; i++) {
      keys[i] = keyGen.next();
    }
  }

  private static Path randomPath(int maxLen) {
    int length = random.nextInt(maxLen);
    Path path = Path.getEmptyPath();
    for (int j = 0; j < length; j++) {
      path = path.child(keys[random.nextInt(keys.length)]);
    }
    boolean addPriority = Math.random() < 0.05;
    // There is an edge case where the server can (rightfully) send a node with only priority to the
    // client. Since this is parsed as empty node without priority on the client, the range merge
    // fails. For simplicity (and because priority has a whole bunch of other broken edge cases) we
    // will ignore it for now
    // if (addPriority) {
    if (false) {
      path = path.child(ChildKey.getPriorityKey());
    }
    return path;
  }

  interface LeafVisitor {
    public void onLeaf(Path path, LeafNode<?> leaf);
  }

  private static void forEachLeaf(
      final Path currentPath, Node node, final LeafVisitor leafVisitor) {
    if (node.isLeafNode()) {
      leafVisitor.onLeaf(currentPath, (LeafNode<?>) node);
    } else if (node.isEmpty()) {
      // ignore
    } else {
      hardAssert(node instanceof ChildrenNode);
      ((ChildrenNode) node)
          .forEachChild(
              new ChildrenNode.ChildVisitor() {
                @Override
                public void visitChild(ChildKey name, Node child) {
                  forEachLeaf(currentPath.child(name), child, leafVisitor);
                }
              });
      if (!node.getPriority().isEmpty()) {
        forEachLeaf(currentPath.child(ChildKey.getPriorityKey()), node.getPriority(), leafVisitor);
      }
    }
  }

  private static Node extractRange(Node node, final Path optStart, final Path optEnd) {
    final Node[] result = new Node[] {EmptyNode.Empty()};
    forEachLeaf(
        Path.getEmptyPath(),
        node,
        new LeafVisitor() {
          @Override
          public void onLeaf(Path path, LeafNode<?> leaf) {
            boolean startIncluded = (optStart == null) || path.compareTo(optStart) > 0;
            boolean endIncluded = (optEnd == null) || path.compareTo(optEnd) <= 0;
            if (startIncluded && endIncluded) {
              result[0] = result[0].updateChild(path, leaf);
            }
          }
        });
    return result[0];
  }

  private static Node randomLeaf(boolean isPriority, boolean includeEmpty) {
    int type = random.nextInt(5);
    if (type == 0) {
      return includeEmpty ? EmptyNode.Empty() : randomLeaf(isPriority, false);
    } else if (type == 1) {
      return new StringNode(leafStringGenerator.next(), EmptyNode.Empty());
    } else if (type == 2) {
      return isPriority
          ? randomLeaf(true, includeEmpty)
          : new LongNode(random.nextLong(), EmptyNode.Empty());
    } else if (type == 3) {
      return new DoubleNode(random.nextDouble(), EmptyNode.Empty());
    } else if (type == 4) {
      return isPriority
          ? randomLeaf(true, includeEmpty)
          : new BooleanNode(random.nextBoolean(), EmptyNode.Empty());
    } else {
      throw new IllegalStateException("should not happen");
    }
  }

  private static Node randomNode(int numLeafs) {
    Node node = EmptyNode.Empty();
    for (int i = 0; i < numLeafs; i++) {
      Path path = randomPath(4);
      boolean isPriority = !path.isEmpty() && path.getBack().isPriorityChildName();
      node = node.updateChild(path, randomLeaf(isPriority, false));
    }
    return node;
  }

  private void oneRound() throws Throwable {
    final Node initialState = randomNode(random.nextInt(5000));
    Node currentState = initialState;
    SynchronousConnection conn = new SynchronousConnection(IntegrationTestValues.getDatabaseUrl());
    conn.connect();
    conn.setValue(Path.getEmptyPath(), initialState, /*wait=*/ false);
    int numUpdates = random.nextInt(30);
    for (int i = 0; i < numUpdates; i++) {
      Path randomPath;
      Node randomLeaf;
      boolean isPriority;
      // Make sure we only create valid priorites updates or normal leaf node updates
      do {
        randomPath = randomPath(4);
        isPriority = !randomPath.isEmpty() && randomPath.getBack().isPriorityChildName();
        randomLeaf = randomLeaf(isPriority, true);
      } while (isPriority && currentState.getChild(randomPath.getParent()).isEmpty());
      currentState = currentState.updateChild(randomPath, randomLeaf);
      conn.setValue(randomPath, randomLeaf, /*wait=*/ false);
    }

    CompoundHash hash =
        CompoundHash.fromNode(
            initialState,
            new CompoundHash.SplitStrategy() {
              @Override
              public boolean shouldSplit(CompoundHash.CompoundHashBuilder state) {
                return random.nextInt(10) == 0
                    && (state.currentPath().isEmpty()
                        || !state.currentPath().getBack().isPriorityChildName());
              }
            });

    List<RangeMerge> merges =
        conn.listenWithHash(Path.getEmptyPath(), hash, initialState.getHash());

    Node afterMerge = initialState;
    if (merges != null) {
      for (RangeMerge merge : merges) {
        afterMerge = merge.applyTo(afterMerge);
      }
    }

    if (merges != null) {
      for (RangeMerge merge : merges) {
        Node initialRange = extractRange(initialState, merge.getStart(), merge.getEnd());
        Node afterMergeRange = extractRange(afterMerge, merge.getStart(), merge.getEnd());
        // If we got a range merge, the nodes must be different or hashing is broken
        assertFalse(afterMergeRange.equals(initialRange));
      }
    }
    assertEquals(currentState, afterMerge);

    conn.destroy();
  }

  @Test
  public void randomIntegrationTest() throws Throwable {
    for (int i = 0; i < 30; i++) {
      oneRound();
    }
  }
}


text:
<?php

namespace Drupal\Core\State;

use Drupal\Core\KeyValueStore\KeyValueFactoryInterface;

/**
 * Provides the state system using a key value store.
 */
class State implements StateInterface {

  /**
   * The key value store to use.
   *
   * @var \Drupal\Core\KeyValueStore\KeyValueStoreInterface
   */
  protected $keyValueStore;

  /**
   * Static state cache.
   *
   * @var array
   */
  protected $cache = array();

  /**
   * Constructs a State object.
   *
   * @param \Drupal\Core\KeyValueStore\KeyValueFactoryInterface $key_value_factory
   *   The key value store to use.
   */
  function __construct(KeyValueFactoryInterface $key_value_factory) {
    $this->keyValueStore = $key_value_factory->get('state');
  }

  /**
   * {@inheritdoc}
   */
  public function get($key, $default = NULL) {
    $values = $this->getMultiple(array($key));
    return isset($values[$key]) ? $values[$key] : $default;
  }

  /**
   * {@inheritdoc}
   */
  public function getMultiple(array $keys) {
    $values = array();
    $load = array();
    foreach ($keys as $key) {
      // Check if we have a value in the cache.
      if (isset($this->cache[$key])) {
        $values[$key] = $this->cache[$key];
      }
      // Load the value if we don't have an explicit NULL value.
      elseif (!array_key_exists($key, $this->cache)) {
        $load[] = $key;
      }
    }

    if ($load) {
      $loaded_values = $this->keyValueStore->getMultiple($load);
      foreach ($load as $key) {
        // If we find a value, even one that is NULL, add it to the cache and
        // return it.
        if (isset($loaded_values[$key]) || array_key_exists($key, $loaded_values)) {
          $values[$key] = $loaded_values[$key];
          $this->cache[$key] = $loaded_values[$key];
        }
        else {
          $this->cache[$key] = NULL;
        }
      }
    }

    return $values;
  }

  /**
   * {@inheritdoc}
   */
  public function set($key, $value) {
    $this->cache[$key] = $value;
    $this->keyValueStore->set($key, $value);
  }

  /**
   * {@inheritdoc}
   */
  public function setMultiple(array $data) {
    foreach ($data as $key => $value) {
      $this->cache[$key] = $value;
    }
    $this->keyValueStore->setMultiple($data);
  }

  /**
   * {@inheritdoc}
   */
  public function delete($key) {
    $this->deleteMultiple(array($key));
  }

  /**
   * {@inheritdoc}
   */
  public function deleteMultiple(array $keys) {
    foreach ($keys as $key) {
      unset($this->cache[$key]);
    }
    $this->keyValueStore->deleteMultiple($keys);
  }

  /**
   * {@inheritdoc}
   */
  public function resetCache() {
    $this->cache = array();
  }

}


text:
namespace Snippy.App.Controllers
{
    using System.Web.Mvc;

    using AutoMapper;

    using Snippy.App.Models.ViewModels;
    using Snippy.Data.UnitOfWork;

    public class LanguagesController : BaseController
    {
        public LanguagesController(ISnippyData data)
            : base(data)
        {
        }

        [AllowAnonymous]
        public ActionResult Details(int id)
        {
            var language = this.Data.ProgrammingLanguages.Find(id);
            if (language == null)
            {
                return this.HttpNotFound("Language no longer exists");
            }

            var viewModel = Mapper.Map<DetaildLanguageViewModel>(language);
            return this.View(viewModel);
        }
    }
}


text:
import heapq, bisect, math, collections, sys, fractions, copy, functools, operator, itertools, string

argmax = lambda l: l.index(max(l))
argmin = lambda l: l.index(min(l))

def read_list(t): return [t(x) for x in input().split()]
def read_line(t): return t(input())
def read_lines(t, N): return [t(input()) for _ in range(N)]


text:
from flask import Flask, request, redirect
from geopy.geocoders import Nominatim, GoogleV3
import forecastio
import twilio.twiml
import re
import math

app = Flask(__name__)

def geolocate_get_coords(location_string):

    try:
        geolocator = Nominatim()
        location = geolocator.geocode(location_string, timeout=20)
    except:
        geolocator = GoogleV3(api_key = '<CREDENTIALS REMOVED>')
        location = geolocator.geocode(location_string, timeout=20)
    return location

def deg_to_compass(bearing_deg):

    bearings = "N,NNE,NE,ENE,E,ESE,SE,SSE,S,SSW,SW,WSW,W,WNW,NW,NNW".split(',')

    # Each bearing-sector takes up 360/16 deg, or 22.5 deg
    # Offset and use modular math to get the correct index
    bearing_selector = int(((bearing_deg + 11.25) % 360) // 22.5)
    bearing = bearings[bearing_selector]
    return bearing

def get_forecast(location):

    forecast_api_key = '<CREDENTIALS REMOVED>'
    try:
        lat = location.latitude
        longitude = location.longitude
    except:
        weather_message = "Sorry, location not found."
        return weather_message

    try:
        forecast = forecastio.load_forecast(forecast_api_key, lat, longitude)
    except:
        weather_message = "Sorry, data not available."
        return weather_message

    current = forecast.currently()
    bearing = deg_to_compass(current.windBearing)

    speed = str(round(forecast.currently().windSpeed* 1.94384,2))
    if bearing:
        weather_message = "Current weather for " + location.address + ": " + bearing + " @ " + speed + " kn" + " (" + forecast.currently().summary +")"
    else:
        weather_message = "Conditions for " + location.address + ": No data, or currently calm"
        return weather_message

    temp = str(format(current.temperature,'.1f'))
    status = current.summary
    speed = str(format(current.windSpeed * 0.868976, '.2f'))
    try:
        nearest_storm = ", nearest storm is " + str(format(current.nearestStormDistance, '.0f')) + " miles away"
    except:
        nearest_storm = ""

    #TODO create better address parsing
    address_list = location.address.split(',')
    del address_list[-1]
    if re.search('^\s\d{5}(?:[-\s]\d{4})?$',address_list[-1]):
        del address_list[-1]
    new_address = address_list[0]
    for a in address_list[1:]:
        new_address = new_address + "," + a

    if bearing:
        weather_message = "Current weather for " + new_address + ": " + status + ", " + temp + " deg F, wind is " + bearing + " @ " + speed + " kn" + nearest_storm +  " (Powered by Forecast)"
    else:
        weather_message = "Current weather for " + new_address + ": No data, or currently calm (Powered by Forecast)"

    return weather_message

@app.route("/", methods=['GET', 'POST'])
def responder():

    from_number = request.values.get('From', None)
    sms_string = request.values.get('Body', None)
    location = geolocate_get_coords(sms_string)
    weather_message = get_forecast(location)
    resp = twilio.twiml.Response()
    resp.message(weather_message)
    return str(resp)

if __name__ == '__main__':
    app.run(debug=True)


text:
namespace MawAuth.ViewModels.Admin;

public class ManageUserModel
{
    public string? Username { get; set; }
    public string? FirstName { get; set; }
    public string? LastName { get; set; }
    public string? Email { get; set; }
    public DateTime? LastLoginDate { get; set; }
}


text:
title: "Community Garden Sculpture Fundraiser"
event-image: "nature-connects-hummingbird-and-flower.jpg"
event-dates: ""
date:
categories:
layout: "default"
published: false
---

NATURE CONNECTS: COMMUNITY GARDEN SCULPTURE FUNDRAISER

Donate to Red Butte Garden today!

JOIN THE FUNDRAISER!

Join your fellow Garden members to fund the larger-than-life "Community Garden" sculpture featuring birds and squirrels made of 8,586 LEGO bricks! By supporting this exciting exhibition, you are helping to share the Garden's mission to connect people with plants and the beauty of living landscapes with your community in a unique and engaging way.

Give Today!

For more information contact Wendy Loyning at 801-585-5658 or email: wendy.loyning@redbutte.utah.edu

Thank you to all who participated in the Garden Member Challenge that ended on June 6. Special thanks to Laurie Eastwood and Kym Buttschardt for matching those donations up to $2000.

Visit the  Nature Connects: Art with LEGO Bricks exhibition page to see all the fun events planned this summer!


text:
package org.hibernate.cache.ehcache.internal.nonstop;

import net.sf.ehcache.constructs.nonstop.NonStopCacheException;

import org.hibernate.cache.CacheException;
import org.hibernate.cache.spi.CollectionRegion;
import org.hibernate.cache.spi.access.CollectionRegionAccessStrategy;
import org.hibernate.cache.spi.access.SoftLock;

/**
 * Implementation of {@link CollectionRegionAccessStrategy} that handles {@link NonStopCacheException} using
 * {@link HibernateNonstopCacheExceptionHandler}
 *
 * @author Abhishek Sanoujam
 * @author Alex Snaps
 */
public class NonstopAwareCollectionRegionAccessStrategy implements CollectionRegionAccessStrategy {

	private final CollectionRegionAccessStrategy actualStrategy;
	private final HibernateNonstopCacheExceptionHandler hibernateNonstopExceptionHandler;

	/**
	 * Constructor accepting the actual {@link CollectionRegionAccessStrategy} and the {@link HibernateNonstopCacheExceptionHandler}
	 *
	 * @param actualStrategy
	 * @param hibernateNonstopExceptionHandler
	 */
	public NonstopAwareCollectionRegionAccessStrategy(CollectionRegionAccessStrategy actualStrategy,
													  HibernateNonstopCacheExceptionHandler hibernateNonstopExceptionHandler) {
		this.actualStrategy = actualStrategy;
		this.hibernateNonstopExceptionHandler = hibernateNonstopExceptionHandler;
	}

	/**
	 * {@inheritDoc}
	 *
	 * @see org.hibernate.cache.spi.access.EntityRegionAccessStrategy#getRegion()
	 */
	public CollectionRegion getRegion() {
		return actualStrategy.getRegion();
	}

	/**
	 * {@inheritDoc}
	 *
	 * @see org.hibernate.cache.spi.access.EntityRegionAccessStrategy#evict(java.lang.Object)
	 */
	public void evict(Object key) throws CacheException {
		try {
			actualStrategy.evict( key );
		}
		catch ( NonStopCacheException nonStopCacheException ) {
			hibernateNonstopExceptionHandler.handleNonstopCacheException( nonStopCacheException );
		}
	}

	/**
	 * {@inheritDoc}
	 *
	 * @see org.hibernate.cache.spi.access.EntityRegionAccessStrategy#evictAll()
	 */
	public void evictAll() throws CacheException {
		try {
			actualStrategy.evictAll();
		}
		catch ( NonStopCacheException nonStopCacheException ) {
			hibernateNonstopExceptionHandler.handleNonstopCacheException( nonStopCacheException );
		}
	}

	/**
	 * {@inheritDoc}
	 *
	 * @see org.hibernate.cache.spi.access.EntityRegionAccessStrategy#get(java.lang.Object, long)
	 */
	public Object get(Object key, long txTimestamp) throws CacheException {
		try {
			return actualStrategy.get( key, txTimestamp );
		}
		catch ( NonStopCacheException nonStopCacheException ) {
			hibernateNonstopExceptionHandler.handleNonstopCacheException( nonStopCacheException );
			return null;
		}
	}

	/**
	 * {@inheritDoc}
	 *
	 * @see org.hibernate.cache.spi.access.EntityRegionAccessStrategy#lockItem(java.lang.Object, java.lang.Object)
	 */
	public SoftLock lockItem(Object key, Object version) throws CacheException {
		try {
			return actualStrategy.lockItem( key, version );
		}
		catch ( NonStopCacheException nonStopCacheException ) {
			hibernateNonstopExceptionHandler.handleNonstopCacheException( nonStopCacheException );
			return null;
		}
	}

	/**
	 * {@inheritDoc}
	 *
	 * @see org.hibernate.cache.spi.access.EntityRegionAccessStrategy#lockRegion()
	 */
	public SoftLock lockRegion() throws CacheException {
		try {
			return actualStrategy.lockRegion();
		}
		catch ( NonStopCacheException nonStopCacheException ) {
			hibernateNonstopExceptionHandler.handleNonstopCacheException( nonStopCacheException );
			return null;
		}
	}

	/**
	 * {@inheritDoc}
	 *
	 * @see org.hibernate.cache.spi.access.EntityRegionAccessStrategy#putFromLoad(java.lang.Object, java.lang.Object, long, java.lang.Object,
	 *	  boolean)
	 */
	public boolean putFromLoad(Object key, Object value, long txTimestamp, Object version, boolean minimalPutOverride)
			throws CacheException {
		try {
			return actualStrategy.putFromLoad( key, value, txTimestamp, version, minimalPutOverride );
		}
		catch ( NonStopCacheException nonStopCacheException ) {
			hibernateNonstopExceptionHandler.handleNonstopCacheException( nonStopCacheException );
			return false;
		}
	}

	/**
	 * {@inheritDoc}
	 *
	 * @see org.hibernate.cache.spi.access.EntityRegionAccessStrategy#putFromLoad(java.lang.Object, java.lang.Object, long, java.lang.Object)
	 */
	public boolean putFromLoad(Object key, Object value, long txTimestamp, Object version) throws CacheException {
		try {
			return actualStrategy.putFromLoad( key, value, txTimestamp, version );
		}
		catch ( NonStopCacheException nonStopCacheException ) {
			hibernateNonstopExceptionHandler.handleNonstopCacheException( nonStopCacheException );
			return false;
		}
	}

	/**
	 * {@inheritDoc}
	 *
	 * @see org.hibernate.cache.spi.access.EntityRegionAccessStrategy#remove(java.lang.Object)
	 */
	public void remove(Object key) throws CacheException {
		try {
			actualStrategy.remove( key );
		}
		catch ( NonStopCacheException nonStopCacheException ) {
			hibernateNonstopExceptionHandler.handleNonstopCacheException( nonStopCacheException );
		}
	}

	/**
	 * {@inheritDoc}
	 *
	 * @see org.hibernate.cache.spi.access.EntityRegionAccessStrategy#removeAll()
	 */
	public void removeAll() throws CacheException {
		try {
			actualStrategy.removeAll();
		}
		catch ( NonStopCacheException nonStopCacheException ) {
			hibernateNonstopExceptionHandler.handleNonstopCacheException( nonStopCacheException );
		}
	}

	/**
	 * {@inheritDoc}
	 *
	 * @see org.hibernate.cache.spi.access.EntityRegionAccessStrategy#unlockItem(java.lang.Object, org.hibernate.cache.spi.access.SoftLock)
	 */
	public void unlockItem(Object key, SoftLock lock) throws CacheException {
		try {
			actualStrategy.unlockItem( key, lock );
		}
		catch ( NonStopCacheException nonStopCacheException ) {
			hibernateNonstopExceptionHandler.handleNonstopCacheException( nonStopCacheException );
		}
	}

	/**
	 * {@inheritDoc}
	 *
	 * @see org.hibernate.cache.spi.access.EntityRegionAccessStrategy#unlockRegion(org.hibernate.cache.spi.access.SoftLock)
	 */
	public void unlockRegion(SoftLock lock) throws CacheException {
		try {
			actualStrategy.unlockRegion( lock );
		}
		catch ( NonStopCacheException nonStopCacheException ) {
			hibernateNonstopExceptionHandler.handleNonstopCacheException( nonStopCacheException );
		}
	}

}


text:
"""Base classes for the CMS admin interface."""

from django.contrib import admin
from django.contrib.auth.models import User
from django.contrib.admin.sites import NotRegistered

try:
    from usertools.admin import UserAdmin
except ImportError:
    from django.contrib.auth.admin import UserAdmin

from cms import externals
from cms.models.base import SearchMetaBaseSearchAdapter, PageBaseSearchAdapter
from cms.forms import CMSAdminPasswordChangeForm

class PublishedBaseAdmin(admin.ModelAdmin):

    """Base admin class for published models."""

    change_form_template = "admin/cms/publishedmodel/change_form.html"

class OnlineBaseAdmin(PublishedBaseAdmin):

    """Base admin class for OnlineModelBase instances."""

    actions = ("publish_selected", "unpublish_selected",)

    list_display = ("__str__", "is_online",)

    list_filter = ("is_online",)

    PUBLICATION_FIELDS = ("Publication", {
        "fields": ("is_online",),
        "classes": ("collapse",),
    })

    # Custom admin actions.

    def publish_selected(self, request, queryset):
        """Publishes the selected models."""
        queryset.update(is_online=True)
    publish_selected.short_description = "Place selected %(verbose_name_plural)s online"

    def unpublish_selected(self, request, queryset):
        """Unpublishes the selected models."""
        queryset.update(is_online=False)
    unpublish_selected.short_description = "Take selected %(verbose_name_plural)s offline"

class SearchMetaBaseAdmin(OnlineBaseAdmin):

    """Base admin class for SearchMetaBase models."""

    adapter_cls = SearchMetaBaseSearchAdapter

    list_display = ("__str__", "is_online",)

    SEO_FIELDS = ("Search engine optimization", {
        "fields": ("browser_title", "meta_description", "sitemap_priority", "sitemap_changefreq", "robots_index", "robots_follow", "robots_archive",),
        "classes": ("collapse",),
    })

    OPENGRAPH_FIELDS = ("Open graph", {
        "fields": ("og_title", "og_description", "og_image"),
        "classes": ("collapse",)
    })

    OPENGRAPH_TWITTER_FIELDS = ("Open graph twitter", {
        "fields": ("twitter_card", "twitter_title", "twitter_description", "twitter_image"),
        "classes": ("collapse",)
    })

if externals.reversion:
    class SearchMetaBaseAdmin(SearchMetaBaseAdmin, externals.reversion["admin.VersionMetaAdmin"]):
        list_display = SearchMetaBaseAdmin.list_display + ("get_date_modified",)

if externals.watson:
    class SearchMetaBaseAdmin(SearchMetaBaseAdmin, externals.watson["admin.SearchAdmin"]):
        pass

class PageBaseAdmin(SearchMetaBaseAdmin):

    """Base admin class for PageBase models."""

    prepopulated_fields = {"slug": ("title",), }

    search_fields = ("title", "short_title", "meta_description",)

    adapter_cls = PageBaseSearchAdapter

    TITLE_FIELDS = (None, {
        "fields": ("title", "slug",),
    })

    NAVIGATION_FIELDS = ("Navigation", {
        "fields": ("short_title",),
        "classes": ("collapse",),
    })

    fieldsets = [
        TITLE_FIELDS,
        OnlineBaseAdmin.PUBLICATION_FIELDS,
        NAVIGATION_FIELDS,
        SearchMetaBaseAdmin.SEO_FIELDS,
        SearchMetaBaseAdmin.OPENGRAPH_FIELDS,
        SearchMetaBaseAdmin.OPENGRAPH_TWITTER_FIELDS
    ]

class CMSUserAdmin(UserAdmin):
    change_password_form = CMSAdminPasswordChangeForm
    invite_confirm_form = CMSAdminPasswordChangeForm

try:
    admin.site.unregister(User)
except NotRegistered:
    pass

admin.site.register(User, CMSUserAdmin)


text:
SYNONYM

#### According to
GRIN Taxonomy for Plants

#### Published in
Mitt. Deutsch. Dendrol. Ges. 6:24. 1897

#### Original name
null

### Remarks
null


text:
import base from '../src/base/';
import routingMiddleware from './middleware/routing-middleware';

const applyServerRouting = (app) => {

  app.use(routingMiddleware);
  base.console.success(`Routing up`);
};

export default applyServerRouting;


text:
/**
 * This is an example of a basic node.js script that performs
 * the Authorization Code oAuth2 flow to authenticate against
 * the Spotify Accounts.
 *
 * For more information, read
 * https://developer.spotify.com/web-api/authorization-guide/#authorization_code_flow
 */

var express = require('express'); // Express web server framework
var request = require('request'); // "Request" library
var querystring = require('querystring');
var cookieParser = require('cookie-parser');
var SpotifyWebApi = require('spotify-web-api-node');

// credentials are optional
var spotifyApi = new SpotifyWebApi({
  clientId : 'd1033531311a43b38b3cedbd9b363367',
  clientSecret : '*',
  redirectUri : 'http://localhost:9999/callback'
});

var client_id = 'd1033531311a43b38b3cedbd9b363367'; // Your client id
var client_secret = '*'; // Your client secret, REDACTED FOR SECURITY
var redirect_uri = 'http://localhost:9999/callback'; // Your redirect uri

/**
 * Generates a random string containing numbers and letters
 * @param  {number} length The length of the string
 * @return {string} The generated string
 */
var generateRandomString = function(length) {
  var text = '';
  var possible = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789';

  for (var i = 0; i < length; i++) {
    text += possible.charAt(Math.floor(Math.random() * possible.length));
  }
  return text;
};

var stateKey = 'spotify_auth_state';

var app = express();

app.use(express.static(__dirname + '/public'))
   .use(cookieParser());

app.get('/login', function(req, res) {

  var state = generateRandomString(16);
  res.cookie(stateKey, state);

  // your application requests authorization
  var scope = 'user-read-private user-read-email playlist-modify-public';
  res.redirect('https://accounts.spotify.com/authorize?' +
    querystring.stringify({
      response_type: 'code',
      client_id: client_id,
      scope: scope,
      redirect_uri: redirect_uri,
      state: state
    }));
});

app.get('/callback', function(req, res) {

  // your application requests refresh and access tokens
  // after checking the state parameter

  var code = req.query.code || null;
  var state = req.query.state || null;
  var storedState = req.cookies ? req.cookies[stateKey] : null;

  if (state === null || state !== storedState) {
    res.redirect('/#' +
      querystring.stringify({
        error: 'state_mismatch'
      }));
  } else {
    res.clearCookie(stateKey);
    var authOptions = {
      url: 'https://accounts.spotify.com/api/token',
      form: {
        code: code,
        redirect_uri: redirect_uri,
        grant_type: 'authorization_code',
        client_id: client_id,
        client_secret: client_secret
      },
      json: true
    };

    request.post(authOptions, function(error, response, body) {
      if (!error && response.statusCode === 200) {

        var access_token = body.access_token,
            refresh_token = body.refresh_token,
            userId = '';

        spotifyApi.setAccessToken(body.access_token);

        var options = {
          url: 'https://api.spotify.com/v1/me',
          headers: { 'Authorization': 'Bearer ' + access_token },
          json: true
        };

        // use the access token to access the Spotify Web API
        request.get(options, function(error, response, body) {
          console.log(body);
          userId = body.id;
          var playlistId = '5LlGzhzxGrjoG3YR2KWBmd';

          //get a list of playlists
          var playlistReq = {
            url: 'https://api.spotify.com/v1/users/' + userId + '/playlists/' + playlistId + '/tracks',
            headers: { 'Authorization': 'Bearer ' + access_token },
            form: {
              uris: ['spotify:track:4iV5W9uYEdYUVa79Axb7Rh']
            },
            json: true
          };
          spotifyApi.addTracksToPlaylist(userId, playlistId, ["spotify:track:5kqIPrATaCc2LqxVWzQGbk", ""])
          .then(function(data) {
            console.log(data);
          }, function(err) {
            console.log(err);
          });
        });

        // we can also pass the token to the browser to make requests from there
        res.redirect('/#' +
          querystring.stringify({
            access_token: access_token,
            refresh_token: refresh_token
          }));
      } else {
        res.redirect('/#' +
          querystring.stringify({
            error: 'invalid_token'
          }));
      }
    });
  }
});

app.post('/search', function(req, res) {
  console.log(req.body);
  spotifyApi.searchTracks(req.body.search)
  .then(function(data) {
    console.log(data);
  },
  function(err) {
    console.log(err);
  });
  res.redirect('/');
});

app.get('/refresh_token', function(req, res) {

  // requesting access token from refresh token
  var refresh_token = req.query.refresh_token;
  var authOptions = {
    url: 'https://accounts.spotify.com/api/token',
    headers: { 'Authorization': 'Basic ' + (new Buffer(client_id + ':' + client_secret).toString('base64')) },
    form: {
      grant_type: 'refresh_token',
      refresh_token: refresh_token
    },
    json: true
  };

  request.post(authOptions, function(error, response, body) {
    if (!error && response.statusCode === 200) {
      var access_token = body.access_token;
      res.send({
        'access_token': access_token
      });
    }
  });
});

console.log('Listening on 9999');
app.listen(9999);


text:
/* vi: set sw=4 ts=4: */
/*
 * lookup.c --- ext2fs directory lookup operations
 *
 * Copyright (C) 1993, 1994, 1994, 1995 Theodore Ts'o.
 *
 * %Begin-Header%
 * This file may be redistributed under the terms of the GNU Public
 * License.
 * %End-Header%
 */

#include <stdio.h>
#include <string.h>
#if HAVE_UNISTD_H
#include <unistd.h>
#endif

#include "ext2_fs.h"
#include "ext2fs.h"

struct lookup_struct  {
	const char	*name;
	int		len;
	ext2_ino_t	*inode;
	int		found;
};

#ifdef __TURBOC__
# pragma argsused
#endif
static int lookup_proc(struct ext2_dir_entry *dirent,
		       int	offset EXT2FS_ATTR((unused)),
		       int	blocksize EXT2FS_ATTR((unused)),
		       char	*buf EXT2FS_ATTR((unused)),
		       void	*priv_data)
{
	struct lookup_struct *ls = (struct lookup_struct *) priv_data;

	if (ls->len != (dirent->name_len & 0xFF))
		return 0;
	if (strncmp(ls->name, dirent->name, (dirent->name_len & 0xFF)))
		return 0;
	*ls->inode = dirent->inode;
	ls->found++;
	return DIRENT_ABORT;
}

errcode_t ext2fs_lookup(ext2_filsys fs, ext2_ino_t dir, const char *name,
			int namelen, char *buf, ext2_ino_t *inode)
{
	errcode_t	retval;
	struct lookup_struct ls;

	EXT2_CHECK_MAGIC(fs, EXT2_ET_MAGIC_EXT2FS_FILSYS);

	ls.name = name;
	ls.len = namelen;
	ls.inode = inode;
	ls.found = 0;

	retval = ext2fs_dir_iterate(fs, dir, 0, buf, lookup_proc, &ls);
	if (retval)
		return retval;

	return (ls.found) ? 0 : EXT2_ET_FILE_NOT_FOUND;
}


text:
package com.palmelf.eoffice.action.info;

import java.lang.reflect.Type;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;

import javax.annotation.Resource;

import org.apache.commons.lang.StringUtils;

import com.google.gson.Gson;
import com.google.gson.GsonBuilder;
import com.google.gson.reflect.TypeToken;
import com.palmelf.core.command.QueryFilter;
import com.palmelf.core.util.StringUtil;
import com.palmelf.core.web.action.BaseAction;
import com.palmelf.core.web.paging.PagingBean;
import com.palmelf.eoffice.model.info.News;
import com.palmelf.eoffice.model.info.NewsType;
import com.palmelf.eoffice.service.info.NewsService;
import com.palmelf.eoffice.service.info.NewsTypeService;

import flexjson.JSONSerializer;

public class NewsAction extends BaseAction {

	@Resource
	private NewsService newsService;

	@Resource
	private NewsTypeService newsTypeService;
	private News news;
	private List<News> list;
	private Long newsId;
	private Long typeId;
	private NewsType newsType;

	public List<News> getList() {
		return this.list;
	}

	public void setList(List<News> list) {
		this.list = list;
	}

	public Long getTypeId() {
		return this.typeId;
	}

	public void setTypeId(Long typeId) {
		this.typeId = typeId;
	}

	public Long getNewsId() {
		return this.newsId;
	}

	public void setNewsId(Long newsId) {
		this.newsId = newsId;
	}

	public News getNews() {
		return this.news;
	}

	public void setNews(News news) {
		this.news = news;
	}

	public NewsType getNewsType() {
		return this.newsType;
	}

	public void setNewsType(NewsType newsType) {
		this.newsType = newsType;
	}

	@Override
	public String list() {
		QueryFilter filter = new QueryFilter(this.getRequest());
		List<News> list = this.newsService.getAll(filter);

		Type type = new TypeToken<List<News>>() {
		}.getType();
		StringBuffer buff = new StringBuffer("{success:true,'totalCounts':")
				.append(filter.getPagingBean().getTotalItems()).append(
						",result:");

		Gson gson = new GsonBuilder().excludeFieldsWithoutExposeAnnotation()
				.setDateFormat("yyyy-MM-dd").create();
		buff.append(gson.toJson(list, type));
		buff.append("}");

		this.jsonString = buff.toString();

		return "success";
	}

	public String multiDel() {
		String[] ids = this.getRequest().getParameterValues("ids");
		if (ids != null) {
			for (String id : ids) {
				this.newsService.remove(new Long(id));
			}
		}

		this.jsonString = "{success:true}";

		return "success";
	}

	public String get() {
		News news = this.newsService.get(this.newsId);

		JSONSerializer serializer = new JSONSerializer();

		StringBuffer sb = new StringBuffer("{success:true,data:");
		sb.append(serializer.exclude(new String[] { "class", "newsComments" })
				.serialize(news));
		sb.append("}");
		this.setJsonString(sb.toString());

		return "success";
	}

	@Override
	public String save() {
		String isDeskNews = this.getRequest().getParameter("isDeskImage");
		if (StringUtils.isNotEmpty(isDeskNews)) {
			this.news.setIsDeskImage(News.ISDESKNEWS);
		} else {
			this.news.setIsDeskImage(News.NOTDESKNEWS);
		}
		News old = new News();
		Boolean isNew = Boolean.valueOf(false);
		if (this.news.getNewsId() == null) {
			isNew = Boolean.valueOf(true);
		}
		if (this.news.getTypeId() != null) {
			this.setNewsType(this.newsTypeService.get(this.news.getTypeId()));
			this.news.setNewsType(this.newsType);
		}
		if (isNew.booleanValue()) {
			this.news.setCreatetime(new Date());
			this.news.setUpdateTime(new Date());
			this.news.setReplyCounts(Integer.valueOf(0));
			this.news.setViewCounts(Integer.valueOf(0));
			this.newsService.save(this.news);
		} else {
			old = this.newsService.get(this.news.getNewsId());
			this.news.setUpdateTime(new Date());
			this.news.setCreatetime(old.getCreatetime());
			this.news.setViewCounts(Integer.valueOf(old.getViewCounts()
					.intValue() + 1));
			this.news.setReplyCounts(old.getReplyCounts());
			this.newsService.merge(this.news);
		}
		this.setJsonString("{success:true}");
		return "success";
	}

	public String category() {
		List<News> list = null;
		PagingBean pb = this.getInitPagingBean();
		if ((this.typeId != null) && (this.typeId.longValue() > 0L)) {
			list = this.newsService.findByTypeId(this.typeId, pb);
		} else {
			list = this.newsService.getAll(pb);
		}
		Type type = new TypeToken<List<News>>() {
		}.getType();
		StringBuffer buff = new StringBuffer("{success:true,'totalCounts':"
				+ pb.getTotalItems() + ",result:");
		Gson gson = new GsonBuilder().excludeFieldsWithoutExposeAnnotation()
				.create();
		buff.append(gson.toJson(list, type));
		buff.append("}");
		this.setJsonString(buff.toString());
		return "success";
	}

	public String icon() {
		this.setNews(this.newsService.get(this.getNewsId()));
		this.news.setSubjectIcon("");
		this.newsService.save(this.news);
		return "success";
	}

	public String search() {
		PagingBean pb = this.getInitPagingBean();
		String searchContent = this.getRequest().getParameter("searchContent");
		List<News> list = this.newsService.findBySearch(searchContent, pb);
		Type type = new TypeToken<News[]>() {
		}.getType();
		StringBuffer buff = new StringBuffer("{success:true,'totalCounts':")
				.append(pb.getTotalItems()).append(",result:");

		Gson gson = new GsonBuilder().excludeFieldsWithoutExposeAnnotation()
				.create();
		buff.append(gson.toJson(list, type));
		buff.append("}");

		this.jsonString = buff.toString();

		return "success";
	}

	public String display() {
		PagingBean pb = new PagingBean(0, 8);

		List<News> list = this.newsService.findBySearch(null, pb);
		this.getRequest().setAttribute("newsList", list);
		return "display";
	}

	public String image() {
		PagingBean pb = new PagingBean(0, 8);

		List<News> list = this.newsService.findImageNews(pb);
		List<News> newList = new ArrayList<News>();
		for (News news : list) {
			String content = StringUtil.html2Text(news.getContent());
			if (content.length() > 250) {
				content = content.substring(0, 250);
			}
			news.setContent(content);
			newList.add(news);
		}
		this.getRequest().setAttribute("imageNewsList", newList);
		return "image";
	}
}


text:
package org.pitest.mutationtest.engine;

import static org.pitest.mutationtest.LocationMother.aMutationId;

import java.util.Collections;
import java.util.List;

import org.pitest.classinfo.ClassName;
import org.pitest.coverage.TestInfo;
import org.pitest.quickbuilder.Builder;
import org.pitest.quickbuilder.Generator;
import org.pitest.quickbuilder.SequenceBuilder;
import org.pitest.quickbuilder.builders.QB;

public class MutationDetailsMother {

  public interface MutationDetailsBuilder extends
      SequenceBuilder<MutationDetails> {
    MutationDetailsBuilder withId(Builder<MutationIdentifier> id);

    MutationDetailsBuilder withId(MutationIdentifier id);

    MutationDetailsBuilder withFilename(String filename);

    MutationDetailsBuilder withBlock(int block);

    MutationDetailsBuilder withLineNumber(int lineNumber);

    MutationDetailsBuilder withDescription(String desc);

    MutationDetailsBuilder withTestsInOrder(List<TestInfo> tests);

    MutationIdentifier _Id();

    String _Filename();

    int _Block();

    int _LineNumber();

    String _Description();

    List<TestInfo> _TestsInOrder();
  }

  public static MutationDetailsBuilder aMutationDetail() {
    return QB.builder(MutationDetailsBuilder.class, seed()).withBlock(0)
        .withDescription("A mutation").withFilename("foo.java")
        .withId(aMutationId()).withLineNumber(42)
        .withTestsInOrder(Collections.<TestInfo> emptyList());
  }

  private static Generator<MutationDetailsBuilder, MutationDetails> seed() {
    return b -> {
      final MutationDetails md = new MutationDetails(b._Id(), b._Filename(),
          b._Description(), b._LineNumber(), b._Block());
      md.addTestsInOrder(b._TestsInOrder());
      return md;
    };
  }

  public static MutationDetails makeMutation() {
    return makeMutation(ClassName.fromString("foo"));
  }

  public static MutationDetails makeMutation(final ClassName clazz) {
    return new MutationDetails(new MutationIdentifier(Location.location(clazz,
        "aMethod", "()V"), 1, "mutatorId"), "foo.java",
        "A mutation", 0, 0);
  }

}


text:
<?php

namespace TeamNeusta\Magedev\Commands\Magento;

use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;
use TeamNeusta\Magedev\Commands\AbstractCommand;
use TeamNeusta\Magedev\Runtime\Config;
use TeamNeusta\Magedev\Services\DockerService;

/**
 * Class: RefreshCommand.
 *
 * @see AbstractCommand
 */
class RefreshCommand extends AbstractCommand
{
    /**
     * @var \TeamNeusta\Magedev\Runtime\Config
     */
    protected $config;

    /**
     * @var \TeamNeusta\Magedev\Services\DockerService
     */
    protected $dockerService;

    /**
     * __construct.
     *
     * @param \TeamNeusta\Magedev\Runtime\Config         $config
     * @param \TeamNeusta\Magedev\Services\DockerService $dockerService
     */
    public function __construct(
        \TeamNeusta\Magedev\Runtime\Config $config,
        \TeamNeusta\Magedev\Services\DockerService $dockerService
    ) {
        $this->config = $config;
        $this->dockerService = $dockerService;
        parent::__construct();
    }

    /**
     * configure.
     */
    protected function configure()
    {
        $this->setName('magento:refresh');
        $this->setDescription('deletes generated files var/generation, var/di ... only Magento2');
    }

    /**
     * execute.
     *
     * @param InputInterface  $input
     * @param OutputInterface $output
     */
    public function execute(InputInterface $input, OutputInterface $output)
    {
        $magentoVersion = $this->config->getMagentoVersion();
        // only required for magento2
        if ($magentoVersion == '2') {
            foreach ([
                'rm -rf var/generation/*',
                'rm -rf var/di/*',
                'rm -rf var/cache/*',
                'rm -rf var/view_preprocessed/*',
                'rm -rf pub/static/_requirejs',
                'rm -rf pub/static/adminhtml',
                'rm -rf pub/static/frontend',
            ] as $cmd) {
                $this->dockerService->execute($cmd);
            }
        }
    }
}


text:
<!DOCTYPE html>

		<meta charset="utf-8">
		<meta http-equiv="X-UA-Compatible" content="IE=edge">
		<meta name="viewport" content="width=device-width, initial-scale=1.0">
		<meta name="description" content="Display CYTHS admin page">
		<meta name="author" content="CYOSP">
		<title data-i18n="admin.label">Admin</title>
		<link rel="icon" type="image/x-icon" href="../img/favicon.ico">

		<link href="../css/bootstrap.min.css" rel="stylesheet">
		<link href="../css/font-awesome.min.css" rel="stylesheet">
		<link href="../css/cyths-admin.css" rel="stylesheet">

				  			<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar">

				  			</button>

				  			Admin

Crontab

Sensors

Association

Dissociation - step 1

Dissociation - step 2


text:
require 'dispatch/utils'

# @api dispatch
module UserController
  # Creates a new user in the database.
  # @param args [Hash{name=>String, mail=>String, password=>String, level=>level}] There must be a key `:name`, `:mail` and `:password`.
  # @return [Boolean] Has the user has been created.
  def create_user(args)
    hash_passwd = Utils::hash_and_salt_password(args["password"])
    user = {
      name: args["name"],
      mail: args["mail"],
      password: hash_passwd[:password].force_encoding('utf-8'),
      password_salt: hash_passwd[:salt].force_encoding('utf-8'),
      token_salt: Digest::MD5.base64digest(args["name"])[0..5],
      level: args["level"]
    }
    User.create(user)
  end

  # Modify the user with the given id.
  # @param args [Hash{id=>Integer, ...}] There must be a key `:id` and the key with the attributes to modify.
  # @return [Boolean] Is something has been edited.
  def edit_user(args)
  end

  # Get the user with the given id.
  # @param args [Integer].
  # @return [Hash{id=>Integer, name=>String, mail=>String, password_salt=>String, token_salt=>String}] The hash of the user attributes (id, name, mail, password_salt, token_salt).
  def show_user(args)
  end

  # Delete the user with the given id.
  # @param id [Integer] The id of the user to delete.
  # @return [Boolean] Is something has been deleted.
  def destroy_user(id)
    #TODO:
    # ADD SOME USER LEVEL TO AVOID THESE
  end

  # Identify the user with the given mail and hashed_password.
  # @param args [Hash{mail=>String, password=>String}] The hash containing the key `:mail` and `password`.
  # @return [Boolean] Is something has been deleted.
  def identify_user(args)
  end

  # Send the salt for the password from the given user id or mail
  # param args [Hash{id=>Integer, mail=>String}] The id and/or the mail of the user.
  # @return [String] The salt for the password.
  def get_salt_user(args)
  end
end


text:
/*

Jappix - An open social platform
These are the popup JS scripts for Jappix

-------------------------------------------------

License: AGPL
Author: Valérian Saliou
Last revision: 26/04/11

*/

// Creates a popup code
function createPopup(id, content) {
	// Popup exists?
	if(exists('#' + id))
		return false;

	// Append the popup code
	$('body').append(
		'
' +
			'
' +
				content +
			'
' +
		'
'
	);

	return true;
}

// Destroys a popup code
function destroyPopup(id) {
	// Stop the popup timers
	$('#' + id + ' *').stopTime();

	// Remove the popup
	$('#' + id).remove();

	// Manage input focus
	inputFocus();
}


text:
package org.apache.hedwig.server.topics;

import java.util.concurrent.Executors;
import java.util.concurrent.ScheduledExecutorService;
import java.util.concurrent.SynchronousQueue;
import java.util.concurrent.Semaphore;

import org.apache.zookeeper.KeeperException;
import org.junit.After;
import org.junit.Assert;
import org.junit.Before;
import org.junit.Test;

import com.google.protobuf.ByteString;
import org.apache.hedwig.exceptions.PubSubException;
import org.apache.hedwig.exceptions.PubSubException.CompositeException;
import org.apache.hedwig.server.common.ServerConfiguration;
import org.apache.hedwig.util.Callback;
import org.apache.hedwig.util.ConcurrencyUtils;
import org.apache.hedwig.util.Either;
import org.apache.hedwig.util.HedwigSocketAddress;
import org.apache.hedwig.util.Pair;
import org.apache.hedwig.zookeeper.ZooKeeperTestBase;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

public class TestZkTopicManager extends ZooKeeperTestBase {

    static Logger LOG = LoggerFactory.getLogger(TestZkTopicManager.class);

    protected ZkTopicManager tm;

    protected class CallbackQueue<T> implements Callback<T> {
        SynchronousQueue<Either<T, Exception>> q = new SynchronousQueue<Either<T, Exception>>();

        public SynchronousQueue<Either<T, Exception>> getQueue() {
            return q;
        }

        public Either<T, Exception> take() throws InterruptedException {
            return q.take();
        }

        @Override
        public void operationFailed(Object ctx, final PubSubException exception) {
            LOG.error("got exception: " + exception);
            new Thread(new Runnable() {
                @Override
                public void run() {
                    ConcurrencyUtils.put(q, Either.of((T) null, (Exception) exception));
                }
            }).start();
        }

        @Override
        public void operationFinished(Object ctx, final T resultOfOperation) {
            new Thread(new Runnable() {
                @Override
                public void run() {
                    ConcurrencyUtils.put(q, Either.of(resultOfOperation, (Exception) null));
                }
            }).start();
        }
    }

    protected CallbackQueue<HedwigSocketAddress> addrCbq = new CallbackQueue<HedwigSocketAddress>();
    protected CallbackQueue<ByteString> bsCbq = new CallbackQueue<ByteString>();
    protected CallbackQueue<Void> voidCbq = new CallbackQueue<Void>();

    protected ByteString topic = ByteString.copyFromUtf8("topic");
    protected ServerConfiguration cfg;
    protected HedwigSocketAddress me;
    protected ScheduledExecutorService scheduler;

    @Override
    @Before
    public void setUp() throws Exception {
        super.setUp();
        cfg = new ServerConfiguration();
        me = cfg.getServerAddr();
        scheduler = Executors.newSingleThreadScheduledExecutor();
        tm = new ZkTopicManager(zk, cfg, scheduler);
    }

    @Override
    @After
    public void tearDown() throws Exception {
        tm.stop();
        super.tearDown();
    }

    @Test
    public void testGetOwnerSingle() throws Exception {
        tm.getOwner(topic, false, addrCbq, null);
        Assert.assertEquals(me, check(addrCbq.take()));
    }

    protected ByteString mkTopic(int i) {
        return ByteString.copyFromUtf8(topic.toStringUtf8() + i);
    }

    protected <T> T check(Either<T, Exception> ex) throws Exception {
        if (ex.left() == null)
            throw ex.right();
        else
            return ex.left();
    }

    public static class CustomServerConfiguration extends ServerConfiguration {
        int port;

        public CustomServerConfiguration(int port) {
            this.port = port;
        }

        @Override
        public int getServerPort() {
            return port;
        }
    }

    @Test
    public void testGetOwnerMulti() throws Exception {
        ServerConfiguration cfg1 = new CustomServerConfiguration(cfg.getServerPort() + 1), cfg2 = new CustomServerConfiguration(
            cfg.getServerPort() + 2);
        // TODO change cfg1 cfg2 params
        ZkTopicManager tm1 = new ZkTopicManager(zk, cfg1, scheduler),
                       tm2 = new ZkTopicManager(zk, cfg2, scheduler);

        tm.getOwner(topic, false, addrCbq, null);
        HedwigSocketAddress owner = check(addrCbq.take());

        // If we were told to have another person claim the topic, make them
        // claim the topic.
        if (owner.getPort() == cfg1.getServerPort())
            tm1.getOwner(topic, true, addrCbq, null);
        else if (owner.getPort() == cfg2.getServerPort())
            tm2.getOwner(topic, true, addrCbq, null);
        if (owner.getPort() != cfg.getServerPort())
            Assert.assertEquals(owner, check(addrCbq.take()));

        for (int i = 0; i < 100; ++i) {
            tm.getOwner(topic, false, addrCbq, null);
            Assert.assertEquals(owner, check(addrCbq.take()));

            tm1.getOwner(topic, false, addrCbq, null);
            Assert.assertEquals(owner, check(addrCbq.take()));

            tm2.getOwner(topic, false, addrCbq, null);
            Assert.assertEquals(owner, check(addrCbq.take()));
        }

        // Give us 100 chances to choose another owner if not shouldClaim.
        for (int i = 0; i < 100; ++i) {
            if (!owner.equals(me))
                break;
            tm.getOwner(mkTopic(i), false, addrCbq, null);
            owner = check(addrCbq.take());
            if (i == 99)
                Assert.fail("Never chose another owner");
        }

        // Make sure we always choose ourselves if shouldClaim.
        for (int i = 0; i < 100; ++i) {
            tm.getOwner(mkTopic(100), true, addrCbq, null);
            Assert.assertEquals(me, check(addrCbq.take()));
        }

        tm1.stop();
        tm2.stop();
    }

    @Test
    public void testLoadBalancing() throws Exception {
        tm.getOwner(topic, false, addrCbq, null);

        Assert.assertEquals(me, check(addrCbq.take()));

        ServerConfiguration cfg1 = new CustomServerConfiguration(cfg.getServerPort() + 1);
        TopicManager tm1 = new ZkTopicManager(zk, cfg1, scheduler);

        ByteString topic1 = mkTopic(1);
        tm.getOwner(topic1, false, addrCbq, null);
        Assert.assertEquals(cfg1.getServerAddr(), check(addrCbq.take()));

        tm1.stop();
    }

    @Test
    public void testBookkeepingRegionSubscription() throws Exception {
        ByteString topic1 = mkTopic(1);
        final String regionAddress = "129.3.1.2";   // remote region VIP
        final Semaphore mutex = new Semaphore(1);
        final Callback<Void> cbFinished = new Callback<Void>() {
            @Override
            public void operationFinished(Object ctx, Void result) {
                mutex.release();
            }
            @Override
            public void operationFailed(Object ctx, PubSubException exception) {
                mutex.release();
                Assert.fail("operationFailed called unexpectedly");
            }
        };
        final Callback<Void> cbFailed = new Callback<Void>() {
            @Override
            public void operationFinished(Object ctx, Void result) {
                mutex.release();
                Assert.fail("operationFinished called unexpectedly");
            }
            @Override
            public void operationFailed(Object ctx, PubSubException exception) {
                mutex.release();
            }
        };

        ServerConfiguration cfg1 = new CustomServerConfiguration(cfg.getServerPort() + 1);
        ZkTopicManager tm1 = new ZkTopicManager(zk, cfg1, scheduler);

        mutex.drainPermits();
        Assert.assertEquals(tm1.getZkNodeVersion(regionAddress, topic1), -1);

        tm1.checkTopicSubscribedFromRegion(topic1, regionAddress, cbFailed, null, null);
        mutex.acquire(); // Acquire mutex to wait for callback
        tm1.setTopicSubscribedFromRegion(topic1, regionAddress, cbFinished, null);
        mutex.acquire(); // Acquire mutex to wait for callback
        Assert.assertEquals(tm1.getZkNodeVersion(regionAddress, topic1), 0);
        tm1.checkTopicSubscribedFromRegion(topic1, regionAddress, cbFinished, null, null);
        mutex.acquire(); // Acquire mutex to wait for callback
        tm1.setTopicSubscribedFromRegion(topic1, regionAddress, cbFinished, null);
        mutex.acquire(); // Acquire mutex to wait for callback
        Assert.assertEquals(tm1.getZkNodeVersion(regionAddress, topic1), 1);
        tm1.setTopicUnsubscribedFromRegion(topic1, regionAddress, cbFinished, null);
        mutex.acquire(); // Acquire mutex to wait for callback
        Assert.assertEquals(tm1.getZkNodeVersion(regionAddress, topic1), -1);
        tm1.setTopicUnsubscribedFromRegion(topic1, regionAddress, cbFailed, null);
        mutex.acquire(); // Acquire mutex to wait for callback
        tm1.checkTopicSubscribedFromRegion(topic1, regionAddress, cbFailed, null, null);

        tm1.stop();
    }

    class StubOwnershipChangeListener implements TopicOwnershipChangeListener {
        boolean failure;
        SynchronousQueue<Pair<ByteString, Boolean>> bsQueue;

        public StubOwnershipChangeListener(SynchronousQueue<Pair<ByteString, Boolean>> bsQueue) {
            this.bsQueue = bsQueue;
        }

        public void setFailure(boolean failure) {
            this.failure = failure;
        }

        @Override
        public void lostTopic(final ByteString topic) {
            new Thread(new Runnable() {
                @Override
                public void run() {
                    ConcurrencyUtils.put(bsQueue, Pair.of(topic, false));
                }
            }).start();
        }

        public void acquiredTopic(final ByteString topic, final Callback<Void> callback, final Object ctx) {
            new Thread(new Runnable() {
                @Override
                public void run() {
                    ConcurrencyUtils.put(bsQueue, Pair.of(topic, true));
                    if (failure) {
                        callback.operationFailed(ctx, new PubSubException.ServiceDownException("Asked to fail"));
                    } else {
                        callback.operationFinished(ctx, null);
                    }
                }
            }).start();
        }
    }

    @Test
    public void testOwnershipChange() throws Exception {
        SynchronousQueue<Pair<ByteString, Boolean>> bsQueue = new SynchronousQueue<Pair<ByteString, Boolean>>();

        StubOwnershipChangeListener listener = new StubOwnershipChangeListener(bsQueue);

        tm.addTopicOwnershipChangeListener(listener);

        // regular acquire
        tm.getOwner(topic, true, addrCbq, null);
        Pair<ByteString, Boolean> pair = bsQueue.take();
        Assert.assertEquals(topic, pair.first());
        Assert.assertTrue(pair.second());
        Assert.assertEquals(me, check(addrCbq.take()));
        assertOwnershipNodeExists();

        // topic that I already own
        tm.getOwner(topic, true, addrCbq, null);
        Assert.assertEquals(me, check(addrCbq.take()));
        Assert.assertTrue(bsQueue.isEmpty());
        assertOwnershipNodeExists();

        // regular release
        tm.releaseTopic(topic, cb, null);
        pair = bsQueue.take();
        Assert.assertEquals(topic, pair.first());
        Assert.assertFalse(pair.second());
        Assert.assertTrue(queue.take());
        assertOwnershipNodeDoesntExist();

        // releasing topic that I don't own
        tm.releaseTopic(mkTopic(0), cb, null);
        Assert.assertTrue(queue.take());
        Assert.assertTrue(bsQueue.isEmpty());

        // set listener to return error
        listener.setFailure(true);

        tm.getOwner(topic, true, addrCbq, null);
        pair = bsQueue.take();
        Assert.assertEquals(topic, pair.first());
        Assert.assertTrue(pair.second());
        Assert.assertEquals(PubSubException.ServiceDownException.class, ((CompositeException) addrCbq.take().right())
                            .getExceptions().iterator().next().getClass());
        Assert.assertFalse(tm.topics.contains(topic));
        Thread.sleep(100);
        assertOwnershipNodeDoesntExist();

    }

    public void assertOwnershipNodeExists() throws Exception {
        byte[] data = zk.getData(tm.hubPath(topic), false, null);
        Assert.assertEquals(HubInfo.parse(new String(data)).getAddress(),
                            tm.addr);
    }

    public void assertOwnershipNodeDoesntExist() throws Exception {
        try {
            zk.getData(tm.hubPath(topic), false, null);
            Assert.assertTrue(false);
        } catch (KeeperException e) {
            Assert.assertEquals(e.code(), KeeperException.Code.NONODE);
        }
    }

    @Test
    public void testZKClientDisconnected() throws Exception {
        // First assert ownership of the topic
        tm.getOwner(topic, true, addrCbq, null);
        Assert.assertEquals(me, check(addrCbq.take()));

        // Suspend the ZKTopicManager and make sure calls to getOwner error out
        tm.isSuspended = true;
        tm.getOwner(topic, true, addrCbq, null);
        Assert.assertEquals(PubSubException.ServiceDownException.class, addrCbq.take().right().getClass());
        // Release the topic. This should not error out even if suspended.
        tm.releaseTopic(topic, cb, null);
        Assert.assertTrue(queue.take());
        assertOwnershipNodeDoesntExist();

        // Restart the ZKTopicManager and make sure calls to getOwner are okay
        tm.isSuspended = false;
        tm.getOwner(topic, true, addrCbq, null);
        Assert.assertEquals(me, check(addrCbq.take()));
        assertOwnershipNodeExists();
    }

}


text:
package qj.tool.build;

import java.io.*;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
import java.util.List;
import java.util.Map;
import java.util.jar.JarOutputStream;
import java.util.zip.ZipEntry;
import java.util.zip.ZipOutputStream;

import qj.util.*;
import qj.util.funct.F1;
import qj.util.funct.Fs;
import qj.util.funct.P1;
import qj.util.funct.P2;

@SuppressWarnings({"unchecked", "UnusedDeclaration"})
public class BuildUtil {
    public static final String INCLUDE_FILES_KEY = "includeFiles";
    public static final String JAVAW = "javaw";
    public static final String JVMARGS = "jvmargs";
    public static final String ARGS = "args";

    public static void writeZipFile(Collection<String> classpaths, String mainClass, OutputStream out) {
        writeZipFile(classpaths, mainClass, Cols.<String, Object>map(
        		BuildUtil.INCLUDE_FILES_KEY, BuildUtil.includeFiles(SystemUtil.getCurrentDir(), (List<String>)null)
	    ), out);
    }
    public static void writeZipFile(Collection<String> classpaths, String mainClass, OutputStream out, Map config) {
    	writeZipFile(classpaths, mainClass, Cols.merge( Cols.<String, Object>map(
    			BuildUtil.INCLUDE_FILES_KEY, BuildUtil.includeFiles(SystemUtil.getCurrentDir(), (List<String>)null)
    			), config), out);
    }

	public static File buildApp(Class<?> clazz) {
		File outputFile = buildApp(clazz,clazz.getSimpleName());
		System.out.println("Built to: " + outputFile.getAbsolutePath());
		return outputFile;
	}

	public static File buildApp(Class<?> clazz,String appName) {
		File zipFile = new File(appName+ ".zip");
		writeZipFile(SystemUtil.classPaths1(), clazz.getName(), FileUtil.fileOutputStream(zipFile,false));
		return zipFile;
	}

    public static void buildClassesJar() {
    	try {
		    FileOutputStream out = FileUtil.fileOutputStream("target/classes.jar", false);
		    out.write(writeClassDirs(SystemUtil.classPaths1()));
		    IOUtil.close(out);
		} catch (IOException e) {
			throw new RuntimeException(e);
		}
    }

//	public static void buildApp(Class<BenjaminDeployMain> clazz) {
//		// TODO Auto-generated method stub
//
//	}

    public static void writeWrappedAppZipFile(Collection<String> classpaths, String mainClass, Map<String, Object> config, OutputStream out) {
        try {

            final ZipOutputStream zipFile = new ZipOutputStream(out);
            zipFile.setLevel(9);

            // Put classpaths
            copyPaths(classpaths, zipFile, null);
            ArrayList<String> wrapperPaths = wrapperPaths(classpaths, zipFile);
            P2<File, String> zipWrite = ZipUtil.zipWrite(zipFile);

            List<File> includeFiles = (List<File>) config.get(INCLUDE_FILES_KEY);
            FileUtil.eachFile(includeFiles, zipWrite, FileUtil.svn);

            zipFile.putNextEntry(new ZipEntry("run.bat"));
            OutputStreamWriter writer = new OutputStreamWriter(zipFile);
            writer.write(
                    "@echo off\n" +
                    (Boolean.TRUE.equals(config.get(JAVAW)) ? "start javaw" : "java") + " " +
//                    Cols.join((Collection<Object>) config.get(JVMARGS), " ") + " " +   TODO
                    "-cp \"" + Cols.join(wrapperPaths, ";") + "\" " +
                    "qj.util.Wrapper " +
                    mainClass + " " +
                    Cols.join((Collection<Object>) config.get(ARGS), " ") +
                    " %*"
            );
            writer.flush();
            zipFile.closeEntry();

            zipFile.putNextEntry(new ZipEntry("run.sh"));
            writer = new OutputStreamWriter(zipFile);
            writer.write(
                    "java " +
                    "-cp \"" + Cols.join(wrapperPaths, ":") + "\" " +
                    "qj.util.Wrapper " +
                    mainClass + " " +
                    Cols.join((Collection<Object>) config.get(ARGS), " ")
            );
            writer.flush();
            zipFile.closeEntry();

            zipFile.flush();
            zipFile.close();
        } catch (IOException e) {
            throw new RuntimeException(e);
        }
    }

    public static void writeZipFile(Collection<String> classpaths, String mainClass, Map<String, Object> config, OutputStream out) {
        try {

            final ZipOutputStream zipFile = new ZipOutputStream(out);
//            zipFile.setMethod(ZipOutputStream.STORED);

            // Put classpaths
            F1<File, Boolean> excludes = excludes(config.get("exclude"));

            final ArrayList<String> putPaths = copyPaths(classpaths, zipFile, excludes);
            P2<File, String> zipWrite = ZipUtil.zipWrite(zipFile);

            List<File> includeFiles = (List<File>) config.get(INCLUDE_FILES_KEY);
			FileUtil.eachFile(includeFiles, zipWrite, excludes);

            writeRunBat(mainClass, config, zipFile, putPaths);
            writeStartBat(mainClass, config, zipFile, putPaths);

            writeRunSh(mainClass, config, zipFile, putPaths);

            P1<P2<File, String>> zipWriteF = (P1<P2<File, String>>) config.get("zipWriteF");
            if (zipWriteF != null) {
            	zipWriteF.e(zipWrite);
            }

            zipFile.flush();
            zipFile.close();
        } catch (IOException e) {
            throw new RuntimeException(e);
        }
    }

	private static F1<File, Boolean> excludes(Object exclude) {
//		new File(".");
		F1<File, Boolean> ret = FileUtil.svn;
		if (exclude != null) {
			if (exclude instanceof String) {
//				System.out.println("Excluding " + new File((String) exclude));
				ret = Fs.or(ret, ObjectUtil.equalsF(new File((String) exclude).getAbsoluteFile()));
			} else if (exclude instanceof List) {
				List<String> excludes = (List<String>)exclude;
				F1<File, Boolean> excludeConds = Fs.or(Cols.yield(excludes, new F1<String,F1<File,Boolean>>() {public F1<File, Boolean> e(String file) {
					File canonicalFile = FileUtil.getCanonicalFile(new File(file));
					return new F1<File, Boolean>() {public Boolean e(File obj) {
						return ObjectUtil.equals(canonicalFile, FileUtil.getCanonicalFile(obj))
								|| ObjectUtil.equals(canonicalFile, FileUtil.getCanonicalFile(obj.getParentFile()));
					}};
				}}));
				ret = Fs.or(ret, excludeConds);
			}
		}
//		FileUtil.isChild(null, null)
		return ret;
	}
	public static String runCommand(Class<?> clazz) {
		return "java -cp " + Cols.join(SystemUtil.classPaths1(), SystemUtil.classpathSeparator()) + " " + clazz.getName();
	}

	private static void writeRunSh(String mainClass,
			Map<String, Object> config, final ZipOutputStream zipFile,
			final ArrayList<String> putPaths) throws IOException {

		Collection<String> jvmArgs = (Collection<String>) config.get(JVMARGS);
		Collection<String> appArgs = (Collection<String>) config.get(ARGS);

		writeRunSh(mainClass, zipFile, putPaths, jvmArgs, appArgs);
	}

	public static void writeRunSh(String mainClass, ZipOutputStream zipFile, ArrayList<String> putPaths, Collection<String> jvmArgs, Collection<String> appArgs) throws IOException {
		zipFile.putNextEntry(new ZipEntry("run.sh"));
		OutputStreamWriter writer = new OutputStreamWriter(zipFile);
		writer.write(
				"cd \"$( cd \"$( dirname \"${BASH_SOURCE[0]}\" )\" && pwd )\"\n"
				);
		writer.write(
		        "java " +
		        Cols.join(jvmArgs, " ") + " " +
		        "-cp \"" + Cols.join(putPaths, ":") + "\" " +
		        mainClass + " " +
		        Cols.join(appArgs, " ")
		);
		writer.flush();
		zipFile.closeEntry();
	}

	private static void writeStartBat(String mainClass,
			Map<String, Object> config, final ZipOutputStream zipFile,
			final ArrayList<String> putPaths) throws IOException {

		Collection<String> jvmArgs = (Collection<String>) config.get(JVMARGS);
		Collection<String> appArgs = (Collection<String>) config.get(ARGS);

		writeStartBat(mainClass, zipFile, putPaths, jvmArgs, appArgs);
	}

	public static void writeStartBat(String mainClass, ZipOutputStream zipFile, ArrayList<String> putPaths, Collection<String> jvmArgs, Collection<String> appArgs) throws IOException {
		zipFile.putNextEntry(new ZipEntry("start.bat"));
		OutputStreamWriter writer = new OutputStreamWriter(zipFile);
		writer.write(
		        "@echo off\n" +
		        "set PATH=%PATH%;C:\\Program Files (x86)\\Java\\jre6\\bin;C:\\Program Files (x86)\\Java\\jre7\\bin;C:\\Program Files\\Java\\jre7\\bin;C:\\Program Files\\Java\\jre6\\bin;C:\\Program Files\\Java\\jre1.6.0\\bin\n" +
		        "start javaw " +
		        Cols.join(jvmArgs, " ") + " " +
		        "-cp \"" + Cols.join(putPaths, ";") + "\" " +
		        mainClass + " " +
		        Cols.join(appArgs, " ") +
		        " %*"
		);
		writer.flush();
		zipFile.closeEntry();
	}

	private static void writeRunBat(String mainClass,
			Map<String, Object> config, final ZipOutputStream zipFile,
			final ArrayList<String> putPaths) throws IOException {
		Collection<String> jvmArgs = (Collection<String>) config.get(JVMARGS);
		Collection<String> appArgs = (Collection<String>) config.get(ARGS);

		writeRunBat(mainClass, zipFile, putPaths, jvmArgs, appArgs);
	}

	public static void writeRunBat(String mainClass, ZipOutputStream zipFile, ArrayList<String> putPaths, Collection<String> jvmArgs, Collection<String> appArgs) throws IOException {
		zipFile.putNextEntry(new ZipEntry("run.bat"));
		OutputStreamWriter writer = new OutputStreamWriter(zipFile);
		writer.write(
		        "@echo off\n" +
		        "set PATH=%PATH%;C:\\Program Files (x86)\\Java\\jre6\\bin;C:\\Program Files (x86)\\Java\\jre7\\bin;C:\\Program Files\\Java\\jre7\\bin;C:\\Program Files\\Java\\jre6\\bin;C:\\Program Files\\Java\\jre1.6.0\\bin\n" +
		        "java " +
		        Cols.join(jvmArgs, " ") + " " +
		        "-cp \"" + Cols.join(putPaths, ";") + "\" " +
		        mainClass + " " +
		        Cols.join(appArgs, " ") +
		        " %*"
		);
		writer.flush();
		zipFile.closeEntry();
	}

	public static void writeSrcZipFile(List<File> includeFiles, OutputStream out) {
        try {

            final ZipOutputStream zipFile = new ZipOutputStream(out);
//            zipFile.setMethod(ZipOutputStream.STORED);

            // Put classpaths
            P2<File, String> zipWrite = ZipUtil.zipWrite(zipFile);

            FileUtil.eachFile(includeFiles, zipWrite, FileUtil.svn);

            zipFile.flush();
            zipFile.close();
        } catch (IOException e) {
            throw new RuntimeException(e);
        }
    }

    private static ArrayList<String> wrapperPaths(
            Collection<String> paths,
            ZipOutputStream zipFile) {
        final ArrayList<String> putPaths = new ArrayList<>();
        P2<File, String> zipWrite = ZipUtil.zipWrite(zipFile);
        for (final String path : paths) {
            File pathFile = new File(path);
            if (pathFile.isFile() && pathFile.getName().startsWith("quan-util")) {
                String relPath = "data/wrapper";
                putPaths.add(relPath + "/" + pathFile.getName());

                zipWrite.e(pathFile, relPath);
            }
        }
        return putPaths;
    }

    /**
     * Copy classpaths
     * @param excludes
     */
    public static ArrayList<String> copyPaths(
		    Collection<String> paths,
		    final ZipOutputStream zipFile, F1<File, Boolean> excludes) throws IOException {
        final ArrayList<String> putPaths = new ArrayList<String>();
        P2<File, String> zipWrite = ZipUtil.zipWrite(zipFile);

        // Copy all .jar files to package
        for (final String path : paths) {
            File pathFile = new File(path);
            if (pathFile.isFile()) {
                String relPath = "data/lib";
                putPaths.add(relPath + "/" + pathFile.getName());
//                if (pathFile.getName().startsWith("jett")) {
//                	System.out.println();
//                }
                if (excludes == null || !excludes.e(pathFile)) {
                	zipWrite.e(pathFile, relPath);
                }
            }

        }

        String classesJarPath = "data/lib/classes.jar";
        putPaths.add(classesJarPath);
        zipFile.putNextEntry(new ZipEntry(classesJarPath));

        zipFile.write(writeClassDirs(paths));

        zipFile.closeEntry();
        return putPaths;
    }

	public static byte[] writeClassDirs(Collection<String> paths) throws IOException {
		ByteArrayOutputStream bout = new ByteArrayOutputStream();
		final JarOutputStream classesZipFile = new JarOutputStream(bout);

		P2<File, String> classesJarWriteF = ZipUtil.zipWrite(classesZipFile);

		// If a classpath is dir, zip it and put to classes.jar
		for (final String path : paths) {
		    File dir = new File(path);
		    if (dir.isDirectory()) {
		        FileUtil.eachFile(dir, classesJarWriteF, FileUtil.svn);
		    }
		}
		classesZipFile.flush();
		classesZipFile.finish();
		return bout.toByteArray();
	}

	public static List<File> includeFiles(String dir, final List<String> includes) {
        return includeFiles(dir, new F1<File, Boolean>() {
            public Boolean e(File obj) {
                String fileName = obj.getName();
                return
                		fileName.equals("data") ||
                		fileName.endsWith(".properties") ||
                		fileName.endsWith(".txt") ||
                		fileName.endsWith(".so") ||
                		fileName.endsWith(".dll") ||
                		(includes != null && includes.contains(fileName));
            }
        });
    }

    private static List<File> includeFiles(String dir, F1<File, Boolean> workDirInclude) {
        if (dir == null) {
            return Collections.emptyList();
        }
        ArrayList<File> files = new ArrayList<File>();
        for (File file : new File(dir).listFiles()) {
            if (workDirInclude.e(file)) {
                files.add(file);
            }
        }
        return files;
    }
}


text:
@interface MainViewController ()<UITextFieldDelegate>

@property (weak, readonly) NSDictionary *options;

@property (weak, nonatomic) IBOutlet UIScrollView *scrollView;
@property (weak, nonatomic) IBOutlet UIView *contentView;
@property (weak, nonatomic) IBOutlet UIToolbar *toolbar;

@property (weak, nonatomic) IBOutlet UISegmentedControl *segLocation;
@property (weak, nonatomic) IBOutlet UISegmentedControl *segFromDirection;
@property (weak, nonatomic) IBOutlet UISegmentedControl *segToDirection;
@property (weak, nonatomic) IBOutlet UISegmentedControl *inAnimationTypeSegmentedControl;
@property (weak, nonatomic) IBOutlet UISegmentedControl *outAnimationTypeSegmentedControl;
@property (weak, nonatomic) IBOutlet UISegmentedControl *imageAlignmentSegmentedControl;
@property (weak, nonatomic) IBOutlet UISegmentedControl *activityIndicatorAlignmentSegementControl;

@property (weak, nonatomic) IBOutlet UISlider *sliderDuration;
@property (weak, nonatomic) IBOutlet UILabel *lblDuration;

@property (weak, nonatomic) IBOutlet UISwitch *showImageSwitch;
@property (weak, nonatomic) IBOutlet UISwitch *showActivityIndicatorSwitch;
@property (weak, nonatomic) IBOutlet UISwitch *coverNavBarSwitch;
@property (weak, nonatomic) IBOutlet UISwitch *slideOverSwitch;
@property (weak, nonatomic) IBOutlet UISwitch *slideUnderSwitch;
@property (weak, nonatomic) IBOutlet UISwitch *dismissibleWithTapSwitch;
@property (weak, nonatomic) IBOutlet UISwitch *forceUserInteractionSwitch;

@property (weak, nonatomic) IBOutlet UISwitch *statusBarSwitch;
@property (weak, nonatomic) IBOutlet UISwitch *navigationBarSwitch;

@property (weak, nonatomic) IBOutlet UISegmentedControl *segAlignment;
@property (weak, nonatomic) IBOutlet UISegmentedControl *segSubtitleAlignment;

@property (weak, nonatomic) IBOutlet UITextField *txtNotificationMessage;
@property (weak, nonatomic) IBOutlet UITextField *txtSubtitleMessage;

@property (assign, nonatomic) NSTextAlignment textAlignment;

@end

@implementation MainViewController

- (void)viewDidLoad {
    [super viewDidLoad];

    self.automaticallyAdjustsScrollViewInsets = NO;

    [[NSNotificationCenter defaultCenter] addObserver:self
                                             selector:@selector(keyboardWillShow:)
                                                 name:UIKeyboardWillShowNotification
                                               object:nil];

    [[NSNotificationCenter defaultCenter] addObserver:self
                                             selector:@selector(keyboardWillHide:)
                                                 name:UIKeyboardWillHideNotification
                                               object:nil];

    [[NSNotificationCenter defaultCenter] addObserver:self
                                             selector:@selector(orientationChanged:)
                                                 name:UIDeviceOrientationDidChangeNotification
                                               object:nil];

    self.title = @"CRToast";
    [self updateDurationLabel];
    UIFont *font = [UIFont boldSystemFontOfSize:10];
    [self.segLocation setTitleTextAttributes:@{NSFontAttributeName : font} forState:UIControlStateNormal];
    [self.segFromDirection setTitleTextAttributes:@{NSFontAttributeName : font}
                                     forState:UIControlStateNormal];
    [self.segToDirection setTitleTextAttributes:@{NSFontAttributeName : font}
                                   forState:UIControlStateNormal];
    [self.inAnimationTypeSegmentedControl setTitleTextAttributes:@{NSFontAttributeName : font}
                                                        forState:UIControlStateNormal];
    [self.outAnimationTypeSegmentedControl setTitleTextAttributes:@{NSFontAttributeName : font}
                                                        forState:UIControlStateNormal];

    self.txtNotificationMessage.delegate = self;
    self.txtSubtitleMessage.delegate = self;

    UITapGestureRecognizer *tapGestureRecognizer = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(scrollViewTapped:)];
    [_scrollView addGestureRecognizer:tapGestureRecognizer];

    if ([self respondsToSelector:@selector(edgesForExtendedLayout)])
        self.edgesForExtendedLayout = UIRectEdgeAll;
}

- (void)layoutSubviews {
    self.scrollView.contentInset = UIEdgeInsetsMake([self.topLayoutGuide length],
                                                    0,
                                                    [self.bottomLayoutGuide length],
                                                    0);
}

- (void)viewWillLayoutSubviews {
    [super viewWillLayoutSubviews];
    [self layoutSubviews];
}

- (BOOL)prefersStatusBarHidden {
    return self.statusBarSwitch ? !self.statusBarSwitch.on : NO;
}

- (void)updateDurationLabel {
    self.lblDuration.text = [NSString stringWithFormat:@"%.1f seconds", self.sliderDuration.value];
}

- (IBAction)sliderDurationChanged:(UISlider *)sender {
    [self updateDurationLabel];
}

- (IBAction)statusBarChanged:(UISwitch *)sender {
    [self setNeedsStatusBarAppearanceUpdate];
}

- (IBAction)navigationBarChanged:(UISwitch *)sender {
    [[self navigationController] setNavigationBarHidden:!sender.on animated:YES];
}

# pragma mark - Show Notification

- (IBAction)btnShowNotificationPressed:(UIButton *)sender {
    [CRToastManager showNotificationWithOptions:[self options]
                                 apperanceBlock:^(void) {
                                     NSLog(@"Appeared");
                                 }
                                completionBlock:^(void) {
                                    NSLog(@"Completed");
                                }];
}
- (IBAction)btnPrintIdentifiersPressed:(UIButton *)sender {
    NSLog(@"%@", [CRToastManager notificationIdentifiersInQueue]);
}

- (IBAction)btnDismissNotificationPressed:(UIButton *)sender {
    [CRToastManager dismissNotification:YES];
}

#pragma mark - Notifications

- (void)keyboardWillShow:(NSNotification*)notification {
    self.scrollView.contentInset = UIEdgeInsetsMake([self.topLayoutGuide length],
                                                    0,
                                                    CGRectGetHeight([notification.userInfo[UIKeyboardFrameEndUserInfoKey] CGRectValue]),
                                                    0);
    self.scrollView.scrollIndicatorInsets = self.scrollView.contentInset;
}

- (void)keyboardWillHide:(NSNotification*)notification {
    self.scrollView.contentInset = UIEdgeInsetsMake([self.topLayoutGuide length],
                                                    0,
                                                    [self.bottomLayoutGuide length],
                                                    0);
    self.scrollView.scrollIndicatorInsets = self.scrollView.contentInset;
}

- (void)orientationChanged:(NSNotification*)notification {
    [self layoutSubviews];
}

#pragma mark - Overrides

CRToastLocation CRToastLocationFromSegmentedControl(UISegmentedControl *segmentedControl) {
    return segmentedControl.selectedSegmentIndex == 0 ? CRToastLocationTop : CRToastLocationBottom;
}

CRToastAnimationType CRToastAnimationTypeFromSegmentedControl(UISegmentedControl *segmentedControl) {
    return segmentedControl.selectedSegmentIndex == 0 ? CRToastAnimationTypeLinear :
           segmentedControl.selectedSegmentIndex == 1 ? CRToastAnimationTypeSpring :
           CRToastAnimationTypeGravity;
}

CRToastAccessoryViewAlignment CRToastViewAlignmentForSegmentedControl(UISegmentedControl *segmentedControl ) {
    CRToastAccessoryViewAlignment alignment;

    switch (segmentedControl.selectedSegmentIndex) {
        case 0: alignment = CRToastAccessoryViewAlignmentLeft; break;
        case 1: alignment = CRToastAccessoryViewAlignmentCenter; break;
        case 2: alignment = CRToastAccessoryViewAlignmentRight; break;
        default: alignment = CRToastAccessoryViewAlignmentLeft; break;
    }

    return alignment;
}

- (NSDictionary*)options {
    NSMutableDictionary *options = [@{kCRToastLocationKey                       : @(CRToastLocationFromSegmentedControl(_segLocation)),
                                      kCRToastNotificationTypeKey               : self.coverNavBarSwitch.on ? @(CRToastTypeNavigationBar) : @(CRToastTypeStatusBar),
                                      kCRToastNotificationPresentationTypeKey   : self.slideOverSwitch.on ? @(CRToastPresentationTypeCover) : @(CRToastPresentationTypePush),
                                      kCRToastUnderStatusBarKey                 : @(self.slideUnderSwitch.on),
                                      kCRToastTextKey                           : self.txtNotificationMessage.text,
                                      kCRToastTextAlignmentKey                  : @(self.textAlignment),
                                      kCRToastTimeIntervalKey                   : @(self.sliderDuration.value),
                                      kCRToastAnimationInTypeKey                : @(CRToastAnimationTypeFromSegmentedControl(_inAnimationTypeSegmentedControl)),
                                      kCRToastAnimationOutTypeKey               : @(CRToastAnimationTypeFromSegmentedControl(_outAnimationTypeSegmentedControl)),
                                      kCRToastAnimationInDirectionKey           : @(self.segFromDirection.selectedSegmentIndex),
                                      kCRToastAnimationOutDirectionKey          : @(self.segToDirection.selectedSegmentIndex)} mutableCopy];
    if (self.showImageSwitch.on) {
        options[kCRToastImageKey] = [UIImage imageNamed:@"alert_icon.png"];
        options[kCRToastImageAlignmentKey] = @(CRToastViewAlignmentForSegmentedControl(self.imageAlignmentSegmentedControl));
    }

    if (self.showActivityIndicatorSwitch.on) {
        options[kCRToastShowActivityIndicatorKey] = @YES;
        options[kCRToastActivityIndicatorAlignmentKey] = @(CRToastViewAlignmentForSegmentedControl(self.activityIndicatorAlignmentSegementControl));
    }

    if (self.forceUserInteractionSwitch.on) {
        options[kCRToastForceUserInteractionKey] = @YES;
    }

    if (![self.txtNotificationMessage.text isEqualToString:@""]) {
        options[kCRToastIdentifierKey] = self.txtNotificationMessage.text;
    }

    if (![self.txtSubtitleMessage.text isEqualToString:@""]) {
        options[kCRToastSubtitleTextKey] = self.txtSubtitleMessage.text;
        options[kCRToastSubtitleTextAlignmentKey] = @(self.subtitleAlignment);
    }

    if (_dismissibleWithTapSwitch.on) {
        options[kCRToastInteractionRespondersKey] = @[[CRToastInteractionResponder interactionResponderWithInteractionType:CRToastInteractionTypeTap
                                                                                automaticallyDismiss:YES
                                                                                block:^(CRToastInteractionType interactionType){
                                                                                NSLog(@"Dismissed with %@ interaction", NSStringFromCRToastInteractionType(interactionType));
                                                                                }]];
    }

    return [NSDictionary dictionaryWithDictionary:options];
}

- (NSTextAlignment)textAlignment {
    NSInteger selectedSegment = self.segAlignment.selectedSegmentIndex;
    return selectedSegment == 0 ? NSTextAlignmentLeft :
    selectedSegment == 1 ? NSTextAlignmentCenter :
    NSTextAlignmentRight;
}

- (NSTextAlignment)subtitleAlignment {
    NSInteger selectedSegment = self.segSubtitleAlignment.selectedSegmentIndex;
    return selectedSegment == 0 ? NSTextAlignmentLeft :
    selectedSegment == 1 ? NSTextAlignmentCenter :
    NSTextAlignmentRight;
}

#pragma mark - Gesture Recognizer Selectors

- (void)scrollViewTapped:(UITapGestureRecognizer*)tapGestureRecognizer {
    [_txtNotificationMessage resignFirstResponder];
}

#pragma mark - UITextFieldDelegate

- (BOOL)textFieldShouldReturn:(UITextField *)textField {
    // close the keyboard
    [textField resignFirstResponder];
    return YES;
}

@end


text:
<title>
Requirements Inspection Testing for the X Project
</title>

Requirements Inspection Testing

for the X Project

This directory contains test plans and test records for requirements inspection
testing of the X project.  The testing is carried out per the conventions
documented in the CSC 308

standard operating procedures on testing.

Week 5

Week 6

Week 7

Week 8

Week 9


text:
package org.moca.procedure;

/**
 * An Exception to throw when parsing a Procedure declared in text form.
 *
 * @author Sana Development Team
 *
 */
public class ProcedureParseException extends Exception {
    private static final long serialVersionUID = 1L;

    /**
     * A new Exception with a message.
     *
     * @param text the message.
     */
    public ProcedureParseException(String text) {
        super(text);
    }
}


text:
package org.terracotta.runnel.encoding;

/**
 * @author Ludovic Orban
 */
public interface StructEncoderFunction {

  void encode(StructEncoder encoder);

}