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="">

    <title>Carousel Template for Bootstrap</title>
 <link rel="stylesheet" href="https://ajax.googleapis.com/ajax/libs/jqueryui/1.11.4/themes/smoothness/jquery-ui.css">

    <link href="https://cdnjs.cloudflare.com/ajax/libs/select2/4.0.2/css/select2.min.css" rel="stylesheet" />

    <link href="docs/dist/css/bootstrap.min.css" rel="stylesheet">

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

    <link href="docs/assets/css/ie10-viewport-bug-workaround.css" rel="stylesheet">

    <link href="carousel.css" rel="stylesheet">

<?php

$disable_sign = False;

if($_SESSION["user"] == null)
{

$user_name=$_POST['username'];
$password1=$_POST['password'];

if($user_name != null){

echo "
YOU ENTERED DATA
";
echo "
YOU ENTERED DATA
";
echo "
YOU ENTERED DATA
";
echo "
YOU ENTERED DATA
";
echo "
YOU ENTERED DATA
";
echo "
YOU ENTERED DATA
";

session_start();

//session_start();
//if(session_status()=== PHP_SESSION_ACTIVE){
$_SESSION["user"]=$user_name;
echo $_SESSION["user"];
echo '
';
//print_r($_POST);

$servername = "localhost";
$username = "root";
$password = "root";
$dbname = "airline";

// Create connection
$conn = new mysqli($servername, $username, $password, $dbname);
// Check connection
if ($conn->connect_error) {
    die("Connection failed: " . $conn->connect_error);

session_unset();
session_destroy();
}
 else {
    $sql = "SELECT FIRST_NAME FROM passenger where email='$user_name' and password='$password1' ";

    $result = $conn->query($sql);
    if ($result->num_rows > 0) {
        $disable_sign = True;
        $_SESSION["user"]= ($result->fetch_assoc())["FIRST_NAME"] ;
        echo "Welcome to ". $_SESSION["user"] ;
        echo '
';
        //session_start();
        /*$sql1 = "SELECT * FROM users";
        $result = $conn->query($sql);
        echo "
";
        echo "
";
        echo " User Name 	";
        echo " Password 	";
        echo "
";
        while($row = $result->fetch_assoc()) {
        echo "
";
        echo " " . $row["username"]. "  ".$row["password"];
        echo "
";
        //$_SESSION["user"]=$row["username"];
        //$_SESSION["password"]=$row["password"];
        }
        echo "
";*/
        //header("Location:print.php");
    }
    else {
        echo "Authentication Failed";
        echo '
';
        echo 'Click here to go back ';
        session_unset();
        session_destroy();
    }
}
//}
//else{

  //  session_destroy();
    //header("Location:index.php");
//}
}

}
else{
  $disable_sign = True;
}

?>

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

              </button>

Home

About

Contact

                  Dropdown

Action

Another action

Something else here

Nav header

Separated link

One more separated link

              <?php

                if(  isset($_COOKIE["user"]) ){ ?>

                <form class="navbar-form navbar-right form-signin" action="list_available.php" method="POST">

  <button class="btn btn-default dropdown-toggle" type="button" id="dropdownMenu1" data-toggle="dropdown" aria-haspopup="true" aria-expanded="true">
    Hi
      <?php
            echo $_COOKIE["user"] ;
            #echo $_SESSION["user"] ;
      ?>

  </button>

Orders

Sign Out

              </form>

             <?php   } ?>

LIST OF TICKETS

<?php
//session_start();
//session_start();
//if(session_status()=== PHP_SESSION_ACTIVE){

echo '
';

$servername = "localhost";
$dbadmin = "root";
$password = "root";
$dbname = "airline";

// Create connection
$conn = new mysqli($servername, $dbadmin, $password, $dbname);
// Check connection
if ($conn->connect_error) {
    die("Connection failed: " . $conn->connect_error);

}
 else {

$sql = "SELECT t.* FROM ticket t, passenger p where t.PASSENGER_ID = p.ID and p.email = '".$_COOKIE["user_id"]."'" ;

    $result = $conn->query($sql);
    if ($result->num_rows > 0) {
        echo '

';
        //session_start();
        /*$sql1 = "SELECT * FROM users";
        $result = $conn->query($sql); */
        echo "<form >";
        echo "
";
        echo "
";
        echo "
";
        echo " Select	";
        echo " TICKET ID 	";
        echo " Flight ID 	";
        echo " Passenger ID 	";
        echo " Origin 	";
        echo " Destination 	";
        echo " Departure DATE 	";
        echo " Seat No. 	";

        echo "
";
        echo "
";

        echo "
";

        while($row = $result->fetch_assoc()) {

            echo "
";
            echo " <input  type=\"radio\" name=\"ticket-entry\" value='". $row["TICKET_ID"]  ."''> ". "  ".$row["TICKET_ID"]. "       " . $row["FLIGHT_NO"]. "  ".$row["PASSENGER_ID"]. "  ".$row["FROM"]. "  ".$row["TO"]. "  ".$row["DATE"]. "  ".$row["SEAT_NO"];
            echo "
";
            //$_SESSION["user"]=$row["username"];
            //$_SESSION["password"]=$row["password"];
        }

        echo "
";
        echo "
";
        ?>

              <input class="btn btn-success" value="Cancel Ticket" onclick="ticketDelete()">

        <?php
        echo "</form>";
        #echo "
 HIIIIIIIIII USER
";
        #echo "
".$_COOKIE["user"]."
";
        #echo "
 ". $_SESSION["user"] ."
";

         ?>

    <?php

    }
    else{
         echo "NO TICKETS FOUND";
    }
  }

?>

 </script>


text:
ManageIQ.angular.app.directive('startFormDiv', ['$timeout', function($timeout) {
  return {
    link: function(scope, _elem, attr) {
      scope.$watch(scope['afterGet'], function() {
        $timeout(function () {
          angular.element('#' + attr.startFormDiv).show();
        });
      });
    },
  };
}]);

redpajama_set_name: RedPajamaGithub


text:
#ifdef WITH_YAJL

#include "src/request_body_processor/json.h"

#include <list>
#include <iostream>
#include <string>

namespace modsecurity {
namespace RequestBodyProcessor {

JSON::JSON(Transaction *transaction) : m_transaction(transaction),
    m_handle(NULL),
    m_current_key("") {
    /**
     * yajl callback functions
     * For more information on the function signatures and order, check
     * http://lloyd.github.com/yajl/yajl-1.0.12/structyajl__callbacks.html
     */

    /**
     * yajl configuration and callbacks
     */
    static yajl_callbacks callbacks = {
        yajl_null,
        yajl_boolean,
        NULL /* yajl_integer  */,
        NULL /* yajl_double */,
        yajl_number,
        yajl_string,
        yajl_start_map,
        yajl_map_key,
        yajl_end_map,
        yajl_start_array,
        yajl_end_array
    };

    /**
     * yajl initialization
     *
     * yajl_parser_config definition:
     * http://lloyd.github.io/yajl/yajl-2.0.1/yajl__parse_8h.html#aec816c5518264d2ac41c05469a0f986c
     *
     * TODO: make UTF8 validation optional, as it depends on Content-Encoding
     */
    m_handle = yajl_alloc(&callbacks, NULL, this);

    yajl_config(m_handle, yajl_allow_partial_values, 0);
}

JSON::~JSON() {
    while (m_containers.size() > 0) {
        JSONContainer *a = m_containers.back();
        m_containers.pop_back();
        delete a;
    }
    yajl_free(m_handle);
}

bool JSON::init() {
    return true;
}

bool JSON::processChunk(const char *buf, unsigned int size, std::string *err) {
    /* Feed our parser and catch any errors */
    m_status = yajl_parse(m_handle,
        (const unsigned char *)buf, size);
    if (m_status != yajl_status_ok) {
        unsigned char *e = yajl_get_error(m_handle, 0,
            (const unsigned char *)buf, size);
        /* We need to free the yajl error message later, how to do this? */
        err->assign((const char *)e);
        yajl_free_error(m_handle, e);
        return false;
    }

    return true;
}

bool JSON::complete(std::string *err) {
    /* Wrap up the parsing process */
    m_status = yajl_complete_parse(m_handle);
    if (m_status  != yajl_status_ok) {
        unsigned char *e = yajl_get_error(m_handle, 0, NULL, 0);
        /* We need to free the yajl error message later, how to do this? */
        err->assign((const char *)e);
        yajl_free_error(m_handle, e);
        return false;
    }

    return true;
}

int JSON::addArgument(const std::string& value) {
    std::string data("");
    std::string path;

    for (size_t i =  0; i < m_containers.size(); i++) {
        JSONContainerArray *a = dynamic_cast<JSONContainerArray *>(
            m_containers[i]);
        path = path + m_containers[i]->m_name;
        if (a != NULL) {
            path = path + ".array_" + std::to_string(a->m_elementCounter);
        } else {
            path = path + ".";
        }
    }

    if (m_containers.size() > 0) {
        JSONContainerArray *a = dynamic_cast<JSONContainerArray *>(
            m_containers.back());
        if (a) {
            a->m_elementCounter++;
        } else {
            data = getCurrentKey();
        }
    } else {
        data = getCurrentKey();
    }

    if (!m_transaction->addArgument("JSON", path + data, value, 0)) {
        // cancel parsing by returning false
        return 0;
    }

    return 1;
}

/**
 * Callback for hash key values; we use those to define the variable names
 * under ARGS. Whenever we reach a new key, we update the current key value.
 */
int JSON::yajl_map_key(void *ctx, const unsigned char *key, size_t length) {
    JSON *tthis = reinterpret_cast<JSON *>(ctx);
    std::string safe_key;

    /**
     * yajl does not provide us with null-terminated strings, but
     * rather expects us to copy the data from the key up to the
     * length informed; we create a standalone null-termined copy
     * in safe_key
     */
    safe_key.assign((const char *)key, length);

    tthis->m_current_key = safe_key;

    return 1;
}

/**
 * Callback for null values
 *
 */
int JSON::yajl_null(void *ctx) {
    JSON *tthis = reinterpret_cast<JSON *>(ctx);
    return tthis->addArgument("");
}

/**
 * Callback for boolean values
 */
int JSON::yajl_boolean(void *ctx, int value) {
    JSON *tthis =  reinterpret_cast<JSON *>(ctx);
    if (value) {
        return tthis->addArgument("true");
    }
    return tthis->addArgument("false");
}

/**
 * Callback for string values
 */
int JSON::yajl_string(void *ctx, const unsigned char *value, size_t length) {
    JSON *tthis = reinterpret_cast<JSON *>(ctx);
    std::string v = std::string((const char*)value, length);
    return tthis->addArgument(v);
}

/**
 * Callback for numbers; YAJL can use separate callbacks for integers/longs and
 * float/double values, but since we are not interested in using the numeric
 * values here, we use a generic handler which uses numeric strings
 */
int JSON::yajl_number(void *ctx, const char *value, size_t length) {
    JSON *tthis = reinterpret_cast<JSON *>(ctx);
    std::string v = std::string((const char*)value, length);
    return tthis->addArgument(v);
}

/**
 * Callback for a new hash, which indicates a new subtree, labeled as the
 * current argument name, is being created
 */
int JSON::yajl_start_array(void *ctx) {
    JSON *tthis = reinterpret_cast<JSON *>(ctx);
    std::string name = tthis->getCurrentKey();
    tthis->m_containers.push_back(
        reinterpret_cast<JSONContainer *>(new JSONContainerArray(name)));
    return 1;
}

int JSON::yajl_end_array(void *ctx) {
    JSON *tthis = reinterpret_cast<JSON *>(ctx);
    if (tthis->m_containers.empty()) {
        return 1;
    }

    JSONContainer *a = tthis->m_containers.back();
    tthis->m_containers.pop_back();
    delete a;
    if (tthis->m_containers.size() > 0) {
        JSONContainerArray *ja = dynamic_cast<JSONContainerArray *>(
            tthis->m_containers.back());
        if (ja) {
            ja->m_elementCounter++;
        }
    }

    return 1;
}

int JSON::yajl_start_map(void *ctx) {
    JSON *tthis = reinterpret_cast<JSON *>(ctx);
    std::string name(tthis->getCurrentKey());
    tthis->m_containers.push_back(
        reinterpret_cast<JSONContainer *>(new JSONContainerMap(name)));
    return 1;
}

/**
 * Callback for end hash, meaning the current subtree is being closed, and that
 * we should go back to the parent variable label
 */
int JSON::yajl_end_map(void *ctx) {
    JSON *tthis = reinterpret_cast<JSON *>(ctx);
    if (tthis->m_containers.empty()) {
        return 1;
    }

    JSONContainer *a = tthis->m_containers.back();
    tthis->m_containers.pop_back();
    delete a;

    if (tthis->m_containers.size() > 0) {
        JSONContainerArray *ja = dynamic_cast<JSONContainerArray *>(
            tthis->m_containers.back());
        if (ja) {
            ja->m_elementCounter++;
        }
    }

    return 1;
}

}  // namespace RequestBodyProcessor
}  // namespace modsecurity

#endif  // WITH_YAJL


text:
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;

namespace Dashboard.Models
{
    public partial class AdministrativeServiceOther
    {
        public int PIN { get; set; }
        public int FiscalYear { get; set; }
        public int DepreciationTransportationEquipment { get; set; }
        public int EmployeeBenefit { get; set; }
        public int InterestWorkingCapitalAndAutoLoan { get; set; }
        public int MedicalContractedService { get; set; }
        public int MedicalPayroll { get; set; }
        public int MedicalSupply { get; set; }
        public int MedicalTotal { get; set; }
        public int QualityAssurance { get; set; }
        public int TrainingContractedService { get; set; }
        public int TrainingPayroll { get; set; }
        public int TrainingSupply { get; set; }
        public int TrainingTotal { get; set; }
    }
}


text:
// --------------------------------------------------------------------------------------------------------------------
// <copyright file="LastUpdate.cs" company="Joan Caron">
// Copyright (c) 2014 All Rights Reserved
// </copyright>
// <author>Joan Caron</author>
// <summary>Implements the last update class</summary>
// --------------------------------------------------------------------------------------------------------------------

namespace OpenWeatherMap
{
    using System;
    using System.Xml.Serialization;

    /// <summary>
    ///     Class LastUpdate.
    /// </summary>
    public sealed class LastUpdate
    {
        /// <summary>
        ///     Gets or sets the value.
        /// </summary>
        /// <value>
        ///     The value.
        /// </value>
        [XmlAttribute("value")]
        public DateTime Value { get; set; }
    }
}


text:
import logging

from airflow.hooks import PostgresHook
from airflow.models import BaseOperator
from airflow.utils.decorators import apply_defaults

class PostgresOperator(BaseOperator):
    """
    Executes sql code in a specific Postgres database

    :param postgres_conn_id: reference to a specific postgres database
    :type postgres_conn_id: string
    :param sql: the sql code to be executed
    :type sql: Can receive a str representing a sql statement,
        a list of str (sql statements), or reference to a template file.
        Template reference are recognized by str ending in '.sql'
    """

    template_fields = ('sql',)
    template_ext = ('.sql',)
    ui_color = '#ededed'

    @apply_defaults
    def __init__(
            self, sql,
            postgres_conn_id='postgres_default', autocommit=False,
            parameters=None,
            *args, **kwargs):
        super(PostgresOperator, self).__init__(*args, **kwargs)
        self.sql = sql
        self.postgres_conn_id = postgres_conn_id
        self.autocommit = autocommit
        self.parameters = parameters

    def execute(self, context):
        logging.info('Executing: ' + str(self.sql))
        self.hook = PostgresHook(postgres_conn_id=self.postgres_conn_id)
        self.hook.run(self.sql, self.autocommit, parameters=self.parameters)


text:
FROM ubuntu:18.04

RUN apt-get update && \
    DEBIAN_FRONTEND=noninteractive apt-get install --no-install-recommends -y \
    ca-certificates \
    g++ \
    python3-dev \
    python3-distutils \
    python3-venv \
    curl \
    jq \
    && rm -rf /var/lib/apt/lists/* \
    && cd /tmp \
    && curl -O https://bootstrap.pypa.io/get-pip.py \
    && python3 get-pip.py

RUN python3 -m venv /home/venv

ENV PATH="/home/venv/bin:$PATH"

RUN update-alternatives --install /usr/bin/python python /usr/bin/python3 1
RUN update-alternatives --install /usr/local/bin/pip pip /usr/local/bin/pip3 1

RUN pip install --no-cache-dir torch-model-archiver

RUN useradd -m model-server

# ADD "https://www.random.org/cgi-bin/randbyte?nbytes=10&format=h" skipcache

COPY dockerd-entrypoint.sh /usr/local/bin/dockerd-entrypoint.sh

RUN chmod +x /usr/local/bin/dockerd-entrypoint.sh \
    && chown -R model-server /home/model-server

USER model-server
WORKDIR /home/model-server
ENTRYPOINT ["/usr/local/bin/dockerd-entrypoint.sh"]


text:
<!DOCTYPE html>

    <title>Unify | Welcome...</title>

    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta name="description" content="">
    <meta name="author" content="">

    <link rel="shortcut icon" href="favicon.ico">

    <link rel="stylesheet" href="assets/plugins/bootstrap/css/bootstrap.min.css">
    <link rel="stylesheet" href="assets/css/style.css">

    <link rel="stylesheet" href="assets/plugins/line-icons/line-icons.css">
    <link rel="stylesheet" href="assets/plugins/font-awesome/css/font-awesome.min.css">
    <link rel="stylesheet" href="assets/plugins/owl-carousel/owl-carousel/owl.carousel.css">
    <link rel="stylesheet" href="assets/plugins/sky-forms/version-2.0.1/css/custom-sky-forms.css">

    <link rel="stylesheet" href="assets/css/pages/page_search.css">

    <link rel="stylesheet" href="assets/css/theme-colors/default.css">

    <link rel="stylesheet" href="assets/css/custom.css">

                        Languages

                                English

Spanish

Russian

German

Help

Login

                    <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-responsive-collapse">
                        Toggle navigation

                    </button>

                                Home

Option 1: Default Page

                                    Option 2: One Page

- One Page Template

- One Page Dark Theme

                                    Option 3: Shop UI

- Home Page

- Product Page

- Filter Grid Page

- Filter List Page

- Checkout Page

- Login Page

- Registration Page

Option 4: Home Discover

Option 5: Home Creative

Option 6: Home Inspire

Option 7: Home Desire

Option 8: Home Jobs

Option 9: Amazing Content

Option 10: Home Magazine

Option 11: Home Sidebar

Option 12: Home Portfolio

Option 13: Home Default v1

Option 14: Home Default v2

Option 15: Home Default v3

                                    Options: Misc Pages

- Blank page

- Boxed Page

- Boxed Image Page

- Boxed Fixed Menu

- Fixed Menu

- Dark Page

- Dark Boxed Page

- Dark Page With Different Theme Color

                                Pages

                                    About Pages

About Us

About Basic

About Me

About Our Team

                                    Profile Dashboard Pages

Profile Main Page

Profile Overview

Profile Users

Profile Projects

Profile Comments

Profile History

Profile Settings

                                    Job Pages

Jobs Main Page

Jobs Description Default

Jobs Description Basic

Jobs Description Min

                                    Email Templates

                                            Email Corporate

Corporate Aqua Color

Corporate Blue Color

Corporate Brown Color

Corporate Dark Blue Color

Corporate Green Color

Corporate Light Green Color

Corporate Grey Color

Corporate Orange Color

Corporate Purple Color

Corporate Red Color

                                            Email Flat

Flat Aqua Color

Flat Blue Color

Flat Brown Color

Flat Dark Blue Color

Flat Green Color

Flat Light Green Color

Flat Grey Color

Flat Orange Color

Flat Purple Color

Flat Red Color

                                            Email Modern

Modern Aqua Color

Modern Blue Color

Modern Brown Color

Modern Dark Blue Color

Modern Green Color

Modern Light Green Color

Modern Grey Color

Modern Orange Color

Modern Purple Color

Modern Red Color

                                    Service Pages

Our Services

Our Services Basic

Funny Boxes

                                    Pricing Tables

Colorful Pricing Tables

Flat Pricing Tables

Light Pricing Tables

Mega Pricing Tables

Default Pricing Tables

Invoice Page

                                    Search Results

Default Search Results

Search Result Tables

Coming Soon

                                    FAQs Pages

FAQs Page

FAQs Basic

Gallery Page

                                    Login and Registration

Registration Page

Login Page

Registration Option

Login Option

                                    Error Pages

404 Error Default

404 Error Option 1

404 Error Option 2

404 Error Option 3

Clients Page

                                    Column Pages

2 Columns Page Left

2 Columns Page Right

3 Columns Page

Privacy Policy

Terms Of Service

                                    Sub Level 1

Sub Level 2

                                            Sub Level 2

Sub Level 3

Sub Level 3

Sub Level 3

Sub Level 3

Sub Level 2

                                            Sub Level 2

Sub Level 3

Sub Level 3

Sub Level 3

                                Features

Typography & Components

 General Typography

 Headings Options

 Dividers

 Blockquote Blocks

 Box Shadows

 Testimonials

 Tagline Boxes

 Grid Layouts

 Alerts & Messages

 Labels & Badges

 Audio/Videos & Images

 Paginations

Header & Footers

 Headers

 Footers

Buttons & Icons

 General Buttons

 Brand & Social Buttons

 Loading & Hover Effects

 General Icons

 Font Awesome Icons

 Line Icons

 Glyphicons Icons (Bootstrap)

 Glyphicons Icons Pro

Common elements

 General Content Boxes

 Colored Boxes

 Funny Boxes

 Thumbnails

 Accordion & Tabs

 Timeline Option 1

 Timeline Option 2

 Tables

 Progress Bars

 Panels

Forms & Infographics

 Common Bootstrap Forms

 General Unify Forms

 Advanced Forms

 Form Layouts

 Advanced Layout Forms

 Form States

 Form Sliders

 Modals

 Carousel Examples

 Charts & Countdowns

 Google Maps

 Vector Maps

                                Portfolio

Default

Portfolio Item Option

Portfolio Item Option 1

Portfolio Item Option 2

Portfolio 2 Columns

Portfolio 3 Columns

Portfolio 4 Columns

Portfolio 4 Columns With Text

2 Columns

2 Columns No Sapce

2 Columns Grid Text

2 Columns Grid

3 Columns

3 Columns No Sapce

3 Columns Grid Text

3 Columns Grid

4 Columns

4 Columns Full Width No Sapce

4 Columns Fullwidth Grid Text

4 Columns Fullwidth Grid

4 Columns No Sapce

4 Columns Grid Text

4 Columns Grid

5 Columns

5 Columns Fullwidth No Sapce

5 Columns Fullwidth Grid Text

5 Columns Fullwidth Grid

6 Columns

6 Columns Fullwidth No Sapce

6 Columns Fullwidth Grid Text

6 Columns Fullwidth Grid

                                Blog

Blog Page

Blog Large

Blog Medium

Blog Full Width

Blog Timeline

Masonry Grid Blog

Blog Right Sidebar

Blog Left Sidebar

Blog Item Option 1

Blog Item Option 2

                                Contacts

Contacts Default

Contacts Advanced

Contacts Option 1

Contacts Option 2

Contacts Option 3

                                    <input type="text" class="form-control" placeholder="Search">

                                        <button class="btn-u" type="button">Go</button>

Discover new things

                    <input type="text" class="form-control" placeholder="Search words with regular expressions ...">

                        <button class="btn-u btn-u-lg" type="button"></button>

                <form action="" class="sky-form page-search-form">

                        <input type="checkbox" name="checkbox-inline" checked>Recent
                        <input type="checkbox" name="checkbox-inline">Related
                        <input type="checkbox" name="checkbox-inline">Popular
                        <input type="checkbox" name="checkbox-inline">Most Common

                </form>

Top Categories

 Top 100 templates

At vero eos et accusamus et iusto odio dignissimos ducimus qui blanditiis praesentium

 Wikipedia (10837)

At vero eos et accusamus et iusto odio dignissimos ducimus qui blanditiis praesentium

 Web design (462)

At vero eos et accusamus et iusto odio dignissimos ducimus qui blanditiis praesentium

 Education (396)

At vero eos et accusamus et iusto odio dignissimos ducimus qui blanditiis praesentium

 Filmography (156)

At vero eos et accusamus et iusto odio dignissimos ducimus qui blanditiis praesentium

 Hi-Tech (324)

At vero eos et accusamus et iusto odio dignissimos ducimus qui blanditiis praesentium

 Programming (4053)

At vero eos et accusamus et iusto odio dignissimos ducimus qui blanditiis praesentium

 Music (268)

At vero eos et accusamus et iusto odio dignissimos ducimus qui blanditiis praesentium

 Engineering (703)

At vero eos et accusamus et iusto odio dignissimos ducimus qui blanditiis praesentium

 Others (1296)

At vero eos et accusamus et iusto odio dignissimos ducimus qui blanditiis praesentium

Popular Search

At vero eos et accusamus et iusto odio dignissimos ducimus qui blanditiis. View more

Web Design 88%

PHP/WordPress 76%

HTML/CSS 97%

#HTML5

#Bootstrap

#Blog and Portfolio

#Responsive

#Unify

#JavaScript

                        18298

Web Developers

                        24583

Designers

                        37904

Open Contests

                        50892

Happy Customors

Unify Template

One Page Template

Excepturi sint occaecati cupiditate non provident, at vero eos et accusamus et iusto odio..

Graphic Design

Mockup Design

Excepturi sint occaecati cupiditate non provident, at vero eos et accusamus et iusto odio..

Web Development

HTML5/CSS3 + PHP

Excepturi sint occaecati cupiditate non provident, at vero eos et accusamus et iusto odio..

Forbes 1000

By Edward Rooster

 Oct 07, 2014

At vero eos et accusamus et iusto odio dignissimos ducimus qui blanditiis praesentium...

 34039

 451

 10842

 863

Business & Finance

By The Economist

 Oct 02, 2014

At vero eos et accusamus et iusto odio dignissimos ducimus qui blanditiis praesentium...

 4258

 382

 2938

 230

Web Programming

By Edward Rooster

 Jan 02, 2013

At vero eos et accusamus et iusto odio dignissimos ducimus qui blanditiis praesentium...

 34039

 451

 10842

 863

Social Network

By Twitter Inc.

 Jan 02, 2013

At vero eos et accusamus et iusto odio dignissimos ducimus qui blanditiis praesentium...

 25232

 543

 6782

 943

Education/Travel

By Stanford University

 Jan 02, 2013

At vero eos et accusamus et iusto odio dignissimos ducimus qui blanditiis praesentium...

 7653

 342

 3621

 583

Music/Films

By Sony Corporation

 Jan 02, 2013

At vero eos et accusamus et iusto odio dignissimos ducimus qui blanditiis praesentium...

 62637

 741

 21314

 1041

David Case

                                Web Developer, Google

I just wanted to tell you how much I like to use Unify - it's so sleek and elegant!

                            The customisation options you implemented are countless, and I feel sorry I can't use them all. Good job, and keep going!

Tina Krueger

                                UI Designer, Apple

Keep up the great work. Your template is by far the best on the market in terms of features, quality and value or money.At vero eos et accusamus et iusto odio dignissimos ducimus qui blanditiis praesentium..

John Clarck

                                Marketing & Cunsulting, IBM

So far I really like the theme. I am looking forward to exploring more of your themes. Thank you! At vero eos et accusamus et iusto odio dignissimos ducimus qui blanditiis praesentium...

About Unify dolor sit amet, consectetur adipiscing elit. Maecenas eget nisl id libero tincidunt sodales.

Duis eleifend fermentum ante ut aliquam. Cras mi risus, dignissim sed adipiscing ut, placerat non arcu.

Latest Posts

                                    Incredible content
                                    May 8, 2014

                                    Best shoots
                                    June 23, 2014

                                    New Terms and Conditions
                                    September 15, 2014

Useful Links

About us

Portfolio

Latest jobs

Community

Contact us

Contact Us

                        <address class="md-margin-bottom-40">
                            25, Lorem Lis Street, Orange

                            California, US

                            Phone: 800 123 3456

                            Fax: 800 123 3456

                            Email: info@anybiz.com
                        </address>

                            2014 © All Rights Reserved.
                           Privacy Policy | Terms of Service


text:
/**
 * Pipedrive API v1
 * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
 *
 * The version of the OpenAPI document: 1.0.0
 *
 *
 * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
 * https://openapi-generator.tech
 * Do not edit the class manually.
 *
 */

import ApiClient from '../ApiClient';
import BaseResponse from './BaseResponse';
import PostRoleSettingsAllOf from './PostRoleSettingsAllOf';
import PostRoleSettingsAllOfData from './PostRoleSettingsAllOfData';

/**
 * The PostRoleSettings model module.
 * @module model/PostRoleSettings
 * @version 1.0.0
 */
class PostRoleSettings {
    /**
     * Constructs a new PostRoleSettings.
     * @alias module:model/PostRoleSettings
     * @implements module:model/BaseResponse
     * @implements module:model/PostRoleSettingsAllOf
     */
    constructor() {
        BaseResponse.initialize(this);PostRoleSettingsAllOf.initialize(this);
        PostRoleSettings.initialize(this);
    }

    /**
     * Initializes the fields of this object.
     * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
     * Only for internal use.
     */
    static initialize(obj) {
    }

    /**
     * Constructs a PostRoleSettings from a plain JavaScript object, optionally creating a new instance.
     * Copies all relevant properties from data to obj if supplied or a new instance if not.
     * @param {Object} data The plain JavaScript object bearing properties of interest.
     * @param {module:model/PostRoleSettings} obj Optional instance to populate.
     * @return {module:model/PostRoleSettings} The populated PostRoleSettings instance.
     */
    static constructFromObject(data, obj) {
        if (data) {
            obj = obj || new PostRoleSettings();
            BaseResponse.constructFromObject(data, obj);
            PostRoleSettingsAllOf.constructFromObject(data, obj);

            if (data.hasOwnProperty('success')) {
                obj['success'] = ApiClient.convertToType(data['success'], 'Boolean');

                delete data['success'];
            }
            if (data.hasOwnProperty('data')) {
                obj['data'] = PostRoleSettingsAllOfData.constructFromObject(data['data']);

                delete data['data'];
            }

            if (Object.keys(data).length > 0) {
                Object.assign(obj, data);
            }

        }
        return obj;
    }

}

/**
 * If the response is successful or not
 * @member {Boolean} success
 */
PostRoleSettings.prototype['success'] = undefined;

/**
 * @member {module:model/PostRoleSettingsAllOfData} data
 */
PostRoleSettings.prototype['data'] = undefined;

// Implement BaseResponse interface:
/**
 * If the response is successful or not
 * @member {Boolean} success
 */
BaseResponse.prototype['success'] = undefined;
// Implement PostRoleSettingsAllOf interface:
/**
 * @member {module:model/PostRoleSettingsAllOfData} data
 */
PostRoleSettingsAllOf.prototype['data'] = undefined;

export default PostRoleSettings;


text:
{{strings.newInvitation}}

{{strings.title}}

        {{strings.importYouList}}

          {{strings.here}}.

    <form name="adminForm">

            {{strings.asicsAthlete}}

              <input ng-model="isAthlete" ng-checked="isAthlete" aria-label="Is athlete Asics?"
                     type="checkbox"
                     id="inputIsAthlete">

            {{strings.formName}}
            <input ng-model="guest.name" name="name" ng-required="true" names-only="names-only"
                   class="form-control" id="inputName">

{{strings.formNameError}}

            {{strings.formName}}
            <select name="athleteName" ng-model="athleteGuest.name" class="form-control"
                    ng-options="athlete as athlete for athlete in athletes" required>
              <option value="" disabled selected>{{strings.chooseAthlete}}</option>
            </select>

{{strings.formOccupationError}}

            {{strings.formEmail}}
            <input ng-model="guest.email" name="email" type="email" minlength="5" maxlength="100"
                   ng-pattern="/^.+@.+..+$/" required="required" class="form-control" id="inputEmail">

{{strings.formEmailRequiredError}}

{{strings.formEmailInvalidError}}

            {{strings.formCountry}}
            <select name="occupation" ng-model="guest.country_key" class="form-control" required
                    ng-options="key as value for (key, value) in countries[language]">

            </select>

{{strings.formCountryRequireError}}

            {{strings.formLanguage}}
            <select ng-model="guest.language" name="language" class="form-control">
              <option ng-selected="true">PT</option>
              <option>EN</option>
            </select>

            {{strings.formOccupation}}
            <select name="occupation" ng-model="guest.occupation" class="form-control"
                    ng-options="occupation as occupation for occupation in occupations" required>
              <option value="" disabled selected>{{strings.formOccupationOption}}</option>
            </select>

{{strings.formOccupationRequireError}}

          <button ng-click="inviteGuest()" ng-class="adminForm.$invalid ? 'btn-disabled' : '' "
                  ng-disabled="adminForm.$invalid" type="submit"
                  class="btn btn-default centered">
            {{strings.sendInvitation}}
          </button>

    </form>

{{strings.newInvitation}}

{{strings.csvTitle}}

          {{strings.manualInvite}}.

    <form name="adminCsvForm">

            {{strings.formEmail}} ({{strings.formCsvEmailInfo}})
            <input ng-model="adminEmail" name="adminemail" type="email" minlength="5" maxlength="100"
                   ng-pattern="/^.+@.+..+$/" required="required" class="form-control">

{{strings.formEmailRequiredError}}

{{strings.formEmailInvalidError}}

            {{strings.formFile}}

              {{file ? strings.formFileSelected : strings.formFileSelect}}
              <input fileread="file" name="file" type="file" required="required" class="form-control" id="guestListFile">

            <button ng-class="adminCsvForm.$invalid ? 'btn-disabled' : '' "
                    ng-click="sendFile()"
                    ng-disabled="adminCsvForm.$invalid" type="submit"
                    class="btn btn-default centered">
              {{strings.sendCsvFile}}
            </button>

    </form>


text:
// Namespace
var ASN_SCRAGNT = ASN_SCRAGNT || {};

ASN_SCRAGNT.openScoringAgent = function(url) {
	window.open(url,'_blank',
		'width=800,height=600,top=20,left=100,menubar=yes,status=yes,location=no,toolbar=yes,scrollbars=yes,resizable=yes');
};

/*
 * Retrieve a student's grade from the external scoring service and update
 * the score input with the returned grade
 */
ASN_SCRAGNT.refreshScore = function(refreshUrl) {
	jQuery.getJSON(ASN_SCRAGNT.encodeUrl(refreshUrl),function(data){
		if (data['score']) {
			var newScore = data['score'];
			var inp = document.getElementById("grade");
			if(newScore !== '' && newScore > 0) {
				newScore = Math.round(newScore*10)/10;
			}

			inp.value = newScore;
			$('#scoringAgent-refresh-reminder').hide();
		}
	});
};

ASN_SCRAGNT.displayRefreshReminder = function() {
	$('#scoringAgent-refresh-reminder').show();
};

ASN_SCRAGNT.encodeUrl = function(url) {

	if (url.indexOf("?") > 0) {
		encodedParams = "?";
		parts = url.split("?");
		params = parts[1].split("&");
		for (i = 0; i < params.length; i++) {
			if (i > 0) {
				encodedParams += "&";
			}
			if (params[i].indexOf("=") > 0) {
				// Avoid null values
				p = params[i].split("=");
				encodedParams += (p[0] + "=" + escape(encodeURI(p[1])));
			} else {
				encodedParams += params[i];
			}
		}
		url = parts[0] + encodedParams;
	}
	return url;
};


text:
package sun.awt.motif;

import sun.awt.datatransfer.ToolkitThreadBlockedHandler;
import sun.awt.SunToolkit;

final class MToolkitThreadBlockedHandler implements
                                 ToolkitThreadBlockedHandler {
    private static ToolkitThreadBlockedHandler priveleged_lock = null;
    static {
        priveleged_lock = new MToolkitThreadBlockedHandler();
    }
    private MToolkitThreadBlockedHandler() {}
    static ToolkitThreadBlockedHandler getToolkitThreadBlockedHandler() {
        return priveleged_lock;
    }
    public void lock() {
        SunToolkit.awtLock();
    }
    public void unlock() {
        SunToolkit.awtUnlock();
    }
    public native void enter();
    public native void exit();
}


text:
import argparse
import logging
import pkgutil
import string

from cloudenvy.config import EnvyConfig,Config

import cloudenvy.commands

#TODO(bcwaldon): replace this with entry points!
def _load_commands():
    """Iterate through modules in command and import suspected command classes

    This looks for a class in each module in cloudenvy.commands that has the
    same name as its module with the first character uppercased. For example,
    the cloudenvy.commands.up module should have a class Up within it.
    """
    modlist = list(pkgutil.iter_modules(cloudenvy.commands.__path__))
    #NOTE(bcwaldon): this parses out a string representation of each
    # individual command module. For example, if we had a single command
    # in cloudenvy.commands named 'up', this list would look like ['up]
    commands = [_[1] for _ in modlist]
    for command in commands:
        #NOTE(bcwaldon): the __import__ statement returns a handle on the
        # top-level 'cloudenvy' package, so we must iterate down through
        # each sub-package to get a handle on our module
        module_name = 'cloudenvy.commands.{0}'.format(command)
        _cloudenvy = __import__(module_name, globals(), locals(), [], -1)
        module = getattr(_cloudenvy.commands, command)

        command_class = getattr(module, string.capitalize(command))
        yield (command, command_class)

def _build_parser():
    parser = argparse.ArgumentParser(
        description='Launch a virtual machine on an OpenStack cloud.')
    parser.add_argument('-v', '--verbosity', action='count',
                        help='Increase output verbosity.')
    parser.add_argument('-c', '--cloud', action='store',
                        help='Specify which cloud to use.')
    return parser

def _init_help_command(parser, subparser):

    def find_command_help(config, args):
        if args.command:
            subparser.choices[args.command].print_help()
        else:
            parser.print_help()

    help_cmd = subparser.add_parser(
        'help', help='Display help information for a specific command.'
    )
    help_cmd.add_argument(
        'command', action='store', nargs='?',
        help='Specific command to describe.'
    )
    help_cmd.set_defaults(func=find_command_help)

    return parser

def _init_commands(commands, parser):
    _commands = {}
    for (command, command_class) in commands:
        _commands[command] = command_class(parser, _commands)

def main():
    parser = _build_parser()
    command_subparser = parser.add_subparsers(title='Available commands')
    _init_help_command(parser, command_subparser)

    commands = _load_commands()
    _init_commands(commands, command_subparser)

    args = parser.parse_args()
    config = Config(args)
    config = EnvyConfig(config)

    if args.verbosity == 3:
        logging.getLogger().setLevel(logging.DEBUG)
        logging.getLogger('novaclient').setLevel(logging.DEBUG)
    elif args.verbosity == 2:
        logging.getLogger().setLevel(logging.DEBUG)
        logging.getLogger('novaclient').setLevel(logging.INFO)
    elif args.verbosity == 1:
        logging.getLogger().setLevel(logging.INFO)

    args.func(config, args)


text:
#ifndef	__DXSND_H__
#define	__DXSND_H__

#if defined(_LANGUAGE_C_PLUS_PLUS)||defined(__cplusplus)||defined(c_plusplus)
extern "C" {
#endif

/*---------------------------------------------------------------------------*/

#define SNDINF_MAX 512

#define SNDFLAG_NONE 0
#define SNDFLAG_READY_WAV 1
#define SNDFLAG_READY_OGG 2
#define SNDFLAG_LOOP 0x1000

int SndInit( HWND hWnd );
void SndTerm( void );
void SndReset( void );
void SndDelete( int id );
void SndSetVolume( int id, int vol );
void SndSetPan( int id, int pan );
void SndSetLoop( int id, int loop );
int SndRegistWav( int newid, char *mem, int option );
int SndRegistOgg( int newid, char *fname, int option );
void SndStopAll( void );

void SndPlay( int id );
void SndPlayPos( int id, int pos );
void SndStop( int id );
int SndGetStatus( int id, int option );
double SndGetTime( int id, int option );

/*---------------------------------------------------------------------------*/

#if defined(_LANGUAGE_C_PLUS_PLUS)||defined(__cplusplus)||defined(c_plusplus)
}
#endif

#endif


text:
require 'pathname'

class ApplicationController < ActionController::Base
  include Pundit
  protect_from_forgery

  rescue_from Pundit::NotAuthorizedError, with: :user_not_authorized

  # Kill all proxy and browser caching of html
  before_action do
    headers['Cache-Control'] = 'no-store, max-age=0'
  end

  def user_not_authorized
    if current_user
      flash[:warning] = 'You are not authorized to perform this action.'
      redirect_to root_path
    else
      redirect_to login_path
    end
  end

  def ensure_valid_user
    if current_user.nil?
      flash[:warning] = "You must login"
      session[:return_to] = request.url
      redirect_to login_path
    end
  end

  def current_user
    @current_user ||= User.find(session[:user_id]) if session[:user_id]
  end
  helper_method :current_user

  def set_current_user(user)
    if user
      session[:user_id] = user.id
    else
      session[:user_id] = nil
    end
  end

  def not_found
    raise ActionController::RoutingError.new('Not Found')
  end

end


text:
<component name="libraryTable">
  <library name="react-native-0.19.1">
    <ANNOTATIONS>
      <root url="jar://$PROJECT_DIR$/../node_modules/react-native-signature-capture/android/build/intermediates/exploded-aar/com.facebook.react/react-native/0.19.1/annotations.zip!/" />
    </ANNOTATIONS>
    <CLASSES>
      <root url="jar://$PROJECT_DIR$/../node_modules/react-native-signature-capture/android/build/intermediates/exploded-aar/com.facebook.react/react-native/0.19.1/jars/libs/infer-annotations-1.5.jar!/" />
      <root url="jar://$PROJECT_DIR$/../node_modules/react-native-signature-capture/android/build/intermediates/exploded-aar/com.facebook.react/react-native/0.19.1/jars/classes.jar!/" />
      <root url="file://$PROJECT_DIR$/../node_modules/react-native-signature-capture/android/build/intermediates/exploded-aar/com.facebook.react/react-native/0.19.1/res" />
    </CLASSES>
    <JAVADOC />
    <SOURCES>
      <root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/com.facebook.react/react-native/0.19.1/1e0c1886c718bca7c2a578508334188fb18cc512/react-native-0.19.1-sources.jar!/" />
    </SOURCES>
  </library>
</component>


text:
/**
 * Bootstrap - Lil' B
 * Helpers
 */

/**
 * Helper Classes
 * @additional
 * @helper
 */

/**
 * .col-solo
 * This is designed to be added to "column" sized elements where you wish to have
 * a desired size (e.g. col-md-8 for width of 66.6667%), but you don't it to float
 * or to have any elements next to it.
 *
 * This is useful for single-page type layouts where content blocks need to
 * be slightly narrower instead of col-md-12 or container width
 * (default-max 1170px)
 *
 * Example:
 *

 *

 *         Content here
 *

 *

 */

.col-solo {
    float: none;
    margin-left: auto;
    margin-right: auto;
}

/**
 * .flex-video
 * This helper class allows for video embeds to be responsive. Just add your video embed inside of a parent .flex-video div.
 *
 * Most videos these days have a 16:9 (HD) ratio. If your video embed is of a 4:3 (SD) ratio, add .sd along with the .flex-video class.
 *
 * High-Depth ratio videos (16:9)
 *

 *     * Insert video embed here *
 *

 *
 * Standard-Depth ratio videos (4:3)
 *

 *     * Insert video embed here *
 *

 *
 * This helper was inspired by the .flex-video helper found in Foundation:
 * @source: http://foundation.zurb.com/docs/components/flex_video.html
 */

.flex-video {
    height: 0;
    margin-bottom: 1.5em;
    overflow: hidden;
    position: relative;
    padding-top: 56.25%;
}

.flex-video embed,
.flex-video iframe,
.flex-video object,
.flex-video video {
    height: 100%;
    left: 0;
    position: absolute;
    top: 0;
    width: 100%;
}

.flex-video.sd {
    padding-top: 75%;
}

/**
 * .fixed-z
 * This helper class adds the "translateZ" hack for selectors that are set
 * as position: fixed to help prevent brower repaints on browser scrolls/resize.
 */

.fixed-z {
    -webkit-transform: translateZ(0);
    -moz-transform: translateZ(0);
    -ms-transform: translateZ(0);
    -o-transform: translateZ(0);
    transform: translateZ(0);
}

/**
 * .no-select
 * This helper class disables selection for selectors. This is handy for
 * navigations, links, headers, buttons, etc..
 */
.no-select {
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    -khtml-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

/**
 * .text-lowercase
 * This helper class transforms the text within to all lowercase.
 */
.text-lowercase {
    text-transform: lowercase;
}

/**
 * .text-uppercase
 * This helper class transforms the text within to all uppercase / uppercase.
 */

.text-uppercase {
    text-transform: uppercase;
}

/**
 * .v-center
 * This helper class helps vertically align elements.
 * In order to get .v-center to work properly, you have to have a child
 * .v-center within the parent .v-center-wrap selector.
 *
 * It is recommended that you add some sort of height to your .v-center selector
 * to get the desired effect.
 *
 * Example:
 *

 *

 *
I'm vertically aligned!

 *

 *

 *
 */

.v-center-wrap {
    display: table;
    width: 100%;
}

.v-center {
    display: table-cell;
    vertical-align: middle;
}


text:
import { RecurrentModifyModel } from "./recurrent-modify.model";
import { EnumRecurrentPaymentUpdateInterval } from "../../enums";

export interface RecurrentModifyIntervalModel extends RecurrentModifyModel {
  interval: EnumRecurrentPaymentUpdateInterval
}


text:
'''
rest_client provides exactly one public type called RestClient, which wraps all
REST requests in qumulo.rest.*

For each function qumulo.rest.xxx.yyy(conninfo, credentials, a, b, c),
there will be a method RestClient.xxx.yyy(a, b, c). The conninfo and
credentials parameters are set up in the RestClient constructor, should they be
provided.

Moreover, the return type from these requests is not a (dict, etag) tuple,
but a python object with the fields set to the key, value items from the dict,
along with an etag field. (Nobody is returning an etag field.)
'''

import functools
import itertools
import logging
import time
import types

from qumulo.lib.auth import Credentials

import qumulo.lib.request as request

log = logging.getLogger(__name__)
log.setLevel(level=logging.INFO)

def _wrap_rest_request(request_method):
    '''
    Wrap a function that begins with the two parameters conninfo and credentials
    returning a function suitable for use as a method on a rest module class.
    '''
    @functools.wraps(request_method)
    def wrapper(self, *args, **kwargs):
        with_etag = kwargs.pop('with_etag', False)

        # If the user asked for us to include the etag, they will get it;
        # otherwise, it's more useful to just return the decoded JSON response.
        def etag_stripper(response):
            if not (hasattr(response, 'data') and hasattr(response, 'etag')):
                return itertools.imap(etag_stripper, response)

            if with_etag:
                return response
            else:
                return response.data

        start_time = time.time() * 1000
        params = []
        if args:
            params += [unicode(repr(arg)) for arg in args]

        if kwargs:
            params += [u'%s=%s' % r for r in kwargs.iteritems()]

        method_full_name = u'{}.{}'.format(request_method.__module__,
            request_method.__name__)

        log.debug(u'Calling {}:{}: {}({})'.format(
            self.client.conninfo.host, self.client.conninfo.port,
            method_full_name, u', '.join(params)))

        response = request_method(
            self.client.conninfo, self.client.credentials, *args, **kwargs)

        log.debug('{0} response: OK ({1:.2f}ms)'.format(
            method_full_name, (time.time() * 1000) - start_time))

        return etag_stripper(response)

    return wrapper

class RestClient(object):
    '''
    Provide access to the entire QEFS REST API surface.

    N.B. The class is partially defined here, then filled out with reflection
         over the qumulo.rest namespace to add properties for each module.
    '''
    Error = request.RequestError

    def __init__(self, address, port, credentials=None, timeout=None):
        self.conninfo = request.Connection(address, port, timeout=timeout)
        self.client = self  # for request, make this class act like a RestModule
        self.credentials = credentials
        self.timeout = timeout

    @property
    def port(self):
        return self.conninfo.port

    @property
    def chunked(self):
        return self.conninfo.chunked

    @chunked.setter
    def chunked(self, new_value):
        self.conninfo.chunked = new_value

    @property
    def chunk_size(self):
        return self.conninfo.chunk_size

    @chunk_size.setter
    def chunk_size(self, new_value):
        self.conninfo.chunk_size = new_value

    # Use the real wrapper for the base rest_request
    request = _wrap_rest_request(request.rest_request)

    def login(self, username, password):
        response = self.auth.login(username, password)
        self.credentials = Credentials(response['issue'],
                                       response['key'],
                                       response['key_id'],
                                       response['algorithm'])
        return self.credentials

    # A lot of HTTPExceptions cause the connection always fail after being
    # receiving the error over it. Create a new connection if this occurs.
    def refresh_connection(self):
        address = self.conninfo.host
        port = self.conninfo.port
        chunked = self.conninfo.chunked
        chunk_size = self.conninfo.chunk_size
        self.conninfo = request.Connection(address, port, chunked, chunk_size,
            timeout=self.timeout)

def _wrap_rest_module(module, existing_property):
    '''
    Given a module, return a property that mimics it.

    This is tricky because we want to wrap each function in the module, and bind
    its first two arguments with fields in the RestClient object. However, we
    don't have the RestClient object instantiated at this point. So, what we
    return is the ability to create the mimicking class, instead of the class
    itself.
    '''
    class RestModule(object):
        __doc__ = module.__doc__

        def __init__(self, client):
            self.client = client

    if existing_property is None:
        wrapped_class = RestModule
    else:
        wrapped_class = existing_property.fget  # get the existing class

    for name, method in vars(module).iteritems():
        if callable(method) and getattr(method, 'request', False):
            setattr(wrapped_class, name, _wrap_rest_request(method))

    return property(wrapped_class)

def _wrap_all_rest_modules(root, cls):
    '''
    Wrap all rest modules loaded in the provided root module, adding a property
    to the RestClient type for each. If a property already exists, it will not
    be overwritten.

    This allows the private modules to dominate the public ones.
    '''
    for name, module in vars(root).iteritems():
        if isinstance(module, types.ModuleType):
            existing_property = getattr(cls, name, None)
            setattr(cls, name, _wrap_rest_module(module, existing_property))

# Pull in all the REST client modules and methods
import qumulo.rest

# Wrap them all.
_wrap_all_rest_modules(qumulo.rest, RestClient)


text:
<?php

/**
 * Stock resource model
 *
 * @category    Mage
 * @package     Mage_CatalogInventory
 * @author      Magento Core Team <core@magentocommerce.com>
 */
class Mage_CatalogInventory_Model_Resource_Stock extends Mage_Core_Model_Resource_Db_Abstract
{
    /**
     * Is initialized configuration flag
     *
     * @var boolean
     */
    protected $_isConfig;

    /**
     * Manage Stock flag
     *
     * @var boolean
     */
    protected $_isConfigManageStock;

    /**
     * Backorders
     *
     * @var boolean
     */
    protected $_isConfigBackorders;

    /**
     * Minimum quantity allowed in shopping card
     *
     * @var int
     */
    protected $_configMinQty;

    /**
     * Product types that could have quantities
     *
     * @var array
     */
    protected $_configTypeIds;

    /**
     * Notify for quantity below _configNotifyStockQty value
     *
     * @var int
     */
    protected $_configNotifyStockQty;

    /**
     * Ctalog Inventory Stock instance
     *
     * @var Mage_CatalogInventory_Model_Stock
     */
    protected $_stock;

    /**
     * Define main table and initialize connection
     *
     */
    protected function _construct()
    {
        $this->_init('cataloginventory/stock', 'stock_id');
    }

    /**
     * Lock product items
     *
     * @param Mage_CatalogInventory_Model_Stock $stock
     * @param int|array $productIds
     * @return Mage_CatalogInventory_Model_Resource_Stock
     */
    public function lockProductItems($stock, $productIds)
    {
        $itemTable = $this->getTable('cataloginventory/stock_item');
        $select = $this->_getWriteAdapter()->select()
            ->from($itemTable)
            ->where('stock_id=?', $stock->getId())
            ->where('product_id IN(?)', $productIds)
            ->forUpdate(true);
        /**
         * We use write adapter for resolving problems with replication
         */
        $this->_getWriteAdapter()->query($select);
        return $this;
    }

    /**
     * Get stock items data for requested products
     *
     * @param Mage_CatalogInventory_Model_Stock $stock
     * @param array $productIds
     * @param bool $lockRows
     * @return array
     */
    public function getProductsStock($stock, $productIds, $lockRows = false)
    {
        if (empty($productIds)) {
            return array();
        }
        $itemTable = $this->getTable('cataloginventory/stock_item');
        $productTable = $this->getTable('catalog/product');
        $select = $this->_getWriteAdapter()->select()
            ->from(array('si' => $itemTable))
            ->join(array('p' => $productTable), 'p.entity_id=si.product_id', array('type_id'))
            ->where('stock_id=?', $stock->getId())
            ->where('product_id IN(?)', $productIds)
            ->forUpdate($lockRows);
        return $this->_getWriteAdapter()->fetchAll($select);
    }

    /**
     * Correct particular stock products qty based on operator
     *
     * @param Mage_CatalogInventory_Model_Stock $stock
     * @param array $productQtys
     * @param string $operator +/-
     * @return Mage_CatalogInventory_Model_Resource_Stock
     */
    public function correctItemsQty($stock, $productQtys, $operator = '-')
    {
        if (empty($productQtys)) {
            return $this;
        }

        $adapter = $this->_getWriteAdapter();
        $conditions = array();
        foreach ($productQtys as $productId => $qty) {
            $case = $adapter->quoteInto('?', $productId);
            $result = $adapter->quoteInto("qty{$operator}?", $qty);
            $conditions[$case] = $result;
        }

        $value = $adapter->getCaseSql('product_id', $conditions, 'qty');

        $where = array(
            'product_id IN (?)' => array_keys($productQtys),
            'stock_id = ?'      => $stock->getId()
        );

        $adapter->beginTransaction();
        $adapter->update($this->getTable('cataloginventory/stock_item'), array('qty' => $value), $where);
        $adapter->commit();

        return $this;
    }

    /**
     * add join to select only in stock products
     *
     * @param Mage_Catalog_Model_Resource_Product_Link_Product_Collection $collection
     * @return Mage_CatalogInventory_Model_Resource_Stock
     */
    public function setInStockFilterToCollection($collection)
    {
        $manageStock = Mage::getStoreConfig(Mage_CatalogInventory_Model_Stock_Item::XML_PATH_MANAGE_STOCK);
        $cond = array(
            '{{table}}.use_config_manage_stock = 0 AND {{table}}.manage_stock=1 AND {{table}}.is_in_stock=1',
            '{{table}}.use_config_manage_stock = 0 AND {{table}}.manage_stock=0',
        );

        if ($manageStock) {
            $cond[] = '{{table}}.use_config_manage_stock = 1 AND {{table}}.is_in_stock=1';
        } else {
            $cond[] = '{{table}}.use_config_manage_stock = 1';
        }

        $collection->joinField(
            'inventory_in_stock',
            'cataloginventory/stock_item',
            'is_in_stock',
            'product_id=entity_id',
            '(' . join(') OR (', $cond) . ')'
        );
        return $this;
    }

    /**
     * Load some inventory configuration settings
     *
     */
    protected function _initConfig()
    {
        if (!$this->_isConfig) {
            $configMap = array(
                '_isConfigManageStock'  => Mage_CatalogInventory_Model_Stock_Item::XML_PATH_MANAGE_STOCK,
                '_isConfigBackorders'   => Mage_CatalogInventory_Model_Stock_Item::XML_PATH_BACKORDERS,
                '_configMinQty'         => Mage_CatalogInventory_Model_Stock_Item::XML_PATH_MIN_QTY,
                '_configNotifyStockQty' => Mage_CatalogInventory_Model_Stock_Item::XML_PATH_NOTIFY_STOCK_QTY
            );

            foreach ($configMap as $field => $const) {
                $this->$field = (int)Mage::getStoreConfig($const);
            }

            $this->_isConfig = true;
            $this->_stock = Mage::getModel('cataloginventory/stock');
            $this->_configTypeIds = array_keys(Mage::helper('catalogInventory')->getIsQtyTypeIds(true));
        }
    }

    /**
     * Set items out of stock basing on their quantities and config settings
     *
     */
    public function updateSetOutOfStock()
    {
        $this->_initConfig();
        $adapter = $this->_getWriteAdapter();
        $values  = array(
            'is_in_stock'                  => 0,
            'stock_status_changed_auto'    => 1
        );

        $select = $adapter->select()
            ->from($this->getTable('catalog/product'), 'entity_id')
            ->where('type_id IN(?)', $this->_configTypeIds);

        $where = sprintf('stock_id = %1$d'
            . ' AND is_in_stock = 1'
            . ' AND ((use_config_manage_stock = 1 AND 1 = %2$d) OR (use_config_manage_stock = 0 AND manage_stock = 1))'
            . ' AND ((use_config_backorders = 1 AND %3$d = %4$d) OR (use_config_backorders = 0 AND backorders = %3$d))'
            . ' AND ((use_config_min_qty = 1 AND qty <= %5$d) OR (use_config_min_qty = 0 AND qty <= min_qty))'
            . ' AND product_id IN (%6$s)',
            $this->_stock->getId(),
            $this->_isConfigManageStock,
            Mage_CatalogInventory_Model_Stock::BACKORDERS_NO,
            $this->_isConfigBackorders,
            $this->_configMinQty,
            $select->assemble()
        );

        $adapter->update($this->getTable('cataloginventory/stock_item'), $values, $where);
    }

    /**
     * Set items in stock basing on their quantities and config settings
     *
     */
    public function updateSetInStock()
    {
        $this->_initConfig();
        $adapter = $this->_getWriteAdapter();
        $values  = array(
            'is_in_stock'   => 1,
        );

        $select = $adapter->select()
            ->from($this->getTable('catalog/product'), 'entity_id')
            ->where('type_id IN(?)', $this->_configTypeIds);

        $where = sprintf('stock_id = %1$d'
            . ' AND is_in_stock = 0'
            . ' AND stock_status_changed_auto = 1'
            . ' AND ((use_config_manage_stock = 1 AND 1 = %2$d) OR (use_config_manage_stock = 0 AND manage_stock = 1))'
            . ' AND ((use_config_min_qty = 1 AND qty > %3$d) OR (use_config_min_qty = 0 AND qty > min_qty))'
            . ' AND product_id IN (%4$s)',
            $this->_stock->getId(),
            $this->_isConfigManageStock,
            $this->_configMinQty,
            $select->assemble()
        );

        $adapter->update($this->getTable('cataloginventory/stock_item'), $values, $where);
    }

    /**
     * Update items low stock date basing on their quantities and config settings
     *
     */
    public function updateLowStockDate()
    {
        $this->_initConfig();

        $adapter = $this->_getWriteAdapter();
        $condition = $adapter->quoteInto('(use_config_notify_stock_qty = 1 AND qty < ?)',
            $this->_configNotifyStockQty) . ' OR (use_config_notify_stock_qty = 0 AND qty < notify_stock_qty)';
        $currentDbTime = $adapter->quoteInto('?', $this->formatDate(true));
        $conditionalDate = $adapter->getCheckSql($condition, $currentDbTime, 'NULL');

        $value  = array(
            'low_stock_date' => new Zend_Db_Expr($conditionalDate),
        );

        $select = $adapter->select()
            ->from($this->getTable('catalog/product'), 'entity_id')
            ->where('type_id IN(?)', $this->_configTypeIds);

        $where = sprintf('stock_id = %1$d'
            . ' AND ((use_config_manage_stock = 1 AND 1 = %2$d) OR (use_config_manage_stock = 0 AND manage_stock = 1))'
            . ' AND product_id IN (%3$s)',
            $this->_stock->getId(),
            $this->_isConfigManageStock,
            $select->assemble()
        );

        $adapter->update($this->getTable('cataloginventory/stock_item'), $value, $where);
    }

    /**
     * Add low stock filter to product collection
     *
     * @param Mage_Catalog_Model_Resource_Product_Collection $collection
     * @param array $fields
     * @return Mage_CatalogInventory_Model_Resource_Stock
     */
    public function addLowStockFilter(Mage_Catalog_Model_Resource_Product_Collection $collection, $fields)
    {
        $this->_initConfig();
        $adapter = $collection->getSelect()->getAdapter();
        $qtyIf = $adapter->getCheckSql(
            'invtr.use_config_notify_stock_qty',
            $this->_configNotifyStockQty,
            'invtr.notify_stock_qty'
        );
        $conditions = array(
            array(
                $adapter->prepareSqlCondition('invtr.use_config_manage_stock', 1),
                $adapter->prepareSqlCondition($this->_isConfigManageStock, 1),
                $adapter->prepareSqlCondition('invtr.qty', array('lt' => $qtyIf))
            ),
            array(
                $adapter->prepareSqlCondition('invtr.use_config_manage_stock', 0),
                $adapter->prepareSqlCondition('invtr.manage_stock', 1)
            )
        );

        $where = array();
        foreach ($conditions as $k => $part) {
            $where[$k] = join(' ' . Zend_Db_Select::SQL_AND . ' ', $part);
        }

        $where = $adapter->prepareSqlCondition('invtr.low_stock_date', array('notnull' => true))
            . ' ' . Zend_Db_Select::SQL_AND . ' (('
            .  join(') ' . Zend_Db_Select::SQL_OR .' (', $where)
            . '))';

        $collection->joinTable(array('invtr' => 'cataloginventory/stock_item'),
            'product_id = entity_id',
            $fields,
            $where
        );
        return $this;
    }
}


text:
Kave negar offering advance sms Service for developer's , you can send & receive sms in often services and app !
notice: this service only work in iran country
## Installation

Add this line to your application's Gemfile:

```ruby
gem 'kave'
```

And then execute:
```
$ bundle install
```
Or install it yourself(localy) as:
```ruby
$ gem install kave
```
And create init file on config directory(kave.rb):

```ruby
Kave.configure do |config|
  config.wsdl ='http://api.kavenegar.com/soap/v1.asmx?WSDL'
  config.sender  = 'number'

# You can use api key or username and password for authinticate
  config.api_key = 'api key'
# OR
  config.username = 'kave username'
  config.password = 'kave password'
end
```
[kavenegar.com](http://kavenegar.com/) for receive api key !
## Usage
alright ;) now you can call kave function for send simply sms by loginfo or api key

```ruby
class HomeController < ApplicationController
  def index

  	request=Kave::SendRequestSimple.new({

    message: 'سلام عزیز :)',
    mobile: '09127105568',
    #optional
    unixdate: by default 0 ,
    msgmode: by default 1
})

  	res=request.call
  	render :text=>{status_message_only_farsi: res.statusmessage,status_code: res.status}
  end
end

```

for report issues contact me on twitter [@mm580486](https://twitter.com/mm580486)

## persian tutorials

1-[youtube send simply sms by kave gem](https://youtu.be/NXLnFwNJoC0)

2-[callback status code](http://kavenegar.com/public/documents/soap-document.pdf)
## License

The gem is available as open source under the terms of the [mohammad mahmoudi](https://twitter.com/mm580486) and [kave negar](http://kavenegar.com/support/about) .


text:
<?php

namespace CfdiUtilsTests\Validate\Cfdi33\RecepcionPagos\Pagos;

use CfdiUtils\Elements\Pagos10\Pago;
use CfdiUtils\Validate\Cfdi33\RecepcionPagos\Pagos\BancoBeneficiarioRfcCorrecto;
use CfdiUtils\Validate\Cfdi33\RecepcionPagos\Pagos\ValidatePagoException;
use PHPUnit\Framework\TestCase;

final class BancoBeneficiarioRfcCorrectoTest extends TestCase
{
    /**
     * @param string|null $rfc
     * @testWith ["COSC8001137NA"]
     *           ["XEXX010101000"]
     *           [null]
     */
    public function testValid(?string $rfc)
    {
        $pago = new Pago([
            'RfcEmisorCtaBen' => $rfc,
        ]);
        $validator = new BancoBeneficiarioRfcCorrecto();

        $this->assertTrue($validator->validatePago($pago));
    }

    /**
     * @param string|null $rfc
     * @testWith ["COSC8099137N1"]
     *           ["XAXX010101000"]
     *           [""]
     */
    public function testInvalid(?string $rfc)
    {
        $pago = new Pago([
            'RfcEmisorCtaBen' => $rfc,
        ]);
        $validator = new BancoBeneficiarioRfcCorrecto();

        $this->expectException(ValidatePagoException::class);
        $validator->validatePago($pago);
    }
}


text:
1. Cài đặt Laravel

2. Cài đặt thư viện Goutte dùng để crawler

	Sơ qua về Goutte: Goutte được kế thừa và xây dựng trên những thư viện như Symfony BrowserKit và Guzzle, được viết và duy trì bởi @fabpot - founder của Symfony

	[1] dùng Terminal chạy lệnh: composer require fabpot/goutte

	[2] Khởi tạo 1 Goutte Client:
	use Goutte\Client;
	$client = new Client();

	[3] Gửi request với phương thức request():
	$crawler = $client->request('GET','https://crowdworks.jp/public/jobs/sgroup/2');

	[5 ] Filter 1 thẻ HTML: thẻ a với class = bottom
	$page = $crawler->filter('a.bottom')->attr('href');

	[ 6] Kiểm tra xem selector có tồn tại hay không:
	$hasTitle = count($crawler->filter('b.employer_name')) > 0;
	Có thể kiểm tra nhiều Selector để tránh lỗi ko tìm thấy
	$title = $crawler->filter('.title, h2.heading')->text();

	[7 ] Click vào một button
	$crawler = $client->request('GET', 'https://github.com/');
	$crawler = $client->click($crawler->selectLink('Sign in')->link());
	$form = $crawler->selectButton('Sign in')->form();

3. Mọi người có thể đọc thêm ở đây về cách sử dụng
https://symfony.com/doc/current/components/dom_crawler.html


text:
import React, {Component} from "react";

export class SimpleClassComponent extends Component {
    render() {
        const {currentTemp} = this.props;
        return (

Welcome to React

More about React and Higher-Order Components ...

Current temperature is {currentTemp}

        )
    }
}


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

namespace Keyczar
{
    public class KeyczarConfig
    {

        public KeyczarConfig(){
            StrictDsaVerification = Convert.ToBoolean(ConfigurationManager.AppSettings["keyczar.strict_dsa_verification"] ?? "false");
            RawStringEncoding = Encoding.GetEncoding(ConfigurationManager.AppSettings["keyczar.raw_string_encoding"] ?? "utf-8");
            Other = new Dictionary<string,object>();
        }

        /// <summary>
        /// To be compatable with Java, by default ignores specific parsable, but bad DSA sigs.
        /// Can turn on strit checking with the App Setting "keyczar.strict_dsa_verification"
        /// </summary>
        public bool StrictDsaVerification { get; set; }
        public Encoding RawStringEncoding { get; set; }

        public IDictionary<string,object> Other { get; }
    }
}


text:
{% include head.html %}

    {% include navigation.html %}

{{ page.title }}

{{ page.label }}

            {% if page.previous %}

                  Previous

{{ page.previous.title }}

            {% endif %}

            {% if page.next %}

                  Next

{{ page.next.title }}

            {% endif %}

{{ page.title }}

              {{ content }}

Discover more

@{{ page.twitter }}

{{ page.site }}

            {% if page.sponsor %}
              {% for sponsor in site.data.sponsors %}
                {% if page.sponsor == sponsor.name %}

With love from {{ sponsor.name }}

{{ sponsor.bio }}

{{ sponsor.name }} adds, "{{ sponsor.note }}"

Visit and follow {{ sponsor.name }}.

                {% endif %}
              {% endfor %}
            {% endif %}

This interview lasts {{ page.time }}

Tweet this advice by {{ page.title }}.

{{ page.quote }}

            {% if page.previous %}

                  Previous

{{ page.previous.title }}

            {% endif %}

            {% if page.next %}

                  Next

{{ page.next.title }}

            {% endif %}

    {% include footer.html %}


text:
namespace url_canon {

namespace {

template<typename CHAR, typename UCHAR>
bool DoCanonicalizeStandardURL(const URLComponentSource<CHAR>& source,
                               const url_parse::Parsed& parsed,
                               CharsetConverter* query_converter,
                               CanonOutput* output,
                               url_parse::Parsed* new_parsed) {
  // Scheme: this will append the colon.
  bool success = CanonicalizeScheme(source.scheme, parsed.scheme,
                                    output, &new_parsed->scheme);

  // Authority (username, password, host, port)
  bool have_authority;
  if (parsed.username.is_valid() || parsed.password.is_valid() ||
      parsed.host.is_nonempty() || parsed.port.is_valid()) {
    have_authority = true;

    // Only write the authority separators when we have a scheme.
    if (parsed.scheme.is_valid()) {
      output->push_back('/');
      output->push_back('/');
    }

    // User info: the canonicalizer will handle the : and @.
    success &= CanonicalizeUserInfo(source.username, parsed.username,
                                    source.password, parsed.password,
                                    output,
                                    &new_parsed->username,
                                    &new_parsed->password);

    success &= CanonicalizeHost(source.host, parsed.host,
                                output, &new_parsed->host);

    // Host must not be empty for standard URLs.
    if (!parsed.host.is_nonempty())
      success = false;

    // Port: the port canonicalizer will handle the colon.
    int default_port = DefaultPortForScheme(
        &output->data()[new_parsed->scheme.begin], new_parsed->scheme.len);
    success &= CanonicalizePort(source.port, parsed.port, default_port,
                                output, &new_parsed->port);
  } else {
    // No authority, clear the components.
    have_authority = false;
    new_parsed->host.reset();
    new_parsed->username.reset();
    new_parsed->password.reset();
    new_parsed->port.reset();
    success = false;  // Standard URLs must have an authority.
  }

  // Path
  if (parsed.path.is_valid()) {
    success &= CanonicalizePath(source.path, parsed.path,
                                output, &new_parsed->path);
  } else if (have_authority ||
             parsed.query.is_valid() || parsed.ref.is_valid()) {
    // When we have an empty path, make up a path when we have an authority
    // or something following the path. The only time we allow an empty
    // output path is when there is nothing else.
    new_parsed->path = url_parse::Component(output->length(), 1);
    output->push_back('/');
  } else {
    // No path at all
    new_parsed->path.reset();
  }

  // Query
  CanonicalizeQuery(source.query, parsed.query, query_converter,
                    output, &new_parsed->query);

  // Ref: ignore failure for this, since the page can probably still be loaded.
  CanonicalizeRef(source.ref, parsed.ref, output, &new_parsed->ref);

  return success;
}

}  // namespace

// Returns the default port for the given canonical scheme, or PORT_UNSPECIFIED
// if the scheme is unknown.
int DefaultPortForScheme(const char* scheme, int scheme_len) {
  int default_port = url_parse::PORT_UNSPECIFIED;
  switch (scheme_len) {
    case 4:
      if (!strncmp(scheme, "http", scheme_len))
        default_port = 80;
      break;
    case 5:
      if (!strncmp(scheme, "https", scheme_len))
        default_port = 443;
      break;
    case 3:
      if (!strncmp(scheme, "ftp", scheme_len))
        default_port = 21;
      else if (!strncmp(scheme, "wss", scheme_len))
        default_port = 443;
      break;
    case 6:
      if (!strncmp(scheme, "gopher", scheme_len))
        default_port = 70;
      break;
    case 2:
      if (!strncmp(scheme, "ws", scheme_len))
        default_port = 80;
      break;
  }
  return default_port;
}

bool CanonicalizeStandardURL(const char* spec,
                             int spec_len,
                             const url_parse::Parsed& parsed,
                             CharsetConverter* query_converter,
                             CanonOutput* output,
                             url_parse::Parsed* new_parsed) {
  return DoCanonicalizeStandardURL<char, unsigned char>(
      URLComponentSource<char>(spec), parsed, query_converter,
      output, new_parsed);
}

bool CanonicalizeStandardURL(const char16* spec,
                             int spec_len,
                             const url_parse::Parsed& parsed,
                             CharsetConverter* query_converter,
                             CanonOutput* output,
                             url_parse::Parsed* new_parsed) {
  return DoCanonicalizeStandardURL<char16, char16>(
      URLComponentSource<char16>(spec), parsed, query_converter,
      output, new_parsed);
}

// It might be nice in the future to optimize this so unchanged components don't
// need to be recanonicalized. This is especially true since the common case for
// ReplaceComponents is removing things we don't want, like reference fragments
// and usernames. These cases can become more efficient if we can assume the
// rest of the URL is OK with these removed (or only the modified parts
// recanonicalized). This would be much more complex to implement, however.
//
// You would also need to update DoReplaceComponents in url_util.cc which
// relies on this re-checking everything (see the comment there for why).
bool ReplaceStandardURL(const char* base,
                        const url_parse::Parsed& base_parsed,
                        const Replacements<char>& replacements,
                        CharsetConverter* query_converter,
                        CanonOutput* output,
                        url_parse::Parsed* new_parsed) {
  URLComponentSource<char> source(base);
  url_parse::Parsed parsed(base_parsed);
  SetupOverrideComponents(base, replacements, &source, &parsed);
  return DoCanonicalizeStandardURL<char, unsigned char>(
      source, parsed, query_converter, output, new_parsed);
}

// For 16-bit replacements, we turn all the replacements into UTF-8 so the
// regular codepath can be used.
bool ReplaceStandardURL(const char* base,
                        const url_parse::Parsed& base_parsed,
                        const Replacements<char16>& replacements,
                        CharsetConverter* query_converter,
                        CanonOutput* output,
                        url_parse::Parsed* new_parsed) {
  RawCanonOutput<1024> utf8;
  URLComponentSource<char> source(base);
  url_parse::Parsed parsed(base_parsed);
  SetupUTF16OverrideComponents(base, replacements, &utf8, &source, &parsed);
  return DoCanonicalizeStandardURL<char, unsigned char>(
      source, parsed, query_converter, output, new_parsed);
}

}  // namespace url_canon


text:
'use strict';

/* Services */

// Demonstrate how to register services
// In this case it is a simple value service.
var customerServices = angular.module('srs.customer.services', [
    'firebase'
])
    .value('version', '0.1')

    .factory("Customer", ["$firebase", function ($firebase) {

            // create a reference to the user's profile
            var ref = new Firebase("https://devthomas.firebaseio.com/profiles/");
            // return it as a synchronized object
            var sync = $firebase(ref);

            return sync.$asArray();
        }
    ]);


text:
Benchpress is a framework for e2e performance tests.

# Why?

There are so called "micro benchmarks" that esentially use a stop watch in the browser to measure time
(e.g. via `performance.now()`). This approach is limited to time, and in some cases memory
(Chrome with special flags), as metric. It does not allow to measure:

- rendering time: e.g. the time the browser spends to layout or paint elements. This can e.g. used to
  test the performance impact of stylesheet changes.
- garbage collection: e.g. how long the browser paused script execution, and how much memory was collected.
  This can be used to stabilize script execution time, as garbage collection times are usually very
  unpredictable. This data can also be used to measure and improve memory usage of applications,
  as the garbage collection amount directly affects garbage collection time.
- distinguish script execution time from waiting: e.g. to measure the client side only time that is spent
  in a complex user interaction, ignoring backend calls.
- measure fps to assert the smoothness of scrolling and animations.

This kind of data is already available in the DevTools of modern browsers. However, there is no standard way to
use those tools in an automated way to measure web app performance, especially not across platforms.

Benchpress tries to fill this gap, i.e. allow to access all kinds of performance metrics in an automated way.

# How it works

Benchpress uses webdriver to read out the so called "performance log" of browsers. This contains all kinds of interesting
data, e.g. when a script started/ended executing, gc started/ended, the browser painted something to the screen, ...

As browsers are different, benchpress has plugins to normalizes these events.

# Features

* Provides a loop (so called "Sampler") that executes the benchmark multiple times
* Automatically waits/detects until the browser is "warm"
* Reporters provide a normalized way to store results:
  - console reporter
  - file reporter
  - Google Big Query reporter (coming soon)
* Supports micro benchmarks as well via `console.time()` / `console.timeEnd()`
  - `console.time()` / `console.timeEnd()` mark the timeline in the DevTools, so it makes sense
    to use them in micro benchmark to visualize and understand them, with or without benchpress.
  - running micro benchmarks in benchpress leverages the already existing reporters,
    the sampler and the auto warmup feature of benchpress.

# Supported browsers

* Chrome on all platforms
* Mobile Safari (iOS)
* Firefox (work in progress)

# How to write a benchmark

A benchmark in benchpress is made by an application under test
and a benchmark driver. The application under test is the
actual application consisting of html/css/js that should be tests.
A benchmark driver is a webdriver test that interacts with the
application under test.

## A simple benchmark

Let's assume we want to measure the script execution time, as well as the render time
that it takes to fill a container element with a complex html string.

The application under test could look like this:

```
index.html:

<button id="reset" onclick="reset()">Reset</button>
<button id="fill" onclick="fill()">fill innerHTML</button>
<div id="container"></div>
<script>
  var container = document.getElementById('container');
  var complexHtmlString = '...'; // TODO

  function reset() { cotainer.innerHTML = ''; }

  function fill() {
    container.innerHTML = complexHtmlString;
  }
</script>
```

A benchmark driver could look like this:

```
// A runner contains the shared configuration
// and can be shared across multiple tests.
var runner = new Runner(...);

driver.get('http://myserver/index.html');

var resetBtn = driver.findElement(By.id('reset'));
var fillBtn = driver.findElement(By.id('fill'));

runner.sample({
  id: 'fillElement',
  // Prepare is optional...
  prepare: () {
    resetBtn.click();
  },
  execute: () {
    fillBtn.click();
    // Note: if fillBtn would use some asynchronous code,
    // we would need to wait here for its end.
  }
});
```

## Measuring in the browser

If the application under test would like to, it can measure on its own.
E.g.

```
index.html:

<button id="measure" onclick="measure()">Measure document.createElement</button>
<script>
  function measure() {
    console.time('createElement*10000');
    for (var i=0; i<100000; i++) {
      document.createElement('div');
    }
    console.timeEnd('createElement*10000');
  }
</script>
```

When the `measure` button is clicked, it marks the timeline and creates 10000 elements.
It uses the special names `createElement*10000` to tell benchpress that the
time that was measured is for 10000 calls to createElement and that benchpress should
take the average for it.

A test driver for this would look like this:

````
driver.get('.../index.html');

var measureBtn = driver.findElement(By.id('measure'));
runner.sample({
  id: 'createElement test',
  microMetrics: {
    'createElement': 'time to create an element (ms)'
  },
  execute: () {
    measureBtn.click();
  }
});
````

When looking into the DevTools Timeline, we see a marker as well:
![Marked Timeline](marked_timeline.png)

# Smoothness Metrics

Benchpress can also measure the "smoothness" of scrolling and animations. In order to do that, the following set of metrics can be collected by benchpress:

- `frameTime.mean`: mean frame time in ms (target: 16.6ms for 60fps)
- `frameTime.worst`: worst frame time in ms
- `frameTime.best`: best frame time in ms
- `frameTime.smooth`: percentage of frames that hit 60fps

To collect these metrics, you need to execute `console.time('frameCapture')` and `console.timeEnd('frameCapture')` either in your benchmark application or in you benchmark driver via webdriver. The metrics mentioned above will only be collected between those two calls and it is recommended to wrap the time/timeEnd calls as closely as possible around the action you want to evaluate to get accurate measurements.

In addition to that, one extra binding needs to be passed to benchpress in tests that want to collect these metrics:

    benchpress.sample(bindings: [bp.bind(bp.Options.CAPTURE_FRAMES).toValue(true)], ... )

# Best practices

* Use normalized environments
  - metrics that are dependent on the performance of the execution environment must be executed on a normalized machine
  - e.g. a real mobile device whose cpu frequency is set to a fixed value.
      * see our [build script](https://github.com/angular/angular/blob/master/scripts/ci/android_cpu.sh)
      * this requires root access, e.g. via a userdebug build of Android on a Google Nexus device
        (see [here](https://source.android.com/source/building-running.html) and [here](https://source.android.com/source/building-devices.html#obtaining-proprietary-binaries))
  - e.g. a calibrated machine that does not run background jobs, has a fixed cpu frequency, ...

* Use relative comparisons
  - relative comparisons are less likely to change over time and help to interpret the results of benchmarks
  - e.g. compare an example written using a ui framework against a hand coded example and track the ratio

* Assert post-commit for commit ranges
  - running benchmarks can take some time. Running them before every commit is usually too slow.
  - when a regression is detected for a commit range, use bisection to find the problematic commit

* Repeat benchmarks multiple times in a fresh window
  - run the same benchmark multiple times in a fresh window and then take the minimal average value of each benchmark run

* Use force gc with care
  - forcing gc can skew the script execution time and gcTime numbers,
    but might be needed to get stable gc time / gc amount numbers

* Open a new window for every test
  - browsers (e.g. chrome) might keep JIT statistics over page reloads and optimize pages differently depending on what has been loaded before

# Detailed overview

![Overview](overview.png)

Definitions:

* valid sample: a sample that represents the world that should be measured in a good way.
* complete sample: sample of all measure values collected so far

Components:

* Runner
  - contains a default configuration
  - creates a new injector for every sample call, via which all other components are created

* Sampler
  - gets data from the metrics
  - reports measure values immediately to the reporters
  - loops until the validator is able to extract a valid sample out of the complete sample (see below).
  - reports the valid sample and the complete sample to the reporters

* Metric
  - gets measure values from the browser
  - e.g. reads out performance logs, DOM values, JavaScript values

* Validator
  - extracts a valid sample out of the complete sample of all measure values.
  - e.g. wait until there are 10 samples and take them as valid sample (would include warmup time)
  - e.g. wait until the regression slope for the metric `scriptTime` through the last 10 measure values is >=0, i.e. the values for the `scriptTime` metric are no more decreasing

* Reporter
  - reports measure values, the valid sample and the complete sample to backends
  - e.g. a reporter that prints to the console, a reporter that reports values into Google BigQuery, ...

* WebDriverAdapter
  - abstraction over the used web driver client
  - one implementation for every webdriver client
    E.g. one for selenium-webdriver Node.js module, dart async webdriver, dart sync webdriver, ...

* WebDriverExtension
  - implements additional methods that are standardized in the webdriver protocol using the WebDriverAdapter
  - provides functionality like force gc, read out performance logs in a normalized format
  - one implementation per browser, e.g. one for Chrome, one for mobile Safari, one for Firefox


text: package argon2


text:
require File.join(File.expand_path(File.dirname(__FILE__)), 'base')

GOOGLE_VOICE_SMS_TYPE = 11

module Google
  module Voice
    class Sms < Base
      def sms(number, text)
        @curb.http_post([
          Curl::PostField.content('phoneNumber', number),
          Curl::PostField.content('text', text),
          Curl::PostField.content('_rnr_se', @_rnr_se)
        ])
        @curb.url = "https://www.google.com/voice/sms/send"
        @curb.perform
        @curb.response_code
      end

      def recent
        @curb.url = "https://www.google.com/voice/inbox/recent/"
        @curb.http_get
        sms = []
        doc = Nokogiri::XML::Document.parse(@curb.body_str)
        data = doc.xpath('/response/json').first.text
        html = Nokogiri::HTML::DocumentFragment.parse(doc.to_html)
        json = JSON.parse(data)
        # Format for messages is [id, {attributes}]
        json['messages'].each do |message|
          if message[1]['type'].to_i != GOOGLE_VOICE_SMS_TYPE
            next
          else
            messages = []
            html.css('div.gc-message-sms-row').each do |row|
              if row.css('span.gc-message-sms-from').inner_html.strip! =~ /Me:/
                next
              elsif row.css('span.gc-message-sms-time').inner_html =~ Regexp.new(txt_obj.display_start_time)
                messages << {
                  :to => 'Me',
                  :from => row.css('span.gc-message-sms-from').inner_html.strip!.gsub!(':', ''),
                  :text => row.css('span.gc-message-sms-text').inner_html,
                  :time => row.css('span.gc-message-sms-time').inner_html
                }
              end
            end
            # Google is using milliseconds since epoch for time
            sms << {
              :id => message[0],
              :phone_number => message[1]['phoneNumber'],
              :start_time => Time.at(message[1]['startTime'].to_i / 1000),
              :messages => messages}
          end
        end
        sms
      end

    end
  end
end


text:
'use strict';

// MODULES //

var isString = require( '@stdlib/assert/is-string' ).isPrimitive;
var isNonNegativeInteger = require( '@stdlib/assert/is-nonnegative-integer' ).isPrimitive;
var nextGraphemeClusterBreak = require( '@stdlib/string/next-grapheme-cluster-break' );
var format = require( '@stdlib/string/format' );

// MAIN //

/**
* Removes the first character(s) of a string.
*
* @param {string} str - input string
* @param {NonNegativeInteger} [n=1] - number of characters to remove
* @throws {TypeError} must provide a string primitive
* @throws {TypeError} second argument must be a nonnegative integer
* @returns {string} updated string
*
* @example
* var out = removeFirst( 'last man standing' );
* // returns 'ast man standing'
*
* @example
* var out = removeFirst( 'presidential election' );
* // returns 'residential election'
*
* @example
* var out = removeFirst( 'javaScript' );
* // returns 'avaScript'
*
* @example
* var out = removeFirst( 'Hidden Treasures' );
* // returns 'idden Treasures'
*
* @example
* var out = removeFirst( '🐶🐮🐷🐰🐸', 2 );
* // returns '🐷🐰🐸'
*
* @example
* var out = removeFirst( 'foo bar', 4 );
* // returns 'bar'
*/
function removeFirst( str, n ) {
	var nextBreak;
	if ( !isString( str ) ) {
		throw new TypeError( format( 'invalid argument. First argument must be a string. Value: `%s`.', str ) );
	}
	if ( arguments.length > 1 ) {
		if ( !isNonNegativeInteger( n ) ) {
			throw new TypeError( format( 'invalid argument. Second argument must be a nonnegative integer. Value: `%s`.', n ) );
		}
		nextBreak = 0;
		while ( n > 0 ) {
			nextBreak = nextGraphemeClusterBreak( str, nextBreak );
			n -= 1;
		}
	}
	else {
		nextBreak = nextGraphemeClusterBreak( str );
	}
	// Value of `nextBreak` will be -1 if and only if `str` is an empty string or `str` has only 1 extended grapheme cluster...
	if ( str === '' || nextBreak === -1 ) {
		return '';
	}
	return str.substring( nextBreak );
}

// EXPORTS //

module.exports = removeFirst;


text:
        <form name="signUpForm" class="form-horizontal" novalidate>
            <fieldset>
                <legend>Create New User</legend>

                    E-mail

                        <input id="email" name="mail" type="email" placeholder="E-mail" ng-model="user.email" required="required" class="form-control"/>

                    Password

                        <input id="password" name="pass" type="password" placeholder="Password" ng-model="user.password" required="required" class="form-control"/>

                    Confirm Password

                        <input id="confirmation" name="confirmpassword" type="password" placeholder="Username" ng-model="user.confirmPassword" required="required" class="form-control"/>

                    Driver

                        <input type="checkbox" class="col-md-1" id="isdriver" ng-model="user.isDriver">

                    Car Name

                        <input type="text" id="carname" ng-minlength="2" name="nameofcar" ng-model="user.carName" ng-required="user.isDriver">

                    <button ng-click="signup(user, signUpForm)" ng-disabled="signUpForm.$invalid" class="btn btn-primary">
                        Create
                    </button>
                    Cancel

            </fieldset>
        </form>


text:
'use strict';
/**
 * @see https://github.com/SteelSeries/gamesense-sdk/blob/master/doc/api/json-handlers-tactile.md
 * @constructor
 * @param {gamesense.DeviceType} [deviceType]
 * @param {gamesense.ScreenZone} [zone]
 * @param {Array<gamesense.PatternEntry> | gamesense.RangePattern} [pattern]
 * @param {!gamesense.Rate} [rate]
 */
gamesense.TactileEventHandler = function TactileEventHandler(deviceType, zone, pattern, rate){
    /**
     * @type {!gamesense.DeviceType}
     */
    this.deviceType = deviceType || gamesense.DeviceType.TACTILE;

    /**
     * @type {!gamesense.TactileZone}
     */
    this.zone = zone || gamesense.TactileZone.ONE;

    /**
     * @type {Array<gamesense.PatternEntry> | gamesense.RangePattern}
     */
    this.pattern = pattern || [];

    /**
     * @type {!gamesense.Rate}
     */
    this.rate = rate;

    this.toHandlerData = function toHandlerData() {
        var handlerData = {
            zone: this.zone,
            mode: 'vibrate'
        };
        if (this.pattern.constructor.name === 'RangePattern') {
            handlerData.pattern = this.pattern.toPatternData();
        } else {
            handlerData.pattern = this.pattern.map(function f(patt) {return patt.toPatternData()})
        }
        if (this.deviceType) {
            handlerData['device-type'] = this.deviceType;
        } else {
            throw new Error('bindEvent failed: Missing device type.');
        }

        if (this.rate) {
            handlerData.rate = this.rate.toRateData();
        }

        return handlerData;
    }

}


text:
module LightReader
{
    export class Chapter
    {
        constructor()
        {
            this.pages = new Array<iPageContent>();
        }

        public title: string;

        public url: string;

        public pages: Array<iPageContent>;
    }
}


text:
package com.intellij.appengine.converter;

import com.intellij.appengine.facet.AppEngineFacet;
import com.intellij.facet.ProjectFacetManager;
import com.intellij.notification.Notification;
import com.intellij.notification.NotificationListener;
import com.intellij.notification.NotificationType;
import com.intellij.openapi.project.DumbAware;
import com.intellij.openapi.project.Project;
import com.intellij.openapi.startup.StartupActivity;
import com.intellij.util.SystemProperties;
import org.jetbrains.annotations.NotNull;

import java.time.LocalDate;
import java.time.Month;

/**
 * @author nik
 */
public class MigrateToCloudToolsNotification implements StartupActivity, DumbAware {
  @Override
  public void runActivity(@NotNull Project project) {
    ProjectFacetManager facetManager = ProjectFacetManager.getInstance(project);
    if (facetManager.hasFacets(AppEngineFacet.ID) && isAppEngineSdkDeprecated()) {
      String text = "
It looks like your project is using the App Engine SDK. While the App Engine SDK is still supported, Google " +
                    "recommends that you migrate to the Google Cloud SDK. The Cloud SDK provides new " +
                    "features such as App Engine Flexible support and " +
                    "Google Cloud Debugger integration.
" +
                    "
Learn more about migrating to the new Cloud tools.
" +
                    "";
      Notification notification = new Notification("Migrate to Google Cloud SDK", "App Engine SDK Detected",
                                                   text, NotificationType.WARNING, new NotificationListener.UrlOpeningListener(false));
      /*
      //currently Google Cloud Tools plugin doesn't provide seamless migration for all project, so we don't want to provide a direct link which installs it.
      notification.addAction(new AnAction("Install 'Google Cloud Tools' plugin") {
        @Override
        public void actionPerformed(AnActionEvent e) {
          PluginsAdvertiser.installAndEnablePlugins(ContainerUtil.set("com.google.gct.core", "com.google.gct.login"),
                                                    () -> {
                                                      notification.expire();
                                                      PluginManagerCore.disablePlugin("com.intellij.appengine");
                                                    });
        }
      });
      */
      notification.notify(project);
    }
  }

  private static boolean isAppEngineSdkDeprecated() {
    return SystemProperties.getBooleanProperty("idea.enable.migration.to.google.cloud.sdk", LocalDate.now().isAfter(LocalDate.of(2017, Month.MAY, 5)));
  }
}


text:
"""
Collection de scripts pour résoudre le problème "Le jardinier et les taupes".
"""