text:
Prezto — Instantly Awesome Zsh
==============================

Prezto is the configuration framework for [Zsh][1]; it enriches the command line
interface environment with sane defaults, aliases, functions, auto completion,
and prompt themes.

Installation
------------

Prezto will work with any recent release of Zsh, but the minimum recommended
version is 4.3.11. Unfortunately, [Cygwin][9] is not supported due to
non-standard core utilities.

  1. Launch Zsh:

        zsh

  2. Clone the repository:

        git clone --recursive https://github.com/sorin-ionescu/prezto.git "${ZDOTDIR:-$HOME}/.zprezto"

  3. Create a new Zsh configuration by copying the Zsh configuration files
     provided:

        setopt EXTENDED_GLOB
        for rcfile in "${ZDOTDIR:-$HOME}"/.zprezto/runcoms/^README.md(.N); do
          ln -s "$rcfile" "${ZDOTDIR:-$HOME}/.${rcfile:t}"
        done

  4. Set Zsh as your default shell:

        chsh -s /bin/zsh

  5. Open a new Zsh terminal window or tab.

### Troubleshooting

If you are not able to find certain commands after switching to *Prezto*,
modify the `PATH` variable in *~/.zshenv* then open a new Zsh terminal
window or tab.

Updating
--------

Pull the latest changes and update submodules.

    git pull && git submodule update --init --recursive

Usage
-----

Prezto has many features disabled by default. Read the source code and
accompanying README files to learn of what is available.

### Modules

  1. Browse */modules* to see what is available.
  2. Load the modules you need in *~/.zpreztorc* then open a new Zsh terminal
     window or tab.

### Themes

  1. For a list of themes, type `prompt -l`.
  2. To preview a theme, type `prompt -p name`.
  3. Load the theme you like in *~/.zpreztorc* then open a new Zsh terminal
     window or tab.

     ![sorin theme][2]

Customization
-------------

The project is managed via [Git][3]. It is highly recommended that you fork this
project; so, that you can commit your changes and push them to [GitHub][4] to
not lose them. If you do not know how to use Git, follow this [tutorial][5] and
bookmark this [reference][6].

Resources
---------

The [Zsh Reference Card][7] and the [zsh-lovers][8] man page are indispensable.

License
-------

(The MIT License)

Copyright (c) 2009-2014 Sorin Ionescu and contributors.

Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
of the Software, and to permit persons to whom the Software is furnished to do
so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

[1]: http://www.zsh.org
[2]: http://i.imgur.com/nBEEZ.png "sorin theme"
[3]: http://git-scm.com
[4]: https://github.com
[5]: http://gitimmersion.com
[6]: http://gitref.org
[7]: http://www.bash2zsh.com/zsh_refcard/refcard.pdf
[8]: http://grml.org/zsh/zsh-lovers.html
[9]: http://www.cygwin.com


text:
function Error( message , filename, line )
{
    message = message ||"";
    var obj = $Error.call(this, message);
    obj.name = this.name;
    this.stack = (obj.stack || '').toString();
    this.message = message;
    this.line=line || 0;
    this.filename =filename || '';
}

module.exports = Error;
var Object = require("./Object.js");
var Internal = require("./Internal.js");
var $Error = Internal.$Error;

Error.prototype =Object.create( $Error.prototype,{
    "constructor":{value:Error},
    "valueOf":{value:function toString()
    {
        var msg = [];
        if( this.filename )msg.push( this.filename );
        if( this.line )msg.push( this.line );
        if( msg.length > 0 )
        {
            return this.name+': '+this.message+'\n at '+ msg.join(':') + '\n' + this.stack;
        }
        return this.name+': '+this.message+'\n'+ this.stack;
    }}
});

Error.prototype.line=null;
Error.prototype.name='Error';
Error.prototype.message=null;
Error.prototype.filename=null;
Error.prototype.stack='';

redpajama_set_name: RedPajamaGithub


text:
"use strict";

const languages = {
	en: require("./lang/en")
};

export function getAvailableLanguages() {
	return ["en"];
}

export function getDefaultLanguage() {
	return "en";
}

export function getLanguage(user) {
	return languages[user && user.language || getDefaultLanguage()];
}

export function getObject(path, obj) {
	const paths = path.split("/");
	let current = obj;

	for (let i = 0; i < paths.length; ++i) {
		if (current[paths[i]] === void 0) {
			return void 0;
		} else {
			current = current[paths[i]];
		}
	}
	return current;
}

export function translate(path, user) {
	return getObject(path, getLanguage(user));
}


text:
package tests

object Example {
  def foo(o: AnyRef) {
    throw new RuntimeException()<caret>
  }
}


text:
Tang::Tang(AbstractOperation* operand_) :
UnaryOperation("Tg", operand_)
{
}

Tang::~Tang()
{
}

double Tang::Eval(const Point& point) const
{
	return tan(operand->Eval(point));
}

string Tang::ToString() const
{
	return "Tg(" + operand->ToString() + ")";
}


text:
from LastfmGatewayTests import *
from FacebookGatewayTests import *


text:
module.exports = function (gulp, plugins) {
	gulp.task('linkAssets', function(cb) {
		plugins.sequence(
			'sails-linker-gulp:devJs',
			'sails-linker-gulp:devStyles',
			'sails-linker-gulp:devTpl',
      'sails-linker-gulp:devTplNg',
			/*'sails-linker-gulp:devJsJade',
			'sails-linker-gulp:devStylesJade',
			'sails-linker-gulp:devTplJade' */
			cb
		);
	});
};


text:
import {XYZNumberValues} from './XYZNumberValues.js'

export class XYZNonNegativeValues extends XYZNumberValues {
	checkValue(prop: string, value: number) {
		if (!super.checkValue(prop, value)) return false
		if (value < 0) throw new TypeError(`Expected ${prop} not to be negative. Received: ${value}`)
		return true
	}
}


text:
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>dom4j - 1.6.1</title>
<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../style.css" TITLE="Style">

    Clover coverage report -   dom4j - 1.6.1
Coverage timestamp: ma mei 16 2005 14:23:01 GMT+01:00

Overview   Package   File

    FRAMES
NO FRAMES

           file stats:
           LOC:
           144

           Methods:
           4

           NCLOC:
           53

           Classes:
           1

     Source file
    Conditionals
    Statements
    Methods
    TOTAL

        	   SAXModifyElementHandler.java

    0%
    0%
    0%
    0%

 1

 7

 8

	package org.dom4j.io;

 9

 10

	import org.dom4j.Document;

 11

	import org.dom4j.Element;

 12

	import org.dom4j.ElementHandler;

 13

	import org.dom4j.ElementPath;

 14

 15

	/**

 16

	 * This {@link org.dom4j.ElementHandler}is used to trigger {@link

 17

	 * ElementModifier} objects in order to modify (parts of) the Document on the

 18

	 * fly.

 19

	 *

 20

	 * <p>

 21

	 * When an element is completely parsed, a copy is handed to the associated (if

 22

	 * any) {@link ElementModifier}that on his turn returns the modified element

 23

	 * that has to come in the tree.

 24

	 * </p>

 25

	 *

 26

	 * @author Wonne Keysers (Realsoftware.be)

 27

	 */

 28

	class SAXModifyElementHandler implements ElementHandler {

 29

	    private ElementModifier elemModifier;

 30

 31

	    private Element modifiedElement;

 32

 33

 0
	    public SAXModifyElementHandler(ElementModifier elemModifier) {

 34

 0
	        this.elemModifier = elemModifier;

 35

	    }

 36

 37

 0
	    public void onStart(ElementPath elementPath) {

 38

 0
	        this.modifiedElement = elementPath.getCurrent();

 39

	    }

 40

 41

 0
	    public void onEnd(ElementPath elementPath) {

 42

 0
	        try {

 43

 0
	            Element origElement = elementPath.getCurrent();

 44

 0
	            Element currentParent = origElement.getParent();

 45

 46

 0
	            if (currentParent != null) {

 47

	                // Clone sets parent + document to null

 48

 0
	                Element clonedElem = (Element) origElement.clone();

 49

 50

	                // Ask for modified element

 51

 0
	                modifiedElement = elemModifier.modifyElement(clonedElem);

 52

 53

 0
	                if (modifiedElement != null) {

 54

	                    // Restore parent + document

 55

 0
	                    modifiedElement.setParent(origElement.getParent());

 56

 0
	                    modifiedElement.setDocument(origElement.getDocument());

 57

 58

	                    // Replace old with new element in parent

 59

 0
	                    int contentIndex = currentParent.indexOf(origElement);

 60

 0
	                    currentParent.content().set(contentIndex, modifiedElement);

 61

	                }

 62

 63

	                // Remove the old element

 64

 0
	                origElement.detach();

 65

	            } else {

 66

 0
	                if (origElement.isRootElement()) {

 67

	                    // Clone sets parent + document to null

 68

 0
	                    Element clonedElem = (Element) origElement.clone();

 69

 70

	                    // Ask for modified element

 71

 0
	                    modifiedElement = elemModifier.modifyElement(clonedElem);

 72

 73

 0
	                    if (modifiedElement != null) {

 74

	                        // Restore parent + document

 75

 0
	                        modifiedElement.setDocument(origElement.getDocument());

 76

 77

	                        // Replace old with new element in parent

 78

 0
	                        Document doc = origElement.getDocument();

 79

 0
	                        doc.setRootElement(modifiedElement);

 80

	                    }

 81

 82

	                    // Remove the old element

 83

 0
	                    origElement.detach();

 84

	                }

 85

	            }

 86

 87

	            // Put the new element on the ElementStack, it might get pruned by

 88

	            // the PruningDispatchHandler

 89

 0
	            if (elementPath instanceof ElementStack) {

 90

 0
	                ElementStack elementStack = ((ElementStack) elementPath);

 91

 0
	                elementStack.popElement();

 92

 0
	                elementStack.pushElement(modifiedElement);

 93

	            }

 94

	        } catch (Exception ex) {

 95

 0
	            throw new SAXModifyException(ex);

 96

	        }

 97

	    }

 98

 99

	    /**

 100

	     * DOCUMENT ME!

 101

	     *

 102

	     * @return Returns the modified Element.

 103

	     */

 104

 0
	    protected Element getModifiedElement() {

 105

 0
	        return modifiedElement;

 106

	    }

 107

	}

 108

 109

	/*

 110

	 * Redistribution and use of this software and associated documentation

 111

	 * ("Software"), with or without modification, are permitted provided that the

 112

	 * following conditions are met:

 113

	 *

 114

	 * 1. Redistributions of source code must retain copyright statements and

 115

	 * notices. Redistributions must also contain a copy of this document.

 116

	 *

 117

	 * 2. Redistributions in binary form must reproduce the above copyright notice,

 118

	 * this list of conditions and the following disclaimer in the documentation

 119

	 * and/or other materials provided with the distribution.

 120

	 *

 121

	 * 3. The name "DOM4J" must not be used to endorse or promote products derived

 122

	 * from this Software without prior written permission of MetaStuff, Ltd. For

 123

	 * written permission, please contact dom4j-info@metastuff.com.

 124

	 *

 125

	 * 4. Products derived from this Software may not be called "DOM4J" nor may

 126

	 * "DOM4J" appear in their names without prior written permission of MetaStuff,

 127

	 * Ltd. DOM4J is a registered trademark of MetaStuff, Ltd.

 128

	 *

 129

	 * 5. Due credit should be given to the DOM4J Project - http://www.dom4j.org

 130

	 *

 131

	 * THIS SOFTWARE IS PROVIDED BY METASTUFF, LTD. AND CONTRIBUTORS ``AS IS'' AND

 132

	 * ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE

 133

	 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE

 134

	 * ARE DISCLAIMED. IN NO EVENT SHALL METASTUFF, LTD. OR ITS CONTRIBUTORS BE

 135

	 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR

 136

	 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF

 137

	 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS

 138

	 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN

 139

	 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)

 140

	 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE

 141

	 * POSSIBILITY OF SUCH DAMAGE.

 142

	 *

 143

	 * Copyright 2001-2005 (C) MetaStuff, Ltd. All Rights Reserved.

 144

	 */

 	Report generated by Clover Code Coverage v1.3.5
ma mei 16 2005 14:23:02 GMT+01:00.
 	 	Open Source License registered to the dom4j Project. This license of Clover is provided to support the development of dom4j only.


text:
using System.Collections.Generic;
using System.IO;
using System.Text;
using System.Xml;
using Intacct.SDK.Functions.DataDeliveryService;
using Intacct.SDK.Functions;
using Intacct.SDK.Tests.Xml;
using Intacct.SDK.Xml;
using Xunit;

namespace Intacct.SDK.Tests.Functions.DataDeliveryService
{
    public class DdsObjectDdlGetTest : XmlObjectTestHelper
    {
        [Fact]
        public void GetXmlTest()
        {
            string expected = @"<?xml version=""1.0"" encoding=""utf-8""?>
<function controlid=""unittest"">
    <getDdsDdl>
        <object>GLACCOUNT</object>
    </getDdsDdl>
</function>";

            DdsObjectDdlGet record = new DdsObjectDdlGet("unittest")
            {
                ObjectName = "GLACCOUNT"
            };
            this.CompareXml(expected, record);
        }
    }
}


text:
<TITLE>Review for Federal Hill (1995)</TITLE>
<LINK REL="STYLESHEET" TYPE="text/css" HREF="/ramr.css">

Federal Hill (1995)

reviewed by
Mark R. Leeper

                               FEDERAL HILL
                      A film review by Mark R. Leeper
                       Copyright 1994 Mark R. Leeper

          Capsule: A circle of five friends is destroyed by
          the selfishness of one of their number.
          Author/producer/director Michael Corrente takes
          stories from his youth and creates a loose drama
          reminiscent of MEAN STREETS.  The plot is familiar,
          but Corrente's direction keeps the film fresh.
          Rating: high +1 (-4 to +4)

     Michael Corrente is a young filmmaker who has financed, written,
and directed his own film.  Both the director's story and the film's
story have a ring of familiarity.  Corrente's history is a parallel of
Barry Levison's.  Each chose as a first film to tell the story of his
small ring of friends, but somewhat fictionalized.  Each made a good
film on a very low budget.  And though Levison had a much better feel
for memorable characters in his DINER than Corrente does with FEDERAL
HILL, each made an impressive first film.  One thing we can conclude is
that Levison grew up in a better neighborhood.  Much of what Corrente
tells of his friends has a sting reminiscent of GOODFELLAS and MEAN
STREETS.

     Ralph, Nicky, Frank, Joey, and Bobby (played respectively by
Nicholas Turturro, Anthony DeSando, Michael Raynor, Robert Tutano, and
Jason Andrews) are friends who grew up together in Federal Hill, the
heavily Italian-American section of Providence, Rhode Island.  Each of
the friends is connected with crime in one way or another.  Ralph robs
houses; Nicky deals cocaine; Bobby is a loser who deals in counterfeit
money and owes the big boys $30,000.  Joey is nearly straight.  He did
time after doing a job with buddies who left him holding the bag.  Now
he has a wife and his worst crime is violating parole by gambling with
his buddies.  Frank is the only one of the guys who is straight and who
tries to keep the others out of trouble.  He can afford to be straight-
--his father is a local boss in the syndicate.  When Nicky meets a
cute, rich Brown student (Libby Langdon, wife of Michael Corrente) he
has visions of marrying her.  But getting in the way is Ralph, a loose
cannon who is getting into bigger crime.  He wants to pull his
housemate and best friend Nicky in with him, but he is willing to
settle for dragging in Bobby.

     The plot of FEDERAL HILL works just a little too predictably and
melodramatically.  Following the well-worn conventions of films like
THE GODFATHER, the plot gets more and more taut as the story proceeds
until it seems inevitable that there will be violence.  The formula is
followed down even to the cooking scene where we learn how to make some
terrific Italian dish (in this case a tempting Aglio e Olio with
Parmesan cheese).

     Whether this film will be a star-maker the way DINER was is still
in question.  Certainly none of the actors in the film has the same
sort of screen presence of the characters of DINER.  Nicholas Turturro,
who gives the film what modest acting flash it has, has gone on to
television work.  Libby Langdon is attractive as Wendy, but she simply
fails to do much with her character beyond what was on the printed page
of the script.  Probably what sets this film apart from others in its
class is the mood effect created by black-and-white photography.

     As a first film this low-budget, semi-autobiographical crime film
is polished and has some interesting moves that make the familiar
aspects seem a little fresher.  The true test for Corrente will be the
second film.  This one gets a high +1 on the -4 to +4 scale.

     Perhaps the second film should be THE MAKING OF FEDERAL HILL.
Corrente has a number of interesting stories to tell about how the film
was made.  One of the better ones involves his refusal to use a union
crew in order to save money.  Apparently the local union wanted to hire
an enforcer to break Corrente's legs to teach him a lesson.  "I can't
do that," the enforcer said, "Michael Corrente is my little brother."
"Oh.  Okay," the union rep said.  "Gee, what a small, funny world this
is!"

                                        Mark R. Leeper
                                        mark.leeper@att.com

.

The review above was posted to the
rec.arts.movies.reviews newsgroup (de.rec.film.kritiken for German reviews).

The Internet Movie Database accepts no responsibility for the contents of the
review and has no editorial control. Unless stated otherwise, the copyright
belongs to the author.

Please direct comments/criticisms of the review to relevant newsgroups.

Broken URLs inthe reviews are the responsibility of the author.

The formatting of the review is likely to differ from the original due
to ASCII to HTML conversion.

Related links: index of all rec.arts.movies.reviews reviews


text:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
<TITLE>
HSAdminProtocol (hadoop-mapreduce-client-hs 2.3.0 API)
</TITLE>

<META NAME="date" CONTENT="2015-03-06">

<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../../../../stylesheet.css" TITLE="Style">

      Overview
      Package
    Class
      Use
      Tree
      Deprecated
      Index
      Help

 PREV CLASS
 NEXT CLASS

  FRAMES
 NO FRAMES

  All Classes

  SUMMARY: NESTED | FIELD | CONSTR | METHOD

DETAIL: FIELD | CONSTR | METHOD

org.apache.hadoop.mapreduce.v2.hs.protocol

Interface HSAdminProtocol

All Superinterfaces:
org.apache.hadoop.tools.GetUserMappingsProtocol, HSAdminRefreshProtocol, org.apache.hadoop.security.RefreshUserMappingsProtocol

All Known Implementing Classes:
HSAdminServer

@InterfaceAudience.Private
@InterfaceStability.Evolving
public interface HSAdminProtocol
extends org.apache.hadoop.tools.GetUserMappingsProtocol, org.apache.hadoop.security.RefreshUserMappingsProtocol, HSAdminRefreshProtocol

Protocol use

Field Summary

Fields inherited from interface org.apache.hadoop.tools.GetUserMappingsProtocol

versionID

Fields inherited from interface org.apache.hadoop.security.RefreshUserMappingsProtocol

versionID

Method Summary

Methods inherited from interface org.apache.hadoop.tools.GetUserMappingsProtocol

getGroupsForUser

Methods inherited from interface org.apache.hadoop.security.RefreshUserMappingsProtocol

refreshSuperUserGroupsConfiguration, refreshUserToGroupsMappings

Methods inherited from interface org.apache.hadoop.mapreduce.v2.hs.protocol.HSAdminRefreshProtocol

refreshAdminAcls, refreshJobRetentionSettings, refreshLoadedJobCache, refreshLogRetentionSettings

      Overview
      Package
    Class
      Use
      Tree
      Deprecated
      Index
      Help

 PREV CLASS
 NEXT CLASS

  FRAMES
 NO FRAMES

  All Classes

  SUMMARY: NESTED | FIELD | CONSTR | METHOD

DETAIL: FIELD | CONSTR | METHOD

Copyright © 2015 Apache Software Foundation. All Rights Reserved.


text:
<!--
  ~ Copyright 2015 "Henry Tao <hi@henrytao.me>"
  ~
  ~ Licensed under the Apache License, Version 2.0 (the "License");
  ~ you may not use this file except in compliance with the License.
  ~ You may obtain a copy of the License at
  ~
  ~     http://www.apache.org/licenses/LICENSE-2.0
  ~
  ~ Unless required by applicable law or agreed to in writing, software
  ~ distributed under the License is distributed on an "AS IS" BASIS,
  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  ~ See the License for the specific language governing permissions and
  ~ limitations under the License.
  -->

<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
  xmlns:tools="http://schemas.android.com/tools"
  android:layout_width="match_parent"
  android:layout_height="match_parent"
  android:scrollbars="vertical"
  tools:context="me.henrytao.mddemo.fragment.ExampleMdTextFragment">

  <LinearLayout
    android:orientation="vertical"
    android:paddingLeft="?attr/mdLayout_spacing_md"
    android:paddingRight="?attr/mdLayout_spacing_md"
    style="@style/MdList">

    <View style="@style/MdList.Spacing" />

    <TextView
      android:text="@string/typo_button"
      style="@style/MdText.Button" />

    <TextView
      android:text="@string/typo_caption"
      style="@style/MdText.Caption" />

    <TextView
      android:text="@string/typo_body_1"
      style="@style/MdText.Body1" />

    <TextView
      android:text="@string/typo_body_2"
      style="@style/MdText.Body2" />

    <TextView
      android:text="@string/typo_subhead"
      style="@style/MdText.Subhead" />

    <TextView
      android:text="@string/typo_subhead_1"
      style="@style/MdText.Subhead1" />

    <TextView
      android:text="@string/typo_subhead_2"
      style="@style/MdText.Subhead2" />

    <TextView
      android:text="@string/typo_title"
      style="@style/MdText.Title" />

    <TextView
      android:text="@string/typo_headline"
      style="@style/MdText.Headline" />

    <TextView
      android:text="@string/typo_display_1"
      style="@style/MdText.Display1" />

    <TextView
      android:text="@string/typo_display_2"
      style="@style/MdText.Display2" />

    <TextView
      android:text="@string/typo_display_3"
      style="@style/MdText.Display3" />

    <TextView
      android:text="@string/typo_display_4"
      style="@style/MdText.Display4" />

    <View style="@style/MdList.Spacing" />
  </LinearLayout>
</ScrollView>


text:
"""
Package containig the classes related to the API of Ceryx.
"""
from flask import Flask
from flask.ext import restful
from ceryx.api.views import Route
from ceryx.api.views import RoutesList

app = Flask('ceryx-api')
app.config.from_object('ceryx.settings')
api = restful.Api(app)

api.add_resource(RoutesList, '/api/routes', '/route/', '/route')
api.add_resource(Route, '/api/routes/<string:source>')


text:
PCLIMP(void, Filter, extractIndices)(PointCloud_ptr *input, Indices_ptr *indices, PointCloud_ptr *output, bool negative, Indices_ptr *removed_indices)
{
  bool keep_removed = removed_indices && *removed_indices;
  pcl::ExtractIndices<_PointT> f(keep_removed);
  f.setNegative(negative);
  f.setInputCloud(*input);
  if (indices && *indices)
    f.setIndices(*indices);
  f.filter(**output);
  if (keep_removed)
    **removed_indices = *f.getRemovedIndices();
}

template<typename T>
void Filter_shadowPointsT(PointCloud_ptr *input, Indices_ptr *indices, Normals_ptr *normals, T *output,
  float threshold, bool negative, Indices_ptr *removed_indices)
{
  bool keep_removed = removed_indices && *removed_indices;
  pcl::ShadowPoints<_PointT, pcl::Normal> f(keep_removed);
  f.setNegative(negative);
  f.setInputCloud(*input);
  if (indices && *indices)
    f.setIndices(*indices);
  f.setNormals(*normals);
  f.setThreshold(threshold);  // default 0.1
  f.filter(**output);
  if (keep_removed)
    **removed_indices = *f.getRemovedIndices();
}

PCLIMP(void, Filter, shadowPoints_Indices)(PointCloud_ptr *input, Indices_ptr *indices, Normals_ptr *normals, Indices_ptr *output,
  float threshold, bool negative, Indices_ptr *removed_indices)
{
  Filter_shadowPointsT(input, indices, normals, output, threshold, negative, removed_indices);
}

PCLIMP(void, Filter, shadowPoints_Cloud)(PointCloud_ptr *input, Indices_ptr *indices, Normals_ptr *normals, PointCloud_ptr *output,
  float threshold, bool negative, Indices_ptr *removed_indices)
{
  Filter_shadowPointsT(input, indices, normals, output, threshold, negative, removed_indices);
}

PCLIMP(void, Filter, removeNaNFromPointCloud)(PointCloud_ptr *input, PointCloud_ptr *output, Indices_ptr *indices)
{
  std::vector<int>& _indices = **indices;
  if (output)
    pcl::removeNaNFromPointCloud(**input, **output, _indices);
  else
    pcl::removeNaNFromPointCloud(**input, _indices);    // dry run, does not modify the input point cloud
}

template<typename T>
void Filter_normalSpaceSamplingT(PointCloud_ptr *input, Indices_ptr *indices, Normals_ptr *normals, T *output,
  unsigned int samples, unsigned int binsx, unsigned int binsy, unsigned int binsz)
{
  pcl::NormalSpaceSampling<_PointT, pcl::Normal> f;
  f.setInputCloud(*input);
  if (indices && *indices)
    f.setIndices(*indices);
  f.setNormals(*normals);
  f.setSample(samples);
  f.setBins(binsx, binsy, binsz);
  f.filter(**output);
}

PCLIMP(void, Filter, normalSpaceSampling_Indices)(PointCloud_ptr *input, Indices_ptr *indices, Normals_ptr *normals, Indices_ptr *output,
  unsigned int samples, unsigned int binsx, unsigned int binsy, unsigned int binsz)
{
  Filter_normalSpaceSamplingT(input, indices, normals, output, samples, binsx, binsy, binsz);
}

PCLIMP(void, Filter, normalSpaceSampling_Cloud)(PointCloud_ptr *input, Indices_ptr *indices, Normals_ptr *normals, PointCloud_ptr *output,
  unsigned int samples, unsigned int binsx, unsigned int binsy, unsigned int binsz)
{
  Filter_normalSpaceSamplingT(input, indices, normals, output, samples, binsx, binsy, binsz);
}

#ifdef _PointT_HAS_NORMALS

PCLIMP(void, Filter, removeNaNNormalsFromPointCloud)(PointCloud_ptr *input, PointCloud_ptr *output, Indices_ptr *indices)
{
  std::vector<int>& _indices = **indices;
  pcl::removeNaNNormalsFromPointCloud(**input, **output, _indices);
}

PCLIMP(void, Filter, normalRefinement)(PointCloud_ptr *input, PointCloud_ptr *output, int k = 5, int max_iterations = 15, float convergence_threshold = 0.00001f)
{
  pcl::search::KdTree<_PointT> search;
  search.setInputCloud(*input);
  std::vector<std::vector<int> > k_indices;
  std::vector<std::vector<float> > k_sqr_distances;
  search.nearestKSearch(**input, std::vector<int>(), k, k_indices, k_sqr_distances);

  pcl::NormalRefinement<_PointT> f(k_indices, k_sqr_distances);
  f.setInputCloud(*input);
  f.setMaxIterations(max_iterations);
  f.setConvergenceThreshold(convergence_threshold);
  f.filter(**output);
}

#endif

template<typename T>
void Filter_frustumCullingT(PointCloud_ptr *input, Indices_ptr *indices, T *output,
  THFloatTensor *cameraPose, float hfov, float vfov, float np_dist, float fp_dist, bool negative, Indices_ptr *removed_indices)
{
  bool keep_removed = removed_indices && *removed_indices;
  pcl::FrustumCulling<_PointT> f(keep_removed);
  f.setNegative(negative);
  f.setInputCloud(*input);
  if (indices && *indices)
    f.setIndices(*indices);
  f.setCameraPose(Tensor2Mat<4,4>(cameraPose));
  f.setHorizontalFOV(hfov);
  f.setVerticalFOV(vfov);
  f.setNearPlaneDistance(np_dist);
  f.setFarPlaneDistance(fp_dist);
  f.filter(**output);
  if (keep_removed)
    **removed_indices = *f.getRemovedIndices();
}

PCLIMP(void, Filter, frustumCulling_Indices)(PointCloud_ptr *input, Indices_ptr *indices, Indices_ptr *output,
  THFloatTensor *cameraPose, float hfov, float vfov, float np_dist, float fp_dist, bool negative, Indices_ptr *removed_indices)
{
  Filter_frustumCullingT(input, indices, output, cameraPose, hfov, vfov, np_dist, fp_dist, negative, removed_indices);
}

PCLIMP(void, Filter, frustumCulling_Cloud)(PointCloud_ptr *input, Indices_ptr *indices, PointCloud_ptr *output,
  THFloatTensor *cameraPose, float hfov, float vfov, float np_dist, float fp_dist, bool negative, Indices_ptr *removed_indices)
{
  Filter_frustumCullingT(input, indices, output, cameraPose, hfov, vfov, np_dist, fp_dist, negative, removed_indices);
}

template<typename T>
void Filter_passThroughT(PointCloud_ptr *input, Indices_ptr *indices, T *output,
  const char* fieldName, float min, float max, bool negative, Indices_ptr *removed_indices, bool keep_organized)
{
  bool keep_removed = removed_indices && *removed_indices;
  pcl::PassThrough<_PointT> f(keep_removed);
  f.setInputCloud(*input);
  if (indices && *indices)
    f.setIndices(*indices);
  f.setNegative(negative);
  f.setFilterFieldName(fieldName);
  f.setFilterLimits(min, max);
  f.setKeepOrganized(keep_organized);
  f.filter(**output);
  if (keep_removed)
    **removed_indices = *f.getRemovedIndices();
}

PCLIMP(void, Filter, passThrough_Indices)(PointCloud_ptr *input, Indices_ptr *indices, Indices_ptr *output,
  const char* fieldName, float min, float max, bool negative, Indices_ptr *removed_indices, bool keep_organized)
{
  Filter_passThroughT(input, indices, output, fieldName, min, max, negative, removed_indices, keep_organized);
}

PCLIMP(void, Filter, passThrough_Cloud)(PointCloud_ptr *input, Indices_ptr *indices, PointCloud_ptr *output,
  const char* fieldName, float min, float max, bool negative, Indices_ptr *removed_indices, bool keep_organized)
{
  Filter_passThroughT(input, indices, output, fieldName, min, max, negative, removed_indices, keep_organized);
}

template<typename T>
void Filter_cropBoxT(PointCloud_ptr *input, Indices_ptr *indices, T *output,
  THFloatTensor *min, THFloatTensor *max, THFloatTensor *rotation, THFloatTensor *translation,
  THFloatTensor *transform, bool negative, Indices_ptr *removed_indices, bool keep_organized)
{
  bool keep_removed = removed_indices && *removed_indices;
  pcl::CropBox<_PointT> f(keep_removed);
  f.setInputCloud(*input);
  if (indices && *indices)
    f.setIndices(*indices);
  if (min)
    f.setMin(Tensor2Vec4f(min));
  if (max)
    f.setMax(Tensor2Vec4f(max));
  if (rotation)
    f.setRotation(Tensor2Vec3f(rotation));
  if (translation)
    f.setTranslation(Tensor2Vec3f(translation));
  if (transform)
    f.setTransform(Eigen::Affine3f(Tensor2Mat<4,4>(transform)));
  f.setNegative(negative);
  f.setKeepOrganized(keep_organized);
  f.filter(**output);
  if (keep_removed)
    **removed_indices = *f.getRemovedIndices();
}

PCLIMP(void, Filter, cropBox_Indices)(PointCloud_ptr *input, Indices_ptr *indices, Indices_ptr *output,
  THFloatTensor *min, THFloatTensor *max, THFloatTensor *rotation, THFloatTensor *translation,
  THFloatTensor *transform, bool negative, Indices_ptr *removed_indices, bool keep_organized)
{
  Filter_cropBoxT(input, indices, output, min, max, rotation, translation, transform, negative, removed_indices, keep_organized);
}

PCLIMP(void, Filter, cropBox_Cloud)(PointCloud_ptr *input, Indices_ptr *indices, PointCloud_ptr *output,
  THFloatTensor *min, THFloatTensor *max, THFloatTensor *rotation, THFloatTensor *translation,
  THFloatTensor *transform, bool negative, Indices_ptr *removed_indices, bool keep_organized)
{
  Filter_cropBoxT(input, indices, output, min, max, rotation, translation, transform, negative, removed_indices, keep_organized);
}

template<typename T>
void Filter_cropSphereT(PointCloud_ptr *input, Indices_ptr *indices, T *output,
  THFloatTensor *center, double radius, THFloatTensor *transform, bool negative, Indices_ptr *removed_indices)
{
  bool keep_removed = removed_indices && *removed_indices;
  CropSphere<_PointT> f(keep_removed);
  f.setInputCloud(*input);
  if (indices && *indices)
    f.setIndices(*indices);
  if (center)
    f.setCenter(Tensor2Vec4f(center));
  f.setRadius(radius);
  if (transform)
    f.setTransform(Eigen::Affine3f(Tensor2Mat<4,4>(transform)));
  f.setNegative(negative);
  f.filter(**output);
  if (keep_removed)
    **removed_indices = *f.getRemovedIndices();
}

PCLIMP(void, Filter, cropSphere_Indices)(PointCloud_ptr *input, Indices_ptr *indices, Indices_ptr *output,
  THFloatTensor *center, double radius, THFloatTensor *transform, bool negative, Indices_ptr *removed_indices)
{
  Filter_cropSphereT(input, indices, output, center, radius, transform, negative, removed_indices);
}

PCLIMP(void, Filter, cropSphere_Cloud)(PointCloud_ptr *input, Indices_ptr *indices, PointCloud_ptr *output,
  THFloatTensor *center, double radius, THFloatTensor *transform, bool negative, Indices_ptr *removed_indices)
{
  Filter_cropSphereT(input, indices, output, center, radius, transform, negative, removed_indices);
}

PCLIMP(void, Filter, voxelGrid)(PointCloud_ptr *input, Indices_ptr *indices, PointCloud_ptr *output, float lx, float ly, float lz)
{
  pcl::VoxelGrid<_PointT> f;
  f.setInputCloud(*input);
  if (indices && *indices)
    f.setIndices(*indices);
  f.setLeafSize(lx, ly, lz);
  f.filter(**output);
}

template<typename T>
void Filter_statisticalOutlierRemovalT(PointCloud_ptr *input, Indices_ptr *indices, T *output,
  int meanK, double stddevMulThresh, bool negative, Indices_ptr *removed_indices, bool keep_organized)
{
  bool keep_removed = removed_indices && *removed_indices;
  pcl::StatisticalOutlierRemoval<_PointT> f(keep_removed);
  f.setInputCloud(*input);
  if (indices && *indices)
    f.setIndices(*indices);
  f.setMeanK(meanK);
  f.setStddevMulThresh(stddevMulThresh);
  f.setNegative(negative);
  f.setKeepOrganized(keep_organized);
  f.filter(**output);
  if (keep_removed)
    **removed_indices = *f.getRemovedIndices();
}

PCLIMP(void, Filter, statisticalOutlierRemoval_Indices)(PointCloud_ptr *input, Indices_ptr *indices, Indices_ptr *output,
  int meanK, double stddevMulThresh, bool negative, Indices_ptr *removed_indices, bool keep_organized)
{
  Filter_statisticalOutlierRemovalT(input, indices, output, meanK, stddevMulThresh, negative, removed_indices, keep_organized);
}

PCLIMP(void, Filter, statisticalOutlierRemoval_Cloud)(PointCloud_ptr *input, Indices_ptr *indices, PointCloud_ptr *output,
  int meanK, double stddevMulThresh, bool negative, Indices_ptr *removed_indices, bool keep_organized)
{
  Filter_statisticalOutlierRemovalT(input, indices, output, meanK, stddevMulThresh, negative, removed_indices, keep_organized);
}

template<typename T>
void Filter_randomSampleT(PointCloud_ptr *input, Indices_ptr *indices, T *output, unsigned int count)
{
  pcl::RandomSample<_PointT> f;
  f.setInputCloud(*input);
  if (indices && *indices)
    f.setIndices(*indices);
  f.setSample(count);
  f.filter(**output);
}

PCLIMP(void, Filter, randomSample_Indices)(PointCloud_ptr *input, Indices_ptr *indices, Indices_ptr *output, unsigned int count)
{
  Filter_randomSampleT(input, indices, output, count);
}

PCLIMP(void, Filter, randomSample_Cloud)(PointCloud_ptr *input, Indices_ptr *indices, PointCloud_ptr *output, unsigned int count)
{
  Filter_randomSampleT(input, indices, output, count);
}

PCLIMP(void, Filter, medianFilter)(PointCloud_ptr *input, Indices_ptr *indices, PointCloud_ptr *output, int windowSize)
{
  pcl::MedianFilter<_PointT> f;
  f.setInputCloud(*input);
  if (indices && *indices)
    f.setIndices(*indices);
  f.setWindowSize(windowSize);
  f.filter(**output);
}

PCLIMP(void, Filter, radiusOutlierRemoval)(PointCloud_ptr *input, Indices_ptr *indices, PointCloud_ptr *output, double radius, int minNeighbors, bool negative, Indices_ptr *removed_indices)
{
  bool keep_removed = removed_indices && *removed_indices;
  pcl::RadiusOutlierRemoval<_PointT> f(keep_removed);
  f.setInputCloud(*input);
  if (indices && *indices)
    f.setIndices(*indices);
  f.setRadiusSearch(radius);
  f.setMinNeighborsInRadius(minNeighbors);
  f.setNegative(negative);
  f.filter(**output);
  if (keep_removed)
    **removed_indices = *f.getRemovedIndices();
}

PCLIMP(int, Filter, voxelHistogram)(PointCloud_ptr *input, THFloatTensor *output,
  int w = 48, int h = 48, int t = 48, float voxelSize = 1,
  float originX = 0, float originY = 0, float originZ = 0, bool center = false)
{
  if (!input || !*input)
    PCL_THROW_EXCEPTION(TorchPclException, "invalid input cloud");

  if (!output)
    PCL_THROW_EXCEPTION(TorchPclException, "invalid output tensor");

  if (w <= 0 || h <= 0 || t <= 0)
    PCL_THROW_EXCEPTION(TorchPclException, "invalid volume specified");

  if (voxelSize <= 0)
    PCL_THROW_EXCEPTION(TorchPclException, "voxel size must be positive");

  const pcl::PointCloud<_PointT>& cloud = **input;

  THFloatTensor_resize3d(output, w, h, t);
  THFloatTensor* output_ = THFloatTensor_newContiguous(output);
  THFloatTensor_zero(output_);
  float* data = THFloatTensor_data(output_);

  const size_t zstride = static_cast<size_t>(THFloatTensor_stride(output_, 0));
  const size_t ystride = static_cast<size_t>(THFloatTensor_stride(output_, 1));
  const size_t xstride = static_cast<size_t>(THFloatTensor_stride(output_, 2));

  // offsets
  Eigen::Vector4f offset = Eigen::Vector4f::Zero();
  if (center)
    offset = -Eigen::Vector4f(w, h, t, 1) * 0.5;
  int count = 0;
  for (pcl::PointCloud<_PointT>::const_iterator i = cloud.begin(); i != cloud.end(); ++i)
  {
    const _PointT& p = *i;
    if (!cloud.is_dense && !pcl::isFinite(p))
      continue;

    // compute index
    int x = static_cast<int>(std::floor((p.x - originX) / voxelSize + offset[0]));
    if (x < 0 || x >= w)
      continue;

    int y = static_cast<int>(std::floor((p.y - originY) / voxelSize + offset[1]));
    if (y < 0 || y >= h)
      continue;

    int z = static_cast<int>(std::floor((p.z - originZ) / voxelSize + offset[2]));
    if (z < 0 || z >= t)
      continue;

    data[z * zstride + y * ystride + x * xstride] += 1;
    ++count;
  }

  THFloatTensor_freeCopyTo(output_, output);
  return count;
}

#undef PointCloud_ptr


text:
package cascading.kryo;

import com.esotericsoftware.kryo.Kryo;
import com.esotericsoftware.kryo.io.Input;
import org.apache.hadoop.io.serializer.Deserializer;

import java.io.DataInputStream;
import java.io.IOException;
import java.io.InputStream;

public class KryoDeserializer implements Deserializer<Object> {

    private Kryo kryo;
    private final KryoSerialization kryoSerialization;
    private final Class<Object> klass;

    private DataInputStream inputStream;

    public KryoDeserializer(KryoSerialization kryoSerialization, Class<Object> klass) {
        this.kryoSerialization =  kryoSerialization;
        this.klass = klass;
    }

    public void open(InputStream in) throws IOException {
        kryo = kryoSerialization.populatedKryo();

        if( in instanceof DataInputStream)
            inputStream = (DataInputStream) in;
        else
            inputStream = new DataInputStream( in );
    }

    public Object deserialize(Object o) throws IOException {
        byte[] bytes = new byte[inputStream.readInt()];
        inputStream.readFully( bytes );

        return kryo.readObject(new Input(bytes), klass);
    }

    // TODO: Bump the kryo version, add a kryo.reset();
    public void close() throws IOException {
        try {
            if( inputStream != null )
                inputStream.close();
        } finally {
            inputStream = null;
        }
    }
}


text:
package org.apache.commons.jexl.util.introspection;

import java.lang.reflect.Array;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Enumeration;
import java.util.Iterator;
import java.util.List;
import java.util.Map;

import org.apache.commons.jexl.util.AbstractExecutor;
import org.apache.commons.jexl.util.ArrayIterator;
import org.apache.commons.jexl.util.ArrayListWrapper;
import org.apache.commons.jexl.util.BooleanPropertyExecutor;
import org.apache.commons.jexl.util.EnumerationIterator;
import org.apache.commons.jexl.util.GetExecutor;
import org.apache.commons.jexl.util.PropertyExecutor;
import org.apache.commons.jexl.util.MapGetExecutor;
import org.apache.commons.logging.Log;

/**
 * Implementation of Uberspect to provide the default introspective
 * functionality of Velocity
 *
 * @since 1.0
 * @author Geir Magnusson Jr.
 * @author Henning P. Schmiedehausen
 * @version $Id: UberspectImpl.java 584050 2007-10-12 05:27:50Z proyal $
 */
public class UberspectImpl implements Uberspect, UberspectLoggable {
    /**
     * index of the first character of the property.
     */
    private static final int PROPERTY_START_INDEX = 3;

    /**
     * Our runtime logger.
     */
    private Log rlog;

    /**
     * the default Velocity introspector.
     */
    private Introspector introspector;

    /**
     * init - does nothing - we need to have setRuntimeLogger called before
     * getting our introspector, as the default vel introspector depends upon
     * it.
     * @throws Exception on any error.
     */
    public void init() throws Exception {
    }

    /**
     * Sets the runtime logger - this must be called before anything else
     * besides init() as to get the logger. Makes the pull model appealing...
     * @param runtimeLogger service to use for logging.
     */
    public void setRuntimeLogger(Log runtimeLogger) {
        rlog = runtimeLogger;
        introspector = new Introspector(rlog);
    }

    /**
     * {@inheritDoc}
     */
    public Iterator getIterator(Object obj, Info i) throws Exception {
        if (obj.getClass().isArray()) {
            return new ArrayIterator(obj);
        } else if (obj instanceof Collection) {
            return ((Collection) obj).iterator();
        } else if (obj instanceof Map) {
            return ((Map) obj).values().iterator();
        } else if (obj instanceof Iterator) {
            rlog.warn("Warning! The iterative " + " is an Iterator in the #foreach() loop at [" + i.getLine() + ","
                    + i.getColumn() + "]" + " in template " + i.getTemplateName() + ". Because it's not resetable,"
                    + " if used in more than once, this may lead to" + " unexpected results.");

            return ((Iterator) obj);
        } else if (obj instanceof Enumeration) {
            rlog.warn("Warning! The iterative " + " is an Enumeration in the #foreach() loop at [" + i.getLine() + ","
                    + i.getColumn() + "]" + " in template " + i.getTemplateName() + ". Because it's not resetable,"
                    + " if used in more than once, this may lead to" + " unexpected results.");

            return new EnumerationIterator((Enumeration) obj);
        } else {
            // look for an iterator() method to support the JDK5 Iterable
            // interface or any user tools/DTOs that want to work in
            // foreach without implementing the Collection interface
            Class type = obj.getClass();
            try {
                Method iter = type.getMethod("iterator", null);
                Class returns = iter.getReturnType();
                if (Iterator.class.isAssignableFrom(returns)) {
                    return (Iterator) iter.invoke(obj, null);
                } else {
                    rlog.error("iterator() method of reference in #foreach loop at "
                            + i + " does not return a true Iterator.");
                }
            }
            catch (NoSuchMethodException nsme) {
                // eat this one, but let all other exceptions thru
            }
        }

        /*  we have no clue what this is  */
        rlog.warn("Could not determine type of iterator in " + "#foreach loop " + " at [" + i.getLine() + ","
                + i.getColumn() + "]" + " in template " + i.getTemplateName());

        return null;
    }

    /**
     * {@inheritDoc}
     */
    public VelMethod getMethod(Object obj, String methodName, Object[] args, Info i) throws Exception {
        if (obj == null) {
            return null;
        }

        Method m = introspector.getMethod(obj.getClass(), methodName, args);
        if (m != null) {
            return new VelMethodImpl(m);
        } else if (obj.getClass().isArray()) {
            // check for support via our array->list wrapper
            m = introspector.getMethod(ArrayListWrapper.class, methodName, args);
            if (m != null) {
                // and create a method that knows to wrap the value
                // before invoking the method
                return new VelMethodImpl(m, true);
            }
        } else if (obj instanceof Class) {
            m = introspector.getMethod((Class) obj, methodName, args);
        }

        return (m == null) ? null : new VelMethodImpl(m);
    }

    /**
     * {@inheritDoc}
     */
    public VelPropertyGet getPropertyGet(Object obj, String identifier, Info i) throws Exception {
        AbstractExecutor executor;

        Class claz = obj.getClass();

        /*
         * first try for a getFoo() type of property (also getfoo() )
         */

        executor = new PropertyExecutor(rlog, introspector, claz, identifier);

        /*
         * Let's see if we are a map...
         */
        if (!executor.isAlive()) {
            executor = new MapGetExecutor(rlog, claz, identifier);
        }

        /*
         *  look for boolean isFoo()
         */
        if (!executor.isAlive()) {
            executor = new BooleanPropertyExecutor(rlog, introspector, claz, identifier);
        }

        /*
         * if that didn't work, look for get("foo")
         */

        if (!executor.isAlive()) {
            executor = new GetExecutor(rlog, introspector, claz, identifier);
        }

        return new VelGetterImpl(executor);
    }

    /**
     * {@inheritDoc}
     */
    public VelPropertySet getPropertySet(Object obj, String identifier, Object arg, Info i) throws Exception {
        Class claz = obj.getClass();

        VelMethod vm = null;
        try {
            /*
             * first, we introspect for the set<identifier> setter method
             */

            Object[] params = {arg};

            try {
                vm = getMethod(obj, "set" + identifier, params, i);

                if (vm == null) {
                    throw new NoSuchMethodException();
                }
            } catch (NoSuchMethodException nsme2) {
                StringBuffer sb = new StringBuffer("set");
                sb.append(identifier);

                if (Character.isLowerCase(sb.charAt(PROPERTY_START_INDEX))) {
                    sb.setCharAt(PROPERTY_START_INDEX, Character.toUpperCase(sb.charAt(PROPERTY_START_INDEX)));
                } else {
                    sb.setCharAt(PROPERTY_START_INDEX, Character.toLowerCase(sb.charAt(PROPERTY_START_INDEX)));
                }

                vm = getMethod(obj, sb.toString(), params, i);

                if (vm == null) {
                    throw new NoSuchMethodException();
                }
            }
        } catch (NoSuchMethodException nsme) {
            /*
             * right now, we only support the Map interface
             */

            if (Map.class.isAssignableFrom(claz)) {
                Object[] params = {new Object(), new Object()};

                vm = getMethod(obj, "put", params, i);

                if (vm != null) {
                    return new VelSetterImpl(vm, identifier);
                }
            }
        }

        return (vm == null) ? null : new VelSetterImpl(vm);
    }

    /**
     * An implementation of {@link VelMethod}.
     */
    public static class VelMethodImpl implements VelMethod {
        final Method method;
        Boolean isVarArg;
        final boolean wrapArray;

        /**
         * Create a new instance.
         *
         * @param m the method.
         */
        public VelMethodImpl(Method m) {
            this(m, false);
        }

        public VelMethodImpl(Method method, boolean wrapArray) {
            this.method = method;
            this.wrapArray = wrapArray;
        }

        /**
         * {@inheritDoc}
         */
        public Object invoke(Object o, Object[] params) throws Exception {
            if (isVarArg()) {
                Class[] formal = method.getParameterTypes();
                int index = formal.length - 1;
                Class type = formal[index].getComponentType();
                if (params.length >= index) {
                    params = handleVarArg(type, index, params);
                }
            } else if (wrapArray) {
                o = new ArrayListWrapper(o);
            }

            try {
                return method.invoke(o, params);
            } catch (InvocationTargetException e) {
                final Throwable t = e.getTargetException();

                if (t instanceof Exception) {
                    throw (Exception) t;
                } else if (t instanceof Error) {
                    throw (Error) t;
                } else {
                    throw e;
                }
            }
        }

        /**
         * @returns true if this method can accept a variable number of arguments
         */
        public boolean isVarArg() {
            if (isVarArg == null) {
                Class[] formal = method.getParameterTypes();
                if (formal == null || formal.length == 0) {
                    this.isVarArg = Boolean.FALSE;
                } else {
                    Class last = formal[formal.length - 1];
                    // if the last arg is an array, then
                    // we consider this a varargs method
                    this.isVarArg = Boolean.valueOf(last.isArray());
                }
            }
            return isVarArg.booleanValue();
        }

        /**
         * @param type   The vararg class type (aka component type
         *               of the expected array arg)
         * @param index  The index of the vararg in the method declaration
         *               (This will always be one less than the number of
         *               expected arguments.)
         * @param actual The actual parameters being passed to this method
         * @returns The actual parameters adjusted for the varargs in order
         * to fit the method declaration.
         */
        private Object[] handleVarArg(Class type, int index, Object[] actual) {
            // if no values are being passed into the vararg
            if (actual.length == index) {
                // create an empty array of the expected type
                actual = new Object[]{Array.newInstance(type, 0)};
            }
            // if one value is being passed into the vararg
            else if (actual.length == index + 1) {
                // make sure the last arg is an array of the expected type
                if (IntrospectionUtils.isMethodInvocationConvertible(type,
                        actual[index].getClass(),
                        false)) {
                    // create a 1-length array to hold and replace the last param
                    Object lastActual = Array.newInstance(type, 1);
                    Array.set(lastActual, 0, actual[index]);
                    actual[index] = lastActual;
                }
            }
            // if multiple values are being passed into the vararg
            else if (actual.length > index + 1) {
                // put the last and extra actual in an array of the expected type
                int size = actual.length - index;
                Object lastActual = Array.newInstance(type, size);
                for (int i = 0; i < size; i++) {
                    Array.set(lastActual, i, actual[index + i]);
                }

                // put all into a new actual array of the appropriate size
                Object[] newActual = new Object[index + 1];
                for (int i = 0; i < index; i++) {
                    newActual[i] = actual[i];
                }
                newActual[index] = lastActual;

                // replace the old actual array
                actual = newActual;
            }
            return actual;
        }

        /**
         * {@inheritDoc}
         */
        public boolean isCacheable() {
            return true;
        }

        /**
         * {@inheritDoc}
         */
        public String getMethodName() {
            return method.getName();
        }

        /**
         * {@inheritDoc}
         */
        public Class getReturnType() {
            return method.getReturnType();
        }
    }

    /**
     * {@inheritDoc}
     */
    public static class VelGetterImpl implements VelPropertyGet {
        /**
         * executor for performing the get.
         */
        protected final AbstractExecutor ae;

        /**
         * Create the getter using an {@link AbstractExecutor} to
         * do the work.
         *
         * @param exec the executor.
         */
        public VelGetterImpl(AbstractExecutor exec) {
            ae = exec;
        }

        /**
         * {@inheritDoc}
         */
        public Object invoke(Object o) throws Exception {
            return ae.execute(o);
        }

        /**
         * {@inheritDoc}
         */
        public boolean isCacheable() {
            return true;
        }

        /**
         * {@inheritDoc}
         */
        public boolean isAlive() {
            return ae.isAlive();
        }

        /**
         * {@inheritDoc}
         */
        public String getMethodName() {
            return ae.getMethod().getName();
        }
    }

    /**
     * {@inheritDoc}
     */
    public static class VelSetterImpl implements VelPropertySet {
        /**
         * the method to call.
         */
        protected VelMethod vm = null;
        /**
         * the key for indexed and other properties.
         */
        protected String putKey = null;

        /**
         * Create an instance.
         *
         * @param velmethod the method to call on set.
         */
        public VelSetterImpl(VelMethod velmethod) {
            this.vm = velmethod;
        }

        /**
         * Create an instance.
         *
         * @param velmethod the method to call on set.
         * @param key       the index or other value passed to a
         *                  setProperty(xxx, value) method.
         */
        public VelSetterImpl(VelMethod velmethod, String key) {
            this.vm = velmethod;
            putKey = key;
        }

        /**
         * {@inheritDoc}
         */
        public Object invoke(Object o, Object value) throws Exception {
            List al = new ArrayList();

            if (putKey == null) {
                al.add(value);
            } else {
                al.add(putKey);
                al.add(value);
            }

            return vm.invoke(o, al.toArray());
        }

        /**
         * {@inheritDoc}
         */
        public boolean isCacheable() {
            return true;
        }

        /**
         * {@inheritDoc}
         */
        public String getMethodName() {
            return vm.getMethodName();
        }

    }
}


text:
layout: section
title: "Add Touch to Your Site"
description: "Touchscreens are available on more and more devices,
  from phones up to desktop screens. Your app should respond to their touch
  in intuitive and beautiful ways."
introduction: "Touchscreens are available on more and more devices, ranging
  from phones up to desktop screens. When your users choose to interact with
  your UI, your app should respond to their touch in intuitive and beautiful
  ways."
article:
  written_on: 2014-01-01
  updated_on: 2014-01-06
  order: 2
id: touch
collection: user-input
authors:
  - mattgaunt
---
{% wrap content %}

The following guides cover how you can make elements of your page response to a users touch
as well as how to add custom gestures to your site.

This video gives you a brief overview of both these guides.

{% endwrap %}

{% comment %}
Guide list content will be output by the landing layout passed on the article collection matching page.id
{% endcomment %}


text:
from pathod import utils

from mitmproxy.test import tutils

def test_membool():
    m = utils.MemBool()
    assert not m.v
    assert m(1)
    assert m.v == 1
    assert m(2)
    assert m.v == 2

def test_data_path():
    tutils.raises(ValueError, utils.data.path, "nonexistent")


text:
package com.emitrom.ti4j.mobile.client.analytics;

import com.emitrom.ti4j.core.client.ProxyObject;
import com.emitrom.ti4j.mobile.client.core.TiFactory;
import com.emitrom.ti4j.mobile.client.core.TiModule;
import com.google.gwt.core.client.JavaScriptObject;
import com.google.gwt.core.client.JsDate;

/**
 * The top level Analytics module. The Analytics module is used for transmitting
 * developer-defined Analytics event for your application to the Appcelerator
 * Analytics product. It can be used to augment additional context or
 * application-specific information which can then be accessed during analysis
 * using Analytics.
 */
public class Analytics extends TiModule {

    private static Analytics instance = null;

    public static Analytics get() {
        if (instance == null) {
            instance = new Analytics();
        }
        return instance;
    }

    private Analytics() {
        createPeer();
    }

    /**
     * Send a generic event for the application session
     *
     * @param type , the event type
     * @param name , the event name
     */
    public native void addEvent(String type, String name) /*-{
		var jso = this.@com.emitrom.ti4j.core.client.ProxyObject::getJsObj()();
		jso.addEvent(type, name);
    }-*/;

    /**
     * Send a generic event for the application session
     *
     * @param type , the event type
     * @param name , the event name
     * @param data , event data or null if not specified. the object must be
     *            serializable as JSON
     */
    public native void addEvent(String type, String name, JavaScriptObject data) /*-{
		var jso = this.@com.emitrom.ti4j.core.client.ProxyObject::getJsObj()();
		jso.addEvent(type, name, data);
    }-*/;

    /**
     * send an analytics feature event for the application session
     *
     * @param name , the event name
     */
    public native void featureEvent(String name) /*-{
		var jso = this.@com.emitrom.ti4j.core.client.ProxyObject::getJsObj()();
		jso.featureEvent(name);
    }-*/;

    /**
     * send an analytics feature event for the application session
     *
     * @param name , the event name
     * @param data , event data or null if not specified. the object must be
     *            serializable as JSON
     */

    public void featureEvent(String name, ProxyObject data) {
        featureEvent(name, data.getJsObj());
    }

    public native void featureEvent(String name, JavaScriptObject data) /*-{
		var jso = this.@com.emitrom.ti4j.core.client.ProxyObject::getJsObj()();
		jso.featureEvent(name, data);
    }-*/;

    /**
     * fire a synthesized event to the views listener
     *
     * @param name , the name of thr event
     * @param event , event object
     */
    public static native void fireEvent(String name, Object event) /*-{
		var jso = this.@com.emitrom.ti4j.core.client.ProxyObject::getJsObj()();
		jso.fireEvent(name, event);
    }-*/;

    /**
     * send an analytics nav event for the application session
     *
     * @param from , the from location in the nav event
     * @param to , the to location in the nav event
     * @param name , the event name
     */
    public static native void navEvent(String from, String to, String name) /*-{
		var jso = this.@com.emitrom.ti4j.core.client.ProxyObject::getJsObj()();
		jso.navEvent(from, to, name);
    }-*/;

    /**
     * send an analytics nav event for the application session
     *
     * @param from , the from location in the nav event
     * @param to , the to location in the nav event
     * @param name , the event name
     * @param data , event data or null if not specified. the object must be
     *            serializable as JSON
     */
    public static native void navEvent(String from, String to, String name, JavaScriptObject data) /*-{
		var jso = this.@com.emitrom.ti4j.core.client.ProxyObject::getJsObj()();
		jso.navEvent(from, to, name, data);
    }-*/;

    /**
     * send a analytics settings event for the application session
     *
     * @param name , the event name
     */
    public static native void settingsEvent(String name) /*-{
		var jso = this.@com.emitrom.ti4j.core.client.ProxyObject::getJsObj()();
		jso.settingsEvent(name);
    }-*/;

    /**
     * send a analytics settings event for the application session
     *
     * @param name , the event name
     * @param data , event data or null if not specified. the object must be
     *            serializable as JSON
     */
    public static native void settingsEvent(String name, JavaScriptObject data) /*-{
		var jso = this.@com.emitrom.ti4j.core.client.ProxyObject::getJsObj()();
		jso.settingsEvent(name, data);
    }-*/;

    /**
     * send an analytics timed event for the application session
     *
     * @param name , the event name
     * @param start , the event start as Date object
     * @param stop , the event end as Date object
     * @param duration , the event duration
     */
    public native void timedEvent(String name, JsDate start, JsDate stop, double duration) /*-{
		var jso = this.@com.emitrom.ti4j.core.client.ProxyObject::getJsObj()();
		jso.timedEvent(name, start, stop, duration);
    }-*/;

    /**
     * send an analytics timed event for the application session
     *
     * @param name , the event name
     * @param start , the event start as Date object
     * @param stop , the event end as Date object
     * @param duration , the event duration
     * @param data , event data or null if not specified. the object must be
     *            serializable as JSON
     */
    public native void timedEvent(String name, JsDate start, JsDate stop, double duration, JavaScriptObject data) /*-{
		var jso = this.@com.emitrom.ti4j.core.client.ProxyObject::getJsObj()();
		jso.timedEvent(name, start, stop, duration, data);
    }-*/;

    /**
     * send an analytics user event for the application session
     *
     * @param name , the event name
     * @param data , event data or null if not specified. the object must be
     *            serializable as JSON
     */
    public native void userEvent(String name) /*-{
		var jso = this.@com.emitrom.ti4j.core.client.ProxyObject::getJsObj()();
		jso.userEvent(type, name);
    }-*/;

    /**
     * send an analytics user event for the application session
     *
     * @param name , the event name
     * @param data , event data or null if not specified. the object must be
     *            serializable as JSON
     */
    public native void userEvent(String name, JavaScriptObject data) /*-{
		var jso = this.@com.emitrom.ti4j.core.client.ProxyObject::getJsObj()();
		jso.userEvent(type, name, data);
    }-*/;

    @Override
    public void createPeer() {
        jsObj = TiFactory.createAnalytics();
    }

}


text:
import org.jspecify.annotations.NullMarked;
import org.jspecify.annotations.Nullable;
import org.jspecify.annotations.NullnessUnspecified;

@NullMarked
class MultiBoundTypeVariableUnspecToOtherUnspec {
  <T extends Object & Lib> @NullnessUnspecified Lib x0(@NullnessUnspecified T x) {
    // jspecify_nullness_not_enough_information
    return x;
  }

  <T extends Object & @NullnessUnspecified Lib> @NullnessUnspecified Lib x1(
      @NullnessUnspecified T x) {
    // jspecify_nullness_not_enough_information
    return x;
  }

  <T extends Object & @Nullable Lib> @NullnessUnspecified Lib x2(@NullnessUnspecified T x) {
    // jspecify_nullness_not_enough_information
    return x;
  }

  <T extends @NullnessUnspecified Object & Lib> @NullnessUnspecified Lib x3(
      @NullnessUnspecified T x) {
    // jspecify_nullness_not_enough_information
    return x;
  }

  <T extends @NullnessUnspecified Object & @NullnessUnspecified Lib> @NullnessUnspecified Lib x4(
      @NullnessUnspecified T x) {
    // jspecify_nullness_not_enough_information
    return x;
  }

  <T extends @NullnessUnspecified Object & @Nullable Lib> @NullnessUnspecified Lib x5(
      @NullnessUnspecified T x) {
    // jspecify_nullness_not_enough_information
    return x;
  }

  <T extends @Nullable Object & Lib> @NullnessUnspecified Lib x6(@NullnessUnspecified T x) {
    // jspecify_nullness_not_enough_information
    return x;
  }

  <T extends @Nullable Object & @NullnessUnspecified Lib> @NullnessUnspecified Lib x7(
      @NullnessUnspecified T x) {
    // jspecify_nullness_not_enough_information
    return x;
  }

  <T extends @Nullable Object & @Nullable Lib> @NullnessUnspecified Lib x8(
      @NullnessUnspecified T x) {
    // jspecify_nullness_not_enough_information
    return x;
  }

  interface Lib {}
}


text:
layout: post
date: 2017-01-29
title: "Halfpenny London ANNABLLE Short Sleeves Sheath/Column"
category: Halfpenny London
tags: [Halfpenny London,Sheath/Column,Illusion,Short Sleeves]
---
### Halfpenny London ANNABLLE
Just **$449.99**
###   Short Sleeves  Sheath/Column

BRANDS	Halfpenny London

Silhouette	Sheath/Column

Neckline	Illusion

Sleeve	Short Sleeves

Buy it: [https://www.readybrides.com/en/halfpenny-london/36705-halfpenny-london-annablle.html](https://www.readybrides.com/en/halfpenny-london/36705-halfpenny-london-annablle.html)


text:
<!--
@license
Copyright (c) 2017 The expand.js authors. All rights reserved.
This code may only be used under the BSD style license found at https://expandjs.github.io/LICENSE.txt
The complete set of authors may be found at https://expandjs.github.io/AUTHORS.txt
The complete set of contributors may be found at https://expandjs.github.io/CONTRIBUTORS.txt
-->

<!--
A web component used to add the `unauthorize` command on the parent store.

@element cmd-unauthorize
@since 1.0.0
@category functionality
@description A web component used to add the `unauthorize` command on the parent store
@keywords expandjs, web app, web components

@homepage https://expandjs.com/components/cmd-unauthorize
@repository https://github.com/expandjs/app-behaviors
@source https://github.com/expandjs/app-behaviors/blob/master/cmd-unauthorize.html

@behavior app-command-behavior /bower_components/app-behaviors/app-command-behavior.html
-->

<link rel="import" href="../../polymer/polymer.html">
<link rel="import" href="../../expandjs/expandjs.html">
<link rel="import" href="../app-command-behavior.html">

<dom-module id="cmd-unauthorize">

    <template strip-whitespace>

        <style>
            :host {
                display: none !important;
            }
        </style>

    </template>

    <script>
        Polymer({

            // ELEMENT
            is: 'cmd-unauthorize',

            // BEHAVIORS
            behaviors: [
                Polymer.APPCommandBehavior
            ],

            /*********************************************************************/

            /**
             * Fired on execute.
             *
             * @event app-unauthorize
             * @param {string} source
             * @param {Function} callback
             * @bubbles
             */

            /*********************************************************************/

            /**
             * Implements the `execute` strategy.
             *
             * @method _execute
             * @param {Object} options
             *   @param {string} options.source
             * @param {Function} [callback]
             * @private
             */
            _execute(options, callback) {

                // Asserting
                if (!XP.isString(options.source, true)) { callback(new XP.ValidationError('options.source', 'string')); return; }

                // Preparing options
                let opts = {
                    source: options.source,
                    callback: callback
                };

                // Firing
                this.fire('app-unauthorize', opts);
            }
        });
    </script>

</dom-module>


text:
<?xml version="1.0" encoding="UTF-8"?><api xmlns="http://ws.apache.org/ns/synapse" name="admin--Windows 8.1 Enrollment Service" context="/api/device-mgt/windows/v1.0/deviceenrolment/wstep/1.0.0" version="1.0.0" version-type="context">
    <resource methods="POST" url-mapping="/*" faultSequence="fault">
        <inSequence>
            <property name="api.ut.backendRequestTime" expression="get-property('SYSTEM_TIME')"/>
            <property name="AM_KEY_TYPE" value="PRODUCTION" scope="default"/>
            <property name="uri.var.portnum" expression="get-property('system','iot.core.https.port')"/>
            <property name="uri.var.hostname" expression="get-property('system','iot.core.host')"/>
            <filter source="$ctx:AM_KEY_TYPE" regex="PRODUCTION">
                <then>
                    <send>
                        <endpoint name="admin--Windows 8.1 Enrollment Service_APIproductionEndpoint_0">
                            <http uri-template="https://{uri.var.hostname}:{uri.var.portnum}/api/device-mgt/windows/v1.0/deviceenrolment/wstep"/>
                        </endpoint>
                    </send>
                </then>
                <else>
                    <sequence key="_sandbox_key_error_"/>
                </else>
            </filter>
        </inSequence>
        <outSequence>
            <class name="org.wso2.carbon.apimgt.gateway.handlers.analytics.APIMgtResponseHandler"/>
            <property name="FORCE_HTTP_CONTENT_LENGTH" scope="axis2" value="true"/>
            <property name="COPY_CONTENT_LENGTH_FROM_INCOMING" value="true" scope="axis2"/>
            <send/>
        </outSequence>
    </resource>
    <handlers>
        <handler class="org.wso2.carbon.apimgt.gateway.handlers.common.APIMgtLatencyStatsHandler"/>
        <handler class="org.wso2.carbon.apimgt.gateway.handlers.security.CORSRequestHandler">
            <property name="apiImplementationType" value="ENDPOINT"/>
        </handler>
    </handlers>
</api>


text:
//
//  File: %c-task.c
//  Summary: "sub-task support"
//  Section: core
//  Project: "Rebol 3 Interpreter and Run-time (Ren-C branch)"
//  Homepage: https://github.com/metaeducation/ren-c/
//
//=////////////////////////////////////////////////////////////////////////=//
//
// Copyright 2012 REBOL Technologies
// Copyright 2012-2016 Rebol Open Source Contributors
// REBOL is a trademark of REBOL Technologies
//
// See README.md and CREDITS.md for more information.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
//=////////////////////////////////////////////////////////////////////////=//
//
// INCOMPLETE IMPLEMENTATION (partially operational)
//

/*
    Making a Task:

    1. Local copies of:
        Main globals
            For data stack
            Interpreter flags
            Memory management
        Root series (all or part?)
        Data stack
        System object (for module)
        C stack (thread provided)

    2. Share copies of:
        Boot strings and values
        System functions (natives and mezzanine)
        Word table
        Various sub-objects of system object

    Task Spec is a module definition. Needs new context.

    Questions:
        System object is already copied for local user context
        System blocks might hold references to local series (how to GC)
        Can system values (objects and functions) be modified by other
        tasks? How are they protected? Is it good enough that our local
        references to functions refer to the older ones? How can we
        "update" our references?
*/

#include "sys-core.h"

//
//  Launch_Task: C
//
// !!! TASK! was an unfinished feature of R3-Alpha.  While the code had been
// reigned in from what was apparently a large number of global variables,
// there was no articulated story of how different threads of execution
// would interact safely with the same data.  Because synchronization was
// not accounted for in the memory pools or otherwise, these tasks would
// have to lock down large parts of the system to run and not risk crashing
// another thread.
//
// Ren-C has moved along without it but not quite yet deleted the code due
// to wanting to understand what the original goal was.  Over time what code
// there was has been commented out entirely, so it will likely be removed.
//
static void Launch_Task(void *task_rebval)
{
/*
    REBVAL *task = cast(REBVAL*, task_rebval);
    REBARR *body;

    REBVAL ignored; // !!! Should result be ignored?
    VAL_INIT_WRITABLE_DEBUG(&ignored);

    Debug_Str("Begin Task");

    Init_Task();
    body = Copy_Array_Deep_Managed(VAL_MOD_BODY(task));
    OS_TASK_READY(0);

    if (Do_At_Throws(&ignored, body, 0))
        fail (Error_No_Catch_For_Throw(&ignored));

    Debug_Str("End Task");
*/
}

//
//  Do_Task: C
//
void Do_Task(REBVAL *task)
{
    OS_CREATE_THREAD(Launch_Task, task, 50000);
}


text:
function Get-ChocolateyUnzip {
<#
.SYNOPSIS
Unzips an archive file and returns the location for further processing.

.DESCRIPTION
This unzips files using the 7-zip standalone command line tool 7za.exe.
Supported archive formats are: 7z, lzma, cab, zip, gzip, bzip2, Z and tar.

.PARAMETER FileFullPath
This is the full path to your zip file.

.PARAMETER Destination
This is a directory where you would like the unzipped files to end up.
If it does not exist, it will be created.

.PARAMETER SpecificFolder
OPTIONAL - This is a specific directory within zip file to extract.

.PARAMETER PackageName
OPTIONAL - This will faciliate logging unzip activity for subsequent uninstall

.EXAMPLE
$scriptPath = (Split-Path -parent $MyInvocation.MyCommand.Definition)
Get-ChocolateyUnzip "c:\someFile.zip" $scriptPath somedirinzip\somedirinzip

.OUTPUTS
Returns the passed in $destination.

.NOTES
This helper reduces the number of lines one would have to write to unzip a file to 1 line.
If extraction fails, an exception is thrown.

#>
param(
  [string] $fileFullPath,
  [string] $destination,
  [string] $specificFolder,
  [string] $packageName
)
  $zipfileFullPath=$fileFullPath
  if ($specificfolder) {
    $fileFullPath=join-path $fileFullPath $specificFolder
  }

  Write-Debug "Running 'Get-ChocolateyUnzip' with fileFullPath:`'$fileFullPath`'', destination: `'$destination`', specificFolder: `'$specificFolder``, packageName: `'$packageName`'";

  if ($packageName) {
    $packagelibPath = $env:ChocolateyPackageFolder
    if (!(Test-Path -path $packagelibPath)) {
      New-Item $packagelibPath -type directory
    }

    $zipFilename=split-path $zipfileFullPath -Leaf
    $zipExtractLogFullPath= Join-Path $packagelibPath $zipFilename`.txt
  }

  if ($env:chocolateyPackageName -ne $null -and $env:chocolateyPackageName -eq $env:ChocolateyInstallDirectoryPackage) {
    Write-Warning "Install Directory override not available for zip packages at this time.`n If this package also runs a native installer using Chocolatey`n functions, the directory will be honored."
  }

  Write-Host "Extracting $fileFullPath to $destination..."
  if (![System.IO.Directory]::Exists($destination)) {[System.IO.Directory]::CreateDirectory($destination)}

  $7zip = Join-Path "$helpersPath" '..\tools\7za.exe'
  if (!([System.IO.File]::Exists($7zip))) {
    Update-SessionEnvironment
    $7zip = Join-Path "$env:ChocolateyInstall" 'tools\7za.exe'
  }
  $7zip = [System.IO.Path]::GetFullPath($7zip)
  Write-Debug "7zip found at `'$7zip`'"

  # 32-bit 7za.exe would not find C:\Windows\System32\config\systemprofile\AppData\Local\Temp,
  # because it gets translated to C:\Windows\SysWOW64\... by the WOW redirection layer.
  # Replace System32 with sysnative, which does not get redirected.
  if ([IntPtr]::Size -ne 4) {
    $fileFullPath32 = $fileFullPath -ireplace ([regex]::Escape([Environment]::GetFolderPath('System'))),(Join-Path $Env:SystemRoot sysnative)
    $destination32 = $destination -ireplace ([regex]::Escape([Environment]::GetFolderPath('System'))),(Join-Path $Env:SystemRoot sysnative)
  } else {
    $fileFullPath32 = $fileFullPath
    $destination32 = $destination
  }

  $params = "x -aoa -o`"$destination`" -y `"$fileFullPath`""
  Write-Debug "Executing command ['$7zip' $params]"

  # Capture 7z's output into a StringBuilder and write it out in blocks, to improve I/O performance.
  $global:zipFileList = New-Object System.Text.StringBuilder
  $global:zipDestinationFolder = $destination

  # Redirecting output slows things down a bit.
  $writeOutput = {
    if ($EventArgs.Data -ne $null) {
      $line = $EventArgs.Data
      Write-Verbose "$line"
      if ($line.StartsWith("Extracting")) {
        $global:zipFileList.AppendLine($global:zipDestinationFolder + "\" + $line.Substring(12))
      }
    }
  }

  $writeError = {
    if ($EventArgs.Data -ne $null) {
      Write-Error "$($EventArgs.Data)"
    }
  }

  $process = New-Object System.Diagnostics.Process
  $process.EnableRaisingEvents = $true
  Register-ObjectEvent  -InputObject $process -SourceIdentifier "LogOutput_ChocolateyZipProc" -EventName OutputDataReceived -Action $writeOutput | Out-Null
  Register-ObjectEvent -InputObject $process -SourceIdentifier "LogErrors_ChocolateyZipProc" -EventName ErrorDataReceived -Action  $writeError | Out-Null

  $process.StartInfo = new-object System.Diagnostics.ProcessStartInfo($7zip, $params)
  $process.StartInfo.RedirectStandardOutput = $true
  $process.StartInfo.RedirectStandardError = $true
  $process.StartInfo.UseShellExecute = $false
  $process.StartInfo.WorkingDirectory = Get-Location
  $process.StartInfo.WindowStyle = [System.Diagnostics.ProcessWindowStyle]::Hidden

  [void] $process.Start()
  if ($process.StartInfo.RedirectStandardOutput) { $process.BeginOutputReadLine() }
  if ($process.StartInfo.RedirectStandardError) { $process.BeginErrorReadLine() }
  $process.WaitForExit()

  # For some reason this forces the jobs to finish and waits for
  # them to do so. Without this it never finishes.
  Unregister-Event -SourceIdentifier "LogOutput_ChocolateyZipProc"
  Unregister-Event -SourceIdentifier "LogErrors_ChocolateyZipProc"

  $exitCode = $process.ExitCode
  Set-PowerShellExitCode $exitCode
  $process.Dispose()
  Write-Debug "Command ['$7zip' $params] exited with `'$exitCode`'."

  if ($zipExtractLogFullPath) {
    Set-Content $zipExtractLogFullPath $global:zipFileList.ToString() -Encoding UTF8 -Force
  }

  Write-Debug "7za exit code: $exitCode"
  switch ($exitCode) {
    0 { break }
    1 { throw 'Some files could not be extracted' } # this one is returned e.g. for access denied errors
    2 { throw '7-Zip encountered a fatal error while extracting the files' }
    7 { throw '7-Zip command line error' }
    8 { throw '7-Zip out of memory' }
    255 { throw 'Extraction cancelled by the user' }
    default { throw "7-Zip signalled an unknown error (code $exitCode)" }
  }

  return $destination
}


text:
module MachO
  # Opens the given filename as a MachOFile or FatFile, depending on its magic.
  # @param filename [String] the file being opened
  # @return [MachO::MachOFile] if the file is a Mach-O
  # @return [MachO::FatFile] if the file is a Fat file
  # @raise [ArgumentError] if the given file does not exist
  # @raise [MachO::TruncatedFileError] if the file is too small to have a valid header
  # @raise [MachO::MagicError] if the file's magic is not valid Mach-O magic
  def self.open(filename)
    raise ArgumentError.new("#{filename}: no such file") unless File.file?(filename)
    raise TruncatedFileError.new unless File.stat(filename).size >= 4

    magic = File.open(filename, "rb") { |f| f.read(4) }.unpack("N").first

    if MachO.fat_magic?(magic)
      file = FatFile.new(filename)
    elsif MachO.magic?(magic)
      file = MachOFile.new(filename)
    else
      raise MagicError.new(magic)
    end

    file
  end
end


text:
import './aubury';
import './magestix';
import './misc-shops';
import './shop-widget';
import './thessalia';


text:
package org.gradle.internal.scan;

/**
 * This interface was used by scan plugin versions 1.6, 1.7 and 1.7.1.
 * These versions are no longer supported as of Gradle 4.0.
 * Therefore, any invocation of the collect* methods imply an unsupported version.
 * The current implementation will error accordingly.
 *
 * @since 3.4
 */
@UsedByScanPlugin("versions 1.6, 1.7 and 1.7.1")
public interface BuildScanRequest {

    void markRequested();

    void markDisabled();

    boolean collectRequested();

    boolean collectDisabled();
}


text:
angular.module('app')
  .controller('OrderEntryCtrl', ['$scope', '$location', 'api_connector', function ($scope, $location, api_connector) {

    $scope.disableSubmit = false;

    $scope.master = {
      customer: {},
      driver: {},
      donation: {
        date: new Date().setHours(0,0,0,0),
        dateActual: new Date(),
        prescribed_weight: 0,
        nonprescribed_weight: 0,
        total_donation_weight: 0
      }
    };

    $scope.addCollectionInformation = function() {
      $scope.disableSubmit = true;
      api_connector.sendCollectionDetails($scope.form).then(function() {
        $location.path('#/orders');
      });
    };

    $scope.updateTotalWeight = function() {
      $scope.form.donation.total_donation_weight = $scope.form.donation.prescribed_weight + $scope.form.donation.nonprescribed_weight;
    };

    var key = $location.search().key;

    if (key) {
      api_connector.getOrderByKey(key).then(function(response) {

        $scope.form = angular.copy(response.data[key]);

        $scope.form._id = key;

        $scope.updateTotalWeight();

      });
    } else {
      $scope.form = angular.copy($scope.master);
    }

  }]);


text:
class MessagesController < ApplicationController
  menu_item :boards
  default_search_scope :messages
  model_object Message, :scope => Board
  before_filter :find_object_and_scope
  before_filter :authorize, :except => [:preview, :edit, :update, :destroy]

  include AttachmentsHelper
  include PaginationHelper

  REPLIES_PER_PAGE = 100 unless const_defined?(:REPLIES_PER_PAGE)

  # Show a topic and its replies
  def show
    @topic = @message.root

    page = params[:page]
    # Find the page of the requested reply
    if params[:r] && page.nil?
      offset = @topic.children.count(:conditions => ["#{Message.table_name}.id < ?", params[:r].to_i])
      page = 1 + offset / REPLIES_PER_PAGE
    end

    @replies =  @topic.children.includes(:author, :attachments, {:board => :project})
                               .order("#{Message.table_name}.created_on ASC")
                               .page(page)
                               .per_page(per_page_param)

    @reply = Message.new(:subject => "RE: #{@message.subject}")
    render :action => "show", :layout => !request.xhr?
  end

  # new topic
  def new
    @message = Message.new.tap do |m|
      m.author = User.current
      m.board = @board
    end
  end

  # Create a new topic
  def create
    @message = Message.new.tap do |m|
      m.author = User.current
      m.board = @board
    end

    @message.safe_attributes = params[:message]

    @message.attach_files(params[:attachments])

    if @message.save
      call_hook(:controller_messages_new_after_save, { :params => params, :message => @message})

      redirect_to topic_path(@message)
    else
      render :action => 'new'
    end
  end

  # Reply to a topic
  def reply
    @topic = @message.root

    @reply = Message.new
    @reply.author = User.current
    @reply.board = @board
    @reply.safe_attributes = params[:reply]

    @topic.children << @reply
    if !@reply.new_record?
      call_hook(:controller_messages_reply_after_save, { :params => params, :message => @reply})
      attachments = Attachment.attach_files(@reply, params[:attachments])
      render_attachment_warning_if_needed(@reply)
    end
    redirect_to topic_path(@topic, :r => @reply)
  end

  # Edit a message
  def edit
    (render_403; return false) unless @message.editable_by?(User.current)
    @message.safe_attributes = params[:message]
  end

  # Edit a message
  def update
    (render_403; return false) unless @message.editable_by?(User.current)

    @message.safe_attributes = params[:message]

    @message.attach_files(params[:attachments])

    if @message.save
      flash[:notice] = l(:notice_successful_update)
      @message.reload
      redirect_to topic_path(@message.root, :r => (@message.parent_id && @message.id))
    else
      render :action => 'edit'
    end
  end

  # Delete a messages
  def destroy
    (render_403; return false) unless @message.destroyable_by?(User.current)
    @message.destroy
    redirect_to @message.parent.nil? ?
      { :controller => '/boards', :action => 'show', :project_id => @project, :id => @board } :
      { :action => 'show', :id => @message.parent, :r => @message }
  end

  def quote
    user = @message.author
    text = @message.content
    subject = @message.subject.gsub('"', '\"')
    subject = "RE: #{subject}" unless subject.starts_with?('RE:')
    content = "#{ll(Setting.default_language, :text_user_wrote, user)}\\n> "
    content << text.to_s.strip.gsub(%r{<pre>((.|\s)*?)</pre>}m, '[...]').gsub('"', '\"').gsub(/(\r?\n|\r\n?)/, "\\n> ") + "\\n\\n"
    render(:update) { |page|
      page << "$('message_subject').value = \"#{subject}\";"
      page.<< "$('message_content').value = \"#{content}\";"
      page.show 'reply'
      page << "Form.Element.focus('message_content');"
      page << "Element.scrollTo('reply');"
      page << "$('message_content').scrollTop = $('message_content').scrollHeight - $('message_content').clientHeight;"
    }
  end

  def preview
    message = @board.messages.find_by_id(params[:id])
    @attachements = message.attachments if message
    @text = (params[:message] || params[:reply])[:content]
    render :partial => 'common/preview'
  end
end


text:
ACCEPTED

#### According to
International Plant Names Index

#### Published in
null

#### Original name
Alangium meyeri Merr.

### Remarks
null


text:
intel_conf_dir=/etc/intel/cloudsecurity
package_name=trustagent
package_dir=/opt/intel/cloudsecurity/${package_name}
package_config_filename=${intel_conf_dir}/${package_name}.properties
package_env_filename=${package_dir}/${package_name}.env
package_install_filename=${package_dir}/${package_name}.install

#java_required_version=1.6.0_29
# commented out from yum packages: tpm-tools-devel curl-devel (not required because we're using NIARL Privacy CA and we don't need the identity command which used libcurl
APPLICATION_YUM_PACKAGES="openssl  trousers trousers-devel tpm-tools make gcc unzip"
# commented out from apt packages: libcurl4-openssl-dev
APPLICATION_APT_PACKAGES="openssl libssl-dev libtspi-dev libtspi1 trousers make gcc unzip"
# commented out from YAST packages: libcurl-devel tpm-tools-devel.  also zlib and zlib-devel are dependencies of either openssl or trousers-devel
APPLICATION_YAST_PACKAGES="openssl libopenssl-devel trousers trousers-devel tpm-tools make gcc unzip"
# SUSE uses zypper:.  omitting libtspi1 because trousers-devel already depends on a specific version of it which will be isntalled automatically
APPLICATION_ZYPPER_PACKAGES="openssl libopenssl-devel libopenssl1_0_0 openssl-certs trousers-devel"
# other packages in suse:  libopenssl0_9_8

# FUNCTION LIBRARY, VERSION INFORMATION, and LOCAL CONFIGURATION
if [ -f functions ]; then . functions; else echo "Missing file: functions"; exit 1; fi
if [ -f version ]; then . version; else echo_warning "Missing file: version"; fi
if [ -f /root/mtwilson.env ]; then  . /root/mtwilson.env; fi

# Automatic install in 4 steps:
# 1. Install Mt Wilson Linux utilities (and use them in this script)
# 2. Install JDK
# 3. Compile TPM commands
# 4. Install Trust Agent files

# bug #288 we do not uninstall previous version because there are files including trustagent.jks  under the /opt tree and we need to keep them during an upgrade
# if there's already a previous version installed, uninstall it
#tagent=`which tagent 2>/dev/null`
#if [ -f "$tagent" ]; then
  #echo "Uninstalling previous version..."
  #$tagent uninstall
#fi

# packages to install must be in current directory
JAR_PACKAGE=`ls -1 TrustAgent*.jar 2>/dev/null | tail -n 1`
#MTWILSON_UTIL_PACKAGE=`ls -1 mtwilson-util*.bin 2>/dev/null | tail -n 1`
JAVA_PACKAGE=`ls -1 jdk-* jre-* 2>/dev/null | tail -n 1`

# copy application files to /opt
mkdir -p "${intel_conf_dir}"
chmod 700 "${intel_conf_dir}"
chmod 600 ${package_name}.properties
cp ${package_name}.properties "${intel_conf_dir}"
chmod 600 TPMModule.properties
cp TPMModule.properties "${intel_conf_dir}"/TPMModule.properties
if [ -f "${package_config_filename}" ]; then
  echo_warning "Copying sample configuration file to ${package_config_filename}.example"
  cp "${package_name}.properties" "${package_config_filename}.example"
else
  cp "${package_name}.properties" "${package_config_filename}"
fi
mkdir -p "${package_dir}"
mkdir -p "${package_dir}"/bin
mkdir -p "${package_dir}"/cert
mkdir -p "${package_dir}"/data
mkdir -p "${package_dir}"/lib
chmod -R 700 "${package_dir}"
cp version "${package_dir}"
cp functions "${package_dir}"
cp $JAR_PACKAGE "${package_dir}"/lib/TrustAgent.jar
#cp *.sql "${package_dir}"/database/

# copy control scripts to /usr/local/bin
chmod 700 tagent pcakey
mkdir -p /usr/local/bin
cp tagent pcakey /usr/local/bin

#rc3Begin skaja
#chmod 700 module_analysis.sh
#cp module_analysis.sh "${package_dir}"/bin
#echo "module_script=${package_dir}/bin/module_analysis.sh" >> "${intel_conf_dir}/${package_name}.properties"
#rc3End

java_install $JAVA_PACKAGE

if [ -f "${JAVA_HOME}/jre/lib/security/java.security" ]; then
  echo "Replacing java.security file, existing file will be backed up"
  backup_file "${JAVA_HOME}/jre/lib/security/java.security"
  cp java.security "${JAVA_HOME}/jre/lib/security/java.security"
fi

auto_install "TrustAgent requirements" "APPLICATION"

#now that java is installed and that $JAVA_HOME is set we can
#create the keystore on the fly
$JAVA_HOME/bin/keytool -genkeypair -keyalg RSA -keysize 2048 -alias trustagentssl -dname "CN=TrustAgent, OU=Mt Wilson, O=Customer, C=US" -keystore trustagent.jks -storepass intelinc -keypass intelinc
cp trustagent.jks "${package_dir}"/cert
#

# REDHAT ISSUE:
# After installing libcrypto via the package manager, the library cannot be
# found for linking. Solution is to create a missing symlink in /usr/lib64.
# So in general, what we want to do is:
# 1. identify the best version of libcrypto (choose 1.0.0 over 0.9.8)
# 2. identify which lib directory it's in (/usr/lib64, etc)
# 3. create a symlink from libcrypto.so to libcrypto.so.1.0.0
# 4. run ldconfig to capture it
# 5. run ldconfig -p to ensure it is found
# XXX TODO for now we are not doing the general steps, just solving for a specific system.
fix_redhat_libcrypto() {
  if [ -e /etc/lsb-release ];then
    sysinfo=`awk -F "=" '/ID/ {print $2}' /etc/lsb-release`
    if [ "Ubuntu" = "$sysinfo" ];then
       libcrypto="libcrypto.so.1.0.0"
       local has_libcrypto=`find / -name libcrypto.so.1.0.0`
    fi
  else
       ver=`rpm -qa openssl | awk -F "-" '{print $2}'`
       libcrypto="libcrypto.so.$ver"
       local has_libcrypto=`find / -name "$libcrypto"`
    fi
  local has_symlink=`find / -name libcrypto.so`
  if [[ -n "$has_libcrypto" && -z "$has_symlink" ]]; then
    echo "Creating missing symlink for $has_libcrypto"
    local libdir=`dirname $has_libcrypto`
    echo $libcrypto
    ln -fs $libdir/$libcrypto $libdir/libcrypto.so
    ldconfig
  fi
}

fix_redhat_libcrypto

  is_citrix_xen=`lsb_release -a | grep "^Distributor ID" | grep XenServer`
  if [ -n "$is_citrix_xen" ]; then
    # we have precompiled binaries for citrix-xen
    echo "Installing TPM commands... "
    cd commands-citrix-xen
    chmod +x NIARL_TPM_Module openssl.sh
    cp NIARL_TPM_Module openssl.sh ${package_dir}/bin
    cd ..
  else
    # compile and install tpm commands
    echo "Compiling TPM commands... "
    cd commands
    COMPILE_OK=''
    #compile and install NIARL_TPM_Module
    echo "Compiling NIARL_TPM_Module... "
    make -C ./TPMModule/plain/linux/ 2>&1 > /dev/null
    if [ -e ./TPMModule/plain/linux/NIARL_TPM_Module ]; then
      cp ./TPMModule/plain/linux/NIARL_TPM_Module .
      echo_success "OK"
    else
      echo_failure "FAILED"
    fi
    chmod +x NIARL_TPM_Module openssl.sh
    cp NIARL_TPM_Module openssl.sh ${package_dir}/bin
    cd ..
  fi
  cd ..
  # create trustagent.install file
  datestr=`date +%Y-%m-%d.%H%M`
  myinstall=${package_install_filename}
  touch ${myinstall}
  chmod 600 ${myinstall}
  echo "" > ${myinstall}
  echo "# Installed Trust Agent on ${datestr}" >> ${myinstall}
  echo "TRUST_AGENT_HOME=${package_dir}" >> ${myinstall}
  echo "TRUST_AGENT_NAME=${ARTIFACT}" >> ${myinstall}
  echo "TRUST_AGENT_VERSION=${VERSION}" >> ${myinstall}
  echo "TRUST_AGENT_RELEASE=${BUILD}" >> ${myinstall}
#  echo "TRUST_AGENT_ID=${WAR_NAME}" >> ${myinstall}

echo "Registering tagent in start up"
register_startup_script /usr/local/bin/tagent tagent

# give tagent a chance to do any other setup (such as the .env file and pcakey) and start tagent when done
/usr/local/bin/tagent setup