text:
/*
* ECDSA
* (C) 2007 Falko Strenzke, FlexSecure GmbH
*          Manuel Hartl, FlexSecure GmbH
* (C) 2008-2010 Jack Lloyd
*
* Botan is released under the Simplified BSD License (see license.txt)
*/

#ifndef BOTAN_ECC_PUBLIC_KEY_BASE_H_
#define BOTAN_ECC_PUBLIC_KEY_BASE_H_

#include <botan/ec_group.h>
#include <botan/pk_keys.h>

namespace Botan {

/**
* This class represents abstract ECC public keys. When encoding a key
* via an encoder that can be accessed via the corresponding member
* functions, the key will decide upon its internally stored encoding
* information whether to encode itself with or without domain
* parameters, or using the domain parameter oid. Furthermore, a public
* key without domain parameters can be decoded. In that case, it
* cannot be used for verification until its domain parameters are set
* by calling the corresponding member function.
*/
class BOTAN_PUBLIC_API(2,0) EC_PublicKey : public virtual Public_Key
   {
   public:
      EC_PublicKey(const EC_PublicKey& other) = default;
      EC_PublicKey& operator=(const EC_PublicKey& other) = default;
      virtual ~EC_PublicKey() = default;

      /**
      * Get the public point of this key.
      * @throw Invalid_State is thrown if the
      * domain parameters of this point are not set
      * @result the public point of this key
      */
      const PointGFp& public_point() const { return m_public_key; }

      AlgorithmIdentifier algorithm_identifier() const override;

      std::vector<uint8_t> public_key_bits() const override;

      bool check_key(RandomNumberGenerator& rng,
                     bool strong) const override;

      /**
      * Get the domain parameters of this key.
      * @throw Invalid_State is thrown if the
      * domain parameters of this point are not set
      * @result the domain parameters of this key
      */
      const EC_Group& domain() const { return m_domain_params; }

      /**
      * Set the domain parameter encoding to be used when encoding this key.
      * @param enc the encoding to use
      */
      void set_parameter_encoding(EC_Group_Encoding enc);

      /**
      * Set the point encoding method to be used when encoding this key.
      * @param enc the encoding to use
      */
      void set_point_encoding(PointGFp::Compression_Type enc);

      /**
      * Return the DER encoding of this keys domain in whatever format
      * is preset for this particular key
      */
      std::vector<uint8_t> DER_domain() const
         { return domain().DER_encode(domain_format()); }

      /**
      * Get the domain parameter encoding to be used when encoding this key.
      * @result the encoding to use
      */
      EC_Group_Encoding domain_format() const
         { return m_domain_encoding; }

      /**
      * Get the point encoding method to be used when encoding this key.
      * @result the encoding to use
      */
      PointGFp::Compression_Type point_encoding() const
         { return m_point_encoding; }

      size_t key_length() const override;
      size_t estimated_strength() const override;

   protected:
      /**
      * Create a public key.
      * @param dom_par EC domain parameters
      * @param pub_point public point on the curve
      */
      EC_PublicKey(const EC_Group& dom_par,
                   const PointGFp& pub_point);

      /**
      * Load a public key.
      * @param alg_id the X.509 algorithm identifier
      * @param key_bits DER encoded public key bits
      */
      EC_PublicKey(const AlgorithmIdentifier& alg_id,
                   const std::vector<uint8_t>& key_bits);

      EC_PublicKey() : m_domain_params{}, m_public_key{}, m_domain_encoding(EC_Group_Encoding::Explicit)
      {}

      EC_Group m_domain_params;
      PointGFp m_public_key;
      EC_Group_Encoding m_domain_encoding;
      PointGFp::Compression_Type m_point_encoding = PointGFp::UNCOMPRESSED;
   };

/**
* This abstract class represents ECC private keys
*/
class BOTAN_PUBLIC_API(2,0) EC_PrivateKey : public virtual EC_PublicKey,
                                public virtual Private_Key
   {
   public:
      secure_vector<uint8_t> private_key_bits() const override;

      /**
      * Get the private key value of this key object.
      * @result the private key value of this key object
      */
      const BigInt& private_value() const;

      EC_PrivateKey(const EC_PrivateKey& other) = default;
      EC_PrivateKey& operator=(const EC_PrivateKey& other) = default;
      ~EC_PrivateKey() = default;

   protected:
      /*
      * If x=0, creates a new private key in the domain
      * using the given rng. If with_modular_inverse is set,
      * the public key will be calculated by multiplying
      * the base point with the modular inverse of
      * x (as in ECGDSA and ECKCDSA), otherwise by
      * multiplying directly with x (as in ECDSA).
      */
      EC_PrivateKey(RandomNumberGenerator& rng,
                    const EC_Group& domain,
                    const BigInt& x,
                    bool with_modular_inverse=false);

      /*
      * Creates a new private key object from the
      * ECPrivateKey structure given in key_bits.
      * If with_modular_inverse is set,
      * the public key will be calculated by multiplying
      * the base point with the modular inverse of
      * x (as in ECGDSA and ECKCDSA), otherwise by
      * multiplying directly with x (as in ECDSA).
      */
      EC_PrivateKey(const AlgorithmIdentifier& alg_id,
                    const secure_vector<uint8_t>& key_bits,
                    bool with_modular_inverse=false);

      EC_PrivateKey() = default;

      BigInt m_private_key;
   };

}

#endif


text:
'use strict';

angular.module('rea.misc.validate')
  .directive('reaValidateGroup', ValidateGroup)
  .directive('reaValidate', Validate)
  .directive('reaValidateHint', ValidateHint)
;

var CONFIG = {
  errorCss: 'has-error',
  hideCss: 'ng-hide'
};

ValidateGroup.$inject = [];
function ValidateGroup() {

  function link(scope, element) {
    scope.$$setValidity = setValidity;

    function setValidity(isValid) {
      element.toggleClass(CONFIG.errorCss, !isValid);
    }
  }

  function Ctrl($scope) {
    var self = this;
    self.setValidity = setValidity;

    function setValidity(isValid) {
      $scope.$$setValidity(isValid);
      $scope.$broadcast('rea-validate-change', {type: 'error', isValid: isValid});
    }
  }

  return {
    scope: true,
    link: link,
    controller: ['$scope', Ctrl]
  };
}

Validate.$inject = [];
function Validate() {
  return {
    restrict: 'A',
    scope: false,
    require: ['^reaValidateGroup', 'ngModel'],
    link: link
  };

  function link(scope, element, attrs, $ctrl) {
    var [groupCtrl, ngModelCtrl] = $ctrl;
    scope.$watch(() => ngModelCtrl.$valid, (isValid) => groupCtrl.setValidity(isValid));
  }
}

ValidateHint.$inject = [];
function ValidateHint() {
  return {
    link: link,
    scope: false
  };

  function link(scope, element) {
    element.toggleClass(CONFIG.hideCss, true);
    scope.$on('rea-validate-change', onValidateChange);

    function onValidateChange(event, {isValid}) {
      element.toggleClass(CONFIG.hideCss, !!isValid);
    }
  }
}

redpajama_set_name: RedPajamaGithub


text:
import R from 'ramda';
import { Repeat } from 'immutable';

// incIndex :: List Number -> Number -> List Number
export const incIndex = R.curry((list, index) => list.update(index - 1, R.inc));

// default :: String -> String
export default R.pipe(
  R.split('\n'),
  R.chain(R.split(' ')),
  l => R.reduce(incIndex, Repeat(0, R.head(l)).toList(), R.tail(l)),
  R.addIndex(R.map)((val, index) => `Node ${index + 1} has a degree of ${val}`),
  R.join('\n')
);


text:
package net._5tingr4y.stingUtils.collection;

public interface Grid2DI<T> extends Iterable<T> {

    int getWidth();
    int getHeight();

    T get(int x, int y);
    T set(int x, int y, T tile);
}


text:
/**
 * Created by outman on 16/9/30.
 */
/**
 * Sample React Native App
 * https://github.com/facebook/react-native
 * @flow
 */

import React, { Component } from 'react';
import {
    AppRegistry,
    StyleSheet,
    Text,
    View,
    Image,
    TouchableOpacity,
    TextInput,
    AsyncStorage
} from 'react-native';

var Platform = require('react-native').Platform;
var Dimensions = require('Dimensions');
var {width} = Dimensions.get('window');
var Common = require('../Common/Common');

var Login = React.createClass({
    render() {
        return (
            <View style={styles.container}>
                {/*{this.renderNav()}*/}
                {/*<TouchableOpacity*/}
                    {/*onPress={()=>{*/}
                        {/*Common.setData('token', '123456');*/}
                        {/*Common.showToast('登录成功')*/}
                    {/*}}*/}
                {/*>*/}
                    {/*<Text>登录</Text>*/}
                {/*</TouchableOpacity>*/}

                <View style={styles.loginHeader}>
                    <TouchableOpacity
                        style={styles.goBack}
                        onPress={() => {this.popBack()}}
                    >
                        <Image source={{uri: 'go_back'}} style={styles.goBackImage} />
                    </TouchableOpacity>
                    <TouchableOpacity
                        style={styles.registerBtnWrap}
                    >
                        <Text style={styles.registerBtn}>注册</Text>
                    </TouchableOpacity>
                </View>

                <View style={styles.loginMain}>
                    <Text style={styles.loginTitle}>登录</Text>
                    <View style={styles.textInputWrap}>
                        <TextInput
                            style={styles.textinput}
                            placeholder="输入用户名/手机号"
                            placeholderTextColor="#eee"
                            textDecorationLine='none'
                        />
                    </View>
                    <View style={styles.textInputWrap}>
                        <TextInput
                            style={styles.textinput}
                            placeholder="输入密码"
                            placeholderTextColor="#eee"
                            secureTextEntry={true}
                        />
                    </View>
                    <TouchableOpacity style={styles.forgetBtn}>
                        <Text style={styles.forget}>忘记密码?</Text>
                    </TouchableOpacity>
                    <TouchableOpacity
                        style={styles.LoginBtn}
                        onPress={()=>{this.Login()}}
                    >
                        <Text style={styles.Login}>登录</Text>
                    </TouchableOpacity>
                    <TouchableOpacity style={styles.LoginByPhoneBtn}>
                        <Text style={styles.LoginByPhone}>手机号登录</Text>
                    </TouchableOpacity>
                </View>

                <View></View>
            </View>
        );
    },
    renderNav(){
        return(
            <View style={styles.NavHeader}>
                <TouchableOpacity
                    style={styles.goBack}
                    onPress={() => {this.popBack()}}
                >
                    <Image source={{uri: 'go_back'}} style={styles.goBackImage} />
                </TouchableOpacity>
                <Text style={styles.NavTitle}>登录</Text>
            </View>
        )
    },
    popBack(){
        if(this.props.show){
            this.props.show(true);
        }
        this.props.navigator.pop();
    },
    Login(){
        var that = this;
        // Common.setData('token','test', function () {
        //     that.props.setLogined();
        //     that.popBack();
        // });
        AsyncStorage.setItem('token', 'test')
            .then((err)=>{
                if(!err){
                    that.props.setLogined();
                    that.popBack();
                }
            })
    }
});

const styles = StyleSheet.create({
    container: {
        flex: 1,
        backgroundColor: '#11cd6e',
        paddingTop: Platform.OS === 'ios' ? 22 : 0,
    },
    loginHeader:{
        flexDirection: 'row',
        justifyContent: 'space-between',
        height: 50,
        alignItems: 'center',
    },
    goBack: { marginLeft: 10 },
    goBackImage: { width: 30, height: 30, },
    registerBtnWrap:{
        borderWidth: 1,
        borderColor: '#fff',
        borderRadius: 4,
        width: 50,
        height: 30,
        marginRight: 10,
        justifyContent: 'center',
        alignItems: 'center'
    },
    registerBtn:{
        color: '#fff'
    },

    loginMain:{
        alignItems: 'center'
    },
    loginTitle:{
        color: '#fff',
        fontSize: 16,
        marginTop: 50,
        marginBottom: 40
    },
    textInputWrap:{
        width: width * 0.7,
        // height: 40,
        borderBottomColor: '#fff',
        borderBottomWidth: 1,
    },
    textinput:{
        height: 30,
        color: '#fff',
        backgroundColor: '#11cd6e',
        marginTop: 5,
        paddingVertical: 0,
    },

    forgetBtn:{
        marginTop: 20,
        marginBottom: 20,
    },
    forget:{
        color: '#fff',
        textDecorationLine: 'underline'
    },
    LoginBtn:{
        backgroundColor: '#fff',
        height: 40,
        width: 200,
        justifyContent: 'center',
        alignItems: 'center',
        borderRadius: 5
    },
    Login:{
        color: '#11cd6e',
        fontSize: 18
    },

    LoginByPhoneBtn:{
        marginTop: 20,
        marginBottom: 20,
    },
    LoginByPhone:{
        color: '#fff',
    }
    // NavHeader: {
    //     height: 45,
    //     backgroundColor: '#46B448',
    //     justifyContent: 'center',
    //     alignItems: 'center',
    //     marginTop: Platform.OS === 'ios' ? 22 : 0
    // },
    // headerWrap: {  },
    // NavTitle: { fontSize: 18, color: '#fff' },
});

module.exports = Login;


text:
@interface REMTabBarController : UITabBarController

@end


text:
<!doctype html>

	<meta charset="utf-8">
	<meta name="viewport" content="width=device-width, initial-scale=1.0">
	<meta name="robots" content="noindex, nofollow">

  <title>National Non-Fiction November 2015 – Suffolk Libraries</title>

  <link rel="stylesheet" href="/css/style.css">
	<link rel="preload" as="font" type="font/woff2" href="/fonts/source-sans-pro-v11-latin-regular.woff2">
	<link rel="preload" as="font" type="font/woff2" href="/fonts/source-sans-pro-v11-latin-italic.woff2">
	<link rel="preload" as="font" type="font/woff2" href="/fonts/source-sans-pro-v11-latin-700.woff2">

Skip to content

Skip to navigation menu

💳 You can now pay online.
	Pay charges now →

Donate

Join

Login

Search

Home

eLibrary

Online events

Help

Contact

    Home

      → Parents carers and children

      → Childrens ya books

      → National Non-Fiction November 2015

National Non-Fiction November 2015

  Written by Jo Dixon · Published Nov 6, 2015

Picturepedia: an encyclopedia on every page by Ann Baggaley

This must be the most sumptuous DK book ever. It's like all their other books rolled into one. It's full of stunning colour photos to pore over and would last you for the whole of the Christmas holidays and beyond. I would suggest it as a desert island book, but there is it weighs an absolute ton. Great for Christmas present list!

Usborne 100 science experiments by Georgina Andrews

This Usborne title first came out 10 years ago, but has been updated for a new audience.

Stuff you should know! by John Farndon & Rob Beattie

Packed full of information about how things work, the author explains with great clarity exactly what happens when you flick a switch, flush the loo and so on. Rob Beattie's Heath Robinson meets Steampunk illustrations are just brilliant.

 All about theatre by Marina McIntyre

Lighting, wigs, make-up, stage sets, the role of the director, seating patterns. It's all here. Benedict Cumberbatch describes this as a brilliant introduction, and he knows what he talking about! Brilliant!

The big book of dinosaurs by Darren Naish

Superb photos, clear layout, this is a wonderful introduction for all your young dino-heads. DO NOT PRESS THE SOUND BUTTON IN THE LIBRARY.

Jo Dixon

I work for Suffolk Libraries Stock Team.

Parents, carers and children

Home

New in & book ideas

Parenting advice: Books to help with raising every sort of family

Bookstart and storytime resources

Getting the best out of the library service

Dyslexia and Irlen syndrome

Library cards and welcome packs for children in care

Let's Talk Reading

More Children's books

New children's books for March 2020

Borrow a stunning book from the 2020 CILIP Kate Greenaway Medal longlist

Choose from your next children's or YA read from the prestigious 2020 CILIP Carnegie Medal longlist

Check out a beautifully illustrated book from the 2020 Klaus Flugge Prize longlist

Suffolk Libraries recommends... the Squishy McFluff series by Pip Jones & Ella Okstad

Pick up an excellent book from the 2020 Waterstones Children's Book Prize shortlist

New children's books for February 2020

Discover your new favourite children's author with the 2020 Branford Boase longlist

Build your children's empathy with the 2020 Read for Empathy book collection

Check out the latest super-readable titles from Barrington Stoke

More suggestions

Fiction

Audiobooks

Films & DVDs

eLibrary picks

Children's books

Young adult

Non-fiction

Music

Meet the Author interviews

Articles

 Health and wellbeing

Reviews

Book club favourites

Keep updated

Get the latest suggestions, releases and reviews delivered straight to you.

Email newsletter

Facebook

Twitter

Instagram

Do it online

Search & reserve

Login & renew

eLibrary

Get a library card

Support your library

We're a charity that makes life in Suffolk better for thousands of people.

Donate

Contact us

01473 351249

help@suffolklibraries.co.uk

Social media

Facebook

YouTube

Twitter

Instagram

LinkedIn

Email newsletter

Sections

eLibrary

Libraries

Mobile & home service

Help using the service

Recommendations & reviews

Events & activities

Research & reference

Parents, carers & children

Teachers & home educators

Health & wellbeing

Help with reading & literacy

Work & benefits

Business & room hire

BLOC

Music & Drama Library

News

Jobs

Volunteering

About us

Privacy & cookies

Find out what cookies we use and how we use your data: our privacy policies.

Privacy notice for job applicants

Suffolk Libraries HMRC charity number XT34476. Registered company number IP031542.


text:
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
    <parent>
        <artifactId>lotus-tracing</artifactId>
        <groupId>org.lotus</groupId>
        <version>0.0.1-SNAPSHOT</version>
    </parent>
    <modelVersion>4.0.0</modelVersion>

    <artifactId>tracing-data-consume</artifactId>
    <dependencies>
        <dependency>
            <groupId>org.lotus</groupId>
            <artifactId>kafka-consumer</artifactId>
            <version>0.0.1-SNAPSHOT</version>
        </dependency>
        <dependency>
            <groupId>org.lotus</groupId>
            <artifactId>tracing-common</artifactId>
            <version>0.0.1-SNAPSHOT</version>
        </dependency>
    </dependencies>

</project>


text:
.. -*- coding: utf-8 -*-
.. URL: https://docs.docker.com/docker-hub/official_repos/
.. SOURCE: -
   doc version: 1.10
.. check date: 2016/03/11
.. -------------------------------------------------------------------

.. Official Repositories on Docker Hub

.. _official-repositories-on-docker-hub:

========================================
Docker Hub 上の公式リポジトリ
========================================

.. The Docker Official Repositories are a curated set of Docker repositories that are promoted on Docker Hub. They are designed to:

`公式リポジトリ(Official Repositories) <http://registry.hub.docker.com/official>`_ とは、Docker Hub 上でプロモートされている Docker リポジトリの集まりです。これらは次のように設計されています。

..    Provide essential base OS repositories (for example, ubuntu, centos) that serve as the starting point for the majority of users.

* 必要不可欠なベース OS リポジトリ(例: `ubuntu <https://hub.docker.com/_/ubuntu/>`_ 、 `centos <https://hub.docker.com/_/centos/>`_ )を提供し、多くのユーザにとっての開始点となるものです。

..    Provide drop-in solutions for popular programming language runtimes, data stores, and other services, similar to what a Platform-as-a-Service (PAAS) would offer.

* 有名なプログラミング言語、データ・ストア、他のサービス、プラットフォーム・アス・ア・サービス(PaaS)のような、各種ソリューションの集まりを提供します。

..    Exemplify Dockerfile best practices and provide clear documentation to serve as a reference for other Dockerfile authors.

* ``Dockerfile`` の :doc:`ベスト・プラクティス </engine/userguide/eng-image/dockerfile_best-practice>` を提示し、他の ``Dockerfile`` 著者のリファレンスを提供します。

..    Ensure that security updates are applied in a timely manner. This is particularly important as many Official Repositories are some of the most popular on Docker Hub.

* 適時セキュリティ・アップデートを確実に提供します。特に、Docker Hub 上の多く有名な公式リポジトリにとって重要です。

..    Provide a channel for software vendors to redistribute up-to-date and supported versions of their products. Organization accounts on Docker Hub can also serve this purpose, without the careful review or restrictions on what can be published.

* ソフトウェア・ベンダにとって、更新やプロダクトのサポート・バージョンを配布するチャンネルを提供します。Docker Hub 上の Organization アカウントも同様の役割を提供できますが、こちらは何が公開されるかの注意深いレビューや規約がありません。

.. Docker, Inc. sponsors a dedicated team that is responsible for reviewing and publishing all Official Repositories content. This team works in collaboration with upstream software maintainers, security experts, and the broader Docker community.

Docker 社は、全ての公式リポジトリの内容に関し、レビューと公開に責任を持つ専用チームを提供しています。このチームは、上流のソフトウェア・メンテナ、セキュリティ専門家、幅広い Docker コミュニティと協調しています。

.. While it is preferrable to have upstream software authors maintaining their corresponding Official Repositories, this is not a strict requirement. Creating and maintaining images for Official Repositories is a public process. It takes place openly on GitHub where participation is encouraged. Anyone can provide feedback, contribute code, suggest process changes, or even propose a new Official Repository.

上流のソフトウェア作者が対応する公式リポジトリのメンテナンスにあたり、その優先度を厳密に要求していません。公式リポジトリのイメージ作成・管理は公開されたプロセスです。これらは GitHub 上で展開されています。誰でもフィードバック、コードの貢献、プロセス変更の提案、あるいは新しい公式リポジトリの提案も可能です。

.. Should I use Official Repositories?

.. _should-i-use-official-repositories:

公式リポジトリを使うべきですか?
==================================

.. New Docker users are encouraged to use the Official Repositories in their projects. These repositories have clear documentation, promote best practices, and are designed for the most common use cases. Advanced users are encouraged to review the Official Repositories as part of their Dockerfile learning process.

新しい Docker ユーザにとって、各プロジェクトの公式リポジトリは励みになります。これらのリポジトリには、明確なドキュメントがあり、ベスト・プラクティスを提供し、そして、一般的な利用例のために設計されています。高度なユーザにとっては公式リポジトリにある ``Dockerfile`` が学習プロセスにおいて役立つでしょう。

.. A common rationale for diverging from Official Repositories is to optimize for image size. For instance, many of the programming language stack images contain a complete build toolchain to support installation of modules that depend on optimized code. An advanced user could build a custom image with just the necessary pre-compiled libraries to save space.

公式リポジトリからの分岐は、一般的にイメージ容量の最適化が求められます。例えば、多くのプログラミング言語か重ねられたイメージで、モジュールのインストールをサポートしているツールチェーンを構築するのは、コードの最適化に依存します。高度なユーザであれば、コンパイル済みの必要なライブラリのみのイメージを構築することで、容量を節約できます。

.. A number of language stacks such as python and ruby have -slim tag variants designed to fill the need for optimization. Even when these "slim" variants are insufficient, it is still recommended to inherit from an Official Repository base OS image to leverage the ongoing maintenance work, rather than duplicating these efforts.

`python <https://hub.docker.com/_/python/>`_ と `ruby <https://hub.docker.com/_/ruby/>`_ のように、いくつかの言語スタックは ``-slim`` タグを持っており、これら最適化のために異なった形で設計されています。「slim」派生だけでは不十分なため、公式リポジトリをベースとした OS イメージからの継承を推奨します。これはメンテナンスの継続を重複して行うよりも効果的だからです。

.. How can I get involved?

.. _how-can-i-get-involved:

私が改良できますか?
====================

.. All Official Repositories contain a User Feedback section in their documentation which covers the details for that specific repository. In most cases, the GitHub repository which contains the Dockerfiles for an Official Repository also has an active issue tracker. General feedback and support questions should be directed to #docker-library on Freenode IRC.

公式リポジトリには、ドキュメントには **User Feedback** (ユーザ・フィードバック)セクションがあり、対象のリポジトリに関する詳細を扱います。多くの場合、GitHub リポジトリには公式リポジトリの Dockerfile が含まれています。また、issue トラッカーも利用できます。一般的なフィードバックとサポートの質問は、Freenode IRC 上の ``#docker-library`` で直接行うべきです。

.. How do I create a new Official Repository?

.. how-do-i-create-a-new-official-repository:

私が新しい公式リポジトリを作成できますか?
==================================================

.. From a high level, an Official Repository starts out as a proposal in the form of a set of GitHub pull requests. You'll find detailed and objective proposal requirements in the following GitHub repositories:

上位の手法としては、GitHub におけるプルリクエストの提案によって、公式リポジトリが動き出します。以下の GitHub リポジトリで詳細や提案に必要なものが確認できます。

..    docker-library/official-images
..    docker-library/docs

* `docker-library/official-images <https://github.com/docker-library/official-images>`_

* `docker-library/docs <https://github.com/docker-library/docs>`_

.. The Official Repositories team, with help from community contributors, formally review each proposal and provide feedback to the author. This initial review process may require a bit of back and forth before the proposal is accepted.

公式リポジトリ・チームは、コミュニティのコントリビュータの助けにより、作者に対して提案やフィードバックを公式に提供します。この初期レビュー・プロセスには、提案が承認されるまでに行ったり来たりすることがあります。

.. There are also subjective considerations during the review process. These subjective concerns boil down to the basic question: "is this image generally useful?" For example, the python Official Repository is "generally useful" to the large Python developer community, whereas an obscure text adventure game written in Python last week is not.

また、レビューのプロセス中では主観的な判断も含まれます。主観的な事項は、基本的な質問で煮詰めます「このイメージは一般的に使いやすいだろうか?」 たとえば `python <https://hub.docker.com/_/python/>`_ 公式リポジトリでは、大きな Python 開発コミュニティにとって「一般的に使いやすいか」です。これが先週 Python で書かれた無名のアドベンチャー・ゲームだとしてもです。

.. When a new proposal is accepted, the author becomes responsibile for keeping their images up-to-date and responding to user feedback. The Official Repositories team becomes responsibile for publishing the images and documentation on Docker Hub. Updates to the Official Repository follow the same pull request process, though with less review. The Official Repositories team ultimately acts as a gatekeeper for all changes, which helps mitigate the risk of quality and security issues from being introduced.

新しい提案が承認されると、作者はイメージの更新やユーザのフィードバック対応の継続に対する責任があります。公式リポジトリ・チームはイメージの配布と Docker Hub 上のドキュメントに対する責任があります。公式リポジトリの更新にあたり、複数のプルリクエストはレビューの少ないプロセスを辿ることもあるでしょう。公式リポジトリチームは、全ての変更に対して最終的に対応する門番です。公式リポジトリチームが、品質に対するリスクやセキュリティ問題が発生しないよう助力します。

..    Note: If you are interested in proposing an Official Repository, but would like to discuss it with Docker, Inc. privately first, please send your inquiries to partners@docker.com. There is no fast-track or pay-for-status option.

.. note::

   もし公式リポジトリの提案に興味があるとき、まず Docker 社とプライベートに議論したい場合は、リクエストを partners@docker.com にお送りください。ただし、迅速ではありませんし、支払いオプションもありません。

.. seealso::

   Official Repositories on Docker Hub
      https://docs.docker.com/docker-hub/official_repos/


text:
<?php

namespace MediaAlchemyst\Tests\Transmuter;

use MediaAlchemyst\Transmuter\Document2Image;
use MediaAlchemyst\Tests\AbstractAlchemystTester;
use MediaAlchemyst\DriversContainer;
use MediaAlchemyst\Specification\Image;
use MediaAlchemyst\Specification\Video;
use Symfony\Component\Process\ExecutableFinder;

class Document2ImageTest extends AbstractAlchemystTester
{
    /**
     * @var Document2Image
     */
    protected $object;
    protected $specs;
    protected $source;
    protected $dest;

    protected function setUp()
    {
        $executableFinder = new ExecutableFinder();
        if (!$executableFinder->find('unoconv')) {
            $this->markTestSkipped('Unoconv is not installed');
        }

        $this->object = new Document2Image(new DriversContainer(), $this->getFsManager());

        $this->specs = new Image();
        $this->source = $this->getMediaVorus()->guess(__DIR__ . '/../../../files/Hello.odt');
        $this->dest = __DIR__ . '/../../../files/output.jpg';
    }

    /**
     * Tears down the fixture, for example, closes a network connection.
     * This method is called after a test is executed.
     */
    protected function tearDown()
    {
        if (file_exists($this->dest) && is_writable($this->dest)) {
            unlink($this->dest);
        }
    }

    /**
     * @covers MediaAlchemyst\Transmuter\Document2Image::execute
     */
    public function testExecute()
    {
        $this->specs->setDimensions(320, 240);
        $this->specs->setResizeMode(Image::RESIZE_MODE_INBOUND);

        $this->object->execute($this->specs, $this->source, $this->dest);

        $MediaDest = $this->getMediaVorus()->guess($this->dest);

        $this->assertEquals(320, $MediaDest->getWidth());
        $this->assertEquals(240, $MediaDest->getHeight());
    }

    /**
     * @covers MediaAlchemyst\Transmuter\Document2Image::execute
     * @covers MediaAlchemyst\Exception\SpecNotSupportedException
     * @expectedException MediaAlchemyst\Exception\SpecNotSupportedException
     */
    public function testExecuteWrongSpecs()
    {
        $this->specs = new Video();
        $this->object->execute($this->specs, $this->source, $this->dest);
    }
}


text:
package action;

import com.opensymphony.xwork2.ActionContext;
import com.opensymphony.xwork2.ModelDriven;
import javax.servlet.http.*;
import service.interfaces.*;
import entity.*;

public class LoginAction extends BaseAction implements ModelDriven<User>
{
	private User user = new User();

	public User getModel()
	{
		return user;
	}

	@Override
	public void validate()
	{
		if("".equals(user.getValidationCode())) return;
		Object obj = ActionContext.getContext().getSession().get(
				"validation_code");

		String validationCode = (obj != null) ? obj.toString() : "";

		if (!validationCode.equalsIgnoreCase(user.getValidationCode()))
		{
			if (user.getValidationCode() != null)
			{
				this.addFieldError("validationCode", "ÑéÖ¤ÂëÊäÈë´íÎó!");
			}
		}
	}

	public String execute() throws Exception
	{
		try
		{

			UserService userService = serviceManager.getUserService();

			if(userService.verifyUser(user))
			{
				saveCookie("user", user.getName(), 24 * 60 * 60);
				HttpSession session = request.getSession();
				session.setAttribute("username", user.getName());
				session.setMaxInactiveInterval(60 * 60 * 3);
 			    return SUCCESS;
			}
		}
		catch (Exception e)
		{
			System.out.println(e.getMessage());
		}
		return ERROR;
	}
}


text:
from os import listdir, getcwd, path
from re import sub
from importlib import import_module
from inflection import singularize

def register_blueprints(flask, package):
    package_dir = path.join(getcwd(), flask.name, package)
    module_suffix = '_' + singularize(package) + '.py'

    module_names = [sub('\.py$', '', c)
                    for c in listdir(package_dir) if c.endswith(module_suffix)]

    for module_name in module_names:
        module = import_module(flask.name + '.%s.%s' % (package, module_name))
        flask.register_blueprint(module.blueprint)


text:
{% extends "main.html" %}
{% autoescape None %}

{% block body %}
<form method="POST">
	ISBN <input type="text" name="isbn"
		value="{{ book.get('isbn', '') }}">

	Title <input type="text" name="title"
		value="{{ book.get('title', '') }}">

	Subtitle <input type="text" name="subtitle"
		value="{{ book.get('subtitle', '') }}">

	Image <input type="text" name="image"
		value="{{ book.get('image', '') }}">

	Author <input type="text" name="author"
		value="{{ book.get('author', '') }}">

	Date released <input type="text" name="date_released"
		value="{{ book.get('date_released', '') }}">

	Description

	<textarea name="description" rows="5"
		cols="40">{% raw book.get('description', '')%}</textarea>

	<input type="submit" value="Save">
</form>
{% end %}


text:
using System;
using System.ComponentModel;
using System.Windows.Forms;

namespace Chapter05
{
    [Description("Listing 5.01")]
    class CSharp1Syntax
    {
        static void LogPlainEvent(object sender, EventArgs e)
        {
            Console.WriteLine ("LogPlain");
        }

        static void LogKeyEvent(object sender, KeyPressEventArgs e)
        {
            Console.WriteLine ("LogKey");
        }

        static void LogMouseEvent(object sender, MouseEventArgs e)
        {
            Console.WriteLine ("LogMouse");
        }

        static void Main()
        {
            Button button = new Button();
            button.Text = "Click me";
            button.Click += new EventHandler(LogPlainEvent);
            button.KeyPress += new KeyPressEventHandler(LogKeyEvent);
            button.MouseClick += new MouseEventHandler(LogMouseEvent);

            Form form = new Form();
            form.AutoSize = true;
            form.Controls.Add(button);
            Application.Run(form);
        }
    }
}


text:
FOUNDATION_EXPORT double FuelGaugeKitVersionNumber;

//! Project version string for FuelGaugeKit.
FOUNDATION_EXPORT const unsigned char FuelGaugeKitVersionString[];

// In this header, you should import all the public headers of your framework using statements like #import <FuelGaugeKit/PublicHeader.h>


text:
@import '../variables.css';

@global-import 'normalize.css';

/*
 * Base styles
 * ========================================================================== */

html {
  color: #222;
  font-weight: 100;
  font-size: 1em; /* ~16px; */
  font-family: var(--font-family-base);
  line-height: 1.375; /* ~22px */
}

body {
  margin: 0;
}

a {
  color: #0074c2;
}

/*
 * Remove text-shadow in selection highlight:
 * https://twitter.com/miketaylr/status/12228805301
 *
 * These selection rule sets have to be separate.
 * Customize the background color to match your design.
 */

::-moz-selection {
  background: #b3d4fc;
  text-shadow: none;
}

::selection {
  background: #b3d4fc;
  text-shadow: none;
}

/*
 * A better looking default horizontal rule
 */

hr {
  display: block;
  height: 1px;
  border: 0;
  border-top: 1px solid #ccc;
  margin: 1em 0;
  padding: 0;
}

/*
 * Remove the gap between audio, canvas, iframes,
 * images, videos and the bottom of their containers:
 * https://github.com/h5bp/html5-boilerplate/issues/440
 */

audio,
canvas,
iframe,
img,
svg,
video {
  vertical-align: middle;
}

/*
 * Remove default fieldset styles.
 */

fieldset {
  border: 0;
  margin: 0;
  padding: 0;
}

/*
 * Allow only vertical resizing of textareas.
 */

textarea {
  resize: vertical;
}

/*
 * Browser upgrade prompt
 * ========================================================================== */

:global(.browserupgrade) {
  margin: 0.2em 0;
  background: #ccc;
  color: #000;
  padding: 0.2em 0;
}

/*
 * Print styles
 * Inlined to avoid the additional HTTP request:
 * http://www.phpied.com/delay-loading-your-print-css/
 * ========================================================================== */

@media print {
  *,
  *::before,
  *::after {
    background: transparent !important;
    color: #000 !important; /* Black prints faster: http://www.sanbeiji.com/archives/953 */
    box-shadow: none !important;
    text-shadow: none !important;
  }

  a,
  a:visited {
    text-decoration: underline;
  }

  a[href]::after {
    content: ' (' attr(href) ')';
  }

  abbr[title]::after {
    content: ' (' attr(title) ')';
  }

  /*
   * Don't show links that are fragment identifiers,
   * or use the `javascript:` pseudo protocol
   */

  a[href^='#']::after,
  a[href^='javascript:']::after {
    content: '';
  }

  pre,
  blockquote {
    border: 1px solid #999;
    page-break-inside: avoid;
  }

  /*
   * Printing Tables:
   * http://css-discuss.incutio.com/wiki/Printing_Tables
   */

  thead {
    display: table-header-group;
  }

  tr,
  img {
    page-break-inside: avoid;
  }

  img {
    max-width: 100% !important;
  }

  p,
  h2,
  h3 {
    orphans: 3;
    widows: 3;
  }

  h2,
  h3 {
    page-break-after: avoid;
  }
}


text:
from tests.integration.integration_test_case import IntegrationTestCase

class TestQuestionnaireChangeAnswer(IntegrationTestCase):

    def test_section_summary_not_available_if_section_incomplete(self):

        # Given I launched a survey and have not answered any questions
        self.launchSurvey('test', 'is_skipping_to_end')

        # When I try access a section summary
        self.get('questionnaire/test/is_skipping_to_end/789/test-skipping-section-summary-group/0/test-skipping-section-summary')

        # Then I should be redirected to the first incomplete question in that section
        self.assertInBody('This is section 1')
        self.assertInBody('Were you forced to complete section 1?')

    def test_section_summary_not_available_after_invalidating_section(self):

        # Given I launched a survey and have completed a section
        self.launchSurvey('test', 'is_skipping_to_end')
        self.post({'test-skipping-answer': 'No'})
        self.assertInBody('This section is now complete')
        self.assertInBody('Were you forced to complete section 1?')

        # When I invalidate the section and try access it's section summary
        self.get('questionnaire/test/is_skipping_to_end/789/test-skipping-group/0/test-skipping-forced#test-skipping-answer')
        self.post({'test-skipping-answer': 'Yes'})
        self.get('questionnaire/test/is_skipping_to_end/789/test-skipping-section-summary-group/0/test-skipping-section-summary')

        # Then I should be redirected to the first incomplete question in that section
        self.assertInBody('This is section 1')
        self.assertInBody('What would incentivise you to complete this section?')

    def test_final_summary_not_available_if_any_question_incomplete(self):

        # Given I launched a survey and have not answered any questions
        self.launchSurvey('test', 'is_skipping_to_end')

        # When I try access the final summary
        self.get('questionnaire/test/is_skipping_to_end/789/summary-group/0/summary')

        # Then I should be redirected to the first incomplete question in the survey
        self.assertInBody('This is section 1')
        self.assertInBody('Were you forced to complete section 1?')

    def test_final_summary_not_available_after_invalidating_section(self):

        # Given I launched a survey and have answered all questions
        self.launchSurvey('test', 'is_skipping_to_end')
        self.post({'test-skipping-answer': 'No'})
        self.assertInBody('This section is now complete')
        self.assertInBody('Were you forced to complete section 1?')
        self.post(action='save_continue')

        self.post({'test-skipping-answer-2': 'No'})
        self.assertInBody('This section is now complete')
        self.assertInBody('Were you forced to complete section 2?')
        self.post(action='save_continue')

        self.assertInBody('You must submit this survey to complete it')
        self.assertInBody('Were you forced to complete section 1?')
        self.assertInBody('Were you forced to complete section 2?')
        self.assertInBody('Submit answers')

        # When I invalidate any block and try access the final summary
        self.get('questionnaire/test/is_skipping_to_end/789/test-skipping-group-2/0/test-skipping-forced-2#test-skipping-answer-2')
        self.post({'test-skipping-answer-2': 'Yes'})

        self.get('questionnaire/test/is_skipping_to_end/789/test-skipping-group/0/test-skipping-forced#test-skipping-answer')
        self.post({'test-skipping-answer': 'Yes'})

        self.get('questionnaire/test/is_skipping_to_end/789/summary-group/0/summary')

        # Then I should be redirected to the first incomplete question in the survey
        self.assertInBody('This is section 1')
        self.assertInBody('What would incentivise you to complete this section?')


text:
using System;
using System.Reflection;

public static partial class Extensions
{
    /// <summary>
    ///     An Assembly extension method that gets an attribute.
    /// </summary>
    /// <typeparam name="T">Generic type parameter.</typeparam>
    /// <param name="this">The @this to act on.</param>
    /// <returns>The attribute.</returns>
    public static T GetAttribute<T>(this Assembly @this) where T : Attribute
    {
        object[] configAttributes = Attribute.GetCustomAttributes(@this, typeof (T), false);

        if (configAttributes != null && configAttributes.Length > 0)
        {
            return (T) configAttributes[0];
        }

        return null;
    }
}


text:
module AppleManifestRails
  module Install
    class IPA

      def template
        AppleManifestRails.template('manifest.plist')
      end

      def manifest_path
        Rails.root.join('tmp', 'manifest.plist').to_s
      end

      attr_accessor :base_url

      def initialize(request)
        self.base_url = "#{request.scheme}://#{request.host_with_port}"
      end

      def itms_uri
        "itms-services://?action=download-manifest&url=#{self.base_url}/apple_manifest/manifest.plist"
      end

      def url
        "#{self.base_url}/install/app.ipa"
      end

      def write_manifest
        File.open(manifest_path, "w") do |f|
          File.open(template, "r") do |tmpl|
            f.write tmpl.read.gsub("[IPAURL]", self.url)
          end
        end
      end
    end
  end
end


text:
'use strict';

Object.defineProperty(exports, "__esModule", {
  value: true
});

var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };

var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();

var _simpleAssign = require('simple-assign');

var _simpleAssign2 = _interopRequireDefault(_simpleAssign);

var _react = require('react');

var _react2 = _interopRequireDefault(_react);

var _dateUtils = require('./dateUtils');

var _DatePickerDialog = require('./DatePickerDialog');

var _DatePickerDialog2 = _interopRequireDefault(_DatePickerDialog);

var _TextField = require('../TextField');

var _TextField2 = _interopRequireDefault(_TextField);

var _deprecatedPropType = require('../utils/deprecatedPropType');

var _deprecatedPropType2 = _interopRequireDefault(_deprecatedPropType);

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }

function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }

function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }

function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }

var DatePicker = function (_React$Component) {
  _inherits(DatePicker, _React$Component);

  function DatePicker() {
    var _Object$getPrototypeO;

    var _temp, _this, _ret;

    _classCallCheck(this, DatePicker);

    for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
      args[_key] = arguments[_key];
    }

    return _ret = (_temp = (_this = _possibleConstructorReturn(this, (_Object$getPrototypeO = Object.getPrototypeOf(DatePicker)).call.apply(_Object$getPrototypeO, [this].concat(args))), _this), _this.state = {
      date: undefined
    }, _this.handleAccept = function (date) {
      if (!_this.isControlled()) {
        _this.setState({
          date: date
        });
      }
      if (_this.props.onChange) _this.props.onChange(null, date);
      if (_this.props.valueLink) _this.props.valueLink.requestChange(date);
    }, _this.handleFocus = function (event) {
      event.target.blur();
      if (_this.props.onFocus) _this.props.onFocus(event);
    }, _this.handleTouchTap = function (event) {
      if (_this.props.onTouchTap) _this.props.onTouchTap(event);

      if (!_this.props.disabled) setTimeout(function () {
        _this.openDialog();
      }, 0);
    }, _this.formatDate = function (date) {
      if (_this.props.locale && _this.props.DateTimeFormat) {
        return new _this.props.DateTimeFormat(_this.props.locale, {
          day: 'numeric',
          month: 'numeric',
          year: 'numeric'
        }).format(date);
      } else {
        return (0, _dateUtils.formatIso)(date);
      }
    }, _temp), _possibleConstructorReturn(_this, _ret);
  }

  _createClass(DatePicker, [{
    key: 'componentWillMount',
    value: function componentWillMount() {
      this.setState({
        date: this.isControlled() ? this.getControlledDate() : this.props.defaultDate
      });
    }
  }, {
    key: 'componentWillReceiveProps',
    value: function componentWillReceiveProps(nextProps) {
      if (this.isControlled()) {
        var newDate = this.getControlledDate(nextProps);
        if (!(0, _dateUtils.isEqualDate)(this.state.date, newDate)) {
          this.setState({
            date: newDate
          });
        }
      }
    }
  }, {
    key: 'getDate',
    value: function getDate() {
      return this.state.date;
    }

    /**
     * Open the date-picker dialog programmatically from a parent.
     */

  }, {
    key: 'openDialog',
    value: function openDialog() {
      /**
       * if the date is not selected then set it to new date
       * (get the current system date while doing so)
       * else set it to the currently selected date
       */
      if (this.state.date !== undefined) {
        this.setState({
          dialogDate: this.getDate()
        }, this.refs.dialogWindow.show);
      } else {
        this.setState({
          dialogDate: new Date()
        }, this.refs.dialogWindow.show);
      }
    }

    /**
     * Alias for `openDialog()` for an api consistent with TextField.
     */

  }, {
    key: 'focus',
    value: function focus() {
      this.openDialog();
    }
  }, {
    key: 'isControlled',
    value: function isControlled() {
      return this.props.hasOwnProperty('value') || this.props.hasOwnProperty('valueLink');
    }
  }, {
    key: 'getControlledDate',
    value: function getControlledDate() {
      var props = arguments.length <= 0 || arguments[0] === undefined ? this.props : arguments[0];

      if (props.value instanceof Date) {
        return props.value;
      } else if (props.valueLink && props.valueLink.value instanceof Date) {
        return props.valueLink.value;
      }
    }
  }, {
    key: 'render',
    value: function render() {
      var _props = this.props;
      var DateTimeFormat = _props.DateTimeFormat;
      var autoOk = _props.autoOk;
      var cancelLabel = _props.cancelLabel;
      var container = _props.container;
      var defaultDate = _props.defaultDate;
      var // eslint-disable-line no-unused-vars
      disableYearSelection = _props.disableYearSelection;
      var firstDayOfWeek = _props.firstDayOfWeek;
      var locale = _props.locale;
      var maxDate = _props.maxDate;
      var minDate = _props.minDate;
      var mode = _props.mode;
      var okLabel = _props.okLabel;
      var onDismiss = _props.onDismiss;
      var onFocus = _props.onFocus;
      var // eslint-disable-line no-unused-vars
      onShow = _props.onShow;
      var // eslint-disable-line no-unused-vars
      onTouchTap = _props.onTouchTap;
      var // eslint-disable-line no-unused-vars
      style = _props.style;
      var textFieldStyle = _props.textFieldStyle;
      var valueLink = _props.valueLink;
      var // eslint-disable-line no-unused-vars
      wordings = _props.wordings;
      var shouldDisableDate = _props.shouldDisableDate;

      var other = _objectWithoutProperties(_props, ['DateTimeFormat', 'autoOk', 'cancelLabel', 'container', 'defaultDate', 'disableYearSelection', 'firstDayOfWeek', 'locale', 'maxDate', 'minDate', 'mode', 'okLabel', 'onDismiss', 'onFocus', 'onShow', 'onTouchTap', 'style', 'textFieldStyle', 'valueLink', 'wordings', 'shouldDisableDate']);

      var prepareStyles = this.context.muiTheme.prepareStyles;

      var formatDate = this.props.formatDate || this.formatDate;

      return _react2.default.createElement(
        'div',
        { style: prepareStyles((0, _simpleAssign2.default)({}, style)) },
        _react2.default.createElement(_TextField2.default, _extends({}, other, {
          style: textFieldStyle,
          ref: 'input',
          value: this.state.date ? formatDate(this.state.date) : '',
          onFocus: this.handleFocus,
          onTouchTap: this.handleTouchTap
        })),
        _react2.default.createElement(_DatePickerDialog2.default, {
          DateTimeFormat: DateTimeFormat,
          autoOk: autoOk,
          cancelLabel: cancelLabel,
          container: container,
          disableYearSelection: disableYearSelection,
          firstDayOfWeek: firstDayOfWeek,
          initialDate: this.state.dialogDate,
          locale: locale,
          maxDate: maxDate,
          minDate: minDate,
          mode: mode,
          okLabel: okLabel,
          onAccept: this.handleAccept,
          onShow: onShow,
          onDismiss: onDismiss,
          ref: 'dialogWindow',
          shouldDisableDate: shouldDisableDate,
          wordings: wordings
        })
      );
    }
  }]);

  return DatePicker;
}(_react2.default.Component);

DatePicker.propTypes = {
  /**
   * Constructor for date formatting for the specified `locale`.
   * The constructor must follow this specification: ECMAScript Internationalization API 1.0 (ECMA-402).
   * `Intl.DateTimeFormat` is supported by most modern browsers, see http://caniuse.com/#search=intl,
   * otherwise https://github.com/andyearnshaw/Intl.js is a good polyfill.
   */
  DateTimeFormat: _react2.default.PropTypes.func,

  /**
   * If true, automatically accept and close the picker on select a date.
   */
  autoOk: _react2.default.PropTypes.bool,

  /**
   * Override the default text of the 'Cancel' button.
   */
  cancelLabel: _react2.default.PropTypes.node,

  /**
   * Used to control how the DatePicker will be displayed when a user tries to set a date.
   * `dialog` (default) displays the DatePicker as a dialog with a modal.
   * `inline` displays the DatePicker below the input field (similar to auto complete).
   */
  container: _react2.default.PropTypes.oneOf(['dialog', 'inline']),

  /**
   * This is the initial date value of the component.
   * If either `value` or `valueLink` is provided they will override this
   * prop with `value` taking precedence.
   */
  defaultDate: _react2.default.PropTypes.object,

  /**
   * Disables the year selection in the date picker.
   */
  disableYearSelection: _react2.default.PropTypes.bool,

  /**
   * Disables the DatePicker.
   */
  disabled: _react2.default.PropTypes.bool,

  /**
   * Used to change the first day of week. It varies from
   * Saturday to Monday between different locales.
   * The allowed range is 0 (Sunday) to 6 (Saturday).
   * The default is `1`, Monday, as per ISO 8601.
   */
  firstDayOfWeek: _react2.default.PropTypes.number,

  /**
   * This function is called to format the date displayed in the input box, and should return a string.
   * By default if no `locale` and `DateTimeFormat` is provided date objects are formatted to ISO 8601 YYYY-MM-DD.
   *
   * @param {object} date Date object to be formatted.
   * @returns {any} The formatted date.
   */
  formatDate: _react2.default.PropTypes.func,

  /**
   * Locale used for formatting the dialog date strings. If you are not using the default value, you
   * have to provide a `DateTimeFormat` that supports it.
   */
  locale: _react2.default.PropTypes.string,

  /**
   * The ending of a range of valid dates. The range includes the endDate.
   * The default value is current date + 100 years.
   */
  maxDate: _react2.default.PropTypes.object,

  /**
   * The beginning of a range of valid dates. The range includes the startDate.
   * The default value is current date - 100 years.
   */
  minDate: _react2.default.PropTypes.object,

  /**
   * Tells the component to display the picker in portrait or landscape mode.
   */
  mode: _react2.default.PropTypes.oneOf(['portrait', 'landscape']),

  /**
   * Override the default text of the 'OK' button.
   */
  okLabel: _react2.default.PropTypes.node,

  /**
   * Callback function that is fired when the date value changes.
   *
   * @param {null} null Since there is no particular event associated with the change,
   * the first argument will always be null.
   * @param {object} date The new date.
   */
  onChange: _react2.default.PropTypes.func,

  /**
   * Callback function that is fired when the Date Picker's dialog is dismissed.
   */
  onDismiss: _react2.default.PropTypes.func,

  /**
   * Callback function that is fired when the Date Picker's `TextField` gains focus.
   *
   * @param {object} event `focus` event targeting the `TextField`.
   */
  onFocus: _react2.default.PropTypes.func,

  /**
   * Callback function that is fired when the Date Picker's dialog is shown.
   */
  onShow: _react2.default.PropTypes.func,

  /**
   * Callback function that is fired when a touch tap event occurs on the Date Picker's `TextField`.
   *
   * @param {object} event TouchTap event targeting the `TextField`.
   */
  onTouchTap: _react2.default.PropTypes.func,

  /**
   * Callback function used to determine if a day's entry should be disabled on the calendar.
   *
   * @param {object} day Date object of a day.
   * @returns {boolean} Indicates whether the day should be disabled.
   */
  shouldDisableDate: _react2.default.PropTypes.func,

  /**
   * Override the inline-styles of the root element.
   */
  style: _react2.default.PropTypes.object,

  /**
   * Override the inline-styles of DatePicker's TextField element.
   */
  textFieldStyle: _react2.default.PropTypes.object,

  /**
   * Sets the date for the Date Picker programmatically.
   */
  value: _react2.default.PropTypes.any,

  /**
   * Creates a ValueLink with the value of date picker.
   */
  valueLink: _react2.default.PropTypes.object,

  /**
   * Wordings used inside the button of the dialog.
   */
  wordings: (0, _deprecatedPropType2.default)(_react2.default.PropTypes.object, 'Instead, use `cancelLabel` and `okLabel`.')
};
DatePicker.defaultProps = {
  autoOk: false,
  cancelLabel: 'Cancel',
  container: 'dialog',
  disabled: false,
  disableYearSelection: false,
  firstDayOfWeek: 1,
  okLabel: 'OK',
  style: {}
};
DatePicker.contextTypes = {
  muiTheme: _react2.default.PropTypes.object.isRequired
};
exports.default = DatePicker;


text:
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";

--
-- Database: `d3football`
--

-- --------------------------------------------------------

--
-- Table structure for table `drives`
--

CREATE TABLE `drives` (
`id` int(11) NOT NULL,
  `game_id` int(11) NOT NULL,
  `team_id` int(11) NOT NULL,
  `location` tinyint(4) NOT NULL,
  `quarter` varchar(4) NOT NULL,
  `starttime` time NOT NULL,
  `points` tinyint(4) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- --------------------------------------------------------

--
-- Table structure for table `field_goals`
--

CREATE TABLE `field_goals` (
  `play_id` int(11) NOT NULL,
  `distance` tinyint(4) NOT NULL,
  `success` enum('0','1') NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- --------------------------------------------------------

--
-- Table structure for table `games`
--

CREATE TABLE `games` (
`id` int(11) NOT NULL,
  `home_id` int(11) NOT NULL,
  `road_id` int(11) NOT NULL,
  `home_score` tinyint(3) unsigned NOT NULL,
  `road_score` tinyint(3) unsigned NOT NULL,
  `date` datetime NOT NULL,
  `gamecode` varchar(100) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- --------------------------------------------------------

--
-- Table structure for table `goforit`
--

CREATE TABLE `goforit` (
  `play_id` int(11) NOT NULL,
  `success` enum('0','1') NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- --------------------------------------------------------

--
-- Table structure for table `plays`
--

CREATE TABLE `plays` (
`id` int(10) unsigned NOT NULL,
  `drive_id` int(11) NOT NULL,
  `playnum` tinyint(4) NOT NULL,
  `down` enum('1','2','3','4') NOT NULL,
  `distance` tinyint(4) NOT NULL,
  `location` tinyint(4) NOT NULL,
  `quarter` enum('1','2','3','4','5') NOT NULL,
  `description` varchar(255) NOT NULL,
  `result` tinyint(4) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- --------------------------------------------------------

--
-- Table structure for table `punts`
--

CREATE TABLE `punts` (
  `play_id` int(11) NOT NULL,
  `distance` tinyint(4) NOT NULL,
  `net` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- --------------------------------------------------------

--
-- Table structure for table `teams`
--

CREATE TABLE `teams` (
`id` int(11) NOT NULL,
  `school` varchar(100) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Indexes for dumped tables
--

--
-- Indexes for table `drives`
--
ALTER TABLE `drives`
 ADD PRIMARY KEY (`id`), ADD KEY `game_id` (`game_id`,`team_id`);

--
-- Indexes for table `field_goals`
--
ALTER TABLE `field_goals`
 ADD PRIMARY KEY (`play_id`);

--
-- Indexes for table `games`
--
ALTER TABLE `games`
 ADD PRIMARY KEY (`id`), ADD KEY `home_id` (`home_id`,`road_id`,`gamecode`);

--
-- Indexes for table `goforit`
--
ALTER TABLE `goforit`
 ADD PRIMARY KEY (`play_id`);

--
-- Indexes for table `plays`
--
ALTER TABLE `plays`
 ADD PRIMARY KEY (`id`), ADD KEY `drive_id` (`drive_id`);

--
-- Indexes for table `punts`
--
ALTER TABLE `punts`
 ADD PRIMARY KEY (`play_id`);

--
-- Indexes for table `teams`
--
ALTER TABLE `teams`
 ADD PRIMARY KEY (`id`), ADD KEY `school` (`school`);

--
-- AUTO_INCREMENT for dumped tables
--

--
-- AUTO_INCREMENT for table `drives`
--
ALTER TABLE `drives`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT for table `games`
--
ALTER TABLE `games`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT for table `plays`
--
ALTER TABLE `plays`
MODIFY `id` int(10) unsigned NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT for table `teams`
--
ALTER TABLE `teams`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;


text:
describe('<GroupMarker />', () => {
  it('Expect to have unit tests specified', () => {
    expect(true).toEqual(false);
  });
});


text:
class CreateActivityTable < ActiveRecord::Migration
  def table_name
    :restpack_activity_activities
  end

  def up
    create_table table_name do |t|
      t.integer :application_id
      t.integer :user_id
      t.string  :title
      t.text    :content
      t.text    :tag_list, :array => true, :default => []
      t.decimal :latitude, precision: 10, scale: 6, null: true
      t.decimal :longitude, precision: 10, scale: 6, null: true
      t.column  :search_vector, 'tsvector'
      t.json    :data
      t.timestamps
    end

    execute "CREATE INDEX #{table_name}_tag_list_index ON #{table_name} USING gin(tag_list)"
    execute "CREATE INDEX #{table_name}_search_index ON #{table_name} USING gin(search_vector)"
    execute "CREATE TRIGGER #{table_name}_vector_update BEFORE INSERT OR UPDATE
              ON #{table_name} FOR EACH ROW EXECUTE PROCEDURE
              tsvector_update_trigger(search_vector, 'pg_catalog.english', title, content);"
  end

  def down
    execute "DROP INDEX #{table_name}_tag_list_index"
    execute "DROP INDEX #{table_name}_search_index"
    drop_table table_name
  end
end


text:
package com.asdesign.sparkapptest;

import android.content.Intent;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.util.Log;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View;
import android.widget.AdapterView;
import android.widget.ArrayAdapter;
import android.widget.ListView;

import java.io.IOException;
import java.util.ArrayList;
import java.util.List;

import io.particle.android.sdk.cloud.ParticleCloud;
import io.particle.android.sdk.cloud.ParticleCloudException;
import io.particle.android.sdk.cloud.ParticleCloudSDK;
import io.particle.android.sdk.cloud.ParticleDevice;
import io.particle.android.sdk.utils.Async;
import io.particle.android.sdk.utils.Toaster;

public class DeviceConfigActivity extends AppCompatActivity {

    // Get the passed in device name we chose
    String nameDevice;

    ParticleCloud localSparkCloud = ParticleCloudSDK.getCloud();
    ParticleDevice localParticleDevice = null;

    private final static String PARTICLE_DEVICE_TAG = "SPARK_TEST_LOG_TAG";

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        Log.i(PARTICLE_DEVICE_TAG, "onCreate()");

        Intent passedInIntent = getIntent();
        nameDevice = passedInIntent.getExtras().getString("ParticleDevice");

        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_device_config);

        // Retrieve the particle device for the passed in name
        initDevice(findViewById(R.id.deviceConfigView));
    }

    @Override
    public boolean onCreateOptionsMenu(Menu menu) {
        // Inflate the menu; this adds items to the action bar if it is present.
        getMenuInflater().inflate(R.menu.menu_logged_in, menu);
        return true;
    }

    @Override
    protected void onResume() {
        Log.i(PARTICLE_DEVICE_TAG, "onResume()");

        super.onResume();
        setContentView(R.layout.activity_device_config);

        // Display the properties is handled once the response from the init devices is completed
    }

    /**
     * @brief This function retrieves the list of connected devices from the cloud
     * @param myView specifies the view from which this is being called
     */
    private void initDevice(View myView){

        // List out all connected devices
        Async.executeAsync(localSparkCloud, new Async.ApiWork<ParticleCloud, List<ParticleDevice>>() {

            public List<ParticleDevice> callApi(ParticleCloud particleCloud)
                    throws ParticleCloudException, IOException {
                return particleCloud.getDevices();
            }

            @Override
            public void onSuccess(List<ParticleDevice> devices) {
                for (ParticleDevice device : devices) {
                    if (device.getName().equals(nameDevice)) {
                        localParticleDevice = device;
                        break;
                    }
                }

                listDeviceProps();
            }

            @Override
            public void onFailure(ParticleCloudException e) {
                //Log.e("SOME_TAG", e);
                Log.i(PARTICLE_DEVICE_TAG, "Call onFailure()");
                Toaster.l(DeviceConfigActivity.this, "Wrong credentials or no internet connectivity, please try again");
                listDeviceProps();
            }
        });
    }

    private void listDeviceProps(){
        // Get the list view object
        ListView listView = (ListView)findViewById(R.id.deviceConfigListView);

        // Copy the names of all devices to an array
        List<String> localParticleDeviceString = new ArrayList<String>();
        localParticleDeviceString.clear();

        if( null != localParticleDevice) {
            localParticleDeviceString.add(localParticleDevice.getName().toString());
            localParticleDeviceString.add(localParticleDevice.getID().toString());
            localParticleDeviceString.add(localParticleDevice.getVersion().toString());
        }
        else
        {
            localParticleDeviceString.add("Warning - Device not found");
        }
        // Define a new Adapter
        // First parameter - Context
        // Second parameter - Layout for the row
        // Third parameter - ID of the TextView to which the data is written
        // Forth - the Array of data
        ArrayAdapter<String> localSparkDevicesAdapter = new ArrayAdapter<String>(DeviceConfigActivity.this,
                android.R.layout.simple_list_item_1, android.R.id.text1, localParticleDeviceString);

        listView.setAdapter(localSparkDevicesAdapter);
    }
}


text:
title: Passing a value to ember.js view from handlebars template
author: Justin Ball
layout: post
tags:
  - "Javscript"
  - "Ember.js"
date: '2013-08-29T06:00:00Z'
templateKey: blog-post
path: "/pass-attributes-to-an-emberjs-view"
description: ''
---

This is one of those things that should be easy and it's probably obvious to most people but it threw me for a while.
I wanted to pass a value into my ember.js view at the moment that I declare the view. It's a static value, just a css class
name, so it doesn't need to be bound to anything. Turns out it's really not that hard:

Add a property to your view:

App.ModalView = Ember.View.extend({
  aClassName: 'modal'
});

When you use the view just set the property:

{{#view App.ModalView aClassName="wide_modal"}}
  Some great content goes here
{{/view}}

Use the value in your template:

  <div {{bindAttr class="view.aClassName"}}>
    More stuff here
  </div>


text:
namespace SIL.WritingSystems.Tests
{
	public class SimpleRulesCollationDefinitionCloneableTests : CollationDefinitionCloneableTests
	{
		public override CollationDefinition CreateNewCloneable()
		{
			return new SimpleRulesCollationDefinition("standard");
		}

		public override string EqualsExceptionList
		{
			get { return "|_collationRules|"; }
		}

	}
}


text:
package org.pentaho.hadoop.mapreduce.converter.converters;

import org.apache.hadoop.io.Text;
import org.pentaho.di.core.row.ValueMetaInterface;
import org.pentaho.hadoop.mapreduce.converter.TypeConversionException;
import org.pentaho.hadoop.mapreduce.converter.spi.ITypeConverter;

/**
 * Converts {@link Text} objects to {@link String} objects
 */
public class TextToStringConverter implements ITypeConverter<Text, String> {
  @Override
  public boolean canConvert(Class from, Class to) {
    return Text.class.equals(from) && String.class.equals(to);
  }

  @Override
  public String convert(ValueMetaInterface meta, Text obj) throws TypeConversionException {
    return obj.toString();
  }
}


text:
const Product = require('../models/product');

exports.getProducts = (req, res, next) => {
  Product.fetchAll()
    .then(products => {
      res.render('shop/product-list', {
        prods: products,
        pageTitle: 'All Products',
        path: '/products'
      });
    })
    .catch(err => {
      console.log(err);
    });
};

exports.getProduct = (req, res, next) => {
  const prodId = req.params.productId;
  // Product.findAll({ where: { id: prodId } })
  //   .then(products => {
  //     res.render('shop/product-detail', {
  //       product: products[0],
  //       pageTitle: products[0].title,
  //       path: '/products'
  //     });
  //   })
  //   .catch(err => console.log(err));
  Product.findById(prodId)
    .then(product => {
      res.render('shop/product-detail', {
        product: product,
        pageTitle: product.title,
        path: '/products'
      });
    })
    .catch(err => console.log(err));
};

exports.getIndex = (req, res, next) => {
  Product.fetchAll()
    .then(products => {
      res.render('shop/index', {
        prods: products,
        pageTitle: 'Shop',
        path: '/'
      });
    })
    .catch(err => {
      console.log(err);
    });
};

exports.getCart = (req, res, next) => {
  req.user
    .getCart()
    .then(cart => {
      return cart
        .getProducts()
        .then(products => {
          res.render('shop/cart', {
            path: '/cart',
            pageTitle: 'Your Cart',
            products: products
          });
        })
        .catch(err => console.log(err));
    })
    .catch(err => console.log(err));
};

exports.postCart = (req, res, next) => {
  const prodId = req.body.productId;
  let fetchedCart;
  let newQuantity = 1;
  req.user
    .getCart()
    .then(cart => {
      fetchedCart = cart;
      return cart.getProducts({ where: { id: prodId } });
    })
    .then(products => {
      let product;
      if (products.length > 0) {
        product = products[0];
      }

      if (product) {
        const oldQuantity = product.cartItem.quantity;
        newQuantity = oldQuantity + 1;
        return product;
      }
      return Product.findById(prodId);
    })
    .then(product => {
      return fetchedCart.addProduct(product, {
        through: { quantity: newQuantity }
      });
    })
    .then(() => {
      res.redirect('/cart');
    })
    .catch(err => console.log(err));
};

exports.postCartDeleteProduct = (req, res, next) => {
  const prodId = req.body.productId;
  req.user
    .getCart()
    .then(cart => {
      return cart.getProducts({ where: { id: prodId } });
    })
    .then(products => {
      const product = products[0];
      return product.cartItem.destroy();
    })
    .then(result => {
      res.redirect('/cart');
    })
    .catch(err => console.log(err));
};

exports.postOrder = (req, res, next) => {
  let fetchedCart;
  req.user
    .getCart()
    .then(cart => {
      fetchedCart = cart;
      return cart.getProducts();
    })
    .then(products => {
      return req.user
        .createOrder()
        .then(order => {
          return order.addProducts(
            products.map(product => {
              product.orderItem = { quantity: product.cartItem.quantity };
              return product;
            })
          );
        })
        .catch(err => console.log(err));
    })
    .then(result => {
      return fetchedCart.setProducts(null);
    })
    .then(result => {
      res.redirect('/orders');
    })
    .catch(err => console.log(err));
};

exports.getOrders = (req, res, next) => {
  req.user
    .getOrders({include: ['products']})
    .then(orders => {
      res.render('shop/orders', {
        path: '/orders',
        pageTitle: 'Your Orders',
        orders: orders
      });
    })
    .catch(err => console.log(err));
};


text:
WORKDIR="/opt/phab/sshkeys"
mkdir -p $WORKDIR
for f in $(find $WORKDIR/ -type f -mtime +3 -print); do
	rm -f $f
done

source /etc/epiphyte.d/environment
json=$(curl -s $PHAB_HOST/api/user.search \
       -d api.token=$PHAB_TOKEN \
       -d queryKey=active)
users=$(echo "$json" | python -c "
import sys
import json

inputs = sys.stdin.read()
j = json.loads(inputs)
for u in j['result']['data']:
	print(u['phid'] + ':' + u['fields']['username'])
")

if [ $? -ne 0 ]; then
	echo "unable to retrieve users" | smirc
	exit 1
fi

for u in $(echo $users); do
	name=$(echo $u | cut -d ":" -f 2)
	phid=$(echo $u | cut -d ":" -f 1)
	p=$(curl -s $PHAB_HOST/api/auth.authorizedkeys \
	         -d api.token=$PHAB_TOKEN \
	         -d phids[0]=$phid)
	keys=$(echo $p | python -c "
import sys
import json
inputs = sys.stdin.read()
j = json.loads(inputs)
for k in j['result']['data']:
	print(k)
")
    echo "user: $name ($phid)"
    if [ $? -ne 0 ]; then
        echo "error getting keys" | smirc
        continue
    fi
	if [ -z "$keys" ]; then
		echo "no keys"
		continue
	fi
	echo "found keys: $name"
	path=$WORKDIR/$name
	echo "$keys" > ${path}-keys
done

echo "!phabricator" | smirc --to=command --command
chmod 755 $WORKDIR
chmod 666 $WORKDIR/*


text:
ACCEPTED

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

#### Published in
Gen. hist. 4:171. 1837

#### Original name
null

### Remarks
null


text:
prepare s from 'select CONCAT (?, ?, ?) into :result';
execute s using 'aaa', 'bbb', 'ccc';
deallocate prepare s;

evaluate 'aaabbbccc' into :expected;
select case when (:expected = :result) then 'YES' else 'NO' end as result;

-- 2
prepare s from 'select CONCAT (?, ?, ?) into :result';
execute s using 123, 456, 789;
deallocate prepare s;

evaluate '123456789' into :expected;
select case when (:expected = :result) then 'YES' else 'NO' end as result;

-- 2
prepare s from 'select CONCAT_WS (?, ?, ?, ?) into :result';
execute s using ',', 'aaa', 'bbb', 'ccc';
deallocate prepare s;

evaluate 'aaa,bbb,ccc' into :expected;
select case when (:expected = :result) then 'YES' else 'NO' end as result;

-- 4
prepare s from 'select CONCAT_WS (?, ?, ?, ?) into :result';
execute s using ',', 123, 456, 789;
deallocate prepare s;

evaluate '123,456,789' into :expected;
select case when (:expected = :result) then 'YES' else 'NO' end as result;

--+ holdcas off;


text:
/**
 * The data property holds all the samples for a process. This is used to initialise and reset it
 * after an interval.
 *
 * @param {Object} panopticon The scope to operate on.
 * @private
 */

module.exports = function (panopticon) {
	if (panopticon.persist) {
		panopticon.emit('reset', panopticon.endTime);
	} else {
		panopticon.data = {};
	}

	// After resetting the data, there may be single sets to be done for the new interval.
	panopticon.emit('newInterval');
};