text:
typedef struct {
	bdev_t* parent;
	efi_vendor_device_path_t* parent_path;
	uint32_t index;
} bio_subdev_pdata_t;

static bdev_t* media_devices[MAX_DEVICES];
static uint32_t num_devices = 0;

static efi_status_t efi_bio_reset(struct efi_block_io* this, efi_boolean_t extended_verification) {
	DEBUG_ASSERT(0);
	return EFI_UNSUPPORTED;
}
static efi_status_t efi_bio_read_blocks(struct efi_block_io* this, efi_uint32_t media_id, efi_lba_t lba, efi_uintn_t buffer_size, void* buffer) {
	// check media id
	if(this->media->media_id>=num_devices)
		return EFI_INVALID_PARAMETER;

	// get bio dev
	bdev_t* dev = media_devices[this->media->media_id];

	// read
	bio_read_block(dev, buffer, lba, buffer_size/dev->block_size);

	return EFI_SUCCESS;
}
static efi_status_t efi_bio_write_blocks(struct efi_block_io* this, efi_uint32_t media_id, efi_lba_t lba, efi_uintn_t buffer_size, void* buffer) {
	return EFI_WRITE_PROTECTED;
}
static efi_status_t efi_bio_flush_blocks(struct efi_block_io* this) {
	return EFI_SUCCESS;
}

static void bio_subdev_cb(const char* name, void* _pdata) {
	bio_subdev_pdata_t* pdata = _pdata;
	const char* parent_name = pdata->parent->name;

	// check for free slot
	if(num_devices>=MAX_DEVICES)
		return;

	// ignore device which are not the parent itself or a subdevice of it
	if(strncmp(parent_name, name, strlen(parent_name)))
		return;

	// check if this device is the parent
	bool is_parent = !strcmp(name, parent_name);
	bool is_memdisk = !strcmp(parent_name, "grub_ramdisk");

	// open disk
	bdev_t* dev;
	if(is_parent)
		dev = pdata->parent;
	else
		dev= bio_open(name);
	if(!dev || dev->is_virtual) return;

	// get partition offset
	efi_lba_t partition_start = 0;
	if(dev->is_subdev) {
		subdev_t* subdev = (subdev_t*)dev;
		partition_start = subdev->offset;
	}

	// add to media devices
	uint32_t media_id = num_devices++;
	media_devices[media_id] = dev;

	// create handle
	efi_handle_t handle = uefi_create_handle();

	// allocate media device
	efi_block_io_media_t* media = calloc(sizeof(efi_block_io_media_t), 1);
	media->media_id = media_id;
	media->removable_media = false;
	media->media_present = true;
	media->logical_partition = !is_parent;
	media->read_only = true;
	media->write_caching = false;
	media->block_size = dev->block_size;
	media->io_align = 4;
	media->last_block = dev->block_count;

	// create blockio interface
	efi_block_io_t* bio = calloc(sizeof(efi_block_io_t), 1);
	bio->revision = 0x10000;
	bio->media = media;
	bio->reset = efi_bio_reset;
	bio->read_blocks = efi_bio_read_blocks;
	bio->write_blocks = efi_bio_write_blocks;
	bio->flush_blocks = efi_bio_flush_blocks;

	// add blockio protocol
	efi_guid_t guid_block = EFI_BLOCK_IO_GUID;
	uefi_add_protocol_interface(handle, guid_block, bio);

	uint32_t path_len = pdata->parent_path->header.length;
	if(is_memdisk)
		path_len+=sizeof(efi_cdrom_device_path_t);
	else
		path_len+=sizeof(efi_hard_drive_device_path_t);

	// create devicepath based on parent's path
	void* _dp = uefi_create_device_path(path_len);
	memcpy(_dp, pdata->parent_path, pdata->parent_path->header.length);

	if(is_memdisk) {
		// create CDROM device path
		efi_cdrom_device_path_t* dp = _dp + pdata->parent_path->header.length;
		dp->header.type = EFI_MEDIA_DEVICE_PATH_TYPE;
		dp->header.subtype = EFI_CDROM_DEVICE_PATH_SUBTYPE;
		dp->header.length = sizeof(*dp);
		dp->partition_start = partition_start;
		dp->partition_size = dev->size/dev->block_size;
		++pdata->index;
	}
	else {
		// create HD device path
		efi_hard_drive_device_path_t* dp = _dp + pdata->parent_path->header.length;
		dp->header.type = EFI_MEDIA_DEVICE_PATH_TYPE;
		dp->header.subtype = EFI_HARD_DRIVE_DEVICE_PATH_SUBTYPE;
		dp->header.length = sizeof(*dp);
		dp->partition_number = pdata->index++;
		dp->partition_start = partition_start;
		dp->partition_size = dev->size/dev->block_size;
	}

	// add device path protocol
	efi_guid_t guid_dp = EFI_DEVICE_PATH_GUID;
	uefi_add_protocol_interface(handle, guid_dp, _dp);
}

static void bio_iter_cb(const char* name, void* pdata) {
	// check for free slot
	if(num_devices>=MAX_DEVICES)
		return;

	// open disk
	bdev_t* dev = bio_open(name);
	if(!dev || dev->is_virtual) return;

	// add to media devices
	uint32_t media_id = num_devices++;
	media_devices[media_id] = dev;

	// create handle
	efi_handle_t handle = uefi_create_handle();

	// allocate media device
	efi_block_io_media_t* media = calloc(sizeof(efi_block_io_media_t), 1);
	media->media_id = media_id;
	media->removable_media = false;
	media->media_present = true;
	media->logical_partition = dev->is_subdev;
	media->read_only = true;
	media->write_caching = false;
	media->block_size = dev->block_size;
	media->io_align = 0;
	media->last_block = dev->block_count;

	// create blockio interface
	efi_block_io_t* bio = calloc(sizeof(efi_block_io_t), 1);
	bio->revision = 0x10000;
	bio->media = media;
	bio->reset = efi_bio_reset;
	bio->read_blocks = efi_bio_read_blocks;
	bio->write_blocks = efi_bio_write_blocks;
	bio->flush_blocks = efi_bio_flush_blocks;

	// add blockio protocol
	efi_guid_t guid_block = EFI_BLOCK_IO_GUID;
	uefi_add_protocol_interface(handle, guid_block, bio);

	// add vendor device path with a random GUID
	efi_vendor_device_path_t* dp = uefi_create_device_path(sizeof(efi_vendor_device_path_t));
	dp->header.type = EFI_HARDWARE_DEVICE_PATH_TYPE;
	dp->header.subtype = EFI_VENDOR_DEVICE_PATH_SUBTYPE;
	dp->header.length = sizeof(*dp);
	random_guid(&dp->vendor_guid);

	// add partitions
	bio_subdev_pdata_t subdev_pdata = {dev, dp, 0};
	bio_foreach(bio_subdev_cb, true, &subdev_pdata);

	// add device path protocol
	efi_guid_t guid_dp = EFI_DEVICE_PATH_GUID;
	uefi_add_protocol_interface(handle, guid_dp, dp);
}

efi_status_t uefi_api_blockio_init(void) {
	bio_foreach(bio_iter_cb, false, NULL);

	return EFI_SUCCESS;
}

efi_status_t uefi_api_blockio_by_name(efi_handle_t image_handle, const char* name, const char* label, efi_handle_t* dev_handle) {
	// get boot device handle
	efi_handle_t handles[MAX_DEVICES];
	efi_uintn_t bufsize = ARRAY_SIZE(handles)*sizeof(*handles);
	efi_guid_t guid_block = EFI_BLOCK_IO_GUID;
	if(efi_system_table.boot_services->locate_handle(EFI_BY_PROTOCOL, &guid_block, 0, &bufsize, handles)==EFI_SUCCESS) {
		uint32_t i;
		for(i=0; i<bufsize/sizeof(*handles); i++) {
			efi_block_io_t* bio;
			if(efi_system_table.boot_services->open_protocol(handles[i], &guid_block, (void**)&bio, image_handle, NULL, EFI_OPEN_PROTOCOL_GET_PROTOCOL)!=EFI_SUCCESS)
				continue;

			// get bio dev
			bdev_t* dev = media_devices[bio->media->media_id];

			// by name
			if(name && !strcmp(dev->name, name)) {
				*dev_handle = handles[i];
				return EFI_SUCCESS;
			}

			// by label
			if(label && dev->label && !strcmp(dev->label, label)) {
				*dev_handle = handles[i];
				return EFI_SUCCESS;
			}
		}
	}

	return EFI_NOT_FOUND;
}


text:
<!DOCTYPE html>

  <meta charset="utf-8" />
  <meta http-equiv="X-UA-Compatible" content="IE=edge" />
  <meta name="HandheldFriendly" content="true" />
  <link rel="shortcut icon" href="https://www.epa.gov/sites/all/themes/epa/favicon.ico" type="image/vnd.microsoft.icon" />
  <meta name="MobileOptimized" content="width" />
  <meta http-equiv="cleartype" content="on" />
  <meta http-equiv="ImageToolbar" content="false" />
  <meta name="viewport" content="width=device-width" />
  <meta name="version" content="20161218" />

  <meta name="DC.description" content="" />
  <meta name="DC.title" content="" />
  <title>
  Electrochemical Arsenic Remediation in Rural Bangladesh|

  Research Project Database | Grantee Research Project | ORD | US EPA</title>

  <meta name="keywords" content="" />
  <link rel="shortlink" href="" />
  <link rel="canonical" href="" />
  <meta name="DC.creator" content="" />
  <meta name="DC.language" content="en" />
  <meta name="DC.Subject.epachannel" content="" />
  <meta name="DC.type" content="" />
  <meta name="DC.date.created" content="" />
  <meta name="DC.date.modified" content="2007-11-08" />

  <link type="text/css" rel="stylesheet" href="https://www.epa.gov/misc/ui/jquery.ui.autocomplete.css" media="all" />
  <link type="text/css" rel="stylesheet" href="https://www.epa.gov/sites/all/themes/epa/css/lib/jquery.ui.theme.css" media="all" />
  <link type="text/css" rel="stylesheet" href="https://www.epa.gov/sites/all/libraries/template2/s.css" media="all" />

	<link rel="alternate" type="application/atom+xml" title="EPA.gov All Press Releases" href="https://www.epa.gov/newsreleases/search/rss" />
	<link rel="alternate" type="application/atom+xml" title="EPA.gov Headquarters Press Releases" href="https://www.epa.gov/newsreleases/search/rss/field_press_office/headquarters" />
	<link rel="alternate" type="application/atom+xml" title="Greenversations, EPA's Blog" href="https://blog.epa.gov/blog/feed/" />

Jump to main content

  <hgroup class="site-name-and-slogan">

US EPA

United States Environmental Protection Agency

  </hgroup>
  <form class="epa-search" method="get" action="https://search.epa.gov/epasearch/epasearch">
    Search
    <input class="form-text" placeholder="Search EPA.gov" name="querytext" id="search-box" value=""/>
    <button class="epa-search-button" id="search-button" type="submit" title="Search">Search</button>
    <input type="hidden" name="fld" value="" />
    <input type="hidden" name="areaname" value="" />
    <input type="hidden" name="areacontacts" value="" />
    <input type="hidden" name="areasearchurl" value="" />
    <input type="hidden" name="typeofsearch" value="epa" />
    <input type="hidden" name="result_template" value="2col.ftl" />
    <input type="hidden" name="filter" value="sample4filt.hts" />
  </form>

Contact Us

Project Research Results

Final Report

P3 Phase II

                                | Final Report

                      2 publications for this project

Related Information

Research Grants

P3: Student Design Competition

Research Fellowships

Small Business Innovation Research (SBIR)

Grantee Research Project Results Search

      Electrochemical Arsenic Remediation in Rural Bangladesh

    EPA Grant Number: SU833553

    Title: Electrochemical Arsenic Remediation in Rural Bangladesh

    Investigators:
     Gadgil, Ashok
        ,  Amrose, Susan

        Current Investigators:

             Gadgil, Ashok
            ,
             Amrose, Susan
            ,
             Cheng, Deborah
            ,
             Huang, Jessica
            ,
             Kostecki, Robert
            ,
             Kowolik, Kristin
            ,
             Muller, Marc
            ,
             Srinivasan, Venkat

      Institution:

      University of California - Berkeley

    	EPA Project Officer:

           Nolt-Helms, Cynthia

        Phase: I

      Project Period:
      September 30, 2007 through
        September 30, 2008

        Project Amount:

          $9,971

      RFA:
      P3 Awards: A National Student Design Competition for Sustainability Focusing on People, Prosperity and the Planet (2007)

        		RFA Text |
          Recipients Lists

      Research Category:

          Pollution Prevention/Sustainable Development
          ,
          P3 Challenge Area - Water
          ,
          P3 Awards
          ,
          Sustainability

Objective:

Today 60 million Bangladeshi citizens are being slowly poisoned as they drink arsenic contaminated water from wells that contain up to 100 times the maximum limit set by WHO. This is a clear case of essential needs of the current generation going unmet, violating the first requirement of sustainability. Low cost methods of remediation currently available have been found to be ineffective for high concentrations of arsenic in the region. A novel use of electrocoagulation (EC) technology has the potential to overcome the obstacles of previous methods and can be used affordably and on a small-scale, allowing for rapid dissemination into Bangladesh to help put an end to this arsenic crisis.

Approach:

We propose to build on our own promising initial results from a project at LBNL, ending in August 2007, that demonstrate the ability of EC to reduce the arsenic content in Bangladeshi drinking water to below health standard levels. We will produce an experimental assessment of the EC operating parameters required for effective remediation in the specific water environment of Bangladesh and optimize those parameters while bearing in mind the economic and technical requirements to function successfully in remote areas. The outcome of this work will be an increase in the health and standard of living of the Bangladeshi people, giving them a chance to prosper while avoiding the detrimental effects to the planet that would occur from other less effective, large-scale, high-cost, and high waste output remediation strategies.

This work will be carried out by a graduate student who will learn how to apply and direct basic research towards a sustainable goal in a developing country.

Publications and Presentations:

        Publications have been submitted on this project: View all 2 publications for this project

Supplemental Keywords:

      drinking water, groundwater, adsorption, chemicals, toxics, heavy metals, Bangladesh,

Relevant Websites:

        Phase 2 Abstract

Progress and Final Reports:

                Final Report

P3 Phase II:

              Electrochemical Arsenic Remediation in Rural Bangladesh

               | Final Report

Top of Page

 The perspectives, information and conclusions conveyed in research project abstracts, progress reports, final reports, journal abstracts and journal publications convey the viewpoints of the principal investigator and may not represent the views and policies of ORD and EPA.  Conclusions drawn by the principal investigators have not been reviewed by the Agency.

Main menu

Environmental Topics

Laws & Regulations

About EPA

Discover.

Accessibility

EPA Administrator

Budget & Performance

Contracting

Grants

No FEAR Act Data

Privacy and Security

Connect.

Data.gov

Inspector General

Jobs

Newsroom

Open Government

Regulations.gov

Subscribe

USA.gov

White House

Ask.

Contact Us

Hotlines

FOIA Requests

Frequent Questions

Follow.

Facebook

Twitter

YouTube

Flickr

Instagram

Last updated on Thursday, November 8, 2007

redpajama_set_name: RedPajamaGithub


text:
package jetbrains.buildServer.nuget.server.trigger.impl.queue;

import com.intellij.openapi.diagnostic.Logger;
import jetbrains.buildServer.nuget.server.trigger.impl.checker.PackageChecker;
import jetbrains.buildServer.nuget.server.trigger.impl.settings.PackageCheckerSettings;
import jetbrains.buildServer.nuget.server.trigger.impl.source.NuGetSourceChecker;
import jetbrains.buildServer.util.NamedDaemonThreadFactory;
import org.jetbrains.annotations.NotNull;

import java.util.Collection;
import java.util.concurrent.Executors;
import java.util.concurrent.ScheduledExecutorService;
import java.util.concurrent.TimeUnit;

/**
 * @author Eugene Petrenko (eugene.petrenko@gmail.com)
 *         Date: 30.09.11 14:30
 */
public class PackageChangesCheckerThread {
  private static final Logger LOG = Logger.getInstance(PackageChangesCheckerThread.class.getName());

  private final ScheduledExecutorService myExecutor;
  private final PackageCheckQueue myHolder;
  private final Collection<PackageChecker> myCheckers;
  private final NuGetSourceChecker myPreChecker;

  public PackageChangesCheckerThread(@NotNull final PackageCheckQueue holder,
                                     @NotNull final PackageCheckerSettings settings,
                                     @NotNull final Collection<PackageChecker> checkers,
                                     @NotNull final NuGetSourceChecker preChecker) {
    myHolder = holder;
    myCheckers = checkers;
    myPreChecker = preChecker;
    myExecutor = Executors.newScheduledThreadPool(settings.getCheckerThreads(), new NamedDaemonThreadFactory("NuGet Packages Version Checker"));
  }

  public void stopPackagesCheck() {
    myExecutor.shutdownNow();
    try {
      myExecutor.awaitTermination(30, TimeUnit.SECONDS);
    } catch (InterruptedException e) {
      LOG.debug("Interrupted wait of NuGet packages checker executor service shutdown. ", e);
    }
  }

  public void startPackagesCheck() {
    new PackageChangesCheckerThreadTask(myHolder, myExecutor, myCheckers, myPreChecker).postCheckTask();
  }
}


text:
namespace blink {
namespace {

WebNotificationData::Direction toDirectionEnumValue(const String& direction)
{
    if (direction == "ltr")
        return WebNotificationData::DirectionLeftToRight;
    if (direction == "rtl")
        return WebNotificationData::DirectionRightToLeft;

    return WebNotificationData::DirectionAuto;
}

} // namespace

WebNotificationData createWebNotificationData(ExecutionContext* executionContext, const String& title, const NotificationOptions& options, ExceptionState& exceptionState)
{
    // If silent is true, the notification must not have a vibration pattern.
    if (options.hasVibrate() && options.silent()) {
        exceptionState.throwTypeError("Silent notifications must not specify vibration patterns.");
        return WebNotificationData();
    }

    WebNotificationData webData;

    webData.title = title;
    webData.direction = toDirectionEnumValue(options.dir());
    webData.lang = options.lang();
    webData.body = options.body();
    webData.tag = options.tag();

    KURL iconUrl;

    // TODO(peter): Apply the appropriate CORS checks on the |iconUrl|.
    if (options.hasIcon() && !options.icon().isEmpty()) {
        iconUrl = executionContext->completeURL(options.icon());
        if (!iconUrl.isValid())
            iconUrl = KURL();
    }

    webData.icon = iconUrl;
    webData.vibrate = NavigatorVibration::sanitizeVibrationPattern(options.vibrate());
    webData.silent = options.silent();

    if (options.hasData()) {
        RefPtr<SerializedScriptValue> serializedScriptValue = SerializedScriptValueFactory::instance().create(options.data().isolate(), options.data(), nullptr, exceptionState);
        if (exceptionState.hadException())
            return WebNotificationData();

        Vector<char> serializedData;
        serializedScriptValue->toWireBytes(serializedData);

        webData.data = serializedData;
    }

    Vector<WebNotificationAction> actions;

    const size_t maxActions = Notification::maxActions();
    for (const NotificationAction& action : options.actions()) {
        if (action.action().isEmpty()) {
            exceptionState.throwTypeError("NotificationAction `action` must not be empty.");
            return WebNotificationData();
        }

        if (action.title().isEmpty()) {
            exceptionState.throwTypeError("NotificationAction `title` must not be empty.");
            return WebNotificationData();
        }

        if (actions.size() >= maxActions)
            continue;

        WebNotificationAction webAction;
        webAction.action = action.action();
        webAction.title = action.title();

        actions.append(webAction);
    }

    webData.actions = actions;

    return webData;
}

} // namespace blink


text:
{% if site.analytics.google %}
{% include themes/hacking-in-the-dark/fragments/js/analytics/google.html %}
{% endif %}

{% if site.analytics.heap %}
{% include themes/hacking-in-the-dark/fragments/js/analytics/heap.html %}
{% endif %}


text:
#ifndef __itkVectorImage_h
#define __itkVectorImage_h

#include "itkImageRegion.h"
#include "itkImportImageContainer.h"
#include "itkDefaultVectorPixelAccessor.h"
#include "itkDefaultVectorPixelAccessorFunctor.h"
#include "itkVectorImageNeighborhoodAccessorFunctor.h"
#include "itkWeakPointer.h"

namespace itk
{
/** \class VectorImage
 *  \brief Templated n-dimensional vector image class.
 *
 * This class differs from Image in that it is intended to represent multiple
 * images. Each pixel represents \e k measurements, each of datatype \e TPixel.
 * The memory organization of the resulting image is as follows:
 *   ... Pi0 Pi1 Pi2 Pi3 P(i+1)0 P(i+1)1 P(i+1)2 P(i+1)3 P(i+2)0 ...
 * where Pi0 represents the 0th measurement of the pixel at index i.
 *
 * Conceptually, a <tt>VectorImage< TPixel, 3 ></tt> is the same as a
 * <tt>Image< VariableLengthVector< TPixel >, 3 ></tt>. The difference lies in the memory
 * organization. The latter results in a fragmented
 * organization with each location in the Image holding a pointer to an \c VariableLengthVector
 * holding the actual pixel. The former stores the \e k pixels instead of a
 * pointer reference, which apart from avoiding fragmentation of memory also avoids
 * storing a 8 bytes of pointer reference for each pixel.
 * The parameter \e k can be set using \c SetVectorLength.
 *
 * The API of the class is such that it returns a pixeltype VariableLengthVector< TPixel > when
 * queried, with the data internally pointing to the buffer. (the container does not
 * manage the memory). Similarly SetPixel calls can be made with VariableLengthVector< TPixel >.
 *
 * The API of this class is similar to Image.
 *
 * \par Caveats:
 * When using Iterators on this image, you cannot use the it.Value(). You must use
 * Set/Get() methods instead.
 *
 * \note
 * This work is part of the National Alliance for Medical Image Computing
 * (NAMIC), funded by the National Institutes of Health through the NIH Roadmap
 * for Medical Research, Grant U54 EB005149.
 *
 * \sa DefaultVectorPixelAccessor
 * \sa DefaultVectorPixelAccessorFunctor
 * \sa VectorImageToImagePixelAccessor
 * \sa VectorImageToImageAdaptor
 * \sa Image
 * \sa ImportImageContainer
 *
 * \example itkVectorImageTest.cxx
 *
 * \ingroup ImageObjects
 * \ingroup ITKCommon
 *
 * \wiki
 * \wikiexample{IO/ReadVectorImage,Read an image file with an unknown number of components}
 * \wikiexample{VectorImages/VectorImage,Create a vector image}
 * \wikiexample{VectorImages/NeighborhoodIterator,NeighborhoodIterator on a VectorImage}
 * \endwiki
 */
template< class TPixel, unsigned int VImageDimension = 3 >
class ITK_EXPORT VectorImage:
  public ImageBase< VImageDimension >
{
public:
  /** Standard class typedefs */
  typedef VectorImage                  Self;
  typedef ImageBase< VImageDimension > Superclass;
  typedef SmartPointer< Self >         Pointer;
  typedef SmartPointer< const Self >   ConstPointer;
  typedef WeakPointer< const Self >    ConstWeakPointer;

  /** Method for creation through the object factory. */
  itkNewMacro(Self);

  /** Run-time type information (and related methods). */
  itkTypeMacro(VectorImage, ImageBase);

  /** Pixel typedef support. Used to declare pixel type in filters
   * or other operations. This is not the actual pixel type contained in
   * the buffer, ie m_Buffer. The image exhibits an external API of an
   * VariableLengthVector< T > and internally stores its data as type T. */
  typedef VariableLengthVector< TPixel > PixelType;

  /** This is the actual pixel type contained in the buffer. Each vector
   * pixel is composed of 'm_VectorLength' contiguous InternalPixelType.
   */
  typedef TPixel InternalPixelType;

  /** Typedef alias for PixelType */
  typedef PixelType ValueType;

  typedef InternalPixelType IOPixelType;

  /** Accessor type that convert data between internal and external
   *  representations.  */
  typedef DefaultVectorPixelAccessor< InternalPixelType > AccessorType;

  /** Functor to provide a common API between DefaultPixelAccessor and
   * DefaultVectorPixelAccessor */
  typedef DefaultVectorPixelAccessorFunctor< Self > AccessorFunctorType;

  /** Typedef for the functor used to access a neighborhood of pixel
   * pointers. */
  typedef VectorImageNeighborhoodAccessorFunctor<
    Self >              NeighborhoodAccessorFunctorType;

  /** Dimension of the image.  This constant is used by functions that are
   * templated over image type (as opposed to being templated over pixel type
   * and dimension) when they need compile time access to the dimension of
   * the image. */
  itkStaticConstMacro(ImageDimension, unsigned int, VImageDimension);

  /** Index typedef support. An index is used to access pixel values. */
  typedef typename Superclass::IndexType      IndexType;
  typedef typename Superclass::IndexValueType IndexValueType;

  /** Offset typedef support. An offset is used to access pixel values. */
  typedef typename Superclass::OffsetType OffsetType;

  /** Size typedef support. A size is used to define region bounds. */
  typedef typename Superclass::SizeType      SizeType;

  /** Container used to store pixels in the image. */
  typedef ImportImageContainer< SizeValueType, InternalPixelType > PixelContainer;

  /** Direction typedef support. A matrix of direction cosines. */
  typedef typename Superclass::DirectionType DirectionType;

  /** Region typedef support. A region is used to specify a subset of an image.
    */
  typedef typename Superclass::RegionType RegionType;

  /** Spacing typedef support.  Spacing holds the size of a pixel.  The
   * spacing is the geometric distance between image samples. */
  typedef typename Superclass::SpacingType SpacingType;

  /** Origin typedef support.  The origin is the geometric coordinates
   * of the index (0,0). */
  typedef typename Superclass::PointType PointType;

  /** A pointer to the pixel container. */
  typedef typename PixelContainer::Pointer      PixelContainerPointer;
  typedef typename PixelContainer::ConstPointer PixelContainerConstPointer;

  /** Offset typedef (relative position between indices) */
  typedef typename Superclass::OffsetValueType OffsetValueType;

  typedef unsigned int VectorLengthType;

  /**
   * \brief A structure which enable changing any image class' pixel
   * type to another.
   *
   * Since the pixel type of this class is a VariableLengthVector of
   * TPixelType, the following two rebinds result in the same type to
   * enable usage with the numeric trait's type.
   *
   * \code
   * typename InputImageType::template template Rebind<double>::Type RealImageType1;
   * typename InputImageType::template template Rebind<VariableLengthVector<double> >::Type RealImageType2;
   * \endcode
   *
   * \sa Image::Rebind
   */
  template <typename UPixelType, unsigned int UImageDimension = VImageDimension>
  struct Rebind
  {
    typedef itk::VectorImage<UPixelType, UImageDimension>  Type;
  };

  /** \cond HIDE_SPECIALIZATION_DOCUMENTATION */
  template <typename UElementType, unsigned int UImageDimension>
  struct Rebind< VariableLengthVector< UElementType >, UImageDimension>
  {
    typedef itk::VectorImage<UElementType, UImageDimension>  Type;
  };
  /** \endcond */

  /** Allocate the image memory. The size of the image must
   * already be set, e.g. by calling SetRegions(). */
  void Allocate();

  /** Convenience methods to set the LargestPossibleRegion,
   *  BufferedRegion and RequestedRegion. Allocate must still be called.
   */
  void SetRegions(RegionType region)
  {
    this->SetLargestPossibleRegion(region);
    this->SetBufferedRegion(region);
    this->SetRequestedRegion(region);
  }

  void SetRegions(SizeType size)
  {
    RegionType region; region.SetSize(size);

    this->SetLargestPossibleRegion(region);
    this->SetBufferedRegion(region);
    this->SetRequestedRegion(region);
  }

  /** Restore the data object to its initial state. This means releasing
   * memory. */
  virtual void Initialize();

  /** Fill the image buffer with a value.  Be sure to call Allocate()
   * first. */
  void FillBuffer(const PixelType & value);

  /** \brief Set a pixel value.
   *
   * Allocate() needs to have been called first -- for efficiency,
   * this function does not check that the image has actually been
   * allocated yet. */
  void SetPixel(const IndexType & index, const PixelType & value)
  {
    OffsetValueType offset = m_VectorLength * this->ComputeOffset(index);

    for ( VectorLengthType i = 0; i < m_VectorLength; i++ )
      {
      ( *m_Buffer )[offset + i] = value[i];
      }
  }

  /** \brief Get a pixel (read only version).
   *
   * For efficiency, this function does not check that the
   * image has actually been allocated yet. Note that the method returns a
   * pixel on the stack. */
  const PixelType GetPixel(const IndexType & index) const
  {
    OffsetValueType offset = m_VectorLength * this->ComputeOffset(index);
    PixelType       p(&( ( *m_Buffer )[offset] ), m_VectorLength);

    return p;
  }

  /** \brief Get a reference to a pixel (e.g. for editing).
   *
   * For efficiency, this function does not check that the
   * image has actually been allocated yet. */
  PixelType  GetPixel(const IndexType & index)
  {
    OffsetValueType offset = m_VectorLength * this->ComputeOffset(index);
    PixelType       p(&( ( *m_Buffer )[offset] ), m_VectorLength);

    return p;
  }

  /** \brief Access a pixel. This version cannot be an lvalue because the pixel
   * is converted on the fly to a VariableLengthVector.
   *
   * For efficiency, this function does not check that the
   * image has actually been allocated yet. */
  PixelType operator[](const IndexType & index) { return this->GetPixel(index); }

  /** \brief Access a pixel. This version can only be an rvalue because the
   * pixel is converted on the fly to a VariableLengthVector.
   *
   * For efficiency, this function does not check that the
   * image has actually been allocated yet. */
  PixelType operator[](const IndexType & index) const { return this->GetPixel(index); }

  /** Return a pointer to the beginning of the buffer.  This is used by
   * the image iterator class. */
  InternalPixelType * GetBufferPointer()
  {
    return m_Buffer ? m_Buffer->GetBufferPointer() : 0;
  }
  const InternalPixelType * GetBufferPointer() const
  {
    return m_Buffer ? m_Buffer->GetBufferPointer() : 0;
  }

  /** Return a pointer to the container. */
  PixelContainer * GetPixelContainer() { return m_Buffer.GetPointer(); }

  /** Return a pointer to the container. */
  const PixelContainer * GetPixelContainer() const { return m_Buffer.GetPointer(); }

  /** Set the container to use. Note that this does not cause the
   * DataObject to be modified. */
  void SetPixelContainer(PixelContainer *container);

  /** Graft the data and information from one image to another. This
   * is a convenience method to setup a second image with all the meta
   * information of another image and use the same pixel
   * container. Note that this method is different than just using two
   * SmartPointers to the same image since separate DataObjects are
   * still maintained. This method is similar to
   * ImageSource::GraftOutput(). The implementation in ImageBase
   * simply calls CopyInformation() and copies the region ivars.
   * The implementation here refers to the superclass' implementation
   * and then copies over the pixel container. */
  virtual void Graft(const DataObject *data);

  /** Return the Pixel Accessor object */
  AccessorType GetPixelAccessor(void) { return AccessorType(m_VectorLength); }

  /** Return the Pixel Accesor object */
  const AccessorType GetPixelAccessor(void) const { return AccessorType(m_VectorLength); }

  /** Return the NeighborhoodAccessor functor */
  NeighborhoodAccessorFunctorType GetNeighborhoodAccessor()
  {
    return NeighborhoodAccessorFunctorType(m_VectorLength);
  }

  /** Return the NeighborhoodAccessor functor */
  const NeighborhoodAccessorFunctorType GetNeighborhoodAccessor() const
  {
    return NeighborhoodAccessorFunctorType(m_VectorLength);
  }

  /** Set/Get macros for the length of each vector in the vector image */
  itkSetMacro(VectorLength, VectorLengthType);
  itkGetConstReferenceMacro(VectorLength, VectorLengthType);

  /** Get/Set the number of components each pixel has, ie the VectorLength */
  virtual unsigned int GetNumberOfComponentsPerPixel() const;

  virtual void SetNumberOfComponentsPerPixel(unsigned int n);

protected:
  VectorImage();
  void PrintSelf(std::ostream & os, Indent indent) const;

  virtual ~VectorImage() {}
private:
  VectorImage(const Self &);    // purposely not implementated
  void operator=(const Self &); //purposely not implemented

  /** Length of the "vector pixel" */
  VectorLengthType m_VectorLength;

  /** Memory for the current buffer. */
  PixelContainerPointer m_Buffer;
};
} // end namespace itk

// Define instantiation macro for this template.
#define ITK_TEMPLATE_VectorImage(_, EXPORT, TypeX, TypeY)           \
  namespace itk                                                     \
  {                                                                 \
  _( 2 ( class EXPORT VectorImage< ITK_TEMPLATE_2 TypeX > ) )       \
  namespace Templates                                               \
  {                                                                 \
  typedef VectorImage< ITK_TEMPLATE_2 TypeX > VectorImage##TypeY; \
  }                                                                 \
  }

#if ITK_TEMPLATE_EXPLICIT
#include "Templates/itkVectorImage+-.h"
#endif

#if ITK_TEMPLATE_TXX
#include "itkVectorImage.hxx"
#endif

#endif


text:
layout: post
img: https://jekyllrb.com/img/logo-2x.png
---
E' estremamente semplice scrivere un articolo. Solo il primo paragrafo comparirà nella pagina news come sintesi.

# Il titolo dell'articolo ha la riga che inizia con l'hashtag

	---
	layout: post 		serve per applicare il giusto template quindi lasciarlo così
	membro: Thomas Bertani	Il membro o ditta associata o autrice dell'articolo
	ruolo: Membro Fondatore	Ruolo dell'associato. "membro AssoB.it" è sufficiente
	img: /img/thomas.jpg 	Immagine che accompagna l'articolo
	---

## Questo è un titolo di secondo livello (corrisponde a un h2 in html)

> Questa è una citazione

guardate come viene.

*Questo testo è in corsivo*

**Questo testo è in grassetto.**

**Questa è una frase in grassetto con una parola in _corsivo_ in mezzo.**

Questa é una lista non ordinata:

* elemento uno
* elemento due

Questa é una tabella:

First Header  | Second Header
------------- | -------------
Content Cell  | Content Cell
Content Cell  | Content Cell

Questa é un'altra tabella.

| First Header  | Second Header |
| ------------- | ------------- |
| Content Cell  | Content Cell  |
| Content Cell  | Content Cell  |

Si può anche allineare a destra o sinistra

| Left-Aligned  | Center Aligned  | Right Aligned |
| :------------ |:---------------:| -----:|
| col 3 is      | some wordy text | $1600 |
| col 2 is      | centered        |   $12 |
| zebra stripes | are neat        |    $1 |

Questo è codice:

```
print(hello world!)
```

Jekyll offre anche un supporto potente per il codice snippets:

{% highlight ruby %}
def print_hi(name)
  puts "Hi, #{name}"
end
print_hi('Tom')
#=> prints 'Hi, Tom' to STDOUT.
{% endhighlight %}

Date un'occhiata a [Jekyll docs][jekyll] per ottenere informazioni su come avere il massimo da jekyll e sopratutto usate questo paragrafo per vedere come sono fatti i collegamenti ipertestuali.
File all bugs/feature requests at [Jekyll's GitHub repo][jekyll-gh]. If you have questions, you can ask them on [Jekyll's dedicated Help repository][jekyll-help].

[jekyll]:      http://jekyllrb.com
[jekyll-gh]:   https://github.com/jekyll/jekyll
[jekyll-help]: https://github.com/jekyll/jekyll-help


text:
"""Configuration file parser.

A setup file consists of sections, lead by a "[section]" header,
and followed by "name: value" entries, with continuations and such in
the style of RFC 822.

The option values can contain format strings which refer to other values in
the same section, or values in a special [DEFAULT] section.

For example:

    something: %(dir)s/whatever

would resolve the "%(dir)s" to the value of dir.  All reference
expansions are done late, on demand.

Intrinsic defaults can be specified by passing them into the
ConfigParser constructor as a dictionary.

class:

ConfigParser -- responsible for parsing a list of
                configuration files, and managing the parsed database.

    methods:

    __init__(defaults=None)
        create the parser and specify a dictionary of intrinsic defaults.  The
        keys must be strings, the values must be appropriate for %()s string
        interpolation.  Note that `__name__' is always an intrinsic default;
        its value is the section's name.

    sections()
        return all the configuration section names, sans DEFAULT

    has_section(section)
        return whether the given section exists

    has_option(section, option)
        return whether the given option exists in the given section

    options(section)
        return list of configuration options for the named section

    read(filenames)
        read and parse the list of named configuration files, given by
        name.  A single filename is also allowed.  Non-existing files
        are ignored.  Return list of successfully read files.

    readfp(fp, filename=None)
        read and parse one configuration file, given as a file object.
        The filename defaults to fp.name; it is only used in error
        messages (if fp has no `name' attribute, the string `<???>' is used).

    get(section, option, raw=False, vars=None)
        return a string value for the named option.  All % interpolations are
        expanded in the return values, based on the defaults passed into the
        constructor and the DEFAULT section.  Additional substitutions may be
        provided using the `vars' argument, which must be a dictionary whose
        contents override any pre-existing defaults.

    getint(section, options)
        like get(), but convert value to an integer

    getfloat(section, options)
        like get(), but convert value to a float

    getboolean(section, options)
        like get(), but convert value to a boolean (currently case
        insensitively defined as 0, false, no, off for False, and 1, true,
        yes, on for True).  Returns False or True.

    items(section, raw=False, vars=None)
        return a list of tuples with (name, value) for each option
        in the section.

    remove_section(section)
        remove the given file section and all its options

    remove_option(section, option)
        remove the given option from the given section

    set(section, option, value)
        set the given option

    write(fp)
        write the configuration state in .ini format
"""

import re

__all__ = ["NoSectionError", "DuplicateSectionError", "NoOptionError",
           "InterpolationError", "InterpolationDepthError",
           "InterpolationSyntaxError", "ParsingError",
           "MissingSectionHeaderError",
           "ConfigParser", "SafeConfigParser", "RawConfigParser",
           "DEFAULTSECT", "MAX_INTERPOLATION_DEPTH"]

DEFAULTSECT = "DEFAULT"

MAX_INTERPOLATION_DEPTH = 10

# exception classes
class Error(Exception):
    """Base class for ConfigParser exceptions."""

    def __init__(self, msg=''):
        self.message = msg
        Exception.__init__(self, msg)

    def __repr__(self):
        return self.message

    __str__ = __repr__

class NoSectionError(Error):
    """Raised when no section matches a requested option."""

    def __init__(self, section):
        Error.__init__(self, 'No section: %r' % (section,))
        self.section = section

class DuplicateSectionError(Error):
    """Raised when a section is multiply-created."""

    def __init__(self, section):
        Error.__init__(self, "Section %r already exists" % section)
        self.section = section

class NoOptionError(Error):
    """A requested option was not found."""

    def __init__(self, option, section):
        Error.__init__(self, "No option %r in section: %r" %
                       (option, section))
        self.option = option
        self.section = section

class InterpolationError(Error):
    """Base class for interpolation-related exceptions."""

    def __init__(self, option, section, msg):
        Error.__init__(self, msg)
        self.option = option
        self.section = section

class InterpolationMissingOptionError(InterpolationError):
    """A string substitution required a setting which was not available."""

    def __init__(self, option, section, rawval, reference):
        msg = ("Bad value substitution:\n"
               "\tsection: [%s]\n"
               "\toption : %s\n"
               "\tkey    : %s\n"
               "\trawval : %s\n"
               % (section, option, reference, rawval))
        InterpolationError.__init__(self, option, section, msg)
        self.reference = reference

class InterpolationSyntaxError(InterpolationError):
    """Raised when the source text into which substitutions are made
    does not conform to the required syntax."""

class InterpolationDepthError(InterpolationError):
    """Raised when substitutions are nested too deeply."""

    def __init__(self, option, section, rawval):
        msg = ("Value interpolation too deeply recursive:\n"
               "\tsection: [%s]\n"
               "\toption : %s\n"
               "\trawval : %s\n"
               % (section, option, rawval))
        InterpolationError.__init__(self, option, section, msg)

class ParsingError(Error):
    """Raised when a configuration file does not follow legal syntax."""

    def __init__(self, filename):
        Error.__init__(self, 'File contains parsing errors: %s' % filename)
        self.filename = filename
        self.errors = []

    def append(self, lineno, line):
        self.errors.append((lineno, line))
        self.message += '\n\t[line %2d]: %s' % (lineno, line)

class MissingSectionHeaderError(ParsingError):
    """Raised when a key-value pair is found before any section header."""

    def __init__(self, filename, lineno, line):
        Error.__init__(
            self,
            'File contains no section headers.\nfile: %s, line: %d\n%r' %
            (filename, lineno, line))
        self.filename = filename
        self.lineno = lineno
        self.line = line

class RawConfigParser:
    def __init__(self, defaults=None):
        self._sections = {}
        self._defaults = {}
        if defaults:
            for key, value in defaults.items():
                self._defaults[self.optionxform(key)] = value

    def defaults(self):
        return self._defaults

    def sections(self):
        """Return a list of section names, excluding [DEFAULT]"""
        # self._sections will never have [DEFAULT] in it
        return self._sections.keys()

    def add_section(self, section):
        """Create a new section in the configuration.

        Raise DuplicateSectionError if a section by the specified name
        already exists.
        """
        if section in self._sections:
            raise DuplicateSectionError(section)
        self._sections[section] = {}

    def has_section(self, section):
        """Indicate whether the named section is present in the configuration.

        The DEFAULT section is not acknowledged.
        """
        return section in self._sections

    def options(self, section):
        """Return a list of option names for the given section name."""
        try:
            opts = self._sections[section].copy()
        except KeyError:
            raise NoSectionError(section)
        opts.update(self._defaults)
        if '__name__' in opts:
            del opts['__name__']
        return opts.keys()

    def read(self, filenames):
        """Read and parse a filename or a list of filenames.

        Files that cannot be opened are silently ignored; this is
        designed so that you can specify a list of potential
        configuration file locations (e.g. current directory, user's
        home directory, systemwide directory), and all existing
        configuration files in the list will be read.  A single
        filename may also be given.

        Return list of successfully read files.
        """
        if isinstance(filenames, basestring):
            filenames = [filenames]
        read_ok = []
        for filename in filenames:
            try:
                fp = open(filename)
            except IOError:
                continue
            self._read(fp, filename)
            fp.close()
            read_ok.append(filename)
        return read_ok

    def readfp(self, fp, filename=None):
        """Like read() but the argument must be a file-like object.

        The `fp' argument must have a `readline' method.  Optional
        second argument is the `filename', which if not given, is
        taken from fp.name.  If fp has no `name' attribute, `<???>' is
        used.

        """
        if filename is None:
            try:
                filename = fp.name
            except AttributeError:
                filename = '<???>'
        self._read(fp, filename)

    def get(self, section, option):
        opt = self.optionxform(option)
        if section not in self._sections:
            if section != DEFAULTSECT:
                raise NoSectionError(section)
            if opt in self._defaults:
                return self._defaults[opt]
            else:
                raise NoOptionError(option, section)
        elif opt in self._sections[section]:
            return self._sections[section][opt]
        elif opt in self._defaults:
            return self._defaults[opt]
        else:
            raise NoOptionError(option, section)

    def items(self, section):
        try:
            d2 = self._sections[section]
        except KeyError:
            if section != DEFAULTSECT:
                raise NoSectionError(section)
            d2 = {}
        d = self._defaults.copy()
        d.update(d2)
        if "__name__" in d:
            del d["__name__"]
        return d.items()

    def _get(self, section, conv, option):
        return conv(self.get(section, option))

    def getint(self, section, option):
        return self._get(section, int, option)

    def getfloat(self, section, option):
        return self._get(section, float, option)

    _boolean_states = {'1': True, 'yes': True, 'true': True, 'on': True,
                       '0': False, 'no': False, 'false': False, 'off': False}

    def getboolean(self, section, option):
        v = self.get(section, option)
        if v.lower() not in self._boolean_states:
            raise ValueError, 'Not a boolean: %s' % v
        return self._boolean_states[v.lower()]

    def optionxform(self, optionstr):
#JL		return optionstr.lower()
		return optionstr

    def has_option(self, section, option):
        """Check for the existence of a given option in a given section."""
        if not section or section == DEFAULTSECT:
            option = self.optionxform(option)
            return option in self._defaults
        elif section not in self._sections:
            return False
        else:
            option = self.optionxform(option)
            return (option in self._sections[section]
                    or option in self._defaults)

    def set(self, section, option, value):
        """Set an option."""
        if not section or section == DEFAULTSECT:
            sectdict = self._defaults
        else:
            try:
                sectdict = self._sections[section]
            except KeyError:
                raise NoSectionError(section)
        sectdict[self.optionxform(option)] = value

    def write(self, fp):
        """Write an .ini-format representation of the configuration state."""
        if self._defaults:
            fp.write("[%s]\n" % DEFAULTSECT)
            for (key, value) in self._defaults.items():
                fp.write("%s = %s\n" % (key, str(value).replace('\n', '\n\t')))
            fp.write("\n")
        for section in self._sections:
            fp.write("[%s]\n" % section)
            for (key, value) in self._sections[section].items():
                if key != "__name__":
                    fp.write("%s = %s\n" %
                             (key, str(value).replace('\n', '\n\t')))
            fp.write("\n")

    def remove_option(self, section, option):
        """Remove an option."""
        if not section or section == DEFAULTSECT:
            sectdict = self._defaults
        else:
            try:
                sectdict = self._sections[section]
            except KeyError:
                raise NoSectionError(section)
        option = self.optionxform(option)
        existed = option in sectdict
        if existed:
            del sectdict[option]
        return existed

    def remove_section(self, section):
        """Remove a file section."""
        existed = section in self._sections
        if existed:
            del self._sections[section]
        return existed

    #
    # Regular expressions for parsing section headers and options.
    #
    SECTCRE = re.compile(
        r'\['                                 # [
        r'(?P<header>[^]]+)'                  # very permissive!
        r'\]'                                 # ]
        )
    OPTCRE = re.compile(
        r'(?P<option>[^=\s][^=]*)'          # very permissive!
        r'\s*(?P<vi>=)\s*'                 # any number of space/tab,
                                              # followed by separator
                                              # (either : or =), followed
                                              # by any # space/tab
        r'(?P<value>.*)$'                     # everything up to eol
        )

    def _read(self, fp, fpname):
        """Parse a sectioned setup file.

        The sections in setup file contains a title line at the top,
        indicated by a name in square brackets (`[]'), plus key/value
        options lines, indicated by `name: value' format lines.
        Continuations are represented by an embedded newline then
        leading whitespace.  Blank lines, lines beginning with a '#',
        and just about everything else are ignored.
        """
        cursect = None                            # None, or a dictionary
        optname = None
        lineno = 0
        e = None                                  # None, or an exception
        while True:
            line = fp.readline()
            if not line:
                break
            lineno = lineno + 1
            # comment or blank line?
            if line.strip() == '' or line[0] in '#;':
                continue
            if line.split(None, 1)[0].lower() == 'rem' and line[0] in "rR":
                # no leading whitespace
                continue
            # continuation line?
            if line[0].isspace() and cursect is not None and optname:
                value = line.strip()
                if value:
                    cursect[optname] = "%s\n%s" % (cursect[optname], value)
            # a section header or option header?
            else:
                # is it a section header?
                mo = self.SECTCRE.match(line)
                if mo:
                    sectname = mo.group('header')
                    if sectname in self._sections:
                        cursect = self._sections[sectname]
                    elif sectname == DEFAULTSECT:
                        cursect = self._defaults
                    else:
                        cursect = {'__name__': sectname}
                        self._sections[sectname] = cursect
                    # So sections can't start with a continuation line
                    optname = None
                # no section header in the file?
                elif cursect is None:
                    raise MissingSectionHeaderError(fpname, lineno, line)
                # an option line?
                else:
                    mo = self.OPTCRE.match(line)
                    if mo:
                        optname, vi, optval = mo.group('option', 'vi', 'value')
                        if vi in ('=',) and ';' in optval:
                            # ';' is a comment delimiter only if it follows
                            # a spacing character
                            pos = optval.find(';')
                            if pos != -1 and optval[pos-1].isspace():
                                optval = optval[:pos]
                        optval = optval.strip()
                        # allow empty values
                        if optval == '""':
                            optval = ''
                        optname = self.optionxform(optname.rstrip())
                        cursect[optname] = optval
                    else:
                        # a non-fatal parsing error occurred.  set up the
                        # exception but keep going. the exception will be
                        # raised at the end of the file and will contain a
                        # list of all bogus lines
                        if not e:
                            e = ParsingError(fpname)
                        e.append(lineno, repr(line))
        # if any parsing errors occurred, raise an exception
        if e:
            raise e

class ConfigParser(RawConfigParser):

    def get(self, section, option, raw=False, vars=None):
        """Get an option value for a given section.

        All % interpolations are expanded in the return values, based on the
        defaults passed into the constructor, unless the optional argument
        `raw' is true.  Additional substitutions may be provided using the
        `vars' argument, which must be a dictionary whose contents overrides
        any pre-existing defaults.

        The section DEFAULT is special.
        """
        d = self._defaults.copy()
        try:
            d.update(self._sections[section])
        except KeyError:
            if section != DEFAULTSECT:
                raise NoSectionError(section)
        # Update with the entry specific variables
        if vars:
            for key, value in vars.items():
                d[self.optionxform(key)] = value
        option = self.optionxform(option)
        try:
            value = d[option]
        except KeyError:
            raise NoOptionError(option, section)

        if raw:
            return value
        else:
            return self._interpolate(section, option, value, d)

    def items(self, section, raw=False, vars=None):
        """Return a list of tuples with (name, value) for each option
        in the section.

        All % interpolations are expanded in the return values, based on the
        defaults passed into the constructor, unless the optional argument
        `raw' is true.  Additional substitutions may be provided using the
        `vars' argument, which must be a dictionary whose contents overrides
        any pre-existing defaults.

        The section DEFAULT is special.
        """
        d = self._defaults.copy()
        try:
            d.update(self._sections[section])
        except KeyError:
            if section != DEFAULTSECT:
                raise NoSectionError(section)
        # Update with the entry specific variables
        if vars:
            for key, value in vars.items():
                d[self.optionxform(key)] = value
        options = d.keys()
        if "__name__" in options:
            options.remove("__name__")
        if raw:
            return [(option, d[option])
                    for option in options]
        else:
            return [(option, self._interpolate(section, option, d[option], d))
                    for option in options]

    def _interpolate(self, section, option, rawval, vars):
        # do the string interpolation
        value = rawval
        depth = MAX_INTERPOLATION_DEPTH
        while depth:                    # Loop through this until it's done
            depth -= 1
            if "%(" in value:
                value = self._KEYCRE.sub(self._interpolation_replace, value)
                try:
                    value = value % vars
                except KeyError, e:
                    raise InterpolationMissingOptionError(
                        option, section, rawval, e[0])
            else:
                break
        if "%(" in value:
            raise InterpolationDepthError(option, section, rawval)
        return value

    _KEYCRE = re.compile(r"%\(([^)]*)\)s|.")

    def _interpolation_replace(self, match):
        s = match.group(1)
        if s is None:
            return match.group()
        else:
            return "%%(%s)s" % self.optionxform(s)

class SafeConfigParser(ConfigParser):

    def _interpolate(self, section, option, rawval, vars):
        # do the string interpolation
        L = []
        self._interpolate_some(option, L, rawval, section, vars, 1)
        return ''.join(L)

    _interpvar_match = re.compile(r"%\(([^)]+)\)s").match

    def _interpolate_some(self, option, accum, rest, section, map, depth):
        if depth > MAX_INTERPOLATION_DEPTH:
            raise InterpolationDepthError(option, section, rest)
        while rest:
            p = rest.find("%")
            if p < 0:
                accum.append(rest)
                return
            if p > 0:
                accum.append(rest[:p])
                rest = rest[p:]
            # p is no longer used
            c = rest[1:2]
            if c == "%":
                accum.append("%")
                rest = rest[2:]
            elif c == "(":
                m = self._interpvar_match(rest)
                if m is None:
                    raise InterpolationSyntaxError(option, section,
                        "bad interpolation variable reference %r" % rest)
                var = self.optionxform(m.group(1))
                rest = rest[m.end():]
                try:
                    v = map[var]
                except KeyError:
                    raise InterpolationMissingOptionError(
                        option, section, rest, var)
                if "%" in v:
                    self._interpolate_some(option, accum, v,
                                           section, map, depth + 1)
                else:
                    accum.append(v)
            else:
                raise InterpolationSyntaxError(
                    option, section,
                    "'%%' must be followed by '%%' or '(', found: %r" % (rest,))

    def set(self, section, option, value):
        """Set an option.  Extend ConfigParser.set: check for string values."""
        if not isinstance(value, basestring):
            raise TypeError("option values must be strings")
        ConfigParser.set(self, section, option, value)


text:
$LOAD_PATH.unshift File.expand_path(File.dirname(__FILE__) + "../lib")

require 'rspec'
require 'rack/test'
require 'rack/attack/rate-limit'

RSpec::configure do |config|

  config.formatter = :documentation
  config.tty = true
  config.color = true
end


text:
<?php
  session_start();
?>

<!DOCTYPE html>

    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">

    <title></title>

    <link rel="stylesheet" href="Libs/MTL/material.min.css">
    <link rel="stylesheet" href="https://fonts.googleapis.com/icon?family=Material+Icons">

    <link rel="stylesheet" href="css/register.css">

             HOME
             PROFILE
             GITHUB
             SERVICES
             CONTACT US

Log in

          CREATIVE

            HOME
            PROFILE
            GITHUB
            BLOG
            SERVICES
            CONTACT US
            LOG IN
            REGISTER

          <?php include ('pages/login-form.php'); ?>


text:
namespace Microsoft.JScript {

    public sealed class Empty{
      public static readonly Empty Value = null;

      private Empty(){
      }
    }
}


text:
package com.moonlightpixels.jrpg.map.character.internal;

import com.badlogic.gdx.ai.fsm.DefaultStateMachine;
import com.badlogic.gdx.ai.fsm.State;
import com.badlogic.gdx.ai.fsm.StateMachine;
import com.badlogic.gdx.ai.msg.Telegram;
import com.moonlightpixels.jrpg.input.ClickEvent;
import com.moonlightpixels.jrpg.input.ControlEvent;
import com.moonlightpixels.jrpg.input.InputScheme;
import com.moonlightpixels.jrpg.map.character.CharacterActor;
import com.moonlightpixels.jrpg.ui.InputHandler;

import java.util.AbstractMap;
import java.util.Map;
import java.util.stream.Collectors;
import java.util.stream.Stream;

public final class PlayerInputCharacterController implements CharacterController, InputHandler {
    private static final Map<ControlEvent, ControllerState> GLOBAL_TRANSITIONS = Stream.of(
        new AbstractMap.SimpleImmutableEntry<>(ControlEvent.UP_PRESSED, ControllerState.Up),
        new AbstractMap.SimpleImmutableEntry<>(ControlEvent.LEFT_PRESSED, ControllerState.Left),
        new AbstractMap.SimpleImmutableEntry<>(ControlEvent.RIGHT_PRESSED, ControllerState.Right),
        new AbstractMap.SimpleImmutableEntry<>(ControlEvent.DOWN_PRESSED, ControllerState.Down)
    )
    .collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue));

    private final StateMachine<PlayerInputCharacterController, ControllerState> stateMachine;

    public PlayerInputCharacterController() {
        stateMachine = new DefaultStateMachine<>(this, ControllerState.Open);
    }

    @Override
    public CharacterCommand getNextCommand(final CharacterActor characterActor) {
        return stateMachine.getCurrentState().getNextCommand(characterActor);
    }

    @Override
    public boolean handleControlEvent(final ControlEvent event) {
        if (GLOBAL_TRANSITIONS.containsKey(event)) {
            stateMachine.changeState(GLOBAL_TRANSITIONS.get(event));
            return true;
        }

        return stateMachine.getCurrentState().handleControlEvent(this, event);
    }

    @Override
    public boolean handleClickEvent(final ClickEvent event) {
        return false;
    }

    @Override
    public void setInputScheme(final InputScheme inputScheme) { }

    private enum ControllerState implements State<PlayerInputCharacterController>, CharacterController {
        Open {
            @Override
            public CharacterCommand getNextCommand(final CharacterActor characterActor) {
                return CharacterCommand.Stand;
            }
        },
        Up {
            @Override
            public CharacterCommand getNextCommand(final CharacterActor characterActor) {
                return CharacterCommand.WalkUp;
            }

            @Override
            public boolean handleControlEvent(final PlayerInputCharacterController entity, final ControlEvent event) {
                if (event == ControlEvent.UP_RELEASED) {
                    entity.stateMachine.changeState(Open);
                }
                return true;
            }
        },
        Left {
            @Override
            public CharacterCommand getNextCommand(final CharacterActor characterActor) {
                return CharacterCommand.WalkLeft;
            }

            @Override
            public boolean handleControlEvent(final PlayerInputCharacterController entity, final ControlEvent event) {
                if (event == ControlEvent.LEFT_RELEASED) {
                    entity.stateMachine.changeState(Open);
                }
                return true;
            }
        },
        Right {
            @Override
            public CharacterCommand getNextCommand(final CharacterActor characterActor) {
                return CharacterCommand.WalkRight;
            }

            @Override
            public boolean handleControlEvent(final PlayerInputCharacterController entity, final ControlEvent event) {
                if (event == ControlEvent.RIGHT_RELEASED) {
                    entity.stateMachine.changeState(Open);
                }
                return true;
            }
        },
        Down {
            @Override
            public CharacterCommand getNextCommand(final CharacterActor characterActor) {
                return CharacterCommand.WalkDown;
            }

            @Override
            public boolean handleControlEvent(final PlayerInputCharacterController entity, final ControlEvent event) {
                if (event == ControlEvent.DOWN_RELEASED) {
                    entity.stateMachine.changeState(Open);
                }
                return true;
            }
        };

        @Override
        public void enter(final PlayerInputCharacterController entity) {

        }

        @Override
        public void update(final PlayerInputCharacterController entity) {

        }

        @Override
        public void exit(final PlayerInputCharacterController entity) {

        }

        @Override
        public boolean onMessage(final PlayerInputCharacterController entity, final Telegram telegram) {
            return false;
        }

        public boolean handleControlEvent(final PlayerInputCharacterController entity, final ControlEvent event) {
            return false;
        }
    }
}


text:
require_relative 'test_helper'

module RedmineIRCGateway
  class DBTest < ActiveSupport::TestCase

    def setup
      @db = SDBM.open DB_PATH
    end

    def teardown
      @db.close
    end

    test 'Load databse' do
      @db.each do |k, v|
        assert_kind_of String, k
        assert_kind_of String, v
      end
    end

    test 'Load database first' do
      assert @db.values.first < @db.values.last unless @db.values.first.nil?
    end

  end
end


text:
<?xml version="1.0" encoding="utf-8"?>

<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:id="@+id/fl_inner"
    android:layout_width="fill_parent"
    android:background="@drawable/new_year_bg_decoration"
    android:layout_height="75dp">
    <LinearLayout
        android:id="@+id/ll_layout"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_centerInParent="true"
        android:gravity="center_horizontal"
        android:orientation="vertical"
        android:visibility="gone">

        <TextView
            android:id="@+id/pull_to_refresh_text"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:singleLine="true"
            android:textAppearance="?android:attr/textAppearance" />

        <TextView
            android:id="@+id/pull_to_refresh_sub_text"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:singleLine="true"
            android:textAppearance="?android:attr/textAppearanceSmall"
            android:visibility="gone" />
    </LinearLayout>

    <View
        android:id="@+id/new_year_bag_bg"
        android:layout_width="75dp"
        android:layout_height="37dp"
        android:layout_alignParentBottom="true"
        android:layout_centerHorizontal="true"
        android:background="@drawable/new_year_bag_bg" />

    <ImageView
        android:id="@+id/pull_to_refresh_image"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:src="@drawable/new_year_cat_1"
        android:layout_centerHorizontal="true" />

    <View
        android:id="@+id/new_year_bag_front"
        android:layout_width="75dp"
        android:layout_height="24dp"
        android:layout_alignBottom="@+id/new_year_bag_bg"
        android:layout_centerHorizontal="true"
        android:background="@drawable/new_year_bag_front" />

    <RelativeLayout
        android:layout_width="wrap_content"
        android:layout_height="wrap_content">

        <ProgressBar
            android:id="@+id/pull_to_refresh_progress"
            style="@style/PullProgressStyle"
            android:layout_width="30dp"
            android:layout_height="30dp"
            android:layout_gravity="center"
            android:indeterminate="true"
            android:visibility="gone" />
    </RelativeLayout>
</RelativeLayout>


text:
@implementation NSMutableArray (AddUniqueString)

- (BOOL) addUniqueString:(NSString *)string
{
    NSInteger index = [self findString:string caseSensitive:YES];
    if ( index >= 0 )
        return NO;

    [self addObject:string];
    return YES;
}

- (BOOL) addUniqueCaseString:(NSString *)string
{
    NSInteger index = [self findString:string caseSensitive:NO];
    if ( index >= 0 )
        return NO;

    [self addObject:string];
    return YES;
}

- (NSInteger) findString:(NSString *)string caseSensitive:(BOOL)caseSensitive
{
    for ( NSObject * obj in self )
    {
        if ( [obj isKindOfClass:[NSString class]] )
        {
            NSString * str = (NSString *)obj;
            if ( caseSensitive )
            {
                if ( [str isEqualToString:string] )
                {
                    return [self indexOfObject:obj];
                }
            }
            else
            {
                if ( [str caseInsensitiveCompare:string] == NSOrderedSame )
                {
                    return [self indexOfObject:obj];
                }
            }
        }
    }
    return -1;
}

@end


text:
.wrapper_1.main { display: inline-block; position: relative; background-color: white; border: 1px solid #e0e0e0; /*height: 100%;*/ overflow-y: scroll; overflow-x: hidden; }
	.wrapper_1.main.modal { display: none; max-width: 600px; max-height: 80%; overflow-y: scroll;  }

@media( min-width: 0px ) {
	.wrapper_1.main { margin: 0; padding: 10px; width: 100%; border-radius: 0; }
}

@media( min-width: 768px ) {
	.wrapper_1.main { margin: 0px; padding: 10px 20px; padding: 0; width: calc( 100% - 0px ); }

}


text:
Cobra will follow a steady release cadence. Non breaking changes will be released as minor versions quarterly. Patch bug releases are at the discretion of the maintainers. Users can expect security patch fixes to be released within relatively short order of a CVE becoming known. For more information on security patch fixes see the CVE section below. Releases will follow [Semantic Versioning](https://semver.org/). Users tracking the Master branch should expect unpredictable breaking changes as the project continues to move forward. For stability, it is highly recommended to use a release.

### Backward Compatibility
We will maintain two major releases in a moving window. The N-1 release will only receive bug fixes and security updates and will be dropped once N+1 is released.

### Deprecation
Deprecation of Go versions or dependent packages will only occur in major releases. To reduce the change of this taking users by surprise, any large deprecation will be preceded by an announcement in the [#cobra slack channel](https://gophers.slack.com/archives/CD3LP1199) and an Issue on Github.

### CVE
Maintainers will make every effort to release security patches in the case of a medium to high severity CVE directly impacting the library. The speed in which these patches reach a release is up to the discretion of the maintainers. A low severity CVE may be a lower priority than a high severity one.

### Communication
Cobra maintainers will use GitHub issues and the [#cobra slack channel](https://gophers.slack.com/archives/CD3LP1199) as the primary means of communication with the community. This is to foster open communication with all users and contributors.

### Breaking Changes
Breaking changes are generally allowed in the master branch, as this is the branch used to develop the next release of Cobra.

There may be times, however, when master is closed for breaking changes. This is likely to happen as we near the release of a new version.

Breaking changes are not allowed in release branches, as these represent minor versions that have already been released. These version have consumers who expect the APIs, behaviors, etc, to remain stable during the lifetime of the patch stream for the minor release.

Examples of breaking changes include:
- Removing or renaming exported constant, variable, type, or function.
- Updating the version of critical libraries such as `spf13/pflag`, `spf13/viper` etc...
  - Some version updates may be acceptable for picking up bug fixes, but maintainers must exercise caution when reviewing.

There may, at times, need to be exceptions where breaking changes are allowed in release branches. These are at the discretion of the project's maintainers, and must be carefully considered before merging.

### CI Testing
Maintainers will ensure the Cobra test suite utilizes the current supported versions of Golang.

### Disclaimer
Changes to this document and the contents therein are at the discretion of the maintainers.
None of the contents of this document are legally binding in any way to the maintainers or the users.


text:
"""
    Swaggy Jenkins

    Jenkins API clients generated from Swagger / Open API specification  # noqa: E501

    The version of the OpenAPI document: 1.5.1-pre.0
    Contact: blah@cliffano.com
    Generated by: https://openapi-generator.tech
"""

from __future__ import absolute_import

import unittest
import datetime

import openapi_client
from openapi_client.models.github_respository_containerlinks import GithubRespositoryContainerlinks  # noqa: E501
from openapi_client.rest import ApiException

class TestGithubRespositoryContainerlinks(unittest.TestCase):
    """GithubRespositoryContainerlinks unit test stubs"""

    def setUp(self):
        pass

    def tearDown(self):
        pass

    def make_instance(self, include_optional):
        """Test GithubRespositoryContainerlinks
            include_option is a boolean, when False only required
            params are included, when True both required and
            optional params are included """
        # model = openapi_client.models.github_respository_containerlinks.GithubRespositoryContainerlinks()  # noqa: E501
        if include_optional :
            return GithubRespositoryContainerlinks(
                _self = openapi_client.models.link.Link(
                    _class = '',
                    href = '', ),
                _class = ''
            )
        else :
            return GithubRespositoryContainerlinks(
        )

    def testGithubRespositoryContainerlinks(self):
        """Test GithubRespositoryContainerlinks"""
        inst_req_only = self.make_instance(include_optional=False)
        inst_req_and_optional = self.make_instance(include_optional=True)

if __name__ == '__main__':
    unittest.main()


text:
<?php
/**
 * This is a Branax pagecontroller.
 *
 */
// Include the essential config-file which also creates the $branax variable with its defaults.
include(__DIR__.'/config.php');

// Create a wrapper object to recover game status and continue playing
$gameWrapper = new C100Wrapper();

// Do it and store it all in variables in the Branax container.
$branax['title'] = "100-spel";
$branax['stylesheets'][] = 'css/dice.css';
$branax['main'] = $gameWrapper->runGame();

// Finally, leave it all to the rendering phase of Branax.
include(BRANAX_THEME_PATH);


text:
#include "Control/CurrentControls.h"

#include "Control/ControlName.h"
#include "Control/ControlStore.h"

namespace multiAgentExperience {
namespace library {
namespace control {

CurrentControls::CurrentControls(const ControlAccessKey controlAccessKey, std::shared_ptr<ControlStore> controlStore) :
        m_controlAccessKey(controlAccessKey),
        m_controlStore(controlStore) {
}

std::unordered_set<ControlName> CurrentControls::getCurrentControls() {
    return m_controlStore->getUnionOfControlNames(m_controlAccessKey);
}

CurrentControls::~CurrentControls() {
    m_controlStore->revokeAccess(m_controlAccessKey);
}

}  // namespace control
}  // namespace library
}  // namespace multiAgentExperience


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

<title>Uses of Class org.deidentifier.arx.criteria.RiskBasedCriterion (ARX Developer Documentation)</title>
<link rel="stylesheet" type="text/css" href="../../../../../stylesheet.css" title="Style">

JavaScript is disabled on your browser.

Overview

Package

Class

Use

Tree

Deprecated

Index

Help

Prev

Next

Frames

No Frames

All Classes

Uses of Class
org.deidentifier.arx.criteria.RiskBasedCriterion

Packages that use RiskBasedCriterion

Package
Description

org.deidentifier.arx.criteria

This package implements different variants of class-based privacy criteria,
 such as k-anonymity, l-diversity, t-closeness and d-presence.

Uses of RiskBasedCriterion in org.deidentifier.arx.criteria

Subclasses of RiskBasedCriterion in org.deidentifier.arx.criteria

Modifier and Type
Class and Description

class
AverageReidentificationRisk

This criterion ensures that an estimate for the average re-identification risk falls
 below a given threshold.

class
PopulationUniqueness

This criterion ensures that the population uniqueness falls below a given threshold.

class
SampleUniqueness

This criterion ensures that the sample uniqueness falls below a given threshold.

Overview

Package

Class

Use

Tree

Deprecated

Index

Help

Prev

Next

Frames

No Frames

All Classes


text:
<?php

namespace Sylius\Bundle\UserBundle\Controller;

use FOS\RestBundle\View\View;
use Sylius\Bundle\ResourceBundle\Controller\RequestConfiguration;
use Sylius\Bundle\ResourceBundle\Controller\ResourceController;
use Sylius\Bundle\UserBundle\Form\Model\ChangePassword;
use Sylius\Bundle\UserBundle\Form\Model\PasswordReset;
use Sylius\Bundle\UserBundle\Form\Model\PasswordResetRequest;
use Sylius\Bundle\UserBundle\UserEvents;
use Sylius\Component\User\Model\UserInterface;
use Sylius\Component\User\Security\TokenProviderInterface;
use Symfony\Component\EventDispatcher\GenericEvent;
use Symfony\Component\HttpFoundation\RedirectResponse;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
use Symfony\Component\Security\Core\Exception\AccessDeniedException;

/**
 * @author Łukasz Chruściel <lukasz.chrusciel@lakion.com>
 */
class UserController extends ResourceController
{
    public function changePasswordAction(Request $request)
    {
        $configuration = $this->requestConfigurationFactory->create($this->metadata, $request);

        if (!$this->container->get('security.context')->isGranted('IS_AUTHENTICATED_REMEMBERED')) {
            throw new AccessDeniedException('You have to be registered user to access this section.');
        }

        $user = $this->container->get('security.context')->getToken()->getUser();

        $changePassword = new ChangePassword();
        $formType = $request->attributes->get('_sylius[form]', 'sylius_user_change_password', true);
        $form = $this->createResourceForm($configuration, $formType, $changePassword);

        if (in_array($request->getMethod(), ['POST', 'PUT', 'PATCH']) && $form->submit($request, !$request->isMethod('PATCH'))->isValid()) {
            return $this->handleChangePassword($configuration, $user, $changePassword->getNewPassword());
        }

        if (!$configuration->isHtmlRequest()) {
            return $this->viewHandler->handle($configuration, View::create($form, 400));
        }

        return $this->container->get('templating')->renderResponse(
            $configuration->getTemplate('changePassword.html'),
            ['form' => $form->createView()]
        );
    }

    public function requestPasswordResetTokenAction(Request $request)
    {
        $generator = $this->container->get('sylius.user.token_provider');

        return $this->prepareResetPasswordRequest($request, $generator, UserEvents::REQUEST_RESET_PASSWORD_TOKEN);
    }

    public function requestPasswordResetPinAction(Request $request)
    {
        $generator = $this->container->get('sylius.user.pin_provider');

        return $this->prepareResetPasswordRequest($request, $generator, UserEvents::REQUEST_RESET_PASSWORD_PIN);
    }

    public function resetPasswordAction(Request $request, $token)
    {
        $configuration = $this->requestConfigurationFactory->create($this->metadata, $request);
        $user = $this->findUserByToken($token);

        $lifetime = new \DateInterval($this->container->getParameter('sylius.user.resetting.token_ttl'));
        if (!$user->isPasswordRequestNonExpired($lifetime)) {
            return $this->handleExpiredToken($configuration, $token, $user);
        }

        $changePassword = new PasswordReset();
        $formType = $request->attributes->get('_sylius[form]', 'sylius_user_reset_password', true);
        $form = $this->createResourceForm($configuration, $formType, $changePassword);

        if (in_array($request->getMethod(), ['POST', 'PUT', 'PATCH']) && $form->submit($request, !$request->isMethod('PATCH'))->isValid()) {
            return $this->handleResetPassword($configuration, $user, $changePassword->getPassword());
        }

        if (!$configuration->isHtmlRequest()) {
            return $this->viewHandler->handle($configuration, View::create($form, 400));
        }

        return $this->container->get('templating')->renderResponse(
            $configuration->getTemplate('resetPassword.html'),
            [
                'form' => $form->createView(),
                'user' => $user,
            ]
        );
    }

    protected function prepareResetPasswordRequest(Request $request, TokenProviderInterface $generator, $senderEvent)
    {
        $configuration = $this->requestConfigurationFactory->create($this->metadata, $request);

        $passwordReset = new PasswordResetRequest();
        $formType = $request->attributes->get('_sylius[form]', 'sylius_user_request_password_reset', true);
        $form = $this->createResourceForm($configuration, $formType, $passwordReset);

        if (in_array($request->getMethod(), ['POST', 'PUT', 'PATCH']) && $form->submit($request, !$request->isMethod('PATCH'))->isValid()) {
            $user = $this->repository->findOneByEmail($passwordReset->getEmail());
            if (null !== $user) {
                $this->handleResetPasswordRequest($generator, $user, $senderEvent);
            }

            if (!$configuration->isHtmlRequest()) {
                return $this->viewHandler->handle($configuration, View::create($user, 204));
            }

            $this->addFlash('success', 'sylius.user.reset_password.requested');

            return new RedirectResponse($this->container->get('router')->generate('sylius_user_security_login'));
        }

        if (!$configuration->isHtmlRequest()) {
            return $this->viewHandler->handle($configuration, View::create($form, 400));
        }

        return $this->container->get('templating')->renderResponse(
            $configuration->getTemplate('requestPasswordReset.html'),
            [
                'form' => $form->createView(),
            ]
        );
    }

    protected function addFlash($type, $message)
    {
        $translator = $this->container->get('translator');
        $this->container->get('session')->getFlashBag()->add($type, $translator->trans($message, [], 'flashes'));
    }

    protected function createResourceForm(RequestConfiguration $configuration, $type, $resource)
    {
        if (!$configuration->isHtmlRequest()) {
            return $this->container->get('form.factory')->createNamed('', $type, $resource, ['csrf_protection' => false]);
        }

        return $this->container->get('form.factory')->create($type, $resource);
    }

    /**
     * @param RequestConfiguration $configuration
     * @param string $token
     * @param UserInterface $user
     *
     * @return RedirectResponse
     */
    protected function handleExpiredToken(RequestConfiguration $configuration, $token, UserInterface $user)
    {
        $user->setConfirmationToken(null);
        $user->setPasswordRequestedAt(null);

        $this->manager->flush();

        if (!$configuration->isHtmlRequest()) {
            return $this->viewHandler->handle($configuration, View::create($user, 400));
        }

        $this->addFlash('error', 'sylius.user.password.token_expired');

        $url = $this->generateResetPasswordRequestUrl($token);

        return new RedirectResponse($url);
    }

    /**
     * @param TokenProviderInterface $generator
     * @param UserInterface $user
     * @param string $senderEvent
     *
     * @return Response
     */
    protected function handleResetPasswordRequest(TokenProviderInterface $generator, UserInterface $user, $senderEvent)
    {
        $user->setConfirmationToken($generator->generateUniqueToken());
        $user->setPasswordRequestedAt(new \DateTime());

        /* I have to use doctrine manager directly, because domain manager functions add a flash messages. I can't get rid of them.*/
        $manager = $this->container->get('doctrine.orm.default_entity_manager');
        $manager->persist($user);
        $manager->flush();

        $dispatcher = $this->container->get('event_dispatcher');
        $dispatcher->dispatch($senderEvent, new GenericEvent($user));
    }

    /**
     * @param RequestConfiguration $configuration
     * @param UserInterface $user
     * @param string $newPassword
     *
     * @return RedirectResponse
     */
    protected function handleResetPassword(RequestConfiguration $configuration, UserInterface $user, $newPassword)
    {
        $user->setPlainPassword($newPassword);
        $user->setConfirmationToken(null);
        $user->setPasswordRequestedAt(null);

        $dispatcher = $this->container->get('event_dispatcher');
        $dispatcher->dispatch(UserEvents::PRE_PASSWORD_RESET, new GenericEvent($user));

        $this->manager->flush();
        $this->addFlash('success', 'sylius.user.password.reset.success');

        $dispatcher->dispatch(UserEvents::POST_PASSWORD_RESET, new GenericEvent($user));

        if (!$configuration->isHtmlRequest()) {
            return $this->viewHandler->handle($configuration, View::create($user, 204));
        }

        return new RedirectResponse($this->container->get('router')->generate('sylius_user_security_login'));
    }

    /**
     * @param RequestConfiguration $configuration
     * @param UserInterface $user
     * @param string $newPassword
     *
     * @return RedirectResponse
     */
    protected function handleChangePassword(RequestConfiguration $configuration, UserInterface $user, $newPassword)
    {
        $user->setPlainPassword($newPassword);

        $dispatcher = $this->container->get('event_dispatcher');
        $dispatcher->dispatch(UserEvents::PRE_PASSWORD_CHANGE, new GenericEvent($user));

        $this->manager->flush();
        $this->addFlash('success', 'sylius.user.password.change.success');

        $dispatcher->dispatch(UserEvents::POST_PASSWORD_CHANGE, new GenericEvent($user));

        if (!$configuration->isHtmlRequest()) {
            return $this->viewHandler->handle($configuration, View::create($user, 204));
        }

        return new RedirectResponse($this->container->get('router')->generate('sylius_account_profile_show'));
    }

    /**
     * @param string $token
     *
     * @throws NotFoundHttpException
     *
     * @return UserInterface
     */
    protected function findUserByToken($token)
    {
        $user = $this->repository->findOneBy(['confirmationToken' => $token]);
        if (null === $user) {
            throw new NotFoundHttpException('This token does not exist');
        }

        return $user;
    }

    /**
     * @param string $token
     *
     * @return string
     */
    protected function generateResetPasswordRequestUrl($token)
    {
        $router = $this->container->get('router');

        if (is_numeric($token)) {
            return $router->generate('sylius_user_request_password_reset_pin');
        }

        return $router->generate('sylius_user_request_password_reset_token');
    }
}


text:
using ArcGIS.Core.CIM;
using ArcGIS.Desktop.Framework.Threading.Tasks;
using ArcGIS.Desktop.Mapping;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace GraphicElementSymbolPicker
{
    /// <summary>
    /// Represents each item displayed in the symbol gallery
    /// </summary>
    public class GeometrySymbolItem
    {
        public GeometrySymbolItem(SymbolStyleItem symbolStyleItem, string group)
        {
            Icon32 = symbolStyleItem.PreviewImage;
            Name = symbolStyleItem.Name;
            Group = group;
            if (symbolStyleItem != null)
                cimSymbol = symbolStyleItem.Symbol as CIMSymbol;

        }
        public object Icon32 { get; private set; }

        public string Name { get; private set; }

        public string Group { get; private set; }
        public CIMSymbol cimSymbol
        {
            get; private set;
        }
        internal void Execute()
        {
            if (cimSymbol != null)
            {
                //QueuedTask.Run(() => Module1.SelectedSymbol = cimSymbol);
                Module1.SelectedSymbol = cimSymbol;
                Module1.SelectedSymbolName = Name;
            }

        }
    }
}


text:
<?php if ( class_exists( 'WPForms_Template' ) ) :
/**
 * REVIVE Training Registration
 * Template for WPForms.
 */
class WPForms_Template_revive_training_registration extends WPForms_Template {

	/**
	 * Primary class constructor.
	 *
	 * @since 1.0.0
	 */
	public function init() {

		// Template name
		$this->name = 'REVIVE Training Registration';

		// Template slug
		$this->slug = 'revive_training_registration';

		// Template description
		$this->description = '';

		// Template field and settings
		$this->data = array (
	'field_id' => 10,
	'fields' => array (
		9 => array (
			'id' => '9',
			'type' => 'divider',
			'label' => 'Contact Information',
			'label_disable' => '1',
		),
		1 => array (
			'id' => '1',
			'type' => 'name',
			'label' => 'Your Name',
			'format' => 'first-last',
			'required' => '1',
			'size' => 'large',
			'first_placeholder' => 'Enter your first name...',
			'last_placeholder' => 'Enter your last name...',
		),
		2 => array (
			'id' => '2',
			'type' => 'phone',
			'label' => 'Phone Number',
			'format' => 'us',
			'required' => '1',
			'size' => 'large',
			'placeholder' => 'Enter your phone number...',
			'css' => 'wpforms-one-half wpforms-first',
		),
		4 => array (
			'id' => '4',
			'type' => 'email',
			'label' => 'Email Address',
			'required' => '1',
			'size' => 'large',
			'placeholder' => 'Enter your email address...',
			'css' => 'wpforms-one-half',
		),
		8 => array (
			'id' => '8',
			'type' => 'divider',
			'label' => 'REVIVE Session',
			'label_disable' => '1',
		),
		7 => array (
			'id' => '7',
			'type' => 'html',
			'code' => '
Room information will be emailed with enrollment confirmation
',
			'label_disable' => '1',
		),
		6 => array (
			'id' => '6',
			'type' => 'select',
			'label' => 'Choose a Session',
			'choices' => array (
				1 => array (
					'label' => 'August 31 at Fredericksburg Area Campus at 11:00 a.m.',
				),
				2 => array (
					'label' => 'August 31 at Fredericksburg Area Campus at 2:00 p.m.',
				),
				3 => array (
					'label' => 'September 26 at Daniel Technology Center in Culpeper at 6:00 p.m. ',
				),
			),
			'size' => 'large',
		),
	),
	'settings' => array (
		'form_title' => 'REVIVE Training Registration',
		'submit_text' => 'Submit',
		'submit_text_processing' => 'Sending...',
		'honeypot' => '1',
		'notification_enable' => '1',
		'notifications' => array (
			1 => array (
				'notification_name' => 'Default Notification',
				'email' => 'mhummel@germanna.edu',
				'subject' => 'New REVIVE Training Registration Entry',
				'sender_name' => 'Germanna Community College Revive Registration Form',
				'sender_address' => '{admin_email}',
				'replyto' => 'No_Reply_Germanna@germanna.edu',
				'message' => '{all_fields}',
			),
		),
		'confirmation_type' => 'message',
		'confirmation_message' => 'Thanks for contacting us! We will be in touch with you shortly.',
		'confirmation_message_scroll' => '1',
		'confirmation_page' => '25',
	),
	'meta' => array (
		'template' => 'revive_training_registration',
	),
);
	}
}
new WPForms_Template_revive_training_registration;
endif; ?>


text:
class MyShaderManager
{
public:
	static MyShaderProgram *CreateShader(const char *shaderName, const char *vertShaderFileName, const char *fragShaderFileName);

	static MyShaderProgram *GetShader(const char *shaderName);
	static std::vector<MyShaderProgram *> *GetShaderList();

	static void Cleanup();

private:
	static std::map<const char *, MyShaderProgram *> *shaders;

};

#endif // MYSHADERMANAGER_H


text:
<?php

class Google_Service_CloudKMS_AsymmetricDecryptRequest extends Google_Model
{
  public $ciphertext;

  public function setCiphertext($ciphertext)
  {
    $this->ciphertext = $ciphertext;
  }
  public function getCiphertext()
  {
    return $this->ciphertext;
  }
}


text:
<?php if( !defined('BASEPATH') ) exit('禁止直接浏览');

class worker_register extends MY_Controller {

	public function __construct(){
		parent::__construct();
	}

	// 工人登记界面
	public function show_register_page(){

	}

}

?>


text:
package internal

//DebugLogging indicates if the user requested debug information.
//it functions as a switch for extra logging
var DebugLogging bool


text:
<?php
require_once "lib/WxPayException.php";
require_once "lib/WxPayApi.php";
require_once "lib/WxPayConfig.php";
require_once "lib/WxPayJsApiPay.class.php";

class WxOpenIdHelper{
    function getOpenId(){
        $tools = new JsApiPay();
        $openid = $tools->GetOpenid();
        return $openid;
    }
}


text:
.class Landroid/widget/TimePicker$2;
.super Ljava/lang/Object;
.source "TimePicker.java"

# interfaces
.implements Landroid/widget/NumberPicker$OnValueChangeListener;

# annotations
.annotation system Ldalvik/annotation/EnclosingMethod;
    value = Landroid/widget/TimePicker;-><init>(Landroid/content/Context;Landroid/util/AttributeSet;I)V
.end annotation

.annotation system Ldalvik/annotation/InnerClass;
    accessFlags = 0x0
    name = null
.end annotation

# instance fields
.field final synthetic this$0:Landroid/widget/TimePicker;

# direct methods
.method constructor <init>(Landroid/widget/TimePicker;)V
    .locals 0
    .parameter

    .prologue
    .line 147
    iput-object p1, p0, Landroid/widget/TimePicker$2;->this$0:Landroid/widget/TimePicker;

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

    return-void
.end method

# virtual methods
.method public onValueChange(Landroid/widget/NumberPicker;II)V
    .locals 3
    .parameter "spinner"
    .parameter "oldVal"
    .parameter "newVal"

    .prologue
    const/16 v2, 0xc

    const/16 v1, 0xb

    .line 149
    iget-object v0, p0, Landroid/widget/TimePicker$2;->this$0:Landroid/widget/TimePicker;

    #calls: Landroid/widget/TimePicker;->updateInputState()V
    invoke-static {v0}, Landroid/widget/TimePicker;->access$000(Landroid/widget/TimePicker;)V

    .line 150
    iget-object v0, p0, Landroid/widget/TimePicker$2;->this$0:Landroid/widget/TimePicker;

    invoke-virtual {v0}, Landroid/widget/TimePicker;->is24HourView()Z

    move-result v0

    if-nez v0, :cond_2

    .line 151
    if-ne p2, v1, :cond_0

    if-eq p3, v2, :cond_1

    :cond_0
    if-ne p2, v2, :cond_2

    if-ne p3, v1, :cond_2

    .line 153
    :cond_1
    iget-object v1, p0, Landroid/widget/TimePicker$2;->this$0:Landroid/widget/TimePicker;

    iget-object v0, p0, Landroid/widget/TimePicker$2;->this$0:Landroid/widget/TimePicker;

    #getter for: Landroid/widget/TimePicker;->mIsAm:Z
    invoke-static {v0}, Landroid/widget/TimePicker;->access$100(Landroid/widget/TimePicker;)Z

    move-result v0

    if-nez v0, :cond_3

    const/4 v0, 0x1

    :goto_0
    #setter for: Landroid/widget/TimePicker;->mIsAm:Z
    invoke-static {v1, v0}, Landroid/widget/TimePicker;->access$102(Landroid/widget/TimePicker;Z)Z

    .line 154
    iget-object v0, p0, Landroid/widget/TimePicker$2;->this$0:Landroid/widget/TimePicker;

    #calls: Landroid/widget/TimePicker;->updateAmPmControl()V
    invoke-static {v0}, Landroid/widget/TimePicker;->access$200(Landroid/widget/TimePicker;)V

    .line 157
    :cond_2
    iget-object v0, p0, Landroid/widget/TimePicker$2;->this$0:Landroid/widget/TimePicker;

    #calls: Landroid/widget/TimePicker;->onTimeChanged()V
    invoke-static {v0}, Landroid/widget/TimePicker;->access$300(Landroid/widget/TimePicker;)V

    .line 158
    return-void

    .line 153
    :cond_3
    const/4 v0, 0x0

    goto :goto_0
.end method


text:
The reference table has web viewers on its layouts listed in the file refWVs_Layout_List.md

* Folder name reference = layout table.
* File names (ex: filename path.md) = the names of the related tables sourcing the picture, movie, etc., minus the 'path' and 'URL' tags.
* The **path** tag (ex: filename **path**.md) = web viewers that reference files on local hard drives, computers, etc.
* The **URL** tags (ex: filename **URL**.md) = web viewers referencing files on the web.