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

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

        #region Windows Form Designer generated code

        /// <summary>
        /// Required method for Designer support - do not modify
        /// the contents of this method with the code editor.
        /// </summary>
        private void InitializeComponent()
        {
            this.MessagesTextbox = new System.Windows.Forms.TextBox();
            this.textBox1 = new System.Windows.Forms.TextBox();
            this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel();
            this.button1 = new System.Windows.Forms.Button();
            this.tableLayoutPanel1.SuspendLayout();
            this.SuspendLayout();
            //
            // MessagesTextbox
            //
            this.MessagesTextbox.BackColor = System.Drawing.SystemColors.MenuText;
            this.MessagesTextbox.BorderStyle = System.Windows.Forms.BorderStyle.None;
            this.MessagesTextbox.Dock = System.Windows.Forms.DockStyle.Fill;
            this.MessagesTextbox.ForeColor = System.Drawing.SystemColors.MenuHighlight;
            this.MessagesTextbox.Location = new System.Drawing.Point(188, 3);
            this.MessagesTextbox.Multiline = true;
            this.MessagesTextbox.Name = "MessagesTextbox";
            this.MessagesTextbox.Size = new System.Drawing.Size(200, 378);
            this.MessagesTextbox.TabIndex = 0;
            this.MessagesTextbox.TextAlign = System.Windows.Forms.HorizontalAlignment.Right;
            //
            // textBox1
            //
            this.textBox1.BackColor = System.Drawing.SystemColors.MenuText;
            this.textBox1.BorderStyle = System.Windows.Forms.BorderStyle.None;
            this.textBox1.Dock = System.Windows.Forms.DockStyle.Fill;
            this.textBox1.ForeColor = System.Drawing.SystemColors.Menu;
            this.textBox1.Location = new System.Drawing.Point(3, 3);
            this.textBox1.Multiline = true;
            this.textBox1.Name = "textBox1";
            this.textBox1.Size = new System.Drawing.Size(179, 378);
            this.textBox1.TabIndex = 1;
            this.textBox1.MouseDoubleClick += new System.Windows.Forms.MouseEventHandler(this.textBox1_MouseDoubleClick);
            //
            // tableLayoutPanel1
            //
            this.tableLayoutPanel1.BackColor = System.Drawing.SystemColors.MenuText;
            this.tableLayoutPanel1.ColumnCount = 2;
            this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 47.57033F));
            this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 52.42967F));
            this.tableLayoutPanel1.Controls.Add(this.MessagesTextbox, 1, 0);
            this.tableLayoutPanel1.Controls.Add(this.textBox1, 0, 0);
            this.tableLayoutPanel1.Controls.Add(this.button1, 0, 1);
            this.tableLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Fill;
            this.tableLayoutPanel1.Location = new System.Drawing.Point(0, 0);
            this.tableLayoutPanel1.Name = "tableLayoutPanel1";
            this.tableLayoutPanel1.RowCount = 2;
            this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 93.4466F));
            this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 6.553398F));
            this.tableLayoutPanel1.Size = new System.Drawing.Size(391, 412);
            this.tableLayoutPanel1.TabIndex = 2;
            //
            // button1
            //
            this.button1.Dock = System.Windows.Forms.DockStyle.Fill;
            this.button1.FlatStyle = System.Windows.Forms.FlatStyle.System;
            this.button1.Location = new System.Drawing.Point(3, 387);
            this.button1.Name = "button1";
            this.button1.Size = new System.Drawing.Size(179, 22);
            this.button1.TabIndex = 2;
            this.button1.UseVisualStyleBackColor = true;
            this.button1.Click += new System.EventHandler(this.button1_Click);
            //
            // FastEval
            //
            this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
            this.ClientSize = new System.Drawing.Size(391, 412);
            this.Controls.Add(this.tableLayoutPanel1);
            this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.SizableToolWindow;
            this.Name = "FastEval";
            this.ShowInTaskbar = false;
            this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
            this.Text = "FastEval";
            this.tableLayoutPanel1.ResumeLayout(false);
            this.tableLayoutPanel1.PerformLayout();
            this.ResumeLayout(false);

        }

        #endregion

        private System.Windows.Forms.TextBox MessagesTextbox;
        private System.Windows.Forms.TextBox textBox1;
        private System.Windows.Forms.TableLayoutPanel tableLayoutPanel1;
        private System.Windows.Forms.Button button1;
    }
}

redpajama_set_name: RedPajamaGithub


text:
valley-scroll.js

A simple script to give your website's scrolling that Silicon Valley flair.

Usage:

  ```<script src="https://github.com/GregorStocks/valley-scroll.js/blob/master/valley-scroll.js"></script>```


text:
from Router import *
from PyQt4 import QtCore

class yRouter(Router):
    device_type="yRouter"

    def __init__(self):
        Interfaceable.__init__(self)
        self.setProperty("WLAN", "False")
        self.setProperty("mac_type", "MAC 802.11 DCF")
        self.lightPoint = QPoint(-14,15)


text:
from __future__ import unicode_literals

SEQUENCE = [
    'test_evolution',
]


text:
[Factory method pattern](https://en.wikipedia.org/wiki/Factory_method_pattern)
--------------

**Factory method pattern** is a [creational pattern](https://en.wikipedia.org/wiki/Creational_pattern) that uses factory methods to deal with the problem of [creating objects](https://en.wikipedia.org/wiki/Object_creation) without having to specify the exact class of the object that will be created.

For further details, refer to notes [Factory (OOP)](../oop-factory.md)

```java
// Example of Abstract Factory and Factory design pattern  in Java
DocumentBuilderFactory abstractFactory = DocumentBuilderFactory.newInstance();
DocumentBuilder factory = abstractFactory.newDocumentBuilder();
Document doc = factory.parse(stocks)
```

In this example DocumentBuilderFactory (Abstract Factory) creates DocumentBuilder (Factory) which creates Documents (Products).

**AbstractFactory pattern uses composition** to delegate responsibility of creating object to another class while
**Factory method design pattern uses inheritance** and relies on derived class or sub class to create object.

Factory should be an interface and clients first either creates factory or get factory which later used to create objects.


text:
A Node.js-based controller module for the Raspberry Pi camera.

_Note_: This should work well for photo and timelapse, video has yet to be tested but may work as well.

## To Install

	npm install raspicam

## To Use

Require raspicam in your node app, then used the exposed constructor to create a RaspiCam object that you can use to take photos, start a timelapse, or record video.

	var RaspiCam = require("raspicam");

	var camera = new RaspiCam({ opts });

	//to take a snapshot, start a timelapse or video recording
	camera.start( );

	//to stop a timelapse or video recording
	camera.stop( );

	//listen for the "start" event triggered when the start method has been successfully initiated
	camera.on("start", function(){
		//do stuff
	});

	//listen for the "read" event triggered when each new photo/video is saved
	camera.on("read", function(err, timestamp, filename){
		//do stuff
	});

	//listen for the "stop" event triggered when the stop method was called
	camera.on("stop", function(){
		//do stuff
	});

	//listen for the process to exit when the timeout has been reached
	camera.on("exit", function(){
		//do stuff
	});

### RaspiCam Constructor

The RaspiCam() constructor creates an object that can then be triggered to take a snapshot or start a timelapse or video recording. The constructor options mirror those offered by the raspistill and raspivideo commands provided by the Raspberry Pi Camera API.

### RaspiCam Constructor Options for Photo and Timelapse

#### Required

*	`mode` : String - "photo" or "timelapse"
*	`output` : String - the path and filename where you want to store the photos (use sprintf-style variables, like %d, for incrementing timelapse photos)

#### Optional

##### Image parameter commands

###### Parameters with Values

*	`w`, `width` : Integer or String - Set image width <size>
*	`h`, `height` : Integer or String - Set image height <size>
*	`q`, `quality` : Integer or String - Set jpeg quality <0 to 100>
*	`t`, `timeout` : Integer or String - Time (in ms) before takes picture and shuts down (if not specified, set to 5s)
*	`th`, `thumb` : String - Set thumbnail parameters (x:y:quality)
*	`e`, `encoding` : String - Encoding to use for output file (jpg, bmp, gif, png)
*	`x`, `exif` : String - EXIF tag to apply to captures (format as 'key=value')
*	`tl`, `timelapse` : Integer or String - Timelapse mode. Takes a picture every <t>ms

###### Flags

*	`r`, `raw` : Add raw bayer data to jpeg metadata
*	`v`, `verbose` : Output verbose information during run
*	`d`, `demo` : Run a demo mode (cycle through range of camera options, no capture)

##### Preview parameter commands

###### Flags

Note: I've kept these in for completeness, but I'm not sure how they will be useful.

*	`p`, `preview` : Preview window settings <'x,y,w,h'>
*	`f`, `fullscreen` : Fullscreen preview mode
*	`op`, `opacity` : Preview window opacity (0-255)
*	`n`, `nopreview` : Do not display a preview window

###### Image parameter commands

###### Parameters with Values

*	`sh`, `sharpness` : Integer or String - Set image sharpness (-100 to 100)
*	`co`, `contrast` : Integer or String - Set image contrast (-100 to 100)
*	`br`, `brightness` : Integer or String - Set image brightness (0 to 100)
*	`sa`, `saturation` : Integer or String - Set image saturation (-100 to 100)
*	`ISO`, `ISO` : Integer or String - Set capture ISO
*	`ev`, `ev` : Integer or String - Set EV compensation
*	`ex`, `exposure` : String - Set exposure mode (off,auto,night,nightpreview,backlight,spotlight,sports,snow,beach,verylong,fixedfps,antishake,fireworks)
*	`awb`, `awb` : String - Set AWB mode (off,auto,sun,cloud,shade,tungsten,fluorescent,incandescent,flash,horizon)
*	`ifx`, `imxfx` : String - Set image effect (none,negative,solarise,sketch,denoise,emboss,oilpaint,hatch,gpen,pastel,watercolour,film,blur,saturation,colourswap,washedout,posterise,colourpoint,colourbalance,cartoon)
*	`cfx`, `colfx` : String - Set colour effect (U:V)
*	`mm`, `metering` : String - Set metering mode (average,spot,backlit,matrix)
*	`rot`, `rotation` : Integer or String - Set image rotation (0-359)

###### Flags

*	`vs`, `vstab` : Turn on video stablisation
*	`hf`, `hflip` : Set horizontal flip
*	`vf`, `vflip` : Set vertical flip

### RaspiCam Constructor Options for Video

#### Required

*	`mode` : String - "video"
*	`output` : String - the path and filename where you want to store the video (to write to stdout, use '-')

#### Optional

##### Image parameter commands

###### Parameters with Values

*	`w`, `width` : Integer or String - Set image width <size> (Default is 1920)
*	`h`, `height` : Integer or String - Set image height <size> (Default is 1080)
*	`b`, `bitrate` : Integer or String - Set bitrate. Use bits per second (e.g. 10MBits/s would be 10000000)
*	`t`, `timeout` : Integer or String - Time (in ms) to capture for. If not specified, set to 5s. Zero to disable
*	`fps`, `framerate` : Integer or String - Specify the frames per second to record
*	`g`, `intra` : Integer or String - Specify the intra refresh period (key frame rate/GoP size)

###### Flags

*	`v`, `verbose` : Output verbose information during run
*	`d`, `demo` : Run a demo mode (cycle through range of camera options, no capture)
*	`e`, `penc` : Display preview image _after_ encoding (shows compression artifacts)

##### Preview parameter commands

###### Flags

Note: I've kept these in for completeness, but I'm not sure how they will be useful.

*	`p`, `preview` : Preview window settings <'x,y,w,h'>
*	`f`, `fullscreen` : Fullscreen preview mode
*	`op`, `opacity` : Preview window opacity (0-255)
*	`n`, `nopreview` : Do not display a preview window

###### Image parameter commands

###### Parameters with Values

*	`sh`, `sharpness` : Integer or String - Set image sharpness (-100 to 100)
*	`co`, `contrast` : Integer or String - Set image contrast (-100 to 100)
*	`br`, `brightness` : Integer or String - Set image brightness (0 to 100)
*	`sa`, `saturation` : Integer or String - Set image saturation (-100 to 100)
*	`ISO`, `ISO` : Integer or String - Set capture ISO
*	`ev`, `ev` : Integer or String - Set EV compensation
*	`ex`, `exposure` : String - Set exposure mode (off,auto,night,nightpreview,backlight,spotlight,sports,snow,beach,verylong,fixedfps,antishake,fireworks)
*	`awb`, `awb` : String - Set AWB mode (off,auto,sun,cloud,shade,tungsten,fluorescent,incandescent,flash,horizon)
*	`ifx`, `imxfx` : String - Set image effect (none,negative,solarise,sketch,denoise,emboss,oilpaint,hatch,gpen,pastel,watercolour,film,blur,saturation,colourswap,washedout,posterise,colourpoint,colourbalance,cartoon)
*	`cfx`, `colfx` : String - Set colour effect (U:V)
*	`mm`, `metering` : String - Set metering mode (average,spot,backlit,matrix)
*	`rot`, `rotation` : Integer or String - Set image rotation (0-359)

###### Flags

*	`vs`, `vstab` : Turn on video stablisation
*	`hf`, `hflip` : Set horizontal flip
*	`vf`, `vflip` : Set vertical flip

### RaspiCam Object Methods

#### RaspiCam.start( )

Depending on the `mode`, this will either take a snapshot ("photo"), start a timelapse ("timelapse") or start a video recording ("video").

You can only call start() once on a RaspiCam object, as the same physical camera cannot do multiple captures at once.

Returns `false` if any errors, otherwise returns `true`.

Emits the following signals:

*	`start` with payload (err, timestamp) when the capture process was started by a .start() method call
*	`read` with payload (err, timestamp, filename) when a new file is saved (very useful for timelapses)
*	`exit` with payload (timestamp) when the capture process exits via timeout

#### RaspiCam.stop( )

This stops any ongoing camera process.

Returns `true` if it stopped a process, otherwise returns `false`.

Emits the following signals:

*	`stop` with payload (err, timestamp) when the capture process was stopped by a .stop() method call

#### RaspiCam.set( opt, value )

This is a setter - it sets any option you give it. Opt must be a string (eg. "width").

#### RaspiCam.get( opt )

This is a getter - it returns any option you give it. Opt must be a string (eg. "width").


text:
var common = require('../common-tap.js')
var fs = require('fs')
var path = require('path')

var mkdirp = require('mkdirp')
var test = require('tap').test

var npm = require('../../lib/npm.js')

var pkg = common.pkg
var subDirectory = path.resolve(pkg, 'sub-directory')
var packagePath = path.resolve(pkg, 'package.json')
var cache = common.cache

var json = { name: 'cat', version: '0.1.2' }

test('npm version <semver> from a subdirectory', function (t) {
  mkdirp.sync(subDirectory)
  process.chdir(subDirectory)
  fs.writeFileSync(packagePath, JSON.stringify(json), 'utf8')
  npmLoad()

  function npmLoad () {
    npm.load({ cache: cache }, function () {
      common.makeGitRepo({
        path: pkg,
        added: ['package.json']
      }, version)
    })
  }

  function version (er, stdout, stderr) {
    t.ifError(er, 'git repo initialized without issue')
    t.notOk(stderr, 'no error output')
    npm.config.set('sign-git-commit', false)
    npm.config.set('sign-git-tag', false)
    npm.commands.version(['patch'], checkVersion)
  }

  function checkVersion (er) {
    var git = require('../../lib/utils/git.js')
    t.ifError(er, 'version command ran without error')
    git.whichAndExec(
      ['log'],
      { cwd: pkg, env: process.env },
      checkCommit
    )
  }

  function checkCommit (er, log, stderr) {
    t.ifError(er, 'git log ran without issue')
    t.notOk(stderr, 'no error output')
    t.ok(log.match(/0\.1\.3/g), 'commited from subdirectory')
    t.end()
  }
})


text:
<?php
namespace Subscription\Controller;

use Application\Controller\BaseController;
use Subscription\Service\SubscriptionServiceInterface;
use Zend\View\Model\ViewModel;

class AdminController extends BaseController
{
    /**
     *
     * @var SubscriptionServiceInterface
     */
    protected $service;

    /**
     *
     * @param SubscriptionServiceInterface $subscriptionService
     */
    public function __construct(SubscriptionServiceInterface $service)
    {
        $this->service = $service;
    }

    /**
     *
     * {@inheritDoc}
     * @see \Zend\Mvc\Controller\AbstractActionController::indexAction()
     */
    public function indexAction()
    {
        $filter = array();

        // get paginator
        $paginator = $this->service->getAll($filter);

        $paginator->setCurrentPageNumber($this->page);

        $paginator->setItemCountPerPage($this->countPerPage);

        // trigger event
        $this->getEventManager()->trigger('subscriptionAdminIndex', $this, array(
            'authId' => $this->identity()->getAuthId(),
            'historyUrl' => $this->getRequest()->getUri()
        ));

        // return view model
        return new ViewModel(array(
            'paginator' => $paginator,
            'page' => $this->page,
            'itemCount' => $paginator->getTotalItemCount(),
            'pageCount' => $paginator->count(),
            'queryParams' => $this->params()->fromQuery(),
            'routeParams' => array()
        ));
    }
}


text:
ACCEPTED

#### According to
Index Fungorum

#### Published in
null

#### Original name
Calicium sachalinense M. Satô

### Remarks
null


text:
/* eslint-disable global-require */
import 'react-native';
import React from 'react';
import renderer from 'react-test-renderer';
import GrowthImageCard from '../../../../src/components/home/GrowthImageCard';

it('renders correctly', () => {
  // eslint-disable-next-line no-unused-vars
  const dialog = renderer.create(
    <GrowthImageCard
      imageUrl={require('../../../../assets/growth-ui/img/home-6.jpg')}
      actions={{}}
      text={'Growth 技能树'}
    />,
  );
  const dialogJson = dialog.toJSON();
  expect(dialogJson).toMatchSnapshot();
});


text:
require 'fog/core/model'

module Fog
  module Identity
    class OpenStack
      class Tenant < Fog::Model
        identity :id

        attribute :description
        attribute :enabled
        attribute :name

        def to_s
          self.name
        end

        def roles_for(user)
          service.roles(
            :tenant => self,
            :user   => user)
        end

        def users
          requires :id
          service.users(:tenant_id => self.id)
        end

        def destroy
          requires :id
          service.delete_tenant(self.id)
          true
        end

        def update(attr = nil)
          requires :id
          merge_attributes(
            service.update_tenant(self.id, attr || attributes).body['tenant'])
          self
        end

        def save
          requires :name
          identity ? update : create
        end

        def create
          merge_attributes(
            service.create_tenant(attributes).body['tenant'])
          self
        end

        def grant_user_role(user_id, role_id)
          service.add_user_to_tenant(self.id, user_id, role_id)
        end

        def revoke_user_role(user_id, role_id)
          service.remove_user_from_tenant(self.id, user_id, role_id)
        end
      end # class Tenant
    end # class OpenStack
  end # module Identity
end # module Fog


text:
These docs are hosted by [GitHub Pages] at [messageformat.github.io/messageformat], and are generated by [JSDoc], using a [custom fork] of the [DocStrap] template and some command-line magic.

To re-build the docs, run `make docs` in the project root. As the links are slightly prettified (dropping the .html extensions), if you want to view them locally, you may want to run something like `npx http-server` in this directory.

[github pages]: https://pages.github.com/
[messageformat.github.io/messageformat]: https://messageformat.github.io/messageformat/
[jsdoc]: http://usejsdoc.org/
[custom fork]: https://github.com/messageformat/docstrap
[docstrap]: https://docstrap.github.io/docstrap/


text:
FOUNDATION_EXPORT double Pods_Signup_DemoVersionNumber;
FOUNDATION_EXPORT const unsigned char Pods_Signup_DemoVersionString[];


text:
usage() {
    echo "usage: adduser.sh [options]"
    echo "       -s  | --short-name        [Required] short name used to create valid k8s resource name."
    echo "       -u  | --user-name         [One of -u or -sa is required] k8s cluster user name."
    echo "       -sa | --service-account   [One of -u or -sa is required] k8s cluster service account name."
    echo "       -n  | --namespace         [Required] namespace to add this user in."
    echo "       --project                 [Required] project id"
    echo "       --security-policy          set up security policy for the user."
    echo "                                  pass a comma separated string as: uid,group_id"
    echo "                                  example: 2000,3000"
    echo "                                  means the user will run as uid 2000,"
    echo "                                  fsgroup 3000, supplementalGroup: 3000."
    echo "                                  If group id is left blank, default is set to the same as uid. "
    echo "                                  Warning: if not set, the user can run tasks as Root!"
    echo "                                  Note: 1) please use an id larger than 2000 to avoid conflicts with GKE."
    echo "                                        2) runAsGroup is guarded by a feature gate, which is"
    echo "                                        not currently supported in GKE 1.12. fsGroup and supplemental group"
    echo "                                        are specified in the pod as group identity instead."
    echo "       --auto-pvc                 whether to create private pvc; this requires an existing nfs auto provisioner."
    echo "       --auto-pvc-storage-size    auto private pvc size, default 10G"
    echo "       --auto-pvc-storage-class   auto private pvc provisioner, default nfs-client"
    echo "       --pvcs                     other pvc names this user has access to, a comma separated list"
    echo "example: adduser.sh -s alice -u alice@example.com -n emc-lab --security-policy 7000 --auto-pvc --pvcs pvc1,pc2"
    echo "Note: this tool will not do any retry for the commands, but the errors will be printed out for debugging."
}

export short_name=
export user_name=
export buc_name=
export buc_user_id=
export namespace=
need_security_policy=
security_policy=
export k8s_name=
export uid=
export group_id=
project_id=

export access_pvcs=
export auto_pvc_name=
auto_pvc=0
export auto_pvc_storage_class="nfs-client"
export auto_pvc_storage_size="10G"

# Common names used during the kbatch set up process
auto_provisioner_app_name="nfs-client-provisioner"

# Apply a resource
apply-resource() {
yaml=$(envsubst < $1)
cat <<EOF | kubectl apply -f -
${yaml}
EOF
}

# Patch a user role
patch-role() {
patch=$(envsubst < $1)
cat <<EOF | kubectl auth reconcile -f -
${patch}
EOF
}

# Construct the batch user context.
build-batch-user-context() {
if [[ ${need_security_policy} ]]; then
  # Create batch user context with the pod security policy
  apply-resource internal/user-context-with-pod-security-policy.yaml
else
  apply-resource internal/user-context-no-pod-security-policy.yaml
fi
}

# Start to read in the command options.
while [[ $1 ]]; do
    case $1 in
        -s | --short-name )     shift
                                short_name="$1"
                                ;;
        -u | --user-name )      shift
                                user_name="$1"
                                ;;
        -sa | --service-account )  shift
                                service_account="$1"
                                ;;
        -n | --namespace )      shift
                                namespace="$1"
                                ;;
        --project )             shift
                                project_id="$1"
                                ;;
        --security-policy )     shift
                                security_policy="$1"
                                need_security_policy=1
                                ;;
        --auto-pvc )            auto_pvc=1
                                ;;
        --auto-pvc-storage-class)  shift
                                auto_pvc_storage_class="$1"
                                ;;
        --auto-pvc-storage-size)  shift
                                auto_pvc_storage_size="$1"
                                ;;
        --pvcs )                shift
                                access_pvcs="$1"
                                ;;
        * )                     usage
                                exit 1
    esac
    shift
done

# Required values
if [[ -z "$user_name" && -z "$service_account" ]]; then
  usage
  exit
fi

if [[ -n "$user_name" && -n "$service_account" ]]; then
  usage
  exit
fi

if [[ -z "$short_name" || -z "$namespace" || -z "$project_id" ]]; then
  usage
  exit
fi

# check that the namespace exists
ns_exists=$(kubectl get namespace/"$namespace")
if [[ ! ${ns_exists} ]]; then
  echo "Namespace ${namespace} cannot be found!"
  exit 1
fi

# check that there is an nfs auto provisioner in cluster if --auto-pvc is specified
if (( auto_pvc == 1 )); then
  auto_provisioner_running=$(kubectl get pod --all-namespaces=true --selector=app=${auto_provisioner_app_name} -o jsonpath='{.items[0].status.phase}')
  if ! [[ "$auto_provisioner_running" == "Running" ]]; then
    echo "No nfs auto provisioner found in your cluster, please deploy one by using"
    echo "deploy_nfs_client_provisioner!"
    exit 1
  fi
fi

# parse the uid and group id if --security-context is specified
if [[ ${need_security_policy}  ]]; then
  if [[ ! ${security_policy} ]]; then
    echo "For security policy, please specify the users uid and groupid as \"uid,groupid\""
    exit 1
  fi

  index=0
  declare -a values
  # only allow 2 ids to be specified
  while (( index < 2 )); do
    cutindex=$(( index + 1 ))
    id=$(echo ${security_policy} | cut -f${cutindex} -d,)
    if [[ ${id} ]]; then
      if ! [[ "$id" =~ ^[0-9]+$ ]]; then
        echo "Error: $id is not an integer in security_policy."
        exit 1
      fi
      # if id is specified, assign the value to the min and max.
      values[$index]=${id}
    fi
    index=$(( $index+1 ))
  done

  uid=${values[0]}
  echo "uid is ${uid}"
  group_id=${values[1]}
  echo "group id is ${group_id}"
fi

# Give warning about user has 0 as uid
if [[ -z ${need_security_policy} || ${uid} -eq 0 ]]; then
  echo "============================= Warning ================================="
  echo "${user_name} can run as root in BatchTasks and access storage."
  echo "If this is not what you want, use --security-policy flag to set uid for this user."
  read -p "Continue? [N/y]" continue
  if [[ "$continue" != "y" && "$continue" != "Y" ]]; then
    echo "Stopped"
    exit 1
  fi
fi

# name used for kubernetes resources
k8s_name="$short_name-$namespace"

# Create BatchUserContext
# When using service accounts, sometimes the account's uniqueID, rather than the
# email address is shown under the "Submitted By" field. To handle this case,
# we add both the uniqueID and the email address as separate BatchUserContexts.
buc_name=${k8s_name}
if [[ -n ${service_account} ]]; then
  buc_user_id=${service_account}
  build-batch-user-context
  buc_name=${k8s_name}-id
  buc_user_id=$(gcloud iam service-accounts describe ${service_account} --format="value(uniqueId)")
  build-batch-user-context
else
  buc_user_id=${user_name}
  build-batch-user-context
fi

# create roles for this user
apply-resource internal/add-user-roles.yaml

# if enabled, create private pvc for this user.
if (( auto_pvc == 1 )); then
  auto_pvc_name="$k8s_name"
  apply-resource internal/user-private-pvc.yaml
  internal/config-pvc-nfs-dir.sh "$auto_pvc_name" "$namespace" "$uid" "$group_id"
  access_pvcs="$auto_pvc_name,$access_pvcs"
fi

# patch pvc roles if necessary
if [[ ${access_pvcs} ]]; then
  patch-role internal/pvc-patch-role.yaml
fi

# create role bindings for this user, default settings as a normal user.
if [[ -n "$user_name" ]]; then
  export subject_name="$user_name"
  member="user:$user_name"
else
  export subject_name="$service_account"
  member="serviceAccount:$service_account"
fi
export subject_kind="User"
export subject_api_group="rbac.authorization.k8s.io"
export subject_namespace=""

apply-resource internal/user-role-bindings.yaml

# Add IAM related bindings
gcloud projects add-iam-policy-binding ${project_id} --member=${member} --role=projects/${project_id}/roles/BatchUser > /dev/null
gcloud projects add-iam-policy-binding ${project_id} --member=${member} --role=roles/logging.viewer > /dev/null


text:
#ifndef TILEDB_DAG_FSM_TYPES_H
#define TILEDB_DAG_FSM_TYPES_H

namespace tiledb::common {

/**
 * An enum representing the different states of two bound ports, plus an
 * intermediary. Since it is useful to consider the states as binary numbers, we
 * start our numbering of states with state 0 as enum 0.
 */

enum class three_stage {
  st_000,
  st_001,
  st_010,
  st_011,
  st_100,
  st_101,
  st_110,
  st_111,
  xt_000,
  xt_001,
  xt_010,
  xt_011,
  xt_100,
  xt_101,
  xt_110,
  xt_111,
  done,
  na,
  error,
  unreach,
  last
};

/**
 * An enum representing the different states of two bound ports.
 * Since it is useful to consider the states as binary numbers, we
 * start our numbering of states with state 0 as enum 0.
 */
enum class two_stage {
  st_00,
  st_01,
  st_10,
  st_11,
  xt_00,
  xt_01,
  xt_10,
  xt_11,
  done,
  na,
  error,
  unreach,
  last
};

template <class PortState>
constexpr unsigned short to_index(PortState x) {
  return static_cast<unsigned short>(x);
}

/**
 * Number of states in the Port state machine.
 */
template <class PortState>
constexpr unsigned short num_states = to_index(PortState::last) + 1;

#if 0
/**
 * Number of stages represented by the state machine.
 */
template <class PortState>
unsigned short num_stages = 0;

template <>
constexpr const unsigned short num_stages<three_stage> = 3;

template <>
constexpr const unsigned short num_stages<two_stage> = 2;
#endif

namespace {
/**
 * Strings for each enum member, for debugging.
 */
template <class PortState>
static std::vector<std::string> port_state_strings;

template <>
std::vector<std::string> port_state_strings<two_stage>{"st_00",
                                                       "st_01",
                                                       "st_10",
                                                       "st_11",
                                                       "xt_00",
                                                       "xt_01",
                                                       "xt_10",
                                                       "xt_11",
                                                       "done",
                                                       "na",
                                                       "error",
                                                       "unreach",
                                                       "last"};

template <>
std::vector<std::string> port_state_strings<three_stage>{
    "st_000", "st_001", "st_010", "st_011", "st_100", "st_101",  "st_110",
    "st_111", "xt_000", "xt_001", "xt_010", "xt_011", "xt_100",  "xt_101",
    "xt_110", "xt_111", "done",   "na",     "error",  "unreach", "last",
};
}  // namespace

/**
 * Function to convert a state to a string.  Specializations exist for
 * `two_stage` and `three_stage`.
 *
 * @param event The PortState to stringify.
 * @return The string corresponding to the PortState.
 */
template <class PortState>
static inline auto str(PortState st);

template <>
inline auto str(three_stage st) {
  return port_state_strings<three_stage>[static_cast<int>(st)];
}

template <>
inline auto str(two_stage st) {
  return port_state_strings<two_stage>[static_cast<int>(st)];
}

#ifndef FXM

/**
 * enum class for the state machine events.  Does not depend on the number of
 * states.
 */
enum class PortEvent : unsigned short {
  source_fill,  // Source has placed data into its output item_
  source_push,  // Source wishes to send its data along the data channel, will
                // block if state is st_11 (i.e., if channel is full)
  try_push,     // Non-blocking version of source_push
  sink_drain,   // Sink has taken data from its input item_
  sink_pull,    // Sources wishes to receive data along the data channel, will
                // block if state is st_00 (i.e., if channel is empty)
  try_pull,     // Non-blocking version of sink_pull
  exhausted,    // Source will not send any further data
  last,         // Customary final enum
};

inline constexpr unsigned short to_index(PortEvent x) {
  return static_cast<unsigned short>(x);
}

/**
 * Number of events in the PortEvent state machine
 */
constexpr unsigned int n_events = to_index(PortEvent::last) + 1;

/**
 * Strings for each enum member, useful for debugging.
 */
static std::vector<std::string> event_strings{"source_fill",
                                              "source_push",
                                              "try_push",
                                              "sink_drain",
                                              "sink_pull",
                                              "try_pull",
                                              "exhausted",
                                              "last"};

/**
 * Function to convert event to a string.
 *
 * @param event The event to stringify.
 * @return The string corresponding to the event.
 */
static inline auto str(PortEvent ev) {
  return event_strings[static_cast<int>(ev)];
}

#else
/**
 * enum class for the state machine events.  Does not depend on the number of
 * states.
 */
enum class PortEvent : unsigned short {
  source_inject,
  sink_extract,
  stop,
};

inline constexpr unsigned short to_index(PortEvent x) {
  return static_cast<unsigned short>(x);
}

/**
 * Number of events in the PortEvent state machine
 */
constexpr unsigned int n_events = to_index(PortEvent::stop) + 1;

/**
 * Strings for each enum member, useful for debugging.
 */
static std::vector<std::string> event_strings{
    "source_inject",
    "sink_extract",
    "stop",
};

/**
 * Function to convert event to a string.
 *
 * @param event The event to stringify.
 * @return The string corresponding to the event.
 */
static inline auto str(PortEvent ev) {
  return event_strings[static_cast<int>(ev)];
}

#endif

/**
 * enum class for port actions associated with transitions.
 */
enum class PortAction : unsigned short {
  none,
  ac_return,      // To caller of event (likely item mover)
  source_move,    // To item mover
  sink_move,      // To item mover
  notify_source,  // To scheduler
  notify_sink,    // To scheduler
  source_wait,    // To scheduler
  sink_wait,      // To scheduler
  term_source,    // To scheduler (terminate source)
  term_sink,      // To scheduler (terminate source)
  source_throw,   // Serious error condition
  sink_throw,     // Serious error condition
  error,          // General error condition in action table
  last,
};

inline constexpr unsigned short to_index(PortAction x) {
  return static_cast<unsigned short>(x);
}

/**
 * Number of actions in the Port state machine
 */
constexpr unsigned int n_actions = to_index(PortAction::last) + 1;

/**
 * Strings for each enum member, useful for debugging.
 */
static std::vector<std::string> action_strings{
    "none",
    "ac_return",
    "source_move",
    "sink_move",
    "notify_source",
    "notify_sink",
    "source_wait",
    "sink_wait",
    "term_source",
    "term_sink",
    "source_throw",
    "sink_throw",
    "error",
    "last",
};

/**
 * Function to convert an action to a string.
 *
 * @param ac The action to stringify.
 * @return The string corresponding to the action.
 */
static auto inline str(PortAction ac) {
  return action_strings[static_cast<int>(ac)];
}

/**
 * Utility functions
 */
[[maybe_unused]] static bool null_s(three_stage st) {
  return (st == three_stage::st_000);
}

[[maybe_unused]] static bool null_x(three_stage st) {
  return (st == three_stage::xt_000);
}

[[maybe_unused]] static bool null(three_stage st) {
  return null_s(st) || null_x(st);
}

[[maybe_unused]] static bool empty_s_source(three_stage st) {
  return (
      st == three_stage::st_000 || st == three_stage::st_001 ||
      st == three_stage::st_010 || st == three_stage::st_011);
}

[[maybe_unused]] static bool empty_x_source(three_stage st) {
  return (
      st == three_stage::xt_000 || st == three_stage::xt_001 ||
      st == three_stage::xt_010 || st == three_stage::xt_011);
}

[[maybe_unused]] static bool empty_source(three_stage st) {
  return (empty_s_source(st) || empty_x_source(st));
}
[[maybe_unused]] static bool full_s_source(three_stage st) {
  return (
      st == three_stage::st_100 || st == three_stage::st_101 ||
      st == three_stage::st_110 || st == three_stage::st_111);
}

[[maybe_unused]] static bool full_x_source(three_stage st) {
  return (
      st == three_stage::xt_100 || st == three_stage::xt_101 ||
      st == three_stage::xt_110 || st == three_stage::xt_111);
}

[[maybe_unused]] static bool full_source(three_stage st) {
  return (full_s_source(st) || full_x_source(st));
}

[[maybe_unused]] static bool empty_s_sink(three_stage st) {
  return (
      st == three_stage::st_000 || st == three_stage::st_010 ||
      st == three_stage::st_100 || st == three_stage::st_110);
}

[[maybe_unused]] static bool empty_x_sink(three_stage st) {
  return (
      st == three_stage::xt_000 || st == three_stage::xt_010 ||
      st == three_stage::xt_100 || st == three_stage::xt_110);
}

[[maybe_unused]] static bool empty_sink(three_stage st) {
  return (empty_s_sink(st) || empty_x_sink(st));
}
[[maybe_unused]] static bool full_s_sink(three_stage st) {
  return (
      st == three_stage::st_001 || st == three_stage::st_011 ||
      st == three_stage::st_101 || st == three_stage::st_111);
}

[[maybe_unused]] static bool full_x_sink(three_stage st) {
  return (
      st == three_stage::xt_001 || st == three_stage::xt_011 ||
      st == three_stage::xt_101 || st == three_stage::xt_111);
}

[[maybe_unused]] static bool full_sink(three_stage st) {
  return (full_s_sink(st) || full_x_sink(st));
}

/**
 *
 */

[[maybe_unused]] static bool null_s(two_stage st) {
  return (st == two_stage::st_00);
}

[[maybe_unused]] static bool null_x(two_stage st) {
  return (st == two_stage::xt_00);
}

[[maybe_unused]] static bool null(two_stage st) {
  return null_s(st) || null_x(st);
}

[[maybe_unused]] static bool empty_s_source(two_stage st) {
  return (st == two_stage::st_00 || st == two_stage::st_01);
}

[[maybe_unused]] static bool empty_x_source(two_stage st) {
  return (st == two_stage::xt_00 || st == two_stage::xt_01);
}

[[maybe_unused]] static bool empty_source(two_stage st) {
  return (empty_s_source(st) || empty_x_source(st));
}
[[maybe_unused]] static bool full_s_source(two_stage st) {
  return (st == two_stage::st_10 || st == two_stage::st_11);
}

[[maybe_unused]] static bool full_x_source(two_stage st) {
  return (st == two_stage::xt_10 || st == two_stage::xt_11);
}

[[maybe_unused]] static bool full_source(two_stage st) {
  return (full_s_source(st) || full_x_source(st));
}

[[maybe_unused]] static bool empty_s_sink(two_stage st) {
  return (st == two_stage::st_00 || st == two_stage::st_10);
}

[[maybe_unused]] static bool empty_x_sink(two_stage st) {
  return (st == two_stage::xt_00 || st == two_stage::xt_10);
}

[[maybe_unused]] static bool empty_sink(two_stage st) {
  return (empty_s_sink(st) || empty_x_sink(st));
}
[[maybe_unused]] static bool full_s_sink(two_stage st) {
  return (st == two_stage::st_01 || st == two_stage::st_11);
}

[[maybe_unused]] static bool full_x_sink(two_stage st) {
  return (st == two_stage::xt_01 || st == two_stage::xt_11);
}

[[maybe_unused]] static bool full_sink(two_stage st) {
  return (full_s_sink(st) || full_x_sink(st));
}

[[maybe_unused]] static bool empty_s_state(two_stage st) {
  return (st == two_stage::st_00 || st == two_stage::st_01);
}

[[maybe_unused]] static bool empty_x_state(two_stage st) {
  return (st == two_stage::xt_00 || st == two_stage::xt_01);
}

[[maybe_unused]] static bool empty_state(two_stage st) {
  return (empty_s_state(st) || empty_x_state(st));
}
[[maybe_unused]] static bool full_s_state(two_stage st) {
  return (st == two_stage::st_10 || st == two_stage::st_11);
}

[[maybe_unused]] static bool full_x_state(two_stage st) {
  return (st == two_stage::xt_10 || st == two_stage::xt_11);
}

[[maybe_unused]] static bool full_state(two_stage st) {
  return (full_s_state(st) || full_x_state(st));
}

}  // namespace tiledb::common
#endif  // TILEDB_DAG_FSM_TYPES_H


text: Entry::Entry(const class Date& date, const string& event) : Date(date), Event(event) {}


text:
/*jslint nomen:true, eqeq:true*/
/*global define*/
define([
    'jquery',
    'underscore',
    'chaplin'
], function ($, _, Chaplin) {
    'use strict';

    var BaseView;

    BaseView = Chaplin.View.extend({

        getTemplateFunction: function () {
            var template, templateFunc;
            template = this.template;
            templateFunc = null;

            if (typeof template === 'string') {
                templateFunc = _.template(template);
                // share a compiled template with all instances built with same constructor
                this.constructor.prototype.template = templateFunc;
            } else {
                templateFunc = template;
            }

            return templateFunc;
        },

        /**
         * Tries to find element in already declared regions, otherwise calls super _ensureElement method
         *
         * @private
         * @override
         */
        _ensureElement: function () {
            var $el;
            if (this.el && typeof this.el === 'string') {
                $el = this._findRegionElem(this.el);
            }

            if ($el) {
                this.setElement($el, false);
            } else {
                BaseView.__super__._ensureElement.call(this);
            }
        },

        /**
         * Tries to find element by region name
         *
         * @param {string} name
         * @returns {jQuery|undefined}
         * @private
         */
        _findRegionElem: function (name) {
            var $el, region, instance;
            region = Chaplin.mediator.execute('region:find', name);
            if (region != null) {
                instance = region.instance;
                if (instance.container != null) {
                    $el = instance.region != null ? $(instance.container).find(region.selector) : instance.container;
                } else {
                    $el = instance.$(region.selector);
                }
            }
            return $el;
        }
    });

    return BaseView;
});


text:
using Microsoft.Phone.Controls;

namespace ArcGISWindowsPhoneSDK
{
    public partial class TiledLayer : PhoneApplicationPage
    {
        public TiledLayer()
        {
            InitializeComponent();
        }
    }
}


text:
require 'rubygems'
require 'bundler/setup'
require 'date'
require 'yaml'
require 'optparse'
require_relative 'lewtopts.rb'
require_relative 'extension.rb'
require_relative 'lewt_book.rb'
require_relative 'lewt_ledger.rb'

# Author::    Jason Wijegooneratne  (mailto:code@jwije.com)
# Copyright:: Copyright (c) 2014 Jason Wijegooneratne
# License::   MIT. See LICENSE.md distributed with the source code for more information.

# This module acts as a container for the LEWT namespace
module LEWT

  VERSION = "0.5.17"

  # The Lewt class contains the major functionality of this program.
  # It handles loading all extensions, gathering the results and passing options ariound the place.
  # It also works quite closely with the LewtExtension and LewtOpts classes.
  class Lewt

    # Can be used to split strings passed to lewt through CL optios ie:
    #  "acme,wayne_corp".split(CLIENT_SPLIT_REGEX) # get each argument for client mathching
    OPTION_DELIMITER_REGEX = /[,+:]/

    # This matches symbols passed thought command ie: -p meta-stat => meta_stat
    OPTION_SYMBOL_REGEX = /\W/

    def initialize( library_options = nil )
      core_settings = YAML.load_file( File.expand_path( '../config/settings.yml', __FILE__) )
      if File.exists? File.expand_path( '~/.lewt_settings', __FILE__)
        core_settings.merge! YAML.load_file( File.expand_path( '~/.lewt_settings', __FILE__) )
      end

      @lewt_stash = core_settings['lewt_stash'] || File.expand_path('../', __FILE__) + "/config/"
      @settings = YAML.load_file( @lewt_stash + 'settings.yml' )

      # Start by loading the local config files
      @customers = YAML.load_file(@lewt_stash + "customers.yml")
      @enterprise = YAML.load_file(@lewt_stash + "enterprise.yml")

      # Referenceall registered extension for later invocation
      @extensions = LEWT::Extension.new.lewt_extensions

      # Load core extensions
      load_extensions( File.expand_path('../extensions', __FILE__) )

      if core_settings.has_key?("lewt_stash")
        # load user defined extesnions
        load_extensions
      end

      # Stores default options returned from extensions
      # and the LEWT defaults at large
      options = {}
      @command = ARGV[0]

      # argument supplied for `cmd' (if any). ignore option flags IE args that start with the `-' symbol
      @argument = ARGV[1] == nil || ARGV[1].match(/\-/i) ? nil : ARGV[1]

      @options = LewtOpts.new( @extensions, library_options  )

      parse_internal_commands
    end

    # Runs extract, process, render hooks.
    def run
      extract = fire_hooks("extract", @options)
      process = fire_hooks("process", @options, extract )
      render = fire_hooks("render", @options, process )
    end

    # fn returns the desired customer given there name or alias.
    # A REGEXP query can be passed to this object i.e. "ACME|NovaCorp|..."
    # to match multiple customers.
    # query [String]:: The query to search against.
    def get_client( query )
      client = nil
      @customers.each do |c|
        buildQ = [ c["name"], c["alias"] ].join("|")
        regex = Regexp.new(buildQ, Regexp::IGNORECASE)
        if regex.match( query ) != nil
          client = c
        end
      end
      return client
    end

    # Fire the logic loop from the specified hook onwards. Used when piping data in from CL
    # hook [Sting]:: extract, process, or render
    # data:: The data to pass to fire_hooks
    def hook_process (hook, data)
      case hook
      when "extract"
        extracted_data = fire_hooks("extract",@options,data)
        hook_process("process", extracted_data)
      when "process"
        processed_data = fire_hooks("process",@options,data)
        hook_process("render",processed_data)
      when "render"
        render_data = fire_hooks("render",@options,data)
      else
        raise ArugmentError, "#{self.class.name}.hook_process requires the start hook to be either render or process"
      end
    end

    # Fire a hook with the given options and overloaded parameters.
    # hook [String]:: Expected hooks are 'extract', 'process', 'render'.
    # options [Hash]:: The options gathered from using LewtOpts
    # data [Mixed]:: The data to pass to the extensions.
    def fire_hooks( hook, options, *data )
      algamation = Array.new
      @extensions.each { |e|
        ## filter hooks
        filter_regex = /#{options[hook.to_sym].gsub(",","|")}/
        if e.methods.include?(hook.to_sym) and e.command_name.match(filter_regex)
          case hook
          when "extract"
            algamation.concat e.extract(options)
          when "process"
            processed = e.process(options, *data)
            if processed.kind_of? Array
              algamation.concat processed
            else
              algamation.push processed
            end
          when "render"
            algamation.concat e.render(options, *data)
            # dump render output to console of option specified.
            puts algamation if options[:dump_output] == true
          end
        end
      }
      return algamation;
    end

    protected

    # reads input from standard INPUT
    def read_stdin
      data = ""
      while line = $stdin.gets
        data += line
      end
      return data
    end

    # Parses lewsts intenral commands. If none have been invoked it simple returns.
    def parse_internal_commands
      return if @command == nil
      # raise argument error if command invoked without argument
      if @argument == nil and @command != nil
        puts @command
        raise ArgumentError, "Class #{self.class.name} requires an argument t be supplied with a command"
      end

      if @command.match(/pipe/)
        # pipe stdin into fire_hook(@argument) event
        data = Psych.load(read_stdin)
        if data != nil
          hook_process(@argument, data)
        else
          raise ArgumentError, "could not parse STDIN pipe as YAML data."
        end
        exit
      end

    end

    # Loads all installed LEWT extensions by checking the ext_dir setting variable for available ruby files.
    # directory [String]:: The path where to look for extensions as a string.
    def load_extensions( directory = @lewt_stash + "extensions" )
      raise Exception, "Directory does not exist: #{directory}" if !Dir.exists?(directory)

      Dir.foreach( directory ) do |file|
        next if (file =~ /\./) == 0
        # Cannot match with File.directory?(file) due to how ruby performs
        # this test internaly when script is called from another dir.
        # Therefor some REGEX will be used to match the .rb file extension instead...
        if file.match(/\.rb/) != nil
          load(directory + "/" + file)
          ext_object = initialize_extension( file )
        else
          # is a directory
          # load file in dir named {dir_name}.rb
          load "#{directory}/#{file}/#{file}.rb"
          ext_object = initialize_extension(file)
        end
      end

      # load extensions packaged as GEMS
      if @settings['gem_loads'] != nil
        @settings['gem_loads'].split(Lewt::OPTION_DELIMITER_REGEX).each do |g|
          match = g.split("/")
          ext_object = initialize_gem(match[0], match[1])
        end
      end

    end

    # This method initialised a gem as specifed in your settings file.
    # gem_require [String]:: The gem require path as a string
    # gem_class [String]:: The gem class name for initialisation
    def initialize_gem( gem_require, gem_class )
      require gem_require
      extension = eval( gem_class + ".new")
      return @extensions.last
    end

    # fn basically anticipates a class name given its file path and then call its registerHanders method.
    # Class names are transformed into UC words. '-' are interpreted as spaces in this conversion, and are
    # striped afterwards to return something like 'invoice-renderer.rb' >>> 'InvoiceRenderer' ready for
    # evaluation.
    # file [String]:: The file name as a string
    def initialize_extension ( file )
      classConvention = file.gsub("-", " ").split.map(&:capitalize).join(' ').gsub(" ","").gsub(".rb","")
      extInit = ("LEWT::" + classConvention + ".new").to_s
      extension = eval( extInit )
      # extension will be registered on init so just reference the last one
      return @extensions.last
    end

  end

end


text:
package com.sematext.solr.handler.component.relaxer.query;

import org.apache.solr.common.params.CommonParams;
import org.apache.solr.common.params.SolrParams;

import java.util.HashSet;
import java.util.Set;
import java.util.regex.Matcher;
import java.util.regex.Pattern;

/**
 *
 * Extracts user query for Edismax query using regex. This class can handle subquery with pattern q={!type=dismax
 * qf=myfield v='solr rocks'}. If there are multiple subqueries we can select one subquery by adding localparam relax=on or
 * by specifying a field using URL param relax.q=[field_name].
 *
 * @author sematext, http://www.sematext.com/
 */
public class RegexExtractor extends UserQueryExtractor {
  private static final Pattern SUB_QUERY = Pattern.compile("\\{\\![^}]+\\}");
  private static final Pattern VALUE = Pattern.compile("v\\s*=\\s*'((?:[^']|(?<=\\\\)')+)'|v\\s*=\\s*(\\S+)[\\s|}]");
  private static final Pattern QUERY_FIELDS = Pattern.compile("qf\\s*=\\s*'([^']+)'|qf\\s*=\\s*(\\S+)[\\s|}]");
  private static final Pattern MM = Pattern.compile("mm\\s*=\\s*'([^']+)'|mm\\s*=\\s*(\\S+)[\\s|}]");
  private static final Pattern RELAX = Pattern.compile("relax\\s*=\\s*'([^']+)'|relax\\s*=\\s*(\\S+)[\\s|}]");
  private static final Pattern FIELDS = Pattern.compile("(\\w+)(~[0-9.,]+)?(\\^[0-9.,]+)?");
  private static final String RELAXER_QUERY = "&" + RelaxerParams.QUERY_RELAXER_Q + "=[^&]+";

  @Override
  public String extract(SolrParams params) {
    String q = params.get(RelaxerParams.QUERY_RELAXER_Q);
    if (q != null) {
      return q;
    }

    q = params.get(CommonParams.Q);
    String field = params.get(RelaxerParams.QUERY_RELAXER_FIELD);
    String userQuery = null;

    Matcher matcher = SUB_QUERY.matcher(q);
    while (matcher.find()) {
      String subQuery = matcher.group();

      String value = match(VALUE, subQuery);
      String relax = match(RELAX, subQuery);

      if (field == null) {
        if (value != null) {
          userQuery = value;
        }
      } else {
        String queryFields = match(QUERY_FIELDS, subQuery);
        if (queryFields != null) {
          Set<String> fields = matchAll(FIELDS, queryFields);
          if (fields.contains(field)) {
            return value;
          }
        }
      }
      if ("ON".equalsIgnoreCase(relax)) {
        return value;
      }
    }

    if (field == null && userQuery != null) {
      return userQuery;
    } else {
      return q;
    }
  }

  @Override
  public String relaxHighlightQuery(String highlightQuery, SolrParams params, String userQuery, String relaxedUserQuery) {
    return relax(params, userQuery, relaxedUserQuery, highlightQuery);
  }

  @Override
  public String relaxQuery(SolrParams params, String userQuery, String relaxedUserQuery) {
    String query = params.get(CommonParams.Q);
    String q = params.get(RelaxerParams.QUERY_RELAXER_Q);
    if (q != null) {
      return query.replaceFirst(RELAXER_QUERY, relaxedUserQuery);
    }

    return relax(params, userQuery, relaxedUserQuery, query);
  }

  private String relax(SolrParams params, String userQuery, String relaxedUserQuery, String query) {
    String field = params.get(RelaxerParams.QUERY_RELAXER_FIELD);
    String relaxedQuery = null;

    Matcher matcher = SUB_QUERY.matcher(query);
    while (matcher.find()) {
      String subQuery = matcher.group();

      String value = match(VALUE, subQuery);
      String relax = match(RELAX, subQuery);

      int start = matcher.start();

      if ("ON".equalsIgnoreCase(relax)) {
        return replace(VALUE, query, start, subQuery, relaxedUserQuery);
      }

      if (userQuery.equals(value)) {
        if (field == null) {
          relaxedQuery = replace(VALUE, query, start, subQuery, relaxedUserQuery);
        } else {
          String queryFields = match(QUERY_FIELDS, subQuery);
          if (queryFields != null) {
            Set<String> fields = matchAll(FIELDS, queryFields);
            if (fields.contains(field)) {
              relaxedQuery = replace(VALUE, query, start, subQuery, relaxedUserQuery);
            }
          }
        }
      }
    }

    if (relaxedQuery != null) {
      return relaxedQuery;
    } else {
      return relaxedUserQuery;
    }
  }

  @Override
  public String relaxMM(SolrParams params, String relaxedMM) {
    String query = params.get(CommonParams.Q);
    String field = params.get(RelaxerParams.QUERY_RELAXER_FIELD);

    Matcher matcher = SUB_QUERY.matcher(query);
    while (matcher.find()) {
      String subQuery = matcher.group();
      String relax = match(RELAX, subQuery);
      int start = matcher.start();

      if ("ON".equalsIgnoreCase(relax)) {
        return replaceOrInsert(MM, query, start, subQuery, relaxedMM);
      }

      String queryFields = match(QUERY_FIELDS, subQuery);
      if (queryFields != null) {
        Set<String> fields = matchAll(FIELDS, queryFields);
        if (fields.contains(field)) {
          return replaceOrInsert(MM, query, start, subQuery, relaxedMM);
        }
      }
    }

    return query;
  }

  private String match(Pattern pattern, String text) {
    Matcher matcher = pattern.matcher(text);
    String value = null;
    if (matcher.find()) {
      for (int i = 1; i <= matcher.groupCount(); i++) {
        value = matcher.group(i);
        if (value != null)
          break;
      }
    }

    return value;
  }

  private String replace(Pattern pattern, String query, int start, String text, String replace) {
    Matcher matcher = pattern.matcher(text);
    String value = null;
    if (matcher.find()) {
      for (int i = 1; i <= matcher.groupCount(); i++) {
        value = matcher.group(i);
        if (value != null) {
          StringBuilder sb = new StringBuilder();
          sb.append(query.substring(0, matcher.start(i) + start));
          sb.append(replace);
          sb.append(query.substring(matcher.end(i) + start));
          return sb.toString();
        }
      }
    }

    return value;
  }

  private String replaceOrInsert(Pattern pattern, String query, int start, String subQuery, String replace) {
    Matcher matcher = pattern.matcher(subQuery);
    String value = null;
    if (matcher.find()) {
      for (int i = 1; i <= matcher.groupCount(); i++) {
        value = matcher.group(i);
        if (value != null) {
          StringBuilder sb = new StringBuilder();
          sb.append(query.substring(0, matcher.start(i) + start));
          sb.append(replace);
          sb.append(query.substring(matcher.end(i) + start));
          return sb.toString();
        }
      }
    } else {
      StringBuilder sb = new StringBuilder();
      sb.append(query.substring(0, start));
      sb.append(subQuery.substring(0, subQuery.length() - 1));
      sb.append(" mm='");
      sb.append(replace);
      sb.append("'}");
      sb.append(query.substring(subQuery.length() + start));
      return sb.toString();
    }

    return value;
  }

  private Set<String> matchAll(Pattern pattern, String text) {
    Set<String> values = new HashSet<String>();
    Matcher matcher = pattern.matcher(text);
    while (matcher.find()) {
      for (int i = 1; i <= matcher.groupCount(); i++) {
        String value = matcher.group(i);
        if (value != null) {
          values.add(value);
          break;
        }
      }
    }

    return values;
  }

}


text:
[![CI Status](http://img.shields.io/travis/Rhys D. Jones/iosvoronoi.svg?style=flat)](https://travis-ci.org/Rhys D. Jones/iosvoronoi)
[![Version](https://img.shields.io/cocoapods/v/iosvoronoi.svg?style=flat)](http://cocoapods.org/pods/iosvoronoi)
[![License](https://img.shields.io/cocoapods/l/iosvoronoi.svg?style=flat)](http://cocoapods.org/pods/iosvoronoi)
[![Platform](https://img.shields.io/cocoapods/p/iosvoronoi.svg?style=flat)](http://cocoapods.org/pods/iosvoronoi)

## Example

To run the example project, clone the repo, and run `pod install` from the Example directory first.

## Requirements

## Installation

iosvoronoi is available through [CocoaPods](http://cocoapods.org). To install
it, simply add the following line to your Podfile:

```ruby
pod "iosvoronoi"
```

## Author

Rhys D. Jones, rhys@digitalcicadas.com

## License

iosvoronoi is available under the MIT license. See the LICENSE file for more info.


text:
import crypto from 'crypto';
import scmp from 'scmp';
import superagent from 'superagent';
import uuid from 'uuid';
import url from 'url';
import has from 'lodash/object/has';

import constants from '../constants';

const SCOPES = 'history,identity,mysubreddits,read,subscribe,vote,submit,' +
               ' save,edit,account,creddits,flair,livemanage,modconfig,' +
               'modcontributors,modflair,modlog,modothers,modposts,modself,' +
               'modwiki,privatemessages,report,subscribe,wikiedit,wikiread';

function nukeTokens(ctx) {
  ctx.cookies.set('token');
  ctx.cookies.set('tokenExpires');
  ctx.cookies.set('refreshToken');
}

// set up oauth routes
var oauthRoutes = function(app) {
  app.nukeTokens = nukeTokens;

  const router = app.router;

  let cookieOptions = {
    secure: app.getConfig('https'),
    secureProxy: app.getConfig('httpsProxy'),
    httpOnly: true,
    maxAge: 1000 * 60 * 60,
  };

  function getPassthroughHeaders(ctx, app) {
    if (app.getConfig('apiPassThroughHeaders')) {
      return app.getConfig('apiPassThroughHeaders').reduce(function(headers, key) {
        if (ctx.headers[key]) {
          headers[key] = ctx.headers[key];
        }
        return headers;
      }, {});
    }

    return {};
  }

  function assignPassThroughHeaders(obj, ctx, app) {
    return Object.assign(obj, getPassthroughHeaders(ctx, app));
  }

  if (app.getConfig('cookieDomain')) {
    cookieOptions.domain = app.getConfig('cookieDomain');
  }

  const longCookieOptions = Object.assign({}, cookieOptions, {
    maxAge: 1000 * 60 * 60 * 24 * 365,
  });

  function setTokenCookie(ctx, token) {
    ctx.cookies.set('token', token.token.access_token, longCookieOptions);
    ctx.cookies.set('tokenExpires', token.token.expires_at.toString(), longCookieOptions);

    if (token.token.refresh_token) {
      ctx.cookies.set('refreshToken', token.token.refresh_token, longCookieOptions);
    }
  }

  app.setTokenCookie = setTokenCookie;

  function hmac (key, data) {
    const secret = new Buffer(key, 'base64').toString();
    const algorithm = 'sha1';

    const hmac = crypto.createHmac(algorithm, secret);
    hmac.setEncoding('hex');
    hmac.write(data);
    hmac.end();

    return hmac.read();
  }

  function getToken (ctx, code, redirect) {
    return new Promise(function(resolve) {
      OAuth2.authCode.getToken({
        code,
        redirect_uri: redirect,
      }, function(err, result) {
        if (err) {
          return ctx.redirect('/');
        }

        resolve(result);
      });
    });
  }

  function refreshToken (ctx, rToken) {
    return new Promise(function(resolve, reject) {
      const endpoint = app.config.nonAuthAPIOrigin + '/api/v1/access_token';
      let b;

      if (app.config.oauth.secretClientId) {
        b = new Buffer(
          app.config.oauth.secretClientId + ':' + app.config.oauth.secretSecret
        );
      } else {
        b = new Buffer(
          app.config.oauth.clientId + ':' + app.config.oauth.secret
        );
      }

      const s = b.toString('base64');

      const basicAuth = 'Basic ' + s;

      const data = {
        grant_type: 'refresh_token',
        refresh_token: rToken,
      };

      const headers = {
        'User-Agent': ctx.headers['user-agent'],
        'Authorization': basicAuth,
      };

      assignPassThroughHeaders(headers, ctx, app);

      Object.assign(headers, app.config.apiHeaders || {});

      superagent
        .post(endpoint)
        .set(headers)
        .type('form')
        .send(data)
        .timeout(constants.DEFAULT_API_TIMEOUT)
        .end((err, res) => {
          if (err || !res.ok) {
            if (err.timeout) { err.status = 504; }
            return reject(err || res);
          }

          /* temporary while api returns a `200` with an error in body */
          if (res.body.error) {
            return reject(401);
          }

          var token = OAuth2.accessToken.create(res.body);
          return resolve(token);
        });
    });
  }

  app.refreshToken = refreshToken;

  function convertSession(ctx) {
    return new Promise(function(resolve, reject) {
      const endpoint = app.config.nonAuthAPIOrigin + '/api/me.json';

      const cookie = ctx.headers['cookie'].replace(/__cf_mob_redir=1/, '__cf_mob_redir=0');

      let headers = {
        'User-Agent': ctx.headers['user-agent'],
        cookie,
        'accept-encoding': ctx.headers['accept-encoding'],
        'accept-language': ctx.headers['accept-language'],
      };

      assignPassThroughHeaders(headers, ctx, app);

      Object.assign(headers, app.config.apiHeaders || {});

      superagent
        .get(endpoint)
        .set(headers)
        .timeout(constants.DEFAULT_API_TIMEOUT)
        .end((err, res) => {
          if (err || !res.ok) {
            if (err.timeout) { err.status = 504; }
            return reject(err || res);
          }

          if (res.body.error || !res.body.data) {
            app.error('Invalid modhash', this, app, { redirect: false, replaceBody: false });
            return reject(401);
          }

          const modhash = res.body.data.modhash;
          const endpoint = app.config.nonAuthAPIOrigin + '/api/v1/authorize';

          const redirect_uri = app.config.origin + '/oauth2/token';

          let clientId;
          let clientSecret;

          if (app.config.oauth.secretClientId) {
            clientId = app.config.oauth.secretClientId;
            clientSecret = app.config.oauth.secretSecret;
          } else {
            clientId = app.config.oauth.clientId;
            clientSecret = app.config.oauth.secret;
          }

          const postParams = {
            client_id: clientId,
            redirect_uri,
            scope: SCOPES,
            state: modhash,
            duration: 'permanent',
            authorize: 'yes',
          };

          headers['x-modhash'] = modhash;

          superagent
            .post(endpoint)
            .set(headers)
            .type('form')
            .send(postParams)
            .redirects(0)
            .end((err, res) => {
              if (res.status !== 302) {
                return resolve(res.status || 500);
              }

              if (res.body.error) {
                return resolve(401);
              }

              const location = url.parse(res.headers.location, true);
              const code = location.query.code;

              const endpoint = app.config.nonAuthAPIOrigin + '/api/v1/access_token';

              const postData = {
                grant_type: 'authorization_code',
                code,
                redirect_uri,
              };

              const b = new Buffer(
                clientId + ':' + clientSecret
              );

              const s = b.toString('base64');
              const basicAuth = 'Basic ' + s;

              let headers = {
                'User-Agent': ctx.headers['user-agent'],
                'Authorization': basicAuth,
              };

              assignPassThroughHeaders(headers, ctx, app);

              Object.assign(headers, app.config.apiHeaders || {});

              superagent
                .post(endpoint)
                .set(headers)
                .send(postData)
                .type('form')
                .timeout(constants.DEFAULT_API_TIMEOUT)
                .end(function(err, res) {
                  if (err || !res.ok) {
                    if (err.timeout) { err.status = 504; }
                    reject(err);
                  }

                  const token = OAuth2.accessToken.create(res.body);
                  return resolve(token);
                });
            });
        });
    });
  }

  app.convertSession = convertSession;

  const OAuth2 = require('simple-oauth2')({
    clientID: app.config.oauth.clientId,
    clientSecret: app.config.oauth.secret,
    site: app.config.nonAuthAPIOrigin,
    authorizationPath: '/api/v1/authorize.compact',
    tokenPath: '/api/v1/access_token',
  });

  const redirect = app.config.origin + '/oauth2/token';

  router.get('/oauth2/login', function * () {
    const origin = app.getConfig('origin') + '/';

    // referer spelled wrong according to spec.
    const referer = this.get('Referer') || '/';
    const key = app.getConfig('keys')[0];
    const state = hmac(key, referer);
    let redirectURI = referer;

    if ((!this.get('Referer')) || (this.get('Referer') &&
         this.get('Referer').slice(0, origin.length) === origin)) {
      redirectURI = OAuth2.authCode.authorizeURL({
        redirect_uri: redirect,
        scope: SCOPES,
        state: `${state}|${referer}`,
        duration: 'permanent',
      });

      this.redirect(redirectURI);
    } else {
      this.redirect('/403');
    }
  });

  router.get('/logout', function * () {
    nukeTokens(this);
    this.cookies.set('over18', false);
    this.cookies.set('reddit_session', undefined, {
      domain: '.reddit.com',
    });
    return this.redirect('/');
  });

  router.get('/oauth2/error', function *() {
    this.redirect('/');
  });

  router.get('/oauth2/refresh', function * () {
    const rToken = this.cookies.get('refreshToken');

    if (!this.cookies.get('token')) {
      this.body = undefined;
      return;
    }

    try {
      const result = yield refreshToken(this, rToken);
      setTokenCookie(this, result);

      this.body = {
        token: result.token.access_token,
        tokenExpires: result.token.expires_at.toString(),
      };
    } catch (e) {
      nukeTokens(this);
    }
  });

  router.get('/oauth2/token', function * () {
    const { code, error }= this.query;

    if (error) {
      return this.redirect('/oauth2/error?message=' + error);
    }

    const [state, referer] = this.query.state.split('|');
    const key = app.getConfig('keys')[0];

    if (!scmp(state, hmac(key, referer))) {
      return this.redirect('/403');
    }

    const result = yield getToken(this, code, redirect);

    const token = OAuth2.accessToken.create(result);

    setTokenCookie(this, token);

    this.redirect(referer || '/');
  });

  function login(username, password, ctx) {
    const id = uuid.v4();
    const endpoint = app.config.nonAuthAPIOrigin + '/api/fp/1/auth/access_token';

    const b = new Buffer(
      app.config.oauth.secretClientId + ':' + app.config.oauth.secretSecret
    );

    const s = b.toString('base64');

    const basicAuth = 'Basic ' + s;

    const data = {
      grant_type: 'password',
      username,
      password,
      device_id: id,
      duration: 'permanent',
    };

    return new Promise(function(resolve, reject) {
      let headers = {
        'User-Agent': ctx.headers['user-agent'],
        'Authorization': basicAuth,
      };

      assignPassThroughHeaders(headers, ctx, app);

      Object.assign(headers, app.config.apiHeaders || {});

      superagent
        .post(endpoint)
        .set(headers)
        .type('form')
        .send(data)
        .timeout(constants.DEFAULT_API_TIMEOUT)
        .end((err, res) => {
          if (err || !res.ok) {
            if (err.timeout) { res.status = 504; }

            return reject(res.status || 500);
          }

          /* temporary while api returns a `200` with an error in body */
          if (has(res, 'body.json.errors.0')) {
            const error = res.body.json.errors[0];
            return reject(error);
          }

          const token = OAuth2.accessToken.create(res.body);

          setTokenCookie(ctx, token);
          resolve(200);
        });
    });
  }

  async function getLoginRedirect(username, passwd, ctx) {
    try {
      const status = await login(username, passwd, ctx);
      const dest = ctx.body.originalUrl || '';

      if (status === 200) {
        if (dest) {
          return `${app.config.origin}${dest}`;
        } else {
          return '/';
        }
      }
    } catch (e) {
      if (Array.isArray(e)) {
        return `/login?error=${e[0]}&message=${e[1]}`;
      } else {
        return `/login?error=${e}`;
      }
    }
  }

  function handleRegisterResponse(resolve, reject, data, ctx) {
    return async function (err, res) {
      if (err || !res.ok) {
        if (err.timeout) { res.status = 504; }
        return reject(`/register?error=${(res.status || 500)}`);
      }

      /* temporary while api returns a `200` with an error in body */
      if (has(res, 'body.json.errors.0')) {
        const error = res.body.json.errors[0];

        return reject(`/register?error=${error[0]}&message=${error[1]}`);
      }

      const redirectURI = await getLoginRedirect(data.user, data.passwd, ctx);

      resolve(redirectURI);
    };
  }

  /*
   * Only works with specific clients with specific trusted client IDs
   * (`mobile_auth_allowed_clients` in reddit config.) If you aren't that,
   * set the LOGIN_PATH env variable to nothing or '/oauth2/login' (default).
   */
  router.post('/login', function * () {
    const { username, password } = this.body;
    const url = yield getLoginRedirect(username, password, this);
    this.redirect(url);
  });

  router.post('/register', function * () {
    const endpoint = app.config.nonAuthAPIOrigin + '/api/register';
    const { password, password2, username, newsletter, email } = this.body;

    let data = {
      user: username,
      passwd: password,
      passwd2: password2,
      api_type: 'json',
    };

    if (email) {
      data.email = email;
    }

    if (newsletter === 'on') {
      data.newsletter_subscribe = true;
    }

    if (password !== password2) {
      return this.redirect('/register?error=PASSWORD_MATCH');
    }

    if (!email && newsletter === 'on') {
      return this.redirect('/register?error=EMAIL_NEWSLETTER');
    }

    try {
      const URI = yield new Promise((resolve, reject) => {
        let headers = Object.assign({
          'User-Agent': this.headers['user-agent'],
        }, app.config.apiHeaders || {});

        assignPassThroughHeaders(headers, this, app);

        superagent
          .post(endpoint)
          .set(headers)
          .type('form')
          .send(data)
          .timeout(constants.DEFAULT_API_TIMEOUT)
          .end(handleRegisterResponse(resolve, reject, data, this));
      });

      this.redirect(URI);
    } catch (errorURI) {
      this.redirect(errorURI);
    }
  });
};

export default oauthRoutes;


text:
ACCEPTED

#### According to
International Plant Names Index

#### Published in
null

#### Original name
Leutea elbursensis Mozaff.

### Remarks
null


text:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace MpdBaileyTechnology.GenericApp.ViewModel
{
    public class HelpVM : ViewModelBase
    {
        public HelpVM()
        {
            this.DisplayName = "Help";
        }
    }
}


text:
import pickle
import os

class FileCopyHistoryStore(object):

    def __init__(self,persistence_path=None):
        self.persistence_path = persistence_path
        self._unpickle()

    def _unpickle(self):
        if self.persistence_path is not None and os.path.exists(self.persistence_path):
            with open(self.persistence_path,'rb') as f:
                try:
                    self.files_seen = pickle.load(f)
                except EOFError:
                    self.files_seen = set()
        else:
            self.files_seen = set()

    def _pickle(self):
        if self.persistence_path is not None:
            with open(self.persistence_path,'wb') as f:
                pickle.dump(self.files_seen, f)

    def add(self,path,ctime):
        self.files_seen.add((path,ctime))
        self._pickle()

    def contains(self,path,ctime):
        return (path,ctime) in self.files_seen


text:
<?php
namespace System\Application;
use System\Core\View;

if (!defined('SYSTEM')) exit('No direct script access allowed');

/**
 * Controller
 *
 * @package		Kamele Framework
 * @subpackage	System
 * @since		2.0
 * @author		Rick Lubbers <me@ricklubbers.nl>
 */
abstract class Controller extends Application {

    protected $view = false;
    protected $view_obj = null;
    protected $view_path = "";
    protected $view_data = array();

    /**
     * Constructor function
     * @return  void
     */
    public function __construct() {
        $this->_loadView();
    }

    /**
     * Loads view when variables are correctly set
     * @return  boolean
     */
    protected function _loadView() {
        if ($this->view == true) {
            $this->view_obj = new View($this->view_path);
            return true;
        }
        return false;
    }

    /**
     * Destructor. IS NOT BUILT-IN DESTRUCTOR BY PHP! Is called by Router class...
     * @return  boolean
     */
    public function _destruct() {
        if ($this->view == true && $this->view_obj != null) {
            $this->view_obj->output($this->view_data);
            return true;
        }
        return false;
    }

}


text:
.class public final Landroid/support/v4/text/BidiFormatter;
.super Ljava/lang/Object;
.source "BidiFormatter.java"

# annotations
.annotation system Ldalvik/annotation/MemberClasses;
    value = {
        Landroid/support/v4/text/BidiFormatter$DirectionalityEstimator;,
        Landroid/support/v4/text/BidiFormatter$Builder;
    }
.end annotation

# static fields
.field private static final DEFAULT_FLAGS:I = 0x2

.field private static final DEFAULT_LTR_INSTANCE:Landroid/support/v4/text/BidiFormatter;

.field private static final DEFAULT_RTL_INSTANCE:Landroid/support/v4/text/BidiFormatter;

.field private static DEFAULT_TEXT_DIRECTION_HEURISTIC:Landroid/support/v4/text/TextDirectionHeuristicCompat; = null

.field private static final DIR_LTR:I = -0x1

.field private static final DIR_RTL:I = 0x1

.field private static final DIR_UNKNOWN:I = 0x0

.field private static final EMPTY_STRING:Ljava/lang/String; = ""

.field private static final FLAG_STEREO_RESET:I = 0x2

.field private static final LRE:C = '\u202a'

.field private static final LRM:C = '\u200e'

.field private static final LRM_STRING:Ljava/lang/String;

.field private static final PDF:C = '\u202c'

.field private static final RLE:C = '\u202b'

.field private static final RLM:C = '\u200f'

.field private static final RLM_STRING:Ljava/lang/String;

# instance fields
.field private final mDefaultTextDirectionHeuristicCompat:Landroid/support/v4/text/TextDirectionHeuristicCompat;

.field private final mFlags:I

.field private final mIsRtlContext:Z

# direct methods
.method static constructor <clinit>()V
    .locals 4

    .prologue
    const/4 v3, 0x2

    .line 84
    sget-object v0, Landroid/support/v4/text/TextDirectionHeuristicsCompat;->FIRSTSTRONG_LTR:Landroid/support/v4/text/TextDirectionHeuristicCompat;

    sput-object v0, Landroid/support/v4/text/BidiFormatter;->DEFAULT_TEXT_DIRECTION_HEURISTIC:Landroid/support/v4/text/TextDirectionHeuristicCompat;

    .line 114
    const/16 v0, 0x200e

    invoke-static {v0}, Ljava/lang/Character;->toString(C)Ljava/lang/String;

    move-result-object v0

    sput-object v0, Landroid/support/v4/text/BidiFormatter;->LRM_STRING:Ljava/lang/String;

    .line 119
    const/16 v0, 0x200f

    invoke-static {v0}, Ljava/lang/Character;->toString(C)Ljava/lang/String;

    move-result-object v0

    sput-object v0, Landroid/support/v4/text/BidiFormatter;->RLM_STRING:Ljava/lang/String;

    .line 216
    new-instance v0, Landroid/support/v4/text/BidiFormatter;

    const/4 v1, 0x0

    sget-object v2, Landroid/support/v4/text/BidiFormatter;->DEFAULT_TEXT_DIRECTION_HEURISTIC:Landroid/support/v4/text/TextDirectionHeuristicCompat;

    invoke-direct {v0, v1, v3, v2}, Landroid/support/v4/text/BidiFormatter;-><init>(ZILandroid/support/v4/text/TextDirectionHeuristicCompat;)V

    sput-object v0, Landroid/support/v4/text/BidiFormatter;->DEFAULT_LTR_INSTANCE:Landroid/support/v4/text/BidiFormatter;

    .line 221
    new-instance v0, Landroid/support/v4/text/BidiFormatter;

    const/4 v1, 0x1

    sget-object v2, Landroid/support/v4/text/BidiFormatter;->DEFAULT_TEXT_DIRECTION_HEURISTIC:Landroid/support/v4/text/TextDirectionHeuristicCompat;

    invoke-direct {v0, v1, v3, v2}, Landroid/support/v4/text/BidiFormatter;-><init>(ZILandroid/support/v4/text/TextDirectionHeuristicCompat;)V

    sput-object v0, Landroid/support/v4/text/BidiFormatter;->DEFAULT_RTL_INSTANCE:Landroid/support/v4/text/BidiFormatter;

    return-void
.end method

.method private constructor <init>(ZILandroid/support/v4/text/TextDirectionHeuristicCompat;)V
    .locals 0
    .param p1, "isRtlContext"    # Z
    .param p2, "flags"    # I
    .param p3, "heuristic"    # Landroid/support/v4/text/TextDirectionHeuristicCompat;

    .prologue
    .line 261
    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    .line 262
    iput-boolean p1, p0, Landroid/support/v4/text/BidiFormatter;->mIsRtlContext:Z

    .line 263
    iput p2, p0, Landroid/support/v4/text/BidiFormatter;->mFlags:I

    .line 264
    iput-object p3, p0, Landroid/support/v4/text/BidiFormatter;->mDefaultTextDirectionHeuristicCompat:Landroid/support/v4/text/TextDirectionHeuristicCompat;

    .line 265
    return-void
.end method

.method synthetic constructor <init>(ZILandroid/support/v4/text/TextDirectionHeuristicCompat;Landroid/support/v4/text/BidiFormatter$1;)V
    .locals 0
    .param p1, "x0"    # Z
    .param p2, "x1"    # I
    .param p3, "x2"    # Landroid/support/v4/text/TextDirectionHeuristicCompat;
    .param p4, "x3"    # Landroid/support/v4/text/BidiFormatter$1;

    .prologue
    .line 79
    invoke-direct {p0, p1, p2, p3}, Landroid/support/v4/text/BidiFormatter;-><init>(ZILandroid/support/v4/text/TextDirectionHeuristicCompat;)V

    return-void
.end method

.method static synthetic access$000(Ljava/util/Locale;)Z
    .locals 1
    .param p0, "x0"    # Ljava/util/Locale;

    .prologue
    .line 79
    invoke-static {p0}, Landroid/support/v4/text/BidiFormatter;->isRtlLocale(Ljava/util/Locale;)Z

    move-result v0

    return v0
.end method

.method static synthetic access$100()Landroid/support/v4/text/TextDirectionHeuristicCompat;
    .locals 1

    .prologue
    .line 79
    sget-object v0, Landroid/support/v4/text/BidiFormatter;->DEFAULT_TEXT_DIRECTION_HEURISTIC:Landroid/support/v4/text/TextDirectionHeuristicCompat;

    return-object v0
.end method

.method static synthetic access$200()Landroid/support/v4/text/BidiFormatter;
    .locals 1

    .prologue
    .line 79
    sget-object v0, Landroid/support/v4/text/BidiFormatter;->DEFAULT_RTL_INSTANCE:Landroid/support/v4/text/BidiFormatter;

    return-object v0
.end method

.method static synthetic access$300()Landroid/support/v4/text/BidiFormatter;
    .locals 1

    .prologue
    .line 79
    sget-object v0, Landroid/support/v4/text/BidiFormatter;->DEFAULT_LTR_INSTANCE:Landroid/support/v4/text/BidiFormatter;

    return-object v0
.end method

.method private static getEntryDir(Ljava/lang/CharSequence;)I
    .locals 2
    .param p0, "str"    # Ljava/lang/CharSequence;

    .prologue
    .line 557
    new-instance v0, Landroid/support/v4/text/BidiFormatter$DirectionalityEstimator;

    const/4 v1, 0x0

    invoke-direct {v0, p0, v1}, Landroid/support/v4/text/BidiFormatter$DirectionalityEstimator;-><init>(Ljava/lang/CharSequence;Z)V

    invoke-virtual {v0}, Landroid/support/v4/text/BidiFormatter$DirectionalityEstimator;->getEntryDir()I

    move-result v0

    return v0
.end method

.method private static getExitDir(Ljava/lang/CharSequence;)I
    .locals 2
    .param p0, "str"    # Ljava/lang/CharSequence;

    .prologue
    .line 540
    new-instance v0, Landroid/support/v4/text/BidiFormatter$DirectionalityEstimator;

    const/4 v1, 0x0

    invoke-direct {v0, p0, v1}, Landroid/support/v4/text/BidiFormatter$DirectionalityEstimator;-><init>(Ljava/lang/CharSequence;Z)V

    invoke-virtual {v0}, Landroid/support/v4/text/BidiFormatter$DirectionalityEstimator;->getExitDir()I

    move-result v0

    return v0
.end method

.method public static getInstance()Landroid/support/v4/text/BidiFormatter;
    .locals 1

    .prologue
    .line 235
    new-instance v0, Landroid/support/v4/text/BidiFormatter$Builder;

    invoke-direct {v0}, Landroid/support/v4/text/BidiFormatter$Builder;-><init>()V

    invoke-virtual {v0}, Landroid/support/v4/text/BidiFormatter$Builder;->build()Landroid/support/v4/text/BidiFormatter;

    move-result-object v0

    return-object v0
.end method

.method public static getInstance(Ljava/util/Locale;)Landroid/support/v4/text/BidiFormatter;
    .locals 1
    .param p0, "locale"    # Ljava/util/Locale;

    .prologue
    .line 253
    new-instance v0, Landroid/support/v4/text/BidiFormatter$Builder;

    invoke-direct {v0, p0}, Landroid/support/v4/text/BidiFormatter$Builder;-><init>(Ljava/util/Locale;)V

    invoke-virtual {v0}, Landroid/support/v4/text/BidiFormatter$Builder;->build()Landroid/support/v4/text/BidiFormatter;

    move-result-object v0

    return-object v0
.end method

.method public static getInstance(Z)Landroid/support/v4/text/BidiFormatter;
    .locals 1
    .param p0, "rtlContext"    # Z

    .prologue
    .line 244
    new-instance v0, Landroid/support/v4/text/BidiFormatter$Builder;

    invoke-direct {v0, p0}, Landroid/support/v4/text/BidiFormatter$Builder;-><init>(Z)V

    invoke-virtual {v0}, Landroid/support/v4/text/BidiFormatter$Builder;->build()Landroid/support/v4/text/BidiFormatter;

    move-result-object v0

    return-object v0
.end method

.method private static isRtlLocale(Ljava/util/Locale;)Z
    .locals 2
    .param p0, "locale"    # Ljava/util/Locale;

    .prologue
    const/4 v0, 0x1

    .line 515
    invoke-static {p0}, Landroid/support/v4/text/TextUtilsCompat;->getLayoutDirectionFromLocale(Ljava/util/Locale;)I

    move-result v1

    if-ne v1, v0, :cond_0

    :goto_0
    return v0

    :cond_0
    const/4 v0, 0x0

    goto :goto_0
.end method

.method private markAfter(Ljava/lang/CharSequence;Landroid/support/v4/text/TextDirectionHeuristicCompat;)Ljava/lang/String;
    .locals 3
    .param p1, "str"    # Ljava/lang/CharSequence;
    .param p2, "heuristic"    # Landroid/support/v4/text/TextDirectionHeuristicCompat;

    .prologue
    .line 299
    const/4 v1, 0x0

    invoke-interface {p1}, Ljava/lang/CharSequence;->length()I

    move-result v2

    invoke-interface {p2, p1, v1, v2}, Landroid/support/v4/text/TextDirectionHeuristicCompat;->isRtl(Ljava/lang/CharSequence;II)Z

    move-result v0

    .line 301
    .local v0, "isRtl":Z
    iget-boolean v1, p0, Landroid/support/v4/text/BidiFormatter;->mIsRtlContext:Z

    if-nez v1, :cond_1

    if-nez v0, :cond_0

    invoke-static {p1}, Landroid/support/v4/text/BidiFormatter;->getExitDir(Ljava/lang/CharSequence;)I

    move-result v1

    const/4 v2, 0x1

    if-ne v1, v2, :cond_1

    .line 302
    :cond_0
    sget-object v1, Landroid/support/v4/text/BidiFormatter;->LRM_STRING:Ljava/lang/String;

    .line 307
    :goto_0
    return-object v1

    .line 304
    :cond_1
    iget-boolean v1, p0, Landroid/support/v4/text/BidiFormatter;->mIsRtlContext:Z

    if-eqz v1, :cond_3

    if-eqz v0, :cond_2

    invoke-static {p1}, Landroid/support/v4/text/BidiFormatter;->getExitDir(Ljava/lang/CharSequence;)I

    move-result v1

    const/4 v2, -0x1

    if-ne v1, v2, :cond_3

    .line 305
    :cond_2
    sget-object v1, Landroid/support/v4/text/BidiFormatter;->RLM_STRING:Ljava/lang/String;

    goto :goto_0

    .line 307
    :cond_3
    const-string v1, ""

    goto :goto_0
.end method

.method private markBefore(Ljava/lang/CharSequence;Landroid/support/v4/text/TextDirectionHeuristicCompat;)Ljava/lang/String;
    .locals 3
    .param p1, "str"    # Ljava/lang/CharSequence;
    .param p2, "heuristic"    # Landroid/support/v4/text/TextDirectionHeuristicCompat;

    .prologue
    .line 327
    const/4 v1, 0x0

    invoke-interface {p1}, Ljava/lang/CharSequence;->length()I

    move-result v2

    invoke-interface {p2, p1, v1, v2}, Landroid/support/v4/text/TextDirectionHeuristicCompat;->isRtl(Ljava/lang/CharSequence;II)Z

    move-result v0

    .line 329
    .local v0, "isRtl":Z
    iget-boolean v1, p0, Landroid/support/v4/text/BidiFormatter;->mIsRtlContext:Z

    if-nez v1, :cond_1

    if-nez v0, :cond_0

    invoke-static {p1}, Landroid/support/v4/text/BidiFormatter;->getEntryDir(Ljava/lang/CharSequence;)I

    move-result v1

    const/4 v2, 0x1

    if-ne v1, v2, :cond_1

    .line 330
    :cond_0
    sget-object v1, Landroid/support/v4/text/BidiFormatter;->LRM_STRING:Ljava/lang/String;

    .line 335
    :goto_0
    return-object v1

    .line 332
    :cond_1
    iget-boolean v1, p0, Landroid/support/v4/text/BidiFormatter;->mIsRtlContext:Z

    if-eqz v1, :cond_3

    if-eqz v0, :cond_2

    invoke-static {p1}, Landroid/support/v4/text/BidiFormatter;->getEntryDir(Ljava/lang/CharSequence;)I

    move-result v1

    const/4 v2, -0x1

    if-ne v1, v2, :cond_3

    .line 333
    :cond_2
    sget-object v1, Landroid/support/v4/text/BidiFormatter;->RLM_STRING:Ljava/lang/String;

    goto :goto_0

    .line 335
    :cond_3
    const-string v1, ""

    goto :goto_0
.end method

# virtual methods
.method public getStereoReset()Z
    .locals 1

    .prologue
    .line 279
    iget v0, p0, Landroid/support/v4/text/BidiFormatter;->mFlags:I

    and-int/lit8 v0, v0, 0x2

    if-eqz v0, :cond_0

    const/4 v0, 0x1

    :goto_0
    return v0

    :cond_0
    const/4 v0, 0x0

    goto :goto_0
.end method

.method public isRtl(Ljava/lang/CharSequence;)Z
    .locals 3
    .param p1, "str"    # Ljava/lang/CharSequence;

    .prologue
    .line 357
    iget-object v0, p0, Landroid/support/v4/text/BidiFormatter;->mDefaultTextDirectionHeuristicCompat:Landroid/support/v4/text/TextDirectionHeuristicCompat;

    const/4 v1, 0x0

    invoke-interface {p1}, Ljava/lang/CharSequence;->length()I

    move-result v2

    invoke-interface {v0, p1, v1, v2}, Landroid/support/v4/text/TextDirectionHeuristicCompat;->isRtl(Ljava/lang/CharSequence;II)Z

    move-result v0

    return v0
.end method

.method public isRtl(Ljava/lang/String;)Z
    .locals 1
    .param p1, "str"    # Ljava/lang/String;

    .prologue
    .line 346
    invoke-virtual {p0, p1}, Landroid/support/v4/text/BidiFormatter;->isRtl(Ljava/lang/CharSequence;)Z

    move-result v0

    return v0
.end method

.method public isRtlContext()Z
    .locals 1

    .prologue
    .line 271
    iget-boolean v0, p0, Landroid/support/v4/text/BidiFormatter;->mIsRtlContext:Z

    return v0
.end method

.method public unicodeWrap(Ljava/lang/CharSequence;)Ljava/lang/CharSequence;
    .locals 2
    .param p1, "str"    # Ljava/lang/CharSequence;

    .prologue
    .line 505
    iget-object v0, p0, Landroid/support/v4/text/BidiFormatter;->mDefaultTextDirectionHeuristicCompat:Landroid/support/v4/text/TextDirectionHeuristicCompat;

    const/4 v1, 0x1

    invoke-virtual {p0, p1, v0, v1}, Landroid/support/v4/text/BidiFormatter;->unicodeWrap(Ljava/lang/CharSequence;Landroid/support/v4/text/TextDirectionHeuristicCompat;Z)Ljava/lang/CharSequence;

    move-result-object v0

    return-object v0
.end method

.method public unicodeWrap(Ljava/lang/CharSequence;Landroid/support/v4/text/TextDirectionHeuristicCompat;)Ljava/lang/CharSequence;
    .locals 1
    .param p1, "str"    # Ljava/lang/CharSequence;
    .param p2, "heuristic"    # Landroid/support/v4/text/TextDirectionHeuristicCompat;

    .prologue
    .line 455
    const/4 v0, 0x1

    invoke-virtual {p0, p1, p2, v0}, Landroid/support/v4/text/BidiFormatter;->unicodeWrap(Ljava/lang/CharSequence;Landroid/support/v4/text/TextDirectionHeuristicCompat;Z)Ljava/lang/CharSequence;

    move-result-object v0

    return-object v0
.end method

.method public unicodeWrap(Ljava/lang/CharSequence;Landroid/support/v4/text/TextDirectionHeuristicCompat;Z)Ljava/lang/CharSequence;
    .locals 4
    .param p1, "str"    # Ljava/lang/CharSequence;
    .param p2, "heuristic"    # Landroid/support/v4/text/TextDirectionHeuristicCompat;
    .param p3, "isolate"    # Z

    .prologue
    .line 410
    if-nez p1, :cond_1

    const/4 v1, 0x0

    .line 428
    :cond_0
    :goto_0
    return-object v1

    .line 411
    :cond_1
    const/4 v2, 0x0

    invoke-interface {p1}, Ljava/lang/CharSequence;->length()I

    move-result v3

    invoke-interface {p2, p1, v2, v3}, Landroid/support/v4/text/TextDirectionHeuristicCompat;->isRtl(Ljava/lang/CharSequence;II)Z

    move-result v0

    .line 412
    .local v0, "isRtl":Z
    new-instance v1, Landroid/text/SpannableStringBuilder;

    invoke-direct {v1}, Landroid/text/SpannableStringBuilder;-><init>()V

    .line 413
    .local v1, "result":Landroid/text/SpannableStringBuilder;
    invoke-virtual {p0}, Landroid/support/v4/text/BidiFormatter;->getStereoReset()Z

    move-result v2

    if-eqz v2, :cond_2

    if-eqz p3, :cond_2

    .line 414
    if-eqz v0, :cond_3

    sget-object v2, Landroid/support/v4/text/TextDirectionHeuristicsCompat;->RTL:Landroid/support/v4/text/TextDirectionHeuristicCompat;

    :goto_1
    invoke-direct {p0, p1, v2}, Landroid/support/v4/text/BidiFormatter;->markBefore(Ljava/lang/CharSequence;Landroid/support/v4/text/TextDirectionHeuristicCompat;)Ljava/lang/String;

    move-result-object v2

    invoke-virtual {v1, v2}, Landroid/text/SpannableStringBuilder;->append(Ljava/lang/CharSequence;)Landroid/text/SpannableStringBuilder;

    .line 417
    :cond_2
    iget-boolean v2, p0, Landroid/support/v4/text/BidiFormatter;->mIsRtlContext:Z

    if-eq v0, v2, :cond_5

    .line 418
    if-eqz v0, :cond_4

    const/16 v2, 0x202b

    :goto_2
    invoke-virtual {v1, v2}, Landroid/text/SpannableStringBuilder;->append(C)Landroid/text/SpannableStringBuilder;

    .line 419
    invoke-virtual {v1, p1}, Landroid/text/SpannableStringBuilder;->append(Ljava/lang/CharSequence;)Landroid/text/SpannableStringBuilder;

    .line 420
    const/16 v2, 0x202c

    invoke-virtual {v1, v2}, Landroid/text/SpannableStringBuilder;->append(C)Landroid/text/SpannableStringBuilder;

    .line 424
    :goto_3
    if-eqz p3, :cond_0

    .line 425
    if-eqz v0, :cond_6

    sget-object v2, Landroid/support/v4/text/TextDirectionHeuristicsCompat;->RTL:Landroid/support/v4/text/TextDirectionHeuristicCompat;

    :goto_4
    invoke-direct {p0, p1, v2}, Landroid/support/v4/text/BidiFormatter;->markAfter(Ljava/lang/CharSequence;Landroid/support/v4/text/TextDirectionHeuristicCompat;)Ljava/lang/String;

    move-result-object v2

    invoke-virtual {v1, v2}, Landroid/text/SpannableStringBuilder;->append(Ljava/lang/CharSequence;)Landroid/text/SpannableStringBuilder;

    goto :goto_0

    .line 414
    :cond_3
    sget-object v2, Landroid/support/v4/text/TextDirectionHeuristicsCompat;->LTR:Landroid/support/v4/text/TextDirectionHeuristicCompat;

    goto :goto_1

    .line 418
    :cond_4
    const/16 v2, 0x202a

    goto :goto_2

    .line 422
    :cond_5
    invoke-virtual {v1, p1}, Landroid/text/SpannableStringBuilder;->append(Ljava/lang/CharSequence;)Landroid/text/SpannableStringBuilder;

    goto :goto_3

    .line 425
    :cond_6
    sget-object v2, Landroid/support/v4/text/TextDirectionHeuristicsCompat;->LTR:Landroid/support/v4/text/TextDirectionHeuristicCompat;

    goto :goto_4
.end method

.method public unicodeWrap(Ljava/lang/CharSequence;Z)Ljava/lang/CharSequence;
    .locals 1
    .param p1, "str"    # Ljava/lang/CharSequence;
    .param p2, "isolate"    # Z

    .prologue
    .line 482
    iget-object v0, p0, Landroid/support/v4/text/BidiFormatter;->mDefaultTextDirectionHeuristicCompat:Landroid/support/v4/text/TextDirectionHeuristicCompat;

    invoke-virtual {p0, p1, v0, p2}, Landroid/support/v4/text/BidiFormatter;->unicodeWrap(Ljava/lang/CharSequence;Landroid/support/v4/text/TextDirectionHeuristicCompat;Z)Ljava/lang/CharSequence;

    move-result-object v0

    return-object v0
.end method

.method public unicodeWrap(Ljava/lang/String;)Ljava/lang/String;
    .locals 2
    .param p1, "str"    # Ljava/lang/String;

    .prologue
    .line 493
    iget-object v0, p0, Landroid/support/v4/text/BidiFormatter;->mDefaultTextDirectionHeuristicCompat:Landroid/support/v4/text/TextDirectionHeuristicCompat;

    const/4 v1, 0x1

    invoke-virtual {p0, p1, v0, v1}, Landroid/support/v4/text/BidiFormatter;->unicodeWrap(Ljava/lang/String;Landroid/support/v4/text/TextDirectionHeuristicCompat;Z)Ljava/lang/String;

    move-result-object v0

    return-object v0
.end method

.method public unicodeWrap(Ljava/lang/String;Landroid/support/v4/text/TextDirectionHeuristicCompat;)Ljava/lang/String;
    .locals 1
    .param p1, "str"    # Ljava/lang/String;
    .param p2, "heuristic"    # Landroid/support/v4/text/TextDirectionHeuristicCompat;

    .prologue
    .line 440
    const/4 v0, 0x1

    invoke-virtual {p0, p1, p2, v0}, Landroid/support/v4/text/BidiFormatter;->unicodeWrap(Ljava/lang/String;Landroid/support/v4/text/TextDirectionHeuristicCompat;Z)Ljava/lang/String;

    move-result-object v0

    return-object v0
.end method

.method public unicodeWrap(Ljava/lang/String;Landroid/support/v4/text/TextDirectionHeuristicCompat;Z)Ljava/lang/String;
    .locals 1
    .param p1, "str"    # Ljava/lang/String;
    .param p2, "heuristic"    # Landroid/support/v4/text/TextDirectionHeuristicCompat;
    .param p3, "isolate"    # Z

    .prologue
    .line 390
    if-nez p1, :cond_0

    const/4 v0, 0x0

    .line 391
    :goto_0
    return-object v0

    :cond_0
    invoke-virtual {p0, p1, p2, p3}, Landroid/support/v4/text/BidiFormatter;->unicodeWrap(Ljava/lang/CharSequence;Landroid/support/v4/text/TextDirectionHeuristicCompat;Z)Ljava/lang/CharSequence;

    move-result-object v0

    invoke-interface {v0}, Ljava/lang/CharSequence;->toString()Ljava/lang/String;

    move-result-object v0

    goto :goto_0
.end method

.method public unicodeWrap(Ljava/lang/String;Z)Ljava/lang/String;
    .locals 1
    .param p1, "str"    # Ljava/lang/String;
    .param p2, "isolate"    # Z

    .prologue
    .line 468
    iget-object v0, p0, Landroid/support/v4/text/BidiFormatter;->mDefaultTextDirectionHeuristicCompat:Landroid/support/v4/text/TextDirectionHeuristicCompat;

    invoke-virtual {p0, p1, v0, p2}, Landroid/support/v4/text/BidiFormatter;->unicodeWrap(Ljava/lang/String;Landroid/support/v4/text/TextDirectionHeuristicCompat;Z)Ljava/lang/String;

    move-result-object v0

    return-object v0
.end method