text:
package br.unb.cic.iris.model.xml.internal;

import java.util.Date;

import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlTransient;
import javax.xml.bind.annotation.XmlType;

import br.unb.cic.iris.model.EmailMessage;
import br.unb.cic.iris.model.IrisFolder;

@XmlRootElement(name = "Message")
@XmlType(propOrder = {"id", "date", "from", "to", "cc", "bcc", "subject", "message"})
public class EmailMessageXml implements EmailMessage {
	private String id;
	private String from;
	private String to;
	private String cc;
	private String bcc;
	private String subject;
	private String message;
	private Date date;
	private IrisFolder folder;

	public EmailMessageXml() {
	}

	public EmailMessageXml(String to, String subject, String message) {
		this(null, to, subject, message);
	}

	public EmailMessageXml(String from, String to, String subject, String message, Date date, IrisFolder folder) {
		this(from, to, null, null, subject, message, date, folder);
	}

	public EmailMessageXml(String from, String to, String subject, String message) {
		this(from, to, null, null, subject, message);
	}

	public EmailMessageXml(String from, String to, String cc, String bcc, String subject, String message) {
		this(from, to, cc, bcc, subject, message, null, null);
	}

	public EmailMessageXml(String from, String to, String cc, String bcc, String subject, String message, Date date, IrisFolder folder) {
		this.from = from;
		this.to = to;
		this.cc = cc;
		this.bcc = bcc;
		this.subject = subject;
		this.message = message;
		this.date = date;
		this.folder = folder;
	}

	public String getId() {
		return id;
	}
	@XmlElement(name = "id")
	public void setId(String id) {
		this.id = id;
	}
	public Date getDate() {
		return date;
	}
	@XmlElement(name = "date")
	public void setDate(Date date) {
		this.date = date;
	}
	@XmlElement(name = "to")
	public void setTo(String to) {
		this.to = to;
	}
	@XmlElement(name = "cc")
	public void setCc(String cc) {
		this.cc = cc;
	}
	@XmlElement(name = "bcc")
	public void setBcc(String bcc) {
		this.bcc = bcc;
	}
	@XmlElement(name = "subject")
	public void setSubject(String subject) {
		this.subject = subject;
	}
	@XmlElement(name = "message")
	public void setMessage(String message) {
		this.message = message;
	}
	@XmlElement(name = "from")
	public void setFrom(String from) {
		this.from = from;
	}

	public String getFrom() {
		return from;
	}
	public String getTo() {
		return to;
	}
	public String getCc() {
		return cc;
	}
	public String getBcc() {
		return bcc;
	}
	public String getSubject() {
		return subject;
	}
	public String getMessage() {
		return message;
	}

	public IrisFolder getFolder() {
		return folder;
	}
	@XmlTransient
	public void setFolder(IrisFolder folder) {
		this.folder = folder;
	}

	@Override
	public String toString() {
		return String.format("%s - %s - %s - %s", getId(), getFrom(), getSubject(), getDate());
	}
}


text:
using System.Collections.Generic;
using System.Text.Json;
using Azure.Core;

namespace Azure.ResourceManager.DataMigration.Models
{
    public partial class ResourceSkuRestrictions
    {
        internal static ResourceSkuRestrictions DeserializeResourceSkuRestrictions(JsonElement element)
        {
            Optional<ResourceSkuRestrictionsType> type = default;
            Optional<IReadOnlyList<string>> values = default;
            Optional<ResourceSkuRestrictionsReasonCode> reasonCode = default;
            foreach (var property in element.EnumerateObject())
            {
                if (property.NameEquals("type"))
                {
                    if (property.Value.ValueKind == JsonValueKind.Null)
                    {
                        property.ThrowNonNullablePropertyIsNull();
                        continue;
                    }
                    type = new ResourceSkuRestrictionsType(property.Value.GetString());
                    continue;
                }
                if (property.NameEquals("values"))
                {
                    if (property.Value.ValueKind == JsonValueKind.Null)
                    {
                        property.ThrowNonNullablePropertyIsNull();
                        continue;
                    }
                    List<string> array = new List<string>();
                    foreach (var item in property.Value.EnumerateArray())
                    {
                        array.Add(item.GetString());
                    }
                    values = array;
                    continue;
                }
                if (property.NameEquals("reasonCode"))
                {
                    if (property.Value.ValueKind == JsonValueKind.Null)
                    {
                        property.ThrowNonNullablePropertyIsNull();
                        continue;
                    }
                    reasonCode = new ResourceSkuRestrictionsReasonCode(property.Value.GetString());
                    continue;
                }
            }
            return new ResourceSkuRestrictions(Optional.ToNullable(type), Optional.ToList(values), Optional.ToNullable(reasonCode));
        }
    }
}

redpajama_set_name: RedPajamaGithub


text:
import { Step } from '@ephox/agar';
import { UnitTest } from '@ephox/bedrock-client';
import { FieldSchema, StructureSchema } from '@ephox/boulder';

import * as Behaviour from 'ephox/alloy/api/behaviour/Behaviour';
import { Keying } from 'ephox/alloy/api/behaviour/Keying';
import { Receiving } from 'ephox/alloy/api/behaviour/Receiving';
import * as GuiFactory from 'ephox/alloy/api/component/GuiFactory';
import * as GuiSetup from 'ephox/alloy/api/testhelpers/GuiSetup';
import { Container } from 'ephox/alloy/api/ui/Container';

UnitTest.asynctest('ReceivingTest', (success, failure) => {

  GuiSetup.setup((store, _doc, _body) => GuiFactory.build(
    Container.sketch({
      dom: {
        classes: [ 'receiving-test' ]
      },
      uid: 'custom-uid',
      containerBehaviours: Behaviour.derive([
        Keying.config({
          mode: 'execution'
        }),
        Receiving.config({
          channels: {
            'test.channel.1': {
              schema: StructureSchema.objOfOnly([
                FieldSchema.required('dummy')
              ]),
              onReceive: (_component, data) => {
                store.adder('received: ' + data.dummy)();
              }
            }
          }
        })
      ]),
      components: [

      ]
    })
  ), (_doc, _body, gui, _component, store) => [
    store.sAssertEq('No messages yet', [ ]),
    Step.sync(() => {
      gui.broadcastOn([ 'test.channel.1' ], {
        dummy: '1'
      });
    }),
    store.sAssertEq('After broadcast to channel', [ 'received: 1' ]),
    store.sClear,
    Step.sync(() => {
      gui.broadcast({ dummy: '2' });
    }),
    store.sAssertEq('After broadcast to all', [ 'received: 2' ])
  ], success, failure);
});


text:
namespace TypeSql.Antlr.Runtime.Tree
{
    using System.Diagnostics;

    internal sealed class AntlrRuntime_BaseTreeDebugView
    {
        private readonly BaseTree _tree;

        public AntlrRuntime_BaseTreeDebugView(BaseTree tree)
        {
            _tree = tree;
        }

        [DebuggerBrowsable(DebuggerBrowsableState.RootHidden)]
        public ITree[] Children
        {
            get
            {
                if (_tree == null || _tree.Children == null)
                    return null;

                ITree[] children = new ITree[_tree.Children.Count];
                _tree.Children.CopyTo(children, 0);
                return children;
            }
        }
    }
}


text:
import React from 'react';
// eslint-disable-next-line
import DropdownNavigationView from 'ringcentral-widgets/components/DropdownNavigationView';
// eslint-disable-next-line
import ContactIcon from 'ringcentral-widgets/assets/images/Contact.svg';
import SettingsIcon from 'ringcentral-widgets/assets/images/Settings.svg';
import ContactHoverIcon from 'ringcentral-widgets/assets/images/ContactHover.svg';
import SettingsHoverIcon from 'ringcentral-widgets/assets/images/SettingsHover.svg';

const props = {};
props.goTo = () => null;
props.currentPath = '/settings';
props.tabs = [{
  icon: ContactIcon,
  activeIcon: ContactHoverIcon,
  label: 'Contacts',
  path: '/contacts',
}, {
  icon: SettingsIcon,
  activeIcon: SettingsHoverIcon,
  label: 'Settings',
  path: '/settings',
}];

/**
 * A example of `DropdownNavigationView`
 */
const DropdownNavigationViewDemo = () => (
  <div style={{
    position: 'relative',
    height: '100px',
  }}>
    <DropdownNavigationView
      {...props}
    />
  </div>
);
export default DropdownNavigationViewDemo;


text:
category:
- Transportation
- Locations and mapping
license: http://www1.toronto.ca/wps/portal/contentonly?vgnextoid=4a37e03bb8d1e310VgnVCM10000071d60f89RCRD
maintainer: 311 Contact Centre
maintainer_email: opendata@toronto.ca
notes: This dataset includes Toronto Parking Authority (TPA) information about GreenP
  and TTC parking lots (off-street parking).
organization: Toronto Parking Authority
resources:
- format: JSON
  name: Green P Parking
  url: http://www1.toronto.ca/City Of Toronto/Information & Technology/Open Data/Data
    Sets/Assets/Files/greenPParking2015.json
- format: XLS
  name: Green P Parking Readme
  url: http://www1.toronto.ca/City_Of_Toronto/Information_&_Technology/Open_Data/Data_Sets/Assets/Files/GreenPParkingReadme.xls
source: http://www1.toronto.ca/wps/portal/contentonly?vgnextoid=b0993228eb22a310VgnVCM1000003dd60f89RCRD&vgnextchannel=1a66e03bb8d1e310VgnVCM10000071d60f89RCRD
title: Green P Parking
---


text:
import * as Foundation from './foundation';
import { Controllers as PlatformControllers } from './platform';

Foundation.ApiServer
    .bootStrap()
    .createApplication()
    .usePassport()
    .useAuthorizationOn('/*')
    .registerControllers(PlatformControllers)
    .buildServices()
    .listen(3000);


text:
/*global define, Highcharts */
define([
        'jquery',
        'handlebars',
        //'text!fx-c-c/html/templates/base_template.hbs'
        'text!fx-c-c/html/templates/custom_template.hbs',
        'i18n!fx-c-c/nls/translate',
        'loglevel',
        // avoid to import here Highcharts?
        'highcharts',
        'highcharts-export',
        //'highcharts-regression',
        'bootstrap'
    ],
    function ($, Handlebars, template, i18n, log) {

        'use strict';

        var defaultOptions = {};

        function Base_template(config) {
            // this should be always reinitialized
            this.o = $.extend(true, {}, defaultOptions, config);
            return this;
        }

        Base_template.prototype.render = function () {

            if (this._validateInput() === true) {
                this._initHighchartsConfig();
                this._initVariable();
                this._injectTemplate(template);
            } else {
                log.error(this.o.errors);
                throw new Error("FENIX Chart creator has not a valid configuration");
            }

            return this;
        };

        // TODO: should be set at each chart creation?
        Base_template.prototype._initHighchartsConfig =function(){

            Highcharts.setOptions({
                lang: {
                    contextButtonTitle: i18n.contextButtonTitle,
                    downloadJPEG: i18n.downloadJPEG,
                    downloadPDF: i18n.downloadPDF,
                    downloadPNG: i18n.downloadPNG,
                    downloadSVG: i18n.downloadSVG,
                    printChart: i18n.printChart,
                    resetZoom: i18n.resetZoom,
                    resetZoomTitle: i18n.resetZoomTitle
                }
            });

        };

        Base_template.prototype._injectTemplate = function () {

            var t = Handlebars.compile((this.o.hasOwnProperty('html'))? this.o.html || template: template);

            if ( this.o.$container) {
                this.o.$container.html(t($.extend({}, true, i18n, this.o)));
                this.o.$container.find('[data-toggle="tooltip"]').tooltip();
            }

        };

        Base_template.prototype._initVariable = function () {
            this.o.$container = $(this.o.container);
        };

        Base_template.prototype._validateInput = function () {

            this.o.errors = {};

            if (!this.o.hasOwnProperty("container")) {
                this.o.errors.container = "'container' attribute not present";
            }

            return (Object.keys(this.o.errors).length === 0);
        };

        Base_template.prototype.destroy = function () {

        };

        return Base_template;
    });


text:
{-# LANGUAGE DataKinds         #-}
{-# LANGUAGE FlexibleContexts  #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE TypeOperators     #-}
-----------------------------------------------------------------------------
-- |
-- Module      :  Servant.Matlab
-- License     :  BSD3
-- Maintainer  :  Greg Hale <imalsogreg@gmail.com>
-- Stability   :  experimental
-- Portability :  non-portable
--
-- Generating Matlab code to query your APIs
--
-- Using this package is very simple. Say you have this API type around:
--
-- > type API = "users" :> Get '[JSON] [Users]
-- >       :<|> "messages" :> Get '[JSON] [Message]
--
-- All you need to do to generate the Javascript code is to write a 'Proxy'
-- for this API type:
--
-- > api :: Proxy API
-- > api = Proxy
--
--
-- @
-- matlab :: String
-- matlab = 'matlabForAPI' api defaultOptions
-- @
--
-- That's it! If you want to write that code to a file:
--
-- @
-- writeMatlabCode :: IO ()
-- writeMatlabCode = 'writeMatlabForAPI' api defaultOptions "./my_api.m"
-- @
--

-- -- TODO change this section
-- If you want to customize the rendering options, take a look
-- at 'CommonGeneratorOptions' which are generic options common to all the
-- generators. the /xxxWith/ variants all take 'CommonGeneratorOptions' whereas
-- the /xxx/ versions use 'defCommonGeneratorOptions'. Once you have some custom
--
-- > myOptions :: 'CommonGeneratorOptions'
--
-- All you need to do to use it is to use 'vanillaJSWith' and pass it @myOptions@.
--
-- @
-- jsCodeWithMyOptions :: String
-- jsCodeWithMyOptions = 'jsForAPI' api ('vanillaJSWith' myOptions)
-- @
--
-- Follow the same pattern for any other generator.
--
-- /Note/: The Angular generators take an additional type of options,
-- namely 'AngularOptions', to let you tweak aspects of the code generation
-- that are specific to /Angular.js/.
module Servant.Matlab
  ( -- * Generating javascript code from an API type
    matlabForAPI
  , writeMatlabForAPI
  , MatlabGenerator

  , -- * Options common to all generators
    CommonGeneratorOptions
  , defCommonGeneratorOptions

  , -- * Function renamers
    concatCase
  , snakeCase
  , camelCase

  , -- * Misc.
    listFromAPI
  , matlab
  , GenerateList(..)
  ) where

import           Data.Bool               (bool)
import           Data.Proxy
import           Servant.Foreign
import           Servant.Matlab.Internal
import           System.Directory        (createDirectory)
import           System.FilePath         ((</>))

-- | Generate the data necessary to generate javascript code
--   for all the endpoints of an API, as ':<|>'-separated values
--   of type 'AjaxReq'.
matlab :: HasForeign layout => Proxy layout -> Foreign layout
matlab p = foreignFor p defReq

-- | Directly generate all the javascript functions for your API
--   from a 'Proxy' for your API type. You can then write it to
--   a file or integrate it in a page, for example.
matlabForAPI :: (HasForeign api, GenerateList (Foreign api))
             => Proxy api
                -- ^ proxy for your API type
             -> MatlabGenerator
                -- ^ matlab code generator to use
             -> [(String, String)]
                -- ^ a string that you can embed in your pages or write to a file
matlabForAPI p gen = gen (listFromAPI p)

-- | Directly generate all the javascript functions for your API
--   from a 'Proxy' for your API type using the given generator
--   and write the resulting code to a file at the given path.
writeMatlabForAPI :: (HasForeign api, GenerateList (Foreign api))
                  => Proxy api
                        -- ^ proxy for your API type
                     -> MatlabGenerator
                        -- ^ matlab code generator to use
                     -> FilePath
                        -- ^ path to the file you want to write the resulting matlab code into
              -> IO ()
writeMatlabForAPI p gen fp = do
  mapM_ (\(f,c) -> writeFile (fp </> f) c) (matlabForAPI p gen)

-- | Utility class used by 'matlabForAPI' which computes
--   the data needed to generate a function for each endpoint
--   and hands it all back in a list.
class GenerateList reqs where
  generateList :: reqs -> [AjaxReq]

instance GenerateList AjaxReq where
  generateList r = [r]

instance (GenerateList start, GenerateList rest) => GenerateList (start :<|> rest) where
  generateList (start :<|> rest) = (generateList start) ++ (generateList rest)

-- | Generate the necessary data for JS codegen as a list, each 'AjaxReq'
--   describing one endpoint from your API type.
listFromAPI :: (HasForeign api, GenerateList (Foreign api)) => Proxy api -> [AjaxReq]
listFromAPI p = generateList (matlab p)


text:
class ChatChannel < ApplicationCable::Channel
  def subscribed
    stop_all_streams
    stream_from "chat_channel_1"
  end

  def unsubscribed
    # Any cleanup needed when channel is unsubscribed
    stop_all_streams
  end

  def speak data
    group_id, name_id = PokerEncoder::decode(data['me']).split('x')
    @chat = Chat.new( message: data['message'], user_id: name_id || 0,
                      group_id: group_id)
    @chat.speaking
  end

end


text:
#include <DensityGrid.h>

// layout schedule information
struct layout_schedule {
	int iterations;
	float temperature;
	float attraction;
	float damping_mult;
	time_t time_elapsed;
};

class graph {

public:

    // Methods
	void init_parms ( int rand_seed, float edge_cut, float real_parm );
    void read_parms ( char *parms_file );
	void read_real ( char *real_file );
	void scan_int ( char *filename );
	void read_int ( char *file_name );
	void draw_graph ( int int_out, char *coord_file );
	void write_coord ( const char *file_name );
	void write_sim ( const char *file_name );
	float get_tot_energy ( );

	// Con/Decon
	graph( int proc_id, int tot_procs, char *int_file );
		~graph( ) { }

private:

	// Methods
	int ReCompute ( );
	void update_nodes ( );
	float Compute_Node_Energy ( int node_ind );
	void Solve_Analytic ( int node_ind, float &pos_x, float &pos_y );
	void get_positions ( vector<int> &node_indices, float return_positions[2*MAX_PROCS] );
	void update_density ( vector<int> &node_indices, float old_positions[2*MAX_PROCS],
			      float new_positions[2*MAX_PROCS] );
	void update_node_pos ( int node_ind,
			       float old_positions[2*MAX_PROCS],
			       float new_positions[2*MAX_PROCS] );

	// MPI information
	int myid, num_procs;

	// graph decomposition information
	int num_nodes;					// number of nodes in graph
	float highest_sim;				// highest sim for normalization
	map <int, int> id_catalog;		// id_catalog[file id] = internal id
	map <int, map <int, float> > neighbors;		// neighbors of nodes on this proc.

	// graph layout information
	vector<Node> positions;
	DensityGrid density_server;

	// original VxOrd information
	int STAGE, iterations;
	float temperature, attraction, damping_mult;
	float min_edges, CUT_END, cut_length_end, cut_off_length, cut_rate;
	bool first_add, fine_first_add, fineDensity;

	// scheduling variables
	layout_schedule liquid;
	layout_schedule expansion;
	layout_schedule cooldown;
	layout_schedule crunch;
	layout_schedule simmer;

	// timing statistics
        time_t start_time, stop_time;

	// online clustering information
	int real_iterations;    // number of iterations to hold .real input fixed
	int tot_iterations;
	bool real_fixed;
};


text:
<?php eT('Export multiple label sets');?>

<?php echo CHtml::form(array("admin/export/sa/dumplabel"), 'post', array('id'=>'exportlabelset','class'=>'form30')); ?>

<?php eT('Please choose the label sets you want to export:');?>
<?php eT('(Select multiple label sets by using the Ctrl key)');?>
            <select id='labelsets' multiple='multiple' name='lids[]' size='20'>
                <?php if (count($labelsets)>0)
                    {
                        foreach ($labelsets as $lb)
                        {
                            echo "<option value='{$lb[0]}'>{$lb[0]}: {$lb[1]}</option>\n";
                        }
                } ?>

            </select>

<input type='submit' id='btnDumpLabelSets' value='<?php eT('Export selected label sets');?>' />
    <input type='hidden' name='action' value='dumplabel' />
</form>


text:
using FossLock.Model.Base;

namespace FossLock.Model
{
    /// <summary>
    ///     An individual version of a product.
    ///     In FossLock, <see cref="Customers"/> actually license a particular
    ///     ProductVersion, instead of the Product itself.
    /// </summary>
    public class ProductVersion : EntityBase
    {
        /// <summary>
        ///     String representation of the versioning data.
        ///     This string must be parsable to either a <see cref="System.Version"/> instance
        ///     or a <see cref="Summerset.SemanticVersion"/> instance, depending on which type
        ///     is being used for the product.
        /// </summary>
        public string Version { get; set; }

        /// <summary>
        ///     Exposed foreign key property for our Product property.
        /// </summary>
        public int ProductId { get; set; }

        /// <summary>
        ///     A reference to the <see cref="Product"/> this
        ///     version is associated with.
        /// </summary>
        public virtual Product Product { get; set; }
    }
}


text:
/*
    Calimero - A library for KNX network access
    Copyright (C) 2006-2008 B. Malinowsky

    This program is free software; you can redistribute it and/or
    modify it under the terms of the GNU General Public License
    as published by the Free Software Foundation; either version 2
    of the License, or at your option any later version.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with this program; if not, write to the Free Software
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.

    Linking this library statically or dynamically with other modules is
    making a combined work based on this library. Thus, the terms and
    conditions of the GNU General Public License cover the whole
    combination.

    As a special exception, the copyright holders of this library give you
    permission to link this library with independent modules to produce an
    executable, regardless of the license terms of these independent
    modules, and to copy and distribute the resulting executable under terms
    of your choice, provided that you also meet, for each linked independent
    module, the terms and conditions of the license of that module. An
    independent module is a module which is not derived from or based on
    this library. If you modify this library, you may extend this exception
    to your version of the library, but you are not obligated to do so. If
    you do not wish to do so, delete this exception statement from your
    version.
*/

package tuwien.auto.calimero.dptxlator;

import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Calendar;
import java.util.Date;
import java.util.HashMap;
import java.util.Map;
import java.util.StringTokenizer;

import tuwien.auto.calimero.exception.KNXFormatException;
import tuwien.auto.calimero.exception.KNXIllegalArgumentException;
import tuwien.auto.calimero.log.LogLevel;

/**
 * Translator for KNX DPTs with main number 11, type date.
 *

 * The KNX data type width is 3 bytes.

 * The type contains the date information year, month, and day of month.

 * Where required in time calculation, the used calendar is based on the current time in
 * the default time zone with the default locale. All time information behaves in
 * non-lenient mode, i.e. no value overflow is allowed and values are not normalized or
 * adjusted using the next, larger field.

 *

 * The default return value after creation is 2000-01-01.
 *
 * @author B. Malinowsky
 */
public class DPTXlatorDate extends DPTXlator
{
	/**
	 * DPT ID 11.001, Date; values from 1990-01-01 to 2089-12-31.
	 *

	 */
	public static final DPT DPT_DATE =
		new DPT("11.001", "Date", "1990-01-01", "2089-12-31", "yyyy-mm-dd");

	private static final int DAY = 0;
	private static final int MONTH = 1;
	private static final int YEAR = 2;

	private static Calendar c;
	private static SimpleDateFormat sdf;
	private static final Map types;

	static {
		types = new HashMap(3);
		types.put(DPT_DATE.getID(), DPT_DATE);
	}

	/**
	 * Creates a translator for the given datapoint type.
	 *

	 *
	 * @param dpt the requested datapoint type
	 * @throws KNXFormatException on not supported or not available DPT
	 */
	public DPTXlatorDate(DPT dpt) throws KNXFormatException
	{
		this(dpt.getID());
	}

	/**
	 * Creates a translator for the given datapoint type ID.
	 *

	 *
	 * @param dptID available implemented datapoint type ID
	 * @throws KNXFormatException on wrong formatted or not expected (available)
	 *         dptID
	 */
	public DPTXlatorDate(String dptID) throws KNXFormatException
	{
		super(3);
		setTypeID(types, dptID);
		data = new short[] { 1, 1, 0 };
	}

	/**
	 * Sets a user defined date value format used by all instances of this class.
	 *

	 * The pattern is specified according to {@link SimpleDateFormat}. Subsequent date
	 * information, supplied and returned in textual representation, will use a layout
	 * formatted according this pattern.

	 * Note, the format will rely on calendar default time symbols (i.e. language for
	 * example).

	 * If requesting a textual date representation, and using this value format leads to
	 * errors due to an invalid calendar date, a short error message string will be
	 * returned.
	 *
	 * @param pattern the new pattern specifying the value date format, null
	 *        to reset to default value format
	 */
	public static final synchronized void useValueFormat(String pattern)
	{
		if (pattern == null)
			sdf = null;
		else if (sdf == null) {
			sdf = new SimpleDateFormat(pattern);
			sdf.setCalendar(getCalendar());
		}
		else
			sdf.applyPattern(pattern);
	}

	/* (non-Javadoc)
	 * @see tuwien.auto.calimero.dptxlator.DPTXlator#getAllValues()
	 */
	public String[] getAllValues()
	{
		final String[] buf = new String[data.length / 3];
		for (int i = 0; i < buf.length; ++i)
			buf[i] = fromDPT(i);
		return buf;
	}

	/**
	 * Sets the year, month, and day of month for the first date item.
	 *

	 * Any other items in the translator are discarded on successful set.

	 *
	 * @param year year value, 1990 <= year <= 2089
	 * @param month month value, 1 <= month <= 12
	 * @param day day value, 1 <= day <= 31
	 */
	public final void setValue(int year, int month, int day)
	{
		data = set(year, month, day, new short[3], 0);
	}

	/**
	 * Returns the day information.
	 *

	 *
	 * @return day of month value, 1 <= day <= 31
	 */
	public final byte getDay()
	{
		return (byte) (data[DAY]);
	}

	/**
	 * Returns the month information.
	 *

	 *
	 * @return month value, 1 <= month <= 12
	 */
	public final byte getMonth()
	{
		return (byte) (data[MONTH]);
	}

	/**
	 * Returns the year information.
	 *

	 *
	 * @return year value, 1990 <= year <= 2089
	 */
	public final short getYear()
	{
		return absYear(data[YEAR]);
	}

	/**
	 * Sets the date for the first item using UTC millisecond information.
	 *

	 * The milliseconds is interpreted with the translator default
	 * calendar.
	 *
	 * @param milliseconds time value in milliseconds, as used in {@link Calendar}
	 */
	public final void setValue(long milliseconds)
	{
		data = toDPT(milliseconds, new short[3], 0);
	}

	/**
	 * Returns the date information in UTC milliseconds, using the translator default
	 * calendar.
	 *

	 * The method uses year, month and day information for calculation. Any finer time
	 * granularity defaults to 0.

	 *
	 * @return the date as time in milliseconds as long, as used in {@link Calendar}
	 * @throws KNXFormatException on invalid calendar date
	 */
	public final long getValueMilliseconds() throws KNXFormatException
	{
		return fromDPTMillis(0);
	}

	/* (non-Javadoc)
	 * @see tuwien.auto.calimero.dptxlator.DPTXlator#setData(byte[], int)
	 */
	public void setData(byte[] data, int offset)
	{
		if (offset < 0 || offset > data.length)
			throw new KNXIllegalArgumentException("illegal offset " + offset);
		final int size = (data.length - offset) / 3 * 3;
		if (size == 0)
			throw new KNXIllegalArgumentException("data length " + size
				+ " < KNX data type width " + Math.max(1, getTypeSize()));
		final short[] buf = new short[size];
		int item = 0;
		for (int i = offset; i < size + offset; i += 3) {
			set(absYear(data[i + YEAR] & 0x7F), data[i + MONTH] & 0x0F,
				data[i + DAY] & 0x1F, buf, item++);
			// check reserved bits
			if ((data[i + YEAR] & ~0x7F) + (data[i + MONTH] & ~0x0F) +
				(data[i + DAY] & ~0x1F) != 0)
				logger.warn(dpt.getID() + " - reserved bit not 0");
		}
		this.data = buf;
	}

	/* (non-Javadoc)
	 * @see tuwien.auto.calimero.dptxlator.DPTXlator#getData(byte[], int)
	 */
	public byte[] getData(byte[] dst, int offset)
	{
		final int end = Math.min(data.length, dst.length - offset) / 3 * 3;
		for (int i = 0; i < end; ++i)
			dst[offset + i] = (byte) data[i];
		return dst;
	}

	/* (non-Javadoc)
	 * @see tuwien.auto.calimero.dptxlator.DPTXlator#getSubTypes()
	 */
	public Map getSubTypes()
	{
		return types;
	}

	/**
	 * @return the subtypes of the date translator type
	 * @see DPTXlator#getSubTypesStatic()
	 */
	protected static Map getSubTypesStatic()
	{
		return types;
	}

	private String fromDPT(int index)
	{
		if (sdf != null)
			synchronized (DPTXlatorDate.class) {
				try {
					return sdf.format(new Date(fromDPTMillis(index)));
				}
				catch (final KNXFormatException e) {}
				return "invalid date";
			}
		final int i = index * 3;
		// return year-month-day
		final int d = data[i + DAY];
		final int m = data[i + MONTH];
		return Short.toString(absYear(data[i + YEAR])) + '-' + align(m) + m + '-'
			+ align(d) + d;
	}

	private long fromDPTMillis(int index) throws KNXFormatException
	{
		synchronized (DPTXlatorDate.class) {
			getCalendar().clear();
			final int i = index * 3;
			c.set(Calendar.DAY_OF_MONTH, data[i + DAY]);
			c.set(Calendar.MONTH, data[i + MONTH] - 1);
			c.set(Calendar.YEAR, absYear(data[i + YEAR]));
			try {
				return c.getTimeInMillis();
			}
			catch (final IllegalArgumentException e) {
				throw new KNXFormatException(e.getMessage());
			}
		}
	}

	protected void toDPT(String value, short[] dst, int index) throws KNXFormatException
	{
		if (sdf != null)
			synchronized (DPTXlatorDate.class) {
				toDPT(parse(value), dst, index);
				return;
			}
		final StringTokenizer t = new StringTokenizer(value, "- ");
		final int maxTokens = 3;
		final int[] tokens = new int[maxTokens];
		try {
			int count = 0;
			for (; count < maxTokens && t.hasMoreTokens(); ++count)
				tokens[count] = Short.parseShort(t.nextToken());
			if (count < 3)
				throw logThrow(LogLevel.WARN, "invalid date " + value, null, value);
			set(tokens[0], tokens[1], tokens[2], dst, index);
		}
		catch (final KNXIllegalArgumentException e) {
			throw logThrow(LogLevel.WARN, "invalid date " + value, e.getMessage(), value);
		}
		catch (final NumberFormatException e) {
			throw logThrow(LogLevel.WARN, "invalid number in " + value, null, value);
		}
	}

	private short[] toDPT(long milliseconds, short[] dst, int index)
	{
		synchronized (DPTXlatorDate.class) {
			getCalendar().clear();
			c.setTimeInMillis(milliseconds);
			set(c.get(Calendar.YEAR), c.get(Calendar.MONTH) + 1, c
				.get(Calendar.DAY_OF_MONTH), dst, index);
		}
		return dst;
	}

	private short[] set(int year, int month, int day, short[] dst, int index)
	{
		if (year < 1990 || year > 2089)
			throw new KNXIllegalArgumentException("year out of range [1990..2089]");
		if (month < 1 || month > 12)
			throw new KNXIllegalArgumentException("month out of range [1..12]");
		if (day < 1 || day > 31)
			throw new KNXIllegalArgumentException("day out of range [1..31]");
		final int i = 3 * index;
		dst[i + DAY] = (short) day;
		dst[i + MONTH] = (short) month;
		dst[i + YEAR] = (short) (year % 100);
		return dst;
	}

	private short absYear(int relative)
	{
		if (relative > 99)
			throw new KNXIllegalArgumentException("relative year out of range [0..99]");
		return (short) (relative + (relative < 90 ? 2000 : 1900));
	}

	private long parse(String value) throws KNXFormatException
	{
		try {
			return sdf.parse(value).getTime();
		}
		catch (final ParseException e) {
			throw logThrow(LogLevel.WARN, "invalid date format", e.getMessage(), value);
		}
	}

	private static String align(int number)
	{
		return number > 9 ? "" : "0";
	}

	private static Calendar getCalendar()
	{
		// don't need to synchronize, it's harmless if we have 2 instances
		// and we synchronize on class anyway
		if (c == null) {
			final Calendar calendar = Calendar.getInstance();
			calendar.setLenient(false);
			c = calendar;
		}
		return c;
	}
}


text:
aws4s
=====

[![Gitter](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/sisioh/aws4s?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)

[![Build Status](https://travis-ci.org/sisioh/aws4s.svg)](https://travis-ci.org/sisioh/aws4s)
[![Maven Central](https://maven-badges.herokuapp.com/maven-central/org.sisioh/aws4s_2.11/badge.svg)](https://maven-badges.herokuapp.com/maven-central/org.sisioh/aws4s_2.11)
[![Scaladoc](http://javadoc-badge.appspot.com/org.sisioh/aws4s.svg?label=scaladoc)](http://javadoc-badge.appspot.com/org.sisioh/aws4s_2.11)
[![Reference Status](https://www.versioneye.com/java/org.sisioh:aws4s_2.11/reference_badge.svg?style=flat)](https://www.versioneye.com/java/org.sisioh:aws4s_2.11/references)

AWS4S is the AWS SDK wrapper for Scala.

- aws4s-core
- aws4s-dynamodb
- aws4s-sqs
- aws4s-s3
- aws4s-cfn
- aws4s-sts

## Installation

Add the following to your sbt build (Scala 2.10.x, and Scala 2.11.x):

### Release Version

```scala
resolvers += "Sonatype OSS Release Repository" at "https://oss.sonatype.org/content/repositories/releases/"

libraryDependencies += "org.sisioh" %% "aws4s" % "1.0.16"
```

### Snapshot Version

```scala
resolvers += "Sonatype OSS Snapshot Repository" at "https://oss.sonatype.org/content/repositories/snapshots/"

libraryDependencies += "org.sisioh" %% "aws4s" % "1.0.17-SNAPSHOT"
```

## Usage

```scala
val client = AmazonS3ClientFactory.create()

val request = GetObjectRequestFactory.create("bucket", "key")

client.getObjectAsTry(getObjectRequest).map{ result =>
  result.objectMetadata.rawMetadata // as scala.collection.Map[String, AnyRef]
}.foreach(println)

```


text:
<!DOCTYPE html>

	<meta charset="UTF-8">

	<link rel="stylesheet" href="../styles/styles.css">
	<title>Biggest Of Three Numbers</title>

Conditional Statements Homework

Biggest Of Three Numbers

	Enter first number
	<input type="text" id="inputFormOne">

	Enter second number
	<input type="text" id="inputFormTwo">

	Enter third number
	<input type="text" id="inputFormThree">

	<button id="button" onclick="theBiggestOfThreeNumbers()"> Submit </button>


text:
package io.netty.handler.codec.socksx.v5;

import java.util.List;

/**
 * An initial SOCKS5 authentication method selection request, as defined in
 * the section 3, RFC1928.
 */
public interface Socks5InitialRequest extends Socks5Message {
    /**
     * Returns the list of desired authentication methods.
     */
    List<Socks5AuthMethod> authMethods();
}


text:
'use strict';

define([
  'settings',
  'underscore',
  'backbone',
  'models/world'
],
function( settings, _, Backbone, World ) {

  var CharacterView = Backbone.View.extend({
    world: World,
    tileToPixel: function( tile ) {
      return tile * settings.tile;
    },
    pixelToTile: function( pixel ) {
      return Math.floor( pixel / settings.tile );
    },
    tileCell: function( tileX, tileY ) {
      return this.world.get('data')[tileY][tileX];
    },
    bound: function( x, min, max ) {
      return Math.max( min, Math.min(max, x) );
    },
    overlap: function( x1, y1, w1, h1, x2, y2, w2, h2 ) {
      return !(((x1 + w1 - 1) < x2) ||
              ((x2 + w2 - 1) < x1) ||
              ((y1 + h1 - 1) < y2) ||
              ((y2 + h2 - 1) < y1));
    },
    update: function( delta, character ) {
      if ( character === undefined ) {
        character = this.model;
      }

      var gravity = character.gravity,
        maxDx = character.get('maxDx'),
        maxDy = character.maxDy,
        impulse = character.impulse,
        acceleration = character.acceleration,
        friction = character.friction,
        wasLeft = character.get('dx') < 0,
        wasRight = character.get('dx') > 0,
        falling = character.get('falling'),
        frict = friction * (falling ? 0.5 : 1),
        accel = acceleration * (falling ? 0.5 : 1),
        jumping = false,
        ddx = 0,
        ddy = gravity,
        accelBullet = settings.bullet / settings.constants.acceleration,
        bullets = character.get('bullets');

      //Movement
      if ( character.get('left') ) {
        ddx = ddx - accel;
      } else if ( wasLeft ) {
        ddx = ddx + frict;
      }

      if ( character.get('right') ){
        ddx = ddx + accel;
      } else if ( wasRight ) {
        ddx = ddx - frict;
      }

      if ( character.get('up') && !jumping && !falling ) {
        ddy = ddy - impulse;
        jumping = true;
      }

      character.set('x', character.get('x') + (delta * character.get('dx')));
      character.set('y', character.get('y') + (delta * character.get('dy')));
      character.set('dx', this.bound(character.get('dx') + (delta * ddx), -maxDx, maxDx));
      character.set('dy', this.bound(character.get('dy') + (delta * ddy), -maxDy, maxDy));

      if ( (wasLeft && (character.get('dx') > 0)) || (wasRight && (character.get('dx') < 0)) ) {
        character.set('dx', 0);
      }

      //Collision
      var tx = this.pixelToTile( character.get('x') ),
        ty = this.pixelToTile( character.get('y') ),
        nx = character.get('x') % settings.tile,
        ny = character.get('y') % settings.tile,
        cell = this.tileCell(tx, ty),
        cellRight = this.tileCell(tx + 1, ty),
        cellDown = this.tileCell(tx, ty + 1),
        cellDiagonal = this.tileCell(tx + 1, ty + 1);

      if ( character.get('dy') > 0 ) {
        if ( (cellDown && !cell) || (cellDiagonal && !cellRight && nx) ) {
          character.set('y', this.tileToPixel(ty));
          character.set('dy', 0);
          character.set('falling', false);
          jumping = false;
          ny = 0;
        }
      } else if ( character.get('dy') < 0 ) {
        if ( (cell && !cellDown) || (cellRight && !cellDiagonal && nx) ) {
          character.set('y', this.tileToPixel(ty + 1));
          character.set('dy', 0);
          cell = cellDown;
          cellRight = cellDiagonal;
          ny = 0;
        }
      }

      if ( character.get('dx') > 0 ) {
        if ( (cellRight && !cell) || (cellDiagonal && !cellDown && ny) ) {
          character.set('x', this.tileToPixel(tx));
          character.set('dx', 0);
        }
      } else if ( character.get('dx') < 0 ) {
        if ( (cell && !cellRight) || (cellDown && !cellDiagonal && ny) ) {
          character.set('x', this.tileToPixel(tx + 1));
          character.set('dx', 0);
        }
      }

      if ( character.get('type') === 'villain' ) {
        if ( character.get('left') && (cell || !cellDown) ) {
          character.set('left', false);
          character.set('right', true);
        } else if ( character.get('right') && (cellRight || !cellDiagonal) ) {
          character.set('right', false);
          character.set('left', true);
        }
      }

      character.set('falling', !(cellDown || (nx && cellDiagonal)));

      //Bullet
      _.each( bullets, _.bind(function( bullet ) {
        if ( bullet.active ) {
          //Movement
          bullet.x = ( bullet.pointAt === 'right' ) ? bullet.x + accelBullet : bullet.x - accelBullet;

          //Collision
          var tbx = this.pixelToTile( bullet.x ),
            tby = this.pixelToTile( bullet.y ),
            cBullet = this.tileCell(tbx, tby);

          if ( cBullet ) {
            bullet.active = false;
          }
        }
      }, this));
    }
  });

  return CharacterView;

});


text:
using UnityEngine;
using System.Collections;
using System.Collections.Generic;

public class TokenBehaviour : MonoBehaviour
{
	private List<GameObject> tokens = new List<GameObject>();
	public bool followingMouse = false;
	private GameObject currentContainer;
	public Transform[] tokenContainers = new Transform[6];
	private float proximity = 20f;

	void Update ()
	{
		if(CheckForContainer () == false) //If the container does not snap to a position
		{
			FollowMouse(); //The container should follow the mouse
		}

		if(tokens.Count > 0)
		{
			UpdateTokenPositions (); //Set all the tokens in the list to follow the gameobject
			PlaceInContainer();
		}
	}

	private void UpdateTokenPositions()
	{
		for(int i = 0; i < tokens.Count; ++i)
		{
			tokens[i].transform.position = gameObject.transform.position;
		}
	}

	private bool CheckForContainer()
	{
		Vector3 mousePos = Input.mousePosition; //Position of mouse

		for(int i = 0; i < 6; ++i) //For all children of token container
		{
			if(MasterScript.invasionGUI.planetList[i].activeInHierarchy == true) //If it IS a token container
			{
				foreach(Transform child in tokenContainers[i])
				{
					if(child.tag == "TokenContainer")
					{
						Vector3 childPos = UICamera.mainCamera.WorldToScreenPoint(child.position); //Get position of container in screen coordinates

						if(mousePos.x < childPos.x + proximity && mousePos.x > childPos.x - proximity && mousePos.y < childPos.y + proximity && mousePos.y > childPos.y - proximity) //If mouseposition is within distance of container
						{
							gameObject.transform.position = child.position; //Snap to position
							currentContainer = child.gameObject; //Set nearby container
							return true; //Nearby container found return true
						}
					}
				}
			}
		}

		currentContainer = null; //Object has no nearby container
		return false; //So return false
	}

	private void FollowMouse()
	{
		Vector3 position = Camera.main.ScreenToViewportPoint (Input.mousePosition); //New position is mouse position in viewport coordinates

		position = MasterScript.systemPopup.uiCamera.ViewportToWorldPoint (position); //Use uicamera to convert viewport coordinates to world coordinates

		Vector3 newPosition = new Vector3(position.x, position.y, -37.0f); //Set position

		gameObject.transform.position = newPosition;
	}

	public void PlaceInContainer()
	{
		if(currentContainer != null)
		{
			if(Input.GetMouseButtonDown(1))
			{
				AttachToContainer();
			}
		}

		if(Input.GetKeyDown("x"))
		{
			for(int i = 0; i < tokens.Count; ++i)
			{
				TokenUI token = tokens[i].GetComponent<TokenUI>();
				tokens[i].transform.position = token.tokenPositions[token.originalPosition].transform.position;
				tokens[i].transform.parent = token.originalParent.transform;
				tokens[i].GetComponent<UIButton>().isEnabled = true;
			}

			tokens.Clear ();
		}
	}

	public void ButtonClicked() //This method is called if the button is not already following the mouse
	{
		if(UICamera.currentTouchID == -1)
		{
			UIButton.current.gameObject.GetComponent<UIButton> ().isEnabled = false;

			if(UIButton.current.transform.parent.name == "Defence Token" || UIButton.current.transform.parent.name == "Auxiliary Token" || UIButton.current.transform.parent.name == "Assault Token") //If it already has a parent (is already in a container)
			{
				UILabel label = UIButton.current.transform.parent.Find ("Label").gameObject.GetComponent<UILabel>(); //Decrease the container's value
				int j = int.Parse (label.text);
				label.text = (j - 1).ToString();
			}

			if(tokens.Contains(UIButton.current.gameObject) == false) //If the tokens list does not already contain the clicked object
			{
				if(tokens.Count > 0) //If token has already been inserted into list
				{
					if(tokens[0].name == UIButton.current.gameObject.name) //Check the clicked token's name matches the name of the other tokens in the list
					{
						tokens.Add(UIButton.current.gameObject); //Add it to the list if it does
					}
				}
				else //If the list is empty
				{
					tokens.Add(UIButton.current.gameObject); //Add the token to the list
				}
			}
		}
	}

	private void UpdateParent(GameObject container) //This method is used to increase the container's value
	{
		for(int i = 0; i < tokens.Count; ++i)
		{
			tokens[i].transform.parent = container.transform;
			UILabel label = container.transform.Find ("Label").gameObject.GetComponent<UILabel>();
			int j = int.Parse (label.text);
			label.text = (j + 1).ToString();
			tokens[i].GetComponent<UIButton> ().isEnabled = true;
		}

		tokens.Clear ();
		currentContainer = null;
	}

	public void AttachToContainer() //This method is called if the button is clicked and the object is already following the mouse
	{
		if(currentContainer != null) //If it is snapped to a container
		{
			switch (currentContainer.name) //If the container name matches the active object
			{
			case "Defence Token":
				if(tokens[0].GetComponent<UISprite>().spriteName == "Defence Pressed")
				{
					UpdateParent(currentContainer); //UpdateParent
				}
				break;
			case "Auxiliary Token":
				if(tokens[0].GetComponent<UISprite>().spriteName == "Secondary Weapon Pressed")
				{
					UpdateParent(currentContainer);
				}
				break;
			case "Assault Token":
				if(tokens[0].GetComponent<UISprite>().spriteName == "Primary Weapon Pressed")
				{
					UpdateParent(currentContainer);
				}
				break;
			default:
				break;
			}
		}
	}
}


text:
package org.apache.struts2.jasper.tagplugins.jstl.core;

import org.apache.struts2.jasper.compiler.tagplugin.TagPlugin;
import org.apache.struts2.jasper.compiler.tagplugin.TagPluginContext;

public class Catch implements TagPlugin {

    public void doTag(TagPluginContext ctxt) {

        //flag for the existence of the var attribute
        boolean hasVar = ctxt.isAttributeSpecified("var");

        //temp name for exception and caught
        String exceptionName = ctxt.getTemporaryVariableName();
        String caughtName = ctxt.getTemporaryVariableName();

        //main part to generate code
        ctxt.generateJavaSource("boolean " + caughtName + " = false;");
        ctxt.generateJavaSource("try{");
        ctxt.generateBody();
        ctxt.generateJavaSource("}");

        //do catch
        ctxt.generateJavaSource("catch(Throwable " + exceptionName + "){");

        //if the var specified, the exception object should
        //be set to the attribute "var" defines in page scope
        if(hasVar){
            String strVar = ctxt.getConstantAttribute("var");
            ctxt.generateJavaSource("    pageContext.setAttribute(\"" + strVar + "\", "
                    + exceptionName + ", PageContext.PAGE_SCOPE);");
        }

        //whenever there's exception caught,
        //the flag caught should be set true;
        ctxt.generateJavaSource("    " + caughtName + " = true;");
        ctxt.generateJavaSource("}");

        //do finally
        ctxt.generateJavaSource("finally{");

        //if var specified, the attribute it defines
        //in page scope should be removed
        if(hasVar){
            String strVar = ctxt.getConstantAttribute("var");
            ctxt.generateJavaSource("    if(!" + caughtName + "){");
            ctxt.generateJavaSource("        pageContext.removeAttribute(\"" + strVar + "\", PageContext.PAGE_SCOPE);");
            ctxt.generateJavaSource("    }");
        }

        ctxt.generateJavaSource("}");
    }

}


text:
package com.sun.tools.doclets.internal.toolkit;

import java.io.*;
import com.sun.javadoc.*;

/**
 * The interface for writing annotation type required member output.
 *
 * This code is not part of an API.
 * It is implementation that is subject to change.
 * Do not use it as an API
 *
 * @author Jamie Ho
 * @author Bhavesh Patel (Modified)
 * @since 1.5
 */

public interface AnnotationTypeRequiredMemberWriter {

    /**
     * Add the annotation type details tree header.
     *
     * @param classDoc the annotation type being documented
     * @param memberDetailsTree the content tree representing member details
     */
    public void addAnnotationDetailsTreeHeader(ClassDoc classDoc,
            Content memberDetailsTree);

    /**
     * Get the annotation type documentation tree header.
     *
     * @param member the annotation type being documented
     * @param annotationDetailsTree the content tree representing annotation type details
     * @return content tree for the annotation type documentation header
     */
    public Content getAnnotationDocTreeHeader(MemberDoc member,
            Content annotationDetailsTree);

    /**
     * Get the annotation type details tree.
     *
     * @param annotationDetailsTree the content tree representing annotation type details
     * @return content tree for the annotation type details
     */
    public Content getAnnotationDetails(Content annotationDetailsTree);

    /**
     * Get the annotation type documentation.
     *
     * @param annotationDocTree the content tree representing annotation type documentation
     * @param isLastContent true if the content to be added is the last content
     * @return content tree for the annotation type documentation
     */
    public Content getAnnotationDoc(Content annotationDocTree, boolean isLastContent);

    /**
     * Get the signature for the given member.
     *
     * @param member the member being documented
     * @return content tree for the annotation type signature
     */
    public Content getSignature(MemberDoc member);

    /**
     * Add the deprecated output for the given member.
     *
     * @param member the member being documented
     * @param annotationDocTree content tree to which the deprecated information will be added
     */
    public void addDeprecated(MemberDoc member, Content annotationDocTree);

    /**
     * Add the comments for the given member.
     *
     * @param member the member being documented
     * @param annotationDocTree the content tree to which the comments will be added
     */
    public void addComments(MemberDoc member, Content annotationDocTree);

    /**
     * Add the tags for the given member.
     *
     * @param member the member being documented
     * @param annotationDocTree the content tree to which the tags will be added
     */
    public void addTags(MemberDoc member, Content annotationDocTree);

    /**
     * Close the writer.
     */
    public void close() throws IOException;
}


text:
//
// PROJECT CHRONO - http://projectchrono.org
//
// Copyright (c) 2013 Project Chrono
// All rights reserved.
//
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file at the top level of the distribution
// and at http://projectchrono.org/license-chrono.txt.
//

//
//   Demo code (advanced), about
//
//     - using the SCM semi-empirical model for deformable soil

#include "chrono/geometry/ChTriangleMeshConnected.h"
#include "chrono/solver/ChSolverMINRES.h"
#include "chrono/physics/ChLoadContainer.h"
#include "chrono/physics/ChSystem.h"
#include "chrono/physics/ChSystemDEM.h"

#include "chrono_irrlicht/ChIrrApp.h"
#include "chrono_vehicle/ChVehicleModelData.h"
#include "chrono_vehicle/terrain/DeformableTerrain.h"

using namespace chrono;
using namespace chrono::irrlicht;

using namespace irr;

int main(int argc, char* argv[]) {
    // Global parameter for tire:
    double tire_rad = 0.8;
    double tire_vel_z0 = -3;
    ChVector<> tire_center(0, 0.02+tire_rad, 0);

    double tire_w0 = tire_vel_z0/tire_rad;

    // Create a Chrono::Engine physical system
    ChSystemDEM my_system;

    // Create the Irrlicht visualization (open the Irrlicht device,
    // bind a simple user interface, etc. etc.)
    ChIrrApp application(&my_system, L"Deformable soil", core::dimension2d<u32>(1280, 720), false, true);

    // Easy shortcuts to add camera, lights, logo and sky in Irrlicht scene:
    application.AddTypicalLogo();
    application.AddTypicalSky();
    application.AddTypicalLights();
    application.AddTypicalCamera(core::vector3df(1.0f, 1.4f, -1.2f), core::vector3df(0, (f32)tire_rad, 0));
    application.AddLightWithShadow(core::vector3df(1.5f, 5.5f, -2.5f), core::vector3df(0, 0, 0), 3, 2.2, 7.2, 40, 512,
                                   video::SColorf(0.8f, 0.8f, 1.0f));

    std::shared_ptr<ChBody> mtruss (new ChBody);
    mtruss->SetBodyFixed(true);
    my_system.Add(mtruss);

    //
    // CREATE A RIGID BODY WITH A MESH
    //

    // Create also a rigid body with a rigid mesh that will be used for the cosimulation,
    // this time the ChLoadContactSurfaceMesh cannot be used as in the FEA case, so we
    // will use the ChLoadBodyMesh class:

    std::shared_ptr<ChBody> mrigidbody (new ChBody);
    my_system.Add(mrigidbody);
    mrigidbody->SetMass(500);
    mrigidbody->SetInertiaXX(ChVector<>(20,20,20));
    mrigidbody->SetPos(tire_center + ChVector<>(0,0.3,0));

    std::shared_ptr<ChTriangleMeshShape> mrigidmesh(new ChTriangleMeshShape);
    mrigidmesh->GetMesh().LoadWavefrontMesh(GetChronoDataFile("tractor_wheel.obj"));
    mrigidbody->AddAsset(mrigidmesh);

    mrigidbody->GetCollisionModel()->ClearModel();
    mrigidbody->GetCollisionModel()->AddTriangleMesh(mrigidmesh->GetMesh(), false, false, VNULL,
                                                     ChMatrix33<>(1), 0.01);
    mrigidbody->GetCollisionModel()->BuildModel();
    mrigidbody->SetCollide(true);

    std::shared_ptr<ChColorAsset> mcol(new ChColorAsset);
    mcol->SetColor(ChColor(0.3f, 0.3f, 0.3f));
    mrigidbody->AddAsset(mcol);

    std::shared_ptr<ChLinkEngine> myengine(new ChLinkEngine);
    myengine->Set_shaft_mode(ChLinkEngine::ENG_SHAFT_OLDHAM);
    myengine->Set_eng_mode(ChLinkEngine::ENG_MODE_ROTATION);
    myengine->Set_rot_funct( std::make_shared<ChFunction_Ramp>(0, CH_C_PI / 4.0));  // phase, speed
    myengine->Initialize(mrigidbody, mtruss, ChCoordsys<>(tire_center, Q_from_AngAxis(CH_C_PI_2,VECT_Y)));
    my_system.Add(myengine);

    //
    // THE DEFORMABLE TERRAIN
    //

    // Create the 'deformable terrain' object
    vehicle::DeformableTerrain mterrain(&my_system);

    // Optionally, displace/tilt/rotate the terrain reference plane:
    mterrain.SetPlane(ChCoordsys<>(ChVector<>(0, 0, 0.5)));

    // Initialize the geometry of the soil: use either a regular grid:
     mterrain.Initialize(0.2,1.5,5,20,60);
    // or use a height map:
    //mterrain.Initialize(vehicle::GetDataFile("terrain/height_maps/test64.bmp"), "test64", 1.6, 1.6, 0, 0.3);

    // Set the soil terramechanical parameters:
    mterrain.SetSoilParametersSCM(0.2e6,  // Bekker Kphi
                                    0,   // Bekker Kc
                                    1.1, // Bekker n exponent
                                    0,   // Mohr cohesive limit (Pa)
                                    30,  // Mohr friction limit (degrees)
                                    0.01,// Janosi shear coefficient (m)
                                    4e7, // Elastic stiffness (Pa/m), before plastic yeld, must be > Kphi
                                    3e4  // Damping (Pa s/m), proportional to negative vertical speed (optional)
                                    );
    mterrain.SetBulldozingFlow(true);    // inflate soil at the border of the rut
    mterrain.SetBulldozingParameters(55, // angle of friction for erosion of displaced material at the border of the rut
                                    1, // displaced material vs downward pressed material.
                                    5,   // number of erosion refinements per timestep
                                    10); // number of concentric vertex selections subject to erosion
    // Turn on the automatic level of detail refinement, so a coarse terrain mesh
    // is automatically improved by adding more points under the wheel contact patch:
    mterrain.SetAutomaticRefinement(true);
    mterrain.SetAutomaticRefinementResolution(0.04);

    // Set some visualization parameters: either with a texture, or with falsecolor plot, etc.
    //mterrain.SetTexture(vehicle::GetDataFile("terrain/textures/grass.jpg"), 16, 16);
    mterrain.SetPlotType(vehicle::DeformableTerrain::PLOT_PRESSURE, 0, 30000.2);
    //mterrain.SetPlotType(vehicle::DeformableTerrain::PLOT_PRESSURE_YELD, 0, 30000.2);
    //mterrain.SetPlotType(vehicle::DeformableTerrain::PLOT_SINKAGE, 0, 0.15);
    //mterrain.SetPlotType(vehicle::DeformableTerrain::PLOT_SINKAGE_PLASTIC, 0, 0.15);
    //mterrain.SetPlotType(vehicle::DeformableTerrain::PLOT_SINKAGE_ELASTIC, 0, 0.05);
    //mterrain.SetPlotType(vehicle::DeformableTerrain::PLOT_STEP_PLASTIC_FLOW, 0, 0.0001);
    //mterrain.SetPlotType(vehicle::DeformableTerrain::PLOT_ISLAND_ID, 0, 8);
    //mterrain.SetPlotType(vehicle::DeformableTerrain::PLOT_IS_TOUCHED, 0, 8);
    mterrain.GetMesh()->SetWireframe(true);

    // ==IMPORTANT!== Use this function for adding a ChIrrNodeAsset to all items
    application.AssetBindAll();

    // ==IMPORTANT!== Use this function for 'converting' into Irrlicht meshes the assets
    application.AssetUpdateAll();

    // Use shadows in realtime view
    application.AddShadowAll();

    // ==IMPORTANT!== Mark completion of system construction
    my_system.SetupInitial();

    //
    // THE SOFT-REAL-TIME CYCLE
    //
/*
        // Change the timestepper to HHT:
    my_system.SetTimestepperType(ChTimestepper::Type::HHT);
    auto integrator = std::static_pointer_cast<ChTimestepperHHT>(my_system.GetTimestepper());
    integrator->SetAlpha(-0.2);
    integrator->SetMaxiters(8);
    integrator->SetAbsTolerances(1e-05, 1.8e00);
    integrator->SetMode(ChTimestepperHHT::POSITION);
    integrator->SetModifiedNewton(true);
    integrator->SetScaling(true);
    integrator->SetVerbose(true);
*/
/*
    my_system.SetTimestepperType(ChTimestepper::Type::EULER_IMPLICIT);
*/
    application.SetTimestep(0.002);

    while (application.GetDevice()->run()) {
        application.BeginScene();

        application.DrawAll();

        application.DoStep();

        ChIrrTools::drawColorbar(0,30000, "Pressure yeld [Pa]", application.GetDevice(),  1180);

        application.EndScene();
    }

    return 0;
}


text:
class	Resources
{
public:
	static RoomManager	RM;
};

#endif


text:
"""
Summarization by frequency of words
"""
from collections import defaultdict
from heapq import nlargest
from string import punctuation
from typing import List

from pythainlp.corpus import thai_stopwords
from pythainlp.tokenize import sent_tokenize, word_tokenize

_STOPWORDS = thai_stopwords()

class FrequencySummarizer:
    def __init__(self, min_cut: float = 0.1, max_cut: float = 0.9):
        self.__min_cut = min_cut
        self.__max_cut = max_cut
        self.__stopwords = set(punctuation).union(_STOPWORDS)

    @staticmethod
    def __rank(ranking, n: int):
        return nlargest(n, ranking, key=ranking.get)

    def __compute_frequencies(
        self, word_tokenized_sents: List[List[str]]
    ) -> defaultdict:
        word_freqs = defaultdict(int)
        for sent in word_tokenized_sents:
            for word in sent:
                if word not in self.__stopwords:
                    word_freqs[word] += 1

        max_freq = float(max(word_freqs.values()))
        for w in list(word_freqs):
            word_freqs[w] = word_freqs[w] / max_freq
            if (
                word_freqs[w] >= self.__max_cut
                or word_freqs[w] <= self.__min_cut
            ):
                del word_freqs[w]

        return word_freqs

    def summarize(
        self, text: str, n: int, tokenizer: str = "newmm"
    ) -> List[str]:
        sents = sent_tokenize(text, engine="whitespace+newline")
        word_tokenized_sents = [
            word_tokenize(sent, engine=tokenizer) for sent in sents
        ]
        self.__freq = self.__compute_frequencies(word_tokenized_sents)
        ranking = defaultdict(int)

        for i, sent in enumerate(word_tokenized_sents):
            for w in sent:
                if w in self.__freq:
                    ranking[i] += self.__freq[w]
        summaries_idx = self.__rank(ranking, n)

        return [sents[j] for j in summaries_idx]


text:
<?php if($in>1){ ?>

	<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
	Setup <?php //echo $in; ?> Complete Successfully

<?php
}
elseif($in==1){
?>

	<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
	Setup Fail! <?php //echo $in; ?> Setup is Not Completed Successfully.

<?php
}
elseif($dis>1){
?>

	<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
	Distribute <?php //echo $in; ?> Complete Successfully

<?php
}
elseif($dis==1){
?>

	<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
	Distribute Fail! <?php //echo $in; ?> Setup is Not Completed Successfully.

<?php
}
?>
<?php
$this->session->unset_userdata('in');
$this->session->unset_userdata('dis');
?>


text:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:orientation="vertical">
    <RelativeLayout
        android:id="@+id/fragment_more_relative_layout"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_margin="10dp">
        <ImageView
            android:id="@+id/more_image"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_centerVertical="true"
            android:layout_marginLeft="5dp"
            android:src="@mipmap/fragment_more_reached" />

        <TextView
            android:id="@+id/more_customer"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_centerVertical="true"
            android:layout_marginLeft="15dp"
            android:layout_toRightOf="@id/more_image"
            android:text="联系客服"
            android:textSize="20sp" />

        <ImageView
            android:id="@+id/more_right_arrow"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_alignParentRight="true"
            android:layout_centerVertical="true"
            android:layout_marginRight="10dp"
            android:src="@mipmap/bg_right" />
    </RelativeLayout>
    <View
        android:layout_width="match_parent"
        android:layout_height="1dp"
        android:background="@color/grayLight"/>
</LinearLayout>


text:
/**
 * Module dependencies
 */

var chain = require('slide').chain;
var last = chain.last;
var anvil = require('anvil-cli');
var API = require('./api');
var write = require('fs').writeFile;

var APP_NAME_LENGTH = 30;

/**
 * Create a Heroku hook
 *
 * @param {Object} config
 * @return {Function}
 */

module.exports = function(config) {
  config = config || {};

  var token = config.token;
  var prefix = config.prefix;

  if (!token) throw new Error('missing heroku token');
  if (!prefix) throw new Error('missing heroku prefix');

  var api = new API(token);

  return function(app) {
    app.deploy('heroku', deploy);
    app.test('heroku', test);

    app.on('task', function(task) {
      task.on('deleted', function() {
        remove(task, task.createLogger('heroku'));
      });

      task.use(function(task, done) {
        var buildpacks = task.info.buildpacks;
        if (!Array.isArray(buildpacks)) return done();
        task.info.buildpacks = 'https://github.com/ddollar/heroku-buildpack-multi.git';
        var out = task.dir + '/.buildpacks';
        write(out, buildpacks.join('\n'), done);
      });
    });
  };

  function deploy(task, log, fn) {
    task.info.app = createName(prefix, task);

    // TODO handle multi region

    chain([
      [api, 'exists', task, log],
      [api, 'create', last, task, log],
      [api, 'enableFeatures', task, log],
      [api, 'addCollaborators', task, log],
      [api, 'addDrains', task, log],
      [api, 'provisionResources', task, log],
      [api, 'setErrorPage', task, log],
      [api, 'setEnv', task, log],
      [api, 'addDomains', task, log],
      [createSlug, task, log],
      [api, 'release', task, log]
    ], function(err) {
      if (err) log('' + (err.stack || err));
      fn(err);
    });
  }

  function remove(task, log) {
    task.info.app = createName(prefix, task);
    api.remove(task, log);
  }

  function test(task, log, fn) {
    task.info.app = createName(prefix, task);
    api.test(task, log, fn);
  }
};

function createName(prefix, task) {
  // TODO hash the task info (env, buildpack, etc) as well
  return (prefix + '-' + task.info.sha).slice(0, APP_NAME_LENGTH);
}

function createSlug(task, log, fn) {
  var dir = task.dir;
  var env = task.info.env;
  log('building slug');

  var opts = {
    buildpack: task.info.buildpacks,
    logger: log,
    env: env
  };

  anvil(dir, opts, function(err, slug, cache) {
    if (err) return fn(err);
    task.info.slug = slug;
    fn();
  });
}


text:
ACCEPTED

#### According to
Index Fungorum

#### Published in
Revis. gen. pl. (Leipzig) 3(2): 516 (1898)

#### Original name
Lenzites klotzschii Berk.

### Remarks
null


text:
require 'spec_helper'

describe 'CanDv8 mixin' do

  class Joe
    include Dv8::CanDv8
  end

  let(:joe){ Joe.new }

  it 'should respond to things' do
    joe.should respond_to(:dv8ed?)
    joe.should respond_to(:dv8!)
  end

  it 'should set the dv8ed to true' do
    joe.should_not be_dv8ed
    joe.dv8!
    joe.should be_dv8ed
  end

  it 'should handle blocks properly' do
    joe.should_not be_dv8ed
    joe.dv8! do
      joe.should be_dv8ed
    end
    joe.should_not be_dv8ed
  end

  it 'should reset if an error is raised' do

    lambda{
      joe.dv8! do
        raise 'issue'
      end
    }.should raise_error

    joe.should_not be_dv8ed

  end

end


text:
import { Middleware } from "rowan";
import * as msgpack from 'msgpack-lite';
import { textToBytes } from '../util';
import { Context } from "../context";

/**
 * Encodes the outgoing message data
 */
export default class BodyEncoder<Ctx extends Context = Context> implements Middleware<Context> {
  meta: {
    type: "BodyEncoder"
  }
  process(ctx: Context, next: (ctx?: Context) => Promise<void>): Promise<void> {
    if (ctx["__encoded"] === true || !ctx.out || ctx.out.data === undefined || !ctx.out.head) return next();

    switch (ctx.out.head.encoding) {
      case undefined:
        if (ctx.out.data instanceof Uint8Array) {
          ctx.out.raw = ctx.out.data;
          ctx.out.head.encoding = "none";
          ctx["__encoded"] = true;
          break;
        }
      case "msgpack":
        ctx.out.head.encoding = "msgpack";
        ctx.out.raw = msgpack.encode(ctx.out.data);
        ctx["__encoded"] = true;
        break;
      case "json":
        ctx.out.head.encoding = "json";
        ctx.out.raw = textToBytes(JSON.stringify(ctx.out.data));
        ctx["__encoded"] = true;
        break;
      case "none":
        ctx.out.raw = ctx.out.data;
        ctx["__encoded"] = true;
        break;
      default:
    }
    return next();
  }
}


text:
<?php

namespace TipoQuestao\Controller;

use Estrutura\Controller\AbstractCrudController;
use Zend\View\Model\ViewModel;

class TipoQuestaoController extends AbstractCrudController
{
    /**
     * @var \Action\Service\Action
     */
    protected $service;

    /**
     * @var \Action\Form\Action
     */
    protected $form;

    public function __construct(){
        parent::init();
    }

    public function indexAction()
    {
        //http://igorrocha.com.br/tutorial-zf2-parte-9-paginacao-busca-e-listagem/4/

        return new ViewModel([
            'service' => $this->service,
            'form' => $this->form,
            'controller' => $this->params('controller'),
            'atributos' => array()
        ]);
    }

    public function indexPaginationAction()
    {
        //http://igorrocha.com.br/tutorial-zf2-parte-9-paginacao-busca-e-listagem/4/

        $filter = $this->getFilterPage();

        $camposFilter = [
            '0' => [
                'filter' => "tipo_questao.nm_tipo_questao LIKE ?",
            ],
            '1' => NULL,
        ];

        $paginator = $this->service->getTipoQuestaoPaginator($filter, $camposFilter);

        $paginator->setItemCountPerPage($paginator->getTotalItemCount());

        $countPerPage = $this->getCountPerPage(
            current(\Estrutura\Helpers\Pagination::getCountPerPage($paginator->getTotalItemCount()))
        );

        $paginator->setItemCountPerPage($this->getCountPerPage(
            current(\Estrutura\Helpers\Pagination::getCountPerPage($paginator->getTotalItemCount()))
        ))->setCurrentPageNumber($this->getCurrentPage());

        $viewModel = new ViewModel([
            'service' => $this->service,
            'form' => $this->form,
            'paginator' => $paginator,
            'filter' => $filter,
            'countPerPage' => $countPerPage,
            'camposFilter' => $camposFilter,
            'controller' => $this->params('controller'),
            'atributos' => array()
        ]);

        return $viewModel->setTerminal(TRUE);
    }

    public function gravarAction(){
        $controller = $this->params('controller');
        $this->addSuccessMessage('Operação realizada com sucesso!');
        $this->redirect()->toRoute('navegacao', array('controller' => $controller, 'action' => 'index'));
        return parent::gravar($this->service, $this->form);
    }

    public function cadastroAction()
    {
        return parent::cadastro($this->service, $this->form);
    }

    public function excluirAction()
    {
        return parent::excluir($this->service, $this->form);
    }

    public function excluirLogAction(){

        $auth = $this->getServiceLocator()->get('AuthService')->getStorage()->read();
        $controller = $this->params('controller');
        $id_tipoQuestao = $this->params('id');

        if (isset($id_tipoQuestao) && $id_tipoQuestao) {
            $id_tipoQuestao = \Estrutura\Helpers\Cript::dec($id_tipoQuestao);
        } else {
            $this->addErrorMessage('ID não informado');
            return $this->redirect()->toRoute('navegacao', ['controller' => $controller, 'action' => 'index']);
        }
        $tipoQuestaoService = new \TipoQuestao\Service\TipoQuestaoService();
        $tipoQuestaoEntity = $tipoQuestaoService->buscar($id_tipoQuestao);

        if (1 == $auth->id_perfil) { //Se o usuario logado for Administrador
            $tipoQuestaoEntity->setCsAtivo(0); // Valor '0' desabilita o campo cs_ativo
            $tipoQuestaoEntity->salvar();
        }
        $this->addSuccessMessage('Tipo de Questão excluido com sucesso.');
        return $this->redirect()->toRoute('navegacao', array('controller' => $controller, 'action' => 'index'));
    }
}


text:
package org.bricket.plugin.galleriffic.web;

import java.util.Map;

import org.bricket.web.BricketTileConfig;

import brix.jcr.wrapper.BrixNode;

/**
 * @author Ingo Renner
 * @author Henning Teek
 *
 */
public class GallerifficConfig extends BricketTileConfig {
    private static final String PROP_GALLERIFFIC_DEFAULTCSS = "galleriffic.defaultcss";
    private static final String PROP_GALLERIFFIC_DELAY = "galleriffic.delay";
    private static final String PROP_GALLERIFFIC_NUMTHUMBS = "galleriffic.numThumbs";
    private static final String PROP_GALLERIFFIC_PRELOADAHEAD = "galleriffic.preloadAhead";
    private static final String PROP_GALLERIFFIC_ENABLETOPPAGER = "galleriffic.enableTopPager";
    private static final String PROP_GALLERIFFIC_ENABLEBOTTOMPAGER = "galleriffic.enableBottomPager";
    private static final String PROP_GALLERIFFIC_MAXPAGESTOSHOW = "galleriffic.maxPagesToShow";
    private static final String PROP_GALLERIFFIC_RENDERSSCONTROLS = "galleriffic.renderSSControls";
    private static final String PROP_GALLERIFFIC_RENDERNAVCONTROLS = "galleriffic.renderNavControls";
    private static final String PROP_GALLERIFFIC_ENABLEHISTORY = "galleriffic.enableHistory";
    private static final String PROP_GALLERIFFIC_AUTOSTART = "galleriffic.autoStart";
    private static final String PROP_GALLERIFFIC_SYNCTRANSITIONS = "galleriffic.syncTransitions";
    private static final String PROP_GALLERIFFIC_DEFAULTTRANSITIONDURATION = "galleriffic.defaultTransitionDuration";

    private boolean defaultCss = true;
    private int delay = 4000;
    private int numThumbs = 10;
    private int preloadAhead = 10;
    private boolean enableTopPager = true;
    private boolean enableBottomPager = true;
    private int maxPagesToShow = 5;
    private boolean renderSSControls = true;
    private boolean renderNavControls = true;
    private boolean enableHistory = false;
    private boolean autoStart = true;
    private boolean syncTransitions = true;
    private int defaultTransitionDuration = 500;

    public void fillIn(Map<String, Object> vars) {
        vars.put("defaultCss", defaultCss);
        vars.put("delay", delay);
        vars.put("numThumbs", numThumbs);
        vars.put("preloadAhead", preloadAhead);
        vars.put("enableTopPager", enableTopPager);
        vars.put("enableBottomPager", enableBottomPager);
        vars.put("maxPagesToShow", maxPagesToShow);
        vars.put("renderSSControls", renderSSControls);
        vars.put("renderNavControls", renderNavControls);
        vars.put("enableHistory", enableHistory);
        vars.put("autoStart", autoStart);
        vars.put("syncTransitions", syncTransitions);
        vars.put("defaultTransitionDuration", defaultTransitionDuration);
    }

    @Override
    public void load(BrixNode node) {
        setDefaultCss(load(node, PROP_GALLERIFFIC_DEFAULTCSS, defaultCss));
        setDelay(load(node, PROP_GALLERIFFIC_DELAY, delay));
        setNumThumbs(load(node, PROP_GALLERIFFIC_NUMTHUMBS, numThumbs));
        setPreloadAhead(load(node, PROP_GALLERIFFIC_PRELOADAHEAD, preloadAhead));
        setEnableTopPager(load(node, PROP_GALLERIFFIC_ENABLETOPPAGER, enableTopPager));
        setEnableBottomPager(load(node, PROP_GALLERIFFIC_ENABLEBOTTOMPAGER, enableBottomPager));
        setMaxPagesToShow(load(node, PROP_GALLERIFFIC_MAXPAGESTOSHOW, maxPagesToShow));
        setRenderSSControls(load(node, PROP_GALLERIFFIC_RENDERSSCONTROLS, renderSSControls));
        setRenderNavControls(load(node, PROP_GALLERIFFIC_RENDERNAVCONTROLS, renderNavControls));
        setEnableHistory(load(node, PROP_GALLERIFFIC_ENABLEHISTORY, enableHistory));
        setAutoStart(load(node, PROP_GALLERIFFIC_AUTOSTART, autoStart));
        setSyncTransitions(load(node, PROP_GALLERIFFIC_SYNCTRANSITIONS, syncTransitions));
        setDefaultTransitionDuration(load(node, PROP_GALLERIFFIC_DEFAULTTRANSITIONDURATION, defaultTransitionDuration));
    }

    @Override
    public void save(BrixNode node) {
        save(node, PROP_GALLERIFFIC_DEFAULTCSS, defaultCss);
        save(node, PROP_GALLERIFFIC_DELAY, delay);
        save(node, PROP_GALLERIFFIC_NUMTHUMBS, numThumbs);
        save(node, PROP_GALLERIFFIC_PRELOADAHEAD, preloadAhead);
        save(node, PROP_GALLERIFFIC_ENABLETOPPAGER, enableTopPager);
        save(node, PROP_GALLERIFFIC_ENABLEBOTTOMPAGER, enableBottomPager);
        save(node, PROP_GALLERIFFIC_MAXPAGESTOSHOW, maxPagesToShow);
        save(node, PROP_GALLERIFFIC_RENDERSSCONTROLS, renderSSControls);
        save(node, PROP_GALLERIFFIC_RENDERNAVCONTROLS, renderNavControls);
        save(node, PROP_GALLERIFFIC_ENABLEHISTORY, enableHistory);
        save(node, PROP_GALLERIFFIC_AUTOSTART, autoStart);
        save(node, PROP_GALLERIFFIC_SYNCTRANSITIONS, syncTransitions);
        save(node, PROP_GALLERIFFIC_DEFAULTTRANSITIONDURATION, defaultTransitionDuration);
    }

    public boolean isDefaultCss() {
        return defaultCss;
    }

    public void setDefaultCss(boolean defaultCss) {
        this.defaultCss = defaultCss;
    }

    public int getDelay() {
        return delay;
    }

    public void setDelay(int delay) {
        this.delay = delay;
    }

    public int getNumThumbs() {
        return numThumbs;
    }

    public void setNumThumbs(int numThumbs) {
        this.numThumbs = numThumbs;
    }

    public int getPreloadAhead() {
        return preloadAhead;
    }

    public void setPreloadAhead(int preloadAhead) {
        this.preloadAhead = preloadAhead;
    }

    public boolean isEnableTopPager() {
        return enableTopPager;
    }

    public void setEnableTopPager(boolean enableTopPager) {
        this.enableTopPager = enableTopPager;
    }

    public boolean isRenderSSControls() {
        return renderSSControls;
    }

    public void setRenderSSControls(boolean renderSSControls) {
        this.renderSSControls = renderSSControls;
    }

    public boolean isRenderNavControls() {
        return renderNavControls;
    }

    public void setRenderNavControls(boolean renderNavControls) {
        this.renderNavControls = renderNavControls;
    }

    public boolean isEnableBottomPager() {
        return enableBottomPager;
    }

    public void setEnableBottomPager(boolean enableBottomPager) {
        this.enableBottomPager = enableBottomPager;
    }

    public int getMaxPagesToShow() {
        return maxPagesToShow;
    }

    public void setMaxPagesToShow(int maxPagesToShow) {
        this.maxPagesToShow = maxPagesToShow;
    }

    public boolean isEnableHistory() {
        return enableHistory;
    }

    public void setEnableHistory(boolean enableHistory) {
        this.enableHistory = enableHistory;
    }

    public boolean isAutoStart() {
        return autoStart;
    }

    public void setAutoStart(boolean autoStart) {
        this.autoStart = autoStart;
    }

    public boolean isSyncTransitions() {
        return syncTransitions;
    }

    public void setSyncTransitions(boolean syncTransitions) {
        this.syncTransitions = syncTransitions;
    }

    public int getDefaultTransitionDuration() {
        return defaultTransitionDuration;
    }

    public void setDefaultTransitionDuration(int defaultTransitionDuration) {
        this.defaultTransitionDuration = defaultTransitionDuration;
    }

    @Override
    public String toString() {
        StringBuilder builder = new StringBuilder();
        builder.append("GallerifficConfig [defaultCss=").append(defaultCss).append(", delay=").append(delay)
                .append(", numThumbs=").append(numThumbs).append(", preloadAhead=").append(preloadAhead)
                .append(", enableTopPager=").append(enableTopPager).append(", enableBottomPager=")
                .append(enableBottomPager).append(", maxPagesToShow=").append(maxPagesToShow)
                .append(", renderSSControls=").append(renderSSControls).append(", renderNavControls=")
                .append(renderNavControls).append(", enableHistory=").append(enableHistory).append(", autoStart=")
                .append(autoStart).append(", syncTransitions=").append(syncTransitions)
                .append(", defaultTransitionDuration=").append(defaultTransitionDuration).append("]");
        return builder.toString();
    }
}


text:
package org.apache.logging.log4j.message;

import org.apache.logging.log4j.util.PerformanceSensitive;

/**
 * Allows message parameters to be iterated over without any allocation
 * or memory copies.
 *
 * @since 2.11
 */
@PerformanceSensitive("allocation")
public interface ParameterVisitable {

    /**
     * Performs the given action for each parameter until all values
     * have been processed or the action throws an exception.
     * <p>
     * The second parameter lets callers pass in a stateful object to be modified with the key-value pairs,
     * so the TriConsumer implementation itself can be stateless and potentially reusable.
     * </p>
     *
     * @param action The action to be performed for each key-value pair in this collection
     * @param state the object to be passed as the third parameter to each invocation on the
     *          specified ParameterConsumer.
     * @param <S> type of the third parameter
     * @since 2.11
     */
    <S> void forEachParameter(ParameterConsumer<S> action, S state);

}


text:
module MediaWiki.API.Input where

data QueryResult
 = Query
     { quContinue :: Maybe String
     , quKind     :: QueryKind
     }

type PageID = String

data PageProp
 = PageProp
    { pgNamespace :: NamespaceID
    , pgTitle     :: String
    , pgId        :: PageID
    }

-- payload coming back from a 'userinfo' query.
data UserInfoProp
 = UserInfoProp
    { uiBlockInfo   :: Maybe BlockInfo
    , uiGroups      :: [GroupName]
    , uiRights      :: [RightsName]
    , uiHasMessages :: Maybe Bool
    , uiOptions     :: [(OptionName,String)]
    }

data WatchListInfo
 = WatchListInfo
      { wlPageId   :: PageId
      , wlRevId    :: RevisionId
      , wlTitle    :: Maybe String
      , wlUser     :: Maybe String
      , wlIsAnon   :: Maybe Bool
      , wlIsNew    :: Maybe Bool
      , wlIsMinor  :: Maybe Bool
      , wlIsPatrolled :: Maybe Bool
      , wlTimestamp    :: Maybe String
      , wlNewLength    :: Maybe (Integer,Integer)
      , wlComment      :: Maybe Bool
      }


text:
function X = setcutflag(X,flag)
%setcutlag Internal : defines a SET object as a CUT
%
% Author Johan Löfberg
if nargin == 1
    flag = 1;
end
for i = 1:length(X.clauses)
    X.clauses{i}.cut = flag;
end


text:
This project adheres to [Semantic Versioning](http://semver.org/).

This CHANGELOG follows the format listed at [Keep A Changelog](http://keepachangelog.com/)

## [Unreleased]

## [1.0.0] 2017-07-14
### Breaking Changes
- Removed support for Ruby 1.9.3

### Added
- Testing for Ruby 2.3.0 & 2.4.1

## [0.0.4] - 2015-11-30
### Changed
- Removed unused `timeout` gem dependency that was preventing the handler from running

## [0.0.3] - 2015-07-14
### Changed
- updated sensu-plugin gem to 1.2.0

## [0.0.2] - 2015-06-02
### Fixed
- added binstubs

### Changed
- removed cruft from /lib

## 0.0.1 - 2015-04-30
### Added
- initial release

[Unreleased]: https://github.com/sensu-plugins/sensu-plugins-clockworksms/compare/1.0.0...HEAD
[1.0.0]: https://github.com/sensu-plugins/sensu-plugins-clockworksms/compare/0.0.4...1.0.0
[0.0.4]: https://github.com/sensu-plugins/sensu-plugins-clockworksms/compare/0.0.3...0.0.4
[0.0.3]: https://github.com/sensu-plugins/sensu-plugins-clockworksms/compare/0.0.2...0.0.3
[0.0.2]: https://github.com/sensu-plugins/sensu-plugins-clockworksms/compare/0.0.1...0.0.2


text:
namespace ContosoUniversity.Features.Department
{
    using System;
    using System.ComponentModel.DataAnnotations;
    using System.Threading.Tasks;
    using DAL;
    using MediatR;

    public class Details
    {
        public class Query : IAsyncRequest<Model>
        {
            public int Id { get; set; }
        }

        public class Model
        {
            public string Name { get; set; }

            public decimal Budget { get; set; }

            public DateTime StartDate { get; set; }

            public int DepartmentID { get; set; }

            [Display(Name = "Administrator")]
            public string AdministratorFullName { get; set; }

        }

        public class QueryHandler : IAsyncRequestHandler<Query, Model>
        {
            private readonly SchoolContext _context;

            public QueryHandler(SchoolContext context)
            {
                _context = context;
            }

            public async Task<Model> Handle(Query message)
            {
                string query = @"
SELECT d.*, p.LastName + ', ' + p.FirstName AS [AdministratorFullName]
FROM Department d
LEFT OUTER JOIN Person p ON d.InstructorID = p.ID
WHERE d.DepartmentID = @p0";
                Model department = await _context.Database.SqlQuery<Model>(query, message.Id).SingleOrDefaultAsync();

                return department;
            }
        }
    }
}


text:
@interface SOPlaceholderedTextView : UITextView

@property (strong, nonatomic) NSString *placeholderText;
@property (strong, nonatomic) UIColor *placeholderTextColor;

@end


text:
import {Component, ElementRef, EventEmitter, Inject, Input, OnChanges, OnDestroy, Output, Renderer2,
    ViewChild} from '@angular/core';
import {DOCUMENT} from '@angular/common';
import 'viz.js';
import * as svgPanZoom from 'svg-pan-zoom';
import {Subscription} from 'rxjs';
import {GraphManipulation} from './graph-manipulation';
import {SelectionRectangle} from './selection-rectangle';
import {MatrixSelection, MatrixSelectionChange} from './matrix-selection';

@Component({
    selector: 'graph',
    templateUrl: './graph.html'
})
/**
 * @author Thomas Kleinke
 * @author Daniel de Oliveira
 */
export class GraphComponent implements OnChanges, OnDestroy {

    @Input() graph: string|undefined;
    @Input() selection: MatrixSelection;

    @Output() onSelectForEdit: EventEmitter<string> = new EventEmitter<string>();

    @ViewChild('graphContainer', {static: false}) graphContainer: ElementRef;

    private svgRoot: SVGSVGElement|undefined;
    private hoverElement: Element|undefined;

    private panZoomBehavior: SvgPanZoom.Instance;
    private selectionRectangle: SelectionRectangle|undefined;
    private lastMousePosition: { x: number, y: number }|undefined;

    private removeMouseUpEventListener: Function;
    private selectionSubscription: Subscription;

    private maxZoom: number;

    private static minZoom: number = 1;
    private static maxRealZoom: number = 2;

    constructor(@Inject(DOCUMENT) private htmlDocument: Document,
                private renderer: Renderer2) {}

    public zoomIn = () => this.panZoomBehavior.zoomIn();
    public zoomOut = () => this.panZoomBehavior.zoomOut();

    public documentsSelected = () => this.selection.documentsSelected();

    ngOnChanges() {

        this.reset();
        this.showGraph();
    }

    ngOnDestroy() {

        this.reset();
    }

    public zoomInEnabled(): boolean {

        return this.svgRoot !== undefined
            && this.panZoomBehavior.getZoom() + 0.1 <= this.maxZoom;
    }

    public zoomOutEnabled(): boolean {

        return this.svgRoot !== undefined
            && this.panZoomBehavior.getZoom() - 0.1 >= GraphComponent.minZoom;
    }

    private reset() {

        if (!this.svgRoot) return;

        this.selectionSubscription.unsubscribe();
        this.panZoomBehavior.destroy();
        this.graphContainer.nativeElement.removeChild(this.svgRoot);
        this.svgRoot = undefined;
    }

    private showGraph() {

        if (!this.graph) return;

        this.svgRoot = new DOMParser().parseFromString(this.graph, 'image/svg+xml')
            .getElementsByTagName('svg')[0];

        GraphManipulation.removeTitleElements(this.svgRoot);
        this.graphContainer.nativeElement.appendChild(this.svgRoot);
        GraphManipulation.addClusterSubgraphLabelBoxes(this.svgRoot, this.htmlDocument);
        this.configurePanZoomBehavior(this.svgRoot);
        this.subscribeSelectionChangesNotifications();
    }

    private subscribeSelectionChangesNotifications() {

        this.selectionSubscription = this.selection.changesNotifications().subscribe(
            (change: MatrixSelectionChange) => {
                GraphComponent.updateSelected(change, this.svgRoot as SVGSVGElement);
            });
    }

    private configurePanZoomBehavior(svg: SVGSVGElement) {

        this.panZoomBehavior = svgPanZoom(svg, {
            dblClickZoomEnabled: false,
            customEventsHandler: {
                haltEventListeners: ['mousedown', 'mousemove', 'mouseleave', 'mouseup'],
                init: options => this.addMouseEventListeners(options.svgElement),
                destroy: (options: any) => this.removeMouseEventListeners(options.svgElement)
            }
        });

        this.configureZooming();
    }

    private configureZooming() {

        this.maxZoom = GraphComponent.maxRealZoom / this.panZoomBehavior.getSizes().realZoom;

        if (this.panZoomBehavior.getSizes().realZoom > GraphComponent.maxRealZoom) {
            this.panZoomBehavior.zoom(this.maxZoom);
            this.panZoomBehavior.disableZoom();
        } else {
            this.panZoomBehavior.setMinZoom(GraphComponent.minZoom);
            this.panZoomBehavior.setMaxZoom(this.maxZoom);
        }
    }

    private addMouseEventListeners(svg: SVGSVGElement) {

        svg.addEventListener('mousedown', this.onMouseDown.bind(this));
        svg.addEventListener('mousemove', this.onMouseMove.bind(this));
        svg.addEventListener('click', this.onClick.bind(this));

        this.removeMouseUpEventListener
            = this.renderer.listen('document', 'mouseup', this.onMouseUp.bind(this));
    }

    private removeMouseEventListeners(svg: SVGSVGElement) {

        svg.removeEventListener('mousedown', this.onMouseDown.bind(this));
        svg.removeEventListener('mousemove', this.onMouseMove.bind(this));
        svg.removeEventListener('click', this.onClick.bind(this));

        this.removeMouseUpEventListener();
    }

    private onMouseDown(event: MouseEvent) {

        if (event.button === 2) this.lastMousePosition = { x: event.x, y: event.y };
        if (event.button === 0 && this.selection.getMode() === 'rect') {
            this.selectionRectangle = new SelectionRectangle();
            this.selectionRectangle.start(event, this.svgRoot as SVGSVGElement, this.htmlDocument);
        }
    }

    private onMouseMove(event: MouseEvent) {

        this.performPanning(event);
        this.performHovering(event.target as Element);
        if (this.selectionRectangle) this.selectionRectangle.update(event);
    }

    private onMouseUp() {

        this.lastMousePosition = undefined;
        if (this.selectionRectangle) this.performGroupSelection();
    }

    private onClick(event: Event) {

        const nodeElement: Element|undefined = GraphManipulation.getParentNodeElement(event.target as Element);
        if (!nodeElement) return;

        const resourceId: string = GraphManipulation.getResourceId(nodeElement);

        switch(this.selection.getMode()) {
            case 'none':
                this.abortHovering();
                this.onSelectForEdit.emit(resourceId);
                break;
            case 'single':
                this.selection.addOrRemove(resourceId);
                break;
            case 'rect':
                this.selection.add(resourceId);
                break;
        }
    }

    private performPanning(event: MouseEvent) {

        if (!this.lastMousePosition) return;

        const newMousePosition = { x: event.x, y: event.y };
        const delta = {
            x: newMousePosition.x - this.lastMousePosition.x,
            y: newMousePosition.y - this.lastMousePosition.y
        };

        this.panZoomBehavior.panBy(delta);
        this.lastMousePosition = newMousePosition;
    }

    private performHovering(targetElement: Element) {

        const gElement: Element|undefined = GraphManipulation.getGElement(targetElement);
        if (!gElement) return;

        if (GraphManipulation.getElementType(gElement)) {
            this.hoverElement
                = GraphManipulation.setHoverElement(this.graphContainer, gElement, this.hoverElement);
        } else {
            this.abortHovering();
        }
    }

    private abortHovering() {

        if (!this.hoverElement) return;

        GraphManipulation.setHighlighting(this.graphContainer, this.hoverElement, false);
        this.hoverElement = undefined;
    }

    private performGroupSelection() {

        if (!this.selectionRectangle) return;

        this.addToSelection(this.selectionRectangle.getSelectedElements(this.svgRoot as SVGSVGElement));

        this.selectionRectangle.finish(this.svgRoot as SVGSVGElement);
        this.selectionRectangle = undefined;
    }

    private addToSelection(selectedElements: Array<Element>) {

        if (selectedElements.length === 0) return;

        selectedElements.forEach(element => {
            this.selection.add(GraphManipulation.getResourceId(element));
        });
    }

    private static updateSelected(change: MatrixSelectionChange, svgRoot: SVGSVGElement) {

        change.ids.map(id => GraphManipulation.getNodeElement(id, svgRoot))
            .forEach(nodeElement => {
                GraphManipulation.markAsSelected(nodeElement, change.changeType === 'added');
            });
    }
}


text:
const bunyan = require('bunyan')
const config = require('../config/log.js')

// log.trace, log.debug, log.info, log.warn, log.error, and log.fatal

module.exports = bunyan.createLogger({
    name: 'api',
    serializers: bunyan.stdSerializers,
    streams: [
        {
            level: config.logLevel,
            stream: process.stdout
        }
    ]
})


text:
package edu.uiowa.icts.inv.domain;

import java.util.Set;
import java.util.*;
import java.text.DateFormat;
import java.text.SimpleDateFormat;
import java.text.ParseException;
import java.util.Date;
import javax.persistence.*;
import javax.persistence.Entity;
import javax.persistence.Table;
import javax.persistence.Table;
import javax.persistence.Table;
import javax.persistence.Column;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import org.springframework.format.annotation.DateTimeFormat;
import org.hibernate.annotations.*;
import javax.persistence.CascadeType;
import javax.validation.constraints.NotNull;
import com.fasterxml.jackson.annotation.*;
import edu.uiowa.icts.*;

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

/**
 * Generated by Protogen - www.icts.uiowa.edu/protogen
 * @since 10/16/2015 11:14:56 AM CDT
 */
@Entity( name = "edu_uiowa_icts_inv_domain_role" )
@Table( name = "role", schema = "inv" )
@JsonIgnoreProperties( { "hibernateLazyInitializer", "handler" } )
public class Role {

	private static final Log log = LogFactory.getLog( Role.class );

        private Integer roleId;
        private String roleName;
        private Set<PersonRole> personRoles = new HashSet<PersonRole>(0);

    @javax.persistence.SequenceGenerator(  name="gen",  sequenceName="inv.seqnum",allocationSize=1)
    @Id
    @GeneratedValue( strategy=GenerationType.AUTO,generator="gen")
    @Column(name = "role_id", unique = true, nullable = false)
    public Integer getRoleId(){
        return roleId;
    }

    public void setRoleId(Integer roleId){
        this.roleId = roleId;
    }

    @Column(name = "role_name")
    public String getRoleName(){
        return roleName;
    }

    public void setRoleName(String roleName){
        this.roleName = roleName;
    }

    @JsonIgnore
    @OneToMany(fetch = FetchType.LAZY,   mappedBy = "role", targetEntity=PersonRole.class, cascade=CascadeType.REMOVE)
    public Set<PersonRole> getPersonRoles(){
        return personRoles;
    }

    public void setPersonRoles(Set<PersonRole> personRoles){
        this.personRoles = personRoles;
    }

}