text:
goog.provide('Mavelous.SettingsView');

goog.require('Mavelous.PFDSettingsModel');

/**
 * Settings backbone view.
 * @param {Object} properties View properties.
 * @constructor
 * @extends {Backbone.View}
 */
Mavelous.SettingsView = function(properties) {
  goog.base(this, properties);
};
goog.inherits(Mavelous.SettingsView, Backbone.View);

/**
 * @override
 * @export
 */
Mavelous.SettingsView.prototype.initialize = function() {
  var self = this;
  /* Setup settings pane elements (jquery) */
  this.modalToggle = this.options['modalToggle'];
  this.modal = this.options['modal'];
  this.modalToggle.click(function() {
    self.modal.modal('toggle');
  });
  /* Leaflet map: for zoom */
  this.map = this.options['map'];
  this.mapView = this.options['mapView'];
  /* Map models: */
  this.mapProviderModel = this.options['mapProviderModel'];
  this.vehicleIconModel = this.options['vehicleIconModel'];
  /* Map settings elements (jquery): */
  this.mapProviderPicker = this.options['mapProviderPicker'];
  this.mapZoomSlider = this.options['mapZoomSlider'];
  this.mapZoomValue = this.options['mapZoomValue'];
  this.mapPathPicker = this.options['mapPathPicker'];
  this.vehicleIconPicker = this.options['vehicleIconPicker'];

  this.setupMapProviderPicker();
  this.setupMapZoomSlider();
  this.setupMapPathPicker();
  this.setupVehicleIconPicker();

  /* PFD Settings model: */
  this.pfdSettingsModel = this.options['pfdSettingsModel'];
  /* PFD Settings elements (jquery): */
  this.pfdPositionLeft = this.options['pfdPositionLeft'];
  this.pfdPositionRight = this.options['pfdPositionRight'];
  this.pfdPositionUp = this.options['pfdPositionUp'];
  this.pfdPositionDown = this.options['pfdPositionDown'];

  this.setupPFDSettings();
};

/* MAP SETTINGS ROUTINES */

/**
 * Set up the map provider picker.
 */
Mavelous.SettingsView.prototype.setupMapProviderPicker = function() {
  var self = this;
  if (this.mapProviderModel === undefined) {
    return;
  }
  _.each(Mavelous.LeafletProviders.Providers, function(provider, name) {
    self.mapProviderPicker.append('<option value="' + name + '">' +
                                  provider.description + '</option>');
  });
  this.mapProviderPicker.change(function() {
    var newprovider = self.mapProviderPicker.val();
    self.mapProviderModel.set('provider', newprovider);
  });
};

/**
 * Set up the map zoom slider.
 */
Mavelous.SettingsView.prototype.setupMapZoomSlider = function() {
  var self = this;
  if (this.map === undefined) {
    return;
  }
  this.mapZoomSlider.change(function() {
    self.map.setZoom(self.mapZoomSlider.val());
  });
  this.map.on('zoomend', this.onZoomChange, this);
};

/**
 * Set up map trail picker
 */
Mavelous.SettingsView.prototype.setupMapPathPicker = function() {
  var self = this;
  if (this.map === undefined) {
    return;
  }
  this.mapPathPicker.change(function() {
    var setting = self.mapPathPicker.val();
    self.mapView.setPathVisible(setting);
  });
};

/**
 * Set up the vehicle icon picker.
 */
Mavelous.SettingsView.prototype.setupVehicleIconPicker = function() {
  var self = this;
  if (this.vehicleIconModel === undefined) {
    return;
  }
  _.each(Mavelous.LeafletDroneIconModel.Icons, function(icon, name) {
    self.vehicleIconPicker.append('<option value="' + name + '">' +
                                  icon.description + '</option>');
  });
  this.vehicleIconPicker.change(function() {
    var newicon = self.vehicleIconPicker.val();
    self.vehicleIconModel.set('icon', newicon);
  });
};

/**
 * Handles zoom slider changes.
 */
Mavelous.SettingsView.prototype.onZoomChange = function() {
  this.mapZoomSlider.val(this.map.getZoom());
  this.mapZoomValue.html(this.map.getZoom().toString());
};

/* PFD SETTINGS ROUTINES */

/**
 * Set up the PFD settings.
 */
Mavelous.SettingsView.prototype.setupPFDSettings = function() {
  var self = this;
  this.pfdPositionLeft.click(function() {
    if (self.pfdPositionUp.hasClass('active')) {
      self.pfdSettingsModel.set('position',
                                Mavelous.PFDSettingsModel.Position.TOPLEFT);
    } else {
      self.pfdSettingsModel.set('position',
                                Mavelous.PFDSettingsModel.Position.BOTTOMLEFT);
    }
  });

  this.pfdPositionRight.click(function() {
    if (self.pfdPositionUp.hasClass('active')) {
      self.pfdSettingsModel.set('position',
                                Mavelous.PFDSettingsModel.Position.TOPRIGHT);
    } else {
      self.pfdSettingsModel.set('position',
                                Mavelous.PFDSettingsModel.Position.BOTTOMRIGHT);
    }
  });

  this.pfdPositionUp.click(function() {
    if (self.pfdPositionLeft.hasClass('active')) {
      self.pfdSettingsModel.set('position',
                                Mavelous.PFDSettingsModel.Position.TOPLEFT);
    } else {
      self.pfdSettingsModel.set('position',
                                Mavelous.PFDSettingsModel.Position.TOPRIGHT);
    }
  });

  this.pfdPositionDown.click(function() {
    if (self.pfdPositionLeft.hasClass('active')) {
      self.pfdSettingsModel.set('position',
                                Mavelous.PFDSettingsModel.Position.BOTTOMLEFT);
    } else {
      self.pfdSettingsModel.set('position',
                                Mavelous.PFDSettingsModel.Position.BOTTOMRIGHT);
    }
  });

  this.pfdSettingsModel.bind('change', this.onPFDSettingsChange, this);
  this.onPFDSettingsChange();
};

/**
 * Handles PFD settings changes.
 */
Mavelous.SettingsView.prototype.onPFDSettingsChange = function() {
  var position = this.pfdSettingsModel.get('position');
  switch (position) {
    case Mavelous.PFDSettingsModel.Position.TOPLEFT:
      this.pfdPositionLeft.button('toggle');
      this.pfdPositionUp.button('toggle');
      break;
    case Mavelous.PFDSettingsModel.Position.TOPRIGHT:
      this.pfdPositionRight.button('toggle');
      this.pfdPositionUp.button('toggle');
      break;
    case Mavelous.PFDSettingsModel.Position.BOTTOMLEFT:
      this.pfdPositionLeft.button('toggle');
      this.pfdPositionDown.button('toggle');
      break;
    case Mavelous.PFDSettingsModel.Position.BOTTOMRIGHT:
      this.pfdPositionRight.button('toggle');
      this.pfdPositionDown.button('toggle');
      break;
  }
};


text:
from arcpy import env
import arcpy
import datetime
#import numpy
env.overwriteOutput = True
env.autoCancelling = False

## This is important! Where all of the outputs are saved!
env.workspace = arcpy.GetParameterAsText(0)

##### Local variables: #####
Risk_shp = arcpy.GetParameterAsText(1)
MH = arcpy.GetParameterAsText(2)
Risk_symbol = arcpy.GetParameterAsText(3)
MH_symbol = arcpy.GetParameterAsText(4)
target_line_symbology = arcpy.GetParameterAsText(5)
#May not use
target_MH = env.workspace + "\\target_MH.shp"
map_output_folder = env.workspace + "\\Maps\\"
high_risk_lines = env.workspace + "\\high_risk_lines.shp"
risky_line = env.workspace + "\\Target_Line.shp"
Risk_copy = env.workspace + "\\Risk_copy.shp"

risk_list = []
cur = arcpy.SearchCursor(Risk_shp)
for cur1 in cur:
    risk_list.append(cur1.Risk)
del cur

arcpy.SetProgressorLabel("Sort list of the risk values to identify the " + \
    "highest risk lines")
# Sort list of the risk values to identify the highest risk lines
sorted_risk = sorted(risk_list, reverse = True)
# Identify the 10th highest risk value
place_ten = sorted_risk[9]

arcpy.SetProgressorLabel("Process: Make Layer where the risk is the same " + \
    "or greater than the tenth highest list value")
# Define where clause that the Risk is greater than or equal to the 10th
# risk value
where_clause = "\"Risk\" >= " + str(place_ten)
# Make layer of the SS lines that are greater than or equal to the 10th
# risk value
arcpy.MakeFeatureLayer_management(Risk_shp, "High_Risk_lyr", where_clause)
# Copy the layer to make it a feature that process may be run on
arcpy.CopyFeatures_management("High_Risk_lyr", high_risk_lines)

mapdoc = arcpy.mapping.MapDocument("CURRENT")
data_frame = arcpy.mapping.ListDataFrames(mapdoc, "Layers")[0]

# If the user has input a
if Risk_symbol != '':
    tar_risk_layer = Risk_copy.replace(".shp", ".lyr")
    addRisklayer = arcpy.mapping.Layer(Risk_shp)
    arcpy.mapping.UpdateLayer(data_frame, addRisklayer, arcpy.mapping.Layer(Risk_symbol), True)
    addRisklayer.name = "Line Risk"
    arcpy.mapping.AddLayer(data_frame, addRisklayer,"TOP")
else:
    pass

arcpy.SetProgressorLabel("Process: Make Layer where the Manholes are " + \
    "adjacent to the high risk sewer lines")
# Create layer version of manholes

tar_mh_layer = target_MH.replace(".shp", ".lyr")
tar_mh = arcpy.SelectLayerByLocation_management(MH, "INTERSECT",
    high_risk_lines)
tar_mh_feature = arcpy.CopyFeatures_management(tar_mh, target_MH)
MH_layer = arcpy.MakeFeatureLayer_management(tar_mh_feature, tar_mh_layer)
addMHlayer = arcpy.mapping.Layer(tar_mh_layer)

if MH_symbol != '':
    arcpy.mapping.UpdateLayer(data_frame, addMHlayer, arcpy.mapping.Layer(MH_symbol), True)
else:
    pass
if addMHlayer.supports("SHOWLABELS") == True:
    addMHlayer.showLabels = True
    for lblClass in addMHlayer.labelClasses:
        if lblClass.showClassLabels:
            lblClass.expression = "[LABEL]"
addMHlayer.name = "Target Manholes"
arcpy.mapping.AddLayer(data_frame, addMHlayer,"TOP")

# Select the manholes that intersect with the high risk sewer lines

arcpy.SetProgressorLabel("Create a Update Cursor to select the lines")
risky_lines = arcpy.SearchCursor(high_risk_lines)
date = str(datetime.date.today())
rline_FID_list =[]

for line in risky_lines:
    rline_FID_list.append(line.FID)
del risky_lines
arcpy.SetProgressorLabel(rline_FID_list)

arcpy.SetProgressorLabel("Set up map document environment to create " + \
    "exported map documents as pdfs in map folder")
for FID in rline_FID_list:
    where_clause2 = "\"FID\" = " + str(FID)
    print where_clause2
    single_risky_line = risky_line  #+ str(FID) + ".shp"
    fc = arcpy.Select_analysis(high_risk_lines, single_risky_line, where_clause2)

    lyr_ = risky_line.replace(".shp", ".lyr")

    newlayer = arcpy.MakeFeatureLayer_management(fc, lyr_)
    addlayer = arcpy.mapping.Layer(lyr_)
    old_line_name = addlayer.name
    addlayer.name = "Target Line"
    arcpy.mapping.AddLayer(data_frame, addlayer,"AUTO_ARRANGE")
    sym_layer = arcpy.mapping.ListLayers(mapdoc, "Target Line", data_frame)[0]
    if target_line_symbology != '':
        arcpy.mapping.UpdateLayer(data_frame, sym_layer, arcpy.mapping.Layer(target_line_symbology), True)
    else:
        pass
    legend = arcpy.mapping.ListLayoutElements(mapdoc, "LEGEND_ELEMENT",
        "Legend")[0]
    legend.autoAdd = True

    #arcpy.RefreshActiveView()
    #arcpy.RefreshTOC()

    fc_cur = arcpy.da.SearchCursor(fc, ['LENGTH', 'SHAPE@X', 'SHAPE@Y'])
    for fc_line in fc_cur:
        line_length = fc_line[0]
        cX = fc_line[1]
        cY = fc_line[2]
    del fc_cur
    arcpy.SetProgressorLabel(cX)
    arcpy.SetProgressorLabel(cY)

    if line_length < 500.00:
         new_scale = 1000.00
    elif line_length > 500.00 and line_length < 1000.00:
         new_scale = 1500.00
    elif line_length > 1000.00 and line_length < 1500.00:
         new_scale = 2000.00
    elif line_length > 1500.00 and line_length < 2000.00:
         new_scale = 2500.00
    elif line_length > 2000.00 and line_length < 2500.00:
         new_scale = 3000.00
    elif line_length > 2500.00 and line_length < 3000.00:
         new_scale = 3500.00
    elif line_length > 3000.00 and line_length < 3500.00:
         new_scale = 4000.00
    else:
         new_scale = line_length + 500

    newExtent = data_frame.extent
    newExtent.XMin = cX - (new_scale/2)
    newExtent.XMax = cX + (new_scale/2)
    newExtent.YMin = cY - (new_scale/2)
    newExtent.YMax = cY + (new_scale/2)
    data_frame.extent = newExtent
    data_frame.scale = new_scale
    arcpy.SetProgressorLabel(data_frame.scale)

    arcpy.RefreshActiveView()
    arcpy.RefreshTOC()

	#Improve naming convention?
    map_output = map_output_folder + str(FID) + "_" + date + ".pdf"
    arcpy.mapping.ExportToPDF(mapdoc, map_output)
    remove_layer = arcpy.mapping.ListLayers(mapdoc, "Target Line", data_frame)[0]
    arcpy.mapping.RemoveLayer(data_frame, remove_layer)
    arcpy.RefreshActiveView()
    arcpy.RefreshTOC()
    arcpy.SetProgressorLabel( "Created Map for " + str(FID + 1) )
del mapdoc

redpajama_set_name: RedPajamaGithub


text:
/*******************************************************************************
 * This program and the accompanying materials
 * are made available under the terms of the Eclipse Public License v1.0
 * which accompanies this distribution, and is available at
 * http://www.eclipse.org/legal/epl-v10.html.
 *
 * This file is a derivative of code released by the University of
 * California under the terms listed below.
 *
 * Refinement Analysis Tools is Copyright (c) 2007 The Regents of the
 * University of California (Regents). Provided that this notice and
 * the following two paragraphs are included in any distribution of
 * Refinement Analysis Tools or its derivative work, Regents agrees
 * not to assert any of Regents' copyright rights in Refinement
 * Analysis Tools against recipient for recipient's reproduction,
 * preparation of derivative works, public display, public
 * performance, distribution or sublicensing of Refinement Analysis
 * Tools and derivative works, in source code and object code form.
 * This agreement not to assert does not confer, by implication,
 * estoppel, or otherwise any license or rights in any intellectual
 * property of Regents, including, but not limited to, any patents
 * of Regents or Regents' employees.
 *
 * IN NO EVENT SHALL REGENTS BE LIABLE TO ANY PARTY FOR DIRECT,
 * INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES,
 * INCLUDING LOST PROFITS, ARISING OUT OF THE USE OF THIS SOFTWARE
 * AND ITS DOCUMENTATION, EVEN IF REGENTS HAS BEEN ADVISED OF THE
 * POSSIBILITY OF SUCH DAMAGE.
 *
 * REGENTS SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, BUT NOT
 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
 * FOR A PARTICULAR PURPOSE AND FURTHER DISCLAIMS ANY STATUTORY
 * WARRANTY OF NON-INFRINGEMENT. THE SOFTWARE AND ACCOMPANYING
 * DOCUMENTATION, IF ANY, PROVIDED HEREUNDER IS PROVIDED "AS
 * IS". REGENTS HAS NO OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT,
 * UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
 */
package com.ibm.wala.util.graph.labeled;

import com.ibm.wala.util.graph.Graph;

/**
 * A graph with labeled edges.
 */
public interface LabeledGraph<T, U> extends Graph<T>, LabeledEdgeManager<T, U> {

}


text:
package com.cspinformatique.kubik.server.domain.purchase.task.exception;

public class ProductNotFoundException extends InvalidReceptionDetailException {
	private static final long serialVersionUID = -6043299571434799785L;

	public ProductNotFoundException(String ean13, String supplierEan13) {
		super("Product with ean13 " + ean13 + " could not be found for supplier with ean13 " + supplierEan13);
	}
}


text:
package net.skoumal.fragmentback.example;

import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;

import net.skoumal.fragmentback.BackFragment;

import androidx.fragment.app.Fragment;

/**
 * Simple fragment with low priority for back button event.
 */
public class ParentFragment extends Fragment implements BackFragment {

    public ParentFragment() {
        // Required empty public constructor
    }

    public static ParentFragment newInstance() {
        ParentFragment fragment = new ParentFragment();
        return fragment;
    }

    @Override
    public View onCreateView(LayoutInflater inflater, ViewGroup container,
                             Bundle savedInstanceState) {
        View view = inflater.inflate(R.layout.fragment_parent, container, false);

        if (savedInstanceState == null) {
            getChildFragmentManager().beginTransaction()
                    .add(R.id.top_fragment, FirstFragment.newInstance())
                    .add(R.id.bottom_fragment, SecondFragment.newInstance())
                    .commit();
        }

        return view;
    }

    @Override
    public boolean onBackPressed() {
        return false; // we do not consume the event here
    }

    @Override
    public int getBackPriority() {
        return LOW_BACK_PRIORITY;
    }
}


text:
The Changelog
=============

1.3.3 — 2022-09-23
------------------

### Fixed

* Broken compatibility with the older PyCharm versions

1.3.2 — 2022-09-23
------------------

### Fixed

* An error on opening projects in PyCharm 2022.2.2
  ([#205](https://github.com/JetBrains/intellij-micropython/issues/205))

1.3.1 — 2022-03-18
------------------

### Changed

* Compatibility with 2020.3-2022.1
  ([#184](https://github.com/vlasovskikh/intellij-micropython/issues/184))

1.3 — 2021-12-01
----------------

### Added

* Added many stubs for the MicroPython standard library and Pyboard
  ([#176](https://github.com/vlasovskikh/intellij-micropython/pull/176))
  (Thanks to [@hlovatt](https://github.com/hlovatt))

### Changed

* Compatibility with 2020.3-2021.3

### Fixed

* Fixed special keys in REPL on Windows for pyserial>=3.5
  ([#175](https://github.com/vlasovskikh/intellij-micropython/issues/175))

1.2 — 2021-08-05
----------------

### Added

* Added support for Raspberry Pi Pico devices
  ([#132](https://github.com/vlasovskikh/intellij-micropython/issues/132))
  (Thanks to [@timsavage](https://github.com/timsavage))
* Added type hints for `lcd160cr`, `network`, `ubluetooth`, `ucryptolib`, `uctypes`
  (Thanks to [@hlovatt](https://github.com/hlovatt))

### Changed

* Compatibility with 2020.3-2021.2
  ([#170](https://github.com/vlasovskikh/intellij-micropython/issues/170))
* Updated type hints for `pyb`, `machine`, `micropython`, `uarray`, `btree`, `framebuf`
  (Thanks to [@hlovatt](https://github.com/hlovatt))

### Fixed

* Fixed handling backslash while flashing files on Windows
  ([#128](https://github.com/vlasovskikh/intellij-micropython/issues/128))
  (Thanks to [@jdjjm](https://github.com/jdjjm))

1.1.4 — 2021-03-05
------------------

* Compatibility with 2020.2-2021.1

1.1.3 — 2020-12-12
------------------

* Added an SVG icon for MicroPython actions
* Fixed a regression in 2020.3 that prevented the plugin from updating and persisting
  your device type on changing it in the settings

1.1.2 — 2020-10-24
------------------

* Added a type hinting stub for `pyb`
* Switched to newer terminal API to fix regression in PyCharm 2020.2
* Compatibility with 2020.2-2020.3

1.1.1 — 2020-06-24
------------------

* Fixed control characters in REPL on Windows
* Fixed path separators for flashing directories on Windows

1.1 — 2020-06-07
----------------

* Auto-detect a connected MicroPython device with an option to specify the device path
  manually in the IDE settings for MicroPython
* Use the nearest directory marked "Sources Root" as the root of your device while
  flashing files
* Ignore `.git/`, `.idea/` and other files starting with `.` when flashing a directory
* Launch a run configuration to flash a directory from its context menu
* Compatibility with 2020.1-2020.2

1.0.14 — 2020-01-31
-------------------

* Compatibility with 2019.3-2020.1

1.0.13 — 2019-10-02
-------------------

* Compatibility with 2019.3 only

1.0.12 — 2019-07-23
-------------------

* Compatibility with 2018.3-2019.2

1.0.11 — 2019-02-12
-------------------

* Compatibility with 2018.3-2019.1

1.0.10 — 2018-11-22
-------------------

* Compatibility with 2018.3 only

1.0.9 — 2018-09-10
------------------

* Compatibility with 2018.2-2018.3

1.0.8 — 2018-07-25
------------------

* Compatibility with 2018.2 only

1.0.7 — 2018-06-19
------------------

* Compatibility with 2017.3-2018.2

1.0.6 — 2018-02-23
------------------

* Fixed several bugs in `machine` stub

1.0.5 — 2018-02-11
------------------

* Don't delete `boot.py` when removing all files from the device #35

1.0.4 — 2018-01-18
------------------

* Fixed launching REPL on Windows #12

1.0.3 — 2018-01-16
------------------

* Fixed the outdated pyserial version in requirements #26
* Fixed the error message when getting `EACCESS` error for the device file #27

1.0.2 — 2018-01-15
------------------

* Restored compatibility with IntelliJ

1.0.1 — 2018-01-15
------------------

* Restored compatibility with 2017.2-2018.1

1.0 — 2018-01-15
----------------

* Run files and REPL for ESP8266 and Pyboard devices
* Initial code insight for ESP8266 and MicroPython standard library
* Action for detecting the device path in the MicroPython settings
* Action for removing all files from the device

0.1 — 2017-06-18
----------------

* Code insight and documentation for Micro:bit Python API
* Run Python files on Micro:bit
* Micro:bit Python REPL


text:
import os
import json

if __name__ == "__main__":
    # Iterate over all block devices, but ignore them if they are in the
    # skippable set
    skippable = ("sr", "loop", "ram")
    devices = (device for device in os.listdir("/sys/class/block")
               if not any(ignore in device for ignore in skippable))
    data = [{"{#DEVICENAME}": device} for device in devices]
    print(json.dumps({"data": data}, indent=4))


text:
'use strict';
const path = require('path');
const fs = require('fs');
const appPath = require('app-path');
const plist = require('plist');

let version;

module.exports = () => {
	if (!version) {
		if (process.env.TERM_PROGRAM_VERSION) {
			version = process.env.TERM_PROGRAM_VERSION;
		} else {
			const fp = path.join(appPath.sync('iTerm'), 'Contents/Info.plist');
			version = plist.parse(fs.readFileSync(fp, 'utf8')).CFBundleVersion;
		}
	}

	return version;
};


text:
const parser = require("../main");

describe("constantstatement", () => {
  it("simple", () => {
    expect(
      parser.parseEval('const CONSTANT = "Hello world!";')
    ).toMatchSnapshot();
  });
  it("multiple", () => {
    expect(
      parser.parseEval(
        'const CONSTANT = "Hello world!", OTHER_CONSTANT = "Other hello world!";'
      )
    ).toMatchSnapshot();
  });
});


text:
import os
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "email_checker.settings")
from django.core.wsgi import get_wsgi_application
application = get_wsgi_application()


text:
<?php

namespace Stripe;

class SubscriptionItemTest extends TestCase
{
    public function testCreateUpdateRetrieveListCancel()
    {
        $plan0ID = 'gold-' . self::generateRandomString(20);
        self::retrieveOrCreatePlan($plan0ID);

        $customer = self::createTestCustomer();
        $sub = Subscription::create(array('plan' => $plan0ID, 'customer' => $customer->id));

        $plan1ID = 'gold-' . self::generateRandomString(20);
        self::retrieveOrCreatePlan($plan1ID);

        $subItem = SubscriptionItem::create(array('plan' => $plan1ID, 'subscription' => $sub->id));
        $this->assertSame($subItem->plan->id, $plan1ID);

        $subItem->quantity = 2;
        $subItem->save();

        $subItem = SubscriptionItem::retrieve($subItem->id);
        $this->assertSame($subItem->quantity, 2);

        // Update the quantity parameter one more time
        $subItem = SubscriptionItem::update($subItem->id, array('quantity' => 3));
        $this->assertSame($subItem->quantity, 3);

        $subItems = SubscriptionItem::all(array('subscription'=>$sub->id, 'limit'=>3));
        $this->assertSame(get_class($subItems->data[0]), 'Stripe\SubscriptionItem');
        $this->assertSame(2, count($subItems->data));

        $subItem->delete();
        $this->assertTrue($subItem->deleted);
    }
}


text:
const path = require('path');
const Pact = require('@pact-foundation/pact').Pact;

global.port = 8080;
global.provider = new Pact({
    cors: true,
    port: global.port,
    log: path.resolve(process.cwd(), 'logs', 'pact.log'),
    loglevel: 'debug',
    dir: path.resolve(process.cwd(), 'pacts'),
    spec: 2,
    pactfileWriteMode: 'update',
    consumer: 'graphql-hero-consumer',
    provider: 'graphql-hero-provider',
    host: '127.0.0.1'
});


text:
// Code generated by protoc-gen-go.
// source: google.golang.org/genproto/protobuf/api.proto
// DO NOT EDIT!

/*
Package descriptor is a generated protocol buffer package.

It is generated from these files:
	google.golang.org/genproto/protobuf/api.proto
	google.golang.org/genproto/protobuf/descriptor.proto
	google.golang.org/genproto/protobuf/field_mask.proto
	google.golang.org/genproto/protobuf/source_context.proto
	google.golang.org/genproto/protobuf/type.proto

It has these top-level messages:
	Api
	Method
	Mixin
	FileDescriptorSet
	FileDescriptorProto
	DescriptorProto
	FieldDescriptorProto
	OneofDescriptorProto
	EnumDescriptorProto
	EnumValueDescriptorProto
	ServiceDescriptorProto
	MethodDescriptorProto
	FileOptions
	MessageOptions
	FieldOptions
	OneofOptions
	EnumOptions
	EnumValueOptions
	ServiceOptions
	MethodOptions
	UninterpretedOption
	SourceCodeInfo
	GeneratedCodeInfo
	FieldMask
	SourceContext
	Type
	Field
	Enum
	EnumValue
	Option
*/
package descriptor

import proto "github.com/golang/protobuf/proto"
import fmt "fmt"
import math "math"

// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
var _ = fmt.Errorf
var _ = math.Inf

// This is a compile-time assertion to ensure that this generated file
// is compatible with the proto package it is being compiled against.
// A compilation error at this line likely means your copy of the
// proto package needs to be updated.
const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package

// Api is a light-weight descriptor for a protocol buffer service.
type Api struct {
	// The fully qualified name of this api, including package name
	// followed by the api's simple name.
	Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"`
	// The methods of this api, in unspecified order.
	Methods []*Method `protobuf:"bytes,2,rep,name=methods" json:"methods,omitempty"`
	// Any metadata attached to the API.
	Options []*Option `protobuf:"bytes,3,rep,name=options" json:"options,omitempty"`
	// A version string for this api. If specified, must have the form
	// `major-version.minor-version`, as in `1.10`. If the minor version
	// is omitted, it defaults to zero. If the entire version field is
	// empty, the major version is derived from the package name, as
	// outlined below. If the field is not empty, the version in the
	// package name will be verified to be consistent with what is
	// provided here.
	//
	// The versioning schema uses [semantic
	// versioning](http://semver.org) where the major version number
	// indicates a breaking change and the minor version an additive,
	// non-breaking change. Both version numbers are signals to users
	// what to expect from different versions, and should be carefully
	// chosen based on the product plan.
	//
	// The major version is also reflected in the package name of the
	// API, which must end in `v<major-version>`, as in
	// `google.feature.v1`. For major versions 0 and 1, the suffix can
	// be omitted. Zero major versions must only be used for
	// experimental, none-GA apis.
	//
	//
	Version string `protobuf:"bytes,4,opt,name=version" json:"version,omitempty"`
	// Source context for the protocol buffer service represented by this
	// message.
	SourceContext *SourceContext `protobuf:"bytes,5,opt,name=source_context,json=sourceContext" json:"source_context,omitempty"`
	// Included APIs. See [Mixin][].
	Mixins []*Mixin `protobuf:"bytes,6,rep,name=mixins" json:"mixins,omitempty"`
	// The source syntax of the service.
	Syntax Syntax `protobuf:"varint,7,opt,name=syntax,enum=google.protobuf.Syntax" json:"syntax,omitempty"`
}

func (m *Api) Reset()                    { *m = Api{} }
func (m *Api) String() string            { return proto.CompactTextString(m) }
func (*Api) ProtoMessage()               {}
func (*Api) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{0} }

func (m *Api) GetMethods() []*Method {
	if m != nil {
		return m.Methods
	}
	return nil
}

func (m *Api) GetOptions() []*Option {
	if m != nil {
		return m.Options
	}
	return nil
}

func (m *Api) GetSourceContext() *SourceContext {
	if m != nil {
		return m.SourceContext
	}
	return nil
}

func (m *Api) GetMixins() []*Mixin {
	if m != nil {
		return m.Mixins
	}
	return nil
}

// Method represents a method of an api.
type Method struct {
	// The simple name of this method.
	Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"`
	// A URL of the input message type.
	RequestTypeUrl string `protobuf:"bytes,2,opt,name=request_type_url,json=requestTypeUrl" json:"request_type_url,omitempty"`
	// If true, the request is streamed.
	RequestStreaming bool `protobuf:"varint,3,opt,name=request_streaming,json=requestStreaming" json:"request_streaming,omitempty"`
	// The URL of the output message type.
	ResponseTypeUrl string `protobuf:"bytes,4,opt,name=response_type_url,json=responseTypeUrl" json:"response_type_url,omitempty"`
	// If true, the response is streamed.
	ResponseStreaming bool `protobuf:"varint,5,opt,name=response_streaming,json=responseStreaming" json:"response_streaming,omitempty"`
	// Any metadata attached to the method.
	Options []*Option `protobuf:"bytes,6,rep,name=options" json:"options,omitempty"`
	// The source syntax of this method.
	Syntax Syntax `protobuf:"varint,7,opt,name=syntax,enum=google.protobuf.Syntax" json:"syntax,omitempty"`
}

func (m *Method) Reset()                    { *m = Method{} }
func (m *Method) String() string            { return proto.CompactTextString(m) }
func (*Method) ProtoMessage()               {}
func (*Method) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{1} }

func (m *Method) GetOptions() []*Option {
	if m != nil {
		return m.Options
	}
	return nil
}

// Declares an API to be included in this API. The including API must
// redeclare all the methods from the included API, but documentation
// and options are inherited as follows:
//
// - If after comment and whitespace stripping, the documentation
//   string of the redeclared method is empty, it will be inherited
//   from the original method.
//
// - Each annotation belonging to the service config (http,
//   visibility) which is not set in the redeclared method will be
//   inherited.
//
// - If an http annotation is inherited, the path pattern will be
//   modified as follows. Any version prefix will be replaced by the
//   version of the including API plus the [root][] path if specified.
//
// Example of a simple mixin:
//
//     package google.acl.v1;
//     service AccessControl {
//       // Get the underlying ACL object.
//       rpc GetAcl(GetAclRequest) returns (Acl) {
//         option (google.api.http).get = "/v1/{resource=**}:getAcl";
//       }
//     }
//
//     package google.storage.v2;
//     service Storage {
//       rpc GetAcl(GetAclRequest) returns (Acl);
//
//       // Get a data record.
//       rpc GetData(GetDataRequest) returns (Data) {
//         option (google.api.http).get = "/v2/{resource=**}";
//       }
//     }
//
// Example of a mixin configuration:
//
//     apis:
//     - name: google.storage.v2.Storage
//       mixins:
//       - name: google.acl.v1.AccessControl
//
// The mixin construct implies that all methods in `AccessControl` are
// also declared with same name and request/response types in
// `Storage`. A documentation generator or annotation processor will
// see the effective `Storage.GetAcl` method after inherting
// documentation and annotations as follows:
//
//     service Storage {
//       // Get the underlying ACL object.
//       rpc GetAcl(GetAclRequest) returns (Acl) {
//         option (google.api.http).get = "/v2/{resource=**}:getAcl";
//       }
//       ...
//     }
//
// Note how the version in the path pattern changed from `v1` to `v2`.
//
// If the `root` field in the mixin is specified, it should be a
// relative path under which inherited HTTP paths are placed. Example:
//
//     apis:
//     - name: google.storage.v2.Storage
//       mixins:
//       - name: google.acl.v1.AccessControl
//         root: acls
//
// This implies the following inherited HTTP annotation:
//
//     service Storage {
//       // Get the underlying ACL object.
//       rpc GetAcl(GetAclRequest) returns (Acl) {
//         option (google.api.http).get = "/v2/acls/{resource=**}:getAcl";
//       }
//       ...
//     }
type Mixin struct {
	// The fully qualified name of the API which is included.
	Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"`
	// If non-empty specifies a path under which inherited HTTP paths
	// are rooted.
	Root string `protobuf:"bytes,2,opt,name=root" json:"root,omitempty"`
}

func (m *Mixin) Reset()                    { *m = Mixin{} }
func (m *Mixin) String() string            { return proto.CompactTextString(m) }
func (*Mixin) ProtoMessage()               {}
func (*Mixin) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{2} }

func init() {
	proto.RegisterType((*Api)(nil), "google.protobuf.Api")
	proto.RegisterType((*Method)(nil), "google.protobuf.Method")
	proto.RegisterType((*Mixin)(nil), "google.protobuf.Mixin")
}

func init() { proto.RegisterFile("google.golang.org/genproto/protobuf/api.proto", fileDescriptor0) }

var fileDescriptor0 = []byte{
	// 424 bytes of a gzipped FileDescriptorProto
	0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0x94, 0x52, 0x4f, 0x4f, 0xe2, 0x40,
	0x14, 0x4f, 0x5b, 0x28, 0xec, 0x90, 0x85, 0xdd, 0xd9, 0x64, 0xb7, 0xe1, 0x40, 0x08, 0xa7, 0x66,
	0x37, 0xb4, 0x59, 0xbc, 0x78, 0x15, 0x63, 0x38, 0x10, 0x63, 0x53, 0x34, 0x1e, 0x49, 0xc1, 0xb1,
	0x36, 0x69, 0x67, 0xea, 0xcc, 0x54, 0xe1, 0xdb, 0x18, 0x8f, 0x1e, 0xfd, 0x06, 0x7e, 0x33, 0xa7,
	0xd3, 0x0e, 0x20, 0x60, 0x82, 0x97, 0x66, 0xde, 0xfb, 0xfd, 0x79, 0xf3, 0x7e, 0x53, 0xd0, 0x0f,
	0x09, 0x09, 0x63, 0xe4, 0x84, 0x24, 0x0e, 0x70, 0xe8, 0x10, 0x1a, 0xba, 0x21, 0xc2, 0x29, 0x25,
	0x9c, 0xb8, 0xf2, 0x3b, 0xcb, 0x6e, 0xdd, 0x20, 0x8d, 0x1c, 0x59, 0xc0, 0x56, 0x49, 0x57, 0x50,
	0xfb, 0xf8, 0x10, 0x3d, 0x23, 0x19, 0x9d, 0xa3, 0xe9, 0x9c, 0x60, 0x8e, 0x16, 0xbc, 0x10, 0xb7,
	0x9d, 0x43, 0x94, 0x7c, 0x99, 0x96, 0xc3, 0x7a, 0x6f, 0x3a, 0x30, 0x4e, 0xd2, 0x08, 0x42, 0x50,
	0xc1, 0x41, 0x82, 0x2c, 0xad, 0xab, 0xd9, 0xdf, 0x7c, 0x79, 0x86, 0xff, 0x41, 0x2d, 0x41, 0xfc,
	0x8e, 0xdc, 0x30, 0x4b, 0xef, 0x1a, 0x76, 0x63, 0xf0, 0xc7, 0xd9, 0xba, 0xa8, 0x73, 0x2e, 0x71,
	0x5f, 0xf1, 0x72, 0x09, 0x49, 0x79, 0x44, 0x30, 0xb3, 0x8c, 0x4f, 0x24, 0x17, 0x12, 0xf7, 0x15,
	0x0f, 0x5a, 0xa0, 0xf6, 0x80, 0x28, 0x13, 0x67, 0xab, 0x22, 0x87, 0xab, 0x12, 0x9e, 0x81, 0xe6,
	0xc7, 0x1d, 0xad, 0xaa, 0x20, 0x34, 0x06, 0x9d, 0x1d, 0xcf, 0x89, 0xa4, 0x9d, 0x16, 0x2c, 0xff,
	0x3b, 0xdb, 0x2c, 0xa1, 0x03, 0xcc, 0x24, 0x5a, 0x44, 0xe2, 0x4a, 0xa6, 0xbc, 0xd2, 0xef, 0xdd,
	0x2d, 0x72, 0xd8, 0x2f, 0x59, 0xd0, 0x05, 0x26, 0x5b, 0x62, 0x1e, 0x2c, 0xac, 0x9a, 0x18, 0xd7,
	0xdc, 0xb3, 0xc2, 0x44, 0xc2, 0x7e, 0x49, 0xeb, 0xbd, 0xea, 0xc0, 0x2c, 0x82, 0xd8, 0x1b, 0xa3,
	0x0d, 0x7e, 0x50, 0x74, 0x9f, 0x21, 0xc6, 0xa7, 0x79, 0xf0, 0xd3, 0x8c, 0xc6, 0x22, 0xcf, 0x1c,
	0x6f, 0x96, 0xfd, 0x4b, 0xd1, 0xbe, 0xa2, 0x31, 0xfc, 0x07, 0x7e, 0x2a, 0x26, 0xe3, 0x14, 0x05,
	0x49, 0x84, 0x43, 0x91, 0xa3, 0x66, 0xd7, 0x7d, 0x65, 0x31, 0x51, 0x7d, 0xf8, 0x37, 0x27, 0xb3,
	0x54, 0x44, 0x88, 0xd6, 0xbe, 0x45, 0x82, 0x2d, 0x05, 0x28, 0xe3, 0x3e, 0x80, 0x2b, 0xee, 0xda,
	0xb9, 0x2a, 0x9d, 0x57, 0x2e, 0x6b, 0xeb, 0x8d, 0x57, 0x34, 0x0f, 0x7c, 0xc5, 0x2f, 0x87, 0xe6,
	0x82, 0xaa, 0x8c, 0x7d, 0x6f, 0x64, 0xa2, 0x47, 0x09, 0xe1, 0x65, 0x4c, 0xf2, 0x3c, 0x1c, 0x83,
	0x5f, 0x73, 0x92, 0x6c, 0xdb, 0x0e, 0xeb, 0xe2, 0xef, 0xf5, 0xf2, 0xc2, 0xd3, 0x9e, 0x34, 0xed,
	0x59, 0x37, 0x46, 0xde, 0xf0, 0x45, 0xef, 0x8c, 0x0a, 0x9a, 0xa7, 0xa6, 0x5f, 0xa3, 0x38, 0x1e,
	0x63, 0xf2, 0x88, 0xf3, 0x48, 0xd8, 0xcc, 0x94, 0xfa, 0xa3, 0xf7, 0x00, 0x00, 0x00, 0xff, 0xff,
	0x97, 0x07, 0xcf, 0x1c, 0xa9, 0x03, 0x00, 0x00,
}


text:
/**
 * Created by Administrator on 2016/2/29 0029.
 */
import $ from 'jquery'
import _ from 'lodash'
import './css/ui.css'
class Tree{
    constructor($el,data,options){
        this.$el=$el;
        this.data=data;
        this.options=$.extend({},this._default(),options);
        this.$html=$(this.options.outTemplate);
        this.render();
        this._bindEvent();

        this.options.show||this.closeAll();
    }
    closeAll(){
        this.$html.find('ul.children').hide();
        this.$html.find('li.expandable.open,.center-icon.open').removeClass('open');
    }
    openAll(){
        this.$html.find('ul.children').show();
        this.$html.find('li.expandable,.center-icon').addClass('open');
    }
    render(){
        this.data.forEach((item)=>{
            this._traverse(item,this.$html);
        });
        this.$el.html(this.$html);
        this.options.option.forEach((n,i)=>{
            this.$el.find('.option').append(`<a>${n.text}</a>`).each(function(){
                $(this).children(`a:eq(${i})`).click(function(){
                    var id=$(this).parents('li').attr('id'),
                        type=$(this).parents('li').attr('type');
                    n.callback&&n.callback(id,type);
                })
            });
        });
        return this;
    }
    _traverse(item,$root){
        var $current=$(this._itemTemplate(item));
        $root.append($current);
        if($.isArray(item.last_level)&&item.last_level.length>0){
            item.last_level.forEach((n)=>{
                this._traverse(n,$current.children('ul.children'));
            });
        }
    }
    _bindEvent(){
        //显示隐藏
        this.$el.on('click','li .item-text,li .center-icon',function(e){
            var parent=$(this).parent().parent();
            var children=parent.children('ul.children'),
                icon=parent.children('.node').find('.center-icon,.title-icon');
            if(!parent.is('.expandable')){
                return;
            }
            if(children.is(':visible')){
                icon.removeClass('open');
                parent.removeClass('open');
                children.hide();
            }else{
                icon.addClass('open');
                parent.addClass('open');
                children.show();
            }
        }).on('mouseenter','li .item-text',function(){
            $(this).children('.option').addClass('on');
        }).on('mouseleave','li .item-text',function(){
            $(this).children('.option').removeClass('on');
        });
    }
    _itemTemplate(item){
        return `
0?'expandable':''}">

                        ${item.last_level&&item.last_level.length>0?'':''}

                            ${item.name}

                    ${item.last_level&&item.last_level.length>0?'

':''}

`;
    }
    _default(){
        return {
            show:true,
            option:[],
            outTemplate:'

'
        };
    }
}

$.fn.tree=function(data,options){
    this.each(function(){
        $(this).data('tree',new Tree($(this),data,options));
    });
    return this;
};

export default Tree;


text:
/**
 * Module dependencies.
 */

var Node = require('./node');

/**
 * Initialize a `Literal` node with the given `str.
 *
 * @param {String} str
 * @api public
 */

var Literal = module.exports = function Literal(str) {
  this.str = str;
};

/**
 * Inherit from `Node`.
 */

Literal.prototype = Object.create(Node.prototype);
Literal.prototype.constructor = Literal;
Literal.prototype.constructor.name = 'Literal'; // prevent the minifiers removing this


text:
package org.bgp4j.netty.protocol.update;

import org.bgp4j.netty.protocol.NotificationPacket;

/**
 * @author Rainer Bieniek (Rainer.Bieniek@web.de)
 *
 */
public class AttributeFlagsException extends UpdatePacketException {

	/**
	 *
	 */
	private static final long serialVersionUID = -359375717544249436L;

	private byte[] offendingAttribute;

	/**
	 *
	 */
	public AttributeFlagsException() {
	}

	/**
	 * @param message
	 */
	public AttributeFlagsException(String message) {
		super(message);
	}

	/* (non-Javadoc)
	 * @see org.bgp4j.netty.protocol.ProtocolPacketException#toNotificationPacket()
	 */
	@Override
	public NotificationPacket toNotificationPacket() {
		return new AttributeFlagsNotificationPacket(offendingAttribute);
	}

}


text:
package Prophet::CLI::Command::Aliases;
{
  $Prophet::CLI::Command::Aliases::VERSION = '0.751';
}
use Any::Moose;
use Params::Validate qw/validate/;

extends 'Prophet::CLI::Command::Config';

sub ARG_TRANSLATIONS { shift->SUPER::ARG_TRANSLATIONS(), s => 'show' }

sub usage_msg {
    my $self = shift;
    my $cmd  = $self->cli->get_script_name;

    return <<"END_USAGE";
usage: ${cmd}aliases [show]
       ${cmd}aliases edit [--global|--user]
       ${cmd}alias <alias text> [<text to translate to>]
END_USAGE
}

sub run {
    my $self = shift;

    $self->print_usage if $self->has_arg('h');

    my $config = $self->config;

    my $template = $self->make_template;

    # alias.pull --from http://foo-bar.com/
    # add is the same as set
    if ( $self->context->has_arg('add') && !$self->has_arg('set') ) {
        $self->context->set_arg( 'set', $self->arg('add') );
    }

    if (
        !(
               $self->has_arg('set')
            || $self->has_arg('delete')
            || $self->has_arg('edit')
        )
      )
    {
        print $template. "\n";
        return;
    } else {
        $self->set_arg( 'set', 'alias.' . $self->arg('set') )
          if $self->has_arg('set');
        $self->set_arg( 'delete', 'alias.' . $self->arg('delete') )
          if $self->has_arg('delete');
        $self->SUPER::run(@_);
    }
}

sub make_template {
    my $self = shift;

    my $content = '';

    $content .=
      $self->context->has_arg('edit')
      ? "# Editing aliases in config file "
      . $self->config_filename . "\n\n"
      . "# Format: new_cmd = cmd\n"
      : "Active aliases for the current repository (including user-wide and"
      . " global\naliases if not overridden):\n\n";

    # get aliases from the config file we're going to edit, or all of them if
    # we're just displaying
    my $aliases =
        $self->has_arg('edit')
      ? $self->app_handle->config->aliases( $self->config_filename )
      : $self->app_handle->config->aliases;

    if (%$aliases) {
        for my $key ( keys %$aliases ) {
            $content .= "$key = $aliases->{$key}\n";
        }
    } elsif ( !$self->has_arg('edit') ) {
        $content = "No aliases for the current repository.\n";
    }

    return $content;
}

sub parse_template {
    my $self     = shift;
    my $template = shift;

    my %parsed;
    for my $line ( split( /\n/, $template ) ) {
        if ( $line =~ /^\s*([^#].*?)\s*=\s*(.+?)\s*$/ ) {
            $parsed{$1} = $2;
        }
    }

    return \%parsed;
}

sub process_template {
    my $self = shift;
    my %args = validate( @_, { template => 1, edited => 1, record => 0 } );

    my $updated = $args{edited};
    my ($config) = $self->parse_template($updated);

    my $aliases = $self->app_handle->config->aliases( $self->config_filename );
    my $c       = $self->app_handle->config;

    my @added = grep { !$aliases->{$_} } sort keys %$config;

    my @changed =
      grep { $config->{$_} && $aliases->{$_} ne $config->{$_} }
      sort keys %$aliases;

    my @deleted = grep { !$config->{$_} } sort keys %$aliases;

    # attempt to set all added/changed/deleted aliases at once
    my @to_set = (
        (
            map { { key => "alias.'$_'", value => $config->{$_} } }
              ( @added, @changed )
        ),
        ( map { { key => "alias.'$_'" } } @deleted ),
    );

    eval { $c->group_set( $self->config_filename, \@to_set, ); };

    # if we fail, prompt the user to re-edit
    #
    # one of the few ways to trigger this is to try to create an alias
    # that starts with a [ character
    if ($@) {
        chomp $@;
        my $error = "# Error: '$@'";
        $self->handle_template_errors(
            rtype          => 'aliases',
            template_ref   => $args{template},
            bad_template   => $args{edited},
            errors_pattern => '',
            error          => $error,
            old_errors     => $self->old_errors,
        );
        $self->old_errors($error);
        return 0;
    }

    # otherwise, print out what changed and return happily
    else {
        for my $add (@added) {
            print 'Added alias ' . "'$add' = '$config->{$add}'\n";
        }
        for my $change (@changed) {
            print "Changed alias '$change' from '$aliases->{$change}'"
              . "to '$config->{$change}'\n";
        }
        for my $delete (@deleted) {
            print "Deleted alias '$delete'\n";
        }

        return 1;
    }
}

# override the messages from Config module with messages w/better context for
# Aliases
override delete_usage_msg => sub {
    my $self    = shift;
    my $app_cmd = $self->cli->get_script_name;
    my $cmd     = shift;

    qq{usage: ${app_cmd}${cmd} "alias text"\n};
};

override add_usage_msg => sub {
    my $self    = shift;
    my $app_cmd = $self->cli->get_script_name;
    my ( $cmd, $subcmd ) = @_;

    qq{usage: ${app_cmd}$cmd $subcmd "alias text" "cmd to translate to"\n};
};

__PACKAGE__->meta->make_immutable;
no Any::Moose;

1;

__END__

=pod

=head1 NAME

Prophet::CLI::Command::Aliases

=head1 VERSION

version 0.751

=head1 AUTHORS

=over 4

=item *

Jesse Vincent <jesse@bestpractical.com>

=item *

Chia-Liang Kao <clkao@bestpractical.com>

=item *

Christine Spang <christine@spang.cc>

=back

=head1 COPYRIGHT AND LICENSE

This software is Copyright (c) 2009 by Best Practical Solutions.

This is free software, licensed under:

  The MIT (X11) License

=head1 BUGS AND LIMITATIONS

You can make new bug reports, and view existing ones, through the
web interface at L<https://rt.cpan.org/Public/Dist/Display.html?Name=Prophet>.

=head1 CONTRIBUTORS

=over 4

=item *

Alex Vandiver <alexmv@bestpractical.com>

=item *

Casey West <casey@geeknest.com>

=item *

Cyril Brulebois <kibi@debian.org>

=item *

Florian Ragwitz <rafl@debian.org>

=item *

Ioan Rogers <ioanr@cpan.org>

=item *

Jonas Smedegaard <dr@jones.dk>

=item *

Kevin Falcone <falcone@bestpractical.com>

=item *

Lance Wicks <lw@judocoach.com>

=item *

Nelson Elhage <nelhage@mit.edu>

=item *

Pedro Melo <melo@simplicidade.org>

=item *

Rob Hoelz <rob@hoelz.ro>

=item *

Ruslan Zakirov <ruz@bestpractical.com>

=item *

Shawn M Moore <sartak@bestpractical.com>

=item *

Simon Wistow <simon@thegestalt.org>

=item *

Stephane Alnet <stephane@shimaore.net>

=item *

Unknown user <nobody@localhost>

=item *

Yanick Champoux <yanick@babyl.dyndns.org>

=item *

franck cuny <franck@lumberjaph.net>

=item *

robertkrimen <robertkrimen@gmail.com>

=item *

sunnavy <sunnavy@bestpractical.com>

=back

=cut


text:
package org.apache.ignite.internal.processors.cache;

import org.apache.ignite.cache.affinity.*;
import org.apache.ignite.internal.*;
import org.apache.ignite.internal.processors.cacheobject.*;

import java.util.*;

/**
 *
 */
public class CacheObjectContext {
    /** */
    private GridKernalContext kernalCtx;

    /** */
    private IgniteCacheObjectProcessor proc;

    /** */
    private AffinityKeyMapper dfltAffMapper;

    /** */
    private boolean cpyOnGet;

    /** */
    private boolean unmarshalVals;

    /** */
    private boolean p2pEnabled;

    /**
     * @param kernalCtx Kernal context.
     * @param dfltAffMapper Default affinity mapper.
     * @param cpyOnGet Copy on get flag.
     * @param unmarshalVals Unmarshal values flag.
     */
    public CacheObjectContext(GridKernalContext kernalCtx,
        AffinityKeyMapper dfltAffMapper,
        boolean cpyOnGet,
        boolean unmarshalVals) {
        this.kernalCtx = kernalCtx;
        this.p2pEnabled = kernalCtx.config().isPeerClassLoadingEnabled();
        this.dfltAffMapper = dfltAffMapper;
        this.cpyOnGet = cpyOnGet;
        this.unmarshalVals = unmarshalVals;

        proc = kernalCtx.cacheObjects();
    }

    /**
     * @return {@code True} if peer class loading is enabled.
     */
    public boolean p2pEnabled() {
        return p2pEnabled;
    }

    /**
     * @return Copy on get flag.
     */
    public boolean copyOnGet() {
        return cpyOnGet;
    }

    /**
     * @return Unmarshal values flag.
     */
    public boolean unmarshalValues() {
        return unmarshalVals;
    }

    /**
     * @return Default affinity mapper.
     */
    public AffinityKeyMapper defaultAffMapper() {
        return dfltAffMapper;
    }

    /**
     * @return Kernal context.
     */
    public GridKernalContext kernalContext() {
        return kernalCtx;
    }

    /**
     * @return Processor.
     */
    public IgniteCacheObjectProcessor processor() {
        return proc;
    }

    /**
     * Unwraps object.
     *
     * @param o Object to unwrap.
     * @param keepPortable Keep portable flag.
     * @return Unwrapped object.
     */
    public Object unwrapPortableIfNeeded(Object o, boolean keepPortable) {
        return o;
    }

    /**
     * Unwraps collection.
     *
     * @param col Collection to unwrap.
     * @param keepPortable Keep portable flag.
     * @return Unwrapped collection.
     */
    public Collection<Object> unwrapPortablesIfNeeded(Collection<Object> col, boolean keepPortable) {
        return col;
    }
}


text:
class CQPoint2DEdit : public QFrame {
  Q_OBJECT

  Q_PROPERTY(bool spin     READ isSpin   WRITE setSpin    )
  Q_PROPERTY(int  decimals READ decimals WRITE setDecimals)

 public:
  CQPoint2DEdit(QWidget *parent, const CPoint2D &value=CPoint2D(0, 0), bool spin=false);
  CQPoint2DEdit(const CPoint2D &value=CPoint2D(0, 0), bool spin=false);

  CQPoint2DEdit(QWidget *parent, const QPointF &value, bool spin=false);
  CQPoint2DEdit(const QPointF &value, bool spin=false);

  virtual ~CQPoint2DEdit() { }

  bool isSpin() const { return spin_; }
  void setSpin(bool b);

  int decimals() const { return decimals_; }
  void setDecimals(int i);

  void setValue(const CPoint2D &point);
  void setValue(const QPointF &point);

  void setMinimum(const CPoint2D &point);
  void setMaximum(const CPoint2D &point);
  void setStep(const CPoint2D &point);

  const CPoint2D &getValue() const;
  QPointF getQValue() const;

 private:
  void init(const CPoint2D &value);

 private slots:
  void editingFinishedI();

 signals:
  void valueChanged();

 private:
  void updateRange();

  void pointToWidget();
  void widgetToPoint();

 private:
  CPoint2D          point_          { 0, 0 };
  bool              spin_           { false };
  CPoint2D          min_            { -1E50, -1E50 };
  CPoint2D          max_            { 1E50, 1E50 };
  CPoint2D          step_           { 1, 1 };
  int               decimals_       { 3 };
  QDoubleValidator *x_validator_    { nullptr };
  QDoubleValidator *y_validator_    { nullptr };
  QLineEdit        *x_edit_         { nullptr };
  QLineEdit        *y_edit_         { nullptr };
  QDoubleSpinBox   *x_spin_         { nullptr };
  QDoubleSpinBox   *y_spin_         { nullptr };
  QHBoxLayout      *layout_         { nullptr };
  mutable bool      disableSignals_ { false };
};

#endif


text:
AR = ar
ARFLAGS = -rv
###############################

# Points to the root of Google Test, relative to where this file is.
# Remember to tweak this if you move this file.
GTEST_DIR = ..

# Where to find user code.
USER_DIR = ../samples

# Flags passed to the preprocessor.
# Set Google Test's header directory as a system directory, such that
# the compiler doesn't generate warnings in Google Test headers.
CPPFLAGS += -isystem $(GTEST_DIR)/include

# Flags passed to the C++ compiler.
CXXFLAGS += -g -Wall -Wextra -pthread

# All tests produced by this Makefile.  Remember to add new tests you
# created to the list.
TESTS = sample9_unittest

# All Google Test headers.  Usually you shouldn't change this
# definition.
GTEST_HEADERS = $(GTEST_DIR)/include/gtest/*.h \
                $(GTEST_DIR)/include/gtest/internal/*.h

# House-keeping build targets.

all : $(TESTS)

clean :
	rm -f $(TESTS) gtest.a gtest_main.a *.o

# Builds gtest.a and gtest_main.a.

# Usually you shouldn't tweak such internal variables, indicated by a
# trailing _.
GTEST_SRCS_ = $(GTEST_DIR)/src/*.cc $(GTEST_DIR)/src/*.h $(GTEST_HEADERS)

# For simplicity and to avoid depending on Google Test's
# implementation details, the dependencies specified below are
# conservative and not optimized.  This is fine as Google Test
# compiles fast and for ordinary users its source rarely changes.
gtest-all.o : $(GTEST_SRCS_)
	$(CXX) $(CPPFLAGS) -I$(GTEST_DIR) $(CXXFLAGS) -c \
            $(GTEST_DIR)/src/gtest-all.cc

gtest_main.o : $(GTEST_SRCS_)
	$(CXX) $(CPPFLAGS) -I$(GTEST_DIR) $(CXXFLAGS) -c \
            $(GTEST_DIR)/src/gtest_main.cc

gtest.a : gtest-all.o
	$(AR) $(ARFLAGS) $@ $^

gtest_main.a : gtest-all.o gtest_main.o
	$(AR) $(ARFLAGS) $@ $^

# Builds a sample test.  A test should link with either gtest.a or
# gtest_main.a, depending on whether it defines its own main()
# function.

#sample9.o : $(USER_DIR)/sample9.cc $(USER_DIR)/sample9.h $(GTEST_HEADERS)
#	$(CXX) $(CPPFLAGS) $(CXXFLAGS) -c $(USER_DIR)/sample9.cc

sample9_unittest.o : $(USER_DIR)/sample9_unittest.cc \
                     $(GTEST_HEADERS)
	$(CXX) $(CPPFLAGS) $(CXXFLAGS) -c $(USER_DIR)/sample9_unittest.cc

sample9_unittest :  sample9_unittest.o gtest_main.a
	$(CXX) $(CPPFLAGS) $(CXXFLAGS) -lpthread $^ -o $@


text:
package com.example.override_generics;

import java.util.ArrayList;
import javax.annotation.Nullable;

abstract class MyArezReactComponent
  extends ArezReactComponent<ArrayList<?>>
{
  @Override
  protected void reportPropsChanged( @Nullable final ArrayList<?> nextProps )
  {
  }
}