text:
package eu.ydp.empiria.player.client.module.identification.predicates;

import eu.ydp.empiria.player.client.module.identification.presenter.SelectableChoicePresenter;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.mockito.InjectMocks;
import org.mockito.Mock;
import org.mockito.runners.MockitoJUnitRunner;

import static org.fest.assertions.api.Assertions.assertThat;
import static org.mockito.Mockito.when;

@RunWith(MockitoJUnitRunner.class)
public class SelectedChoicePredicateTest {

    @InjectMocks
    private SelectedChoicePredicate testObj;
    @Mock
    private SelectableChoicePresenter presenter;

    @Test
    public void shouldReturnTrue_whenChoiceIsSelected() {
        // given
        when(presenter.isSelected()).thenReturn(true);

        // when
        boolean result = testObj.apply(presenter);

        // then
        assertThat(result).isTrue();
    }

    @Test
    public void shouldReturnFalse_whenChoiceIsNotSelected() {
        // given
        when(presenter.isSelected()).thenReturn(false);

        // when
        boolean result = testObj.apply(presenter);

        // then
        assertThat(result).isFalse();
    }
}

redpajama_set_name: RedPajamaGithub


text:
Tumia kigezo hiki ili kutengeneza kamusi ya picha ambayo ni ya lugha moja, lugha mbili, au lugha tatu.

#Udhaifu wa Tafsiri Hii
Kitabu hiki kwa sasa kimewekwa alama ya "kimajaribio" kwa kuwa tunajua kuhusu matatizo kadhaa katika muundo na kufaa kwake.

#Maoni
Tafadhali toa na upige kura kwa [mapendekezo](http://bloomlibrary.org/suggestions).

Tafadhali toa taarifa kuhusu matatizo kwa [issues@bloomremovelibrary.org](mailto:issues@bloomremovelibrary.org?subject=Picture Dictionary Problem).


text:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Security.Principal;
using System.Text;
using System.Threading.Tasks;

namespace ItsaWeb.Authentication
{
    public interface IItsaIdentity : IIdentity
    {
    }
}


text:
using System;
using System.Collections.Generic;
using System.IO;
using GroupDocs.Conversion.Options.Convert;
using GroupDocs.Conversion.Options.Load;

namespace GroupDocs.Conversion.Examples.CSharp.AdvancedUsage
{
    /// <summary>
    /// This example demonstrates how to convert an email document and localize email fields
    /// </summary>
    internal static class ConvertEmailWithLocalizingEmailFields
    {
        public static void Run()
        {
            string outputFolder = Constants.GetOutputDirectoryPath();
            string outputFile = Path.Combine(outputFolder, "converted.pdf");

            Func<LoadOptions> getLoadOptions = () => new EmailLoadOptions
            {
                ConvertOwned = false,
                FieldTextMap = new Dictionary<EmailField, string>
                {
                    {EmailField.Subject, "Gegenstand"},
                    {EmailField.From, "Von"},
                    {EmailField.Attachments, "Anhänge"}
                }
            };

            using (Converter converter = new Converter(Constants.SAMPLE_EML, getLoadOptions))
            {
                PdfConvertOptions options = new PdfConvertOptions();
                converter.Convert(outputFile, options);
            }

            Console.WriteLine("\nEmail document converted successfully. \nCheck output in {0}", outputFolder);
        }
    }
}


text:
package org.jacpfx.api.annotations.component;

import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

/**
 * This annotation defines the meta definition of an JACP component.
 *
 * @author Andy Moncsek
 */
@Target(ElementType.TYPE)
@Retention(RetentionPolicy.RUNTIME)
public @interface Component {

    /**
     * The component id.
     *
     * @return The component Id.
     */
    String id();

    /**
     * The active state at start time.
     *
     * @return {@code true}.
     */
    boolean active() default true;

    /**
     * Represents the location of your resource bundle file.
     *
     * @return The default resource bundle location (like bundle.messages).
     */
    String resourceBundleLocation() default "";

    /**
     * Represents the Locale ID.
     *
     * @return The default locale Id.
     * @see JDK 6 and JRE 6 Supported Locales
     */
    String localeID() default "";

}


text:
'use strict';
let BannerOperations = require('../BannerOperations.js');
let Logger = require('fhda-pubsub-logging')('event-handler-sync-person');

/**
 * Handle a person sync event from Banner.
 * @license BSD-3-Clause
 * @module
 * @param  {String} college College identifier ('deanza' or 'foothill')
 * @param  {Object} event An event object
 * @return {Promise} Resolved when the operation is complete
 */
module.exports = async function(college, event) {
    Logger.info('Handling person sync event', event);

    try {
        // Lookup the person in Banner
        let person = await BannerOperations.getPerson(event.pidm);

        // Sync Canvas user profile with latest data from Banner
        await college.canvasApi.syncUser(person);
    }
    catch(error) {
        Logger.error(`Failed to handle person sync request due to an error`, {
            error: error,
            event: event
        });
    }
    finally {
        // Delete event from queue
        await BannerOperations.deleteEvent(event);
    }
};


text:
using System;
using AgileBits;
using Foundation;
using UIKit;

namespace DemoOnePasswordExtension
{
	public partial class RegisterViewController : UIViewController
	{
		public RegisterViewController (IntPtr handle) : base (handle)
		{
		}

		public override void ViewDidLoad()
		{
			base.ViewDidLoad();
			this.onePasswordButton.Hidden = !OnePasswordExtension.SharedExtension.IsAppExtensionAvailable;
		}

		partial void saveLoginToOnePassword(Foundation.NSObject sender)
		{
			NSDictionary newLoginDetails = new NSDictionary(
				AppExtensionLoginDictionarykeys.TitleKey, "ACME",
				AppExtensionLoginDictionarykeys.UsernameKey, this.usernameTextField.Text ?? "",
				AppExtensionLoginDictionarykeys.PasswordKey, this.passwordTextField.Text ?? "",
				AppExtensionLoginDictionarykeys.NotesKey, "Saved with the ACME app",
				AppExtensionLoginDictionarykeys.SectionTitleKey, "ACME Browser",
				AppExtensionLoginDictionarykeys.FieldsKey, new NSDictionary("firstname", this.firstnameTextField.Text ?? "",
																"lastname", this.lastnameTextField.Text ?? "")
			);

			// The password generation options are optional, but are very handy in case you have strict rules about password lengths, symbols and digits.
			NSDictionary passwordGenerationOptions = new NSDictionary(
				// The minimum password length can be 4 or more.
				AppExtensionPasswordGeneratorOptions.MinLengthKey, 8,

				// The maximum password length can be 50 or less.
				AppExtensionPasswordGeneratorOptions.MaxLengthKey, 30,

				// If YES, the 1Password will guarantee that the generated password will contain at least one digit (number between 0 and 9). Passing NO will not exclude digits from the generated password.
				AppExtensionPasswordGeneratorOptions.RequireDigitsKey, true,

				// If YES, the 1Password will guarantee that the generated password will contain at least one symbol (See the list bellow). Passing NO with will exclude symbols from the generated password.
				AppExtensionPasswordGeneratorOptions.RequireSymbolsKey, true,

				// Here are all the symbols available in the the 1Password Password Generator:
				// !#$%^&*()_-+=|[]{}'\";.,>?/~`
				// The string for AppExtensionPasswordGeneratorOptions.ForbiddenCharactersKey should contain the symbols and characters that you wish 1Password to exclude from the generated password.
				AppExtensionPasswordGeneratorOptions.ForbiddenCharactersKey, "!#$%/0lIO"
			);
			OnePasswordExtension.SharedExtension.StoreLoginForURLString("https://www.acme.com", newLoginDetails, passwordGenerationOptions, this, sender, (NSDictionary loginDictionary, NSError error) =>
			{
				if (loginDictionary == null || loginDictionary.Count == 0)
				{
					if (error.Code != AppExtensionErrorCodes.CancelledByUser)
					{
						System.Diagnostics.Debug.WriteLine("Failed to use 1Password App Extension to save a new Login: {0}", error);
					}
					return;
				}

				this.usernameTextField.Text = (NSString)loginDictionary[AppExtensionLoginDictionarykeys.UsernameKey] ?? "";
				this.passwordTextField.Text = (NSString)loginDictionary[AppExtensionLoginDictionarykeys.PasswordKey] ?? "";
				this.firstnameTextField.Text = (NSString)((NSDictionary)loginDictionary[AppExtensionLoginDictionarykeys.ReturnedFieldsKey])["firstname"] ?? "";
				this.lastnameTextField.Text = (NSString)((NSDictionary)loginDictionary[AppExtensionLoginDictionarykeys.ReturnedFieldsKey])["lastname"] ?? "";
				// retrieve any additional fields that were passed in newLoginDetails dictionary
			});
		}
	}
}


text:
package leap.webunit.client;

import leap.lang.Arrays2;
import leap.lang.Exceptions;
import leap.lang.exception.NestedIOException;
import leap.lang.http.MimeType;
import leap.lang.http.MimeTypes;
import leap.lang.io.IO;
import org.apache.http.Header;
import org.apache.http.HttpEntity;
import org.apache.http.HttpResponse;
import org.apache.http.StatusLine;
import org.apache.http.client.methods.HttpRequestBase;

import java.io.IOException;
import java.io.InputStream;

class ApacheTHttpResponse extends THttpResponseBase<ApacheTHttpClient> {

	private final HttpRequestBase httpRequest;
	private final HttpResponse    httpResponse;

	protected ApacheTHttpResponse(ApacheTHttpRequest request, HttpRequestBase httpRequest, HttpResponse httpResponse){
        super(request);
		this.httpRequest  = httpRequest;
		this.httpResponse = httpResponse;
	}

	@Override
    public Integer getStatus(){
		StatusLine statusLine = httpResponse.getStatusLine();
		return null == statusLine ? null : statusLine.getStatusCode();
	}

	@Override
    public MimeType getContentType(){
		if(null == contentType){
			HttpEntity entity = httpResponse.getEntity();
			Header     header = null == entity ? null : entity.getContentType();
			if(null != header){
				contentType = MimeTypes.parse(header.getValue());
			}
		}

		return contentType;
	}

	@Override
    public long getContentLength(){
		HttpEntity entity = httpResponse.getEntity();
		return null == entity ? -1L : entity.getContentLength();
	}

	@Override
    public String getHeader(String name){
		Header[] headers = httpResponse.getHeaders(name);
		return Arrays2.isEmpty(headers) ? null : headers[0].getValue();
	}

	@Override
    public leap.lang.http.Header[] getHeaders(String name){
		Header[] headers = httpResponse.getHeaders(name);

		if(null == headers || headers.length == 0) {
			return EMPTY_HEADER_ARRAY;
		}

		leap.lang.http.Header[] array = new leap.lang.http.Header[headers.length];
		for(int i=0;i<array.length;i++) {
			Header header = headers[i];

			array[i] =  new leap.lang.http.Header(header.getName(), header.getValue());
		}

		return array;
	}

	@Override
    public InputStream getInputStream() throws NestedIOException {
		try {
	        HttpEntity entity = httpResponse.getEntity();
	        return null == entity ? null : entity.getContent();
        } catch (IOException e) {
        	throw Exceptions.wrap("Error reading response body", e);
        }
	}

}


text:
var db = require('../../config/database').db,
    chimp = require('../../config/chimp'),
    List = require('./list');
/**
 * User in-memory model is a 1:1 match to Couch document that is enforced here.
 * Essentially functions are attached to the document this way
 * Necessary properties:
 * list_ids: list ids since last login
 * _id: MC unique user id == Couch doc _id
 * apikey: completed Oauth handshake token
 */
var User = function(properties) {
        build_objects_from_document(this,properties);
    };

function build_objects_from_document(object,properties){

    for (var key in properties) {
        object[key] = properties[key];
    }
    build_child_objects(object);
}

function build_child_objects(user) {
    //child documents can be instantiated as seen below
    if (user.lists){
        for (var i=0;i<user.lists.length;i++) {
            var list = user.lists[i];
            //pretty sure the list var is unecessary - need to research my JS
            user.lists[i] = new List(list);
        }
    }

}
/**
 * Sugary DB methods
 */
User.prototype.find_by_id = function(callback) {
    var user = this;
    db.get(user._id, function(err, doc) {
        if (err) {
            callback(err);
        }
        else {
            build_objects_from_document(user,doc);

            callback(null);
        }
    });
};
User.prototype.save = function(callback) {
    var user = this;
    //remove any temp data stored here
    delete user.temp;
    delete user.api;

    db.save(user._id, user, function(err, doc) {
        build_objects_from_document(user,doc);
        callback(err);
    });
};
User.prototype.remove = function(callback) {
    var user = this;
    //this call is likely useless now that _rev is brought into the user object
    db.get(user._id, function(err, doc) {
        if (err) {
            callback(err);
        }
        else {
            //will we ever have user objects without a _rev? If we won't, no need for the first get
            db.remove(doc._id, doc._rev, function(error, res) {
                if (error) {
                    callback(error);
                }
                else {
                    callback(null);
                }
            });
        }
    });
};
/**
 *   )
 *   (
 * c[_]
 *
 * MailChimp data-population methods
 * All list/user data fetching methods are found below
 */
//Grab all relevant list data
User.prototype.fetchLists = function(callback) {
    var user = this;
    user.API().lists({
        start: 0,
        limit: 100
    }, function(lists) {
        if (lists.error) console.log('Error: ' + lists.error + ' (' + lists.code + ')');
        else {
            user.lists = [];
            for (var i = 0; i < lists.total; i++) {
                user.lists.push(new List({
                    id: lists.data[i].id,
                    name: lists.data[i].name
                }));
            }

            user.temp = user.temp || {};
            user.temp.calls = 0;
            for (var j = 0; j < user.lists.length; j++) {
                user.lists[j].fetchMergeVars(user,finishFetchListsAsync,callback);
            }
        }
    });
};
//finishes the async process
function finishFetchListsAsync(user,callback) {
    if (user.lists.length == user.temp.calls) {
        callback();
    }
}
User.prototype.fetchUserID = function(callback) {
    var user = this;
    user.API().getAccountDetails(function(accountDetails) {
        user._id = accountDetails.user_id;
        callback();
    });
};
User.prototype.API = function() {
    if (typeof this.apikey == 'undefined') {
        console.log('User must have apikey before setting its API object');
        return null;
    }
    else {
        this.api = this.api || new chimp(this.apikey, {
            version: '1.3',
            secure: false
        });
        return this.api;
    }
};
//export model
module.exports = User;


text:
@interface KBAInfoController : KBAViewController

@end


text:
//
// io_context.hpp
// ~~~~~~~~~~~~~~
//
// Copyright (c) 2003-2018 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
//

#ifndef BOOST_ASIO_IO_CONTEXT_HPP
#define BOOST_ASIO_IO_CONTEXT_HPP

#if defined(_MSC_VER) && (_MSC_VER >= 1200)
# pragma once
#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)

#include <boost/asio/detail/config.hpp>
#include <cstddef>
#include <stdexcept>
#include <typeinfo>
#include <boost/asio/async_result.hpp>
#include <boost/asio/detail/noncopyable.hpp>
#include <boost/asio/detail/wrapped_handler.hpp>
#include <boost/system/error_code.hpp>
#include <boost/asio/execution_context.hpp>

#if defined(BOOST_ASIO_HAS_CHRONO)
# include <boost/asio/detail/chrono.hpp>
#endif // defined(BOOST_ASIO_HAS_CHRONO)

#if defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
# include <boost/asio/detail/winsock_init.hpp>
#elif defined(__sun) || defined(__QNX__) || defined(__hpux) || defined(_AIX) \
  || defined(__osf__)
# include <boost/asio/detail/signal_init.hpp>
#endif

#include <boost/asio/detail/push_options.hpp>

namespace boost {
namespace asio {

namespace detail {
#if defined(BOOST_ASIO_HAS_IOCP)
  typedef class win_iocp_io_context io_context_impl;
  class win_iocp_overlapped_ptr;
#else
  typedef class scheduler io_context_impl;
#endif
} // namespace detail

/// Provides core I/O functionality.
/**
 * The io_context class provides the core I/O functionality for users of the
 * asynchronous I/O objects, including:
 *
 * @li boost::asio::ip::tcp::socket
 * @li boost::asio::ip::tcp::acceptor
 * @li boost::asio::ip::udp::socket
 * @li boost::asio::deadline_timer.
 *
 * The io_context class also includes facilities intended for developers of
 * custom asynchronous services.
 *
 * @par Thread Safety
 * @e Distinct @e objects: Safe.@n
 * @e Shared @e objects: Safe, with the specific exceptions of the restart()
 * and notify_fork() functions. Calling restart() while there are unfinished
 * run(), run_one(), run_for(), run_until(), poll() or poll_one() calls results
 * in undefined behaviour. The notify_fork() function should not be called
 * while any io_context function, or any function on an I/O object that is
 * associated with the io_context, is being called in another thread.
 *
 * @par Concepts:
 * Dispatcher.
 *
 * @par Synchronous and asynchronous operations
 *
 * Synchronous operations on I/O objects implicitly run the io_context object
 * for an individual operation. The io_context functions run(), run_one(),
 * run_for(), run_until(), poll() or poll_one() must be called for the
 * io_context to perform asynchronous operations on behalf of a C++ program.
 * Notification that an asynchronous operation has completed is delivered by
 * invocation of the associated handler. Handlers are invoked only by a thread
 * that is currently calling any overload of run(), run_one(), run_for(),
 * run_until(), poll() or poll_one() for the io_context.
 *
 * @par Effect of exceptions thrown from handlers
 *
 * If an exception is thrown from a handler, the exception is allowed to
 * propagate through the throwing thread's invocation of run(), run_one(),
 * run_for(), run_until(), poll() or poll_one(). No other threads that are
 * calling any of these functions are affected. It is then the responsibility
 * of the application to catch the exception.
 *
 * After the exception has been caught, the run(), run_one(), run_for(),
 * run_until(), poll() or poll_one() call may be restarted @em without the need
 * for an intervening call to restart(). This allows the thread to rejoin the
 * io_context object's thread pool without impacting any other threads in the
 * pool.
 *
 * For example:
 *
 * @code
 * boost::asio::io_context io_context;
 * ...
 * for (;;)
 * {
 *   try
 *   {
 *     io_context.run();
 *     break; // run() exited normally
 *   }
 *   catch (my_exception& e)
 *   {
 *     // Deal with exception as appropriate.
 *   }
 * }
 * @endcode
 *
 * @par Submitting arbitrary tasks to the io_context
 *
 * To submit functions to the io_context, use the @ref boost::asio::dispatch,
 * @ref boost::asio::post or @ref boost::asio::defer free functions.
 *
 * For example:
 *
 * @code void my_task()
 * {
 *   ...
 * }
 *
 * ...
 *
 * boost::asio::io_context io_context;
 *
 * // Submit a function to the io_context.
 * boost::asio::post(io_context, my_task);
 *
 * // Submit a lambda object to the io_context.
 * boost::asio::post(io_context,
 *     []()
 *     {
 *       ...
 *     });
 *
 * // Run the io_context until it runs out of work.
 * io_context.run(); @endcode
 *
 * @par Stopping the io_context from running out of work
 *
 * Some applications may need to prevent an io_context object's run() call from
 * returning when there is no more work to do. For example, the io_context may
 * be being run in a background thread that is launched prior to the
 * application's asynchronous operations. The run() call may be kept running by
 * creating an object of type
 * boost::asio::executor_work_guard<io_context::executor_type>:
 *
 * @code boost::asio::io_context io_context;
 * boost::asio::executor_work_guard<boost::asio::io_context::executor_type>
 *   = boost::asio::make_work_guard(io_context);
 * ... @endcode
 *
 * To effect a shutdown, the application will then need to call the io_context
 * object's stop() member function. This will cause the io_context run() call
 * to return as soon as possible, abandoning unfinished operations and without
 * permitting ready handlers to be dispatched.
 *
 * Alternatively, if the application requires that all operations and handlers
 * be allowed to finish normally, the work object may be explicitly reset.
 *
 * @code boost::asio::io_context io_context;
 * boost::asio::executor_work_guard<boost::asio::io_context::executor_type>
 *   = boost::asio::make_work_guard(io_context);
 * ...
 * work.reset(); // Allow run() to exit. @endcode
 */
class io_context
  : public execution_context
{
private:
  typedef detail::io_context_impl impl_type;
#if defined(BOOST_ASIO_HAS_IOCP)
  friend class detail::win_iocp_overlapped_ptr;
#endif

public:
  class executor_type;
  friend class executor_type;

#if !defined(BOOST_ASIO_NO_DEPRECATED)
  class work;
  friend class work;
#endif // !defined(BOOST_ASIO_NO_DEPRECATED)

  class service;

#if !defined(BOOST_ASIO_NO_EXTENSIONS)
  class strand;
#endif // !defined(BOOST_ASIO_NO_EXTENSIONS)

  /// The type used to count the number of handlers executed by the context.
  typedef std::size_t count_type;

  /// Constructor.
  BOOST_ASIO_DECL io_context();

  /// Constructor.
  /**
   * Construct with a hint about the required level of concurrency.
   *
   * @param concurrency_hint A suggestion to the implementation on how many
   * threads it should allow to run simultaneously.
   */
  BOOST_ASIO_DECL explicit io_context(int concurrency_hint);

  /// Destructor.
  /**
   * On destruction, the io_context performs the following sequence of
   * operations:
   *
   * @li For each service object @c svc in the io_context set, in reverse order
   * of the beginning of service object lifetime, performs
   * @c svc->shutdown().
   *
   * @li Uninvoked handler objects that were scheduled for deferred invocation
   * on the io_context, or any associated strand, are destroyed.
   *
   * @li For each service object @c svc in the io_context set, in reverse order
   * of the beginning of service object lifetime, performs
   * <tt>delete static_cast<io_context::service*>(svc)</tt>.
   *
   * @note The destruction sequence described above permits programs to
   * simplify their resource management by using @c shared_ptr<>. Where an
   * object's lifetime is tied to the lifetime of a connection (or some other
   * sequence of asynchronous operations), a @c shared_ptr to the object would
   * be bound into the handlers for all asynchronous operations associated with
   * it. This works as follows:
   *
   * @li When a single connection ends, all associated asynchronous operations
   * complete. The corresponding handler objects are destroyed, and all
   * @c shared_ptr references to the objects are destroyed.
   *
   * @li To shut down the whole program, the io_context function stop() is
   * called to terminate any run() calls as soon as possible. The io_context
   * destructor defined above destroys all handlers, causing all @c shared_ptr
   * references to all connection objects to be destroyed.
   */
  BOOST_ASIO_DECL ~io_context();

  /// Obtains the executor associated with the io_context.
  executor_type get_executor() BOOST_ASIO_NOEXCEPT;

  /// Run the io_context object's event processing loop.
  /**
   * The run() function blocks until all work has finished and there are no
   * more handlers to be dispatched, or until the io_context has been stopped.
   *
   * Multiple threads may call the run() function to set up a pool of threads
   * from which the io_context may execute handlers. All threads that are
   * waiting in the pool are equivalent and the io_context may choose any one
   * of them to invoke a handler.
   *
   * A normal exit from the run() function implies that the io_context object
   * is stopped (the stopped() function returns @c true). Subsequent calls to
   * run(), run_one(), poll() or poll_one() will return immediately unless there
   * is a prior call to restart().
   *
   * @return The number of handlers that were executed.
   *
   * @note Calling the run() function from a thread that is currently calling
   * one of run(), run_one(), run_for(), run_until(), poll() or poll_one() on
   * the same io_context object may introduce the potential for deadlock. It is
   * the caller's reponsibility to avoid this.
   *
   * The poll() function may also be used to dispatch ready handlers, but
   * without blocking.
   */
  BOOST_ASIO_DECL count_type run();

#if !defined(BOOST_ASIO_NO_DEPRECATED)
  /// (Deprecated: Use non-error_code overload.) Run the io_context object's
  /// event processing loop.
  /**
   * The run() function blocks until all work has finished and there are no
   * more handlers to be dispatched, or until the io_context has been stopped.
   *
   * Multiple threads may call the run() function to set up a pool of threads
   * from which the io_context may execute handlers. All threads that are
   * waiting in the pool are equivalent and the io_context may choose any one
   * of them to invoke a handler.
   *
   * A normal exit from the run() function implies that the io_context object
   * is stopped (the stopped() function returns @c true). Subsequent calls to
   * run(), run_one(), poll() or poll_one() will return immediately unless there
   * is a prior call to restart().
   *
   * @param ec Set to indicate what error occurred, if any.
   *
   * @return The number of handlers that were executed.
   *
   * @note Calling the run() function from a thread that is currently calling
   * one of run(), run_one(), run_for(), run_until(), poll() or poll_one() on
   * the same io_context object may introduce the potential for deadlock. It is
   * the caller's reponsibility to avoid this.
   *
   * The poll() function may also be used to dispatch ready handlers, but
   * without blocking.
   */
  BOOST_ASIO_DECL count_type run(boost::system::error_code& ec);
#endif // !defined(BOOST_ASIO_NO_DEPRECATED)

#if defined(BOOST_ASIO_HAS_CHRONO) || defined(GENERATING_DOCUMENTATION)
  /// Run the io_context object's event processing loop for a specified
  /// duration.
  /**
   * The run_for() function blocks until all work has finished and there are no
   * more handlers to be dispatched, until the io_context has been stopped, or
   * until the specified duration has elapsed.
   *
   * @param rel_time The duration for which the call may block.
   *
   * @return The number of handlers that were executed.
   */
  template <typename Rep, typename Period>
  std::size_t run_for(const chrono::duration<Rep, Period>& rel_time);

  /// Run the io_context object's event processing loop until a specified time.
  /**
   * The run_until() function blocks until all work has finished and there are
   * no more handlers to be dispatched, until the io_context has been stopped,
   * or until the specified time has been reached.
   *
   * @param abs_time The time point until which the call may block.
   *
   * @return The number of handlers that were executed.
   */
  template <typename Clock, typename Duration>
  std::size_t run_until(const chrono::time_point<Clock, Duration>& abs_time);
#endif // defined(BOOST_ASIO_HAS_CHRONO) || defined(GENERATING_DOCUMENTATION)

  /// Run the io_context object's event processing loop to execute at most one
  /// handler.
  /**
   * The run_one() function blocks until one handler has been dispatched, or
   * until the io_context has been stopped.
   *
   * @return The number of handlers that were executed. A zero return value
   * implies that the io_context object is stopped (the stopped() function
   * returns @c true). Subsequent calls to run(), run_one(), poll() or
   * poll_one() will return immediately unless there is a prior call to
   * restart().
   *
   * @note Calling the run_one() function from a thread that is currently
   * calling one of run(), run_one(), run_for(), run_until(), poll() or
   * poll_one() on the same io_context object may introduce the potential for
   * deadlock. It is the caller's reponsibility to avoid this.
   */
  BOOST_ASIO_DECL count_type run_one();

#if !defined(BOOST_ASIO_NO_DEPRECATED)
  /// (Deprecated: Use non-error_code overlaod.) Run the io_context object's
  /// event processing loop to execute at most one handler.
  /**
   * The run_one() function blocks until one handler has been dispatched, or
   * until the io_context has been stopped.
   *
   * @return The number of handlers that were executed. A zero return value
   * implies that the io_context object is stopped (the stopped() function
   * returns @c true). Subsequent calls to run(), run_one(), poll() or
   * poll_one() will return immediately unless there is a prior call to
   * restart().
   *
   * @return The number of handlers that were executed.
   *
   * @note Calling the run_one() function from a thread that is currently
   * calling one of run(), run_one(), run_for(), run_until(), poll() or
   * poll_one() on the same io_context object may introduce the potential for
   * deadlock. It is the caller's reponsibility to avoid this.
   */
  BOOST_ASIO_DECL count_type run_one(boost::system::error_code& ec);
#endif // !defined(BOOST_ASIO_NO_DEPRECATED)

#if defined(BOOST_ASIO_HAS_CHRONO) || defined(GENERATING_DOCUMENTATION)
  /// Run the io_context object's event processing loop for a specified duration
  /// to execute at most one handler.
  /**
   * The run_one_for() function blocks until one handler has been dispatched,
   * until the io_context has been stopped, or until the specified duration has
   * elapsed.
   *
   * @param rel_time The duration for which the call may block.
   *
   * @return The number of handlers that were executed.
   */
  template <typename Rep, typename Period>
  std::size_t run_one_for(const chrono::duration<Rep, Period>& rel_time);

  /// Run the io_context object's event processing loop until a specified time
  /// to execute at most one handler.
  /**
   * The run_one_until() function blocks until one handler has been dispatched,
   * until the io_context has been stopped, or until the specified time has
   * been reached.
   *
   * @param abs_time The time point until which the call may block.
   *
   * @return The number of handlers that were executed.
   */
  template <typename Clock, typename Duration>
  std::size_t run_one_until(
      const chrono::time_point<Clock, Duration>& abs_time);
#endif // defined(BOOST_ASIO_HAS_CHRONO) || defined(GENERATING_DOCUMENTATION)

  /// Run the io_context object's event processing loop to execute ready
  /// handlers.
  /**
   * The poll() function runs handlers that are ready to run, without blocking,
   * until the io_context has been stopped or there are no more ready handlers.
   *
   * @return The number of handlers that were executed.
   */
  BOOST_ASIO_DECL count_type poll();

#if !defined(BOOST_ASIO_NO_DEPRECATED)
  /// (Deprecated: Use non-error_code overload.) Run the io_context object's
  /// event processing loop to execute ready handlers.
  /**
   * The poll() function runs handlers that are ready to run, without blocking,
   * until the io_context has been stopped or there are no more ready handlers.
   *
   * @param ec Set to indicate what error occurred, if any.
   *
   * @return The number of handlers that were executed.
   */
  BOOST_ASIO_DECL count_type poll(boost::system::error_code& ec);
#endif // !defined(BOOST_ASIO_NO_DEPRECATED)

  /// Run the io_context object's event processing loop to execute one ready
  /// handler.
  /**
   * The poll_one() function runs at most one handler that is ready to run,
   * without blocking.
   *
   * @return The number of handlers that were executed.
   */
  BOOST_ASIO_DECL count_type poll_one();

#if !defined(BOOST_ASIO_NO_DEPRECATED)
  /// (Deprecated: Use non-error_code overload.) Run the io_context object's
  /// event processing loop to execute one ready handler.
  /**
   * The poll_one() function runs at most one handler that is ready to run,
   * without blocking.
   *
   * @param ec Set to indicate what error occurred, if any.
   *
   * @return The number of handlers that were executed.
   */
  BOOST_ASIO_DECL count_type poll_one(boost::system::error_code& ec);
#endif // !defined(BOOST_ASIO_NO_DEPRECATED)

  /// Stop the io_context object's event processing loop.
  /**
   * This function does not block, but instead simply signals the io_context to
   * stop. All invocations of its run() or run_one() member functions should
   * return as soon as possible. Subsequent calls to run(), run_one(), poll()
   * or poll_one() will return immediately until restart() is called.
   */
  BOOST_ASIO_DECL void stop();

  /// Determine whether the io_context object has been stopped.
  /**
   * This function is used to determine whether an io_context object has been
   * stopped, either through an explicit call to stop(), or due to running out
   * of work. When an io_context object is stopped, calls to run(), run_one(),
   * poll() or poll_one() will return immediately without invoking any
   * handlers.
   *
   * @return @c true if the io_context object is stopped, otherwise @c false.
   */
  BOOST_ASIO_DECL bool stopped() const;

  /// Restart the io_context in preparation for a subsequent run() invocation.
  /**
   * This function must be called prior to any second or later set of
   * invocations of the run(), run_one(), poll() or poll_one() functions when a
   * previous invocation of these functions returned due to the io_context
   * being stopped or running out of work. After a call to restart(), the
   * io_context object's stopped() function will return @c false.
   *
   * This function must not be called while there are any unfinished calls to
   * the run(), run_one(), poll() or poll_one() functions.
   */
  BOOST_ASIO_DECL void restart();

#if !defined(BOOST_ASIO_NO_DEPRECATED)
  /// (Deprecated: Use restart().) Reset the io_context in preparation for a
  /// subsequent run() invocation.
  /**
   * This function must be called prior to any second or later set of
   * invocations of the run(), run_one(), poll() or poll_one() functions when a
   * previous invocation of these functions returned due to the io_context
   * being stopped or running out of work. After a call to restart(), the
   * io_context object's stopped() function will return @c false.
   *
   * This function must not be called while there are any unfinished calls to
   * the run(), run_one(), poll() or poll_one() functions.
   */
  void reset();

  /// (Deprecated: Use boost::asio::dispatch().) Request the io_context to
  /// invoke the given handler.
  /**
   * This function is used to ask the io_context to execute the given handler.
   *
   * The io_context guarantees that the handler will only be called in a thread
   * in which the run(), run_one(), poll() or poll_one() member functions is
   * currently being invoked. The handler may be executed inside this function
   * if the guarantee can be met.
   *
   * @param handler The handler to be called. The io_context will make
   * a copy of the handler object as required. The function signature of the
   * handler must be: @code void handler(); @endcode
   *
   * @note This function throws an exception only if:
   *
   * @li the handler's @c asio_handler_allocate function; or
   *
   * @li the handler's copy constructor
   *
   * throws an exception.
   */
  template <typename LegacyCompletionHandler>
  BOOST_ASIO_INITFN_RESULT_TYPE(LegacyCompletionHandler, void ())
  dispatch(BOOST_ASIO_MOVE_ARG(LegacyCompletionHandler) handler);

  /// (Deprecated: Use boost::asio::post().) Request the io_context to invoke
  /// the given handler and return immediately.
  /**
   * This function is used to ask the io_context to execute the given handler,
   * but without allowing the io_context to call the handler from inside this
   * function.
   *
   * The io_context guarantees that the handler will only be called in a thread
   * in which the run(), run_one(), poll() or poll_one() member functions is
   * currently being invoked.
   *
   * @param handler The handler to be called. The io_context will make
   * a copy of the handler object as required. The function signature of the
   * handler must be: @code void handler(); @endcode
   *
   * @note This function throws an exception only if:
   *
   * @li the handler's @c asio_handler_allocate function; or
   *
   * @li the handler's copy constructor
   *
   * throws an exception.
   */
  template <typename LegacyCompletionHandler>
  BOOST_ASIO_INITFN_RESULT_TYPE(LegacyCompletionHandler, void ())
  post(BOOST_ASIO_MOVE_ARG(LegacyCompletionHandler) handler);

  /// (Deprecated: Use boost::asio::bind_executor().) Create a new handler that
  /// automatically dispatches the wrapped handler on the io_context.
  /**
   * This function is used to create a new handler function object that, when
   * invoked, will automatically pass the wrapped handler to the io_context
   * object's dispatch function.
   *
   * @param handler The handler to be wrapped. The io_context will make a copy
   * of the handler object as required. The function signature of the handler
   * must be: @code void handler(A1 a1, ... An an); @endcode
   *
   * @return A function object that, when invoked, passes the wrapped handler to
   * the io_context object's dispatch function. Given a function object with the
   * signature:
   * @code R f(A1 a1, ... An an); @endcode
   * If this function object is passed to the wrap function like so:
   * @code io_context.wrap(f); @endcode
   * then the return value is a function object with the signature
   * @code void g(A1 a1, ... An an); @endcode
   * that, when invoked, executes code equivalent to:
   * @code io_context.dispatch(boost::bind(f, a1, ... an)); @endcode
   */
  template <typename Handler>
#if defined(GENERATING_DOCUMENTATION)
  unspecified
#else
  detail::wrapped_handler<io_context&, Handler>
#endif
  wrap(Handler handler);
#endif // !defined(BOOST_ASIO_NO_DEPRECATED)

private:
  // Helper function to add the implementation.
  BOOST_ASIO_DECL impl_type& add_impl(impl_type* impl);

  // Backwards compatible overload for use with services derived from
  // io_context::service.
  template <typename Service>
  friend Service& use_service(io_context& ioc);

#if defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
  detail::winsock_init<> init_;
#elif defined(__sun) || defined(__QNX__) || defined(__hpux) || defined(_AIX) \
  || defined(__osf__)
  detail::signal_init<> init_;
#endif

  // The implementation.
  impl_type& impl_;
};

/// Executor used to submit functions to an io_context.
class io_context::executor_type
{
public:
  /// Obtain the underlying execution context.
  io_context& context() const BOOST_ASIO_NOEXCEPT;

  /// Inform the io_context that it has some outstanding work to do.
  /**
   * This function is used to inform the io_context that some work has begun.
   * This ensures that the io_context's run() and run_one() functions do not
   * exit while the work is underway.
   */
  void on_work_started() const BOOST_ASIO_NOEXCEPT;

  /// Inform the io_context that some work is no longer outstanding.
  /**
   * This function is used to inform the io_context that some work has
   * finished. Once the count of unfinished work reaches zero, the io_context
   * is stopped and the run() and run_one() functions may exit.
   */
  void on_work_finished() const BOOST_ASIO_NOEXCEPT;

  /// Request the io_context to invoke the given function object.
  /**
   * This function is used to ask the io_context to execute the given function
   * object. If the current thread is running the io_context, @c dispatch()
   * executes the function before returning. Otherwise, the function will be
   * scheduled to run on the io_context.
   *
   * @param f The function object to be called. The executor will make a copy
   * of the handler object as required. The function signature of the function
   * object must be: @code void function(); @endcode
   *
   * @param a An allocator that may be used by the executor to allocate the
   * internal storage needed for function invocation.
   */
  template <typename Function, typename Allocator>
  void dispatch(BOOST_ASIO_MOVE_ARG(Function) f, const Allocator& a) const;

  /// Request the io_context to invoke the given function object.
  /**
   * This function is used to ask the io_context to execute the given function
   * object. The function object will never be executed inside @c post().
   * Instead, it will be scheduled to run on the io_context.
   *
   * @param f The function object to be called. The executor will make a copy
   * of the handler object as required. The function signature of the function
   * object must be: @code void function(); @endcode
   *
   * @param a An allocator that may be used by the executor to allocate the
   * internal storage needed for function invocation.
   */
  template <typename Function, typename Allocator>
  void post(BOOST_ASIO_MOVE_ARG(Function) f, const Allocator& a) const;

  /// Request the io_context to invoke the given function object.
  /**
   * This function is used to ask the io_context to execute the given function
   * object. The function object will never be executed inside @c defer().
   * Instead, it will be scheduled to run on the io_context.
   *
   * If the current thread belongs to the io_context, @c defer() will delay
   * scheduling the function object until the current thread returns control to
   * the pool.
   *
   * @param f The function object to be called. The executor will make a copy
   * of the handler object as required. The function signature of the function
   * object must be: @code void function(); @endcode
   *
   * @param a An allocator that may be used by the executor to allocate the
   * internal storage needed for function invocation.
   */
  template <typename Function, typename Allocator>
  void defer(BOOST_ASIO_MOVE_ARG(Function) f, const Allocator& a) const;

  /// Determine whether the io_context is running in the current thread.
  /**
   * @return @c true if the current thread is running the io_context. Otherwise
   * returns @c false.
   */
  bool running_in_this_thread() const BOOST_ASIO_NOEXCEPT;

  /// Compare two executors for equality.
  /**
   * Two executors are equal if they refer to the same underlying io_context.
   */
  friend bool operator==(const executor_type& a,
      const executor_type& b) BOOST_ASIO_NOEXCEPT
  {
    return &a.io_context_ == &b.io_context_;
  }

  /// Compare two executors for inequality.
  /**
   * Two executors are equal if they refer to the same underlying io_context.
   */
  friend bool operator!=(const executor_type& a,
      const executor_type& b) BOOST_ASIO_NOEXCEPT
  {
    return &a.io_context_ != &b.io_context_;
  }

private:
  friend class io_context;

  // Constructor.
  explicit executor_type(io_context& i) : io_context_(i) {}

  // The underlying io_context.
  io_context& io_context_;
};

#if !defined(BOOST_ASIO_NO_DEPRECATED)
/// (Deprecated: Use executor_work_guard.) Class to inform the io_context when
/// it has work to do.
/**
 * The work class is used to inform the io_context when work starts and
 * finishes. This ensures that the io_context object's run() function will not
 * exit while work is underway, and that it does exit when there is no
 * unfinished work remaining.
 *
 * The work class is copy-constructible so that it may be used as a data member
 * in a handler class. It is not assignable.
 */
class io_context::work
{
public:
  /// Constructor notifies the io_context that work is starting.
  /**
   * The constructor is used to inform the io_context that some work has begun.
   * This ensures that the io_context object's run() function will not exit
   * while the work is underway.
   */
  explicit work(boost::asio::io_context& io_context);

  /// Copy constructor notifies the io_context that work is starting.
  /**
   * The constructor is used to inform the io_context that some work has begun.
   * This ensures that the io_context object's run() function will not exit
   * while the work is underway.
   */
  work(const work& other);

  /// Destructor notifies the io_context that the work is complete.
  /**
   * The destructor is used to inform the io_context that some work has
   * finished. Once the count of unfinished work reaches zero, the io_context
   * object's run() function is permitted to exit.
   */
  ~work();

  /// Get the io_context associated with the work.
  boost::asio::io_context& get_io_context();

  /// (Deprecated: Use get_io_context().) Get the io_context associated with the
  /// work.
  boost::asio::io_context& get_io_service();

private:
  // Prevent assignment.
  void operator=(const work& other);

  // The io_context implementation.
  detail::io_context_impl& io_context_impl_;
};
#endif // !defined(BOOST_ASIO_NO_DEPRECATED)

/// Base class for all io_context services.
class io_context::service
  : public execution_context::service
{
public:
  /// Get the io_context object that owns the service.
  boost::asio::io_context& get_io_context();

#if !defined(BOOST_ASIO_NO_DEPRECATED)
  /// Get the io_context object that owns the service.
  boost::asio::io_context& get_io_service();
#endif // !defined(BOOST_ASIO_NO_DEPRECATED)

private:
  /// Destroy all user-defined handler objects owned by the service.
  BOOST_ASIO_DECL virtual void shutdown();

#if !defined(BOOST_ASIO_NO_DEPRECATED)
  /// (Deprecated: Use shutdown().) Destroy all user-defined handler objects
  /// owned by the service.
  BOOST_ASIO_DECL virtual void shutdown_service();
#endif // !defined(BOOST_ASIO_NO_DEPRECATED)

  /// Handle notification of a fork-related event to perform any necessary
  /// housekeeping.
  /**
   * This function is not a pure virtual so that services only have to
   * implement it if necessary. The default implementation does nothing.
   */
  BOOST_ASIO_DECL virtual void notify_fork(
      execution_context::fork_event event);

#if !defined(BOOST_ASIO_NO_DEPRECATED)
  /// (Deprecated: Use notify_fork().) Handle notification of a fork-related
  /// event to perform any necessary housekeeping.
  /**
   * This function is not a pure virtual so that services only have to
   * implement it if necessary. The default implementation does nothing.
   */
  BOOST_ASIO_DECL virtual void fork_service(
      execution_context::fork_event event);
#endif // !defined(BOOST_ASIO_NO_DEPRECATED)

protected:
  /// Constructor.
  /**
   * @param owner The io_context object that owns the service.
   */
  BOOST_ASIO_DECL service(boost::asio::io_context& owner);

  /// Destructor.
  BOOST_ASIO_DECL virtual ~service();
};

namespace detail {

// Special service base class to keep classes header-file only.
template <typename Type>
class service_base
  : public boost::asio::io_context::service
{
public:
  static boost::asio::detail::service_id<Type> id;

  // Constructor.
  service_base(boost::asio::io_context& io_context)
    : boost::asio::io_context::service(io_context)
  {
  }
};

template <typename Type>
boost::asio::detail::service_id<Type> service_base<Type>::id;

} // namespace detail
} // namespace asio
} // namespace boost

#include <boost/asio/detail/pop_options.hpp>

#include <boost/asio/impl/io_context.hpp>
#if defined(BOOST_ASIO_HEADER_ONLY)
# include <boost/asio/impl/io_context.ipp>
#endif // defined(BOOST_ASIO_HEADER_ONLY)

// If both io_context.hpp and strand.hpp have been included, automatically
// include the header file needed for the io_context::strand class.
#if !defined(BOOST_ASIO_NO_EXTENSIONS)
# if defined(BOOST_ASIO_STRAND_HPP)
#  include <boost/asio/io_context_strand.hpp>
# endif // defined(BOOST_ASIO_STRAND_HPP)
#endif // !defined(BOOST_ASIO_NO_EXTENSIONS)

#endif // BOOST_ASIO_IO_CONTEXT_HPP


text:
package io.specto.hoverfly.ruletest;

import static io.specto.hoverfly.junit.core.HoverflyConfig.localConfigs;
import static io.specto.hoverfly.junit.dsl.HoverflyDsl.service;
import static io.specto.hoverfly.junit.dsl.HttpBodyConverter.json;
import static io.specto.hoverfly.junit.dsl.ResponseCreators.success;
import static org.assertj.core.api.Assertions.assertThat;

import io.specto.hoverfly.junit.rule.HoverflyRule;
import org.junit.ClassRule;
import org.junit.Test;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.web.client.RestTemplate;
import org.springframework.web.util.UriComponentsBuilder;

public class HoverflyRuleMutualTlsAuthenticationTest {

    @ClassRule
    public static HoverflyRule hoverflyRule = HoverflyRule.inCaptureOrSimulationMode(
        "mutual-tls.json",
        localConfigs().enableClientAuth("ssl/client-auth.pem", "ssl/client-auth.key"));

    @Test
    public void shouldWorkWithTestServerRequiredClientCertificate() {

        // Given
        RestTemplate restTemplate = new RestTemplate();

        // When
        ResponseEntity<Void> response = restTemplate.getForEntity(UriComponentsBuilder.fromHttpUrl("https://client.badssl.com")
                .toUriString(), Void.class);

        // Then
        assertThat(response.getStatusCode()).isEqualTo(HttpStatus.OK);
    }
}


text:
//-----------------------------------------------------------------------
// <copyright file="TwitterTimeline.cs" company="Patrick 'Ricky' Smith">
//  This file is part of the Twitterizer library (http://www.twitterizer.net/)
//
//  Copyright (c) 2010, Patrick "Ricky" Smith (ricky@digitally-born.com)
//  All rights reserved.
//
//  Redistribution and use in source and binary forms, with or without modification, are
//  permitted provided that the following conditions are met:
//
//  - Redistributions of source code must retain the above copyright notice, this list
//    of conditions and the following disclaimer.
//  - Redistributions in binary form must reproduce the above copyright notice, this list
//    of conditions and the following disclaimer in the documentation and/or other
//    materials provided with the distribution.
//  - Neither the name of the Twitterizer nor the names of its contributors may be
//    used to endorse or promote products derived from this software without specific
//    prior written permission.
//
//  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
//  ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
//  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
//  IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
//  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
//  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
//  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
//  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
//  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
//  POSSIBILITY OF SUCH DAMAGE.
// </copyright>
// <author>Ricky Smith</author>
// <summary>The TwitterTimeline class</summary>
//-----------------------------------------------------------------------

namespace Twitterizer
{
    using Twitterizer.Core;

    /// <summary>
    /// Provides interaction with timelines
    /// </summary>
    public static class TwitterTimeline
    {
        /// <overloads>
        /// Returns the 20 most recent statuses, including retweets, posted by the authenticating user and that user's friends. This is the equivalent of /timeline/home on the Web.
        /// </overloads>
        /// <param name="tokens">The tokens.</param>
        /// <param name="options">The options.</param>
        /// <returns>A collection of <see cref="TwitterStatus"/> items.</returns>
        public static TwitterResponse<TwitterStatusCollection> HomeTimeline(OAuthTokens tokens, TimelineOptions options)
        {
            Commands.HomeTimelineCommand command = new Commands.HomeTimelineCommand(tokens, options);

            return Core.CommandPerformer.PerformAction(command);
        }

        /// <param name="tokens">The tokens.</param>
        /// <returns>A collection of <see cref="TwitterStatus"/> items.</returns>
        public static TwitterResponse<TwitterStatusCollection> HomeTimeline(OAuthTokens tokens)
        {
            return HomeTimeline(tokens, null);
        }

        /// <param name="options">The options.</param>
        /// <returns>A collection of <see cref="TwitterStatus"/> items.</returns>
        public static TwitterResponse<TwitterStatusCollection> HomeTimeline(TimelineOptions options)
        {
            return HomeTimeline(null, options);
        }

        /// <summary>
        /// Returns the 20 most recent statuses posted by the authenticating user. It is also possible to request another user's timeline by using the screen_name or user_id parameter.
        /// </summary>
        /// <param name="tokens">The oauth tokens.</param>
        /// <param name="options">The options.</param>
        /// <returns>
        /// A <see cref="TwitterStatusCollection"/> instance.
        /// </returns>
        public static TwitterResponse<TwitterStatusCollection> UserTimeline(
            OAuthTokens tokens,
            UserTimelineOptions options)
        {
            Commands.UserTimelineCommand command = new Commands.UserTimelineCommand(tokens, options);

            return Core.CommandPerformer.PerformAction(command);
        }

        /// <summary>
        /// Returns the 20 most recent statuses posted by the authenticating user. It is also possible to request another user's timeline by using the screen_name or user_id parameter.
        /// </summary>
        /// <param name="tokens">The oauth tokens.</param>
        /// <returns>
        /// A <see cref="TwitterStatusCollection"/> instance.
        /// </returns>
        public static TwitterResponse<TwitterStatusCollection> UserTimeline(
            OAuthTokens tokens)
        {
            return UserTimeline(tokens, null);
        }

        /// <summary>
        /// Returns the 20 most recent statuses posted by the authenticating user. It is also possible to request another user's timeline by using the screen_name or user_id parameter.
        /// </summary>
        /// <param name="options">The options.</param>
        /// <returns>
        /// A <see cref="TwitterStatusCollection"/> instance.
        /// </returns>
        public static TwitterResponse<TwitterStatusCollection> UserTimeline(
            UserTimelineOptions options)
        {
            return UserTimeline(null, options);
        }

        /// <summary>
        /// Gets the public timeline.
        /// </summary>
        /// <returns>A <see cref="TwitterStatusCollection"/>.</returns>
        public static TwitterResponse<TwitterStatusCollection> PublicTimeline()
        {
            return PublicTimeline((OAuthTokens)null);
        }

        /// <summary>
        /// Returns the 20 most recent statuses, including retweets if they exist, from non-protected users. The public timeline is cached for 60 seconds.
        /// </summary>
        /// <param name="tokens">The oauth tokens.</param>
        /// <returns>
        /// A <see cref="TwitterStatusCollection"/>.
        /// </returns>
        public static TwitterResponse<TwitterStatusCollection> PublicTimeline(OAuthTokens tokens)
        {
            return PublicTimeline(tokens, null);
        }

        /// <summary>
        /// Returns the 20 most recent statuses, including retweets if they exist, from non-protected users. The public timeline is cached for 60 seconds.
        /// </summary>
        /// <param name="options">The properties.</param>
        /// <returns>
        /// A <see cref="TwitterStatusCollection"/>.
        /// </returns>
        public static TwitterResponse<TwitterStatusCollection> PublicTimeline(OptionalProperties options)
        {
            return PublicTimeline(null, options);
        }

        /// <summary>
        /// Returns the 20 most recent statuses, including retweets if they exist, from non-protected users. The public timeline is cached for 60 seconds.
        /// </summary>
        /// <param name="tokens">The oauth tokens.</param>
        /// <param name="options">The options.</param>
        /// <returns>A <see cref="TwitterStatusCollection"/>.</returns>
        /// <remarks></remarks>
        public static TwitterResponse<TwitterStatusCollection> PublicTimeline(OAuthTokens tokens, OptionalProperties options)
        {
            Commands.PublicTimelineCommand command = new Commands.PublicTimelineCommand(tokens, options);
            TwitterResponse<TwitterStatusCollection> result = CommandPerformer.PerformAction(command);

            return result;
        }

        /// <summary>
        /// Obtains the authorized user's friends timeline.
        /// </summary>
        /// <param name="tokens">The tokens.</param>
        /// <returns>A <see cref="TwitterStatusCollection"/>.</returns>
        [System.Obsolete("This method is deprecated and has been replaced by the HomeTimeline method.")]
        public static TwitterResponse<TwitterStatusCollection> FriendTimeline(OAuthTokens tokens)
        {
            return FriendTimeline(tokens, null);
        }

        /// <summary>
        /// Obtains the authorized user's friends timeline.
        /// </summary>
        /// <param name="tokens">The tokens.</param>
        /// <param name="options">The options.</param>
        /// <returns>A <see cref="TwitterStatusCollection"/>.</returns>
        [System.Obsolete("This method is deprecated and has been replaced by the HomeTimeline method.")]
        public static TwitterResponse<TwitterStatusCollection> FriendTimeline(OAuthTokens tokens, TimelineOptions options)
        {
            Commands.FriendsTimelineCommand command = new Commands.FriendsTimelineCommand(tokens, options);

            return CommandPerformer.PerformAction(command);
        }

        /// <summary>
        /// Returns the 20 most recent tweets of the authenticated user that have been retweeted by others.
        /// </summary>
        /// <param name="tokens">The tokens.</param>
        /// <param name="options">The options.</param>
        /// <returns>A <see cref="TwitterStatusCollection"/> instance.</returns>
        public static TwitterResponse<TwitterStatusCollection> RetweetsOfMe(OAuthTokens tokens, RetweetsOfMeOptions options)
        {
            return CommandPerformer.PerformAction(
                new Commands.RetweetsOfMeCommand(tokens, options));
        }

        /// <summary>
        /// Returns the 20 most recent tweets of the authenticated user that have been retweeted by others.
        /// </summary>
        /// <param name="tokens">The tokens.</param>
        /// <returns>
        /// A <see cref="TwitterStatusCollection"/> instance.
        /// </returns>
        public static TwitterResponse<TwitterStatusCollection> RetweetsOfMe(OAuthTokens tokens)
        {
            return RetweetsOfMe(tokens, null);
        }

        /// <summary>
        /// Returns the 20 most recent retweets posted by the authenticating user.
        /// </summary>
        /// <param name="tokens">The tokens.</param>
        /// <param name="options">The options.</param>
        /// <returns>A <see cref="TwitterStatusCollection"/> instance.</returns>
        public static TwitterResponse<TwitterStatusCollection> RetweetedByMe(OAuthTokens tokens, TimelineOptions options)
        {
            return CommandPerformer.PerformAction(
                new Commands.RetweetedByMeCommand(tokens, options));
        }

        /// <summary>
        /// Returns the 20 most recent retweets posted by the authenticating user.
        /// </summary>
        /// <param name="tokens">The tokens.</param>
        /// <returns>
        /// A <see cref="TwitterStatusCollection"/> instance.
        /// </returns>
        public static TwitterResponse<TwitterStatusCollection> RetweetedByMe(OAuthTokens tokens)
        {
            return RetweetedByMe(tokens, null);
        }

        /// <summary>
        /// Returns the 20 most recent retweets posted by the authenticating user's friends.
        /// </summary>
        /// <param name="tokens">The tokens.</param>
        /// <param name="options">The options.</param>
        /// <returns>A <see cref="TwitterStatusCollection"/> instance.</returns>
        public static TwitterResponse<TwitterStatusCollection> RetweetedToMe(OAuthTokens tokens, TimelineOptions options)
        {
            return CommandPerformer.PerformAction(
                new Commands.RetweetedToMeCommand(tokens, options));
        }

        /// <summary>
        /// Returns the 20 most recent retweets posted by the authenticating user's friends.
        /// </summary>
        /// <param name="tokens">The tokens.</param>
        /// <returns>
        /// A <see cref="TwitterStatusCollection"/> instance.
        /// </returns>
        public static TwitterResponse<TwitterStatusCollection> RetweetedToMe(OAuthTokens tokens)
        {
            return RetweetedToMe(tokens, null);
        }

        /// <summary>
        /// Returns the 20 most recent mentions (status containing @username) for the authenticating user.
        /// </summary>
        /// <param name="tokens">The tokens.</param>
        /// <param name="options">The options.</param>
        /// <returns>A <see cref="TwitterStatusCollection"/> instance.</returns>
        public static TwitterResponse<TwitterStatusCollection> Mentions(OAuthTokens tokens, TimelineOptions options)
        {
            Commands.MentionsCommand command = new Commands.MentionsCommand(tokens, options);
            return CommandPerformer.PerformAction(command);
        }

        /// <summary>
        /// Returns the 20 most recent mentions (status containing @username) for the authenticating user.
        /// </summary>
        /// <param name="tokens">The tokens.</param>
        /// <returns>
        /// A <see cref="TwitterStatusCollection"/> instance.
        /// </returns>
        public static TwitterResponse<TwitterStatusCollection> Mentions(OAuthTokens tokens)
        {
            return Mentions(tokens, null);
        }
    }
}


text:
package org.jboss.resteasy.reactive.server.core.parameters.converters;

import java.lang.annotation.Annotation;
import java.lang.reflect.Type;

import javax.ws.rs.ext.ParamConverter;

import org.jboss.resteasy.reactive.server.model.ParamConverterProviders;

public class RuntimeParameterConverter implements ParameterConverter {

    private final ParamConverter<?> converter;

    public RuntimeParameterConverter(ParamConverter<?> converter) {
        this.converter = converter;
    }

    @Override
    public Object convert(Object value) {
        return converter.fromString((String) value);
    }

    @Override
    public void init(ParamConverterProviders deployment, Class<?> rawType, Type genericType, Annotation[] annotations) {
        // we're initialised in our constructor
    }

}


text:
<?php

# Date formats

define('DATE_FORMAT_STANDART',                      'd.m.Y');
define('DATE_FORMAT_MYSQL',                         'Y-m-d');
define('DATE_FORMAT_DATETIME',                      'd.m.Y, H:i');
define('DATE_FORMAT_W3C',                           'Y-m-d\TH:i:sP');

# Form fields

define('FORM_FIELD_HIDDEN',                         'hidden');
define('FORM_FIELD_PASSWORD',                       'password');
define('FORM_FIELD_CAPTCHA',                        'captcha');
define('FORM_FIELD_TEXT',                           'text');
define('FORM_FIELD_TEXTAREA',                       'textarea');

# String pools

define('STR_POOL_DEFAULT',                          'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789');
define('STR_POOL_LATIN',                            'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ');
define('STR_POOL_LATIN_LOWER',                      'abcdefghijklmnopqrstuvwxyz');
define('STR_POOL_LATIN_UPPER',                      'ABCDEFGHIJKLMNOPQRSTUVWXYZ');
define('STR_POOL_NUMERIC',                          '0123456789');


text:
// commons-codec version compatibility level: 1.9
using Lucene.Net.Support;
using System;
using System.Collections.Generic;
using System.Globalization;
using System.IO;
using System.Reflection;
using System.Text.RegularExpressions;

namespace Lucene.Net.Analysis.Phonetic.Language.Bm
{

    ///
    /// Language guessing utility.
    ///
    /// <remarks>
    /// This class encapsulates rules used to guess the possible languages that a word originates from. This is
    /// done by reference to a whole series of rules distributed in resource files.
    /// <para/>
    /// Instances of this class are typically managed through the static factory method <see cref="GetInstance(NameType)"/>.
    /// Unless you are developing your own language guessing rules, you will not need to interact with this class directly.
    /// <para/>
    /// This class is intended to be immutable and thread-safe.
    /// <para/>
    /// Lang resources
    /// <para/>
    /// Language guessing rules are typically loaded from resource files. These are UTF-8 encoded text files.
    /// They are systematically named following the pattern:
    /// <c>Lucene.Net.Analysis.Phonetic.Language.Bm.lang.txt</c>
    /// The format of these resources is the following:
    /// <list type="table">
    ///     <item>
    ///         <term>Rules:</term>
    ///         <description>
    ///             Whitespace separated strings.
    ///             There should be 3 columns to each row, and these will be interpreted as:
    ///             <list type="number">
    ///                 <item><term>pattern:</term><description>a regular expression.</description></item>
    ///                 <item><term>languages:</term><description>a '+'-separated list of languages.</description></item>
    ///                 <item><term>acceptOnMatch:</term><description>'true' or 'false' indicating if a match rules in or rules out the language.</description></item>
    ///             </list>
    ///         </description>
    ///     </item>
    ///     <item>
    ///         <term>End-of-line comments:</term>
    ///         <description>Any occurrence of '//' will cause all text following on that line to be discarded as a comment.</description>
    ///     </item>
    ///     <item>
    ///         <term>Multi-line comments:</term>
    ///         <description>Any line starting with '/*' will start multi-line commenting mode. This will skip all content until a line ending in '*' and '/' is found.</description>
    ///     </item>
    ///     <item>
    ///         <term>Blank lines:</term>
    ///         <description>All blank lines will be skipped.</description>
    ///     </item>
    /// </list>
    /// <para/>
    /// Port of lang.php
    /// <para/>
    /// since 1.6
    /// </remarks>
    public class Lang
    {
        // Implementation note: This class is divided into two sections. The first part is a static factory interface that
        // exposes the LANGUAGE_RULES_RN resource as a Lang instance. The second part is the Lang instance methods that
        // encapsulate a particular language-guessing rule table and the language guessing itself.
        //
        // It may make sense in the future to expose the private constructor to allow power users to build custom language-
        // guessing rules, perhaps by marking it protected and allowing sub-classing. However, the vast majority of users
        // should be strongly encouraged to use the static factory instance method to get their Lang instances.

        private static Regex WHITESPACE = new Regex("\\s+", RegexOptions.Compiled);
        private static Regex TOKEN = new Regex("\\+", RegexOptions.Compiled);

        private sealed class LangRule
        {
            internal readonly bool acceptOnMatch;
            internal readonly ISet<string> languages;
            private readonly Regex pattern;

            internal LangRule(Regex pattern, ISet<string> languages, bool acceptOnMatch)
            {
                this.pattern = pattern;
                this.languages = languages;
                this.acceptOnMatch = acceptOnMatch;
            }

            public bool Matches(string txt)
            {
                Match matcher = this.pattern.Match(txt);
                return matcher.Success;
            }
        }

        private static readonly IDictionary<NameType, Lang> langs = new Dictionary<NameType, Lang>();

        private static readonly string LANGUAGE_RULES_RN = "lang.txt";

        static Lang()
        {
            foreach (NameType s in Enum.GetValues(typeof(NameType)))
            {
                langs[s] = LoadFromResource(LANGUAGE_RULES_RN, Languages.GetInstance(s));
            }
        }

        ///
        /// Gets a Lang instance for one of the supported <see cref="NameType"/>s.
        ///
        /// <param name="nameType">The <see cref="NameType"/> to look up.</param>
        /// <returns>A Lang encapsulating the language guessing rules for that name type.</returns>
        public static Lang GetInstance(NameType nameType)
        {
            Lang result;
            langs.TryGetValue(nameType, out result);
            return result;
        }

        ///
        /// Loads language rules from a resource.
        /// <para/>
        /// In normal use, you will obtain instances of Lang through the <see cref="GetInstance(NameType)"/> method.
        /// You will only need to call this yourself if you are developing custom language mapping rules.
        ///
        /// <param name="languageRulesResourceName">The fully-qualified or partially-qualified resource name to load.</param>
        /// <param name="languages">The languages that these rules will support.</param>
        /// <returns>A Lang encapsulating the loaded language-guessing rules.</returns>
        public static Lang LoadFromResource(string languageRulesResourceName, Languages languages)
        {
            IList<LangRule> rules = new List<LangRule>();
            Stream lRulesIS = typeof(Lang).GetTypeInfo().Assembly.FindAndGetManifestResourceStream(typeof(Lang), languageRulesResourceName);

            if (lRulesIS == null)
            {
                throw new InvalidOperationException("Unable to resolve required resource:" + LANGUAGE_RULES_RN);
            }

            using (TextReader reader = new StreamReader(lRulesIS, ResourceConstants.ENCODING))
            {
                bool inExtendedComment = false;
                string rawLine;
                while ((rawLine = reader.ReadLine()) != null)
                {
                    string line = rawLine;
                    if (inExtendedComment)
                    {
                        // check for closing comment marker, otherwise discard doc comment line
                        if (line.EndsWith(ResourceConstants.EXT_CMT_END, StringComparison.Ordinal))
                        {
                            inExtendedComment = false;
                        }
                    }
                    else
                    {
                        if (line.StartsWith(ResourceConstants.EXT_CMT_START, StringComparison.Ordinal))
                        {
                            inExtendedComment = true;
                        }
                        else
                        {
                            // discard comments
                            int cmtI = line.IndexOf(ResourceConstants.CMT);
                            if (cmtI >= 0)
                            {
                                line = line.Substring(0, cmtI - 0);
                            }

                            // trim leading-trailing whitespace
                            line = line.Trim();

                            if (line.Length == 0)
                            {
                                continue; // empty lines can be safely skipped
                            }

                            // split it up
                            string[] parts = WHITESPACE.Split(line).TrimEnd();

                            if (parts.Length != 3)
                            {
                                throw new ArgumentException("Malformed line '" + rawLine +
                                        "' in language resource '" + languageRulesResourceName + "'");
                            }

                            Regex pattern = new Regex(parts[0], RegexOptions.Compiled);
                            string[] langs = TOKEN.Split(parts[1]).TrimEnd();
                            bool accept = parts[2].Equals("true");

                            rules.Add(new LangRule(pattern, new HashSet<string>(langs), accept));
                        }
                    }
                }
            }
            return new Lang(rules, languages);
        }

        private readonly Languages languages;
        private readonly IList<LangRule> rules;

        private Lang(IList<LangRule> rules, Languages languages)
        {
            this.rules = Collections.UnmodifiableList(rules);
            this.languages = languages;
        }

        ///
        /// Guesses the language of a word.
        ///
        /// <param name="text">The word.</param>
        /// <returns>The language that the word originates from or <see cref="Languages.ANY"/> if there was no unique match.</returns>
        public virtual string GuessLanguage(string text)
        {
            LanguageSet ls = GuessLanguages(text);
            return ls.IsSingleton ? ls.GetAny() : Languages.ANY;
        }

        ///
        /// Guesses the languages of a word.
        ///
        /// <param name="input">The word.</param>
        /// <returns>A Set of Strings of language names that are potential matches for the input word.</returns>
        public virtual LanguageSet GuessLanguages(string input)
        {
            string text = input.ToLowerInvariant();

            ISet<string> langs = new HashSet<string>(this.languages.GetLanguages());
            foreach (LangRule rule in this.rules)
            {
                if (rule.Matches(text))
                {
                    if (rule.acceptOnMatch)
                    {
                        List<string> toRemove = new List<string>();
                        foreach (var item in langs)
                        {
                            if (!rule.languages.Contains(item))
                            {
                                toRemove.Add(item);
                            }
                        }
                        foreach (var item in toRemove)
                        {
                            langs.Remove(item);
                        }
                    }
                    else
                    {
                        foreach (var item in rule.languages)
                        {
                            langs.Remove(item);
                        }
                    }
                }
            }

            LanguageSet ls = LanguageSet.From(langs);
            return ls.Equals(Languages.NO_LANGUAGES) ? Languages.ANY_LANGUAGE : ls;
        }
    }
}


text:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

<META http-equiv="Content-Type" content="text/html; charset=utf8">
<TITLE>
org.jgentleframework.core.reflection.metadata Class Hierarchy
</TITLE>

<META NAME="date" CONTENT="2009-08-05">

<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../../stylesheet.css" TITLE="Style">

      Overview
      Package
      Class
      Use
    Tree
      Deprecated
      Index
      Help

 PREV
 NEXT

  FRAMES
 NO FRAMES

  All Classes

Hierarchy For Package org.jgentleframework.core.reflection.metadata

Package Hierarchies:
All Packages

Class Hierarchy

java.lang.Object

org.jgentleframework.core.reflection.metadata.MetaDataFactory
org.jgentleframework.core.reflection.metadata.MetadataImpl (implements org.aopalliance.reflect.Metadata)

org.jgentleframework.core.reflection.metadata.MetadataController (implements org.jgentleframework.core.reflection.metadata.MetadataControl, java.io.Serializable)

org.jgentleframework.core.reflection.metadata.SerializableMetadataControl (implements org.jgentleframework.core.reflection.metadata.SerializableMetadata)

Interface Hierarchy

java.lang.reflect.AnnotatedElement

org.jgentleframework.core.reflection.metadata.Definition (also extends org.jgentleframework.core.reflection.metadata.DefinitionCore, org.aopalliance.reflect.Metadata, java.io.Serializable)

org.aopalliance.reflect.Metadata

org.jgentleframework.core.reflection.metadata.AnnoMeta
org.jgentleframework.core.reflection.metadata.Definition (also extends java.lang.reflect.AnnotatedElement, org.jgentleframework.core.reflection.metadata.DefinitionCore, java.io.Serializable)

org.jgentleframework.core.reflection.metadata.MetadataControl

org.jgentleframework.core.reflection.metadata.DefinitionCore

org.jgentleframework.core.reflection.metadata.Definition (also extends java.lang.reflect.AnnotatedElement, org.aopalliance.reflect.Metadata, java.io.Serializable)

java.io.Serializable

org.jgentleframework.core.reflection.metadata.Definition (also extends java.lang.reflect.AnnotatedElement, org.jgentleframework.core.reflection.metadata.DefinitionCore, org.aopalliance.reflect.Metadata)

org.jgentleframework.core.reflection.metadata.SerializableMetadata
org.jgentleframework.core.reflection.metadata.SetValueOfAnnotation

      Overview
      Package
      Class
      Use
    Tree
      Deprecated
      Index
      Help

 PREV
 NEXT

  FRAMES
 NO FRAMES

  All Classes


text:
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
        <title>W29150_text</title>
        <link rel="stylesheet" type="text/css" href="style.css" />

                «

    <p class="styleSans7.0000<enum PANGO_WEIGHT_NORMAL of type PangoWeight><enum PANGO_STYLE_NORMAL of type PangoStyle>">8/6/2014

    <p class="styleSans9.0000<enum PANGO_WEIGHT_NORMAL of type PangoWeight><enum PANGO_STYLE_NORMAL of type PangoStyle>">GEOLOGIC PROGNOSIS

    <p class="styleSans8.0000<enum PANGO_WEIGHT_NORMAL of type PangoWeight><enum PANGO_STYLE_NORMAL of type PangoStyle>">Well Name: Rig: Prospect: Target: Spacing:

    <p class="styleSans8.0000<enum PANGO_WEIGHT_NORMAL of type PangoWeight><enum PANGO_STYLE_NORMAL of type PangoStyle>">Hart 1-11 H Cyclone 01 Norse
Middle Bakken 1280

    <p class="styleSans6.0000<enum PANGO_WEIGHT_NORMAL of type PangoWeight><enum PANGO_STYLE_NORMAL of type PangoStyle>"> Pre—Sta ked

    <p class="styleSans12000<enum PANGO_WEIGHT_NORMAL of type PangoWeight><enum PANGO_STYLE_NORMAL of type PangoStyle>">

    <p class="styleSans8.0000<enum PANGO_WEIGHT_NORMAL of type PangoWeight><enum PANGO_STYLE_NORMAL of type PangoStyle>">Rig Grade Elevation: KB: RKB:

    <p class="styleSans355.0000<enum PANGO_WEIGHT_NORMAL of type PangoWeight><enum PANGO_STYLE_NORMAL of type PangoStyle>">FORMATION Ewan
Pierre Shale 500 Greenhorn 4,834 Dakota Group (fka Mowry) —2,149 Basal Dakota Sand —2,547 Dunham Salt Top —3,651 Dunham Salt Base —3,723 Pine Salt Top
Pine Salt Base Mlnnekahta
Opeche Salt Top Opeche Salt Base Minnelusa Group
Tyler
Kibby
Top Charles
Base Last Charles Salt Mission Canyon Lodgepole
Upper Bakken Shale Middle Bakken Member Middle Bakken Target End of Lateral

4,157 4,472 4,370 5,974 6,046
Z >
-4,270 6,593
Z >

-4,950 -5,111 -5,267 -5,875 -6,076 -6,722 -7,315 -7,329 -7,357 —7,267
7,273 7,434 7,590 8,198 8,399 9,045 9,638
9,680
2 Z

    <p class="styleSans7.0000<enum PANGO_WEIGHT_NORMAL of type PangoWeight><enum PANGO_STYLE_NORMAL of type PangoStyle>">Hart 1—11H AFE V1

    <p class="styleSans8.0000<enum PANGO_WEIGHT_NORMAL of type PangoWeight><enum PANGO_STYLE_NORMAL of type PangoStyle>">SHL: 160' FSL & Sec. 11 — Williams ,

    <p class="styleSans8.0000<enum PANGO_WEIGHT_NORMAL of type PangoWeight><enum PANGO_STYLE_NORMAL of type PangoStyle>">1980' 158M ND

    <p class="styleSans8.0000<enum PANGO_WEIGHT_NORMAL of type PangoWeight><enum PANGO_STYLE_NORMAL of type PangoStyle>">FEL 96W

    <p class="styleSans8.0000<enum PANGO_WEIGHT_NORMAL of type PangoWeight><enum PANGO_STYLE_NORMAL of type PangoStyle>">BHL: 200' FNL & Sec. 2 ~ Williams ,

    <p class="styleSans8.0000<enum PANGO_WEIGHT_NORMAL of type PangoWeight><enum PANGO_STYLE_NORMAL of type PangoStyle>">1980' 158N ND

    <p class="styleSans8.0000<enum PANGO_WEIGHT_NORMAL of type PangoWeight><enum PANGO_STYLE_NORMAL of type PangoStyle>">FEL 96W

    <p class="styleSans8.0000<enum PANGO_WEIGHT_NORMAL of type PangoWeight><enum PANGO_STYLE_NORMAL of type PangoStyle>">2306' 17' 2323'


text:
import React from "react";
import ReactCSSTransitionGroup from 'react-addons-css-transition-group'
import jsonFormat from 'json-format';
import Highlight from 'react-highlight';
import ReactMarkdown from 'react-markdown';

/**
 * Main React application entry-point for both the server and client.
 */
export default class Doc extends React.Component {
  render() {
    let pathDefinition = this.props.api.getPath(this.props.endpoint);
    return (
      <ReactCSSTransitionGroup transitionName="fade" transitionEnterTimeout={250} transitionLeaveTimeout={150} transitionAppearTimeout={150} transitionAppear={true}>
        {this.props.api.getFullPath(this.props.endpoint) ?
          <SwaggerDoc api={this.props.api} path={this.props.endpoint} key={this.props.endpoint} definition={pathDefinition} /> :
          <NoDoc api={this.props.api} />}
      </ReactCSSTransitionGroup>
    );
  }
}

class SwaggerDoc extends React.Component {
  render() {
    return (

{this.props.api.getFullPath(this.props.path) || "Home"}

         {this.props.definition.getMethods().map(method => <Method api={this.props.api} key={method} path={this.props.path} method={this.props.definition.getMethod(method)} />)}

Raw Swagger Definition

         <Highlight className='json'>{jsonFormat(this.props.definition, {  type: 'space', size: 2})}</Highlight>

    )
  }
}

// Displayed if the route is not known
class NoDoc extends React.Component {

  render() {
    return (

{this.props.api.getTitle()} Documentation

        <ReactMarkdown source={this.props.api.getDescription()} />

    )
  }

}

class Method extends React.Component {
  render() {
    return (

{this.props.method.method}

{this.props.api.getFullUrl(this.props.path)}

{this.props.method.getSummary()}

        <ReactMarkdown source={this.props.method.getDescription()} />

Endpoint Information

          <OptionalRow left="Request formats" data={this.props.method.definition.consumes} />
          <OptionalRow left="Response formats" data={this.props.method.definition.produces} />

Parameters

          {this.props.method.getParameters().map(parameter => {
            return (
              <ParameterRow parameter={parameter} key={parameter.parameter.name} />
            );
          })}

Responses

          {this.props.method.getResponses().map(code => {
            let response = this.props.method.getResponse(code);
            return (
              <ResponseRow response={response} key={code} />
            );
          })}

    )
  }
}

class ParameterRow extends React.Component {
  render() {
    return (

        {this.props.parameter.parameter.name}
        <ReactMarkdown source={this.props.parameter.getDescription()} />

    )
  }
}

class ResponseRow extends React.Component {
  render() {
    return (

        {this.props.response.code}
        <ReactMarkdown source={this.props.response._.getDescription()} />

    )
  }
}

class OptionalRow extends React.Component {
  render() {
    return (
      this.props.data ?

{this.props.left}	{(this.props.right || this.props.data).join(', ')}
 :

    );
  }
}


text:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<eventBusBridgeRequest>
    <address>${address}</address>
    <messageType>${messageType}</messageType>
    <message>${message}</message>
</eventBusBridgeRequest>


text:
<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;

class CreateAddressesTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('addresses', function (Blueprint $table) {
            $table->string('id', 45)->primary();
            $table->string('user_id', 45);
            $table->string('full_name', 150);
            $table->string('address', 300);
            $table->string('city', 20)->nullable();
            $table->string('postal_code', 10)->nullable();
            $table->string('phone', 15)->nullable();
            $table->boolean('is_emergency')->default(false);
            $table->string('note', 200);
            $table->string('created_by')->nullable();
            $table->string('updated_by')->nullable();
            $table->timestamps();
        });

        Schema::table('addresses', function (Blueprint $table) {
            $table->foreign('user_id')->references('id')->on('users')->onDelete('cascade');
            $table->foreign('created_by')->references('id')->on('users');
            $table->foreign('updated_by')->references('id')->on('users');
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::drop('addresses');
    }
}


text:
"""
A test of the AverageWeightings kernel used for the Averager.
"""

from firedrake import (IntervalMesh, Function, RectangleMesh,
                       VectorFunctionSpace, SpatialCoordinate)

from gusto.recovery.recovery_kernels import AverageWeightings
import numpy as np
import pytest

@pytest.fixture
def mesh(geometry):

    L = 3.0
    n = 3

    if geometry == "1D":
        m = IntervalMesh(n, L)
    elif geometry == "2D":
        m = RectangleMesh(n, n, L, L, quadrilateral=True)

    return m

def setup_values(geometry, true_field):

    # The true values can be determined by the number of elements
    # that the DoF is shared between.

    x = SpatialCoordinate(true_field.function_space().mesh())
    coords_CG1 = Function(true_field.function_space()).interpolate(x)

    if geometry == "1D":
        # List coords of DoFs
        edge_coords = [0.0, 3.0]
        internal_coords = [1.0, 2.0]

        for coord in edge_coords:
            set_val_at_point(coords_CG1, coord, true_field, 1.0)
        for coord in internal_coords:
            set_val_at_point(coords_CG1, coord, true_field, 2.0)

    elif geometry == "2D":

        # List coords of DoFs
        corner_coords = [[0.0, 0.0], [0.0, 3.0], [3.0, 0.0], [3.0, 3.0]]
        edge_coords = [[0.0, 1.0], [0.0, 2.0], [3.0, 1.0], [3.0, 2.0],
                       [1.0, 0.0], [2.0, 0.0], [1.0, 3.0], [2.0, 3.0]]
        internal_coords = [[1.0, 1.0], [1.0, 2.0], [2.0, 1.0], [2.0, 2.0]]

        for coord in corner_coords:
            set_val_at_point(coords_CG1, coord, true_field, 1.0)
        for coord in edge_coords:
            set_val_at_point(coords_CG1, coord, true_field, 2.0)
        for coord in internal_coords:
            set_val_at_point(coords_CG1, coord, true_field, 4.0)

    return true_field

def set_val_at_point(coord_field, coords, field=None, new_value=None):
    """
    Finds the DoF of a field at a particular coordinate. If new_value is
    provided then it also assigns the coefficient for the field there to be
    new_value. Otherwise the DoF index is returned.
    """
    num_points = len(coord_field.dat.data[:])
    point_found = False

    for i in range(num_points):
        # Do the coordinates at the ith point match our desired coords?
        if np.allclose(coord_field.dat.data[i], coords, rtol=1e-14):
            point_found = True
            point_index = i
            if field is not None and new_value is not None:
                field.dat.data[i] = new_value
            break

    if not point_found:
        raise ValueError('Your coordinates do not appear to match the coordinates of a DoF')

    if field is None or new_value is None:
        return point_index

@pytest.mark.parametrize("geometry", ["1D", "2D"])
def test_average(geometry, mesh):

    vec_CG1 = VectorFunctionSpace(mesh, "CG", 1)

    # We will fill DG_field with values, and average them to CG_field
    weights = Function(vec_CG1)
    true_values = Function(vec_CG1)

    true_values = setup_values(geometry, true_values)

    kernel = AverageWeightings(vec_CG1)
    kernel.apply(weights)

    tolerance = 1e-12
    if geometry == "1D":
        for i, (weight, true) in enumerate(zip(weights.dat.data[:], true_values.dat.data[:])):
            assert abs(weight - true) < tolerance, "Weight not correct at position %i" % i
    elif geometry == "2D":
        for i, (weight, true) in enumerate(zip(weights.dat.data[:], true_values.dat.data[:])):
            for weight_j, true_j in zip(weight, true):
                assert abs(weight_j - true_j) < tolerance, "Weight not correct at position %i" % i


text:
@class IDCDocument;

typedef enum {
    kIDCDocTypeUnknown = 0,
    kIDCDocTypeDomesticIdCardOrGreencard,
    kIDCDocTypeIDCard105x74,
    kIDCDocTypeIDCardCreditCard,
    kIDCDocTypePassport,
    kIDCDocTypeDriversLicense,
    kIDCDocType2DBarcode,
    kIDCDocTypeCount
}IDCDocType;

typedef enum
{
    kIDCGenderTypeUnknown,
    kIDCGenderTypeMale,
    kIDCGenderTypeFemale,
}IDCGenderType;

typedef enum
{
    kIDCQualityTypeLow,
    kIDCQualityTypeMedium,
    kIDCQualityTypeHigh
}IDCQualityType;

typedef void (^IDCDocumentProcessedBlock)(IDCDocument *);


text:
package com.google.cloud.accessapproval.v1.samples;

// [START accessapproval_v1_generated_AccessApproval_GetAccessApprovalServiceAccount_async]
import com.google.api.core.ApiFuture;
import com.google.cloud.accessapproval.v1.AccessApprovalAdminClient;
import com.google.cloud.accessapproval.v1.AccessApprovalServiceAccount;
import com.google.cloud.accessapproval.v1.GetAccessApprovalServiceAccountMessage;

public class AsyncGetAccessApprovalServiceAccount {

  public static void main(String[] args) throws Exception {
    asyncGetAccessApprovalServiceAccount();
  }

  public static void asyncGetAccessApprovalServiceAccount() throws Exception {
    // This snippet has been automatically generated and should be regarded as a code template only.
    // It will require modifications to work:
    // - It may require correct/in-range values for request initialization.
    // - It may require specifying regional endpoints when creating the service client as shown in
    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    try (AccessApprovalAdminClient accessApprovalAdminClient = AccessApprovalAdminClient.create()) {
      GetAccessApprovalServiceAccountMessage request =
          GetAccessApprovalServiceAccountMessage.newBuilder().setName("name3373707").build();
      ApiFuture<AccessApprovalServiceAccount> future =
          accessApprovalAdminClient.getAccessApprovalServiceAccountCallable().futureCall(request);
      // Do something.
      AccessApprovalServiceAccount response = future.get();
    }
  }
}
// [END accessapproval_v1_generated_AccessApproval_GetAccessApprovalServiceAccount_async]


text:
require File.expand_path(File.dirname(__FILE__) + '/../spec_helper')

describe ForgotPasswordController do
  describe "POST 'create'" do
    it "redirects to show with a flash message if the user does not exist" do
      User.should_receive(:find_by_login).with('test_login').and_return(nil)

      post 'create', :login => 'test_login'

      response.should redirect_to(forgot_password_path)
      flash[:warning].should =~ /does not exist/i
    end

    it "redirects to show with a flash message if the user is not provided" do
      User.should_receive(:find_by_login).with('').and_return(nil)

      post 'create', :login => ''

      response.should redirect_to(forgot_password_path)
      flash[:warning].should =~ /please provide a username to continue/i
    end

    it "sends a password reset email to the user represented by the login" do
      user = mock(User)
      user.should_receive(:reset_perishable_token!)

      User.should_receive(:find_by_login).with('test_user').and_return(user)
      UserMailer.should_receive(:deliver_forgot_password).with(user)

      post 'create', :login => 'test_user'
    end
  end

  describe "GET 'show'" do
    it "is successful" do
      get 'show'
      response.should be_success
    end
  end
end


text:
<?php
namespace Concrete\Core\Support\Facade;

class Cookie extends Facade
{
    public static function getFacadeAccessor()
    {
        return 'cookie';
    }
}


text:
package config

import (
	"fmt"
	"gopkg.in/yaml.v2"
	"io/ioutil"
	"os"
	"path/filepath"
)

type Authentication struct {
	APIKey string `yaml:"apikey"`
}
type Defaluts struct {
	Region string `yaml:"region"`
	Image  string `yaml:"image"`
	Size   string `yaml:"size"`
	Key    string `yaml:"key"`
}

type Config struct {
	Authentication Authentication `yaml:"authentication"`
	Defaluts       Defaluts       `yaml:"defaluts"`
}

const (
	defaultDirectory  = ".go-tugboat"
	defaultConfigName = "config.yaml"
)

func GetDefaultDirectory() string {
	return defaultDirectory
}
func GetDefaultConfigName() string {
	return defaultConfigName
}

func GetConfigPath() (string, error) {
	home := os.Getenv("HOME")
	if home == "" {
		return "", fmt.Errorf("Error Getenv $HOME not found")
	}

	return filepath.Join(home, defaultDirectory, defaultConfigName), nil
}

func LoadConfig(path string) (*Config, error) {
	d, err := ioutil.ReadFile(path)
	if err != nil {
		return nil, fmt.Errorf("Error reading %s: %s", path, err)
	}

	config := Config{}

	err = yaml.Unmarshal(d, &config)
	if err != nil {
		return nil, fmt.Errorf("Error yaml.Unmarshal %s: %s", path, err)
	}

	return &config, nil
}

func SaveConfig(path string, config *Config) error {
	data, err := yaml.Marshal(config)
	if err != nil {
		return fmt.Errorf("Error yaml.Marshal  %s", err)
	}

	err = ioutil.WriteFile(path, data, 0644)

	if err != nil {
		return fmt.Errorf("Error yaml.Marshal  %s", err)
	}

	return nil
}


text:
dir = File.expand_path(File.dirname(__FILE__))
$LOAD_PATH.unshift File.join(dir, 'lib')

# Don't want puppet getting the command line arguments for rake or autotest
ARGV.clear

require 'rubygems'
require 'bundler/setup'

Bundler.require :default, :test

require 'pathname'
require 'tmpdir'

Pathname.glob("#{dir}/shared_behaviours/**/*.rb") do |behaviour|
  require behaviour.relative_path_from(Pathname.new(dir))
end

RSpec.configure do |config|
  config.mock_with :mocha
end


text:
package org.pentaho.di.trans.steps;

import org.junit.Assert;
import org.junit.Test;
import org.pentaho.metaverse.api.analyzer.kettle.step.IClonableStepAnalyzer;

public abstract class ClonableStepAnalyzerTest {

  protected abstract IClonableStepAnalyzer newInstance();

  @Test
  public void testCloneAnalyzer() {
    final IClonableStepAnalyzer analyzer = newInstance();
    // verify that cloneAnalyzer returns an instance that is different from the original
    Assert.assertNotEquals( analyzer, analyzer.cloneAnalyzer() );

  }
}