text:
<?php
/**
 * Single checkbox field.
 * @package forms
 * @subpackage fields-basic
 */
class CheckboxField extends FormField {

	protected $disabled;

	function setValue($value) {
		$this->value = ($value) ? 1 : 0;
	}

	function dataValue() {
		return ($this->value) ? 1 : 0;
	}

	function Value() {
		return ($this->value) ? 1 : 0;
	}

	function Field() {
		$attributes = array(
			'type' => 'checkbox',
			'class' => ($this->extraClass() ? $this->extraClass() : ''),
			'id' => $this->id(),
			'name' => $this->Name(),
			'value' => 1,
			'checked' => $this->value ? 'checked' : '',
			'tabindex' => $this->getTabIndex()
		);

		if($this->disabled) $attributes['disabled'] = 'disabled';

		return $this->createTag('input', $attributes);
	}

	/**
	 * Checkboxes use the RightLabelledFieldHolder template, to put the field on the left
	 * and the label on the right.  See {@link FormField::FieldHolder} for more information about
	 * how FieldHolder works.
	 */
	function FieldHolder() {
		if($this->labelLeft) {
			return parent::FieldHolder();
		} else {
			extract($this->getXMLValues(array( 'Name', 'Field', 'Title', 'Message', 'MessageType' )),
				EXTR_SKIP);
			$messageBlock = isset($Message) ? "$Message" : '';
			$Type = $this->XML_val('Type');
			return <<<HTML

	$Field
	id()}">$Title
	$messageBlock

HTML;

		}
	}

	function useLabelLeft( $labelLeft = true ) {
		$this->labelLeft = $labelLeft;
	}

	/**
	 * Returns a restricted field holder used within things like FieldGroups
	 */
	function SmallFieldHolder() {
		$result = $this->Field();
		if($t = $this->Title()) {
			$result .= "id() ."\">$t ";
		}
		return $result;
	}

	/**
	 * Returns a readonly version of this field
	 */

	function performReadonlyTransformation() {
		$field = new CheckboxField_Readonly($this->name, $this->title, $this->value ? _t('CheckboxField.YES', 'Yes') : _t('CheckboxField.NO', 'No'));
		$field->setForm($this->form);
		return $field;
	}

	function performDisabledTransformation() {
		$clone = clone $this;
		$clone->setDisabled(true);
		return $clone;
	}
}

/**
 * Readonly version of a checkbox field - "Yes" or "No".
 * @package forms
 * @subpackage fields-basic
 */
class CheckboxField_Readonly extends ReadonlyField {
	function performReadonlyTransformation() {
		return clone $this;
	}

	function setValue($val) {
		$this->value = ($val) ? _t('CheckboxField.YES', 'Yes') : _t('CheckboxField.NO', 'No');
	}
}

/**
 * Single checkbox field, disabled
 * @package forms
 * @subpackage fields-basic
 */
class CheckboxField_Disabled extends CheckboxField {

	protected $disabled = true;

	/**
	 * Returns a single checkbox field - used by templates.
	 */
	function Field() {
		$attributes = array(
			'type' => 'checkbox',
			'class' => 'text' . ($this->extraClass() ? $this->extraClass() : ''),
			'id' => $this->id(),
			'name' => $this->Name(),
			'tabindex' => $this->getTabIndex(),
			'checked' => ($this->value) ? 'checked' : false,
			'disabled' => 'disabled'
		);

		return $this->createTag('input', $attributes);
	}
}
?>


text:
StoryScene::StoryScene(void)
{
}

StoryScene::~StoryScene(void)
{
}

bool StoryScene::init()
{
	if(!CCScene::init())
    {
        return false;
    }
	CCSize visibleSize = CCDirector::sharedDirector()->getVisibleSize();
    CCPoint origin = CCDirector::sharedDirector()->getVisibleOrigin();
	//add background
	CCSprite* background = CCSprite::create(Loader::story_bg);

    // position the sprite on the center of the screen
    background->setPosition(ccp(visibleSize.width/2 + origin.x, visibleSize.height/2 + origin.y));

	//back menu
	FlowMenu* back = FlowMenu::create();
	back->backGenerate(storytomain);

    // add the sprite as a child to this layer
    this->addChild(background, 0);
	this->addChild(back, 0);

	return true;
}

redpajama_set_name: RedPajamaGithub


text:
/**
 * Contains cache randomized eviction policy implementations.
 */

package org.apache.ignite.cache.eviction.random;


text:
This python code simply crawls the given web addresses for potential emails and saves those in a text file. Web URLs have to be specified in a text file separated by newline.

## Motivation

This can be helpful script to automate the task of finding relevant email addresses provided one knows the associated web URLs.

## Dependencies
The python modules are needed in order to use this library.
```
sys
urllib
```

## Usage
Clone the repository and use the following code.
Run the command directly from the console with command line arguments to the file emailcrawler.py. The command line arguments are explained as:

```
emailcrawler.py [filename]

```
For example,

```sh
$ python emailcrawler.py example.txt
```
example.txt contains newline separated web URLs on which the email addresses are to be located and saved. This command saves three text files, namely, email_addresses.txt (containing email addresses found), email_addresses_withurl.txt (contains email addresses mapped with associated urls) and info.txt (general information on number of pages crawled and number od emails found).

## Contributors

#### Author: Ankit Aggarwal

## License

[MIT License](https://github.com/ankitaggarwal011/email-crawler/blob/master/LICENSE)


text:
title: Get Apple Time Capsule to work with Comcast
author: Justin Ball
layout: post
permalink: "/2010/08/03/get-apple-time-capsule-to-work-with-comcast/"
tags:
  - "Apple Time Capsule"
  - "Comcast"
date: '2010-08-03T06:00:00Z'
templateKey: blog-post
path: "/get-apple-time-capsule-to-work-with-comcast"
description: ''
---

I bought an Apple Time Capsule after my HP 495EX failed to backup my Macs reliably. I was excited since it replaced an old Linksys that didn't have wireless-n.

I figured it would be a fast switch. I was wrong. I spend several hours configuring the router and couldn't figure out why it wouldn't connect.

Turns out the router is not to blame. There's a lot of discussion about how to get it to work:

http://discussions.apple.com/thread.jspa?threadID=2085255&tstart=0

http://macosx.com/forums/mac-os-x-system-mac-software/273154-airport-doesnt-work-comcast.html

http://discussions.apple.com/thread.jspa?threadID=1444429&start=15&tstart=0

http://discussions.apple.com/thread.jspa?messageID=11955317

http://discussions.info.apple.com/thread.jspa?threadID=2300001

http://boards.fool.com/Message.asp?mid=26476796&sort=whole

If you call Comcast they will tell you to call Apple. I couldn't find an Apple number but I'm betting they will tell you to call Comcast.

The summary of all the discussion is basically:

1.  Turn off your Comcast Cable Modem and let it sit for a minute or two.
2.  If it has a battery, pull out the battery.
3.  Make sure your Time Capsule is unplugged.
4.  Plug in the cable modem. Let it startup for a few minutes
5.  Plug in the Time Capsule. Wait a few and it should come up with a green light.

That's it. It did take a couple of tries for everything to reset and get working, but it's better than spending hours reconfiguring the Time Capsule trying to figure out why the cable modem won't talk to it.


text:
<?php
/**
 * AiryMVC Framework
 *
 * @category AiryMVC
 * @license New BSD license - at this URL: http://opensource.org/licenses/BSD-3-Clause
 * @author: Hung-Fu Aaron Chang
 */

/**
 * A class is used for factory pattern of Validator.
 *
 * @filesource
 * @package framework\app\library\ui\html\form\validation\ValidatorFactory
 * @license New BSD license - at this URL: http://opensource.org/licenses/BSD-3-Clause
 */
class ValidatorFactory {

	/**
	 * @param string $validatorClassName
	 * @return string|NULL
	 */
    public function create($validatorClassName) {
        if (class_exists($validatorClassName)) {
            return new $validatorClassName();
        }

        return null;
    }
}

?>


text:
namespace Wa45Aspx
{
    using System;
    using System.Globalization;
    using System.Web;

    public partial class RandomIdPage : System.Web.UI.Page
    {
        private static int requestCountNotFromCache = 0;

        protected void Page_Load(object sender, EventArgs e)
        {
            // Cache on server
            DateTime now = DateTime.Now;
            TimeSpan freshness = TimeSpan.FromDays(1);

            Response.Cache.SetExpires(now.Add(freshness));
            Response.Cache.SetMaxAge(freshness);
            Response.Cache.SetCacheability(HttpCacheability.Server);
            Response.Cache.SetValidUntilExpires(true);

            this.Response.AddHeader("Test_Random", Guid.NewGuid().ToString("N"));

            this.label1.InnerText = requestCountNotFromCache.ToString(CultureInfo.InvariantCulture);
            ++requestCountNotFromCache;
        }
    }
}


text:
	*_id(s): Reference to a block_id
	*_block: Offset to a block
	ofs_*: Any other offset (relative or absolute)
	num_*: Number of repeated structures
	len_*: Size/Length of a structure
	type_*: Switch for different kinds of substructures

## Unknown
	unknown_8: Bytes with unknown purpose, suffix is the offset in bytes


text:
package com.rambird.repository.springdatajpa;

import java.util.Collection;

import javax.persistence.EntityManager;
import javax.persistence.PersistenceContext;
import javax.persistence.Query;

import org.springframework.stereotype.Repository;

import com.rambird.model.Owner;
import com.rambird.repository.OwnerRepository;

/**
 * Using native JPA instead of Spring Data JPA here because of this query: "SELECT owner FROM Owner owner left join
 * fetch owner.pets WHERE owner.lastName LIKE :lastName" See https://jira.springsource.org/browse/DATAJPA-292 for more
 * details.
 *
 * @author Michael Isvy
 */
@Repository
public class JpaOwnerRepositoryImpl implements OwnerRepository {

    @PersistenceContext
    private EntityManager em;

    @Override
    @SuppressWarnings("unchecked")
    public Collection<Owner> findByLastName(String lastName) {
        // using 'join fetch' because a single query should load both owners and pets
        // using 'left join fetch' because it might happen that an owner does not have pets yet
        Query query = this.em.createQuery("SELECT DISTINCT owner FROM Owner owner left join fetch owner.pets WHERE upper(owner.lastName) LIKE upper(:lastName)");
        query.setParameter("lastName", lastName + "%");
        return query.getResultList();
    }

    @Override
    public Owner findById(int id) {
        // using 'join fetch' because a single query should load both owners and pets
        // using 'left join fetch' because it might happen that an owner does not have pets yet
        Query query = this.em.createQuery("SELECT owner FROM Owner owner left join fetch owner.pets WHERE owner.id =:id");
        query.setParameter("id", id);
        return (Owner) query.getSingleResult();
    }

    @Override
    public void save(Owner owner) {
        this.em.merge(owner);

    }

}


text:
// This file is automatically generated.

package adila.db;

/*
 * Motorola Moto E (2nd Gen)
 *
 * DEVICE: otus_ds
 * MODEL: MotoE2
 */
final class otus5fds_motoe2 {
    public static final String DATA = "Motorola|Moto E (2nd Gen)|";
}


text:
<!--
  ~ This is part of Geomajas, a GIS framework, http://www.geomajas.org/.
  ~
  ~ Copyright 2008-2015 Geosparc nv, http://www.geosparc.com/, Belgium.
  ~
  ~ The program is available in open source according to the Apache
  ~ License, Version 2.0. All contributions in this program are covered
  ~ by the Geomajas Contributors License Agreement. For full licensing
  ~ details, see LICENSE.txt in the project root.
  -->

<configuration>

	<appender name="CONSOLE" class="ch.qos.logback.core.ConsoleAppender">
		<encoder class="ch.qos.logback.classic.encoder.PatternLayoutEncoder">
			<pattern>%d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n</pattern>
		</encoder>
	</appender>

	<!--
	<logger name="org.geomajas.internal.service.pipeline" level="DEBUG"/>
	-->

	<root>
		<level value="OFF"/>
		<appender-ref ref="CONSOLE"/>
	</root>

</configuration>


text:
package jetbrains.jetpad.base.edt;

public class RunningEdtManagerFactory implements EdtManagerFactory {
  @Override
  public EdtManager createEdtManager(String name) {
    return new RunningEdtManager(name);
  }
}


text:
<?xml version="1.0"?>
<!DOCTYPE hibernate-mapping PUBLIC
        "-//Hibernate/Hibernate Mapping DTD//EN"
        "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">

<hibernate-mapping default-lazy="false">
	<class name="org.olat.course.statistic.orgtype.OrgTypeStat"
		table="o_stat_orgtype">

		<id name="key"                  column="id"          type="long" unsaved-value="null">
			<generator class="hilo" />
		</id>
		<property name="businessPath"   column="businesspath"		type="string"	length="2048" not-null="true" />
		<property name="resId"			column="resid"				type="long"		not-null="true"/>
		<property name="orgType"    	column="orgtype"     		type="string"	length="255"/>
		<property name="value"    		column="value"				type="int"		not-null="true"/>

	</class>
</hibernate-mapping>


text:
<!-- Latitude and Longitude markers for car data -->
<!-- Data from CalCars.org -->
<!-- Author: squinn@google.com (Siobhan Quinn) -->

<!-- Definitions:                                                         -->
<!-- converter: the company that converted the car                        -->
<!-- converter_website: the website of the company that converted the car -->
<!-- date: the date the car was converted                                 -->
<!-- desc: a description of the vehicle                                   -->
<!-- lat: the latitude of the marker                                      -->
<!-- lng: the longitude of the marker                                     -->
<!-- location: the human readable location of the car                     -->
<!-- minzoom: min zoom level for the marker (default is 3)                -->
<!-- owner: the car's owner                                               -->
<!-- owner_website: the owner's website                                   -->

<!-- Group these images by region so we can easily decide which zoom      -->
<!-- to put the marker at. If a lot of markers are clustered, set         -->
<!-- minzoom="5" or minzoom="6"                                           -->

<!-- Midwest -->
<markers>
  <marker
    lat="45.175015" lng="-93.213377"
    owner="Hourcar"
    owner_website="http://www.hourcar.org"
    date="August 2006"
    converter="Hymotion"
    converter_website="http://www.hymotion.com"
    location="Twin Cities, MN">
  </marker>

  <marker
    minzoom="5"
    lat="41.86612" lng="-88.11063"
    owner="Chris Ewert"
    owner_website="http://www.eaa-phev.org/wiki/User:Cewert"
    date="April 2007"
    converter="Did it themselves!"
    desc="EAA-PHEV with modified mounting method"
    converter_website="http://www.eaa-phev.org/wiki/User:Cewert"
    location="Wheaton, IL">
  </marker>

  <marker
    minzoom="6"
    lat="41.84508" lng="-87.82298"
    owner="Todd Dore and Fox Valley Electric Auto Association"
    owner_website="http://www.fveaa.org/"
    desc="GrayPearl EAA-PHEV/Manzanita Micro-style Design"
    date="November 2006"
    converter="Fox Valley Electric Auto Association"
    converter_website="http://www.fveaa.org/"
    location="N. Riverside, IL">
  </marker>

  <marker
    minzoom="0"
    lat="43.15967" lng="-89.14757"
    owner="Wisconsin Public Power Inc."
    owner_website="http://www.wppisys.org/"
    date="May 2007"
    converter="Hymotion"
    converter_website="http://www.hymotion.com"
    location="Sun Prairie, WI"
    image="http://www.google.org/images/carmap/39.jpg"
    image_large="http://www.google.org/images/carmap/39_large.jpg">
  </marker>

  <marker
    lat="41.8346"
    lng="-87.628893"
    owner="Illinois Institute of Technology"
    owner_website="http://www.iit.edu/"
    date="March 2007"
    desc="Ford Escape Hybrid"
    converter="All Cell Technologies"
    converter_website="http://www.allcelltech.com/"
    image="http://www.google.org/images/carmap/iit-ccmtce-escape-thumb.jpg"
    image_large="http://www.google.org/images/carmap/iit-ccmtce-escape-large.jpg"
    location="Chicago, IL">
  </marker>

  <marker
    lat="41.713"
    lng="-87.961"
    owner_website="http://www.anl.gov/"
    owner="Argonne National Labs"
    converter_website="http://www.hybrids-plus.com/pmwiki/index.php?n="Ext.Conversion5"
    desc="PHEV Prius"
    converter="Hybrids Plus"
    date="July 2007"
    location="Chicago, IL">
  </marker>

  <marker
    lat="43.201"
    lng="-89.204"
    owner_website="http://www.wppisys.org/"
    owner="Wisconsin Public Power Inc"
    converter="Hymotion"
    date="July 2007"
    location="Sun Prairie, WI"
    image_large="http://www.calcars.org/images/where-phevs-are/wpp2-full.jpg">
  </marker>

  <marker
    lat="46.835"
    lng="-100.765"
    owner_website="http://www.basinelectric.com/"
    owner="Basin Electric Power Cooperative"
    desc="2008 Ford Escape"
    converter="Hymotion"
    date="Oct 2007"
    location="Bismarck, ND"
    image_large="http://www.calcars.org/images/where-phevs-are/basin-electric-plugin.jpg">
  </marker>

<!-- Southern California -->
  <marker
    lat="34.143181" lng="-118.055286"
    minzoom="5"
    owner="Southern California Edison"
    owner_website="http://www.sce.com/"
    date="August 2006"
    converter="EnergyCS"
    converter_website="http://www.energycs.org"
    location="Los Angeles County, CA">
  </marker>

  <marker
    lat="34.02" lng="-117.8"
    minzoom="7"
    owner="South Coast Air Quality Management District"
    owner_website="http://www.aqmd.gov/"
    date="August 2006"
    converter="EnergyCS"
    converter_website="http://www.energycs.org"
    location="Diamond Bar, CA">
  </marker>

  <marker
    minzoom="0"
    lat="34.000283" lng="-117.829973"
    date="March 2006"
    owner="South Coast Air Quality Management District"
    owner_website="http://www.aqmd.gov/"
    converter="EnergyCS"
    converter_website="http://www.energycs.com"
    location="Diamond Bar, CA"
    image="http://www.google.org/images/carmap/7.jpg">
  </marker>

  <marker
    minzoom="4"
    lat="33.812" lng="-118.295505"
    owner="EnergyCS"
    owner_website="http://www.energycs.com"
    date="March 2005"
    converter="Greg Hanssen, Pete Nortman and team."
    converter_website="http://www.energycs.com"
    location="Los Angeles County, CA"
    image="http://www.google.org/images/carmap/2.jpg">
  </marker>

  <marker
    minzoom="6"
    lat="33.9" lng="-118"
    owner="EnergyCS / Clean-Tech"
    owner_website="http://www.energycs.com"
    date="May 2005"
    converter="EnergyCS"
    converter_website="http://www.energycs.com"
    location="Los Angeles County, CA"
    image="http://www.google.org/images/carmap/3.jpg">
  </marker>

  <marker
    minzoom="6"
    lat="34.01132" lng="-118.49195"
    owner="City of Santa Monica"
    owner_website="http://www.smgov.net"
    date="May 2006"
    converter="EnergyCS"
    converter_website="http://www.energycs.com"
    location="Santa Monica, CA">
  </marker>

  <marker
    minzoom="6"
    lat="34.178"
    lng="-118.316"
    owner="Burbank Water and Power"
    owner_website="http://www.burbankwaterandpower.com/phev.html"
    converter="Energy CS"
    desc="2007 Prius"
    date="May 2007"
    location="Burbank, CA"
    image_large="http://www.calcars.org/images/photos/burbank-water-power-full.jpg">
  </marker>

  <marker
    minzoom="2"
    lat="32.72"
    lng="-117.164"
    owner_website="http://www.sdge.com/"
    owner="San Diego Gas & Electric"
    desc="SDGE Prius #1"
    converter_website="http://www.greengears.net/"
    converter="Green Gears"
    location="San Diego, CA"
    date="July, 2007">
  </marker>

  <marker
    minzoom="6"
    lat="32.72"
    lng="-117.164"
    owner_website="http://www.sdge.com/"
    owner="San Diego Gas & Electric"
    desc="SDGE Prius #2"
    converter_website="http://www.greengears.net/"
    converter="Green Gears"
    location="San Diego, CA"
    date="July, 2007">
  </marker>

  <marker
    minzoom="5"
    lat="34.062"
    lng="-118.333"
    owner_website="http://www.midway-group.com/"
    owner="Midway Group"
    converter_website="http://www.hybrids-plus.com/pmwiki/index.php?n="Ext.Conversion9"
    desc="Prius"
    converter="Hybrids Plus"
    date="Oct 2007"
    location="Los Angeles CA">
  </marker>

  <marker
    minzoom="6"
    lat="34.058"
    lng="-118.249"
    owner_website="http://www.ladwp.com/"
    owner="Los Angeles Water District"
    desc="Prius"
    converter="Hymotion/Green Gears"
    converter_website="http://www.greengears.net/"
    date="December 2007"
    location="Los Angeles, CA">
  </marker>

  <marker
    minzoom="7"
    lat="34.058"
    lng="-118.249"
    owner_website="http://www.ladwp.com/"
    owner="Los Angeles Water District"
    desc="Prius"
    converter="Hymotion/Green Gears"
    converter_website="http://www.greengears.net/"
    date="December 2007"
    location="Los Angeles, CA">
  </marker>

  <marker
    minzoom="6"
    lat="34.182"
    lng="-118.308"
    owner="Rick Eye"
    converter_website="http://www.go100mpg.com/"
    converter="GO100mpg"
    desc="Prius+ conversion, EAA-PHEV method, using Plug-In Supply's PbA system"
    date="February 2008"
    location="Burbank, CA"
    image_large="http://www.calcars.org/images/photos/go100mpg.jpg">
  </marker>

<!-- Colorado -->

  <marker
    minzoom="6"
    lat="40.01527" lng="-105.27911"
    owner="State of Colorado Energy Office"
    owner_website="http://www.state.co.us/oemc/"
    date="September 2006"
    converter="Hybrids Plus"
    converter_website="http://www.hybridsplus.com/"
    location="Boulder, CO">
  </marker>

  <marker
   minzoom="1"
   lat="39.582348" lng="-104.838927"
   owner="Nilar, Inc"
   owner_website="http://www.nilar.com/"
   converter="Did it themselves!"
   desc="EAA-PHEV with Nilar NiMH batteries"
   converter_website="http://www.eaa-phev.org"
   date="May 2007"
   location="Centennial, CO"
   image="http://www.google.org/images/carmap/nilar_thumb.jpg">
  </marker>

  <marker
    minzoom="2"
    lat="39.756"
    lng="-105.22"
    owner="NREL"
    owner_website="http://www.nrel.gov/"
    date="June 2006"
    desc="Toyota Prius"
    converter="EnergyCS"
    location="Golden, CO">
  </marker>

  <marker
    minzoom="2"
    lat="32.783"
    lng="-79.931"
    owner_website="http://www.hybrids-plus.com/pmwiki/index.php?n="Ext.Conversion8"
    owner="Hybrids Plus"
    desc="Prius"
    converter_website="http://www.hybrids-plus.com/"
    converter="Hybrids Plus"
    date="Sept 2007"
    location="Boulder CO">
  </marker>

  <marker
    minzoom="6"
    lat="40.031"
    lng="-105.279"
    owner="Private individual"
    desc="Prius"
    converter_website="http://www.hybrids-plus.com/"
    converter="Hybrids Plus"
    date="Oct 2007"
    location="Boulder CO">
  </marker>

  <marker
    minzoom="5"
    lat="40.024"
    lng="-105.25"
    owner="Private Individual"
    converter_website="http://www.hybrids-plus.com/pmwiki/index.php?n="Ext.Conversion10"
    desc="Prius"
    converter="Hybrids Plus"
    date="Nov 2007"
    location="Boulder, CO">
  </marker>

  <marker
    minzoom="4"
    lat="38.877"
    lng="-106.963"
    owner_website="http://www.alisongannett.com/"
    owner="Office for Resource Efficiency"
    converter_website="http://www.hybrids-plus.com/pmwiki/index.php?n="Ext.Conversion20"
    desc="Escape"
    converter="Hybrids Plus"
    date="January 16, 2008"
    location="Crested Butte, CO">
  </marker>

<!-- South West -->
  <marker
    minzoom="2"
    lat="33.443827" lng="-112.076398"
    owner="Electric Transportation Applications and Electric Transportation Engineering Corporation ETEC"
    owner_website="http://avt.inl.gov/phev.shtml"
    location="Phoenix, AZ"
    converter="EnergyCS"
    converter_website="http://www.energycs.com" >
  </marker>

  <marker
    minzoom="7"
    lat="33.44793" lng="-112.08254"
    owner="Electric Transportation Applications and Electric Transportation Engineering Corporation ETEC"
    owner_website="http://avt.inl.gov/phev.shtml"
    location="Phoenix, AZ"
    converter="Hymotion"
    converter_website="http://www.hymotion.com"
    desc="Prius">
  </marker>

  <marker
    minzoom="6"
    lat="32.783"
    lng="-79.931"
    owner_website="http://www.plugincarolina.org/"
    owner="Plug-In Hybrid Coalition of the Carolinas"
    converter_website="http://www.hybrids-plus.com/pmwiki/index.php?n="Ext.Conversion17"
    desc="PHEV Prius"
    converter="Hybrids Plus"
    date="Oct 2007"
    location="Charleston, SC">
  </marker>

  <marker
    minzoom="5"
    lat="34.545"
    lng="-77.953"
    owner_website="http://www.fourcty.org/"
    owner="Four County EMC"
    desc="2007 Prius"
    converter="Hymotion"
    date="Oct 2007"
    location="Burgaw, NC"
    image_large="http://www.calcars.org/images/where-phevs-are/fourcty-crn-prius.jpg">
  </marker>

<!-- Canada -->
  <marker
    minzoom="1"
    lat="49.89942" lng="-97.14073"
    owner="Manitoba Hydro"
    owner_website="http://www.hydro.mb.ca/"
    date="September 2006"
    converter="EnergyCS"
    converter_website="http://www.energycs.com"
    location="Winnipeg, Manitoba">
  </marker>

  <marker
    minzoom="5"
    lat="49.805976" lng="-97.138688"
    date="April 2007"
    owner="University of Manitoba"
    owner_website="http://www.umanitoba.ca/"
    converter="Hymotion"
    converter_website="http://www.hymotion.com"
    location="Winnipeg, Manitoba">
  </marker>

  <marker
    minzoom="5"
    lat="43.85076" lng="-79.02105"
    owner="Veridian Corp."
    owner_website="www.veridian.on.ca"
    date="September 2006"
    converter="Hymotion"
    converter_website="http://www.hymotion.com"
    location="Ajax, Ontario">
  </marker>

  <marker
    minzoom="1"
    lat="43.64854" lng="-79.38537"
    owner="Hymotion"
    owner_website="http://www.hymotion.com/"
    date="February 2006"
    converter="Hymotion"
    converter_website="http://www.hymotion.com/"
    location="Toronto, Ontario"
    image="http://www.google.org/images/carmap/5.jpg">
  </marker>

  <marker
    minzoom="7"
    lat="43.669"
    lng="-79.385"
    owner_website="http://www.toronto.ca/fleet/index.htm/"
    owner="City of Toronto"
    desc="Prius"
    converter="Hymotion"
    date="August 2007"
    location="Toronto, ON, Canada">
  </marker>

  <marker
    minzoom="7"
    lat="43.687"
    lng="-79.4"
    owner_website="http://www.ene.gov.on.ca/"
    owner="Ontario Ministry of the Environment"
    desc="Prius"
    converter="Hymotion"
    date="August 2007"
    location="Toronto, ON, Canada">
  </marker>

  <marker
    minzoom="6"
    lat="43.664"
    lng="-79.389"
    owner_website="http://www.ene.gov.on.ca/"
    owner="Ontario Ministry of the Environment"
    desc="Prius"
    converter="Hymotion"
    date="August 2007"
    location="Toronto, ON, Canada">
  </marker>

  <marker
    minzoom="7"
    lat="43.681"
    lng="-79.381"
    owner_website="http://www.autoshare.com/"
    owner="AutoShare"
    desc="Prius"
    converter="Hymotion"
    date="September 2007"
    location="Toronto, ON, Canada">
  </marker>

  <marker
    minzoom="7"
    lat="43.681"
    lng="-79.381"
    owner_website="http://www.torontohydro.com/"
    owner="Toronto Hydro"
    desc="Prius"
    converter="Hymotion"
    date="October 2007"
    location="Toronto, ON, Canada">
  </marker>

  <marker
    minzoom="7"
    lat="43.647"
    lng="-79.395"
    owner_website="http://www.bullfrogpower.com/"
    owner="Bullfrog Power"
    desc="Prius"
    converter="Hymotion"
    date="November 2007"
    location="Toronto, ON, Canada">
  </marker>

  <marker
    minzoom="5"
    lat="43.654"
    lng="-79.384"
    owner_website="http://www.yorku.ca/"
    owner="York University"
    desc="Prius"
    converter="Hymotion"
    date="November 2007"
    location="Toronto, ON, Canada">
  </marker>

  <marker
    minzoom="6"
    lat="43.654"
    lng="-79.384"
    owner_website="http://www.utoronto.ca/"
    owner="University of Toronto"
    desc="Ford Escape Hybrid"
    converter="Hymotion"
    date="December 2007"
    location="Toronto, ON, Canada">
  </marker>

<!-- DC Area -->
  <marker
    minzoom="4"
    lat="38.97673" lng="-76.48991"
    owner="Costar Corporation"
    owner_website="http://www.costar.com"
    date="October 2006"
    converter="Hymotion"
    converter_website="http://www.hymotion.com"
    location="Annapolis, MD">
  </marker>

  <marker
    minzoom="6"
    lat="38.88951" lng="-77.032"
    owner="A123 Systems"
    owner_website="http://www.a123systems.com/newsite/index.php#/home/phev/"
    converter="Hymotion"
    converter_website="http://www.hymotion.com"
    date="February 2007"
    location="W`ashington, DC">
  </marker>

  <marker
    minzoom="2"
    lat="38.84151" lng="-77.30812"
    owner="Fairfax County, VA"
    owner_website="http://www.fairfaxcounty.gov"
    date="November 2006"
    converter="Hymotion"
    converter_website="http://www.hymotion.com"
    location="Fairfax County, VA">
  </marker>

<!-- Central Washington -->
  <marker
    minzoom="5"
    lat="47.464988" lng="-120.335507"
    owner="Advanced Vehicle Innovations"
    owner_website="http://www.plugincenter.com"
    date="October 2006"
    desc="WhiteBird"
    converter="Manzanita Micro"
    converter_website="http://www.manzanitamicro.com"
    location="Chelan County, WA">
  </marker>

  <marker
    minzoom="4"
    lat="47.990322" lng="-120.400036"
    owner="Lake Chelan School District"
    owner_website="http://www.chelanschools.org/"
    date="June 2007"
    location="Chelan, WA"
    converter="Advanced Energy"
    converter_website="http://www.hybridschoolbus.org/"
    desc="Plug-in Hybrid School Bus"
    image="http://www.google.org/images/carmap/wake-bus-thumb.jpg"
    image_large="http://www.google.org/images/carmap/wake-bus-large.jpg">
   </marker>

  <marker
    minzoom="5"
    lat="38.806"
    lng="-77.042"
    owner="John Clinton"
    desc="2004 Prius+ PbA conversion"
    converter_website="http://www.harveyev.com/"
    converter="Harvey EV"
    date="January 2008"
    location="Alexandria, VA">
  </marker>

  <marker
    lat="38.978"
    lng="-76.489"
    minzoom="4"
    owner="James Woolsey (former CIA Director, Co-Founder SetAmericaFree)"
    desc="Prius"
    converter="Hymotion"
    date="March 2008"
    location="Annapolis, Md">
  </marker>

<!-- Silicon Valley -->
  <marker
    minzoom="7"
    lat="37.44462" lng="-122.16077"
    owner="Thesen-Kramer Family"
    date="November 2006 "
    converter="Did it themselves!"
    converter_website="http://www.eaa-phev.org/wiki/PriusPlus"
    desc="CalCars-EAA-PHEV. A Prototype for Do-It-Yourself Project"
    location="Palo Alto, CA">
  </marker>

  <marker
    minzoom="1"
    lat="37.48412" lng="-122.22712"
    owner="Calcars/Felix Kramer"
    owner_website="http://www.calcars.org"
    date="March 2006"
    converter="EnergyCS"
    converter_website="http://www.energycs.com"
    location="San Mateo County, CA"
    image="http://www.google.org/images/carmap/8.jpg"
    image_large="http://www.google.org/images/carmap/8_large.jpg">
  </marker>

  <marker
    minzoom="6"
    lat="37.416579" lng="-122.08048"
    owner="Google"
    owner_website="http://www.google.org/recharge/index.html"
    date="February 2007"
    converter="Hymotion"
    converter_website="http://www.hymotion.com"
    image="http://www.google.org/images/carmap/google1.jpg"
    location="Mountain View, CA">
  </marker>

  <marker
    lat="37.423111" lng="-122.081783"
    minzoom="7"
    owner="Google"
    owner_website="http://www.google.org/recharge/index.html"
    date="February 2007"
    converter="Hymotion"
    converter_website="http://www.hymotion.com"
    image="http://www.google.org/images/carmap/google2.jpg"
    location="Mountain View, CA">
  </marker>

  <marker
    lat="37.420593" lng="-122.07244"
    minzoom="7"
    owner="Google"
    owner_website="http://www.google.org/recharge/index.html"
    date="February 2007"
    converter="Hymotion"
    converter_website="http://www.hymotion.com"
    image="http://www.google.org/images/carmap/google3.jpg"
    location="Mountain View, CA">
  </marker>

  <marker
    lat="37.417912" lng="-122.085307"
    minzoom="7"
    owner="Google"
    owner_website="http://www.google.org/recharge/index.html"
    date="February 2007"
    converter="Hymotion"
    converter_website="http://www.hymotion.com"
    image="http://www.google.org/images/carmap/google4.jpg"
    location="Mountain View, CA">
  </marker>

  <marker
    lat="37.4188" lng="-122.0801"
    minzoom="7"
    owner="Google"
    owner_website="http://www.google.org/recharge/index.html"
    date="February 2007"
    converter="Hymotion"
    converter_website="http://www.hymotion.com"
    image="http://www.google.org/images/carmap/google5.jpg"
    location="Mountain View, CA">
  </marker>

  <marker
    lat="37.420793" lng="-122.083488"
    minzoom="7"
    owner="Google"
    owner_website="http://www.google.org/recharge/index.html"
    date="February 2007"
    converter="Hymotion"
    converter_website="http://www.hymotion.com"
    image="http://www.google.org/images/carmap/google6.jpg"
    location="Mountain View, CA">
  </marker>

  <marker
    minzoom="5"
    lat="37.471"
    lng="-122.197"
    owner="Joe & Jill Lervold"
    converter_website="http://www.lusciousgarage.com/"
    converter="Luscious Garage"
    desc="Prius+ conversion, EAA-PHEV, using Plug-In Supply's PbA system"
    date="February 2008"
    location="Atherton, CA">
  </marker>

<!-- Idaho -->
  <marker
    lat="43.49204" lng="-112.04196"
    minzoom="4"
    owner="Idaho National Laboratory of US Department of Energy"
    owner_website="http://www.inl.gov/"
    date="November 2006"
    converter="EnergyCS"
    converter_website="http://energycs.com"
    location="Idaho Falls, ID">
  </marker>

  <marker
    lat="43.5" lng="-112"
    minzoom="5"
    owner="Idaho National Laboratory of US Department of Energy"
    owner_website="http://www.inl.gov/"
    date="November 2006"
    converter="Hymotion"
    converter_website="http://hymotion.com"
    location="Idaho Falls, ID">
  </marker>

<!-- NY -->
  <marker
    minzoom="5"
    lat="40.744886" lng="-73.934804"
    owner="Horacio Calvento"
    date="December 2006"
    converter="Long Island Prius Owners Group"
    converter_website="http://www.lipog.org/PHEV%20PowerPoint.htm"
    location="Long Island, NY"
    desc="Dual-PWR, EAA-PHEV/Manzanita Micro Style">
  </marker>

<!-- North East -->
  <marker
    minzoom="4"
    lat="40.10279" lng="-75.27462"
    owner="Lithium Technologies"
    owner_website="http://www.lithiumtech.com/"
    date="May 2007"
    converter="Hybrids-Plus"
    converter_website="http://www.hybrids-plus.com/"
    location="Plymouth Meeting, PA">
  </marker>

  <marker
    minzoom="4"
    lat="40.73877" lng="-75.30953"
    owner="Jennings Transportation"
    date="April 2007"
    location="Nazareth, PA"
    converter="Advanced Energy"
    converter_website="http://www.hybridschoolbus.org/"
    desc="Plug-in Hybrid School Bus"
    image="http://www.google.org/images/carmap/wake-bus-thumb.jpg"
    image_large="http://www.google.org/images/carmap/wake-bus-large.jpg">
   </marker>

  <marker
    minzoom="6"
    lat="43.60487"
    lng="-72.97152"
    owner="Central Vermont Public Service"
    owner_website="http://www.cvps.com/"
    date="June 2007"
    desc="Plug'n go #1"
    converter="Hymotion"
    converter_website="http://www.hymotion.com"
    location="Rutland, VT">
  </marker>

  <marker
    minzoom="5"
    lat="43.611"
    lng="-72.982"
    owner="Central Vermont Public Service"
    desc="Plug'n go #2"
    converter="Hymotion"
    date="July 2007"
    location="Rutland, VT">
  </marker>

  <marker
    minzoom="0"
    lat="41.39251" lng="-73.45386"
    owner="Electro Energy"
    owner_website="http://www.electroenergyinc.com/"
    date="March 2006"
    converter="CalCars and Electro Energy"
    converter_website="http://www.electroenergyinc.com/"
    location="Danbury, CT"
    image="http://www.google.org/images/carmap/6.jpg"
    image_large="http://www.google.org/images/carmap/6_large.jpg">
  </marker>

  <marker
    minzoom="2"
    lat="42.361273" lng="-71.362858"
    owner="Armin Kusig"
    date="July 2006"
    location="Wayland, MA"
    converter="Did it themselves!"
    desc="Honda Insight">
  </marker>

  <marker
    lat="42.704"
    lng="-73.862"
    minzoom="2"
    owner_website="http://www.nyserda.org/"
    owner="NYSERDA (New York State Energy Research and Development Authority)"
    converter_website="http://www.hybrids-plus.com/pmwiki/index.php?n="Ext.Conversion2"
    desc="PHEV Escape"
    converter="Hybrids Plus"
    date="Sept 2007"
    location="Albany, NY">
  </marker>

<!-- UK -->
  <marker
    minzoom="4"
    lat="52.468056" lng="-0.251110"
    owner="Jim Fell"
    date="January 2007"
    converter="Did it themselves!"
    desc="EAA-PHEV Manzanita Micro-style conversion with Thundersky cells"
    converter_website="http://www.eaa-phev.org/wiki/FellUK"
    location="Peterborough, England">
  </marker>

  <marker
    minzoom="4"
    lat="51.36" lng="00.05"
    owner="GreenTomato Cars"
    owner_website="http://www.greentomatocars.com/"
    date="February 2007"
    converter="Amberjac/EnergyCS"
    converter_website="http://www.amberjac-projects.co.uk"
    location="London, UK">
  </marker>

  <marker
    minzoom="5"
    lat="51.40" lng="00.03"
    owner="Jim Tech Ltd."
    date="March 2007 "
    converter="Amberjac / EnergyCS"
    converter_website="http://www.amberjac-projects.co.uk"
    location="London, UK">
  </marker>

  <marker
    minzoom="2"
    lat="53.78333" lng="-1.75000"
    owner="Private Individual"
    converter="Amberjac/EnergyCS"
    converter_website="http://www.amberjac-projects.co.uk"
    date="April 2007"
    location="Bradford, UK">
  </marker>

  <marker
    minzoom="4"
    lat="51.12" lng="00.40"
    owner="Private Individual"
    date="May 2007"
    converter="Amberjac/EnergyCS"
    converter_website="http://www.amberjac-projects.co.uk"
    location="Kent, UK">
  </marker>

  <marker
    minzoom="4"
    lat="52.78" lng="-01.13"
    owner="Beacon Energy"
    owner_website="http://www.beaconenergy.co.uk/"
    date="May 2007"
    converter="Amberjac/EnergyCS"
    converter_website="http://www.amberjac-projects.co.uk"
    location="Loughborough, UK">
  </marker>

  <marker
    minzoom="0"
    lat="53.13" lng="-0.24"
    owner="Amberjac Projects Lt"
    owner_website="http://www.amberjac-projects.co.uk"
    date="September 2005"
    converter="EnergyCS, Amberjac"
    converter_website="http://www.amberjac-projects.co.uk"
    location="Lincolnshire, UK"
    image="http://www.google.org/images/carmap/4.jpg">
  </marker>

<!-- South -->
  <marker
    minzoom="1"
    lat="34.11865" lng="-83.57098"
    owner="Jackson EMC Electricity Cooperative"
    owner_website="http://www.jacksonemc.com/index2.html"
    date="February 2007"
    converter="EnergyCS"
    converter_website="http://www.energycs.com"
    location="Jefferson, GA">
  </marker>

  <marker
    minzoom="1"
    lat="27.495251" lng="-82.564326"
    owner="Manatee County School District"
    owner_website="http://www.manatee.k12.fl.us/"
    date="March 2007"
    location="Bradenton, FL"
    converter="Advanced Energy"
    converter_website="http://www.hybridschoolbus.org/"
    desc="Plug-in Hybrid School Bus"
    image="http://www.google.org/images/carmap/wake-bus-thumb.jpg"
    image_large="http://www.google.org/images/carmap/wake-bus-large.jpg">
   </marker>

  <marker
    minzoom="2"
    lat="35.831524" lng="-78.618253"
    owner="Wake County School District"
    owner_website="http://www.wcpss.net/news/2007_may17_hybrid_bus/"
    date="May 2007"
    location="Raleigh, NC"
    converter="Advanced Energy"
    converter_website="http://www.hybridschoolbus.org/"
    desc="Plug-in Hybrid School Bus"
    image="http://www.google.org/images/carmap/wake-bus-thumb.jpg"
    image_large="http://www.google.org/images/carmap/wake-bus-large.jpg">
   </marker>

  <marker
    minzoom="4"
    lat="35.21926" lng="-80.841047"
    owner="Charlotte Mecklenburg Schools"
    owner_website="http://www.cms.k12.nc.us/includes/gfi.asp?fileHandle=4279.asp"
    date="May 2007"
    location="Charlotte, NC"
    converter="Advanced Energy"
    converter_website="http://www.hybridschoolbus.org/"
    desc="Plug-in Hybrid School Bus"
    image="http://www.google.org/images/carmap/CMS-Bus-Thumb.jpg"
    image_large="http://www.google.org/images/carmap/CMS-Bus-Large.jpg">
   </marker>

  <marker
    minzoom="1"
    lat="34.74865" lng="-92.27448"
    owner="Little Rock School District"
    owner_website="http://www.lrsd.org/"
    date="May 2007"
    location="Little Rock, AR"
    converter="Advanced Energy"
    converter_website="http://www.hybridschoolbus.org/"
    desc="Plug-in Hybrid School Bus"
    image="http://www.google.org/images/carmap/wake-bus-thumb.jpg"
    image_large="http://www.google.org/images/carmap/wake-bus-large.jpg">
   </marker>

  <marker
    minzoom="6"
    lat="35.775"
    lng="-78.638"
    owner_website="http://www.progress-energy.com/"
    owner="Progress Energy Corporation"
    converter_website="http://www.avrc.com/"
    converter="Advanced Vehicle Research Center"
    desc="Converted with Hymotion kit"
    date="July 2007"
    location="Raleigh, NC"
    image_large="http://www.calcars.org/images/photos/progress-energy.jpg">
  </marker>

  <marker
    minzoom="5"
    lat="35.774"
    lng="-78.68"
    owner_website="http://www.advancedenergy.org/"
    owner="Advanced Energy"
    desc="Prius"
    converter="Hymotion and Advanced Vehicle Research Center"
    date="July 2007"
    location="Raleigh, NC">
  </marker>

  <marker
    lat="35.225"
    lng="-80.849"
    minzoom="5"
    owner_website="http://www.duke-energy.com/"
    owner="Duke Energy"
    desc="Prius"
    converter="Hymotion and Advanced Vehicle Research Center"
    date="July 2007"
    location="Charlotte, NC">
  </marker>

<!-- Texas -->
  <marker
    lat="30.26757" lng="-97.74296"
    owner="Austin Energy"
    owner_website="http://www.austinenergy.com/"
    date="March 2007"
    converter="Hymotion"
    converter_website="http://www.hymotion.com"
    location="Austin, TX">
  </marker>

  <marker
    lat="30.2" lng="-97.7"
    owner="Austin Energy"
    owner_website="http://www.austinenergy.com/"
    date="March 2007"
    converter="Hymotion"
    converter_website="http://www.hymotion.com"
    minzoom="5"
    location="Austin, TX">
  </marker>

  <marker
    minzoom="0"
    lat="29.76047"
    lng="-95.36982"
    owner="Philippi Family"
    date="May 2007"
    converter="CalCars and Maker Faire Team"
    converter_website="http://www.calcars.org"
    location="Houston, TX">
  </marker>

<!-- Iceland -->
  <marker
    minzoom="0"
    lat="65.686"
    lng="-18.11"
    owner="Gudmundur Arnason, sponsored by Iceland's National Energy Authority"
    desc="Prius"
    converter="Amberjac/EnergyCS"
    date="August 2007"
    location="Akureyri, Iceland"
    image_large="http://www.calcars.org/images/photos/kramer-thorkelsson-arnason-full.jpg">
  </marker>

<!-- Europe (Non UK) -->
  <marker
    lat="50.9129" lng="5.76849"
    owner="EcoFys"
    owner_website="http://www.ecofys.com/"
    date="March 2007"
    converter="Amberjac / EnergyCS"
    converter_website="http://www.amberjac-projects.co.uk"
    location="Maastrich, Netherlands">
  </marker>

  <marker
    minzoom="5"
    lat="52.354727" lng="4.904053"
    owner="Ecordis/Spinnovation"
    date="May 2007"
    converter="Amberjac/EnergyCS"
    converter_website="http://www.amberjac-projects.co.uk"
    location="Amsterdam, Netherlands">
  </marker>

<!-- Central Valley, CA -->
  <marker
    minzoom="4"
    lat="38.54655" lng="-121.74488"
    owner="UC Davis Hybrid Center"
    owner_website="http://www.team-fate.net/"
    converter="UC Davis Team Fate"
    converter_website="http://www.team-fate.net/"
    date="Since 1993"
    desc="Multiple Vehicles"
    location="Davis, CA"
    image="http://www.google.org/images/carmap/team-fate-thumb.jpg">
  </marker>

  <marker
    minzoom="5"
    lat="38.377385" lng="-121.444905"
    owner="Sacramento Municipal Utility District"
    owner_website="http://www.smud.org/"
    date="April 2006"
    converter="EnergyCS"
    converter_website="http://www.energycs.com"
    location="Sacramento, CA"
    image="http://www.google.org/images/carmap/9.jpg">
  </marker>

  <marker
    minzoom="5"
    lat="38.541"
    lng="-121.747"
    owner_website="http://www.ucdavis.edu/"
    owner="UC-Davis"
    desc="Prius"
    converter_website="http://www.greengears.net/"
    converter="Green Gears"
    date="Oct 2007"
    location="Davis, CA">
  </marker>

<!-- North West -->
  <marker
    minzoom="6"
    lat="47.60342" lng="-122.32971"
    owner="Dave Moore"
    date="May 2007"
    converter="Hybrids-Plus"
    converter_website="http://www.hybrids-plus.com/"
    location="Seattle, WA">
  </marker>

  <marker
    minzoom="0"
    lat="47.33" lng="-122.272"
    owner="Ryan Fulcher of Seattle Electric Auto Association"
    date="April 2006"
    converter="CalCars and Maker Faire team"
    owner_website="http://www.eaa-phev.org/wiki/PriusBlue"
    converter_website="http://www.manzanitamicro.com"
    location="Auburn, WA"
    image="http://www.google.org/images/carmap/10.jpg"
    image_large="http://www.google.org/images/carmap/10_large.jpg">
  </marker>

  <marker
    minzoom="6"
    lat="47.683852" lng="-122.193358"
    date="April 2007"
    owner="Green Car Company"
    owner_website="http://www.thegreencarco.com/"
    converter="Manzanita Micro"
    converter_website="http://www.manzanitamicro.com"
    desc="Green Machine (PiPrius)"
    location="Kirkland, WA"
    image="http://www.google.org/images/carmap/green_car_co.jpg">
  </marker>

  <marker
    lat="44.949"
    lng="-123.051"
    owner_website="http://www.salemelectric.com/"
    owner="Salem Electric"
    desc="PHEV Escape"
    converter_website="http://www.hybrids-plus.com/"
    converter="Hybrids Plus"
    date="Sept 25, 2007"
    location="Salem, Oregon">
  </marker>

  <marker
    minzoom="5"
    lat="47.608"
    lng="-122.327"
    owner="Peter Mullen"
    converter_website="http://www.hybrids-plus.com/pmwiki/index.php?n="Ext.Conversion19"
    desc="2008 Prius"
    converter="Hybrids Plus"
    date="Nov 2007"
    location="Seattle, WA">
  </marker>

<!-- North San Francisco Bay -->
  <marker
    minzoom="2"
    lat="38.068225" lng="-122.688415"
    owner="CalCars PRIUS+/Ron Gremban"
    date="Fall 2004"
    converter="Ron Gremban, CalCars team"
    desc="Initially with EnergyCS technology"
    owner_website="http://www.calcars.org"
    converter_website="http://www.calcars.org"
    location="Marin County, CA"
    image="http://www.google.org/images/carmap/1.jpg"
    image_large="http://www.google.org/images/carmap/1_large.jpg">
  </marker>

  <marker
    lat="38.513106"
    lng="-122.782527"
    minzoom="4"
    owner="Sonoma County Water Agency"
    owner_website="http://www.scwa.ca.gov/"
    date="May 2007"
    desc="Sparky"
    converter="Hymotion"
    converter_website="http://www.hymotion.com"
    location="Santa Rosa, CA">
  </marker>

  <marker
    lat="37.974"
    lng="-122.562"
    owner_website="http://www.diy-mpg.com/"
    owner="Darren Overby"
    desc="Prius"
    converter="CalCars"
    date="Nov 2007"
    location="San Anselmo, CA"
    image_large="http://www.calcars.org/images/where-phevs-are/diy-mpg.jpg">
  </marker>

<!-- San Francisco -->
  <marker
    minzoom="5"
    lat="37.77912" lng="-122.42009"
    owner="PG&E"
    owner_website="http://www.pge.com/about_us/environment/features/fleet.html"
    date="July 2006"
    desc="Sparky"
    converter="EnergyCS"
    converter_website="http://www.energycs.com"
    location="San Francisco, CA"
    image="http://www.google.org/images/carmap/12.jpg"
    image_large="http://www.google.org/images/carmap/12_large.jpg">
  </marker>

  <marker
    minzoom="5"
    lat="37.785"
    lng="-122.405"
    owner_website="http://www.lusciousgarage.com/"
    owner="Luscious Garage"
    desc="Prius+"
    converter_website="http://www.lusciousgarage.com/"
    converter="Luscious Garage"
    date="January 2008"
    location="San Francisco, CA">
  </marker>

  <marker
    minzoom="5"
    lat="37.752"
    lng="-122.39"
    owner_website="http://www.greengears.net/"
    owner="Green Gears, Inc."
    desc="Prius"
    converter="Green Gears, using A123/Hymotion system"
    converter_website="http://www.greengears.net/"
    date="February 1, 2008"
    location="Pat's Garage San Francisco, CA">
  </marker>

  <marker
    minzoom="6"
    lat="37.779"
    lng="-122.419"
    owner="City & County of San Francisco"
    owner_website="http://www.sfgov.org/"
    desc="Prius"
    converter="Green Gears, using A123/Hymotion system"
    converter_website="http://www.greengears.net/"
    date="February, 2008"
    location="Pat's Garage San Francisco, CA"
    image_large="http://www.calcars.org/images/where-phevs-are/three-sf-cars.jpg">
  </marker>

  <marker
    minzoom="7"
    lat="37.779"
    lng="-122.419"
    owner="City & County of San Francisco"
    owner_website="http://www.sfgov.org/"
    desc="Prius"
    converter="Green Gears, using A123/Hymotion system"
    converter_website="http://www.greengears.net/"
    date="February, 2008"
    location="Pat's Garage San Francisco, CA"
    image_large="http://www.calcars.org/images/where-phevs-are/three-sf-cars.jpg">
  </marker>

  <marker
    minzoom="7"
    lat="37.779"
    lng="-122.419"
    owner="City & County of San Francisco"
    owner_website="http://www.sfgov.org/"
    desc="Prius"
    converter="Green Gears, using A123/Hymotion system"
    converter_website="http://www.greengears.net/"
    date="February, 2008"
    location="Pat's Garage San Francisco, CA"
    image_large="http://www.calcars.org/images/where-phevs-are/three-sf-cars.jpg">
  </marker>
</markers>


text:
__author__ = 'zeus'

import os
import uuid
from django.core.exceptions import ImproperlyConfigured
from django.utils.importlib import import_module
from django.conf import settings

UPLOAD_TO = getattr(settings, 'IMAGESTORE_UPLOAD_TO', 'imagestore/')

def load_class(class_path, setting_name=None):
    """
    Loads a class given a class_path.
    The setting_name parameter is only there for pretty error output, and
    therefore is optional

    Taken from https://github.com/divio/django-shop/blob/master/shop/util/loader.py
    """
    try:
        class_module, class_name = class_path.rsplit('.', 1)
    except ValueError:
        if setting_name:
            txt = '%s isn\'t a valid module. Check your %s setting' % (class_path,setting_name)
        else:
            txt = '%s isn\'t a valid module.' % class_path
        raise ImproperlyConfigured(txt)

    try:
        mod = import_module(class_module)
    except ImportError, e:
        if setting_name:
            txt = 'Error importing backend %s: "%s". Check your %s setting' % (class_module, e, setting_name)
        else:
            txt = 'Error importing backend %s: "%s".' % (class_module, e)
        raise ImproperlyConfigured(txt)

    try:
        clazz = getattr(mod, class_name)
    except AttributeError, e:
        if setting_name:
            txt = 'Backend module "%s" does not define a "%s" class. Check your %s setting. (%s)' % (class_module, class_name, setting_name)
        else:
            txt = 'Backend module "%s" does not define a "%s" class. (%s)' % (class_module, class_name, e)
        raise ImproperlyConfigured(txt)
    return clazz

def get_model_string(model_name):
    """
    Returns the model string notation Django uses for lazily loaded ForeignKeys
    (eg 'auth.User') to prevent circular imports.
    This is needed to allow our crazy custom model usage.

    Taken from https://github.com/divio/django-shop/blob/master/shop/util/loader.py
    """
    class_path = getattr(settings, 'IMAGESTORE_%s_MODEL' % model_name.upper().replace('_', ''), None)
    if not class_path:
        return 'imagestore.%s' % model_name
    else:
        klass = load_class(class_path)
        return '%s.%s' % (klass._meta.app_label, klass.__name__)

def get_file_path(instance, filename):
    ext = filename.split('.')[-1]
    filename = "%s.%s" % (uuid.uuid4(), ext)
    return os.path.join(UPLOAD_TO, filename)


text:
module Helpers.Post
    ( postForm
    , upsertPost
    , postMarkdown
    , postContent
    , getPost404
    , getPreviousPost
    , getNextPost
    , postListing
    , inlinePost
    , formattedTags

    -- * Time helpers
    , UTCTime(..)
    , getCurrentTime
    , humanReadableTime
    , humanReadableTime'

    -- * Markdown helpers
    , Markdown(..)
    , markdownToHtml
    ) where

import Import
import Prelude (init, head, last)
import Yesod.Markdown
import Yesod.Links
import Control.Monad (when)
import Data.Time (UTCTime(..), getCurrentTime)
import Data.Time.Format.Human
import Database.Persist.Sql (rawSql)
import System.Directory (doesFileExist)
import Text.Shakespeare.Text (st)
import qualified Data.Text as T

data PostForm = PostForm
    { pfSlug     :: Text
    , pfTitle    :: Text
    , pfTags     :: Text
    , pfDescr    :: Maybe Markdown
    , pfDraft    :: Bool
    , pfWasDraft :: Bool
    }

postForm :: Maybe (Post,[Tag]) -> Form PostForm
postForm mpost = renderBootstrap $ PostForm
    <$> areq textField     "Slug"        (fmap (postSlug   . fst) mpost)
    <*> areq textField     "Title"       (fmap (postTitle  . fst) mpost)
    <*> areq textField     "Tags"        (fmap (formatTags . snd) mpost)
    <*> aopt markdownField "Description" (fmap (postDescr  . fst) mpost)
    <*> areq checkBoxField "Draft?"      (Just $ isDraft mpost)
    <*> pure (isDraft mpost) -- store prev value

    where
        formatTags :: [Tag] -> Text
        formatTags = T.intercalate ", " . map tagName

        -- use draft value when present, defult True on Nothing
        isDraft :: Maybe (Post,[Tag]) -> Bool
        isDraft = maybe True (postDraft . fst)

upsertPost :: PostForm -> Handler ()
upsertPost pf = do
    now <- liftIO getCurrentTime

    let post = Post
                { postSlug  = pfSlug  pf
                , postTitle = pfTitle pf
                , postDescr = pfDescr pf
                , postDate  = now
                , postDraft = pfDraft pf
                }

    runDB $ do
        result <- insertBy post

        pid <- case result of
            -- inserted, do nothing for now
            Right k -> fmap (const k) $
                lift $ setMessage "post created!"

            -- exists, update it
            Left (Entity k _) -> fmap (const k) $ do
                update k $
                    [ PostSlug  =. pfSlug  pf
                    , PostTitle =. pfTitle pf
                    , PostDescr =. pfDescr pf
                    , PostDraft =. pfDraft pf
                    ] ++
                    -- update date if publishing
                    [ PostDate =. now | pfWasDraft pf, not $ pfDraft pf ]

                -- remove existing tags
                deleteWhere [ TagPost ==. k ]

                lift $ setMessage "post updated!"

        -- insert the new tags
        mapM_ insertBy (parseTags pid $ pfTags pf)

    redirect ManagePostsR

    where
        parseTags :: PostId -> Text -> [Tag]
        parseTags pid = map (Tag pid) . filter (not . T.null)
                      . map (T.toLower . T.strip) . T.splitOn ","

-- | Content as Html, use postMarkdown to get at the raw Markdown for
--   conversion to String or Text
postContent :: Post -> IO Html
postContent = fmap markdownToHtml . postMarkdown

postMarkdown :: Post -> IO Markdown
postMarkdown post = do
    let file = pandocFile $ postSlug post

    exists <- doesFileExist file

    case (exists, postDescr post) of
        (True, _         ) -> markdownFromFile file
        (_   , Just descr) -> return descr
        _                  -> return $ Markdown "nothing?"

getPost404 :: Text -> DB (Post,[Tag])
getPost404 slug = do
    results <- rawSql [st| SELECT ??, ?? FROM "Post"
                           JOIN "Tag" ON "Tag".post = "Post".id
                           WHERE "Post".slug = ? |] [toPersistValue slug]

    when (null results) $ lift notFound

    return ( entityVal . fst $ head results
           , map (entityVal . snd) results
           )

getNextPost :: Post -> DB (Maybe Post)
getNextPost post = getPostBy [ PostDraft !=. True
                             , PostSlug  !=. postSlug post
                             , PostDate  <.  postDate post
                             ] [Desc PostDate]

getPreviousPost :: Post -> DB (Maybe Post)
getPreviousPost post = getPostBy [ PostDraft !=. True
                                 , PostSlug  !=. postSlug post
                                 , PostDate  >.  postDate post
                                 ] [Asc PostDate]

getPostBy :: [Filter Post] -> [SelectOpt Post] -> DB (Maybe Post)
getPostBy filters sorts = do
    posts <- selectList filters $ sorts ++ [LimitTo 1]
    return $ case posts of
        ((Entity _ p):_) -> Just p
        _                -> Nothing

postListing :: [(Post,[Tag])] -> Widget
postListing records = $(widgetFile "post/_listing")

inlinePost :: Post -> [Tag] -> Widget
inlinePost post tags = do
    (published,content) <- liftIO $ do
        published' <- humanReadableTime $ postDate post
        content'   <- postContent post

        return (published',content')

    $(widgetFile "post/_inline")

formattedTags :: PostId -> [Tag] -> Text
formattedTags postId = T.intercalate ", "
                     . map tagName
                     . filter ((== postId) . tagPost)


text:
package VMOMI::HostAccessRestrictedToManagementServer;
use parent 'VMOMI::NotSupported';

use strict;
use warnings;

our @class_ancestors = (
    'NotSupported',
    'RuntimeFault',
    'MethodFault',
);

our @class_members = (
    ['managementServer', undef, 0, ],
);

sub get_class_ancestors {
    return @class_ancestors;
}

sub get_class_members {
    my $class = shift;
    my @super_members = $class->SUPER::get_class_members();
    return (@super_members, @class_members);
}

1;


text:
'use strict';

require('angular');

module.exports = angular.module('myApp',
	[
		require('./common/common').name,
		require('./env/dev').name, // Development Environment Configuration
		require('./modules').name
	])
	.config(require('./appConfig'))
	.constant('version', require('../package.json').version)
	.run(require('./common/common-init.js'));


text:
namespace {

// This object is instantiated when the first Browser object is added to the
// list and delete when the last one is removed. It watches for loads and
// creates histograms of some global object counts.
class BrowserActivityObserver : public NotificationObserver {
 public:
  BrowserActivityObserver() {
    registrar_.Add(this, NotificationType::NAV_ENTRY_COMMITTED,
                   NotificationService::AllSources());
  }
  ~BrowserActivityObserver() {}

 private:
  // NotificationObserver implementation.
  virtual void Observe(NotificationType type,
                       const NotificationSource& source,
                       const NotificationDetails& details) {
    DCHECK(type == NotificationType::NAV_ENTRY_COMMITTED);
    const NavigationController::LoadCommittedDetails& load =
        *Details<NavigationController::LoadCommittedDetails>(details).ptr();
    if (!load.is_main_frame || load.is_auto || load.is_in_page)
      return;  // Don't log for subframes or other trivial types.

    LogRenderProcessHostCount();
    LogBrowserTabCount();
  }

  // Counts the number of active RenderProcessHosts and logs them.
  void LogRenderProcessHostCount() const {
    int hosts_count = 0;
    for (RenderProcessHost::iterator i(RenderProcessHost::AllHostsIterator());
         !i.IsAtEnd(); i.Advance())
      ++hosts_count;
    UMA_HISTOGRAM_CUSTOM_COUNTS("MPArch.RPHCountPerLoad", hosts_count,
                                1, 50, 50);
  }

  // Counts the number of tabs in each browser window and logs them. This is
  // different than the number of TabContents objects since TabContents objects
  // can be used for popups and in dialog boxes. We're just counting toplevel
  // tabs here.
  void LogBrowserTabCount() const {
    int tab_count = 0;
    for (BrowserList::const_iterator browser_iterator = BrowserList::begin();
         browser_iterator != BrowserList::end(); browser_iterator++)
      tab_count += (*browser_iterator)->tab_count();
    UMA_HISTOGRAM_CUSTOM_COUNTS("Tabs.TabCountPerLoad", tab_count, 1, 200, 50);
  }

  NotificationRegistrar registrar_;

  DISALLOW_COPY_AND_ASSIGN(BrowserActivityObserver);
};

BrowserActivityObserver* activity_observer = NULL;

// Returns true if the specified |browser| has a matching profile and type to
// those specified. |type| can also be TYPE_ANY, which means only |profile|
// must be matched.
bool BrowserMatchesProfileAndType(Browser* browser,
                                  Profile* profile,
                                  Browser::Type type) {
  return (type == Browser::TYPE_ANY || browser->type() == type) &&
      browser->profile() == profile;
}

// Finds a registered Browser object matching |profile| and |type|. This
// walks the list of Browsers that have ever been activated from most recently
// activated to least. If a Browser has never been activated, such as in a test
// scenario, this function will _not_ find it. Fall back to
// FindBrowserMatching() in that case.
Browser* FindInLastActiveMatching(Profile* profile, Browser::Type type) {
  for (BrowserList::list_type::const_reverse_iterator i =
       BrowserList::begin_last_active(); i != BrowserList::end_last_active();
       ++i) {
    if (BrowserMatchesProfileAndType(*i, profile, type))
      return *i;
  }
  return NULL;
}

// Finds a registered Browser object matching |profile| and |type| even if that
// Browser has never been activated. This is a forward walk, and intended as a
// last ditch fallback mostly to handle tests run on machines where no window is
// ever activated. The user experience if this function is relied on is not good
// since matching browsers will be returned in registration (creation) order.
Browser* FindBrowserMatching(Profile* profile, Browser::Type type) {
  for (BrowserList::const_iterator i = BrowserList::begin();
       i != BrowserList::end(); ++i) {
    if (BrowserMatchesProfileAndType(*i, profile, type))
      return *i;
  }
  return NULL;
}

}  // namespace

BrowserList::list_type BrowserList::browsers_;
std::vector<BrowserList::Observer*> BrowserList::observers_;

// static
void BrowserList::AddBrowser(Browser* browser) {
  DCHECK(browser);
  browsers_.push_back(browser);

  g_browser_process->AddRefModule();

  if (!activity_observer)
    activity_observer = new BrowserActivityObserver;

  NotificationService::current()->Notify(
      NotificationType::BROWSER_OPENED,
      Source<Browser>(browser),
      NotificationService::NoDetails());

  // Send out notifications after add has occurred. Do some basic checking to
  // try to catch evil observers that change the list from under us.
  size_t original_count = observers_.size();
  for (size_t i = 0; i < observers_.size(); ++i)
    observers_[i]->OnBrowserAdded(browser);
  DCHECK_EQ(original_count, observers_.size())
      << "observer list modified during notification";
}

// static
void BrowserList::RemoveBrowser(Browser* browser) {
  RemoveBrowserFrom(browser, &last_active_browsers_);

  // Closing all windows does not indicate quitting the application on the Mac,
  // however, many UI tests rely on this behavior so leave it be for now and
  // simply ignore the behavior on the Mac outside of unit tests.
  // TODO(andybons): Fix the UI tests to Do The Right Thing.
  bool close_app_non_mac = (browsers_.size() == 1);
  NotificationService::current()->Notify(
      NotificationType::BROWSER_CLOSED,
      Source<Browser>(browser), Details<bool>(&close_app_non_mac));

  // Send out notifications before anything changes. Do some basic checking to
  // try to catch evil observers that change the list from under us.
  size_t original_count = observers_.size();
  for (size_t i = 0; i < observers_.size(); ++i)
    observers_[i]->OnBrowserRemoving(browser);
  DCHECK_EQ(original_count, observers_.size())
      << "observer list modified during notification";

  RemoveBrowserFrom(browser, &browsers_);

  // If the last Browser object was destroyed, make sure we try to close any
  // remaining dependent windows too.
  if (browsers_.empty()) {
    AllBrowsersClosed();

    delete activity_observer;
    activity_observer = NULL;
  }

  g_browser_process->ReleaseModule();
}

// static
void BrowserList::AddObserver(BrowserList::Observer* observer) {
  DCHECK(std::find(observers_.begin(), observers_.end(), observer)
         == observers_.end()) << "Adding an observer twice";
  observers_.push_back(observer);
}

// static
void BrowserList::RemoveObserver(BrowserList::Observer* observer) {
  std::vector<Observer*>::iterator i =
      std::find(observers_.begin(), observers_.end(), observer);
  if (i == observers_.end()) {
    NOTREACHED() << "Removing an observer that isn't registered.";
    return;
  }
  observers_.erase(i);
}

// static
void BrowserList::CloseAllBrowsers(bool use_post) {
  // Before we close the browsers shutdown all session services. That way an
  // exit can restore all browsers open before exiting.
  ProfileManager::ShutdownSessionServices();

  for (BrowserList::const_iterator i = BrowserList::begin();
       i != BrowserList::end();) {
    if (use_post) {
      (*i)->window()->Close();
      ++i;
    } else {
      // This path is hit during logoff/power-down. In this case we won't get
      // a final message and so we force the browser to be deleted.
      Browser* browser = *i;
      browser->window()->Close();
      // Close doesn't immediately destroy the browser
      // (Browser::TabStripEmpty() uses invoke later) but when we're ending the
      // session we need to make sure the browser is destroyed now. So, invoke
      // DestroyBrowser to make sure the browser is deleted and cleanup can
      // happen.
      browser->window()->DestroyBrowser();
      i = BrowserList::begin();
      if (i != BrowserList::end() && browser == *i) {
        // Destroying the browser should have removed it from the browser list.
        // We should never get here.
        NOTREACHED();
        return;
      }
    }
  }
}

// static
void BrowserList::CloseAllBrowsersAndExit() {
#if !defined(OS_MACOSX)
  // On most platforms, closing all windows causes the application to exit.
  CloseAllBrowsers(true);
#else
  // On the Mac, the application continues to run once all windows are closed.
  // Terminate will result in a CloseAllBrowsers(true) call, and additionally,
  // will cause the application to exit cleanly.
  chrome_browser_application_mac::Terminate();
#endif
}

// static
void BrowserList::WindowsSessionEnding() {
  // EndSession is invoked once per frame. Only do something the first time.
  static bool already_ended = false;
  if (already_ended)
    return;
  already_ended = true;

  browser_shutdown::OnShutdownStarting(browser_shutdown::END_SESSION);

  // Write important data first.
  g_browser_process->EndSession();

  // Close all the browsers.
  BrowserList::CloseAllBrowsers(false);

  // Send out notification. This is used during testing so that the test harness
  // can properly shutdown before we exit.
  NotificationService::current()->Notify(
      NotificationType::SESSION_END,
      NotificationService::AllSources(),
      NotificationService::NoDetails());

  // And shutdown.
  browser_shutdown::Shutdown();

#if defined(OS_WIN)
  // At this point the message loop is still running yet we've shut everything
  // down. If any messages are processed we'll likely crash. Exit now.
  ExitProcess(ResultCodes::NORMAL_EXIT);
#else
  NOTIMPLEMENTED();
#endif
}

// static
bool BrowserList::HasBrowserWithProfile(Profile* profile) {
  for (BrowserList::const_iterator i = BrowserList::begin();
       i != BrowserList::end(); ++i) {
    if (BrowserMatchesProfileAndType(*i, profile, Browser::TYPE_ANY))
      return true;
  }
  return false;
}

// static
BrowserList::list_type BrowserList::last_active_browsers_;

// static
void BrowserList::SetLastActive(Browser* browser) {
  RemoveBrowserFrom(browser, &last_active_browsers_);
  last_active_browsers_.push_back(browser);

  for (std::vector<Observer*>::const_iterator i = observers_.begin();
       i != observers_.end(); ++i) {
    (*i)->OnBrowserSetLastActive(browser);
  }
}

// static
Browser* BrowserList::GetLastActive() {
  if (!last_active_browsers_.empty())
    return *(last_active_browsers_.rbegin());

  return NULL;
}

// static
Browser* BrowserList::GetLastActiveWithProfile(Profile* p) {
  // We are only interested in last active browsers, so we don't fall back to all
  // browsers like FindBrowserWith* do.
  return FindInLastActiveMatching(p, Browser::TYPE_ANY);
}

// static
Browser* BrowserList::FindBrowserWithType(Profile* p, Browser::Type t) {
  Browser* browser = FindInLastActiveMatching(p, t);
  // Fall back to a forward scan of all Browsers if no active one was found.
  return browser ? browser : FindBrowserMatching(p, t);
}

// static
Browser* BrowserList::FindBrowserWithProfile(Profile* p) {
  Browser* browser = FindInLastActiveMatching(p, Browser::TYPE_ANY);
  // Fall back to a forward scan of all Browsers if no active one was found.
  return browser ? browser : FindBrowserMatching(p, Browser::TYPE_ANY);
}

// static
Browser* BrowserList::FindBrowserWithID(SessionID::id_type desired_id) {
  for (BrowserList::const_iterator i = BrowserList::begin();
       i != BrowserList::end(); ++i) {
    if ((*i)->session_id().id() == desired_id)
      return *i;
  }
  return NULL;
}

// static
size_t BrowserList::GetBrowserCountForType(Profile* p, Browser::Type type) {
  size_t result = 0;
  for (BrowserList::const_iterator i = BrowserList::begin();
       i != BrowserList::end(); ++i) {
    if (BrowserMatchesProfileAndType(*i, p, type))
      ++result;
  }
  return result;
}

// static
size_t BrowserList::GetBrowserCount(Profile* p) {
  size_t result = 0;
  for (BrowserList::const_iterator i = BrowserList::begin();
       i != BrowserList::end(); ++i) {
    if (BrowserMatchesProfileAndType(*i, p, Browser::TYPE_ANY))
      result++;
  }
  return result;
}

// static
bool BrowserList::IsOffTheRecordSessionActive() {
  for (BrowserList::const_iterator i = BrowserList::begin();
       i != BrowserList::end(); ++i) {
    if ((*i)->profile()->IsOffTheRecord())
      return true;
  }
  return false;
}

// static
void BrowserList::RemoveBrowserFrom(Browser* browser, list_type* browser_list) {
  const iterator remove_browser =
      std::find(browser_list->begin(), browser_list->end(), browser);
  if (remove_browser != browser_list->end())
    browser_list->erase(remove_browser);
}

TabContentsIterator::TabContentsIterator()
    : browser_iterator_(BrowserList::begin()),
      web_view_index_(-1),
      cur_(NULL) {
    Advance();
  }

void TabContentsIterator::Advance() {
  // Unless we're at the beginning (index = -1) or end (iterator = end()),
  // then the current TabContents should be valid.
  DCHECK(web_view_index_ || browser_iterator_ == BrowserList::end() || cur_)
      << "Trying to advance past the end";

  // Update cur_ to the next TabContents in the list.
  while (browser_iterator_ != BrowserList::end()) {
    web_view_index_++;

    while (web_view_index_ >= (*browser_iterator_)->tab_count()) {
      // advance browsers
      ++browser_iterator_;
      web_view_index_ = 0;
      if (browser_iterator_ == BrowserList::end()) {
        cur_ = NULL;
        return;
      }
    }

    TabContents* next_tab =
        (*browser_iterator_)->GetTabContentsAt(web_view_index_);
    if (next_tab) {
      cur_ = next_tab;
      return;
    }
  }
}


text:
<?php

namespace app\modules\shared\controllers\api;

use app\modules\shared\models\Items;
use yii\rest\ActiveController;
use yii\helpers\ArrayHelper;
use yii\filters\Cors;

class RestController extends ActiveController
{
    // adjust the model class to match your model
    public $modelClass = Items::class;

    // required for granting access to third party code
    // i.e. AJAX calls from external domain.
    public function behaviors()
    {
        return
        ArrayHelper::merge(parent::behaviors(), [
            'corsFilter' => [
                'class' => Cors::className(),
            ],
        ]);
    }
}


text:
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
	android:layout_width="fill_parent"
	android:layout_height="fill_parent"
	android:background="#FFF"
	android:isScrollContainer="true">
	<ImageView
		android:id="@+id/hubroid_logo"
		android:layout_width="225dip"
		android:layout_height="225dip"
		android:src="@drawable/hubroid_logo"
		android:scaleType="fitXY"
		android:layout_centerInParent="true"/>
	<TextView
		android:id="@+id/tv_login_title"
		android:text="@string/app_name"
		android:layout_width="wrap_content"
		android:layout_height="wrap_content"
		android:background="@null"
		android:textColor="#555"
		android:textSize="64dip"
		android:textStyle="bold"
		android:layout_centerHorizontal="true" />
	<TextView
		android:id="@+id/tv_login_version"
		android:layout_width="wrap_content"
		android:layout_height="wrap_content"
		android:layout_below="@id/tv_login_title"
		android:layout_alignRight="@id/tv_login_title"
		android:layout_marginTop="-13dip"
		android:layout_marginRight="24dip"
		android:textColor="#999"
		android:text="@string/app_version" />
	<TextView
		android:id="@+id/tv_login_copyright"
		android:layout_width="wrap_content"
		android:layout_height="wrap_content"
		android:layout_centerHorizontal="true"
		android:layout_alignParentBottom="true"
		android:layout_marginBottom="3dip"
		android:textColor="#999"
		android:text="@string/copyright" />
	<RelativeLayout
		android:layout_alignParentBottom="true"
		android:layout_alignParentLeft="true"
		android:layout_marginBottom="24dip"
		android:layout_width="fill_parent"
		android:layout_height="wrap_content"
		android:layout_centerHorizontal="true"
		android:gravity="center"
		android:id="@+id/rl_login_login_box"
		android:padding="15dip"
		android:background="#C555">
		<TextView
			android:layout_width="wrap_content"
			android:layout_height="wrap_content"
			android:id="@+id/tv_login_username_label"
			android:textColor="#DDD"
			android:text="Username (not e-mail):"
			android:textSize="12.5dip" />
		<EditText
			android:layout_below="@id/tv_login_username_label"
			android:id="@+id/et_login_username"
			android:layout_width="132dip"
			android:layout_height="wrap_content"
			android:singleLine="true"
			android:background="@android:drawable/editbox_background" />
		<TextView
			android:layout_below="@id/et_login_username"
			android:layout_width="wrap_content"
			android:layout_height="wrap_content"
			android:id="@+id/tv_login_password_label"
			android:text="Password:"
			android:textColor="#DDD"
			android:textSize="12.5dip" />
		<EditText
			android:layout_below="@id/tv_login_password_label"
			android:id="@+id/et_login_password"
			android:layout_width="132dip"
			android:layout_height="wrap_content"
			android:singleLine="true"
			android:inputType="textPassword"
			android:background="@android:drawable/editbox_background"
			android:nextFocusDown="@+id/btn_login_login" />
		<Button
			android:layout_marginLeft="20dip"
		    android:layout_toRightOf="@id/tv_login_username_label"
		    android:layout_centerVertical="true"
			android:layout_width="125dip"
			android:layout_height="wrap_content"
			android:id="@+id/btn_login_login"
			android:text="Login" />
	</RelativeLayout>
</RelativeLayout>


text:
package com.orientechnologies.orient.console;

import com.orientechnologies.common.collection.OMultiCollectionIterator;
import com.orientechnologies.common.console.OConsoleApplication;
import com.orientechnologies.common.util.OCallable;
import com.orientechnologies.common.util.OSizeable;
import com.orientechnologies.orient.core.db.ODatabaseDocumentInternal;
import com.orientechnologies.orient.core.db.ODatabaseRecordThreadLocal;
import com.orientechnologies.orient.core.db.record.OIdentifiable;
import com.orientechnologies.orient.core.db.record.ridbag.ORidBag;
import com.orientechnologies.orient.core.id.ORecordId;
import com.orientechnologies.orient.core.record.ORecord;
import com.orientechnologies.orient.core.record.impl.ODocument;
import com.orientechnologies.orient.core.record.impl.ORecordBytes;

import java.text.SimpleDateFormat;
import java.util.*;
import java.util.Map.Entry;

public class OTableFormatter {
  protected final static String           MORE                 = "...";
  protected final static Set<String>      prefixedColumns      = new LinkedHashSet<String>(Arrays.asList(new String[] { "#",
      "@RID", "@CLASS"                                        }));
  protected final OConsoleApplication     out;
  protected final static SimpleDateFormat DEF_DATEFORMAT       = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss.SSS");
  protected int                           maxMultiValueEntries = 10;
  protected int                           minColumnSize        = 4;
  protected int                           maxWidthSize         = 150;

  public OTableFormatter(final OConsoleApplication iConsole) {
    this.out = iConsole;
  }

  public void writeRecords(final Collection<OIdentifiable> resultSet, final int limit) {
    writeRecords(resultSet, limit, null);
  }

  public void writeRecords(final Collection<OIdentifiable> resultSet, final int limit,
      final OCallable<Object, OIdentifiable> iAfterDump) {
    final Map<String, Integer> columns = parseColumns(resultSet, limit);

    int fetched = 0;
    for (OIdentifiable record : resultSet) {
      dumpRecordInTable(fetched++, record, columns);
      if (iAfterDump != null)
        iAfterDump.call(record);

      if (limit > -1 && fetched >= limit) {
        printHeaderLine(columns);
        out.message("\nLIMIT EXCEEDED: resultset contains more items not displayed (limit=" + limit + ")");
        return;
      }
    }

    if (fetched > 0)
      printHeaderLine(columns);
  }

  public int getMaxWidthSize() {
    return maxWidthSize;
  }

  public OTableFormatter setMaxWidthSize(final int maxWidthSize) {
    this.maxWidthSize = maxWidthSize;
    return this;
  }

  public int getMaxMultiValueEntries() {
    return maxMultiValueEntries;
  }

  public OTableFormatter setMaxMultiValueEntries(final int maxMultiValueEntries) {
    this.maxMultiValueEntries = maxMultiValueEntries;
    return this;
  }

  public void dumpRecordInTable(final int iIndex, final OIdentifiable iRecord, final Map<String, Integer> iColumns) {
    if (iIndex == 0)
      printHeader(iColumns);

    // FORMAT THE LINE DYNAMICALLY
    List<Object> vargs = new ArrayList<Object>();
    try {
      if (iRecord instanceof ODocument)
        ((ODocument) iRecord).setLazyLoad(false);

      final StringBuilder format = new StringBuilder(maxWidthSize);
      for (Entry<String, Integer> col : iColumns.entrySet()) {
        if (format.length() > 0)
          format.append('|');
        format.append("%-" + col.getValue() + "s");

        Object value = getFieldValue(iIndex, iRecord, col.getKey());

        if (value != null) {
          value = value.toString();
          if (((String) value).length() > col.getValue()) {
            // APPEND ...
            value = ((String) value).substring(0, col.getValue() - 3) + MORE;
          }
        }

        vargs.add(value);
      }

      out.message("\n" + format.toString(), vargs.toArray());

    } catch (Throwable t) {
      out.message("%3d|%9s|%s\n", iIndex, iRecord.getIdentity(), "Error on loading record dued to: " + t);
    }
  }

  private Object getFieldValue(final int iIndex, final OIdentifiable iRecord, final String iColumnName) {
    Object value = null;

    if (iColumnName.equals("#"))
      // RECORD NUMBER
      value = iIndex;
    else if (iColumnName.equals("@RID"))
      // RID
      value = iRecord.getIdentity().toString();
    else if (iRecord instanceof ODocument)
      value = ((ODocument) iRecord).field(iColumnName);
    else if (iRecord instanceof ORecordBytes)
      value = "<binary> (size=" + ((ORecordBytes) iRecord).toStream().length + " bytes)";
    else if (iRecord instanceof OIdentifiable) {
      final ORecord rec = iRecord.getRecord();
      if (rec instanceof ODocument)
        value = ((ODocument) rec).field(iColumnName);
      else if (rec instanceof ORecordBytes)
        value = "<binary> (size=" + ((ORecordBytes) rec).toStream().length + " bytes)";
    }

    return getPrettyFieldValue(value, maxMultiValueEntries);
  }

  public static String getPrettyFieldMultiValue(final Iterator<?> iterator, final int maxMultiValueEntries) {
    final StringBuilder value = new StringBuilder("[");
    for (int i = 0; iterator.hasNext(); i++) {
      if (i >= maxMultiValueEntries) {
        if (iterator instanceof OSizeable) {
          value.append("(size=");
          value.append(((OSizeable) iterator).size());
          value.append(")");
        } else
          value.append("(more)");

        break;
      }

      if (i > 0)
        value.append(',');

      value.append(getPrettyFieldValue(iterator.next(), maxMultiValueEntries));
    }

    value.append("]");

    return value.toString();
  }

  public static Object getPrettyFieldValue(Object value, final int multiValueMaxEntries) {
    if (value instanceof OMultiCollectionIterator<?>)
      value = getPrettyFieldMultiValue(((OMultiCollectionIterator<?>) value).iterator(), multiValueMaxEntries);
    else if (value instanceof ORidBag)
      value = getPrettyFieldMultiValue(((ORidBag) value).rawIterator(), multiValueMaxEntries);
    else if (value instanceof Iterator)
      value = getPrettyFieldMultiValue((Iterator<?>) value, multiValueMaxEntries);
    else if (value instanceof Collection<?>)
      value = getPrettyFieldMultiValue(((Collection<?>) value).iterator(), multiValueMaxEntries);
    else if (value instanceof ORecord) {
      if (((ORecord) value).getIdentity().equals(ORecordId.EMPTY_RECORD_ID)) {
        value = ((ORecord) value).toString();
      } else {
        value = ((ORecord) value).getIdentity().toString();
      }
    } else if (value instanceof Date) {
      final ODatabaseDocumentInternal db = ODatabaseRecordThreadLocal.INSTANCE.getIfDefined();
      if (db != null)
        value = db.getStorage().getConfiguration().getDateTimeFormatInstance().format((Date) value);
      else {
        value = DEF_DATEFORMAT.format((Date) value);
      }
    } else if (value instanceof byte[])
      value = "byte[" + ((byte[]) value).length + "]";

    return value;
  }

  private void printHeader(final Map<String, Integer> iColumns) {
    final StringBuilder buffer = new StringBuilder("\n");

    printHeaderLine(iColumns);
    int i = 0;
    for (Entry<String, Integer> column : iColumns.entrySet()) {
      if (i++ > 0)
        buffer.append('|');
      String colName = column.getKey();
      if (colName.length() > column.getValue())
        colName = colName.substring(0, column.getValue());
      buffer.append(String.format("%-" + column.getValue() + "s", colName));
    }
    out.message(buffer.toString());

    printHeaderLine(iColumns);
  }

  private void printHeaderLine(final Map<String, Integer> iColumns) {
    final StringBuilder buffer = new StringBuilder("\n");

    if (iColumns.size() > 0) {
      int i = 0;
      for (Entry<String, Integer> col : iColumns.entrySet()) {
        if (i++ > 0)
          buffer.append("+");

        for (int k = 0; k < col.getValue(); ++k)
          buffer.append("-");
      }
    }

    out.message(buffer.toString());
  }

  /**
   * Fill the column map computing the maximum size for a field.
   *
   * @param resultSet
   * @param limit
   * @return
   */
  private Map<String, Integer> parseColumns(final Collection<OIdentifiable> resultSet, final int limit) {
    final Map<String, Integer> columns = new LinkedHashMap<String, Integer>();

    for (String c : prefixedColumns)
      columns.put(c, minColumnSize);

    boolean tempRids = false;
    boolean hasClass = false;

    int fetched = 0;
    for (OIdentifiable id : resultSet) {
      ORecord rec = id.getRecord();

      for (String c : prefixedColumns)
        columns.put(c, getColumnSize(fetched, rec, c, columns.get(c)));

      if (rec instanceof ODocument) {
        ((ODocument) rec).setLazyLoad(false);
        // PARSE ALL THE DOCUMENT'S FIELDS
        final ODocument doc = (ODocument) rec;
        for (String fieldName : doc.fieldNames()) {
          columns.put(fieldName, getColumnSize(fetched, doc, fieldName, columns.get(fieldName)));
        }

        if (!hasClass && doc.getClassName() != null)
          hasClass = true;

      } else if (rec instanceof ORecordBytes) {
        // UNIQUE BINARY FIELD
        columns.put("value", maxWidthSize - 15);

      }

      if (!tempRids && !rec.getIdentity().isPersistent())
        tempRids = true;

      if (limit > -1 && fetched++ >= limit)
        break;
    }

    if (tempRids)
      columns.remove("@RID");

    if (!hasClass)
      columns.remove("@CLASS");

    // COMPUTE MAXIMUM WIDTH
    int width = 0;
    for (Entry<String, Integer> col : columns.entrySet())
      width += col.getValue();

    if (width > maxWidthSize) {
      // SCALE COLUMNS AUTOMATICALLY
      final List<Map.Entry<String, Integer>> orderedColumns = new ArrayList<Map.Entry<String, Integer>>();
      orderedColumns.addAll(columns.entrySet());
      Collections.sort(orderedColumns, new Comparator<Map.Entry<String, Integer>>() {

        public int compare(Map.Entry<String, Integer> o1, Map.Entry<String, Integer> o2) {
          return o1.getValue().compareTo(o2.getValue());
        }
      });

      // START CUTTING THE BIGGEST ONES
      Collections.reverse(orderedColumns);
      while (width > maxWidthSize) {
        int oldWidth = width;

        for (Map.Entry<String, Integer> entry : orderedColumns) {
          final int redux = entry.getValue() * 10 / 100;

          if (entry.getValue() - redux < minColumnSize)
            // RESTART FROM THE LARGEST COLUMN
            break;

          entry.setValue(entry.getValue() - redux);

          width -= redux;
          if (width <= maxWidthSize)
            break;
        }

        if (width == oldWidth)
          // REACHED THE MINIMUM
          break;
      }

      // POPULATE THE COLUMNS WITH THE REDUXED VALUES
      columns.clear();
      for (String c : prefixedColumns)
        columns.put(c, minColumnSize);
      Collections.reverse(orderedColumns);
      for (Entry<String, Integer> col : orderedColumns)
        // if (!col.getKey().equals("#") && !col.getKey().equals("@RID"))
        columns.put(col.getKey(), col.getValue());

    }

    if (tempRids)
      columns.remove("@RID");
    if (!hasClass)
      columns.remove("@CLASS");

    return columns;
  }

  private Integer getColumnSize(final Integer iIndex, final ORecord iRecord, final String fieldName, final Integer origSize) {
    Integer newColumnSize;
    if (origSize == null)
      // START FROM THE FIELD NAME SIZE
      newColumnSize = fieldName.length();
    else
      newColumnSize = Math.max(origSize, fieldName.length());

    final Object fieldValue = getFieldValue(iIndex, iRecord, fieldName);

    if (fieldValue != null) {
      final String fieldValueAsString = fieldValue.toString();
      if (fieldValueAsString.length() > newColumnSize)
        newColumnSize = fieldValueAsString.length();
    }

    if (newColumnSize < minColumnSize)
      // SET THE MINIMUM SIZE
      newColumnSize = minColumnSize;

    return newColumnSize;
  }
}


text:
package app;

import entities.CheckingAccount;
import entities.SavingAccount;
import entities.interfaces.Saving;
import entities.interfaces.Checking;

import javax.persistence.EntityManager;
import javax.persistence.EntityManagerFactory;
import javax.persistence.Persistence;
import java.math.BigDecimal;

public class Application {
    public static void main(String[] args) {
        EntityManagerFactory factory = Persistence.createEntityManagerFactory("PersistenceUnit");
        EntityManager em = factory.createEntityManager();

        Saving saving = new SavingAccount("A1", BigDecimal.valueOf(1000.00),2.5);
        Checking checking = new CheckingAccount("A2",BigDecimal.valueOf(554.98),5.0);

        em.getTransaction().begin();
        em.persist(saving);
        em.persist(checking);

        saving.deposit(BigDecimal.valueOf(100000.00));
        saving.withdraw(BigDecimal.valueOf(25789.00));
        checking.deductFee(5.0);

        em.persist(saving);
        em.persist(checking);

        em.getTransaction().commit();
        em.close();
        factory.close();

    }
}


text:
//
//  WWZTipView.h
//  BCSmart
//
//  Created by wwz on 16/11/14.
//  Copyright © 2016年 cn.zgkjd. All rights reserved.
//

#import "WWZShowView.h"

@interface WWZTipView : WWZShowView

/**
 *  buttonTitles count is no more then 2.
 */
- (instancetype)initWithAttributedText:(NSAttributedString *)attributedText
                          buttonTitles:(NSArray *)buttonTitles
                      clickButtonBlock:(void(^)(int index))block;

/**
 *  button color, default is black
 */
- (void)setButtonTitleColor:(UIColor *)buttonTitleColor;

/**
 *  button font, default is 16
 */
- (void)setButtonTitleFont:(UIFont *)buttonTitleFont;

/**
 *  button high back color, default is (204, 204, 204, 1)
 */
- (void)setButtonHighlightedBackgroundColor:(UIColor *)backgroundColor;
@end


text:
struct ID3D11DeviceContext;
class cAssimpLoader;

struct sJointData {
	int idx;
	int parIdx;
	int skinIdx;
};

class cRigData : public noncopyable {
	int mJointsNum = 0;
	int mIMtxNum = 0;
	sJointData* mpJoints = nullptr;
	DirectX::XMMATRIX* mpLMtx = nullptr;
	DirectX::XMMATRIX* mpIMtx = nullptr;
	std::string* mpNames = nullptr;
	bool mAllocatedArrays = false;

public:
	//cRigData() {}
	~cRigData();

	bool load(cstr filepath);
	bool load(cAssimpLoader& loader);

	int find_joint_idx(cstr name) const;
private:

	bool load_json(cstr filepath);

	friend class cJsonLoaderImpl;
	friend class cRig;
};

class cJoint {
	sXform* mpXform = nullptr;
	DirectX::XMMATRIX* mpLMtx = nullptr;
	DirectX::XMMATRIX* mpWMtx = nullptr;
	DirectX::XMMATRIX const* mpIMtx = nullptr;
	DirectX::XMMATRIX const* mpParentMtx = nullptr;
	//cJoint* mpParent = nullptr;
public:

	DirectX::XMMATRIX& get_local_mtx() { return *mpLMtx; }
	DirectX::XMMATRIX& get_world_mtx() { return *mpWMtx; }
	DirectX::XMMATRIX const* get_inv_mtx() { return mpIMtx; }
	//void set_inv_mtx(DirectX::XMMATRIX* pMtx) { mpIMtx = pMtx; }
	void set_parent_mtx(DirectX::XMMATRIX* pMtx) { mpParentMtx = pMtx; }

	sXform& get_xform() { return *mpXform; }

	void calc_local();
	void calc_world();

private:
	friend class cRig;
};

class cRig {
	int mJointsNum;
	cJoint* mpJoints;
	cRigData const* mpRigData;
	DirectX::XMMATRIX* mpLMtx;
	DirectX::XMMATRIX* mpWmtx;
	sXform* mpXforms;
public:

	void init(cRigData const* pRigData);

	void calc_local();
	void calc_world();

	void upload_skin(ID3D11DeviceContext* pCtx);

	cJoint* get_joint(int idx) const;
	cJoint* find_joint(cstr name) const;

};


text:
My personal blog's source files.
# How to Use
* get hexo next theme source code

```
git submodule update --init --recursive
```
* install packages

```
npm install
```
# Preview
```
hexo g
hexo s
```


text:
package net.openhft.chronicle.wire.examples;

public interface PersonOps {
   void addPerson(Person p);
}


text:
#ifndef ZMQ_TEST_HARNESS_HH__
#define ZMQ_TEST_HARNESS_HH__

#include <boost/assign.hpp>
#include <set>
#include <deque>
namespace utils{
    class TestUtils{
        private:
            std::map<std::string,std::string> m_cmd_resp_dict;
            std::string m_default_response;
        public:
            TestUtils()
                :m_default_response("UNKOWN_COMMAND"){
                m_cmd_resp_dict = boost::assign::map_list_of("A_REGISTER","REG_ACK")("B_COMMAND_1","CMD_ACK")("C_TASK","TASK_ACK")("X_STOP","STOP_ACK");
            }
            std::string LogPathCreator(std::string test_name){
                std::string log_path("/tmp/");
                log_path.append(boost::unit_test::framework::current_test_case().p_name);
                log_path.append(".log");
                return log_path;
            }

            std::string GetIDString(){
                // generate random identity
                char identity[10] = {};
                sprintf(identity, "%04X-%04X", within(0x10000), within(0x10000));
                std::string id(identity);
                BOOST_ASSERT(id.length() == strlen(identity));
                return id;
            }

            std::string GetResponse(const std::string& req){
                std::map<std::string,std::string>::iterator it = m_cmd_resp_dict.find(req);
                 return (it != m_cmd_resp_dict.end()) ? it->second : m_default_response ;

            }

            const std::map<std::string,std::string> GetDictionary(){
                return m_cmd_resp_dict;
            }
    };

    class client_task {
        private:
            bool MessageHandler()
            {
                std::deque<std::string> data;
                int more = 0;
                size_t more_size = sizeof(more);
                do{
                    data.push_back(s_recv(client_socket_));
                    client_socket_.getsockopt(ZMQ_RCVMORE, &more, &more_size);
                }while(more);
                if(std::strcmp(data[0].c_str(),m_test_utils.GetResponse("X_STOP").c_str())){
                    BOOST_TEST_MESSAGE("sending command .. X_STOP"  );
                    client_socket_.send("X_STOP",6);
                    return true;
                }
                else{
                    return false;
                }
            }
        public:
            client_task()
                : ctx_(1),
                client_socket_(ctx_, ZMQ_DEALER),
                m_identity(m_test_utils.GetIDString())
        {}
            void run() {
                s_catch_signals();
                int linger = 0;
                client_socket_.setsockopt(ZMQ_IDENTITY, m_identity.c_str(), m_identity.length());
                client_socket_.setsockopt(ZMQ_LINGER, &linger, sizeof(linger));
                client_socket_.connect("tcp://localhost:5570");
                s_send(client_socket_,"A_REGISTER");
                zmq::pollitem_t items[] = {{static_cast<void *>(client_socket_), 0, ZMQ_POLLIN, 0}};
                try {
                    while(!s_interrupted){
                        zmq::poll(items, 1, 10);// 10 milliseconds
                        if (items[0].revents & ZMQ_POLLIN) {
                            if(!MessageHandler())
                                break;
                        }
                    }
                }
                catch (std::exception &e) {}
            }

        private:
            TestUtils m_test_utils;
            zmq::context_t ctx_;
            zmq::socket_t client_socket_;
            const std::string m_identity;
            std::deque<std::string> m_test_queue;

    };

    class server_task {
        private:
            bool MessageHandler(){
                std::deque<std::string> data ;
                int more = 0;
                size_t more_size = sizeof(more);
                do{
                    data.push_back(s_recv(frontend_));
                    frontend_.getsockopt(ZMQ_RCVMORE, &more, &more_size);
                }while(more);
                BOOST_TEST_MESSAGE(data[1]);
                frontend_.send(data[0].c_str(),data[0].length(),ZMQ_SNDMORE);
                s_send(frontend_,m_test_utils.GetResponse(data[1]));
                return (std::strcmp(data[1].c_str(),"X_STOP"));
            }
        public:
            server_task()
                :m_cmd_itr(m_test_utils.GetDictionary().begin())
                ,ctx_(1)
                ,frontend_(ctx_, ZMQ_ROUTER)
                ,m_identity("SERVER")
        {}

            void run() {
                s_catch_signals();
                frontend_.bind("tcp://*:5570");
                int linger = 0;
                frontend_.setsockopt(ZMQ_IDENTITY, m_identity.c_str(), m_identity.length());
                frontend_.setsockopt(ZMQ_LINGER, &linger, sizeof(linger));
                zmq::pollitem_t items[] = {{static_cast<void *>(frontend_), 0, ZMQ_POLLIN, 0}};
                try {
                    while(!s_interrupted){
                        zmq::poll(items, 1, 10);// 10 milliseconds
                        if (items[0].revents & ZMQ_POLLIN) {
                            if(!MessageHandler())
                                break;
                        }
                    }
                }
                catch (std::exception &e) {}
            }
        private:
            TestUtils m_test_utils;
            zmq::context_t ctx_;
            zmq::socket_t frontend_;
            std::string m_identity;
    };
};
#endif /* ZMQ_TEST_HARNESS_HH__ */


text:
/** Returns `true` if the query string looks like it could be a commit SHA */
export const isQueryPossiblyASha = ({ query }) => /^[0-9a-f]{4,40}$/i.test(query);

/** Returns `true` if there is at least one in-progress request */
export const isLoading = ({ requestCount }) => requestCount > 0;


text:
<!doctype html>
<meta charset="utf-8">
<title>'scrollbar-gutter' property</title>
<link rel="help" href="https://drafts.css-houdini.org/css-typed-om-1/#dom-stylepropertymap-get">
<link rel="help" href="https://drafts.css-houdini.org/css-typed-om-1/#dom-stylepropertymap-set">
<link rel="help" href="https://drafts.css-houdini.org/css-typed-om-1/#property-stle-value-normalization">


text:
/*引入express*/
var express = require('express');
var port = 8002;
var path = require('path');

var runPath = __dirname + '/dist'
/*实例化express*/
var app = express();
app.use(express.static(path.join(__dirname, 'dist')));

app.listen(port, function afterListen () {
  console.log('---------------------------------------')
  console.log('express server root path:%s', runPath);
  console.log('express running on the http://localhost:%s', port);
});