text:
<content xml:space="preserve">

	<item id="fb_alias">DevDocs@Microsoft.com</item>
	<item id="fb_product"></item>
	<item id="fb_topic">Customer%20Feedback</item>
	<item id="fb_text">Send Feedback</item>
  <item id="fb_footer_to">Microsoft</item>
  <item id="fb_footer_text">on this topic.</item>
  <item id="fb_footer_text_to">on this topic to Microsoft.</item>
	<item id="fb_body">
Thank you for your feedback. The developer writing teams use your feedback to improve documentation. While we are reviewing your feedback, we may send you e-mail to ask for clarification or feedback on a solution. We do not use your e-mail address for any other purpose and we delete it after we finish our review.
For further information about the privacy policies of Microsoft, please see http://privacy.microsoft.com/en-us/default.aspx.</item>

</content>


text:
package com.me.diankun.viewpager;

import android.os.Bundle;
import android.support.v4.view.ViewPager;
import android.support.v7.app.AppCompatActivity;

/**
 * Created by diankun on 2016/2/19.
 */
public class ViewPagerTabStripActivity extends AppCompatActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_viewpagertabstrip);

        ViewPager viewPager = (ViewPager) findViewById(R.id.viewpager);

        viewPager.setAdapter(new ViewPagerTabStripPagerAdapter(getSupportFragmentManager()));
    }
}

redpajama_set_name: RedPajamaGithub


text:
#ifndef TUT_CONSOLE_REPORTER
#define TUT_CONSOLE_REPORTER
#include <tut/tut.hpp>
#include <cassert>

/**
 * Template Unit Tests Framework for C++.
 * http://tut.dozen.ru
 *
 * @author Vladimir Dyuzhev, Vladimir.Dyuzhev@gmail.com
 */
namespace
{

std::ostream& operator<<(std::ostream& os, const tut::test_result& tr)
{
    switch(tr.result)
    {
        case tut::test_result::ok:
            os << '.';
            break;
        case tut::test_result::fail:
            os << '[' << tr.test << "=F]";
            break;
        case tut::test_result::ex_ctor:
            os << '[' << tr.test << "=C]";
            break;
        case tut::test_result::ex:
            os << '[' << tr.test << "=X]";
            break;
        case tut::test_result::warn:
            os << '[' << tr.test << "=W]";
            break;
        case tut::test_result::term:
            os << '[' << tr.test << "=T]";
            break;
        case tut::test_result::rethrown:
            os << '[' << tr.test << "=P]";
            break;
        case tut::test_result::skipped:
            os << '[' << tr.test << "=S]";
            break;
        case tut::test_result::dummy:
            throw tut::tut_error("console reporter called for dummy test result");
    }

    return os;
}

} // end of namespace

namespace tut
{

/**
 * Default TUT callback handler.
 */
class console_reporter : public tut::callback
{
    std::string current_group;
    typedef std::vector<tut::test_result> not_passed_list;
    not_passed_list not_passed;
    std::ostream& os;

    console_reporter(const console_reporter &);
    console_reporter &operator=(const console_reporter &);
public:

    int ok_count;
    int exceptions_count;
    int failures_count;
    int terminations_count;
    int warnings_count;
    int skipped_count;

    console_reporter()
        : current_group(),
          not_passed(),
          os(std::cout),
          ok_count(0),
          exceptions_count(0),
          failures_count(0),
          terminations_count(0),
          warnings_count(0),
          skipped_count(0)
    {
        init();
    }

    console_reporter(std::ostream& out)
        : current_group(),
          not_passed(),
          os(out),
          ok_count(0),
          exceptions_count(0),
          failures_count(0),
          terminations_count(0),
          warnings_count(0),
          skipped_count(0)

    {
        init();
    }

    void run_started()
    {
        init();
    }

    void test_completed(const tut::test_result& tr)
    {
        if (tr.group != current_group)
        {
            os << std::endl << tr.group << ": " << std::flush;
            current_group = tr.group;
        }

        os << tr << std::flush;

        // update global statistics
        switch (tr.result) {
            case test_result::ok:
                ok_count++;
                break;
            case test_result::fail:
            case test_result::rethrown:
                failures_count++;
                break;
            case test_result::ex:
            case test_result::ex_ctor:
                exceptions_count++;
                break;
            case test_result::warn:
                warnings_count++;
                break;
            case test_result::term:
                terminations_count++;
                break;
            case test_result::skipped:
                skipped_count++;
                break;
            case tut::test_result::dummy:
                assert( (tr.result != tut::test_result::dummy) && "Should never be called");
        } // switch

        if ( (tr.result != tut::test_result::ok) &&
             (tr.result != tut::test_result::skipped) )
        {
            not_passed.push_back(tr);
        }
    }

    void run_completed()
    {
        os << std::endl;

        if (not_passed.size() > 0)
        {
            not_passed_list::const_iterator i = not_passed.begin();
            while (i != not_passed.end())
            {
                tut::test_result tr = *i;

                os << std::endl;

                os << "---> " << "group: " << tr.group
                << ", test: test<" << tr.test << ">"
                << (!tr.name.empty() ? (std::string(" : ") + tr.name) : std::string())
                << std::endl;

#if defined(TUT_USE_POSIX)
                if(tr.pid != getpid())
                {
                    os << "     child pid: " << tr.pid << std::endl;
                }
#endif
                os << "     problem: ";
                switch(tr.result)
                {
                case test_result::rethrown:
                    os << "assertion failed in child" << std::endl;
                    break;
                case test_result::fail:
                    os << "assertion failed" << std::endl;
                    break;
                case test_result::ex:
                case test_result::ex_ctor:
                    os << "unexpected exception" << std::endl;
                    if( tr.exception_typeid != "" )
                    {
                        os << "     exception typeid: "
                        << tr.exception_typeid << std::endl;
                    }
                    break;
                case test_result::term:
                    os << "would be terminated" << std::endl;
                    break;
                case test_result::warn:
                    os << "test passed, but cleanup code (destructor) raised"
                        " an exception" << std::endl;
                    break;
                default:
                    break;
                }

                if (!tr.message.empty())
                {
                    if (tr.result == test_result::fail)
                    {
                        os << "     failed assertion: `" << tr.message << "`"
                            << std::endl;
                    }
                    else
                    {
                        os << "     message: `" << tr.message << "`"
                            << std::endl;
                    }
                }

                ++i;
            }
        }

        os << std::endl;

        os << "tests summary:";
        if (terminations_count > 0)
        {
            os << " terminations:" << terminations_count;
        }
        if (exceptions_count > 0)
        {
            os << " exceptions:" << exceptions_count;
        }
        if (failures_count > 0)
        {
            os << " failures:" << failures_count;
        }
        if (warnings_count > 0)
        {
            os << " warnings:" << warnings_count;
        }

        os << " ok:" << ok_count;

        if(skipped_count > 0)
        {
            os << " skipped:" << skipped_count;
        }
        os << std::endl;
    }

    virtual bool all_ok() const
    {
        return not_passed.empty();
    }

private:

    void init()
    {
        ok_count = 0;
        exceptions_count = 0;
        failures_count = 0;
        terminations_count = 0;
        warnings_count = 0;
        skipped_count = 0;
        not_passed.clear();
    }
};

}

#endif


text:
<?php
/**
 * Get all configuration details to be able to execute the test suite.
 *
 */
include __DIR__ . "/../autoloader.php";
include __DIR__ . "/../vendor/autoload.php";


text:
import React from 'react';
import ApolloClient from 'apollo-client';
import { InMemoryCache } from 'apollo-cache-inmemory';
import { SubscriptionClient } from 'subscriptions-transport-ws';
import gql from 'graphql-tag';

const deferQuery = `# This is a sample query with defer directive.
# The GraphQL Giraffe server is configured to return deferred results after 5 seconds,
# so you can observe better how the effects of a defer directive works.

query TestQuery {
    hero(id:"1000") {
        id
        name
        appearsIn
        homePlanet
        friends @defer {
            id
            name
        }
    }
}`;

const streamQuery = `# This is a sample query with stream and defer directive.
# The GraphQL Giraffe server is configured to return each result after 5 seconds,
# so you can observe better how the effects of stream and defer directives work.

query TestQuery {
    hero(id:"1000") {
        id
        name
        appearsIn @defer
        homePlanet
        friends @stream {
            ... on Human {
              name
            }
          	... on Droid {
              name
              primaryFunction
            }
        }
    }
}`

const thresholdQuery = `# This is a sample query that will be denied by a query complexity threshold middleware.
# The field "friends" of both Human and Droid have a query weight of 0.5.
# The maximum query weight (threshold) is set to 2.0 on the server.
# Hero friends will have a weight of 0.5.
# Friends of friends of hero will have a weight of 1.0 (since they can be both Human and Droid).
# Also, their inner friends will have a weight of 1.0.
# Total weight is 2.5, making the query too complex for the threshold meter.

query TestQuery {
    hero(id:"1000") {
        id, friends { id, friends { id, friends { id } } }
    }
}`

const liveQuery = `# This is a sample query using live directive.
# This query will subscribe to updates on the isMoon field by the mutation "setMoon".
# Whenever the mutation is done, the new value will be sent after 5 seconds.

query testQuery {
  planet (id : 1) {
    id
    name
    isMoon @live
  }
}`

export default class QueryRunner extends React.Component {
    constructor(props) {
        super(props);
        var subscription = new SubscriptionClient('ws://localhost:8086/', {
            reconnect: true
        });
        var client = new ApolloClient({
            link: subscription,
            cache: new InMemoryCache()
        });
        this.state = {
            query: deferQuery,
            subscription: subscription,
            client: client,
            results: ''
        };

        this.handleChange = this.handleChange.bind(this);
        this.handleRun = this.handleRun.bind(this);
        this.handleSampleQueryChange = this.handleSampleQueryChange.bind(this);
    }

    handleChange(event) {
        this.setState({ query: event.target.value });
    }

    handleSampleQueryChange(event) {
        switch (event.target.value) {
            case "defer":
                this.setState({ query: deferQuery });
                break;
            case "stream":
                this.setState({ query: streamQuery });
                break;
            case "threshold":
                this.setState({ query: thresholdQuery });
                break;
            case "live":
                this.setState({ query: liveQuery });
                break;
            default:
                break;
        }
    }

    handleRun(event) {
        this.setState({ results: '' });
        this.state.subscription.unsubscribeAll();
        this.state.client.subscribe({
            query: gql `${this.state.query}`,
            variables: {}
        }).subscribe({
            next: result => {
                this.setState({ results: this.state.results + JSON.stringify(result) + "\n\n" });
            },
            error: e => {
                this.setState({ results: this.state.results + JSON.stringify(e) + "\n\n" });
            }
        });
        event.preventDefault();
    }

    render() {
        return ( <
            div >
            <
            div >
            <
            p >
            Type a query here, or select one of the sample queries in the selection below.You can type subscriptions and defer directives,
            the client will wait
            for more responses over Web Socket connection. <
            /p> <
            p > Once typed, just click "Run query"
            to connect to the socket and wait
            for responses. < /p> <
            /div> <
            div >
            <
            p >
            Sample queries: & nbsp; <
            select onChange = { this.handleSampleQueryChange } >
            <
            option value = "defer" > Deferred query sample < /option> <
            option value = "stream" > Streamed query sample < /option> <
            option value = "threshold" > Threshold
            for complex queries sample < /option> <
            option value = "live" > Live query sample < /option> <
            /select> <
            /p> <
            /div> <
            div >
            <
            textarea cols = "100"
            rows = "20"
            value = { this.state.query }
            onChange = { this.handleChange } > < /textarea> <
            /div> <
            div >
            <
            button onClick = { this.handleRun } > Run query < /button> <
            /div> <
            div >
            <
            p > Results are displayed here. < /p> <
            p >
            As explained above, queries are run by GraphQL over WebSocket protocol.If the query is a subscription or defer query, the client will wait
            for subsequent responses from the Socket. <
            /p> <
            /div> <
            div >
            <
            textarea cols = "100"
            rows = "20"
            value = { this.state.results } > < /textarea> <
            /div> <
            /div>
        );
    }
}