text:
package stores

import (
	"crypto/sha256"
	"fmt"

	"github.com/dmathieu/q/queue"
	"github.com/garyburd/redigo/redis"
)

const (
	lockDuration = 60 // seconds
	recordsCount = 1000
)

// RedisDataStore configures the queue with a redis data store
func RedisDataStore(name string, pool *redis.Pool) func(*queue.Queue) error {
	return queue.DataStore(&RedisStore{name, pool})
}

// A RedisStore stores all records data into redis
type RedisStore struct {
	name string
	pool *redis.Pool
}

func (r *RedisStore) queue() string {
	return fmt.Sprintf("q:%s:queue", r.name)
}

func (r *RedisStore) workingQueue() string {
	return fmt.Sprintf("q:%s:queue:working", r.name)
}

func (r *RedisStore) lockKey(d []byte) string {
	h := sha256.New()
	h.Write(d)

	return fmt.Sprintf("q:%s:lock:%s", r.name, h.Sum(nil))
}

// Store add the provided data to the in-memory array
func (r *RedisStore) Store(d []byte) error {
	conn := r.pool.Get()
	defer conn.Close()

	_, err := conn.Do("LPUSH", r.queue(), d)
	return err
}

// Retrieve pops the latest data from the in-memory array
func (r *RedisStore) Retrieve() ([]byte, error) {
	conn := r.pool.Get()
	defer conn.Close()

	d, err := redis.Bytes(conn.Do("RPOPLPUSH", r.queue(), r.workingQueue()))
	if err == redis.ErrNil {
		err = nil
	}

	_, err = conn.Do("SETEX", r.lockKey(d), lockDuration, d)
	if err != nil {
		return nil, err
	}
	return d, err
}

// Finish marks a task as finished
func (r *RedisStore) Finish(d []byte) error {
	conn := r.pool.Get()
	defer conn.Close()

	conn.Send("MULTI")
	conn.Send("LREM", r.workingQueue(), 0, d)
	conn.Send("DEL", r.lockKey(d))
	_, err := conn.Do("EXEC")

	return err
}

// Length returns the number of elements in the in-memory array
func (r *RedisStore) Length(q string) (int, error) {
	conn := r.pool.Get()
	defer conn.Close()

	var queue string
	switch q {
	case "waiting":
		queue = r.queue()
	case "working":
		queue = r.workingQueue()
	default:
		return 0, fmt.Errorf("unknown queue %s", q)
	}

	return redis.Int(conn.Do("LLEN", queue))
}

// HouseKeeping handles dead job, putting them back in the queue
func (r *RedisStore) HouseKeeping() error {
	conn := r.pool.Get()
	defer conn.Close()
	start := 0

	for {
		end := start + recordsCount

		data, err := redis.ByteSlices(conn.Do("LRANGE", r.workingQueue(), start, end))
		if err != nil {
			return err
		}
		if len(data) == 0 {
			return nil
		}

		for _, e := range data {
			exists, err := conn.Do("GET", r.lockKey(e))
			if err != nil {
				return err
			}

			if exists == nil {
				_, err = conn.Do("LREM", r.workingQueue(), 0, e)
				if err != nil {
					return err
				}

				err = r.Store(e)
				if err != nil {
					return err
				}
			} else {
				start++
			}
		}
	}
}


text:
PEAR_PackageFile_Parser_v2_Validator->validate(), compatible tag tests
--SKIPIF--
<?php
if (!getenv('PHP_PEAR_RUNTESTS')) {
    echo 'skip';
}
?>
--FILE--
<?php
require_once dirname(__FILE__) . DIRECTORY_SEPARATOR . 'setup.php.inc';
$pathtopackagexml = dirname(__FILE__)  . DIRECTORY_SEPARATOR .
    'test_compatible'. DIRECTORY_SEPARATOR . 'package.xml';
$pf = &$parser->parse(implode('', file($pathtopackagexml)), $pathtopackagexml);
$phpunit->assertIsa('PEAR_PackageFile_v2', $pf, 'ret');
$pf->validate();
$phpunit->assertErrors(array(
    array('package' => 'PEAR_PackageFile_v2', 'message' => 'Invalid tag order in <compatible>, found <> expected one of "name"'),
    array('package' => 'PEAR_PackageFile_v2', 'message' => 'Invalid tag order in <compatible><name>foo1</name>, found <> expected one of "channel"'),
    array('package' => 'PEAR_PackageFile_v2', 'message' => 'Invalid tag order in <compatible><name>foo2</name>, found <> expected one of "min"'),
    array('package' => 'PEAR_PackageFile_v2', 'message' => 'Invalid tag order in <compatible><name>foo3</name>, found <> expected one of "max"'),
    array('package' => 'PEAR_PackageFile_v2', 'message' => 'Invalid tag order in <compatible><name>foo4</name>, found <moo> expected one of "exclude"'),
    array('package' => 'PEAR_PackageFile_v2', 'message' => 'Invalid tag order in <compatible><name>foo5</name>, found <moo> expected one of "exclude"'),
    array('package' => 'PEAR_PackageFile_v2', 'message' => 'Invalid tag order in <compatible><name>foo6</name>, found <moo> expected one of "exclude"'),
    array('package' => 'PEAR_PackageFile_v2', 'message' => 'Version type <compatible><name>foo8</name><min> is not a valid version (#1.0)'),
    array('package' => 'PEAR_PackageFile_v2', 'message' => 'Version type <compatible><name>foo8</name><max> is not a valid version (4.a0)'),
    array('package' => 'PEAR_PackageFile_v2', 'message' => 'Version type <compatible><name>foo8</name><exclude> is not a valid version (2.0^)'),
), '1');
echo 'tests done';
?>
--CLEAN--
<?php
require_once dirname(__FILE__) . '/teardown.php.inc';
?>
--EXPECT--
tests done

redpajama_set_name: RedPajamaGithub


text:
"""Fichier contenant l'action executer."""

from primaires.connex.instance_connexion import InstanceConnexion
from primaires.joueur.contextes.connexion.mode_connecte import ModeConnecte
from primaires.scripting.action import Action
from primaires.scripting.instruction import ErreurExecution

class ClasseAction(Action):

    """Force le personnage à exécuter une commande.

    Soyez prudent avec cette action : elle force un personnage à
    exécuter une commande, ce qui semble une bonne solution dans de
    nombreux cas. Les commandes ne sont cependant pas optimisées.
    L'interprétation des arguments rajoute du temps à l'exécution.
    Mieux vaut passer par d'autres actions ou fonctions tant que
    cela est possible.

    """

    @classmethod
    def init_types(cls):
        cls.ajouter_types(cls.cmd_executer, "Personnage", "str")

    @staticmethod
    def cmd_executer(personnage, commande):
        """Force un personnage à executer une commande.

        Essayez de ne pas utiliser cette action régulièrement,
        surtout dans des scripts qui s'exécutent d'eux-mêmes (les
        ticks, les changements de temps). L'exécution d'une commande
        par scripting n'est pas un processus optimisé et peut être
        lente. Il faut trouver la commande et interpréter ses
        paramètres. Préférez utiliser d'autres actions et fonctions
        tant que cela est possible.

        Paramètres à préciser :

          * personnage : le personnage devant exécuter la commande
          * commande : la commande à exécuter (une chaîne).

        Exeples d'utilisation :

          # Force le personnage à exécuter la commande 'pêcher'
          executer personnage "pêcher"
          # Force le personnage à dire quelque chose
          executer personnage "dire Coucou !"

        """
        instance = InstanceConnexion(None, False)
        instance.joueur = personnage
        mode_connecte = ModeConnecte(instance)
        mode_connecte.interpreter(commande)


text:
package org.keycloak.testsuite.pages.social;

import org.openqa.selenium.By;
import org.openqa.selenium.Keys;
import org.openqa.selenium.NoSuchElementException;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.support.FindBy;

import static org.keycloak.testsuite.util.UIUtils.clickLink;

/**
 * @author Vaclav Muzikar <vmuzikar@redhat.com>
 */
public class OpenShiftLoginPage extends AbstractSocialLoginPage {
    @FindBy(name = "username")
    private WebElement usernameInput;

    @FindBy(name = "password")
    private WebElement passwordInput;

    private String userLoginLinkTitle;

    private WebElement userLoginLink;

    @Override
    public void login(String user, String password) {
        if(userLoginLinkTitle != null) {
            setUserLoginLink(this.userLoginLinkTitle);
            if(this.userLoginLink != null) {
                clickLink(this.userLoginLink);
            }
        }

        usernameInput.sendKeys(user);
        passwordInput.sendKeys(password);
        passwordInput.sendKeys(Keys.RETURN);
    }

    public void setUserLoginLinkTitle(String title) {
        this.userLoginLinkTitle = title;
    }

    private void setUserLoginLink(String linkAttrTitle) {
        try {
            this.userLoginLink = driver.findElement(By.xpath("//a[contains(@title,'"+linkAttrTitle+"')]"));
        } catch (NoSuchElementException ex) {
            log.error("No link with title: '" + linkAttrTitle + "' found on page. If you use the OPENSHIFT4_KUBE_ADMIN provider, set property loginBtnTitle in properties file to an existing title on the page to fix this error.");
        }
    }
}


text:
package org.onosproject.cli.net;

import org.apache.karaf.shell.commands.Command;
import org.onosproject.cli.AbstractShellCommand;
import org.onosproject.incubator.net.resource.label.LabelResourceAdminService;

@Command(scope = "onos", name = "global-label-pool-destroy",
description = "Destroys global label resource pool")
public class GlobalLabelPoolDestoryCommand extends AbstractShellCommand {
    @Override
    protected void execute() {
        LabelResourceAdminService lrs = get(LabelResourceAdminService.class);
        lrs.destroyGlobalPool();
    }

}


text:
Space.ui.BlazeComponent.extend('Todos.Footer', {

  dependencies: {
    store: 'Todos.TodosStore',
    meteor: 'Meteor'
  },

  filters() {
    return this._mapAvailableFilters();
  },

  activeTodosCount() {
    let count = this.store.activeTodos().length;
    return count;
  },

  completedTodosCount() {
    return this.store.completedTodos().length;
  },

  pluralize(count) {
    if (count === 1) {
      return 'item';
    } else {
      return 'items';
    }
  },

  events() {
    return [{
      'click .clear-completed'() {
        if (this.store.completedTodos().length > 0) {
          for (let todo of this.store.completedTodos()) {
            this.publish(new Todos.TodoRemoved({
              todoId: todo.id
            }));
          }
        }
      }
    }];
  },

  hasAnyTodos() {
    return this.store.allTodos().length > 0;
  },

  _mapAvailableFilters() {
    let activeFilter = this.store.activeFilter();
    return _.map(this.store.FILTERS, function(key) {
      return {
        name: key[0].toUpperCase() + key.slice(1),
        path: key,
        selected: activeFilter === key ? 'selected' : ''
      };
    });
  }

})

.register('footer'); // BlazeComponent API to register with template


text:
import unittest

from swift.common.swob import Request

from test.unit.common.middleware.s3api import S3ApiTestCase
from swift.common.middleware.s3api.etree import fromstring

class TestS3ApiLogging(S3ApiTestCase):

    def setUp(self):
        super(TestS3ApiLogging, self).setUp()

    def test_bucket_logging_GET(self):
        req = Request.blank('/bucket?logging',
                            environ={'REQUEST_METHOD': 'GET'},
                            headers={'Authorization': 'AWS test:tester:hmac',
                                     'Date': self.get_date_header()})
        status, headers, body = self.call_s3api(req)
        xml = fromstring(body, 'BucketLoggingStatus')
        self.assertEqual(xml.keys(), [])
        self.assertEqual(status.split()[0], '200')

    def test_object_logging_GET_error(self):
        req = Request.blank('/bucket/object?logging',
                            environ={'REQUEST_METHOD': 'GET'},
                            headers={'Authorization': 'AWS test:tester:hmac',
                                     'Date': self.get_date_header()})
        status, headers, body = self.call_s3api(req)
        self.assertEqual(self._get_error_code(body), 'NoLoggingStatusForKey')

    def test_bucket_logging_PUT(self):
        req = Request.blank('/bucket?logging',
                            environ={'REQUEST_METHOD': 'PUT'},
                            headers={'Authorization': 'AWS test:tester:hmac',
                                     'Date': self.get_date_header()})
        status, headers, body = self.call_s3api(req)
        # FIXME: Support PUT logging
        # self.assertEqual(status, 201)
        self.assertEqual(self._get_error_code(body), 'NotImplemented')

    def test_object_logging_PUT_error(self):
        req = Request.blank('/bucket/object?logging',
                            environ={'REQUEST_METHOD': 'PUT'},
                            headers={'Authorization': 'AWS test:tester:hmac',
                                     'Date': self.get_date_header()})
        status, headers, body = self.call_s3api(req)
        self.assertEqual(self._get_error_code(body), 'NoLoggingStatusForKey')

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


text:
<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# source: google/cloud/tasks/v2/target.proto

namespace Google\Cloud\Tasks\V2;

use Google\Protobuf\Internal\GPBType;
use Google\Protobuf\Internal\RepeatedField;
use Google\Protobuf\Internal\GPBUtil;

/**
 * App Engine HTTP request.
 * The message defines the HTTP request that is sent to an App Engine app when
 * the task is dispatched.
 * Using [AppEngineHttpRequest][google.cloud.tasks.v2.AppEngineHttpRequest] requires
 * [`appengine.applications.get`](https://cloud.google.com/appengine/docs/admin-api/access-control)
 * Google IAM permission for the project
 * and the following scope:
 * `https://www.googleapis.com/auth/cloud-platform`
 * The task will be delivered to the App Engine app which belongs to the same
 * project as the queue. For more information, see
 * [How Requests are
 * Routed](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed)
 * and how routing is affected by
 * [dispatch
 * files](https://cloud.google.com/appengine/docs/python/config/dispatchref).
 * Traffic is encrypted during transport and never leaves Google datacenters.
 * Because this traffic is carried over a communication mechanism internal to
 * Google, you cannot explicitly set the protocol (for example, HTTP or HTTPS).
 * The request to the handler, however, will appear to have used the HTTP
 * protocol.
 * The [AppEngineRouting][google.cloud.tasks.v2.AppEngineRouting] used to construct the URL that the task is
 * delivered to can be set at the queue-level or task-level:
 * * If [app_engine_routing_override is set on the
 *    queue][Queue.app_engine_routing_override], this value is used for all
 *    tasks in the queue, no matter what the setting is for the [task-level
 *    app_engine_routing][AppEngineHttpRequest.app_engine_routing].
 * The `url` that the task will be sent to is:
 * * `url =` [host][google.cloud.tasks.v2.AppEngineRouting.host] `+`
 *   [relative_uri][google.cloud.tasks.v2.AppEngineHttpRequest.relative_uri]
 * Tasks can be dispatched to secure app handlers, unsecure app handlers, and
 * URIs restricted with
 * [`login:
 * admin`](https://cloud.google.com/appengine/docs/standard/python/config/appref).
 * Because tasks are not run as any user, they cannot be dispatched to URIs
 * restricted with
 * [`login:
 * required`](https://cloud.google.com/appengine/docs/standard/python/config/appref)
 * Task dispatches also do not follow redirects.
 * The task attempt has succeeded if the app's request handler returns an HTTP
 * response code in the range [`200` - `299`]. The task attempt has failed if
 * the app's handler returns a non-2xx response code or Cloud Tasks does
 * not receive response before the [deadline][google.cloud.tasks.v2.Task.dispatch_deadline]. Failed
 * tasks will be retried according to the
 * [retry configuration][google.cloud.tasks.v2.Queue.retry_config]. `503` (Service Unavailable) is
 * considered an App Engine system error instead of an application error and
 * will cause Cloud Tasks' traffic congestion control to temporarily throttle
 * the queue's dispatches. Unlike other types of task targets, a `429` (Too Many
 * Requests) response from an app handler does not cause traffic congestion
 * control to throttle the queue.
 *
 * Generated from protobuf message google.cloud.tasks.v2.AppEngineHttpRequest
 */
class AppEngineHttpRequest extends \Google\Protobuf\Internal\Message
{
    /**
     * The HTTP method to use for the request. The default is POST.
     * The app's request handler for the task's target URL must be able to handle
     * HTTP requests with this http_method, otherwise the task attempt will fail
     * with error code 405 (Method Not Allowed). See
     * [Writing a push task request
     * handler](https://cloud.google.com/appengine/docs/java/taskqueue/push/creating-handlers#writing_a_push_task_request_handler)
     * and the documentation for the request handlers in the language your app is
     * written in e.g.
     * [Python Request
     * Handler](https://cloud.google.com/appengine/docs/python/tools/webapp/requesthandlerclass).
     *
     * Generated from protobuf field .google.cloud.tasks.v2.HttpMethod http_method = 1;
     */
    private $http_method = 0;
    /**
     * Task-level setting for App Engine routing.
     * * If [app_engine_routing_override is set on the
     *    queue][Queue.app_engine_routing_override], this value is used for all
     *    tasks in the queue, no matter what the setting is for the [task-level
     *    app_engine_routing][AppEngineHttpRequest.app_engine_routing].
     *
     * Generated from protobuf field .google.cloud.tasks.v2.AppEngineRouting app_engine_routing = 2;
     */
    private $app_engine_routing = null;
    /**
     * The relative URI.
     * The relative URI must begin with "/" and must be a valid HTTP relative URI.
     * It can contain a path and query string arguments.
     * If the relative URI is empty, then the root path "/" will be used.
     * No spaces are allowed, and the maximum length allowed is 2083 characters.
     *
     * Generated from protobuf field string relative_uri = 3;
     */
    private $relative_uri = '';
    /**
     * HTTP request headers.
     * This map contains the header field names and values.
     * Headers can be set when the
     * [task is created][google.cloud.tasks.v2.CloudTasks.CreateTask].
     * Repeated headers are not supported but a header value can contain commas.
     * Cloud Tasks sets some headers to default values:
     * * `User-Agent`: By default, this header is
     *   `"AppEngine-Google; (+http://code.google.com/appengine)"`.
     *   This header can be modified, but Cloud Tasks will append
     *   `"AppEngine-Google; (+http://code.google.com/appengine)"` to the
     *   modified `User-Agent`.
     * If the task has a [body][google.cloud.tasks.v2.AppEngineHttpRequest.body], Cloud
     * Tasks sets the following headers:
     * * `Content-Type`: By default, the `Content-Type` header is set to
     *   `"application/octet-stream"`. The default can be overridden by explicitly
     *   setting `Content-Type` to a particular media type when the
     *   [task is created][google.cloud.tasks.v2.CloudTasks.CreateTask].
     *   For example, `Content-Type` can be set to `"application/json"`.
     * * `Content-Length`: This is computed by Cloud Tasks. This value is
     *   output only.   It cannot be changed.
     * The headers below cannot be set or overridden:
     * * `Host`
     * * `X-Google-*`
     * * `X-AppEngine-*`
     * In addition, Cloud Tasks sets some headers when the task is dispatched,
     * such as headers containing information about the task; see
     * [request
     * headers](https://cloud.google.com/tasks/docs/creating-appengine-handlers#reading_request_headers).
     * These headers are set only when the task is dispatched, so they are not
     * visible when the task is returned in a Cloud Tasks response.
     * Although there is no specific limit for the maximum number of headers or
     * the size, there is a limit on the maximum size of the [Task][google.cloud.tasks.v2.Task]. For more
     * information, see the [CreateTask][google.cloud.tasks.v2.CloudTasks.CreateTask] documentation.
     *
     * Generated from protobuf field map<string, string> headers = 4;
     */
    private $headers;
    /**
     * HTTP request body.
     * A request body is allowed only if the HTTP method is POST or PUT. It is
     * an error to set a body on a task with an incompatible [HttpMethod][google.cloud.tasks.v2.HttpMethod].
     *
     * Generated from protobuf field bytes body = 5;
     */
    private $body = '';

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type int $http_method
     *           The HTTP method to use for the request. The default is POST.
     *           The app's request handler for the task's target URL must be able to handle
     *           HTTP requests with this http_method, otherwise the task attempt will fail
     *           with error code 405 (Method Not Allowed). See
     *           [Writing a push task request
     *           handler](https://cloud.google.com/appengine/docs/java/taskqueue/push/creating-handlers#writing_a_push_task_request_handler)
     *           and the documentation for the request handlers in the language your app is
     *           written in e.g.
     *           [Python Request
     *           Handler](https://cloud.google.com/appengine/docs/python/tools/webapp/requesthandlerclass).
     *     @type \Google\Cloud\Tasks\V2\AppEngineRouting $app_engine_routing
     *           Task-level setting for App Engine routing.
     *           * If [app_engine_routing_override is set on the
     *              queue][Queue.app_engine_routing_override], this value is used for all
     *              tasks in the queue, no matter what the setting is for the [task-level
     *              app_engine_routing][AppEngineHttpRequest.app_engine_routing].
     *     @type string $relative_uri
     *           The relative URI.
     *           The relative URI must begin with "/" and must be a valid HTTP relative URI.
     *           It can contain a path and query string arguments.
     *           If the relative URI is empty, then the root path "/" will be used.
     *           No spaces are allowed, and the maximum length allowed is 2083 characters.
     *     @type array|\Google\Protobuf\Internal\MapField $headers
     *           HTTP request headers.
     *           This map contains the header field names and values.
     *           Headers can be set when the
     *           [task is created][google.cloud.tasks.v2.CloudTasks.CreateTask].
     *           Repeated headers are not supported but a header value can contain commas.
     *           Cloud Tasks sets some headers to default values:
     *           * `User-Agent`: By default, this header is
     *             `"AppEngine-Google; (+http://code.google.com/appengine)"`.
     *             This header can be modified, but Cloud Tasks will append
     *             `"AppEngine-Google; (+http://code.google.com/appengine)"` to the
     *             modified `User-Agent`.
     *           If the task has a [body][google.cloud.tasks.v2.AppEngineHttpRequest.body], Cloud
     *           Tasks sets the following headers:
     *           * `Content-Type`: By default, the `Content-Type` header is set to
     *             `"application/octet-stream"`. The default can be overridden by explicitly
     *             setting `Content-Type` to a particular media type when the
     *             [task is created][google.cloud.tasks.v2.CloudTasks.CreateTask].
     *             For example, `Content-Type` can be set to `"application/json"`.
     *           * `Content-Length`: This is computed by Cloud Tasks. This value is
     *             output only.   It cannot be changed.
     *           The headers below cannot be set or overridden:
     *           * `Host`
     *           * `X-Google-*`
     *           * `X-AppEngine-*`
     *           In addition, Cloud Tasks sets some headers when the task is dispatched,
     *           such as headers containing information about the task; see
     *           [request
     *           headers](https://cloud.google.com/tasks/docs/creating-appengine-handlers#reading_request_headers).
     *           These headers are set only when the task is dispatched, so they are not
     *           visible when the task is returned in a Cloud Tasks response.
     *           Although there is no specific limit for the maximum number of headers or
     *           the size, there is a limit on the maximum size of the [Task][google.cloud.tasks.v2.Task]. For more
     *           information, see the [CreateTask][google.cloud.tasks.v2.CloudTasks.CreateTask] documentation.
     *     @type string $body
     *           HTTP request body.
     *           A request body is allowed only if the HTTP method is POST or PUT. It is
     *           an error to set a body on a task with an incompatible [HttpMethod][google.cloud.tasks.v2.HttpMethod].
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Tasks\V2\Target::initOnce();
        parent::__construct($data);
    }

    /**
     * The HTTP method to use for the request. The default is POST.
     * The app's request handler for the task's target URL must be able to handle
     * HTTP requests with this http_method, otherwise the task attempt will fail
     * with error code 405 (Method Not Allowed). See
     * [Writing a push task request
     * handler](https://cloud.google.com/appengine/docs/java/taskqueue/push/creating-handlers#writing_a_push_task_request_handler)
     * and the documentation for the request handlers in the language your app is
     * written in e.g.
     * [Python Request
     * Handler](https://cloud.google.com/appengine/docs/python/tools/webapp/requesthandlerclass).
     *
     * Generated from protobuf field .google.cloud.tasks.v2.HttpMethod http_method = 1;
     * @return int
     */
    public function getHttpMethod()
    {
        return $this->http_method;
    }

    /**
     * The HTTP method to use for the request. The default is POST.
     * The app's request handler for the task's target URL must be able to handle
     * HTTP requests with this http_method, otherwise the task attempt will fail
     * with error code 405 (Method Not Allowed). See
     * [Writing a push task request
     * handler](https://cloud.google.com/appengine/docs/java/taskqueue/push/creating-handlers#writing_a_push_task_request_handler)
     * and the documentation for the request handlers in the language your app is
     * written in e.g.
     * [Python Request
     * Handler](https://cloud.google.com/appengine/docs/python/tools/webapp/requesthandlerclass).
     *
     * Generated from protobuf field .google.cloud.tasks.v2.HttpMethod http_method = 1;
     * @param int $var
     * @return $this
     */
    public function setHttpMethod($var)
    {
        GPBUtil::checkEnum($var, \Google\Cloud\Tasks\V2\HttpMethod::class);
        $this->http_method = $var;

        return $this;
    }

    /**
     * Task-level setting for App Engine routing.
     * * If [app_engine_routing_override is set on the
     *    queue][Queue.app_engine_routing_override], this value is used for all
     *    tasks in the queue, no matter what the setting is for the [task-level
     *    app_engine_routing][AppEngineHttpRequest.app_engine_routing].
     *
     * Generated from protobuf field .google.cloud.tasks.v2.AppEngineRouting app_engine_routing = 2;
     * @return \Google\Cloud\Tasks\V2\AppEngineRouting|null
     */
    public function getAppEngineRouting()
    {
        return $this->app_engine_routing;
    }

    public function hasAppEngineRouting()
    {
        return isset($this->app_engine_routing);
    }

    public function clearAppEngineRouting()
    {
        unset($this->app_engine_routing);
    }

    /**
     * Task-level setting for App Engine routing.
     * * If [app_engine_routing_override is set on the
     *    queue][Queue.app_engine_routing_override], this value is used for all
     *    tasks in the queue, no matter what the setting is for the [task-level
     *    app_engine_routing][AppEngineHttpRequest.app_engine_routing].
     *
     * Generated from protobuf field .google.cloud.tasks.v2.AppEngineRouting app_engine_routing = 2;
     * @param \Google\Cloud\Tasks\V2\AppEngineRouting $var
     * @return $this
     */
    public function setAppEngineRouting($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\Tasks\V2\AppEngineRouting::class);
        $this->app_engine_routing = $var;

        return $this;
    }

    /**
     * The relative URI.
     * The relative URI must begin with "/" and must be a valid HTTP relative URI.
     * It can contain a path and query string arguments.
     * If the relative URI is empty, then the root path "/" will be used.
     * No spaces are allowed, and the maximum length allowed is 2083 characters.
     *
     * Generated from protobuf field string relative_uri = 3;
     * @return string
     */
    public function getRelativeUri()
    {
        return $this->relative_uri;
    }

    /**
     * The relative URI.
     * The relative URI must begin with "/" and must be a valid HTTP relative URI.
     * It can contain a path and query string arguments.
     * If the relative URI is empty, then the root path "/" will be used.
     * No spaces are allowed, and the maximum length allowed is 2083 characters.
     *
     * Generated from protobuf field string relative_uri = 3;
     * @param string $var
     * @return $this
     */
    public function setRelativeUri($var)
    {
        GPBUtil::checkString($var, True);
        $this->relative_uri = $var;

        return $this;
    }

    /**
     * HTTP request headers.
     * This map contains the header field names and values.
     * Headers can be set when the
     * [task is created][google.cloud.tasks.v2.CloudTasks.CreateTask].
     * Repeated headers are not supported but a header value can contain commas.
     * Cloud Tasks sets some headers to default values:
     * * `User-Agent`: By default, this header is
     *   `"AppEngine-Google; (+http://code.google.com/appengine)"`.
     *   This header can be modified, but Cloud Tasks will append
     *   `"AppEngine-Google; (+http://code.google.com/appengine)"` to the
     *   modified `User-Agent`.
     * If the task has a [body][google.cloud.tasks.v2.AppEngineHttpRequest.body], Cloud
     * Tasks sets the following headers:
     * * `Content-Type`: By default, the `Content-Type` header is set to
     *   `"application/octet-stream"`. The default can be overridden by explicitly
     *   setting `Content-Type` to a particular media type when the
     *   [task is created][google.cloud.tasks.v2.CloudTasks.CreateTask].
     *   For example, `Content-Type` can be set to `"application/json"`.
     * * `Content-Length`: This is computed by Cloud Tasks. This value is
     *   output only.   It cannot be changed.
     * The headers below cannot be set or overridden:
     * * `Host`
     * * `X-Google-*`
     * * `X-AppEngine-*`
     * In addition, Cloud Tasks sets some headers when the task is dispatched,
     * such as headers containing information about the task; see
     * [request
     * headers](https://cloud.google.com/tasks/docs/creating-appengine-handlers#reading_request_headers).
     * These headers are set only when the task is dispatched, so they are not
     * visible when the task is returned in a Cloud Tasks response.
     * Although there is no specific limit for the maximum number of headers or
     * the size, there is a limit on the maximum size of the [Task][google.cloud.tasks.v2.Task]. For more
     * information, see the [CreateTask][google.cloud.tasks.v2.CloudTasks.CreateTask] documentation.
     *
     * Generated from protobuf field map<string, string> headers = 4;
     * @return \Google\Protobuf\Internal\MapField
     */
    public function getHeaders()
    {
        return $this->headers;
    }

    /**
     * HTTP request headers.
     * This map contains the header field names and values.
     * Headers can be set when the
     * [task is created][google.cloud.tasks.v2.CloudTasks.CreateTask].
     * Repeated headers are not supported but a header value can contain commas.
     * Cloud Tasks sets some headers to default values:
     * * `User-Agent`: By default, this header is
     *   `"AppEngine-Google; (+http://code.google.com/appengine)"`.
     *   This header can be modified, but Cloud Tasks will append
     *   `"AppEngine-Google; (+http://code.google.com/appengine)"` to the
     *   modified `User-Agent`.
     * If the task has a [body][google.cloud.tasks.v2.AppEngineHttpRequest.body], Cloud
     * Tasks sets the following headers:
     * * `Content-Type`: By default, the `Content-Type` header is set to
     *   `"application/octet-stream"`. The default can be overridden by explicitly
     *   setting `Content-Type` to a particular media type when the
     *   [task is created][google.cloud.tasks.v2.CloudTasks.CreateTask].
     *   For example, `Content-Type` can be set to `"application/json"`.
     * * `Content-Length`: This is computed by Cloud Tasks. This value is
     *   output only.   It cannot be changed.
     * The headers below cannot be set or overridden:
     * * `Host`
     * * `X-Google-*`
     * * `X-AppEngine-*`
     * In addition, Cloud Tasks sets some headers when the task is dispatched,
     * such as headers containing information about the task; see
     * [request
     * headers](https://cloud.google.com/tasks/docs/creating-appengine-handlers#reading_request_headers).
     * These headers are set only when the task is dispatched, so they are not
     * visible when the task is returned in a Cloud Tasks response.
     * Although there is no specific limit for the maximum number of headers or
     * the size, there is a limit on the maximum size of the [Task][google.cloud.tasks.v2.Task]. For more
     * information, see the [CreateTask][google.cloud.tasks.v2.CloudTasks.CreateTask] documentation.
     *
     * Generated from protobuf field map<string, string> headers = 4;
     * @param array|\Google\Protobuf\Internal\MapField $var
     * @return $this
     */
    public function setHeaders($var)
    {
        $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING);
        $this->headers = $arr;

        return $this;
    }

    /**
     * HTTP request body.
     * A request body is allowed only if the HTTP method is POST or PUT. It is
     * an error to set a body on a task with an incompatible [HttpMethod][google.cloud.tasks.v2.HttpMethod].
     *
     * Generated from protobuf field bytes body = 5;
     * @return string
     */
    public function getBody()
    {
        return $this->body;
    }

    /**
     * HTTP request body.
     * A request body is allowed only if the HTTP method is POST or PUT. It is
     * an error to set a body on a task with an incompatible [HttpMethod][google.cloud.tasks.v2.HttpMethod].
     *
     * Generated from protobuf field bytes body = 5;
     * @param string $var
     * @return $this
     */
    public function setBody($var)
    {
        GPBUtil::checkString($var, False);
        $this->body = $var;

        return $this;
    }

}


text:
using System;
using System.Collections;
using System.Collections.Generic;
using System.Globalization;
using System.Linq;
using System.Text;
using System.Text.RegularExpressions;
using FluentFTP.Client.BaseClient;

namespace FluentFTP.Helpers.Parsers {
	internal static class VMSParser {

		/// <summary>
		/// Checks if the given listing is a valid VMS file listing
		/// </summary>
		public static bool IsValid(BaseFtpClient client, string[] records) {
			var count = Math.Min(records.Length, 10);

			var semiColonName = false;
			bool squareBracketStart = false, squareBracketEnd = false;

			for (var i = 0; i < count; i++) {
				var record = records[i];
				if (record.Trim().Length == 0) {
					continue;
				}

				var pos = 0;
				if ((pos = record.IndexOf(';')) > 0 && ++pos < record.Length &&
					char.IsDigit(record[pos])) {
					semiColonName = true;
				}

				if (record.Contains('[')) {
					squareBracketStart = true;
				}

				if (record.Contains(']')) {
					squareBracketEnd = true;
				}
			}

			if (semiColonName && squareBracketStart && squareBracketEnd) {
				return true;
			}

			((IInternalFtpClient)client).LogStatus(FtpTraceLevel.Verbose, "Not in VMS format");
			return false;
		}

		/// <summary>
		/// Parses Vax/VMS format listings
		/// </summary>
		/// <param name="client">The FTP client</param>
		/// <param name="record">A line from the listing</param>
		/// <returns>FtpListItem if the item is able to be parsed</returns>
		public static FtpListItem Parse(BaseFtpClient client, string record) {
			var values = record.SplitString();

			// skip blank lines
			if (values.Length <= 0) {
				return null;
			}

			// skip line which lists Directory
			if (values.Length >= 2 && values[0].Equals(HDirectoryMarker)) {
				return null;
			}

			// skip line which lists Total
			if (values.Length > 0 && values[0].Equals(TotalMarker)) {
				return null;
			}

			if (values.Length < MinFieldCount) {
				return null;
			}

			// first field is name
			var name = values[0];

			// make sure it is the name (ends with ';<INT>')
			var semiPos = name.LastIndexOf(';');

			// check for ;
			if (semiPos <= 0) {
				((IInternalFtpClient)client).LogStatus(FtpTraceLevel.Verbose, "File version number not found in name '" + name + "'");
				return null;
			}

			var nameNoVersion = name.Substring(0, semiPos);

			// check for version after ;
			var afterSemi = values[0].Substring(semiPos + 1);
			try {
				long.Parse(afterSemi);

				// didn't throw exception yet, must be number
				// we don't use it currently but we might in future
			}
			catch (FormatException) {
				// don't worry about version number
			}

			// test is dir
			var isDir = false;
			if (nameNoVersion.EndsWith(DirectoryMarker)) {
				isDir = true;
				name = nameNoVersion.Substring(0, nameNoVersion.Length - DirectoryMarker.Length);
			}

			if (!FtpListParser.VMSNameHasVersion && !isDir) {
				name = nameNoVersion;
			}

			// 2nd field is size USED/ALLOCATED format, or perhaps just USED
			var size = ParseFileSize(values[1]);

			// 3 & 4 fields are date time
			var lastModified = ParseDateTime(client, values[2], values[3]);

			// 5th field is [group,owner]
			string group = null;
			string owner = null;
			ParseGroupOwner(values, out group, out owner);

			// 6th field is permissions e.g. (RWED,RWED,RE,)
			var permissions = ParsePermissions(values);

			// create a new list item object with the parsed metadata
			var file = new FtpListItem(record, name, size, isDir, lastModified);
			file.RawGroup = group;
			file.RawOwner = owner;
			file.RawPermissions = permissions;
			return file;
		}

		/// <summary>
		/// Parses the file size from Vax/VMS format listings
		/// </summary>
		private static long ParseFileSize(string sizeStr) {
			long size;
			var slashPos = sizeStr.IndexOf('/');
			var sizeUsed = sizeStr;
			if (slashPos == -1) {
				// only filesize in bytes
				size = long.Parse(sizeStr);
			}
			else {
				if (slashPos > 0) {
					sizeUsed = sizeStr.Substring(0, slashPos);
				}

				size = long.Parse(sizeUsed) * FileBlockSize;
			}

			return size;
		}

		/// <summary>
		/// Parses the owner and group permissions from Vax/VMS format listings
		/// </summary>
		private static void ParseGroupOwner(string[] values, out string group, out string owner) {
			group = null;
			owner = null;
			if (values.Length >= 5) {
				if (values[4][0] == '[' && values[4][values[4].Length - 1] == ']') {
					var commaPos = values[4].IndexOf(',');
					if (commaPos < 0) {
						owner = values[4].Substring(1, values[4].Length - 2);
						group = "";
					}
					else {
						group = values[4].Substring(1, commaPos - 1);
						owner = values[4].Substring(commaPos + 1, values[4].Length - commaPos - 2);
					}
				}
			}
		}

		/// <summary>
		/// Parses the permissions from Vax/VMS format listings
		/// </summary>
		private static string ParsePermissions(string[] values) {
			if (values.Length >= 6) {
				if (values[5][0] == '(' && values[5][values[5].Length - 1] == ')') {
					return values[5].Substring(1, values[5].Length - 2);
				}
			}

			return null;
		}

		/// <summary>
		/// Parses the last modified date from Vax/VMS format listings
		/// </summary>
		private static DateTime ParseDateTime(BaseFtpClient client, string date, string time) {
			var sb = new StringBuilder();
			var monthFound = false;

			// add date
			for (var i = 0; i < date.Length; i++) {
				if (!char.IsLetter(date[i])) {
					sb.Append(date[i]);
				}
				else {
					if (!monthFound) {
						sb.Append(date[i]);
						monthFound = true;
					}
					else {
						// convert the last 2 chars of month to lower case
						sb.Append(char.ToLower(date[i]));
					}
				}
			}

			// add time
			sb.Append(" ").Append(time);
			var lastModifiedStr = sb.ToString();

			// parse it into a date/time object
			try {
				var lastModified = DateTime.Parse(lastModifiedStr, client.Config.ListingCulture.DateTimeFormat);
				return lastModified;
			}
			catch (FormatException) {
				((IInternalFtpClient)client).LogStatus(FtpTraceLevel.Error, "Failed to parse date string '" + lastModifiedStr + "'");
			}

			return DateTime.MinValue;
		}

		#region Constants

		private static string DirectoryMarker = ".DIR";
		private static string HDirectoryMarker = "Directory";
		private static string TotalMarker = "Total";
		private static int MinFieldCount = 4;
		private static int FileBlockSize = 512 * 1024;

		#endregion
	}
}


text:
{% load staticfiles %}
<link rel="stylesheet" href ="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css"/>
<link rel="stylesheet" type="text/css" href="{% static 'images/style.css' %}"/>

New Song:

<form method="post" class="form-horizontal container" role="form">
	{% csrf_token %}
    {{ form.as_p }}
    <input type="submit" value="Submit" class="btn btn-primary"/>
    or
    Cancel
</form>


text:
package io.gravitee.am.gateway.reactor;

import io.gravitee.am.common.event.DomainEvent;
import io.gravitee.am.common.event.EventManager;
import io.gravitee.am.gateway.reactor.impl.DefaultSecurityDomainManager;
import io.gravitee.am.model.Domain;
import org.junit.Assert;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.mockito.InjectMocks;
import org.mockito.Mock;
import org.mockito.junit.MockitoJUnitRunner;

import static org.mockito.ArgumentMatchers.any;
import static org.mockito.Mockito.*;

/**
 * @author Titouan COMPIEGNE (titouan.compiegne at graviteesource.com)
 * @author GraviteeSource Team
 */
@RunWith(MockitoJUnitRunner.class)
public class SecurityDomainManagerTest {

    @InjectMocks
    private SecurityDomainManager securityDomainManager = new DefaultSecurityDomainManager();

    @Mock
    private EventManager eventManager;

    @Test
    public void shouldNotDeploy_domainIsDisabled() {
        final Domain domain = new Domain();
        domain.setId("domain-1");
        domain.setEnabled(false);

        securityDomainManager.deploy(domain);
        Assert.assertTrue(securityDomainManager.get(domain.getId()) == null);
        verify(eventManager, never()).publishEvent(eq(DomainEvent.DEPLOY), any());
    }

    @Test
    public void shouldDeploy_domainIsEnabled() {
        final Domain domain = new Domain();
        domain.setId("domain-1");
        domain.setEnabled(true);

        securityDomainManager.deploy(domain);
        Assert.assertFalse(securityDomainManager.get(domain.getId()) == null);
        verify(eventManager, times(1)).publishEvent(eq(DomainEvent.DEPLOY), any());
    }

    @Test
    public void shouldNotUpdate_domainIsDisabled_noCurrentDomain() {
        final Domain domain = new Domain();
        domain.setId("domain-1");
        domain.setEnabled(false);

        securityDomainManager.update(domain);
        Assert.assertTrue(securityDomainManager.get(domain.getId()) == null);
        verify(eventManager, never()).publishEvent(eq(DomainEvent.UPDATE), any());
    }

    @Test
    public void shouldNotUpdate_domainIsDisabled_existingDomain() {
        final Domain existingDomain = new Domain();
        existingDomain.setId("domain-1");
        existingDomain.setEnabled(true);
        securityDomainManager.deploy(existingDomain);

        final Domain domain = new Domain();
        domain.setId("domain-1");
        domain.setEnabled(false);
        securityDomainManager.update(domain);

        verify(eventManager, times(1)).publishEvent(eq(DomainEvent.DEPLOY), any());
        verify(eventManager, times(1)).publishEvent(eq(DomainEvent.UNDEPLOY), any());
    }

    @Test
    public void shouldUpdate_domainIsEnabled() {
        final Domain domain = new Domain();
        domain.setId("domain-1");
        domain.setEnabled(true);
        securityDomainManager.update(domain);

        Assert.assertFalse(securityDomainManager.get(domain.getId()) == null);
        verify(eventManager, times(1)).publishEvent(eq(DomainEvent.UPDATE), any());
    }

    @Test
    public void shouldNotUndeployed_domainNotExist() {
        final Domain domain = new Domain();
        domain.setId("domain-1");
        domain.setEnabled(true);
        securityDomainManager.undeploy(domain.getId());

        verify(eventManager, never()).publishEvent(eq(DomainEvent.UNDEPLOY), any());
    }

    @Test
    public void shouldUndeployed() {
        final Domain existingDomain = new Domain();
        existingDomain.setId("domain-1");
        existingDomain.setEnabled(true);
        securityDomainManager.deploy(existingDomain);

        securityDomainManager.undeploy(existingDomain.getId());

        verify(eventManager, times(1)).publishEvent(eq(DomainEvent.UNDEPLOY), any());
    }
}


text:
using System;
using System.Collections.Generic;
using System.Text;

namespace AdefHelpDeskBase.Models
{
    public class DTOLog
    {
        public int LogID { get; set; }
        public int TaskID { get; set; }
        public string LogDescription { get; set; }
        public string DateCreated { get; set; }
        public string UserName { get; set; }
    }
}


text:
FFI bindings to certidl.

[Documentation](https://retep998.github.io/doc/certidl-sys/)


text:
(function () {
  'use strict';

  angular
    .module('races')
    .factory('RacesParticipationsService', RacesService);

  RacesService.$inject = ['$resource'];

  function RacesService($resource) {
    return $resource('api/races-participants/:raceId', {
      raceId: '@_id'
    }, {
      update: {
        method: 'PUT'
      }
    });
  }
})();


text:
namespace mx
{
    namespace core
    {

        MX_FORWARD_DECLARE_ATTRIBUTES( PartSymbolAttributes )
        MX_FORWARD_DECLARE_ELEMENT( PartSymbol )

        inline PartSymbolPtr makePartSymbol() { return std::make_shared<PartSymbol>(); }
		inline PartSymbolPtr makePartSymbol( const GroupSymbolValue& value ) { return std::make_shared<PartSymbol>( value ); }
		inline PartSymbolPtr makePartSymbol( GroupSymbolValue&& value ) { return std::make_shared<PartSymbol>( std::move( value ) ); }

        class PartSymbol : public ElementInterface
        {
        public:
            PartSymbol();
            PartSymbol( const GroupSymbolValue& value );

            virtual bool hasAttributes() const;
            virtual bool hasContents() const;
            virtual std::ostream& streamAttributes( std::ostream& os ) const;
            virtual std::ostream& streamName( std::ostream& os ) const;
            virtual std::ostream& streamContents( std::ostream& os, const int indentLevel, bool& isOneLineOnly ) const;
            PartSymbolAttributesPtr getAttributes() const;
            void setAttributes( const PartSymbolAttributesPtr& attributes );
            GroupSymbolValue getValue() const;
            void setValue( const GroupSymbolValue& value );

            private:
            virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement );

        private:
            GroupSymbolValue myValue;
            PartSymbolAttributesPtr myAttributes;
        };
    }
}


text:
package stan

import (
	"context"
	"github.com/nats-io/nats.go"
	"github.com/nats-io/stan.go"
	"os"
	"testing"

	ce_stan "github.com/cloudevents/sdk-go/protocol/stan/v2"
	"github.com/cloudevents/sdk-go/v2/binding"
	"github.com/cloudevents/sdk-go/v2/event"
	bindings "github.com/cloudevents/sdk-go/v2/protocol"
	"github.com/cloudevents/sdk-go/v2/protocol/test"
	. "github.com/cloudevents/sdk-go/v2/test"
	"github.com/google/uuid"
	"github.com/stretchr/testify/assert"
	"github.com/stretchr/testify/require"

	. "github.com/cloudevents/sdk-go/v2/binding/test"
)

const (
	TEST_CLUSTER_ID = "test-cluster"
	TEST_CLIENT_ID  = "my-client"
)

func TestSendStructuredMessagedToStructures(t *testing.T) {
	conn := testConn(t)
	defer conn.Close()

	type args struct {
		opts []ce_stan.ProtocolOption
	}
	tests := []struct {
		name string
		args args
	}{
		{
			name: "regular subscriber",
			args: args{
				opts: []ce_stan.ProtocolOption{
					ce_stan.WithConsumerOptions(
						ce_stan.WithSubscriptionOptions(
							stan.StartAtSequence(0),
						),
					),
				},
			},
		}, {
			name: "queue subscriber",
			args: args{
				opts: []ce_stan.ProtocolOption{
					ce_stan.WithConsumerOptions(
						ce_stan.WithQueueSubscriber(uuid.New().String()),
						ce_stan.WithSubscriptionOptions(
							stan.StartAtSequence(0),
						),
					),
				},
			},
		},
	}
	for _, tt := range tests {
		t.Run(tt.name, func(t *testing.T) {
			cleanup, s, r := testProtocol(t, conn, tt.args.opts...)
			defer cleanup()
			EachEvent(t, Events(), func(t *testing.T, eventIn event.Event) {
				eventIn = ConvertEventExtensionsToString(t, eventIn)

				in := MustCreateMockStructuredMessage(t, eventIn)

				test.SendReceive(t, binding.WithPreferredEventEncoding(context.TODO(), binding.EncodingStructured), in, s, r, func(out binding.Message) {
					eventOut := MustToEvent(t, context.Background(), out)
					assert.Equal(t, binding.EncodingStructured, out.ReadEncoding())
					AssertEventEquals(t, eventIn, ConvertEventExtensionsToString(t, eventOut))
				})
			})
		})
	}
}

func testConn(t testing.TB) *nats.Conn {
	t.Helper()
	// STAN connections actually connect to NATS, so the env var is named appropriately
	s := os.Getenv("TEST_NATS_SERVER")
	if s == "" {
		s = "nats://localhost:4222"
	}

	conn, err := nats.Connect(s)
	if err != nil {
		t.Skipf("Cannot create STAN client to NATS server [%s]: %v", s, err)
	}

	return conn
}

func testProtocol(t testing.TB, natsConn *nats.Conn, opts ...ce_stan.ProtocolOption) (func(), bindings.Sender,
	bindings.Receiver) {
	subject := "test-ce-client-" + uuid.New().String()

	// use NewProtocol rather than individual Consumer and Sender since this gives us more coverage
	p, err := ce_stan.NewProtocol(TEST_CLUSTER_ID, TEST_CLIENT_ID, subject, subject, ce_stan.StanOptions(stan.NatsConn(natsConn)), opts...)
	require.NoError(t, err)

	go func() {
		require.NoError(t, p.OpenInbound(context.TODO()))
	}()

	return func() {
		err = p.Close(context.TODO())
		require.NoError(t, err)
	}, p.Sender, p.Consumer
}

func BenchmarkSendReceive(b *testing.B) {
	conn := testConn(b)
	defer conn.Close()
	c, s, r := testProtocol(b, conn)
	defer c() // Cleanup
	test.BenchmarkSendReceive(b, s, r)
}


text:
from xsimlab.hook import RuntimeHook, runtime_hook

__all__ = ("ProgressBar",)

class ProgressBar(RuntimeHook):
    """
    Progress bar implementation using the tqdm package.

    Examples
    --------
    ProgressBar takes full advantage of :class:`RuntimeHook`.

    Call it as part of :meth:`xarray.Dataset.xsimlab.run`:

    >>> from xsimlab.monitoring import ProgressBar
    >>> out_ds = in_ds.xsimlab.run(model=model, hooks=[ProgressBar()])

    In a context manager using the ``with`` statement:

    >>> with ProgressBar():
    ...    out_ds = in_ds.xsimlab.run(model=model)

    Globally with ``register`` method:

    >>> pbar = ProgressBar()
    >>> pbar.register()
    >>> out_ds = in_ds.xsimlab.run(model=model)
    >>> pbar.unregister()

    """

    def __init__(self, frontend="auto", **kwargs):
        """
        Parameters
        ----------
        frontend : {"auto", "console", "gui", "notebook"}, optional
            Selects a frontend for displaying the progress bar. By default ("auto"),
            the frontend is chosen by guessing in which environment the simulation
            is run. The "console" frontend displays an ascii progress bar, while the
            "gui" frontend is based on matplotlib and the "notebook" frontend is based
            on ipywidgets.
        **kwargs : dict, optional
            Arbitrary keyword arguments for progress bar customization.
            See https://tqdm.github.io/docs/tqdm/.

        """
        if frontend == "auto":
            from tqdm.auto import tqdm
        elif frontend == "console":
            from tqdm import tqdm
        elif frontend == "gui":
            from tqdm.gui import tqdm
        elif frontend == "notebook":
            from tqdm.notebook import tqdm
        else:
            raise ValueError(
                f"Frontend argument {frontend!r} not supported. "
                "Please select one of the following: "
                ", ".join(["auto", "console", "gui", "notebook"])
            )

        self.custom_description = False
        if "desc" in kwargs.keys():
            self.custom_description = True

        self.tqdm = tqdm
        self.tqdm_kwargs = {"bar_format": "{bar} {percentage:3.0f}% | {desc} "}
        self.tqdm_kwargs.update(kwargs)

    @runtime_hook("initialize", trigger="pre")
    def init_bar(self, model, context, state):
        if self.custom_description:
            self.tqdm_kwargs.update(total=context["nsteps"] + 2)
        else:
            self.tqdm_kwargs.update(total=context["nsteps"] + 2, desc="initialize")
        self.pbar_model = self.tqdm(**self.tqdm_kwargs)

    @runtime_hook("initialize", trigger="post")
    def update_init(self, model, context, state):
        self.pbar_model.update(1)

    @runtime_hook("run_step", trigger="post")
    def update_run_step(self, model, context, state):
        if not self.custom_description:
            self.pbar_model.set_description_str(
                f"run step {context['step']}/{context['nsteps']}"
            )
        self.pbar_model.update(1)

    @runtime_hook("finalize", trigger="pre")
    def update_finalize(self, model, context, state):
        if not self.custom_description:
            self.pbar_model.set_description_str("finalize")

    @runtime_hook("finalize", trigger="post")
    def close_bar(self, model, context, state):
        self.pbar_model.update(1)
        elapsed_time = self.tqdm.format_interval(self.pbar_model.format_dict["elapsed"])
        self.pbar_model.set_description_str(f"Simulation finished in {elapsed_time}")
        self.pbar_model.close()


text:
package sifive.blocks.devices.chiplink

import Chisel.{defaultCompileOptions => _, _}
import freechips.rocketchip.util.CompileOptions.NotStrictInferReset
import freechips.rocketchip.tilelink._

class SinkB(info: ChipLinkInfo) extends Module
{
  val io = new Bundle {
    val b = Decoupled(new TLBundleB(info.edgeOut.bundle)).flip
    val q = Decoupled(new DataLayer(info.params))
  }

  // We need a Q because we stall the channel while serializing it's header
  val inject = Module(new PartialInjector(io.b.bits))
  inject.io.i <> Queue(io.b, 1, flow=true)
  inject.io.i_last := info.edgeOut.last(inject.io.i)
  val b = inject.io.o
  val b_last = inject.io.o_last
  val b_hasData = info.edgeOut.hasData(b.bits)
  val b_partial = b.bits.opcode === TLMessages.PutPartialData

  // A simple FSM to generate the packet components
  val state = RegInit(UInt(0, width = 2))
  val s_header   = UInt(0, width = 2)
  val s_address0 = UInt(1, width = 2)
  val s_address1 = UInt(2, width = 2)
  val s_data     = UInt(3, width = 2)

  when (io.q.fire()) {
    switch (state) {
      is (s_header)   { state := s_address0 }
      is (s_address0) { state := s_address1 }
      is (s_address1) { state := Mux(b_hasData, s_data, s_header) }
      is (s_data)     { state := Mux(!b_last,   s_data, s_header) }
    }
  }

  // Construct the header beat
  val header = info.encode(
    format = UInt(1),
    opcode = b.bits.opcode,
    param  = b.bits.param,
    size   = b.bits.size,
    domain = UInt(0), // ChipLink only allows one remote cache, in domain 0
    source = UInt(0))

  assert (!b.valid || b.bits.source === UInt(0))

  // Construct the address beats
  val address0 = b.bits.address
  val address1 = b.bits.address >> 32

  // Frame the output packet
  val isLastState = state === Mux(b_hasData, s_data, s_address1)
  b.ready := io.q.ready && isLastState
  io.q.valid := b.valid
  io.q.bits.last  := b_last && isLastState
  io.q.bits.data  := Vec(header, address0, address1, b.bits.data)(state)
  io.q.bits.beats := Mux(b_hasData, info.size2beats(b.bits.size), UInt(0)) + UInt(3) +
                     Mux(b_partial, info.mask2beats(b.bits.size), UInt(0))
}


text:
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
    <item android:state_pressed="true" android:state_enabled="true" android:color="@color/link_pressed" />
    <item android:color="@color/link"/>
</selector>


text:
const XLINK_NS = 'http://www.w3.org/1999/xlink';
const XLINK_HREF = 'xlink:href';
const CSS_CLASS_FLIPPED = 'flipped';
const CSS_CLASS_WIN = 'win';
const CSS_CLASS_FAIL = 'fail';
const CSS_CLASS_ROTATE = 'rotate';
const EVENT_ACTION = ('ontouchstart' in window) ? 'touchstart': 'click';

const list = document.getElementById('card_list');
const items = [].slice.call(document.getElementsByClassName('card'));
const itemsCount = items.length;

let cards = [];
let map = [];
let currentFlippedOne = null;
let currentFlippedTwo = null;
let match = 0;
let rounds = 0;
let retryHandler;

function setupMap() {
	cards = [];
	map = [];

	for (let i = 0; i < itemsCount; i++) {
		const front = items[i].querySelector('.front');
		const back = items[i].querySelector('.back');
		const inner = items[i].querySelector('.inner');

		cards.push({
			name: front.getAttribute('title'),
			front: front,
			back: back,
			inner: inner
		});

		front.setAttribute('title', '')
		front.children[0].setAttributeNS(XLINK_NS, XLINK_HREF, '');

		map.push(i);
	}
}

function flipCard(card) {

	if (card.classList.contains(CSS_CLASS_FLIPPED)) {
		return;
	}

	const index = items.indexOf(card);
	const indexMap = map.indexOf(index);

	const currentSet = cards[map[indexMap]];

	currentSet
		.front
		.setAttribute('title', currentSet.name);
	currentSet
		.front
		.children[0]
		.setAttributeNS(XLINK_NS, XLINK_HREF, '#' + currentSet.name);

	setTimeout(() => {
		if (!currentFlippedOne) {
			card.classList.add(CSS_CLASS_FLIPPED);
			currentFlippedOne = card;
		} else if (!currentFlippedTwo) {
			card.classList.add(CSS_CLASS_FLIPPED);
			currentFlippedTwo = card;

			setTimeout(() => {
				check();
			}, 1000);
		}
	}, 10);
}

function check() {
	rounds++;

	// not the same
	if (currentFlippedOne.querySelectorAll('.front')[0].getAttribute('title') !== currentFlippedTwo.querySelectorAll('.front')[0].getAttribute('title')) {
		currentFlippedOne.classList.add(CSS_CLASS_FAIL);
		currentFlippedTwo.classList.add(CSS_CLASS_FAIL);

		const one = currentFlippedOne;
		const two = currentFlippedTwo;

		currentFlippedOne = null;
		currentFlippedTwo = null;

		setTimeout(function() {
			fail(one, two);
		}, 1000);
	} else { // the same
		currentFlippedOne.classList.add(CSS_CLASS_WIN);
		currentFlippedTwo.classList.add(CSS_CLASS_WIN);
		currentFlippedOne = null;
		currentFlippedTwo = null;
		match += 2;

		// check if all cards are flipped
		if (match === itemsCount) {
			renderResult();
		}
	}
}

function renderResult() {
	list.classList.add(CSS_CLASS_ROTATE);

	const div = document.createElement('div');

	div.classList.add('overlay');
	div.innerHTML = `Comparisons: <strong>${rounds}</strong>.<br/>Click / Tap here to try again!`;

	retryHandler = function() {
		retry(div);
	};

	div.addEventListener(EVENT_ACTION, retryHandler);

	list.parentElement.appendChild(div);

	setTimeout(function() {
		list.classList.remove(CSS_CLASS_ROTATE);
	}, 2000);
}

function retry(element) {

	let i = itemsCount - 1;

	element.removeEventListener(EVENT_ACTION, retryHandler);
	element.parentNode.removeChild(element);

	list.classList.remove(CSS_CLASS_ROTATE);

	do {
		const item = items[i];
		item.classList.remove(CSS_CLASS_WIN);
		item.classList.remove(CSS_CLASS_FLIPPED);
		i--;
	} while (i > -1)

	setTimeout(sort, 1000);
}

function fail(one, two) {
	one.classList.remove(CSS_CLASS_FAIL);
	one.classList.remove(CSS_CLASS_FLIPPED);

	two.classList.remove(CSS_CLASS_FAIL);
	two.classList.remove(CSS_CLASS_FLIPPED);

	setTimeout(() => {
		if (!one.classList.contains(CSS_CLASS_FLIPPED)) {
			resetCard(one);
		}

		if (two.classList.contains(CSS_CLASS_FLIPPED)) {
			resetCard(two);
		}
	}, 1000);
}

// removes the front of a card
function resetCard(card) {
	const index = items.indexOf(card);
	const indexMap = map.indexOf(index);
	const currentSet = cards[map[indexMap]];

	if (card.classList.contains(CSS_CLASS_FLIPPED)) {
		return;
	}

	currentSet.front.setAttribute('title', '')
	currentSet.front.children[0].setAttributeNS(XLINK_NS, XLINK_HREF, '');

	cards[map[indexMap]] = currentSet;
}

// sort current set
function sort() {
	let item,
		done = [],
		n = null,
		l = itemsCount;

	rounds = 0;
	match = 0;

	do {
		n = Math.floor(Math.random() * (l + 1));

		if (done.indexOf(n) === -1) {
			item = items[n];

			if (item) {
				item.parentNode.removeChild(item);
				list.appendChild(item);
			}

			done.push(n);
		}
	} while (done.length <= l);

	setupMap();
}

sort();

// recursive search the dom for a specific nodename
function closest(element, search) {

	if (!element || !element.nodeName) {
		return null;
	}

	if (element.nodeName.toLowerCase() === search) {
		return element;
	} else {
		return closest(element.parentElement, search);
	}
}

function onCardInteraction(event) {
	const element = closest(event.target, 'li');

	if (element) {
		event.preventDefault();

		if (event.type !== 'mousedown') {
			flipCard(element);
		}
	}
}

// clicking a card
list.addEventListener(EVENT_ACTION, onCardInteraction);

// prevent dragging
list.addEventListener('mousedown', onCardInteraction);


text:
<!DOCTYPE html>

<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.css">
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <meta name="title" content="Create page with Bootstrap">
    <meta name="description" content="Create page with Bootstrap">
    <meta name="keywords" content="Create page with Bootstrap">
    <title>Bootstrap Page Builder</title>

    <link href="css/toolbox.css" rel="stylesheet">
    <link href="css/editor.css" rel="stylesheet">
    <link href="css/docs.min.css" rel="stylesheet">

    <link rel="shortcut icon" href="img/favicon.png">

          Bootstrap Page Builder

              <button onclick="resizeCanvas('lg')" class="btn btn-default navbar-btn"> </button>
              <button onclick="resizeCanvas('md')" class="btn btn-default navbar-btn"> </button>
              <button onclick="resizeCanvas('sm')" class="btn btn-default navbar-btn"> </button>
              <button onclick="resizeCanvas('xs')" class="btn btn-default navbar-btn"> </button>

              <button id="edit" class="btn btn-default navbar-btn">
                 Edit
              </button>
              <button type="button" class="btn btn-default navbar-btn" id="devpreview">
                 Developer
              </button>
              <button type="button" class="btn btn-default navbar-btn" id="sourcepreview" >
                 Preview
              </button>

              <button class="btn btn-default navbar-btn" href="#clear" id="clear" color="#333;">
                Clear
              </button>
              <button type="button" class="btn btn-primary navbar-btn" data-target="#downloadModal" rel="/build/downloadModal" role="button" data-toggle="modal">
                Download
              </button>

Help

TO CHANGE THE COLUMN CONFIGURATION YOU CAN EDIT THE DIFFERENT VALUES IN THE INPUT (THEY SHOULD ADD 12). IF YOU NEED MORE INFO PLEASE VISIT  BOOTSTRAP GRID SYSTEM

                   GRID SYSTEM

                    Remove Drag

                      <input value="12" type="text">

                    Remove Drag

                      <input value="4 4 4" type="text">

                    Remove Drag

                      <input value="2 10" type="text">

                    Remove Drag

                      <input value="3 9" type="text">

                    Remove Drag

                      <input value="4 8" type="text">

                   Remove Drag

                     <input value="6 6" type="text">

                    Remove Drag

                      <input value="8 4" type="text">

                    Remove Drag

                      <input value="9 3" type="text">

                    Remove Drag

                      <input value="10 2" type="text">

                   BASE CSS

Help

DRAG & DROP THE ELEMENTS INSIDE THE COLUMNS WHERE YOU WANT TO INSERT IT. AND FROM THERE, YOU CAN CONFIGURE THE STYLE OF THAT ELEMENT. IF YOU NEED MORE INFO PLEASE VISIT BASE CSS.

                    Remove Drag

                      <button type="button" class="btn btn-mini" data-target="#editorModal" role="button" data-toggle="modal">Editor</button>

                        Align

Default

Left

Center

Right

                        Emphasis

Default

Emphasized

Emphasized 2

Emphasized 3

Emphasized 4

Emphasized orange

Title

h3. Lorem ipsum dolor sit amet.

                    Remove Drag

                      <button type="button" class="btn btn-mini" data-target="#editorModal" role="button" data-toggle="modal">Editor</button>

                        Align

Default

Left

Center

Right

                        Emphasis

Default

muted

Warning

Error

Info

Success

                      Lead

Paragraph

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aliquam eget sapien sapien. Curabitur in metus urna. In hac habitasse platea dictumst. Phasellus eu sem sapien, sed vestibulum velit. Nam purus nibh, lacinia non faucibus et, pharetra in dolor. Sed iaculis posuere diam ut cursus. Morbi commodo sodales nisi id sodales. Proin consectetur, nisi id commodo imperdiet, metus nunc consequat lectus, id bibendum diam velit et dui. Proin massa magna, vulputate nec bibendum nec, posuere nec lacus. Aliquam mi erat, aliquam vel luctus eu, pharetra quis elit. Nulla euismod ultrices massa, et feugiat ipsum consequat eu.

                    Remove Drag
                    <button type="button" class="btn btn-mini" data-target="#editorModal" role="button" data-toggle="modal">Editor</button>

Address

                      <address contenteditable="true">
                        Twitter, Inc.

                        795 Folsom Ave, Suite 600

                        San Francisco, CA 94107

                        P: (123) 456-7890
                      </address>

                    Remove Drag  Pull Right

Blockquote

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer posuere erat a ante.

                        Someone famous Source Title

                      Remove

                    Drag

                      <button type="button" class="btn btn-mini" data-target="#editorModal" role="button" data-toggle="modal">Editor</button>

                         Bullets

Default

list-unstyled

list-rrows

.list-arrows.small

                      Inline

Unordered List

Lorem ipsum dolor sit amet

Consectetur adipiscing elit

Integer molestie lorem at massa

Facilisis in pretium nisl aliquet

Nulla volutpat aliquam velit

Faucibus porta lacus fringilla vel

Aenean sit amet erat nunc

Eget porttitor lorem

                    Remove Drag <button type="button" class="btn btn-mini" data-target="#editorModal" role="button" data-toggle="modal">Editor</button> Unstyled
                      Inline

Ordered List

Lorem ipsum dolor sit amet

Consectetur adipiscing elit

Integer molestie lorem at massa

Facilisis in pretium nisl aliquet

Nulla volutpat aliquam velit

Faucibus porta lacus fringilla vel

Aenean sit amet erat nunc

Eget porttitor lorem

                    Remove Drag <button type="button" class="btn btn-mini" data-target="#editorModal" role="button" data-toggle="modal">Editor</button> Horizontal

Description

Rolex

A description list is perfect for defining terms.

Euismod

Vestibulum id ligula porta felis euismod semper eget lacinia odio sem nec elit.

Donec id elit non mi porta gravida at eget metus.

Malesuada porta

Etiam porta sem malesuada magna mollis euismod.

Felis euismod semper eget lacinia

Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet risus.

                    Remove Drag

                        Styles

Default

Rounded

Circle

Polaroid

Image

                    Remove Drag

Dashboard

                      <button type="button" class="btn btn-mini" data-target="#editorModal" role="button" data-toggle="modal">Editor</button>

Dashboard

Label

              Something else

Label

              Something else

Label

              Something else

Label

              Something else

Section title

                  #
                  Header
                  Header
                  Header
                  Header

                  1,001
                  Lorem
                  ipsum
                  dolor
                  sit

                  1,002
                  amet
                  consectetur
                  adipiscing
                  elit

                  1,003
                  Integer
                  nec
                  odio
                  Praesent

                  1,003
                  libero
                  Sed
                  cursus
                  ante

                  1,004
                  dapibus
                  diam
                  Sed
                  nisi

                  1,005
                  Nulla
                  quis
                  sem
                  at

                  1,006
                  nibh
                  elementum
                  imperdiet
                  Duis

                  1,007
                  sagittis
                  ipsum
                  Praesent
                  mauris

                  1,008
                  Fusce
                  nec
                  tellus
                  sed

                  1,009
                  augue
                  semper
                  porta
                  Mauris

                  1,010
                  massa
                  Vestibulum
                  lacinia
                  arcu

                  1,011
                  eget
                  nulla
                  Class
                  aptent

                  1,012
                  taciti
                  sociosqu
                  ad
                  litora

                  1,013
                  torquent
                  per
                  conubia
                  nostra

                  1,014
                  per
                  inceptos
                  himenaeos
                  Curabitur

                  1,015
                  sodales
                  ligula
                  in
                  libero

                    Remove Drag

                      <button type="button" class="btn btn-mini" data-target="#editorModal" role="button" data-toggle="modal">Editor</button>

Color

                   Remove Drag

                    <button type="button" class="btn btn-mini" data-target="#editorModal" role="button" data-toggle="modal">Editor</button>

                        Styles

Large

Big

Medium

Normal

Small

Tiny

                        All the Icon

Font Awesome

                   FORMS

Help

DRAG & DROP THE ELEMENTS INSIDE THE COLUMNS WHERE YOU WANT TO INSERT IT. IF YOU NEED MORE INFO PLEASE VISIT FORM.

                    Remove Drag

                      <button type="button" class="btn btn-mini" data-target="#editorModal" role="button" data-toggle="modal">Editor</button>

Horizontal form

                <form id="form-horizontal">

                    Email

                      <input id="inputEmail" placeholder="Email" type="text">

                    Password

                      <input id="inputPassword" placeholder="Password" type="password">

                        <input type="checkbox">
                        Remember me
                      <button type="submit" class="btnform" contenteditable="true">Sign In</button>

                </form>

                    Remove Drag

                      <button type="button" class="btn btn-mini" data-target="#editorModal" role="button" data-toggle="modal">Editor</button>

                        Styles

Default

Success

Warning

Important

Info

Inverse

Label

                      Label

                    Remove Drag

Input

                      <input type="text" class='form-control'/>

                    Remove Drag

Password input

                      <input type="password" class='form-control' placeholder="insert your password here"/>

                    Remove Drag

Email input

                      <input type="email" class='form-control' placeholder="type your email here"/>

                    Remove Drag

Text Area

                      <textarea class='form-control'>Default text </textarea>

                    Remove Drag

Inline Checkbox

            <input type="checkbox" name="checkboxes" id="checkboxes-0" value="1"> 1

                <input type="checkbox" name="checkboxes" id="checkboxes-1" value="2">
                2

                <input type="checkbox" name="checkboxes" id="checkboxes-2" value="3">
                3

                <input type="checkbox" name="checkboxes" id="checkboxes-3" value="4">
                4

                    Remove Drag

Multiple Checkbox

              <input type="checkbox" name="checkboxes" id="checkboxes-0" value="1">
              Option one

              <input type="checkbox" name="checkboxes" id="checkboxes-1" value="2">
              Option two

                    Remove Drag

Inline Radio

              <input type="radio" name="radios" id="radios-0" value="1" checked="checked">
              1

              <input type="radio" name="radios" id="radios-1" value="2">
              2

              <input type="radio" name="radios" id="radios-2" value="3">
              3

              <input type="radio" name="radios" id="radios-3" value="4">
              4

                    Remove Drag

Multiple Radio

                <input type="radio" name="radios" id="radios-0" value="1" checked="checked">
                Option one

                <input type="radio" name="radios" id="radios-1" value="2">
                Option two

                    Remove Drag

Basic Select

          <select id="selectbasic" name="selectbasic" class="form-control">
            <option value="1">Option one</option>
            <option value="2">Option two</option>
          </select>

                    Remove Drag

Multiple Select

          <select id="selectmultiple" name="selectmultiple" class="form-control" multiple="multiple">
            <option value="1">Option one</option>
            <option value="2">Option two</option>
          </select>

                    Remove Drag

File Button

          <input id="filebutton" name="filebutton" class="input-file" type="file">

                    Remove Drag

                        Styles

Default

Primary

Info

Success

Warning

Danger

Inverse

Link

                        Size

Large

Default

Small

Mini

                      Block Disabled

Button

                      <button class="btn" type="button" contenteditable="true">Button</button>

                    Remove Drag <button type="button" class="btn btn-mini" data-target="#editorModal" role="button" data-toggle="modal">Editor</button> Dropup

Button Dropdowns

                        <button class="btn btn-default" contenteditable="true">Action</button>
                        <button data-toggle="dropdown" class="btn btn-default dropdown-toggle"></button>

Action

Another Action

Something Else here

                            More Option

Action

Another Action

Something Else here

                    Remove
                    Drag

Button Toolbar

                        <button class="btn btn-default">Back</button>
                        <button class="btn btn-primary">Continue</button>
                        bla

                   COMPONENTS

Help

DRAG & DROP THE ELEMENTS INSIDE THE COLUMNS WHERE YOU WANT TO INSERT IT. AND FROM THERE, YOU CAN CONFIGURE THE STYLE OF THAT COMPONENT. IF YOU NEED MORE INFO PLEASE VISIT COMPONENTS.

                    Remove Drag

                        Orientation

Default

Vertical

Button Group

                        <button class="btn" type="button"></button>
                        <button class="btn" type="button"></button>
                        <button class="btn" type="button"></button>
                        <button class="btn" type="button"></button>

                    Remove Drag

Pagination

                      <pagination>

                              1

                              2

                              3 of 43

                                next

                      </pagination>

                    Remove Drag

                      <button type="button" class="btn btn-mini" data-target="#editorModal" role="button" data-toggle="modal">Editor</button>

                        Styles

Default

Pills

                      Stacked

Navs

Home

Profile

Messages

                          Dropdown

Action

Another Action

Something else here

Separated Link

                    Remove Drag <button type="button" class="btn btn-mini" data-target="#editorModal" role="button" data-toggle="modal">Editor</button> Well

Navigation List

Headers

Home

Library

Application

Another List Header

Profile

Settings

Help

                    Remove Drag
                    <button type="button" class="btn btn-mini" data-target="#editorModal" role="button" data-toggle="modal">Editor</button>

Breadcrumb

Home /

Library /

Application

                    Remove Drag

                      <button type="button" class="btn btn-mini" data-target="#editorModal" role="button" data-toggle="modal">Editor</button>

                        Styles

Default

Success

Warning

Important

Info

Inverse

Badge

 1

                    Remove Drag <button type="button" class="btn btn-mini" data-target="#editorModal" role="button" data-toggle="modal">Editor</button> Well

Jumbotron

Hello, world!

This is a template for a simple marketing or information website.
                          It includes a large callout called the herop unit and three  supporting pieaces of content. Use iot as starting point to create something more unique

Learn More »

                    Remove Drag <button type="button" class="btn btn-mini" data-target="#editorModal" role="button" data-toggle="modal">Editor</button>

Jumbotron Narrow

Home

About

Contact

Project name

Jumbotron heading

Cras justo odio, dapibus ac facilisis in, egestas eget quam. Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet risus.

Sign up today

Subheading

Donec id elit non mi porta gravida at eget metus. Maecenas faucibus mollis interdum.

Subheading

Morbi leo risus, porta ac consectetur ac, vestibulum at eros. Cras mattis consectetur purus sit amet fermentum.

Subheading

Maecenas sed diam eget risus varius blandit sit amet non magna.

Subheading

Donec id elit non mi porta gravida at eget metus. Maecenas faucibus mollis interdum.

Subheading

Morbi leo risus, porta ac consectetur ac, vestibulum at eros. Cras mattis consectetur purus sit amet fermentum.

Subheading

Maecenas sed diam eget risus varius blandit sit amet non magna.

                    Remove Drag
                    <button type="button" class="btn btn-mini" data-target="#editorModal" role="button" data-toggle="modal">Editor</button>

Page Header

Example Page HeaderSubtext for header

                    Remove Drag
                    <button type="button" class="btn btn-mini" data-target="#editorModal" role="button" data-toggle="modal">Editor</button>

Text

Header

Bacon ipsum dolor sit amet doner ham leberkas short loin hamburger, flank drumstick corned beef. Doner meatball venison bresaola biltong chicken. Turkey bacon shoulder strip steak spare ribs tri-tip. Rump ground round strip steak kielbasa short loin t-bone. Biltong capicola corned beef, ribeye chuck andouille sausage ham hock turkey spare ribs beef tail sirloin shank.

View Deatils »

                    Remove Drag
                    <button type="button" class="btn btn-mini" data-target="#editorModal" role="button" data-toggle="modal">Editor</button>

Thumbnails

Thumbnail label

 Bacon ipsum dolor sit amet doner ham leberkas short loin hamburger, flank drumstick corned beef. Doner meatball venison bresaola biltong chicken. Turkey bacon shoulder strip steak spare ribs tri-tip. Rump ground round strip steak kielbasa short loin t-bone. Biltong capicola corned beef, ribeye chuck andouille sausage ham hock turkey spare ribs beef tail sirloin shank.

Action Action

Thumbnail label

 Bacon ipsum dolor sit amet doner ham leberkas short loin hamburger, flank drumstick corned beef. Doner meatball venison bresaola biltong chicken. Turkey bacon shoulder strip steak spare ribs tri-tip. Rump ground round strip steak kielbasa short loin t-bone. Biltong capicola corned beef, ribeye chuck andouille sausage ham hock turkey spare ribs beef tail sirloin shank.

Action Action

Thumbnail label

 Bacon ipsum dolor sit amet doner ham leberkas short loin hamburger, flank drumstick corned beef. Doner meatball venison bresaola biltong chicken. Turkey bacon shoulder strip steak spare ribs tri-tip. Rump ground round strip steak kielbasa short loin t-bone. Biltong capicola corned beef, ribeye chuck andouille sausage ham hock turkey spare ribs beef tail sirloin shank.

Action Action

                    Remove Drag

                        Colors

Default

Info

Success

Warning

Danger

                      Striped Active

Progress Bar

                    Remove Drag <button type="button" class="btn btn-mini" data-target="#editorModal" role="button" data-toggle="modal">Editor</button> Well

Media Object

Nested Media Header

                          Bacon ipsum dolor sit amet doner ham leberkas short loin hamburger, flank drumstick corned beef. Doner meatball venison bresaola biltong chicken. Turkey bacon shoulder strip steak spare ribs tri-tip. Rump ground round strip steak kielbasa short loin t-bone. Biltong capicola corned beef, ribeye chuck andouille sausage ham hock turkey spare ribs beef tail sirloin shank.

                    Remove Drag
                    <button type="button" class="btn btn-mini" data-target="#editorModal" role="button" data-toggle="modal">Editor</button>

List group

                        Home

List header

List group item heading

...

14Help

                        14Help

                    Remove Drag

                      <button type="button" class="btn btn-mini" data-target="#editorModal" role="button" data-toggle="modal">Editor</button>

                        Styles

Default

Primary

Success

Info

Warning

Danger

Panels

Panel title

                          Panel content

                          Panel footer

                    Remove Drag

                      <button type="button" class="btn btn-mini" data-target="#editorModal" role="button" data-toggle="modal">Editor</button>

                        Style

Default

Striped

Bordered

                      Hover Condensed

Table

                            #
                            Product
                            Payment Taken
                            Status

                            1
                            TB - Monthly
                            01/04/2012
                            Default

                            1
                            TB - Monthly
                            01/04/2012
                            Approved

                            2
                            TB - Monthly
                            02/04/2012
                            Declined

                            3
                            TB - Monthly
                            03/04/2012
                            Pending

                            4
                            TB - Monthly
                            04/04/2012
                            Call in to confirm

                   JAVASCRIPT

Help

DRAG & DROP THE ELEMENTS INSIDE THE COLUMNS WHERE YOU WANT TO INSERT IT. AND FROM THERE, YOU CAN CONFIGURE THE STYLE OF THAT JAVASCRIPT. IF YOU NEED MORE INFO PLEASE VISIT JAVASCRIPT.

                    Remove Drag

Modal

                      Launch Demo Modal

                          <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>

Title

 Bacon ipsum dolor sit amet doner ham leberkas short loin hamburger, flank drumstick corned beef. Doner meatball venison bresaola biltong chicken. Turkey bacon shoulder strip steak spare ribs tri-tip. Rump ground round strip steak kielbasa short loin t-bone. Biltong capicola corned beef, ribeye chuck andouille sausage ham hock turkey spare ribs beef tail sirloin shank.

                          <button class="btn" data-dismiss="modal" aria-hidden="true" contenteditable="true">Cancel</button>
                          <button class="btn btn-primary" contenteditable="true">Save Changes</button>

                    Remove Drag

                      <button type="button" class="btn btn-mini" data-target="#editorModal" role="button" data-toggle="modal">Editor</button> Inverse

                        Position

Default

Static to Top

Fixed to Top

Fixed to Bottom

Navbar

                                 Title

Home

Link

Link

                                  Dropdown

Action

Another Action

Action 3

NAV HEADER

Separated Link

One More Separated Link

Link

                                  Dropdown

Action

Another Action

Something Else Here

Separated Link

                    Remove Drag

                      <button type="button" class="btn btn-mini" data-target="#editorModal" role="button" data-toggle="modal">Editor</button>

                        Position

Default

Bottom

Left

Right

Tabs

Section 1

Section 2

Bacon ipsum dolor sit amet doner ham leberkas short loin hamburger, flank drumstick corned beef. Doner meatball venison bresaola biltong chicken. Turkey bacon shoulder strip steak spare ribs tri-tip. Rump ground round strip steak kielbasa short loin t-bone. Biltong capicola corned beef, ribeye chuck andouille sausage ham hock turkey spare ribs beef tail sirloin shank.

Sausage jerky hamburger, andouille salami meatloaf ham hock shank pork corned beef. Boudin spare ribs flank pork loin pork kevin chicken rump cow, ribeye ham tongue. Pork loin jowl filet mignon swine bresaola andouille doner tenderloin ball tip pork. Chicken meatball chuck turkey, jowl ham hamburger salami tenderloin jerky kevin capicola cow andouille. Pig tail pork filet mignon hamburger ham hock. Capicola brisket pork belly, doner cow pastrami corned beef.

                    Remove Drag

                      <button type="button" class="btn btn-mini" data-target="#editorModal" role="button" data-toggle="modal">Editor</button>

                        Position

Default

Bottom

Left

Right

4 tabs

Section 1

Section 2

Section 3

Section 4

Bacon ipsum dolor sit amet doner ham leberkas short loin hamburger, flank drumstick corned beef. Doner meatball venison bresaola biltong chicken. Turkey bacon shoulder strip steak spare ribs tri-tip. Rump ground round strip steak kielbasa short loin t-bone. Biltong capicola corned beef, ribeye chuck andouille sausage ham hock turkey spare ribs beef tail sirloin shank.

Sausage jerky hamburger, andouille salami meatloaf ham hock shank pork corned beef. Boudin spare ribs flank pork loin pork kevin chicken rump cow, ribeye ham tongue. Pork loin jowl filet mignon swine bresaola andouille doner tenderloin ball tip pork. Chicken meatball chuck turkey, jowl ham hamburger salami tenderloin jerky kevin capicola cow andouille. Pig tail pork filet mignon hamburger ham hock. Capicola brisket pork belly, doner cow pastrami corned beef.

Bacon ipsum dolor sit amet doner ham leberkas short loin hamburger, flank drumstick corned beef. Doner meatball venison bresaola biltong chicken. Turkey bacon shoulder strip steak spare ribs tri-tip. Rump ground round strip steak kielbasa short loin t-bone. Biltong capicola corned beef, ribeye chuck andouille sausage ham hock turkey spare ribs beef tail sirloin shank.

Sausage jerky hamburger, andouille salami meatloaf ham hock shank pork corned beef. Boudin spare ribs flank pork loin pork kevin chicken rump cow, ribeye ham tongue. Pork loin jowl filet mignon swine bresaola andouille doner tenderloin ball tip pork. Chicken meatball chuck turkey, jowl ham hamburger salami tenderloin jerky kevin capicola cow andouille. Pig tail pork filet mignon hamburger ham hock. Capicola brisket pork belly, doner cow pastrami corned beef.

                    Remove Drag

                        Styles

Default

Info

Error

Success

Alerts

                        <button type="button" class="close" data-dismiss="alert">×</button>

Alert!

                        Warning! Bacon ipsum dolor sit amet ground round culpa elit, irure incididunt short ribs tongue sed.

                    Remove Drag
                    <button type="button" class="btn btn-mini" data-target="#editorModal" role="button" data-toggle="modal">Editor</button>

Collapse

 Group Item  #1

Bacon ipsum dolor sit amet ground round culpa elit, irure incididunt short ribs tongue sed. Chicken swine cupidatat deserunt. Tongue short ribs bacon bresaola sausage. Rump biltong ribeye tri-tip tenderloin kielbasa. Meatloaf consequat voluptate dolor pork belly t-bone, turducken cow sunt sint.

  Group Item #2

 Flank drumstick culpa ground round mollit enim turducken eu bacon pork chop. Prosciutto short loin est short ribs drumstick pork loin salami cillum hamburger beef excepteur veniam meatloaf. Turducken consectetur jowl occaecat eu pancetta sunt ut pork loin. Non shank boudin frankfurter bresaola.

                    Remove Drag
                    <button type="button" class="btn btn-mini" data-target="#editorModal" role="button" data-toggle="modal">Editor</button>

Carousel

First Thumbnail Label

Bacon ipsum dolor sit amet ground round culpa elit, irure incididunt short ribs tongue sed. Chicken swine cupidatat deserunt. Tongue short ribs bacon bresaola sausage. Rump biltong ribeye tri-tip tenderloin kielbasa. Meatloaf consequat voluptate dolor pork belly t-bone, turducken cow sunt sint.

Second Thumbnail Label

Flank drumstick culpa ground round mollit enim turducken eu bacon pork chop. Prosciutto short loin est short ribs drumstick pork loin salami cillum hamburger beef excepteur veniam meatloaf. Turducken consectetur jowl occaecat eu pancetta sunt ut pork loin. Non shank boudin frankfurter bresaola.

Third Thumbnail Label

Veniam in aute, consequat hamburger mollit nisi leberkas chuck ut prosciutto drumstick short loin frankfurter. Aute salami duis voluptate magna kielbasa swine in. Magna pancetta chuck, aliqua laboris ribeye consectetur jerky prosciutto culpa voluptate brisket sausage bresaola. Jerky ut hamburger tempor, ribeye qui pastrami veniam shoulder.

                        ‹ ›

              remove
              drag

9 3

                      Remove Drag <button type="button" class="btn btn-mini" data-target="#editorModal" role="button" data-toggle="modal">Editor</button> Well

Jumbotron

Hello, world!

This is a template for a simple marketing or informational website.

 It includes a large callout called the hero unit and three supporting pieces of content.

                          Use it as a starting point to create something more unique.

          ×

Save your Layout

            <textarea id="contenteditor"></textarea>

 Save Cancel

          ×

Save

Choose how to save your layout

            <button type="button" id="fluidPage" class="active btn btn-info"> Fluid Page</button>
            <button type="button" class="btn btn-info" id="fixedPage"> Fixed page</button>

            <textarea></textarea>

 Save


text:
L.TileLayer.WMS.Util.JSON = {
  parse: window.JSON ? window.JSON.parse : function (jsonString) {
    return eval('(' + jsonString + ')');
  }
};


text:
module LeapYearKata.Day4Spec (spec) where

    import Test.Hspec
    import LeapYearKata.Day4 (isLeapYear)

    spec :: Spec
    spec = do
        it "is a leap year when divisible by 4" $ do
            isLeapYear 1996 `shouldBe` True

        it "is not a leap year when not divisible by 4" $ do
            isLeapYear 2015 `shouldBe` False

        it "is not a leap year when divisible by 100" $ do
            isLeapYear 1900 `shouldBe` False

        it "is a leap year when divisible by 400" $ do
            isLeapYear 2000 `shouldBe` True


text:
<!DOCTYPE html>

    <title>MSErrorLogSetting Enum Reference</title>
    <link rel="stylesheet" type="text/css" href="../css/jazzy.css" />
    <link rel="stylesheet" type="text/css" href="../css/highlight.css" />
    <meta charset='utf-8'>

Crashes Docs (68% documented)

View on GitHub

Install in Dash

        Crashes Reference

        MSErrorLogSetting Enum Reference

            Enums

                MSErrorLogSetting

                MSUserConfirmation

            Type Definitions

                MSUserConfirmationHandler

MSErrorLogSetting

enum MSErrorLogSetting : NSUInteger {}

Error Logging status.

                    MSErrorLogSettingDisabled

Crash reporting is disabled.

Declaration

Objective-C

MSErrorLogSettingDisabled = 0

                    MSErrorLogSettingAlwaysAsk

User is asked each time before sending error logs.

Declaration

Objective-C

MSErrorLogSettingAlwaysAsk = 1

                    MSErrorLogSettingAutoSend

Each error log is send automatically.

Declaration

Objective-C

MSErrorLogSettingAutoSend = 2

© 2016 Microsoft Corp. All rights reserved. (Last updated: 2016-12-02)

Generated by jazzy ♪♫ v0.7.3, a Realm project.


text:
<!doctype html>

  <title>Physics Concepts</title>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1">

  <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/latest/css/bootstrap.min.css">
  <link href="//cdnjs.cloudflare.com/ajax/libs/KaTeX/0.7.1/katex.min.css" rel="stylesheet">


text:
[jvm]
Content
open override val [wrapperType](wrapper-type.md): [KoresType](../-kores-type/index.md)?
More info

Only determine the Wrapper type if:

isKoresType && bounds.isEmpty

Because int<T> is invalid.