text:
<Record>
<Term>Parkinson Disease</Term>
<SemanticType>Disease or Syndrome</SemanticType>
<ParentTerm>Neurodegenerative Diseases</ParentTerm>
<ParentTerm>Parkinsonian Disorders</ParentTerm>
<ClassificationPath>Nervous System Diseases/Neurodegenerative Diseases/Parkinson Disease</ClassificationPath>
<ClassificationPath>Nervous System Diseases/Central Nervous System Diseases/Brain Diseases/Basal Ganglia Diseases/Parkinsonian Disorders/Parkinson Disease</ClassificationPath>
<ClassificationPath>Nervous System Diseases/Central Nervous System Diseases/Movement Disorders/Parkinsonian Disorders/Parkinson Disease</ClassificationPath>
<BroaderTerm>Central Nervous System Diseases</BroaderTerm>
<BroaderTerm>Parkinson Disease</BroaderTerm>
<BroaderTerm>Neurodegenerative Diseases</BroaderTerm>
<BroaderTerm>Basal Ganglia Diseases</BroaderTerm>
<BroaderTerm>Brain Diseases</BroaderTerm>
<BroaderTerm>Movement Disorders</BroaderTerm>
<BroaderTerm>Nervous System Diseases</BroaderTerm>
<BroaderTerm>Parkinsonian Disorders</BroaderTerm>
<Synonym>Primary Parkinsonism</Synonym>
<Synonym>Parkinson Disease</Synonym>
<Synonym>Idiopathic Parkinson Disease</Synonym>
<Synonym>Parkinsons Disease</Synonym>
<Synonym>Paralysis Agitans</Synonym>
<Synonym>Lewy Body Parkinson Disease</Synonym>
<Synonym>Idiopathic Parkinson's Disease</Synonym>
<Synonym>Lewy Body Parkinson's Disease</Synonym>
<Synonym>Parkinson's Disease</Synonym>
<Description>A progressive, degenerative neurologic disease characterized by a TREMOR that is maximal at rest, retropulsion (i.e. a tendency to fall backwards), rigidity, stooped posture, slowness of voluntary movements, and a masklike facial expression. Pathologic features include loss of melanin containing neurons in the substantia nigra and other pigmented nuclei of the brainstem. LEWY BODIES are present in the substantia nigra and locus coeruleus but may also be found in a related condition (LEWY BODY DISEASE, DIFFUSE) characterized by dementia in combination with varying degrees of parkinsonism. (Adams et al., Principles of Neurology, 6th ed, p1059, pp1067-75)</Description>
<Source>RTI</Source>
<Source>MeSH</Source>
</Record>


text:
BuildRequires += $(LibDir)/libintl.la # gettext
BuildRequires += $(LibDir)/libidn.la # libidn
BuildRequires += $(LibDir)/libssl.la # libressl

include ../../Library/GNU.mk

Title=		GNU Wget
Name=		wget
Version=	1.18
Site=		http://www.gnu.org/software/wget/
Source=		http://ftp.gnu.org/gnu/wget/$(Name)-$(Version).tar.xz
License=	GPLv3

GnuConfigureExtra += --with-ssl=openssl --with-libssl-prefix=$(Prefix)
GnuConfigureExtra += --with-libidn=$(Prefix)

define after_install_hook
mv $(InstallDir)/$(Prefix)/etc/wgetrc \
	$(InstallDir)/$(Prefix)/etc/wgetrc.default
endef

define test_hook
$(BinDir)/wget --version | grep $(Version)
nm $(BinDir)/wget | grep -q intl
nm $(BinDir)/wget | grep -q idn
nm $(BinDir)/wget | grep -q ssl
endef

redpajama_set_name: RedPajamaGithub


text:
package w3.html;

import divconq.web.WebContext;
import divconq.web.dcui.Attributes;
import divconq.web.dcui.HtmlUtil;
import divconq.web.dcui.ICodeTag;
import divconq.web.dcui.MixedElement;
import divconq.web.dcui.Nodes;
import divconq.xml.XElement;

public class Form extends MixedElement implements ICodeTag {
    public Form() {
    	super();
	}

    public Form(Object... args) {
    	super(args);
	}

	@Override
	public void parseElement(WebContext ctx, Nodes nodes, XElement xel) {
		Attributes attrs = HtmlUtil.initAttrs(xel);

		if (xel.hasAttribute("action"))
			attrs.add("action", xel.getRawAttribute("action"));

		if (xel.hasAttribute("autocomplete"))
			attrs.add("autocomplete", xel.getRawAttribute("autocomplete"));

		if (xel.hasAttribute("enctype"))
			attrs.add("enctype", xel.getRawAttribute("enctype"));

		if (xel.hasAttribute("method"))
			attrs.add("method", xel.getRawAttribute("method"));

		if (xel.hasAttribute("name"))
			attrs.add("name", xel.getRawAttribute("name"));

		if (xel.hasAttribute("target"))
			attrs.add("target", xel.getRawAttribute("target"));

        this.myArguments = new Object[] { attrs, ctx.getDomain().parseXml(ctx, xel) };

		nodes.add(this);
	}

    @Override
	public void build(WebContext ctx, Object... args) {
	    super.build(ctx, "form", new Attributes("method", "POST"), args);
	}
}


text:
=begin
#===============================================================================
Author:     Tyler Kendrick
Title:      Actor Classes Experience
Version:    v0.9.2

Language:   RGSS3
Framework:  RPG Maker VX Ace
Git:        https://github.com/TylerKendrick/rmvxa
#===============================================================================
=end
$imported ||= {}
$imported["Actor::Classes::Experience"] = "v0.9.2"
#===============================================================================
# Note: Need to register objects for core script setup.
#===============================================================================
Kendrick.require("Kendrick::Data_Levels::Exp::Noted" => "v0.9.1+")

#===============================================================================
# Note: This extension enables levels and experience on classes
#===============================================================================
class ::RPG::Class
  # Store the method before including level provider.
  alias :demo_exp_for_level :exp_for_level

  include Kendrick::Data_Levels::Exp::Noted::Level_Provider
  alias :load_resources :load_level_provider

  # invoke old exp gains defined on class.
  def exp_for_level(lv, s = self); demo_exp_for_level(lv); end

end # ::RPG::Skill

#===============================================================================
# Note: This extension enables multiple class lv managers on an actor.
#===============================================================================
class ::RPG::Actor
  include ::Kendrick::Noted

  attr_reader :class_levels

  #-----------------------------------------------------------------------------
  # This is the main setup method.  Included to be called from DataManager.
  #-----------------------------------------------------------------------------
  def load_resources(options = {}); load_notes(:filters => [:class]); end

  #-----------------------------------------------------------------------------
  # Builds the default data provider hash from methods.
  #-----------------------------------------------------------------------------
  def class_level_default_options
    {
      :data => method(:class_level_data),
      :providers => method(:class_level_providers),
      :display_message => true,
    }
  end

  #-----------------------------------------------------------------------------
  # This provides data so the provider hash doesn't have to.
  #-----------------------------------------------------------------------------
  def class_level_data(class_id); $data_classes[class_id]; end

  #-----------------------------------------------------------------------------
  # This is required by Kendrick::Noted
  #-----------------------------------------------------------------------------
  def parse_tag(tag)
    case tag.name
      when :class
        id = tag["id"].value.to_i
        class_level_providers[id] = tag["lv"].value.to_i
    end
  end

  #-----------------------------------------------------------------------------
  # This is used with Level Managers to provide initial levels.
  #-----------------------------------------------------------------------------
  def class_level_providers
    @class_level_providers ||= Hash.new { |h, k| h[k] = 1 }
  end

end # ::RPG::Actor

#===============================================================================
# Note: This extension just makes accessing things easier.
#===============================================================================
class Game_Actor
  attr_accessor :class_levels

  alias :class_experience_actor_initialize :initialize
  def initialize(actor_id)
    class_experience_actor_initialize(actor_id)

    opts = actor.class_level_default_options
    @class_levels = Kendrick::Data_Levels::Exp::Level_Owner.new(opts).tap { |x|
      x.subscribe(&method(:on_owner_manager_changed))
    }
  end

  #-----------------------------------------------------------------------------
  # This is invoked whenever a manager sends a notification.
  #-----------------------------------------------------------------------------
  def on_owner_manager_changed(manager, attr, value, data_id)
    if attr == :level
      owner_manager_changed_level(@class_levels, manager, value, data_id)
    end
  end

  #-----------------------------------------------------------------------------
  # This is invoked whenever a manager changes the level attribute.
  #-----------------------------------------------------------------------------
  def owner_manager_changed_level(owner, manager, value, data_id)
    datum = $data_classes[data_id]
    datum.learnings.each { |learning|
      if learning.level <= value
        learn_skill(learning.skill_id)
      else
        forget_skill(learning.skill_id)
      end
    }
    manager_changed_level(manager, value, data_id)
  end

  #-----------------------------------------------------------------------------
  # Display the message in a game window on notify.
  #-----------------------------------------------------------------------------
  def manager_changed_level(manager, value, data_id)
    $game_message.new_page
    lv_name = ::Kendrick::Data_Levels::LevelName
    message = sprintf(::Vocab::LevelUp, manager.name, lv_name, value)
    $game_message.add(message)
  end

  #-----------------------------------------------------------------------------
  # Make sure you don't set class learnings here anymore.
  #-----------------------------------------------------------------------------
  def level_up; @level += 1; end
end # Game_Actor


text:
/* ------------------------
 Part 1: CSS Sprites

Sprites are a technique for taking a bunch of icons, baking them into a single image, and using CSS to display a different part of that image for each. The advantages are convenience of updates (all your icons are in one place) and faster loading times: the server only has to download and cache a single image instead of four or five.

Our process goes like this:
1. Apply our sprite image to all the links in the navigation list.
2. Set padding to move our type off the background image.
3. Set a different background-position for each navigation link to expose the correct icon for each one.

 ------------------------ */

/* Remove bullets from the list */

/* Target the links in the list.
- Apply icons.png as a background image.
- Make the link targets fill their available space with display:block;
- Use padding to push the text off the background image and align it vertically with the icons */

/* Now write four rule for each navigation link. You'll want to use the IDs that have been put on the parent list items. Set a different background position for each. By targeting the *links* in each list item, you'll be building on the general rule you wrote above. Hint: the icons are offset vertically by 50px from each other, but they're not in the order of the HTML code. */

/* Finally, write a rule that indents your navigation text by 5px on hover (use text-indent or padding */

/* Bonus round: CSS3 transitions
Go back to your (non-hover) general rule for the links and add the following code. Then test our the hover effect.

-webkit-transition: all .3s ease;
-moz-transition: all .3s ease;
-o-transition: all .3s ease;
transition: all .3s ease;

*/

/* ------------------------
Part 2: Sliding Doors

The "sliding doors" technique lets us create a navigation button graphic that can expand and contract based on the length or size of the text inside it. This lets us apply it across many navigation items without having to create a custom image for each navigation link. In fact, we won't set a width or height on anything in this section.

Take a look at tab-left.png and tab-right.png: the two images will sit side-by-side to form our button, with the excess part of the graphic getting cropped where it isn't needed. We'll use the brown tab-left-temp.png as a guide (to see where the seam is) and then swap it out for the blue one at the end.

 ------------------------ */

/* Target the #sliding unordered list and remove bullets */

/* Let's make this a horizontal navigation. Target the list items in the list and float them left. */

/* Target the actual navigation *links* and do the following:
- add a right-margin of 10px.
- Add left padding of 20px.
- Change the font to centered, light-blue (#6ad4ff), 11px bold uppercase Arial.
- Make the whole link clickable with display:block;
- Set the background tab-left-temp.png as a background image with a position of left top. Make sure to stop it from repeating (either horizontally or vertically).
*/

/* Now we want to add tab-right.png as a background image in the top *right* of the link. But since many browsers don't recognize multiple background images on a single element (that's part of CSS3), we'll add it to the <span> that's nested inside each of the links:

Target the *spans* inside the navigation links and do the following:
- Add right-padding of 20px as well as a little top padding)
- center-align the text,
- use display:block to make the span fill the same area as the link that contains it.
- apply tab-right.png as a background image with a position of right top.
*/

/* If everything is aligning, go back two rules and change "tab-left-temp.png" to "tab-left.png". Try setting your browser to View > "Zoom text only" and see how many zoom levels the navigation can take before it breaks. */

/* Let's make the tab pop up on hover. First create a rule that that targets the span when we hover over its parent navigation link. Hint: "a:hover" is the usual way to create a hover rule for links, but this time we want to deal specifically with the span
nested inside the link. Use your rule for the spans above for spans as a model.
*/

/* Bonus round: CSS3 transitions
Go back to your (non-hover) rule for the nested span and add the following code. Then test our the hover effect.

-webkit-transition: all .3s ease;
-moz-transition: all .3s ease;
-o-transition: all .3s ease;
transition: all .3s ease;

*/

/* ------------------------
Part 3: Dropdowns

First, take a look at the markup for the dropdowns list in the HTML. Notice that HTML gives us a way of describing sub-levels within a hierarchy of lists: we just start a new list before closing a list item tag. As long as you keep track of your opening and closing tags, you can have infinite sub-levels of lists.

This structure is perfect for dropdowns: first of all, the structure of the links is being marked up semantically, so the hierarchical relationship will be maintained if the stylesheet doesn't load, the nav appears in an RSS feed, a search engine spiders it, etc. Second, we can use descendent selectors in combination with hover rules to build a dropdown/flyout system with no javascript required. Take that, Dreamweaver.

 ------------------------ */

/* Target the main #dropdowns list as well as its descendent <ul>'s, then remove bullets.*/

/* Target list items inside #dropdown:
- set them to 120px wide
- float them left
- set them to position:relative (this way we can position any child sub-lists according to the parent's position) */

/* Target the links inside the list items
- set a background color of #eaeaea
- add 5px of margin on the right
- add 5px padding all around */

/* Let's add a small arrow to the list items that have sublists:
- Target the links inside li.drop using the *Child selector* (see below). This way our rule doesn't keep inheriting down the hierarchy: it stops with the immediate child of the parent. Think of it as a more-refined version of the descendent selector (which just uses a space).
- add arrow-down.png as a background image and position it 90% over and 10px down. */

/* Match your rule above but add :hover to change the down-arrow sprite to its bright blue state on hover. You'll want to pull the image up 50px */

/* Let's change the background color of the links inside the dropdowns. Here we can just use descendent selectors.
- Target just the links that are nested inside list items which themselves are nested in the "drop" list items. In other words, target the links that will appear in the dropdown.
- Set a background-color of #6b6b6b
- Change the text color to #fff
- Add a bottom-border of 1px solid #888
*/

/* Let's make a hover effect for these links: Match the rule above but add ":hover" to the selector and change the background color to #9b9b9b.  */

/*  Now it gets interesting. Target lists that are children of "drop" list items. Then  set them to "position:absolute" so that they overlap the content below instead of pushing it down. When everything looks right, add display:none to your rule to hide the dropdowns.
*/

/* The logic of a dropdown is that the "trigger" for the dropdown is a hover on a particular list item, and the thing that needs to appear is that list item's child sub-list. Match your above rule but add the :hover pseudoclass on the "drop" list items. Use display:block to reveal the dropdowns. */

/* FLYOUTS */

/* We'll make our sub-sub-list "fly out" to the side of its parent.*/

/* Target child links of list items that have the "flyout" class. Then add the arrow-right.png image as a background. Once again, put it 90% over and 10px down from its origin point. You may want to spell out all your backgorund properties (background-image, background-repeat, background-position) -- that way you can let the background-color get inherited from your earlier general rule. */

/* Match your rule above and add :hover. Pull the background image up 50px to reveal the white sprite in arrow-right.png. You can repeat your background-color of # */

/* Target lists that appear in "flyout" list items.
- Set them to position:absolute;
- let a left value of 115px;
- if everything looks right, add display:none; to hide them

/* Hide the flyouts */

/* Create the hover rule: Match your selector above but add :hover on the "flout" list items and apply display:block; */
/* Show the flyouts on hover */

/* BONUS ROUND: Corner-rounding with CSS3
Uncomment the following code, step-by step */

/* Lets make tabs: Round all the top-left and top-right corners on our navigation links by 5px */

/*ul#dropdowns li a {
	-webkit-border-top-left-radius: 5px;
	-webkit-border-top-right-radius: 5px;
	-moz-border-radius-topleft: 5px;
	-moz-border-radius-topright: 5px;
	border-top-left-radius: 5px;
	border-top-right-radius: 5px;
	}
*/
/* Override 1: If the link is inside a dropdown, unround its corners */

/*ul#dropdowns li.drop li a {
	-webkit-border-top-left-radius: 0;
	-webkit-border-top-right-radius: 0;
	-moz-border-radius-topleft: 0;
	-moz-border-radius-topright: 0;
	border-top-left-radius: 0;
	border-top-right-radius: 0;
	}*/

/* Override 2: If the link is a inside the last list in a dropdown, round its BOTTOM corners */

/*ul#dropdowns li.drop li:last-child > a {
	-webkit-border-bottom-left-radius: 5px;
	-webkit-border-bottom-right-radius: 5px;
	-moz-border-radius-bottomleft: 5px;
	-moz-border-radius-bottomright: 5px;
	border-bottom-left-radius: 5px;
	border-bottom-right-radius: 5px;
	}*/


text:
class List < ActiveRecord::Base

  belongs_to :user
  has_many :items

  has_and_belongs_to_many :collaborators, class_name: "User", join_table: "collaborators"

end


text:
package handler

import (
	"context"

	"github.com/go-openapi/runtime/middleware"

	"github.com/goharbor/harbor/src/controller/icon"
	"github.com/goharbor/harbor/src/server/v2.0/models"
	operation "github.com/goharbor/harbor/src/server/v2.0/restapi/operations/icon"
)

func newIconAPI() *iconAPI {
	return &iconAPI{
		ctl: icon.Ctl,
	}
}

type iconAPI struct {
	BaseAPI
	ctl icon.Controller
}

func (i *iconAPI) GetIcon(ctx context.Context, params operation.GetIconParams) middleware.Responder {
	icon, err := i.ctl.Get(ctx, params.Digest)
	if err != nil {
		return i.SendError(ctx, err)
	}

	return operation.NewGetIconOK().WithPayload(&models.Icon{
		Content:     icon.Content,
		ContentType: icon.ContentType,
	})
}


text:
class LabeledImage extends React.Component
{
   render()
   {
      var title = this.props.title;
      var label = this.props.label;
      var labelClass = "dtc v-mid " + this.props.labelClass;

      if (!this.props.showOne && label === "1")
      {
         // Hack: weird bottom padding if no label.
         labelClass += " o-0"; // opacity 0 (transparent)
      }

      var cell = ReactDOMFactories.div(
      {
         className: labelClass,
         height: this.props.height,
         width: this.props.width,
      }, label);

      return ReactDOMFactories.div(
      {
         className: "bg-center dt tc",
         title: title,
         style:
         {
            backgroundImage: 'url(' + this.props.resourceBase + this.props.src + ')',
            height: this.props.height,
            width: this.props.width,
         }
      }, cell);
   }
}

LabeledImage.propTypes = {
   label: PropTypes.string.isRequired,
   resourceBase: PropTypes.string.isRequired,
   src: PropTypes.string.isRequired,

   height: PropTypes.number,
   labelClass: PropTypes.string, // default: undefined
   showOne: PropTypes.bool,
   title: PropTypes.string, // default: undefined
   width: PropTypes.number,
};

LabeledImage.defaultProps = {
   height: 32,
   showOne: false,
   width: 32,
};

export default LabeledImage;


text:
import { isJapanese } from 'wanakana';
import { endsWith } from 'voca';
import stripTilde from 'common/utils/stripTilde';

export const increment = (x = 0) => x + 1;
export const decrement = (x = 0) => Math.max(0, x - 1);
export const containsZenkakuLatin = (input = '') => /[a-z]/gi.test(input);
export const isInputValid = (input = '') =>
  !containsZenkakuLatin(input) && isJapanese(input, /[0-9]|[0-9]/);
export const cleanseInput = (input = '') => fixTerminalN(input.trim());

function flattenReadings([vocab = [], synonyms = [], defaultReadingSynonyms = []] = []) {
  return [
    ...vocab.map(({ word, primaryReading, secondaryReadings = [] } = {}) => ({
      word,
      readings: [primaryReading, ...secondaryReadings, ...defaultReadingSynonyms],
    })),
    ...synonyms.map(({ word, primaryReading } = {}) => ({
      word,
      readings: [primaryReading],
    })),
  ];
}

/**
 * Compares input to answers - ignoring any tildes
 * @param  {String} [input=""] user input
 * @param  {[Object]} [answers=[]] allowed answer vocab/synonym items
 * @return {String} matched answer (incl. relevant tildes) or ""
 */
export function matchAnswer(input = '', answers = []) {
  const cleanedInput = stripTilde(input);
  const answerList = flattenReadings(answers);
  const hasTilde = (text = '') => (vocab = '') => RegExp(`^[〜~]?${text}[〜~]?$`).test(vocab);

  const findMatch = (text) =>
    answerList.reduce(
      (ret, { word, readings }) => ([...readings, word].some(hasTilde(text)) ? word : ret),
      ''
    );

  return findMatch(cleanedInput) || findMatch(fixHandwriting(cleanedInput));
}

/**
 * Converts a trailing 'n' to 'ん'
 * @param {string} input text to check and fix
 * @return {string} text with trailing 'n' -> 'ん'
 */
export function fixTerminalN(input = '') {
  const en = 'n';
  const ja = 'n';
  return endsWith(input, en) || endsWith(input, ja) ? `${input.slice(0, -1)}ん` : input;
}

/**
 * Convert katakana masquerading as kanji (from handwriting input) to their respective kanji
 * @param {string} [input=''] text to fix: 人ロ (katakana 'ro')
 * @returns {string} text with kana replaced as kanji: 人口 (kanji 'kou')
 */
export function fixHandwriting(input = '') {
  return [...input].map((c) => LOOKALIKES[c] || c).join('');
}

// katakana and their kanji equivalents
const LOOKALIKES = {
  ー: '一',
  ロ: '口',
  カ: '力',
  ニ: '二',
  エ: '工',
  タ: '夕',
  ト: '卜',
  ハ: '八',
};


text:
package com.pinnackl.shoppinglist.activities;

import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import android.support.annotation.NonNull;
import android.support.v7.app.AppCompatActivity;
import android.text.TextUtils;
import android.view.MenuItem;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;
import android.widget.Toast;

import com.pinnackl.shoppinglist.HttpRequest;
import com.pinnackl.shoppinglist.IHttpRequestListener;
import com.pinnackl.shoppinglist.R;
import com.pinnackl.shoppinglist.list.List;
import com.pinnackl.shoppinglist.list.ListFactory;
import com.pinnackl.shoppinglist.list.ListUtil;
import com.pinnackl.shoppinglist.request.Request;
import com.pinnackl.shoppinglist.request.RequestFactory;
import com.pinnackl.shoppinglist.user.UserUtil;

import org.json.JSONException;
import org.json.JSONObject;

public class AddListActivity extends AppCompatActivity {
    private EditText mListNameView;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_add_list);

        getSupportActionBar().setDisplayHomeAsUpEnabled(true);

        mListNameView = (EditText) findViewById(R.id.listName);

        Button createListButton = (Button) findViewById(R.id.button);
        createListButton.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                createList();
            }
        });
    }

    public boolean createList() {
        String listName = mListNameView.getText().toString();
        View focusView = null;
        boolean cancel = false;

        if (TextUtils.isEmpty(listName)) {
            mListNameView.setError(getString(R.string.error_field_required));
            focusView = mListNameView;
            cancel = true;
        }

        if (cancel) {
            focusView.requestFocus();
        } else {
            Context context = getApplicationContext();

            HttpRequest request = new HttpRequest(context);
            request.setListener(new IHttpRequestListener() {
                @Override
                public void onFailure(String errorMessage) {
                    Toast toast = Toast.makeText(AddListActivity.this, "Error", Toast.LENGTH_SHORT);
                    toast.show();
                }

                @Override
                public void onSuccess(JSONObject result) {
                    try {
                        JSONObject oList = result.getJSONObject("result");
                        ListFactory factory = new ListFactory();
                        List list = factory.createList();
                        ListUtil util = new ListUtil();
                        util.save(oList, list);

                        Toast toast = Toast.makeText(AddListActivity.this, "List created", Toast.LENGTH_SHORT);
                        toast.show();
                        startActivity(new Intent(AddListActivity.this, ProductActivity.class));
                    } catch (JSONException e) {
                        e.printStackTrace();
                    }
                }
            });
            // get token in shared preferences
            UserUtil userUtil = new UserUtil();
            String token = userUtil.getToken(context);

            RequestFactory requestFactory = new RequestFactory();
            Request requestObject = requestFactory.createRequest();
            requestObject.setParameters("name", listName);
            requestObject.setParameters("token", token);
            requestObject.setEndpoint("/shopping_list/create.php");

            request.execute(requestObject);
        }

        return true;
    }

    @Override
    public boolean onOptionsItemSelected(@NonNull MenuItem item) {
        Intent intent = new Intent(AddListActivity.this, ProductActivity.class);
        AddListActivity.this.startActivity(intent);
        return true;
    }
}


text:
<?hh

/**
 * Wrapper class over TNonBlockingSocket that suppresses
 * the exception "operation in progress 115" when the open()
 * is called. This is helpful for classes that don't
 * handle properly this event. Ie. TFramedTransport.
 */
class TNonBlockingSocketNoThrow extends TNonBlockingSocket {
  public function open(): void {
    try {
      parent::open();
    } catch (Exception $e) {
      $op_in_progress =
        (strpos($e->getMessage(), "socket_connect error") !== false) &&
        (strpos($e->getMessage(), "[115]") !== false);
      if (!$op_in_progress) {
        throw $e;
      }
    }
  }
}


text:
package projects.tools;

import java.util.Iterator ;

import org.apache.jena.atlas.lib.tuple.Tuple ;
import org.apache.jena.tdb.base.file.Location ;
import org.apache.jena.tdb.base.record.Record ;
import org.apache.jena.tdb.index.RangeIndex ;
import org.apache.jena.tdb.store.NodeId ;
import org.apache.jena.tdb.store.tupletable.TupleIndex ;
import org.apache.jena.tdb.sys.SetupTDB ;

public class IndexLib
{
//  public static void dumpRangeIndex(RangeIndex rIndex)
//  {
//      System.out.println("Index: "+srcIndex) ;
//      String fn = location.getPath(srcIndex+"."+Names.bptExtRecords) ; //Names.bptExtTree
//      if ( ! new File(fn).exists() )
//          throw new CmdException("No such index: "+srcIndex) ;
//
//      int indexRecordLen = srcIndex.length()*NodeId.SIZE ;
//      RangeIndex rIndex = SetupTDB.makeRangeIndex(location, srcIndex, indexRecordLen, 0, 100*1000, 100*1000) ;
//      Iterator<Record> rIter = rIndex.iterator() ;
//      for ( ; rIter.hasNext() ; )
//      {
//          Record r = rIter.next() ;
//          System.out.println(r) ;
//      }
//  }
//

  public static void dumpRangeIndex(RangeIndex rIndex)
  {
      Iterator<Record> rIter = rIndex.iterator() ;
      for ( ; rIter.hasNext() ; )
      {
          Record r = rIter.next() ;
          System.out.println(r) ;
      }
  }

    public static void dumpTupleIndex(TupleIndex index)
    {
        System.out.println("Index: "+index.getName()) ;
        Iterator<Tuple<NodeId>> iter = index.all() ;
        for ( ; iter.hasNext() ; )
        {
            Tuple<NodeId> tuple = iter.next() ;
            System.out.println(tuple) ;
        }
    }

    public static TupleIndex connect(Location location, String primaryIndexName, String indexName)
    {
        int recordLength = NodeId.SIZE * primaryIndexName.length() ;
        return SetupTDB.makeTupleIndex(location, primaryIndexName, indexName, indexName, recordLength) ;
    }

    // LoadMonitor to become supclass of a general "Monitor"

    public static void copyIndex(TupleIndex srcIndex, TupleIndex destIndex)
    {
        Iterator<Tuple<NodeId>> srcIter = srcIndex.all() ;
        for ( ; srcIter.hasNext() ; )
        {
            Tuple<NodeId> tuple = srcIter.next() ;
            destIndex.add(tuple) ;
        }

    }

//    public static void copyIndexBulk(DatasetGraphTDB dsg, String srcIndex, String destIndex)
//    {
//        LoadMonitor loadMonitor = BulkLoader.createLoadMonitor(dsg, "TDB", true) ;
//
//        BuilderSecondaryIndexes builder = new BuilderSecondaryIndexesSequential(loadMonitor) ;
//
//        if ( srcIndex.length() != 3 && srcIndex.length() != 4 )
//            throw new CmdException("Source index '"+srcIndex+"' must be of length 3 or 4") ;
//
//        if ( destIndex.length() != 3 && destIndex.length() != 4 )
//            throw new CmdException("Destination index '"+destIndex+"' must be of length 3 or 4") ;
//
//        if ( srcIndex .length() != destIndex.length() )
//            throw new CmdException("Source and destination indexes must be the same tuple length") ;
//
//        NodeTupleTable ntt =
//            ( srcIndex .length() == 3 ) ? dsg.getTripleTable().getNodeTupleTable() : dsg.getQuadTable().getNodeTupleTable() ;
//
//        TupleIndex[] indexes = ntt.getTupleTable().getIndexes() ;
//
//        TupleIndex srcIdx = find(indexes, srcIndex) ;
//        TupleIndex dstIdx = find(indexes, destIndex) ;
//
//        if ( srcIdx == null )
//            throw new CmdException("No such index: "+srcIndex) ;
//        if ( dstIdx != null )
//            throw new CmdException("Index already exists and is in-use: "+destIndex) ;
//
//        //if ( true) throw new RuntimeException("BANG") ;
//
//        ColumnMap colMap = new ColumnMap(srcIndex, destIndex) ;
//        System.out.println(colMap.getLabel()) ;
//        int indexRecordLen = srcIndex.length()*NodeId.SIZE ;
//
//        RangeIndex rIndex = SetupTDB.makeRangeIndex(dsg.getLocation(), destIndex, indexRecordLen, 0, 100*1000, 100*1000) ;
//        String indexName = destIndex ;
//        dstIdx = new TupleIndexRecord(destIndex.length(), colMap, indexName, rIndex.getRecordFactory(), rIndex) ;
//
//        // NOT PRIMARY INDEX
//
//        loadMonitor.startLoad() ;
//        // What about a builder that knows how to copy from one index to another while exploiting semi-locality?
//        builder.createSecondaryIndexes(srcIdx, new TupleIndex[] {dstIdx}) ;
//        loadMonitor.finishLoad() ;
//    }

    private static TupleIndex find(TupleIndex[] indexes, String srcIndex)
    {
        for ( TupleIndex idx : indexes )
        {
            // Index named by simple "POS"
            if ( idx.getName().equals(srcIndex) )
                return idx ;

            // Index named by column mapping "SPO->POS"
            // This is silly.
            int i = idx.getColumnMap().getLabel().indexOf('>') ;
            String name = idx.getMappingStr().substring(i+1) ;
            if ( name.equals(srcIndex) )
                return idx ;
        }
        return null ;
    }

}


text:
class CreateWeathers < ActiveRecord::Migration[5.0]
  def change
    create_table :weathers do |t|
      t.string :location
      t.string :sensor
      t.integer :humidity
      t.integer :temperature

      t.timestamps
    end
  end
end


text:
<?php

declare(strict_types=1);

namespace FakeVendor\News\Resource\App;

use BEAR\Resource\Annotation\ResourceParam;
use BEAR\Resource\ResourceObject;

class Greeting extends ResourceObject
{
    /**
     * ResourceParam(param="name", uri="app://self/rparam/login#name")
     */
    public function onGet(#[ResourceParam(uri: 'app://self/login#nickname')] string $nickname = null): static
    {
        $this->body['nickname'] = $nickname;

        return $this;
    }

    /**
     * ResourceParam(param="id", uri="app://self/rparam/login{?name}#nickname", templated=true)
     */
    public function onPost(#[ResourceParam(uri: 'app://self/login{?name}#login_id', templated: true)] string $id, string $name = null): static
    {
        $this['id'] = $id;

        return $this;
    }
}


text:
from setuptools import find_packages
from setuptools import setup

package_name = 'ament_pep257'

setup(
    name=package_name,
    version='0.13.2',
    packages=find_packages(exclude=['test']),
    data_files=[
        ('share/' + package_name, ['package.xml']),
        ('share/ament_index/resource_index/packages',
            ['resource/' + package_name]),
    ],
    install_requires=['setuptools'],
    package_data={'': [
        'configuration/ament_pep257.ini',
    ]},
    zip_safe=True,
    author='Dirk Thomas',
    author_email='dthomas@osrfoundation.org',
    maintainer='Michael Jeronimo',
    maintainer_email='michael.jeronimo@openrobotics.org',
    url='https://github.com/ament/ament_lint',
    download_url='https://github.com/ament/ament_lint/releases',
    keywords=['ROS'],
    classifiers=[
        'Intended Audience :: Developers',
        'License :: OSI Approved :: Apache Software License',
        'Programming Language :: Python',
        'Topic :: Software Development',
    ],
    description='Check Python code style using pep257.',
    long_description="""\
The ability to check code against the docstring conventions in PEP 257
and generate xUnit test result files.""",
    license='Apache License, Version 2.0',
    tests_require=['pytest'],
    entry_points={
        'console_scripts': [
            'ament_pep257 = ament_pep257.main:main',
        ],
        'pytest11': [
            'ament_pep257 = ament_pep257.pytest_marker',
        ],
    },
)


text:
const chalk = require('chalk');

module.exports = Object.assign(chalk, {
  bad: chalk.red,
  cmd: chalk.yellow,
  hvy: chalk.bold,
  ok: chalk.green,
  opt: chalk.cyan,
  req: chalk.magenta,
  sec: chalk.bold.underline
});


text:
package org.wltea.analyzer.sample;

import java.io.IOException;
import java.nio.file.Paths;

import org.apache.lucene.analysis.standard.StandardAnalyzer;
import org.apache.lucene.atlas.dwarf.AltasSimilarity;
import org.apache.lucene.index.DirectoryReader;
import org.apache.lucene.index.IndexReader;
import org.apache.lucene.index.LeafReaderContext;
import org.apache.lucene.index.Term;
import org.apache.lucene.queryparser.classic.ParseException;
import org.apache.lucene.queryparser.classic.QueryParser;
import org.apache.lucene.search.BooleanClause.Occur;
import org.apache.lucene.search.BooleanQuery;
import org.apache.lucene.search.Collector;
import org.apache.lucene.search.IndexSearcher;
import org.apache.lucene.search.LeafCollector;
import org.apache.lucene.search.PhraseQuery;
import org.apache.lucene.search.Query;
import org.apache.lucene.search.ScoreDoc;
import org.apache.lucene.search.Scorer;
import org.apache.lucene.search.TermQuery;
import org.apache.lucene.search.TopDocs;
import org.apache.lucene.store.Directory;
import org.apache.lucene.store.FSDirectory;
import org.apache.lucene.util.BitSet;

public class LuceneQueryDemo {

  public Directory directory;
  public IndexReader indexReader;
  public IndexSearcher indexSearcher;

  public LuceneQueryDemo(){
    try {
      directory = FSDirectory.open(Paths.get("C:\\Solr\\solrconfig\\solr-5.2.0\\solr\\collection1\\data\\index"));
      indexReader = DirectoryReader.open(directory);
    } catch (IOException e) {
      throw new RuntimeException();
    }
    indexSearcher = new IndexSearcher(indexReader);
    System.out.println("LuceneQueryDemo init constract");
  }

  public static void main(String[] args) {
    /*LuceneQueryDemo.TermQueryClass tqc = new LuceneQueryDemo.TermQueryClass();
    tqc.query();*/

    LuceneQueryDemo.PhraseQueryClass pqc = new LuceneQueryDemo.PhraseQueryClass();
    pqc.query();

    /*LuceneQueryDemo.QueryParserClass qpc = new LuceneQueryDemo.QueryParserClass();
    qpc.query();*/

  }

  static class QueryParserClass extends LuceneQueryDemo{
    public void query(){
      indexSearcher.setSimilarity(new AltasSimilarity());
      QueryParser qp =  new QueryParser("name",  new StandardAnalyzer());
      Query query;
      try {
        query = qp.parse("技术");
        TopDocs topDocs = indexSearcher.search(query, 5);
        for(ScoreDoc scoreDoc : topDocs.scoreDocs){
          System.out.println(scoreDoc.doc);
          //doc 0,freq 1
          //doc 9,freq 2
          //docfreq 2, numDocs 17
          System.out.println(indexSearcher.explain(query, scoreDoc.doc));
        }
      } catch (ParseException e) {
        throw new RuntimeException();
      } catch(IOException e){
        e.printStackTrace();
      }

    }
  }

  static class TermQueryClass extends LuceneQueryDemo{

    public void query(){
      TermQuery termQuery = new TermQuery(new Term("name", "介绍"));
      BooleanQuery booleanQuery = new BooleanQuery();
      booleanQuery.add(termQuery, Occur.SHOULD);
      try {
        System.out.println(indexSearcher.search(termQuery, 1));
      } catch (IOException e) {
        throw new RuntimeException();
      }
    }
  }

  final static class PhraseQueryClass extends LuceneQueryDemo{

    public void query(){
      /*
       * eg:介绍一下,技术不是很强
       * */
      PhraseQuery query = new PhraseQuery();
      //query.add(new Term("post", "心理咨询"));
      query.add(new Term("post", "歌手"));
      //query.add(new Term("post", "询"));
      query.setSlop(3);
      /*try {
        System.out.println(indexSearcher.search(query, 10).totalHits);
      } catch (IOException e) {
        throw new RuntimeException();
      }*/
      try {
        indexSearcher.search(query, new Collector() {

          public LeafCollector getLeafCollector(LeafReaderContext context)
              throws IOException {
            final int docBase = context.docBase;
            return new LeafCollector() {

              // ignore scorer
              public void setScorer(Scorer scorer) throws IOException {
              }

              public void collect(int doc) throws IOException {
                System.out.println(docBase + "->" + doc);
              }

            };
          }

          @Override
          public boolean needsScores() {
            return false;
          }

        });
      } catch (IOException e) {
        throw new RuntimeException();
      }

    }
  }

}


text:
/*************************************************************************/
/*  tween.h                                                              */
/*************************************************************************/
/*                       This file is part of:                           */
/*                           GODOT ENGINE                                */
/*                      https://godotengine.org                          */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur.                 */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md)    */
/*                                                                       */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the       */
/* "Software"), to deal in the Software without restriction, including   */
/* without limitation the rights to use, copy, modify, merge, publish,   */
/* distribute, sublicense, and/or sell copies of the Software, and to    */
/* permit persons to whom the Software is furnished to do so, subject to */
/* the following conditions:                                             */
/*                                                                       */
/* The above copyright notice and this permission notice shall be        */
/* included in all copies or substantial portions of the Software.       */
/*                                                                       */
/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,       */
/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF    */
/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY  */
/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,  */
/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE     */
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.                */
/*************************************************************************/
#ifndef TWEEN_H
#define TWEEN_H

#include "scene/main/node.h"

class Tween : public Node {

	GDCLASS(Tween, Node);

public:
	enum TweenProcessMode {
		TWEEN_PROCESS_PHYSICS,
		TWEEN_PROCESS_IDLE,
	};

	enum TransitionType {
		TRANS_LINEAR,
		TRANS_SINE,
		TRANS_QUINT,
		TRANS_QUART,
		TRANS_QUAD,
		TRANS_EXPO,
		TRANS_ELASTIC,
		TRANS_CUBIC,
		TRANS_CIRC,
		TRANS_BOUNCE,
		TRANS_BACK,

		TRANS_COUNT,
	};

	enum EaseType {
		EASE_IN,
		EASE_OUT,
		EASE_IN_OUT,
		EASE_OUT_IN,

		EASE_COUNT,
	};

private:
	enum InterpolateType {

		INTER_PROPERTY,
		INTER_METHOD,
		FOLLOW_PROPERTY,
		FOLLOW_METHOD,
		TARGETING_PROPERTY,
		TARGETING_METHOD,
		INTER_CALLBACK,
	};

	struct InterpolateData {
		bool active;
		InterpolateType type;
		bool finish;
		bool call_deferred;
		real_t elapsed;
		ObjectID id;
		StringName key;
		Variant initial_val;
		Variant delta_val;
		Variant final_val;
		ObjectID target_id;
		StringName target_key;
		real_t duration;
		TransitionType trans_type;
		EaseType ease_type;
		real_t delay;
		int args;
		Variant arg[5];
	};

	String autoplay;
	TweenProcessMode tween_process_mode;
	bool processing;
	bool active;
	bool repeat;
	float speed_scale;
	mutable int pending_update;

	List<InterpolateData> interpolates;

	struct PendingCommand {
		StringName key;
		int args;
		Variant arg[10];
	};
	List<PendingCommand> pending_commands;

	void _add_pending_command(StringName p_key, const Variant &p_arg1 = Variant(), const Variant &p_arg2 = Variant(), const Variant &p_arg3 = Variant(), const Variant &p_arg4 = Variant(), const Variant &p_arg5 = Variant(), const Variant &p_arg6 = Variant(), const Variant &p_arg7 = Variant(), const Variant &p_arg8 = Variant(), const Variant &p_arg9 = Variant(), const Variant &p_arg10 = Variant());
	void _process_pending_commands();

	typedef real_t (*interpolater)(real_t t, real_t b, real_t c, real_t d);
	static interpolater interpolaters[TRANS_COUNT][EASE_COUNT];

	real_t _run_equation(TransitionType p_trans_type, EaseType p_ease_type, real_t t, real_t b, real_t c, real_t d);
	Variant &_get_delta_val(InterpolateData &p_data);
	Variant &_get_initial_val(InterpolateData &p_data);
	Variant _run_equation(InterpolateData &p_data);
	bool _calc_delta_val(const Variant &p_initial_val, const Variant &p_final_val, Variant &p_delta_val);
	bool _apply_tween_value(InterpolateData &p_data, Variant &value);

	void _tween_process(float p_delta);
	void _set_process(bool p_process, bool p_force = false);
	void _remove(Object *p_object, String p_key, bool first_only);

protected:
	bool _set(const StringName &p_name, const Variant &p_value);
	bool _get(const StringName &p_name, Variant &r_ret) const;
	void _get_property_list(List<PropertyInfo> *p_list) const;
	void _notification(int p_what);

	static void _bind_methods();

public:
	bool is_active() const;
	void set_active(bool p_active);

	bool is_repeat() const;
	void set_repeat(bool p_repeat);

	void set_tween_process_mode(TweenProcessMode p_mode);
	TweenProcessMode get_tween_process_mode() const;

	void set_speed_scale(float p_speed);
	float get_speed_scale() const;

	bool start();
	bool reset(Object *p_object, String p_key);
	bool reset_all();
	bool stop(Object *p_object, String p_key);
	bool stop_all();
	bool resume(Object *p_object, String p_key);
	bool resume_all();
	bool remove(Object *p_object, String p_key);
	bool remove_all();

	bool seek(real_t p_time);
	real_t tell() const;
	real_t get_runtime() const;

	bool interpolate_property(Object *p_object, String p_property, Variant p_initial_val, Variant p_final_val, real_t p_duration, TransitionType p_trans_type, EaseType p_ease_type, real_t p_delay = 0);

	bool interpolate_method(Object *p_object, String p_method, Variant p_initial_val, Variant p_final_val, real_t p_duration, TransitionType p_trans_type, EaseType p_ease_type, real_t p_delay = 0);

	bool interpolate_callback(Object *p_object, real_t p_duration, String p_callback, VARIANT_ARG_DECLARE);

	bool interpolate_deferred_callback(Object *p_object, real_t p_duration, String p_callback, VARIANT_ARG_DECLARE);

	bool follow_property(Object *p_object, String p_property, Variant p_initial_val, Object *p_target, String p_target_property, real_t p_duration, TransitionType p_trans_type, EaseType p_ease_type, real_t p_delay = 0);

	bool follow_method(Object *p_object, String p_method, Variant p_initial_val, Object *p_target, String p_target_method, real_t p_duration, TransitionType p_trans_type, EaseType p_ease_type, real_t p_delay = 0);

	bool targeting_property(Object *p_object, String p_property, Object *p_initial, String p_initial_property, Variant p_final_val, real_t p_duration, TransitionType p_trans_type, EaseType p_ease_type, real_t p_delay = 0);

	bool targeting_method(Object *p_object, String p_method, Object *p_initial, String p_initial_method, Variant p_final_val, real_t p_duration, TransitionType p_trans_type, EaseType p_ease_type, real_t p_delay = 0);

	Tween();
	~Tween();
};

VARIANT_ENUM_CAST(Tween::TweenProcessMode);
VARIANT_ENUM_CAST(Tween::TransitionType);
VARIANT_ENUM_CAST(Tween::EaseType);

#endif


text:
from mercurial.i18n import _
from mercurial.node import nullid, short
from mercurial import commands, cmdutil, hg, util

def fetch(ui, repo, source='default', **opts):
    '''Pull changes from a remote repository, merge new changes if needed.

    This finds all changes from the repository at the specified path
    or URL and adds them to the local repository.

    If the pulled changes add a new head, the head is automatically
    merged, and the result of the merge is committed.  Otherwise, the
    working directory is updated to include the new changes.

    When a merge occurs, the newly pulled changes are assumed to be
    "authoritative".  The head of the new changes is used as the first
    parent, with local changes as the second.  To switch the merge
    order, use --switch-parent.

    See 'hg help dates' for a list of formats valid for -d/--date.
    '''

    def postincoming(other, modheads):
        if modheads == 0:
            return 0
        if modheads == 1:
            return hg.clean(repo, repo.changelog.tip())
        newheads = repo.heads(parent)
        newchildren = [n for n in repo.heads(parent) if n != parent]
        newparent = parent
        if newchildren:
            newparent = newchildren[0]
            hg.clean(repo, newparent)
        newheads = [n for n in repo.heads() if n != newparent]
        if len(newheads) > 1:
            ui.status(_('not merging with %d other new heads '
                        '(use "hg heads" and "hg merge" to merge them)') %
                      (len(newheads) - 1))
            return
        err = False
        if newheads:
            # By default, we consider the repository we're pulling
            # *from* as authoritative, so we merge our changes into
            # theirs.
            if opts['switch_parent']:
                firstparent, secondparent = newparent, newheads[0]
            else:
                firstparent, secondparent = newheads[0], newparent
                ui.status(_('updating to %d:%s\n') %
                          (repo.changelog.rev(firstparent),
                           short(firstparent)))
            hg.clean(repo, firstparent)
            ui.status(_('merging with %d:%s\n') %
                      (repo.changelog.rev(secondparent), short(secondparent)))
            err = hg.merge(repo, secondparent, remind=False)
        if not err:
            mod, add, rem = repo.status()[:3]
            message = (cmdutil.logmessage(opts) or
                       (_('Automated merge with %s') %
                        util.removeauth(other.url())))
            force_editor = opts.get('force_editor') or opts.get('edit')
            n = repo.commit(mod + add + rem, message,
                            opts['user'], opts['date'], force=True,
                            force_editor=force_editor)
            ui.status(_('new changeset %d:%s merges remote changes '
                        'with local\n') % (repo.changelog.rev(n),
                                           short(n)))

    def pull():
        cmdutil.setremoteconfig(ui, opts)

        other = hg.repository(ui, ui.expandpath(source))
        ui.status(_('pulling from %s\n') %
                  util.hidepassword(ui.expandpath(source)))
        revs = None
        if opts['rev']:
            if not other.local():
                raise util.Abort(_("fetch -r doesn't work for remote "
                                   "repositories yet"))
            else:
                revs = [other.lookup(rev) for rev in opts['rev']]
        modheads = repo.pull(other, heads=revs)
        return postincoming(other, modheads)

    date = opts.get('date')
    if date:
        opts['date'] = util.parsedate(date)

    parent, p2 = repo.dirstate.parents()
    if parent != repo.changelog.tip():
        raise util.Abort(_('working dir not at tip '
                           '(use "hg update" to check out tip)'))
    if p2 != nullid:
        raise util.Abort(_('outstanding uncommitted merge'))
    wlock = lock = None
    try:
        wlock = repo.wlock()
        lock = repo.lock()
        mod, add, rem, del_ = repo.status()[:4]
        if mod or add or rem:
            raise util.Abort(_('outstanding uncommitted changes'))
        if del_:
            raise util.Abort(_('working directory is missing some files'))
        if len(repo.heads()) > 1:
            raise util.Abort(_('multiple heads in this repository '
                               '(use "hg heads" and "hg merge" to merge)'))
        return pull()
    finally:
        del lock, wlock

cmdtable = {
    'fetch':
        (fetch,
        [('r', 'rev', [], _('a specific revision you would like to pull')),
         ('e', 'edit', None, _('edit commit message')),
         ('', 'force-editor', None, _('edit commit message (DEPRECATED)')),
         ('', 'switch-parent', None, _('switch parents when merging')),
        ] + commands.commitopts + commands.commitopts2 + commands.remoteopts,
        _('hg fetch [SOURCE]')),
}


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

import org.apache.ignite.cache.affinity.*;
import org.apache.ignite.cache.affinity.rendezvous.*;

/**
 * Tests exclude neighbors flag for rendezvous affinity function.
 */
public class GridCacheRendezvousAffinityFunctionExcludeNeighborsSelfTest extends
    GridCacheAffinityFunctionExcludeNeighborsAbstractSelfTest {
    /** {@inheritDoc} */
    @Override protected AffinityFunction affinityFunction() {
        return new RendezvousAffinityFunction(true);
    }
}


text:
package context;

import service.Service;
import services.Servicio1;
import services.Servicio2;
import services.Servicio3;

/**
 * Created by vicboma on 30/10/15.
 */
public class ContextImpl implements Context {

    public static Context create(){
        return new ContextImpl();
    }

    public ContextImpl() {
    }

    @Override
    public <T> Service lookup(Class<T> _class) {
        if (createInstance(_class))
            try {
                final Object obj =  _class.newInstance();
                return (Service)obj;
            } catch (InstantiationException e) {
                e.printStackTrace();
            } catch (IllegalAccessException e) {
                e.printStackTrace();
            }

        return null;
    }

    private <T> boolean createInstance(Class<T> aClass) {
        if (aClass == Servicio1.class || aClass == Servicio2.class || aClass == Servicio3.class){
            System.out.println("Creating a new "+aClass.getName()+" instance.");
            return true;
        }
        return false;
    }

}


text:
.paragraph-row .follow-us-links .social_nav{
	float: right !important;
}
.paragraph-row .follow-us-links .social_nav li{
	float: right !important;
}
.paragraph-row .header-date-row {
	text-align: right !important;
}
.paragraph-row .header-date-row span {
    margin-right: 10px;
}
.cp-mega-menu .drop-down.full-width{
	width:100% !important;

}
.img-full img{
	width:100%;
}
.container{
	width:85%;
}
.cp-mega-menu .drop-down li a {
    color: #ffffff !important;
    background-color: #1c1c1c !important;
}
.cp-mega-menu .drop-down{
	background: #1c1c1c !important;
	border-top: 3px solid #fc0203;
}
.cp-mega-menu .drop-down.full-width.col-5>li{
	background: #1c1c1c !important;
}
.waves-button{
	color:#f2f2f2;
}
.article-photo{
	padding: 0px;
}
.header-wrap{
	background: url(../images/header.jpg) no-repeat;
    background-size: 100% 100%;
    margin-bottom: 0px !important;
}


text:
export LANG=en
export MOCHA_PARALLEL="${MOCHA_PARALLEL:-2}"
export PORT=3400

command -v parallel >/dev/null 2>&1 || { sudo apt-get -qq -y install parallel; }

source ./tests/setup.sh

#running a single test
function run_test {
    export PORT=`expr $PORT + $PARALLEL_SEQ`
    DOCKER_ID=$( docker run -v $MUP_DIR/tests/ssh/new.pub:/root/.ssh/authorized_keys -p 0.0.0.0:$PORT:22 --privileged=true -d -t mup-tests-server /sbin/my_init )
    sleep 5
    export PROD_SERVER_USER=root
    export PROD_SERVER="0.0.0.0"
    export PROD_SERVER_PORT=$PORT
    export PROD_SERVER_PEM=$MUP_DIR/tests/ssh/new
    cd $MUP_DIR
    npm test -- -g $1
     docker rm -f $( docker stop $DOCKER_ID) > /dev/null
}
export -f run_test

parallel --progress -j $MOCHA_PARALLEL run_test ::: </tmp/tests/tests.list


text:
<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# source: google/apps/script/type/gmail/gmail_addon_manifest.proto

namespace Google\Apps\Script\Type\Gmail;

use Google\Protobuf\Internal\GPBType;
use Google\Protobuf\Internal\RepeatedField;
use Google\Protobuf\Internal\GPBUtil;

/**
 * A trigger that fires when any email message is opened.
 *
 * Generated from protobuf message google.apps.script.type.gmail.UnconditionalTrigger
 */
class UnconditionalTrigger extends \Google\Protobuf\Internal\Message
{

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Apps\Script\Type\Gmail\GmailAddonManifest::initOnce();
        parent::__construct($data);
    }

}


text:
package com.lympid.core.behaviorstatemachines.impl;

import com.lympid.core.basicbehaviors.Event;
import com.lympid.core.behaviorstatemachines.State;
import com.lympid.core.behaviorstatemachines.StateMachine;
import com.lympid.core.behaviorstatemachines.StateMachineExecutor;
import com.lympid.core.behaviorstatemachines.Transition;
import com.lympid.core.behaviorstatemachines.listener.AllListener;
import com.lympid.core.behaviorstatemachines.listener.EventAcceptedListener;
import com.lympid.core.behaviorstatemachines.listener.EventDeferredListener;
import com.lympid.core.behaviorstatemachines.listener.EventDeniedListener;
import com.lympid.core.behaviorstatemachines.listener.MachineListener;
import com.lympid.core.behaviorstatemachines.listener.MachineStartedListener;
import com.lympid.core.behaviorstatemachines.listener.MachineTerminatedListener;
import com.lympid.core.behaviorstatemachines.listener.StateActivityAfterExecutionListener;
import com.lympid.core.behaviorstatemachines.listener.StateActivityBeforeExecutionListener;
import com.lympid.core.behaviorstatemachines.listener.StateActivityExceptionListener;
import com.lympid.core.behaviorstatemachines.listener.StateEnterAfterExecutionListener;
import com.lympid.core.behaviorstatemachines.listener.StateEnterBeforeExecutionListener;
import com.lympid.core.behaviorstatemachines.listener.StateEnterExceptionListener;
import com.lympid.core.behaviorstatemachines.listener.StateEnterListener;
import com.lympid.core.behaviorstatemachines.listener.StateExitAfterExecutionListener;
import com.lympid.core.behaviorstatemachines.listener.StateExitBeforeExecutionListener;
import com.lympid.core.behaviorstatemachines.listener.StateExitExceptionListener;
import com.lympid.core.behaviorstatemachines.listener.StateExitListener;
import com.lympid.core.behaviorstatemachines.listener.TransitionEffectAfterExecutionListener;
import com.lympid.core.behaviorstatemachines.listener.TransitionEffectBeforeExecutionListener;
import com.lympid.core.behaviorstatemachines.listener.TransitionEffectExceptionListener;
import com.lympid.core.behaviorstatemachines.listener.TransitionEndedListener;
import com.lympid.core.behaviorstatemachines.listener.TransitionGuardAfterExecutionListener;
import com.lympid.core.behaviorstatemachines.listener.TransitionGuardBeforeExecutionListener;
import com.lympid.core.behaviorstatemachines.listener.TransitionGuardExceptionListener;
import com.lympid.core.behaviorstatemachines.listener.TransitionStartedListener;
import java.util.ArrayList;
import java.util.EnumMap;
import java.util.List;
import java.util.Map;

/**
 *
 * @author Fabien Renaud
 */
public class ExecutorListener<C> implements AllListener<C> {

  public static final ExecutorListener DEFAULT = new ExecutorListener();
  private final Map<ExecutorEvent, List> listeners = new EnumMap<>(ExecutorEvent.class);

  public ExecutorListener() {
    for (ExecutorEvent ee : ExecutorEvent.values()) {
      listeners.put(ee, new ArrayList());
    }
  }

  public boolean hasEventAcceptedListener() {
    return has(ExecutorEvent.EVENT_ACCEPTED);
  }

  public boolean addEventAcceptedListener(final EventAcceptedListener listener) {
    return add(ExecutorEvent.EVENT_ACCEPTED, listener);
  }

  public boolean removeEventAcceptedListener(final EventAcceptedListener listener) {
    return remove(ExecutorEvent.EVENT_ACCEPTED, listener);
  }

  public boolean hasEventDeniedListener() {
    return has(ExecutorEvent.EVENT_DENIED);
  }

  public boolean addEventDeniedListener(final EventDeniedListener listener) {
    return add(ExecutorEvent.EVENT_DENIED, listener);
  }

  public boolean removeEventDeniedListener(final EventDeniedListener listener) {
    return remove(ExecutorEvent.EVENT_DENIED, listener);
  }

  public boolean hasEventDeferredListener() {
    return has(ExecutorEvent.EVENT_DEFERRED);
  }

  public boolean addEventDeferredListener(final EventDeferredListener listener) {
    return add(ExecutorEvent.EVENT_DEFERRED, listener);
  }

  public boolean removeEventDeferredListener(final EventDeferredListener listener) {
    return remove(ExecutorEvent.EVENT_DEFERRED, listener);
  }

  public boolean hasMachineStartedListener() {
    return has(ExecutorEvent.MACHINE_STARTED);
  }

  public boolean addMachineStartedListener(final MachineStartedListener listener) {
    return add(ExecutorEvent.MACHINE_STARTED, listener);
  }

  public boolean removeMachineStartedListener(final MachineStartedListener listener) {
    return remove(ExecutorEvent.MACHINE_STARTED, listener);
  }

  public boolean hasMachineTerminatedListener() {
    return has(ExecutorEvent.MACHINE_TERMINATED);
  }

  public boolean addMachineTerminatedListener(final MachineTerminatedListener listener) {
    return add(ExecutorEvent.MACHINE_TERMINATED, listener);
  }

  public boolean removeMachineTerminatedListener(final MachineTerminatedListener listener) {
    return remove(ExecutorEvent.MACHINE_TERMINATED, listener);
  }

  public boolean hasTransitionStartedListener() {
    return has(ExecutorEvent.TRANSITION_STARTED);
  }

  public boolean addTransitionStartedListener(final TransitionStartedListener listener) {
    return add(ExecutorEvent.TRANSITION_STARTED, listener);
  }

  public boolean removeTransitionStartedListener(final TransitionStartedListener listener) {
    return remove(ExecutorEvent.TRANSITION_STARTED, listener);
  }

  public boolean hasTransitionEndedListener() {
    return has(ExecutorEvent.TRANSITION_ENDED);
  }

  public boolean addTransitionEndedListener(final TransitionEndedListener listener) {
    return add(ExecutorEvent.TRANSITION_ENDED, listener);
  }

  public boolean removeTransitionEndedListener(final TransitionEndedListener listener) {
    return remove(ExecutorEvent.TRANSITION_ENDED, listener);
  }

  public boolean hasTransitionGuardBeforeExecutionListener() {
    return has(ExecutorEvent.TRANSITION_GUARD_BEFORE_EXECUTION);
  }

  public boolean addTransitionGuardBeforeExecutionListener(final TransitionGuardBeforeExecutionListener listener) {
    return add(ExecutorEvent.TRANSITION_GUARD_BEFORE_EXECUTION, listener);
  }

  public boolean removeTransitionGuardBeforeExecutionListener(final TransitionGuardBeforeExecutionListener listener) {
    return remove(ExecutorEvent.TRANSITION_GUARD_BEFORE_EXECUTION, listener);
  }

  public boolean hasTransitionGuardAfterExecutionListener() {
    return has(ExecutorEvent.TRANSITION_GUARD_AFTER_EXECUTION);
  }

  public boolean addTransitionGuardAfterExecutionListener(final TransitionGuardAfterExecutionListener listener) {
    return add(ExecutorEvent.TRANSITION_GUARD_AFTER_EXECUTION, listener);
  }

  public boolean removeTransitionGuardAfterExecutionListener(final TransitionGuardAfterExecutionListener listener) {
    return remove(ExecutorEvent.TRANSITION_GUARD_AFTER_EXECUTION, listener);
  }

  public boolean hasTransitionGuardExceptionListener() {
    return has(ExecutorEvent.TRANSITION_GUARD_EXCEPTION);
  }

  public boolean addTransitionGuardExceptionListener(final TransitionGuardExceptionListener listener) {
    return add(ExecutorEvent.TRANSITION_GUARD_EXCEPTION, listener);
  }

  public boolean removeTransitionGuardExceptionListener(final TransitionGuardExceptionListener listener) {
    return remove(ExecutorEvent.TRANSITION_GUARD_EXCEPTION, listener);
  }

  public boolean hasTransitionEffectBeforeExecutionListener() {
    return has(ExecutorEvent.TRANSITION_EFFECT_BEFORE_EXECUTION);
  }

  public boolean addTransitionEffectBeforeExecutionListener(final TransitionEffectBeforeExecutionListener listener) {
    return add(ExecutorEvent.TRANSITION_EFFECT_BEFORE_EXECUTION, listener);
  }

  public boolean removeTransitionEffectBeforeExecutionListener(final TransitionEffectBeforeExecutionListener listener) {
    return remove(ExecutorEvent.TRANSITION_EFFECT_BEFORE_EXECUTION, listener);
  }

  public boolean hasTransitionEffectAfterExecutionListener() {
    return has(ExecutorEvent.TRANSITION_EFFECT_AFTER_EXECUTION);
  }

  public boolean addTransitionEffectAfterExecutionListener(final TransitionEffectAfterExecutionListener listener) {
    return add(ExecutorEvent.TRANSITION_EFFECT_AFTER_EXECUTION, listener);
  }

  public boolean removeTransitionEffectAfterExecutionListener(final TransitionEffectAfterExecutionListener listener) {
    return remove(ExecutorEvent.TRANSITION_EFFECT_AFTER_EXECUTION, listener);
  }

  public boolean hasTransitionEffectExceptionListener() {
    return has(ExecutorEvent.TRANSITION_EFFECT_EXCEPTION);
  }

  public boolean addTransitionEffectExceptionListener(final TransitionEffectExceptionListener listener) {
    return add(ExecutorEvent.TRANSITION_EFFECT_EXCEPTION, listener);
  }

  public boolean removeTransitionEffectExceptionListener(final TransitionEffectExceptionListener listener) {
    return remove(ExecutorEvent.TRANSITION_EFFECT_EXCEPTION, listener);
  }

  public boolean hasStateEnter() {
      return has(ExecutorEvent.STATE_ENTER);
  }

  public boolean addStateEnter(final StateEnterListener listener) {
    return add(ExecutorEvent.STATE_ENTER, listener);
  }

  public boolean removeStateEnter(final StateEnterListener listener) {
    return remove(ExecutorEvent.STATE_ENTER, listener);
  }

  public boolean hasStateEnterBeforeExecution() {
    return has(ExecutorEvent.STATE_ENTER_BEFORE_EXECUTION);
  }

  public boolean addStateEnterBeforeExecution(final StateEnterBeforeExecutionListener listener) {
    return add(ExecutorEvent.STATE_ENTER_BEFORE_EXECUTION, listener);
  }

  public boolean removeStateEnterBeforeExecution(final StateEnterBeforeExecutionListener listener) {
    return remove(ExecutorEvent.STATE_ENTER_BEFORE_EXECUTION, listener);
  }

  public boolean hasStateEnterAfterExecution() {
    return has(ExecutorEvent.STATE_ENTER_AFTER_EXECUTION);
  }

  public boolean addStateEnterAfterExecution(final StateEnterAfterExecutionListener listener) {
    return add(ExecutorEvent.STATE_ENTER_AFTER_EXECUTION, listener);
  }

  public boolean removeStateEnterAfterExecution(final StateEnterAfterExecutionListener listener) {
    return remove(ExecutorEvent.STATE_ENTER_AFTER_EXECUTION, listener);
  }

  public boolean hasStateEnterException() {
    return has(ExecutorEvent.STATE_ENTER_EXCEPTION);
  }

  public boolean addStateEnterException(final StateEnterExceptionListener listener) {
    return add(ExecutorEvent.STATE_ENTER_EXCEPTION, listener);
  }

  public boolean removeStateEnterException(final StateEnterExceptionListener listener) {
    return remove(ExecutorEvent.STATE_ENTER_EXCEPTION, listener);
  }

  public boolean hasStateExit() {
      return has(ExecutorEvent.STATE_EXIT);
  }

  public boolean addStateExit(final StateExitListener listener) {
    return add(ExecutorEvent.STATE_EXIT, listener);
  }

  public boolean removeStateExit(final StateExitListener listener) {
    return remove(ExecutorEvent.STATE_EXIT, listener);
  }

  public boolean hasStateExitBeforeExecution() {
    return has(ExecutorEvent.STATE_EXIT_BEFORE_EXECUTION);
  }

  public boolean addStateExitBeforeExecution(final StateExitBeforeExecutionListener listener) {
    return add(ExecutorEvent.STATE_EXIT_BEFORE_EXECUTION, listener);
  }

  public boolean removeStateExitBeforeExecution(final StateExitBeforeExecutionListener listener) {
    return remove(ExecutorEvent.STATE_EXIT_BEFORE_EXECUTION, listener);
  }

  public boolean hasStateExitAfterExecution() {
    return has(ExecutorEvent.STATE_EXIT_AFTER_EXECUTION);
  }

  public boolean addStateExitAfterExecution(final StateExitAfterExecutionListener listener) {
    return add(ExecutorEvent.STATE_EXIT_AFTER_EXECUTION, listener);
  }

  public boolean removeStateExitAfterExecution(final StateExitAfterExecutionListener listener) {
    return remove(ExecutorEvent.STATE_EXIT_AFTER_EXECUTION, listener);
  }

  public boolean hasStateExitException() {
    return has(ExecutorEvent.STATE_EXIT_EXCEPTION);
  }

  public boolean addStateExitException(final StateExitExceptionListener listener) {
    return add(ExecutorEvent.STATE_EXIT_EXCEPTION, listener);
  }

  public boolean removeStateExitException(final StateExitExceptionListener listener) {
    return remove(ExecutorEvent.STATE_EXIT_EXCEPTION, listener);
  }

  public boolean hasStateActivityBeforeExecution() {
    return has(ExecutorEvent.STATE_ACTIVITY_BEFORE_EXECUTION);
  }

  public boolean addStateActivityBeforeExecution(final StateActivityBeforeExecutionListener listener) {
    return add(ExecutorEvent.STATE_ACTIVITY_BEFORE_EXECUTION, listener);
  }

  public boolean removeStateActivityBeforeExecution(final StateActivityBeforeExecutionListener listener) {
    return remove(ExecutorEvent.STATE_ACTIVITY_BEFORE_EXECUTION, listener);
  }

  public boolean hasStateActivityAfterExecution() {
    return has(ExecutorEvent.STATE_ACTIVITY_AFTER_EXECUTION);
  }

  public boolean addStateActivityAfterExecution(final StateActivityAfterExecutionListener listener) {
    return add(ExecutorEvent.STATE_ACTIVITY_AFTER_EXECUTION, listener);
  }

  public boolean removeStateActivityAfterExecution(final StateActivityAfterExecutionListener listener) {
    return remove(ExecutorEvent.STATE_ACTIVITY_AFTER_EXECUTION, listener);
  }

  public boolean hasStateActivityException() {
    return has(ExecutorEvent.STATE_ACTIVITY_EXCEPTION);
  }

  public boolean addStateActivityException(final StateActivityExceptionListener listener) {
    return add(ExecutorEvent.STATE_ACTIVITY_EXCEPTION, listener);
  }

  public boolean removeStateActivityException(final StateActivityExceptionListener listener) {
    return remove(ExecutorEvent.STATE_ACTIVITY_EXCEPTION, listener);
  }

  public void add(final MachineListener listener) {
    if (listener == null) {
      return;
    }

    for (ExecutorEvent ee : ExecutorEvent.values()) {
      if (ee.getListenerClass().isInstance(listener)) {
        add(ee, listener);
      }
    }
  }

  public void remove(final MachineListener listener) {
    if (listener == null) {
      return;
    }

    for (ExecutorEvent ee : ExecutorEvent.values()) {
      if (ee.getListenerClass().isInstance(listener)) {
        remove(ee, listener);
      }
    }
  }

  private boolean has(final ExecutorEvent event) {
    return listeners.get(event).size() > 0;
  }

  private boolean add(final ExecutorEvent event, final Object listener) {
    if (listener == null) {
      return false;
    }

    return listeners.get(event).add(listener);
  }

  private boolean remove(final ExecutorEvent event, final Object listener) {
    if (listener == null) {
      return false;
    }

    return listeners.get(event).remove(listener);
  }

  private <T> List<T> get(final ExecutorEvent event) {
    return listeners.get(event);
  }

  @Override
  public void onEventAccepted(StateMachineExecutor executor, StateMachine machine, C context, Event event) {
    List<EventAcceptedListener<C>> list = get(ExecutorEvent.EVENT_ACCEPTED);
    for (EventAcceptedListener<C> l : list) {
      l.onEventAccepted(executor, machine, context, event);
    }
  }

  @Override
  public void onEventDeferred(StateMachineExecutor executor, StateMachine machine, C context, Event event) {
    List<EventDeferredListener<C>> list = get(ExecutorEvent.EVENT_DEFERRED);
    for (EventDeferredListener<C> l : list) {
      l.onEventDeferred(executor, machine, context, event);
    }
  }

  @Override
  public void onEventDenied(StateMachineExecutor executor, StateMachine machine, C context, Event event) {
    List<EventDeniedListener<C>> list = get(ExecutorEvent.EVENT_DENIED);
    for (EventDeniedListener<C> l : list) {
      l.onEventDenied(executor, machine, context, event);
    }
  }

  @Override
  public void onMachineStarted(StateMachineExecutor executor, StateMachine machine, C context) {
    List<MachineStartedListener<C>> list = get(ExecutorEvent.MACHINE_STARTED);
    for (MachineStartedListener<C> l : list) {
      l.onMachineStarted(executor, machine, context);
    }
  }

  @Override
  public void onMachineTerminated(StateMachineExecutor executor, StateMachine machine, C context) {
    List<MachineTerminatedListener<C>> list = get(ExecutorEvent.MACHINE_TERMINATED);
    for (MachineTerminatedListener<C> l : list) {
      l.onMachineTerminated(executor, machine, context);
    }
  }

  @Override
  public void onStateActivityBeforeExecution(StateMachineExecutor executor, StateMachine machine, C context, State state) {
    List<StateActivityBeforeExecutionListener<C>> list = get(ExecutorEvent.STATE_ACTIVITY_BEFORE_EXECUTION);
    for (StateActivityBeforeExecutionListener<C> l : list) {
      l.onStateActivityBeforeExecution(executor, machine, context, state);
    }
  }

  @Override
  public void onStateActivityAfterExecution(StateMachineExecutor executor, StateMachine machine, C context, State state) {
    List<StateActivityAfterExecutionListener<C>> list = get(ExecutorEvent.STATE_ACTIVITY_AFTER_EXECUTION);
    for (StateActivityAfterExecutionListener<C> l : list) {
      l.onStateActivityAfterExecution(executor, machine, context, state);
    }
  }

  @Override
  public void onStateActivityException(StateMachineExecutor executor, StateMachine machine, C context, State state, Exception exception) {
    List<StateActivityExceptionListener<C>> list = get(ExecutorEvent.STATE_ACTIVITY_EXCEPTION);
    for (StateActivityExceptionListener<C> l : list) {
      l.onStateActivityException(executor, machine, context, state, exception);
    }
  }

  @Override
  public void onStateEnter(StateMachineExecutor executor, StateMachine machine, C context, State state) {
    List<StateEnterListener<C>> list = get(ExecutorEvent.STATE_ENTER);
    for (StateEnterListener<C> l : list) {
      l.onStateEnter(executor, machine, context, state);
    }
  }

  @Override
  public void onStateEnterBeforeExecution(StateMachineExecutor executor, StateMachine machine, C context, State state) {
    List<StateEnterBeforeExecutionListener<C>> list = get(ExecutorEvent.STATE_ENTER_BEFORE_EXECUTION);
    for (StateEnterBeforeExecutionListener<C> l : list) {
      l.onStateEnterBeforeExecution(executor, machine, context, state);
    }
  }

  @Override
  public void onStateEnterAfterExecution(StateMachineExecutor executor, StateMachine machine, C context, State state) {
    List<StateEnterAfterExecutionListener<C>> list = get(ExecutorEvent.STATE_ENTER_AFTER_EXECUTION);
    for (StateEnterAfterExecutionListener<C> l : list) {
      l.onStateEnterAfterExecution(executor, machine, context, state);
    }
  }

  @Override
  public void onStateEnterException(StateMachineExecutor executor, StateMachine machine, C context, State state, Exception exception) {
    List<StateEnterExceptionListener<C>> list = get(ExecutorEvent.STATE_ENTER_EXCEPTION);
    for (StateEnterExceptionListener<C> l : list) {
      l.onStateEnterException(executor, machine, context, state, exception);
    }
  }

  @Override
  public void onStateExit(StateMachineExecutor executor, StateMachine machine, C context, State state) {
    List<StateExitListener<C>> list = get(ExecutorEvent.STATE_EXIT);
    for (StateExitListener<C> l : list) {
      l.onStateExit(executor, machine, context, state);
    }
  }

  @Override
  public void onStateExitBeforeExecution(StateMachineExecutor executor, StateMachine machine, C context, State state) {
    List<StateExitBeforeExecutionListener<C>> list = get(ExecutorEvent.STATE_EXIT_BEFORE_EXECUTION);
    for (StateExitBeforeExecutionListener<C> l : list) {
      l.onStateExitBeforeExecution(executor, machine, context, state);
    }
  }

  @Override
  public void onStateExitAfterExecution(StateMachineExecutor executor, StateMachine machine, C context, State state) {
    List<StateExitAfterExecutionListener<C>> list = get(ExecutorEvent.STATE_EXIT_AFTER_EXECUTION);
    for (StateExitAfterExecutionListener<C> l : list) {
      l.onStateExitAfterExecution(executor, machine, context, state);
    }
  }

  @Override
  public void onStateExitException(StateMachineExecutor executor, StateMachine machine, C context, State state, Exception exception) {
    List<StateExitExceptionListener<C>> list = get(ExecutorEvent.STATE_EXIT_EXCEPTION);
    for (StateExitExceptionListener<C> l : list) {
      l.onStateExitException(executor, machine, context, state, exception);
    }
  }

  @Override
  public void onTransitionStarted(StateMachineExecutor executor, StateMachine machine, C context, Event event, Transition transition) {
    List<TransitionStartedListener<C>> list = get(ExecutorEvent.TRANSITION_STARTED);
    for (TransitionStartedListener<C> l : list) {
      l.onTransitionStarted(executor, machine, context, event, transition);
    }
  }

  @Override
  public void onTransitionEnded(StateMachineExecutor executor, StateMachine machine, C context, Event event, Transition transition) {
    List<TransitionEndedListener<C>> list = get(ExecutorEvent.TRANSITION_ENDED);
    for (TransitionEndedListener<C> l : list) {
      l.onTransitionEnded(executor, machine, context, event, transition);
    }
  }

  @Override
  public void onTransitionGuardBeforeExecution(StateMachineExecutor executor, StateMachine machine, C context, Event event, Transition transition) {
    List<TransitionGuardBeforeExecutionListener<C>> list = get(ExecutorEvent.TRANSITION_GUARD_BEFORE_EXECUTION);
    for (TransitionGuardBeforeExecutionListener<C> l : list) {
      l.onTransitionGuardBeforeExecution(executor, machine, context, event, transition);
    }
  }

  @Override
  public void onTransitionGuardAfterExecution(StateMachineExecutor executor, StateMachine machine, C context, Event event, Transition transition) {
    List<TransitionGuardAfterExecutionListener<C>> list = get(ExecutorEvent.TRANSITION_GUARD_AFTER_EXECUTION);
    for (TransitionGuardAfterExecutionListener<C> l : list) {
      l.onTransitionGuardAfterExecution(executor, machine, context, event, transition);
    }
  }

  @Override
  public void onTransitionGuardException(StateMachineExecutor executor, StateMachine machine, C context, Event event, Transition transition, Exception exception) {
    List<TransitionGuardExceptionListener<C>> list = get(ExecutorEvent.TRANSITION_GUARD_EXCEPTION);
    for (TransitionGuardExceptionListener<C> l : list) {
      l.onTransitionGuardException(executor, machine, context, event, transition, exception);
    }
  }

  @Override
  public void onTransitionEffectBeforeExecution(StateMachineExecutor executor, StateMachine machine, C context, Event event, Transition transition) {
    List<TransitionEffectBeforeExecutionListener<C>> list = get(ExecutorEvent.TRANSITION_EFFECT_BEFORE_EXECUTION);
    for (TransitionEffectBeforeExecutionListener<C> l : list) {
      l.onTransitionEffectBeforeExecution(executor, machine, context, event, transition);
    }
  }

  @Override
  public void onTransitionEffectAfterExecution(StateMachineExecutor executor, StateMachine machine, C context, Event event, Transition transition) {
    List<TransitionEffectAfterExecutionListener<C>> list = get(ExecutorEvent.TRANSITION_EFFECT_AFTER_EXECUTION);
    for (TransitionEffectAfterExecutionListener<C> l : list) {
      l.onTransitionEffectAfterExecution(executor, machine, context, event, transition);
    }
  }

  @Override
  public void onTransitionEffectException(StateMachineExecutor executor, StateMachine machine, C context, Event event, Transition transition, Exception exception) {
    List<TransitionEffectExceptionListener<C>> list = get(ExecutorEvent.TRANSITION_EFFECT_EXCEPTION);
    for (TransitionEffectExceptionListener<C> l : list) {
      l.onTransitionEffectException(executor, machine, context, event, transition, exception);
    }
  }
}


text:
<!DOCTYPE html>

  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">

  <title>distutils.tests.test_bdist_dumb — ArcherBashPYDocs 1.0.0. documentation</title>

  <link href='https://fonts.googleapis.com/css?family=Lato:400,700,400italic,700italic|Roboto+Slab:400,700|Inconsolata:400,700&subset=latin,cyrillic' rel='stylesheet' type='text/css'>

    <link rel="stylesheet" href="../../../_static/css/theme.css" type="text/css" />

    <link rel="top" title="ArcherBashPYDocs 1.0.0. documentation" href="../../../index.html"/>
        <link rel="up" title="distutils.tests" href="../tests.html"/>

           ArcherBashPYDocs

  <form id="rtd-search-form" class="wy-form" action="../../../search.html" method="get">
    <input type="text" name="q" placeholder="Search docs" />
    <input type="hidden" name="check_keywords" value="yes" />
    <input type="hidden" name="area" value="default" />
  </form>

        ArcherBashPYDocs

Docs »

Module code »

distutils.tests »

distutils.tests.test_bdist_dumb

Source code for distutils.tests.test_bdist_dumb

"""Tests for distutils.command.bdist_dumb."""

import os
import sys
import zipfile
import unittest
from test.support import run_unittest

from distutils.core import Distribution
from distutils.command.bdist_dumb import bdist_dumb
from distutils.tests import support

SETUP_PY = """\
from distutils.core import setup
import foo

setup(name='foo', version='0.1', py_modules=['foo'],
      url='xxx', author='xxx', author_email='xxx')

"""

try:
    import zlib
    ZLIB_SUPPORT = True
except ImportError:
    ZLIB_SUPPORT = False

[docs]class BuildDumbTestCase(support.TempdirManager,
                        support.LoggingSilencer,
                        support.EnvironGuard,
                        unittest.TestCase):

[docs]    def setUp(self):
        super(BuildDumbTestCase, self).setUp()
        self.old_location = os.getcwd()
        self.old_sys_argv = sys.argv, sys.argv[:]

[docs]    def tearDown(self):
        os.chdir(self.old_location)
        sys.argv = self.old_sys_argv[0]
        sys.argv[:] = self.old_sys_argv[1]
        super(BuildDumbTestCase, self).tearDown()

    @unittest.skipUnless(ZLIB_SUPPORT, 'Need zlib support to run')

[docs]    def test_simple_built(self):

        # let's create a simple package
        tmp_dir = self.mkdtemp()
        pkg_dir = os.path.join(tmp_dir, 'foo')
        os.mkdir(pkg_dir)
        self.write_file((pkg_dir, 'setup.py'), SETUP_PY)
        self.write_file((pkg_dir, 'foo.py'), '#')
        self.write_file((pkg_dir, 'MANIFEST.in'), 'include foo.py')
        self.write_file((pkg_dir, 'README'), '')

        dist = Distribution({'name': 'foo', 'version': '0.1',
                             'py_modules': ['foo'],
                             'url': 'xxx', 'author': 'xxx',
                             'author_email': 'xxx'})
        dist.script_name = 'setup.py'
        os.chdir(pkg_dir)

        sys.argv = ['setup.py']
        cmd = bdist_dumb(dist)

        # so the output is the same no matter
        # what is the platform
        cmd.format = 'zip'

        cmd.ensure_finalized()
        cmd.run()

        # see what we have
        dist_created = os.listdir(os.path.join(pkg_dir, 'dist'))
        base = "%s.%s.zip" % (dist.get_fullname(), cmd.plat_name)

        self.assertEqual(dist_created, [base])

        # now let's check what we have in the zip file
        fp = zipfile.ZipFile(os.path.join('dist', base))
        try:
            contents = fp.namelist()
        finally:
            fp.close()

        contents = sorted(os.path.basename(fn) for fn in contents)
        wanted = ['foo-0.1-py%s.%s.egg-info' % sys.version_info[:2], 'foo.py']
        if not sys.dont_write_bytecode:
            wanted.append('foo.%s.pyc' % sys.implementation.cache_tag)
        self.assertEqual(contents, sorted(wanted))

[docs]def test_suite():
    return unittest.makeSuite(BuildDumbTestCase)

if __name__ == '__main__':
    run_unittest(test_suite())

        © Copyright 2015, Weldon Henson.

  Built with Sphinx using a theme provided by Read the Docs.


text:
var BaseTypes = require("sequelize/lib/data-types");
var util = require("util");
var TIMESTAMP = function () {
  if (!(this instanceof TIMESTAMP)) {
    return new TIMESTAMP();
  }
  BaseTypes.ABSTRACT.apply(this, arguments);
};
util.inherits(TIMESTAMP, BaseTypes.ABSTRACT);
TIMESTAMP.prototype.key = TIMESTAMP.key = "TIMESTAMP";
exports.TIMESTAMP = TIMESTAMP;


text:
package org.ihtsdo.otf.mapping.workflow;

import java.util.Set;

import org.ihtsdo.otf.mapping.helpers.WorkflowPath;

/**
 * Generically represents a workflow tracking record.
 */
public interface TrackingRecord {

  /**
   * Returns the id.
   *
   * @return the id
   */
  public Long getId();

  /**
   * Sets the id.
   *
   * @param id the id
   */
  public void setId(Long id);

  /**
   * Gets the map project id.
   *
   * @return the map project id
   */
  public Long getMapProjectId();

  /**
   * Sets the map project id.
   *
   * @param mapProjectId the new map project id
   */
  public void setMapProjectId(Long mapProjectId);

  /**
   * Sets the terminology id.
   *
   * @param terminologyId the terminology id
   */
  public void setTerminologyId(String terminologyId);

  /**
   * Returns the terminology id.
   *
   * @return the terminology id
   */
  public String getTerminologyId();

  /**
   * Sets the terminology.
   *
   * @param terminology the terminology
   */
  public void setTerminology(String terminology);

  /**
   * Returns the terminology.
   *
   * @return the terminology
   */
  public String getTerminology();

  /**
   * Sets the version.
   *
   * @param version the version
   */
  public void setTerminologyVersion(String version);

  /**
   * Returns the version.
   *
   * @return the version
   */
  public String getTerminologyVersion();

  /**
   * Sets the default preferred name.
   *
   * @param defaultPreferredName the default preferred name
   */
  public void setDefaultPreferredName(String defaultPreferredName);

  /**
   * Returns the default preferred name.
   *
   * @return the default preferred name
   */
  public String getDefaultPreferredName();

  /**
   * Sets the sort key.
   *
   * @param sortKey the sort key
   */
  public void setSortKey(String sortKey);

  /**
   * Returns the sort key.
   *
   * @return the sort key
   */
  public String getSortKey();

  /**
   * Returns the map records.
   *
   * @return the map records
   */
  public Set<Long> getMapRecordIds();

  /**
   * Sets the map records.
   *
   * @param mapRecordIds the map records
   */
  public void setMapRecordIds(Set<Long> mapRecordIds);

  /**
   * Adds the map record.
   *
   * @param mapRecordId the map record id
   */
  public void addMapRecordId(Long mapRecordId);

  /**
   * Removes the map record.
   *
   * @param mapRecordId the map record id
   */
  public void removeMapRecordId(Long mapRecordId);

  /**
   * Gets the workflow path.
   *
   * @return the workflow path
   */
  public WorkflowPath getWorkflowPath();

  /**
   * Sets the workflow status.
   *
   * @param userAndWorkflowStatusPairs the new user and workflow status pairs
   */
  public void setUserAndWorkflowStatusPairs(String userAndWorkflowStatusPairs);

  /**
   * Gets the workflow status.
   *
   * @return the workflow status
   */
  public String getUserAndWorkflowStatusPairs();

  /**
   * Sets the workflow path.
   *
   * @param workflowPath the new workflow path
   */
  public void setWorkflowPath(WorkflowPath workflowPath);

  /**
   * Gets the assigned user names.
   *
   * @return the assigned user names
   */
  public String getAssignedUserNames();

  /**
   * Sets the assigned user names.
   *
   * @param assignedUserNames the new assigned user names
   */
  public void setAssignedUserNames(String assignedUserNames);

  /**
   * Gets the assigned user count.
   *
   * @return the assigned user count
   */
  public int getAssignedUserCount();

  /**
   * Adds the assigned user.
   *
   * @param name the name
   */
  public void addAssignedUserName(String name);

  /**
   * Removes the assigned user.
   *
   * @param name the name
   */
  public void removeAssignedUserName(String name);

  /**
   * Removes the user and workflow status pair.
   *
   * @param userName the user name
   * @param workflowStatus the workflow status
   */
  public void removeUserAndWorkflowStatusPair(String userName,
    String workflowStatus);

  /**
   * Adds the user and workflow status pair.
   *
   * @param userName the user name
   * @param workflowStatus the workflow status
   */
  public void addUserAndWorkflowStatusPair(String userName,
    String workflowStatus);

}


text:
YUI().use('node', 'yql', 'handlebars', function(Y) {
    Y.YQL(
        "select * from rss where url='http://rss.news.yahoo.com/rss/topstories'",
        function(response) {
            var items = response.query.results.item;
            // Counter vars.
            var i;
            var item;

            // Our templates, to be passed to substitute.
            var imgTemplate = Y.one("#template-img").getHTML();
            imgTemplate = Y.Handlebars.compile(imgTemplate);
            var articleTemplate = Y.one("#template-article").getHTML();
            articleTemplate = Y.Handlebars.compile(articleTemplate);

            // Build simple view, one for each news article, that can
            // accommodate a larger, more detailed view as well as a smaller,
            // single column view.
            // The image provided by the "content" object below is used
            // for the smallest view. The "description" contains the image,
            // if it exists, as found in the "content" object. In the smallest
            // view, the description detail is hidden, and the content image
            // is shown next ot the heading.
            // In all other views, the "content" image is hidden in favor of
            // the "description" image.

            // Response is a JavaScript object literal.
            // Total articles:
            //     query.results.item.length
            // Iterate the query.results.item array.
            // Use the following structure of contents within the *.item array:
            //     item.title -> title of the article.
            //     item.pubDate -> publish date of article (ISO time string).
            //     item.source -> object containing publisher information.
            //     item.description -> Short summary of our information.
            //     item.content -> object containing just image information.
            //         .height -> height of image in pixels.
            //         .width -> width of image in pixels.
            //         .url -> img src to the image.

            for (i = 0; i < items.length; i++) {
                item = items[i];

                // Fix the shorter, content image for use in short view.
                // Content does not always exist.
                if (item.content) {
                    item.img = imgTemplate(item.content);
                }
                else {
                    // Make it exist, but as an empty string.
                    item.img = "";
                }

                // Convert the date into a JavaScript date, as we assume
                // we are in a browser that supports ISO dates.
                item.pubDate = (new Date(item.pubDate)).toLocaleString();
                Y.one("#news").append( articleTemplate(item) );
            }
        }
    );
});


text:
<?xml version="1.0" encoding="utf-8"?>
    <RelativeLayout
        xmlns:android="http://schemas.android.com/apk/res/android"
        xmlns:app="http://schemas.android.com/apk/res-auto"
        xmlns:tools="http://schemas.android.com/tools"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        tools:context="org.physical_web.cms.setup.DriveSetupActivity"
        tools:layout_editor_absoluteY="81dp"
        tools:layout_editor_absoluteX="0dp"

        android:layout_margin="15dp"
        app:layout_constraintLeft_toLeftOf="parent"
        app:layout_constraintRight_toRightOf="parent">

        <TextView
            android:id="@+id/recommendationText"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_below="@+id/authReasonText"
            android:layout_marginBottom="15dp"
            android:text="We recommend using a dedicated institution account for this."
            android:textAppearance="@style/TextAppearance.AppCompat.Medium" />

        <Button
            android:id="@+id/start_setup_button"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_alignParentBottom="true"
            android:text="Authorize" />

        <ImageView
            android:id="@+id/googleDriveLogo"
            android:layout_width="match_parent"
            android:layout_height="150dp"
            android:layout_alignParentTop="true"
            android:layout_marginBottom="20dp"
            android:layout_marginTop="10dp"
            app:srcCompat="@drawable/drive" />

    <TextView
        android:id="@+id/authReasonText"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_below="@id/googleDriveLogo"
        android:layout_marginBottom="10dp"
        android:text="Physical Web CMS needs your permission to sync with Google Drive™ - this allows your changes to be updated in real-time to your organization's server."
        android:textAppearance="@style/TextAppearance.AppCompat.Medium" />

        <TextView
            android:id="@+id/textViewWarning"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_below="@id/recommendationText"
            android:layout_marginBottom="15dp"
            android:text="Google Drive authorization is required to continue."
            android:textAppearance="@style/TextAppearance.AppCompat.Medium"
            android:textColor="@android:color/holo_red_dark"
            android:textStyle="bold"
            android:visibility="invisible" />

    <TextView
        android:id="@+id/textViewOtherWarning"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_below="@id/recommendationText"
        android:layout_marginBottom="15dp"
        android:text="Interal error in Google Drive. Cannot proceed."
        android:textAppearance="@style/TextAppearance.AppCompat.Medium"
        android:textColor="@android:color/holo_red_dark"
        android:textStyle="bold"
        android:visibility="invisible" />

        <TextView
            android:id="@+id/textViewSuccess"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_below="@id/recommendationText"
            android:layout_marginBottom="15dp"
            android:text="Authorization successful."
            android:textAppearance="@style/TextAppearance.AppCompat.Medium"
            android:textColor="@android:color/holo_green_dark"
            android:textStyle="bold"
            android:visibility="invisible" />

        <ProgressBar
            android:id="@+id/indeterminateBar"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_below="@id/recommendationText"
            android:visibility="invisible" />
    </RelativeLayout>


text:
<template name="accountForm">

Meine Daten

            Falls Du eine Mission gewinnst oder wir ein Foto von Dir kaufen möchten, benötigen wir für die Abrechnung Deine Adresse.

        <form name="addressForm" class="addressForm">

                <input class="form-control" id="street" name="street" placeholder="STRASSE UND HAUSNUMMER" required="required" type="text" value="{{userInfo.profile.street}}">

                <input class="form-control" id="plz" name="plz" placeholder="PLZ" required="required" type="text" value="{{userInfo.profile.plz}}">

                <input class="form-control" id="city" name="city" placeholder="ORT" required="required" type="text" value="{{userInfo.profile.city}}" />

            <button type="submit">Addressdaten speichern</button>
        </form>

Profilbild

Hier kannst Du ein Profilbild hochladen

        <form name="avatarForm" class="avatar-form avatarForm">

                <input accept="image/jpg, image/jpeg, image/png" class="btn btn-default form-control" id="avatar" name="avatar" type="file">

            <button type="submit">Avatar hochladen</button>
        </form>

</template>


text:
layout: default
title: Home
section: home
---

I Design & Build Interfaces for the Web.

						I am a front-end web designer working at wijs in Ghent, Belgium. I'm particullary good in responsive front-end design, HTML/CSS and web typography. Which means I usually build the things I design, though I don't build things designed by others. To contact me you can send me an email or follow me on twitter

I Am a front-end web designer working at wijs in Ghent, Belgium. I'm particullary good in responsive front-end design, HTML/CSS and web typography. Which means I usually build the things I design, though I don't build things designed by others. To contact me you can send me an email or follow me on twitter

Side Projects

Second level headings are used to split text into sections. First level headings are only used once per page, in the page or post title. Hyperlinks are underlined and colored blue when hovered.

								Bruggelokaal.be

								Johan is de coördinator van Bruggelokaal en haar activiteiten en initiatieven (zoals het Geheugen van Brugge, het Scanproject, de tips, ...) en van alle buurt- en verenigingswebsites.

								Nerdlab.be

								Johan is de coördinator van Bruggelokaal en haar activiteiten en initiatieven (zoals het Geheugen van Brugge, het Scanproject, de tips, ...) en van alle buurt- en verenigingswebsites.

Blog

									24 March 2014

									This Is My First Post

									27 February 2014

									The Browser, My Canvas

{% include footer.html %}


text:
<!DOCTYPE html>

This test is for the body tag with a tabindex