text:
function [cc,ll,l]=huffman(p,a)
%HUFFMAN calculates a D-ary huffman code [CC,LL]=(P,A)
%
%  Inputs:  P        is a vector or matrix of probabilities
%           A(D)     is a vector of alphabet characters either integers of chars [default: '01']
%                    the length of A determines the order of the code
%
% Outputs:  CC       is a cell array containing the code for each symbol with the sme shape as P
%           LL       is a vector or matrix of code lengths with the sme shape as P
%           L        is the average code length

%	   Copyright (C) Mike Brookes 1995
%      Version: $Id: huffman.m 713 2011-10-16 14:45:43Z dmb $
%
%   VOICEBOX is a MATLAB toolbox for speech processing.
%   Home page: http://www.ee.ic.ac.uk/hp/staff/dmb/voicebox/voicebox.html
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%   This program is free software; you can redistribute it and/or modify
%   it under the terms of the GNU General Public License as published by
%   the Free Software Foundation; either version 2 of the License, or
%   (at your option) any later version.
%
%   This program is distributed in the hope that it will be useful,
%   but WITHOUT ANY WARRANTY; without even the implied warranty of
%   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
%   GNU General Public License for more details.
%
%   You can obtain a copy of the GNU General Public License from
%   http://www.gnu.org/copyleft/gpl.html or by writing to
%   Free Software Foundation, Inc.,675 Mass Ave, Cambridge, MA 02139, USA.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

np=length(p(:));
if nargin <2
    a='01';
end
d=length(a);

% first append additional zeros-probability symbols to ensure a full code tree

nx=np+mod(1-np,d-1);
px=zeros(nx,1);
px(1:np)=p(:);

cl=(nx-1)/(d-1);        % max potential code length
cd=zeros(nx,cl);        % code array
qx=px;
ix=(1:nx)';
dd=(d:-1:1)';
kx=zeros(nx,1);
for i=cl:-1:1
    nc=1+i*(d-1);
    [rx,jx]=sort(qx);   % find the D smallest probabilities
    kx(jx)=(1:nc)';          % create a reverse index
    cd(:,i)=kx(ix);
    ix=max(kx(ix)-d+1,1);
    rx(d)=sum(rx(1:d));
    qx=rx(d:end);
end
cc=cell(size(p));
ll=zeros(size(p));
for i=1:np
    ci=cd(i,cd(i,:)<=d);
    ll(i) = length(ci);
    cc{i}=a(ci);
end
l=p(:)'*ll(:)/sum(p(:));      % calculate average length


text:
"""MQTT client

.. module:: network.jms.mqtt_client
   :platform: Unix
   :synopsis: MQTT client
.. moduleauthor:: Petr Rašek <bowman@hydratk.org>

"""

"""
Events:
-------
jms_before_connect
jms_after_connect
jms_before_send
jms_after_send
jms_before_receive
jms_after_receive

"""

from hydratk.core.masterhead import MasterHead
from hydratk.core import event
from paho.mqtt.client import Client
from paho.mqtt import MQTTException
from socket import error, setdefaulttimeout
from time import time

class JMSClient(object):
    """Class JMSClient
    """

    _mh = None
    _client = None
    _host = None
    _port = None
    _user = None
    _passw = None
    _verbose = None
    _is_connected = None
    _messages = []

    def __init__(self, verbose=False):
        """Class constructor

        Called when the object is initialized

        Args:
           verbose (bool): verbose mode

        """

        try:

            self._mh = MasterHead.get_head()

            self._client = Client()
            self._client.on_message = self._on_message

            self._verbose = verbose
            if (self._verbose):
                self._client.on_log = self._on_log

        except MQTTException as ex:
            self._mh.demsg('htk_on_error', ex, self._mh.fromhere())

    @property
    def client(self):
        """ MQTT client property getter """

        return self._client

    @property
    def host(self):
        """ server host property getter """

        return self._host

    @property
    def port(self):
        """ server port property getter """

        return self._port

    @property
    def user(self):
        """ username property getter """

        return self._user

    @property
    def passw(self):
        """ user password property getter """

        return self._passw

    @property
    def verbose(self):
        """ verbose property getter """

        return self._verbose

    @property
    def is_connected(self):
        """ is_connected property getter """

        return self._is_connected

    def _on_log(self, client, obj, level, string):
        """ Callback for on_log event """

        print(string)

    def _on_message(self, client, obj, msg):
        """ Callback for on_message event """

        self._messages.append(msg.payload.decode())

    def connect(self, host, port=1883, user=None, passw=None, timeout=10):
        """Method connects to server

        Args:
           host (str): hostname
           port (str): port
           user (str): username
           passw (str): password
           timeout (int): timeout

        Returns:
           bool: result

        Raises:
           event: jms_before_connect
           event: jms_after_connected

        """

        try:

            msg = 'host:{0}, port:{1}, user:{2}, passw:{3}, timeout:{4}'.format(
                host, port, user, passw, timeout)
            self._mh.demsg('htk_on_debug_info', self._mh._trn.msg(
                'htk_jms_connecting', msg), self._mh.fromhere())

            ev = event.Event(
                'jms_before_connect', host, port, user, passw, timeout)
            if (self._mh.fire_event(ev) > 0):
                host = ev.argv(0)
                port = ev.argv(1)
                user = ev.argv(2)
                passw = ev.argv(3)
                timeout = ev.argv(4)

            self._host = host
            self._port = port
            self._user = user
            self._passw = passw

            if (ev.will_run_default()):
                if (self._user != None):
                    self._client.username_pw_set(self._user, self._passw)

                setdefaulttimeout(timeout)
                self._client.connect(self._host, self._port)
                self._is_connected = True

            self._mh.demsg('htk_on_debug_info', self._mh._trn.msg(
                'htk_jms_connected'), self._mh.fromhere())
            ev = event.Event('jms_after_connect')
            self._mh.fire_event(ev)

            return True

        except (MQTTException, error, ValueError) as ex:
            self._mh.demsg('htk_on_error', ex, self._mh.fromhere())
            return False

    def disconnect(self):
        """Method disconnects from server

        Args:
           none

        Returns:
           bool: result

        """

        try:

            self._mh.demsg('htk_on_debug_info', self._mh._trn.msg(
                'htk_jms_disconnecting'), self._mh.fromhere())

            if (not self._is_connected):
                self._mh.demsg('htk_on_warning', self._mh._trn.msg(
                    'htk_jms_not_connected'), self._mh.fromhere())
                return False
            else:
                self._client.disconnect()
                self._is_connected = False
                self._mh.demsg('htk_on_debug_info', self._mh._trn.msg(
                    'htk_jms_disconnected'), self._mh.fromhere())
                return True

        except (MQTTException, error, ValueError) as ex:
            self._mh.demsg('htk_on_error', ex, self._mh.fromhere())
            return False

    def send(self, destination_name, message):
        """Method sends message

        Args:
           destination_name (str): topic name
           message (str): message

        Returns:
           bool: result

        Raises:
           event: jms_before_send
           event: jms_after_send

        """

        try:

            msg = 'destination_name:{0}, message:{1}'.format(
                destination_name, message)
            self._mh.demsg('htk_on_debug_info', self._mh._trn.msg(
                'htk_jms_sending_msg', msg), self._mh.fromhere())

            if (not self._is_connected):
                self._mh.demsg('htk_on_warning', self._mh._trn.msg(
                    'htk_jms_not_connected'), self._mh.fromhere())
                return False

            ev = event.Event('jms_before_send', destination_name, message)
            if (self._mh.fire_event(ev) > 0):
                destination_name = ev.argv(0)
                message = ev.argv(1)

            if (ev.will_run_default()):
                res, id = self._client.publish(destination_name, message)

                if (res != 0):
                    self._mh.demsg('htk_on_error', self._mh._trn.msg(
                        'htk_jms_sending_error'), self._mh.fromhere())

            self._mh.demsg('htk_on_debug_info', self._mh._trn.msg(
                'htk_jms_msg_sent'), self._mh.fromhere())
            ev = event.Event('jms_after_send')
            self._mh.fire_event(ev)

            return True

        except (MQTTException, error, ValueError) as ex:
            self._mh.demsg('htk_on_error', ex, self._mh.fromhere())
            return False

    def receive(self, destination_name, cnt=1, timeout=10):
        """Method receives messages

        Args:
           destination_name (str): queue name
           cnt (int): count of messages
           timeout (int): timeout to receive message

        Returns:
           list:  messages

        Raises:
           event: jms_before_receive
           event: jms_after_receive

        """

        try:

            msg = 'destination_name:{0}, count:{1}'.format(
                destination_name, cnt)
            self._mh.demsg('htk_on_debug_info', self._mh._trn.msg(
                'htk_jms_receiving_msg', msg), self._mh.fromhere())

            if (not self._is_connected):
                self._mh.demsg('htk_on_warning', self._mh._trn.msg(
                    'htk_jms_not_connected'), self._mh.fromhere())
                return None

            ev = event.Event('jms_before_receive', destination_name, cnt)
            if (self._mh.fire_event(ev) > 0):
                destination_name = ev.argv(0)
                cnt = ev.argv(1)

            if (ev.will_run_default()):
                res, id = self._client.subscribe(destination_name)
                if (res != 0):
                    self._mh.demsg('htk_on_error', self._mh._trn.msg(
                        'htk_jms_sending_error'), self._mh.fromhere())
                    return None

                res = 0
                cnt_before = 0
                start = time()
                while (res == 0):
                    res = self._client.loop()
                    cnt_after = len(self._messages)
                    if (cnt_after > cnt_before and cnt_after < cnt):
                        cnt_before = cnt_after
                    elif (cnt_after == cnt or time() > start + timeout):
                        res = -1

                messages = self._messages
                self._client.unsubscribe(destination_name)
                self._messages = []

            self._mh.demsg('htk_on_debug_info', self._mh._trn.msg(
                'htk_jms_msg_received', len(messages)), self._mh.fromhere())
            ev = event.Event('jms_after_receive')
            self._mh.fire_event(ev)

            return messages

        except (MQTTException, error, ValueError) as ex:
            self._mh.demsg('htk_on_error', ex, self._mh.fromhere())
            return None

redpajama_set_name: RedPajamaGithub


text:
package org.apache.streams.dropwizard;

import com.fasterxml.jackson.databind.ObjectMapper;
import com.fasterxml.jackson.databind.node.ObjectNode;
import com.google.common.base.Splitter;
import com.google.common.collect.Queues;
import org.apache.streams.core.StreamsDatum;
import org.apache.streams.core.StreamsProvider;
import org.apache.streams.core.StreamsResultSet;
import org.apache.streams.jackson.StreamsJacksonMapper;
import org.apache.streams.util.ComponentUtils;
import org.joda.time.DateTime;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import javax.annotation.Resource;
import javax.ws.rs.Consumes;
import javax.ws.rs.POST;
import javax.ws.rs.Path;
import javax.ws.rs.Produces;
import javax.ws.rs.core.Context;
import javax.ws.rs.core.HttpHeaders;
import javax.ws.rs.core.MediaType;
import javax.ws.rs.core.Response;
import java.math.BigInteger;
import java.util.List;
import java.util.Queue;
import java.util.concurrent.ConcurrentLinkedQueue;
import java.util.concurrent.locks.ReadWriteLock;
import java.util.concurrent.locks.ReentrantReadWriteLock;
import java.util.regex.Pattern;

/**
 * GenericWebhookResource provides basic webhook connectivity.
 *
 * Add processors / persistWriters that read from "GenericWebhookResource" to
 * consume data posted to streams.
 */
@Resource
@Path("/streams/webhooks")
@Produces(MediaType.APPLICATION_JSON)
@Consumes(MediaType.APPLICATION_JSON)
public class GenericWebhookResource implements StreamsProvider {

    public GenericWebhookResource() {
    }

    private static final Logger log = LoggerFactory
            .getLogger(GenericWebhookResource.class);

    private static ObjectMapper mapper = StreamsJacksonMapper.getInstance();

    protected Queue<StreamsDatum> providerQueue = new ConcurrentLinkedQueue<>();

    protected final ReadWriteLock lock = new ReentrantReadWriteLock();

    private static Pattern newLinePattern = Pattern.compile("(\\r\\n?|\\n)", Pattern.MULTILINE);

    @POST
    @Path("json")
    public Response json(@Context HttpHeaders headers,
                                  String body) {

        ObjectNode response = mapper.createObjectNode();
        int responseCode = Response.Status.BAD_REQUEST.getStatusCode();

        try {
            ObjectNode item = mapper.readValue(body, ObjectNode.class);

            StreamsDatum datum = new StreamsDatum(body);

            lock.writeLock().lock();
            ComponentUtils.offerUntilSuccess(datum, providerQueue);
            lock.writeLock().unlock();

            Boolean success = true;

            response.put("success", success);

            responseCode = Response.Status.OK.getStatusCode();

        } catch (Exception e) {
            log.warn(e.toString(), e);

            Boolean success = false;

            response.put("success", success);
            responseCode = Response.Status.BAD_REQUEST.getStatusCode();

        } finally {
            return Response.status(responseCode).entity(response).build();

        }
    }

    @POST
    @Path("json_new_line")
    public Response json_new_line(@Context HttpHeaders headers,
                                           String body) {

        ObjectNode response = mapper.createObjectNode();
        int responseCode = Response.Status.BAD_REQUEST.getStatusCode();

        if (body.equalsIgnoreCase("{}")) {

            Boolean success = true;

            response.put("success", success);
            responseCode = Response.Status.OK.getStatusCode();
            return Response.status(responseCode).entity(response).build();
        }

        try {

            for( String line : Splitter.on(newLinePattern).split(body)) {
                ObjectNode item = mapper.readValue(line, ObjectNode.class);

                StreamsDatum datum = new StreamsDatum(item);

                lock.writeLock().lock();
                ComponentUtils.offerUntilSuccess(datum, providerQueue);
                lock.writeLock().unlock();

            }

            Boolean success = true;

            response.put("success", success);
            responseCode = Response.Status.OK.getStatusCode();

        } catch (Exception e) {
            log.warn(e.toString(), e);

            Boolean success = false;

            response.put("success", success);
            responseCode = Response.Status.BAD_REQUEST.getStatusCode();

        } finally {
            return Response.status(responseCode).entity(response).build();

        }

    }

    @POST
    @Path("json_meta")
    public Response json_meta(@Context HttpHeaders headers,
                                       String body) {

        ObjectNode response = mapper.createObjectNode();
        int responseCode = Response.Status.BAD_REQUEST.getStatusCode();

        if (body.equalsIgnoreCase("{}")) {

            Boolean success = true;

            response.put("success", success);
            responseCode = Response.Status.OK.getStatusCode();

            return Response.status(responseCode).entity(response).build();
        }

        try {

            GenericWebhookData objectWrapper = mapper.readValue(body, GenericWebhookData.class);

            for( ObjectNode item : objectWrapper.getData()) {

                StreamsDatum datum = new StreamsDatum(item);

                lock.writeLock().lock();
                ComponentUtils.offerUntilSuccess(datum, providerQueue);
                lock.writeLock().unlock();
            }

            Boolean success = true;

            response.put("success", success);
            responseCode = Response.Status.OK.getStatusCode();

        } catch (Exception e) {
            log.warn(e.toString(), e);

            Boolean success = false;

            response.put("success", success);
            responseCode = Response.Status.BAD_REQUEST.getStatusCode();
        } finally {
            return Response.status(responseCode).entity(response).build();
        }

    }

    @Override
    public void startStream() {
        return;
    }

    @Override
    public StreamsResultSet readCurrent() {

        StreamsResultSet current;

        lock.writeLock().lock();
        current = new StreamsResultSet(Queues.newConcurrentLinkedQueue(providerQueue));
        providerQueue.clear();
        lock.writeLock().unlock();

        return current;

    }

    @Override
    public StreamsResultSet readNew(BigInteger sequence) {
        return null;
    }

    @Override
    public StreamsResultSet readRange(DateTime start, DateTime end) {
        return null;
    }

    @Override
    public boolean isRunning() {
        return true;
    }

    @Override
    public void prepare(Object configurationObject) {

    }

    @Override
    public void cleanUp() {

    }

}


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

<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>play.utils (Play! API)</title>
<meta name="date" content="2016-03-30">
<link rel="stylesheet" type="text/css" href="../../stylesheet.css" title="Style">

JavaScript is disabled on your browser.

Skip navigation links

Overview

Package

Class

Use

Tree

Deprecated

Index

Help

Prev Package

Next Package

Frames

No Frames

All Classes

Package play.utils

Interface Summary

Interface
Description

Action<T>

Class Summary

Class
Description

ANSIConsoleAppender

Colour-coded console appender for Log4J.

Default

HTML

HTML.HtmlCharacterEntityReferences

HTTP

HTTP.ContentTypeWithEncoding

ImmediateFuture

Java

Java utils

Java.FieldWrapper

Field accessor
 set and get value for a property, using the getter/setter when it exists or direct access otherwise.

NoOpEntityResolver

OrderSafeProperties

Custom impl of java.util.properties that preserves the key-order from the file
 and that reads the properties-file in utf-8

Properties

like Properties, but with:
 encoding
 generic
 type helper

PThreadFactory

SmartFuture<V>

Utils

Generic utils

Utils.AlternativeDateFormat

Utils.Maps

for java.util.Map

YesSSLSocketFactory

SSL Sockets created by this factory won't check
 if certificates are signed with a root certificate (or chained from root)

YesSSLSocketFactory.YesTrustManager

Exception Summary

Exception
Description

FastRuntimeException

Fast Exception - skips creating stackTrace.

Skip navigation links

Overview

Package

Class

Use

Tree

Deprecated

Index

Help

Prev Package

Next Package

Frames

No Frames

All Classes

Guillaume Bort & zenexity - Distributed under Apache 2 licence, without any warrantly


text:
package controllers

import anorm.{Pk, NotAssigned}
import play.api._
import play.api.mvc._
import play.api.data._
import play.api.data.Forms._
import models.Contact

object Application extends Controller {

  def index = Action {
    Redirect(routes.Application.contacts())
  }

  /*
  * Show all contacts. Filter helps us to select certain contacts. By default filter equals to any string
  * */
  def contacts(filter: String = "%") = Action {
    Ok(views.html.index(Contact.all("%"+filter+"%")))
  }

  /*
  Handle adding a new contact. If error raise 400
  * */
  def addContact = Action { implicit request =>
      contactForm.bindFromRequest.fold(
      errors => BadRequest(views.html.addContact(errors)),
      data => {
        Contact.create(data.name, data.phone)
        Redirect(routes.Application.contacts())
      }
    )
  }

  def showContactForm = Action {
    Ok(views.html.addContact(contactForm))
  }

  def deleteContact(id: Long) = Action {
    Contact.delete(id)
    Redirect(routes.Application.contacts())
  }

  /*
  * Contact Form
  * */
  val contactForm = Form(
    mapping(
    "id" -> ignored(NotAssigned:Pk[Long]),
    "name" -> nonEmptyText,
    "phone" -> nonEmptyText.verifying(Contact.phoneIsCorrect, Contact.phoneIsUnique)
    )(Contact.apply)(Contact.unapply)
  )

}


text:
from sakuraio.software.exceptions import UnSupportedExceptions
from sakuraio.software.utils import validate_sort_project, validate_datastore, validate_location

class ProjectMixins(object):
    def show_projects(self, name=None, sort=None):
        # validate sort option
        if not validate_sort_project(sort):
            raise UnSupportedExceptions('sort', sort)

        return self.do('GET', 'projects',
                       query_params={'name': name, 'sort': sort}
                       )

    def create_project(self, name, datastore='light', location='false'):
        if validate_datastore(datastore) is not True:
            raise UnSupportedExceptions('datastore', datastore)
        if validate_location(location) is not True:
            raise UnSupportedExceptions('location', location)

        return self.do('POST', 'projects',
                       request_params={
                          'name': name,
                          'datastore': datastore,
                          'location': location
                       }
                       )

    def delete_project(self, project_id):
        return self.do('DELETE', 'projects/{project_id}',
                       url_params={'project_id': project_id}
                       )

    def show_project(self, project_id):
        return self.do('GET', 'projects/{project_id}',
                       url_params={'project_id': project_id}
                       )

    def update_project(self, project_id, name, location):
        if validate_location(location) is not True:
            raise UnSupportedExceptions('location', location)

        return self.do('PUT', 'projects/{project_id}',
                       url_params={'project_id': project_id},
                       request_params={
                          'name': name,
                          'location': location
                       }
                       )


text:
"use strict";

importScripts("/resources/testharness.js");
importScripts("/resources/WebIDLParser.js", "/resources/idlharness.js");

idl_test(
  ["html"],
  ["wai-aria", "dom", "cssom", "touch-events", "uievents"],
  idlArray => {
    idlArray.add_untested_idls('typedef Window WindowProxy;');
    idlArray.add_objects({
      WorkerLocation: ['self.location'],
      WorkerNavigator: ['self.navigator'],
      EventSource: ['new EventSource("http://invalid")'],
      WebSocket: ['new WebSocket("ws://invalid")'],
      CloseEvent: ['new CloseEvent("close")'],
      Worker: [],
      MessageEvent: ['new MessageEvent("message", { data: 5 })'],
      DedicatedWorkerGlobalScope: ['self'],
    });
  }
);

done();


text:
package com.google.errorprone.sample;

import java.util.Arrays;

/** Says Hello. */
public class Hello {
  public static void main(String[] args) {
    System.err.print(String.format("Hello: %s\n", Arrays.toString(args)));
  }
}


text:
angular.module('vertix')
    .directive('vPolymorph', ['$compile', function($compile){
        return {
            restrict:'E',
            replace:true,
            link:function(scope, element, attrs){
                var oldElement = element;
                attrs.$observe('directive', function(data){
                    if (data) {
                        var newElement = angular.element('<'+data+'/>');
                        var iattrs = oldElement[0].attributes;
                        for (var i=0; i < iattrs.length; i++) {
                            newElement.attr(iattrs.item(i).nodeName, iattrs.item(i).nodeValue);
                        }
                        oldElement.replaceWith(newElement);
                        $compile(newElement)(scope);
                        oldElement = newElement;
                    }
                });
            }
        };
    }]);


text:
<?xml version="1.0" encoding="UTF-8"?>
<eventPublisher name="Floor-Analysis-WebSocketLocal-FloorTemperatureEvent"
                statistics="disable" trace="disable" xmlns="http://wso2.org/carbon/eventpublisher">
    <from streamName="org.wso2.floor.perFloor.SensorStream" version="1.0.0"/>
    <mapping customMapping="enable" type="json">
        <inline>{
            "building" : {{buildingId}},
            "floor": {{floorId}},
            "temperature": {{temperature}}
            }</inline>
    </mapping>
    <to eventAdapterType="websocket-local"/>
</eventPublisher>


text:
package com.flatlandsapps.chordboard;

import java.util.ArrayList;

import android.graphics.Canvas;
import android.graphics.Paint;
import android.graphics.Point;
import android.graphics.Paint.Align;
import android.graphics.Rect;

public class Chord
{
	private FretPositions _positions;
	private String _chordName;
	private ArrayList<FingerInfo> _fingers;
	private ArrayList<Integer> _closedRows;
	private float _radius;
	private int _circleColor;
	private int _textColor;
	private int _closedStringColor;

	public Chord(String chordName)
	{
		_fingers = new ArrayList<FingerInfo>();
		_closedRows = new ArrayList<Integer>();
		_chordName = chordName;

		_radius = 10;
		_circleColor = 0xFFABABAB;
		_textColor = 0xFFFFFFFF;
		_closedStringColor = 0xFFFFFFFF;
	}

	public void addClosedRow(int row)
	{
		_closedRows.add(row);
	}

	public ArrayList<Integer> getClosedRows()
	{
		return _closedRows;
	}

	public void setCircleColor(int circleColor)
	{
		_circleColor = circleColor;
	}

	public int getCircleColor()
	{
		return _circleColor;
	}

	public void setTextColor(int circleTextColor)
	{
		_textColor = circleTextColor;
	}

	public int getTextColor()
	{
		return _textColor;
	}

	public void setRadius(float radius)
	{
		_radius = radius;
	}

	public float getRadius()
	{
		return _radius;
	}

	public void addClosedString(int column)
	{
		_fingers.add(new FingerInfo(0,column,0));
	}

	public void addFingerPosition(int row,int column,int finger)
	{
		_fingers.add(new FingerInfo(row,column,finger));
	}

	public void addBarreChord(int row,int column,int endColumn,int finger)
	{
		FingerInfo fingerInfo = new FingerInfo(row,column,finger);
		fingerInfo.setIsBarreChord(true);
		fingerInfo.setBarreEndColumn(endColumn);

		_fingers.add(fingerInfo);
	}

	/*
	 * Changes the FingerInfos so their StartPoint and EndPoints contain valid values.
	 */
	public void calculateChordPoints()
	{
		for (int i=0;i < _fingers.size();i++)
		{
			FingerInfo info = _fingers.get(i);
			int row = info.getRow();
			info.setStartPoint(_positions.getPoint(row,info.getColumn()));

			if (info.isBarreChord())
			{
				info.setEndPoint(_positions.getPoint(row,info.getBarreEndColumn()));
			}
		}
	}

	public void setChordName(String chordName)
	{
		_chordName = chordName;
	}

	public String getChordName()
	{
		return _chordName;
	}

	public void setClosedStringColor(int closedStringColor)
	{
		_closedStringColor = closedStringColor;
	}

	public int getClosedStringColor()
	{
		return _closedStringColor;
	}

	public void paint(Canvas canvas,FretPositions positions)
	{
		_positions = positions;

		Paint paint = new Paint();
		paint.setStrokeWidth(3);
		paint.setColor(getCircleColor());
		paint.setAntiAlias(true);

		Paint paintText = new Paint();
		paintText.setColor(getTextColor());
		paintText.setAntiAlias(true);
		paintText.setTextAlign(Align.CENTER);
		paintText.setTextSize(_radius);

		Paint paintClosed = new Paint();
		paintClosed.setColor(getClosedStringColor());
		paintClosed.setAntiAlias(true);
		paintClosed.setTextAlign(Align.CENTER);
		paintClosed.setTextSize(_radius);

		calculateChordPoints();
		for (int i=0;i < _fingers.size();i++)
		{
			FingerInfo currentFinger = _fingers.get(i);
			int finger = currentFinger.getFinger();
			String label = String.valueOf(finger);
			Point startPoint = currentFinger.getStartPoint();

			if (finger >0 && currentFinger.isBarreChord())
			{
				//
				// Draw barre fingers
				//
				Point endPoint = currentFinger.getEndPoint();

				canvas.drawCircle(startPoint.x, startPoint.y, _radius, paint);
				canvas.drawCircle(endPoint.x, endPoint.y, _radius, paint);

				// Draw the rectangle to join the two circles
				int left = startPoint.x;;
				int top = (int) (startPoint.y - _radius);
				int right = endPoint.x;
				int bottom = (int) (startPoint.y + _radius);
				Rect rect = new Rect(left,top,right,bottom);

				canvas.drawRect(rect, paint);

				canvas.drawText(label, (startPoint.x + endPoint.x) / 2, startPoint.y +(_radius /3), paintText);
			}
			else
			{
				//
				// Draw single finger
				//

				if (finger > 0)
				{
					canvas.drawCircle(startPoint.x, startPoint.y, _radius, paint);
					canvas.drawText(label, startPoint.x, startPoint.y +(_radius /3), paintText);
				}
				else
				{
					label = "X";
					paintClosed.setFakeBoldText(true);
					paintClosed.setTextSize(_radius + 4);
					canvas.drawText(label, startPoint.x, startPoint.y +(_radius /3), paintClosed);
				}
			}
		}
	}

	private class FingerInfo
	{
		private int _row;
		private int _column;
		private int _barreEndColumn;
		private int _finger;
		private boolean _isBarreChord;
		private Point _startPoint;
		private Point _endPoint;

		public FingerInfo(int row,int column,int finger)
		{
			setRow(row);
			setColumn(column);
			setFinger(finger);
			setIsBarreChord(false);
			_startPoint = new Point();
			_endPoint = new Point();
		}

		public void setIsBarreChord(boolean isBarreChord)
		{
			_isBarreChord = isBarreChord;
		}

		public boolean isBarreChord()
		{
			return _isBarreChord;
		}

		public int getFinger()
		{
			return _finger;
		}

		public int getColumn()
		{
			return _column;
		}

		public int getRow()
		{
			return _row;
		}

		public int getBarreEndColumn()
		{
			return _barreEndColumn;
		}

		public Point getStartPoint()
		{
			return _startPoint;
		}

		public Point getEndPoint()
		{
			return _endPoint;
		}

		public void setStartPoint(Point point)
		{
			_startPoint = point;
		}

		public void setEndPoint(Point point)
		{
			_endPoint = point;
		}

		public void setFinger(int finger)
		{
			_finger = finger;
		}

		public void setColumn(int column)
		{
			_column = column;
		}

		public void setBarreEndColumn(int column)
		{
			_barreEndColumn = column;
		}

		public void setRow(int row)
		{
			_row = row;
		}
	}
}


text:
<!DOCTYPE html>

    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta name="description" content="">
    <meta name="author" content="">
    <link rel="shortcut icon" href="assets/ico/favicon.png">

    <title>NewFirm - Corporate Bootstrap 3 Theme</title>

    <link href="assets/css/bootstrap.css" rel="stylesheet">

    <link href="assets/css/main.css" rel="stylesheet">
    <link href="assets/css/colors/color-3498db.css" rel="stylesheet">
    <link href="assets/css/font-awesome.min.css" rel="stylesheet">

          <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">

          </button>
          NEWFIRM

	              Home

Home - Main Version

Home - Agency Version

Home - Corporate Version

Home - Classic Version

Home - One Page Version

	              Pages

Services

About

Team Member

FAQ

Our Offices

Pricing

Contact

404 Error Page

	              Portfolio

Classic Portfolio

4 Columns Portfolio

Masonry Portfolio

Full Width Project

Project Split

Video Project

Project Slideshow

	              Blog

Article List

Article List Variation

Blog Post

	<! ========== BLACK SECTION =================================================================================================
	=============================================================================================================================>

BLOG VERSION 2

RANDOM RAMBLINGS

	<! ========== BLOG SECTION =================================================================================================
	=============================================================================================================================>

    	<div class="container"

Blog Post
12 November

Blog Post
20 November

Blog Post
22 October

Blog Post
10 October

Blog Post
8 October

Blog Post
21 September

Blog Post
12 November

Blog Post
20 November

Blog Post
22 October

Blog Post
10 October

Blog Post
8 October

Blog Post
21 September

	<! ========== CALL TO ACTION BAR ============================================================================================
	=============================================================================================================================>

Are You Ready For The Next Step?

	<! ========== FOOTER ========================================================================================================
	=============================================================================================================================>

Our Studio

						Some Ave. 987,

						Postal 64733

						London, UK.

						 +55 4893.8943

						 hello@yourdomain.com

<! --/col-lg-3 -->

Recent Tweets

Follow us @Alvrz_is

Latest Posts

						 A post with an image

						 Other post with a video

						 A full width post

						 We talk about something nice

						 Yet another single post

New Project

<! --/row -->


text:
import click

from gravity import process_manager

@click.command("status")
@click.pass_context
def cli(ctx):
    """Shut down process manager."""
    with process_manager.process_manager(state_dir=ctx.parent.state_dir, start_daemon=False) as pm:
        pm.shutdown()


text:
// GridCell.cpp : implementation file
//
// MFC Grid Control - Main grid cell class
//
// Provides the implementation for the "default" cell type of the
// grid control. Adds in cell editing.
//
// Written by Chris Maunder <cmaunder@mail.com>
// Copyright (c) 1998-2000. All Rights Reserved.
//
// This code may be used in compiled form in any way you desire. This
// file may be redistributed unmodified by any means PROVIDING it is
// not sold for profit without the authors written consent, and
// providing that this notice and the authors name and all copyright
// notices remains intact.
//
// An email letting me know how you are using it would be nice as well.
//
// This file is provided "as is" with no expressed or implied warranty.
// The author accepts no liability for any damage/loss of business that
// this product may cause.
//
// For use with CGridCtrl v2.10
//
// History:
// Eric Woodruff - 20 Feb 2000 - Added PrintCell() plus other minor changes
// Ken Bertelson - 12 Apr 2000 - Split CGridCell into CGridCell and CGridCellBase
// <kenbertelson@hotmail.com>
//
/////////////////////////////////////////////////////////////////////////////

#include "stdafx.h"
#include "GridCell.h"
#include "InPlaceEdit.h"
#include "GridCtrl.h"

#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif

#ifdef GRIDCTRL_MINSIZE
/////////////////////////////////////////////////////////////////////////////
// CGridCellAttr default static attributes

DWORD    CGridCellAttr::m_nDefFormat = DT_LEFT|DT_VCENTER|DT_SINGLELINE|DT_NOPREFIX
#ifndef _WIN32_WCE
                                       | DT_END_ELLIPSIS
#endif
                                       ;
COLORREF CGridCellAttr::m_crDefBkClr = CLR_DEFAULT;     // Background colour (or CLR_DEFAULT)
COLORREF CGridCellAttr::m_crDefFgClr = CLR_DEFAULT;     // Forground colour (or CLR_DEFAULT)
LOGFONT  CGridCellAttr::m_lfDefFont;                    // Cell font
UINT     CGridCellAttr::m_nDefMargin = 3;               // Internal cell margin

#endif

IMPLEMENT_DYNCREATE(CGridCell, CGridCellBase)

/////////////////////////////////////////////////////////////////////////////
// GridCell

CGridCell::CGridCell()
{
    Reset();
}

CGridCell::~CGridCell()
{
#ifdef GRIDCTRL_MINSIZE
    delete m_pAttr;
#endif
}

/////////////////////////////////////////////////////////////////////////////
// GridCell Attributes

void CGridCell::Reset()
{
    CGridCellBase::Reset();

    m_strText.Empty();
    m_nImage   = -1;
    m_pGrid    = NULL;
    m_bEditing = FALSE;
    m_pEditWnd = NULL;

#ifdef GRIDCTRL_MINSIZE
    delete m_pAttr;
    m_pAttr    = NULL;
#else
#ifdef _WIN32_WCE
    m_nFormat = DT_LEFT|DT_VCENTER|DT_SINGLELINE|DT_NOPREFIX;
#else
    m_nFormat = DT_LEFT|DT_VCENTER|DT_SINGLELINE|DT_NOPREFIX | DT_END_ELLIPSIS;
#endif
    m_crBkClr = CLR_DEFAULT;     // Background colour (or CLR_DEFAULT)
    m_crFgClr = CLR_DEFAULT;     // Forground colour (or CLR_DEFAULT)
    m_lfFont;                    // Cell font
    m_nMargin = 3;               // Internal cell margin
#endif
}

/////////////////////////////////////////////////////////////////////////////
// GridCell Operations

BOOL CGridCell::Edit(int nRow, int nCol, CRect rect, CPoint /* point */, UINT nID, UINT nChar)
{
    DWORD dwStyle = ES_LEFT;
    if (GetFormat() & DT_RIGHT)
        dwStyle = ES_RIGHT;
    else if (GetFormat() & DT_CENTER)
        dwStyle = ES_CENTER;

    m_bEditing = TRUE;

    // InPlaceEdit auto-deletes itself
    CGridCtrl* pGrid = GetGrid();
    m_pEditWnd = new CInPlaceEdit(pGrid, rect, dwStyle, nID, nRow, nCol, GetText(), nChar);

    return TRUE;
}

void CGridCell::EndEdit()
{
    if (m_pEditWnd)
        ((CInPlaceEdit*)m_pEditWnd)->EndEdit();
}

void CGridCell::OnEndEdit()
{
    m_bEditing = FALSE;
    m_pEditWnd = NULL;
}

inline DWORD    CGridCell::GetFormat()                 { return m_nFormat; }
inline COLORREF CGridCell::GetTextClr()                { return m_crFgClr; }
inline COLORREF CGridCell::GetBackClr()                { return m_crBkClr; }
inline const LOGFONT* CGridCell::GetFont()             { return &m_lfFont; }
inline UINT     CGridCell::GetMargin()                 { return m_nMargin; }

inline void     CGridCell::SetFormat(DWORD nFormat)    { m_nFormat = nFormat; }
inline void     CGridCell::SetTextClr(COLORREF clr)    { m_crFgClr = clr; }
inline void     CGridCell::SetBackClr(COLORREF clr)    { m_crBkClr = clr; }
inline void     CGridCell::SetFont(const LOGFONT* plf) { memcpy(&(m_lfFont), plf, sizeof(LOGFONT)); }
inline void     CGridCell::SetMargin( UINT nMargin)    { m_nMargin = nMargin; }


text:
<?php
/*
* Template to Display Footer
*
*/
?>
<?php global $wise_allowed_html; $wise_footer_text = get_option('wise_footer_text'); $wise_footer_text_dis = get_option('wise_footer_text_dis'); ?>
<?php $wise_current_year = date('Y'); ?>

			<?php if ( get_option( 'wise_footer_style' ) == 'widgetized' ) : ?>

					<?php get_sidebar('footer'); ?>

			<?php endif; ?>

					<?php if ( get_option( 'wise_footer_style' ) == 'single' ) : ?>

							<?php if( get_option('wise_disable_footericons') ==  false ) : wise_footer_social_menu(); endif; // disable footer social icons ?>
							<?php if( get_option('wise_disable_footermenu') == false ) : // disable footer menus ?>

									<?php wise_footer_single_menu(); ?>

							<?php endif; ?>

								<?php
									if( $wise_footer_text_dis == false ) :
										if( !empty($wise_footer_text) ) {
											echo wp_kses( $wise_footer_text, $wise_allowed_html );
										} else {
											printf( esc_html__( 'Copyright © %d. All rights reserved.', 'wise-church' ), $wise_current_year );
										}
									endif; wise_panel_fields_footer(); ?>

					<?php endif; ?>

					<?php if ( get_option( 'wise_footer_style' ) == 'widgetized' ) : ?>

						<?php if (get_option('wise_footer_logo') == false) : ?>

							<a href="<?php echo esc_url( home_url('/') ); ?>">
							<?php if (get_option('wise_footer_logo_url')) { ?>
								<img src="<?php echo esc_url(get_option('wise_footer_logo_url')); ?>" alt="<?php echo esc_attr(bloginfo('name')); ?>">
							<?php } else { ?>
								<img src="<?php echo esc_url( get_template_directory_uri() . '/img/footer_img.png'); ?>" alt="<?php echo esc_attr(bloginfo('name')); ?>">
							<?php } ?>

						<?php endif; ?>

								<?php
									if( $wise_footer_text_dis == false ) :
										if( !empty($wise_footer_text) ) {
											echo wp_kses( $wise_footer_text, $wise_allowed_html );
										} else {
											printf( esc_html__( 'Copyright © %d. All rights reserved.', 'wise-church' ), $wise_current_year );
										}
									endif; wise_panel_fields_footer(); ?>

					<?php endif; ?>

	<img src="<?php echo esc_url(get_template_directory_uri() . '/img/arrowtop.png'); ?>" alt="arrow">

<?php wise_flipclock_jQuery(); ?>
<?php wise_animation_settings(); ?>
<?php wise_before_body(); ?>
<?php wp_footer(); ?>


text:
/*
 * Key point: dfs, the idea is like Subsets, Permutation, Combination
 *  the recursive path is button by button
 */

public class Solution {
    public ArrayList<String> letterCombinations(String digits) {
        if(digits == null)
            return null;

        ArrayList<String> result = new ArrayList<String>();
        StringBuffer temp = new StringBuffer();

        int length = digits.length();
        if(length == 0){
            result.add("");
            return result;
        }

        //create a dictionary to map the digit and its characters
        //the order of dictionary is same as the number in phone number
        ArrayList<char []> dict = new ArrayList<char []>();
        for(int i = 0;i<length;i++){
            char c = digits.charAt(i);
            switch(c){  //there is no character on button 1
                case '2': char[] two = {'a','b','c'}; dict.add(two); break;
                case '3': char[] three = {'d','e','f'}; dict.add(three); break;
                case '4': char[] four = {'g','h','i'}; dict.add(four); break;
                case '5': char[] five = {'j','k','l'}; dict.add(five); break;
                case '6': char[] six = {'m','n','o'}; dict.add(six); break;
                case '7': char[] seven = {'p','q','r','s'}; dict.add(seven); break;
                case '8': char[] eight = {'t','u','v'}; dict.add(eight); break;
                case '9': char[] nine = {'w','x','y','z'}; dict.add(nine); break;
                case '0': char[] ten = {' '}; dict.add(ten); break;

                default: break;
            }
        }

        //start from position 0
        dfsWorker(dict, 0, result, temp);

        return result;
    }

    public void dfsWorker(ArrayList<char []> dict, int position, ArrayList<String> result, StringBuffer temp){
        if(position == dict.size()){
            result.add(temp.toString());
            return;
        }

        //recursive call dfsWorker() button by button
        //because the first character must be in the first digit's button
        //one level loop is enough
        char[] button = dict.get(position);
        for(int j = 0;j<button.length;j++){
            temp.append(button[j]);
            dfsWorker(dict, position+1, result, temp);
            temp.deleteCharAt(temp.length()-1);
        }

    }

}


text:
module Azure::AzureStackHCI::Mgmt::V2020_03_01_preview
  module Models
    #
    # The resource model definition for a ARM tracked top level resource
    #
    class TrackedResource < Resource

      include MsRestAzure

      # @return [Hash{String => String}] Resource tags.
      attr_accessor :tags

      # @return [String] The geo-location where the resource lives
      attr_accessor :location

      #
      # Mapper for TrackedResource class as Ruby Hash.
      # This will be used for serialization/deserialization.
      #
      def self.mapper()
        {
          client_side_validation: true,
          required: false,
          serialized_name: 'TrackedResource',
          type: {
            name: 'Composite',
            class_name: 'TrackedResource',
            model_properties: {
              id: {
                client_side_validation: true,
                required: false,
                read_only: true,
                serialized_name: 'id',
                type: {
                  name: 'String'
                }
              },
              name: {
                client_side_validation: true,
                required: false,
                read_only: true,
                serialized_name: 'name',
                type: {
                  name: 'String'
                }
              },
              type: {
                client_side_validation: true,
                required: false,
                read_only: true,
                serialized_name: 'type',
                type: {
                  name: 'String'
                }
              },
              tags: {
                client_side_validation: true,
                required: false,
                serialized_name: 'tags',
                type: {
                  name: 'Dictionary',
                  value: {
                      client_side_validation: true,
                      required: false,
                      serialized_name: 'StringElementType',
                      type: {
                        name: 'String'
                      }
                  }
                }
              },
              location: {
                client_side_validation: true,
                required: true,
                serialized_name: 'location',
                type: {
                  name: 'String'
                }
              }
            }
          }
        }
      end
    end
  end
end


text:
require 'unirest'

# Create admin user

# Create meta db
Unirest.put "http://127.0.0.1:5984/stargazer_meta",
  auth: { user: "starwarden", password: ENV["COUCHDB_ADMIN_PASSWORD"]}
# Set _security
sec_rules = {admins: {names: [], roles: []}, members: {names: [], roles:["_admin"] }}
Unirest.put "http://127.0.0.1:5984/stargazer_meta/_security",
  auth: { user: "starwarden", password: ENV["COUCHDB_ADMIN_PASSWORD"]},
  parameters:sec_rules.to_json


text:
{% extends "registration/base.html" %}
{% load i18n %}

{% block title %}{% trans 'Password reset successful' %}{% endblock %}

{% block content %}

{% trans 'Password reset successful' %}

		<fieldset class="main">

				{% trans "We've e-mailed you instructions for setting your password to the e-mail address you submitted. You should be receiving it shortly." %}

		</fieldset>

{% endblock %}


text:
A small set of TSQL functions to generate YouTube-like hashes from one or many numbers.
Use hashids when you do not want to expose your database ids to the user.

[http://www.hashids.org/](http://www.hashids.org/)

This repository contains a port to TSQL of the other projects found at hashids.org.
The Javascript and .NET versions of Hashids are the primary reference projects for this port.

The included [hashids-tsql generator](https://github.com/waynebloss/hashids-tsql/tree/master/hashids-tsql) creates a
custom set of TSQL functions to encode values with your chosen salt and other options.

## Status

The SQL functions generated by hashids-tsql can currently encode numbers, but cannot _decode_ them yet.

## Contents

[Quick Start](#quick-start)
[What is it?](#what-is-it)
[TSQL Functions](#tsql-functions)
[Use Cases](#use-cases)
[Generator Usage](#generator-usage)
[TODO](#todo)

## Quick Start

The command below will generate a set of TSQL encode functions and test objects into the `test.sql` file.

```console
npm install -g hashids-tsql

hashids-tsql -t test.sql
```

### Results

![Test Results](https://raw.github.com/waynebloss/hashids-tsql/master/readme-assets/qtest-20141109.png)

## What is it?

hashids (Hash ID's) creates short, unique, decryptable hashes from unsigned integers.

_(NOTE: This is **NOT** a true cryptographic hash, since it is reversible.)_

It was designed for websites to use in URL shortening, tracking stuff, or
making pages private (or at least unguessable).

This algorithm tries to satisfy the following requirements:

1. Hashes must be unique and decryptable.
2. They should be able to contain more than one integer (so you can use them in complex or clustered systems).
3. You should be able to specify minimum hash length.
4. Hashes should not contain basic English curse words (since they are meant to appear in public places - like the URL).

Instead of showing items as `1`, `2`, or `3`, you could show them as `U6dc`, `u87U`, and `HMou`.
You can choose to store these hashes in the database or encrypt + decrypt on the fly. If storing them in the database,
then hashids-tsql will let you encode hashids in a TSQL stored procedure, trigger or computed column.

All integers need to be greater than or equal to zero.

See [hashids.org](http://www.hashids.org/) for more information on this technique.

## TSQL Functions

TSQL does not have function overloading, so the single `encode` function that is common in other hashids.org libraries
is instead represented here as a set of `encode` functions with slight variations in name and declaration.

The basic forms of `encode` for TSQL are:

- `encode1(int) string`
- `encode2(int, int) string`
- `encodeList(table) string`
- `encodeSplit(string, string) string`

In TSQL, the `encode` functions that take 1 or 2 integers will be much more useful than the one that takes a table
because typically, you don't want to construct a table variable just to pass 1 or 2 integers into a function.

There are multiple variations on each basic form, in order to return different int and string types (`varchar/nvarchar,
int/bigint`). `encode1A` returns a `varchar` (ASCII) value. `encode1B` accepts a `bigint`. `encode1BA` accepts a `bigint`
and returns a `varchar` (and so on).

The SQL Server database project [HashidsTsql](https://github.com/waynebloss/hashids-tsql/tree/master/db/mssql)
in this repository contains a full set of pre-generated functions to test with.

## Use Cases

The primary use case for a TSQL hashid encoding function can be seen in the
[ComputedTest table](https://github.com/waynebloss/hashids-tsql/blob/master/db/mssql/dbo/Tables/ComputedTest.sql)
where the table's `HashId` uses `encode1` to hash the `Id` column _once_ as part of the atomic INSERT of a record.

As a _persisted_ computed column, `HashId` [can also be indexed](http://msdn.microsoft.com/en-us/library/ms189292(v=sql.100).aspx).

If every table were to use the same `encode1` function, then any row in any table with `Id = 1` would have the same
hash. Therefore, `encode2` is provided, which takes 2 numbers. So, TableX can call `encode2(1, [Id])` and TableY can
call `encode2(2, [Id])` and so on...guaranteeing that the hash for each table's [Id] column don't collide.

Two more TSQL encode functions are currently included which create a hashid from a list of numbers in a table or
delimited string. They are `encodeList` and `encodeSplit`.

## Generator Usage

```console
Usage: hashids-tsql [options] [file or directory/ path]

Options:

  -h, --help               output usage information
  -V, --version            output the version number
  -d, --database [name]    Database name. [HashidsTsql]
  -m, --schema [name]      Database schema. [hashids]
  -a, --ascii              Generate ASCII/varchar compatible function(s).
  -b, --bigint             Generate BIGINT compatible function(s).
  -e, --encodeOnly         Generate encode function(s) only.
  -s, --salt [value]       Salt. [random]
  -n, --minHashLength [n]  Minimum hash length. [0]
  -l, --alphabet [value]   Alphabet. [a-z,A-Z,1-9,0]
  -x, --fileExt [value]    Extension for output files. [sql]
  -t, --test               Generate test procedureds and tables.
```

## TODO

- Find a better way to detect if a directory path is provided than by looking at the last character.
- Replace No-UTF8-BOM-in-templates.txt note with usage of something like "strip-bom" in app.js
- Create all manner of automated tests, primarily to test against other implementations.
- Create TSQL functions for decoding and integrate them into the hashids-tsql generator.


text:
package com.google.gdata.data.media;

import com.google.gdata.data.DateTime;

/**
 * The BaseMediaSource class provides an abstract base class
 * implementation of the {@link MediaSource} interface.
 *
 *
 * @see MediaSource
 */
abstract public class BaseMediaSource implements MediaSource {

  protected final String mediaType;           // required
  protected long contentLength = -1;          // default: unknown
  protected DateTime lastModified;            // default: unknown
  protected String name;                      // default: none
  protected String etag;                      // default: unknown

  /**
   * Constructs a new BaseMediaSource of the specified content type.
   */
  protected BaseMediaSource(String mediaType) {
    this.mediaType = mediaType;
  }

  public String getContentType() { return mediaType; }

  public void setName(String name) { this.name = name; }
  public String getName() { return name; }

  public void setLastModified(DateTime lastModified) {
    this.lastModified = lastModified;
  }
  public DateTime getLastModified() { return lastModified; }

  public void setContentLength(long contentLength) {
    this.contentLength = contentLength;
  }
  public long getContentLength() { return contentLength; }

  public void setEtag(String etag) {
    this.etag = etag;
  }
  public String getEtag() { return etag; }
}


text:
package com.revinate.ship.common;

import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.*;

import javax.validation.constraints.NotNull;

@Getter
@Setter
@NoArgsConstructor
@Builder
@EqualsAndHashCode
@ToString
@JsonInclude(JsonInclude.Include.NON_NULL)
public class CompanyInfo {

    @JsonProperty(required = true)
    @NotNull
    private String name;

    @JsonIgnore
    public CompanyInfo(String name) {
        this.name = name;
    }
}


text:
/*
 ONOS GUI -- Openstack Telemetry View Module
 */
(function () {
    'use strict';

    // injected references
    var $log, $scope, $location, ks, fs, cbs, ns, tov, ots, wss, tts, api, gs, ps, ds;

    // constants
    var pCls = 'topo-p',
        idTelemetry = 'topo-p-telemetry',
        idTelemetryDiag = 'telemetry-dialog',
        telemetryPanelOpts = {
            edge: 'left',
            width: 330, // telemetry panel width
        }

    // panels
    var telemetry;

    // selected info (by mouse click event)
    var selectedItem

    // constants
    var ostIsActReq = 'openstackFlowStatsIsActivatedRequest',
        ostIsActResp =  'openstackFlowStatsIsActivatedResponse',
        ostCreateReq = 'openstackFlowStatsCreateRequest',
        ostCreateResp = 'openstackFlowStatsCreateResponse';

    var topoLion = function (x) {
        return '#ttrafov#' + x + '#';
    };

    var overlay = {
        overlayId: 'ostelemetry-overlay',
        glyphId: 'm_details',
        tooltip: 'Openstack Telemetry Overlay',

        activate: function () {
            $log.debug("Openstack telemetry topology overlay is ACTIVATED");
        },
        deactivate: function () {
            destroyTelemetryPanel();
            $log.debug("Openstack telemetry topology overlay is DEACTIVATED");
        },

        // detail panel button definitions
        buttons: {
            createHostTelemetryBtn: {
                gid: 'm_details',
                tt: 'Create Host-to-Host Telemetry',
                cb: displayTelemetry
            },
            showRelatedTraffic: {
                gid: 'm_relatedIntents',
                tt: function () { return topoLion('tr_btn_show_related_traffic'); },
                cb: function (data) { tts.showRelatedIntents(); },
            },
        },

        hooks: {
            multi: function (selectOrder) {
                var selectedHost = new Object();
                $log.debug("Selected object: ", selectOrder);
                for (var index in selectOrder) {
                    if (index == 0) {
                        selectedHost.src = selectOrder[index];
                        $log.debug("Source host: ", selectedHost.src);
                    } else if (index == 1) {
                        selectedHost.dst = selectOrder[index];
                        $log.debug("Destination host: ", selectedHost.dst);
                    }
                }

                selectedItem = selectedHost;

                tov.addDetailButton('showRelatedTraffic');
                if(selectOrder.length == 2) {
                    tov.addDetailButton('createHostTelemetryBtn');
                }
            }
        }
    };

    // Panel API
    function createTopoPanel(id, opts) {
        var p = ps.createPanel(id, opts),
            pid = id,
            header, body, footer;
        p.classed(pCls, true);

        function panel() {
            return p;
        }

        function hAppend(x) {
            return header.append(x);
        }

        function bAppend(x) {
            return body.append(x);
        }

        function fAppend(x) {
            return footer.append(x);
        }

        function setup() {
            p.empty();

            p.append('div').classed('header', true);
            p.append('div').classed('body', true);
            p.append('div').classed('footer', true);

            header = p.el().select('.header');
            body = p.el().select('.body');
            footer = p.el().select('.footer');
        }

        function destroy() {
            ps.destroyPanel(pid);
        }

        return {
            panel: panel,
            setup: setup,
            destroy: destroy,
            appendHeader: hAppend,
            appendBody: bAppend,
            appendFooter: fAppend,
        };
    }

    function hideTelemetryPanel() {
        telemetry.panel().hide();
    }

    function destroyTelemetryPanel() {
        if(telemetry != null) {
            telemetry.destroy();
        }
        telemetry = null;
    }

    function addInput(tbody, type, id, label, value) {
        var tr = tbody.append('tr'),
            lab;
        if (typeof label === 'string') {
            lab = label.replace(/_/g, ' ');
        } else {
            lab = label;
        }

        tr.append('td').attr('class', 'label').text(lab + ' :');

        if (type == 'radio') {
            var td = tr.append('td');
            for(var index in value) {
                if(index == 0) {
                    td.append('input').classed( type + '-input', true)
                                          .attr('type', type)
                                          .attr('value', value[index])
                                          .attr('name', label)
                                          .attr('id', id)
                                          .attr('checked', 'true');
                } else {
                    td.append('input').classed( type + '-input', true)
                                          .attr('type', type)
                                          .attr('name', label)
                                          .attr('id', id)
                                          .attr('value', value[index]);
                }
                td.append('span').text(value[index]);
            }
        } else {
            tr.append('td').append('input').classed(type + '-input', true).attr('type', type)
                .attr('id', id).attr('value', value);
        }
    }

    function addButton(tr, callback, value) {
        tr.append('td').append('input').classed('button-input', true).attr('type', 'button')
                        .attr('value', value).on('click', callback);
    }

    function makeButton(callback, text, keyName) {
        var cb = fs.isF(callback),
            key = fs.isS(keyName);

        function invoke() {
            cb && cb();
        }

        return createDiv('telemetry-button')
            .text(text)
            .on('click', invoke);
    }

    function createDiv(cls) {
        var div = d3.select(document.createElement('div'));
        if (cls) {
            div.classed(cls, true);
        }
        return div;
    }

    function displayTelemetry() {
        $log.debug("sendEvent openstackFlowStatsIsActivatedRequest: ", selectedItem);
        wss.sendEvent(ostIsActReq, selectedItem);
    }

    function respIsActCb(selected) {
        $log.debug("openstackFlowStatsIsActivatedResponse: ", selected);
        if(telemetry == null) {
            telemetry = createTopoPanel(idTelemetry, telemetryPanelOpts);
        }
        telemetry.setup();

        var svg = telemetry.appendHeader('div')
                     .classed('icon', true)
                     .append('svg'),
            title = telemetry.appendHeader('h2'),
            table = telemetry.appendBody('table'),
            tbody = table.append('tbody'),
            glyphId = 'm_details';

        gs.addGlyph(svg, glyphId, 30, 0, [1, 1]);

        title.text('Create Openstack Telemetry');

        addInput(tbody, 'text', 'srcIp', 'Source IP', selected.srcName);
        addInput(tbody, 'text', 'dstIp', 'Destination IP', selected.dstName);
        addInput(tbody, 'radio', 'ipProto', 'Protocol', selected.ipProtoList);
        addInput(tbody, 'number', 'srcPort', 'Source Port', "");
        addInput(tbody, 'number', 'dstPort', 'Destination Port', "");

        telemetry.appendFooter('hr');
        var footTr = telemetry.appendFooter('table').append('tbody').append('tr');

        addButton(footTr, createTelemetry, 'Create');
        addButton(footTr, hideTelemetryPanel, 'Cancel');

        telemetry.panel().show();
    }

    function createTelemetry() {
        var telemetryInfo = {};

        telemetryInfo.srcIp = document.getElementById('srcIp').value;
        telemetryInfo.dstIp = document.getElementById('dstIp').value;
        telemetryInfo.ipProto = document.querySelector('input[name="Protocol"]:checked').value;
        telemetryInfo.srcPort = document.getElementById('srcPort').value;
        telemetryInfo.dstPort = document.getElementById('dstPort').value;

        if(telemetryInfo.srcPort == ""){
            telemetryInfo.srcPort = 0;
        }
        if(telemetryInfo.dstPort == ""){
            telemetryInfo.dstPort = 0;
        }

        $log.debug("Creation request: ", telemetryInfo);
        wss.sendEvent(ostCreateReq, telemetryInfo);
        hideTelemetryPanel();
    }

    function respCreateCb(result) {
        $log.debug("Creation response: ", result);

        function dOK() {
            if(result.result == "Failed"){
                displayTelemetry(selectedItem);
            } else {
                destroyTelemetryPanel();
            }
        }

        function createContent(value) {
            var content = ds.createDiv();
            content.append('p').text(value);
            return content;
        }

        ds.openDialog(idTelemetryDiag, telemetryPanelOpts)
            .setTitle("Create Telemetry " + result.result)
            .addContent(createContent(result.value))
            .addOk(dOK);
    }

    /*
     Variable for Chart View
     */
    var hasFlow;

    var gFlowId;
    var gPeriod;

    var labels = new Array(1);
    var data = new Array(2);
    for (var i = 0; i < 2; i++) {
        data[i] = new Array(1);
    }

    var max;

    function ceil(num) {
        if (isNaN(num)) {
            return 0;
        }
        var pre = num.toString().length - 1
        var pow = Math.pow(10, pre);
        return (Math.ceil(num / pow)) * pow;
    }

    function maxInArray(array) {
        var merged = [].concat.apply([], array);
        return Math.max.apply(null, merged);
    }

    /*
     Chart View : Controller
     */
    angular.module('ovOpenstacktelemetry', ["chart.js"])
        .controller('OvOpenstacktelemetryCtrl',
        ['$log', '$scope', '$location', 'FnService', 'ChartBuilderService', 'NavService',

        function (_$log_, _$scope_, _$location_, _fs_, _cbs_, _ns_) {
            var params;
            $log = _$log_;
            $scope = _$scope_;
            $location = _$location_;
            fs = _fs_;
            cbs = _cbs_;
            ns = _ns_;

            params = $location.search();

            if (params.hasOwnProperty('flowOpt')) {
                $scope.flowOpt = params['flowOpt'];
                hasFlow = true;
            } else if (params.hasOwnProperty('periodOpt')) {
                $scope.periodOpt = params['periodOpt'];
                hasFlow = true;
            } else {
                hasFlow = false;
            }

            cbs.buildChart({
                scope: $scope,
                tag: 'openstacktelemetry',
                query: params
            });

            $scope.$watch('chartData', function () {
                if (!fs.isEmptyObject($scope.chartData)) {
                    $scope.showLoader = false;
                    var length = $scope.chartData.length;
                    labels = new Array(length);
                    for (var i = 0; i < 2; i++) {
                        data[i] = new Array(length);
                    }

                    $scope.chartData.forEach(function (cm, idx) {
                        data[0][idx] = (cm.curr_acc_packet - cm.prev_acc_packet);
                        data[1][idx] = (cm.curr_acc_byte - cm.prev_acc_byte);

                        labels[idx] = cm.label;
                    });
                }

                max = maxInArray(data)
                $scope.labels = labels;
                $scope.data = data;
                $scope.options = {
                    scaleOverride : true,
                    scaleSteps : 10,
                    scaleStepWidth : ceil(max) / 10,
                    scaleStartValue : 0,
                    scaleFontSize : 16
                };
                $scope.onClick = function (points, evt) {
                    var label = labels[points[0]._index];
                    if (label) {
                        ns.navTo('openstacktelemetry', { flowOpt: label });
                        $log.log(label);
                    }
                };

                if (!fs.isEmptyObject($scope.annots)) {
                    $scope.flowIds = JSON.parse($scope.annots.flowIds);
                    $scope.periodOptions = JSON.parse($scope.annots.periodOptions);
                }

                $scope.onChange = function (flowId) {
                    gFlowId = flowId;
                    ns.navTo('openstacktelemetry', { periodOpt: gPeriod , flowOpt: flowId });
                };

                $scope.onPeriodChange = function (period) {
                    gPeriod = period;
                    ns.navTo('openstacktelemetry', { periodOpt: period , flowOpt: gFlowId });
                };
            });

            $scope.series = ['Current Packet', 'Current Byte'];

            $scope.labels = labels;
            $scope.data = data;

            $scope.chartColors = [
                      '#286090',
                      '#F7464A',
                      '#46BFBD',
                      '#FDB45C',
                      '#97BBCD',
                      '#4D5360',
                      '#8c4f9f'
                    ];
            Chart.defaults.global.colours = $scope.chartColors;

            $scope.showLoader = true;

            $log.log('OvOpenstacktelemetryCtrl has been created');
        }])
        // Network Topology View : Factory
        .factory('OpenstacktelemetryService',
        ['$log', 'FnService', 'WebSocketService', 'GlyphService', 'PanelService', 'DialogService',

        function (_$log_, _fs_, _wss_, _gs_, _ps_, _ds_) {
            $log = _$log_;
            fs = _fs_;
            wss = _wss_;
            gs = _gs_;
            ps = _ps_;
            ds = _ds_;

            var handlers = {},
                telemetryOverlay = 'ostelemetry-overlay',
                defaultOverlay = 'traffic';

            handlers[ostIsActResp] = respIsActCb;
            handlers[ostCreateResp] = respCreateCb;

            wss.bindHandlers(handlers);

            return {
                displayTelemetry: displayTelemetry
            };
        }])
        .run(['$log', 'TopoOverlayService', 'OpenstacktelemetryService', 'TopoTrafficService',

            function (_$log_, _tov_, _ots_, _tts_) {
                $log = _$log_;
                tov = _tov_;
                ots = _ots_;
                tts = _tts_;
                tov.register(overlay);
            }]
        );
}());


text:
module Subtask
  class Subtask < Model
    def self.attr_names
      [:sub_task_request, :sub_task_result, :is_success]
    end
    attr_names.each do |attr_name|
      attr_accessor attr_name
    end
  end
end


text:
#
#######################DISA INFORMATION##################################
# Group ID (Vulid): RHEL-06-000304
# Group Title: SRG-OS-000232
#

# Rule ID: RHEL-06-000304_rule
# Severity: medium
# Rule Version (STIG-ID): RHEL-06-000304
# Rule Title: The operating system must employ automated mechanisms to
# detect the presence of unauthorized software on organizational
# information systems and notify designated organizational officials in
# accordance with the organization defined frequency.
#
# Vulnerability Discussion: By default, AIDE does not install itself for
# periodic execution. Periodically running AIDE may reveal unexpected
# changes in installed files.
#
# Responsibility:
# IAControls:
#
# Check Content:
#
# To determine that periodic AIDE execution has been scheduled, run the
# following command:

# grep aide /etc/crontab

# If there is no output, this is a finding.
#
# Fix Text:
#
# AIDE should be executed on a periodic basis to check for changes. To
# implement a daily execution of AIDE at 4:05am using cron, add the
# following line to /etc/crontab:

# 05 4 * * * root /usr/sbin/aide --check

# AIDE can be executed periodically through other means; this is merely one
# example.
#######################DISA INFORMATION##################################
#
# Global Variables
PDI=RHEL-06-000304
#
#BEGIN_CHECK
#END_CHECK
#BEGIN_REMEDY
#END_REMEDY


text:
export declare namespace UITether {
    type Position = "tl" | "tr" | "bl" | "br" | "tc" | "bc" | "cl" | "cr";
    interface Tether {
        dispose(): void;
        updatePosition(newAnchor?: Element, newConfig?: TetherConfig): void;
    }
    interface TetherConfig {
        resize?: boolean;
        attachToViewport?: boolean;
        position?: Position;
        anchorPosition?: Position;
    }
    function tether(anchorEl: Element, dropdownEl: HTMLDivElement, config?: TetherConfig): {
        dispose: () => void;
        updatePosition: (newAnchorEl?: Element, newConfig?: {}) => void;
    };
}


text:
<?php

/**
 * PHPExcel_Shared_CodePage
 *
 * @category   PHPExcel
 * @package    PHPExcel_Shared
 * @copyright  Copyright (c) 2006 - 2014 PHPExcel (http://www.codeplex.com/PHPExcel)
 */
class PHPExcel_Shared_CodePage
{
	/**
	 * Convert Microsoft Code Page Identifier to Code Page Name which iconv
	 * and mbstring understands
	 *
	 * @param integer $codePage Microsoft Code Page Indentifier
	 * @return string Code Page Name
	 * @throws PHPExcel_Exception
	 */
	public static function NumberToName($codePage = 1252)
	{
		switch ($codePage) {
			case 367:	return 'ASCII';				break;	//	ASCII
			case 437:	return 'CP437';				break;	//	OEM US
			case 720:	throw new PHPExcel_Exception('Code page 720 not supported.');
													break;	//	OEM Arabic
			case 737:	return 'CP737';				break;	//	OEM Greek
			case 775:	return 'CP775';				break;	//	OEM Baltic
			case 850:	return 'CP850';				break;	//	OEM Latin I
			case 852:	return 'CP852';				break;	//	OEM Latin II (Central European)
			case 855:	return 'CP855';				break;	//	OEM Cyrillic
			case 857:	return 'CP857';				break;	//	OEM Turkish
			case 858:	return 'CP858';				break;	//	OEM Multilingual Latin I with Euro
			case 860:	return 'CP860';				break;	//	OEM Portugese
			case 861:	return 'CP861';				break;	//	OEM Icelandic
			case 862:	return 'CP862';				break;	//	OEM Hebrew
			case 863:	return 'CP863';				break;	//	OEM Canadian (French)
			case 864:	return 'CP864';				break;	//	OEM Arabic
			case 865:	return 'CP865';				break;	//	OEM Nordic
			case 866:	return 'CP866';				break;	//	OEM Cyrillic (Russian)
			case 869:	return 'CP869';				break;	//	OEM Greek (Modern)
			case 874:	return 'CP874';				break;	//	ANSI Thai
			case 932:	return 'CP932';				break;	//	ANSI Japanese Shift-JIS
			case 936:	return 'CP936';				break;	//	ANSI Chinese Simplified GBK
			case 949:	return 'CP949';				break;	//	ANSI Korean (Wansung)
			case 950:	return 'CP950';				break;	//	ANSI Chinese Traditional BIG5
			case 1200:	return 'UTF-16LE';			break;	//	UTF-16 (BIFF8)
			case 1250:	return 'CP1250';			break;	//	ANSI Latin II (Central European)
			case 1251:	return 'CP1251';			break;	//	ANSI Cyrillic
			case 0:		//	CodePage is not always correctly set when the xls file was saved by Apple's Numbers program
			case 1252:	return 'CP1252';			break;	//	ANSI Latin I (BIFF4-BIFF7)
			case 1253:	return 'CP1253';			break;	//	ANSI Greek
			case 1254:	return 'CP1254';			break;	//	ANSI Turkish
			case 1255:	return 'CP1255';			break;	//	ANSI Hebrew
			case 1256:	return 'CP1256';			break;	//	ANSI Arabic
			case 1257:	return 'CP1257';			break;	//	ANSI Baltic
			case 1258:	return 'CP1258';			break;	//	ANSI Vietnamese
			case 1361:	return 'CP1361';			break;	//	ANSI Korean (Johab)
			case 10000:	return 'MAC';				break;	//	Apple Roman
			case 10001:	return 'CP932';				break;	//	Macintosh Japanese
			case 10002:	return 'CP950';				break;	//	Macintosh Chinese Traditional
			case 10003:	return 'CP1361';			break;	//	Macintosh Korean
			case 10006:	return 'MACGREEK';			break;	//	Macintosh Greek
			case 10007:	return 'MACCYRILLIC';			break;	//	Macintosh Cyrillic
                        case 10008:	return 'CP936';				break;  //	Macintosh - Simplified Chinese (GB 2312)
			case 10029:	return 'MACCENTRALEUROPE';		break;	//	Macintosh Central Europe
			case 10079:	return 'MACICELAND';			break;	//	Macintosh Icelandic
			case 10081:	return 'MACTURKISH';			break;	//	Macintosh Turkish
			case 21010:	return 'UTF-16LE';			break;	//	UTF-16 (BIFF8) This isn't correct, but some Excel writer libraries erroneously use Codepage 21010 for UTF-16LE
			case 32768:	return 'MAC';				break;	//	Apple Roman
			case 32769:	throw new PHPExcel_Exception('Code page 32769 not supported.');
													break;	//	ANSI Latin I (BIFF2-BIFF3)
			case 65000:	return 'UTF-7';				break;	//	Unicode (UTF-7)
			case 65001:	return 'UTF-8';				break;	//	Unicode (UTF-8)
		}

		throw new PHPExcel_Exception('Unknown codepage: ' . $codePage);
	}

}


text:
import { combineReducers } from 'redux';
import { routerReducer } from 'react-router-redux';

import comments from './comments';
import polls from './polls';

const rootReducer = combineReducers({comments, polls, routing: routerReducer });

export default rootReducer;


text:
ACCEPTED

#### According to
Index Fungorum

#### Published in
null

#### Original name
Coprinus stenocoleus Lindblad

### Remarks
null


text:
// $Id: CmdP.java,v 1.1 2006/12/01 00:57:00 binetude Exp $

/**
 * File: CmdP.java
 *
 * @author Sukun Kim
 */

package net.tinyos.sentri;

class Arg {
  static final short NO_ARG =5; // change when new arg is added
  static final String[] nm = new String[NO_ARG];

  static final short DEST = 0; {nm[DEST] = "dest";}
  static final short NSAMPLES =1; {nm[NSAMPLES] = "nSamples";}
  static final short INTRV = 2; {nm[INTRV] = "intrv";}
  static final short CHNLNO = 3; {nm[CHNLNO] = "chnlNo";}
  static final short SAMPLENO = 4; {nm[SAMPLENO] = "sampleNo";}

  static String getString(short arg) {
    return "<" + nm[arg] + ">";
  }
};

class Optn {
  static final short NO_OPTN = 6; // change when new optn is added
  static final String[] nm = new String[NO_OPTN];
  static final boolean[] arg = new boolean[NO_OPTN];

  static final short DEST = 0; {nm[DEST] = "dest";
    arg[DEST] = true;}
  static final short CHNLSELECT = 1; {nm[CHNLSELECT] = "chnlSelect";
    arg[CHNLSELECT] = true;}
  static final short SAMPLESTOAVG  = 2; {nm[SAMPLESTOAVG] = "samplesToAvg";
    arg[SAMPLESTOAVG] = true;}
  static final short NM  = 3; {nm[NM] = "nm";
    arg[NM] = true;}
  static final short TOUART = 4; {nm[TOUART] = "toUART";
    arg[TOUART] = false;}
  static final short VERBOSE = 5; {nm[VERBOSE] = "verbose";
    arg[VERBOSE] = false;}

  static String getString(short optn) {
    String outString = "[-" + nm[optn];
    if (arg[optn]) outString += " " + nm[optn];
    outString += "]";
    return outString;
  }
};

class Cmd {

  static final short NO_CMD = 18; // change when new cmd is added
  static final String[] nm = new String[NO_CMD];
  static final short[] argNo = new short[NO_CMD];
  static final short[][] argList= new short[NO_CMD][];
  static final short[] optnNo = new short[NO_CMD];
  static final short[][] optnList = new short[NO_CMD][];

  static final short LEDON = 0; {nm[LEDON] = "ledOn";
    argNo[LEDON] = 0;
    argList[LEDON] = new short[argNo[LEDON]];

    optnNo[LEDON] = 2;
    optnList[LEDON] = new short[optnNo[LEDON]];
    optnList[LEDON][0] = Optn.DEST;
    optnList[LEDON][1] = Optn.VERBOSE;
  }

  static final short LEDOFF = 1; {nm[LEDOFF] = "ledOff";
    argNo[LEDOFF] = 0;
    argList[LEDOFF] = new short[argNo[LEDOFF]];

    optnNo[LEDOFF] = 2;
    optnList[LEDOFF] = new short[optnNo[LEDOFF]];
    optnList[LEDOFF][0] = Optn.DEST;
    optnList[LEDOFF][1] = Optn.VERBOSE;
  }

  static final short PINGNODE = 2; {nm[PINGNODE] = "pingNode";
    argNo[PINGNODE] = 1;
    argList[PINGNODE] = new short[argNo[PINGNODE]];
    argList[PINGNODE][0] = Arg.DEST;

    optnNo[PINGNODE] = 2;
    optnList[PINGNODE] = new short[optnNo[PINGNODE]];
    optnList[PINGNODE][0] = Optn.TOUART;
    optnList[PINGNODE][1] = Optn.VERBOSE;
  }

  static final short NODELIST = 3; {nm[NODELIST] = "nodeList";
    argNo[NODELIST] = 0;
    argList[NODELIST] = new short[argNo[NODELIST]];

    optnNo[NODELIST] = 2;
    optnList[NODELIST] = new short[optnNo[NODELIST]];
    optnList[NODELIST][0] = Optn.TOUART;
    optnList[NODELIST][1] = Optn.VERBOSE;
  }

  static final short RESET = 4; {nm[RESET] = "reset";
    argNo[RESET] = 0;
    argList[RESET] = new short[argNo[RESET]];

    optnNo[RESET] = 2;
    optnList[RESET] = new short[optnNo[RESET]];
    optnList[RESET][0] = Optn.DEST;
    optnList[RESET][1] = Optn.VERBOSE;
  }

  static final short ERASEFLASH = 5; {nm[ERASEFLASH] = "eraseFlash";
    argNo[ERASEFLASH] = 0;
    argList[ERASEFLASH] = new short[argNo[ERASEFLASH]];

    optnNo[ERASEFLASH] = 2;
    optnList[ERASEFLASH] = new short[optnNo[ERASEFLASH]];
    optnList[ERASEFLASH][0] = Optn.DEST;
    optnList[ERASEFLASH][1] = Optn.VERBOSE;
  }

  static final short STARTSENSING = 6; {nm[STARTSENSING] = "startSensing";
    argNo[STARTSENSING] = 2;
    argList[STARTSENSING] = new short[argNo[STARTSENSING]];
    argList[STARTSENSING][0] = Arg.NSAMPLES;
    argList[STARTSENSING][1] = Arg.INTRV;

    optnNo[STARTSENSING] = 5;
    optnList[STARTSENSING] = new short[optnNo[STARTSENSING]];
    optnList[STARTSENSING][0] = Optn.DEST;
    optnList[STARTSENSING][1] = Optn.CHNLSELECT;
    optnList[STARTSENSING][2] = Optn.SAMPLESTOAVG;
    optnList[STARTSENSING][3] = Optn.NM;
    optnList[STARTSENSING][4] = Optn.VERBOSE;
  }

  static final short ERASESTART = 7; {nm[ERASESTART] = "eraseStart";
    argNo[ERASESTART] = 2;
    argList[ERASESTART] = new short[argNo[ERASESTART]];
    argList[ERASESTART][0] = Arg.NSAMPLES;
    argList[ERASESTART][1] = Arg.INTRV;

    optnNo[ERASESTART] = 5;
    optnList[ERASESTART] = new short[optnNo[ERASESTART]];
    optnList[ERASESTART][0] = Optn.DEST;
    optnList[ERASESTART][1] = Optn.CHNLSELECT;
    optnList[ERASESTART][2] = Optn.SAMPLESTOAVG;
    optnList[ERASESTART][3] = Optn.NM;
    optnList[ERASESTART][4] = Optn.VERBOSE;
  }

  static final short READPROFILE = 8; {nm[READPROFILE] = "readProfile";
    argNo[READPROFILE] = 0;
    argList[READPROFILE] = new short[argNo[READPROFILE]];

    optnNo[READPROFILE] = 3;
    optnList[READPROFILE] = new short[optnNo[READPROFILE]];
    optnList[READPROFILE][0] = Optn.DEST;
    optnList[READPROFILE][1] = Optn.TOUART;
    optnList[READPROFILE][2] = Optn.VERBOSE;
  }

  static final short READDATA = 9; {nm[READDATA] = "readData";
    argNo[READDATA] = 0;
    argList[READDATA] = new short[argNo[READDATA]];

    optnNo[READDATA] = 3;
    optnList[READDATA] = new short[optnNo[READDATA]];
    optnList[READDATA][0] = Optn.DEST;
    optnList[READDATA][1] = Optn.TOUART;
    optnList[READDATA][2] = Optn.VERBOSE;
  }

  static final short RANDOMREAD = 10; {nm[RANDOMREAD] = "randomRead";
    argNo[RANDOMREAD] = 3;
    argList[RANDOMREAD] = new short[argNo[RANDOMREAD]];
    argList[RANDOMREAD][0] = Arg.DEST;
    argList[RANDOMREAD][1] = Arg.CHNLNO;
    argList[RANDOMREAD][2] = Arg.SAMPLENO;

    optnNo[RANDOMREAD] = 2;
    optnList[RANDOMREAD] = new short[optnNo[RANDOMREAD]];
    optnList[RANDOMREAD][0] = Optn.TOUART;
    optnList[RANDOMREAD][1] = Optn.VERBOSE;
  }

  static final short TIMESYNCINFO = 11; {nm[TIMESYNCINFO] = "timesyncInfo";
    argNo[TIMESYNCINFO] = 1;
    argList[TIMESYNCINFO] = new short[argNo[TIMESYNCINFO]];
    argList[TIMESYNCINFO][0] = Arg.DEST;

    optnNo[TIMESYNCINFO] = 2;
    optnList[TIMESYNCINFO] = new short[optnNo[TIMESYNCINFO]];
    optnList[TIMESYNCINFO][0] = Optn.TOUART;
    optnList[TIMESYNCINFO][1] = Optn.VERBOSE;
  }

  static final short NETWORKINFO = 12; {nm[NETWORKINFO] = "networkInfo";
    argNo[NETWORKINFO] = 1;
    argList[NETWORKINFO] = new short[argNo[NETWORKINFO]];
    argList[NETWORKINFO][0] = Arg.DEST;

    optnNo[NETWORKINFO] = 2;
    optnList[NETWORKINFO] = new short[optnNo[NETWORKINFO]];
    optnList[NETWORKINFO][0] = Optn.TOUART;
    optnList[NETWORKINFO][1] = Optn.VERBOSE;
  }

  static final short FIXROUTE = 13; {nm[FIXROUTE] = "fixRoute";
    argNo[FIXROUTE] = 0;
    argList[FIXROUTE] = new short[argNo[FIXROUTE]];

    optnNo[FIXROUTE] = 2;
    optnList[FIXROUTE] = new short[optnNo[FIXROUTE]];
    optnList[FIXROUTE][0] = Optn.DEST;
    optnList[FIXROUTE][1] = Optn.VERBOSE;
  }

  static final short RELEASEROUTE = 14; {nm[RELEASEROUTE] = "releaseRoute";
    argNo[RELEASEROUTE] = 0;
    argList[RELEASEROUTE] = new short[argNo[RELEASEROUTE]];

    optnNo[RELEASEROUTE] = 2;
    optnList[RELEASEROUTE] = new short[optnNo[RELEASEROUTE]];
    optnList[RELEASEROUTE][0] = Optn.DEST;
    optnList[RELEASEROUTE][1] = Optn.VERBOSE;
  }

  static final short FORDEBUG = 15; {nm[FORDEBUG] = "forDebug";
    argNo[FORDEBUG] = 0;
    argList[FORDEBUG] = new short[argNo[FORDEBUG]];

    optnNo[FORDEBUG] = 3;
    optnList[FORDEBUG] = new short[optnNo[FORDEBUG]];
    optnList[FORDEBUG][0] = Optn.DEST;
    optnList[FORDEBUG][1] = Optn.TOUART;
    optnList[FORDEBUG][2] = Optn.VERBOSE;
  }

  static final short RESETBCSEQNO = 16; {nm[RESETBCSEQNO] = "resetBcSeqNo";
    argNo[RESETBCSEQNO] = 0;
    argList[RESETBCSEQNO] = new short[argNo[RESETBCSEQNO]];

    optnNo[RESETBCSEQNO] = 1;
    optnList[RESETBCSEQNO] = new short[optnNo[RESETBCSEQNO]];
    optnList[RESETBCSEQNO][0] = Optn.VERBOSE;
  }

  static final short HELP = 17; {nm[HELP] = "help";
    argNo[HELP] = 0;
    argList[HELP] = new short[argNo[HELP]];

    optnNo[HELP] = 1;
    optnList[HELP] = new short[optnNo[HELP]];
    optnList[HELP][0] = Optn.VERBOSE;
  }

  static String getString(short cmd) {
    String outString = nm[cmd];
    for (short i = 0; i < argNo[cmd]; i++)
      outString += " " + Arg.getString(argList[cmd][i]);
    for (short i = 0; i < optnNo[cmd]; i++) {
      outString += " " + Optn.getString(optnList[cmd][i]);
    }
    return outString;
  }

};

class CmdP {

  //  Command parameters  //
  short cmd = Cmd.NO_CMD;

  boolean broadcasting = true;
  int dest = TosP.TOS_BCAST_ADDR;

  long nSamples = 0;
  long intrv = 0;

  short chnlNo = 0;
  long sampleNo = 0;

  short chnlSelect = (1 << SentriConsts.MAX_CHANNEL) - 1;
  int samplesToAvg = 1;
  boolean spclNm = false;
  String nm = null;
  short toUART = 0;
  boolean verbose = false;

  private int init() {
    cmd = Cmd.NO_CMD;

    broadcasting = true;
    dest = TosP.TOS_BCAST_ADDR;

    nSamples = 0;
    intrv = 0;

    chnlNo = 0;
    sampleNo = 0;

    chnlSelect = (1 << SentriConsts.MAX_CHANNEL) - 1;
    samplesToAvg = 1;
    spclNm = false;
    nm = null;
    toUART = 0;
    verbose = false;

    return 0;
  }

  private int procArg(String[] args, int argsIndex, short arg) {
    switch (arg) {
    case Arg.DEST:
      broadcasting = false;
      dest = Integer.parseInt(args[argsIndex]);
      break;
    case Arg.NSAMPLES:
      nSamples = Long.parseLong(args[argsIndex]);
      break;
    case Arg.INTRV:
      intrv = Long.parseLong(args[argsIndex]);
      break;
    case Arg.CHNLNO:
      chnlNo = Short.parseShort(args[argsIndex]);
      break;
    case Arg.SAMPLENO:
      sampleNo = Long.parseLong(args[argsIndex]);
      break;
    default:
      System.out.println("ERROR: CmdP.procArg");
      break;
    }
    return 0;
  }

  private int procOptn(String[] args, int argsIndex, short optn) {
    switch (optn) {
    case Optn.DEST:
      broadcasting = false;
      dest = Integer.parseInt(args[argsIndex + 1]);
      break;
    case Optn.CHNLSELECT:
      chnlSelect = Short.parseShort(args[argsIndex + 1]);
      break;
    case Optn.SAMPLESTOAVG:
      samplesToAvg = Integer.parseInt(args[argsIndex + 1]);
      break;
    case Optn.NM:
      spclNm = true;
      nm = args[argsIndex + 1];
      break;
    case Optn.TOUART:
      toUART = 1;
      break;
    case Optn.VERBOSE:
      verbose = true;
      break;
    default:
      System.out.println("ERROR: CmdP.procOptn");
      break;
    }
    return 0;
  }

  int parse(String[] args) {
    int argsIndex = 0;
    short i;
    init();

    //  Parse cmd  //
    if (args.length < 1) {
      System.out.println(getUsage());
      return 1;
    }
    for (i = 0; i < Cmd.NO_CMD; i++)
      if (args[argsIndex].equals(Cmd.nm[i]))
	break;
    if (i == Cmd.NO_CMD) {
      System.out.println(getUsage());
      return 2;
    }
    cmd = i;
    ++argsIndex;

    //  Parse arg  //
    if (args.length < argsIndex + Cmd.argNo[cmd]) {
      System.out.println(getSpecificUsage(cmd));
      return 3;
    }
    for (i = 0; i < Cmd.argNo[cmd]; i++) {
      procArg(args, argsIndex, Cmd.argList[cmd][i]);
      ++argsIndex;
    }

    //  Parse optn  //
    boolean[] optnCheck = new boolean[Optn.NO_OPTN];
    for (i = 0; i < Optn.NO_OPTN; i++) optnCheck[i] = false;
    while (argsIndex < args.length) {
      for (i = 0; i < Optn.NO_OPTN; i++)
        if (args[argsIndex].equals("-" + Optn.nm[i]))
	  break;

      if ((i == Optn.NO_OPTN)
        || (Optn.arg[i] && (args.length < argsIndex + 2))
	|| optnCheck[i]) {
        System.out.println(getSpecificUsage(cmd));
        return 4;
      }
      short j = 0;
      for (j = 0; j < Cmd.optnNo[cmd]; j++) {
        if (Cmd.optnList[cmd][j] == i)
	  break;
      }
      if (j == Cmd.optnNo[cmd]) {
        System.out.println(getSpecificUsage(cmd));
        return 5;
      }

      procOptn(args, argsIndex, i);
      ++argsIndex;
      if (Optn.arg[i]) ++argsIndex;
      optnCheck[i] = true;
    }

    if (cmd == Cmd.HELP) System.out.println(getUsage());
    else System.out.println("********  " + Cmd.nm[cmd] + "  ********");
    return 0;
  }

  static final Arg dummyArg = new Arg();
  static final Optn dummyOptn = new Optn();
  static final Cmd dummyCmd = new Cmd();
  private String getUsage() {
    String outString = "Usage: java net.tinyos.SMT.DataCenter"
      + " <command> <arguments> [options] where" + "\n"
      + "\t" + "<command> <arguments> [options] can be"
      + " one of the following:" + "\n\n";
    for (short i = 0; i < Cmd.NO_CMD; i++)
      outString += Cmd.getString(i) + "\n";
    return outString;
  }
  private String getSpecificUsage(short aCmd) {
    return "Usage: java net.tinyos.SMT.DataCenter " + Cmd.getString(aCmd)
      + "\n";
  }

  public String toString() {
    String outString = "";
    outString += "cmd = " + cmd + "\n"
      + "broadcasting = " + broadcasting + ", dest = " + dest + "\n"
      + "nSamples = " + nSamples + ", intrv = " + intrv + "\n"
      + "chnlNo = " + chnlNo + ", sampleNo = " + sampleNo + "\n"
      + "chnlSelect = " + chnlSelect + ", samplesToAvg = " + samplesToAvg + "\n"
      + "spclNm = " + spclNm + ", nm = " + nm + "\n"
      + "toUART = " + toUART + ", verbose = " + verbose + "\n";
    return outString;
  }

}


text:
import React, { Component } from 'react';
import { Scrollbars } from 'react-custom-scrollbars';
import { range, cloneDeep } from 'lodash'; // isEqual

const offsetBottom = node => node.offsetTop + node.clientHeight;
const offsetTop = node => node.offsetTop;

// itemClassName
// getScroll
// setCurrentItem

class SmartScroll extends Component {
  constructor(props) {
    super(props);
    this.scroll = null;
    this.containerNode = null;
    this.items = [];

    this.topIndex = 0;
    this.bottomIndex = 0;
    this.topRendered = 0;
    this.bottomRendered = 0;
    this.renderedTail = 2;
    this.lastScrollTop = 0;
    this.scrollResponse = 50;

    this.itemClassName = `.${props.itemClassName}`;
  }
  componentDidMount() {
    // console.log('%c SmartScroll ==========> componentDidMount', 'color: red;');
    this.setInitState();
  }
  componentDidUpdate() {
    // console.log('%c SmartScroll ==========> componentDidUpdate', 'color: red;');
    this.setInitState();
  }
  setInitState() {
    console.log('%c SmartScroll === === ===> setInitState', 'color: green; font-weight: bold');
    range(this.items.length).forEach(this.hideItem);
    this.updateItems();
  }
  isVisible(itemIndex) {
    const item = this.items[itemIndex] || this.items[0];
    const { scrollTop, clientHeight } = this.scroll.getValues();
    const scrollBottom = scrollTop + clientHeight;
    const pageTop = offsetTop(item);
    const pageBottom = offsetBottom(item);
    return !(pageTop > scrollBottom || pageBottom < scrollTop);
  }
  topPageLeave() {
    if (!this.isVisible(this.topIndex)) {
      // console.log('%c \ntopPageLeave', 'color: red;');
      this.topIndex += 1;
      return true;
    }
    return false;
  }
  topPageIn() {
    const item = this.items[this.topIndex - 1];
    if (!!item && this.isVisible(this.topIndex - 1)) {
      // console.log('%c \ntopPageIn', 'color: green;');
      this.topIndex -= 1;
      return true;
    }
    return false;
  }

  handleVisibility = ({ scrollTop }) => {
    if (Math.abs(this.lastScrollTop - scrollTop) < this.scrollResponse) return;
    this.lastScrollTop = scrollTop;
    if (this.topPageLeave(scrollTop) || this.topPageIn(scrollTop)) {
      this.updateItems();
      if (typeof this.props.setCurrentItem === 'function') {
        this.setCurrentItem();
      }
    }
  }

  updateItems() {
    const nowVisible = this.getVisibleIndexes();
    const newVisible = this.findIndexes();
    this.setIndexes(newVisible);

    // console.log('nowVisible: ', nowVisible);
    // console.log('newVisible: ', newVisible);
    // console.log('topRenderedNow: %o, bottomRenderedNow: %o', topRendered, bottomRendered);
    if (nowVisible === null) {
      console.log('%c updateItems ===> No visible', 'color: red;');
      range(newVisible.topRendered, newVisible.bottomRendered + 1)
        .forEach(this.showItem);
      return;
    }
    console.log('%c updateItems ===> Update visible', 'color: green;');
    const minTop = Math.min(nowVisible.topRendered, newVisible.topRendered);
    const maxTop = Math.max(nowVisible.topRendered, newVisible.topRendered);
    const minBottom = Math.min(nowVisible.bottomRendered, newVisible.bottomRendered);
    const maxBottom = Math.max(nowVisible.bottomRendered, newVisible.bottomRendered);
    range(minTop, maxBottom + 1).forEach((itemIndex) => {
      if (itemIndex >= maxTop && itemIndex <= minBottom) return; // for overlaping indexes
      if (itemIndex < newVisible.topRendered || itemIndex > newVisible.bottomRendered) {
          // item out of new indexes
        this.hideItem(itemIndex);
        return;
      }
      this.showItem(itemIndex);
    });
  }
  getVisibleIndexes() {
    const nowVisible = [...this.containerNode.querySelectorAll('[data-index]')];
    if (nowVisible.length) {
      const topRendered = parseInt(nowVisible[0].dataset.index);
      const bottomRendered = parseInt(nowVisible[nowVisible.length - 1].dataset.index);
      return { topRendered, bottomRendered };
    }
    return null;
  }
  showItem = (itemIndex) => {
    this.items[itemIndex].setAttribute('data-index', itemIndex);
    this.items[itemIndex].classList.remove('hidden');
  }
  hideItem = (itemIndex) => {
    this.items[itemIndex].removeAttribute('data-index');
    this.items[itemIndex].classList.add('hidden');
  }
  setIndexes(indexes) {
    // console.log('setIndexes === === === ===> indexes');
    const { topIndex, bottomIndex, topRendered, bottomRendered } = indexes;
    this.topRendered = topRendered;
    this.bottomRendered = bottomRendered;
    this.topIndex = topIndex;
    this.bottomIndex = bottomIndex;
    // this.logIndexes();
  }
  findIndexes = () => {
    console.log('\nSmartScroll === ===> findIndexes');
    const { renderedTail, items } = this; // items

    const startIndex = this.topIndex || 0;
    // console.log('findIndexes === ===> startIndex: ', topIndex);
    let newTopIndex = null;
    let newBottomIndex = null;
    let topIndex = null;
    let bottomIndex = null;
    let topRendered = null;
    let bottomRendered = null;

    const newIndexes = () => {
      topIndex = newTopIndex;
      bottomIndex = newBottomIndex || newTopIndex;
      topRendered = (newTopIndex - renderedTail) >= 0
        ? (newTopIndex - renderedTail) : 0;
      bottomRendered = (bottomIndex + renderedTail) < items.length
        ? (bottomIndex + renderedTail) : items.length - 1;
      // console.log('now return new indexes');
      // console.log({ topIndex, bottomIndex, topRendered, bottomRendered });
      return { topIndex, bottomIndex, topRendered, bottomRendered };
    };

    const findVisible = (itemIndex) => {
      // console.log('=== === ===> try index: ', itemIndex);
      if (this.isVisible(itemIndex)) {
        // console.log('visible');
        if (newTopIndex === null) {
          // console.log('newTopIndex: ', itemIndex);
          newTopIndex = itemIndex;
        } else {
          // console.log('newBottomIndex: ', itemIndex);
          newBottomIndex = itemIndex;
        }
      } else if (newTopIndex !== null) {
        return newIndexes();
      }
      if (itemIndex + 1 < items.length && topRendered === null) {
        // console.log('will test next index');
        findVisible(itemIndex + 1);
      }
      return newIndexes();
    };
    return findVisible(startIndex);
  }
  logIndexes() {
    const { topIndex, bottomIndex, topRendered, bottomRendered } = this;
    console.log('%c\nIndexes now', 'color: green; font-weight: bold');
    console.log('%c topIndex: %o, bottomIndex: %o', 'color: green;', topIndex, bottomIndex);
    console.log('%c topRendered: %o, bottomRendered: %o', 'color: red;', topRendered, bottomRendered);
  }
// =================================================================
  findCurrentItem() {
    // return Math.round((this.topIndex + this.bottomIndex) / 2);
    return Math.floor((this.topIndex + this.bottomIndex) / 2);
  }
  setCurrentItem() {
    const { setCurrentItem } = this.props;
    const newCurrentIndex = this.findCurrentItem();
    if (this.currentIndex !== newCurrentIndex) {
      this.currentIndex = newCurrentIndex;
      setCurrentItem(this.currentIndex);
    }
  }
  scrollToItem = (itemIndex) => {
    console.log('SmartScroll === ===> scrollToItem itemIndex: ', itemIndex);
    if (itemIndex >= 0 && itemIndex < this.items.length) {
      const { offsetTop } = this.items[itemIndex];
      this.scroll.scrollTop(offsetTop);
    }
  }
// =================================================================

  getScroll = (scrollRef) => {
    if (!scrollRef) return;
    // console.log('SmartScroll ===> getScroll');
    this.scroll = scrollRef;
    this.containerNode = scrollRef.refs.container;
    this.items = [...this.containerNode.querySelectorAll(this.itemClassName)];
    this.lastIndex = this.items.lendth - 1;
    const scrollToItem = this.scrollToItem;
    const smartScroll = { ...scrollRef, scrollToItem };
    this.props.getScroll && this.props.getScroll(smartScroll);
  }
  clearProps() {
    const scrollProps = cloneDeep(this.props);
    delete scrollProps.getScroll;
    delete scrollProps.itemClassName;
    delete scrollProps.setCurrentItem;
    return scrollProps;
  }
  render() {
    const scrollProps = this.clearProps();
    return (
      <Scrollbars
        ref={this.getScroll}
        onScrollFrame={this.handleVisibility}
        {...scrollProps}
      >
        {this.props.children}
      </Scrollbars>
    );
  }
}
export default SmartScroll;


text:
"""Contains custom Event Hooks for the REST Resources.

Contains custom Event Hooks for specific
REST Resources provided by the Python Eve Server.
"""
__author__ = "Sanjay Joshi"
__copyright__ = "IBM Copyright 2015"
__credits__ = ["Sanjay Joshi"]
__license__ = "Apache 2.0"
__version__ = "1.0"
__maintainer__ = "Sanjay Joshi"
__email__ = "joshisa@us.ibm.com"
__status__ = "Prototype"


text:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
        package="net.singlecelledorganisms.aerialassist"
        android:versionCode="1"
        android:versionName="1.0">

    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />

    <!-- This is the platform API where the app was introduced. -->
    <uses-sdk android:minSdkVersion="18" />
	<uses-feature android:glEsVersion="0x00020000"/>

    <application android:icon="@drawable/icon" android:label="@string/app_name" android:hasCode="true">

        <!-- Our activity is the built-in NativeActivity framework class.
             This will take care of integrating with our NDK code. -->
        <activity android:name="android.app.NativeActivity"
                android:label="@string/app_name"
                android:configChanges="orientation|keyboardHidden"
				android:theme="@android:style/Theme.NoTitleBar.Fullscreen"
				android:screenOrientation="landscape">
            <!-- Tell NativeActivity the name of or .so -->
            <meta-data android:name="android.app.lib_name"
                    android:value="FrcSim" />
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
    </application>

</manifest>