text:
<?php

namespace backend\controllers;

use Yii;
use app\models\Cards;
use app\models\SearchCards;
use yii\web\Controller;
use yii\web\NotFoundHttpException;
use yii\filters\VerbFilter;
use yii\web\ForbiddenHttpException;

/**
 * CardsController implements the CRUD actions for Cards model.
 */
class CardsController extends Controller
{
    public function behaviors()
    {
        return [
            'verbs' => [
                'class' => VerbFilter::className(),
                'actions' => [
                    'delete' => ['post'],
                ],
            ],
        ];
    }

    /**
     * Lists all Cards models.
     * @return mixed
     */

    public function actionIndex()
    {
        if(Yii::$app->user->identity->username != "admin")
            throw new ForbiddenHttpException('Доступ запрещен');

        $searchModel = new SearchCards();
        $dataProvider = $searchModel->search(Yii::$app->request->queryParams);

        return $this->render('index', [
            'searchModel' => $searchModel,
            'dataProvider' => $dataProvider,
        ]);
    }

    /**
     * Displays a single Cards model.
     * @param integer $id
     * @return mixed
     */
    public function actionView($id)
    {
        return $this->render('view', [
            'model' => $this->findModel($id),
        ]);
    }

    /**
     * Creates a new Cards model.
     * If creation is successful, the browser will be redirected to the 'view' page.
     * @return mixed
     */
    public function actionCreate()
    {
        $model = new Cards();

        if ($model->load(Yii::$app->request->post()) && $model->save()) {
            return $this->redirect(['view', 'id' => $model->id]);
        } else {
            return $this->render('create', [
                'model' => $model,
            ]);
        }
    }

    public function actionAdd() {
        $session = Yii::$app->session;
        if(!Yii::$app->request->get('cardID') || mb_strlen(Yii::$app->request->get('fio')) < 10) {
            $session['error_add'] += 1;
            return $this->redirect('/');
        }
        if(!$session->get('session_order')) $session['session_order'] = rand(1000,10000);
        if(!$session->get('cart')) $session['cart'] = new \ArrayObject;
        if(!$session->get('cart_fio')) $session['cart_fio'] = new \ArrayObject;
        $thisCard = Cards::find()->where(['id' => Yii::$app->request->get('cardID')])->one();
        $session['cards'] += 1;
        $session['fullcost'] += $thisCard->cost;
        $session['cart'][] = Yii::$app->request->get('cardID');
        $session['cart_fio'][] = Yii::$app->request->get('fio');
        return $this->redirect('/');
    }
    public function actionClear() {
        $session = Yii::$app->session;
        $session->remove('cards');
        $session->remove('session_order');
        $session->remove('cart');
        $session->remove('cart_fio');
        $session->remove('fullcost');
        return $this->redirect('/');
    }

    /**
     * Updates an existing Cards model.
     * If update is successful, the browser will be redirected to the 'view' page.
     * @param integer $id
     * @return mixed
     */
    public function actionUpdate($id)
    {
        $model = $this->findModel($id);

        if ($model->load(Yii::$app->request->post()) && $model->save()) {
            return $this->redirect(['view', 'id' => $model->id]);
        } else {
            return $this->render('update', [
                'model' => $model,
            ]);
        }
    }

    /**
     * Deletes an existing Cards model.
     * If deletion is successful, the browser will be redirected to the 'index' page.
     * @param integer $id
     * @return mixed
     */
    public function actionDelete($id)
    {
        $this->findModel($id)->delete();

        return $this->redirect(['index']);
    }

    /**
     * Finds the Cards model based on its primary key value.
     * If the model is not found, a 404 HTTP exception will be thrown.
     * @param integer $id
     * @return Cards the loaded model
     * @throws NotFoundHttpException if the model cannot be found
     */
    protected function findModel($id)
    {
        if (($model = Cards::findOne($id)) !== null) {
            return $model;
        } else {
            throw new NotFoundHttpException('The requested page does not exist.');
        }
    }
}


text:
package geom

//LineString is a two-dimensional geometry representing a multi-vertex line
type LineString []Point

//LineStringZ is a three-dimensional geometry representing a multi-vertex line
type LineStringZ []PointZ

//LineStringM is a two-dimensional geometry representing a multi-vertex line, with an additional value defined on each vertex
type LineStringM []PointM

//LineStringZM is a three-dimensional geometry representing a multi-vertex line, with an additional value defined on each vertex
type LineStringZM []PointZM

//Envelope returns an envelope around the line
func (l LineString) Envelope() *Envelope {
	e := NewEnvelope()
	for _, pt := range l {
		e.ExtendPoint(pt)
	}
	return e
}

//Envelope returns an envelope around the line
func (l LineStringZ) Envelope() *Envelope {
	e := NewEnvelope()
	for _, pt := range l {
		e.ExtendPoint(pt.Point)
	}
	return e
}

//EnvelopeZ returns an envelope around the line
func (l LineStringZ) EnvelopeZ() *EnvelopeZ {
	e := NewEnvelopeZ()
	for _, pt := range l {
		e.ExtendPoint(pt)
	}
	return e
}

//Envelope returns an envelope around the line
func (l LineStringM) Envelope() *Envelope {
	e := NewEnvelope()
	for _, pt := range l {
		e.ExtendPoint(pt.Point)
	}
	return e
}

//EnvelopeM returns an envelope around the line
func (l LineStringM) EnvelopeM() *EnvelopeM {
	e := NewEnvelopeM()
	for _, pt := range l {
		e.ExtendPoint(pt)
	}
	return e
}

//Envelope returns an envelope around the line
func (l LineStringZM) Envelope() *Envelope {
	e := NewEnvelope()
	for _, pt := range l {
		e.ExtendPoint(pt.PointZ.Point)
	}
	return e
}

//EnvelopeZ returns an envelope around the line
func (l LineStringZM) EnvelopeZ() *EnvelopeZ {
	e := NewEnvelopeZ()
	for _, pt := range l {
		e.ExtendPoint(pt.PointZ)
	}
	return e
}

//EnvelopeM returns an envelope around the line
func (l LineStringZM) EnvelopeM() *EnvelopeM {
	e := NewEnvelopeM()
	for _, pt := range l {
		e.ExtendPoint(PointM{Point: pt.Point, M: pt.M})
	}
	return e
}

//EnvelopeZM returns an envelope around the line
func (l LineStringZM) EnvelopeZM() *EnvelopeZM {
	e := NewEnvelopeZM()
	for _, pt := range l {
		e.ExtendPoint(pt)
	}
	return e
}

//Clone returns a deep copy of the line
func (l LineString) Clone() Geometry {
	return &l
}

//Clone returns a deep copy of the line
func (l LineStringZ) Clone() Geometry {
	return &l
}

//Clone returns a deep copy of the line
func (l LineStringM) Clone() Geometry {
	return &l
}

//Clone returns a deep copy of the line
func (l LineStringZM) Clone() Geometry {
	return &l
}

//Iterate walks over the points (and can modify in situ) the line
func (l LineString) Iterate(f func([]Point) error) error {
	return f(l)
}

//Iterate walks over the points (and can modify in situ) the line
func (l LineStringZ) Iterate(f func([]Point) error) error {
	points := make([]Point, len(l))
	for i := range l {
		points[i] = l[i].Point
	}
	err := f(points)
	for i := range l {
		l[i].Point = points[i]
	}
	return err
}

//Iterate walks over the points (and can modify in situ) the line
func (l LineStringM) Iterate(f func([]Point) error) error {
	points := make([]Point, len(l))
	for i := range l {
		points[i] = l[i].Point
	}
	err := f(points)
	for i := range l {
		l[i].Point = points[i]
	}
	return err
}

//Iterate walks over the points (and can modify in situ) the line
func (l LineStringZM) Iterate(f func([]Point) error) error {
	points := make([]Point, len(l))
	for i := range l {
		points[i] = l[i].Point
	}
	err := f(points)
	for i := range l {
		l[i].Point = points[i]
	}
	return err
}

redpajama_set_name: RedPajamaGithub


text:
//-----------------------------------------------------------------------------
// File:  KeywordlistIterator.h
//
// License:  See top level LICENSE.txt file.
//
// Author:  David Burken
//
// Description: SWIG readable iterator for Keywordlist wrapper class.
//
//-----------------------------------------------------------------------------
// $Id$

#ifndef omsKeywordlistIterator_HEADER
#define omsKeywordlistIterator_HEADER 1

#include <oms/Constants.h>
#include <map>
#include <string>
#include <mutex>

namespace oms
{
   class Keywordlist;
   class StringPair;

   /**
    * @class KeywordlistIterator
    *
    * SWIG readable iterator for Keywordlist wrapper class.  Used to iterate
    * through the underlying std::map<std::string, std::string>.
    *
    * See org.ossim.jni.test.InfoTest.java for example of usage.
    */
   class OMSDLL KeywordlistIterator
   {
   public:

      typedef std::map<std::string, std::string> StringPairMap;

      /**
       * @brief default constructor
       * un-initialized...
       */
      KeywordlistIterator();

      /**
       * @brief Constructor
       * Does not own memory.
       */
      KeywordlistIterator(oms::Keywordlist* kwl);

      /**
       * @brief copy constructor
       * @param iter KeywordlistIterator to initialize from.
       */
      KeywordlistIterator(const oms::KeywordlistIterator& iter);

      /**
       * @brief Assignment operator.
       * @param iter KeywordlistIterator to assign from.
       */
      const KeywordlistIterator& operator=(
         const oms::KeywordlistIterator& iter );

      /** @brief destructor */
      ~KeywordlistIterator();

      /**
       * @brief Initialize method.
       * @param kwl Our Keywordlist.
       */
      void initialize(oms::Keywordlist* kwl);

      /** @return Moves iterartor to beginning. */
      void reset();

      /** @brief Increments iterator. */
      void next();

      /** @return true when iterator is at end. */
      bool end() const;

      /** @return Key for current iterator. */
      std::string getKey() const;

      /** @return Value for current iterator. */
      std::string getValue() const;

      /**
       * @brief Get string pair with key and value for current iterator.
       * @param pair Initialized by this call.
       * @note pointer passed in must be valid.*/
      void getKeyValue(oms::StringPair* pair) const;

   private:

      Keywordlist*            m_kwl;
      StringPairMap::iterator m_iter;
      mutable std::mutex      m_mutex;
   };

} // End of namespace oms.

#endif /* #ifndef omsKeywordlist_HEADER */


text:
// @@@ START COPYRIGHT @@@
//
// Licensed to the Apache Software Foundation (ASF) under one
// or more contributor license agreements.  See the NOTICE file
// distributed with this work for additional information
// regarding copyright ownership.  The ASF licenses this file
// to you under the Apache License, Version 2.0 (the
// "License"); you may not use this file except in compliance
// with the License.  You may obtain a copy of the License at
//
//   http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing,
// software distributed under the License is distributed on an
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
// KIND, either express or implied.  See the License for the
// specific language governing permissions and limitations
// under the License.
//
// @@@ END COPYRIGHT @@@

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "sqludr.h"

extern "C" {

/* genPhoneNumber */
SQLUDR_LIBFUNC SQLUDR_INT32 genPhoneNumber(SQLUDR_INT32 *in1, // seed
                                           SQLUDR_CHAR *in2, // areacode
                                           SQLUDR_CHAR *out,
                                           SQLUDR_INT16 *in1Ind,
                                           SQLUDR_INT16 *in2Ind,
                                           SQLUDR_INT16 *outInd,
                                           SQLUDR_TRAIL_ARGS)
{
  if (calltype == SQLUDR_CALLTYPE_FINAL)
    return SQLUDR_SUCCESS;

  std::string result (in2);
  if (*in1Ind == SQLUDR_NULL || *in2Ind == SQLUDR_NULL)
  {
    *outInd = SQLUDR_NULL;
  }
  else
  {
    srand(*in1);
    int number = 7;  // 7 digit phone number
    for (int i = 0; i < number; i++)
    {
      int randNumber = rand() %10;
      if (i == 0 && randNumber == 0)
        randNumber++;
      switch (randNumber)
      {
         case 0: result += '0'; break;
         case 1: result += '1'; break;
         case 2: result += '2'; break;
         case 3: result += '3'; break;
         case 4: result += '4'; break;
         case 5: result += '5'; break;
         case 6: result += '6'; break;
         case 7: result += '7'; break;
         case 8: result += '8'; break;
         default : result += '9'; break;
      }
    }
  }

  strcpy(out, result.c_str());
  return SQLUDR_SUCCESS;
}

/* genRandomNumber */
SQLUDR_LIBFUNC SQLUDR_INT32 genRandomNumber(SQLUDR_INT32 *in1,
                                            SQLUDR_INT32 *in2,
                                            SQLUDR_CHAR *out,
                                            SQLUDR_INT16 *in1Ind,
                                            SQLUDR_INT16 *in2Ind,
                                            SQLUDR_INT16 *outInd,
                                            SQLUDR_TRAIL_ARGS)
{
  if (calltype == SQLUDR_CALLTYPE_FINAL)
    return SQLUDR_SUCCESS;

  std::string result;
  if (*in1Ind == SQLUDR_NULL || *in2Ind == SQLUDR_NULL)
  {
    *outInd = SQLUDR_NULL;
  }
  else
  {
    int number = *in2;
    for (int i = 0; i < number; i++)
    {
      int randNumber = rand() %10;
      if (i == 0 && randNumber == 0)
        randNumber++;
      switch (randNumber)
      {
         case 0: result += '0'; break;
         case 1: result += '1'; break;
         case 2: result += '2'; break;
         case 3: result += '3'; break;
         case 4: result += '4'; break;
         case 5: result += '5'; break;
         case 6: result += '6'; break;
         case 7: result += '7'; break;
         case 8: result += '8'; break;
         default : result += '9'; break;
      }
    }
  }

  strcpy(out, result.c_str());
  return SQLUDR_SUCCESS;
}

SQLUDR_LIBFUNC SQLUDR_INT32 genTimestamp(SQLUDR_INT64 *in1,
                                         SQLUDR_INT32 *in2,
                                         SQLUDR_INT64 *in3,
                                         SQLUDR_INT64 *out,
                                         SQLUDR_INT16 *in1Ind,
                                         SQLUDR_INT16 *in2Ind,
                                         SQLUDR_INT16 *in3Ind,
                                         SQLUDR_INT16 *outInd,
                                         SQLUDR_TRAIL_ARGS)
{
  if (calltype == SQLUDR_CALLTYPE_FINAL)
    return SQLUDR_SUCCESS;

  // in1 - seed
  // in2 - number days ahead to generate time
  // in3 - julian time of start day

  // 86400000000 is one day
  long day = 86400000000;
  long hour = day/24;
  long min = hour/60;
  long seconds = min/60;

  long starttime = *in3;
  int numberDays = *in2;
  long low = starttime;
  long high = starttime * numberDays;
  long randNumber = low;

  if (*in1Ind == SQLUDR_NULL ||
      *in2Ind == SQLUDR_NULL ||
      *in3Ind == SQLUDR_NULL)
  {
    *outInd = SQLUDR_NULL;
  }
  else
  {
     // Generate a random timestamp between the above values
     srand(*in1);
     int randDay = rand() %(60 - 1) + 1; // day increment
     int randHour = rand() %(24); // hour increment
     int randMin = rand() %(60);  // min increment
     int randSec = rand() %(60 - 1) + 1; // seconds increment
     randNumber = low + (day * randDay) + (hour * randHour) +
                  (min * randMin) + (seconds * randSec) ;
  }

  *out = randNumber;
  return SQLUDR_SUCCESS;
}

} /* extern "C" */


text:
layout: post
date: '2016-02-24'
title: "Long Alfred Sung by Dessy Bridesmaids Dress D625"
category: Long
tags: [Long]
---
### Long Alfred Sung by Dessy Bridesmaids Dress D625
Just **$226.99**
###

Buy it: [https://www.eudances.com/en/long/1917-alfred-sung-by-dessy-bridesmaids-dress-d625.html](https://www.eudances.com/en/long/1917-alfred-sung-by-dessy-bridesmaids-dress-d625.html)


text:
from strikepackage.strikepackage import main

if __name__ == '__main__':
    main()


text:
<!DOCTYPE html>

    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta name="description" content="">
    <meta name="author" content="">
    <link rel="icon" href="img/radar.png">

    <title>CometRadar - Routes</title>

    <link href="css/bootstrap.min.css" rel="stylesheet">
    <link href="css/background.css" rel="stylesheet">
    <link href="css/dashboard.css" rel="stylesheet">

          <button class="navbar-toggle" type="button" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar">
            Toggle navigation

          </button>

Dashboard

Statistics

              Routes

View Routes

Delete Routes

Add Routes

Accounts

Log Out

Delete Routes


text:
require 'chefspec'

describe 'subversion::export' do
  platform 'ubuntu'

  describe 'exports a subversion with an explicit action' do
    it { is_expected.to export_subversion('/tmp/explicit_action') }
    it { is_expected.to_not export_subversion('/tmp/not_explicit_action') }
  end

  describe 'exports a subversion with attributes' do
    it { is_expected.to export_subversion('/tmp/with_attributes').with(repository: 'ssh://subversion.path') }
    it { is_expected.to_not export_subversion('/tmp/with_attributes').with(repository: 'ssh://subversion.other_path') }
  end

  describe 'exports a subversion when specifying the identity attribute' do
    it { is_expected.to export_subversion('/tmp/identity_attribute') }
  end
end


text:
set -eu
osc config view --flatten -o template -t '{{with index .users 0}}{{.user.token}}{{end}}'


text:
SYNONYM

#### According to
The Catalogue of Life, 3rd January 2011

#### Published in
null

#### Original name
Crepidotus septicus

### Remarks
null


text:
package uuid

import (
	"bytes"
	"crypto/rand"
	"encoding/hex"
	"errors"
	"fmt"
	"io"
	"strings"
	"sync"
)

// A UUID is a 128 bit (16 byte) Universal Unique IDentifier as defined in RFC
// 4122.
type UUID [16]byte

// A Version represents a UUID's version.
type Version byte

// A Variant represents a UUID's variant.
type Variant byte

// Constants returned by Variant.
const (
	Invalid   = Variant(iota) // Invalid UUID
	RFC4122                   // The variant specified in RFC4122
	Reserved                  // Reserved, NCS backward compatibility.
	Microsoft                 // Reserved, Microsoft Corporation backward compatibility.
	Future                    // Reserved for future definition.
)

const randPoolSize = 16 * 16

var (
	rander      = rand.Reader // random function
	poolEnabled = false
	poolMu      sync.Mutex
	poolPos     = randPoolSize     // protected with poolMu
	pool        [randPoolSize]byte // protected with poolMu
)

type invalidLengthError struct{ len int }

func (err invalidLengthError) Error() string {
	return fmt.Sprintf("invalid UUID length: %d", err.len)
}

// IsInvalidLengthError is matcher function for custom error invalidLengthError
func IsInvalidLengthError(err error) bool {
	_, ok := err.(invalidLengthError)
	return ok
}

// Parse decodes s into a UUID or returns an error.  Both the standard UUID
// forms of xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx and
// urn:uuid:xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx are decoded as well as the
// Microsoft encoding {xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx} and the raw hex
// encoding: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx.
func Parse(s string) (UUID, error) {
	var uuid UUID
	switch len(s) {
	// xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
	case 36:

	// urn:uuid:xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
	case 36 + 9:
		if strings.ToLower(s[:9]) != "urn:uuid:" {
			return uuid, fmt.Errorf("invalid urn prefix: %q", s[:9])
		}
		s = s[9:]

	// {xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx}
	case 36 + 2:
		s = s[1:]

	// xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
	case 32:
		var ok bool
		for i := range uuid {
			uuid[i], ok = xtob(s[i*2], s[i*2+1])
			if !ok {
				return uuid, errors.New("invalid UUID format")
			}
		}
		return uuid, nil
	default:
		return uuid, invalidLengthError{len(s)}
	}
	// s is now at least 36 bytes long
	// it must be of the form  xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
	if s[8] != '-' || s[13] != '-' || s[18] != '-' || s[23] != '-' {
		return uuid, errors.New("invalid UUID format")
	}
	for i, x := range [16]int{
		0, 2, 4, 6,
		9, 11,
		14, 16,
		19, 21,
		24, 26, 28, 30, 32, 34} {
		v, ok := xtob(s[x], s[x+1])
		if !ok {
			return uuid, errors.New("invalid UUID format")
		}
		uuid[i] = v
	}
	return uuid, nil
}

// ParseBytes is like Parse, except it parses a byte slice instead of a string.
func ParseBytes(b []byte) (UUID, error) {
	var uuid UUID
	switch len(b) {
	case 36: // xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
	case 36 + 9: // urn:uuid:xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
		if !bytes.Equal(bytes.ToLower(b[:9]), []byte("urn:uuid:")) {
			return uuid, fmt.Errorf("invalid urn prefix: %q", b[:9])
		}
		b = b[9:]
	case 36 + 2: // {xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx}
		b = b[1:]
	case 32: // xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
		var ok bool
		for i := 0; i < 32; i += 2 {
			uuid[i/2], ok = xtob(b[i], b[i+1])
			if !ok {
				return uuid, errors.New("invalid UUID format")
			}
		}
		return uuid, nil
	default:
		return uuid, invalidLengthError{len(b)}
	}
	// s is now at least 36 bytes long
	// it must be of the form  xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
	if b[8] != '-' || b[13] != '-' || b[18] != '-' || b[23] != '-' {
		return uuid, errors.New("invalid UUID format")
	}
	for i, x := range [16]int{
		0, 2, 4, 6,
		9, 11,
		14, 16,
		19, 21,
		24, 26, 28, 30, 32, 34} {
		v, ok := xtob(b[x], b[x+1])
		if !ok {
			return uuid, errors.New("invalid UUID format")
		}
		uuid[i] = v
	}
	return uuid, nil
}

// MustParse is like Parse but panics if the string cannot be parsed.
// It simplifies safe initialization of global variables holding compiled UUIDs.
func MustParse(s string) UUID {
	uuid, err := Parse(s)
	if err != nil {
		panic(`uuid: Parse(` + s + `): ` + err.Error())
	}
	return uuid
}

// FromBytes creates a new UUID from a byte slice. Returns an error if the slice
// does not have a length of 16. The bytes are copied from the slice.
func FromBytes(b []byte) (uuid UUID, err error) {
	err = uuid.UnmarshalBinary(b)
	return uuid, err
}

// Must returns uuid if err is nil and panics otherwise.
func Must(uuid UUID, err error) UUID {
	if err != nil {
		panic(err)
	}
	return uuid
}

// String returns the string form of uuid, xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
// , or "" if uuid is invalid.
func (uuid UUID) String() string {
	var buf [36]byte
	encodeHex(buf[:], uuid)
	return string(buf[:])
}

// URN returns the RFC 2141 URN form of uuid,
// urn:uuid:xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx,  or "" if uuid is invalid.
func (uuid UUID) URN() string {
	var buf [36 + 9]byte
	copy(buf[:], "urn:uuid:")
	encodeHex(buf[9:], uuid)
	return string(buf[:])
}

func encodeHex(dst []byte, uuid UUID) {
	hex.Encode(dst, uuid[:4])
	dst[8] = '-'
	hex.Encode(dst[9:13], uuid[4:6])
	dst[13] = '-'
	hex.Encode(dst[14:18], uuid[6:8])
	dst[18] = '-'
	hex.Encode(dst[19:23], uuid[8:10])
	dst[23] = '-'
	hex.Encode(dst[24:], uuid[10:])
}

// Variant returns the variant encoded in uuid.
func (uuid UUID) Variant() Variant {
	switch {
	case (uuid[8] & 0xc0) == 0x80:
		return RFC4122
	case (uuid[8] & 0xe0) == 0xc0:
		return Microsoft
	case (uuid[8] & 0xe0) == 0xe0:
		return Future
	default:
		return Reserved
	}
}

// Version returns the version of uuid.
func (uuid UUID) Version() Version {
	return Version(uuid[6] >> 4)
}

func (v Version) String() string {
	if v > 15 {
		return fmt.Sprintf("BAD_VERSION_%d", v)
	}
	return fmt.Sprintf("VERSION_%d", v)
}

func (v Variant) String() string {
	switch v {
	case RFC4122:
		return "RFC4122"
	case Reserved:
		return "Reserved"
	case Microsoft:
		return "Microsoft"
	case Future:
		return "Future"
	case Invalid:
		return "Invalid"
	}
	return fmt.Sprintf("BadVariant%d", int(v))
}

// SetRand sets the random number generator to r, which implements io.Reader.
// If r.Read returns an error when the package requests random data then
// a panic will be issued.
//
// Calling SetRand with nil sets the random number generator to the default
// generator.
func SetRand(r io.Reader) {
	if r == nil {
		rander = rand.Reader
		return
	}
	rander = r
}

// EnableRandPool enables internal randomness pool used for Random
// (Version 4) UUID generation. The pool contains random bytes read from
// the random number generator on demand in batches. Enabling the pool
// may improve the UUID generation throughput significantly.
//
// Since the pool is stored on the Go heap, this feature may be a bad fit
// for security sensitive applications.
//
// Both EnableRandPool and DisableRandPool are not thread-safe and should
// only be called when there is no possibility that New or any other
// UUID Version 4 generation function will be called concurrently.
func EnableRandPool() {
	poolEnabled = true
}

// DisableRandPool disables the randomness pool if it was previously
// enabled with EnableRandPool.
//
// Both EnableRandPool and DisableRandPool are not thread-safe and should
// only be called when there is no possibility that New or any other
// UUID Version 4 generation function will be called concurrently.
func DisableRandPool() {
	poolEnabled = false
	defer poolMu.Unlock()
	poolMu.Lock()
	poolPos = randPoolSize
}


text:
namespace mojo {

template <>
struct TypeConverter<mus::mojom::CommandBufferStatePtr,
                     gpu::CommandBuffer::State> {
  static mus::mojom::CommandBufferStatePtr Convert(
      const gpu::CommandBuffer::State& input);
};

template <>
struct TypeConverter<gpu::CommandBuffer::State,
                     mus::mojom::CommandBufferStatePtr> {
  static gpu::CommandBuffer::State Convert(
      const mus::mojom::CommandBufferStatePtr& input);
};

template <>
struct TypeConverter<mus::mojom::GpuShaderPrecisionPtr,
                     gpu::Capabilities::ShaderPrecision> {
  static mus::mojom::GpuShaderPrecisionPtr Convert(
      const gpu::Capabilities::ShaderPrecision& input);
};

template <>
struct TypeConverter<gpu::Capabilities::ShaderPrecision,
                     mus::mojom::GpuShaderPrecisionPtr> {
  static gpu::Capabilities::ShaderPrecision Convert(
      const mus::mojom::GpuShaderPrecisionPtr& input);
};

template <>
struct TypeConverter<mus::mojom::GpuPerStagePrecisionsPtr,
                     gpu::Capabilities::PerStagePrecisions> {
  static mus::mojom::GpuPerStagePrecisionsPtr Convert(
      const gpu::Capabilities::PerStagePrecisions& input);
};

template <>
struct TypeConverter<gpu::Capabilities::PerStagePrecisions,
                     mus::mojom::GpuPerStagePrecisionsPtr> {
  static gpu::Capabilities::PerStagePrecisions Convert(
      const mus::mojom::GpuPerStagePrecisionsPtr& input);
};

template <>
struct TypeConverter<mus::mojom::GpuCapabilitiesPtr, gpu::Capabilities> {
  static mus::mojom::GpuCapabilitiesPtr Convert(const gpu::Capabilities& input);
};

template <>
struct TypeConverter<gpu::Capabilities, mus::mojom::GpuCapabilitiesPtr> {
  static gpu::Capabilities Convert(const mus::mojom::GpuCapabilitiesPtr& input);
};

template <>
struct TypeConverter<mus::mojom::GpuInfoPtr, gpu::GPUInfo> {
  static mus::mojom::GpuInfoPtr Convert(const gpu::GPUInfo& input);
};

}  // namespace mojo

#endif  // COMPONENTS_MUS_GLES2_COMMAND_BUFFER_TYPE_CONVERSIONS_H_


text:
#pragma once

#ifndef MPHOSTGAME_H
#define MPHOSTGAME_H

//#include "logisticsdialog.h"
//#include "mechgui/asystem.h"
//#include "mechgui/alistbox.h"
//#include "attributemeter.h"
//#include "simplecamera.h"
//#include "mechgui/aanim.h"

class aStyle5TextListItem : public aTextListItem
{
public:
	aStyle5TextListItem()
	{
		hasAnimation = false;
		normalcolour = 0xff808080;
	}
	virtual int32_t init(FitIniFile* file, const std::wstring_view& blockName);
	virtual void render(void);

protected:
	bool hasAnimation;
	aAnimGroup animGroup;
	int32_t normalcolour;
};

class MPHostGame : public LogisticsDialog
{
public:
	MPHostGame(void);
	virtual ~MPHostGame(void);

	void init(void);
	bool isDone(void);
	virtual void begin(void);
	virtual void end(void);
	virtual void render(int32_t xOffset, int32_t yOffset);
	virtual void render(void);
	virtual void update(void);
	virtual int32_t handleMessage(uint32_t, uint32_t);

private:
	//	aEdit		nameEntry;
	//	aRect		nameEntryOutline;
	bool bShowDlg;

	int32_t indexOfButtonWithID(int32_t id);
};

#endif // end of file ( MPHostGame.h )


text:
package mx.com.sidlors.services;

import java.io.File;
import java.io.IOException;
import java.util.List;
import org.apache.commons.fileupload.FileItem;
import org.apache.commons.io.FileUtils;

import mx.com.sidlors.interfaces.services.IFileUploadManager;

public class FileUploadManager implements IFileUploadManager {

	private String repository;
	private String tempDirectory;
	private int maxMemorySize;

	@Override
	public void moveUploadedFiles(List<File> files) {

		if (files.size() > 0 || files != null) {
			try {
				FileUtils.copyDirectory(new File(files.get(0).getParent()), new File(repository));
				FileUtils.cleanDirectory(new File(files.get(0).getParent()));
			} catch (IOException ex) {

			}
		}

	}

	private void processUploadedFile(FileItem item) {
		// TODO Auto-generated method stub

	}

	private void processFormField(FileItem item) {
		// TODO Auto-generated method stub

	}

	public void setRepository(String repository) {
		this.repository = repository;
	}

	public void setTempDirectory(String tempDirectory) {
		this.tempDirectory = tempDirectory;
	}

	public void setMaxMemorySize(int maxMemorySize) {
		this.maxMemorySize = maxMemorySize;
	}

}


text:
namespace Microsoft.Azure.Management.StorSimple1200Series.Models
{
    using Newtonsoft.Json;
    using System.Linq;

    /// <summary>
    /// Base class for models
    /// </summary>
    public partial class BaseModel
    {
        /// <summary>
        /// Initializes a new instance of the BaseModel class.
        /// </summary>
        public BaseModel()
        {
            CustomInit();
        }

        /// <summary>
        /// Initializes a new instance of the BaseModel class.
        /// </summary>
        /// <param name="id">The identifier.</param>
        /// <param name="name">The name.</param>
        /// <param name="type">The type.</param>
        public BaseModel(string id = default(string), string name = default(string), string type = default(string))
        {
            Id = id;
            Name = name;
            Type = type;
            CustomInit();
        }

        /// <summary>
        /// An initialization method that performs custom operations like setting defaults
        /// </summary>
        partial void CustomInit();

        /// <summary>
        /// Gets the identifier.
        /// </summary>
        [JsonProperty(PropertyName = "id")]
        public string Id { get; private set; }

        /// <summary>
        /// Gets the name.
        /// </summary>
        [JsonProperty(PropertyName = "name")]
        public string Name { get; private set; }

        /// <summary>
        /// Gets the type.
        /// </summary>
        [JsonProperty(PropertyName = "type")]
        public string Type { get; private set; }

    }
}


text:
<?php

/**
 * @namespace
 */
namespace Solarium\Core\Client\Adapter;
use Solarium\Core\ConfigurableInterface;
use Solarium\Core\Client\Request;
use Solarium\Core\Client\Response;
use Solarium\Core\Client\Endpoint;

/**
 * Interface for client adapters
 *
 * The goal of an adapter is to accept a query, execute it and return the right
 * result object. This is actually quite a complex task as it involves the
 * handling of all Solr communication.
 *
 * The adapter structure allows for varying implementations of this task.
 *
 * Most adapters will use some sort of HTTP client. In that case the
 * query request builders and query response parsers can be used to simplify
 * HTTP communication.
 *
 * However an adapter may also implement all logic by itself if needed.
 */
interface AdapterInterface extends ConfigurableInterface
{

    /**
     * Execute a request
     *
     * @param  Request  $request
     * @param  Endpoint $endpoint
     * @return Response
     */
    public function execute($request, $endpoint);

}


text:
LoggerService

Description

Logging service.


text:
在页面中间弹出alert、confirm、prompt

  See the Pen OMIU Checkbox by OMI
  (@omijs) on CodePen.

## 导入

```js
import '@omiu/dialog-extention'
```

或者直接 script 标签引入。

```html
<script src="https://unpkg.com/@omiu/dialog-extention"></script>
```

## 使用

```js
Omiu.alert({
  msg: 'Simple Message',
  title: 'Msg',
  confirmButtonText: 'OK',
  onConfirm: function () {
    console.log('ok')
  }
})

Omiu.confirm({
  msg: 'Simple Message',
  title: 'Msg',
  cancelButtonText: 'Cancel',
  confirmButtonText: 'OK',
  onCancel: function () {

  },
  onConfirm: function () {
    console.log('ok')
  }
})

Omiu.prompt({
  msg: 'Simple Message',
  title: 'Msg',
  cancelButtonText: 'Cancel',
  confirmButtonText: 'OK',
  onCancel: function () {

  },
  onConfirm: function (val) {
    console.log(val)
  }
})
```


text:
import unittest
from src import really_simple_yaml as yaml

class TestReallySimpleYaml(unittest.TestCase):
    def test_generate_line_basic(self):
        output = yaml.generate_line("key", "value")
        expectation = "\nkey: value"
        self.assertEqual(output, expectation)

    def test_generate_line_with_quotes(self):
        output = yaml.generate_line("key", "value", True)
        expectation = "\nkey: \"value\""
        self.assertEqual(output, expectation)

    def test_generate_line_with_number_input(self):
        output = yaml.generate_line("key", 5)
        expectation = "\nkey: 5"
        self.assertEqual(output, expectation)

    def test_generate_line_with_list_as_value(self):
            output = yaml.generate_line("key", ["value1", 2])
            expectation = "\nkey: \n- value1\n- 2"

            self.assertEqual(output, expectation)

    def test_generate_line_with_list_as_value_with_quotes(self):
        output = yaml.generate_line("key", ["value1", 2], True)
        expectation = "\nkey: \n- \"value1\"\n- 2"

        self.assertEqual(output, expectation)


text: <manifest package="convalida.validators" />


text:
/**
 * Created by rachelkoldenhoven on 3/14/16.
 */
var express = require('express');
var router = express.Router();
var pg = require('pg');
var knex = require('../../../db/knex');
var passport = require('passport');
var queries = require("../../../queries2");
var LocalStrategy = require('passport-local').Strategy;
var helpers = require('../lib/helpers');

passport.use(new LocalStrategy({
    usernameField: 'email'
  }, function(email, password, done) {
    // does the email exist?
    queries.getUserByEmail(email)
      .then(function(data) {
        // email does not exist. return error.
        if (!data.length) {
          console.log('wrong email');
          return done('Incorrect email.');
        }
        var user = data[0];
        // email found but do the passwords match?
        if (helpers.comparePassword(password, user.password)) {
          // passwords match! return user
          return done(null, user);
        } else {
          // passwords don't match! return error
          console.log('wrong pw');
          return done('Incorrect password.');
        }
      })
      .catch(function(err) {
        // issue with SQL/nex query
        console.log('hitting catch for login route');
        return done('Incorrect email and/or password.');
      });
  }
));

/// google auth ///
router.get('/google',
  passport.authenticate('google', { scope:
    [ 'https://www.googleapis.com/auth/plus.login',
      'https://www.googleapis.com/auth/plus.profile.emails.read' ] }
  ));

router.get( '/google/callback',
  passport.authenticate( 'google', {
    failureRedirect: '/login'
  }), function(req, res, next) {
    //console.log('---------- register user ----------');
      queries.registerUser(req.user).then(function(id) {
        //console.log('----- user:', req.user);
        //console.log("user id yo: " + id);
        res.redirect('/');
      }).catch(function() {
        //console.log('----- err:', req.user);
        // TODO: hack for duplicate inserts
        res.redirect('/');
      });
    //}
  });

router.get('/logout', function(req, res, next) {
  req.session = null;
  res.redirect('/');
});

module.exports = router;


text:
// Copyright 2020 The Oppia Authors. All Rights Reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//      http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS-IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

/**
 * @fileoverview Unit tests for AddMisconceptionModalController.
 */

// TODO(#7222): Remove the following block of unnnecessary imports once
// the code corresponding to the spec is upgraded to Angular 8.
import { importAllAngularServices } from 'tests/unit-test-utils';
// ^^^ This block is to be removed.

describe('Add Misconception Modal Controller', function() {
  var $scope = null;
  var $uibModalInstance = null;
  var MisconceptionObjectFactory = null;
  var SkillEditorStateService = null;
  var SkillObjectFactory = null;

  var skillObject = null;

  importAllAngularServices();

  beforeEach(angular.mock.inject(function($injector, $controller) {
    var $rootScope = $injector.get('$rootScope');
    MisconceptionObjectFactory = $injector.get('MisconceptionObjectFactory');
    SkillEditorStateService = $injector.get('SkillEditorStateService');
    SkillObjectFactory = $injector.get('SkillObjectFactory');
    var skillDifficulties = $injector.get('SKILL_DIFFICULTIES');

    $uibModalInstance = jasmine.createSpyObj(
      '$uibModalInstance', ['close', 'dismiss']);
    var misconceptionDict1 = {
      id: '2',
      name: 'test name',
      notes: 'test notes',
      feedback: 'test feedback',
      must_be_addressed: true
    };
    var misconceptionDict2 = {
      id: '3',
      name: 'test name',
      notes: 'test notes',
      feedback: 'test feedback',
      must_be_addressed: true
    };
    var rubricDict = {
      difficulty: skillDifficulties[0],
      explanations: ['explanation']
    };
    var skillContentsDict = {
      explanation: {
        html: 'test explanation',
        content_id: 'explanation',
      },
      worked_examples: [],
      recorded_voiceovers: {
        voiceovers_mapping: {}
      }
    };
    skillObject = SkillObjectFactory.createFromBackendDict({
      id: 'skill1',
      description: 'test description 1',
      misconceptions: [misconceptionDict1, misconceptionDict2],
      rubrics: [rubricDict],
      skill_contents: skillContentsDict,
      language_code: 'en',
      version: 3,
      next_misconception_id: '3',
      prerequisite_skill_ids: ['skill_1']
    });

    spyOn(SkillEditorStateService, 'getSkill').and.returnValue(skillObject);

    $scope = $rootScope.$new();
    $controller('AddMisconceptionModalController', {
      $scope: $scope,
      $uibModalInstance: $uibModalInstance
    });
  }));

  it('should initialize $scope properties after controller is initialized',
    function() {
      expect($scope.skill).toEqual(skillObject);
      expect($scope.misconceptionName).toBe('');
      expect($scope.misconceptionNotes).toBe('');
      expect($scope.misconceptionFeedback).toBe('');
      expect($scope.misconceptionMustBeAddressed).toBe(true);
    });

  it('should save misconception when closing the modal', function() {
    $scope.saveMisconception();
    expect($uibModalInstance.close).toHaveBeenCalledWith({
      misconception: MisconceptionObjectFactory.create(
        '3', '', '', '', true)
    });
  });
});


text:
namespace Google.Cloud.Translate.V3.Snippets
{
    // [START translate_v3_generated_TranslationService_GetGlossary_async]
    using Google.Cloud.Translate.V3;
    using System.Threading.Tasks;

    public sealed partial class GeneratedTranslationServiceClientSnippets
    {
        /// <summary>Snippet for GetGlossaryAsync</summary>
        /// <remarks>
        /// This snippet has been automatically generated for illustrative purposes only.
        /// It may require modifications to work in your environment.
        /// </remarks>
        public async Task GetGlossaryRequestObjectAsync()
        {
            // Create client
            TranslationServiceClient translationServiceClient = await TranslationServiceClient.CreateAsync();
            // Initialize request argument(s)
            GetGlossaryRequest request = new GetGlossaryRequest
            {
                GlossaryName = GlossaryName.FromProjectLocationGlossary("[PROJECT]", "[LOCATION]", "[GLOSSARY]"),
            };
            // Make the request
            Glossary response = await translationServiceClient.GetGlossaryAsync(request);
        }
    }
    // [END translate_v3_generated_TranslationService_GetGlossary_async]
}


text:
{{ratingsInfo.venue.name}}

{{ratingsInfo.venue.address}}

{{ratingsInfo.venue.telephone}}

{{ratingsInfo.venue.website}}

Group Average Rating: {{ratingsInfo.average || 'None'}}

        <uib-rating ng-init="ratings[ratingsInfo._id] = ratingsInfo.currentRating; showRatings[ratingsInfo._id] = ratingsInfo.currentRating " on-hover="hoveringOver(value, ratingsInfo._id)" on-leave="overStar = null" ng-click="addRating(ratingsInfo, ratings[ratingsInfo._id])" ng-model="ratings[ratingsInfo._id]" max="max" readonly="isReadonly" aria-labelledby="default-rating"></uib-rating>
        <span class="label" ng-class="{'label-danger': showRatings[ratingsInfo._id]<3,'label-warning': showRatings[ratingsInfo._id]<5, 'label-info': showRatings[ratingsInfo._id]>=5 && showRatings[ratingsInfo._id]<8, 'label-success': showRatings[ratingsInfo._id]>=8}" ng-show="!isReadonly">{{showRatings[ratingsInfo._id]}}/10

        <button type="button" class="btn btn-sm btn-danger" ng-click="ratings[ratingsInfo._id] = 0; showRatings[ratingsInfo._id] = 0; addRating(ratingsInfo, 0)" ng-disabled="isReadonly">Clear Rating</button>
        <button ng-show="isHost" class="btn btn-sm btn-primary" type="button" name="button" ng-click="addToItin(ratingsInfo)">Add to Itinerary
        </button>

  <uib-carousel interval="myInterval" no-wrap="noWrapSlides">
    <uib-slide ng-repeat="photo in ratingsInfo.venue.photos" active="slide.active">

    </uib-slide>
  </uib-carousel>


text:
<?xml version="1.0" encoding="utf-8"?>
<pagepreset>
  <layout>
    <preset layout="Contact">Contact-Us</preset>
    <preset layout="frontpage">Home</preset>
    <preset layout="innerpage">All</preset>
  </layout>
  <theme>default</theme>
  <width>wide</width>
</pagepreset>


text:
package route

import (
	"net/http"
	"testing"

	"github.com/stretchr/testify/assert"
	"github.com/stretchr/testify/require"
)

func TestHostnameCase(t *testing.T) {
	var matcher1, matcher2 matcher
	var req *http.Request
	var err error

	req, err = http.NewRequest(http.MethodGet, "http://example.com", nil)
	require.NoError(t, err)

	matcher1, err = hostTrieMatcher("example.com")
	require.NoError(t, err)
	matcher2, err = hostTrieMatcher("Example.Com")
	require.NoError(t, err)

	assert.NotNil(t, matcher1.match(req))
	assert.NotNil(t, matcher2.match(req))

	matcher1, err = hostRegexpMatcher(`.*example.com`)
	require.NoError(t, err)
	matcher2, err = hostRegexpMatcher(`.*Example.Com`)
	require.NoError(t, err)

	assert.NotNil(t, matcher1.match(req))
	assert.NotNil(t, matcher2.match(req))
}


text:
title: Text Analysis Basics
description_seo:
duration: "28:07"
keywords: key, word, list, for, seo
programming_lang:
venue:
location:
author: Chris Bail
author_title: Professor
is_bootcamp: false
date_published:
has_order: 12
preview: https://i.ytimg.com/vi/TAlO-5NJB7I/hqdefault.jpg
video_url: https://www.youtube.com/watch?v=TAlO-5NJB7I
embed_url: https://www.youtube.com/embed/TAlO-5NJB7I
materials:
  - title: Slides
    url: https://sicss.io/2020/materials/day3-text-analysis/basic-text-analysis/Rpres/Basic_Text_Analysis.html
  - title: Annotated Code
    url: https://compsocialscience.github.io/summer-institute/2020/materials/day3-text-analysis/basic-text-analysis/rmarkdown/Basic_Text_Analysis_in_R.html
exercises:
  - title: Lesson plan
    url: https://sicss.io/2021/materials/day3-text-analysis/Group-Exercise-Day-3.html
code:
---

In this video, Professor Chris Bail of Duke University introduces the basics of quantitative text analysis such as character encoding, GREP, and importing/cleaning text data.


text:
The Material Design Lite (MDL) **menu** component is a user interface element that allows users to select one of a number of options. The selection typically results in an action initiation, a setting change, or other observable effect. Menu options are always presented in sets of two or more, and options may be programmatically enabled or disabled as required. The menu appears when the user is asked to choose among a series of options, and is usually dismissed after the choice is made.

Menus are an established but non-standardized feature in user interfaces, and allow users to make choices that direct the activity, progress, or characteristics of software. Their design and use is an important factor in the overall user experience. See the menu component's [Material Design specifications page](http://www.google.com/design/spec/components/menus.html) for details.

##Basic use
To use any MDL component, you must include the minified CSS and JavaScript files using standard relative-path references in the `<head>` section of the page, as described in the MDL Introduction.

###To include an MDL **menu** component:

 1. Code a `<ul>` unordered list element; this is the container that holds the options.
```html
<ul>
</ul>
```
 2. Inside the unordered list, code one `<button>` element for each option. Include any desired attributes and values, such as an id or event handler, and add a text caption as appropriate.
```html
<ul>
  <button>Continue</button>
  <button>Stop</button>
  <button>Pause</button>
</ul>
```
 3. Add one or more MDL classes, separated by spaces, to the unordered list and the buttons using the `class` attribute.
```html
<ul class="mdl-dropdown-menu">
  <button class="mdl-item">Continue</button>
  <button class="mdl-item">Stop</button>
  <button class="mdl-item">Pause</button>
</ul>
```

The menu component is ready for use.

####Example
A menu with three options, with ripple effect on option links.

```html
<ul class="mdl-menu">
  <button class="mdl-menu__item mdl-js-ripple-effect">Fast</button>
  <button class="mdl-menu__item mdl-js-ripple-effect">Medium</button>
  <button class="mdl-menu__item mdl-js-ripple-effect">Slow</button>
</ul>
```

##Configuration options
The MDL CSS classes apply various predefined visual and behavioral enhancements to the menu. The table below lists the available classes and their effects.

| MDL class | Effect | Remarks |
|-----------|--------|---------|
| `mdl-menu` | Defines an unordered list container as an MDL component | Required on ul element |
| `mdl-menu__item` | Defines buttons as MDL menu options and assigns basic MDL behavior | Required on button elements |
| `mdl-js-ripple-effect` | Applies *ripple* click effect to option links | Optional; goes on button elements |

>**Note:** Disabled versions of the menu buttons are provided, and are invoked with the standard HTML boolean attribute `disabled`. `<button class="mdl-menu__item" disabled>Medium</button>`
>This attribute may be added or removed programmatically via scripting.

##More information
For working examples of the **menu** component, see the MDL [menu demo page](www.github.com/google/material-design-lite/src/menu/demo.html).

## License

Copyright Google, 2015. Licensed under an Apache-2 license.


text:
import _ from 'underscore';
import { convertObjectPropsToCamelCase } from '~/lib/utils/common_utils';
import {
  LINE_POSITION_LEFT,
  LINE_POSITION_RIGHT,
  TEXT_DIFF_POSITION_TYPE,
  DIFF_NOTE_TYPE,
  NEW_LINE_TYPE,
  OLD_LINE_TYPE,
  MATCH_LINE_TYPE,
  LINES_TO_BE_RENDERED_DIRECTLY,
  MAX_LINES_TO_BE_RENDERED,
} from '../constants';

export function findDiffFile(files, hash) {
  return files.filter(file => file.fileHash === hash)[0];
}

export const getReversePosition = linePosition => {
  if (linePosition === LINE_POSITION_RIGHT) {
    return LINE_POSITION_LEFT;
  }

  return LINE_POSITION_RIGHT;
};

export function getNoteFormData(params) {
  const {
    note,
    noteableType,
    noteableData,
    diffFile,
    noteTargetLine,
    diffViewType,
    linePosition,
  } = params;

  const position = JSON.stringify({
    base_sha: diffFile.diffRefs.baseSha,
    start_sha: diffFile.diffRefs.startSha,
    head_sha: diffFile.diffRefs.headSha,
    old_path: diffFile.oldPath,
    new_path: diffFile.newPath,
    position_type: TEXT_DIFF_POSITION_TYPE,
    old_line: noteTargetLine.oldLine,
    new_line: noteTargetLine.newLine,
  });

  const postData = {
    view: diffViewType,
    line_type: linePosition === LINE_POSITION_RIGHT ? NEW_LINE_TYPE : OLD_LINE_TYPE,
    merge_request_diff_head_sha: diffFile.diffRefs.headSha,
    in_reply_to_discussion_id: '',
    note_project_id: '',
    target_type: noteableData.targetType,
    target_id: noteableData.id,
    note: {
      note,
      position,
      noteable_type: noteableType,
      noteable_id: noteableData.id,
      commit_id: '',
      type: DIFF_NOTE_TYPE,
      line_code: noteTargetLine.lineCode,
    },
  };

  return {
    endpoint: noteableData.create_note_path,
    data: postData,
  };
}

export const findIndexInInlineLines = (lines, lineNumbers) => {
  const { oldLineNumber, newLineNumber } = lineNumbers;

  return _.findIndex(
    lines,
    line => line.oldLine === oldLineNumber && line.newLine === newLineNumber,
  );
};

export const findIndexInParallelLines = (lines, lineNumbers) => {
  const { oldLineNumber, newLineNumber } = lineNumbers;

  return _.findIndex(
    lines,
    line =>
      line.left &&
      line.right &&
      line.left.oldLine === oldLineNumber &&
      line.right.newLine === newLineNumber,
  );
};

export function removeMatchLine(diffFile, lineNumbers, bottom) {
  const indexForInline = findIndexInInlineLines(diffFile.highlightedDiffLines, lineNumbers);
  const indexForParallel = findIndexInParallelLines(diffFile.parallelDiffLines, lineNumbers);
  const factor = bottom ? 1 : -1;

  diffFile.highlightedDiffLines.splice(indexForInline + factor, 1);
  diffFile.parallelDiffLines.splice(indexForParallel + factor, 1);
}

export function addLineReferences(lines, lineNumbers, bottom) {
  const { oldLineNumber, newLineNumber } = lineNumbers;
  const lineCount = lines.length;
  let matchLineIndex = -1;

  const linesWithNumbers = lines.map((l, index) => {
    const line = convertObjectPropsToCamelCase(l);

    if (line.type === MATCH_LINE_TYPE) {
      matchLineIndex = index;
    } else {
      Object.assign(line, {
        oldLine: bottom ? oldLineNumber + index + 1 : oldLineNumber + index - lineCount,
        newLine: bottom ? newLineNumber + index + 1 : newLineNumber + index - lineCount,
      });
    }

    return line;
  });

  if (matchLineIndex > -1) {
    const line = linesWithNumbers[matchLineIndex];
    const targetLine = bottom
      ? linesWithNumbers[matchLineIndex - 1]
      : linesWithNumbers[matchLineIndex + 1];

    Object.assign(line, {
      metaData: {
        oldPos: targetLine.oldLine,
        newPos: targetLine.newLine,
      },
    });
  }

  return linesWithNumbers;
}

export function addContextLines(options) {
  const { inlineLines, parallelLines, contextLines, lineNumbers } = options;
  const normalizedParallelLines = contextLines.map(line => ({
    left: line,
    right: line,
  }));

  if (options.bottom) {
    inlineLines.push(...contextLines);
    parallelLines.push(...normalizedParallelLines);
  } else {
    const inlineIndex = findIndexInInlineLines(inlineLines, lineNumbers);
    const parallelIndex = findIndexInParallelLines(parallelLines, lineNumbers);
    inlineLines.splice(inlineIndex, 0, ...contextLines);
    parallelLines.splice(parallelIndex, 0, ...normalizedParallelLines);
  }
}

/**
 * Trims the first char of the `richText` property when it's either a space or a diff symbol.
 * @param {Object} line
 * @returns {Object}
 */
export function trimFirstCharOfLineContent(line = {}) {
  // eslint-disable-next-line no-param-reassign
  delete line.text;
  // eslint-disable-next-line no-param-reassign
  line.discussions = [];

  const parsedLine = Object.assign({}, line);

  if (line.richText) {
    const firstChar = parsedLine.richText.charAt(0);

    if (firstChar === ' ' || firstChar === '+' || firstChar === '-') {
      parsedLine.richText = line.richText.substring(1);
    }
  }

  return parsedLine;
}

// This prepares and optimizes the incoming diff data from the server
// by setting up incremental rendering and removing unneeded data
export function prepareDiffData(diffData) {
  const filesLength = diffData.diffFiles.length;
  let showingLines = 0;
  for (let i = 0; i < filesLength; i += 1) {
    const file = diffData.diffFiles[i];

    if (file.parallelDiffLines) {
      const linesLength = file.parallelDiffLines.length;
      for (let u = 0; u < linesLength; u += 1) {
        const line = file.parallelDiffLines[u];
        if (line.left) {
          line.left = trimFirstCharOfLineContent(line.left);
        }
        if (line.right) {
          line.right = trimFirstCharOfLineContent(line.right);
        }
      }
    }

    if (file.highlightedDiffLines) {
      const linesLength = file.highlightedDiffLines.length;
      for (let u = 0; u < linesLength; u += 1) {
        const line = file.highlightedDiffLines[u];
        Object.assign(line, { ...trimFirstCharOfLineContent(line) });
      }
      showingLines += file.parallelDiffLines.length;
    }

    Object.assign(file, {
      renderIt: showingLines < LINES_TO_BE_RENDERED_DIRECTLY,
      collapsed: file.text && showingLines > MAX_LINES_TO_BE_RENDERED,
    });
  }
}

export function getDiffPositionByLineCode(diffFiles) {
  return diffFiles.reduce((acc, diffFile) => {
    const { baseSha, headSha, startSha } = diffFile.diffRefs;
    const { newPath, oldPath } = diffFile;

    // We can only use highlightedDiffLines to create the map of diff lines because
    // highlightedDiffLines will also include every parallel diff line in it.
    if (diffFile.highlightedDiffLines) {
      diffFile.highlightedDiffLines.forEach(line => {
        const { lineCode, oldLine, newLine } = line;

        if (lineCode) {
          acc[lineCode] = { baseSha, headSha, startSha, newPath, oldPath, oldLine, newLine, positionType: 'text' };
        }
      });
    }

    return acc;
  }, {});
}

// This method will check whether the discussion is still applicable
// to the diff line in question regarding different versions of the MR
export function isDiscussionApplicableToLine(discussion, diffPosition) {
  const originalRefs = convertObjectPropsToCamelCase(discussion.original_position);
  const refs = convertObjectPropsToCamelCase(discussion.position);

  return _.isEqual(refs, diffPosition) || _.isEqual(originalRefs, diffPosition);
}


text:
//Copyright 2006-2011 Jeroen van Menen
//
//   Licensed under the Apache License, Version 2.0 (the "License");
//   you may not use this file except in compliance with the License.
//   You may obtain a copy of the License at
//
//       http://www.apache.org/licenses/LICENSE-2.0
//
//   Unless required by applicable law or agreed to in writing, software
//   distributed under the License is distributed on an "AS IS" BASIS,
//   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
//   See the License for the specific language governing permissions and
//   limitations under the License.

#endregion Copyright

using mshtml;
using SHDocVw;

namespace WatiN.Core.Native.InternetExplorer
{
    internal class FrameByIndexProcessor : IWebBrowser2Processor
    {
        private readonly HTMLDocument htmlDocument;
        private readonly int index;
        private int counter;
        private IWebBrowser2 iWebBrowser2;

        public FrameByIndexProcessor(int index, HTMLDocument htmlDocument)
        {
            this.index = index;
            this.htmlDocument = htmlDocument;
        }

        public HTMLDocument HTMLDocument()
        {
            return htmlDocument;
        }

        public void Process(IWebBrowser2 webBrowser2)
        {
            if (counter == index)
            {
                iWebBrowser2 = webBrowser2;
            }
            counter++;
        }

        public bool Continue()
        {
            return (iWebBrowser2 == null);
        }

        public IWebBrowser2 IWebBrowser2()
        {
            return iWebBrowser2;
        }

        internal static IWebBrowser2 GetFrameFromHTMLDocument(int frameIndex, HTMLDocument htmlDocument)
        {
            var processor = new FrameByIndexProcessor(frameIndex, htmlDocument);

            IEUtils.EnumIWebBrowser2Interfaces(processor);

            return processor.IWebBrowser2();
        }

    }
}


text:
#import "SCFilterNotBetween.h"

@implementation SCFilterNotBetween

- (NSString *)asSQL {
  NSAssert(keyPath, @"KeyPath must be set");
  return [NSString stringWithFormat:@"%@ NOT BETWEEN %@ AND %@",
                                    (NSString *)keyPath, lower, upper];
}

- (BOOL)compareLHS:(NSObject *)v {
  return ![super compareLHS:v];
}

@end


text:
"""
Wrappers for PLY to provide thread safety.
"""

import contextlib
import functools
import os
import re
import threading

__all__ = ["lex", "ThreadSafeParser", "yacc"]

_TAB_HEADER = """# -*- coding: utf-8 -*-
# Licensed under a 3-clause BSD style license - see LICENSE.rst

# This file was automatically generated from ply. To re-generate this file,
# remove it from this folder, then build astropy and run the tests in-place:
#
#   python setup.py build_ext --inplace
#   pytest {package}
#
# You can then commit the changes to this file.

"""
_LOCK = threading.RLock()

def _add_tab_header(filename, package):
    with open(filename) as f:
        contents = f.read()

    with open(filename, "w") as f:
        f.write(_TAB_HEADER.format(package=package))
        f.write(contents)

@contextlib.contextmanager
def _patch_get_caller_module_dict(module):
    """Temporarily replace the module's get_caller_module_dict.

    This is a function inside ``ply.lex`` and ``ply.yacc`` (each has a copy)
    that is used to retrieve the caller's local symbols. Here, we patch the
    function to instead retrieve the grandparent's local symbols to account
    for a wrapper layer.
    """
    original = module.get_caller_module_dict

    @functools.wraps(original)
    def wrapper(levels):
        # Add 2, not 1, because the wrapper itself adds another level
        return original(levels + 2)

    module.get_caller_module_dict = wrapper
    yield
    module.get_caller_module_dict = original

def lex(lextab, package, reflags=int(re.VERBOSE)):
    """Create a lexer from local variables.

    It automatically compiles the lexer in optimized mode, writing to
    ``lextab`` in the same directory as the calling file.

    This function is thread-safe. The returned lexer is *not* thread-safe, but
    if it is used exclusively with a single parser returned by :func:`yacc`
    then it will be safe.

    It is only intended to work with lexers defined within the calling
    function, rather than at class or module scope.

    Parameters
    ----------
    lextab : str
        Name for the file to write with the generated tables, if it does not
        already exist (without ``.py`` suffix).
    package : str
        Name of a test package which should be run with pytest to regenerate
        the output file. This is inserted into a comment in the generated
        file.
    reflags : int
        Passed to ``ply.lex``.
    """
    from astropy.extern.ply import lex

    caller_file = lex.get_caller_module_dict(2)["__file__"]
    lextab_filename = os.path.join(os.path.dirname(caller_file), lextab + ".py")
    with _LOCK:
        lextab_exists = os.path.exists(lextab_filename)
        with _patch_get_caller_module_dict(lex):
            lexer = lex.lex(
                optimize=True,
                lextab=lextab,
                outputdir=os.path.dirname(caller_file),
                reflags=reflags,
            )
        if not lextab_exists:
            _add_tab_header(lextab_filename, package)
        return lexer

class ThreadSafeParser:
    """Wrap a parser produced by ``ply.yacc.yacc``.

    It provides a :meth:`parse` method that is thread-safe.
    """

    def __init__(self, parser):
        self.parser = parser
        self._lock = threading.RLock()

    def parse(self, *args, **kwargs):
        """Run the wrapped parser, with a lock to ensure serialization."""
        with self._lock:
            return self.parser.parse(*args, **kwargs)

def yacc(tabmodule, package):
    """Create a parser from local variables.

    It automatically compiles the parser in optimized mode, writing to
    ``tabmodule`` in the same directory as the calling file.

    This function is thread-safe, and the returned parser is also thread-safe,
    provided that it does not share a lexer with any other parser.

    It is only intended to work with parsers defined within the calling
    function, rather than at class or module scope.

    Parameters
    ----------
    tabmodule : str
        Name for the file to write with the generated tables, if it does not
        already exist (without ``.py`` suffix).
    package : str
        Name of a test package which should be run with pytest to regenerate
        the output file. This is inserted into a comment in the generated
        file.
    """
    from astropy.extern.ply import yacc

    caller_file = yacc.get_caller_module_dict(2)["__file__"]
    tab_filename = os.path.join(os.path.dirname(caller_file), tabmodule + ".py")
    with _LOCK:
        tab_exists = os.path.exists(tab_filename)
        with _patch_get_caller_module_dict(yacc):
            parser = yacc.yacc(
                tabmodule=tabmodule,
                outputdir=os.path.dirname(caller_file),
                debug=False,
                optimize=True,
                write_tables=True,
            )
        if not tab_exists:
            _add_tab_header(tab_filename, package)

    return ThreadSafeParser(parser)


text:
UNSTACK_ALL=""

while getopts ":a" opt; do
    case $opt in
        a)
            UNSTACK_ALL=""
            ;;
    esac
done

# Keep track of the current DevStack directory.
TOP_DIR=$(cd $(dirname "$0") && pwd)
FILES=$TOP_DIR/files

# Import common functions
source $TOP_DIR/functions

# Import database library
source $TOP_DIR/lib/database

# Load local configuration
source $TOP_DIR/openrc

# Destination path for service data
DATA_DIR=${DATA_DIR:-${DEST}/data}

if [[ $EUID -eq 0 ]]; then
    echo "You are running this script as root."
    echo "It might work but you will have a better day running it as $STACK_USER"
    exit 1
fi

# Configure Projects
# ==================

# Plugin Phase 0: override_defaults - allow pluggins to override
# defaults before other services are run
run_phase override_defaults

# Import apache functions
source $TOP_DIR/lib/apache

# Import TLS functions
source $TOP_DIR/lib/tls

# Source project function libraries
source $TOP_DIR/lib/infra
source $TOP_DIR/lib/oslo
source $TOP_DIR/lib/lvm
source $TOP_DIR/lib/horizon
source $TOP_DIR/lib/keystone
source $TOP_DIR/lib/glance
source $TOP_DIR/lib/nova
source $TOP_DIR/lib/cinder
source $TOP_DIR/lib/swift
source $TOP_DIR/lib/ceilometer
source $TOP_DIR/lib/heat
source $TOP_DIR/lib/neutron-legacy
source $TOP_DIR/lib/ldap
source $TOP_DIR/lib/dstat

# Extras Source
# --------------

# Phase: source
if [[ -d $TOP_DIR/extras.d ]]; then
    for i in $TOP_DIR/extras.d/*.sh; do
        [[ -r $i ]] && source $i source
    done
fi

load_plugin_settings

# Determine what system we are running on.  This provides ``os_VENDOR``,
# ``os_RELEASE``, ``os_UPDATE``, ``os_PACKAGE``, ``os_CODENAME``
GetOSVersion

# Run extras
# ==========

# Phase: unstack
run_phase unstack

if [[ "$Q_USE_DEBUG_COMMAND" == "True" ]]; then
    source $TOP_DIR/openrc
    teardown_neutron_debug
fi

# Call service stop

if is_service_enabled heat; then
    stop_heat
fi

if is_service_enabled ceilometer; then
    stop_ceilometer
fi

if is_service_enabled nova; then
    stop_nova
fi

if is_service_enabled glance; then
    stop_glance
fi

if is_service_enabled keystone; then
    stop_keystone
fi

# Swift runs daemons
if is_service_enabled s-proxy; then
    stop_swift
    cleanup_swift
fi

# Apache has the WSGI processes
if is_service_enabled horizon; then
    stop_horizon
fi

# Kill TLS proxies and cleanup certificates
if is_service_enabled tls-proxy; then
    stop_tls_proxy
    cleanup_CA
fi
if [ "$USE_SSL" == "True" ]; then
    cleanup_CA
fi

SCSI_PERSIST_DIR=$CINDER_STATE_PATH/volumes/*

# BUG: tgt likes to exit 1 on service stop if everything isn't
# perfect, we should clean up cinder stop paths.

# Get the iSCSI volumes
if is_service_enabled cinder; then
    stop_cinder || /bin/true
    cleanup_cinder || /bin/true
fi

if [[ -n "$UNSTACK_ALL" ]]; then
    # Stop MySQL server
    if is_service_enabled mysql; then
        stop_service mysql
    fi

    if is_service_enabled postgresql; then
        stop_service postgresql
    fi

    # Stop rabbitmq-server
    if is_service_enabled rabbit; then
        stop_service rabbitmq-server
    fi
fi

if is_service_enabled neutron; then
    stop_neutron
    stop_neutron_third_party
    cleanup_neutron
fi

if is_service_enabled dstat; then
    stop_dstat
fi

# Clean up the remainder of the screen processes
SCREEN=$(which screen)
if [[ -n "$SCREEN" ]]; then
    SESSION=$(screen -ls | awk '/[0-9].stack/ { print $1 }')
    if [[ -n "$SESSION" ]]; then
        screen -X -S $SESSION quit
    fi
fi

# BUG: maybe it doesn't exist? We should isolate this further down.
# NOTE: Cinder automatically installs the lvm2 package, independently of the
# enabled backends. So if Cinder is enabled, we are sure lvm (lvremove,
# /etc/lvm/lvm.conf, etc.) is here.
if is_service_enabled cinder; then
    clean_lvm_volume_group $DEFAULT_VOLUME_GROUP_NAME || /bin/true
    clean_lvm_filter
fi


text:
package com.firebase.ui.auth.ui.phone;

import android.content.Context;
import android.os.Bundle;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import android.support.annotation.RestrictTo;
import android.support.annotation.VisibleForTesting;
import android.support.v4.app.FragmentActivity;
import android.text.TextUtils;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.view.inputmethod.InputMethodManager;
import android.widget.Button;
import android.widget.TextView;

import com.firebase.ui.auth.R;
import com.firebase.ui.auth.ui.ExtraConstants;
import com.firebase.ui.auth.ui.FlowParameters;
import com.firebase.ui.auth.ui.FragmentBase;
import com.firebase.ui.auth.ui.TermsTextView;

/**
 * Display confirmation code to verify phone numbers input in {{@link VerifyPhoneNumberFragment}}
 */
@RestrictTo(RestrictTo.Scope.LIBRARY_GROUP)
public class SubmitConfirmationCodeFragment extends FragmentBase {

    public static final String TAG = "SubmitConfirmationCodeFragment";

    private static final long RESEND_WAIT_MILLIS = 15000;
    private static final String EXTRA_MILLIS_UNTIL_FINISHED = "EXTRA_MILLIS_UNTIL_FINISHED";

    private TextView mEditPhoneTextView;
    private TextView mResendCodeTextView;
    private TextView mCountDownTextView;
    private SpacedEditText mConfirmationCodeEditText;
    private Button mSubmitConfirmationButton;
    private CustomCountDownTimer mCountdownTimer;
    private PhoneVerificationActivity mVerifier;
    private TermsTextView mAgreementText;
    private long mMillisUntilFinished;

    public static SubmitConfirmationCodeFragment newInstance(FlowParameters flowParameters,
                                                             String phoneNumber) {
        SubmitConfirmationCodeFragment fragment = new SubmitConfirmationCodeFragment();

        Bundle args = new Bundle();
        args.putParcelable(ExtraConstants.EXTRA_FLOW_PARAMS, flowParameters);
        args.putString(ExtraConstants.EXTRA_PHONE, phoneNumber);

        fragment.setArguments(args);
        return fragment;
    }

    @Nullable
    @Override
    public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable
            Bundle savedInstanceState) {
        View v = inflater.inflate(R.layout.confirmation_code_layout, container, false);
        FragmentActivity parentActivity = getActivity();

        mEditPhoneTextView = (TextView) v.findViewById(R.id.edit_phone_number);
        mCountDownTextView = (TextView) v.findViewById(R.id.ticker);
        mResendCodeTextView = (TextView) v.findViewById(R.id.resend_code);
        mConfirmationCodeEditText = (SpacedEditText) v.findViewById(R.id.confirmation_code);
        mSubmitConfirmationButton = (Button) v.findViewById(R.id.submit_confirmation_code);
        mAgreementText = (TermsTextView) v.findViewById(R.id.create_account_tos);

        final String phoneNumber = getArguments().getString(ExtraConstants.EXTRA_PHONE);

        parentActivity.setTitle(getString(R.string.verify_your_phone_title));
        setupConfirmationCodeEditText();
        setupEditPhoneNumberTextView(phoneNumber);
        setupCountDown(RESEND_WAIT_MILLIS);
        setupSubmitConfirmationCodeButton();
        setupResendConfirmationCodeTextView(phoneNumber);
        setUpTermsOfService();
        return v;
    }

    @Override
    public void onStart() {
        super.onStart();
        mConfirmationCodeEditText.requestFocus();
        InputMethodManager imgr = (InputMethodManager) getActivity().getSystemService(
                Context.INPUT_METHOD_SERVICE);
        imgr.showSoftInput(mConfirmationCodeEditText, 0);
    }

    @Override
    public void onActivityCreated(@Nullable Bundle savedInstanceState) {
        super.onActivityCreated(savedInstanceState);

        if (savedInstanceState != null) {
            Long t = savedInstanceState.getLong(EXTRA_MILLIS_UNTIL_FINISHED);
            if (t != null) {
                mCountdownTimer.update(t);
            }
        }

        if (!(getActivity() instanceof PhoneVerificationActivity)) {
            throw new IllegalStateException("Activity must implement PhoneVerificationHandler");
        }
        mVerifier = (PhoneVerificationActivity) getActivity();
    }

    @Override
    public void onDestroy() {
        cancelTimer();
        super.onDestroy();
    }

    @Override
    public void onSaveInstanceState(Bundle outState) {
        super.onSaveInstanceState(outState);
        outState.putLong(EXTRA_MILLIS_UNTIL_FINISHED, mMillisUntilFinished);
    }

    private void setTimer(long millisUntilFinished) {
        mCountDownTextView.setText(String.format(getString(R.string.resend_code_in),
                timeRoundedToSeconds(millisUntilFinished)));
    }

    private void setupResendConfirmationCodeTextView(final String phoneNumber) {
        mResendCodeTextView.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                mVerifier.verifyPhoneNumber(phoneNumber, true);
                mResendCodeTextView.setVisibility(View.GONE);
                mCountDownTextView.setVisibility(View.VISIBLE);
                mCountDownTextView.setText(String.format(getString(R.string.resend_code_in),
                        RESEND_WAIT_MILLIS / 1000));
                mCountdownTimer.renew();
            }
        });
    }

    private void setupCountDown(long startTimeMillis) {
        //set the timer view
        setTimer(startTimeMillis / 1000);

        //create a countdown
        mCountdownTimer = createCountDownTimer(mCountDownTextView, mResendCodeTextView, this,
                startTimeMillis);

        //start the countdown
        startTimer();
    }

    private void setupSubmitConfirmationCodeButton() {
        mSubmitConfirmationButton.setEnabled(false);

        mSubmitConfirmationButton.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                final String confirmationCode = mConfirmationCodeEditText.getUnspacedText()
                        .toString();
                mVerifier.submitConfirmationCode(confirmationCode);
            }
        });
    }

    private void setupEditPhoneNumberTextView(@Nullable String phoneNumber) {
        mEditPhoneTextView.setText(TextUtils.isEmpty(phoneNumber) ? "" : phoneNumber);
        mEditPhoneTextView.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                if (getFragmentManager().getBackStackEntryCount() > 0) {
                    getFragmentManager().popBackStack();
                }
            }
        });
    }

    private void setupConfirmationCodeEditText() {
        mConfirmationCodeEditText.setText("------");
        BucketedTextChangeListener listener = createBucketedTextChangeListener();
        mConfirmationCodeEditText.addTextChangedListener(listener);
    }

    @NonNull
    private View.OnFocusChangeListener createOnFocusChangeListener() {
        return new View.OnFocusChangeListener() {
            @Override
            public void onFocusChange(View v, boolean hasFocus) {
                if (hasFocus) {
                    mConfirmationCodeEditText.setSelection(0);
                }
            }
        };
    }

    private BucketedTextChangeListener createBucketedTextChangeListener() {
        return new BucketedTextChangeListener(this.mConfirmationCodeEditText, 6, "-",
                createBucketOnEditCallback(mSubmitConfirmationButton));
    }

    private void startTimer() {
        if (mCountdownTimer != null) {
            mCountdownTimer.start();
        }
    }

    private void cancelTimer() {
        if (mCountdownTimer != null) {
            mCountdownTimer.cancel();
        }
    }

    private void setUpTermsOfService() {
        mAgreementText.showTerms(mHelper.getFlowParams(), R.string.continue_phone_login);
    }

    @VisibleForTesting(otherwise = VisibleForTesting.NONE)
    CustomCountDownTimer getmCountdownTimer() {
        return mCountdownTimer;
    }

    private int timeRoundedToSeconds(double millis) {
        return (int) Math.ceil(millis / 1000);
    }

    private CustomCountDownTimer createCountDownTimer(final TextView timerText, final TextView
            resendCode, final SubmitConfirmationCodeFragment fragment, final long startTimeMillis) {
        return new CustomCountDownTimer(startTimeMillis, 500) {
            SubmitConfirmationCodeFragment mSubmitConfirmationCodeFragment = fragment;

            public void onTick(long millisUntilFinished) {
                mMillisUntilFinished = millisUntilFinished;
                mSubmitConfirmationCodeFragment.setTimer(millisUntilFinished);
            }

            public void onFinish() {
                timerText.setText("");
                timerText.setVisibility(View.GONE);
                resendCode.setVisibility(View.VISIBLE);
            }
        };
    }

    private BucketedTextChangeListener.ContentChangeCallback createBucketOnEditCallback(final
                                                                                Button button) {
        return new BucketedTextChangeListener.ContentChangeCallback() {
            @Override
            public void whileComplete() {
                button.setEnabled(true);
            }

            @Override
            public void whileIncomplete() {
                button.setEnabled(false);
            }
        };
    }

    void setConfirmationCode(String code) {
        mConfirmationCodeEditText.setText(code);
    }
}


text:
<?xml version="1.0" encoding="utf-8"?>
<resources>
    <color name="red">#ffff0000</color>
    <color name="white">#ffffffff</color>
    <color name="black">#ff000000</color>
</resources>


text:
Visualization

        <ng-include src="'tmpl/inspectors/vis.html'"></ng-include>

            ▼
            ▶

            {{group.displayName}}
            Rename

            −

          <ng-include src="'tmpl/inspectors/group.html'"></ng-include>

+ New Layer


text:
static const char * yaml_event_get_scalar_value(yaml_event_t *event) {
    return (const char *)event->data.scalar.value;
}

static yaml_scalar_style_t yaml_event_get_scalar_style(yaml_event_t *event) {
    return event->data.scalar.style;
}

#endif


text:
/*************************************************************************/
/*  array.h                                                              */
/*************************************************************************/
/*                       This file is part of:                           */
/*                           GODOT ENGINE                                */
/*                      https://godotengine.org                          */
/*************************************************************************/
/* Copyright (c) 2007-2020 Juan Linietsky, Ariel Manzur.                 */
/* Copyright (c) 2014-2020 Godot Engine contributors (cf. AUTHORS.md).   */
/*                                                                       */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the       */
/* "Software"), to deal in the Software without restriction, including   */
/* without limitation the rights to use, copy, modify, merge, publish,   */
/* distribute, sublicense, and/or sell copies of the Software, and to    */
/* permit persons to whom the Software is furnished to do so, subject to */
/* the following conditions:                                             */
/*                                                                       */
/* The above copyright notice and this permission notice shall be        */
/* included in all copies or substantial portions of the Software.       */
/*                                                                       */
/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,       */
/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF    */
/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY  */
/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,  */
/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE     */
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.                */
/*************************************************************************/

#ifndef GODOT_ARRAY_H
#define GODOT_ARRAY_H

#ifdef __cplusplus
extern "C" {
#endif

#include <stdint.h>

#define GODOT_ARRAY_SIZE sizeof(void *)

#ifndef GODOT_CORE_API_GODOT_ARRAY_TYPE_DEFINED
#define GODOT_CORE_API_GODOT_ARRAY_TYPE_DEFINED
typedef struct {
	uint8_t _dont_touch_that[GODOT_ARRAY_SIZE];
} godot_array;
#endif

// reduce extern "C" nesting for VS2013
#ifdef __cplusplus
}
#endif

#include <gdnative/packed_arrays.h>
#include <gdnative/variant.h>

#include <gdnative/gdnative.h>

#ifdef __cplusplus
extern "C" {
#endif

void GDAPI godot_array_new(godot_array *r_dest);
void GDAPI godot_array_new_copy(godot_array *r_dest, const godot_array *p_src);
void GDAPI godot_array_new_packed_color_array(godot_array *r_dest, const godot_packed_color_array *p_pca);
void GDAPI godot_array_new_packed_vector3_array(godot_array *r_dest, const godot_packed_vector3_array *p_pv3a);
void GDAPI godot_array_new_packed_vector2_array(godot_array *r_dest, const godot_packed_vector2_array *p_pv2a);
void GDAPI godot_array_new_packed_string_array(godot_array *r_dest, const godot_packed_string_array *p_psa);
void GDAPI godot_array_new_packed_float32_array(godot_array *r_dest, const godot_packed_float32_array *p_pra);
void GDAPI godot_array_new_packed_float64_array(godot_array *r_dest, const godot_packed_float64_array *p_pra);
void GDAPI godot_array_new_packed_int32_array(godot_array *r_dest, const godot_packed_int32_array *p_pia);
void GDAPI godot_array_new_packed_int64_array(godot_array *r_dest, const godot_packed_int64_array *p_pia);
void GDAPI godot_array_new_packed_byte_array(godot_array *r_dest, const godot_packed_byte_array *p_pba);

void GDAPI godot_array_set(godot_array *p_self, const godot_int p_idx, const godot_variant *p_value);

godot_variant GDAPI godot_array_get(const godot_array *p_self, const godot_int p_idx);

godot_variant GDAPI *godot_array_operator_index(godot_array *p_self, const godot_int p_idx);

const godot_variant GDAPI *godot_array_operator_index_const(const godot_array *p_self, const godot_int p_idx);

void GDAPI godot_array_append(godot_array *p_self, const godot_variant *p_value);

void GDAPI godot_array_clear(godot_array *p_self);

godot_int GDAPI godot_array_count(const godot_array *p_self, const godot_variant *p_value);

godot_bool GDAPI godot_array_empty(const godot_array *p_self);

void GDAPI godot_array_erase(godot_array *p_self, const godot_variant *p_value);

godot_variant GDAPI godot_array_front(const godot_array *p_self);

godot_variant GDAPI godot_array_back(const godot_array *p_self);

godot_int GDAPI godot_array_find(const godot_array *p_self, const godot_variant *p_what, const godot_int p_from);

godot_int GDAPI godot_array_find_last(const godot_array *p_self, const godot_variant *p_what);

godot_bool GDAPI godot_array_has(const godot_array *p_self, const godot_variant *p_value);

godot_int GDAPI godot_array_hash(const godot_array *p_self);

void GDAPI godot_array_insert(godot_array *p_self, const godot_int p_pos, const godot_variant *p_value);

void GDAPI godot_array_invert(godot_array *p_self);

godot_variant GDAPI godot_array_pop_back(godot_array *p_self);

godot_variant GDAPI godot_array_pop_front(godot_array *p_self);

void GDAPI godot_array_push_back(godot_array *p_self, const godot_variant *p_value);

void GDAPI godot_array_push_front(godot_array *p_self, const godot_variant *p_value);

void GDAPI godot_array_remove(godot_array *p_self, const godot_int p_idx);

void GDAPI godot_array_resize(godot_array *p_self, const godot_int p_size);

godot_int GDAPI godot_array_rfind(const godot_array *p_self, const godot_variant *p_what, const godot_int p_from);

godot_int GDAPI godot_array_size(const godot_array *p_self);

void GDAPI godot_array_sort(godot_array *p_self);

void GDAPI godot_array_sort_custom(godot_array *p_self, godot_object *p_obj, const godot_string *p_func);

godot_int GDAPI godot_array_bsearch(godot_array *p_self, const godot_variant *p_value, const godot_bool p_before);

godot_int GDAPI godot_array_bsearch_custom(godot_array *p_self, const godot_variant *p_value, godot_object *p_obj, const godot_string *p_func, const godot_bool p_before);

void GDAPI godot_array_destroy(godot_array *p_self);

godot_array GDAPI godot_array_duplicate(const godot_array *p_self, const godot_bool p_deep);

godot_array GDAPI godot_array_slice(const godot_array *p_self, const godot_int p_begin, const godot_int p_end, const godot_int p_step, const godot_bool p_deep);

godot_variant GDAPI godot_array_max(const godot_array *p_self);

godot_variant GDAPI godot_array_min(const godot_array *p_self);

void GDAPI godot_array_shuffle(godot_array *p_self);

#ifdef __cplusplus
}
#endif

#endif // GODOT_ARRAY_H


text:
package ru.szhernovoy.model;

import org.junit.Assert;
import org.junit.Test;

import static org.hamcrest.core.Is.is;

/**
 * Created by admin on 12.11.2016.
 */
public class TrackerTest {

    @Test
    public void whenAddItemInBDThatWeMayGetFrom() throws Exception {
        Tracker myTrack = new Tracker();
        myTrack.connect();
        Item item = new Item("first","opis",System.currentTimeMillis());
        String beforeId = item.getId();
        myTrack.addItem(item);

        String Resultid = item.getId();

        Assert.assertThat(Resultid,is("1"));
        if(!myTrack.close()){
            throw new UnknownError("connector in SQL base not close");
        }
    }

    @Test
    public void whenFilterItemInBDThatWeMayGetFrom() throws Exception {
        Tracker myTrack = new Tracker();
        myTrack.connect();
        Item item = myTrack.findByFilter("first").get(0);
        String Resultid = item.getId();
        Assert.assertThat(Resultid,is("1"));
        if(!myTrack.close()){
            throw new UnknownError("connector in SQL base not close");
        }
    }
}


text:
package org.apache.reef.task.events;

import org.apache.reef.annotations.Provided;
import org.apache.reef.annotations.audience.Public;
import org.apache.reef.annotations.audience.TaskSide;
import org.apache.reef.util.Optional;

/**
 * Represents a message sent by the driver.
 */
@TaskSide
@Public
@Provided
public interface DriverMessage {

  /**
   * @return the message sent by the driver.
   */
  Optional<byte[]> get();
}


text:
/*
 * Argument.h
 *
 *  Created on: Aug 23, 2013
 *      Author: elor
 */

#ifndef ARGUMENT_H_
#define ARGUMENT_H_

class Argument
{
public:
  enum ValueType
  {
    noType, boolType, intType, uintType, doubleType, stringType
  };

private:
  union
  {
    bool boolValue;
    int intValue;
    unsigned int uintValue;
    double doubleValue;
    const char *stringValue;
  };

  bool defined;
  ValueType valueType;

  Argument();

public:
  Argument(ValueType type);
  virtual ~Argument();

  void clear();

  void set(bool value);
  void set(int value);
  void set(unsigned int value);
  void set(double value);
  void set(const char *value);

  void setType(ValueType _wantedType);
  ValueType getType();
  bool hasType(ValueType type) const;

  bool wasSet() const;

  bool getBool() const;
  int getInt() const;
  unsigned int getUInt() const;
  double getDouble() const;
  const char *getString() const;
};
#endif /* ARGUMENT_H_ */


text:
/*--------------------------------------------------------------
 Application.css
 Imports all stylesheets; sets defaults for bare elements
 --------------------------------------------------------------*/

@import 'layout.css';
@import 'content.css';

@media print { #sidebar { display:none; }
               #content { float: none; width:90%; }
               #content pre { color: #000; background: #eee; }
               #content form.comments { display:none; } }

body {
	background: url(../../images/theme/headerback.gif) repeat-x left top;
	font: normal 12px "lucida grande", verdana, arial, helvetica, sans-serif;
}

input,
textarea { font: normal 12px "bitstream vera sans", verdana, sans-serif; }

abbr  { border: none; }
cite  { font-style: normal; }
a img { border: none; padding: 0; margin: 0; }

/*a:link,  a:visited { color: #930; }
a:hover, a:active  { color: #fff; background: #000; }
*/
a { color: #1c9bdc; text-decoration: underline; }
a:visited { color: #000; text-decoration: underline; }
a:hover, a:active { color: #1873a1; text-decoration: underline; }


text:
package dk.bayes.dsl.demo

import org.junit._
import Assert._
import dk.bayes.dsl.variable.Gaussian
import dk.bayes.dsl.demo.variables.ClutteredGaussian
import dk.bayes.dsl.infer

/**
 * References for the Clutter problem:
 * - Tom Minka thesis (http://research.microsoft.com/en-us/um/people/minka/papers/ep/minka-thesis.pdf)
 *  - Christopher M. Bishop. Pattern Recognition and Machine Learning (Information Science and Statistics), 2009, chapter 10.7.1, page 511
 */
class ClutterProblemTest {

  @Test def test:Unit = {

    val x = Gaussian(15, 100)
    val y1 = ClutteredGaussian(x, w = 0.4, a = 10, value = 3)
    val y2 = ClutteredGaussian(x, w = 0.4, a = 10, value = 5)

    val posteriorX = infer(x)
    assertEquals(4.3431, posteriorX.m, 0.0001)
    assertEquals(4.3163, posteriorX.v, 0.0001)

  }

}


text:
<?php

##################################################################################
#    HOTELDRUID
#    Copyright (C) 2001-2013 by Marco Maria Francesco De Santis (marco@digitaldruid.net)
#
#    This program is free software: you can redistribute it and/or modify
#    it under the terms of the GNU Affero General Public License as published by
#    the Free Software Foundation, either version 3 of the License, or
#    any later version accepted by Marco Maria Francesco De Santis, which
#    shall act as a proxy as defined in Section 14 of version 3 of the
#    license.
#
#    This program is distributed in the hope that it will be useful,
#    but WITHOUT ANY WARRANTY; without even the implied warranty of
#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
#    GNU Affero General Public License for more details.
#
#    You should have received a copy of the GNU Affero General Public License
#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
##################################################################################

$file_interconnessioni = C_DATI_PATH."/dati_interconnessioni.php";
if (@is_file($file_interconnessioni)) {
unset($ic_present);
include($file_interconnessioni);
if (@is_array($ic_present)) {
flush();
if (function_exists('ob_flush')) ob_flush();
if ($closed_on_arr_dep != "SI") $closed_on_arr_dep = "NO";

$interconn_dir = opendir("./includes/interconnect/");
while ($mod_ext = readdir($interconn_dir)) {
if ($mod_ext != "." and $mod_ext != ".." and @is_dir("./includes/interconnect/$mod_ext")) {
include("./includes/interconnect/$mod_ext/name.php");
if ($ic_present[$interconnection_name] == "SI") {
$funz_update_availability = "update_availability_".$interconnection_func_name;
$funz_update_rates = "update_rates_".$interconnection_func_name;
if (!function_exists($funz_update_availability)) include("./includes/interconnect/$mod_ext/functions.php");
if ($aggiorna_disp) $funz_update_availability($file_interconnessioni,$anno,$PHPR_TAB_PRE,$lock);
if ($aggiorna_tar) $funz_update_rates($file_interconnessioni,$anno,$PHPR_TAB_PRE,$lock,"NO",$closed_on_arr_dep);
} # fine if ($ic_present[$interconnection_name] == "SI")
} # fine if ($modello_ext != "." and $modello_ext != ".." and...
} # fine while ($mod_ext = readdir($interconn_dir))
closedir($interconn_dir);

} # fine if (@is_array($ic_present))
} # fine if (@is_file($file_interconnessioni))

?>


text:
<!doctype html>

    <title>Code coverage report for express-stormpath/lib/controllers/login.js</title>
    <meta charset="utf-8" />
    <link rel="stylesheet" href="../../../prettify.css" />
    <link rel="stylesheet" href="../../../base.css" />
    <meta name="viewport" content="width=device-width, initial-scale=1">

      all files / express-stormpath/lib/controllers/ login.js

        85.71%
        Statements
        66/77

        65.45%
        Branches
        36/55

        100%
        Functions
        17/17

        85.71%
        Lines
        66/77

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190

1×
1×
1×
1×

1×
1×
1×

1×
23×

23×
23×
23×

23×
1×

22×
22×

22×
22×

22×

1×
41×
41×

41×

1×
25×

25×
3×

22×

41×

17×

5×
5×

5×

5×

12×

12×

12×
11×
1×

10×
10×
1×

9×

12×

21×

21×

1×
8×
8×

8×
8×
8×

8×
32×

8×

8×

21×

21×

13×
13×

13×
13×

13×

1×
1×

7×

'use strict';

var _ = require('lodash');
var extend = require('deep-extend');
var stormpath = require('stormpath');
var url = require('url');

var forms = require('../forms');
var helpers = require('../helpers');
var oauth = require('../oauth');

/**
 * Authenticate with a username and password.
 *
 * @method
 * @private
 *
 * @param {string} username - Username to authenticate with.
 * @param {string} password - Password to authenticate with.
 * @param {function} callback - Function to call when authenticated.
 */
function authenticate(application, credentials, callback) {
  var authenticator = stormpath.OAuthPasswordGrantRequestAuthenticator(application);

  credentials = credentials || {};
  credentials.username = credentials.login || credentials.username || '';
  credentials.password = credentials.password || '';

  if (!credentials.username || !credentials.password) {
    return callback(new Error('Invalid username or password.'));
  }

  authenticator.authenticate(credentials, function (err, authenticationResult) {
    Iif (err) {
      return callback(err);
    }

    authenticationResult.getAccount(function (err, account) {
      Iif (err) {
        return callback(err);
      }

      callback(null, {
        account: account,
        authenticationResult: authenticationResult
      });
    });
  });
}

/**
 * This controller logs in an existing user.  If there are any errors, an
 * error page is rendered.  If the process succeeds, the user will be logged in
 * and redirected.
 *
 * @method
 *
 * @param {Object} req - The HTTP request.
 * @param {Object} res - The HTTP response.
 * @param {function} next - The next function.
 */
module.exports = function (req, res, next) {
  var config = req.app.get('stormpathConfig');
  var application = req.app.get('stormpathApplication');

  res.locals.status = req.query.status;

  function handlePreLogin(formData, callback) {
    var preLoginHandler = config.preLoginHandler;

    if (preLoginHandler) {
      return preLoginHandler(formData, req, res, callback);
    }

    callback();
  }

  helpers.handleAcceptRequest(req, res, {
    'application/json': function () {
      switch (req.method) {
        case 'GET':
          helpers.getFormViewModel('login', config, function (err, viewModel) {
            Iif (err) {
              return helpers.writeJsonError(res, err);
            }

            res.json(viewModel);
          });
          break;

        case 'POST':
          Iif (!req.body) {
            return helpers.writeJsonError(res, new Error('Request requires that there is a body.'));
          }

          // Social login
          Iif (req.body.providerData) {
            return helpers.loginWithOAuthProvider(req.body, req, res);
          }

          handlePreLogin(req.body, function (err) {
            if (err) {
              return helpers.writeJsonError(res, err);
            }

            authenticate(application, req.body, function (err, result) {
              if (err) {
                return helpers.writeJsonError(res, err);
              }

              helpers.loginResponder(result.authenticationResult, result.account, req, res);
            });
          });
          break;

        default:
          next();
      }
    },
    'text/html': function () {
      var nextUri = url.parse(req.query.next || '').path;

      Iif (req.user && config.web.login.enabled) {
        var nextUrl = nextUri || config.web.login.nextUri;
        return res.redirect(302, nextUrl);
      }

      function renderForm(form, options) {
        Eif (options === undefined) {
          options = {};
        }

        var view = config.web.login.view;
        var oauthStateToken = oauth.common.resolveStateToken(req, res);
        var formActionUri = (config.web.login.uri + (nextUri ? ('?next=' + nextUri) : ''));

        var hasSocialProviders = _.some(config.web.social, function (socialProvider) {
          return socialProvider.enabled;
        });

        extend(options, {
          form: form,
          formActionUri: formActionUri,
          oauthStateToken: oauthStateToken,
          hasSocialProviders: hasSocialProviders
        });

        helpers.render(req, res, view, options);
      }

      helpers.setTempCookie(res, 'oauthRedirectUri', req.originalUrl);

      forms.loginForm.handle(req, {
        // If we get here, it means the user is submitting a login request, so we
        // should attempt to log the user into their account.
        success: function (form) {
          handlePreLogin(form.data, function (err) {
            Iif (err) {
              return renderForm(form, { error: err.userMessage || err.message });
            }

            authenticate(application, form.data, function (err, result) {
              Iif (err) {
                return renderForm(form, { error: err.userMessage || err.message });
              }

              helpers.loginResponder(result.authenticationResult, result.account, req, res);
            });
          });
        },
        // If we get here, it means the user didn't supply required form fields.
        error: function (form) {
          // Special case: if the user is being redirected to this page for the
          // first time, don't display any error.
          Eif (form.data && !form.data.login && !form.data.password) {
            return renderForm(form);
          }

          renderForm(form, { formErrors: helpers.collectFormErrors(form) });
        },
        // If we get here, it means the user is doing a simple GET request, so we
        // should just render the login template.
        empty: function (form) {
          renderForm(form);
        }
      });
    }
  }, next);
};

  Code coverage
  generated by istanbul at Tue Mar 29 2016 15:50:23 GMT-0700 (PDT)


text:
#include <QtGui>
#include <QApplication>

#include "mainwidget.h"

int main(int argc, char** argv)
{
    Q_INIT_RESOURCE(makaron);

    QApplication app(argc, argv);

    QIcon icon(":/images/makaron.jpg");

    app.setWindowIcon(icon);

    //QTextCodec::setCodecForTr(QTextCodec::codecForName("UTF-8"));
    //QTextCodec *codec = QTextCodec::codecForName("cp1251");
    //QTextCodec::setCodecForCStrings(codec);
    //QTextCodec::setCodecForTr(codec);

    MainWidget mw;
    mw.setWindowTitle("VerticalPermutations");

    QSize size;
    size.setWidth(1000);
    size.setHeight(300);

    mw.setMinimumSize(size);
    //mw.setMaximumSize(size);

    mw.show();

    return app.exec();
}