text:
package org.simmetrics.builders;

import static org.simmetrics.builders.StringDistanceBuilder.with;

import java.util.List;
import java.util.Set;

import org.junit.Rule;
import org.junit.Test;
import org.junit.experimental.runners.Enclosed;
import org.junit.runner.RunWith;
import org.mockito.Mock;
import org.mockito.junit.MockitoJUnit;
import org.mockito.junit.MockitoRule;
import org.simmetrics.ListDistance;
import org.simmetrics.MultisetDistance;
import org.simmetrics.SetDistance;
import org.simmetrics.StringDistance;
import org.simmetrics.builders.StringDistanceBuilder.CachingSimplifier;
import org.simmetrics.builders.StringDistanceBuilder.CachingListTokenizer;
import org.simmetrics.builders.StringDistanceBuilder.CachingMultisetTokenizer;
import org.simmetrics.builders.StringDistanceBuilder.CachingSetTokenizer;
import org.simmetrics.simplifiers.Simplifier;
import org.simmetrics.tokenizers.Tokenizer;

import com.google.common.base.Function;
import com.google.common.base.Predicate;
import com.google.common.cache.Cache;
import com.google.common.collect.Multiset;

@SuppressWarnings({"javadoc"})
@RunWith(Enclosed.class)
public class StringDistanceBuilderTest {

	public static class StringDistanceBuilderChainTest {

		@Rule
		public final MockitoRule mockitoRule = MockitoJUnit.rule();

		@Mock
		private StringDistance stringDistance;
		@Mock
		private ListDistance<String> listDistance;
		@Mock
		private SetDistance<String> setDistance;
		@Mock
		private MultisetDistance<String> multisetDistance;
		@Mock
		private Simplifier simplifier;
		@Mock
		private Tokenizer tokenizer;

		@Mock
		private Predicate<String> predicate;
		@Mock
		private Function<String,String> function;
		@Mock
		private Cache<String, String> stringCache;
		@Mock
		private Cache<String, List<String>> listCache;
		@Mock
		private Cache<String, Set<String>> setCache;
		@Mock
		private Cache<String, Multiset<String>> multisetCache;

		@Test
		public void testStringDistance01() {
			with(stringDistance)
					.build();
		}

		@Test
		public void testStringDistanceWithSimplifier01() {
			with(stringDistance)
					.simplify(simplifier)
					.build();
		}

		@Test
		public void testStringDistanceWithSimplifier02() {
			with(stringDistance)
					.simplify(simplifier)
					.simplify(simplifier)
					.build();
		}
		@Test
		public void testStringDistanceWithSimplifier01WithCache() {
			with(stringDistance)
					.simplify(simplifier)
					.cacheStrings(stringCache)
					.build();
		}
		@Test
		public void testStringDistanceWithSimplifer02WithCache() {
			with(stringDistance)
					.simplify(simplifier)
					.simplify(simplifier)
					.cacheStrings(stringCache)
					.build();
		}

		@Test
		public void testListDistance() {
			with(listDistance)
					.tokenize(tokenizer)
					.build();
		}

		@Test
		public void testListDistanceWithFilter() {
			with(listDistance)
					.tokenize(tokenizer)
					.filter(predicate)
					.build();
		}
		@Test
		public void testListDistanceWithTransform() {
			with(listDistance)
					.tokenize(tokenizer)
					.transform(function)
					.build();
		}

		@Test
		public void testListDistanceWithFilterAndTransform01() {
			with(listDistance)
					.tokenize(tokenizer)
					.filter(predicate)
					.transform(function)
					.build();
		}

		@Test
		public void testListDistanceWithFilterAndTransform02() {
			with(listDistance)
					.tokenize(tokenizer)
					.transform(function)
					.filter(predicate)
					.build();
		}

		@Test
		public void testListDistanceWithSimplifier01() {
			with(listDistance)
					.simplify(simplifier)
					.tokenize(tokenizer)
					.build();
		}

		@Test
		public void testListDistanceWithSimplifier02() {
			with(listDistance)
					.simplify(simplifier)
					.simplify(simplifier)
					.tokenize(tokenizer)
					.build();
		}

		@Test
		public void testListDistanceWithSimplifier01WithCache() {
			with(listDistance)
					.simplify(simplifier)
					.cacheStrings(stringCache)
					.tokenize(tokenizer)
					.build();
		}

		@Test
		public void testListDistanceWithSimplifier02WithCache() {
			with(listDistance)
					.simplify(simplifier)
					.simplify(simplifier)
					.cacheStrings(stringCache)
					.tokenize(tokenizer)
					.build();
		}

		@Test
		public void testListDistance02() {
			with(listDistance)
					.tokenize(tokenizer)
					.tokenize(tokenizer)
					.build();
		}

		@Test
		public void testListDistance01WithCache() {
			with(listDistance)
					.tokenize(tokenizer)
					.cacheTokens(listCache)
					.build();
		}

		@Test
		public void testListDistance02WithCache() {
			with(listDistance)
					.tokenize(tokenizer)
					.tokenize(tokenizer)
					.cacheTokens(listCache)
					.build();
		}

		public void testSetDistance() {
			with(setDistance)
					.tokenize(tokenizer)
					.build();
		}

		@Test
		public void testSetDistanceWithFilter() {
			with(setDistance)
					.tokenize(tokenizer)
					.filter(predicate)
					.build();
		}

		@Test
		public void testSetDistanceWithTransform() {
			with(setDistance)
					.tokenize(tokenizer)
					.transform(function)
					.build();
		}

		@Test
		public void testSetDistanceWithFilterAndTransform01() {
			with(setDistance)
					.tokenize(tokenizer)
					.filter(predicate)
					.transform(function)
					.build();
		}

		@Test
		public void testSetDistanceWithFilterAndTransform02() {
			with(setDistance)
					.tokenize(tokenizer)
					.transform(function)
					.filter(predicate)
					.build();
		}

		@Test
		public void testSetDistanceWithSimplifier01() {
			with(setDistance)
					.simplify(simplifier)
					.tokenize(tokenizer)
					.build();
		}

		@Test
		public void testSetDistanceWithSimplifier02() {
			with(setDistance)
					.simplify(simplifier)
					.simplify(simplifier)
					.tokenize(tokenizer)
					.build();
		}

		@Test
		public void testSetDistanceWithSimplifier01WithCache() {
			with(setDistance)
					.simplify(simplifier)
					.cacheStrings(stringCache)
					.tokenize(tokenizer)
					.build();
		}

		@Test
		public void testSetDistanceWithSimplifier02WithCache() {
			with(setDistance)
					.simplify(simplifier)
					.simplify(simplifier)
					.cacheStrings(stringCache)
					.tokenize(tokenizer)
					.build();
		}
		@Test
		public void testSetDistance02() {
			with(setDistance)
					.tokenize(tokenizer)
					.tokenize(tokenizer)
					.build();
		}

		@Test
		public void testSetDistance01WithCache() {
			with(setDistance)
					.tokenize(tokenizer)
					.cacheTokens(setCache)
					.build();
		}

		@Test
		public void testSetDistance02WithCache() {
			with(setDistance)
					.tokenize(tokenizer)
					.tokenize(tokenizer)
					.cacheTokens(setCache)
					.build();
		}

		public void testMultisetDistance() {
			with(multisetDistance)
					.tokenize(tokenizer)
					.build();
		}

		@Test
		public void testMultisetDistanceWithFilter() {
			with(multisetDistance)
					.tokenize(tokenizer)
					.filter(predicate)
					.build();
		}

		@Test
		public void testMultisetDistanceWithTransform() {
			with(multisetDistance)
					.tokenize(tokenizer)
					.transform(function)
					.build();
		}

		@Test
		public void testMultisetDistanceWithFilterAndTransform01() {
			with(multisetDistance)
					.tokenize(tokenizer)
					.filter(predicate)
					.transform(function)
					.build();
		}

		@Test
		public void testMultisetDistanceWithFilterAndTransform02() {
			with(multisetDistance)
					.tokenize(tokenizer)
					.transform(function)
					.filter(predicate)
					.build();
		}

		@Test
		public void testMultisetDistanceWithSimplifier01() {
			with(multisetDistance)
					.simplify(simplifier)
					.tokenize(tokenizer)
					.build();
		}

		@Test
		public void testMultisetDistanceWithSimplifier02() {
			with(multisetDistance)
					.simplify(simplifier)
					.simplify(simplifier)
					.tokenize(tokenizer)
					.build();
		}
		@Test
		public void testMultisetDistanceWithSimplifier01WithCache() {
			with(multisetDistance)
					.simplify(simplifier)
					.cacheStrings(stringCache)
					.tokenize(tokenizer)
					.build();
		}

		@Test
		public void testMultisetDistanceWithSimplifier02WithCache() {
			with(multisetDistance)
					.simplify(simplifier)
					.simplify(simplifier)
					.cacheStrings(stringCache)
					.tokenize(tokenizer)
					.build();
		}
		@Test
		public void testMultisetDistance02() {
			with(multisetDistance)
					.tokenize(tokenizer)
					.tokenize(tokenizer)
					.build();
		}

		@Test
		public void testMultisetDistance01WithCache() {
			with(multisetDistance)
					.tokenize(tokenizer)
					.cacheTokens(multisetCache)
					.build();
		}

		@Test
		public void testMultisetDistance02WithCache() {
			with(multisetDistance)
					.tokenize(tokenizer)
					.tokenize(tokenizer)
					.cacheTokens(multisetCache)
					.build();
		}
	}

	public static class CachingListTokenizerTest extends CachingTokenizerTest<List<String>> {

		@Override
		protected boolean supportsTokenizeToSet() {
			return false;
		}

		@Override
		protected boolean supportsTokenizeToMultiset() {
			return false;
		}

		@Override
		public Tokenizer getTokenizer(Cache<String, List<String>> cache, Tokenizer tokenizer) {
			return new CachingListTokenizer(cache, tokenizer);
		}
	}

	public static class CachingMultisetTokenizerTest extends CachingTokenizerTest<Multiset<String>> {

		@Override
		protected final boolean supportsTokenizeToList() {
			return false;
		}

		@Override
		protected boolean supportsTokenizeToSet() {
			return false;
		}

		@Override
		public Tokenizer getTokenizer(Cache<String, Multiset<String>> cache, Tokenizer tokenizer) {
			return new CachingMultisetTokenizer(cache, tokenizer);
		}
	}

	public static class CachingSetTokenizerTest extends CachingTokenizerTest<Set<String>> {

		@Override
		protected final boolean supportsTokenizeToList() {
			return false;
		}

		@Override
		protected boolean supportsTokenizeToMultiset() {
			return false;
		}

		@Override
		public Tokenizer getTokenizer(Cache<String, Set<String>> cache, Tokenizer tokenizer) {
			return new CachingSetTokenizer(cache,tokenizer);
		}
	}

	public static class StringDistanceCachingSimplifierTest extends CachingSimplifierTest {

		@Override
		protected Simplifier getCachingSimplifier(Cache<String, String> cache,
				Simplifier innerSimplifier) {
			return new CachingSimplifier(cache, innerSimplifier);
		}
	}
}


text:
package org.apache.commons.scxml2;

import java.io.IOException;
import java.io.InputStream;
import java.io.ObjectInputStream;
import java.io.ObjectStreamClass;

/**
 * Extended ObjectInputStream to be used for de-serializing SCInstance.
 *

 * This class allows configuring a custom {@link ClassResolver} callback to dynamically resolve a deserialization class,
 * which is needed for SCXML languages like Groovy which need to dynamically lookup custom Groovy classes.
 *

 */
public class SCInstanceObjectInputStream extends ObjectInputStream {

    /** ClassResolver Callback interface */
    public interface ClassResolver {

        /**
         * Callback method invoked from {@link SCInstanceObjectInputStream#resolveClass(ObjectStreamClass)}
         * @param osc an instance of class ObjectStreamClass
         * @return a Class object corresponding to osc
         * @throws IOException
         * @throws ClassNotFoundException
         */
        Class resolveClass(ObjectStreamClass osc) throws IOException, ClassNotFoundException;
    }

    /**
     * current classresolver callback
     */
    private ClassResolver classResolver;

    /**
     * Default constructor
     * @param in Inputstream to use
     * @throws IOException
     */
    public SCInstanceObjectInputStream(final InputStream in) throws IOException {
        super(in);
    }

    /**
     * Set custom class resolver callback, or null when no longer needed.
     *

     * Typically usage:
     *

     * private void readObject(ObjectInputStream in) throws IOException,ClassNotFoundException {
     *     ClassResolver currentClassResolver = null;
     *     try {
     *         if (in instanceof SCInstanceObjectInputStream) {
     *             currentClassResolver = ((SCInstanceObjectInputStream)in).setClassResolver(customClassResolver);
     *         }
     *         ... // read Object(s)
     *     }
     *     finally {
     *         if (in instanceof SCInstanceObjectInputStream) {
     *             ((SCInstanceObjectInputStream)in).setClassResolver(currentClassResolver);
     *         }
     *     }
     * }
     *

     *

     * @see org.apache.commons.scxml2.env.groovy.GroovyContext#readObject(ObjectInputStream)
     * @param classResolver custom class resolver
     */
    public ClassResolver setClassResolver(ClassResolver classResolver) {
        ClassResolver old = this.classResolver;
        this.classResolver = classResolver;
        return old;
    }

    protected Class resolveClass(ObjectStreamClass osc) throws IOException, ClassNotFoundException {
        if (classResolver != null) {
            return classResolver.resolveClass(osc);
        }
        return super.resolveClass(osc);
    }
}

redpajama_set_name: RedPajamaGithub


text:
module Fog
  module OpenStack
    class Identity
      class V2
        class Real
          ##
          # Retrieves an EC2 credential for a user.  Requires administrator
          # credentials.
          #
          # ==== Parameters
          # * user_id<~String>: The id of the user to retrieve the credential
          #   for
          # * access<~String>: The access key of the credential to retrieve
          #
          # ==== Returns
          # * response<~Excon::Response>:
          #   * body<~Hash>:
          #     * 'credential'<~Hash>: The EC2 credential
          #       * 'access'<~String>: The access key
          #       * 'secret'<~String>: The secret key
          #       * 'user_id'<~String>: The user id
          #       * 'tenant_id'<~String>: The tenant id

          def get_ec2_credential(user_id, access)
            request(
              :expects => [200, 202],
              :method  => 'GET',
              :path    => "users/#{user_id}/credentials/OS-EC2/#{access}"
            )
          rescue Excon::Errors::Unauthorized
            raise Fog::OpenStack::Identity::NotFound
          end
        end

        class Mock
          def get_ec2_credential(user_id, access)
            ec2_credential = data[:ec2_credentials][user_id][access]

            raise Fog::OpenStack::Identity::NotFound unless ec2_credential

            response = Excon::Response.new
            response.status = 200
            response.body = {'credential' => ec2_credential}
            response
          end
        end
      end
    end
  end
end


text:
//
//  BOXAuthorizationViewController.h
//  BoxContentSDK
//
//  Created on 2/20/13.
//  Copyright (c) 2013 Box. All rights reserved.
//

#import <UIKit/UIKit.h>
#import "BOXContentClient.h"
#import "BOXUser.h"

/**
 * BOXAuthorizationViewController is a UIViewController that displays a UIWebview
 * that loads the OAuth2 authorize URL. An app may present this view controller to
 * log a user in to Box.
 *
 * This view controller also has extra logic to handle various Single Sign-ON (SSO)
 * configurations which require special handling beyond what a web view provides.
 * SSO is a session/user authentication process that allows a user to provide his
 * or her credentials once in order to access multiple applications. It is widely
 * used by corporations and institutions to secure and simplify the authentication
 * process for their users.
 *
 * **Important**: This controller performs valuable cookie-related operations on deallocation,
 * as such it should not be kept it memory after it is dismissed.
 *
 * @warning This is the only part of the Box SDK that is specific to iOS. If you wish to
 *   include the Box SDK in an OS X project, remove this source file.
 */
@interface BOXAuthorizationViewController : UIViewController

/** @name Initializers */

/**
 * Designated initializer.
 * @param completionBlock You will likely want to dismiss the authorizationViewController. If successful, a BoxUser object will be returned, otherwise an NSError will be returned.
 * @param completionBlock You will likely want to dismiss the authorizationViewController through this block.
 */
- (instancetype)initWithSDKClient:(BOXContentClient *)SDKClient
                  completionBlock:(void (^)(BOXAuthorizationViewController *authorizationViewController, BOXUser *user, NSError *error))completionBlock
                      cancelBlock:(void (^)(BOXAuthorizationViewController *authorizationViewController))cancelBlock;

@end


text:
/* -*-c++-*- */
/* osgEarth - Dynamic map generation toolkit for OpenSceneGraph
* Copyright 2008-2013 Pelican Mapping
* http://osgearth.org
*
* osgEarth is free software; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program.  If not, see <http://www.gnu.org/licenses/>
*/

#include <osgEarthAnnotation/CircleNode>
#include <osgEarthAnnotation/AnnotationRegistry>
#include <osgEarthFeatures/GeometryCompiler>
#include <osgEarthSymbology/GeometryFactory>
#include <osgEarthSymbology/ExtrusionSymbol>
#include <osgEarth/MapNode>
#include <osgEarth/DrapeableNode>
#include <osg/MatrixTransform>
#include <cmath>

using namespace osgEarth;
using namespace osgEarth::Annotation;
using namespace osgEarth::Features;
using namespace osgEarth::Symbology;

CircleNode::CircleNode(MapNode*           mapNode,
                       const GeoPoint&    position,
                       const Linear&      radius,
                       const Style&       style,
                       const Angle&       arcStart,
                       const Angle&       arcEnd,
                       const bool         pie):

LocalizedNode( mapNode, position ),
_radius      ( radius ),
_style       ( style ),
_arcStart    ( arcStart ),
_arcEnd      ( arcEnd ),
_pie         ( pie ),
_numSegments ( 0 )
{
    _xform = new osg::MatrixTransform();
    rebuild();
}

const Linear&
CircleNode::getRadius() const
{
    return _radius;
}

void
CircleNode::setRadius( const Linear& radius )
{
    if (_radius != radius )
    {
        _radius = radius;
        rebuild();
    }
}

unsigned int
CircleNode::getNumSegments() const
{
    return _numSegments;
}

void
CircleNode::setNumSegments(unsigned int numSegments )
{
    if (_numSegments != numSegments )
    {
        _numSegments = numSegments;
        rebuild();
    }
}

const Style&
CircleNode::getStyle() const
{
    return _style;
}

void
CircleNode::setStyle( const Style& style )
{
    _style = style;
    rebuild();
}

const Angle&
CircleNode::getArcStart(void) const
{
	return (_arcStart);
}

void
CircleNode::setArcStart(const Angle& arcStart)
{
	_arcStart = arcStart;
	rebuild();
}

const Angle&
CircleNode::getArcEnd(void) const
{
	return (_arcEnd);
}

void
CircleNode::setArcEnd(const Angle& arcEnd)
{
	_arcEnd = arcEnd;
	rebuild();
}

const bool&
CircleNode::getPie(void) const
{
	return (_pie);
}

void
CircleNode::setPie(const bool& pie)
{
    _pie = pie;
    rebuild();
}

void
CircleNode::rebuild()
{
    std::string currentDecoration = getDecoration();
    clearDecoration();

    // Reset this node.
    osgEarth::clearChildren( this );
    osgEarth::clearChildren( _xform.get() );
    this->addChild( _xform.get() );

    // construct a local-origin circle.
    GeometryFactory factory;
    Geometry* geom = NULL;
    if (std::abs(_arcEnd.as(Units::DEGREES) - _arcStart.as(Units::DEGREES)) >= 360.0)
    {
        geom = factory.createCircle(osg::Vec3d(0,0,0), _radius, _numSegments);
    }
    else
    {
        geom = factory.createArc(osg::Vec3d(0,0,0), _radius, _arcStart, _arcEnd, _numSegments, 0L, _pie);
    }
    if ( geom )
    {
        GeometryCompiler compiler;
        osg::ref_ptr<Feature> feature = new Feature(geom, 0L); //todo: consider the SRS
        osg::Node* node = compiler.compile( feature.get(), _style, FilterContext(0L) );
        if ( node )
        {
            _xform->addChild( node );
            this->replaceChild( _xform.get(), applyAltitudePolicy(_xform.get(), _style) );
        }

        applyGeneralSymbology( _style );
        setLightingIfNotSet( false );
    }

    setDecoration( currentDecoration );
}

//-------------------------------------------------------------------

OSGEARTH_REGISTER_ANNOTATION( circle, osgEarth::Annotation::CircleNode );

CircleNode::CircleNode(MapNode*              mapNode,
                       const Config&         conf,
                       const osgDB::Options* dbOptions) :
LocalizedNode( mapNode, conf ),
_radius      ( 1.0, Units::KILOMETERS ),
_numSegments ( 0 )
{
    _xform = new osg::MatrixTransform();

    conf.getObjIfSet( "radius", _radius );
    conf.getObjIfSet( "style",  _style );
    conf.getIfSet   ( "num_segments", _numSegments );

    rebuild();
}

Config
CircleNode::getConfig() const
{
    Config conf = LocalizedNode::getConfig();
    conf.key() = "circle";

    conf.addObj( "radius", _radius );
    conf.addObj( "style",  _style );

    if ( _numSegments != 0 )
        conf.add( "num_segments", _numSegments );

    return conf;
}


text:
using System;
using Csla;

namespace SelfLoad.DataAccess.ERLevel
{
    /// <summary>
    /// DTO for C02_Continent type
    /// </summary>
    public partial class C02_ContinentDto
    {
        /// <summary>
        /// Gets or sets the Continents ID.
        /// </summary>
        /// <value>The Continent ID.</value>
        public int Continent_ID { get; set; }

        /// <summary>
        /// Gets or sets the Continents Name.
        /// </summary>
        /// <value>The Continent Name.</value>
        public string Continent_Name { get; set; }
    }
}


text:
System for Wi-Fi Quality Analysis using Raspberry Pi

## Installation

TODO: Describe the installation process

## Usage

TODO: Write usage instructions

## Contributing

1. Fork it!
2. Create your feature branch: `git checkout -b my-new-feature`
3. Commit your changes: `git commit -am 'Add some feature'`
4. Push to the branch: `git push origin my-new-feature`
5. Submit a pull request :D

## History

TODO: Write history

## Credits

TODO: Write credits


text:
Login to your ArcGIS Organization and hide the password with the getpass module. The API represents a GIS portal using the GIS class from the gis module. Instantiate your own GIS portal with this class and use its properties property (the **Property Manager** object accessed as a property) to access various information. You can also use the **User Manager** helper class by accessing the _users_ property of the gis class to work with user infromation.

```python
from arcgis.gis import GIS
import getpass

password = getpass.getpass("Enter your ArcGIS Organizational or Developer Account Password: ")
gis = GIS("https://www.arcgis.com", "[your username]", password)
print("Logged in successfully to {} as {}.".format(gis.properties.urlKey + '.' + gis.properties.customBaseUrl, \
                                                   gis.users.me.username))
```

![login](img-login.png)

### Load a map widget from the `gis` class

For more information on IPython.display, refer to [IPython's Rich Display System](https://github.com/ipython/ipython/blob/master/examples/IPython%20Kernel/Rich%20Output.ipynb) or the [IPython API Reference](http://ipython.readthedocs.io/en/stable/api/generated/IPython.display.html). Importing the diplay function allows for display of Item html and other graphic representations of objects.

Be sure to set your map to a variable for referencing later in the notebook.

```python
from IPython.display import display

map = gis.map("Springfield, IL", 12)
map
```

### Use the Content Manager to access data in your portal

Access the **Content Manager** with the content property of the gis class. The content object that results contains methods for working with the items in the gis portal.

The search method of the content object allows you to invesigate data you have access to (as determined by the authorization of the currently logged in user.) The `search` method has various parameters. Find out about the various parameters in the [Content Manager help](https.esri.github.io/arcgis-python-api/apidoc/html/arcgis.gis.html#contentmanager). Below we'll return a list of all the Feature Service items in a portal with the word 'Church' in the title by using a wildcard for the query parameter, Feature Service for the item_type parameter. Set the max_items parameter to control the number of results returned.

```python
feat_services = gis.content.search(query="title:Church*", item_type="Feature Service", max_items=5, outside_org=true)
print("{} has access to {} feature service items.".format(gis.users.me.username, len(feat_services)))
```

Correct results from API functions require input of specific formats, so it's important to know what types of objects are returned from queries. The`Search` method on the **Content Manager** returns a Python [list](https://docs.python.org/3/tutorial/introduction.html#lists) of ArcGIS [items](http://resources.arcgis.com/en/help/arcgis-rest-api/#/Item/02r30000007w000000/). Accessing members from a list and obtaining properties from items require knowing specific functions and methods. Typing an object, followed by a period, followed by a Tab provides access to properties and methods accessible from objects.

The code below loops the list of Feature Service items to access the unique url to the feature service endpoint. This is a way to check the data and what format is returned from various queries.

```python
for feat_svc in feat_services:
    print("{} is a {}.".format(feat_svc.title.capitalize(), type(feat_svc)))
    print("\t{}".format(feat_svc.url))
```

Use an index to obtain the item from the list.

```python
catholic_churches = feat_services[4]
catholic_churches
```
![churches](img-churches.png)

### Add the layer to the map

The Map Widget's add_layer method requires an ArcGIS item as input. Type `map.add_layer?` and run the cell to inspect the help.

```python
map.add_layer(catholic_churches)
```
![churches on map](img-churches-map.png)

Scroll up to the map and verify that the layer has been added.

When you're done, your notebook should look like [add-layer.ipynb](add-layer.ipynb).


text:
package com.tectonica.jonix.unify.base;

import com.tectonica.jonix.common.codelist.NotificationOrUpdateTypes;
import com.tectonica.jonix.common.codelist.ProductIdentifierTypes;
import com.tectonica.jonix.common.struct.JonixProductIdentifier;

import java.io.Serializable;
import java.util.List;

/**
 * Bundles together some general information included in an ONIX Product
 * <p>
 * NOTE: to access the information, use the public fields directly. No getters() are included..
 *
 * @author Zach Melamed
 */
@SuppressWarnings("serial")
public abstract class BaseInfo implements Serializable {
    public String recordReference;
    public NotificationOrUpdateTypes notificationType;
    public List<JonixProductIdentifier> productIds;

    public String findProductId(ProductIdentifierTypes requestedType) {
        JonixProductIdentifier jonixProductId = findJonixProductId(requestedType);
        return (jonixProductId == null) ? null : jonixProductId.idValue;
    }

    public JonixProductIdentifier findJonixProductId(ProductIdentifierTypes requestedType) {
        if (productIds != null) {
            for (JonixProductIdentifier pid : productIds) {
                if (pid.productIDType == requestedType) {
                    return pid;
                }
            }
        }
        return null;
    }
}


text:
var mongoose     = require('mongoose');
var Schema       = mongoose.Schema;

var TagHierarchySchema   = new Schema({
	name: String,
	parent: String,
	flags: [String],
	order: Number
}, {
  collection: 'tag_hierarchies'
});

module.exports = mongoose.model('TagHierarchy', TagHierarchySchema);


text:
using Ditto.Internal;

namespace Ditto
{
    public interface IResolveValue
    {
        Result TryResolve(IResolutionContext context, IDescribeMappableProperty destinationProperty);
    }
}


text:
@implementation RegisterParam

@end


text:
package com.google.code.validationframework.base.transform.map;

import com.google.code.validationframework.api.transform.Transformer;

import java.util.Collection;
import java.util.Map;

/**
 * Transformer getting a map as input and returning its keys as output.
 *
 * @param <I> Type of map to get the keys from.
 */
public class GetMapKeysTransformer<I extends Map<K, ?>, K> implements Transformer<I, Collection<K>> {

    /**
     * @see Transformer#transform(Object)
     */
    @Override
    public Collection<K> transform(I input) {
        return input.keySet();
    }
}


text:
import getMemberValuePath from '../utils/getMemberValuePath';
import getNameOrValue from '../utils/getNameOrValue';
import isReactForwardRefCall from '../utils/isReactForwardRefCall';
import resolveToValue from '../utils/resolveToValue';
import resolveFunctionDefinitionToReturnValue from '../utils/resolveFunctionDefinitionToReturnValue';
import type Documentation from '../Documentation';
import type { NodePath } from '@babel/traverse';
import type { Identifier } from '@babel/types';
import type { Handler } from '.';
import type { ComponentNode } from '../resolver';

const displayNameHandler: Handler = function (
  documentation: Documentation,
  componentDefinition: NodePath<ComponentNode>,
): void {
  let displayNamePath: NodePath | null = getMemberValuePath(
    componentDefinition,
    'displayName',
  );

  if (!displayNamePath) {
    // Function and class declarations need special treatment. The name of the
    // function / class is the displayName
    if (
      (componentDefinition.isClassDeclaration() ||
        componentDefinition.isFunctionDeclaration()) &&
      componentDefinition.has('id')
    ) {
      documentation.set(
        'displayName',
        getNameOrValue(componentDefinition.get('id') as NodePath<Identifier>),
      );
    } else if (
      componentDefinition.isArrowFunctionExpression() ||
      componentDefinition.isFunctionExpression() ||
      isReactForwardRefCall(componentDefinition)
    ) {
      let currentPath: NodePath = componentDefinition;

      while (currentPath.parentPath) {
        if (currentPath.parentPath.isVariableDeclarator()) {
          documentation.set(
            'displayName',
            getNameOrValue(currentPath.parentPath.get('id')),
          );

          return;
        } else if (currentPath.parentPath.isAssignmentExpression()) {
          const leftPath = currentPath.parentPath.get('left');

          if (leftPath.isIdentifier() || leftPath.isLiteral()) {
            documentation.set('displayName', getNameOrValue(leftPath));

            return;
          }
        }
        currentPath = currentPath.parentPath;
      }
    }

    return;
  }
  displayNamePath = resolveToValue(displayNamePath);

  // If display name is defined as function somehow (getter, property with function)
  // we resolve the return value of the function
  if (displayNamePath.isFunction()) {
    displayNamePath = resolveFunctionDefinitionToReturnValue(displayNamePath);
  }
  if (
    !displayNamePath ||
    (!displayNamePath.isStringLiteral() && !displayNamePath.isNumericLiteral())
  ) {
    return;
  }
  documentation.set('displayName', displayNamePath.node.value);
};

export default displayNameHandler;


text:
#ifndef __DECLMANAGER_H__
#define __DECLMANAGER_H__

/*
===============================================================================

	Declaration Manager

	All "small text" data types, like materials, sound shaders, fx files,
	entity defs, etc. are managed uniformly, allowing reloading, purging,
	listing, printing, etc. All "large text" data types that never have more
	than one declaration in a given file, like maps, models, AAS files, etc.
	are not handled here.

	A decl will never, ever go away once it is created. The manager is
	garranteed to always return the same decl pointer for a decl type/name
	combination. The index of a decl in the per type list also stays the
	same throughout the lifetime of the engine. Although the pointer to
	a decl always stays the same, one should never maintain pointers to
	data inside decls. The data stored in a decl is not garranteed to stay
	the same for more than one engine frame.

	The decl indexes of explicitely defined decls are garrenteed to be
	consistent based on the parsed decl files. However, the indexes of
	implicit decls may be different based on the order in which levels
	are loaded.

	The decl namespaces are separate for each type. Comments for decls go
	above the text definition to keep them associated with the proper decl.

	During decl parsing, errors should never be issued, only warnings
	followed by a call to MakeDefault().

===============================================================================
*/

typedef enum {
	DECL_TABLE				= 0,
	DECL_MATERIAL,
	DECL_SKIN,
	DECL_SOUND,
	DECL_ENTITYDEF,
	DECL_MODELDEF,
	DECL_FX,
	DECL_PARTICLE,
	DECL_AF,
	DECL_PDA,
	DECL_VIDEO,
	DECL_AUDIO,
	DECL_EMAIL,
	DECL_MODELEXPORT,
	DECL_MAPDEF,

	// new decl types can be added here

	DECL_MAX_TYPES			= 32
} declType_t;

typedef enum {
	DS_UNPARSED,
	DS_DEFAULTED,			// set if a parse failed due to an error, or the lack of any source
	DS_PARSED
} declState_t;

const int DECL_LEXER_FLAGS	=	LEXFL_NOSTRINGCONCAT |				// multiple strings seperated by whitespaces are not concatenated
								LEXFL_NOSTRINGESCAPECHARS |			// no escape characters inside strings
								LEXFL_ALLOWPATHNAMES |				// allow path seperators in names
								LEXFL_ALLOWMULTICHARLITERALS |		// allow multi character literals
								LEXFL_ALLOWBACKSLASHSTRINGCONCAT |	// allow multiple strings seperated by '\' to be concatenated
								LEXFL_NOFATALERRORS;				// just set a flag instead of fatal erroring

class idDeclBase {
public:
	virtual 				~idDeclBase() {};
	virtual const char *	GetName() const = 0;
	virtual declType_t		GetType() const = 0;
	virtual declState_t		GetState() const = 0;
	virtual bool			IsImplicit() const = 0;
	virtual bool			IsValid() const = 0;
	virtual void			Invalidate() = 0;
	virtual void			Reload() = 0;
	virtual void			EnsureNotPurged() = 0;
	virtual int				Index() const = 0;
	virtual int				GetLineNum() const = 0;
	virtual const char *	GetFileName() const = 0;
	virtual void			GetText( char *text ) const = 0;
	virtual int				GetTextLength() const = 0;
	virtual void			SetText( const char *text ) = 0;
	virtual bool			ReplaceSourceFileText() = 0;
	virtual bool			SourceFileChanged() const = 0;
	virtual void			MakeDefault() = 0;
	virtual bool			EverReferenced() const = 0;
	virtual bool			SetDefaultText() = 0;
	virtual const char *	DefaultDefinition() const = 0;
	virtual bool			Parse( const char *text, const int textLength, bool allowBinaryVersion ) = 0;
	virtual void			FreeData() = 0;
	virtual size_t			Size() const = 0;
	virtual void			List() const = 0;
	virtual void			Print() const = 0;
};

class idDecl {
public:
							// The constructor should initialize variables such that
							// an immediate call to FreeData() does no harm.
							idDecl() { base = NULL; }
	virtual 				~idDecl() {};

							// Returns the name of the decl.
	const char *			GetName() const { return base->GetName(); }

							// Returns the decl type.
	declType_t				GetType() const { return base->GetType(); }

							// Returns the decl state which is usefull for finding out if a decl defaulted.
	declState_t				GetState() const { return base->GetState(); }

							// Returns true if the decl was defaulted or the text was created with a call to SetDefaultText.
	bool					IsImplicit() const { return base->IsImplicit(); }

							// The only way non-manager code can have an invalid decl is if the *ByIndex()
							// call was used with forceParse = false to walk the lists to look at names
							// without touching the media.
	bool					IsValid() const { return base->IsValid(); }

							// Sets state back to unparsed.
							// Used by decl editors to undo any changes to the decl.
	void					Invalidate() { base->Invalidate(); }

							// if a pointer might possible be stale from a previous level,
							// call this to have it re-parsed
	void					EnsureNotPurged() { base->EnsureNotPurged(); }

							// Returns the index in the per-type list.
	int						Index() const { return base->Index(); }

							// Returns the line number the decl starts.
	int						GetLineNum() const { return base->GetLineNum(); }

							// Returns the name of the file in which the decl is defined.
	const char *			GetFileName() const { return base->GetFileName(); }

							// Returns the decl text.
	void					GetText( char *text ) const { base->GetText( text ); }

							// Returns the length of the decl text.
	int						GetTextLength() const { return base->GetTextLength(); }

							// Sets new decl text.
	void					SetText( const char *text ) { base->SetText( text ); }

							// Saves out new text for the decl.
							// Used by decl editors to replace the decl text in the source file.
	bool					ReplaceSourceFileText() { return base->ReplaceSourceFileText(); }

							// Returns true if the source file changed since it was loaded and parsed.
	bool					SourceFileChanged() const { return base->SourceFileChanged(); }

							// Frees data and makes the decl a default.
	void					MakeDefault() { base->MakeDefault(); }

							// Returns true if the decl was ever referenced.
	bool					EverReferenced() const { return base->EverReferenced(); }

public:
							// Sets textSource to a default text if necessary.
							// This may be overridden to provide a default definition based on the
							// decl name. For instance materials may default to an implicit definition
							// using a texture with the same name as the decl.
	virtual bool			SetDefaultText() { return base->SetDefaultText(); }

							// Each declaration type must have a default string that it is guaranteed
							// to parse acceptably. When a decl is not explicitly found, is purged, or
							// has an error while parsing, MakeDefault() will do a FreeData(), then a
							// Parse() with DefaultDefinition(). The defaultDefintion should start with
							// an open brace and end with a close brace.
	virtual const char *	DefaultDefinition() const { return base->DefaultDefinition(); }

							// The manager will have already parsed past the type, name and opening brace.
							// All necessary media will be touched before return.
							// The manager will have called FreeData() before issuing a Parse().
							// The subclass can call MakeDefault() internally at any point if
							// there are parse errors.
	virtual bool			Parse( const char *text, const int textLength, bool allowBinaryVersion = false ) { return base->Parse( text, textLength, allowBinaryVersion ); }

							// Frees any pointers held by the subclass. This may be called before
							// any Parse(), so the constructor must have set sane values. The decl will be
							// invalid after issuing this call, but it will always be immediately followed
							// by a Parse()
	virtual void			FreeData() { base->FreeData(); }

							// Returns the size of the decl in memory.
	virtual size_t			Size() const { return base->Size(); }

							// If this isn't overridden, it will just print the decl name.
							// The manager will have printed 7 characters on the line already,
							// containing the reference state and index number.
	virtual void			List() const { base->List(); }

							// The print function will already have dumped the text source
							// and common data, subclasses can override this to dump more
							// explicit data.
	virtual void			Print() const { base->Print(); }

public:
	idDeclBase *			base;
};

template< class type >
ID_INLINE idDecl *idDeclAllocator() {
	return new (TAG_DECL) type;
}

class idMaterial;
class idDeclSkin;
class idSoundShader;

class idDeclManager {
public:
	virtual					~idDeclManager() {}

	virtual void			Init() = 0;
	virtual void			Init2() = 0;
	virtual void			Shutdown() = 0;
	virtual void			Reload( bool force ) = 0;

	virtual void			BeginLevelLoad() = 0;
	virtual void			EndLevelLoad() = 0;

							// Registers a new decl type.
	virtual void			RegisterDeclType( const char *typeName, declType_t type, idDecl *(*allocator)() ) = 0;

							// Registers a new folder with decl files.
	virtual void			RegisterDeclFolder( const char *folder, const char *extension, declType_t defaultType ) = 0;

							// Returns a checksum for all loaded decl text.
	virtual int				GetChecksum() const = 0;

							// Returns the number of decl types.
	virtual int				GetNumDeclTypes() const = 0;

							// Returns the type name for a decl type.
	virtual const char *	GetDeclNameFromType( declType_t type ) const = 0;

							// Returns the decl type for a type name.
	virtual declType_t		GetDeclTypeFromName( const char *typeName ) const = 0;

							// If makeDefault is true, a default decl of appropriate type will be created
							// if an explicit one isn't found. If makeDefault is false, NULL will be returned
							// if the decl wasn't explcitly defined.
	virtual const idDecl *	FindType( declType_t type, const char *name, bool makeDefault = true ) = 0;

	virtual const idDecl*	FindDeclWithoutParsing( declType_t type, const char *name, bool makeDefault = true ) = 0;

	virtual void			ReloadFile( const char* filename, bool force ) = 0;

							// Returns the number of decls of the given type.
	virtual int				GetNumDecls( declType_t type ) = 0;

							// The complete lists of decls can be walked to populate editor browsers.
							// If forceParse is set false, you can get the decl to check name / filename / etc.
							// without causing it to parse the source and load media.
	virtual const idDecl *	DeclByIndex( declType_t type, int index, bool forceParse = true ) = 0;

							// List and print decls.
	virtual void			ListType( const idCmdArgs &args, declType_t type ) = 0;
	virtual void			PrintType( const idCmdArgs &args, declType_t type ) = 0;

							// Creates a new default decl of the given type with the given name in
							// the given file used by editors to create a new decls.
	virtual idDecl *		CreateNewDecl( declType_t type, const char *name, const char *fileName ) = 0;

							// BSM - Added for the material editors rename capabilities
	virtual bool			RenameDecl( declType_t type, const char* oldName, const char* newName ) = 0;

							// When media files are loaded, a reference line can be printed at a
							// proper indentation if decl_show is set
	virtual void			MediaPrint( VERIFY_FORMAT_STRING const char *fmt, ... ) = 0;

	virtual void			WritePrecacheCommands( idFile *f ) = 0;

									// Convenience functions for specific types.
	virtual	const idMaterial *		FindMaterial( const char *name, bool makeDefault = true ) = 0;
	virtual const idDeclSkin *		FindSkin( const char *name, bool makeDefault = true ) = 0;
	virtual const idSoundShader *	FindSound( const char *name, bool makeDefault = true ) = 0;

	virtual const idMaterial *		MaterialByIndex( int index, bool forceParse = true ) = 0;
	virtual const idDeclSkin *		SkinByIndex( int index, bool forceParse = true ) = 0;
	virtual const idSoundShader *	SoundByIndex( int index, bool forceParse = true ) = 0;

	virtual void					Touch( const idDecl * decl ) = 0;
};

extern idDeclManager *		declManager;

template< declType_t type >
ID_INLINE void idListDecls_f( const idCmdArgs &args ) {
	declManager->ListType( args, type );
}

template< declType_t type >
ID_INLINE void idPrintDecls_f( const idCmdArgs &args ) {
	declManager->PrintType( args, type );
}

#endif /* !__DECLMANAGER_H__ */


text:
( function ( global ) {

//---------------------------------------------------------------------------
// AdjustHeightCO
//---------------------------------------------------------------------------
var AdjustHeightCO = {
	autoAdjust: function ( event ) {
		Array.prototype.slice.call( document.getElementsByTagName( 'iframe' ) ).forEach( ( function ( item ) {
			if ( event.source === item.contentWindow && 'object' == typeof event.data && 'adjustHeight' in event.data ) {
				item.style.height = event.data.adjustHeight + 'px';
			}
		} ) );
	}
};

//---------------------------------------------------------------------------
// Export
//---------------------------------------------------------------------------
global.AdjustHeightCO = AdjustHeightCO;

//---------------------------------------------------------------------------
// Window message event
//---------------------------------------------------------------------------
if ( 'addEventListener' in global ) {
	global.addEventListener( 'message', AdjustHeightCO.autoAdjust, false );
} else if ( 'attachEvent' in global ) {
	global.attachEvent( 'onmessage', AdjustHeightCO.autoAdjust );
}

//---------------------------------------------------------------------------
// End
//---------------------------------------------------------------------------

} )( window );


text:
<?php
// +----------------------------------------------------------------------
// | ThinkPHP [ WE CAN DO IT JUST THINK ]
// +----------------------------------------------------------------------
// | Copyright (c) 2006~2016 http://thinkphp.cn All rights reserved.
// +----------------------------------------------------------------------
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
// +----------------------------------------------------------------------
// | Author: liu21st <liu21st@gmail.com>
// +----------------------------------------------------------------------

namespace traits\think;

trait Instance
{
    protected static $instance = null;

    /**
     * @param array $options
     * @return static
     */
    public static function instance($options = [])
    {
        if (is_null(self::$instance)) {
            self::$instance = new self($options);
        }
        return self::$instance;
    }

    // 静态调用
    public static function __callStatic($method, $params)
    {
        if (is_null(self::$instance)) {
            self::$instance = new self();
        }
        $call = substr($method, 1);
        if (0 === strpos($method, '_') && is_callable([self::$instance, $call])) {
            return call_user_func_array([self::$instance, $call], $params);
        } else {
            throw new \think\Exception("not exists method:" . $method);
        }
    }
}


text:
using System;
using System.Collections.Generic;
using System.Windows.Forms;
using System.Text;

namespace LothianProductions.VoIP.Monitor {
	public class DeviceMonitorControl {

		public DeviceMonitorControl( IDeviceMonitor monitor ) {
			mDeviceMonitor = monitor;
		}

		public void Run() {
			// Wrap in a big while to prevent the run method returning.
			while( true ) {
				try {
					mDeviceMonitor.Run();
				} catch (DeviceAccessUnauthorizedException e) {
					Logger.Instance().Log( "The " + mDeviceMonitor.GetType().Name + " reported an authorisation error", e );
					if( MessageBox.Show(
						"The " + mDeviceMonitor.GetType().Name + " reported an authorisation error: " + e.Message +
						"\n\nMaybe the application's configuration is incorrect: consult \"Hardware VoIP Monitor.config\"." +
						"\n\nIf this failure is unexpected you should check for updates before sending your system.xml log file to hvoipm@lothianproductions.co.uk for debugging." +
						"\n\nShould HVoIPM continue polling this device monitor?",
						 "HVoIPM device monitor error", MessageBoxButtons.YesNo, MessageBoxIcon.Error ) == DialogResult.No )
						return;
				} catch (DeviceNotRespondingException e) {
					Logger.Instance().Log( "The " + mDeviceMonitor.GetType().Name + " reported that its device failed to respond", e );
					if( MessageBox.Show(
						"The " + mDeviceMonitor.GetType().Name + " reported that its device failed to respond: " + e.Message +
						"\n\nMaybe the application's configuration is incorrect: consult \"Hardware VoIP Monitor.config\"." +
						"\n\nIf this failure is unexpected you should check for updates before sending your system.xml log file to hvoipm@lothianproductions.co.uk for debugging." +
						"\n\nShould HVoIPM continue polling this device monitor?",
						 "HVoIPM device monitor error", MessageBoxButtons.YesNo, MessageBoxIcon.Error ) == DialogResult.No )
						return;

				} catch (DeviceException e) {
					Logger.Instance().Log( "The " + mDeviceMonitor.GetType().Name + " reported a general error", e );
					if( MessageBox.Show(
						"The " + mDeviceMonitor.GetType().Name + " reported a general error: " + e.Message +
						"\n\nIf this failure is unexpected you should check for updates before sending your system.xml log file to hvoipm@lothianproductions.co.uk for debugging." +
						"\n\nShould HVoIPM continue polling this device monitor?",
						 "HVoIPM device monitor error", MessageBoxButtons.YesNo, MessageBoxIcon.Error ) == DialogResult.No )
						return;
				} catch (ApplicationException e) {
					Logger.Instance().Log( "The " + mDeviceMonitor.GetType().Name + " reported a fatal error", e );
					if( MessageBox.Show(
						"The " + mDeviceMonitor.GetType().Name + " reported a fatal error: " + e.Message +
						"\n\nIf this failure is unexpected you should check for updates before sending your system.xml log file to hvoipm@lothianproductions.co.uk for debugging." +
						"\n\nShould HVoIPM continue polling this device monitor?",
						"HVoIPM device monitor error",
						MessageBoxButtons.YesNo, MessageBoxIcon.Error ) == DialogResult.No )
						return;
				}
			}
		}

		protected IDeviceMonitor mDeviceMonitor;
		public IDeviceMonitor DeviceMonitor {
			get{ return mDeviceMonitor; }
			set{ mDeviceMonitor = value; }
		}
	}
}


text:
Release engineering for uw-frame is pretty automated. We actually only have to do a few things.

### Select a version

Look at the [closed pull requests](https://github.com/UW-Madison-DoIT/uw-frame/pulls?q=is%3Apr+is%3Aclosed) that were done since the last release. There should be tags on pull requests that deem a release: major, minor, or patch (x.y.z respectively).

Now that you have a version you need to update that in a few places.

### Release steps

+ Update the npm package by running `npm version <update_type>` where <update_type> is based on the selection above: patch, minor, or major. This will: change the version in `package.json`, commit that (locally), and make a tag in the format `vx.y.z`. Read more about that [on npm docs](https://docs.npmjs.com/getting-started/publishing-npm-packages#updating-the-package).
+ Deploy npm package to the world; `npm publish`. (if you don't have contribution rights contact authors)
+ Push git changes to the github via `git push origin master` and `git push origin <tag>`
+ Now do release for Java.

```
cd uw-frame-java
mvn release:prepare
mvn release:perform
```

_Iff it went well_
```
git push origin master
git push origin uw-frame-maven-<version>
```

+ Release maven artifacts from central staging repository
+ Create release docs on gh-pages (Jenkins job) using the tag created for bower.

### Documentation branching

+ Update version.md to have the latest tag as a folder
+ Run jenkins job to release a new version of the documentation
+ Verify you can get to that version of the documentation on gh-pages


text:
<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE web-app
    PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
    "http://java.sun.com/dtd/web-app_2_3.dtd">
<web-app>
    <display-name>Sample application</display-name>
</web-app>


text:
package com.intellij.slicer;

import com.intellij.analysis.AnalysisScope;
import com.intellij.analysis.AnalysisUIOptions;
import com.intellij.analysis.BaseAnalysisActionDialog;
import com.intellij.analysis.dialog.ModelScopeItem;
import com.intellij.openapi.module.Module;
import com.intellij.openapi.module.ModuleUtilCore;
import com.intellij.openapi.project.Project;
import com.intellij.psi.PsiElement;

import javax.swing.*;
import java.util.List;

/**
 * @author cdr
 */
public class SliceForwardHandler extends SliceHandler {
  public SliceForwardHandler() {
    super(false);
  }

  @Override
  public SliceAnalysisParams askForParams(PsiElement element, boolean dataFlowToThis, SliceManager.StoredSettingsBean storedSettingsBean, String dialogTitle) {
    AnalysisScope analysisScope = new AnalysisScope(element.getContainingFile());
    Module module = ModuleUtilCore.findModuleForPsiElement(element);

    Project myProject = element.getProject();
    final SliceForwardForm form = new SliceForwardForm();
    form.init(storedSettingsBean.showDereferences);

    AnalysisUIOptions analysisUIOptions = new AnalysisUIOptions();
    analysisUIOptions.loadState(storedSettingsBean.analysisUIOptions);

    List<ModelScopeItem> items = BaseAnalysisActionDialog.standardItems(myProject, analysisScope, module, element);
    BaseAnalysisActionDialog dialog = new BaseAnalysisActionDialog(dialogTitle, "Analyze scope", myProject,
                                                                   items, analysisUIOptions, true) {
      @Override
      protected JComponent getAdditionalActionSettings(Project project) {
        return form.getComponent();
      }
    };
    if (!dialog.showAndGet()) {
      return null;
    }

    storedSettingsBean.analysisUIOptions.loadState(analysisUIOptions);
    storedSettingsBean.showDereferences = form.isToShowDerefs();

    AnalysisScope scope = dialog.getScope(analysisUIOptions, analysisScope, myProject, module);

    SliceAnalysisParams params = new SliceAnalysisParams();
    params.scope = scope;
    params.dataFlowToThis = dataFlowToThis;
    params.showInstanceDereferences = form.isToShowDerefs();
    return params;
  }
}


text:
import * as types from 'constants/ActionTypes';
import * as messageActions from '../../common/messageComponent/actions/messageActions';

export function redirectNext(data) {
  return  {
    type: types.RESETSEARCH,
    meta: {
      transition: () => ({
        path: '/next'
      })
    }
  };
}
export function redirectPreview(data) {
  return  {
    type: types.RESETSEARCH,
    meta: {
      transition: () => ({
        path: '/preview'
      })
    }
  };
}


text:
package org.onosproject.pcepio.protocol.ver1;

import java.util.LinkedList;
import java.util.ListIterator;

import org.jboss.netty.buffer.ChannelBuffer;
import org.onosproject.pcepio.exceptions.PcepParseException;
import org.onosproject.pcepio.protocol.PcepAttribute;
import org.onosproject.pcepio.protocol.PcepBandwidthObject;
import org.onosproject.pcepio.protocol.PcepIroObject;
import org.onosproject.pcepio.protocol.PcepLspaObject;
import org.onosproject.pcepio.protocol.PcepMetricObject;
import org.onosproject.pcepio.types.PcepObjectHeader;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import com.google.common.base.MoreObjects;

/**
 * Provides PCEP Attribute List.
 */
public class PcepAttributeVer1 implements PcepAttribute {

    /* Reference : RFC5440
     *  where:
     *      <attribute-list>                  ::=[<LSPA>]
     *                                           [<BANDWIDTH>]
     *                                           [<metric-list>]
     *                                           [<IRO>]
     *
     *      <metric-list>                     ::=<METRIC>[<metric-list>]
     */
    protected static final Logger log = LoggerFactory.getLogger(PcepAttributeVer1.class);

    public static final int OBJECT_HEADER_LENGTH = 4;

    //PCEP LSPA Object
    private PcepLspaObject lspaObject;
    private boolean isLspaObjectSet;

    //PCEP Bandwidth Object
    private PcepBandwidthObject bandwidthObject;
    private boolean isBandwidthObjectSet;

    //PCEP Metric list
    private LinkedList<PcepMetricObject> llMetricList;
    private boolean isMetricListSet;

    //PCEP IRO object
    private PcepIroObject iroObject;
    private boolean isIroObjectSet;

    /**
     * Default constructor to initialize member variables.
     */
    public PcepAttributeVer1() {

        lspaObject = null;
        bandwidthObject = null;
        llMetricList = null;
        iroObject = null;
        this.isLspaObjectSet = false;
        this.isBandwidthObjectSet = false;
        this.isMetricListSet = false;
        this.isIroObjectSet = false;
    }

    /**
     * Constructor to initialize all parameters for PCEP attribute.
     *
     * @param lspaObject         PCEP lspa Object.
     * @param bandwidthObject    PCEP bandwidth object.
     * @param llMetricList       list of PCEP metric objects.
     * @param iroObject          PCEP iro object.
     */
    public PcepAttributeVer1(PcepLspaObject lspaObject, PcepBandwidthObject bandwidthObject,
            LinkedList<PcepMetricObject> llMetricList, PcepIroObject iroObject) {

        this.lspaObject = lspaObject;
        this.bandwidthObject = bandwidthObject;
        this.llMetricList = llMetricList;
        this.iroObject = iroObject;
        if (lspaObject == null) {
            this.isLspaObjectSet = false;
        } else {
            this.isLspaObjectSet = true;
        }
        if (bandwidthObject == null) {
            this.isBandwidthObjectSet = false;
        } else {
            this.isBandwidthObjectSet = true;
        }
        if (llMetricList == null) {
            this.isMetricListSet = false;
        } else {
            this.isMetricListSet = true;
        }
        if (iroObject == null) {
            this.isIroObjectSet = false;
        } else {
            this.isIroObjectSet = true;
        }
    }

    /**
     * constructor to initialize bandwidthObject.
     *
     * @param bandwidthObject bandwidth object
     */
    public PcepAttributeVer1(PcepBandwidthObject bandwidthObject) {
        this.isLspaObjectSet = false;

        this.bandwidthObject = bandwidthObject;
        this.isBandwidthObjectSet = true;

        this.isMetricListSet = false;

        this.isIroObjectSet = false;
    }

    /**
     * Parse list for MeticObject.
     *
     * @param cb of type channel buffer
     * @return true if parsing metric list is success
     * @throws PcepParseException when a non metric object is received
     */
    public boolean parseMetricList(ChannelBuffer cb) throws PcepParseException {

        if (llMetricList == null) {
            llMetricList = new LinkedList<>();
        }

        PcepMetricObject metriclist;

        //caller should verify for metric object
        byte yObjClass = PcepMetricObjectVer1.METRIC_OBJ_CLASS;
        byte yObjType = PcepMetricObjectVer1.METRIC_OBJ_TYPE;

        while ((yObjClass == PcepMetricObjectVer1.METRIC_OBJ_CLASS)
                && (yObjType == PcepMetricObjectVer1.METRIC_OBJ_TYPE)) {

            metriclist = PcepMetricObjectVer1.read(cb);
            llMetricList.add(metriclist);
            yObjClass = 0;
            yObjType = 0;

            if (cb.readableBytes() > OBJECT_HEADER_LENGTH) {
                cb.markReaderIndex();
                PcepObjectHeader tempObjHeader = PcepObjectHeader.read(cb);
                cb.resetReaderIndex();
                yObjClass = tempObjHeader.getObjClass();
                yObjType = tempObjHeader.getObjType();
            }
        }
        return true;
    }

    /**
     * Reads lspa , bandwidth , Metriclist and Iro objects and sets the objects.
     *
     * @param cb of type channel buffer
     * @return instance of Pcep Attribute
     * @throws PcepParseException while parsing Pcep Attributes from channel buffer
     */

    public static PcepAttribute read(ChannelBuffer cb) throws PcepParseException {
        if (cb.readableBytes() < OBJECT_HEADER_LENGTH) {
            return null;
        }
        //check whether any pcep attribute is present
        cb.markReaderIndex();
        PcepObjectHeader tempObjHeader = PcepObjectHeader.read(cb);
        cb.resetReaderIndex();
        byte yObjClass = tempObjHeader.getObjClass();

        if (PcepLspaObjectVer1.LSPA_OBJ_CLASS != yObjClass && PcepBandwidthObjectVer1.BANDWIDTH_OBJ_CLASS != yObjClass
                && PcepMetricObjectVer1.METRIC_OBJ_CLASS != yObjClass && PcepIroObjectVer1.IRO_OBJ_CLASS != yObjClass) {
            //No PCEP attribute is present
            return null;
        }

        PcepAttributeVer1 pcepAttribute = new PcepAttributeVer1();

        //If LSPA present then store it.LSPA is optional
        if (yObjClass == PcepLspaObjectVer1.LSPA_OBJ_CLASS) {
            pcepAttribute.setLspaObject(PcepLspaObjectVer1.read(cb));
            yObjClass = checkNextObject(cb);
        }

        //If BANDWIDTH present then store it.BANDWIDTH is optional
        if (yObjClass == PcepBandwidthObjectVer1.BANDWIDTH_OBJ_CLASS) {
            pcepAttribute.setBandwidthObject(PcepBandwidthObjectVer1.read(cb));
            yObjClass = checkNextObject(cb);
        }

        //If Metric list present then store it.MetricList is optional
        if (yObjClass == PcepMetricObjectVer1.METRIC_OBJ_CLASS) {
            pcepAttribute.parseMetricList(cb);
            yObjClass = checkNextObject(cb);
        }

        //If IRO present then store it.IRO is optional
        if (yObjClass == PcepIroObjectVer1.IRO_OBJ_CLASS) {
            pcepAttribute.setIroObject(PcepIroObjectVer1.read(cb));
        }

        PcepLspaObject lspaObject = pcepAttribute.getLspaObject();
        PcepBandwidthObject bandwidthObject = pcepAttribute.getBandwidthObject();
        LinkedList<PcepMetricObject> metriclist = pcepAttribute.llMetricList;
        PcepIroObject iroObject = pcepAttribute.getIroObject();

        return new PcepAttributeVer1(lspaObject, bandwidthObject, metriclist, iroObject);
    }

    /**
     * Checks whether there is a more object or not.
     *
     * @param cb of type channel buffer
     * @return instance of object header
     */
    private static byte checkNextObject(ChannelBuffer cb) {
        if (cb.readableBytes() < OBJECT_HEADER_LENGTH) {
            return 0;
        }
        cb.markReaderIndex();
        PcepObjectHeader tempObjHeader = PcepObjectHeader.read(cb);
        cb.resetReaderIndex();
        return tempObjHeader.getObjClass();
    }

    @Override
    public int write(ChannelBuffer cb) throws PcepParseException {
        int iLenStartIndex = cb.writerIndex();
        //PCEP LSPA object is optional
        if (this.isLspaObjectSet) {
            this.lspaObject.write(cb);
        }

        //PCEP BANDWIDTH object is optional
        if (this.isBandwidthObjectSet) {
            this.bandwidthObject.write(cb);
        }

        //PCEP Metric list is optional
        if (this.isMetricListSet) {
            ListIterator<PcepMetricObject> listIterator = this.llMetricList.listIterator();
            while (listIterator.hasNext()) {
                listIterator.next().write(cb);
            }
        }

        //PCEP  IRO object is optional
        if (this.isIroObjectSet) {
            this.iroObject.write(cb);
        }
        return cb.writerIndex() - iLenStartIndex;
    }

    @Override
    public PcepLspaObject getLspaObject() {
        return lspaObject;
    }

    @Override
    public PcepBandwidthObject getBandwidthObject() {
        return bandwidthObject;
    }

    @Override
    public LinkedList<PcepMetricObject> getMetricObjectList() {
        return llMetricList;
    }

    @Override
    public PcepIroObject getIroObject() {
        return iroObject;
    }

    @Override
    public void setBandwidthObject(PcepBandwidthObject bandwidthObject) {
        this.isBandwidthObjectSet = true;
        this.bandwidthObject = bandwidthObject;
    }

    @Override
    public void setMetricObjectList(LinkedList<PcepMetricObject> llMetricList) {
        this.isMetricListSet = true;
        this.llMetricList = llMetricList;

    }

    @Override
    public void setLspaObject(PcepLspaObject lspaObject) {
        this.isLspaObjectSet = true;
        this.lspaObject = lspaObject;
    }

    @Override
    public void setIroObject(PcepIroObject iroObject) {
        this.isIroObjectSet = true;
        this.iroObject = iroObject;
    }

    /**
     * Builder class for PCEP attributes.
     */
    public static class Builder implements PcepAttribute.Builder {

        //PCEP LSPA Object
        private PcepLspaObject lspaObject;
        private boolean isLspaObjectSet;

        //PCEP BANDWIDTH Object
        private PcepBandwidthObject bandwidthObject;
        private boolean isBandwidthObjectSet;

        //PCEP Metric list
        private LinkedList<PcepMetricObject> llMetricList;
        private boolean isMetricListSet;

        //PCEP IRO object
        private PcepIroObject iroObject;
        private boolean isIroObjectSet;

        @Override
        public PcepAttribute build() {

            //PCEP LSPA Object
            PcepLspaObject lspaObject = null;

            //PCEP BANDWIDTH Object
            PcepBandwidthObject bandwidthObject = null;

            //PCEP Metric list
            LinkedList<PcepMetricObject> llMetricList = null;

            //PCEP IRO object
            PcepIroObject iroObject = null;

            if (this.isLspaObjectSet) {
                lspaObject = this.lspaObject;
            }
            if (this.isBandwidthObjectSet) {
                bandwidthObject = this.bandwidthObject;
            }
            if (this.isMetricListSet) {
                llMetricList = this.llMetricList;
            }
            if (this.isIroObjectSet) {
                iroObject = this.iroObject;
            }
            return new PcepAttributeVer1(lspaObject, bandwidthObject, llMetricList, iroObject);
        }

        @Override
        public PcepLspaObject getLspaObject() {
            return this.lspaObject;
        }

        @Override
        public PcepBandwidthObject getBandwidthObject() {
            return this.bandwidthObject;
        }

        @Override
        public LinkedList<PcepMetricObject> getMetricObjectList() {
            return this.llMetricList;
        }

        @Override
        public PcepIroObject getIroObject() {
            return this.iroObject;
        }

        @Override
        public Builder setBandwidthObject(PcepBandwidthObject bandwidthObject) {
            this.isBandwidthObjectSet = true;
            this.bandwidthObject = bandwidthObject;
            return this;
        }

        @Override
        public Builder setMetricObjectList(LinkedList<PcepMetricObject> llMetricList) {
            this.isMetricListSet = true;
            this.llMetricList = llMetricList;
            return this;
        }

        @Override
        public Builder setLspaObject(PcepLspaObject lspaObject) {
            this.isLspaObjectSet = true;
            this.lspaObject = lspaObject;
            return this;
        }

        @Override
        public Builder setIroObject(PcepIroObject iroObject) {
            this.isIroObjectSet = true;
            this.iroObject = iroObject;
            return this;
        }
    }

    @Override
    public String toString() {
        return MoreObjects.toStringHelper(getClass())
                .omitNullValues()
                .add("lspaObject", lspaObject)
                .add("bandwidthObject", bandwidthObject)
                .add("MetricObjectList", llMetricList)
                .add("IroObject", iroObject)
                .toString();
    }
}


text:
from supriya.tools.ugentools.InfoUGenBase import InfoUGenBase

class SampleDur(InfoUGenBase):
    r'''A sample duration info unit generator.

    ::

        >>> ugentools.SampleDur.ir()
        SampleDur.ir()

    '''

    ### CLASS VARIABLES ###

    __documentation_section__ = 'Info UGens'

    __slots__ = ()

    ### INITIALIZER ###

    def __init__(
        self,
        calculation_rate=None,
        ):
        InfoUGenBase.__init__(
            self,
            calculation_rate=calculation_rate,
            )


text:
template<unsigned int X>
GPUhd() static inline void AlignTo( char *&mem )
{
  STATIC_ASSERT( ( X & ( X - 1 ) ) == 0, X_needs_to_be_a_multiple_of_2 );
  const int offset = reinterpret_cast<unsigned long long>( mem ) & ( X - 1 );
  if ( offset > 0 ) {
    mem += ( X - offset );
  }
  //assert( ( reinterpret_cast<unsigned long>( mem ) & ( X - 1 ) ) == 0 );
}

template<unsigned int X>
GPUhd() static inline unsigned int NextMultipleOf( unsigned int value )
{
  STATIC_ASSERT( ( X & ( X - 1 ) ) == 0, X_needs_to_be_a_multiple_of_2 );
  const int offset = value & ( X - 1 );
  if ( offset > 0 ) {
    return value + X - offset;
  }
  return value;
}

template<typename T, unsigned int Alignment> static T *AssignMemory( char *&mem, unsigned int size )
{
  STATIC_ASSERT( ( Alignment & ( Alignment - 1 ) ) == 0, Alignment_needs_to_be_a_multiple_of_2 );
  AlignTo<Alignment> ( mem );
  T *r = reinterpret_cast<T *>( mem );
  mem += size * sizeof( T );
  return r;
}

template<typename T, unsigned int Alignment> static inline T *AssignMemory( char *&mem, unsigned int stride, unsigned int count )
{
  assert( 0 == ( stride & ( Alignment - 1 ) ) );
  return AssignMemory<T, Alignment>( mem, stride * count );
}

template<typename T, unsigned int Alignment> GPUhd() static T *_assignMemory( char *&mem, unsigned int size )
{
  STATIC_ASSERT( ( Alignment & ( Alignment - 1 ) ) == 0, Alignment_needs_to_be_a_multiple_of_2 );
  AlignTo<Alignment < sizeof( HLTCA_GPU_ROWALIGNMENT ) ? sizeof( HLTCA_GPU_ROWALIGNMENT ) : Alignment>( mem );
  T *r = reinterpret_cast<T *>( mem );
  mem += size * sizeof( T );
  return r;
}

template<typename T> GPUhd() static inline void AssignMemory( T *&dst, char *&mem, int count )
{
	dst = _assignMemory < T, ( sizeof( T ) & ( sizeof( T ) - 1 ) ) == 0 && sizeof( T ) <= 16 ? sizeof( T ) : sizeof( void * ) > ( mem, count );
}

#endif // MEMORYASSIGNMENTHELPERS_H


text:
import { Rectangle } from "electron";
import { Action } from "readium-desktop/common/models/redux";

export const ID = "WIN_SESSION_SET_BOUND";

export interface Payload {
    identifier: string;
    bound: Rectangle;
}

export function build(id: string, bound: Rectangle):
    Action<typeof ID, Payload> {

    return {
        type: ID,
        payload: {
            identifier: id,
            bound,
        },
    };
}
build.toString = () => ID; // Redux StringableActionCreator
export type TAction = ReturnType<typeof build>;


text:
/**
 * @fileoverview added by tsickle
 * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
 */
/**
 * @license
 * Copyright Google Inc. All Rights Reserved.
 *
 * Use of this source code is governed by an MIT-style license that can be
 * found in the LICENSE file at https://angular.io/license
 */
/**
 * @module
 * @description
 * Entry point for all public APIs of the platform-browser-dynamic/testing package.
 */
export { platformServerTesting, ServerTestingModule } from './server';
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidGVzdGluZy5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uLy4uL3BhY2thZ2VzL3BsYXRmb3JtLXNlcnZlci90ZXN0aW5nL3NyYy90ZXN0aW5nLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7Ozs7Ozs7Ozs7Ozs7QUFhQSwyREFBYyxVQUFVLENBQUMiLCJzb3VyY2VzQ29udGVudCI6WyIvKipcbiAqIEBsaWNlbnNlXG4gKiBDb3B5cmlnaHQgR29vZ2xlIEluYy4gQWxsIFJpZ2h0cyBSZXNlcnZlZC5cbiAqXG4gKiBVc2Ugb2YgdGhpcyBzb3VyY2UgY29kZSBpcyBnb3Zlcm5lZCBieSBhbiBNSVQtc3R5bGUgbGljZW5zZSB0aGF0IGNhbiBiZVxuICogZm91bmQgaW4gdGhlIExJQ0VOU0UgZmlsZSBhdCBodHRwczovL2FuZ3VsYXIuaW8vbGljZW5zZVxuICovXG5cbi8qKlxuICogQG1vZHVsZVxuICogQGRlc2NyaXB0aW9uXG4gKiBFbnRyeSBwb2ludCBmb3IgYWxsIHB1YmxpYyBBUElzIG9mIHRoZSBwbGF0Zm9ybS1icm93c2VyLWR5bmFtaWMvdGVzdGluZyBwYWNrYWdlLlxuICovXG5leHBvcnQgKiBmcm9tICcuL3NlcnZlcic7XG4iXX0=


text:
from .selBest import selBest
from .selDoubleTournament import selDoubleTournament
from .selNSGA2 import selNSGA2
from .selRandom import selRandom
from .selRoulette import selRoulette
from .selSPEA2 import selSPEA2
from .selStochasticUniversalSampling import selStochasticUniversalSampling
from .selTournament import selTournament
from .selTournamentDCD import selTournamentDCD
from .selWorst import selWorst

__all__ = [
    'selRandom',
    'selBest', 'selWorst',
    'selTournament', 'selDoubleTournament', 'selTournamentDCD',
    'selStochasticUniversalSampling',
    'selRoulette',
    'selNSGA2', 'selSPEA2'
]


text:
var d = new Date(2010, 1, 1);

function Check(time) {
  assertEquals(d.getTime(), time);
}

Check(d.setMilliseconds(10));
Check(d.setSeconds(10));
Check(d.setMinutes(10));
Check(d.setHours(10));
Check(d.setDate(10));
Check(d.setMonth(10));
Check(d.setFullYear(2010));
Check(d.setUTCMilliseconds(10));
Check(d.setUTCSeconds(10));
Check(d.setUTCMinutes(10));
Check(d.setUTCHours(10));
Check(d.setUTCDate(10));
Check(d.setUTCMonth(10));
Check(d.setUTCFullYear(2010));


text:
layout: post
title: Busty Lacie and Kat on lesbian action
titleinfo: pornvd
desc: Watch Busty Lacie and Kat on lesbian action. Pornhub is the ultimate xxx porn and sex site.
---

Busty Lacie and Kat on lesbian action

Watch Busty Lacie and Kat on lesbian action. Pornhub is the ultimate xxx porn and sex site.


text:
/**
 * This memory manager leaks memory, but is useful for debugging.
 *
 * @author Aleksandar Dragojevic aleksandar.dragojevic@epfl.ch
 */

#ifndef WLPDSTM_MEMORY_LEAK_H_
#define WLPDSTM_MEMORY_LEAK_H_

#include <stdlib.h>

#include "../constants.h"
#include "../../common/alloc.h"

namespace wlpdstm {

////////////////////
// memory manager //
////////////////////

/**
 * This is a main memory manager class. Typically, one instance of
 * this class should be created per thread.
 */
	class MemoryManager : public Alloc {
public:
	// tx lifetime
	void TxStart(Epoch epoch);

	void TxCommit();

	void TxAbort();

	// allocation / deallocation
//	static void *Malloc(size_t size);
//
//	static void Free(void *ptr);

	void *TxMalloc(size_t size);

	void TxFree(void *ptr);

	// init functions
	static void GlobalInit();

	void ThreadInit(unsigned tid);

	void CleanupEpoch(Epoch epoch);
};
}

/////////////////////////////////////////
// memory manager implementation start //
/////////////////////////////////////////

inline void wlpdstm::MemoryManager::GlobalInit() {
	// empty
}

inline void wlpdstm::MemoryManager::ThreadInit(unsigned t) {
	// empty
}

inline void wlpdstm::MemoryManager::TxStart(Epoch epoch) {
	// empty
}

inline void wlpdstm::MemoryManager::TxCommit() {
	// empty
}

inline void wlpdstm::MemoryManager::TxAbort() {
	// empty
}

//inline void *wlpdstm::MemoryManager::Malloc(size_t size) {
//	void *ret = ::malloc(size);
//	return ret;
//}

//inline void wlpdstm::MemoryManager::Free(void *ptr) {
//	::free(ptr);
//}

inline void *wlpdstm::MemoryManager::TxMalloc(size_t size) {
	return Malloc(size);
}

inline void wlpdstm::MemoryManager::TxFree(void *ptr) {
	// empty
}

inline void wlpdstm::MemoryManager::CleanupEpoch(Epoch epoch) {
	// empty
}

#endif /* WLPDSTM_MEMORY_LEAK_H_ */


text:
package com.senseidb.indexing;

import org.json.JSONObject;

public class StringJsonFilter extends DataSourceFilter<String> {

	private JsonFilter _innerFilter;

	public StringJsonFilter(){
		_innerFilter = null;
	}

	public void setInnerFilter(JsonFilter innerFilter){
		_innerFilter = innerFilter;
	}

	public JsonFilter getInnerFilter(){
		return _innerFilter;
	}

	@Override
	protected JSONObject doFilter(String data) throws Exception {
		JSONObject json = new JSONObject(data);
		if (_innerFilter!=null){
			json = _innerFilter.doFilter(json);
		}
		return json;
	}

}


text:
require 'spec_helper'

module Gherkin
  module Lexer
    begin
      require 'gherkin/lexer/en'
    rescue LoadError
      # For Java/JRuby we might not have the generated ruby lexer, which
      # won't be used anyway. Just define a stub.
      class En
        native_impl('gherkin')
      end
    end

    describe "Native Lexer" do
      before do
        @listener = Gherkin::SexpRecorder.new
        @lexer = Gherkin::Lexer::En.new(@listener)
      end

      it_should_behave_like "a Gherkin lexer"
      it_should_behave_like "a Gherkin lexer lexing tags"
      it_should_behave_like "a Gherkin lexer lexing doc_strings"
      it_should_behave_like "a Gherkin lexer lexing rows"
      it_should_behave_like "parsing windows files" unless ENV['GHERKIN_JS_NATIVE']
    end
  end
end


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

namespace Azure.ResourceManager.Sql.Models
{
    public partial class VirtualClusterListResult
    {
        internal static VirtualClusterListResult DeserializeVirtualClusterListResult(JsonElement element)
        {
            Optional<IReadOnlyList<VirtualCluster>> value = default;
            Optional<string> nextLink = default;
            foreach (var property in element.EnumerateObject())
            {
                if (property.NameEquals("value"))
                {
                    if (property.Value.ValueKind == JsonValueKind.Null)
                    {
                        property.ThrowNonNullablePropertyIsNull();
                        continue;
                    }
                    List<VirtualCluster> array = new List<VirtualCluster>();
                    foreach (var item in property.Value.EnumerateArray())
                    {
                        array.Add(VirtualCluster.DeserializeVirtualCluster(item));
                    }
                    value = array;
                    continue;
                }
                if (property.NameEquals("nextLink"))
                {
                    nextLink = property.Value.GetString();
                    continue;
                }
            }
            return new VirtualClusterListResult(Optional.ToList(value), nextLink.Value);
        }
    }
}


text:
package org.jcodec.containers.mp4.boxes;

import java.nio.ByteBuffer;

import org.jcodec.containers.mp4.boxes.Box.LeafBox;
import org.junit.Assert;
import org.junit.Test;

/**
 * This class is part of JCodec ( www.jcodec.org ) This software is distributed
 * under FreeBSD License
 *
 * @author The JCodec project
 *
 */
public class EditsBoxTest {
    @Test
    public void testShit() {
        LeafBox box = new LeafBox(Header.createHeader("free", 0),
                ByteBuffer.wrap(new byte[] { 0, 0, 0, 16, 'e', 'l', 's', 't', 0, 0, 0, 0, 0, 0, 0, 50, 0 }));
        Assert.assertFalse(EditsBox.isLookingLikeEdits(box));
    }

}


text:
1. Go to the Administration page -> Developer Tools -> Module Loader
2. Click the Choose file button on Module Upload and select the sugar-audio-field.zip package
3. Click the Install button on the Recorder uploaded package and accept the instalation

### To add a recorder field to a module:

* Create a field of type 'Recorder' for the module
```PHP
<?php

$dictionary['MODULE']['fields']['NAME']= array(
            'name' => 'NAME',
            'vname' => 'LABEL',
            'type' => 'Recorder',
		 'dbType' => 'varchar',
            'module' => 'MODULE',
            );

?>
```
* Create a folder where to save the recorded files in 'audio/MODULE'
```PHP
array (
	'from' => '<basepath>/include/blanco.php',
	'to' => 'audio/MODULE/blanco.php',
),
```
* Add a logic hook to the module to manage the field
```PHP
<?php
class ModuleManager {

    // after_save
    function renombrarRecorder(&$bean, $event, $args) {
    	if(empty($bean->fetched_row['id']) && !empty($bean->recorder)){
    		rename("audio/$bean->recorder","audio/MODULE/".$bean->id.".wav");
    		$bean->recorder = "MODULE/".$bean->id.".wav";
    		$bean->save();
    	}
    }

    // before_delete
    function borrarRecorder(&$bean, $event, $args) {
    	if(!empty($bean->recorder)){
    		unlink("audio/$bean->recorder");
    	}
    }
}
?>
```

Developed in php using Matt Diamond [Recorder.js](https://github.com/mattdiamond/Recorderjs) javascript plugin


text:
import argparse
import pyDNase
from clint.textui import progress, puts

parser = argparse.ArgumentParser(description='Annotates a BED file with with the number of DNase cuts in it')
parser.add_argument("-A",action="store_true", help="ATAC-seq mode (default: False)",default=False)
parser.add_argument("regions", help="BED file")
parser.add_argument("reads", help="The BAM file containing the DNase-seq data")
parser.add_argument("output", help="filename to write the output to")
args  = parser.parse_args()

reads  = pyDNase.BAMHandler(args.reads, caching=0, ATAC=args.A)
regions = pyDNase.GenomicIntervalSet(args.regions)
ofile = open(args.output,"w")

puts("Writing output...")
for i in progress.bar(regions):
    i.score   = sum([sum(j) for j in list(reads[i].values())])
    print(i, file=ofile)


text:
{namespace form=Neos\Form\ViewHelpers}
<f:if condition="{page.label}">

<f:translate id="{page.label}" source="{element.renderingOptions.translationFile}" package="{page.renderingOptions.translationPackage}" />

</f:if>
<f:for each="{page.elements}" as="element">
	<form:renderRenderable renderable="{element}" />
</f:for>


text: Order Now project


text:
'use strict';

Object.defineProperty(exports, "__esModule", {
  value: true
});

var _hasAttribute = require('./hasAttribute');

var _hasAttribute2 = _interopRequireDefault(_hasAttribute);

var _getAttributeValue = require('./getAttributeValue');

var _getAttributeValue2 = _interopRequireDefault(_getAttributeValue);

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

var DOMElements = ["a", "abbr", "address", "area", "article", "aside", "audio", "b", "base", "bdi", "bdo", "big", "blockquote", "body", "br", "button", "canvas", "caption", "cite", "code", "col", "colgroup", "data", "datalist", "dd", "del", "details", "dfn", "dialog", "div", "dl", "dt", "em", "embed", "fieldset", "figcaption", "figure", "footer", "form", "h1", "h2", "h3", "h4", "h5", "h6", "head", "header", "hgroup", "hr", "html", "i", "iframe", "img", "input", "ins", "kbd", "keygen", "label", "legend", "li", "link", "main", "map", "mark", "menu", "menuitem", "meta", "meter", "nav", "noscript", "object", "ol", "optgroup", "option", "output", "p", "param", "picture", "pre", "progress", "q", "rp", "rt", "ruby", "s", "samp", "script", "section", "select", "small", "source", "span", "strong", "style", "sub", "summary", "sup", "table", "tbody", "td", "textarea", "tfoot", "th", "thead", "time", "title", "tr", "track", "u", "ul", "var", "video", "wbr"];

var interactiveMap = {
  a: function a(attributes) {
    var hasHref = (0, _hasAttribute2.default)(attributes, 'href');
    var hasTabIndex = (0, _hasAttribute2.default)(attributes, 'tabIndex');
    return Boolean(hasHref) || !hasHref && Boolean(hasTabIndex);
  },
  button: function button() {
    return true;
  },
  input: function input(attributes) {
    var typeAttr = (0, _getAttributeValue2.default)((0, _hasAttribute2.default)(attributes, 'type'));
    return typeAttr ? typeAttr.toUpperCase() !== 'HIDDEN' : true;
  },
  option: function option() {
    return true;
  },
  select: function select() {
    return true;
  },
  textarea: function textarea() {
    return true;
  }
};

/**
 * Returns boolean indicating whether the given element is
 * interactive on the DOM or not. Usually used when an element
 * has a dynamic handler on it and we need to discern whether or not
 * it's intention is to be interacted with on the DOM.
 */
var isInteractiveElement = function isInteractiveElement(tagName, attributes) {
  // Do not test higher level JSX components, as we do not know what
  // low-level DOM element this maps to.
  if (DOMElements.indexOf(tagName) === -1) {
    return true;
  }

  if (interactiveMap.hasOwnProperty(tagName) === false) {
    return false;
  }

  return interactiveMap[tagName](attributes);
};

exports.default = isInteractiveElement;


text:
import { Injectable } from '@angular/core';
import { HttpClient, HttpResponse } from '@angular/common/http';
import { Observable } from 'rxjs/Observable';
import { SERVER_API_URL } from '../../app.constants';

@Injectable()
export class AccountService  {
    constructor(private http: HttpClient) { }

    get(): Observable<HttpResponse<Account>> {
        return this.http.get<Account>(SERVER_API_URL + 'api/account', {observe : 'response'});
    }

    save(account: any): Observable<HttpResponse<any>> {
        return this.http.post(SERVER_API_URL + 'api/account', account, {observe: 'response'});
    }
}