text:
<!DOCTYPE html>

    <meta charset="utf-8" />
    <title>Search — peddy 0.4.3 documentation</title>
    <link rel="stylesheet" href="_static/haiku.css" type="text/css" />
    <link rel="stylesheet" href="_static/pygments.css" type="text/css" />

    <link rel="index" title="Index" href="genindex.html" />
    <link rel="search" title="Search" href="#" />

          peddy 0.4.3 documentation

Search

        Contents

Search

    Please activate JavaScript to enable the search
    functionality.

    From here you can search these documents. Enter your search
    words into the box below and click "search". Note that the search
    function will automatically search for all of the words. Pages
    containing fewer words won't appear in the result list.

  <form action="" method="get">
    <input type="text" name="q" value="" />
    <input type="submit" value="search" />

  </form>

        Contents

        © Copyright 2016, Brent S Pedersen.
      Created using Sphinx 2.1.2.

redpajama_set_name: RedPajamaGithub


text:
module PhilosophyHelper
end


text:
DOCUMENTATION = '''
---
module: raw
version_added: historical
short_description: Executes a low-down and dirty SSH command
options:
  free_form:
    description:
      - the raw module takes a free form command to run
    required: true
  executable:
    description:
      - change the shell used to execute the command. Should be an absolute path to the executable.
    required: false
    version_added: "1.0"
description:
     - Executes a low-down and dirty SSH command, not going through the module
       subsystem. This is useful and should only be done in two cases. The
       first case is installing C(python-simplejson) on older (Python 2.4 and
       before) hosts that need it as a dependency to run modules, since nearly
       all core modules require it. Another is speaking to any devices such as
       routers that do not have any Python installed. In any other case, using
       the M(shell) or M(command) module is much more appropriate. Arguments
       given to M(raw) are run directly through the configured remote shell.
       Standard output, error output and return code are returned when
       available. There is no change handler support for this module.
     - This module does not require python on the remote system, much like
       the M(script) module.
notes:
   -  If you want to execute a command securely and predictably, it may be
      better to use the M(command) module instead. Best practices when writing
      playbooks will follow the trend of using M(command) unless M(shell) is
      explicitly required. When running ad-hoc commands, use your best
      judgement.
author: Michael DeHaan
'''

EXAMPLES = '''
# Bootstrap a legacy python 2.4 host
- raw: yum -y install python-simplejson
'''


text:
package simpleDB.example;

import java.io.UnsupportedEncodingException;
import java.util.ArrayList;
import simpleDB.SimpleDBObject;
import simpleDB.SimpleDatabase;
import simpleDB.SimpleDatabase.CompletionCallback;
import simpleDB.SimpleDatabase.RetrievalCallback;

/**
 *
 * @author Davis
 *
 */

public class Example {

    /**
     * More compilable examples coming soon...
     * See README for examples and documentation of everything
     */

    private static SimpleDatabase myDatabase;

    public static void main (String args[]) {
        myDatabase = new SimpleDatabase();
        myDatabase.initializeDB("example_app", "example_app_secret", new CompletionCallback(){
            public void done (String error) {
                if (error == null){
                    //database was initialized successfully
                    saveData();
                }
            }
        });
    }

    public static void saveData(){
        myDatabase.saveAppData("data_to_save".getBytes(), "data_identifier");
        fetchData();
    }

    public static void fetchData(){
        myDatabase.getDataForAppWithIdentifier("data_identifier", new RetrievalCallback(){
            public void done (ArrayList<SimpleDBObject> response) {
                System.out.println("Retrieved data is " + convertDataToString(response.get(0).getData()));
            }
        });
    }

    public static String convertDataToString(byte[] data){
        try {
            return new String(data, "UTF-8");
        }
        catch (UnsupportedEncodingException e) {
            // TODO Auto-generated catch block
            e.printStackTrace();
            return null;
        }
    }
}


text:
//------------------------------------------------------------------------------
// <auto-generated>
//     This code was generated by a tool.
//     Runtime Version:2.0.50727.3623
//
//     Changes to this file may cause incorrect behavior and will be lost if
//     the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------

namespace dotnet_widget {

    public partial class _Default {

        /// <summary>
        /// form1 control.
        /// </summary>
        /// <remarks>
        /// Auto-generated field.
        /// To modify move field declaration from designer file to code-behind file.
        /// </remarks>
        protected global::System.Web.UI.HtmlControls.HtmlForm form1;

        /// <summary>
        /// ScriptManager1 control.
        /// </summary>
        /// <remarks>
        /// Auto-generated field.
        /// To modify move field declaration from designer file to code-behind file.
        /// </remarks>
        protected global::System.Web.UI.ScriptManager ScriptManager1;

        /// <summary>
        /// UpdatePanel1 control.
        /// </summary>
        /// <remarks>
        /// Auto-generated field.
        /// To modify move field declaration from designer file to code-behind file.
        /// </remarks>
        protected global::System.Web.UI.UpdatePanel UpdatePanel1;

        /// <summary>
        /// channelNameTextBox control.
        /// </summary>
        /// <remarks>
        /// Auto-generated field.
        /// To modify move field declaration from designer file to code-behind file.
        /// </remarks>
        protected global::System.Web.UI.WebControls.TextBox channelNameTextBox;

        /// <summary>
        /// addChannelButton control.
        /// </summary>
        /// <remarks>
        /// Auto-generated field.
        /// To modify move field declaration from designer file to code-behind file.
        /// </remarks>
        protected global::System.Web.UI.WebControls.Button addChannelButton;

        /// <summary>
        /// subscribedChannelLabel control.
        /// </summary>
        /// <remarks>
        /// Auto-generated field.
        /// To modify move field declaration from designer file to code-behind file.
        /// </remarks>
        protected global::System.Web.UI.WebControls.Label subscribedChannelLabel;

        /// <summary>
        /// updateTimer control.
        /// </summary>
        /// <remarks>
        /// Auto-generated field.
        /// To modify move field declaration from designer file to code-behind file.
        /// </remarks>
        protected global::System.Web.UI.Timer updateTimer;

        /// <summary>
        /// numberMessagesLabel control.
        /// </summary>
        /// <remarks>
        /// Auto-generated field.
        /// To modify move field declaration from designer file to code-behind file.
        /// </remarks>
        protected global::System.Web.UI.WebControls.Label numberMessagesLabel;

        /// <summary>
        /// searchTextBox control.
        /// </summary>
        /// <remarks>
        /// Auto-generated field.
        /// To modify move field declaration from designer file to code-behind file.
        /// </remarks>
        protected global::System.Web.UI.WebControls.TextBox searchTextBox;

        /// <summary>
        /// searchButton control.
        /// </summary>
        /// <remarks>
        /// Auto-generated field.
        /// To modify move field declaration from designer file to code-behind file.
        /// </remarks>
        protected global::System.Web.UI.WebControls.Button searchButton;

        /// <summary>
        /// GridView2 control.
        /// </summary>
        /// <remarks>
        /// Auto-generated field.
        /// To modify move field declaration from designer file to code-behind file.
        /// </remarks>
        protected global::System.Web.UI.WebControls.GridView GridView2;
    }
}


text:
{% extends 'base.html' %}
{% load i18n %}
{% block title %}{% trans "Edit IPSec Site Connection" %}{% endblock %}

{% block page_header %}
  {% include "horizon/common/_page_header.html" with title=_("Edit IPSec Site Connection") %}
{% endblock page_header %}

{% block main %}
  {% include 'project/vpn/_update_ipsecsiteconnection.html' %}
{% endblock %}


text:
class AddPasswordResetTokenToUsers < ActiveRecord::Migration[4.2]
  def change
    add_column :users, :password_reset_token, :text
    add_index :users, :password_reset_token, length: 32

    add_column :users, :password_reset_expires_at, :datetime
  end
end


text:
layout: content-main
title: Säännöt
theme: swedish
course: rub13.3
---

## Poissaolot
Jos olet sairaana, tai muusta pätevästä syystä poissa OPA-päivänä, ilmoita siitä viimeistään samana aamuna opettajalle (Wilma, Snap, sähköposti). Ilman pätevää syytä tai ilmoitusta suorituksestasi annetaan 0 pistettä. Poissaolotunneilta tulee hoitaa tehdyksi sekä tunnin aikana tehdyt tehtävät, että kotitehtävät.

## Pidemmät poissaolot
Ennalta tiedossa olevat poissaolot (lomamatkat, leirit jne) tulee saatta opettajan tietoon kurssin alussa, jotta voidaan sopia tehtävistä ja aikataulusta.


text:
/**
 * The client to submit jobs to HDInsight.
 */
package org.apache.reef.runtime.hdinsight.client;


text:
{-|
Module      : Obgs.Utils.HashMap
Description : Utility functions for dealing with 'Maybe' values.
Copyright   : (c) obgs 2017
License     : MIT
Maintainer  : obgs@protonmail.com
-}
module Obgs.Utils.Maybe
    (
      -- * From/to 'Either' conversion
      leftToMaybe
    , rightToMaybe
    , maybeToLeft
    , maybeToLeft'
    , maybeToRight
    , maybeToRight'
    ) where

-- | Converts 'Left' values to 'Just', and 'Right' values to 'Nothing'.
leftToMaybe :: Either e a -> Maybe e
leftToMaybe = either Just (const Nothing)

-- | Converts 'Right' values to 'Just', and 'Left' values to 'Nothing'.
rightToMaybe :: Either e a -> Maybe a
rightToMaybe = either (const Nothing) Just

-- | Converts 'Just' values to 'Left', and 'Nothing' values to 'Right'
-- with the given default.
maybeToLeft :: a -> Maybe e -> Either e a
maybeToLeft x = maybe (Right x) Left

-- | Variant of 'maybeToLeft' where the default value is the empty tuple.
maybeToLeft' :: Maybe e -> Either e ()
maybeToLeft' = maybeToLeft ()

-- | Converts 'Just' values to 'Right', and 'Nothing' values to 'Left'
-- with the given default.
maybeToRight :: e -> Maybe a -> Either e a
maybeToRight e = maybe (Left e) Right

-- | Variant of 'maybeToRight' where the default value is the empty tuple.
maybeToRight' :: Maybe a -> Either () a
maybeToRight' = maybeToRight ()


text:
import {
  http,
  https
} from '../modules';

import { expect } from 'chai';
import { describe, it } from 'mocha';

const OK = (obj) => {
  return expect(obj).to.not.be.an('undefined');
};

describe('server.js Module Dependencies', () =>{

  it('imports http', () => OK(http));

  it('imports https', () => OK(https));

});


text:
<BroadcastMonitor>
  <updated>2015-08-04T08:57:22</updated>
  <stationName>Radio 6</stationName>
  <Current>
    <startTime>2015-08-04T08:54:00</startTime>
    <itemId>1000080518:0</itemId>
    <titleId>216053075</titleId>
    <itemCode>NN262</itemCode>
    <itemReference></itemReference>
    <titleName>Get Down On It</titleName>
    <artistName>Kool & The Gang</artistName>
    <albumName></albumName>
    <CategoryCode>736</CategoryCode>
    <CategoryName>SOUL</CategoryName>
    <itemDuration>214</itemDuration>
    <MultiMedia1></MultiMedia1>
    <MultiMedia2></MultiMedia2>
    <MultiMedia3></MultiMedia3>
    <MultiMedia4></MultiMedia4>
  </Current>
  <Next>
    <startTime>2015-08-04T08:57:22</startTime>
    <itemId>1000080518:0</itemId>
    <titleId>216138768</titleId>
    <itemCode></itemCode>
    <itemReference></itemReference>
    <titleName>*** 20150804 CLASSICS</titleName>
    <artistName>RUDY</artistName>
    <albumName></albumName>
    <CategoryCode>655</CategoryCode>
    <CategoryName>Uitzending</CategoryName>
    <itemDuration>24</itemDuration>
    <MultiMedia1></MultiMedia1>
    <MultiMedia2></MultiMedia2>
    <MultiMedia3></MultiMedia3>
    <MultiMedia4></MultiMedia4>
  </Next>
</BroadcastMonitor>


text:
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>DEAD-box RNA Helicases: metabolism | My bits</title>
    <link>http://lpantano.github.io/tag/dead-box-rna-helicases-metabolism/</link>
      <atom:link href="http://lpantano.github.io/tag/dead-box-rna-helicases-metabolism/index.xml" rel="self" type="application/rss+xml" />
    <description>DEAD-box RNA Helicases: metabolism</description>
    <generator>Wowchemy (https://wowchemy.com)</generator><language>en-us</language><lastBuildDate>Tue, 01 Jan 2013 00:00:00 +0000</lastBuildDate>
    <image>
      <url>http://lpantano.github.io/images/icon_hu0b7a4cb9992c9ac0e91bd28ffd38dd00_9727_512x512_fill_lanczos_center_3.png</url>
      <title>DEAD-box RNA Helicases: metabolism</title>
      <link>http://lpantano.github.io/tag/dead-box-rna-helicases-metabolism/</link>
    </image>

    <item>
      <title>A highly expressed miR-101 isomiR is a functional silencing small RNA.</title>
      <link>http://lpantano.github.io/publication/llorens-2013/</link>
      <pubDate>Tue, 01 Jan 2013 00:00:00 +0000</pubDate>
      <guid>http://lpantano.github.io/publication/llorens-2013/</guid>
      <description></description>
    </item>

  </channel>
</rss>


text:
<?php

namespace Adrotec\BreezeJs\Doctrine\ORM;

use Doctrine\ORM\QueryBuilder;
use Adrotec\BreezeJs\OdataParameters;
use Adrotec\BreezeJs\ResourceType;
use ODataProducer\UriProcessor\QueryProcessor\ExpressionParser\ExpressionParser2;
use Adrotec\BreezeJs\CallbackExpressionProvider;
use Adrotec\BreezeJs\Doctrine\ORM\QueryProcessor\DoctrineExpression;
use Doctrine\ORM\Mapping\ClassMetadata;

class OdataQueryException extends \Exception {

}

class OdataQueryBuilderWrapper {

    const PROPERTY_DATA = 'DataProperty';
    const PROPERTY_NAVIGATION = 'NavigationProperty';
    const PROPERTY_NONE = 'None';

    private $queryBuilder;
    private $selects = array();
    private $expandSelects = array();
    private $joins = array();

    public function __construct(QueryBuilder &$queryBuilder) {
        $this->setQueryBuilder($queryBuilder);
    }

    public function getQueryBuilder() {
        return $this->queryBuilder;
    }

    public function setQueryBuilder(QueryBuilder &$queryBuilder) {
        $this->queryBuilder = $queryBuilder;
        $this->selects = array();
        $this->expandSelects = array();
        $this->joins = array();
        return $this;
    }

    public function getRootEntity() {
        $rootEntities = $this->queryBuilder->getRootEntities();
        return $rootEntities[0];
    }

    public function getRootAlias() {
        $rootAliases = $this->queryBuilder->getRootAliases();
        return $rootAliases[0];
    }

    public function getEntityManager() {
        return $this->queryBuilder->getEntityManager();
    }

    public function getClassMetadata() {
        return $this->getEntityManager()->getClassMetadata($this->getRootEntity());
    }

    private function getResourceType() {
//        $entity = $this->getRootEntity();
        $meta = $this->getClassMetadata();
        return ResourceType::getResourceType($this->getEntityManager(), $meta);
    }

    // Temporary workaround for virtual foreign keys to work
    private function parseSystemQueryValue($value) {
        $value = $this->replaceForeignKeyFields($value);
        return $value;
    }

    private function replaceForeignKeyFields($value){
        $value = preg_replace('/(.+?)Id([^A-Za-z0-9])/', '$1/id$2', $value);
        $value = preg_replace('/(.+?)Id$/', '$1/id$2', $value);
        return $value;
    }

    private function invalid($message) {
        throw new OdataQueryException($message);
    }

    public function getPropertyType($properyName, ClassMetadata $meta = null) {
        if ($meta === null) {
            $meta = $this->getClassMetadata();
        }
        if (strpos($properyName, '/')) {
            $associations = explode('/', $properyName);
            foreach ($associations as $properyName) {
                $type = $this->getPropertyType($properyName, $meta);
                if ($type == self::PROPERTY_NAVIGATION) {
                    $meta = $this->getEntityManager()->getClassMetadata(
                            $meta->associationMappings[$properyName]['targetEntity']);
                } else if ($type == self::PROPERTY_DATA) {
                    return self::PROPERTY_DATA;
                } else {
                    return false;
                }
            }
            return self::PROPERTY_NAVIGATION;
        }
        if (isset($meta->associationMappings[$properyName])) {
            return self::PROPERTY_NAVIGATION;
        }
        if (isset($meta->fieldMappings[$properyName])) {
            return self::PROPERTY_DATA;
        }
        return false;
    }

    public function addTop($top) {
        if (!is_numeric($top)) {
            return $this->invalid('Invalid $top value "' . $top . '"');
        }
        $this->queryBuilder->setMaxResults(intval($top));
        return $this;
    }

    public function addSkip($skip) {
        if (!is_numeric($skip)) {
            return $this->invalid('Invalid $skip value "' . $skip . '"');
        }
        $this->queryBuilder->setFirstResult(intval($skip));
        return $this;
    }

    public function addFilter($filter) {
        $filter = $this->parseSystemQueryValue($filter);
        $resourceType = $this->getResourceType();

        $internalFilterInfo = ExpressionParser2::parseExpression2(
                        $filter, $resourceType
                        , new CallbackExpressionProvider('$ex->'));

        $ex = new DoctrineExpression();
        $ex->setQueryBuilder($this->queryBuilder);
        $rootAlias = $this->getRootAlias();
        $ex->setAlias($rootAlias);
        $exprStr = $internalFilterInfo->getExpressionAsString() . ';';

//        $exprStr = $this->replaceForeignKeyFields($exprStr);

        $exprStr = str_replace(array("'\'"), array("'\\\'"), $exprStr);

        $expression = eval('return ' . $exprStr . ';');

        if ($expression === false) {
            return $this->invalid('Invalid filter expression "' . $filter . '"');
        }

        $this->queryBuilder->andWhere($expression);

        foreach ($ex->getParameters() as $key => $value) {
            $this->queryBuilder->setParameter($key, $value);
        }

//        return $this;

        $associations = $ex->getAssociations();
        if (!empty($associations)) {
            foreach ($associations as $association) {
//                        exit($association);
                if (!$this->getPropertyType($association)) {
                    return $this->invalid('invalid navigation property "' . $association . '"');
                }

                $this->joinAssociationsLoop($this->queryBuilder, $association, false);
            }
        }

        return $this;
    }

    public function addOrderBy($orderby) {

        $orderby = $this->parseSystemQueryValue($orderby);

        $expr = explode(',', $orderby);

        $orderBy = array();

        foreach ($expr as $str) {
            $exploded = explode(' ', trim($str));
            $column = $exploded[0];
            $propertyType = $this->getPropertyType($column);
            if (!$propertyType) {
                $this->invalid('Invalid orderby expression "' . $orderby . '"');
            }
            if (strpos($column, '/')) {
                $exploded2 = explode('/', $column);
                $columnName = array_pop($exploded2);
                $columnPrefix = implode('/', $exploded2);
                $alias = $this->joinAssociationsLoop($this->queryBuilder, $columnPrefix, false);
            } else {
                $columnName = $column;
                $alias = $this->getRootAlias();
            }

            $orderByColumn = ($alias . '.') . $columnName;
            $order = null;
            if (isset($exploded[1])) {
                $order = strtolower($exploded[1]);
                if (!in_array($order, array('asc', 'desc'))) {
                    $this->invalid('sort order should be either ASC or DESC');
                }
            }
            $orderBy[] = $orderByColumn . ($order == 'desc' ? ' desc' : '');
        }
        if (!empty($orderBy)) {
            $this->queryBuilder->add('orderBy', implode(',', $orderBy));
//							$q->orderBy(implode(',', $orderBy));
        }
        return $this;
    }

    public function addSelect($select) {

        if (!empty($this->expandSelects)) {
            return $this->invalid('Using both $expand and $select is not supported. Either one could be used');
        }
        // $select=id,firstName,lastName,age
        $expr = explode(',', $select);
        foreach ($expr as $column) {
            $propertyType = $this->getPropertyType($column);
            if (!$propertyType) {
                $this->invalid('Invalid select expression "' . $select . '"');
            }
            $column = trim($column);
            if (strpos($column, '/')) {
                $exploded2 = explode('/', $column);
                $columnName = array_pop($exploded2);
                $columnPrefix = implode('/', $exploded2);
                $alias = $this->joinAssociationsLoop($this->queryBuilder, $columnPrefix, false);
            } else {
                $columnName = $column;
                $alias = $this->getRootAlias();
            }
//			$this->queryBuilder->leftJoin($this->alias.'.'.$columnName, $this->alias.'_'.$association);
            $select = $alias . '.' . $columnName;
//            $this->queryBuilder->add('select', $select, true);
            $this->selects[] = $select;
        }
        $this->applyProjection();

        return $this;
    }

    public function addExpand($expand) {

        if (!empty($this->selects)) {
//            return $this->invalid('Using both $expand and $select is not supported. Either one could be used');
        }
//				$this->queryBuilder->leftJoin($this->alias.'.job ', $this->alias.'3');
//		$this->queryBuilder->select($this->alias.','.$this->alias.'3');
        $expr = explode(',', $expand);
        $expands = array();
//		echo '<pre>';
//		print_r($this->classInfo->doctrineMetadata->associationMappings);
//exit;
        foreach ($expr as $association) {
            $association = trim($association);
//            if($association == 'courseFee'){
//                continue;
//            }
            $propertyType = $this->getPropertyType($association);
            if ($propertyType != self::PROPERTY_NAVIGATION) {
                return $this->invalid('invalid expand expression "' . $expand . '"');
            }

            $alias = $this->joinAssociationsLoop($this->queryBuilder, $association, true);
//            $this->expandSelects[] = $alias;
        }

        if (!empty($expr)) {
            $this->expandSelects[] = $this->getRootAlias();
            $this->applyProjection();
        }
        return $this;
    }

    protected function applyProjection() {
        $selects = implode(',', array_unique(array_merge($this->selects, $this->expandSelects)));
        $this->queryBuilder->select($selects);
    }

    public function getInlineCount() {
        $qb = clone $this->queryBuilder;
        $qb->select('COUNT(' . $this->getRootAlias() . ')');
        $qb->setMaxResults(1);
        $qb->setFirstResult(0);
        $qb->add('join', array(), false);
        $query = $qb->getQuery();
        $count = $query->getSingleScalarResult();
        return $count;
    }

    public function applyOdataParameters(OdataParameters $params) {
        if (isset($params->filter)) {
            $this->addFilter($params->filter);
        }
        if (isset($params->expand)) {
            $this->addExpand($params->expand);
        }
        //
        if (isset($params->orderby)) {
            $this->addOrderBy($params->orderby);
        }
        if (isset($params->top)) {
            $this->addTop($params->top);
        }
        if (isset($params->skip)) {
            $this->addSkip($params->skip);
        }
        if (isset($params->select)) {
            $this->addSelect($params->select);
        }
        return $this;
    }

    protected function joinAssociations(QueryBuilder $queryBuilder, $join, $alias, $alsoSelect = true) {
        if (!isset($this->joins[$alias])) {
            $queryBuilder->leftJoin($join, $alias);
        }
        $this->joins[$alias] = true;
        if ($alsoSelect) {
            $this->selects[] = $alias;
        }
    }

    protected function joinAssociationsLoop(QueryBuilder $queryBuilder, $associations, $alsoSelect = false, $prefix = null) {
        $associations = explode('/', $associations);
        $previousAlias = $prefix === null ? $this->getRootAlias() : $prefix;
        foreach ($associations as $propertyName) {
//                $this->joinAssociations($propertyName, $previousAlias, true, $this->queryBuilder);
            $this->joinAssociations($queryBuilder, $previousAlias . '.' . $propertyName, $previousAlias . '_' . $propertyName, $alsoSelect);
            $previousAlias .= '_' . $propertyName;
        }
        return $previousAlias;
    }

}


text:
title: Elements
page_title: Elements | RadDataPager for ASP.NET AJAX Documentation
description: Elements
slug: datapager/elements-and-templates/elements
tags: elements
published: True
position: 0
---

# Elements

##

The RadDataPager control has a number of fields you can use for designing your own pager. It lets you choose the controls that will appear in the pager field to help users navigate through the pages. To specify the pager fields, list the desired field elements between the opening and closing <Fields> tag inside the RadDataPager control.

The RadDataPager built-in fields are: RadDataPagerButtonField, RadDataPagerPageSizeField, RadDataPagerSliderField, RadDataPagerGoToPageField and RadDataPagerTemplatePageField. You can use one or more pager field objects in a single RadDataPager control.

The following code and images show the different RadDataPager fields:

**RadDataPagerButtonField**

When RadDataPager contains a **RadDataPagerButtonField** you have the ability to add arrow buttons for navigation to Next/Previous/First/Last page, link buttons with page numbers or both. The **ID's** of the **buttons** in RadDataPager, when pager field is RadDataPagerButtonField, are listed bellow:

* First button: "FirstButton"

* Previous button: "PrevButton"

* Next button: "NextButton"

* Last button: "LastButton"

````ASPNET
<telerik:RadDataPager ID="RadDataPager1" PagedControlID="RadListView1" PageSize="2"
    runat="server">
    <Fields>
        <telerik:RadDataPagerButtonField FieldType="FirstPrev" FirstButtonText="First" PrevButtonText="Prev" />
        <telerik:RadDataPagerButtonField FieldType="Numeric" PageButtonCount="15" />
        <telerik:RadDataPagerButtonField FieldType="NextLast" NextButtonText="Next" LastButtonText="Last" />
    </Fields>
</telerik:RadDataPager>
````

![RadDataPagerButtonField](images/DataPager_PagerButtonField.png)

The RadDataPagerButtonField object exposes the following four properties that can be used to set a url to a custom image for the corresponding paging buttons when SEO paging is enabled for the data pager control:

* FirstButtonImageUrl

* PrevousButtonImageUrl

* NextButtonImageUrl

* LastButtonImageUrl

**RadDataPagerPageSizeField**

When **RadDataPager** contains a **RadDataPagerPageSizeField**, a drop down control for changing the current page size appears. **RadDataPager** exposes the **PageSizeControlType** property on the field which is an enum of type **PagerDropDownControlType**. It has three values available with **RadComboBox** being the default one:

* **None**

* **RadComboBox**

* **RadDropDownList**

As it name implies, the property specifies what type of page size drop down control will be rendered.The property provides an easy wayto switch off the page size combo or replace it with its light weight counterpart **RadDropDownList**.

You can use the **PageSizeText** property of the field to customize the page size text. Since Q3 2011 PageSizes property for the RadDataPagerPageSizeField is added. It allows to customize the page size values that appear in RadComboBox.

The **ID** of the RadComboBox, when pager field is RadDataPagerPageSizeField, is shown bellow:

* RadComboBox: "PageSizeComboBox"

````ASPNET
<telerik:RadDataPager ID="RadDataPager1" PagedControlID="RadListView1" runat="server">
    <Fields>
        <telerik:RadDataPagerPageSizeField PageSizeText="PageSize: " />
    </Fields>
</telerik:RadDataPager>
````

![RadDataPagerPageSizeField](images/DataPager_PageSizeField.png)

**RadDataPagerSliderField**

When RadDataPager contains a **RadDataPagerSliderField**, RadSlider control for changing pages is shown. This pager field renders a slider which can be used to navigate to the page on interest.

The **ID** of the RadSlider, when pager field is RadDataPagerSliderField, is shown bellow:

* RadSlider: "PageSlider"

````ASPNET
<telerik:RadDataPager ID="RadDataPager1" PagedControlID="RadListView1" runat="server">
    <Fields>
        <telerik:RadDataPagerSliderField SliderDecreaseText="Decrease" SliderDragText="Drag"
            SliderIncreaseText="Increase" SliderOrientation="Horizontal" />
    </Fields>
</telerik:RadDataPager>
````

![RadDataPagerSliderField](images/DataPager_SliderField.png)

**RadDataPagerGoToPageField**

When RadDataPager has **RadDataPagerGoToPageField**, RadNumericTextBox and a button for navigating to particular page number appear. RadNumericTextBox allows you to type the desired page number and jump to this page on button click.

The **ID's** of the RadNumericTextBox and the button in the RadDataPager control, when pager field is RadDataPagerGoToPageField, are listed bellow:

* RadNumericTextBox: "GoToPageTextBox"

* Button: "GoToPageButton"

````ASPNET
<telerik:RadDataPager ID="RadDataPager1" PagedControlID="RadListView1" PageSize="5"
    runat="server">
    <Fields>
        <telerik:RadDataPagerGoToPageField CurrentPageText="Page: " TotalPageText="of" SubmitButtonText="Go"
            TextBoxWidth="15" />
    </Fields>
</telerik:RadDataPager>
````

![RadDataPagerGoToPageField](images/DataPager_GoToPageField.png)

**RadDataPagerNumericPageSizeField**

When RadDataPager contains a **RadDataPagerNumericPageSizeField**, RadNumericTextBox and a button for that let the user enter a new page size appear.

The **ID's** of the RadNumericTextBox and the button in the RadDataPager control, when pager field is RadDataPagerNumericPageSizeField, are listed bellow:

* RadNumericTextBox: "PageSizeTextBox"

* Button: "PageSizeButton"

````ASPNET
<telerik:RadDataPager ID="RadDataPager1" runat="server" PagedControlID="RadListView1"
    PageSize="6">
    <Fields>
        <telerik:RadDataPagerNumericPageSizeField LabelText="PageSize:" SubmitButtonText="Change"
            TextBoxWidth="15" Visible="true" />
    </Fields>
</telerik:RadDataPager>
````

![RadDataPagerNumericPageSizeField](images/RadDataPager_PageSizeField.png)

**RadDataPagerTemplatePageField**

When RadDataPager has **RadDataPagerTemplatePageField** you can set the appearance and features of the pager field.

The RadDataPagerTemplatePageField adds a bit of customization to the paging interface. It uses code block to retrieve the total number of rows, the starting row number, and the overall page size to perform calculations. These calculations can be used to display "(items x to y of z)" text as well as the pager links and buttons.

The following example uses the RadDataPagerTemplatePageField to display the number of the first and last last record on the current page number and the total number of records. The RadDataPager control also contains Next/Previous/First/Last to display navigation controls that enable users to page through data.

````ASPNET
<telerik:RadDataPager ID="RadDataPager1" runat="server" PagedControlID="RadListView1">
    <Fields>
        <telerik:RadDataPagerButtonField FieldType="FirstPrev" />
        <telerik:RadDataPagerButtonField FieldType="NextLast" />
        <telerik:RadDataPagerTemplatePageField>
            <PagerTemplate>
                <div style="float: right">
                    <b>Displaying items
                        <asp:Label runat="server" ID="CurrentPageLabel" Text="<%# Container.Owner.StartRowIndex + 1 %>" />
                        to
                        <asp:Label runat="server" ID="TotalPagesLabel" Text="<%# Container.Owner.StartRowIndex + Container.Owner.PageSize %>" />
                        of
                        <asp:Label runat="server" ID="TotalItemsLabel" Text="<%# Container.Owner.TotalRowCount %>" />
                        <br />
                    </b>
                </div>
            </PagerTemplate>
        </telerik:RadDataPagerTemplatePageField>
    </Fields>
</telerik:RadDataPager>
````

![RadDataPagerTemplatePageField](images/DataPager_TemplateField.png)


text:
package org.codepond.wizardroid.layouts;

import android.content.res.XmlResourceParser;
import android.os.Bundle;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.RelativeLayout;

import com.softvelopment.wizardroid.activity.ActivityConstants;
import com.softvelopment.wizardroid.activity.helper.ActivityValidateResult;

import org.codepond.wizardroid.R;
import org.codepond.wizardroid.ValidatableWizard;
import org.codepond.wizardroid.WizardFlow;
import org.codepond.wizardroid.WizardStep;
import org.codepond.wizardroid.WizardStepValidatable;
import org.codepond.wizardroid.helper.WizardStepXmlBean;
import org.codepond.wizardroid.helper.WizardXmlBean;
import org.codepond.wizardroid.helper.impl.WizardStepXmlBeanImpl;
import org.codepond.wizardroid.helper.impl.WizardXmlBeanImpl;
import org.codepond.wizardroid.helper.util.WizardStepXmlBeanComparator;
import org.xmlpull.v1.XmlPullParser;
import org.xmlpull.v1.XmlPullParserException;
import org.xmlpull.v1.XmlPullParserFactory;

import java.io.IOException;
import java.io.InputStream;
import java.util.Collections;
import java.util.HashMap;
import java.util.Map;

/**
 * Created by softvelopment on 7/3/15.
 *
 *  This class builds on the BasicWizardLayout class with the following
 *  improvements
 *
 *  Child claases that inherit from this should not have to implement/override
 *  onSetup() but should just override 2 methods
 *
 *  getWizardName  The name of the wizard in the wizard xml file
 *  getWizardFileResourceId  The id of the wizard file resource
 *
 */
public abstract class SoftvelopmentWizardLayout extends BasicWizardLayout implements ValidatableWizard {

    private static final String TAG = SoftvelopmentWizardLayout.class.getSimpleName();

    public abstract String getWizardName();
    public abstract int getWizardFileResourceId();

    protected int width=0;
    protected int height=0;

    @Override
    public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
        View wizardLayout = super.onCreateView(inflater,container,savedInstanceState);
        if((width > 0) &&(height >0 ))
        {
            RelativeLayout.LayoutParams p = new RelativeLayout.LayoutParams(width, height);
            wizardLayout.setLayoutParams(p);
            wizardLayout.requestLayout();
        }
        return wizardLayout;
    }

    @Override
    public void onClick(View v) {
        if (v.getId() == R.id.wizard_next_button) {
            WizardStep wizardStep = wizard.getCurrentStep();
            if(wizardStep instanceof WizardStepValidatable)
            {
                //validate before going next
                WizardStepValidatable validatableWizardStep = ( WizardStepValidatable)wizardStep;
                ActivityValidateResult validationResult = validatableWizardStep.validateWizardStep(getView());
                if(validationResult.isValid())
                {
                    //validated now we can go next
                    wizard.goNext();
                }
                else
                {
                    //just bind the errors
                    validatableWizardStep.bindFormErrors(getView(), validationResult);
                }
            }
            else {
                //Tell the wizard to go to next step
                wizard.goNext();
            }
        }
        else if (v.getId() == R.id.wizard_previous_button) {
            //Tell the wizard to go back one step
            wizard.goBack();
        }
    }

    @Override
    public WizardFlow onSetup()
    {
        if(this.getActivity() != null)
        {
            try {
                return buildWizard(getWizardName(), getActivity().getResources().openRawResource(getWizardFileResourceId()));
            }
            catch(XmlPullParserException xppe)
            {
                Log.e(TAG, "Unable to create wizard with name " + getWizardName(),xppe);
            }
            catch(IOException ioe)
            {
                Log.e(TAG, "Unable to create wizard with name " + getWizardName(),ioe);
            }
        }
        return null;
    }

    public WizardFlow buildWizard(String wizardName, InputStream instream)throws IOException, XmlPullParserException
    {
        WizardXmlBean wizardXmlBean = loadWizardFromXml(wizardName, instream);
        WizardFlow wizardFlow = null;
        if(wizardXmlBean != null)
        {

            WizardFlow.Builder wizardFlowBuilder = new WizardFlow.Builder();
            if((wizardXmlBean.getWizardFlowXmlBean().getWizardSteps() != null) &&(wizardXmlBean.getWizardFlowXmlBean().getWizardSteps().size()>0))
            {
                try {
                    //sort the wizard steps
                    Collections.sort(wizardXmlBean.getWizardFlowXmlBean().getWizardSteps(), new WizardStepXmlBeanComparator());
                    for(WizardStepXmlBean stepXmlBean:wizardXmlBean.getWizardFlowXmlBean().getWizardSteps())
                    {

                        wizardFlowBuilder.addStep((Class<? extends WizardStep>)Class.forName(stepXmlBean.getClassName()));

                    }
                }
                catch(ClassNotFoundException cnfe)
                {
                    Log.w(TAG, "Cannot find class for ",cnfe);
                }
                catch(ClassCastException cce)
                {
                    Log.w(TAG, "Cannot cast class to Wizard Step Class", cce);
                }
                wizardFlow = wizardFlowBuilder.create();

            }
        }

        return wizardFlow;
    }

    private WizardXmlBean loadWizardFromXml(String wizardName, InputStream instream) throws IOException, XmlPullParserException {

        try {
            XmlPullParserFactory factory = XmlPullParserFactory.newInstance();
            factory.setNamespaceAware(true);
            XmlPullParser parser = factory.newPullParser();
            parser.setInput(instream, ActivityConstants.UTF_8_ENCODING);

            int eventType = parser.getEventType();

            while (eventType != XmlResourceParser.END_DOCUMENT) {
                if (eventType == XmlResourceParser.START_TAG) {
                    if (parser.getName().equalsIgnoreCase(ActivityConstants.WIZARD_NAME))
                    {
                        if(wizardName.equalsIgnoreCase(parser.getAttributeValue(null, ActivityConstants.ID_NAME)))
                        {
                            return readWizardFromXML(wizardName, parser);
                        }
                    }
                }
                eventType = parser.next();
                }
            return null;

        } catch (IOException ioe) {
            Log.e(TAG, "unable to load wizard from wizard xml", ioe);
            throw ioe;

        } catch (XmlPullParserException xppe) {
            Log.e(TAG, "unable to load wizard from wizard xml", xppe);
            throw xppe;
        } finally {
            instream.close();
        }

    }

    private WizardXmlBean readWizardFromXML(String wizardName, XmlPullParser parser) throws IOException, XmlPullParserException {

        WizardXmlBean wizardXmlBean = new WizardXmlBeanImpl();

        parser.require(XmlPullParser.START_TAG, null, ActivityConstants.WIZARD_NAME);
        String tag = parser.getName();
        if ((tag.equalsIgnoreCase(ActivityConstants.WIZARD_NAME)) &&(wizardName.equalsIgnoreCase(parser.getAttributeValue(null, ActivityConstants.ID_NAME)))) {
            wizardXmlBean.setId(parser.getAttributeValue(null, ActivityConstants.ID_NAME));
            try
            {
                wizardXmlBean.setHeight(parser.getAttributeValue(null, ActivityConstants.HEIGHT_NAME) == null ? 0 : Integer.parseInt(parser.getAttributeValue(null, ActivityConstants.HEIGHT_NAME)));
                wizardXmlBean.setWidth(parser.getAttributeValue(null, ActivityConstants.WIDTH_NAME)==null?0:Integer.parseInt(parser.getAttributeValue(null, ActivityConstants.WIDTH_NAME)));
                width = wizardXmlBean.getWidth();
                height = wizardXmlBean.getHeight();
            }
            catch(NumberFormatException nfe)
            {
                Log.w(TAG, "unable to set dimensions for wizard " + wizardName + " using normal dimensions");
            }
            Log.d(TAG, wizardName + " -" + parser.getName());
            while (parser.nextTag() != XmlPullParser.END_TAG) {
                if (parser.getName()
                        .equalsIgnoreCase(ActivityConstants.FRAGMENT_ACTIVITY_NAME)) {
                    wizardXmlBean.getWizardFlowXmlBean().getWizardSteps().add(readWizardStepsFromXML(parser));
                } else {
                    skip(parser);
                }
            }
        }
        return wizardXmlBean;

    }

    private WizardStepXmlBean readWizardStepsFromXML(XmlPullParser parser) throws IOException, XmlPullParserException {
        WizardStepXmlBean wizardStepXmlBean = null;
        parser.require(XmlPullParser.START_TAG, null, ActivityConstants.FRAGMENT_ACTIVITY_NAME);
        String tag = parser.getName();
        if (tag.equalsIgnoreCase(ActivityConstants.FRAGMENT_ACTIVITY_NAME)){
            wizardStepXmlBean = new WizardStepXmlBeanImpl();
            wizardStepXmlBean.setId(parser.getAttributeValue(null, ActivityConstants.ID_NAME));
            wizardStepXmlBean.setClassName(parser.getAttributeValue(null, ActivityConstants.CLASS_NAME));
            boolean bRequired = true;
           String requiredString =  parser.getAttributeValue(null, ActivityConstants.REQUIRED);
            if((requiredString != null)&&(requiredString.equalsIgnoreCase(Boolean.FALSE.toString())))
            {
                bRequired = false;
            }
            wizardStepXmlBean.setIsRequired(bRequired);
            String requiredFields =parser.getAttributeValue(null, ActivityConstants.REQUIRED_FIELDS);
            if((requiredFields != null) &&(requiredFields.length()>0))
            {
                wizardStepXmlBean.setRequiredFields(findRequiredFieldsFromAttrString(requiredFields));
            }
            try
            {
                wizardStepXmlBean.setStepNumber(Integer.parseInt(parser.getAttributeValue(null, ActivityConstants.STEP_NAME)));
                wizardStepXmlBean.setHasPreviousControl(Boolean.parseBoolean(parser.getAttributeValue(null, ActivityConstants.HAS_PREV_NAME)));
            }
            catch(NumberFormatException nfe)
            {
                Log.w(TAG, "Unable to convert value " + parser.getAttributeValue(null, ActivityConstants.STEP_NAME) +"to a number", nfe);
            }
            parser.nextTag();
        }
        return wizardStepXmlBean;
    }

    //@see http://developer.android.com/training/basics/network-ops/xml.html#analyze
    private void skip(XmlPullParser parser) throws XmlPullParserException, IOException {
        if (parser.getEventType() != XmlPullParser.START_TAG) {
            throw new IllegalStateException();
        }
        int depth = 1;
        while (depth != 0) {
            switch (parser.next()) {
                case XmlPullParser.END_TAG:
                    depth--;
                    break;
                case XmlPullParser.START_TAG:
                    depth++;
                    break;
            }
        }
    }

    private Map<String, String> findRequiredFieldsFromAttrString(String requiredFieldsString)
    {
        Map<String, String> resultMap = new HashMap<String, String>();
        String [] requiredFieldsList = requiredFieldsString.split(",");
        for(String requiredField : requiredFieldsList)
        {
            String [] requiredFieldInfo = requiredField.split(":");
            if(requiredFieldInfo.length ==2 )
            {
                resultMap.put(requiredFieldInfo[0],requiredFieldInfo[1]);
            }
        }
        return resultMap;
    }
}


text:
<?php

namespace Flarum\Forum\Auth;

class Registration
{
    /**
     * @var array
     */
    protected $provided = [];

    /**
     * @var array
     */
    protected $suggested = [];

    /**
     * @var mixed
     */
    protected $payload;

    /**
     * @return array
     */
    public function getProvided(): array
    {
        return $this->provided;
    }

    /**
     * @return array
     */
    public function getSuggested(): array
    {
        return $this->suggested;
    }

    /**
     * @return mixed
     */
    public function getPayload()
    {
        return $this->payload;
    }

    /**
     * @param string $key
     * @param mixed $value
     * @return $this
     */
    public function provide(string $key, $value): self
    {
        $this->provided[$key] = $value;

        return $this;
    }

    /**
     * @param string $email
     * @return $this
     */
    public function provideTrustedEmail(string $email): self
    {
        return $this->provide('email', $email);
    }

    /**
     * @param string $url
     * @return $this
     */
    public function provideAvatar(string $url): self
    {
        return $this->provide('avatar_url', $url);
    }

    /**
     * @param string $key
     * @param mixed $value
     * @return $this
     */
    public function suggest(string $key, $value): self
    {
        $this->suggested[$key] = $value;

        return $this;
    }

    /**
     * @param string $username
     * @return $this
     */
    public function suggestUsername(string $username): self
    {
        $username = preg_replace('/[^a-z0-9-_]/i', '', $username);

        return $this->suggest('username', $username);
    }

    /**
     * @param string $email
     * @return $this
     */
    public function suggestEmail(string $email): self
    {
        return $this->suggest('email', $email);
    }

    /**
     * @param mixed $payload
     * @return $this
     */
    public function setPayload($payload): self
    {
        $this->payload = $payload;

        return $this;
    }
}