text:
/*
 * Do not modify this file. This file is generated from the lambda-2015-03-31.normal.json service model.
 */

using System;
using System.Collections.Generic;

using Amazon.Lambda.Model;

namespace Amazon.Lambda
{
    ///
    /// Interface for accessing Lambda
    ///
    /// AWS Lambda
    /// <para>
    /// Overview
    /// </para>
    ///
    /// <para>
    /// This is the AWS Lambda API Reference. The AWS Lambda Developer Guide provides
    /// additional information. For the service overview, go to What
    /// is AWS Lambda, and for information about how the service works, go to AWS
    /// Lambda: How it Works in the AWS Lambda Developer Guide.
    /// </para>
    ///
    public partial interface IAmazonLambda : IDisposable
    {

        #region  AddPermission

        ///
        /// Adds a permission to the access policy associated with the specified AWS Lambda function.
        /// In a "push event" model, the access policy attached to the Lambda function grants
        /// Amazon S3 or a user application permission for the Lambda lambda:Invoke
        /// action. For information about the push model, see AWS
        /// Lambda: How it Works. Each Lambda function has one access policy associated with
        /// it. You can use the AddPermission API to add a permission to the policy.
        /// You have one access policy but it can have multiple permission statements.
        ///
        ///
        /// <para>
        /// This operation requires permission for the lambda:AddPermission action.
        /// </para>
        ///
        /// <param name="request">Container for the necessary parameters to execute the AddPermission service method.</param>
        ///
        /// <returns>The response from the AddPermission service method, as returned by Lambda.</returns>
        /// <exception cref="Amazon.Lambda.Model.InvalidParameterValueException">
        /// One of the parameters in the request is invalid. For example, if you provided an IAM
        /// role for AWS Lambda to assume in the CreateFunction or the UpdateFunctionConfiguration
        /// API, that AWS Lambda is unable to assume you will get this exception.
        /// </exception>
        /// <exception cref="Amazon.Lambda.Model.PolicyLengthExceededException">
        /// Lambda function access policy is limited to 20 KB.
        /// </exception>
        /// <exception cref="Amazon.Lambda.Model.ResourceConflictException">
        /// The resource already exists.
        /// </exception>
        /// <exception cref="Amazon.Lambda.Model.ResourceNotFoundException">
        /// The resource (for example, a Lambda function or access policy statement) specified
        /// in the request does not exist.
        /// </exception>
        /// <exception cref="Amazon.Lambda.Model.ServiceException">
        /// The AWS Lambda service encountered an internal error.
        /// </exception>
        /// <exception cref="Amazon.Lambda.Model.TooManyRequestsException">
        ///
        /// </exception>
        AddPermissionResponse AddPermission(AddPermissionRequest request);

        ///
        /// Initiates the asynchronous execution of the AddPermission operation.
        ///
        ///
        /// <param name="request">Container for the necessary parameters to execute the AddPermission operation on AmazonLambdaClient.</param>
        /// <param name="callback">An AsyncCallback delegate that is invoked when the operation completes.</param>
        /// <param name="state">A user-defined state object that is passed to the callback procedure. Retrieve this object from within the callback
        ///          procedure using the AsyncState property.</param>
        ///
        /// <returns>An IAsyncResult that can be used to poll or wait for results, or both; this value is also needed when invoking EndAddPermission
        ///         operation.</returns>
        IAsyncResult BeginAddPermission(AddPermissionRequest request, AsyncCallback callback, object state);

        ///
        /// Finishes the asynchronous execution of the  AddPermission operation.
        ///
        ///
        /// <param name="asyncResult">The IAsyncResult returned by the call to BeginAddPermission.</param>
        ///
        /// <returns>Returns a  AddPermissionResult from Lambda.</returns>
        AddPermissionResponse EndAddPermission(IAsyncResult asyncResult);

        #endregion

        #region  CreateEventSourceMapping

        ///
        /// Identifies a stream as an event source for a Lambda function. It can be either an
        /// Amazon Kinesis stream or an Amazon DynamoDB stream. AWS Lambda invokes the specified
        /// function when records are posted to the stream.
        ///
        ///
        /// <para>
        /// This is the pull model, where AWS Lambda invokes the function. For more information,
        /// go to AWS
        /// Lambda: How it Works in the AWS Lambda Developer Guide.
        /// </para>
        ///
        /// <para>
        /// This association between an Amazon Kinesis stream and a Lambda function is called
        /// the event source mapping. You provide the configuration information (for example,
        /// which stream to read from and which Lambda function to invoke) for the event source
        /// mapping in the request body.
        /// </para>
        ///
        /// <para>
        ///  Each event source, such as an Amazon Kinesis or a DynamoDB stream, can be associated
        /// with multiple AWS Lambda function. A given Lambda function can be associated with
        /// multiple AWS event sources.
        /// </para>
        ///
        /// <para>
        /// This operation requires permission for the lambda:CreateEventSourceMapping
        /// action.
        /// </para>
        ///
        /// <param name="request">Container for the necessary parameters to execute the CreateEventSourceMapping service method.</param>
        ///
        /// <returns>The response from the CreateEventSourceMapping service method, as returned by Lambda.</returns>
        /// <exception cref="Amazon.Lambda.Model.InvalidParameterValueException">
        /// One of the parameters in the request is invalid. For example, if you provided an IAM
        /// role for AWS Lambda to assume in the CreateFunction or the UpdateFunctionConfiguration
        /// API, that AWS Lambda is unable to assume you will get this exception.
        /// </exception>
        /// <exception cref="Amazon.Lambda.Model.ResourceConflictException">
        /// The resource already exists.
        /// </exception>
        /// <exception cref="Amazon.Lambda.Model.ServiceException">
        /// The AWS Lambda service encountered an internal error.
        /// </exception>
        /// <exception cref="Amazon.Lambda.Model.TooManyRequestsException">
        ///
        /// </exception>
        CreateEventSourceMappingResponse CreateEventSourceMapping(CreateEventSourceMappingRequest request);

        ///
        /// Initiates the asynchronous execution of the CreateEventSourceMapping operation.
        ///
        ///
        /// <param name="request">Container for the necessary parameters to execute the CreateEventSourceMapping operation on AmazonLambdaClient.</param>
        /// <param name="callback">An AsyncCallback delegate that is invoked when the operation completes.</param>
        /// <param name="state">A user-defined state object that is passed to the callback procedure. Retrieve this object from within the callback
        ///          procedure using the AsyncState property.</param>
        ///
        /// <returns>An IAsyncResult that can be used to poll or wait for results, or both; this value is also needed when invoking EndCreateEventSourceMapping
        ///         operation.</returns>
        IAsyncResult BeginCreateEventSourceMapping(CreateEventSourceMappingRequest request, AsyncCallback callback, object state);

        ///
        /// Finishes the asynchronous execution of the  CreateEventSourceMapping operation.
        ///
        ///
        /// <param name="asyncResult">The IAsyncResult returned by the call to BeginCreateEventSourceMapping.</param>
        ///
        /// <returns>Returns a  CreateEventSourceMappingResult from Lambda.</returns>
        CreateEventSourceMappingResponse EndCreateEventSourceMapping(IAsyncResult asyncResult);

        #endregion

        #region  CreateFunction

        ///
        /// Creates a new Lambda function. The function metadata is created from the request parameters,
        /// and the code for the function is provided by a .zip file in the request body. If the
        /// function name already exists, the operation will fail. Note that the function name
        /// is case-sensitive.
        ///
        ///
        /// <para>
        /// This operation requires permission for the lambda:CreateFunction action.
        /// </para>
        ///
        /// <param name="request">Container for the necessary parameters to execute the CreateFunction service method.</param>
        ///
        /// <returns>The response from the CreateFunction service method, as returned by Lambda.</returns>
        /// <exception cref="Amazon.Lambda.Model.CodeStorageExceededException">
        ///
        /// </exception>
        /// <exception cref="Amazon.Lambda.Model.InvalidParameterValueException">
        /// One of the parameters in the request is invalid. For example, if you provided an IAM
        /// role for AWS Lambda to assume in the CreateFunction or the UpdateFunctionConfiguration
        /// API, that AWS Lambda is unable to assume you will get this exception.
        /// </exception>
        /// <exception cref="Amazon.Lambda.Model.ResourceConflictException">
        /// The resource already exists.
        /// </exception>
        /// <exception cref="Amazon.Lambda.Model.ResourceNotFoundException">
        /// The resource (for example, a Lambda function or access policy statement) specified
        /// in the request does not exist.
        /// </exception>
        /// <exception cref="Amazon.Lambda.Model.ServiceException">
        /// The AWS Lambda service encountered an internal error.
        /// </exception>
        /// <exception cref="Amazon.Lambda.Model.TooManyRequestsException">
        ///
        /// </exception>
        CreateFunctionResponse CreateFunction(CreateFunctionRequest request);

        ///
        /// Initiates the asynchronous execution of the CreateFunction operation.
        ///
        ///
        /// <param name="request">Container for the necessary parameters to execute the CreateFunction operation on AmazonLambdaClient.</param>
        /// <param name="callback">An AsyncCallback delegate that is invoked when the operation completes.</param>
        /// <param name="state">A user-defined state object that is passed to the callback procedure. Retrieve this object from within the callback
        ///          procedure using the AsyncState property.</param>
        ///
        /// <returns>An IAsyncResult that can be used to poll or wait for results, or both; this value is also needed when invoking EndCreateFunction
        ///         operation.</returns>
        IAsyncResult BeginCreateFunction(CreateFunctionRequest request, AsyncCallback callback, object state);

        ///
        /// Finishes the asynchronous execution of the  CreateFunction operation.
        ///
        ///
        /// <param name="asyncResult">The IAsyncResult returned by the call to BeginCreateFunction.</param>
        ///
        /// <returns>Returns a  CreateFunctionResult from Lambda.</returns>
        CreateFunctionResponse EndCreateFunction(IAsyncResult asyncResult);

        #endregion

        #region  DeleteEventSourceMapping

        ///
        /// Removes an event source mapping. This means AWS Lambda will no longer invoke the function
        /// for events in the associated source.
        ///
        ///
        /// <para>
        /// This operation requires permission for the lambda:DeleteEventSourceMapping
        /// action.
        /// </para>
        ///
        /// <param name="request">Container for the necessary parameters to execute the DeleteEventSourceMapping service method.</param>
        ///
        /// <returns>The response from the DeleteEventSourceMapping service method, as returned by Lambda.</returns>
        /// <exception cref="Amazon.Lambda.Model.InvalidParameterValueException">
        /// One of the parameters in the request is invalid. For example, if you provided an IAM
        /// role for AWS Lambda to assume in the CreateFunction or the UpdateFunctionConfiguration
        /// API, that AWS Lambda is unable to assume you will get this exception.
        /// </exception>
        /// <exception cref="Amazon.Lambda.Model.ResourceNotFoundException">
        /// The resource (for example, a Lambda function or access policy statement) specified
        /// in the request does not exist.
        /// </exception>
        /// <exception cref="Amazon.Lambda.Model.ServiceException">
        /// The AWS Lambda service encountered an internal error.
        /// </exception>
        /// <exception cref="Amazon.Lambda.Model.TooManyRequestsException">
        ///
        /// </exception>
        DeleteEventSourceMappingResponse DeleteEventSourceMapping(DeleteEventSourceMappingRequest request);

        ///
        /// Initiates the asynchronous execution of the DeleteEventSourceMapping operation.
        ///
        ///
        /// <param name="request">Container for the necessary parameters to execute the DeleteEventSourceMapping operation on AmazonLambdaClient.</param>
        /// <param name="callback">An AsyncCallback delegate that is invoked when the operation completes.</param>
        /// <param name="state">A user-defined state object that is passed to the callback procedure. Retrieve this object from within the callback
        ///          procedure using the AsyncState property.</param>
        ///
        /// <returns>An IAsyncResult that can be used to poll or wait for results, or both; this value is also needed when invoking EndDeleteEventSourceMapping
        ///         operation.</returns>
        IAsyncResult BeginDeleteEventSourceMapping(DeleteEventSourceMappingRequest request, AsyncCallback callback, object state);

        ///
        /// Finishes the asynchronous execution of the  DeleteEventSourceMapping operation.
        ///
        ///
        /// <param name="asyncResult">The IAsyncResult returned by the call to BeginDeleteEventSourceMapping.</param>
        ///
        /// <returns>Returns a  DeleteEventSourceMappingResult from Lambda.</returns>
        DeleteEventSourceMappingResponse EndDeleteEventSourceMapping(IAsyncResult asyncResult);

        #endregion

        #region  DeleteFunction

        ///
        /// Deletes the specified Lambda function code and configuration.
        ///
        ///
        /// <para>
        /// When you delete a function the associated access policy is also deleted. You will
        /// need to delete the event source mappings explicitly.
        /// </para>
        ///
        /// <para>
        /// This operation requires permission for the lambda:DeleteFunction action.
        /// </para>
        ///
        /// <param name="functionName">The Lambda function to delete.  You can specify an unqualified function name (for example, "Thumbnail") or you can specify Amazon Resource Name (ARN) of the function (for example, "arn:aws:lambda:us-west-2:account-id:function:ThumbNail"). AWS Lambda also allows you to specify only the account ID qualifier (for example, "account-id:Thumbnail"). Note that the length constraint applies only to the ARN. If you specify only the function name, it is limited to 64 character in length. </param>
        ///
        /// <returns>The response from the DeleteFunction service method, as returned by Lambda.</returns>
        /// <exception cref="Amazon.Lambda.Model.ResourceNotFoundException">
        /// The resource (for example, a Lambda function or access policy statement) specified
        /// in the request does not exist.
        /// </exception>
        /// <exception cref="Amazon.Lambda.Model.ServiceException">
        /// The AWS Lambda service encountered an internal error.
        /// </exception>
        /// <exception cref="Amazon.Lambda.Model.TooManyRequestsException">
        ///
        /// </exception>
        DeleteFunctionResponse DeleteFunction(string functionName);

        ///
        /// Deletes the specified Lambda function code and configuration.
        ///
        ///
        /// <para>
        /// When you delete a function the associated access policy is also deleted. You will
        /// need to delete the event source mappings explicitly.
        /// </para>
        ///
        /// <para>
        /// This operation requires permission for the lambda:DeleteFunction action.
        /// </para>
        ///
        /// <param name="request">Container for the necessary parameters to execute the DeleteFunction service method.</param>
        ///
        /// <returns>The response from the DeleteFunction service method, as returned by Lambda.</returns>
        /// <exception cref="Amazon.Lambda.Model.ResourceNotFoundException">
        /// The resource (for example, a Lambda function or access policy statement) specified
        /// in the request does not exist.
        /// </exception>
        /// <exception cref="Amazon.Lambda.Model.ServiceException">
        /// The AWS Lambda service encountered an internal error.
        /// </exception>
        /// <exception cref="Amazon.Lambda.Model.TooManyRequestsException">
        ///
        /// </exception>
        DeleteFunctionResponse DeleteFunction(DeleteFunctionRequest request);

        ///
        /// Initiates the asynchronous execution of the DeleteFunction operation.
        ///
        ///
        /// <param name="request">Container for the necessary parameters to execute the DeleteFunction operation on AmazonLambdaClient.</param>
        /// <param name="callback">An AsyncCallback delegate that is invoked when the operation completes.</param>
        /// <param name="state">A user-defined state object that is passed to the callback procedure. Retrieve this object from within the callback
        ///          procedure using the AsyncState property.</param>
        ///
        /// <returns>An IAsyncResult that can be used to poll or wait for results, or both; this value is also needed when invoking EndDeleteFunction
        ///         operation.</returns>
        IAsyncResult BeginDeleteFunction(DeleteFunctionRequest request, AsyncCallback callback, object state);

        ///
        /// Finishes the asynchronous execution of the  DeleteFunction operation.
        ///
        ///
        /// <param name="asyncResult">The IAsyncResult returned by the call to BeginDeleteFunction.</param>
        ///
        /// <returns>Returns a  DeleteFunctionResult from Lambda.</returns>
        DeleteFunctionResponse EndDeleteFunction(IAsyncResult asyncResult);

        #endregion

        #region  GetEventSourceMapping

        ///
        /// Returns configuration information for the specified event source mapping (see CreateEventSourceMapping).
        ///
        ///
        /// <para>
        /// This operation requires permission for the lambda:GetEventSourceMapping
        /// action.
        /// </para>
        ///
        /// <param name="request">Container for the necessary parameters to execute the GetEventSourceMapping service method.</param>
        ///
        /// <returns>The response from the GetEventSourceMapping service method, as returned by Lambda.</returns>
        /// <exception cref="Amazon.Lambda.Model.InvalidParameterValueException">
        /// One of the parameters in the request is invalid. For example, if you provided an IAM
        /// role for AWS Lambda to assume in the CreateFunction or the UpdateFunctionConfiguration
        /// API, that AWS Lambda is unable to assume you will get this exception.
        /// </exception>
        /// <exception cref="Amazon.Lambda.Model.ResourceNotFoundException">
        /// The resource (for example, a Lambda function or access policy statement) specified
        /// in the request does not exist.
        /// </exception>
        /// <exception cref="Amazon.Lambda.Model.ServiceException">
        /// The AWS Lambda service encountered an internal error.
        /// </exception>
        /// <exception cref="Amazon.Lambda.Model.TooManyRequestsException">
        ///
        /// </exception>
        GetEventSourceMappingResponse GetEventSourceMapping(GetEventSourceMappingRequest request);

        ///
        /// Initiates the asynchronous execution of the GetEventSourceMapping operation.
        ///
        ///
        /// <param name="request">Container for the necessary parameters to execute the GetEventSourceMapping operation on AmazonLambdaClient.</param>
        /// <param name="callback">An AsyncCallback delegate that is invoked when the operation completes.</param>
        /// <param name="state">A user-defined state object that is passed to the callback procedure. Retrieve this object from within the callback
        ///          procedure using the AsyncState property.</param>
        ///
        /// <returns>An IAsyncResult that can be used to poll or wait for results, or both; this value is also needed when invoking EndGetEventSourceMapping
        ///         operation.</returns>
        IAsyncResult BeginGetEventSourceMapping(GetEventSourceMappingRequest request, AsyncCallback callback, object state);

        ///
        /// Finishes the asynchronous execution of the  GetEventSourceMapping operation.
        ///
        ///
        /// <param name="asyncResult">The IAsyncResult returned by the call to BeginGetEventSourceMapping.</param>
        ///
        /// <returns>Returns a  GetEventSourceMappingResult from Lambda.</returns>
        GetEventSourceMappingResponse EndGetEventSourceMapping(IAsyncResult asyncResult);

        #endregion

        #region  GetFunction

        ///
        /// Returns the configuration information of the Lambda function and a presigned URL link
        /// to the .zip file you uploaded with CreateFunction so you can download the .zip
        /// file. Note that the URL is valid for up to 10 minutes. The configuration information
        /// is the same information you provided as parameters when uploading the function.
        ///
        ///
        /// <para>
        /// This operation requires permission for the lambda:GetFunction action.
        /// </para>
        ///
        /// <param name="functionName">The Lambda function name.   You can specify an unqualified function name (for example, "Thumbnail") or you can specify Amazon Resource Name (ARN) of the function (for example, "arn:aws:lambda:us-west-2:account-id:function:ThumbNail"). AWS Lambda also allows you to specify only the account ID qualifier (for example, "account-id:Thumbnail"). Note that the length constraint applies only to the ARN. If you specify only the function name, it is limited to 64 character in length. </param>
        ///
        /// <returns>The response from the GetFunction service method, as returned by Lambda.</returns>
        /// <exception cref="Amazon.Lambda.Model.ResourceNotFoundException">
        /// The resource (for example, a Lambda function or access policy statement) specified
        /// in the request does not exist.
        /// </exception>
        /// <exception cref="Amazon.Lambda.Model.ServiceException">
        /// The AWS Lambda service encountered an internal error.
        /// </exception>
        /// <exception cref="Amazon.Lambda.Model.TooManyRequestsException">
        ///
        /// </exception>
        GetFunctionResponse GetFunction(string functionName);

        ///
        /// Returns the configuration information of the Lambda function and a presigned URL link
        /// to the .zip file you uploaded with CreateFunction so you can download the .zip
        /// file. Note that the URL is valid for up to 10 minutes. The configuration information
        /// is the same information you provided as parameters when uploading the function.
        ///
        ///
        /// <para>
        /// This operation requires permission for the lambda:GetFunction action.
        /// </para>
        ///
        /// <param name="request">Container for the necessary parameters to execute the GetFunction service method.</param>
        ///
        /// <returns>The response from the GetFunction service method, as returned by Lambda.</returns>
        /// <exception cref="Amazon.Lambda.Model.ResourceNotFoundException">
        /// The resource (for example, a Lambda function or access policy statement) specified
        /// in the request does not exist.
        /// </exception>
        /// <exception cref="Amazon.Lambda.Model.ServiceException">
        /// The AWS Lambda service encountered an internal error.
        /// </exception>
        /// <exception cref="Amazon.Lambda.Model.TooManyRequestsException">
        ///
        /// </exception>
        GetFunctionResponse GetFunction(GetFunctionRequest request);

        ///
        /// Initiates the asynchronous execution of the GetFunction operation.
        ///
        ///
        /// <param name="request">Container for the necessary parameters to execute the GetFunction operation on AmazonLambdaClient.</param>
        /// <param name="callback">An AsyncCallback delegate that is invoked when the operation completes.</param>
        /// <param name="state">A user-defined state object that is passed to the callback procedure. Retrieve this object from within the callback
        ///          procedure using the AsyncState property.</param>
        ///
        /// <returns>An IAsyncResult that can be used to poll or wait for results, or both; this value is also needed when invoking EndGetFunction
        ///         operation.</returns>
        IAsyncResult BeginGetFunction(GetFunctionRequest request, AsyncCallback callback, object state);

        ///
        /// Finishes the asynchronous execution of the  GetFunction operation.
        ///
        ///
        /// <param name="asyncResult">The IAsyncResult returned by the call to BeginGetFunction.</param>
        ///
        /// <returns>Returns a  GetFunctionResult from Lambda.</returns>
        GetFunctionResponse EndGetFunction(IAsyncResult asyncResult);

        #endregion

        #region  GetFunctionConfiguration

        ///
        /// Returns the configuration information of the Lambda function. This the same information
        /// you provided as parameters when uploading the function by using CreateFunction.
        ///
        ///
        /// <para>
        /// This operation requires permission for the lambda:GetFunctionConfiguration
        /// operation.
        /// </para>
        ///
        /// <param name="functionName">The name of the Lambda function for which you want to retrieve the configuration information.  You can specify an unqualified function name (for example, "Thumbnail") or you can specify Amazon Resource Name (ARN) of the function (for example, "arn:aws:lambda:us-west-2:account-id:function:ThumbNail"). AWS Lambda also allows you to specify only the account ID qualifier (for example, "account-id:Thumbnail"). Note that the length constraint applies only to the ARN. If you specify only the function name, it is limited to 64 character in length. </param>
        ///
        /// <returns>The response from the GetFunctionConfiguration service method, as returned by Lambda.</returns>
        /// <exception cref="Amazon.Lambda.Model.ResourceNotFoundException">
        /// The resource (for example, a Lambda function or access policy statement) specified
        /// in the request does not exist.
        /// </exception>
        /// <exception cref="Amazon.Lambda.Model.ServiceException">
        /// The AWS Lambda service encountered an internal error.
        /// </exception>
        /// <exception cref="Amazon.Lambda.Model.TooManyRequestsException">
        ///
        /// </exception>
        GetFunctionConfigurationResponse GetFunctionConfiguration(string functionName);

        ///
        /// Returns the configuration information of the Lambda function. This the same information
        /// you provided as parameters when uploading the function by using CreateFunction.
        ///
        ///
        /// <para>
        /// This operation requires permission for the lambda:GetFunctionConfiguration
        /// operation.
        /// </para>
        ///
        /// <param name="request">Container for the necessary parameters to execute the GetFunctionConfiguration service method.</param>
        ///
        /// <returns>The response from the GetFunctionConfiguration service method, as returned by Lambda.</returns>
        /// <exception cref="Amazon.Lambda.Model.ResourceNotFoundException">
        /// The resource (for example, a Lambda function or access policy statement) specified
        /// in the request does not exist.
        /// </exception>
        /// <exception cref="Amazon.Lambda.Model.ServiceException">
        /// The AWS Lambda service encountered an internal error.
        /// </exception>
        /// <exception cref="Amazon.Lambda.Model.TooManyRequestsException">
        ///
        /// </exception>
        GetFunctionConfigurationResponse GetFunctionConfiguration(GetFunctionConfigurationRequest request);

        ///
        /// Initiates the asynchronous execution of the GetFunctionConfiguration operation.
        ///
        ///
        /// <param name="request">Container for the necessary parameters to execute the GetFunctionConfiguration operation on AmazonLambdaClient.</param>
        /// <param name="callback">An AsyncCallback delegate that is invoked when the operation completes.</param>
        /// <param name="state">A user-defined state object that is passed to the callback procedure. Retrieve this object from within the callback
        ///          procedure using the AsyncState property.</param>
        ///
        /// <returns>An IAsyncResult that can be used to poll or wait for results, or both; this value is also needed when invoking EndGetFunctionConfiguration
        ///         operation.</returns>
        IAsyncResult BeginGetFunctionConfiguration(GetFunctionConfigurationRequest request, AsyncCallback callback, object state);

        ///
        /// Finishes the asynchronous execution of the  GetFunctionConfiguration operation.
        ///
        ///
        /// <param name="asyncResult">The IAsyncResult returned by the call to BeginGetFunctionConfiguration.</param>
        ///
        /// <returns>Returns a  GetFunctionConfigurationResult from Lambda.</returns>
        GetFunctionConfigurationResponse EndGetFunctionConfiguration(IAsyncResult asyncResult);

        #endregion

        #region  GetPolicy

        ///
        /// Returns the access policy, containing a list of permissions granted via the AddPermission
        /// API, associated with the specified bucket.
        ///
        ///
        /// <para>
        /// You need permission for the lambda:GetPolicy action.
        /// </para>
        ///
        /// <param name="request">Container for the necessary parameters to execute the GetPolicy service method.</param>
        ///
        /// <returns>The response from the GetPolicy service method, as returned by Lambda.</returns>
        /// <exception cref="Amazon.Lambda.Model.ResourceNotFoundException">
        /// The resource (for example, a Lambda function or access policy statement) specified
        /// in the request does not exist.
        /// </exception>
        /// <exception cref="Amazon.Lambda.Model.ServiceException">
        /// The AWS Lambda service encountered an internal error.
        /// </exception>
        /// <exception cref="Amazon.Lambda.Model.TooManyRequestsException">
        ///
        /// </exception>
        GetPolicyResponse GetPolicy(GetPolicyRequest request);

        ///
        /// Initiates the asynchronous execution of the GetPolicy operation.
        ///
        ///
        /// <param name="request">Container for the necessary parameters to execute the GetPolicy operation on AmazonLambdaClient.</param>
        /// <param name="callback">An AsyncCallback delegate that is invoked when the operation completes.</param>
        /// <param name="state">A user-defined state object that is passed to the callback procedure. Retrieve this object from within the callback
        ///          procedure using the AsyncState property.</param>
        ///
        /// <returns>An IAsyncResult that can be used to poll or wait for results, or both; this value is also needed when invoking EndGetPolicy
        ///         operation.</returns>
        IAsyncResult BeginGetPolicy(GetPolicyRequest request, AsyncCallback callback, object state);

        ///
        /// Finishes the asynchronous execution of the  GetPolicy operation.
        ///
        ///
        /// <param name="asyncResult">The IAsyncResult returned by the call to BeginGetPolicy.</param>
        ///
        /// <returns>Returns a  GetPolicyResult from Lambda.</returns>
        GetPolicyResponse EndGetPolicy(IAsyncResult asyncResult);

        #endregion

        #region  Invoke

        ///
        /// Invokes a specified Lambda function.
        ///
        ///
        /// <para>
        /// This operation requires permission for the lambda:InvokeFunction action.
        /// </para>
        ///
        /// <param name="request">Container for the necessary parameters to execute the Invoke service method.</param>
        ///
        /// <returns>The response from the Invoke service method, as returned by Lambda.</returns>
        /// <exception cref="Amazon.Lambda.Model.InvalidRequestContentException">
        /// The request body could not be parsed as JSON.
        /// </exception>
        /// <exception cref="Amazon.Lambda.Model.RequestTooLargeException">
        ///
        /// </exception>
        /// <exception cref="Amazon.Lambda.Model.ResourceNotFoundException">
        /// The resource (for example, a Lambda function or access policy statement) specified
        /// in the request does not exist.
        /// </exception>
        /// <exception cref="Amazon.Lambda.Model.ServiceException">
        /// The AWS Lambda service encountered an internal error.
        /// </exception>
        /// <exception cref="Amazon.Lambda.Model.TooManyRequestsException">
        ///
        /// </exception>
        /// <exception cref="Amazon.Lambda.Model.UnsupportedMediaTypeException">
        ///
        /// </exception>
        InvokeResponse Invoke(InvokeRequest request);

        ///
        /// Initiates the asynchronous execution of the Invoke operation.
        ///
        ///
        /// <param name="request">Container for the necessary parameters to execute the Invoke operation on AmazonLambdaClient.</param>
        /// <param name="callback">An AsyncCallback delegate that is invoked when the operation completes.</param>
        /// <param name="state">A user-defined state object that is passed to the callback procedure. Retrieve this object from within the callback
        ///          procedure using the AsyncState property.</param>
        ///
        /// <returns>An IAsyncResult that can be used to poll or wait for results, or both; this value is also needed when invoking EndInvoke
        ///         operation.</returns>
        IAsyncResult BeginInvoke(InvokeRequest request, AsyncCallback callback, object state);

        ///
        /// Finishes the asynchronous execution of the  Invoke operation.
        ///
        ///
        /// <param name="asyncResult">The IAsyncResult returned by the call to BeginInvoke.</param>
        ///
        /// <returns>Returns a  InvokeResult from Lambda.</returns>
        InvokeResponse EndInvoke(IAsyncResult asyncResult);

        #endregion

        #region  InvokeAsync

        ///
        /// <important>This API is deprecated. We recommend you use Invoke API (see
        /// Invoke).</important>
        /// <para>
        /// Submits an invocation request to AWS Lambda. Upon receiving the request, Lambda executes
        /// the specified function asynchronously. To see the logs generated by the Lambda function
        /// execution, see the CloudWatch logs console.
        /// </para>
        ///
        /// <para>
        /// This operation requires permission for the lambda:InvokeFunction action.
        /// </para>
        ///
        /// <param name="request">Container for the necessary parameters to execute the InvokeAsync service method.</param>
        ///
        /// <returns>The response from the InvokeAsync service method, as returned by Lambda.</returns>
        /// <exception cref="Amazon.Lambda.Model.InvalidRequestContentException">
        /// The request body could not be parsed as JSON.
        /// </exception>
        /// <exception cref="Amazon.Lambda.Model.ResourceNotFoundException">
        /// The resource (for example, a Lambda function or access policy statement) specified
        /// in the request does not exist.
        /// </exception>
        /// <exception cref="Amazon.Lambda.Model.ServiceException">
        /// The AWS Lambda service encountered an internal error.
        /// </exception>
        [Obsolete("This API is deprecated. We recommend that you use Invoke API instead.")]
        InvokeAsyncResponse InvokeAsync(InvokeAsyncRequest request);

        ///
        /// Initiates the asynchronous execution of the InvokeAsync operation.
        ///
        ///
        /// <param name="request">Container for the necessary parameters to execute the InvokeAsync operation on AmazonLambdaClient.</param>
        /// <param name="callback">An AsyncCallback delegate that is invoked when the operation completes.</param>
        /// <param name="state">A user-defined state object that is passed to the callback procedure. Retrieve this object from within the callback
        ///          procedure using the AsyncState property.</param>
        ///
        /// <returns>An IAsyncResult that can be used to poll or wait for results, or both; this value is also needed when invoking EndInvokeAsync
        ///         operation.</returns>
        [Obsolete("This API is deprecated. We recommend that you use Invoke API instead.")]
        IAsyncResult BeginInvokeAsync(InvokeAsyncRequest request, AsyncCallback callback, object state);

        ///
        /// Finishes the asynchronous execution of the  InvokeAsync operation.
        ///
        ///
        /// <param name="asyncResult">The IAsyncResult returned by the call to BeginInvokeAsync.</param>
        ///
        /// <returns>Returns a  InvokeAsyncResult from Lambda.</returns>
        [Obsolete("This API is deprecated. We recommend that you use Invoke API instead.")]
        InvokeAsyncResponse EndInvokeAsync(IAsyncResult asyncResult);

        #endregion

        #region  ListEventSourceMappings

        ///
        /// Returns a list of event source mappings you created using the CreateEventSourceMapping
        /// (see CreateEventSourceMapping), where you identify a stream as an event source.
        /// This list does not include Amazon S3 event sources.
        ///
        ///
        /// <para>
        /// For each mapping, the API returns configuration information. You can optionally specify
        /// filters to retrieve specific event source mappings.
        /// </para>
        ///
        /// <para>
        /// This operation requires permission for the lambda:ListEventSourceMappings
        /// action.
        /// </para>
        ///
        /// <param name="request">Container for the necessary parameters to execute the ListEventSourceMappings service method.</param>
        ///
        /// <returns>The response from the ListEventSourceMappings service method, as returned by Lambda.</returns>
        /// <exception cref="Amazon.Lambda.Model.InvalidParameterValueException">
        /// One of the parameters in the request is invalid. For example, if you provided an IAM
        /// role for AWS Lambda to assume in the CreateFunction or the UpdateFunctionConfiguration
        /// API, that AWS Lambda is unable to assume you will get this exception.
        /// </exception>
        /// <exception cref="Amazon.Lambda.Model.ResourceNotFoundException">
        /// The resource (for example, a Lambda function or access policy statement) specified
        /// in the request does not exist.
        /// </exception>
        /// <exception cref="Amazon.Lambda.Model.ServiceException">
        /// The AWS Lambda service encountered an internal error.
        /// </exception>
        /// <exception cref="Amazon.Lambda.Model.TooManyRequestsException">
        ///
        /// </exception>
        ListEventSourceMappingsResponse ListEventSourceMappings(ListEventSourceMappingsRequest request);

        ///
        /// Initiates the asynchronous execution of the ListEventSourceMappings operation.
        ///
        ///
        /// <param name="request">Container for the necessary parameters to execute the ListEventSourceMappings operation on AmazonLambdaClient.</param>
        /// <param name="callback">An AsyncCallback delegate that is invoked when the operation completes.</param>
        /// <param name="state">A user-defined state object that is passed to the callback procedure. Retrieve this object from within the callback
        ///          procedure using the AsyncState property.</param>
        ///
        /// <returns>An IAsyncResult that can be used to poll or wait for results, or both; this value is also needed when invoking EndListEventSourceMappings
        ///         operation.</returns>
        IAsyncResult BeginListEventSourceMappings(ListEventSourceMappingsRequest request, AsyncCallback callback, object state);

        ///
        /// Finishes the asynchronous execution of the  ListEventSourceMappings operation.
        ///
        ///
        /// <param name="asyncResult">The IAsyncResult returned by the call to BeginListEventSourceMappings.</param>
        ///
        /// <returns>Returns a  ListEventSourceMappingsResult from Lambda.</returns>
        ListEventSourceMappingsResponse EndListEventSourceMappings(IAsyncResult asyncResult);

        #endregion

        #region  ListFunctions

        ///
        /// Returns a list of your Lambda functions. For each function, the response includes
        /// the function configuration information. You must use GetFunction to retrieve
        /// the code for your function.
        ///
        ///
        /// <para>
        /// This operation requires permission for the lambda:ListFunctions action.
        /// </para>
        ///
        ///
        /// <returns>The response from the ListFunctions service method, as returned by Lambda.</returns>
        /// <exception cref="Amazon.Lambda.Model.ServiceException">
        /// The AWS Lambda service encountered an internal error.
        /// </exception>
        /// <exception cref="Amazon.Lambda.Model.TooManyRequestsException">
        ///
        /// </exception>
        ListFunctionsResponse ListFunctions();

        ///
        /// Returns a list of your Lambda functions. For each function, the response includes
        /// the function configuration information. You must use GetFunction to retrieve
        /// the code for your function.
        ///
        ///
        /// <para>
        /// This operation requires permission for the lambda:ListFunctions action.
        /// </para>
        ///
        /// <param name="request">Container for the necessary parameters to execute the ListFunctions service method.</param>
        ///
        /// <returns>The response from the ListFunctions service method, as returned by Lambda.</returns>
        /// <exception cref="Amazon.Lambda.Model.ServiceException">
        /// The AWS Lambda service encountered an internal error.
        /// </exception>
        /// <exception cref="Amazon.Lambda.Model.TooManyRequestsException">
        ///
        /// </exception>
        ListFunctionsResponse ListFunctions(ListFunctionsRequest request);

        ///
        /// Initiates the asynchronous execution of the ListFunctions operation.
        ///
        ///
        /// <param name="request">Container for the necessary parameters to execute the ListFunctions operation on AmazonLambdaClient.</param>
        /// <param name="callback">An AsyncCallback delegate that is invoked when the operation completes.</param>
        /// <param name="state">A user-defined state object that is passed to the callback procedure. Retrieve this object from within the callback
        ///          procedure using the AsyncState property.</param>
        ///
        /// <returns>An IAsyncResult that can be used to poll or wait for results, or both; this value is also needed when invoking EndListFunctions
        ///         operation.</returns>
        IAsyncResult BeginListFunctions(ListFunctionsRequest request, AsyncCallback callback, object state);

        ///
        /// Finishes the asynchronous execution of the  ListFunctions operation.
        ///
        ///
        /// <param name="asyncResult">The IAsyncResult returned by the call to BeginListFunctions.</param>
        ///
        /// <returns>Returns a  ListFunctionsResult from Lambda.</returns>
        ListFunctionsResponse EndListFunctions(IAsyncResult asyncResult);

        #endregion

        #region  RemovePermission

        ///
        /// You can remove individual permissions from an access policy associated with a Lambda
        /// function by providing a Statement ID.
        ///
        ///
        /// <para>
        /// Note that removal of a permission will cause an active event source to lose permission
        /// to the function.
        /// </para>
        ///
        /// <para>
        /// You need permission for the lambda:RemovePermission action.
        /// </para>
        ///
        /// <param name="request">Container for the necessary parameters to execute the RemovePermission service method.</param>
        ///
        /// <returns>The response from the RemovePermission service method, as returned by Lambda.</returns>
        /// <exception cref="Amazon.Lambda.Model.ResourceNotFoundException">
        /// The resource (for example, a Lambda function or access policy statement) specified
        /// in the request does not exist.
        /// </exception>
        /// <exception cref="Amazon.Lambda.Model.ServiceException">
        /// The AWS Lambda service encountered an internal error.
        /// </exception>
        /// <exception cref="Amazon.Lambda.Model.TooManyRequestsException">
        ///
        /// </exception>
        RemovePermissionResponse RemovePermission(RemovePermissionRequest request);

        ///
        /// Initiates the asynchronous execution of the RemovePermission operation.
        ///
        ///
        /// <param name="request">Container for the necessary parameters to execute the RemovePermission operation on AmazonLambdaClient.</param>
        /// <param name="callback">An AsyncCallback delegate that is invoked when the operation completes.</param>
        /// <param name="state">A user-defined state object that is passed to the callback procedure. Retrieve this object from within the callback
        ///          procedure using the AsyncState property.</param>
        ///
        /// <returns>An IAsyncResult that can be used to poll or wait for results, or both; this value is also needed when invoking EndRemovePermission
        ///         operation.</returns>
        IAsyncResult BeginRemovePermission(RemovePermissionRequest request, AsyncCallback callback, object state);

        ///
        /// Finishes the asynchronous execution of the  RemovePermission operation.
        ///
        ///
        /// <param name="asyncResult">The IAsyncResult returned by the call to BeginRemovePermission.</param>
        ///
        /// <returns>Returns a  RemovePermissionResult from Lambda.</returns>
        RemovePermissionResponse EndRemovePermission(IAsyncResult asyncResult);

        #endregion

        #region  UpdateEventSourceMapping

        ///
        /// You can update an event source mapping. This is useful if you want to change the parameters
        /// of the existing mapping without losing your position in the stream. You can change
        /// which function will receive the stream records, but to change the stream itself, you
        /// must create a new mapping.
        ///
        ///
        /// <para>
        /// This operation requires permission for the lambda:UpdateEventSourceMapping
        /// action.
        /// </para>
        ///
        /// <param name="request">Container for the necessary parameters to execute the UpdateEventSourceMapping service method.</param>
        ///
        /// <returns>The response from the UpdateEventSourceMapping service method, as returned by Lambda.</returns>
        /// <exception cref="Amazon.Lambda.Model.InvalidParameterValueException">
        /// One of the parameters in the request is invalid. For example, if you provided an IAM
        /// role for AWS Lambda to assume in the CreateFunction or the UpdateFunctionConfiguration
        /// API, that AWS Lambda is unable to assume you will get this exception.
        /// </exception>
        /// <exception cref="Amazon.Lambda.Model.ResourceNotFoundException">
        /// The resource (for example, a Lambda function or access policy statement) specified
        /// in the request does not exist.
        /// </exception>
        /// <exception cref="Amazon.Lambda.Model.ServiceException">
        /// The AWS Lambda service encountered an internal error.
        /// </exception>
        /// <exception cref="Amazon.Lambda.Model.TooManyRequestsException">
        ///
        /// </exception>
        UpdateEventSourceMappingResponse UpdateEventSourceMapping(UpdateEventSourceMappingRequest request);

        ///
        /// Initiates the asynchronous execution of the UpdateEventSourceMapping operation.
        ///
        ///
        /// <param name="request">Container for the necessary parameters to execute the UpdateEventSourceMapping operation on AmazonLambdaClient.</param>
        /// <param name="callback">An AsyncCallback delegate that is invoked when the operation completes.</param>
        /// <param name="state">A user-defined state object that is passed to the callback procedure. Retrieve this object from within the callback
        ///          procedure using the AsyncState property.</param>
        ///
        /// <returns>An IAsyncResult that can be used to poll or wait for results, or both; this value is also needed when invoking EndUpdateEventSourceMapping
        ///         operation.</returns>
        IAsyncResult BeginUpdateEventSourceMapping(UpdateEventSourceMappingRequest request, AsyncCallback callback, object state);

        ///
        /// Finishes the asynchronous execution of the  UpdateEventSourceMapping operation.
        ///
        ///
        /// <param name="asyncResult">The IAsyncResult returned by the call to BeginUpdateEventSourceMapping.</param>
        ///
        /// <returns>Returns a  UpdateEventSourceMappingResult from Lambda.</returns>
        UpdateEventSourceMappingResponse EndUpdateEventSourceMapping(IAsyncResult asyncResult);

        #endregion

        #region  UpdateFunctionCode

        ///
        /// Updates the code for the specified Lambda function. This operation must only be used
        /// on an existing Lambda function and cannot be used to update the function configuration.
        ///
        ///
        ///
        /// <para>
        /// This operation requires permission for the lambda:UpdateFunctionCode
        /// action.
        /// </para>
        ///
        /// <param name="request">Container for the necessary parameters to execute the UpdateFunctionCode service method.</param>
        ///
        /// <returns>The response from the UpdateFunctionCode service method, as returned by Lambda.</returns>
        /// <exception cref="Amazon.Lambda.Model.CodeStorageExceededException">
        ///
        /// </exception>
        /// <exception cref="Amazon.Lambda.Model.InvalidParameterValueException">
        /// One of the parameters in the request is invalid. For example, if you provided an IAM
        /// role for AWS Lambda to assume in the CreateFunction or the UpdateFunctionConfiguration
        /// API, that AWS Lambda is unable to assume you will get this exception.
        /// </exception>
        /// <exception cref="Amazon.Lambda.Model.ResourceNotFoundException">
        /// The resource (for example, a Lambda function or access policy statement) specified
        /// in the request does not exist.
        /// </exception>
        /// <exception cref="Amazon.Lambda.Model.ServiceException">
        /// The AWS Lambda service encountered an internal error.
        /// </exception>
        /// <exception cref="Amazon.Lambda.Model.TooManyRequestsException">
        ///
        /// </exception>
        UpdateFunctionCodeResponse UpdateFunctionCode(UpdateFunctionCodeRequest request);

        ///
        /// Initiates the asynchronous execution of the UpdateFunctionCode operation.
        ///
        ///
        /// <param name="request">Container for the necessary parameters to execute the UpdateFunctionCode operation on AmazonLambdaClient.</param>
        /// <param name="callback">An AsyncCallback delegate that is invoked when the operation completes.</param>
        /// <param name="state">A user-defined state object that is passed to the callback procedure. Retrieve this object from within the callback
        ///          procedure using the AsyncState property.</param>
        ///
        /// <returns>An IAsyncResult that can be used to poll or wait for results, or both; this value is also needed when invoking EndUpdateFunctionCode
        ///         operation.</returns>
        IAsyncResult BeginUpdateFunctionCode(UpdateFunctionCodeRequest request, AsyncCallback callback, object state);

        ///
        /// Finishes the asynchronous execution of the  UpdateFunctionCode operation.
        ///
        ///
        /// <param name="asyncResult">The IAsyncResult returned by the call to BeginUpdateFunctionCode.</param>
        ///
        /// <returns>Returns a  UpdateFunctionCodeResult from Lambda.</returns>
        UpdateFunctionCodeResponse EndUpdateFunctionCode(IAsyncResult asyncResult);

        #endregion

        #region  UpdateFunctionConfiguration

        ///
        /// Updates the configuration parameters for the specified Lambda function by using the
        /// values provided in the request. You provide only the parameters you want to change.
        /// This operation must only be used on an existing Lambda function and cannot be used
        /// to update the function's code.
        ///
        ///
        /// <para>
        /// This operation requires permission for the lambda:UpdateFunctionConfiguration
        /// action.
        /// </para>
        ///
        /// <param name="request">Container for the necessary parameters to execute the UpdateFunctionConfiguration service method.</param>
        ///
        /// <returns>The response from the UpdateFunctionConfiguration service method, as returned by Lambda.</returns>
        /// <exception cref="Amazon.Lambda.Model.InvalidParameterValueException">
        /// One of the parameters in the request is invalid. For example, if you provided an IAM
        /// role for AWS Lambda to assume in the CreateFunction or the UpdateFunctionConfiguration
        /// API, that AWS Lambda is unable to assume you will get this exception.
        /// </exception>
        /// <exception cref="Amazon.Lambda.Model.ResourceNotFoundException">
        /// The resource (for example, a Lambda function or access policy statement) specified
        /// in the request does not exist.
        /// </exception>
        /// <exception cref="Amazon.Lambda.Model.ServiceException">
        /// The AWS Lambda service encountered an internal error.
        /// </exception>
        /// <exception cref="Amazon.Lambda.Model.TooManyRequestsException">
        ///
        /// </exception>
        UpdateFunctionConfigurationResponse UpdateFunctionConfiguration(UpdateFunctionConfigurationRequest request);

        ///
        /// Initiates the asynchronous execution of the UpdateFunctionConfiguration operation.
        ///
        ///
        /// <param name="request">Container for the necessary parameters to execute the UpdateFunctionConfiguration operation on AmazonLambdaClient.</param>
        /// <param name="callback">An AsyncCallback delegate that is invoked when the operation completes.</param>
        /// <param name="state">A user-defined state object that is passed to the callback procedure. Retrieve this object from within the callback
        ///          procedure using the AsyncState property.</param>
        ///
        /// <returns>An IAsyncResult that can be used to poll or wait for results, or both; this value is also needed when invoking EndUpdateFunctionConfiguration
        ///         operation.</returns>
        IAsyncResult BeginUpdateFunctionConfiguration(UpdateFunctionConfigurationRequest request, AsyncCallback callback, object state);

        ///
        /// Finishes the asynchronous execution of the  UpdateFunctionConfiguration operation.
        ///
        ///
        /// <param name="asyncResult">The IAsyncResult returned by the call to BeginUpdateFunctionConfiguration.</param>
        ///
        /// <returns>Returns a  UpdateFunctionConfigurationResult from Lambda.</returns>
        UpdateFunctionConfigurationResponse EndUpdateFunctionConfiguration(IAsyncResult asyncResult);

        #endregion

    }
}


text:
package bader;

import java.util.Date;
import java.text.DateFormat;
import java.text.SimpleDateFormat;
import java.util.Calendar;

public class testclock {

  public static void main(String[] args) {

	  /*ArrayList <Calendar>dateFormat = new ArrayList <Calendar>();//Skapa en metod också?

		 dateFormat.add(new Calendar(""));

	  for (int i=0; i<Calendar(); i++){*/

       DateFormat dateFormat = new SimpleDateFormat("yyyy/MM/dd HH:mm:ss");
       //get current date time with Date()
       Date date = new Date();
       System.out.println(dateFormat.format(date));

       //get current date time with Calendar()
       Calendar cal = Calendar.getInstance();
       System.out.println(dateFormat.format(cal.getTime()));

  }
}

redpajama_set_name: RedPajamaGithub


text:
if (!RedactorPlugins) var RedactorPlugins = {};

RedactorPlugins.pagebreak = function()
{
	return {
		init: function()
		{
			var $btn = this.button.add('pagebreak', 'Insert Page Break');
			this.button.addCallback($btn, this.pagebreak.insertPageBreak);
		},

		insertPageBreak: function()
		{
			var $pagebreakNode = $('
'),
				$currentNode = $(this.selection.getCurrent());

			if ($currentNode.length && !$currentNode.is('div.redactor_editor'))
			{
				// Find the closest element to div.redactor_editor
				while ($currentNode.parent().length && !$currentNode.parent().is('div.redactor-editor'))
				{
					$currentNode = $currentNode.parent();
				}

				$pagebreakNode.insertAfter($currentNode);
			}
			else
			{
				// Just append it to the end
				$pagebreakNode.appendTo(this.$editor);
			}

			var $p = $('

').insertAfter($pagebreakNode);

			this.$editor.focus();

			Garnish.requestAnimationFrame($.proxy(function()
			{
				this.code.sync();
			}, this));
			//this.setSelection($p[0], 0, $p[0], 0);
		}
	};
};


text:
package acromusashi.stream.topology;

import java.text.MessageFormat;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import backtype.storm.Config;
import backtype.storm.LocalCluster;
import backtype.storm.StormSubmitter;
import backtype.storm.generated.StormTopology;

/**
 * TrindentTopologyを実装する際の基底クラス
 *
 * @author kimura
 */
public abstract class BaseTridentTopology
{
    /** logger */
    private static Logger logger = LoggerFactory.getLogger(BaseTridentTopology.class);

    /** TopologyName */
    protected String      topologyName;

    /** StormConfig */
    protected Config      config;

    /**
     * TopologyName、StormConfigを指定してTopologyを生成する。
     * @param topologyName TopologyName
     * @param config StormConfig
     */
    public BaseTridentTopology(String topologyName, Config config)
    {
        this.topologyName = topologyName;
        this.config = config;
    }

    /**
     * TridentTopologyを構築する。
     *
     * @return 生成されたTridentTopology
     */
    public abstract StormTopology buildTridentTopology();

    /**
     * Topologyを実行する。
     *
     * @param topology StormTopology
     * @param isLocal true:ローカルモード、false:分散モード
     * @throws Exception Topology実行失敗時
     */
    public void submitTopology(StormTopology topology, boolean isLocal) throws Exception
    {
        if (isLocal)
        {
            // ローカル環境で実行
            LocalCluster cluster = new LocalCluster();
            cluster.submitTopology(this.topologyName, this.config, topology);
        }
        else
        {
            // 分散環境で実行
            try
            {
                StormSubmitter.submitTopology(this.topologyName, this.config, topology);
            }
            catch (Exception ex)
            {
                String logFormat = "Occur exception at Topology Submit. Skip Topology Submit. : TopologyName={0}";
                logger.error(MessageFormat.format(logFormat, this.topologyName), ex);
            }
        }
    }
}


text:
var should = require('chai').should();
var ValidationError = require('../../../lib/error/validation');

describe('SchemaTypeArray', function(){
  var SchemaTypeArray = require('../../../lib/types/array');
  var SchemaTypeString = require('../../../lib/types/string');
  var SchemaTypeDate = require('../../../lib/types/date');
  var SchemaTypeBoolean = require('../../../lib/types/boolean');
  var type = new SchemaTypeArray('test');

  it('cast()', function(){
    type.cast('foo').should.eql(['foo']);
    type.cast([]).should.eql([]);
    type.cast([1, 2, 3]).should.eql([1, 2, 3]);
    type.cast().should.eql([]);
  });

  it('cast() - default', function(){
    var type = new SchemaTypeArray('test', {default: [1, 2, 3]});
    type.cast().should.eql([1, 2, 3]);
  });

  it('cast() - child', function(){
    var type = new SchemaTypeArray('test', {child: new SchemaTypeString()});
    type.cast([1, 2, 3]).should.eql(['1', '2', '3']);
  });

  function shouldThrowError(value){
    type.validate(value).should.be
      .instanceOf(ValidationError)
      .property('message', '`' + value + '` is not an array!');
  }

  it('validate()', function(){
    type.validate([]).should.eql([]);
    type.validate([1, 2, 3]).should.eql([1, 2, 3]);
    shouldThrowError('');
    shouldThrowError('foo');
    shouldThrowError(0);
    shouldThrowError(1);
    shouldThrowError({});
    shouldThrowError(true);
  });

  it('validate() - required', function(){
    var type = new SchemaTypeArray('test', {required: true});

    type.validate().should.be
      .instanceOf(ValidationError)
      .property('message', '`test` is required!');
  });

  it('validate() - child', function(){
    var type = new SchemaTypeArray('test', {child: new SchemaTypeString()});

    type.validate([1, 2, 3]).should.be
      .instanceOf(ValidationError)
      .property('message', '`1` is not a string!');
  });

  it('parse()', function(){
    type.parse([1, 2, 3]).should.eql([1, 2, 3]);
    should.not.exist(type.parse());
  });

  it('parse() - child', function(){
    var type = new SchemaTypeArray('test', {child: new SchemaTypeBoolean()});
    type.parse([0, 1, 0]).should.eql([false, true, false]);
  });

  it('value()', function(){
    type.value([1, 2, 3]).should.eql([1, 2, 3]);
    should.not.exist(type.value());
  });

  it('value() - child', function(){
    var type = new SchemaTypeArray('test', {child: new SchemaTypeBoolean()});
    type.value([true, false, true]).should.eql([1, 0, 1]);
  });

});


text:
require('../../modules/es6.reflect.construct');
module.exports = require('../../modules/_core').Reflect.construct;


text:
from io import StringIO

from rdflib.plugins.sparql.results.tsvresults import TSVResultParser
from rdflib.query import ResultRow

def test_empty_tsvresults_bindings() -> None:
    # check that optional bindings are ordered properly
    source = """?s\t?p\t?o
    \t<urn:p>\t<urn:o>
    <urn:s>\t\t<urn:o>
    <urn:s>\t<urn:p>\t"""

    parser = TSVResultParser()
    source_io = StringIO(source)
    result = parser.parse(source_io)

    for idx, row in enumerate(result):
        assert isinstance(row, ResultRow)
        assert row[idx] is None


text:
//- JavaScript source code

//- main.js ~~
//                                                      ~~ (c) SRW, 10 May 2014
//                                                  ~~ last updated 11 May 2014

(function (global) {
    'use strict';

 // Pragmas

    /*global */

    /*jshint maxparams: 1, quotmark: single, strict: true */

    /*jslint indent: 4, maxlen: 80 */

    /*properties
        box, clearTimeout, console, dt, error, exit, getPrototypeOf,
        hasOwnProperty, key, log, on, Q, QM, setInterval, setTimeout, volunteer
    */

 // Prerequisites

    if ((global.console instanceof Object) === false) {
        throw new Error('Developer console is not available.');
    }

    if ((typeof global.console.error !== 'function') ||
            (typeof global.console.log !== 'function')) {
        throw new Error('Developer console is weird.');
    }

    if (global.hasOwnProperty('QM') === false) {
        throw new Error('QMachine has not been loaded.');
    }

    if (Object.hasOwnProperty('getPrototypeOf') === false) {
        throw new Error('ES5 is not supported. This is gonna get ugly.');
    }

    if (Object.getPrototypeOf(global).hasOwnProperty('setInterval') === false) {
        throw new Error('The `setInterval` method is missing.');
    }

    if (Object.getPrototypeOf(global).hasOwnProperty('setTimeout') === false) {
        throw new Error('The `setTimeout` method is missing.');
    }

 // Declarations

    var config, qm;

 // Definitions

    config = {
        box: 'mapreduce-testpage',      //- will be assigned to `QM.box`
        dt: 1000                        //- polling interval, in milliseconds
    };

    qm = global.QM;

 // Prototype definitions

 // Out-of-scope definitions

    qm.box = config.box;

 // Invocations

    (function () {

        var timeout = null;

        (function f() {
         // This function sets up a nice, steady asynchronous volunteer :-)
            global.clearTimeout(timeout);
            qm.volunteer().on('error', function (message) {
             // This function needs documentation.
                if (message === 'Nothing to do ...') {
                    global.console.log(message);
                } else {
                    global.console.error(message);
                }
                timeout = global.setTimeout(f, config.dt);
                return;
            }).Q(function (evt) {
             // This function needs documentation.
                global.console.log('Done: ' + this.key);
                timeout = global.setTimeout(f, config.dt);
                return evt.exit();
            });
            return;
        }());

        return;

    }());

 // That's all, folks!

    return;

}(Function.prototype.call.call(function (that) {
    'use strict';

 // See "mapreduce.js" for explanation.

    /*global global: false */
    /*jslint indent: 4, maxlen: 80 */
    /*properties global */

    if (this === null) {

     // Strict mode has captured us, but we already passed a reference :-)

        return (typeof global === 'object') ? global : that;

    }

 // Strict mode isn't supported in this environment, but we need to make sure
 // we don't get fooled by Rhino's `global` function.

    return (typeof this.global === 'object') ? this.global : this;

}, null, this)));

//- vim:set syntax=javascript:


text:
import repeat from 'lodash/repeat';
import unconfigured from '../../src/validators/hasLengthLessThan';

const FIELD = 'Foo';
const LESS_THAN_LIMIT = 4;
const MAX = LESS_THAN_LIMIT - 1;
const hasLengthLessThan = unconfigured(LESS_THAN_LIMIT)(FIELD);
const expectedErrorMessage = `${FIELD} cannot be longer than ${MAX} characters`;

it('allows lengths less than given value', () => {
  expect(hasLengthLessThan(repeat('a', MAX))).toBe(undefined);
});

it('does not allow lengths equal to the given value', () => {
  expect(hasLengthLessThan(repeat('a', LESS_THAN_LIMIT))).toBe(expectedErrorMessage);
});

it('does not allow lengths greater than the given value', () => {
  expect(hasLengthLessThan(repeat('a', LESS_THAN_LIMIT + 1))).toBe(expectedErrorMessage);
});

it('unconfigured is cloneable', () => {
  const clonedUnconfigured = unconfigured.clone((field, max) => (
    `${field} error ${max}`
  ));

  const cloned = clonedUnconfigured(LESS_THAN_LIMIT)(FIELD);
  const expected = `${FIELD} error ${LESS_THAN_LIMIT}`;

  expect(cloned(repeat('a', LESS_THAN_LIMIT))).toBe(expected);
});

it('configured is cloneable', () => {
  const cloned = unconfigured(LESS_THAN_LIMIT).clone((field, limit) => (
    `${field} error ${limit}`
  ))(FIELD);

  const expected = `${FIELD} error ${LESS_THAN_LIMIT}`;

  expect(cloned(repeat('a', LESS_THAN_LIMIT))).toBe(expected);
});


text:
using Ditto.Resolvers;

namespace Ditto.Internal
{
    public class BinderFactory:IProvideBinders
    {
        private readonly IActivate activate;

        public BinderFactory(IActivate activate)
        {
            this.activate = activate;
            Logger = new NullLogFactory();
        }

        public ILogFactory Logger { get; set; }
        public IBinder[] Create()
        {
            var resolverFactory = new DefaultResolverFactory(activate);
            var destinationPropsBinding = new DestinationPropertyTypeBinder(resolverFactory){Logger=Logger};
            var listPropBinding = new ListPropertyBinder(resolverFactory){Logger=Logger};
            var selfBinding = new SelfBinder();
            return new IBinder[]{destinationPropsBinding,listPropBinding,selfBinding};
        }
    }
}


text:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:orientation="vertical" android:layout_width="match_parent"
    android:layout_height="match_parent">

    <TextView
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:text="New Text"
        android:id="@+id/textView3" />

    <Button
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:text="New Button"
        android:id="@+id/button4" />

    <RadioButton
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:text="New RadioButton"
        android:id="@+id/radioButton" />

    <CheckBox
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:text="New CheckBox"
        android:id="@+id/checkBox" />

    <ProgressBar
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:id="@+id/progressBar" />

    <ListView android:id="@android:id/list"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:drawSelectorOnTop="false"/>
</LinearLayout>


text:
<?php

use yii\helpers\Html;
use yii\helpers\ArrayHelper;
use yii\widgets\ActiveForm;
use app\models\Blog;
use app\models\Category;
use dosamigos\ckeditor\CKEditor;

/* @var $this yii\web\View */
/* @var $model app\models\Post */
/* @var $form yii\widgets\ActiveForm */
?>

    <?php $form = ActiveForm::begin(); ?>

    <?= $form->field($model, 'title')->textInput([
        'maxlength'   => true,
        'placeholder' => 'Title of the post.',
    ]) ?>

    <?= $form->field($model, 'anons')->textInput([
        'maxlength'   => true,
        'placeholder' => 'Anons of the post.',
    ]) ?>

    <?= $form->field($model, 'content')->widget(CKEditor::className(), [
        'options' => [
            'rows'    => 8,
            'columns' => 10,
        ],
        'preset'  => 'basic',
    ]) ?>

    <?= $form->field($model, 'categories_selection')
             ->ListBox($model->createArrayForCategoriesSelection(), ['multiple' => true]) ?>

    <?= $form->field($model, 'publish_status')->dropDownList([
        'draft'   => 'Draft',
        'publish' => 'Publish',
    ]) ?>

        <?= Html::submitButton($model->isNewRecord ? 'Create' : 'Update', ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary']) ?>

    <?php ActiveForm::end(); ?>