text:
title: "The Search for Acadia's "Abandoned" Goat Trail"
modified: 2013-10-18
categories: curiosities
gallery:
  - url: images/curiosities/goat2-p180.jpg
    image_path: images/curiosities/goat2-p180.jpg
    alt: "Source: Acadia Trails Treatment Plan, p. 180"
    title: "Source: Acadia Trails Treatment Plan, p. 180"
  - url: images/curiosities/goat2-p203a.jpg
    image_path: images/curiosities/goat2-p203a.jpg
    alt: "Source: Acadia Trails Treatment Plan, p. 203"
    title: "Source: Acadia Trails Treatment Plan, p. 203"
  - url: images/curiosities/goat2-p203b.jpg
    image_path: images/curiosities/goat2-p203b.jpg
    alt: "Source: Acadia Trails Treatment Plan, p. 203"
    title: "Source: Acadia Trails Treatment Plan, p. 203"
gallery2:
  - url: images/curiosities/P1050583cmx.jpg
    image_path: images/curiosities/P1050583cmx.jpg
    alt: "Flagging on a tree along the Jordan Pond Shore Trail helped us find the old Goat Trail."
    title: "Flagging on a tree along the Jordan Pond Shore Trail helped us find the old Goat Trail."
  - url: images/curiosities/P1050589cmx.jpg
    image_path: images/curiosities/P1050589cmx.jpg
    alt: "The old stone steps of the Goat Trail"
    title: "The old stone steps of the Goat Trail"
  - url: images/curiosities/P1050592cmx.jpg
    image_path: images/curiosities/P1050592cmx.jpg
    alt: "Start of Goat Trail from Jordan Pond Shore Trail. Note the flagging on tree."
    title: "Start of Goat Trail from Jordan Pond Shore Trail. Note the flagging on tree."
  - url: images/curiosities/P1050598cmx.jpg
    image_path: images/curiosities/P1050598cmx.jpg
    alt: "First set of stone steps"
    title: "First set of stone steps"
  - url: images/curiosities/P1050603cmx.jpg
    image_path: images/curiosities/P1050603cmx.jpg
    alt: "Rich ascends the Goat Trail steps."
    title: "Rich ascends the Goat Trail steps."
  - url: images/curiosities/P1050616cmx.jpg
    image_path: images/curiosities/P1050616cmx.jpg
    alt: "When we hiked the trail, it was quite well marked."
    title: "When we hiked the trail, it was quite well marked."
  - url: images/curiosities/P1050631cmx.jpg
    image_path: images/curiosities/P1050631cmx.jpg
    alt: "Well-defined steps, and a handrail"
    title: "Well-defined steps, and a handrail"
  - url: images/curiosities/P1050637cmx.jpg
    image_path: images/curiosities/P1050637cmx.jpg
    alt: "Hidden in plain sight along the Park Loop Road!"
    title: "Hidden in plain sight along the Park Loop Road!"
  - url: images/curiosities/P1050646cmx.jpg
    image_path: images/curiosities/P1050646csmx.jpg
    alt: "Stone staircase, with handrail, leading to the Park Loop Road"
    title: "Stone staircase, with handrail, leading to the Park Loop Road"
  - url: images/curiosities/P1050655cmx.jpg
    image_path: images/curiosities/P1050655cmx.jpg
    alt: "The Goat Trail continues on opposite side of the loop road."
    title: "The Goat Trail continues on opposite side of the loop road."
  - url: images/curiosities/P1050661cmx.jpg
    image_path: images/curiosities/P1050661cmx.jpg
    alt: "Iron rungs once gave access to the upper section."
    title: "Iron rungs once gave access to the upper section."
  - url: images/curiosities/P1050664cmx.jpg
    image_path: images/curiosities/P1050664cmx.jpg
    alt: "More evidence of old rungs"
    title: "More evidence of old rungs"
  - url: images/curiosities/P1050673cmx.jpg
    image_path: images/curiosities/P1050673cmx.jpg
    alt: "More evidence of old rungs"
    title: "More evidence of old rungs"
  - url: images/curiosities/P1050685cmx.jpg
    image_path: images/curiosities/P1050685cmx.jpg
    alt: "Some rungs that were not removed"
    title: "Some rungs that were not removed"

---

I have occasionally been asked how I can enjoy returning to the same place, year after year, for vacation. The people who ask me this know I have a more adventurous streak, so I can understand their confusion.  But the more deeply I get to know a place, the more details I uncover that lead to more questions ... and the cycle continues.

Would this be true for any place I visit?  Probably, but I know it's true for Mount Desert Island, Maine.  Every visit has its own unique flavor and adventures, and we never see the same thing twice: not under the same weather conditions, or for the same activities, with the same goals in mind, or with the same quest to learn more about a particular historic building or trail.

Lately we've focused on expanding our knowledge of the island by trying to locate abandoned trails.  The island was literally criss-crossed with hundreds of trails, built and maintained for different purposes over time, many of which have changed course or fallen into disuse.

But surprisingly—in some cases because of the impeccable quality with which they were built, in others because they are currently used and maintained by local "trail phantoms" who wish to keep them alive in some form—many of these trails are still easy to follow and even easy to find, if you have some idea where to look.

## An inkling of a mystery

Rich and I first became aware of the Goat Trail in 2012 from a very brief mention—a footnote, actually—in Tom St. Germain's renowned hiking guide to Acadia, **_A Walk in the Park_**.  On p. 68, St. Germain writes "Now abandoned, the Goat Trail runs up the western side of Pemetic."

The precipitous west face of Pemetic Mountain is a conspicuous blank spot on modern trail maps of the park, and I'd often wondered if there was a feasible way to explore it.  Once I heard about the prior existence of the Goat Trail, I was completely enchanted!  I knew that Rich and I had to find this trail, or whatever might be left of it.

Two invaluable resources for research into the MDI's history are an Olmsted Center report, **_Pathmakers: Cultural Landscape Report for the Historic Hiking Trail System of Mount Desert Island_**, and **_Trails of History_**, another book by Tom St. Germain.

**_Trails of History_** is a thorough and carefully written history of trailbuilding on the island—I typically recommend a cover-to-cover reading for anyone interested in the history of MDI and the park.  But it had little to offer concerning the Goat Trail.

**_Pathmakers_** was a bit more fruitful.  From it we noted the following:

* There is another Goat Trail on Norumbega Mountain (which we already knew, but it bears repeating so we're all clear which trail we're talking about). This is an active, currently maintained trail with no relation to the abandoned Goat Trail.
* The Olmsted Center cataloged the trails with standard numbers for ease of reference and to avoid ambiguity.  The numbering system also encodes some information about the location and management of each trail.  The Goat Trail was given number 444. The fact that the number is in the 400s indicates that the trail is an historic (i.e., not currently maintained) path in the Seal Harbor VIS path district.
* The lower end of the Goat Trail was a habitat for rare plants, in particular wild orchids, and a wide variety of tree specimens.  (I like finding lady's slippers and other orchids in the wild, so this was another incentive.)
* Seal Harbor Path Committee chairman Edward Lothrop Rand noted in 1907 that the popular trail was "an expense out of proportion to its utility." This was a sign that perhaps the trail lacked consistent maintenance and may have been abandoned even longer ago than we had expected.

Goat Trail shown on 1968 map

The most recent map we could find that shows the Goat Trail is the Appalachian Mountain Club map of Mount Desert Island from 1968. We have no maps from the 1970s, and our maps from the late 1980s through the present show no sign of the trail. The trail, according to the 1968 map, began at Jordan Pond and crossed the Park Loop Road on its way east to Pemetic summit. We began referring to the area where the Goat Trail appeared to come close to Jordan Pond as the "lower section" of the Goat Trail.  This area is a limited patch of woods bordered by the road, the pond, and existing trails. It seemed like a good spot to begin our search.

## Photographic evidence

We were encouraged by the following photos from **_Acadia Trails Treatment Plan_**, a companion book to **_Pathmakers_** that documents the condition of current and historic trails and proposes a long-term strategy for rehabilitation and maintenance.  These are relatively recent photos (late 1990s/early 2000s) that show intact stone steps and the existence of at least one rung and one handrail.

{% include gallery %}

## A quick search, and some assumptions

On the final day of our vacation in September 2012, we searched casually for the lower section of the Goat Trail. We were looking for anything possibly connected to the trail that might still exist in our target area between Jordan Pond and the Park Loop Road. We tripped over plenty of rocks and waded through ankle-high piles of leaf litter. I got my feet wet in the creek alongside the Jordan Pond Carry Trail Spur. But we found nothing exciting.

For some reason, we initially assumed that any stone steps that still exist would be found on the upper section of the trail between the Park Loop Road and Pemetic summit, not in the wooded section west of the road. We began to accept the possibility that perhaps the lower (western) section of the trail was gone; it easily could have been overgrown if it were simply a woodland path long ago abandoned and mostly forgotten.

## More map research

As the year passed, I remained just as intrigued and continued to search for more information about the lost Goat Trail.

Topo map with Goat Trail indicated

All of the historic path maps included in **_Pathmakers_** show the Goat Trail, but not with sufficient clarity or scale to pinpoint the location.

Old topographic maps are often good sources of information, and they are what we used to locate the abandoned Potholes Trail last year.  We spent some time studying [USGS's Historical Topo Map collection](http://geonames.usgs.gov/pls/topomaps/).  Only one series (1956, 1:62500 scale) shows the Goat Trail.

As luck would have it, the western third of the trail is in the Mount Desert quad while the eastern two-thirds is in the Bar Harbor quad.  Here, I've pieced together the relevant portion of both maps for ease of reference. Notice that this map omits the lower section of the trail, between Jordan Pond and the Park Loop Road (labeled Jordan Pond Rd. on this map).

## Another attempt

Thinking that the lower section of the trail might indeed be gone, in 2013 Rich and I decided to attempt the find from Pemetic summit instead.  While the summit of Pemetic is an open, mostly bare expanse of pink granite, dip just below and you're quickly deep into blueberry bushes and then at treeline.  It was certainly possible that stone steps or some other indication of the trail could be found just down into the woods from the summit.

We took careful measurements on the 1956 topo map and used the [UTM coordinate system](http://therucksack.tripod.com/MiBSAR/LandNav/UTM/UTM.htm) to estimate a few points along the trail.

On the day of our attempt, we drove to Jordan Pond House, where we found parking in the main lot.  Our initial plans were altered slightly by the fact that both the Bubble Pond and Bubble Rock parking areas were closed to all traffic; they were being modified, we assume, to accommodate the expanding Island Explorer bus system.  We hiked the Pond Trail up to the Pemetic Mountain South Ridge Trail and followed it toward the summit.  We began at our estimated coordinates and searched in all directions for any sign of the Goat Trail.  Again, despite our efforts, we had absolutely no luck.

## Contact with an expert

Two failures meant it was time to learn whether the trail was still findable from the top or bottom, from somewhere in between, or not at all. It was time to consult a local expert.

The expert, of course, is Tom St. Germain—an obvious authority on the island's history and trails.  He is reasonably accessible, too, as the owner of Jack Russell's Steakhouse & Brewery in Bar Harbor.  Was this cheating? We don't think so.  Finding these trails completely on our own is a major thrill, but at the same time, part of the reason we love looking for abandoned trails is that it brings us closer to the history of the island, and sometimes there's no more enriching way to do that than to speak with those who know it best.

The scene at Jack Russell's was typical brewpub: fun, relaxed, loud.  The food was good and the beer was better, and Tom was most gracious in answering our questions about the Goat Trail.  (In fact, he said, what was with all this sudden interest in the Goat Trail?  He had just taken another couple to see the trail a few days before.) I assume it was just a coincidence, but it was a lucky one for us: because he had just been in the area, Tom knew that for some reason, the intersection of the Goat Trail with the Jordan Pond Shore Trail was now indicated with orange flagging tape tied onto two trees. He had never seen it flagged before. He urged us to check it out soon, while the flagging tape was still in place.  We did, and this time ... we found it!

## Discovery!

Rich's note to our friend Dave tells the story well:

> You might be interested in knowing that Zhanna and I hiked at least one short section of the long-abandoned Goat Trail in A.N.P. Using information shared with us by Tom St. Germain at his Jack Russell's Pub on Saturday afternoon [September 14], we easily were able to locate the trailhead right off the Jordan Pond Shore Trail. We followed a series of original stone staircases up to the Park Loop Road. Directly across the road we found evidence of the iron rungs which once provided access to the upper section of the steep west face trail leading up to the summit of Pemetic Mountain. Most had been sawed off by the Park Service years ago, but a few still remain intact.
>
> We took the Island Explorer bus to the parking pull-off just south of the Bubble Rock parking area. It's not an official stop, but if you let the driver know, they'll typically let you off just about anywhere. We thought a good first step would be to follow the faint connector trail from the Park Loop Road down to the Jordan Pond Shore Trail and hike south, looking for the orange flagging tape that Tom mentioned.
>
> The first thing that caught our attention were the possible faint remnants of yet another trail, which we later discovered might have been the original route of the western end of the Jordan Pond Carry Trail.  This trail had no flagging tape and nothing else to indicate that it was the Goat Trail.
>
> Continuing a bit further south from where we had initially searched, we found the flagging tape easily and then discovered that the *entire route* was flagged!  At least ten trees were flagged, many more than the two that Tom had mentioned.  It's so wild. This entire part of the Goat Trail is basically one long stone staircase heading up to the Park Loop road and it's almost impossible *not* to see it—I guess as long as you know it's there.  (This is why Tom wants to call his forthcoming book "Hidden in Plain Sight.")

Part of the problem might be that we typically hike the shore trail east to west and the Goat Trail is much easier to notice if you're hiking in the opposite direction, but still—it's there plain for all to see, and now even more easily since it's so obviously flagged.  Tom first noticed the flagging on Friday and we are pretty sure it *wasn't* there on Wednesday, when Rich and I hiked the Jordan Pond Shore Trail with my parents.  It will be interesting to see how long it lasts.

Finally on course, we followed the flagged route to the top of the staircase and used the very obvious handrail to pull ourselves up the last, steepest part to emerge on the Park Loop Road!  Directly across the road we saw where a whole series of rungs had been set in the cliff face on a diagonal.  As Rich described, all but two of the rungs (that we've found so far) have been sawed off to discourage people from climbing up, but even so, they are obvious when you know where to look.

We decided to leave the second part of the trail for next year, when we can begin at the loop road and climb to the summit of Pemetic, and then take the opposite route down that we took heading up the mountain this year.

Now, the question is, how best to access the *upper* portion of the trail?  And which abandoned trail will be our next target?!

## Goat Trail discovery images

{% include gallery id="gallery2" caption="Finding part of the Goat Trail—so cool!" %}

## GPS tracklog and waypoints

Download tracklog (.gpx)

Download waypoints (.gpx)

## Resources

> Barter, Christian S., Brown, Margaret C., Stakely, J.T., Stellpflug, Gary J., & the Olmsted Center for Landscape Preservation. **Acadia Trails Treatment Plan: Cultural Landscape Report for the Historic Hiking Trail System of Acadia National Park, Maine**. Boston, MA: National Park Service, 2006.
Read on Internet Archive: <http://archive.org/stream/acadiatrailstrea00bart>

> Brown, Margaret C. & the Olmsted Center for Landscape Preservation. **Pathmakers: Cultural Landscape Report for the Historic Hiking Trail System of Mount Desert Island: Acadia National Park, Maine; History, Existing Conditions, & Analysis**. Boston, MA: National Park Service, 2006.
Read on Internet Archive: <http://archive.org/stream/pathmakerscultur00brow>

> St. Germain, Tom. **A Walk in the Park (10th ed.)**. Bar Harbor, ME: Parkman Publications, 2008.

> St. Germain, Tom & Saunders, Jay. **Trails of History: The story of Mount Desert Island's Paths from Norumbega to Acadia**. Bar Harbor, ME: Parkman Publications, 1993.

> U. S. Geological Survey. **Mount Desert, Maine [map].** 1:62,500. Available from the USGS Historical Topographic Map Collection: [Mount Desert, Maine](http://geonames.usgs.gov/pls/topomaps/f?p=262:18:3340875387994083::NO:RP:P18_STATE,P18_SCALE,P18_MAP_NAME,P18_MAP_TYPE:ME%2C62500%2C\mount%20desert\%2CHistorical)

> U. S. Geological Survey. **Bar Harbor, Maine [map].** 1:62,500. Available from the USGS Historical Topographic Map Collection: [Bar Harbor, Maine](http://geonames.usgs.gov/pls/topomaps/f?p=262:18:3340875387994083::NO:RP:P18_STATE,P18_SCALE,P18_MAP_NAME,P18_MAP_TYPE:ME%2C62500%2C\bar%20harbor\%2CHistorical)


text:
	width:100%;
	height:100%;
	-webkit-transform: translate3d(0, 0, 0);
	-webkit-transition-timing-function: linear;
	-webkit-backface-visibility: hidden;
	-webkit-transform-style: preserve-3d;

	-moz-transform: translate3d(0, 0, 0);
	-moz-transition-timing-function: linear;
	-moz-backface-visibility: hidden;
	-moz-transform-style: preserve-3d;

	transform: translate3d(0, 0, 0);
	transition-timing-function: linear;
	backface-visibility: hidden;
	transform-style: preserve-3d;
}

.slide {
	width:100%;
	height:100%;
	display:inline-block;
	float:left;
	vertical-align:top;
}

.row {
	display:block;
	width:100%;
	height:100%;
}

redpajama_set_name: RedPajamaGithub


text:
package de.mhus.aqua.mod.uiapp.wui;

import java.io.PrintWriter;
import java.util.Map;

import de.mhus.aqua.api.AquaRequest;
import de.mhus.aqua.mod.uiapp.Activator;
import de.mhus.aqua.mod.uiapp.UiBox;
import de.mhus.aqua.tpl.Engine;
import de.mhus.lib.MCast;
import de.mhus.lib.MException;
import de.mhus.lib.cao.CaoException;

public class WLayoutLCR extends IWLayout {

	private IWUiContainer[] columns;

	public WLayoutLCR() throws MException {
		setTplName(Activator.instance().getId() + "/wlayout_lcr");
	}

	public void paint(AquaRequest data, PrintWriter stream) throws MException {

		Engine engine = Activator.instance().getAqua().getTplEngine();
		Map<String, Object> attr = engine.createAttributes(data);

		engine.execute(this, null, attr, stream);

	}

	@Override
	public void recreate(ContainerContributor contributor) {

		clear();

		columns = new IWUiContainer[3];

		columns[0] = new IWUiComposit();
		columns[1] = new IWUiComposit();
		columns[2] = new IWUiComposit();

		addChild(null,columns[0]);
		addChild(null,columns[1]);
		addChild(null,columns[2]);

		contributor.appendContainers(this);

	}

	public void processTplRequest(AquaRequest req, Map<String,Object> params, PrintWriter writer) throws MException {
		if ("paint".equals(params.get("name").toString() )) {
			int nr = MCast.toint(params.get("slot").toString(),0);
			if (nr >= getContainerSize() || nr < 0) return;
			PrintWriter stream = new PrintWriter(writer);
			try {
				columns[nr].paint(req, stream);
			} catch (CaoException e) {
				// TODO Auto-generated catch block
				e.printStackTrace();
			}
			stream.flush();
			return;
		}
		super.processTplRequest(req, params, writer);
	}

	@Override
	public int getDefaultContainer() {
		return 1;
	}

	@Override
	public int getContainerSize() {
		return 3;
	}

	@Override
	public IWComponent appendBox(int list, int pos, UiBox box) throws MException {
		if (list<0 || list >= getContainerSize())
			list = getDefaultContainer();
		WAppContainerBox ret = new WAppContainerBox(box);
		if (pos < 0 )
			columns[list].addChild(null,ret);
		else
			columns[list].addChild(null,pos,ret);
		return ret;
	}

	@Override
	protected void doInit() throws MException {
	}

	@Override
	protected void doFillAttributes(AquaRequest data, Map<String, Object> attr) {

	}

	@Override
	public IWComponent insertBox(int posContainer, int pos, UiBox box) throws MException {
		if (pos<0 || pos >= getContainerSize())
			pos = getDefaultContainer();
		WAppContainerBox ret = new WAppContainerBox(box);
		columns[pos].addChild(null,pos,ret);
		return ret;
	}

}


text:
<?php

namespace dokuwiki\Input;

/**
 * Internal class used for $_POST access in dokuwiki\Input\Input class
 */
class Post extends Input
{

    /** @noinspection PhpMissingParentConstructorInspection
     * Initialize the $access array, remove subclass members
     */
    public function __construct()
    {
        $this->access = &$_POST;
    }

    /**
     * Sets a parameter in $_POST and $_REQUEST
     *
     * @param string $name Parameter name
     * @param mixed $value Value to set
     */
    public function set($name, $value)
    {
        parent::set($name, $value);
        $_REQUEST[$name] = $value;
    }
}


text:
joo.classLoader.prepare("package flash.text.engine",/* {*/

/**
 * The JustificationStyle class is an enumeration of constant values for setting the justificationStyle property of the EastAsianJustifier class. These constants specify options for handling kinsoku characters, which are Japanese characters that cannot appear at either the beginning or end of a line.
 * @see EastAsianJustifier#justificationStyle
 *
 */
"public final class JustificationStyle",1,function($$private){;return[
  /**
   * Bases justification on either expanding or compressing the line, whichever gives a result closest to the desired width.
   */
  "public static const",{ PRIORITIZE_LEAST_ADJUSTMENT/*:String*/ : "prioritizeLeastAdjustment"},
  /**
   * Bases justification on compressing kinsoku at the end of the line, or expanding it if no kinsoku occurs or if that space is insufficient.
   */
  "public static const",{ PUSH_IN_KINSOKU/*:String*/ : "pushInKinsoku"},
  /**
   * Bases justification on expanding the line.
   */
  "public static const",{ PUSH_OUT_ONLY/*:String*/ : "pushOutOnly"},
];},[],[], "0.8.0", "0.9.6"
);


text:
<?php

namespace spec\Nixilla\CqrsBundle\DependencyInjection\Compiler;

use Nixilla\CqrsBundle\DependencyInjection\Compiler\HandlerPass;
use PhpSpec\ObjectBehavior;
use Prophecy\Argument;
use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface;
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\DependencyInjection\Definition;

class HandlerPassSpec extends ObjectBehavior
{
    function it_is_initializable()
    {
        $this->shouldHaveType(HandlerPass::class);
        $this->shouldHaveType(CompilerPassInterface::class);
    }

    function it_registers_all_services_tagged_as_handler_to_symfony_container(ContainerBuilder $builder, Definition $definition)
    {
        $builder->has('cqrs.handler.collection')->willReturn(false);
        $this->process($builder);

        $builder->has('cqrs.handler.collection')->willReturn(true);
        $builder->findDefinition('cqrs.handler.collection')->willReturn($definition);

        $services = [ 'someId' => [ ['event' => 'some.event' ]]];

        $builder->findTaggedServiceIds('cqrs.command.handler')->willReturn($services);

        $definition->addMethodCall('setHandler', Argument::any())->shouldBeCalled();

        $this->process($builder);
    }
}


text:
<?php

namespace Model;

/**
 * Repository of Model\ArticleInformation document.
 */
class ArticleInformationRepository extends \Model\Base\ArticleInformationRepository
{
}


text:
<!DOCTYPE HTML>

<title>DiskTypeIndex (CQEngine 3.5.0 API)</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="dc.created" content="2020-03-29">
<link rel="stylesheet" type="text/css" href="../../../../../../stylesheet.css" title="Style">
<link rel="stylesheet" type="text/css" href="../../../../../../jquery/jquery-ui.css" title="Style">

JavaScript is disabled on your browser.

Skip navigation links

Overview

Package

Class

Use

Tree

Deprecated

Index

Help

All Classes

SEARCH:
<input type="text" id="search" value="search" disabled="disabled">
<input type="reset" id="reset" value="reset" disabled="disabled">

JavaScript is disabled on your browser.

Summary:

Nested |

Field |

Constr |

Method

Detail:

Field |

Constr |

Method

Package com.googlecode.cqengine.index.support.indextype

Interface DiskTypeIndex

All Known Implementing Classes:

DiskIndex, PartialDiskIndex, SQLiteDiskIdentityIndex

public interface DiskTypeIndex

A marker interfaces for indexes which are persisted on disk.

 Created by npgall on 29/04/2016.

Skip navigation links

Overview

Package

Class

Use

Tree

Deprecated

Index

Help

All Classes

JavaScript is disabled on your browser.

Summary:

Nested |

Field |

Constr |

Method

Detail:

Field |

Constr |

Method

Copyright © 2020. All rights reserved.


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

<TITLE>
Uses of Interface org.apache.poi.sl.draw.geom.Expression (POI API Documentation)
</TITLE>

<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../../../../stylesheet.css" TITLE="Style">

      Overview
      Package
      Class
    Use
      Tree
      Deprecated
      Index
      Help

 PREV
 NEXT

  FRAMES
 NO FRAMES

  All Classes

Uses of Interface
org.apache.poi.sl.draw.geom.Expression

Packages that use Expression

org.apache.poi.sl.draw.geom

Uses of Expression in org.apache.poi.sl.draw.geom

Classes in org.apache.poi.sl.draw.geom that implement Expression

 class
AbsExpression

          Absolute Value Formula

 class
AddDivideExpression

          Add Divide Formula

 class
AddSubtractExpression

          Add Subtract Formula

 class
ArcTanExpression

          Date: 10/24/11

 class
CosExpression

          Date: 10/24/11

 class
CosineArcTanExpression

          Date: 10/24/11

 class
IfElseExpression

          If Else Formula:

 class
LiteralValueExpression

          Date: 10/24/11

 class
MaxExpression

          Maximum Value Formula

 class
MinExpression

          Minimum Value Formula

 class
ModExpression

          Modulo Formula:

 class
MultiplyDivideExpression

          Multiply Divide Formula

 class
PinExpression

          Pin To Formula:
 <gd name="enAng" fmla="pin 0 adj2 21599999"/>

 class
SinArcTanExpression

          Sine ArcTan Formula:
 <gd name="dy1" fmla="sat2 x y z"/>

 class
SinExpression

          Sine Formula:
 <gd name="z" fmla="sin x y"/>

 class
SqrtExpression

          Square Root Formula:
 <gd name="x" fmla="sqrt y"/>

 class
TanExpression

          Tangent Formula:

 <gd name="z" fmla="tan x y"/>

Methods in org.apache.poi.sl.draw.geom that return Expression

static Expression
ExpressionParser.parse(java.lang.String str)

      Overview
      Package
      Class
    Use
      Tree
      Deprecated
      Index
      Help

 PREV
 NEXT

  FRAMES
 NO FRAMES

  All Classes

                Copyright 2015 The Apache Software Foundation or
        its licensors, as applicable.


text:
  // create an array with nodes
  var nodes , edges , pmsNodes , pmsEdges , network , pmsNetwork,
  cNodes,cEdges,cNetwork,legend,pmslegend,clegend;
  var diffFlag = false;
  var borderWidth = 5;
  var selectedSize = 40;
  var sameData;
  var hiddenNodes = [] ;
var initNetWork = function(){
    //获取承载图的div标签对象
    var container = document.getElementById('network');
    var pmsContainer = document.getElementById('pmsNetwork');
    var cContainer = document.getElementById('cNetwork');
    //vis图的配置项。
    var options = {
        highlightNearest:true,
        nodes: {
            shape: 'dot',
            size: 20,
            font: {
                size: 15
            }
        },
        edges: {
            width: 2,
            selectionWidth: function (width) {return width*2;},
            font: {align: 'middle'},
            label: ''

        },
        groups: {
            TRAN: {
                size: 20,
                color: {background:'#68BDF6',border:'#5CA8DB'},
                chosen: { label: false, node: function(values, id, selected, hovering){
                    values.color = '#CCFFFF';
                    values.borderColor = '#0066FF';
                    values.size = selectedSize;
                    values.borderWidth = borderWidth;
                } }
            },
            LINES: {
                size: 20,
                color: {background:'#FB95AF',border:'#E0849B'},
                chosen: { label: false, node: function(values, id, selected, hovering){
                    values.color = '#FFCCFF';
                    values.borderColor = '#FF66FF';
                    values.size = selectedSize;
                    values.borderWidth = borderWidth;
                }}

            },
            SUBS: {
                size: 20,
                color: {background:'#FF756E',border:'#E06760'},
                chosen: { label: false, node: function(values, id, selected, hovering){
                    values.color = '#FFCCCC';
                    values.borderColor = '#FF9999';
                    values.size = selectedSize;
                    values.borderWidth = borderWidth;
                }}
            },
            PMS_TRAN: {
                size: 20,
                color: {background:'#68BDF6',border:'#5CA8DB'},
                chosen: { label: false, node: function(values, id, selected, hovering){
                    values.color = '#CCFFFF';
                    values.borderColor = '#0066FF';
                    values.size = selectedSize;
                    values.borderWidth = borderWidth;
                }}
            },
            PMS_LINES: {
                size: 20,
                color: {background:'#FB95AF',border:'#E0849B'},
                chosen: { label: false, node: function(values, id, selected, hovering){
                    values.color = '#FFCCFF';
                    values.borderColor = '#FF66FF';
                    values.size = selectedSize;
                    values.borderWidth = borderWidth;
                }}
            },
            PMS_SUBS: {
                size: 20,
                color: {background:'#FF756E',border:'#E06760'},
                chosen: { label: false, node: function(values, id, selected, hovering){
                    values.color = '#FFCCCC';
                    values.borderColor = '#FF9999';
                    values.size = selectedSize;
                    values.borderWidth = borderWidth;
                }}
            },
            DIFF:{
                size:20,
                color: {background:'#FFFF33',border:'#FFCC66'},
                chosen: { label: false, node: function(values, id, selected, hovering){
                    values.color = '#FFFFCC';
                    values.borderColor = '#FFFF66';
                    values.size = selectedSize;
                    values.borderWidth = borderWidth;
                }}
            },
            HIDDEN:{
                hidden:true
            }
        },
        physics: {
            stabilization: false
        },
        interaction: {
            tooltipDelay: 200,
            //拖曳时是否隐藏路径
            hideEdgesOnDrag: false
        },
        manipulation: {
            locale:'ch_yx',
            addNode: function (data, callback) {
                // filling in the popup DOM elements
                document.getElementById('operation').innerHTML = "Add Node";
                document.getElementById('node-id').value = data.id;
                document.getElementById('node-label').value = data.label;
                document.getElementById('saveButton').onclick = saveData.bind(this, data, callback);
                document.getElementById('cancelButton').onclick = clearPopUp.bind();
                document.getElementById('network-popUp').style.display = 'block';
            },
            editNode: function (data, callback) {
                // filling in the popup DOM elements
                document.getElementById('operation').innerHTML = "Edit Node";
                document.getElementById('node-id').value = data.id;
                document.getElementById('node-label').value = data.label;
                document.getElementById('saveButton').onclick = saveData.bind(this, data, callback);
                document.getElementById('cancelButton').onclick = cancelEdit.bind(this,callback);
                document.getElementById('network-popUp').style.display = 'block';
            },
            addEdge: function (data, callback) {
                if (data.from == data.to) {
                    var r = confirm("Do you want to connect the node to itself?");
                    if (r == true) {
                    }
                    callback(data);
                }
                else {
                    callback(data);
                }
            }
        },
    };
    // legend = [];
    // var step = 70;
    // legend.push({id: 'LSUB', x: x, y: y, label: 'Internet', group: 'internet', value: 1, fixed: true, physics:false});
    // legend.push({id: 'LLINE', x: x, y: y + step, label: 'Switch', group: 'switch', value: 1, fixed: true,  physics:false});
    // legend.push({id: 'LTRAN', x: x, y: y + 2 * step, label: 'Server', group: 'server', value: 1, fixed: true,  physics:false});
    // legend.push({id: 'LDIFF', x: x, y: y + 3 * step, label: 'Computer', group: 'desktop', value: 1, fixed: true,  physics:false});
    //图的节点和边数据
    //DataSet可直接将对象数组传入生成图,生成的图会自动调整节点位置以及缩放比例,但需要一定的加载时间
    //此处采用的方式是,初始化一个没有节点和边的空图,之后用增加节点的方式生成图,可大幅缩短加载时间
    nodes = new vis.DataSet([]);
    edges = new vis.DataSet([]);
    pmsNodes = new vis.DataSet([]);
    pmsEdges = new vis.DataSet([]);
    cNodes = new vis.DataSet([]);
    cEdges = new vis.DataSet([]);
    data = {
        nodes: nodes,
        edges: edges
    };
    pmsData = {
        nodes : pmsNodes,
        edges : pmsEdges
    };
    cData = {
        nodes : cNodes,
        edges : cEdges
    }
    network = new vis.Network(container, data, options);
    options.manipulation.locale='ch_sc';
    pmsNetwork =new vis.Network(pmsContainer, pmsData, options);
    options.manipulation.locale='ch_hb';
    cNetwork =new vis.Network(cContainer, cData, options);
    //单击事件
    network.on("click", function (params) {
        networkClick(params,network);
    });
    pmsNetwork.on("click", function (params) {
        networkClick(params,pmsNetwork);
    });
    cNetwork.on("click", function (params) {
        networkClick(params,cNetwork);
    });
    //双击事件
    network.on("doubleClick", function (params) {
        networkDoubleClick(params,nodes,edges);
    });
    pmsNetwork.on("doubleClick", function (params) {
        networkDoubleClick(params,pmsNodes,pmsEdges);
    });
    cNetwork.on("doubleClick", function (params) {
        networkDoubleClick(params,cNodes,cEdges);
    });

}
//发送请求,获取节点和边的数据
  var startNetwork = function(param) {
      $.ajax({
               url: '/electric/queryByCql',
               data:param,
               type: 'POST',
               success: function(data){
                loadData(data);
                   hideWeChat();
               },
               dataType: "json"
       });
  }
//将所得节点放入图中,根据节点数量调整缩放比例
  var loadData = function(responseData){
       nodes = new vis.DataSet([]);
       edges = new vis.DataSet([]);
       network.setData({
           nodes:nodes,
           edges:edges
       });

       pmsNodes = new vis.DataSet([]);
       pmsEdges = new vis.DataSet([]);
       pmsNetwork.setData({
           nodes:pmsNodes,
           edges:pmsEdges
       });

       cNodes = new vis.DataSet([]);
       cEdges = new vis.DataSet([]);
       cNetwork.setData({
          nodes:cNodes,
          edges:cEdges
       });
       eData = JSON.parse(responseData.yxData.eData);
       vData = JSON.parse(responseData.yxData.vData);

       pmseData = JSON.parse(responseData.scData.eData);
       pmsvData = JSON.parse(responseData.scData.vData);

       nodes.add(vData);
       edges.add(eData);

       pmsNodes.add(pmsvData);
       pmsEdges.add(pmseData);

       if(vData.length <= 400){
           network.body.view.scale = 0.2;
       }else if(400 < vData.length && vData.length <= 1000){
           network.body.view.scale = 0.2;
       }else if(1000 < vData.length && vData.length <= 1500){
           network.body.view.scale = 0.1;
       }else if(1500 < vData.length){
           network.body.view.scale = 0.09;
       }

       if(pmsvData.length <= 400){
           pmsNetwork.body.view.scale = 0.2;
       }else if(400 < pmsvData.length && pmsvData.length <= 1000){
           pmsNetwork.body.view.scale = 0.2;
       }else if(1000 < pmsvData.length && pmsvData.length <= 1500){
           pmsNetwork.body.view.scale = 0.1;
       }else if(1500 < pmsvData.length){
           pmsNetwork.body.view.scale = 0.09;
       }
  }

  // var refresh = function(){
  //   startNetwork();
  // };
  //单击搜索按钮,生成图
  var restart = function(){
//       if(valid()){
       WeChatShow();
       var subName = $.trim($('#electricity').val());
       var param = {
           "subName":subName
       };
       diffFlag = false;
       $('#subNameId').val(subName);
       startNetwork(param);
//       }

  };
  // function prevent(e) {
  //     e.preventDefault ? e.preventDefault() : e.returnValue = false;
  // }
  // function digitInput(el, e) {
  //     var ee = e || window.event; // FF、Chrome IE下获取事件对象
  //     var c = e.charCode || e.keyCode; //FF、Chrome IE下获取键盘码
  //     //var txt = $('label').text();
  //     //$('label').text(txt + ' ' + c);
  //     var val = el.val();
  //     if (c == 110 || c == 190){ // 110 (190) - 小(主)键盘上的点
  //         (val.indexOf(".") >= 0 || !val.length) && prevent(e); // 已有小数点或者文本框为空,不允许输入点
  //     } else {
  //         if ((c != 8 && c != 46 && // 8 - Backspace, 46 - Delete
  //             (c < 37 || c > 40) && // 37 (38) (39) (40) - Left (Up) (Right) (Down) Arrow
  //             (c < 48 || c > 57) && // 48~57 - 主键盘上的0~9
  //             (c < 96 || c > 105)) // 96~105 - 小键盘的0~9
  //             || e.shiftKey) { // Shift键,对应的code为16
  //             prevent(e); // 阻止事件传播到keypress
  //         }
  //     }
  // }
  $(function(){
      initNetWork();
  });
  // function valid(){
  //     var electricity = $.trim($("input[name=electricity]").val());
  //     if (electricity == ''){
  //         $("#errorMsg").css("display",'');
  //        return false;
  //     }
  //     $("#errorMsg").css("display",'none');
  //     return true;
  // }

  //图标操作相关逻辑
  function clearPopUp() {
      document.getElementById('saveButton').onclick = null;
      document.getElementById('cancelButton').onclick = null;
      document.getElementById('network-popUp').style.display = 'none';
  }

  function cancelEdit(callback) {
      clearPopUp();
      callback(null);
  }

  function saveData(data,callback) {
      data.id = document.getElementById('node-id').value;
      data.label = document.getElementById('node-label').value;
      clearPopUp();
      callback(data);
  }
  //输入框回车事件
  function getKey(){
      if(event.keyCode == '13'){
          restart();
      }
  }
  // var closeMsg = function(){
  //     $("#errorMsg").css("display","none");
  // }
  //差异比较逻辑
  var difAnalysis = function(){
      WeChatShow();
      var subName = $("#subNameId").val();
      var param = {
          subName : subName
      };
      $.ajax({
          url: '/electric/difAnalysis',
          data: param,
          type: 'POST',
          success: function(data){
              debugger;
              loadData(data);
              diffFlag = true;
              hideWeChat();
          },
          dataType: "json"
      });
  }
//跨系统匹配逻辑
 var combine = function(){
     WeChatShow();
     mergeGraph(network,pmsNetwork);
     hideWeChat();
 }


text:
sidebar_label: Frame.tap
---

# Frame.tap() method

Taps the first element that matches the `selector`.

#### Signature:

```typescript
class Frame {
  tap(selector: string): Promise<void>;
}
```

## Parameters

| Parameter | Type   | Description                |
| --------- | ------ | -------------------------- |
| selector  | string | The selector to query for. |

**Returns:**

Promise<void>

## Exceptions

Throws if there's no element matching `selector`.


text:
<?php
	require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc');
	$db = MySQLPDOTest::factory();
	$db->setAttribute(PDO::ATTR_STRINGIFY_FETCHES, false);

	MySQLPDOTest::createTestTable($db);

	function pdo_mysql_stmt_bindparam($db, $offset) {

		$stmt = $db->prepare('SELECT id, label FROM test WHERE id > ? ORDER BY id ASC LIMIT 2');
		$in = 0;
		if (!$stmt->bindParam(1, $in))
			printf("[%03d + 1] Cannot bind parameter, %s %s\n", $offset,
				$stmt->errorCode(), var_export($stmt->errorInfo(), true));

		$stmt->execute();
		$id = $label = null;

		if (!$stmt->bindColumn(1, $id, PDO::PARAM_INT))
			printf("[%03d + 2] Cannot bind integer column, %s %s\n", $offset,
				$stmt->errorCode(), var_export($stmt->errorInfo(), true));

		if (!$stmt->bindColumn(2, $label, PDO::PARAM_STR))
			printf("[%03d + 3] Cannot bind string column, %s %s\n", $offset,
				$stmt->errorCode(), var_export($stmt->errorInfo(), true));

		while ($stmt->fetch(PDO::FETCH_BOUND))
			printf("in = %d -> id = %s (%s) / label = %s (%s)\n",
				$in,
				var_export($id, true), gettype($id),
				var_export($label, true), gettype($label));

		printf("Same again...\n");
		$stmt->execute();
		while ($stmt->fetch(PDO::FETCH_BOUND))
			printf("in = %d -> id = %s (%s) / label = %s (%s)\n",
				$in,
				var_export($id, true), gettype($id),
				var_export($label, true), gettype($label));

		// NULL values
		printf("NULL...\n");
		$stmt = $db->prepare('INSERT INTO test(id, label) VALUES (100, ?)');
		$label = null;
		if (!$stmt->bindParam(1, $label))
			printf("[%03d + 4] Cannot bind parameter, %s %s\n", $offset,
				$stmt->errorCode(), var_export($stmt->errorInfo(), true));

		if (!$stmt->execute())
			printf("[%03d + 5] Cannot execute statement, %s %s\n", $offset,
				$stmt->errorCode(), var_export($stmt->errorInfo(), true));

		/* NOTE: you cannot use PDO::query() with unbuffered, native PS - see extra test */
		$stmt = $db->prepare('SELECT id, NULL AS _label FROM test WHERE label IS NULL');
		$stmt->execute();

		$id = $label = 'bogus';
		if (!$stmt->bindColumn(1, $id, PDO::PARAM_INT))
			printf("[%03d + 6] Cannot bind NULL column, %s %s\n", $offset,
				$stmt->errorCode(), var_export($stmt->errorInfo(), true));

		if (!$stmt->bindColumn(2, $label, PDO::PARAM_STR))
			printf("[%03d + 3] Cannot bind string column, %s %s\n", $offset,
				$stmt->errorCode(), var_export($stmt->errorInfo(), true));

		while ($stmt->fetch(PDO::FETCH_BOUND))
			printf("in = %d -> id = %s (%s) / label = %s (%s)\n",
				$in,
				var_export($id, true), gettype($id),
				var_export($label, true), gettype($label));
	}

	try {
		printf("Emulated PS...\n");
		$db->setAttribute(PDO::MYSQL_ATTR_DIRECT_QUERY, 1);
		if (1 != $db->getAttribute(PDO::MYSQL_ATTR_DIRECT_QUERY))
			printf("[002] Unable to turn on emulated prepared statements\n");

		printf("Buffered...\n");
		$db->setAttribute(PDO::MYSQL_ATTR_USE_BUFFERED_QUERY, true);
		pdo_mysql_stmt_bindparam($db, 3);

		printf("Unbuffered...\n");
		MySQLPDOTest::createTestTable($db);
		$db->setAttribute(PDO::MYSQL_ATTR_USE_BUFFERED_QUERY, false);
		pdo_mysql_stmt_bindparam($db, 4);

		printf("Native PS...\n");
		$db->setAttribute(PDO::MYSQL_ATTR_DIRECT_QUERY, 0);
		if (0 != $db->getAttribute(PDO::MYSQL_ATTR_DIRECT_QUERY))
			printf("[004] Unable to turn off emulated prepared statements\n");

		printf("Buffered...\n");
		MySQLPDOTest::createTestTable($db);
		$db->setAttribute(PDO::MYSQL_ATTR_USE_BUFFERED_QUERY, true);
		pdo_mysql_stmt_bindparam($db, 5);

		printf("Unbuffered...\n");
		MySQLPDOTest::createTestTable($db);
		$db->setAttribute(PDO::MYSQL_ATTR_USE_BUFFERED_QUERY, false);
		pdo_mysql_stmt_bindparam($db, 6);

	} catch (PDOException $e) {
		printf("[001] %s [%s] %s\n",
			$e->getMessage(), $db->errorCode(), implode(' ', $db->errorInfo()));
	}

	print "done!";
?>


text:
package com.googlecode.kanbanik.commands

import com.googlecode.kanbanik.model.Board
import com.googlecode.kanbanik.model.Project
import com.googlecode.kanbanik.builders.{TaskBuilder, ProjectBuilder, BoardBuilder}
import com.googlecode.kanbanik.dtos._
import com.googlecode.kanbanik.dtos.ErrorDto
import com.googlecode.kanbanik.dtos.GetAllBoardsWithProjectsDto
import com.googlecode.kanbanik.dtos.ListDto
import scala.Some
import com.googlecode.kanbanik.dtos.BoardWithProjectsDto

class GetAllBoardsCommand extends Command[GetAllBoardsWithProjectsDto, ListDto[BoardWithProjectsDto]] {

  lazy val boardBuilder = new BoardBuilder()

  lazy val projectBuilder = new ProjectBuilder()

  val taskBuilder = new TaskBuilder

  def execute(params: GetAllBoardsWithProjectsDto): Either[ListDto[BoardWithProjectsDto], ErrorDto] = {

    val loadedBoards = Board.all(params.includeTasks.getOrElse(false), params.includeTaskDescription.getOrElse(false))
    val loadedProjects = Project.all()

    val res = ListDto(
      loadedBoards.map(
        board => BoardWithProjectsDto(
        boardBuilder.buildDto(board).copy(
          tasks = Some(board.tasks.map(taskBuilder.buildDto))
        ), {
          val projectDtos = loadedProjects.filter(
            project => project.boards.getOrElse(List[Board]()).exists(projectsBoard => projectsBoard.id == board.id)
          ).map(projectOnBoard => projectBuilder.buildDto(projectOnBoard))

          if (projectDtos.size > 0) {
            Some(ProjectsDto(projectDtos))
          } else {
            None
          }
        }
        )
      )
    )

    Left(res)
  }

}


text:
package com.palantir.atlasdb.cassandra;

import static org.assertj.core.api.Assertions.assertThatThrownBy;
import static org.mockito.ArgumentMatchers.any;
import static org.mockito.Mockito.doThrow;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.times;
import static org.mockito.Mockito.verify;
import static org.mockito.Mockito.verifyNoMoreInteractions;
import static org.mockito.Mockito.when;

import com.google.common.base.Ticker;
import com.google.common.collect.ImmutableList;
import com.google.common.collect.ImmutableMap;
import com.palantir.atlasdb.encoding.PtBytes;
import com.palantir.atlasdb.keyvalue.api.TableReference;
import com.palantir.atlasdb.keyvalue.cassandra.CassandraClient;
import com.palantir.atlasdb.keyvalue.cassandra.CqlQuery;
import com.palantir.atlasdb.keyvalue.cassandra.QosCassandraClient;
import com.palantir.atlasdb.keyvalue.cassandra.thrift.QueryWeight;
import com.palantir.atlasdb.keyvalue.cassandra.thrift.SlicePredicates;
import com.palantir.atlasdb.keyvalue.cassandra.thrift.ThriftQueryWeighers;
import com.palantir.atlasdb.qos.metrics.QosMetrics;
import java.nio.ByteBuffer;
import java.util.List;
import java.util.Map;
import javax.naming.LimitExceededException;
import org.apache.cassandra.thrift.Column;
import org.apache.cassandra.thrift.ColumnOrSuperColumn;
import org.apache.cassandra.thrift.Compression;
import org.apache.cassandra.thrift.ConsistencyLevel;
import org.apache.cassandra.thrift.CqlResult;
import org.apache.cassandra.thrift.KeyRange;
import org.apache.cassandra.thrift.KeySlice;
import org.apache.cassandra.thrift.Mutation;
import org.apache.cassandra.thrift.SlicePredicate;
import org.apache.thrift.TException;
import org.junit.Before;
import org.junit.Test;

public class QosCassandraClientTest {
    private final CassandraClient mockClient = mock(CassandraClient.class);
    private final QosMetrics mockMetrics = mock(QosMetrics.class);
    private final Ticker ticker = mock(Ticker.class);

    private static final long NANOS_START = 1L;
    private static final long NANOS_END = 13L;
    private static final long NANOS_DURATION = NANOS_END - NANOS_START;

    private static final ByteBuffer ROW_KEY = ByteBuffer.wrap(PtBytes.toBytes("key"));
    private static final TableReference TEST_TABLE = TableReference.createFromFullyQualifiedName("foo.bar");
    private static final SlicePredicate SLICE_PREDICATE =
            SlicePredicates.create(SlicePredicates.Range.ALL, SlicePredicates.Limit.ONE);
    private static final ImmutableMap<ByteBuffer, List<ColumnOrSuperColumn>> MULTIGET_RESULT =
            ImmutableMap.of(ROW_KEY, ImmutableList.of(new ColumnOrSuperColumn()));
    private static final ImmutableMap<ByteBuffer, Map<String, List<Mutation>>> BATCH_MUTATE_ARG =
            ImmutableMap.of(ROW_KEY, ImmutableMap.of());
    private static final CqlQuery CQL_QUERY = CqlQuery.builder()
            .safeQueryFormat("SELECT * FROM test_table LIMIT 1")
            .build();
    private static final KeyRange KEY_RANGE = new KeyRange();

    private CassandraClient client;

    @Before
    public void setUp() {
        client = new QosCassandraClient(mockClient, mockMetrics, ticker);
        when(ticker.read()).thenReturn(NANOS_START).thenReturn(NANOS_END);
    }

    @Test
    public void multigetSliceRecordsMetricsOnSuccess() throws TException, LimitExceededException {
        when(mockClient.multiget_slice(any(), any(), any(), any(), any())).thenReturn(MULTIGET_RESULT);
        QueryWeight expectedWeight = ThriftQueryWeighers.multigetSlice(ImmutableList.of(ROW_KEY))
                .weighSuccess(MULTIGET_RESULT, NANOS_DURATION);

        client.multiget_slice("get", TEST_TABLE, ImmutableList.of(ROW_KEY), SLICE_PREDICATE, ConsistencyLevel.ANY);

        verify(mockClient, times(1))
                .multiget_slice("get", TEST_TABLE, ImmutableList.of(ROW_KEY), SLICE_PREDICATE, ConsistencyLevel.ANY);
        verifyNoMoreInteractions(mockClient);

        verify(mockMetrics, times(1)).recordRead(expectedWeight);
        verifyNoMoreInteractions(mockMetrics);
    }

    @Test
    public void multigetSliceRecordsMetricsOnFailure() throws TException, LimitExceededException {
        when(mockClient.multiget_slice(any(), any(), any(), any(), any())).thenThrow(new RuntimeException());
        QueryWeight expectedWeight = ThriftQueryWeighers.multigetSlice(ImmutableList.of(ROW_KEY))
                .weighFailure(new RuntimeException(), NANOS_DURATION);

        assertThatThrownBy(() -> client.multiget_slice(
                        "get", TEST_TABLE, ImmutableList.of(ROW_KEY), SLICE_PREDICATE, ConsistencyLevel.ANY))
                .isInstanceOf(RuntimeException.class);

        verify(mockClient, times(1))
                .multiget_slice("get", TEST_TABLE, ImmutableList.of(ROW_KEY), SLICE_PREDICATE, ConsistencyLevel.ANY);
        verifyNoMoreInteractions(mockClient);

        verify(mockMetrics, times(1)).recordRead(expectedWeight);
        verifyNoMoreInteractions(mockMetrics);
    }

    @Test
    public void batchMutateRecordsMetricsOnSuccess() throws TException, LimitExceededException {
        QueryWeight expectedWeight =
                ThriftQueryWeighers.batchMutate(BATCH_MUTATE_ARG).weighSuccess(null, NANOS_DURATION);

        client.batch_mutate("put", BATCH_MUTATE_ARG, ConsistencyLevel.ANY);

        verify(mockClient, times(1)).batch_mutate("put", BATCH_MUTATE_ARG, ConsistencyLevel.ANY);
        verifyNoMoreInteractions(mockClient);

        verify(mockMetrics, times(1)).recordWrite(expectedWeight);
        verifyNoMoreInteractions(mockMetrics);
    }

    @Test
    public void batchMutateRecordsMetricsOnFailure() throws TException, LimitExceededException {
        doThrow(new RuntimeException()).when(mockClient).batch_mutate(any(), any(), any());
        QueryWeight expectedWeight =
                ThriftQueryWeighers.batchMutate(BATCH_MUTATE_ARG).weighSuccess(null, NANOS_DURATION);

        assertThatThrownBy(() -> client.batch_mutate("put", BATCH_MUTATE_ARG, ConsistencyLevel.ANY))
                .isInstanceOf(RuntimeException.class);

        verify(mockClient, times(1)).batch_mutate("put", BATCH_MUTATE_ARG, ConsistencyLevel.ANY);
        verifyNoMoreInteractions(mockClient);

        verify(mockMetrics, times(1)).recordWrite(expectedWeight);
        verifyNoMoreInteractions(mockMetrics);
    }

    @Test
    public void executeCqlQueryRecordsMetricsOnSuccess() throws TException, LimitExceededException {
        CqlResult emptyResult = new CqlResult();
        when(mockClient.execute_cql3_query(any(), any(), any())).thenReturn(emptyResult);
        QueryWeight expectedWeight = ThriftQueryWeighers.EXECUTE_CQL3_QUERY.weighSuccess(emptyResult, NANOS_DURATION);

        client.execute_cql3_query(CQL_QUERY, Compression.NONE, ConsistencyLevel.ANY);

        verify(mockClient, times(1)).execute_cql3_query(CQL_QUERY, Compression.NONE, ConsistencyLevel.ANY);
        verifyNoMoreInteractions(mockClient);

        verify(mockMetrics, times(1)).recordRead(expectedWeight);
        verifyNoMoreInteractions(mockMetrics);
    }

    @Test
    public void executeCqlQueryRecordsMetricsOnFailure() throws TException, LimitExceededException {
        when(mockClient.execute_cql3_query(any(), any(), any())).thenThrow(new RuntimeException());
        QueryWeight expectedWeight =
                ThriftQueryWeighers.EXECUTE_CQL3_QUERY.weighFailure(new RuntimeException(), NANOS_DURATION);

        assertThatThrownBy(() -> client.execute_cql3_query(CQL_QUERY, Compression.NONE, ConsistencyLevel.ANY))
                .isInstanceOf(RuntimeException.class);

        verify(mockClient, times(1)).execute_cql3_query(CQL_QUERY, Compression.NONE, ConsistencyLevel.ANY);
        verifyNoMoreInteractions(mockClient);

        verify(mockMetrics, times(1)).recordRead(expectedWeight);
        verifyNoMoreInteractions(mockMetrics);
    }

    @Test
    public void getRangeSlicesRecordsMetricsOnSuccess() throws TException, LimitExceededException {
        List<KeySlice> keySlices = ImmutableList.of();
        when(mockClient.get_range_slices(any(), any(), any(), any(), any())).thenReturn(keySlices);
        QueryWeight expectedWeight =
                ThriftQueryWeighers.getRangeSlices(KEY_RANGE).weighSuccess(keySlices, NANOS_DURATION);

        client.get_range_slices("get", TEST_TABLE, SLICE_PREDICATE, KEY_RANGE, ConsistencyLevel.ANY);

        verify(mockClient, times(1))
                .get_range_slices("get", TEST_TABLE, SLICE_PREDICATE, KEY_RANGE, ConsistencyLevel.ANY);
        verifyNoMoreInteractions(mockClient);

        verify(mockMetrics, times(1)).recordRead(expectedWeight);
        verifyNoMoreInteractions(mockMetrics);
    }

    @Test
    public void getRangeSlicesRecordsMetricsOnFailure() throws TException, LimitExceededException {
        when(mockClient.get_range_slices(any(), any(), any(), any(), any())).thenThrow(new RuntimeException());
        QueryWeight expectedWeight =
                ThriftQueryWeighers.getRangeSlices(KEY_RANGE).weighFailure(new RuntimeException(), NANOS_DURATION);

        assertThatThrownBy(() ->
                        client.get_range_slices("get", TEST_TABLE, SLICE_PREDICATE, KEY_RANGE, ConsistencyLevel.ANY))
                .isInstanceOf(RuntimeException.class);

        verify(mockClient, times(1))
                .get_range_slices("get", TEST_TABLE, SLICE_PREDICATE, KEY_RANGE, ConsistencyLevel.ANY);
        verifyNoMoreInteractions(mockClient);

        verify(mockMetrics, times(1)).recordRead(expectedWeight);
        verifyNoMoreInteractions(mockMetrics);
    }

    @Test
    public void casDoesNotUpdateMetrics() throws TException, LimitExceededException {
        client.cas(
                TEST_TABLE,
                ByteBuffer.allocate(1),
                ImmutableList.of(new Column()),
                ImmutableList.of(new Column()),
                ConsistencyLevel.SERIAL,
                ConsistencyLevel.SERIAL);

        verify(mockClient, times(1))
                .cas(
                        TEST_TABLE,
                        ByteBuffer.allocate(1),
                        ImmutableList.of(new Column()),
                        ImmutableList.of(new Column()),
                        ConsistencyLevel.SERIAL,
                        ConsistencyLevel.SERIAL);
        verifyNoMoreInteractions(mockClient);

        verifyNoMoreInteractions(mockMetrics);
    }
}


text:
from battlesnake.core.ansi import ANSI_HI_GREEN, ANSI_HI_YELLOW, ANSI_HI_RED, \
    ANSI_HI_MAGENTA

# Maps a lowercase weight class nam to a WHERE filter SQL.
WEIGHT_CLASS_SQL_MAP = {
    'light': 'weight < 40',
    'medium': 'weight >= 40 AND weight < 60',
    'heavy': 'weight >= 60 AND weight < 80',
    'assault': 'weight >= 80'
}

UNIT_TYPE_SQL_MAP = {
    'mech': "unit_type='Mech'",
    'tank': "unit_type='Vehicle'",
    'vtol': "unit_type='VTOL'",
    'battlesuit': "unit_type='Battlesuit'",
}

UNIT_WCLASS_LIGHT = "light"
UNIT_WCLASS_MEDIUM = "medium"
UNIT_WCLASS_HEAVY = "heavy"
UNIT_WCLASS_ASSAULT = "assault"

# We use a consistent set of colors for each weight class.
WEIGHT_CLASS_COLOR_MAP = {
    UNIT_WCLASS_LIGHT: ANSI_HI_GREEN,
    UNIT_WCLASS_MEDIUM: ANSI_HI_YELLOW,
    UNIT_WCLASS_HEAVY: ANSI_HI_RED,
    UNIT_WCLASS_ASSAULT: ANSI_HI_MAGENTA,
}


text:
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.

#nullable disable

using System;
using System.ComponentModel.Composition;
using Microsoft.CodeAnalysis.Editor.Shared.Utilities;
using Microsoft.CodeAnalysis.Host.Mef;
using Microsoft.VisualStudio.Text;
using Microsoft.VisualStudio.Text.Classification;
using Microsoft.VisualStudio.Utilities;

namespace Microsoft.CodeAnalysis.Editor.Implementation.IntelliSense.SignatureHelp.Presentation
{
    [Export(typeof(IClassifierProvider))]
    [ContentType(ContentTypeNames.CSharpSignatureHelpContentType)]
    [ContentType(ContentTypeNames.VisualBasicSignatureHelpContentType)]
    internal partial class SignatureHelpClassifierProvider : IClassifierProvider
    {
        private readonly ClassificationTypeMap _typeMap;

        [ImportingConstructor]
        [Obsolete(MefConstruction.ImportingConstructorMessage, error: true)]
        public SignatureHelpClassifierProvider(ClassificationTypeMap typeMap)
            => _typeMap = typeMap;

        public IClassifier GetClassifier(ITextBuffer subjectBuffer)
        {
            return subjectBuffer.Properties.GetOrCreateSingletonProperty<IClassifier>(
                () => new SignatureHelpClassifier(subjectBuffer, _typeMap));
        }
    }
}


text:
from bs4 import BeautifulSoup
import requests
import sys
import re
import pandas as pd
import pprint
import numpy as np
import csv, sys
import base64
import datefinder

import pymongo
from pymongo import MongoClient

uri = 'mongodb://heroku_4jtg3rvf:r9nq5ealpnfrlda5la4fj8r192@ds161503.mlab.com:61503/heroku_4jtg3rvf'
client = MongoClient(uri)
db = client['heroku_4jtg3rvf']

#client = MongoClient('mongodb://localhost:27017/test')
#db = client.test

## consolidating big block of code

orders = db.order_info_from_email
orders = pd.DataFrame(list(orders.find()))
#removing duplicates
del orders['_id']
orders = orders.drop_duplicates()
##here i'm filter out ones that i need to scrape
orders = orders[(orders.status == 'need to scrape')]

columns = ['order_num','zipcode', 'image', 'quantity', 'unit_price', 'item_name', 'size', 'style', 'tracking_num']
#setting up dataframe
df = pd.DataFrame(columns=columns)

for index, row in orders.iterrows():
    order_num = row['order_num']
    if (order_num != 'not available'):
        # print order_num
        match = re.search(r'\b\d{5}(?:-\d{4})?\b',  row['billing_address'])
        zipcode = row['zipcode']

        url = 'https://secure.nordstrom.com/OrderLookupStatus.aspx?ordernum='+order_num+'&zipcode='+zipcode+'&origin=orderinfo'

        html = requests.get(url).text
        soup = BeautifulSoup(html, "html.parser")
        divTag = soup.find_all("div", {"class": "ostatIRBox"})

        order_info = []
        for div in divTag:
             #getting each row
            image = ''
            item_name = ''
            quantity = ''
            unit_price = ''
            style = ''
            tracking_num = ''
            shipping_info = ''
            size = ''

            image = div.find_all('tr')[1].find_all('td')[1].img['src'].encode('utf-8')
            quantity =  div.find_all('tr')[1].find_all('td')[3].text.strip().encode('utf-8')
            unit_price = div.find_all('tr')[1].find_all('td')[4].text.strip().encode('utf-8')
            #shipping_info = div.find_all('tr')[1].find_all('td')[5].text.strip().encode('utf-8')
            item_name = div.find_all('tr')[1].find_all('td')[2].text.strip().encode('utf-8').splitlines()[0]
            size = div.find_all('tr')[1].find_all('td')[2].text.strip().encode('utf-8').splitlines()[6].lstrip()
            style = div.find_all('tr')[1].find_all('td')[2].text.strip().encode('utf-8').splitlines()[12].lstrip()
            if size == 'Size:':
                size = div.find_all('tr')[1].find_all('td')[2].text.strip().encode('utf-8').splitlines()[7].lstrip()
            if style == 'Style:':
                style = div.find_all('tr')[1].find_all('td')[2].text.strip().encode('utf-8').splitlines()[13].lstrip()

            try:
                tracking_num = div.find_all('tr')[1].find_all('td')[5].text.strip().encode('utf-8').splitlines()[3]
            except:
                tracking_num = 'not available'
                pass

            df.loc[len(df)]=[order_num,
                               zipcode,
                               image,
                               quantity,
                               unit_price,
                               item_name,
                               size,
                               style,
                               tracking_num]
            order_info.append((order_num,
                               zipcode,
                               image,
                               quantity,
                               unit_price,
                               item_name,
                               size,
                               style,
                               tracking_num
                              ))
##deleting some of the unnecessary stuff from the orders df to merge
del orders['billing_address']
del orders['status']
del orders['zipcode']

df = pd.merge(df, orders, on='order_num')

##getting additional information and adding to the data frame
for index, row in df.iterrows():
    url2 ='http://shop.nordstrom.com/sr?origin=keywordsearch&keyword=' + row['style']

    html2 = requests.get(url2).text
    soup2 = BeautifulSoup(html2, "html.parser")
    divTag2 = soup2.find_all("article", {"class": re.compile("npr-ahINh npr-product-module large")})

    #if search returns more than 1 result, only look at 1st result
    if len(divTag2) >1: divTag2 = divTag2[0]

    for th2 in divTag2:
            try:
                link3 ='http://shop.nordstrom.com'+th2.find_all('a')[1].get('href')
            except:
                pass
            try:
                image_link_2 = th2.find('img')['src'].encode('utf-8')
                item_name2 = th2.find('img')['alt'].encode('utf-8')
            except:
                image_link_2 = row['image']
                item_name2 = row['item_name']
    df.set_value(index,'link3',link3)
    df.set_value(index,'image_link_2',image_link_2)
    df.set_value(index,'item_name2',item_name2)

##this piece of code saves it to the database :)
for index, row in df.iterrows():
    if (((pd.to_datetime('today') - pd.to_datetime(row['date'])) / np.timedelta64(1, 'D')).astype(int) <15):
        status = 'tracking'
    else:
        status = 'not_eligible'

    dic = {
       'order_num': row['order_num'],
       'zipcode': row['zipcode'],
       'image': row['image'],
       'quantity': row['quantity'],
       'purchase_price': row['unit_price'],
       'item_name': row['item_name'],
       'size': row['size'],
       'style': row['style'],
       'tracking_num': row['tracking_num'],
       'date_placed': row['date'],
       'email': row['email'],
       'retailer': row['retailer'],
       'thread_id': row['thread_id'],
       'link_to_product': row['link3'],
       'image_link_2': row['image_link_2'],
       'item_name_2':row['item_name2'],
       'status': status,
       'last_date_checked': '',
       'price_last_check': '',
       'date_price_reduced': '',
       'reduced_price': '',
       'date_refunded_difference': '',
       'price_difference': ''
    }
    result = db.order_info_item_scrapes.insert_one(dic)

#this changes the status from "need to scrape" to "scraped" in
#the messages database
for index, row in df.iterrows():
    db.order_info_from_email.update_many(
        {"order_num": row['order_num']},
        {"$set": {"status": "scraped"}}
    )

print('testandsuccess')


text:
package net.ontopia.persistence.jdbcspy;

import java.sql.Connection;
import java.sql.Driver;
import java.sql.DriverManager;
import java.sql.DriverPropertyInfo;
import java.sql.SQLException;
import java.sql.SQLFeatureNotSupportedException;
import java.util.Properties;
import net.ontopia.utils.OntopiaRuntimeException;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

/**
 * INTERNAL:
 */

public class SpyDriver implements Driver {

  // Define a logging category.
  private static Logger log = LoggerFactory.getLogger(SpyDriver.class.getName());

  protected static SpyStats stats = new SpyStats();

  protected Driver driver;

  // -- init

  private static boolean initialized;

  static {
    try {
      initialize();
    } catch (Exception e) {
      e.printStackTrace();
    }
  }

  @Override
  public int getMajorVersion() {
    return driver.getMajorVersion();
  }

  @Override
  public int getMinorVersion() {
    return driver.getMinorVersion();
  }

  @Override
  public boolean jdbcCompliant() {
    return driver.jdbcCompliant();
  }

  @Override
  public boolean acceptsURL(String url)
    throws SQLException {
    return url.startsWith("jdbcspy:");
  }

  @Override
  public Connection connect(String url, Properties info)
    throws SQLException {
    String realURL = getRealURL(url);
    if (realURL == null) {
      // stop here as this url was not meant for jdbcspy
      return null;
    }

    if (realURL.startsWith("jdbc:postgresql:")) {
      initDriver("org.postgresql.Driver");
    } else if (realURL.startsWith("jdbc:oracle:")) {
      initDriver("oracle.jdbc.driver.OracleDriver");
    }

    log.debug("Translating connect url: " + url + " -> " + realURL);
    this.driver = DriverManager.getDriver(realURL);
    log.debug("Real driver: " + driver);

    return new SpyConnection(driver.connect(realURL, info), stats);
  }

  @Override
  public DriverPropertyInfo[] getPropertyInfo(String url, Properties info)
    throws SQLException {
    return driver.getPropertyInfo(url, info);
  }

  // -- helper

  protected String getRealURL(String url) {
    return (url.startsWith("jdbcspy:") ? url.substring("jdbcspy:".length()) : null);
  }

  private static void initialize() throws SQLException {
    if (initialized) {
      return;
    }

    // register driver
    SpyDriver driver = new SpyDriver();
    DriverManager.registerDriver(driver);

    // set initialization flag to true
    SpyDriver.initialized = true;
  }

  private static void initDriver(String driverClass) {
    try {
      ClassLoader classLoader = Thread.currentThread().getContextClassLoader();
      Class.forName(driverClass, true, classLoader);
    } catch (ClassNotFoundException e) {
      // ignore if not exists
    }
  }

  public static void unregister() {
    try {
      DriverManager.deregisterDriver(DriverManager.getDriver("jdbcspy:"));
    } catch (SQLException sqle) {
      // ignore if it doesn't exist
    }
  }

  // -- report generation

  public static void clearStats() {
    synchronized (stats) {
      stats.profiler.clear();
    }
    log.debug("JDBCSpy stats cleared.");
  }

  public static void writeReport(String filename) throws java.io.IOException {
    java.io.FileWriter out = new java.io.FileWriter(filename);
    try {
      stats.generateReport(out);
    } finally {
      out.close();
    }
    log.debug("JDBCSpy report written to " + filename);
  }

  public static void writeReport(java.io.Writer out) throws java.io.IOException {
    try {
      stats.generateReport(out);
    } catch (java.io.IOException e) {
      throw new OntopiaRuntimeException(e);
    }
  }

  // J2EE 1.7 specifics - comment out remainder of methods if you have to use java 1.6 or lower

  @Override
  public java.util.logging.Logger getParentLogger() throws SQLFeatureNotSupportedException {
    throw new SQLFeatureNotSupportedException("JDBC Spy does not use JUL logging");
  }
}


text:
using UnityEngine;
using System.Collections;

public class DestroyOnTouch : MonoBehaviour {

	public GameObject objectToBeDestroyed;

	// Use this for initialization
	void Start () {

	}

	// Update is called once per frame
	void Update () {

	}

	void OnTriggerEnter(Collider col){
		if(col.tag == "Player"){
			objectToBeDestroyed.SetActive(false);
		}
	}
}