text:
package me.oriley.cratesample.widget;

import android.content.Context;
import android.graphics.Bitmap;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import android.util.AttributeSet;
import android.view.animation.DecelerateInterpolator;
import android.view.animation.OvershootInterpolator;
import android.widget.ImageView;
import me.oriley.crate.ImageAsset;
import me.oriley.cratesample.R;

public class CrateBitmapView extends TaggedCardView<ImageAsset> {

    private static final long ANIM_DURATION_MILLIS = 300;

    @NonNull
    private final ImageView mImageView;

    public CrateBitmapView(@NonNull Context context) {
        this(context, null);
    }

    public CrateBitmapView(@NonNull Context context, @Nullable AttributeSet attrs) {
        this(context, attrs, 0);
    }

    public CrateBitmapView(@NonNull Context context, @Nullable AttributeSet attrs, int defStyleAttr) {
        super(context, attrs, defStyleAttr);
        inflate(R.layout.crate_bitmap_view);
        mImageView = (ImageView) getItemView();
        setSquare(true);
    }

    @Override
    public void animateCard() {
        getAnimator()
                .scaleX(1f)
                .scaleY(1f)
                .setInterpolator(new OvershootInterpolator(1.3f))
                .setDuration(ANIM_DURATION_MILLIS);

        getItemAnimator()
                .alpha(1f)
                .setInterpolator(new DecelerateInterpolator())
                .setDuration(ANIM_DURATION_MILLIS);
    }

    @Override
    public void clearCardAnimation() {
        clearAnimator();
        clearItemAnimator();

        mImageView.setAlpha(0f);
        setScaleX(0.85f);
        setScaleY(0.85f);
    }

    @Override
    public void initialise(@Nullable ImageAsset asset) {
        super.initialise(asset);
        mImageView.setImageBitmap(null);
        clearCardAnimation();
    }

    public void setBitmap(@Nullable Bitmap bitmap) {
        mImageView.setImageBitmap(bitmap);
    }
}


text:
package jj2000.j2k.quantization.dequantizer;

import jj2000.j2k.entropy.decoder.EntropyDecoder;
import jj2000.j2k.image.DataBlk;
import jj2000.j2k.wavelet.synthesis.CBlkWTDataSrcDec;
import jj2000.j2k.wavelet.synthesis.InvWTData;
import jj2000.j2k.wavelet.synthesis.SubbandSyn;

/**
 * This interface defines a source of quantized wavelet coefficients and
 * methods to transfer them in a code-block by code-block basis, fro the
 * decoder side. In each call to 'getCodeBlock()' or 'getInternCodeBlock()' a
 * new code-block is returned.
 *
 *
This class is the source of data for the dequantizer. See the
 * 'Dequantizer' class.
 *
 *
Code-block data is returned in sign-magnitude representation, instead of
 * the normal two's complement one. Only integral types are used. The sign
 * magnitude representation is more adequate for entropy coding. In sign
 * magnitude representation, the most significant bit is used for the sign (0
 * if positive, 1 if negative) and the magnitude of the coefficient is stored
 * in the next M most significant bits. The rest of the bits (least
 * significant bits) can contain a fractional value of the quantized
 * coefficient. The number 'M' of magnitude bits is communicated in the
 * 'magbits' member variable of the 'CBlkWTData'.
 *
 * @see InvWTData
 * @see CBlkWTDataSrcDec
 * @see Dequantizer
 * @see EntropyDecoder
 * */
public interface CBlkQuantDataSrcDec extends InvWTData {

    /**
     * Returns the specified code-block in the current tile for the specified
     * component, as a copy (see below).
     *
     *
The returned code-block may be progressive, which is indicated by
     * the 'progressive' variable of the returned 'DataBlk' object. If a
     * code-block is progressive it means that in a later request to this
     * method for the same code-block it is possible to retrieve data which is
     * a better approximation, since meanwhile more data to decode for the
     * code-block could have been received. If the code-block is not
     * progressive then later calls to this method for the same code-block
     * will return the exact same data values.

     *
     *
The data returned by this method is always a copy of the internal
     * data of this object, if any, and it can be modified "in place" without
     * any problems after being returned. The 'offset' of the returned data is
     * 0, and the 'scanw' is the same as the code-block width. See the
     * 'DataBlk' class.

     *
     *
The 'ulx' and 'uly' members of the returned 'DataBlk' object contain
     * the coordinates of the top-left corner of the block, with respect to
     * the tile, not the subband.

     *
     * @param c The component for which to return the next code-block.
     *
     * @param m The vertical index of the code-block to return, in the
     * specified subband.
     *
     * @param n The horizontal index of the code-block to return, in the
     * specified subband.
     *
     * @param sb The subband in which the code-block to return is.
     *
     * @param cblk If non-null this object will be used to return the new
     * code-block. If null a new one will be allocated and returned. If the
     * "data" array of the object is non-null it will be reused, if possible,
     * to return the data.
     *
     * @return The next code-block in the current tile for component 'n', or
     * null if all code-blocks for the current tile have been returned.
     *
     * @see DataBlk
     * */
    public DataBlk getCodeBlock(int c,int m,int n,SubbandSyn sb,DataBlk cblk);

    /**
     * Returns the specified code-block in the current tile for the specified
     * component (as a reference or copy).
     *
     *
The returned code-block may be progressive, which is indicated by
     * the 'progressive' variable of the returned 'DataBlk' object. If a
     * code-block is progressive it means that in a later request to this
     * method for the same code-block it is possible to retrieve data which is
     * a better approximation, since meanwhile more data to decode for the
     * code-block could have been received. If the code-block is not
     * progressive then later calls to this method for the same code-block
     * will return the exact same data values.

     *
     *
The data returned by this method can be the data in the internal
     * buffer of this object, if any, and thus can not be modified by the
     * caller. The 'offset' and 'scanw' of the returned data can be
     * arbitrary. See the 'DataBlk' class.

     *
     *
The 'ulx' and 'uly' members of the returned 'DataBlk' object contain
     * the coordinates of the top-left corner of the block, with respect to
     * the tile, not the subband.

     *
     * @param c The component for which to return the next code-block.
     *
     * @param m The vertical index of the code-block to return, in the
     * specified subband.
     *
     * @param n The horizontal index of the code-block to return, in the
     * specified subband.
     *
     * @param sb The subband in which the code-block to return is.
     *
     * @param cblk If non-null this object will be used to return the new
     * code-block. If null a new one will be allocated and returned. If the
     * "data" array of the object is non-null it will be reused, if possible,
     * to return the data.
     *
     * @return The next code-block in the current tile for component 'n', or
     * null if all code-blocks for the current tile have been returned.
     *
     * @see DataBlk
     * */
    public DataBlk getInternCodeBlock(int c,int m,int n,SubbandSyn sb,
                                      DataBlk cblk);
}

redpajama_set_name: RedPajamaGithub


text:
'use strict';
// [START cloud_sql_mysql_mysql_connect_tcp]
// [START cloud_sql_mysql_mysql_connect_tcp_sslcerts]
const mysql = require('promise-mysql');
const fs = require('fs');

// createTcpPool initializes a TCP connection pool for a Cloud SQL
// instance of MySQL.
const createTcpPool = async config => {
  // Note: Saving credentials in environment variables is convenient, but not
  // secure - consider a more secure solution such as
  // Cloud Secret Manager (https://cloud.google.com/secret-manager) to help
  // keep secrets safe.
  const dbConfig = {
    host: process.env.INSTANCE_HOST, // e.g. '127.0.0.1'
    port: process.env.DB_PORT, // e.g. '3306'
    user: process.env.DB_USER, // e.g. 'my-db-user'
    password: process.env.DB_PASS, // e.g. 'my-db-password'
    database: process.env.DB_NAME, // e.g. 'my-database'
    // ... Specify additional properties here.
    ...config,
  };
  // [END cloud_sql_mysql_mysql_connect_tcp]

  // (OPTIONAL) Configure SSL certificates
  // For deployments that connect directly to a Cloud SQL instance without
  // using the Cloud SQL Proxy, configuring SSL certificates will ensure the
  // connection is encrypted.
  if (process.env.DB_ROOT_CERT) {
    dbConfig.ssl = {
      sslmode: 'verify-full',
      ca: fs.readFileSync(process.env.DB_ROOT_CERT), // e.g., '/path/to/my/server-ca.pem'
      key: fs.readFileSync(process.env.DB_KEY), // e.g. '/path/to/my/client-key.pem'
      cert: fs.readFileSync(process.env.DB_CERT), // e.g. '/path/to/my/client-cert.pem'
    };
  }

  // [START cloud_sql_mysql_mysql_connect_tcp]
  // Establish a connection to the database.
  return mysql.createPool(dbConfig);
};
// [END cloud_sql_mysql_mysql_connect_tcp_sslcerts]
// [END cloud_sql_mysql_mysql_connect_tcp]
module.exports = createTcpPool;


text:
$(document).ready(function () {

    var swiper = new Swiper('.swiper-container', {
        pagination: '.swiper-pagination',
        direction: 'vertical',
        slidesPerView: 1,
        paginationClickable: true,
        spaceBetween: 30,
        mousewheelControl: true
    });

    $('.fancybox').fancybox();

    $('.show-grid .col-xs-12').hover(function(){
        $(this).css('background-color', 'lightcoral');
        //$(this).css('opacity', '0.25');
    }, function(){
        $(this).css('background-color', '#f3554c');
        //$(this).css('opacity', '0.75');
    });

    $('.show-grid .col-xs-12').click(function(){
        swiper.slideTo(this.parentNode.attributes["data-slide"].nodeValue);
    });

    /*document.getElementsByTagName('div')[0].innerHTML = document.getElementsByTagName('div')[0].innerHTML.replace('é', 'é');
    document.getElementsByTagName('div')[0].innerHTML = document.getElementsByTagName('div')[0].innerHTML.replace('à', 'à');
    document.getElementsByTagName('div')[0].innerHTML = document.getElementsByTagName('div')[0].innerHTML.replace('â', 'â');
    document.getElementsByTagName('div')[0].innerHTML = document.getElementsByTagName('div')[0].innerHTML.replace('é', 'é');*/
});


text:
const path = require('path');
const fs = require('fs');
const packageJSON = require('../package.json');
const fetch = require('node-fetch');
const decompress = require('decompress');
const os = require('os');
const del = require('del');

const downloadDaemon = targetPlatform =>
  new Promise((resolve, reject) => {
    const daemonURLTemplate = packageJSON.lbrySettings.lbrynetDaemonUrlTemplate;
    const daemonVersion = packageJSON.lbrySettings.lbrynetDaemonVersion;
    const daemonDir = path.join(__dirname, '..', packageJSON.lbrySettings.lbrynetDaemonDir);
    let daemonFileName = packageJSON.lbrySettings.lbrynetDaemonFileName;

    const currentPlatform = os.platform();

    let daemonPlatform = process.env.TARGET || targetPlatform || currentPlatform;
    if (daemonPlatform === 'mac' || daemonPlatform === 'darwin') daemonPlatform = 'mac';
    if (daemonPlatform === 'win32' || daemonPlatform === 'windows') {
      daemonPlatform = 'windows';
      daemonFileName += '.exe';
    }
    const daemonFilePath = path.join(daemonDir, daemonFileName);
    const daemonVersionPath = path.join(__dirname, 'daemon.ver');
    const tmpZipPath = path.join(__dirname, '..', 'dist', 'daemon.zip');
    const daemonURL = daemonURLTemplate.replace(/DAEMONVER/g, daemonVersion).replace(/OSNAME/g, daemonPlatform);

    // If a daemon and daemon.ver exists, check to see if it matches the current daemon version
    const hasDaemonDownloaded = fs.existsSync(daemonFilePath);
    const hasDaemonVersion = fs.existsSync(daemonVersionPath);
    let downloadedDaemonVersion;

    if (hasDaemonVersion) {
      downloadedDaemonVersion = fs.readFileSync(daemonVersionPath, 'utf8');
    }

    if (hasDaemonDownloaded && hasDaemonVersion && downloadedDaemonVersion === daemonVersion) {
      console.log('\x1b[34minfo\x1b[0m Daemon already downloaded');
      resolve('Done');
    } else {
      console.log('\x1b[34minfo\x1b[0m Downloading daemon...');
      fetch(daemonURL, {
        method: 'GET',
        headers: {
          'Content-Type': 'application/zip',
        },
      })
        .then(response => response.buffer())
        .then(
          result =>
            new Promise((newResolve, newReject) => {
              const distPath = path.join(__dirname, '..', 'dist');
              const hasDistFolder = fs.existsSync(distPath);

              if (!hasDistFolder) {
                fs.mkdirSync(distPath);
              }

              fs.writeFile(tmpZipPath, result, error => {
                if (error) return newReject(error);
                return newResolve();
              });
            })
        )
        .then(() => del(`${daemonFilePath}*`))
        .then()
        .then(() =>
          decompress(tmpZipPath, daemonDir, {
            filter: file => path.basename(file.path) === daemonFileName,
          })
        )
        .then(() => {
          console.log(`\x1b[32msuccess\x1b[0m Daemon downloaded! - v${daemonVersion}`);
          if (hasDaemonVersion) {
            del(daemonVersionPath);
          }

          fs.writeFileSync(daemonVersionPath, daemonVersion, 'utf8');
          resolve('Done');
        })
        .catch(error => {
          console.error(`\x1b[31merror\x1b[0m Daemon download failed due to: \x1b[35m${error}\x1b[0m`);
          reject(error);
        });
    }
  });

downloadDaemon();


text:
/**
 *
 */
package com.eggnine.api.batchprocessing;

import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
import java.util.Comparator;
import java.util.List;

import org.junit.Test;

/**
 * test the minimum requirements for a {@link BatchFilter}
 *
 * @since 0
 */
public class BatchFilterTest<B extends Batch<?>>  {

	/**
	 * batch filter provider for tests, override to test real implementations
	 *
	 * @return
	 */
	public BatchFilter<B> getBatchFilter() {
		return new BatchFilter<B>() {

			@Override
			public B getBatch(Collection<B> batches,
					Comparator<B> comparator, Integer index) {
				Collection<B> filteredBatches = getBatches(batches);
				if(filteredBatches.isEmpty()) {
					return null;
				}
				List<B> listBatches = new ArrayList<B>(filteredBatches);
				Collections.sort(listBatches, comparator);
				return listBatches.get(index);
			}

			@Override
			public Collection<B> getBatches(Collection<B> batches) {
				return Collections.emptyList();
			}
		};
	}

	/**
	 * batch collection provider for tests, override to test real implementations
	 *
	 * @return a collection of batches
	 */
	@SuppressWarnings("unchecked") // must override for subclasses
	protected Collection<B> getBatches() {
		return (Collection<B>)Collections.singletonList(new BatchTest().getBatch());
	}

	/**
	 * batch comparator provider for tests, override to test real implementations
	 *
	 * @return a basic created date comparator
	 */
	protected Comparator<B> getComparator() {
		return new Comparator<B>() {
			@Override
			public int compare(B o1, B o2) {
				return o1.getCreatedAt().compareTo(o2.getCreatedAt());
			}
		};
	}

	/**
	 * {@link BatchFilter#getBatch()} should be null or should be contained by the collection parameter
	 */
	@Test
	public void getBatchTest() {
		Collection<B> batches = getBatches();
		BatchFilter<B> batchFilter = getBatchFilter();
		Comparator<B> comparator = getComparator();
		B filteredBatch = batchFilter.getBatch(batches, comparator, 0);
		assert filteredBatch == null || batches.contains(filteredBatch);
	}

	/**
	 * {@link BatchFilter#getBatches()} should never be null and should be a subset of the collection parameter
	 */
	@Test
	public void getBatchesTest() {
		Collection<B> batches = getBatches();
		BatchFilter<B> batchFilter = getBatchFilter();
		Collection<B> filteredBatches = batchFilter.getBatches(batches);
		assert filteredBatches != null;
		assert batches.containsAll(filteredBatches);
	}
}


text:
Extending the functionality of the `target` attribute.

##Usage

```html
<button data-target="page-top">Back to top</button>

<a href="#section-1" data-target="on-page">Scroll to Section 1</a>

<a href="#footer" data-target="skip">Jump to footer</a>

<a href="http://facebook.com/sharer.php" data-target="new-window">Share on Facebook</a>
```

```javascript
Links.init();
```

Add a `data-target` attibute to the anchor and pass through a target as defined below:

* `page-top`: Smoothscroll to the top of the page
* `on-page`: Smoothscroll to an element on the page
* `skip`: Jump to element and focus
* `new-window`: Opens a new window, mostly used for social sharing so default size is 500 by 420

##Release History

* v1.0.1 - Updated docs, added code linting
* v1.0.0 - Initial release


text:
package org.finra.jtaf.core.commands;

import org.finra.jtaf.core.model.exceptions.NameFormatException;
import org.finra.jtaf.core.model.execution.IInvocationContext;

public class ExtendedByeCommand extends ByeCommand{

	public ExtendedByeCommand(String name) throws NameFormatException {
		super(name);
	}

	@Override
	protected void execute(IInvocationContext ctx) throws Throwable {

		getContext().putObject("data","Bye Bye "+getContext().getObject("data"));
	}

}


text:
UE.registerUI('autosave', function(editor) {
    var timer = null,uid = null;
    editor.on('afterautosave',function(){
        clearTimeout(timer);

        timer = setTimeout(function(){
            if(uid){
                editor.trigger('hidemessage',uid);
            }
            uid = editor.trigger('showmessage',{
                content : editor.getLang('autosave.success'),
                timeout : 2000
            });

        },2000)
    })

});


text:
class Komododragon < LanguageBadge
  describe "Komodo Dragon",
           skill:             'Java',
           description:       "Have at least one original repo where Java is the dominant language",
           for:               "having at least one original repo where Java is the dominant language.",
           image_name:        'komododragon.png',
           providers:         :github,
           language_required: "Java",
           number_required:   1

end


text:
from django.conf import settings
from django.contrib import messages
from django.contrib.auth import authenticate, login, logout
from django.contrib.auth.decorators import login_required
from django.contrib.auth.models import Permission
from django.core.urlresolvers import reverse
from django.http import HttpResponseRedirect
from django.template.response import TemplateResponse
from django.utils.functional import lazy
from django.views.generic import CreateView

from .forms import UserCreationForm
from pinry.users.models import User

reverse_lazy = lambda name=None, *args: lazy(reverse, str)(name, args=args)

class CreateUser(CreateView):
    template_name = 'users/register.html'
    model = User
    form_class = UserCreationForm
    success_url = reverse_lazy('core:recent-pins')

    def get(self, request, *args, **kwargs):
        if not settings.ALLOW_NEW_REGISTRATIONS:
            messages.error(request, "The admin of this service is not allowing new registrations.")
            return HttpResponseRedirect(reverse('core:recent-pins'))
        return super(CreateUser, self).get(request, *args, **kwargs)

    def form_valid(self, form):
        redirect = super(CreateUser, self).form_valid(form)
        permissions = Permission.objects.filter(codename__in=['add_pin', 'add_image'])
        user = authenticate(username=form.cleaned_data['username'],
                            password=form.cleaned_data['password'])
        user.user_permissions = permissions
        login(self.request, user)
        return redirect

@login_required
def logout_user(request):
    logout(request)
    messages.success(request, 'You have successfully logged out.')
    return HttpResponseRedirect(reverse('core:recent-pins'))

def private(request):
    return TemplateResponse(request, 'users/private.html', None)


text:
package convenientadditions.item;

import convenientadditions.ModConstants;
import convenientadditions.api.util.Helper;
import convenientadditions.base.item.CAItem;
import convenientadditions.config.ModConfigGeneral;
import convenientadditions.init.ModItems;
import net.minecraft.entity.monster.EntitySlime;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.init.Items;
import net.minecraft.init.SoundEvents;
import net.minecraft.item.ItemStack;
import net.minecraftforge.common.MinecraftForge;
import net.minecraftforge.event.entity.player.PlayerInteractEvent;
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
import net.minecraftforge.fml.common.registry.EntityRegistry;

public class ItemSlimeBucket extends CAItem {
    public ItemSlimeBucket() {
        super(ModConstants.ItemNames.slimeBucket);
        this.setDefaultInfo(false).setMaxStackSize(1);
        MinecraftForge.EVENT_BUS.register(this);
    }

    @Override
    public ItemStack getContainerItem(ItemStack itemStack) {
        return new ItemStack(Items.BUCKET);
    }

    @Override
    public boolean hasContainerItem(ItemStack stack) {
        return true;
    }

    @SubscribeEvent
    public void onEntityInteract(PlayerInteractEvent.EntityInteract event){
        ItemStack stack=event.getItemStack();
        EntityPlayer player=event.getEntityPlayer();

        if (ModConfigGeneral.slimeHarvesting && stack.getItem() == Items.BUCKET) //&& !player.mapped_capabilities.isCreativeMode)
        {
            if(!(EntityRegistry.getEntry(event.getTarget().getClass()).getRegistryName().toString().equals("minecraft:slime") && ((EntitySlime)event.getTarget()).getSlimeSize()>2))
                return;
            player.playSound(SoundEvents.ITEM_BUCKET_FILL, 1.0F, 1.0F);
            stack.shrink(1);

            if (stack.isEmpty())
            {
                player.setHeldItem(event.getHand(), new ItemStack(ModItems.itemSlimeBucket));
            }
            else
                Helper.insertOrDrop(player, new ItemStack(ModItems.itemSlimeBucket));

            event.setCanceled(true);
        }
    }
}


text:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.k3nx.taskit" >

    <application
        android:allowBackup="true"
        android:icon="@drawable/ic_launcher"
        android:label="@string/app_name"
        android:theme="@style/AppTheme" >
        <activity
            android:name=".TaskListActivity"
            android:label="@string/app_name" >
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />

                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
        <activity
            android:name=".TaskActivity"
            android:label="@string/title_activity_task" >
        </activity>
    </application>

</manifest>


text:
package com.photon.phresco.model;

import java.io.IOException;
import java.io.InputStream;
import java.util.HashMap;
import java.util.Map;
import java.util.Properties;

import com.photon.phresco.util.Constants;

public class FrameworkOptions implements Constants {

	private  Properties frameworkOptionsProp = new Properties();
    private  String fileName = "commons-messages.properties";
    static FrameworkOptions frmworkoption = new FrameworkOptions();

    public String getDataFromPropertyFile(String Key){ // Reading Data From Property File
    	InputStream stream = this.getClass().getClassLoader().getResourceAsStream(fileName);
    	try {
        	frameworkOptionsProp.load(stream);
        } catch (IOException e) {

        }

    	return frameworkOptionsProp.getProperty(Key);
    }

	public enum Options {

		CODEVALIDATION(frmworkoption.getDataFromPropertyFile(ENABLE_CODE_VALIDATION), "codeValidationEnabled", true),
		BUILD(frmworkoption.getDataFromPropertyFile(ENABLE_BUILD), "buildEnabled", true),
		DEPLOY(frmworkoption.getDataFromPropertyFile(ENABLE_DEPLOY), "deployEnabled", false),
		RUNAGAINSTSOURCE(frmworkoption.getDataFromPropertyFile(ENABLE_RUN_AGAINST_SOURCE),"runAgainstSourceEnabled", false),
		UNIT(frmworkoption.getDataFromPropertyFile(ENABLE_UNIT_TEST),"unitTestEnabled", true),
		FUNCTIONAL(frmworkoption.getDataFromPropertyFile(ENABLE_FUNCTIONAL_TEST),"functionalTestEnabled", true),
		PERFORMANCE(frmworkoption.getDataFromPropertyFile(ENABLE_PERFORMANCE_TEST),"performanceTestEnabled", false),
		LOAD(frmworkoption.getDataFromPropertyFile(ENABLE_LOAD_TEST),"loadTestEnabled", false),
		CI(frmworkoption.getDataFromPropertyFile(ENABLE_CONTINUOUS_INTEGRATION),"continousIntegrationEnabled", true),
		JSLIBRARIES(frmworkoption.getDataFromPropertyFile(ENABLE_JS_LIBRARIES),"JSLibrariesEnabled", false);

		private static final Map<String, Options> valueOptionsMap = new HashMap<String, FrameworkOptions.Options>(16);

		static {
			valueOptionsMap.put(CODEVALIDATION.getValue(), CODEVALIDATION);
			valueOptionsMap.put(BUILD.getValue(), BUILD);
			valueOptionsMap.put(DEPLOY.getValue(), DEPLOY);
			valueOptionsMap.put(RUNAGAINSTSOURCE.getValue(), RUNAGAINSTSOURCE);
			valueOptionsMap.put(UNIT.getValue(), UNIT);
			valueOptionsMap.put(FUNCTIONAL.getValue(), FUNCTIONAL);
			valueOptionsMap.put(PERFORMANCE.getValue(), PERFORMANCE);
			valueOptionsMap.put(LOAD.getValue(), LOAD);
			valueOptionsMap.put(CI.getValue(), CI);
			valueOptionsMap.put(JSLIBRARIES.getValue(), JSLIBRARIES);
		}

		String key;
		String value;
		Boolean flag;

		Options(String dispKey, String value, Boolean flag) {
			this.key = dispKey;
			this.value = value;
			this.flag = flag;
		}

		public String getKey() {
			return key;
		}

		public String getValue() {
			return value;
		}

		public Boolean getFlag() {
			return flag;
		}

		public static final String getEnum(String key) {
			Options value = valueOptionsMap.get(key);
			return value.getKey();
		}
	}
}


text:
  package org.galagosearch.tupleflow.typebuilder;
  import java.util.HashMap;
  import org.galagosearch.tupleflow.typebuilder.OrderSpecification;
  import org.galagosearch.tupleflow.typebuilder.OrderedFieldSpecification;
  import org.galagosearch.tupleflow.typebuilder.Direction;
  import org.galagosearch.tupleflow.typebuilder.FieldSpecification;

import org.antlr.runtime.*;
import java.util.Stack;
import java.util.List;
import java.util.ArrayList;

public class GalagoTypeBuilderParser extends Parser {
    public static final String[] tokenNames = new String[] {
        "<invalid>", "<EOR>", "<DOWN>", "<UP>", "ID", "NEWLINE", "WS", "COMMENT", "'bytes'", "'boolean'", "'int'", "'long'", "'short'", "'byte'", "'float'", "'double'", "'String'", "';'", "'+'", "'-'", "'order:'", "'.'", "'package'", "'type'", "'{'", "'}'"
    };
    public static final int WS=6;
    public static final int NEWLINE=5;
    public static final int COMMENT=7;
    public static final int ID=4;
    public static final int EOF=-1;

        public GalagoTypeBuilderParser(TokenStream input) {
            super(input);
        }

    public String[] getTokenNames() { return tokenNames; }
    public String getGrammarFileName() { return "/home/kunal/galagosearch-1.04/galagosearch-tupleflow-typebuilder/src/main/antlr/org/galagosearch/tupleflow/typebuilder/GalagoTypeBuilder.g"; }

    // $ANTLR start var_type
    // /home/kunal/galagosearch-1.04/galagosearch-tupleflow-typebuilder/src/main/antlr/org/galagosearch/tupleflow/typebuilder/GalagoTypeBuilder.g:17:1: var_type returns [ FieldSpecification.DataType dataType ] : ( 'bytes' | 'boolean' | 'int' | 'long' | 'short' | 'byte' | 'float' | 'double' | 'String' );
    public final FieldSpecification.DataType var_type() throws RecognitionException {
        FieldSpecification.DataType dataType = null;

        try {
            // /home/kunal/galagosearch-1.04/galagosearch-tupleflow-typebuilder/src/main/antlr/org/galagosearch/tupleflow/typebuilder/GalagoTypeBuilder.g:17:59: ( 'bytes' | 'boolean' | 'int' | 'long' | 'short' | 'byte' | 'float' | 'double' | 'String' )
            int alt1=9;
            switch ( input.LA(1) ) {
            case 8:
                {
                alt1=1;
                }
                break;
            case 9:
                {
                alt1=2;
                }
                break;
            case 10:
                {
                alt1=3;
                }
                break;
            case 11:
                {
                alt1=4;
                }
                break;
            case 12:
                {
                alt1=5;
                }
                break;
            case 13:
                {
                alt1=6;
                }
                break;
            case 14:
                {
                alt1=7;
                }
                break;
            case 15:
                {
                alt1=8;
                }
                break;
            case 16:
                {
                alt1=9;
                }
                break;
            default:
                NoViableAltException nvae =
                    new NoViableAltException("17:1: var_type returns [ FieldSpecification.DataType dataType ] : ( 'bytes' | 'boolean' | 'int' | 'long' | 'short' | 'byte' | 'float' | 'double' | 'String' );", 1, 0, input);

                throw nvae;
            }

            switch (alt1) {
                case 1 :
                    // /home/kunal/galagosearch-1.04/galagosearch-tupleflow-typebuilder/src/main/antlr/org/galagosearch/tupleflow/typebuilder/GalagoTypeBuilder.g:18:5: 'bytes'
                    {
                    match(input,8,FOLLOW_8_in_var_type61);
                     dataType = FieldSpecification.DataType.BYTES;

                    }
                    break;
                case 2 :
                    // /home/kunal/galagosearch-1.04/galagosearch-tupleflow-typebuilder/src/main/antlr/org/galagosearch/tupleflow/typebuilder/GalagoTypeBuilder.g:19:5: 'boolean'
                    {
                    match(input,9,FOLLOW_9_in_var_type71);
                     dataType = FieldSpecification.DataType.BOOLEAN;

                    }
                    break;
                case 3 :
                    // /home/kunal/galagosearch-1.04/galagosearch-tupleflow-typebuilder/src/main/antlr/org/galagosearch/tupleflow/typebuilder/GalagoTypeBuilder.g:20:5: 'int'
                    {
                    match(input,10,FOLLOW_10_in_var_type81);
                     dataType = FieldSpecification.DataType.INT;

                    }
                    break;
                case 4 :
                    // /home/kunal/galagosearch-1.04/galagosearch-tupleflow-typebuilder/src/main/antlr/org/galagosearch/tupleflow/typebuilder/GalagoTypeBuilder.g:21:5: 'long'
                    {
                    match(input,11,FOLLOW_11_in_var_type91);
                     dataType = FieldSpecification.DataType.LONG;

                    }
                    break;
                case 5 :
                    // /home/kunal/galagosearch-1.04/galagosearch-tupleflow-typebuilder/src/main/antlr/org/galagosearch/tupleflow/typebuilder/GalagoTypeBuilder.g:22:5: 'short'
                    {
                    match(input,12,FOLLOW_12_in_var_type101);
                     dataType = FieldSpecification.DataType.SHORT;

                    }
                    break;
                case 6 :
                    // /home/kunal/galagosearch-1.04/galagosearch-tupleflow-typebuilder/src/main/antlr/org/galagosearch/tupleflow/typebuilder/GalagoTypeBuilder.g:23:5: 'byte'
                    {
                    match(input,13,FOLLOW_13_in_var_type111);
                     dataType = FieldSpecification.DataType.BYTE;

                    }
                    break;
                case 7 :
                    // /home/kunal/galagosearch-1.04/galagosearch-tupleflow-typebuilder/src/main/antlr/org/galagosearch/tupleflow/typebuilder/GalagoTypeBuilder.g:24:5: 'float'
                    {
                    match(input,14,FOLLOW_14_in_var_type121);
                     dataType = FieldSpecification.DataType.FLOAT;

                    }
                    break;
                case 8 :
                    // /home/kunal/galagosearch-1.04/galagosearch-tupleflow-typebuilder/src/main/antlr/org/galagosearch/tupleflow/typebuilder/GalagoTypeBuilder.g:25:5: 'double'
                    {
                    match(input,15,FOLLOW_15_in_var_type131);
                     dataType = FieldSpecification.DataType.DOUBLE;

                    }
                    break;
                case 9 :
                    // /home/kunal/galagosearch-1.04/galagosearch-tupleflow-typebuilder/src/main/antlr/org/galagosearch/tupleflow/typebuilder/GalagoTypeBuilder.g:26:5: 'String'
                    {
                    match(input,16,FOLLOW_16_in_var_type141);
                     dataType = FieldSpecification.DataType.STRING;

                    }
                    break;

            }
        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
        }
        finally {
        }
        return dataType;
    }
    // $ANTLR end var_type

    // $ANTLR start field_def
    // /home/kunal/galagosearch-1.04/galagosearch-tupleflow-typebuilder/src/main/antlr/org/galagosearch/tupleflow/typebuilder/GalagoTypeBuilder.g:28:1: field_def returns [ FieldSpecification field ] : v= var_type i= ID ';' ;
    public final FieldSpecification field_def() throws RecognitionException {
        FieldSpecification field = null;

        Token i=null;
        FieldSpecification.DataType v = null;

        try {
            // /home/kunal/galagosearch-1.04/galagosearch-tupleflow-typebuilder/src/main/antlr/org/galagosearch/tupleflow/typebuilder/GalagoTypeBuilder.g:28:48: (v= var_type i= ID ';' )
            // /home/kunal/galagosearch-1.04/galagosearch-tupleflow-typebuilder/src/main/antlr/org/galagosearch/tupleflow/typebuilder/GalagoTypeBuilder.g:29:5: v= var_type i= ID ';'
            {
            pushFollow(FOLLOW_var_type_in_field_def165);
            v=var_type();
            _fsp--;

            i=(Token)input.LT(1);
            match(input,ID,FOLLOW_ID_in_field_def169);
            match(input,17,FOLLOW_17_in_field_def171);
             field = new FieldSpecification(v, i.getText());

            }

        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
        }
        finally {
        }
        return field;
    }
    // $ANTLR end field_def

    // $ANTLR start field_defs
    // /home/kunal/galagosearch-1.04/galagosearch-tupleflow-typebuilder/src/main/antlr/org/galagosearch/tupleflow/typebuilder/GalagoTypeBuilder.g:33:1: field_defs returns [ ArrayList<FieldSpecification> fields ] : (v= field_def )+ ;
    public final ArrayList<FieldSpecification> field_defs() throws RecognitionException {
        ArrayList<FieldSpecification> fields = null;

        FieldSpecification v = null;

        try {
            // /home/kunal/galagosearch-1.04/galagosearch-tupleflow-typebuilder/src/main/antlr/org/galagosearch/tupleflow/typebuilder/GalagoTypeBuilder.g:33:61: ( (v= field_def )+ )
            // /home/kunal/galagosearch-1.04/galagosearch-tupleflow-typebuilder/src/main/antlr/org/galagosearch/tupleflow/typebuilder/GalagoTypeBuilder.g:34:5: (v= field_def )+
            {
             fields = new ArrayList<FieldSpecification>();
            // /home/kunal/galagosearch-1.04/galagosearch-tupleflow-typebuilder/src/main/antlr/org/galagosearch/tupleflow/typebuilder/GalagoTypeBuilder.g:35:5: (v= field_def )+
            int cnt2=0;
            loop2:
            do {
                int alt2=2;
                int LA2_0 = input.LA(1);

                if ( ((LA2_0>=8 && LA2_0<=16)) ) {
                    alt2=1;
                }

                switch (alt2) {
            	case 1 :
            	    // /home/kunal/galagosearch-1.04/galagosearch-tupleflow-typebuilder/src/main/antlr/org/galagosearch/tupleflow/typebuilder/GalagoTypeBuilder.g:35:6: v= field_def
            	    {
            	    pushFollow(FOLLOW_field_def_in_field_defs207);
            	    v=field_def();
            	    _fsp--;

            	     fields.add(v);

            	    }
            	    break;

            	default :
            	    if ( cnt2 >= 1 ) break loop2;
                        EarlyExitException eee =
                            new EarlyExitException(2, input);
                        throw eee;
                }
                cnt2++;
            } while (true);

            }

        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
        }
        finally {
        }
        return fields;
    }
    // $ANTLR end field_defs

    // $ANTLR start order_field
    // /home/kunal/galagosearch-1.04/galagosearch-tupleflow-typebuilder/src/main/antlr/org/galagosearch/tupleflow/typebuilder/GalagoTypeBuilder.g:38:1: order_field returns [ OrderedFieldSpecification ord_field ] : ( '+' | '-' ) i= ID ;
    public final OrderedFieldSpecification order_field() throws RecognitionException {
        OrderedFieldSpecification ord_field = null;

        Token i=null;

        try {
            // /home/kunal/galagosearch-1.04/galagosearch-tupleflow-typebuilder/src/main/antlr/org/galagosearch/tupleflow/typebuilder/GalagoTypeBuilder.g:38:61: ( ( '+' | '-' ) i= ID )
            // /home/kunal/galagosearch-1.04/galagosearch-tupleflow-typebuilder/src/main/antlr/org/galagosearch/tupleflow/typebuilder/GalagoTypeBuilder.g:39:5: ( '+' | '-' ) i= ID
            {
            Direction direction = Direction.ASCENDING;
            // /home/kunal/galagosearch-1.04/galagosearch-tupleflow-typebuilder/src/main/antlr/org/galagosearch/tupleflow/typebuilder/GalagoTypeBuilder.g:40:5: ( '+' | '-' )
            int alt3=2;
            int LA3_0 = input.LA(1);

            if ( (LA3_0==18) ) {
                alt3=1;
            }
            else if ( (LA3_0==19) ) {
                alt3=2;
            }
            else {
                NoViableAltException nvae =
                    new NoViableAltException("40:5: ( '+' | '-' )", 3, 0, input);

                throw nvae;
            }
            switch (alt3) {
                case 1 :
                    // /home/kunal/galagosearch-1.04/galagosearch-tupleflow-typebuilder/src/main/antlr/org/galagosearch/tupleflow/typebuilder/GalagoTypeBuilder.g:40:6: '+'
                    {
                    match(input,18,FOLLOW_18_in_order_field246);

                    }
                    break;
                case 2 :
                    // /home/kunal/galagosearch-1.04/galagosearch-tupleflow-typebuilder/src/main/antlr/org/galagosearch/tupleflow/typebuilder/GalagoTypeBuilder.g:40:12: '-'
                    {
                    match(input,19,FOLLOW_19_in_order_field250);
                    direction = Direction.DESCENDING;

                    }
                    break;

            }

            i=(Token)input.LT(1);
            match(input,ID,FOLLOW_ID_in_order_field261);
             ord_field = new OrderedFieldSpecification(direction, i.getText());

            }

        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
        }
        finally {
        }
        return ord_field;
    }
    // $ANTLR end order_field

    // $ANTLR start order_def
    // /home/kunal/galagosearch-1.04/galagosearch-tupleflow-typebuilder/src/main/antlr/org/galagosearch/tupleflow/typebuilder/GalagoTypeBuilder.g:43:1: order_def returns [ OrderSpecification defs ] : 'order:' (o= order_field )* ';' ;
    public final OrderSpecification order_def() throws RecognitionException {
        OrderSpecification defs = null;

        OrderedFieldSpecification o = null;

        try {
            // /home/kunal/galagosearch-1.04/galagosearch-tupleflow-typebuilder/src/main/antlr/org/galagosearch/tupleflow/typebuilder/GalagoTypeBuilder.g:43:47: ( 'order:' (o= order_field )* ';' )
            // /home/kunal/galagosearch-1.04/galagosearch-tupleflow-typebuilder/src/main/antlr/org/galagosearch/tupleflow/typebuilder/GalagoTypeBuilder.g:44:5: 'order:' (o= order_field )* ';'
            {
             defs = new OrderSpecification();
            match(input,20,FOLLOW_20_in_order_def289);
            // /home/kunal/galagosearch-1.04/galagosearch-tupleflow-typebuilder/src/main/antlr/org/galagosearch/tupleflow/typebuilder/GalagoTypeBuilder.g:45:14: (o= order_field )*
            loop4:
            do {
                int alt4=2;
                int LA4_0 = input.LA(1);

                if ( ((LA4_0>=18 && LA4_0<=19)) ) {
                    alt4=1;
                }

                switch (alt4) {
            	case 1 :
            	    // /home/kunal/galagosearch-1.04/galagosearch-tupleflow-typebuilder/src/main/antlr/org/galagosearch/tupleflow/typebuilder/GalagoTypeBuilder.g:45:15: o= order_field
            	    {
            	    pushFollow(FOLLOW_order_field_in_order_def294);
            	    o=order_field();
            	    _fsp--;

            	     defs.addOrderedField(o);

            	    }
            	    break;

            	default :
            	    break loop4;
                }
            } while (true);

            match(input,17,FOLLOW_17_in_order_def300);

            }

        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
        }
        finally {
        }
        return defs;
    }
    // $ANTLR end order_def

    // $ANTLR start order_defs
    // /home/kunal/galagosearch-1.04/galagosearch-tupleflow-typebuilder/src/main/antlr/org/galagosearch/tupleflow/typebuilder/GalagoTypeBuilder.g:47:1: order_defs returns [ ArrayList<OrderSpecification> defs ] : (o= order_def )+ ;
    public final ArrayList<OrderSpecification> order_defs() throws RecognitionException {
        ArrayList<OrderSpecification> defs = null;

        OrderSpecification o = null;

        try {
            // /home/kunal/galagosearch-1.04/galagosearch-tupleflow-typebuilder/src/main/antlr/org/galagosearch/tupleflow/typebuilder/GalagoTypeBuilder.g:47:59: ( (o= order_def )+ )
            // /home/kunal/galagosearch-1.04/galagosearch-tupleflow-typebuilder/src/main/antlr/org/galagosearch/tupleflow/typebuilder/GalagoTypeBuilder.g:48:5: (o= order_def )+
            {
             defs = new ArrayList<OrderSpecification>();
            // /home/kunal/galagosearch-1.04/galagosearch-tupleflow-typebuilder/src/main/antlr/org/galagosearch/tupleflow/typebuilder/GalagoTypeBuilder.g:49:5: (o= order_def )+
            int cnt5=0;
            loop5:
            do {
                int alt5=2;
                int LA5_0 = input.LA(1);

                if ( (LA5_0==20) ) {
                    alt5=1;
                }

                switch (alt5) {
            	case 1 :
            	    // /home/kunal/galagosearch-1.04/galagosearch-tupleflow-typebuilder/src/main/antlr/org/galagosearch/tupleflow/typebuilder/GalagoTypeBuilder.g:49:6: o= order_def
            	    {
            	    pushFollow(FOLLOW_order_def_in_order_defs330);
            	    o=order_def();
            	    _fsp--;

            	     defs.add(o);

            	    }
            	    break;

            	default :
            	    if ( cnt5 >= 1 ) break loop5;
                        EarlyExitException eee =
                            new EarlyExitException(5, input);
                        throw eee;
                }
                cnt5++;
            } while (true);

            }

        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
        }
        finally {
        }
        return defs;
    }
    // $ANTLR end order_defs

    public static class package_name_return extends ParserRuleReturnScope {
        public String name;
    };

    // $ANTLR start package_name
    // /home/kunal/galagosearch-1.04/galagosearch-tupleflow-typebuilder/src/main/antlr/org/galagosearch/tupleflow/typebuilder/GalagoTypeBuilder.g:52:1: package_name returns [ String name ] : ID ( '.' ID )* ;
    public final package_name_return package_name() throws RecognitionException {
        package_name_return retval = new package_name_return();
        retval.start = input.LT(1);

        try {
            // /home/kunal/galagosearch-1.04/galagosearch-tupleflow-typebuilder/src/main/antlr/org/galagosearch/tupleflow/typebuilder/GalagoTypeBuilder.g:52:38: ( ID ( '.' ID )* )
            // /home/kunal/galagosearch-1.04/galagosearch-tupleflow-typebuilder/src/main/antlr/org/galagosearch/tupleflow/typebuilder/GalagoTypeBuilder.g:53:5: ID ( '.' ID )*
            {
            match(input,ID,FOLLOW_ID_in_package_name355);
            // /home/kunal/galagosearch-1.04/galagosearch-tupleflow-typebuilder/src/main/antlr/org/galagosearch/tupleflow/typebuilder/GalagoTypeBuilder.g:53:8: ( '.' ID )*
            loop6:
            do {
                int alt6=2;
                int LA6_0 = input.LA(1);

                if ( (LA6_0==21) ) {
                    alt6=1;
                }

                switch (alt6) {
            	case 1 :
            	    // /home/kunal/galagosearch-1.04/galagosearch-tupleflow-typebuilder/src/main/antlr/org/galagosearch/tupleflow/typebuilder/GalagoTypeBuilder.g:53:9: '.' ID
            	    {
            	    match(input,21,FOLLOW_21_in_package_name358);
            	    match(input,ID,FOLLOW_ID_in_package_name360);

            	    }
            	    break;

            	default :
            	    break loop6;
                }
            } while (true);

             retval.name = input.toString(retval.start,input.LT(-1));

            }

            retval.stop = input.LT(-1);

        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
        }
        finally {
        }
        return retval;
    }
    // $ANTLR end package_name

    // $ANTLR start package_def
    // /home/kunal/galagosearch-1.04/galagosearch-tupleflow-typebuilder/src/main/antlr/org/galagosearch/tupleflow/typebuilder/GalagoTypeBuilder.g:56:1: package_def returns [ String name ] : 'package' pn= package_name ';' ;
    public final String package_def() throws RecognitionException {
        String name = null;

        package_name_return pn = null;

        try {
            // /home/kunal/galagosearch-1.04/galagosearch-tupleflow-typebuilder/src/main/antlr/org/galagosearch/tupleflow/typebuilder/GalagoTypeBuilder.g:56:37: ( 'package' pn= package_name ';' )
            // /home/kunal/galagosearch-1.04/galagosearch-tupleflow-typebuilder/src/main/antlr/org/galagosearch/tupleflow/typebuilder/GalagoTypeBuilder.g:57:5: 'package' pn= package_name ';'
            {
            match(input,22,FOLLOW_22_in_package_def385);
            pushFollow(FOLLOW_package_name_in_package_def389);
            pn=package_name();
            _fsp--;

            match(input,17,FOLLOW_17_in_package_def391);
             name = pn.name;

            }

        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
        }
        finally {
        }
        return name;
    }
    // $ANTLR end package_def

    // $ANTLR start type_def
    // /home/kunal/galagosearch-1.04/galagosearch-tupleflow-typebuilder/src/main/antlr/org/galagosearch/tupleflow/typebuilder/GalagoTypeBuilder.g:60:1: type_def returns [ TypeSpecification spec ] : p= package_def 'type' i= ID '{' v= field_defs o= order_defs '}' ;
    public final TypeSpecification type_def() throws RecognitionException {
        TypeSpecification spec = null;

        Token i=null;
        String p = null;

        ArrayList<FieldSpecification> v = null;

        ArrayList<OrderSpecification> o = null;

        try {
            // /home/kunal/galagosearch-1.04/galagosearch-tupleflow-typebuilder/src/main/antlr/org/galagosearch/tupleflow/typebuilder/GalagoTypeBuilder.g:60:45: (p= package_def 'type' i= ID '{' v= field_defs o= order_defs '}' )
            // /home/kunal/galagosearch-1.04/galagosearch-tupleflow-typebuilder/src/main/antlr/org/galagosearch/tupleflow/typebuilder/GalagoTypeBuilder.g:61:5: p= package_def 'type' i= ID '{' v= field_defs o= order_defs '}'
            {

                    spec = new TypeSpecification();

            pushFollow(FOLLOW_package_def_in_type_def471);
            p=package_def();
            _fsp--;

             spec.setPackageName(p);
            match(input,23,FOLLOW_23_in_type_def479);
            i=(Token)input.LT(1);
            match(input,ID,FOLLOW_ID_in_type_def483);
             spec.setTypeName(i.getText());
            match(input,24,FOLLOW_24_in_type_def491);
            pushFollow(FOLLOW_field_defs_in_type_def499);
            v=field_defs();
            _fsp--;

             spec.setFields(v);
            pushFollow(FOLLOW_order_defs_in_type_def509);
            o=order_defs();
            _fsp--;

             spec.setOrders(o);
            match(input,25,FOLLOW_25_in_type_def517);

            }

        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
        }
        finally {
        }
        return spec;
    }
    // $ANTLR end type_def

    public static final BitSet FOLLOW_8_in_var_type61 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_9_in_var_type71 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_10_in_var_type81 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_11_in_var_type91 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_12_in_var_type101 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_13_in_var_type111 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_14_in_var_type121 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_15_in_var_type131 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_16_in_var_type141 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_var_type_in_field_def165 = new BitSet(new long[]{0x0000000000000010L});
    public static final BitSet FOLLOW_ID_in_field_def169 = new BitSet(new long[]{0x0000000000020000L});
    public static final BitSet FOLLOW_17_in_field_def171 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_field_def_in_field_defs207 = new BitSet(new long[]{0x000000000001FF02L});
    public static final BitSet FOLLOW_18_in_order_field246 = new BitSet(new long[]{0x0000000000000010L});
    public static final BitSet FOLLOW_19_in_order_field250 = new BitSet(new long[]{0x0000000000000010L});
    public static final BitSet FOLLOW_ID_in_order_field261 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_20_in_order_def289 = new BitSet(new long[]{0x00000000000E0000L});
    public static final BitSet FOLLOW_order_field_in_order_def294 = new BitSet(new long[]{0x00000000000E0000L});
    public static final BitSet FOLLOW_17_in_order_def300 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_order_def_in_order_defs330 = new BitSet(new long[]{0x0000000000100002L});
    public static final BitSet FOLLOW_ID_in_package_name355 = new BitSet(new long[]{0x0000000000200002L});
    public static final BitSet FOLLOW_21_in_package_name358 = new BitSet(new long[]{0x0000000000000010L});
    public static final BitSet FOLLOW_ID_in_package_name360 = new BitSet(new long[]{0x0000000000200002L});
    public static final BitSet FOLLOW_22_in_package_def385 = new BitSet(new long[]{0x0000000000000010L});
    public static final BitSet FOLLOW_package_name_in_package_def389 = new BitSet(new long[]{0x0000000000020000L});
    public static final BitSet FOLLOW_17_in_package_def391 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_package_def_in_type_def471 = new BitSet(new long[]{0x0000000000800000L});
    public static final BitSet FOLLOW_23_in_type_def479 = new BitSet(new long[]{0x0000000000000010L});
    public static final BitSet FOLLOW_ID_in_type_def483 = new BitSet(new long[]{0x0000000001000000L});
    public static final BitSet FOLLOW_24_in_type_def491 = new BitSet(new long[]{0x000000000001FF00L});
    public static final BitSet FOLLOW_field_defs_in_type_def499 = new BitSet(new long[]{0x0000000000100000L});
    public static final BitSet FOLLOW_order_defs_in_type_def509 = new BitSet(new long[]{0x0000000002000000L});
    public static final BitSet FOLLOW_25_in_type_def517 = new BitSet(new long[]{0x0000000000000002L});

}


text:
<?php

namespace WellCommerce\Bundle\OrderBundle\Processor;

use WellCommerce\Component\Collections\ArrayCollection;

/**
 * Class PaymentProcessorCollection
 *
 * @author  Adam Piotrowski <adam@wellcommerce.org>
 */
class PaymentProcessorCollection extends ArrayCollection
{
    public function add(PaymentProcessorInterface $processor)
    {
        $this->items[$processor->getConfigurator()->getName()] = $processor;
    }

    /**
     * @return PaymentProcessorInterface[]
     */
    public function all()
    {
        return $this->items;
    }
}


text:
<Alloy>
	<Window title="School Staffs" backgroundImage="/images/home_background.jpg" id="win"  >
		<ActionBar platform="android" displayHomeAsUp="true" onHomeIconItemSelected="closeWindow" />
		 <LeftNavButton platform="ios">
			<View onClick="closeWindow" left="0"  width="30" height="35">
				<ImageView left='0'  width="Ti.UI.SIZE"   image="/images/btn-back.png" />
			</View>
		</LeftNavButton>
		<View layout="vertical" id="loadingBar" height="0" width="120" borderRadius="15" backgroundColor="#2E2E2E" >
			<ActivityIndicator id="activityIndicator" />

		</View>
		<SearchBar barColor="#FFFFFF" top="0" zIndex="99" tintColor="#10844D" id="searchItem" showCancel="true" height="0" visible="false"  hintText="Search Announcement/Post" />

		<View class="vert wfill hsize" top="5">
			School Staff List
		</View>
    	<ScrollView id="list" class="vert hfill wfill"  backgroundColor="#ffffff"  contentWidth="Ti.UI.FILL" contentHeight="Ti.UI.SIZE" bottom="60"  top= "50" />
		<View id="toolbar">
	    	<View width="25%" height="60" class="vert">
	    		<ImageView id="refresh" height="30" top="10" image="/images/icon_refresh.png" />
	    		Refresh
	    	</View>
			<View width="25%" height="60">

			</View>
	        <View width="25%" height="60" class="vert">
	        	<ImageView id="search"  top="10"  height="30" image="/images/search.png" />
	        	Search
	        </View>
	        <View width="auto" height="60" class="vert">
				<ImageView id="add"  top="10" height="30"  image="/images/add.png" />
				Add
			</View>
		</View>
	</Window>
</Alloy>


text:
package com.kanchi.periyava.Fragments;

import android.os.AsyncTask;
import android.os.Bundle;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.Menu;
import android.view.MenuInflater;
import android.view.MenuItem;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;

import com.kanchi.periyava.Activity.MainActivity;
import com.kanchi.periyava.Model.GeneralSetting;
import com.kanchi.periyava.Model.PreferenceData;
import com.kanchi.periyava.Model.UserProfile;
import com.kanchi.periyava.R;

import org.apache.http.HttpEntity;
import org.apache.http.HttpResponse;
import org.apache.http.client.methods.HttpGet;
import org.apache.http.entity.BufferedHttpEntity;
import org.apache.http.impl.client.DefaultHttpClient;

import java.io.BufferedReader;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Date;

public class Dashboard extends AppBaseFragement {
  public static String TAG = "MainActivity";
  View rootView;

  @Override
  public View onCreateView(LayoutInflater inflater, ViewGroup container,
                           Bundle savedInstanceState) {
    rootView = inflater.inflate(R.layout.dashboard_main, container, false);
    getActivity().setTitle(getResources().getString(R.string.app_name));
    setHasOptionsMenu(true);

    new GetAsyncRadioURL("INDIA").execute(GeneralSetting.getGeneralSetting().direct_radiourl_india);

    new GetAsyncRadioURL("OTHERS").execute(GeneralSetting.getGeneralSetting().direct_radiourl_others);

    //init();
    return rootView;
  }

  private void init() {
    if (UserProfile.getUserProfile().isLoggedIn == false) {
      return;
    }
    rootView.findViewById(R.id.japaminfo).setVisibility(UserProfile.getUserProfile().isLoggedIn == true ? View.VISIBLE : View.GONE);
    ((TextView) rootView.findViewById(R.id.japam_count_over_all)).setText("" + UserProfile.getUserProfile().japam_count_over_all);
    ((TextView) rootView.findViewById(R.id.japam_count_satsang)).setText(UserProfile.getInstance().isjoinedsatsang == false ? "Not Joined to Satsang" : "" + UserProfile.getUserProfile().japam_count_satsang);
    ((TextView) rootView.findViewById(R.id.japam_count)).setText("" + UserProfile.getUserProfile().japam_count);

    final String NEW_FORMAT = "dd-MMM-yyyy";
    final String OLD_FORMAT = "yyyy-MM-dd HH:mm:ss";

    // August 12, 2010
    String oldDateString = UserProfile.getUserProfile().japam_last_updated_date;
    String newDateString = "";

    SimpleDateFormat sdf = new SimpleDateFormat(OLD_FORMAT);
    Date d = null;
    try {
      d = sdf.parse(oldDateString);
      sdf.applyPattern(NEW_FORMAT);
      newDateString = sdf.format(d);
    } catch (ParseException e) {
      e.printStackTrace();
    }

    ((TextView) rootView.findViewById(R.id.japam_last_updated_date)).setText(newDateString);
  }

  @Override
  public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {
    // Do something that differs the Activity's menu here
    super.onCreateOptionsMenu(menu, inflater);
    getBaseActivity().setMenuOption(menu);
    getBaseActivity().getMenuOption(MainActivity.MenuOptions.FEEDBACK);
  }

  @Override
  public boolean onOptionsItemSelected(MenuItem item) {
    switch (item.getItemId()) {
      case R.id.save:
        //saveClick();
        break;
      default:
        break;
    }

    return false;
  }

  private class GetAsyncRadioURL extends AsyncTask<String, Void, String> {
    String URLType = "";
    ArrayList<String> strURLList = new ArrayList<>();

    public GetAsyncRadioURL(String type) {
      this.URLType = type;
    }

    @Override
    protected void onPreExecute() {
      super.onPreExecute();

    }

    @Override
    protected String doInBackground(String... params) {

      // @BadSkillz codes with same changes
      try {
        DefaultHttpClient httpClient = new DefaultHttpClient();
        HttpGet httpGet = new HttpGet(params[0]);
        HttpResponse response = httpClient.execute(httpGet);
        HttpEntity entity = response.getEntity();

        BufferedHttpEntity buf = new BufferedHttpEntity(entity);

        InputStream is = buf.getContent();

        BufferedReader r = new BufferedReader(new InputStreamReader(is));

        StringBuilder total = new StringBuilder();
        String line;
        while ((line = r.readLine()) != null) {
          strURLList.add(line);
          total.append(line + "\n");
        }
        String result = total.toString();
        Log.i("Get URL", "Downloaded string: " + result);
        return result;
      } catch (Exception e) {
        Log.e("Get Url", "Error in downloading: " + e.toString());
      }
      return null;
    }

    @Override
    protected void onPostExecute(String result) {
      super.onPostExecute(result);

      if(strURLList!=null) {
        //India - URL
        if (URLType.compareToIgnoreCase("INDIA") == 0 && strURLList.size() > 0) {
          PreferenceData.getInstance(getActivity()).setValue(
              PreferenceData.PREFVALUES.DIRECT_RADIOURL_INDIA_URL1.toString(), strURLList.get(0));

          if (strURLList.size() > 1)
            PreferenceData.getInstance(getActivity()).setValue(
                PreferenceData.PREFVALUES.DIRECT_RADIOURL_INDIA_URL2.toString(), strURLList.get(1));
        }

        //Others - URL
        if (URLType.compareToIgnoreCase("OTHERS") == 0 && strURLList.size() > 0) {

          PreferenceData.getInstance(getActivity()).setValue(
              PreferenceData.PREFVALUES.DIRECT_RADIOURL_OTHERS_URL1.toString(), strURLList.get(0));

          if (strURLList.size() > 1)
            PreferenceData.getInstance(getActivity()).setValue(
                PreferenceData.PREFVALUES.DIRECT_RADIOURL_OTHERS_URL2.toString(), strURLList.get(1));

        }
      }

    }
  }

}


text:
from CIM14.IEC61970.Core.PowerSystemResource import PowerSystemResource

class ExcitationSystem(PowerSystemResource):
    """An excitation system provides the field voltage (Efd) for a synchronous machine model. It is linked to a specific generator by the Bus number and Unit ID.
    """

    def __init__(self, *args, **kw_args):
        """Initialises a new 'ExcitationSystem' instance.

        """
        super(ExcitationSystem, self).__init__(*args, **kw_args)

    _attrs = []
    _attr_types = {}
    _defaults = {}
    _enums = {}
    _refs = []
    _many_refs = []


text:
.PHONY: default build b tags

default:
	arduino --upload --board adafruit:avr:protrinket3 ADC_InterruptTest.ino

build b:
	arduino --verify --board adafruit:avr:protrinket3 ADC_InterruptTest.ino

tags:
	ctags -f tags --langmap=c++:.ino *.ino


text:
*evdev*
-------

This package provides bindings to the generic input event interface in
Linux. The *evdev* interface serves the purpose of passing events
generated in the kernel directly to userspace through character
devices that are typically located in ``/dev/input/``.

This package also comes with bindings to *uinput*, the userspace input
subsystem. *Uinput* allows userspace programs to create and handle
input devices that can inject events directly into the input
subsystem.

Documentation:
    http://python-evdev.readthedocs.io/en/latest/

Development:
    https://github.com/gvalkov/python-evdev

Package:
    http://pypi.python.org/pypi/evdev

Changelog:
    http://python-evdev.readthedocs.io/en/latest/changelog.html


text:
import baseCastPath from './_baseCastPath';
import isArguments from './isArguments';
import isArray from './isArray';
import isIndex from './_isIndex';
import isKey from './_isKey';
import isLength from './isLength';
import isString from './isString';
import last from './last';
import parent from './_parent';

/**
 * Checks if `path` exists on `object`.
 *
 * @private
 * @param {Object} object The object to query.
 * @param {Array|string} path The path to check.
 * @param {Function} hasFunc The function to check properties.
 * @returns {boolean} Returns `true` if `path` exists, else `false`.
 */
function hasPath(object, path, hasFunc) {
  if (object == null) {
    return false;
  }
  var result = hasFunc(object, path);
  if (!result && !isKey(path)) {
    path = baseCastPath(path);
    object = parent(object, path);
    if (object != null) {
      path = last(path);
      result = hasFunc(object, path);
    }
  }
  var length = object ? object.length : undefined;
  return result || (
    !!length && isLength(length) && isIndex(path, length) &&
    (isArray(object) || isString(object) || isArguments(object))
  );
}

export default hasPath;


text:
// --------------------------------------------------------------------------------------------------------------------
// <copyright file="AutofacCompositionContainerTest.cs" company="Kephas Software SRL">
//   Copyright (c) Kephas Software SRL. All rights reserved.
//   Licensed under the MIT license. See LICENSE file in the project root for full license information.
// </copyright>
// <summary>
//   Tests for <see cref="AutofacCompositionContainer" />.
// </summary>
// --------------------------------------------------------------------------------------------------------------------

namespace Kephas.Tests.Composition.Autofac
{
    using System;
    using System.Collections.Generic;
    using System.Diagnostics.CodeAnalysis;
    using System.Linq;

    using global::Autofac;
    using global::Autofac.Core.Registration;

    using Kephas.Composition;
    using Kephas.Composition.AttributedModel;
    using Kephas.Composition.Autofac.Hosting;
    using Kephas.Composition.Conventions;
    using Kephas.Composition.Hosting;
    using Kephas.Logging;
    using Kephas.Reflection;
    using Kephas.Services;
    using Kephas.Services.Composition;
    using Kephas.Services.Reflection;
    using Kephas.Testing.Composition;

    using NSubstitute;

    using NUnit.Framework;

    /// <summary>
    /// Tests for <see cref="AutofacCompositionContainer"/>.
    /// </summary>
    [TestFixture]
    [SuppressMessage("StyleCop.CSharp.DocumentationRules", "SA1600:ElementsMustBeDocumented", Justification = "Reviewed. Suppression is OK here.")]
    public class AutofacCompositionContainerTest : AutofacCompositionTestBase
    {
        public AutofacCompositionContainer CreateContainer(params Type[] types)
        {
            var builder = this.WithEmptyConfiguration();
            builder.RegisterTypes(types);
            return new AutofacCompositionContainer(builder);
        }

        [Test]
        public void GetExport_from_ambient_services_self()
        {
            var ambientServices = new AmbientServices();
            var container = this.CreateContainerWithBuilder(ambientServices);
            var containerExport = container.GetExport(typeof(IAmbientServices));
            var ambientExport = container.GetExport(typeof(IAmbientServices));

            Assert.IsNotNull(containerExport);
            Assert.AreSame(ambientExport, containerExport);
            Assert.AreSame(ambientServices, containerExport);
        }

        [Test]
        public void GetExport_from_ambient_services_instance()
        {
            var ambientServices = new AmbientServices();
            var container = this.CreateContainerWithBuilder(ambientServices);
            var containerExport = container.GetExport(typeof(ILogManager));
            var ambientExport = container.GetExport(typeof(ILogManager));

            Assert.IsNotNull(containerExport);
            Assert.AreSame(ambientExport, containerExport);
        }

        [Test]
        public void GetExport_from_ambient_services_instance_type()
        {
            var ambientServices = new AmbientServices();
            var container = this.CreateContainerWithBuilder(ambientServices);
            var containerExport = container.GetExport(typeof(ITypeLoader));
            var ambientExport = container.GetExport(typeof(ITypeLoader));

            Assert.IsNotNull(containerExport);
            Assert.AreSame(ambientExport, containerExport);
        }

        [Test]
        public void GetExport_success()
        {
            var container = this.CreateContainer(typeof(ExportedClass));
            var exported = container.GetExport(typeof(ExportedClass));

            Assert.IsNotNull(exported);
            Assert.IsInstanceOf<ExportedClass>(exported);
        }

        [Test]
        public void TryGetExport_success()
        {
            var container = this.CreateContainer(typeof(ExportedClass));
            var exported = container.TryGetExport(typeof(ExportedClass));

            Assert.IsNotNull(exported);
            Assert.IsInstanceOf<ExportedClass>(exported);
        }

        [Test]
        public void TryGetExport_failure()
        {
            var container = this.CreateContainer();
            var exported = container.TryGetExport(typeof(ExportedClass));

            Assert.IsNull(exported);
        }

        [Test]
        public void GetExport_generic_success()
        {
            var container = this.CreateContainer(typeof(ExportedClass));
            var exported = container.GetExport<ExportedClass>();

            Assert.IsNotNull(exported);
            Assert.IsInstanceOf<ExportedClass>(exported);
        }

        [Test]
        public void TryGetExport_generic_success()
        {
            var container = this.CreateContainer(typeof(ExportedClass));
            var exported = container.TryGetExport<ExportedClass>();

            Assert.IsNotNull(exported);
            Assert.IsInstanceOf<ExportedClass>(exported);
        }

        [Test]
        public void TryGetExport_generic_failure()
        {
            var container = this.CreateContainer();
            var exported = container.TryGetExport<ExportedClass>();

            Assert.IsNull(exported);
        }

        [Test]
        public void GetExport_failure()
        {
            var container = this.CreateContainer();
            Assert.Throws<ComponentNotRegisteredException>(() => container.GetExport(typeof(ExportedClass)));
        }

        [Test]
        public void GetExports_success()
        {
            var container = this.CreateContainer(typeof(ExportedClass));
            var exported = container.GetExports(typeof(ExportedClass));

            Assert.IsNotNull(exported);
            var exportedList = exported.ToList();
            Assert.AreEqual(1, exportedList.Count);
            Assert.IsInstanceOf<ExportedClass>(exportedList[0]);
        }

        [Test]
        public void GetExports_empty()
        {
            var container = this.CreateContainer(typeof(ExportedClass));
            var exported = container.GetExports(typeof(string));

            Assert.IsNotNull(exported);
            var exportedList = exported.ToList();
            Assert.AreEqual(0, exportedList.Count);
        }

        [Test]
        public void GetExports_various_same_contract_registrations()
        {
            var container = this.CreateContainer(
                parts: new[] { typeof(IFilter), typeof(OneFilter), typeof(TwoFilter) },
                config: b => { b.WithConventionsRegistrar(new MultiFilterConventionsRegistrar()); });

            var filters = container.GetExports(typeof(IFilter));

            Assert.AreEqual(3, filters.Count());
            Assert.IsTrue(filters.OfType<OneFilter>().Any());
            Assert.IsTrue(filters.OfType<TwoFilter>().Any());
        }

        [Test]
        public void GetService_various_same_contract_registrations()
        {
            var container = this.CreateContainer(
                parts: new[] { typeof(IFilter), typeof(OneFilter), typeof(TwoFilter) },
                config: b => { b.WithConventionsRegistrar(new MultiFilterConventionsRegistrar()); });

            var rawFilters = container.ToServiceProvider().GetService(typeof(IEnumerable<IFilter>));
            var filters = rawFilters as IEnumerable<IFilter>;

            Assert.AreEqual(3, filters.Count());
            Assert.IsTrue(filters.OfType<OneFilter>().Any());
            Assert.IsTrue(filters.OfType<TwoFilter>().Any());
        }

        [Test]
        public void Dispose()
        {
            var container = this.CreateContainer();
            container.Dispose();
            Assert.Throws<ObjectDisposedException>(() => container.TryGetExport<IList<string>>());
        }

        [Test]
        public void Dispose_multiple()
        {
            var container = this.CreateContainer();
            container.Dispose();
            container.Dispose();
        }

        [Test]
        public void CreateScopedContext_ScopeExportedClass()
        {
            var container = this.CreateContainerWithBuilder(
                b => b.WithRegistration(
                    new AppServiceInfo(
                        typeof(ScopeExportedClass),
                        typeof(ScopeExportedClass),
                        AppServiceLifetime.Scoped)));
            using (var scopedContext = container.CreateScopedContext())
            using (var otherScopedContext = container.CreateScopedContext())
            {
                var scopedInstance1 = scopedContext.GetExport<ScopeExportedClass>();
                var scopedInstance2 = scopedContext.GetExport<ScopeExportedClass>();

                Assert.AreSame(scopedInstance1, scopedInstance2);

                var otherScopedInstance = otherScopedContext.GetExport<ScopeExportedClass>();
                Assert.AreNotSame(scopedInstance1, otherScopedInstance);
            }
        }

        [Test]
        public void GetExport_ambient_services()
        {
            var ambientServices = new AmbientServices();
            var service = Substitute.For<IAsyncInitializable>();
            ambientServices.Register(typeof(IAsyncInitializable), service);

            var container = this.CreateContainerWithBuilder(ambientServices);

            var actualService = container.GetExport<IAsyncInitializable>();
            Assert.AreSame(service, actualService);
        }

        [Test]
        public void GetExport_ambient_services_factory()
        {
            var ambientServices = new AmbientServices();
            ambientServices.RegisterTransient(typeof(IAsyncInitializable), () => Substitute.For<IAsyncInitializable>());

            var container = this.CreateContainerWithBuilder(ambientServices);

            var service1 = container.GetExport<IAsyncInitializable>();
            var service2 = container.GetExport<IAsyncInitializable>();
            Assert.AreNotSame(service1, service2);
        }

        [Test]
        public void GetExport_ambient_services_not_available_after_first_failed_request()
        {
            var ambientServices = new AmbientServices();
            var container = this.CreateContainerWithBuilder(ambientServices);

            var service = container.TryGetExport<IAsyncInitializable>();
            Assert.IsNull(service);

            ambientServices.Register(typeof(IAsyncInitializable), () => Substitute.For<IAsyncInitializable>());

            // This is null because the composition container caches the export providers, and after a first request
            // when the export was not available, will cache the empty export providers.
            service = container.TryGetExport<IAsyncInitializable>();
            Assert.IsNull(service);
        }

        //[Export]
        //[Scoped(CompositionScopeNames.Default)]
        public class ScopeExportedClass
        {
            public ICompositionContext CompositionContext { get; }

            //[ImportingConstructor]
            public ScopeExportedClass(ICompositionContext compositionContext)
            {
                this.CompositionContext = compositionContext;
            }
        }

        //[Export]
        public class ExportedClass
        {
        }

        //[Export]
        public class ExportedClassImplicitImporter
        {
            public ExportedClass ExportedClass { get; set; }
        }

        //[Export]
        public class ExportedClassImplicitFactoryImporter
        {
            public IExportFactory<ExportedClass> ExportedClassFactory { get; set; }
        }

        //[Export]
        public class ExportedClassImplicitManyFactoryImporter
        {
            public ICollection<IExportFactory<ExportedClass>> ExportedClassFactoryCollection { get; set; }
            public IList<IExportFactory<ExportedClass>> ExportedClassFactoryList { get; set; }
            public IEnumerable<IExportFactory<ExportedClass>> ExportedClassFactoryEnumerable { get; set; }
            public IExportFactory<ExportedClass>[] ExportedClassFactoryArray { get; set; }
        }

        public class TestMetadata : AppServiceMetadata
        {
            public TestMetadata(IDictionary<string, object?> metadata)
                : base(metadata)
            {
            }
        }

        public class MultiFilterConventionsRegistrar : IConventionsRegistrar
        {
            public void RegisterConventions(
                IConventionsBuilder builder,
                IList<Type> candidateTypes,
                ICompositionRegistrationContext registrationContext)
            {
                builder.ForType(typeof(OneFilter)).ExportInterface(
                    typeof(IFilter),
                    (t, b) => b.AsContractType(typeof(IFilter)))
                    .Singleton();
                builder.ForType(typeof(TwoFilter)).ExportInterface(
                        typeof(IFilter),
                        (t, b) => b.AsContractType(typeof(IFilter)));
                builder.ForInstance(typeof(IFilter), Substitute.For<IFilter>());
            }
        }

        public interface IFilter { }

        public class OneFilter : IFilter { }

        public class TwoFilter : IFilter { }
    }
}


text:
/**
 * Application utility functions
 *
 * @module
 */

var bluebird= require("bluebird");

/**
 * provides the proper response for routes
 *
 */
var responseHandler = function (req, res, dbFunc, socketFunc) {
	return bluebird.try(function () {
		return dbFunc();
	})
	.then(function (result) {
		res.json(result);
		if (socketFunc) {
			//add the code that sends the data through the socket
			//socket.sendHandler(reqObj);
		}
		return bluebird.resolve();
	})
	.catch(function (err) {
		console.log("Request Failed.", err.stack);
		var status = err.status || 500;
		res.status(status);
		res.json(err.message);
	});
};

module.exports = {
	responseHandler: responseHandler
};


text:
/** @file common.cpp Common code for the VSR package file tools.

  @todo Proper documentation.
 */

#include "common.h"
#include <errno.h>
#include <vector>

FILEHandle::FILEHandle(const std::string &fname, const char perms[])
{
	file = fopen(fname.c_str(), perms);
	if (!file)
		throw errno;
}


text:
package fake

import (
	authorizationapi "k8s.io/kubernetes/pkg/apis/authorization/v1beta1"
	"k8s.io/kubernetes/pkg/client/testing/core"
)

func (c *FakeLocalSubjectAccessReviews) Create(sar *authorizationapi.LocalSubjectAccessReview) (result *authorizationapi.LocalSubjectAccessReview, err error) {
	obj, err := c.Fake.Invokes(core.NewCreateAction(authorizationapi.SchemeGroupVersion.WithResource("localsubjectaccessreviews"), c.ns, sar), &authorizationapi.SubjectAccessReview{})
	return obj.(*authorizationapi.LocalSubjectAccessReview), err
}


text:
#include <aws/ds/model/CreateComputerRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>

#include <utility>

using namespace Aws::DirectoryService::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;

CreateComputerRequest::CreateComputerRequest() :
    m_directoryIdHasBeenSet(false),
    m_computerNameHasBeenSet(false),
    m_passwordHasBeenSet(false),
    m_organizationalUnitDistinguishedNameHasBeenSet(false),
    m_computerAttributesHasBeenSet(false)
{
}

Aws::String CreateComputerRequest::SerializePayload() const
{
  JsonValue payload;

  if(m_directoryIdHasBeenSet)
  {
   payload.WithString("DirectoryId", m_directoryId);

  }

  if(m_computerNameHasBeenSet)
  {
   payload.WithString("ComputerName", m_computerName);

  }

  if(m_passwordHasBeenSet)
  {
   payload.WithString("Password", m_password);

  }

  if(m_organizationalUnitDistinguishedNameHasBeenSet)
  {
   payload.WithString("OrganizationalUnitDistinguishedName", m_organizationalUnitDistinguishedName);

  }

  if(m_computerAttributesHasBeenSet)
  {
   Array<JsonValue> computerAttributesJsonList(m_computerAttributes.size());
   for(unsigned computerAttributesIndex = 0; computerAttributesIndex < computerAttributesJsonList.GetLength(); ++computerAttributesIndex)
   {
     computerAttributesJsonList[computerAttributesIndex].AsObject(m_computerAttributes[computerAttributesIndex].Jsonize());
   }
   payload.WithArray("ComputerAttributes", std::move(computerAttributesJsonList));

  }

  return payload.WriteReadable();
}

Aws::Http::HeaderValueCollection CreateComputerRequest::GetRequestSpecificHeaders() const
{
  Aws::Http::HeaderValueCollection headers;
  headers.insert(Aws::Http::HeaderValuePair("X-Amz-Target", "DirectoryService_20150416.CreateComputer"));
  return headers;

}


text:
namespace WebResourceLinkerVsix
{
    partial class CrmConnection
    {
        /// <summary>
        /// Required designer variable.
        /// </summary>
        private System.ComponentModel.IContainer components = null;

        /// <summary>
        /// Clean up any resources being used.
        /// </summary>
        /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
        protected override void Dispose(bool disposing)
        {
            if (disposing && (components != null))
            {
                components.Dispose();
            }
            base.Dispose(disposing);
        }

        #region Windows Form Designer generated code

        /// <summary>
        /// Required method for Designer support - do not modify
        /// the contents of this method with the code editor.
        /// </summary>
        private void InitializeComponent()
        {
            this.label1 = new System.Windows.Forms.Label();
            this.discourl = new System.Windows.Forms.TextBox();
            this.domain = new System.Windows.Forms.TextBox();
            this.label2 = new System.Windows.Forms.Label();
            this.username = new System.Windows.Forms.TextBox();
            this.label3 = new System.Windows.Forms.Label();
            this.password = new System.Windows.Forms.TextBox();
            this.label4 = new System.Windows.Forms.Label();
            this.uniqueorgname = new System.Windows.Forms.TextBox();
            this.label5 = new System.Windows.Forms.Label();
            this.connect = new System.Windows.Forms.Button();
            this.status = new System.Windows.Forms.StatusStrip();
            this.statusmsg = new System.Windows.Forms.ToolStripStatusLabel();
            this.status.SuspendLayout();
            this.SuspendLayout();
            //
            // label1
            //
            this.label1.AutoSize = true;
            this.label1.Location = new System.Drawing.Point(13, 13);
            this.label1.Name = "label1";
            this.label1.Size = new System.Drawing.Size(73, 13);
            this.label1.TabIndex = 0;
            this.label1.Text = "Discovery Url";
            //
            // discourl
            //
            this.discourl.Location = new System.Drawing.Point(12, 29);
            this.discourl.Name = "discourl";
            this.discourl.Size = new System.Drawing.Size(368, 22);
            this.discourl.TabIndex = 1;
            //
            // domain
            //
            this.domain.Location = new System.Drawing.Point(12, 70);
            this.domain.Name = "domain";
            this.domain.Size = new System.Drawing.Size(200, 22);
            this.domain.TabIndex = 3;
            //
            // label2
            //
            this.label2.AutoSize = true;
            this.label2.Location = new System.Drawing.Point(13, 54);
            this.label2.Name = "label2";
            this.label2.Size = new System.Drawing.Size(47, 13);
            this.label2.TabIndex = 2;
            this.label2.Text = "Domain";
            //
            // username
            //
            this.username.Location = new System.Drawing.Point(12, 111);
            this.username.Name = "username";
            this.username.Size = new System.Drawing.Size(200, 22);
            this.username.TabIndex = 5;
            //
            // label3
            //
            this.label3.AutoSize = true;
            this.label3.Location = new System.Drawing.Point(13, 95);
            this.label3.Name = "label3";
            this.label3.Size = new System.Drawing.Size(58, 13);
            this.label3.TabIndex = 4;
            this.label3.Text = "Username";
            //
            // password
            //
            this.password.Location = new System.Drawing.Point(12, 152);
            this.password.Name = "password";
            this.password.PasswordChar = '*';
            this.password.Size = new System.Drawing.Size(200, 22);
            this.password.TabIndex = 7;
            //
            // label4
            //
            this.label4.AutoSize = true;
            this.label4.Location = new System.Drawing.Point(13, 136);
            this.label4.Name = "label4";
            this.label4.Size = new System.Drawing.Size(56, 13);
            this.label4.TabIndex = 6;
            this.label4.Text = "Password";
            //
            // uniqueorgname
            //
            this.uniqueorgname.Location = new System.Drawing.Point(12, 193);
            this.uniqueorgname.Name = "uniqueorgname";
            this.uniqueorgname.Size = new System.Drawing.Size(200, 22);
            this.uniqueorgname.TabIndex = 9;
            //
            // label5
            //
            this.label5.AutoSize = true;
            this.label5.Location = new System.Drawing.Point(13, 177);
            this.label5.Name = "label5";
            this.label5.Size = new System.Drawing.Size(148, 13);
            this.label5.TabIndex = 8;
            this.label5.Text = "Unique Organization Name";
            //
            // connect
            //
            this.connect.Location = new System.Drawing.Point(12, 221);
            this.connect.Name = "connect";
            this.connect.Size = new System.Drawing.Size(90, 30);
            this.connect.TabIndex = 10;
            this.connect.Text = "Connect";
            this.connect.UseVisualStyleBackColor = true;
            this.connect.Click += new System.EventHandler(this.connect_Click);
            //
            // status
            //
            this.status.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
            this.statusmsg});
            this.status.Location = new System.Drawing.Point(0, 261);
            this.status.Name = "status";
            this.status.Size = new System.Drawing.Size(392, 22);
            this.status.SizingGrip = false;
            this.status.TabIndex = 11;
            //
            // statusmsg
            //
            this.statusmsg.Name = "statusmsg";
            this.statusmsg.Size = new System.Drawing.Size(16, 17);
            this.statusmsg.Text = "...";
            //
            // CrmConnection
            //
            this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
            this.ClientSize = new System.Drawing.Size(392, 283);
            this.Controls.Add(this.status);
            this.Controls.Add(this.connect);
            this.Controls.Add(this.uniqueorgname);
            this.Controls.Add(this.label5);
            this.Controls.Add(this.password);
            this.Controls.Add(this.label4);
            this.Controls.Add(this.username);
            this.Controls.Add(this.label3);
            this.Controls.Add(this.domain);
            this.Controls.Add(this.label2);
            this.Controls.Add(this.discourl);
            this.Controls.Add(this.label1);
            this.Font = new System.Drawing.Font("Segoe UI", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
            this.MaximizeBox = false;
            this.Name = "CrmConnection";
            this.ShowIcon = false;
            this.SizeGripStyle = System.Windows.Forms.SizeGripStyle.Hide;
            this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
            this.Text = "Connect to CRM";
            this.Load += new System.EventHandler(this.CrmConnection_Load);
            this.status.ResumeLayout(false);
            this.status.PerformLayout();
            this.ResumeLayout(false);
            this.PerformLayout();

        }

        #endregion

        private System.Windows.Forms.Label label1;
        private System.Windows.Forms.TextBox discourl;
        private System.Windows.Forms.TextBox domain;
        private System.Windows.Forms.Label label2;
        private System.Windows.Forms.TextBox username;
        private System.Windows.Forms.Label label3;
        private System.Windows.Forms.TextBox password;
        private System.Windows.Forms.Label label4;
        private System.Windows.Forms.TextBox uniqueorgname;
        private System.Windows.Forms.Label label5;
        private System.Windows.Forms.Button connect;
        private System.Windows.Forms.StatusStrip status;
        private System.Windows.Forms.ToolStripStatusLabel statusmsg;
    }
}


text:
title: "Before the Workshop"
weight: 10
description: Action items to prepare for the workshop
---

### Two weeks before

* Identify scope of workshop
    * What is your goal?
    * What specific project will this workshop cover?
* Identify workshop participants
    * Select a diverse group of community members who are willing to work together. Where possible, they should represent as many aspects of the project as possible.
    * Suggestion: This workshop works best online with no more than 12 participants, assuming 3 breakout groups of no more than 4 people.
* Identify workshop facilitators
    * One facilitator (who is not a participant)
    * One notetaker (see [Notetaker Guidance template](../../templates/#notetaker-guidance))

* Invite members to the workshop
    * Suggested Copy: [Workshop Invitation](../../templates/#workshop-invitation)

* Create calendar invites for Attendees, including links to a copy of the facilitator deck
    * Suggestion: ensure copy is emailed and also in the invite agenda. Not all participants will use the same collaboration tools.
    * Suggested Copy: [Meeting Invite](../../templates/#meeting-invite)

### Three Days Before

* Create copies of Worksheets for each breakout session

## Pre-workshop Facilitator Prep

* Meet with notetaker to review workshop cadence and discuss roles


text:
package io.shardingsphere.core.parsing.parser.dialect.oracle.clause.facade;

import io.shardingsphere.core.parsing.lexer.LexerEngine;
import io.shardingsphere.core.parsing.parser.clause.facade.AbstractDeleteClauseParserFacade;
import io.shardingsphere.core.parsing.parser.dialect.oracle.clause.OracleTableReferencesClauseParser;
import io.shardingsphere.core.parsing.parser.dialect.oracle.clause.OracleWhereClauseParser;
import io.shardingsphere.core.rule.ShardingRule;

/**
 * Delete clause parser facade for Oracle.
 *
 * @author zhangliang
 */
public final class OracleDeleteClauseParserFacade extends AbstractDeleteClauseParserFacade {

    public OracleDeleteClauseParserFacade(final ShardingRule shardingRule, final LexerEngine lexerEngine) {
        super(new OracleTableReferencesClauseParser(shardingRule, lexerEngine), new OracleWhereClauseParser(lexerEngine));
    }
}


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

import groovy.lang.Binding;
import instrumentj.Main;

import java.io.IOException;
import java.io.InputStream;
import java.io.PrintStream;
import java.net.Socket;
import java.util.logging.Level;
import java.util.logging.Logger;

import org.codehaus.groovy.tools.shell.Groovysh;
import org.codehaus.groovy.tools.shell.IO;

/**
 * @author Stephen Evanchik (evanchsa@gmail.com)
 *
 */
public class GroovyShellSession implements Runnable {

    private static final Logger logger = Logger.getLogger(GroovyShellSession.class.getName());

    private static final String OUT_KEY = "out";

    private final Binding binding;

    private final Socket socket;

    public GroovyShellSession(final Socket socket, final Binding binding) {
        if (socket == null) {
            throw new NullPointerException("socket");
        }

        if (binding == null) {
            throw new NullPointerException("binding");
        }

        this.socket = socket;
        this.binding = binding;
    }

    @Override
    public void run() {
        PrintStream out = null;
        InputStream in = null;

        try {
            out = new PrintStream(socket.getOutputStream());
            in = socket.getInputStream();

            binding.setVariable(OUT_KEY, out);

            final IO io = new IO(in, out, out);
            final Groovysh groovy = new Groovysh(Main.class.getClassLoader(), binding, io);

            try {
                groovy.run();
            } catch (final Exception e) {
                logger.log(Level.SEVERE, "Exception encountered while running shell", e);
            }

            if (!socket.isClosed()) {
                socket.close();
            }

        } catch (final Exception e) {
            logger.log(Level.SEVERE, "Exception encountered while creating shell", e);
        } finally {
            if (out != null) {
                try {
                    out.close();
                } catch (final Exception e) {
                    // Intentionally left blank
                }
            }

            if (in != null) {
                try {
                    in.close();
                } catch (final Exception e) {
                    // Intentionally left blank
                }
            }
        }
    }

    /**
     *
     */
    public synchronized void stop() {
        try {
            if (!socket.isClosed()) {
                try {
                    socket.close();
                } catch (final IOException e) {
                    // Intentionally left blank;
                }
            }
        } catch (final Exception e) {
            // Intentionally left blank
        }
    }
}