text:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

    <title>GeoExt.plugins.PrintExtent — GeoExt v1.1</title>
    <link rel="stylesheet" href="../../../_static/geoext.css" type="text/css" />
    <link rel="stylesheet" href="../../../_static/pygments.css" type="text/css" />

    <link rel="shortcut icon" href="../../../_static/favicon.ico"/>
    <link rel="top" title="GeoExt v1.1" href="../../../index.html" />
    <link rel="up" title="GeoExt.plugins" href="../plugins.html" />
    <link rel="next" title="GeoExt.plugins.PrintPageField" href="PrintPageField.html" />
    <link rel="prev" title="GeoExt.plugins.AttributeForm" href="AttributeForm.html" />

GeoExt

Documentation

Examples

Download

Development

                <form class="search" action="../../../search.html" method="get">
                    <input id="searchbox-query" type="text" name="q" size="25" value="Search …" tabindex="3" onblur="if(this.value=='') this.value='Search …';" onfocus="if(this.value=='Search …') this.value='';" />
                    <input id="searchbox-submit" type="image" value="Search" src="../../../_static/img/search_icon_green.png" />
                    <input type="hidden" name="check_keywords" value="yes" />
                    <input type="hidden" name="area" value="default" />
                </form>

Navigation

GeoExt »

API Reference »

<tt class="docutils literal docutils literal docutils literal docutils literal docutils literal">GeoExt.plugins</tt> »

<tt class="docutils literal docutils literal">GeoExt.plugins.PrintExtent</tt>

Table Of Contents

<tt class="docutils literal">GeoExt.plugins.PrintExtent</tt>

Example Use

Config Options

Public Properties

Public Methods

Events

Previous topic

<tt class="docutils literal docutils literal docutils literal">GeoExt.plugins.AttributeForm</tt>

Next topic

<tt class="docutils literal">GeoExt.plugins.PrintPageField</tt>

<tt class="xref docutils literal">GeoExt.plugins.PrintExtent</tt>¶

ptype

<tt class="docutils literal">gx_printextent</tt>

class <tt class="descclassname">GeoExt.plugins.</tt><tt class="descname">PrintExtent</tt>¶

Provides a way to show and modify the extents of print pages on the map. It
uses a layer to render the page extent and handle features of print pages,
and provides a control to modify them. Must be set as a plugin to a
<tt class="xref docutils literal">GeoExt.MapPanel</tt>.

Example Use¶

Sample code to create a MapPanel with a PrintExtent, and print it
immediately:

var printExtent = new GeoExt.plugins.PrintExtent({
    printProvider: new GeoExt.data.PrintProvider({
        capabilities: printCapabilities
    })
});

var mapPanel = new GeoExt.MapPanel({
    border: false,
    renderTo: "div-id",
    layers: [new OpenLayers.Layer.WMS("Tasmania", "http://demo.opengeo.org/geoserver/wms",
        {layers: "topp:tasmania_state_boundaries"}, {singleTile: true})],
    center: [146.56, -41.56],
    zoom: 6,
    plugins: printExtent
});

printExtent.addPage();

// print the map
printExtent.print();

Config Options¶

Configuration properties.

<tt class="descname">layer</tt>

<tt class="docutils literal">OpenLayers.Layer.Vector</tt> The layer used to render extent and handle
features to. Optional, will be created if not provided.

<tt class="descname">pages</tt>

Array of <tt class="xref docutils literal">GeoExt.data.PrintPage</tt> The pages that this plugin
controls. Optional. If not provided, it will be created with one page
that is completely contained within the visible map extent.

Note

All pages must use the same PrintProvider.

<tt class="descname">printProvider</tt>

<tt class="xref docutils literal">GeoExt.data.PrintProvider</tt> The print provider this form
is connected to. Optional if pages are provided.

Public Properties¶

Public properties.

<tt class="descclassname">PrintExtent.</tt><tt class="descname">page</tt>¶

<tt class="xref docutils literal">GeoExt.data.PrintPage</tt> The page currently set for
transformation.

<tt class="descclassname">PrintExtent.</tt><tt class="descname">pages</tt>¶

Array of <tt class="xref docutils literal">GeoExt.data.PrintPage</tt> The pages that this component
controls. Read-only.

<tt class="descclassname">PrintExtent.</tt><tt class="descname">printProvider</tt>¶

<tt class="xref docutils literal">GeoExt.data.PrintProvider</tt> The print provider this form
is connected to. Read-only.

Public Methods¶

Public methods.

<tt class="descclassname">PrintExtent.</tt><tt class="descname">addPage</tt><big>(</big><big>)</big>¶

<col class="field-name" />
<col class="field-body" />

Parameter:	page – <tt class="xref docutils literal">GeoExt.data.PrintPage</tt> The page to add
to this plugin. If not provided, a page that fits the current
extent is created.

Returns:	page :class:<tt class="docutils literal">GeoExt.data.PrintPage</tt>

Adds a page to the list of pages that this plugin controls.

<tt class="descclassname">PrintExtent.</tt><tt class="descname">hide</tt><big>(</big><big>)</big>¶

Tear downs the plugin, removing the
<tt class="docutils literal">OpenLayers.Control.TransformFeature</tt> control and
the <tt class="docutils literal">OpenLayers.Layer.Vector</tt> layer.

<tt class="descclassname">PrintExtent.</tt><tt class="descname">print</tt><big>(</big><big>)</big>¶

<col class="field-name" />
<col class="field-body" />

Parameter:	options – <tt class="docutils literal">Object</tt> Options to send to the PrintProvider’s
print method. See <tt class="xref docutils literal">GeoExt.data.PrintProvider</tt> :: <tt class="docutils literal">print</tt>.

Prints all pages as shown on the map.

<tt class="descclassname">PrintExtent.</tt><tt class="descname">removePage</tt><big>(</big><big>)</big>¶

<col class="field-name" />
<col class="field-body" />

Parameter:	page – <tt class="xref docutils literal">GeoExt.data.PrintPage</tt> The page to remove
from this plugin.

Removes a page from the list of pages that this plugin controls.

<tt class="descclassname">PrintExtent.</tt><tt class="descname">selectPage</tt><big>(</big><big>)</big>¶

<col class="field-name" />
<col class="field-body" />

Parameter:	page – <tt class="xref docutils literal">GeoExt.data.PrintPage</tt> The page to select

Selects the given page (ie. calls the setFeature on the modify feature
control)

<tt class="descclassname">PrintExtent.</tt><tt class="descname">show</tt><big>(</big><big>)</big>¶

Sets up the plugin, initializing the <tt class="docutils literal">OpenLayers.Layer.Vector</tt>
layer and <tt class="docutils literal">OpenLayers.Control.TransformFeature</tt>, and centering
the first page if no pages were specified in the configuration.

Events¶

Events.

<tt class="descname">selectpage</tt>

Triggered when a page has been selected using the control

Listener arguments:
* printPage - <tt class="xref docutils literal">GeoExt.data.PrintPage</tt> this printPage

Navigation

              index

              modules |

              next |

              previous |

GeoExt »

API Reference »

<tt class="docutils literal docutils literal docutils literal docutils literal docutils literal">GeoExt.plugins</tt> »

<tt class="docutils literal docutils literal">GeoExt.plugins.PrintExtent</tt>

      © Copyright 2009-2010, GeoExt Community.


text:
package com.bplow.netconn.statistics.service.impl;

/*import javax.jms.Destination;
import javax.jms.JMSException;
import javax.jms.MapMessage;
import javax.jms.Message;
import javax.jms.Session;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.jms.core.JmsTemplate;
import org.springframework.jms.core.MessageCreator;*/
import org.springframework.stereotype.Service;

import com.bplow.netconn.statistics.domain.CustomerReq;
import com.bplow.netconn.statistics.service.SendReqService;

/**
 * 发送消息 服务
 * @author qian
 *
 */
//@Service
public class SendReqServiceImpl /*implements SendReqService*/{

	/*//@Autowired
	//@Qualifier("advancedJmsTemplate")
	private JmsTemplate jmsTemplate;
	//@Autowired
	//@Qualifier("advancedNotifyQueue")
	private Destination notifyQueue;

	@Override
	public void sendMessage(final CustomerReq req) {
		jmsTemplate.send(notifyQueue, new MessageCreator() {
			@Override
			public Message createMessage(Session session) throws JMSException {

				MapMessage message = session.createMapMessage();
				message.setString("mediaId", req.getMediaId());
				message.setString("adNo", req.getAdNo());
				message.setString("reqUrl", req.getReqUrl());
				message.setString("refUrl", req.getRefUrl());
				message.setString("extNo", req.getExtNo());
				message.setString("sessionId", req.getSessionId());

				return message;
			}
		});

	}*/

}

redpajama_set_name: RedPajamaGithub


text:
from sqlalchemy import Column, Integer, String, func
from app import db

class CnesEquipment(db.Model):
    __tablename__              = 'cnes_equipment'
    year                       = Column(Integer, primary_key=True)
    region                     = Column(String(1), primary_key=True)
    mesoregion                 = Column(String(4), primary_key=True)
    microregion                = Column(String(5), primary_key=True)
    state                      = Column(String(2), primary_key=True)
    municipality               = Column(String(7), primary_key=True)
    establishment              = Column(String(7), primary_key=True)
    dependency_level           = Column(String(1), primary_key=True)
    unit_type                  = Column(String(2), primary_key=True)
    equipment_type             = Column(String(1), primary_key=True)
    equipment_code             = Column(String(2), primary_key=True)
    equipment_quantity         = Column(Integer, primary_key=True)
    equipment_quantity_in_use  = Column(Integer, primary_key=True)
    sus_availability_indicator = Column(String(1), primary_key=True)
    health_region              = Column(String(5), primary_key=True)

    @classmethod
    def dimensions(cls):
        return [
            'year',
            'region',
            'mesoregion',
            'microregion',
            'state',
            'municipality',
            'establishment',
            'dependency_level',
            'unit_type',
            'equipment_type',
            'equipment_code',
            'sus_availability_indicator',
            'health_region'
        ]

    @classmethod
    def aggregate(cls, value):
        return {
            'equipments': func.sum(cls.equipment_quantity),
            'equipment_quantity': func.sum(cls.equipment_quantity),
            'equipment_quantity_in_use': func.sum(cls.equipment_quantity_in_use),
        }[value]

    @classmethod
    def values(cls):
        return ['equipments', 'equipment_quantity', 'equipment_quantity_in_use']


text:
export const MUTE = 'BACKGROUND_MEDIA_MUTE';

export const UNMUTE = 'BACKGROUND_MEDIA_UNMUTE';

export function mute() {
  return {
    type: MUTE
  };
}

export function unmute() {
  return {
    type: UNMUTE
  };
}


text:
import logging
import os
import string
from gensim import corpora, models, similarities
import jieba

#logging.basicConfig(format='%(asctime)s : %(levelname)s : %(message)s', level=logging.INFO)
logging.basicConfig(filename = os.path.join(os.getcwd(), 'log.txt'),format='%(asctime)s : %(levelname)s : %(message)s', level = logging.DEBUG)

# English Text
texts = [line.lower().split() for line in open('mycorpus.txt')]

# Chinese Text
#texts = [jieba.cut(line) for line in open('mycorpus.txt')]

# remove common words and tokenize
stoplist = set('for a an are i of the and to in on with that this by is'.split())
#remove the punctuation by string.replace(string.punctuation,"")
texts = [[word.replace(string.punctuation," ") for word in wordlist ]for wordlist in texts]
'''for text in texts:
	for token in text:'''

logging.info(texts)
#streaming
dictionary = corpora.Dictionary(texts)
dictionary.save('deerwester.dict')
# remove stop words and words that appear only once
stop_ids = [dictionary.token2id[stopword] for stopword in stoplist
			if stopword in dictionary.token2id]
once_ids = [tokenid for tokenid, docfreq in dictionary.dfs.iteritems() if docfreq ==1]
dictionary.filter_tokens(stop_ids + once_ids) #remove stop words and words that appear only once
dictionary.compactify() # remove gaps in id sequence after words that were removed

#remove stop words and words that appear only once

logging.info(dictionary)
print dictionary
logging.info(dictionary.token2id)

#convert tokenized documents to vectors
new_doc = "Human computer interface"
new_vec = dictionary.doc2bow(new_doc.lower().split())
logging.info(new_vec)

#
corpus = [dictionary.doc2bow(text) for text in texts]
corpora.MmCorpus.serialize('deerwester.mm', corpus)
logging.info(corpus)

#Streaming
class MyCorpus(object):
	def __iter__(self):
		for line in open('mycorpus.txt'):
			yield dictionary.doc2bow(line.lower().split())

corpus_memory_friendly = MyCorpus() # doesn't load the corpus into memory
for vector in corpus_memory_friendly:
	print (vector)

#print ("编码")


text:
//
//     Generated by class-dump 3.5 (64 bit) (Debug version compiled Sep 30 2020 21:18:12).
//
//  Copyright (C) 1997-2019 Steve Nygard.
//

#import <Foundation/Foundation.h>

/*
@class NSString, Protocol;

@protocol NSObject
@property(nonatomic, readonly) NSString *description;
- (struct _NSZone *)zone;
- (unsigned long long)retainCount;
- (id)autorelease;
- (oneway void)release;
- (id)retain;
- (BOOL)respondsToSelector:(SEL)arg1;
- (BOOL)conformsToProtocol:(Protocol *)arg1;
- (BOOL)isMemberOfClass:(Class)arg1;
- (BOOL)isKindOfClass:(Class)arg1;
- (BOOL)isProxy;
- (id)performSelector:(SEL)arg1 withObject:(id)arg2 withObject:(id)arg3;
- (id)performSelector:(SEL)arg1 withObject:(id)arg2;
- (id)performSelector:(SEL)arg1;
- (id)self;
- (Class)class;
@property(nonatomic, readonly) Class superclass;
@property(nonatomic, readonly) long long hash;
- (BOOL)isEqual:(id)arg1;

@optional
@property(nonatomic, readonly) NSString *debugDescription;
@end
*/


text:
package net.nicoulaj.maven.plugins.checksum.mojo;

import net.nicoulaj.maven.plugins.checksum.Constants;
import net.nicoulaj.maven.plugins.checksum.artifacts.ArtifactAttacher;
import net.nicoulaj.maven.plugins.checksum.artifacts.ArtifactListener;
import net.nicoulaj.maven.plugins.checksum.execution.Execution;
import net.nicoulaj.maven.plugins.checksum.execution.ExecutionException;
import net.nicoulaj.maven.plugins.checksum.execution.FailOnErrorExecution;
import net.nicoulaj.maven.plugins.checksum.execution.NeverFailExecution;
import net.nicoulaj.maven.plugins.checksum.execution.target.*;
import org.apache.maven.plugin.AbstractMojo;
import org.apache.maven.plugin.MojoFailureException;
import org.apache.maven.plugins.annotations.Component;
import org.apache.maven.plugins.annotations.Parameter;
import org.apache.maven.project.MavenProject;
import org.apache.maven.project.MavenProjectHelper;
import org.apache.maven.shared.utils.StringUtils;
import org.apache.maven.shared.utils.io.FileUtils;

import java.io.File;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;

/**
 * Base class for {@code checksum-maven-plugin} mojos.
 *
 * @author Julien Nicoulaud
 * @since 1.1
 */
abstract class AbstractChecksumMojo
    extends AbstractMojo
{

    /**
     * Fail if no files no process.
     */
    private boolean defaultFailIfNoFiles;

    /**
     * Fail if no files no process.
     */
    private final boolean failIfNoAlgorithms;

    /**
     * Fail if no files no process.
     */
    private final boolean failIfNoTargets;

    /**
     * The Maven project.
     *
     * @since 1.0
     */
    @Parameter( property = "project", required = true, readonly = true )
    protected MavenProject project;

    /**
     * The Maven Project Helper.
     *
     * Used to attach checksums as build artifacts.
     *
     * @since 1.3
     */
    @Component
    protected MavenProjectHelper projectHelper;

    /**
     * The list of checksum algorithms used.
     *
     *

     * Default value is MD5 and SHA-1.
     *
     *

     * Allowed values are Cksum, CRC32, BLAKE2B-160, BLAKE2B-256, BLAKE2B-384,
     * BLAKE2B-512, GOST3411, GOST3411-2012-256, GOST3411-2012-512, KECCAK-224, KECCAK-256, KECCAK-288, KECCAK-384,
     * KECCAK-512, MD2, MD4, MD5, RIPEMD128, RIPEMD160, RIPEMD256, RIPEMD320, SHA, SHA-1, SHA-224, SHA-256, SHA3-224,
     * SHA3-256, SHA3-384, SHA3-512, SHA-384, SHA-512, SHA-512/224, SHA-512/256, SKEIN-1024-1024, SKEIN-1024-384,
     * SKEIN-1024-512, SKEIN-256-128, SKEIN-256-160, SKEIN-256-224, SKEIN-256-256, SKEIN-512-128, SKEIN-512-160,
     * SKEIN-512-224, SKEIN-512-256, SKEIN-512-384, SKEIN-512-512, SM3, TIGER and WHIRLPOOL.
     *
     *

     * Use the following syntax:
     *
<algorithms>
     *   <algorithm>MD5</algorithm>
     *   <algorithm>SHA-1</algorithm>
     * </algorithms>

     *
     * @since 1.0
     */
    @Parameter
    protected List<String> algorithms = Arrays.asList( Constants.DEFAULT_EXECUTION_ALGORITHMS );

    /**
     * Indicates whether the build will fail if there are errors.
     *
     * @since 1.0
     */
    @Parameter( defaultValue = "true" )
    protected boolean failOnError;

    /**
     * Encoding to use for generated files.
     *
     * @since 1.0
     */
    @Parameter( property = "encoding", defaultValue = "${project.build.sourceEncoding}" )
    protected String encoding = Constants.DEFAULT_ENCODING;

    /**
     * Should the checksums be attached as build artifacts.
     *
     * @since 1.3
     */
    @Parameter( property = "attachChecksums", defaultValue = "false")
    protected boolean attachChecksums;

    /**
     * Indicates whether the build will print checksums in the build log.
     *
     * @since 1.0
     */
    @Parameter( defaultValue = "false" )
    protected boolean quiet;

    /**
     * Indicates whether the build will output relative path information as well.
     *
     * @since 1.3
     */
    @Parameter( defaultValue = "false" )
    protected boolean includeRelativePath;

    /**
     * Sub path to use as the root of the relative path when including relative path in xml/csv files
     *
     * @since 1.3
     */
    @Parameter( defaultValue = "" )
    protected String relativeSubPath = "";

    /**
     * Constructor.
     *
     * @param failIfNoFiles fail if no files to process
     * @param failIfNoAlgorithms fail if no algorithms to process
     * @param failIfNoTargets fail if no targets to process
     */
    AbstractChecksumMojo(boolean failIfNoFiles, boolean failIfNoAlgorithms, boolean failIfNoTargets) {
        this.defaultFailIfNoFiles = failIfNoFiles;
        this.failIfNoAlgorithms = failIfNoAlgorithms;
        this.failIfNoTargets = failIfNoTargets;
    }

    /** {@inheritDoc} */
    @Override
    public void execute()
        throws MojoFailureException
    {
        // Prepare an execution.
        Execution execution = ( failOnError ) ? new FailOnErrorExecution() : new NeverFailExecution( getLog() );
        execution.setAlgorithms( algorithms );
        execution.setFiles( getFilesToProcess() );
        execution.setFailIfNoFiles(isFailIfNoFiles());
        execution.setFailIfNoAlgorithms(failIfNoAlgorithms);
        execution.setFailIfNoTargets(failIfNoTargets);
        if ( !quiet )
        {
            execution.addTarget( new MavenLogTarget( getLog() ) );
        }
        if ( includeRelativePath )
        {
                execution.setSubPath( relativeSubPath );
        } else {
                execution.setSubPath( null );
        }
        if ( isIndividualFiles() )
        {
            File outputDirectory = null;
            if ( StringUtils.isNotEmpty( getIndividualFilesOutputDirectory() ) )
            {
                outputDirectory = FileUtils.resolveFile( new File( project.getBuild().getDirectory() ),
                                                         getIndividualFilesOutputDirectory() );
            }
            execution.addTarget( new OneHashPerFileTarget( encoding, outputDirectory, createArtifactListeners(), isAppendFilename()) );
        }
        if ( isCsvSummary() )
        {
            execution.addTarget( new CsvSummaryFileTarget(
                FileUtils.resolveFile( new File( project.getBuild().getDirectory() ), getCsvSummaryFile() ),
                encoding, createArtifactListeners()) );
        }
        if ( isXmlSummary() )
        {
            execution.addTarget( new XmlSummaryFileTarget(
                FileUtils.resolveFile( new File( project.getBuild().getDirectory() ), getXmlSummaryFile() ),
                encoding, createArtifactListeners()) );
        }
        if ( isShasumSummary() )
        {
            execution.addTarget( new ShasumSummaryFileTarget(
                FileUtils.resolveFile( new File( project.getBuild().getDirectory() ), getShasumSummaryFile() ), encoding, createArtifactListeners()) );
        }

        // Run the execution.
        try
        {
            execution.run();
        }
        catch ( ExecutionException e )
        {
            getLog().error( e.getMessage() );
            throw new MojoFailureException( e.getMessage() );
        }
    }

    private Iterable<? extends ArtifactListener> createArtifactListeners() {
        if (!attachChecksums) {
            return Collections.emptyList();
        }
        return Collections.singletonList(new ArtifactAttacher(project, projectHelper));
    }

    /**
     * Build the list of files from which digests should be generated.
     *
     * @return the list of files that should be processed.
     */
    protected abstract List<ChecksumFile> getFilesToProcess();

    /**
     *
isIndividualFiles.

     *
     * @return a boolean
     */
    protected abstract boolean isIndividualFiles();

    /**
     *
isAppendFilename.

     *
     * @return a boolean
     */
    protected boolean isAppendFilename(){
        return false;
    }

    /**
     *
getIndividualFilesOutputDirectory.

     *
     * @return a {@link java.lang.String} object
     */
    protected abstract String getIndividualFilesOutputDirectory();

    /**
     *
isCsvSummary.

     *
     * @return a boolean
     */
    protected abstract boolean isCsvSummary();

    /**
     *
getCsvSummaryFile.

     *
     * @return a {@link java.lang.String} object
     */
    protected abstract String getCsvSummaryFile();

    /**
     *
isXmlSummary.

     *
     * @return a boolean
     */
    protected abstract boolean isXmlSummary();

    /**
     *
getXmlSummaryFile.

     *
     * @return a {@link java.lang.String} object
     */
    protected abstract String getXmlSummaryFile();

    /**
     *
isShasumSummary.

     *
     * @return a boolean
     */
    protected abstract boolean isShasumSummary();

    /**
     *
getShasumSummaryFile.

     *
     * @return a {@link java.lang.String} object
     */
    protected abstract String getShasumSummaryFile();

    /**
     *
isFailIfNoFiles.

     *
     * @return a boolean
     */
    protected boolean isFailIfNoFiles(){
        return defaultFailIfNoFiles;
    }
}


text:
<resources>
    <string name="app_name">Call Intents Activity</string>
</resources>


text:
 {pagination}

<input type="submit" name="submit" value="{lang:unsubscribe}" />


text:
package za.co.ipay.prepaid.vendor.client;

import com.google.gwt.core.client.GWT;
import com.google.gwt.event.dom.client.ClickEvent;
import com.google.gwt.i18n.shared.DateTimeFormat;
import com.google.gwt.uibinder.client.UiBinder;
import com.google.gwt.uibinder.client.UiField;
import com.google.gwt.uibinder.client.UiHandler;
import com.google.gwt.uibinder.client.UiTemplate;
import com.google.gwt.user.client.rpc.AsyncCallback;
import com.google.gwt.user.client.ui.Composite;
import com.google.gwt.user.client.ui.FlexTable;
import com.google.gwt.user.client.ui.RootPanel;
import com.google.gwt.user.client.ui.Widget;
import za.co.ipay.prepaid.vendor.client.dto.ElecTransactionDTO;
import za.co.ipay.prepaid.vendor.util.Util;

import java.util.List;

/**
 * Created by F4742443 on 2016/03/11.
 */
public class PrepaidElecTransHistory extends Composite {

    private ApplicationServiceAsync applicationService = GWT.create(ApplicationService.class);
    @UiTemplate("PrepaidElecTransHistory.ui.xml")
    interface PrepaidElecTransHistoryUiBinder extends UiBinder<Widget, PrepaidElecTransHistory> {
    }

    private static PrepaidElecTransHistoryUiBinder ourUiBinder = GWT.create(PrepaidElecTransHistoryUiBinder.class);

    @UiField
    FlexTable transTable;

    public PrepaidElecTransHistory() {
        initWidget(ourUiBinder.createAndBindUi(this));
        FlexTable.FlexCellFormatter cellFormatter = transTable.getFlexCellFormatter();
        transTable.insertRow(0);
        transTable.setText(0, 0, "Transaction ID");
        transTable.setText(0, 1, "Reference Number");
        transTable.setText(0, 2, "Response");
        transTable.setText(0, 3, "Customer Message");
        transTable.setText(0, 4, "Meter Number");
        transTable.setText(0, 5, "Transaction Date");
        transTable.setCellSpacing(5);
        transTable.setCellPadding(3);
        transTable.getRowFormatter().addStyleName(0,"transHistoryHeader");
        transTable.addStyleName("transList");

        applicationService.getPrvsTransactions(new AsyncCallback<List<ElecTransactionDTO>>() {
            @Override
            public void onFailure(Throwable caught) {

            }

            @Override
            public void onSuccess(List<ElecTransactionDTO> result) {
                if(result == null){
                    return;
                }

                for (int i = transTable.getRowCount() - 1; i > 0; i--) {
                    if (transTable.isCellPresent(i, 0)) {
                        transTable.clearCell(i, 0);
                        transTable.clearCell(i, 1);
                        transTable.clearCell(i, 2);
                        transTable.clearCell(i, 3);
                        transTable.clearCell(i, 4);
                        transTable.clearCell(i, 5);
                    } else {
                        transTable.clearCell(i, 2);
                    }
                }
                int index = 1;
                for(ElecTransactionDTO elecTransactionDTO : result) {

                    transTable.insertRow(index);
                    transTable.getRowFormatter().addStyleName(index, "transHistoryRow");

                    transTable.setText(index, 0, String.valueOf(elecTransactionDTO.getId()));
                    transTable.setText(index, 1, elecTransactionDTO.getReference());
                    transTable.setText(index, 2, (elecTransactionDTO.getResponseCode() + "-" + elecTransactionDTO.getResponse()));
                    transTable.setText(index, 3, elecTransactionDTO.getCustomerMsg());
                    transTable.setText(index, 4, elecTransactionDTO.getMeter().getMeterNumber());
                    transTable.setText(index, 5, (elecTransactionDTO.formatTransTime()));

                }

            }
        });
    }

    @UiHandler("goBack")
    void showPreviousTransaction(ClickEvent e) {
        RootPanel.get().clear();
        PrepaidElectricityForm prepaidElectricityForm
                = new PrepaidElectricityForm();
        RootPanel.get().add(prepaidElectricityForm);
    }
}


text:
using System.Web.Mvc;
using Microsoft.Web.Mvc;
using SpecsForWebHelpers.Web.Domain;
using SpecsForWebHelpers.Web.Models;

namespace SpecsForWebHelpers.Web.Controllers
{
	public class HomeController : Controller
	{
		private readonly ICurrentUser _currentUser;

		public HomeController(ICurrentUser currentUser)
		{
			_currentUser = currentUser;
		}

		public ActionResult Index()
		{
			return View();
		}

		public ActionResult SetName()
		{
			return View();
		}

		[HttpPost]
		public ActionResult SetName(string name)
		{
			if (string.IsNullOrEmpty(name))
			{
				ViewBag.Error = "You must specify a name!";
				return View();
			}

			_currentUser.SetName(name);

			return RedirectToAction("Index", "Home");
		}

		public ActionResult SayHello(string name)
		{
			var model = new SayHelloViewModel
			{
				Name = name
			};

			return View(model);
		}

		[HttpPost]
		public ActionResult SayHello(SayHelloForm form)
		{
			return this.RedirectToAction(c => c.SayHello(form.Name));
		}
	}
}


text:
class PrefRegistrySimple;

namespace user_prefs {
class PrefRegistrySyncable;
}  // namespace user_prefs

namespace android {

// Register all prefs that will be used via the local state PrefService.
void RegisterPrefs(PrefRegistrySimple* registry);

// Register all prefs that will be used via a PrefService attached to a user
// Profile on Android.
void RegisterUserProfilePrefs(user_prefs::PrefRegistrySyncable* registry);

}  // namespace android

#endif  // CHROME_BROWSER_ANDROID_PREFERENCES_BROWSER_PREFS_ANDROID_H_


text:
/*!
@file
@author Dedmen (dedmen@dedmen.de)

@brief Contains the intercept::sqf_functions class.

https://github.com/NouberNou/intercept
*/
#pragma once
#include "shared.hpp"
#include "singleton.hpp"
#include "logging.hpp"
#include "arguments.hpp"
#include "loader.hpp"
#include "shared\types.hpp"
#include <mutex>
#include <condition_variable>
#include <queue>

namespace intercept {

    namespace __internal {
        enum class functionType {
            sqf_nular,
            sqf_function,
            sqf_operator
        };

        class registered_sqf_func_wrapper {
            using GameDataType = types::__internal::GameDataType;
        public:
            registered_sqf_func_wrapper(GameDataType return_type_, __internal::gsNular* func_);
            registered_sqf_func_wrapper(GameDataType return_type_, GameDataType left_arg_type_, __internal::gsFunction* func_);
            registered_sqf_func_wrapper(GameDataType return_type_, GameDataType left_arg_type_, GameDataType right_arg_type_, __internal::gsOperator* func_);
            void setUnused();

            const functionType _type;
            const std::string _name;
            union {
                const __internal::gsNular* _nular;
                const __internal::gsFunction* _func;
                const __internal::gsOperator* _op;
            };
            const types::__internal::GameDataType _lArgType;
            const types::__internal::GameDataType _rArgType;
            const types::__internal::GameDataType _returnType;
        };
    }

    class registered_sqf_function_impl {
    public:
        registered_sqf_function_impl(std::shared_ptr<__internal::registered_sqf_func_wrapper> func_);
        /*!
        @brief Gets called when Plugin unloads. This replaces the Function that will get unloaded by a dummy function
        */
        ~registered_sqf_function_impl();

        std::shared_ptr<__internal::registered_sqf_func_wrapper> _func;
    };

    /*!
    @brief Takes care of Wrapper functions for registered SQF Functions
    */
    class sqf_functions
        : public singleton<sqf_functions> {
        friend class registered_sqf_function_impl;
    public:
        sqf_functions();
        ~sqf_functions();

        using WrapperFunctionBinary = uintptr_t(*)(char*, uintptr_t, uintptr_t, uintptr_t);
        using WrapperFunctionUnary = uintptr_t(*)(char*, uintptr_t, uintptr_t);
        //[[nodiscard]]
        registered_sqf_function registerFunction(std::string name, std::string description, WrapperFunctionBinary function_, types::__internal::GameDataType return_arg_type, types::__internal::GameDataType left_arg_type, types::__internal::GameDataType right_arg_type);
        registered_sqf_function registerFunction(std::string name, std::string description, WrapperFunctionUnary function_, types::__internal::GameDataType return_arg_type, types::__internal::GameDataType right_arg_type);

        void initialize();
    private:
        __internal::gsFunction* findUnary(std::string name);
        sqf_register_functions _registerFuncs;
    };

}


text:
class Profile;

namespace content {
class DOMStorageContext;
}

// This class fetches local storage information in the WebKit thread, and
// notifies the UI thread upon completion.
// A client of this class need to call StartFetching from the UI thread to
// initiate the flow, and it'll be notified by the callback in its UI
// thread at some later point.
class BrowsingDataLocalStorageHelper
    : public base::RefCountedThreadSafe<BrowsingDataLocalStorageHelper> {
 public:
  // Contains detailed information about local storage.
  struct LocalStorageInfo {
    LocalStorageInfo();
    LocalStorageInfo(
        const std::string& protocol,
        const std::string& host,
        unsigned short port,
        const std::string& database_identifier,
        const std::string& origin,
        const FilePath& file_path,
        int64 size,
        base::Time last_modified);
    ~LocalStorageInfo();

    std::string protocol;
    std::string host;
    unsigned short port;
    std::string database_identifier;
    std::string origin;
    FilePath file_path;
    int64 size;
    base::Time last_modified;
  };

  explicit BrowsingDataLocalStorageHelper(Profile* profile);

  // Starts the fetching process, which will notify its completion via
  // callback.
  // This must be called only in the UI thread.
  virtual void StartFetching(
      const base::Callback<void(const std::list<LocalStorageInfo>&)>& callback);
  // Requests a single local storage file to be deleted in the WEBKIT thread.
  virtual void DeleteLocalStorageFile(const FilePath& file_path);

 protected:
  friend class base::RefCountedThreadSafe<BrowsingDataLocalStorageHelper>;
  virtual ~BrowsingDataLocalStorageHelper();

  // Notifies the completion callback in the UI thread.
  void NotifyInUIThread();

  // Owned by the profile
  content::DOMStorageContext* dom_storage_context_;

  // This only mutates on the UI thread.
  base::Callback<void(const std::list<LocalStorageInfo>&)> completion_callback_;

  // Indicates whether or not we're currently fetching information:
  // it's true when StartFetching() is called in the UI thread, and it's reset
  // after we notified the callback in the UI thread.
  // This only mutates on the UI thread.
  bool is_fetching_;

  // This only mutates in the WEBKIT thread.
  std::list<LocalStorageInfo> local_storage_info_;

 private:
  // Called back with the all the local storage files.
  void GetAllStorageFilesCallback(const std::vector<FilePath>& files);
  // Get the file info on the file thread.
  void FetchLocalStorageInfo(const std::vector<FilePath>& files);

  DISALLOW_COPY_AND_ASSIGN(BrowsingDataLocalStorageHelper);
};

// This class is a thin wrapper around BrowsingDataLocalStorageHelper that does
// not fetch its information from the local storage tracker, but gets them
// passed as a parameter during construction.
class CannedBrowsingDataLocalStorageHelper
    : public BrowsingDataLocalStorageHelper {
 public:
  explicit CannedBrowsingDataLocalStorageHelper(Profile* profile);

  // Return a copy of the local storage helper. Only one consumer can use the
  // StartFetching method at a time, so we need to create a copy of the helper
  // every time we instantiate a cookies tree model for it.
  CannedBrowsingDataLocalStorageHelper* Clone();

  // Add a local storage to the set of canned local storages that is returned
  // by this helper.
  void AddLocalStorage(const GURL& origin);

  // Clear the list of canned local storages.
  void Reset();

  // True if no local storages are currently stored.
  bool empty() const;

  // Returns the number of local storages currently stored.
  size_t GetLocalStorageCount() const;

  // BrowsingDataLocalStorageHelper implementation.
  virtual void StartFetching(
      const base::Callback<void(const std::list<LocalStorageInfo>&)>& callback)
          OVERRIDE;

 private:
  virtual ~CannedBrowsingDataLocalStorageHelper();

  // Convert the pending local storage info to local storage info objects.
  void ConvertPendingInfo();

  std::set<GURL> pending_local_storage_info_;

  Profile* profile_;

  DISALLOW_COPY_AND_ASSIGN(CannedBrowsingDataLocalStorageHelper);
};

#endif  // CHROME_BROWSER_BROWSING_DATA_LOCAL_STORAGE_HELPER_H_


text:
using System;
using System.IO;
using System.Threading.Tasks;

using Google.Maps.Internal;

namespace Google.Maps.StreetView
{
	/// <summary>
	/// The Google Street View Image API lets you embed a static (non-interactive) Street View panorama or thumbnail
	/// into your web page, without the use of JavaScript. The viewport is defined with URL parameters sent through
	/// a standard HTTP request, and is returned as a static image.
	/// </summary>
	/// <see href="https://developers.google.com/maps/documentation/streetview/intro"/>
	public class StreetViewService : IDisposable
	{
		public static readonly Uri HttpsUri = new Uri("https://maps.googleapis.com/maps/api/streetview");

		Uri baseUri;
		MapsHttp http;

		public StreetViewService(GoogleSigned signingSvc = null, Uri baseUri = null)
		{
			this.baseUri = baseUri ?? HttpsUri;

			this.http = new MapsHttp(signingSvc ?? GoogleSigned.SigningInstance);
		}

		public byte[] GetImage(StreetViewRequest request)
		{
			var stream = GetStream(request);

			return StreamToArray(stream);
		}

		public async Task<byte[]> GetImageAsync(StreetViewRequest request)
		{
			var stream = await GetStreamAsync(request);

			return StreamToArray(stream);
		}

		public StreetViewMetadataResponse GetMetadataResponse(StreetViewMetadataRequest request)
		{
			var uri = new Uri(baseUri, request.ToUri());

			return http.Get<StreetViewMetadataResponse>(uri);
		}

		public Stream GetStream(StreetViewRequest request)
		{
			var uri = new Uri(baseUri, request.ToUri());

			return http.GetStream(uri);
		}

		public Task<Stream> GetStreamAsync(StreetViewRequest request)
		{
			var uri = new Uri(baseUri, request.ToUri());

			return http.GetStreamAsync(uri);
		}

		Byte[] StreamToArray(Stream inputStream)
		{
			var outputStream = new MemoryStream();

			int bytesRead = 0;
			const int BYTE_BUFFER_LENGTH = 4096;
			byte[] buffer = new byte[BYTE_BUFFER_LENGTH];

			do
			{
				bytesRead = inputStream.Read(buffer, 0, BYTE_BUFFER_LENGTH);
				outputStream.Write(buffer, 0, bytesRead);
			}
			while (bytesRead > 0);

			var result = outputStream.ToArray();
			outputStream.Dispose();
			return result;
		}

		public void Dispose()
		{
			if (http != null)
			{
				http.Dispose();
				http = null;
			}
		}
	}
}


text:
class SearchResult
  require "erb"
  include ERB::Util

  attr_accessor :id, :doc_type, :url_path, :post_title, :hit_url, :hit_name, :entity_url,
    :entity_image_url, :entity_name, :text, :associated_records, :entity_last_updated_on, :entity_title

  MAX_TEXT_LENGTH = 200
  FRAGMENT_TYPE = :fragment
  ENTITY_TYPE = :entity
  EXTERNAL_TYPE = :external

  def initialize( result )
    @id = result[:id]
    if result['displayText'].length > MAX_TEXT_LENGTH
      @text = "#{result['displayText'].slice(0,MAX_TEXT_LENGTH)}..."
    else
      @text = result['displayText']
    end
    # call the setup method for the docType value:
    # TODO: Dispatching on name is a code smell. Need to fix this; a new class for each
    # kind of search result is an appropriate strategy.

    target = nil
    case result['docType'].to_sym
    when FRAGMENT_TYPE then target = :setup_fragment!
    when ENTITY_TYPE then target = :setup_entity!
    when EXTERNAL_TYPE then target = :setup_external!
    end

    send(target, result) if target
  end

  # FIXME: This doesn't seem to be used anywhere.
  def self.search( solr, query, opts={} )
    results = solr.query( query, opts )
    results.hits.map { |result|
      SearchResult.new( result )
    } if results
  end

  protected

  #
  # Setup this instance as an Entity (probably should be a new class type; SearchResult::Entity ?)
  # TODO: Likely a new class, SearchResult::Fragment.
  def setup_fragment!(result)
    @doc_type = FRAGMENT_TYPE

    # Look up the controller from the entityType.
    controller = controllerize result['entityType']
    @hit_url = "/#{controller}/#{result['entityID']}?tab=#{result['fieldSet'].downcase}"
    @hit_name = "#{result['fieldSet']} » #{result['fieldName']}".html_safe
    @fragment_name = "#{result['entityName']} » ".html_safe + @hit_name
    @entity_url = "/#{controller}/#{result['entityID']}"
    @entity_image_url = result['imageURL']
    @entity_name = result['entityName']
  end

  # TODO: Likely a new class, SearchResult::External.
  def setup_external!(result)
    @doc_type = EXTERNAL_TYPE
    @post_title=result['postTitle']
    @url_path=result['urlPath']
  end

  def setup_entity!(result)
    c = controllerize result['entityType']

    @doc_type = ENTITY_TYPE
    @hit_name = result['entityName']
    @entity_url = "/#{c}/#{result['entityID']}"
    @entity_image_url = result['imageURL']
    @associated_records = []

    e = Entity.find(result['entityID'])
    @entity_last_updated_on = !e.nil? ? e.last_updated_on : nil

    if (result['entityType'].downcase == :person.to_s)
      p = Person.find(result['entityID'])
      @entity_title = !p.nil? ? h(p.person_profile.title) : nil
    end
  end

  #
  # Transforms the name of an entity into the name of its corresponding controller.
  def controllerize(s)
    s.pluralize.downcase
  end
end


text:
LibCanvas.Context2D
===================

`LibCanvas.Context2D` - значительно расширенный стандартный 2d-контекст, который можно получить так:

```js
var context = canvas.getContext('2d-libcanvas');
// alternate syntax:
var context = new LibCanvas.Context2D(canvas);
```

Основная его идея - все методы, если не требуется иного возвращают ссылку на контекст для использования в цепочках вызовов, возможность использования именованных аргументов и использование объектов LibCanvas.

Кроме этого он предоставляет множество нестандартных методов.

#### Global

После вызова LibCanvas.extract() можно использовать короткий алиас "Context2D"

## Свойства

### canvas (get)
Ссылка на родительский dom-елемент

### width (get/set)
Возвращает/изменяет ширину холста

### height (get/set)
Возвращает/изменяет высоту холста

### size (get/set)
Возвращает/изменяет высоту холста

```js
context.size = new Size(400, 250);
```

### rectangle (get)
Возвращает ссылку на прямоугольник, соответствующий размерам холста
Крайне не рекомендуется работать напрямую с этим объектом. Если необходимо - используйте клон.

#### Пример

```js
if (context.rectangle.hasPoint(somePoint)) {
	// Точка находится в пределах холста
	doSmth();
}

// Изменяем прямоугольник
var clone = context.rectangle.clone();

clone.height /= 2;
clone.width  /= 2;

context.fillAll( clone, 'red' );
```

### shadow (get/set)
Позволяет получить/установить свойства shadowOffsetX, shadowOffsetY, shadowBlur и shadowColor лаконичным способом

#### Пример

```js
context.shadow = '1 2 3 black';

// Аналог:
context.shadowOffsetX = 1;
context.shadowOffsetY = 2;
context.shadowBlur    = 3;
context.shadowColor   = 'black;
```

## Метод getClone

```js
HTMLCanvasElement getClone(int width, int height)
```

Возвращает холст, равный по изображению и с измененным размером, если указаны width и height
Может применятся для создания копии текущего слоя, маленькой иконки, итд.

#### Пример

```js
context.drawImage(context.getClone(64, 48));
```

## Метод set

```js
[this] set(object properties)
[this] set(string propertyName, string propertyValue)
```

Указывает свойства холста

#### Пример

```js
context
	.set({
		fillStyle  : 'black',
		strokeStyle: 'blue'
	})
	.set('globalOpacity', 0.5);
```

## Метод get

```js
string get(string propertyName)
```

Получить значения свойства

#### Пример

```js
context.get('fillStyle');
```

## Метод fillAll

```js
[this] fillAll()
[this] fillAll(string fillStyle)
```

Заливает весь холст цветом fillStyle или цветом по-умолчанию, если аргумент не передан

#### Пример

```js
context.fillAll('red');
```

## Метод strokeAll

```js
[this] strokeAll()
[this] strokeAll(string strokeStyle)
```

Обводит весь холст цветом strokeStyle или цветом по-умолчанию, если аргумент не передан

#### Пример

```js
context.strokeAll('rgb(255, 245, 200)');
```

## Метод clearAll

```js
[this] clearAll()
```

Очищает холст

#### Пример

```js
context.clearAll();
```

## Метод fill

```js
[this] fill()
[this] fill(string fillStyle)
[this] fill(Shape shape)
[this] fill(Shape shape, string fillStyle)
```

Заливает фигуру или текущий путь цветом fillStyle или цветом по-умолчанию, если аргумент не передан

#### Пример

```js
context.fill(new Circle(50, 50, 20), 'red');
```

## Метод stroke

```js
[this] stroke()
[this] stroke(string fillStyle)
[this] stroke(Shape shape)
[this] stroke(Shape shape, string fillStyle)
```

Обводит фигуру или текущий путь цветом strokeStyle или цветом по-умолчанию, если аргумент не передан

#### Пример

```js
context.stroke(new Circle(50, 50, 20), 'red');
```

## Метод clear

```js
[this] clear(Shape shape)
```

Очищает фигуру, переданную первым аргументом. (сглаживание - выключено!)

## Метод fillRect

```js
[this] fillRect(LibCanvas.Shapes.Rectangle rectangle)
[this] fillRect(int fromX, int fromY, int width, int height)
```

## Метод strokeRect

```js
[this] strokeRect(LibCanvas.Shapes.Rectangle rectangle)
[this] strokeRect(int fromX, int fromY, int width, int height)
```

## Метод clearRect

```js
[this] clearRect(LibCanvas.Shapes.Rectangle rectangle)
[this] clearRect(int fromX, int fromY, int width, int height)
```

#### Пример

```js
context.clear(new Circle(50, 50, 20));
```

## Методы save/restore

```js
[this] save()
```

Сохраняет настройки холста в стек

```js
[this] restore()
```

Восстанавливает последние сохранённые настройки холста

#### Пример

```js
context.set({ fillStyle: 'blue' });
context.save();
	context.set({ fillStyle: 'red' });
	context.fillAll(); // заливаем всё красным цветом
context.restore();
context.fillAll(); // заливаем всё синим цветом
```

# Создание пути

## Метод beginPath

```js
[this] beginPath()
[this] beginPath(point)
[this] beginPath(int x, int y)
```

Открывает путь. Если есть аргументы, то вызывает метод `moveTo`

## Метод closePath

```js
[this] closePath()
[this] closePath(LibCanvas.Point point)
[this] closePath(int x, int y)
```

Закрывает путь. Если есть аргументы, то вызывает метод `lineTo`

## Метод moveTo

```js
[this] moveTo(LibCanvas.Point point);
[this] moveTo(int x, int y);
```

Перемещает указатель пути в точку point

## Метод lineTo

```js
[this] lineTo(LibCanvas.Point point);
[this] lineTo(int x, int y);
```

Прокладывает линию в точку point

## Метод arc

```js
[this] lineTo(object params);
```

Проложить дугу

#### Опции

`circle`    (*LibCanvas.Shapes.Circle*) - круг, по котором необходимо отрисовывать дугу

`angle`     (*object*) - угол, который дуга отрисовывает. Необходимо два из трех параметров:

* `start`  (*int*) - откуда дуга начинается (в радианах)
* `end`    (*int*) - где дуга заканчивается (в радианах)
* `size`   (*int*) - размер дуги (в радианах)

Если передан массив из двух элементов, то предполагается, что первый - это start, а второй - end

`anticlockwise` или `acw` - если указано в true, то направление движения против часовой стрелки

#### Пример

```js
context.arc({
	circle: new LibCanvas.Shapes.Circle(50, 50, 25),
	angle : [(30).degree(), (60).degree()]
});
```

## Метод curveTo

```js
[this] curveTo(object params);
```

Отрисовывает кривую Безье по контрольным точкам.

#### Опции

`to`    (*LibCanvas.Point*) - куда проложить кривую

`point` (*LibCanvas.Point[]*) - массив контрольных точек. Может быть две, одна или не быть.

#### Пример

```js
context.curveTo({
	to: [100, 100],
	points : [
		[80, 30],
		[20, 90]
	]
});
```
	// равносильно

```js
context.bezierCurveTo(80, 30, 20, 90, 100, 100);
```

## Метод isPointInPath

```js
boolean isPointInPath(LibCanvas.Point point);
boolean isPointInPath(int x, int y);
```

Проверяет, находится ли данная точка в пределах отрисованного пути

#### Пример

```js
context.isPointInPath([15, 20]);
```

## Метод clip

```js
[this] clip();
[this] clip(LibCanvas.Shape shape);
```

Ограничивает отрисовку в холст определённым участком.
Если аргумент `shape` не передан, то будет использоваться текущий путь

#### Пример

```js
// всё, что за пределами круга - не отрисуется
context.clip(new Circle(100, 100, 50));
context.fillRect(100, 100, 100, 100);
```

## Метод rotate

```js
[this] rotate(number angle);
[this] rotate(number angle, LibCanvas.Point pivot);
```

## Метод translate

```js
[this] translate (LibCanvas.Point point)
[this] translate (LibCanvas.Point point, boolean reverse)
[this] translate (int x, int y)
```

## Метод text

```js
[this] text(object params)
```

#### Опции

`text`       (*string*)

`color`      (*string*)

`stroke`     (*bool, по-умолчанию = false*) если параметр = true то вместо canvas.fillStyle() вызывается canvas.strokeStyle,
то есть включается режим "обводки текста" при этом сам текст остается прозрачным. Если надо нарисовать и текст,
и обводку текста то надо сначала вызвать метод text со stroke=true, а потом ещё раз со stroke=false.

`lineWidth`  (*int*) указывает толщину линии обводки текста при stroke = true, при этом надо внимательно проверять
результат -- некоторые браузеры рендерят обводку сложных букв (w,m,n, etc) с артефактами и, возможно, прийдётся поиграть
с толщиной обводки/ размером текста

`wrap`       (*string*) no|normal

`to`         (*LibCanvas.Shapes.Rectangle*) по-умолчанию вызывается метод this.getFullRectangle

`align`      (*string*) center|left|right

`size`       (*int, по-умолчанию = 16*)

`weight`     (*string*) bold|normal

`style`      (*string*) italic|normal

`family`     (*string*, по-умолчанию = sans-serif)

`lineHeight` (*int*)

`overflow`   (*string*, по-умолчанию = visible) hidden|visible

`padding`    (*int|int[]*, по-умолчанию = 0) [topBottom, leftRight]

`shadow`     (*string*) включает режим рендеринга тени для текста. Формат как в канвасе: `'shadowOffsetX, shadowOffsetY, shadowBlur, shadowColor'`.
Например: `shadow: '0 -1 3 #616161'`. Не забывайте цвет указывать с символом '#". Хром то покажет, а вот остальные браузеры нет :).

## Метод drawImage

```js
[this] drawImage(element image)
[this] drawImage(object params)
```

#### Опции

Требуется только одна из опций `from`, `center`, `draw`

`image`  (*element*) картинка, которую вы собираетес отрисовывать

`from`   (*LibCanvas.Point*) верхняя левая точка, откуда отрисовывать картинку

`center` (*LibCanvas.Point*) центральная точка, откуда отрисовывать картинку

`draw`   (*LibCanvas.Shapes.Rectangle*) прямоугольник, в который отрисовать картинку. Картинка скейлится до размеров многоугольника.

`crop`   (*LibCanvas.Shapes.Rectangle*) прямоугольник, который указывает на часть картинки, которую нужно вырезать (применяется только при использовании draw)

`angle`  (*int*) угол наклона картинки в радианах

`scale`  (*LibCanvas.Point*) ресайз картинки. Может использоваться для отражения картинки по вертикали или горизонатали

Принцип простой - если есть `draw` и `crop`, то сначала применяется `crop` к картинке, потом она размещается согласно `from|center|draw`, потом разворачивается вокруг центра на угол angle по часовой стрелке и так отрисовывается.

#### Пример

```js
context.drawImage({
	image : this.image,
	center: this.position,
	angle : this.angle
});

context.drawImage({
	image: canvas,
	crop : [100, 100, 50, 50],
	draw : [250, 250, 50, 50]
});

context.drawImage({
	image: this.image,
	from : this.from,
	scale: new Point(-1, 1) // flipX
});
```

## Метод projectiveImage
###### testing

```js
[this] projectiveImage(object params)
```

## Метод getPixel

```js
[this] getPixel(LibCanvas.Point point)
```

Возвращает значение цвета пикселя в точке point в формате {r: [0, 255], g: [0, 255], b: [0, 255], a: [0, 1]}
Аргумент можно передать конструктору Color.

#### Пример

```js
mouse.events.add( 'click', function () {
	var pixel = ctx.getPixel( mouse.point );
	trace( new atom.Color( pixel ) );
});

mouse.events.add( 'click', function () {
	var pixel = ctx.getPixel( mouse.point );

	pixel.a > 0.1 ?
		alert('Пиксель видим')  :
		alert('Пиксель невидим');
});
```

## Метод createGradient

```js
[RadialGradient] createGradient(Circle from, Circle to, Object colors)
[LinearGradient] createGradient(Point  from, Point  to, Object colors)
[LinearGradient] createGradient(Rectangle rect, Object colors)
```

Создаёт и возвращает радиальный или линеарный градиент с стоп-цветами, указанными в colors

```js
context.createGradient( context.rectangle, {
	'0.0': 'red',
	'0.5': 'blue',
	'1.0': 'green'
});

context.createGradient(
	new Circle(50, 50, 10),
	new Circle(50, 50, 20), {
		'0.0': 'red',
		'0.5': 'blue',
		'1.0': 'green'
	});
```

## Метод createRectangleGradient

	//// todo

# Следующие методы повторяют методы из оригинального контекста:
 * scale
 * transform
 * setTransform
 * fillText
 * strokeText
 * measureText
 * createImageData
 * putImageData
 * getImageData
 * getPixels
 * createLinearGradient
 * createRadialGradient
 * createPattern
 * drawWindow


text:
using namespace ABI::Windows::Media;
using namespace Microsoft::WRL;
using namespace std;

void CreateVideoSink(unsigned int width, unsigned int height, const function<void(IMFSample*)>& sampleHandler, _COM_Outptr_ IMFMediaSink** sink)
{
    *sink = nullptr;

    ComPtr<IMFMediaType> mt;
    CHK(MFCreateMediaType(&mt));
    CHK(mt->SetGUID(MF_MT_MAJOR_TYPE, MFMediaType_Video));
    CHK(mt->SetGUID(MF_MT_SUBTYPE, MFVideoFormat_RGB32));
    CHK(MFSetAttributeSize(mt.Get(), MF_MT_FRAME_SIZE, width, height));

    ComPtr<MediaSink> mediaSink = Make<MediaSink>(
        nullptr,
        mt,
        [](IMFSample*){},
        sampleHandler
        );
    CHKOOM(mediaSink);

    *sink = mediaSink.Detach();
}


text:
package com.koushikdutta.async.http;

import java.text.DateFormat;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.Locale;
import java.util.TimeZone;

/**
 * Best-effort parser for HTTP dates.
 */
public final class HttpDate {

    /**
     * Most websites serve cookies in the blessed format. Eagerly create the parser to ensure such
     * cookies are on the fast path.
     */
    private static final ThreadLocal<DateFormat> STANDARD_DATE_FORMAT
            = new ThreadLocal<DateFormat>() {
        @Override protected DateFormat initialValue() {
            DateFormat rfc1123 = new SimpleDateFormat("EEE, dd MMM yyyy HH:mm:ss zzz", Locale.US);
            rfc1123.setTimeZone(TimeZone.getTimeZone("UTC"));
            return rfc1123;
        }
    };

    /**
     * If we fail to parse a date in a non-standard format, try each of these formats in sequence.
     */
    private static final String[] BROWSER_COMPATIBLE_DATE_FORMATS = new String[] {
            /* This list comes from  {@code org.apache.http.impl.cookie.BrowserCompatSpec}. */
            "EEEE, dd-MMM-yy HH:mm:ss zzz", // RFC 1036
            "EEE MMM d HH:mm:ss yyyy", // ANSI C asctime()
            "EEE, dd-MMM-yyyy HH:mm:ss z",
            "EEE, dd-MMM-yyyy HH-mm-ss z",
            "EEE, dd MMM yy HH:mm:ss z",
            "EEE dd-MMM-yyyy HH:mm:ss z",
            "EEE dd MMM yyyy HH:mm:ss z",
            "EEE dd-MMM-yyyy HH-mm-ss z",
            "EEE dd-MMM-yy HH:mm:ss z",
            "EEE dd MMM yy HH:mm:ss z",
            "EEE,dd-MMM-yy HH:mm:ss z",
            "EEE,dd-MMM-yyyy HH:mm:ss z",
            "EEE, dd-MM-yyyy HH:mm:ss z",

            /* RI bug 6641315 claims a cookie of this format was once served by www.yahoo.com */
            "EEE MMM d yyyy HH:mm:ss z",
    };

    /**
     * Returns the date for {@code value}. Returns null if the value couldn't be
     * parsed.
     */
    public static Date parse(String value) {
        if (value == null)
            return null;
        try {
            return STANDARD_DATE_FORMAT.get().parse(value);
        } catch (ParseException ignore) {
        }
        for (String formatString : BROWSER_COMPATIBLE_DATE_FORMATS) {
            try {
                return new SimpleDateFormat(formatString, Locale.US).parse(value);
            } catch (ParseException ignore) {
            }
        }
        return null;
    }

    /**
     * Returns the string for {@code value}.
     */
    public static String format(Date value) {
        return STANDARD_DATE_FORMAT.get().format(value);
    }
}


text:
package wait

import (
	"errors"
	"fmt"
	"sync"
	"sync/atomic"
	"testing"
	"time"

	"k8s.io/apimachinery/pkg/util/runtime"
)

func TestUntil(t *testing.T) {
	ch := make(chan struct{})
	close(ch)
	Until(func() {
		t.Fatal("should not have been invoked")
	}, 0, ch)

	ch = make(chan struct{})
	called := make(chan struct{})
	go func() {
		Until(func() {
			called <- struct{}{}
		}, 0, ch)
		close(called)
	}()
	<-called
	close(ch)
	<-called
}

func TestNonSlidingUntil(t *testing.T) {
	ch := make(chan struct{})
	close(ch)
	NonSlidingUntil(func() {
		t.Fatal("should not have been invoked")
	}, 0, ch)

	ch = make(chan struct{})
	called := make(chan struct{})
	go func() {
		NonSlidingUntil(func() {
			called <- struct{}{}
		}, 0, ch)
		close(called)
	}()
	<-called
	close(ch)
	<-called
}

func TestUntilReturnsImmediately(t *testing.T) {
	now := time.Now()
	ch := make(chan struct{})
	Until(func() {
		close(ch)
	}, 30*time.Second, ch)
	if now.Add(25 * time.Second).Before(time.Now()) {
		t.Errorf("Until did not return immediately when the stop chan was closed inside the func")
	}
}

func TestJitterUntil(t *testing.T) {
	ch := make(chan struct{})
	// if a channel is closed JitterUntil never calls function f
	// and returns immediately
	close(ch)
	JitterUntil(func() {
		t.Fatal("should not have been invoked")
	}, 0, 1.0, true, ch)

	ch = make(chan struct{})
	called := make(chan struct{})
	go func() {
		JitterUntil(func() {
			called <- struct{}{}
		}, 0, 1.0, true, ch)
		close(called)
	}()
	<-called
	close(ch)
	<-called
}

func TestJitterUntilReturnsImmediately(t *testing.T) {
	now := time.Now()
	ch := make(chan struct{})
	JitterUntil(func() {
		close(ch)
	}, 30*time.Second, 1.0, true, ch)
	if now.Add(25 * time.Second).Before(time.Now()) {
		t.Errorf("JitterUntil did not return immediately when the stop chan was closed inside the func")
	}
}

func TestJitterUntilRecoversPanic(t *testing.T) {
	// Save and restore crash handlers
	originalReallyCrash := runtime.ReallyCrash
	originalHandlers := runtime.PanicHandlers
	defer func() {
		runtime.ReallyCrash = originalReallyCrash
		runtime.PanicHandlers = originalHandlers
	}()

	called := 0
	handled := 0

	// Hook up a custom crash handler to ensure it is called when a jitter function panics
	runtime.ReallyCrash = false
	runtime.PanicHandlers = []func(interface{}){
		func(p interface{}) {
			handled++
		},
	}

	ch := make(chan struct{})
	JitterUntil(func() {
		called++
		if called > 2 {
			close(ch)
			return
		}
		panic("TestJitterUntilRecoversPanic")
	}, time.Millisecond, 1.0, true, ch)

	if called != 3 {
		t.Errorf("Expected panic recovers")
	}
}

func TestJitterUntilNegativeFactor(t *testing.T) {
	now := time.Now()
	ch := make(chan struct{})
	called := make(chan struct{})
	received := make(chan struct{})
	go func() {
		JitterUntil(func() {
			called <- struct{}{}
			<-received
		}, time.Second, -30.0, true, ch)
	}()
	// first loop
	<-called
	received <- struct{}{}
	// second loop
	<-called
	close(ch)
	received <- struct{}{}

	// it should take at most 2 seconds + some overhead, not 3
	if now.Add(3 * time.Second).Before(time.Now()) {
		t.Errorf("JitterUntil did not returned after predefined period with negative jitter factor when the stop chan was closed inside the func")
	}

}

func TestExponentialBackoff(t *testing.T) {
	opts := Backoff{Factor: 1.0, Steps: 3}

	// waits up to steps
	i := 0
	err := ExponentialBackoff(opts, func() (bool, error) {
		i++
		return false, nil
	})
	if err != ErrWaitTimeout || i != opts.Steps {
		t.Errorf("unexpected error: %v", err)
	}

	// returns immediately
	i = 0
	err = ExponentialBackoff(opts, func() (bool, error) {
		i++
		return true, nil
	})
	if err != nil || i != 1 {
		t.Errorf("unexpected error: %v", err)
	}

	// returns immediately on error
	testErr := fmt.Errorf("some other error")
	err = ExponentialBackoff(opts, func() (bool, error) {
		return false, testErr
	})
	if err != testErr {
		t.Errorf("unexpected error: %v", err)
	}

	// invoked multiple times
	i = 1
	err = ExponentialBackoff(opts, func() (bool, error) {
		if i < opts.Steps {
			i++
			return false, nil
		}
		return true, nil
	})
	if err != nil || i != opts.Steps {
		t.Errorf("unexpected error: %v", err)
	}
}

func TestPoller(t *testing.T) {
	done := make(chan struct{})
	defer close(done)
	w := poller(time.Millisecond, 2*time.Millisecond)
	ch := w(done)
	count := 0
DRAIN:
	for {
		select {
		case _, open := <-ch:
			if !open {
				break DRAIN
			}
			count++
		case <-time.After(ForeverTestTimeout):
			t.Errorf("unexpected timeout after poll")
		}
	}
	if count > 3 {
		t.Errorf("expected up to three values, got %d", count)
	}
}

type fakePoller struct {
	max  int
	used int32 // accessed with atomics
	wg   sync.WaitGroup
}

func fakeTicker(max int, used *int32, doneFunc func()) WaitFunc {
	return func(done <-chan struct{}) <-chan struct{} {
		ch := make(chan struct{})
		go func() {
			defer doneFunc()
			defer close(ch)
			for i := 0; i < max; i++ {
				select {
				case ch <- struct{}{}:
				case <-done:
					return
				}
				if used != nil {
					atomic.AddInt32(used, 1)
				}
			}
		}()
		return ch
	}
}

func (fp *fakePoller) GetWaitFunc() WaitFunc {
	fp.wg.Add(1)
	return fakeTicker(fp.max, &fp.used, fp.wg.Done)
}

func TestPoll(t *testing.T) {
	invocations := 0
	f := ConditionFunc(func() (bool, error) {
		invocations++
		return true, nil
	})
	fp := fakePoller{max: 1}
	if err := pollInternal(fp.GetWaitFunc(), f); err != nil {
		t.Fatalf("unexpected error %v", err)
	}
	fp.wg.Wait()
	if invocations != 1 {
		t.Errorf("Expected exactly one invocation, got %d", invocations)
	}
	used := atomic.LoadInt32(&fp.used)
	if used != 1 {
		t.Errorf("Expected exactly one tick, got %d", used)
	}
}

func TestPollError(t *testing.T) {
	expectedError := errors.New("Expected error")
	f := ConditionFunc(func() (bool, error) {
		return false, expectedError
	})
	fp := fakePoller{max: 1}
	if err := pollInternal(fp.GetWaitFunc(), f); err == nil || err != expectedError {
		t.Fatalf("Expected error %v, got none %v", expectedError, err)
	}
	fp.wg.Wait()
	used := atomic.LoadInt32(&fp.used)
	if used != 1 {
		t.Errorf("Expected exactly one tick, got %d", used)
	}
}

func TestPollImmediate(t *testing.T) {
	invocations := 0
	f := ConditionFunc(func() (bool, error) {
		invocations++
		return true, nil
	})
	fp := fakePoller{max: 0}
	if err := pollImmediateInternal(fp.GetWaitFunc(), f); err != nil {
		t.Fatalf("unexpected error %v", err)
	}
	// We don't need to wait for fp.wg, as pollImmediate shouldn't call WaitFunc at all.
	if invocations != 1 {
		t.Errorf("Expected exactly one invocation, got %d", invocations)
	}
	used := atomic.LoadInt32(&fp.used)
	if used != 0 {
		t.Errorf("Expected exactly zero ticks, got %d", used)
	}
}

func TestPollImmediateError(t *testing.T) {
	expectedError := errors.New("Expected error")
	f := ConditionFunc(func() (bool, error) {
		return false, expectedError
	})
	fp := fakePoller{max: 0}
	if err := pollImmediateInternal(fp.GetWaitFunc(), f); err == nil || err != expectedError {
		t.Fatalf("Expected error %v, got none %v", expectedError, err)
	}
	// We don't need to wait for fp.wg, as pollImmediate shouldn't call WaitFunc at all.
	used := atomic.LoadInt32(&fp.used)
	if used != 0 {
		t.Errorf("Expected exactly zero ticks, got %d", used)
	}
}

func TestPollForever(t *testing.T) {
	ch := make(chan struct{})
	done := make(chan struct{}, 1)
	complete := make(chan struct{})
	go func() {
		f := ConditionFunc(func() (bool, error) {
			ch <- struct{}{}
			select {
			case <-done:
				return true, nil
			default:
			}
			return false, nil
		})

		if err := PollInfinite(time.Microsecond, f); err != nil {
			t.Fatalf("unexpected error %v", err)
		}

		close(ch)
		complete <- struct{}{}
	}()

	// ensure the condition is opened
	<-ch

	// ensure channel sends events
	for i := 0; i < 10; i++ {
		select {
		case _, open := <-ch:
			if !open {
				t.Fatalf("did not expect channel to be closed")
			}
		case <-time.After(ForeverTestTimeout):
			t.Fatalf("channel did not return at least once within the poll interval")
		}
	}

	// at most one poll notification should be sent once we return from the condition
	done <- struct{}{}
	go func() {
		for i := 0; i < 2; i++ {
			_, open := <-ch
			if !open {
				return
			}
		}
		t.Fatalf("expected closed channel after two iterations")
	}()
	<-complete
}

func TestWaitFor(t *testing.T) {
	var invocations int
	testCases := map[string]struct {
		F       ConditionFunc
		Ticks   int
		Invoked int
		Err     bool
	}{
		"invoked once": {
			ConditionFunc(func() (bool, error) {
				invocations++
				return true, nil
			}),
			2,
			1,
			false,
		},
		"invoked and returns a timeout": {
			ConditionFunc(func() (bool, error) {
				invocations++
				return false, nil
			}),
			2,
			3, // the contract of WaitFor() says the func is called once more at the end of the wait
			true,
		},
		"returns immediately on error": {
			ConditionFunc(func() (bool, error) {
				invocations++
				return false, errors.New("test")
			}),
			2,
			1,
			true,
		},
	}
	for k, c := range testCases {
		invocations = 0
		ticker := fakeTicker(c.Ticks, nil, func() {})
		err := func() error {
			done := make(chan struct{})
			defer close(done)
			return WaitFor(ticker, c.F, done)
		}()
		switch {
		case c.Err && err == nil:
			t.Errorf("%s: Expected error, got nil", k)
			continue
		case !c.Err && err != nil:
			t.Errorf("%s: Expected no error, got: %#v", k, err)
			continue
		}
		if invocations != c.Invoked {
			t.Errorf("%s: Expected %d invocations, got %d", k, c.Invoked, invocations)
		}
	}
}

func TestWaitForWithDelay(t *testing.T) {
	done := make(chan struct{})
	defer close(done)
	WaitFor(poller(time.Millisecond, ForeverTestTimeout), func() (bool, error) {
		time.Sleep(10 * time.Millisecond)
		return true, nil
	}, done)
	// If polling goroutine doesn't see the done signal it will leak timers.
	select {
	case done <- struct{}{}:
	case <-time.After(ForeverTestTimeout):
		t.Errorf("expected an ack of the done signal.")
	}
}

func TestPollUntil(t *testing.T) {
	stopCh := make(chan struct{})
	called := make(chan bool)
	pollDone := make(chan struct{})

	go func() {
		PollUntil(time.Microsecond, ConditionFunc(func() (bool, error) {
			called <- true
			return false, nil
		}), stopCh)

		close(pollDone)
	}()

	// make sure we're called once
	<-called
	// this should trigger a "done"
	close(stopCh)

	go func() {
		// release the condition func  if needed
		for {
			<-called
		}
	}()

	// make sure we finished the poll
	<-pollDone
}


text:
<Type Name="QueryFilterView<T>" FullName="Banshee.Collection.Gui.QueryFilterView<T>">
  <TypeSignature Language="C#" Value="public class QueryFilterView<T> : Banshee.Collection.Gui.TrackFilterListView<Banshee.Collection.Database.QueryFilterInfo<string>>" />
  <TypeSignature Language="ILAsm" Value=".class public auto ansi beforefieldinit QueryFilterView`1<T> extends Banshee.Collection.Gui.TrackFilterListView`1<class Banshee.Collection.Database.QueryFilterInfo`1<string>>" />
  <AssemblyInfo>
    <AssemblyName>Banshee.ThickClient</AssemblyName>
    <AssemblyVersion>1.3.1.0</AssemblyVersion>
    <AssemblyVersion>1.4.0.0</AssemblyVersion>
    <AssemblyVersion>2.4.0.0</AssemblyVersion>
  </AssemblyInfo>
  <TypeParameters>
    <TypeParameter Name="T" />
  </TypeParameters>
  <Base>
    <BaseTypeName>Banshee.Collection.Gui.TrackFilterListView<Banshee.Collection.Database.QueryFilterInfo<System.String>></BaseTypeName>
    <BaseTypeArguments>
      <BaseTypeArgument TypeParamName="T">Banshee.Collection.Database.QueryFilterInfo<System.String></BaseTypeArgument>
    </BaseTypeArguments>
  </Base>
  <Interfaces />
  <Docs>
    <typeparam name="T">To be added.</typeparam>
    To be added.
    <remarks>To be added.</remarks>
  </Docs>
  <Members>
    <Member MemberName=".ctor">
      <MemberSignature Language="C#" Value="public QueryFilterView (Hyena.Data.Gui.Column column);" />
      <MemberSignature Language="ILAsm" Value=".method public hidebysig specialname rtspecialname instance void .ctor(class Hyena.Data.Gui.Column column) cil managed" />
      <MemberType>Constructor</MemberType>
      <AssemblyInfo>
        <AssemblyVersion>1.3.1.0</AssemblyVersion>
        <AssemblyVersion>1.4.0.0</AssemblyVersion>
        <AssemblyVersion>2.4.0.0</AssemblyVersion>
      </AssemblyInfo>
      <Parameters>
        <Parameter Name="column" Type="Hyena.Data.Gui.Column" />
      </Parameters>
      <Docs>
        <param name="column">To be added.</param>
        To be added.
        <remarks>To be added.</remarks>
      </Docs>
    </Member>
    <Member MemberName=".ctor">
      <MemberSignature Language="C#" Value="public QueryFilterView (string blank);" />
      <MemberSignature Language="ILAsm" Value=".method public hidebysig specialname rtspecialname instance void .ctor(string blank) cil managed" />
      <MemberType>Constructor</MemberType>
      <AssemblyInfo>
        <AssemblyVersion>1.3.1.0</AssemblyVersion>
        <AssemblyVersion>1.4.0.0</AssemblyVersion>
        <AssemblyVersion>2.4.0.0</AssemblyVersion>
      </AssemblyInfo>
      <Parameters>
        <Parameter Name="blank" Type="System.String" />
      </Parameters>
      <Docs>
        <param name="blank">To be added.</param>
        To be added.
        <remarks>To be added.</remarks>
      </Docs>
    </Member>
  </Members>
</Type>


text:
class HandlerBase;

class EventBase
{
public:
    virtual void proxy(HandlerBase *obj) = 0;

    // TODO: Why do I need a virtual destructor here but not for TestData class?
    // Without it, program crashes when destructor of unique_ptr is called.
    // TestData is a struct used by the unit test of for this module.
    // ...
    // This is because I'm using unique_ptr<EventBase> instead of unique_ptr<TestData>
    // Base *ptr = new Derived;
    // delete ptr; // This is undefined if Base does NOT have a virtual destructor
    // If I was doing
    // TestData *event_ptr = SomeEvent;
    // delete event_ptr; // For this TestData needs a virtual destructor
    virtual ~EventBase() = default;
};

template <class T>
class Event : public virtual EventBase
    // TODO: Why do I need virtual inheritance here?
    // This is because Event<T> and Event<U> are separate classes that both inherit EventBase
    // So this is where the fork happens in the diamond inheritance problem
{
public:
    void proxy(HandlerBase *obj)
    {
        obj->handle_specific(static_cast<T*>(this));
    }
};

// The compiler will generate an error message when inheriting multiple events
// error C2250: 'CLASS_NAME': ambiguous inheritance of 'void EventBase::process(void)'
// See also: handler_base.h
#define EVENT_INHERITENCE_FIX(CLASS_NAME) void proxy(HandlerBase *obj) { Event<CLASS_NAME>::proxy(obj); }


text:
layout: page
title: Freeman - Whitaker Wedding
date: 2016-05-24
author: Andrea Carey
tags: weekly links, java
status: published
summary: Vivamus risus lacus, efficitur ut maximus sit amet.
banner: images/banner/leisure-02.jpg
booking:
  startDate: 11/23/2017
  endDate: 11/24/2017
  ctyhocn: HYNCCHX
  groupCode: FWW
published: true
---
Pellentesque bibendum nulla blandit quam facilisis facilisis. Donec lacus quam, vulputate nec aliquet in, vehicula eu ante. Aenean vulputate nibh nec neque pellentesque aliquet. Phasellus scelerisque dolor sit amet condimentum bibendum. Donec malesuada pretium nibh. Cras sed arcu tortor. Proin aliquet gravida tellus, ac fringilla libero feugiat nec. Etiam et ligula metus. Curabitur in velit eu augue ultrices molestie a ut elit. Morbi elit mi, sodales non odio sit amet, consectetur porttitor ipsum. Integer vitae est tellus. Vivamus a orci urna. Donec porttitor quam sed posuere placerat. Nulla imperdiet dui sagittis est facilisis, quis consequat velit commodo. Aliquam nisi magna, convallis at justo a, aliquam fringilla orci.
Pellentesque eget metus ac tortor tempus vulputate. Vivamus at eros eget nulla eleifend pharetra in eu lorem. Suspendisse facilisis sodales convallis. In bibendum, lorem ac sollicitudin vehicula, nibh risus sollicitudin nibh, at pulvinar lectus ex a ipsum. Sed finibus, velit vitae posuere malesuada, metus ante posuere magna, sed rutrum enim arcu at diam. Quisque commodo hendrerit tortor, vel vehicula mi imperdiet id. In et orci eget dolor pharetra elementum.

* Suspendisse ut ipsum dignissim, consectetur quam pharetra, accumsan dui
* Sed in nunc lobortis, condimentum libero in, porta leo
* Sed ut ipsum semper, dictum sapien non, lacinia eros
* Integer vitae massa iaculis, accumsan lorem in, volutpat leo
* Donec semper ante id finibus mollis.

Nullam varius enim eros, a fermentum urna congue sed. Mauris egestas lectus vel turpis mattis, vitae faucibus diam fermentum. Nunc efficitur eget justo eu luctus. Nullam varius ut leo ut rhoncus. Maecenas vehicula egestas magna, et gravida lacus. Duis sit amet viverra sem. Maecenas congue sed eros ac imperdiet. Nulla pretium ipsum vel mauris lobortis tristique. Fusce malesuada accumsan arcu. Praesent nec mollis lorem. Proin porta semper urna nec luctus. Donec et viverra enim.
Sed non euismod arcu, eu interdum est. In vel egestas lacus. Nunc placerat fermentum dolor vitae porttitor. Sed dignissim fermentum est. Sed et facilisis urna, quis ornare sapien. In nec lacus luctus, consequat dui et, tincidunt risus. Nulla tempor nunc in sapien vestibulum dapibus.


text:
Rails.application.configure do
  # Settings specified here will take precedence over those in config/application.rb

  # The test environment is used exclusively to run your application's
  # test suite.  You never need to work with it otherwise.  Remember that
  # your test database is "scratch space" for the test suite and is wiped
  # and recreated between test runs.  Don't rely on the data there!
  config.cache_classes = true

  # Do not eager load code on boot. This avoids loading your whole application
  # just for the purpose of running a single test. If you are using a tool that
  # preloads Rails for running tests, you may have to set it to true.
  config.eager_load = false

  config.active_record.migration_error = :page_load

  # Configure static asset server for tests with Cache-Control for performance
  config.serve_static_files = true
  config.static_cache_control = 'public, max-age=3600'

  # Show full error reports and disable caching
  config.consider_all_requests_local       = true
  config.action_controller.perform_caching = false

  # Raise exceptions instead of rendering exception templates
  config.action_dispatch.show_exceptions = false

  # Disable request forgery protection in test environment
  config.action_controller.allow_forgery_protection    = false

  # Tell Action Mailer not to deliver emails to the real world.
  # The :test delivery method accumulates sent emails in the
  # ActionMailer::Base.deliveries array.
  config.action_mailer.delivery_method = :test

  # Use SQL instead of Active Record's schema dumper when creating the test database.
  # This is necessary if your schema can't be completely dumped by the schema dumper,
  # like if you have constraints or database-specific column types
  # config.active_record.schema_format = :sql

  # Print deprecation notices to the stderr
  config.active_support.deprecation = :stderr

  # Randomize the order test cases are executed
  config.active_support.test_order = :random

  # Allow pass debug_assets=true as a query parameter to load pages with unpackaged assets
  config.assets.allow_debugging = true

  # Raise error for missing translations
  config.action_view.raise_on_missing_translations = true

  config.assets.compile = true
  config.assets.initialize_on_precompile = true
end


text:
export default {
  computed: {
    marginalsScope () {
      return {
        pagination: this.computedPagination,
        pagesNumber: this.pagesNumber,
        isFirstPage: this.isFirstPage,
        isLastPage: this.isLastPage,
        firstPage: this.firstPage,
        prevPage: this.prevPage,
        nextPage: this.nextPage,
        lastPage: this.lastPage,

        inFullscreen: this.inFullscreen,
        toggleFullscreen: this.toggleFullscreen
      }
    }
  },

  methods: {
    __getTopDiv (h) {
      const
        top = this.$scopedSlots.top,
        topLeft = this.$scopedSlots['top-left'],
        topRight = this.$scopedSlots['top-right'],
        topSelection = this.$scopedSlots['top-selection'],
        hasSelection = this.hasSelectionMode === true &&
          topSelection !== void 0 &&
          this.rowsSelectedNumber > 0,
        staticClass = 'q-table__top relative-position row items-center'

      if (top !== void 0) {
        return h('div', { staticClass }, [ top(this.marginalsScope) ])
      }

      let child

      if (hasSelection === true) {
        child = topSelection(this.marginalsScope).slice()
      }
      else {
        child = []

        if (topLeft !== void 0) {
          child.push(
            h('div', { staticClass: 'q-table-control' }, [
              topLeft(this.marginalsScope)
            ])
          )
        }
        else if (this.title) {
          child.push(
            h('div', { staticClass: 'q-table__control' }, [
              h('div', { staticClass: 'q-table__title', class: this.titleClass }, this.title)
            ])
          )
        }
      }

      if (topRight !== void 0) {
        child.push(h('div', { staticClass: 'q-table__separator col' }))
        child.push(
          h('div', { staticClass: 'q-table__control' }, [
            topRight(this.marginalsScope)
          ])
        )
      }

      if (child.length === 0) {
        return
      }

      return h('div', { staticClass }, child)
    }
  }
}