text:
namespace Zu.ChromeDevTools.WebAuthn
{
    using System;
    using System.Threading;
    using System.Threading.Tasks;

    /// <summary>
    /// Represents an adapter for the WebAuthn domain to simplify the command interface.
    /// </summary>
    public class WebAuthnAdapter
    {
        private readonly ChromeSession m_session;

        public WebAuthnAdapter(ChromeSession session)
        {
            m_session = session ?? throw new ArgumentNullException(nameof(session));
        }

        /// <summary>
        /// Gets the ChromeSession associated with the adapter.
        /// </summary>
        public ChromeSession Session
        {
            get { return m_session; }
        }

        /// <summary>
        /// Enable the WebAuthn domain and start intercepting credential storage and
        /// retrieval with a virtual authenticator.
        /// </summary>
        public async Task<EnableCommandResponse> Enable(EnableCommand command = null, CancellationToken cancellationToken = default(CancellationToken), int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)
        {
            return await m_session.SendCommand<EnableCommand, EnableCommandResponse>(command ?? new EnableCommand(), cancellationToken, millisecondsTimeout, throwExceptionIfResponseNotReceived);
        }
        /// <summary>
        /// Disable the WebAuthn domain.
        /// </summary>
        public async Task<DisableCommandResponse> Disable(DisableCommand command = null, CancellationToken cancellationToken = default(CancellationToken), int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)
        {
            return await m_session.SendCommand<DisableCommand, DisableCommandResponse>(command ?? new DisableCommand(), cancellationToken, millisecondsTimeout, throwExceptionIfResponseNotReceived);
        }
        /// <summary>
        /// Creates and adds a virtual authenticator.
        /// </summary>
        public async Task<AddVirtualAuthenticatorCommandResponse> AddVirtualAuthenticator(AddVirtualAuthenticatorCommand command, CancellationToken cancellationToken = default(CancellationToken), int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)
        {
            return await m_session.SendCommand<AddVirtualAuthenticatorCommand, AddVirtualAuthenticatorCommandResponse>(command, cancellationToken, millisecondsTimeout, throwExceptionIfResponseNotReceived);
        }
        /// <summary>
        /// Removes the given authenticator.
        /// </summary>
        public async Task<RemoveVirtualAuthenticatorCommandResponse> RemoveVirtualAuthenticator(RemoveVirtualAuthenticatorCommand command, CancellationToken cancellationToken = default(CancellationToken), int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)
        {
            return await m_session.SendCommand<RemoveVirtualAuthenticatorCommand, RemoveVirtualAuthenticatorCommandResponse>(command, cancellationToken, millisecondsTimeout, throwExceptionIfResponseNotReceived);
        }
        /// <summary>
        /// Adds the credential to the specified authenticator.
        /// </summary>
        public async Task<AddCredentialCommandResponse> AddCredential(AddCredentialCommand command, CancellationToken cancellationToken = default(CancellationToken), int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)
        {
            return await m_session.SendCommand<AddCredentialCommand, AddCredentialCommandResponse>(command, cancellationToken, millisecondsTimeout, throwExceptionIfResponseNotReceived);
        }
        /// <summary>
        /// Returns a single credential stored in the given virtual authenticator that
        /// matches the credential ID.
        /// </summary>
        public async Task<GetCredentialCommandResponse> GetCredential(GetCredentialCommand command, CancellationToken cancellationToken = default(CancellationToken), int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)
        {
            return await m_session.SendCommand<GetCredentialCommand, GetCredentialCommandResponse>(command, cancellationToken, millisecondsTimeout, throwExceptionIfResponseNotReceived);
        }
        /// <summary>
        /// Returns all the credentials stored in the given virtual authenticator.
        /// </summary>
        public async Task<GetCredentialsCommandResponse> GetCredentials(GetCredentialsCommand command, CancellationToken cancellationToken = default(CancellationToken), int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)
        {
            return await m_session.SendCommand<GetCredentialsCommand, GetCredentialsCommandResponse>(command, cancellationToken, millisecondsTimeout, throwExceptionIfResponseNotReceived);
        }
        /// <summary>
        /// Removes a credential from the authenticator.
        /// </summary>
        public async Task<RemoveCredentialCommandResponse> RemoveCredential(RemoveCredentialCommand command, CancellationToken cancellationToken = default(CancellationToken), int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)
        {
            return await m_session.SendCommand<RemoveCredentialCommand, RemoveCredentialCommandResponse>(command, cancellationToken, millisecondsTimeout, throwExceptionIfResponseNotReceived);
        }
        /// <summary>
        /// Clears all the credentials from the specified device.
        /// </summary>
        public async Task<ClearCredentialsCommandResponse> ClearCredentials(ClearCredentialsCommand command, CancellationToken cancellationToken = default(CancellationToken), int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)
        {
            return await m_session.SendCommand<ClearCredentialsCommand, ClearCredentialsCommandResponse>(command, cancellationToken, millisecondsTimeout, throwExceptionIfResponseNotReceived);
        }
        /// <summary>
        /// Sets whether User Verification succeeds or fails for an authenticator.
        /// The default is true.
        /// </summary>
        public async Task<SetUserVerifiedCommandResponse> SetUserVerified(SetUserVerifiedCommand command, CancellationToken cancellationToken = default(CancellationToken), int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)
        {
            return await m_session.SendCommand<SetUserVerifiedCommand, SetUserVerifiedCommandResponse>(command, cancellationToken, millisecondsTimeout, throwExceptionIfResponseNotReceived);
        }
        /// <summary>
        /// Sets whether tests of user presence will succeed immediately (if true) or fail to resolve (if false) for an authenticator.
        /// The default is true.
        /// </summary>
        public async Task<SetAutomaticPresenceSimulationCommandResponse> SetAutomaticPresenceSimulation(SetAutomaticPresenceSimulationCommand command, CancellationToken cancellationToken = default(CancellationToken), int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)
        {
            return await m_session.SendCommand<SetAutomaticPresenceSimulationCommand, SetAutomaticPresenceSimulationCommandResponse>(command, cancellationToken, millisecondsTimeout, throwExceptionIfResponseNotReceived);
        }

    }
}


text:
using Microsoft.Xna.Framework;
using Ouya.Console.Api;
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Threading.Tasks;
using TrialModeBuddy;

namespace OuyaPurchaseHelper
{
	/// <summary>
	/// This is a thing that does some of the work for the OUYA purchasing api
	/// </summary>
	public class OuyaPurchaseBuddy
	{
		#region Member Variables

		/// <summary>
		/// List of all the products available to this dude
		/// </summary>
		private Task<IList<Product>> TaskRequestProducts = null;

		/// <summary>
		/// whether or not this dude has bought the game
		/// </summary>
		private Task<bool> TaskRequestPurchase = null;

		/// <summary>
		/// The task to get the gamer id
		/// </summary>
		private Task<GamerInfo> TaskRequestGamer = null;

		/// <summary>
		/// The task to get a list of the dude's receipts
		/// </summary>
		private Task<IList<Receipt>> TaskRequestReceipts = null;

		/// <summary>
		/// For purchases all transactions need a unique id
		/// </summary>
		private string m_uniquePurchaseId = string.Empty;

		/// <summary>
		/// Whether or not we already checked all the receipts
		/// </summary>
		public bool ReceiptsChecked { get; private set; }

		/// <summary>
		/// Whether or not the gamer checked.
		/// </summary>
		private bool GamerChecked = false;

		/// <summary>
		/// Whether or not the purchasables checked.
		/// </summary>
		private bool PurchasablesChecked = false;

		/// <summary>
		/// The name of the "full game" item the player can buy.
		/// </summary>
		protected string PurchaseItem { get; set; }

		#endregion //Member Variables

		#region Properties

		/// <summary>
		/// The purchase facade.
		/// </summary>
		public OuyaFacade PurchaseFacade { get; set; }

		#endregion //Properties

		#region Initialization

		/// <summary>
		/// Initializes a new instance of the <see cref="OuyaPurchaseHelper.OuyaPurchaseBuddy"/> class.
		/// </summary>
		/// <param name="game">Game.</param>
		/// <param name="purchasables">Purchasables.</param>
		/// <param name="purchaseFacade">Purchase facade.</param>
		/// <param name="fullGame">This is the name of the item the player purchases to unlock the full version of the game.
		/// This has to match the Identifier of an item on your https://devs.ouya.tv/developers/products page!!!</param>
		public OuyaPurchaseBuddy(Game game, IList<Purchasable> purchasables, OuyaFacade purchaseFacade, string fullGame)
		{
			ReceiptsChecked = false;
			PurchaseItem = fullGame;

			//always start in trial mode
			SetTrialMode(true);

			//Get the list of purchasable items
			this.PurchaseFacade = purchaseFacade;
			TaskRequestProducts = PurchaseFacade.RequestProductListAsync(purchasables);
		}

		/// <summary>
		/// clear this thing out?
		/// </summary>
		void ClearPurchaseId()
		{
			m_uniquePurchaseId = string.Empty;
		}

		/// <summary>
		/// Requests the receipts.
		/// Called once at the beginning of the game.
		/// </summary>
		public void RequestReceipts()
		{
			//get the player uuid
			Debug.WriteLine("Requesting gamer uuid...");
			TaskRequestGamer = PurchaseFacade.RequestGamerInfoAsync();

			//get the receipts
			Debug.WriteLine("Requesting receipts...");
			TaskRequestReceipts = PurchaseFacade.RequestReceiptsAsync();
		}

		#endregion //Initialization

		#region Update and Draw

		/// <summary>
		/// This is a polling method that needs to be called once every update
		/// Checks the status of all our Ouya tasks.
		/// </summary>
		public void Update()
		{
			//If it is't trial mode, don't do any of this other stuff
			if (ReceiptsChecked && !GetTrialMode())
			{
				return;
			}

			//Check on that request products task...
			if ((null != TaskRequestProducts) && !PurchasablesChecked)
			{
				AggregateException exception = TaskRequestProducts.Exception;
				if (null != exception)
				{
					Debug.WriteLine(string.Format("Request Products has exception. {0}", exception));
					TaskRequestProducts.Dispose();
					TaskRequestProducts = null;
				}
				else
				{
					if (TaskRequestProducts.IsCanceled)
					{
						Debug.WriteLine("Request Products has cancelled.");
						PurchasablesChecked = true;
					}
					else if (TaskRequestProducts.IsCompleted)
					{
						Debug.WriteLine("Request Products has completed with results.");
						if (null != TaskRequestProducts.Result)
						{
							//check the last item in the list
							CheckReceipt();
						}
						PurchasablesChecked = true;
					}
				}
			}

			//Check on that purchase task...
			if (null != TaskRequestPurchase)
			{
				AggregateException exception = TaskRequestPurchase.Exception;
				if (null != exception)
				{
					Debug.WriteLine(string.Format("Request Purchase has exception. {0}", exception));
					TaskRequestPurchase.Dispose();
					TaskRequestPurchase = null;
					ClearPurchaseId();
				}
				else
				{
					if (TaskRequestPurchase.IsCanceled)
					{
						Debug.WriteLine("Request Purchase has cancelled.");
						TaskRequestPurchase = null;
						ClearPurchaseId(); //clear the purchase id
					}
					else if (TaskRequestPurchase.IsCompleted)
					{
						if (TaskRequestPurchase.Result)
						{
							//this means they were able to buy it
							Debug.WriteLine("Request Purchase has completed succesfully.");
							SetTrialMode(false);
						}
						else
						{
							Debug.WriteLine("Request Purchase has completed with failure.");
						}
						TaskRequestPurchase = null;
						ClearPurchaseId(); //clear the purchase id
					}
				}
			}

			//Check on our receipt task...
			if ((null != TaskRequestReceipts) && !ReceiptsChecked)
			{
				//Did it blow up?  Clear it out to prevent killing the app.
				AggregateException exception = TaskRequestReceipts.Exception;
				if (null != exception)
				{
					Debug.WriteLine(string.Format("Request Receipts has exception. {0}", exception));
					TaskRequestReceipts.Dispose();
					TaskRequestReceipts = null;
				}
				else
				{
					//If it is still trial mode, check if that thing has completed.
					if (TaskRequestReceipts.IsCanceled)
					{
						Debug.WriteLine("Request Receipts has cancelled.");
						ReceiptsChecked = true;
					}
					else if (TaskRequestReceipts.IsCompleted)
					{
						//Ok, the receipts task has come back with an answer.
						Debug.WriteLine("Request Receipts has completed.");
						if (null != TaskRequestReceipts.Result)
						{
							//check the last item in the list
							CheckReceipt();
						}
						ReceiptsChecked = true;
					}
				}
			}

			// touch exception property to avoid killing app
			if ((null != TaskRequestGamer) && !GamerChecked)
			{
				AggregateException exception = TaskRequestGamer.Exception;
				if (null != exception)
				{
					Debug.WriteLine(string.Format("Request Gamer UUID has exception. {0}", exception));
					TaskRequestGamer.Dispose();
					TaskRequestGamer = null;
				}
				else
				{
					//If it is still trial mode, check if that thing has completed.
					if (TaskRequestGamer.IsCanceled)
					{
						Debug.WriteLine("Request Gamer UUID has cancelled.");
						GamerChecked = true;
					}
					else if (TaskRequestGamer.IsCompleted)
					{
						//ok, the gamer task cam back with an answer...
						Debug.WriteLine("Request Gamer UUID has completed.");

						GamerChecked = true;
					}
				}
			}
		}

		#endregion //Update and Draw

		#region Public Methods

		/// <summary>
		/// Got a message back from Ouya... check the receipt, has the player bought the game already
		/// </summary>
		/// <param name="receiptIndex">Receipt index.</param>
		protected virtual void CheckReceipt()
		{
			//If we've already done this check, don't keep doing it
			if (ReceiptsChecked)
			{
				return;
			}

			Debug.WriteLine("Checking receipts...");

			//Get the text from the receipt
			if ((null != TaskRequestReceipts) &&
			    (null == TaskRequestReceipts.Exception) &&
			    !TaskRequestReceipts.IsCanceled &&
			    TaskRequestReceipts.IsCompleted)
			{
				Debug.WriteLine("Found receipts...");
				if  (null != TaskRequestReceipts.Result)
				{
					bool bFound = false;
					foreach (Receipt receipt in TaskRequestReceipts.Result)
					{
						Debug.WriteLine(string.Format("The receipt item is {0}", receipt.Identifier));
						if (PurchaseItem == receipt.Identifier)
						{
							bFound = true;
							break;
						}
					}

					if (bFound)
					{
						//ok, we got the purchasable item and the receipt for it, so trial mode is OVER
						Debug.WriteLine("Trial mode is over!");
						SetTrialMode(false);
					}
					else
					{
						Debug.WriteLine("Checked receipts, and player has not purchased.");
						SetTrialMode(true);
					}
				}
				else if (null != TaskRequestReceipts.Result)
				{
					Debug.WriteLine(string.Format("Found receipts {0}.", TaskRequestReceipts.Result.Count));
				}
				else
				{
					Debug.WriteLine("No result on the receipts list?");
				}
			}
		}

		/// <summary>
		/// User selected an item to try and buy the full game
		/// </summary>
		/// <param name="sender">Sender.</param>
		/// <param name="e">E.</param>
		public virtual void PurchaseFullVersion()
		{
			if (GetTrialMode())
			{
				if (null != TaskRequestProducts &&
				    null == TaskRequestProducts.Exception &&
				    !TaskRequestProducts.IsCanceled &&
				    TaskRequestProducts.IsCompleted)
				{
					Product product = TaskRequestProducts.Result[0];
					if (string.IsNullOrEmpty(m_uniquePurchaseId))
					{
						m_uniquePurchaseId = Guid.NewGuid().ToString().ToLower();
					}
					TaskRequestPurchase = PurchaseFacade.RequestPurchaseAsync(product);
				}
			}
		}

		/// <summary>
		/// Sets the trial mode flag.
		/// this method gets called when:
		/// 	the player purchases the game
		/// 	we have verified that they already purchased
		/// 	the ouya service gets back to us that they have not purchased
		/// </summary>
		/// <param name="IsTrialMode">If set to <c>true</c> is trial mode.</param>
		public virtual void SetTrialMode(bool bIsTrialMode)
		{
			Guide.IsTrialMode = bIsTrialMode;
		}

		/// <summary>
		/// Gets the trial mode.
		/// </summary>
		/// <returns><c>true</c>, if trial mode was gotten, <c>false</c> otherwise.</returns>
		public virtual bool GetTrialMode()
		{
			return Guide.IsTrialMode;
		}

		#endregion //Public Methods
	}
}

redpajama_set_name: RedPajamaGithub


text:
package org.apache.hc.client5.http.examples;

import java.util.concurrent.Future;
import java.util.concurrent.TimeUnit;

import org.apache.hc.client5.http.async.methods.SimpleHttpRequest;
import org.apache.hc.client5.http.async.methods.SimpleHttpRequests;
import org.apache.hc.client5.http.async.methods.SimpleHttpResponse;
import org.apache.hc.client5.http.async.methods.SimpleRequestProducer;
import org.apache.hc.client5.http.async.methods.SimpleResponseConsumer;
import org.apache.hc.client5.http.impl.async.CloseableHttpAsyncClient;
import org.apache.hc.client5.http.impl.async.HttpAsyncClients;
import org.apache.hc.core5.concurrent.FutureCallback;
import org.apache.hc.core5.http.HttpHost;
import org.apache.hc.core5.io.CloseMode;
import org.apache.hc.core5.reactor.IOReactorConfig;
import org.apache.hc.core5.util.TimeValue;
import org.apache.hc.core5.util.Timeout;

/**
 * Example demonstrating how to evict expired and idle connections
 * from the connection pool.
 */
public class AsyncClientConnectionEviction {

    public static void main(final String[] args) throws Exception {

        final IOReactorConfig ioReactorConfig = IOReactorConfig.custom()
                .setSoTimeout(Timeout.ofSeconds(5))
                .build();

        final CloseableHttpAsyncClient client = HttpAsyncClients.custom()
                .setIOReactorConfig(ioReactorConfig)
                .evictExpiredConnections()
                .evictIdleConnections(TimeValue.ofSeconds(10))
                .build();

        client.start();

        final HttpHost target = new HttpHost("httpbin.org");

        final SimpleHttpRequest request = SimpleHttpRequests.GET.create(target, "/");
        final Future<SimpleHttpResponse> future1 = client.execute(
                SimpleRequestProducer.create(request),
                SimpleResponseConsumer.create(),
                new FutureCallback<SimpleHttpResponse>() {

                    @Override
                    public void completed(final SimpleHttpResponse response) {
                        System.out.println(request.getRequestUri() + "->" + response.getCode());
                        System.out.println(response.getBody());
                    }

                    @Override
                    public void failed(final Exception ex) {
                        System.out.println(request.getRequestUri() + "->" + ex);
                    }

                    @Override
                    public void cancelled() {
                        System.out.println(request.getRequestUri() + " cancelled");
                    }

                });

        future1.get();

        Thread.sleep(TimeUnit.SECONDS.toMillis(30));

        // Previous connection should get evicted from the pool by now

        final Future<SimpleHttpResponse> future2 = client.execute(
                SimpleRequestProducer.create(request),
                SimpleResponseConsumer.create(),
                new FutureCallback<SimpleHttpResponse>() {

                    @Override
                    public void completed(final SimpleHttpResponse response) {
                        System.out.println(request.getRequestUri() + "->" + response.getCode());
                        System.out.println(response.getBody());
                    }

                    @Override
                    public void failed(final Exception ex) {
                        System.out.println(request.getRequestUri() + "->" + ex);
                    }

                    @Override
                    public void cancelled() {
                        System.out.println(request.getRequestUri() + " cancelled");
                    }

                });

        future2.get();

        System.out.println("Shutting down");
        client.shutdown(CloseMode.GRACEFUL);
    }

}


text:
const _ = require('lodash');

let RetryError = function(message) {
    _.bindAll(this);

    this.name = "RetryError";
    this.message = message;
}

RetryError.prototype = new Error();

let AbortError = function(message) {
    _.bindAll(this);

    this.name = "AbortError";
    this.message = message;
}

AbortError.prototype = new Error();

module.exports = {
    'RetryError': RetryError,
    'AbortError': AbortError
};


text:
package main

type Client interface {
	List()
	Add(*NetMap)
	Update()
	Delete()
	Remote()
	Start()
	Stop()
	Restart()
	Pause()
}

type NetMap struct {
	Protocol string
	From     string
	To       string
	Listen   string
	LogFile  string
}

func NewClient(cfg *CliConfig) (client Client) {
	switch cfg.Protocol {
	case "Restful":
		client = &RestfulClient{ cfg : cfg }
	default:
		client = &RestfulClient{ cfg : cfg }
	}
	return
}


text:
// Copyright (c) 2008-2022, Hazelcast, Inc. All Rights Reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

// <auto-generated>
//   This code was generated by a tool.
//     Hazelcast Client Protocol Code Generator
//     https://github.com/hazelcast/hazelcast-client-protocol
//   Change to this file will be lost if the code is regenerated.
// </auto-generated>

#pragma warning disable IDE0051 // Remove unused private members
// ReSharper disable UnusedMember.Local
// ReSharper disable RedundantUsingDirective
// ReSharper disable CheckNamespace

using System;
using System.Threading;
using System.Threading.Tasks;
using System.Collections.Generic;
using Hazelcast.Protocol.BuiltInCodecs;
using Hazelcast.Protocol.CustomCodecs;
using Hazelcast.Core;
using Hazelcast.Messaging;
using Hazelcast.Clustering;
using Hazelcast.Serialization;
using Microsoft.Extensions.Logging;

namespace Hazelcast.Protocol.Codecs
{
    ///
    /// Adds an item listener for this collection. Listener will be notified for all collection add/remove events.
    ///
#if SERVER_CODEC
    internal static class ListAddListenerServerCodec
#else
    internal static class ListAddListenerCodec
#endif
    {
        public const int RequestMessageType = 330496; // 0x050B00
        public const int ResponseMessageType = 330497; // 0x050B01
        private const int RequestIncludeValueFieldOffset = Messaging.FrameFields.Offset.PartitionId + BytesExtensions.SizeOfInt;
        private const int RequestLocalOnlyFieldOffset = RequestIncludeValueFieldOffset + BytesExtensions.SizeOfBool;
        private const int RequestInitialFrameSize = RequestLocalOnlyFieldOffset + BytesExtensions.SizeOfBool;
        private const int ResponseResponseFieldOffset = Messaging.FrameFields.Offset.ResponseBackupAcks + BytesExtensions.SizeOfByte;
        private const int ResponseInitialFrameSize = ResponseResponseFieldOffset + BytesExtensions.SizeOfGuid;
        private const int EventItemUuidFieldOffset = Messaging.FrameFields.Offset.PartitionId + BytesExtensions.SizeOfInt;
        private const int EventItemEventTypeFieldOffset = EventItemUuidFieldOffset + BytesExtensions.SizeOfGuid;
        private const int EventItemInitialFrameSize = EventItemEventTypeFieldOffset + BytesExtensions.SizeOfInt;
        private const int EventItemMessageType = 330498; // 0x050B02

#if SERVER_CODEC
        public sealed class RequestParameters
        {

            ///
            /// Name of the List
            ///
            public string Name { get; set; }

            ///
            /// Set to true if you want the event to contain the value.
            ///
            public bool IncludeValue { get; set; }

            ///
            /// if true fires events that originated from this node only, otherwise fires all events
            ///
            public bool LocalOnly { get; set; }
        }
#endif

        public static ClientMessage EncodeRequest(string name, bool includeValue, bool localOnly)
        {
            var clientMessage = new ClientMessage
            {
                IsRetryable = false,
                OperationName = "List.AddListener"
            };
            var initialFrame = new Frame(new byte[RequestInitialFrameSize], (FrameFlags) ClientMessageFlags.Unfragmented);
            initialFrame.Bytes.WriteIntL(Messaging.FrameFields.Offset.MessageType, RequestMessageType);
            initialFrame.Bytes.WriteIntL(Messaging.FrameFields.Offset.PartitionId, -1);
            initialFrame.Bytes.WriteBoolL(RequestIncludeValueFieldOffset, includeValue);
            initialFrame.Bytes.WriteBoolL(RequestLocalOnlyFieldOffset, localOnly);
            clientMessage.Append(initialFrame);
            StringCodec.Encode(clientMessage, name);
            return clientMessage;
        }

#if SERVER_CODEC
        public static RequestParameters DecodeRequest(ClientMessage clientMessage)
        {
            using var iterator = clientMessage.GetEnumerator();
            var request = new RequestParameters();
            var initialFrame = iterator.Take();
            request.IncludeValue = initialFrame.Bytes.ReadBoolL(RequestIncludeValueFieldOffset);
            request.LocalOnly = initialFrame.Bytes.ReadBoolL(RequestLocalOnlyFieldOffset);
            request.Name = StringCodec.Decode(iterator);
            return request;
        }
#endif

        public sealed class ResponseParameters
        {

            ///
            /// Registration id for the listener.
            ///
            public Guid Response { get; set; }
        }

#if SERVER_CODEC
        public static ClientMessage EncodeResponse(Guid response)
        {
            var clientMessage = new ClientMessage();
            var initialFrame = new Frame(new byte[ResponseInitialFrameSize], (FrameFlags) ClientMessageFlags.Unfragmented);
            initialFrame.Bytes.WriteIntL(Messaging.FrameFields.Offset.MessageType, ResponseMessageType);
            initialFrame.Bytes.WriteGuidL(ResponseResponseFieldOffset, response);
            clientMessage.Append(initialFrame);
            return clientMessage;
        }
#endif

        public static ResponseParameters DecodeResponse(ClientMessage clientMessage)
        {
            using var iterator = clientMessage.GetEnumerator();
            var response = new ResponseParameters();
            var initialFrame = iterator.Take();
            response.Response = initialFrame.Bytes.ReadGuidL(ResponseResponseFieldOffset);
            return response;
        }

#if SERVER_CODEC
        public static ClientMessage EncodeItemEvent(IData item, Guid uuid, int eventType)
        {
            var clientMessage = new ClientMessage();
            var initialFrame = new Frame(new byte[EventItemInitialFrameSize], (FrameFlags) ClientMessageFlags.Unfragmented);
            initialFrame.Bytes.WriteIntL(Messaging.FrameFields.Offset.MessageType, EventItemMessageType);
            initialFrame.Bytes.WriteIntL(Messaging.FrameFields.Offset.PartitionId, -1);
            initialFrame.Bytes.WriteGuidL(EventItemUuidFieldOffset, uuid);
            initialFrame.Bytes.WriteIntL(EventItemEventTypeFieldOffset, eventType);
            clientMessage.Append(initialFrame);
            clientMessage.Flags |= ClientMessageFlags.Event;
            CodecUtil.EncodeNullable(clientMessage, item, DataCodec.Encode);
            return clientMessage;
        }
#endif
        public static ValueTask HandleEventAsync(ClientMessage clientMessage, Func<IData, Guid, int, object, ValueTask> handleItemEventAsync, object state, ILoggerFactory loggerFactory)
        {
            using var iterator = clientMessage.GetEnumerator();
            var messageType = clientMessage.MessageType;
            if (messageType == EventItemMessageType)
            {
                var initialFrame = iterator.Take();
                var uuid =  initialFrame.Bytes.ReadGuidL(EventItemUuidFieldOffset);
                var eventType =  initialFrame.Bytes.ReadIntL(EventItemEventTypeFieldOffset);
                var item = CodecUtil.DecodeNullable(iterator, DataCodec.Decode);
                return handleItemEventAsync(item, uuid, eventType, state);
            }
            loggerFactory.CreateLogger(typeof(EventHandler)).LogDebug("Unknown message type received on event handler :" + messageType);
            return default;
        }
    }
}


text:
create table ACT_HI_TSK_LOG (
  ID_ numeric(19,0) IDENTITY (1,1),
  TYPE_ nvarchar(64),
  TASK_ID_ nvarchar(64) not null,
  TIME_STAMP_ datetime not null,
  USER_ID_ nvarchar(255),
  DATA_ nvarchar(4000),
  EXECUTION_ID_ nvarchar(64),
  PROC_INST_ID_ nvarchar(64),
  PROC_DEF_ID_ nvarchar(64),
  SCOPE_ID_ nvarchar(255),
  SCOPE_DEFINITION_ID_ nvarchar(255),
  SUB_SCOPE_ID_ nvarchar(255),
  SCOPE_TYPE_ nvarchar(255),
  TENANT_ID_ nvarchar(255) default '',
  primary key (ID_)
);

create table ACT_RU_ENTITYLINK (
    ID_ nvarchar(64),
    REV_ int,
    CREATE_TIME_ datetime,
    LINK_TYPE_ nvarchar(255),
    SCOPE_ID_ nvarchar(255),
    SCOPE_TYPE_ nvarchar(255),
    SCOPE_DEFINITION_ID_ nvarchar(255),
    REF_SCOPE_ID_ nvarchar(255),
    REF_SCOPE_TYPE_ nvarchar(255),
    REF_SCOPE_DEFINITION_ID_ nvarchar(255),
    HIERARCHY_TYPE_ nvarchar(255),
    primary key (ID_)
);

create index ACT_IDX_ENT_LNK_SCOPE on ACT_RU_ENTITYLINK(SCOPE_ID_, SCOPE_TYPE_, LINK_TYPE_);
create index ACT_IDX_ENT_LNK_SCOPE_DEF on ACT_RU_ENTITYLINK(SCOPE_DEFINITION_ID_, SCOPE_TYPE_, LINK_TYPE_);

create table ACT_HI_ENTITYLINK (
    ID_ nvarchar(64),
    LINK_TYPE_ nvarchar(255),
    CREATE_TIME_ datetime,
    SCOPE_ID_ nvarchar(255),
    SCOPE_TYPE_ nvarchar(255),
    SCOPE_DEFINITION_ID_ nvarchar(255),
    REF_SCOPE_ID_ nvarchar(255),
    REF_SCOPE_TYPE_ nvarchar(255),
    REF_SCOPE_DEFINITION_ID_ nvarchar(255),
    HIERARCHY_TYPE_ nvarchar(255),
    primary key (ID_)
);

create index ACT_IDX_HI_ENT_LNK_SCOPE on ACT_HI_ENTITYLINK(SCOPE_ID_, SCOPE_TYPE_, LINK_TYPE_);
create index ACT_IDX_HI_ENT_LNK_SCOPE_DEF on ACT_HI_ENTITYLINK(SCOPE_DEFINITION_ID_, SCOPE_TYPE_, LINK_TYPE_);

update ACT_GE_PROPERTY set VALUE_ = '6.4.1.3' where NAME_ = 'common.schema.version';

update ACT_GE_PROPERTY set VALUE_ = '6.4.1.3' where NAME_ = 'task.schema.version';

insert into ACT_GE_PROPERTY values ('entitylink.schema.version', '6.4.1.3', 1);

update ACT_GE_PROPERTY set VALUE_ = '6.4.1.3' where NAME_ = 'job.schema.version';

update ACT_GE_PROPERTY set VALUE_ = '6.4.1.3' where NAME_ = 'identitylink.schema.version';

update ACT_GE_PROPERTY set VALUE_ = '6.4.1.3' where NAME_ = 'variable.schema.version';


text:
import scala.reflect.runtime.universe._

object Test extends App {
  println(implicitly[TypeTag[Int]])
  println(implicitly[TypeTag[List[Int]]])
}


text:
<!-- Needs Manual Review -->

# Oatmeal Raisin Cookies

<!-- {cts} rating=2; (User can specify rating on scale of 1-5) -->

Personal rating: :fontawesome-solid-star: :fontawesome-solid-star: :fontawesome-solid-star: :fontawesome-solid-star: :fontawesome-solid-star: :fontawesome-regular-star: :fontawesome-regular-star: :fontawesome-regular-star:

<!-- {cte} -->

<!-- {cts} name_image=oatmeal_raisin_cookies.jpg; (User can specify image name) -->

![oatmeal_raisin_cookies.jpg](./oatmeal_raisin_cookies.jpg){: .image-recipe loading=lazy }

<!-- {cte} -->

## Ingredients

* [ ] 1 - In a medium bowl, whisk:
    * [ ] 1.75 cups flour
    * [ ] 3/4 tsp baking soda
    * [ ] 3/4 tsp baking powder
    * [ ] 1/2 tsp salt
    * [ ] 1/2 tsp ground cinnamon
    * [ ] 1/2 tsp nutmeg
* [ ] 2 - In a large bowl, combine:
    * [ ] 2 sticks butter, room temperature
    * [ ] 1/4 cup sugar
    * [ ] 1.5 cups brown sugar, packed
    * [ ] 2 eggs
    * [ ] 2.5 tsp vanilla
* [ ] 3 - (Combine both bowls) then add:
    * [ ] 3.5 cups oatmeal
    * [ ] 1 cup raisins

## Recipe

* Preheat oven to 350F
* Whisk part 1. With a wooden spoon combine part 2. Then in the large bowl, combine 1 and 2 then 3
* Bake for 12 minutes (or 14 from frozen) on a light colored cooking sheet. When done, let sit for a few minutes then place on a cooling rack

## Notes

* Source: page 767-768 of the Joy of Cooking
* I typically bake half (1 cookie sheet of 16-24 cookies) then freeze the rest of the dough to make at a later date
* Also see the main cookie recipe: [Chocolate Chip Cookies](./chocolate_chip_cookies.md)


text:
package tol.j2cl.elem.dom;

import jsinterop.annotations.JsProperty;

/**
 * A MutationRecord represents an individual DOM mutation. It is the object that is passed to
 * MutationObserver's callback.
 *
 * @see W3C
 * @see Mozilla
 */
public interface MutationRecord {

  @JsProperty
  public String getType();

  @JsProperty
  public Node getTarget();

  @JsProperty
  public NodeList<Node> getAddedNodes();

  @JsProperty
  public NodeList<Node> getRemovedNodes();

  @JsProperty
  public Node getPreviousSibling();

  @JsProperty
  public Node getNextSibling();

  @JsProperty
  public String getAttributeName();

  @JsProperty
  public String getAttributeNamespace();

  @JsProperty
  public String getOldValue();
}


text:
<?xml version="1.0" encoding="UTF-8"?>
<extentreports>
    <configuration>
		<!-- document encoding -->
		<!-- defaults to UTF-8 -->
		<encoding>UTF-8</encoding>

		<!-- protocol for script and stylesheets -->
		<!-- defaults to https -->
		<protocol>https</protocol>

        <!-- title of the document -->
        <documentTitle>Log4Reports Reports</documentTitle>

        <!-- report name - displayed at top-nav -->
        <reportName>Automation Testing Reports</reportName>

        <!-- report headline - displayed at top-nav, after reportHeadline -->
        <reportHeadline></reportHeadline>

        <!-- global date format override -->
        <!-- defaults to yyyy-MM-dd -->
        <dateFormat>yyyy-MM-dd</dateFormat>

        <!-- global time format override -->
        <!-- defaults to HH:mm:ss -->
        <timeFormat>HH:mm:ss</timeFormat>

        <!-- custom javascript -->
        <scripts>
            <![CDATA[
                $(document).ready(function() {

                });
            ]]>
        </scripts>

        <!-- custom styles -->
        <styles>
            <![CDATA[

            ]]>
        </styles>
    </configuration>
</extentreports>


text:
require 'chamber/context_resolver'

module  Chamber
class   Configuration
  attr_accessor :basepath,
                :decryption_keys,
                :encryption_keys,
                :files,
                :namespaces,
                :rootpath,
                :signature_name

  def initialize(**args)
    options              = ContextResolver.resolve(**args)

    self.basepath        = options.fetch(:basepath)
    self.namespaces      = options.fetch(:namespaces)
    self.decryption_keys = options.fetch(:decryption_keys)
    self.encryption_keys = options.fetch(:encryption_keys)
    self.files           = options.fetch(:files)
    self.rootpath        = options.fetch(:rootpath)
    self.signature_name  = options.fetch(:signature_name)
  end

  def to_hash
    {
      basepath:        basepath,
      decryption_keys: decryption_keys,
      encryption_keys: encryption_keys,
      files:           files,
      namespaces:      namespaces,
      signature_name:  signature_name,
    }
  end
end
end


text:
package com.aspose.words.examples.asposefeatures.workingwithdocument.workingwithdigitalsignature;

import java.io.File;

import com.aspose.words.FileFormatInfo;
import com.aspose.words.FileFormatUtil;
import com.aspose.words.examples.Utils;

public class AsposeDigitalSignatures
{
    public static void main(String[] args) throws Exception
    {
        // The path to the documents directory.
        String dataDir = Utils.getDataDir(AsposeDigitalSignatures.class);

        // The path to the document which is to be processed.
        String filePath = dataDir + "document.docx";

        FileFormatInfo info = FileFormatUtil.detectFileFormat(filePath);
        if (info.hasDigitalSignature())
        {
            System.out.println(java.text.MessageFormat.format(
                    "Document {0} has digital signatures, they will be lost if you open/save this document with Aspose.Words.",
                    new File(filePath).getName()));
        }
        else
        {
            System.out.println("Document has no digital signature.");
        }
        System.out.println("Process Completed Successfully");
    }
}


text:
package org.apache.hadoop.hive.serde2.objectinspector.primitive;

import org.apache.hadoop.hive.serde2.objectinspector.ConstantObjectInspector;
import org.apache.hadoop.io.LongWritable;

/**
 * This class will be in Hive code base begin 1.2.0 (HIVE-9766).
 * Will remove once we switch to use Hive 1.2.0
 */
public class JavaConstantLongObjectInspector extends JavaLongObjectInspector
    implements ConstantObjectInspector {
  private Long value;

  public JavaConstantLongObjectInspector(Long value) {
    super();
    this.value = value;
  }

  @Override
  public Object getWritableConstantValue() {
    if (value==null) {
      return null;
    }
    return new LongWritable(value);
  }
}


text:
<?php

namespace Zend\Filter\Word;

class DashToSeparator extends AbstractSeparator
{
    /**
     * Defined by Zend\Filter\Filter
     *
     * @param  string $value
     * @return string
     */
    public function filter($value)
    {
        return preg_replace('#-#', $this->separator, $value);
    }
}


text:
<script>

logArea = function(action, id, value, obj){
	var type;

	if(value == undefined)
		value = "";

	var div = document.getElementById("logArea");
	if(obj == undefined)
		person = '<?php  echo $msgs->getText('logArea.owner'); ?>';
	else
		person = users[obj.idUser];

	//POSITION
	if(action == "updatePosition"){
		if(id.indexOf('box') != -1){
			div.appendChild(document.createTextNode(" <?php  echo $msgs->getText('logArea.updateTextPosition'); ?> "+person));
			div.appendChild(document.createElement("br"));
			type = 'box';
		}
		else if(id.indexOf('video') != -1){
			div.appendChild(document.createTextNode(" <?php  echo $msgs->getText('logArea.updateVideoPosition'); ?> "+person));
			div.appendChild(document.createElement("br"));
			type = 'video';
		}
		else if(id.indexOf('image') != -1){
			div.appendChild(document.createTextNode(" <?php  echo $msgs->getText('logArea.updateImagePosition'); ?> "+person));
			div.appendChild(document.createElement("br"));
			type = 'image';
		}
	} //DIMENSION
	else if(action == "updateDimension"){
		if(id.indexOf('box') != -1){
			div.appendChild(document.createTextNode(" <?php  echo $msgs->getText('logArea.updateTextDimension'); ?> "+person));
			div.appendChild(document.createElement("br"));
			type = 'box';
		}
		else if(id.indexOf('video') != -1){
			div.appendChild(document.createTextNode(" <?php  echo $msgs->getText('logArea.updateVideoDimension'); ?> "+person));
			div.appendChild(document.createElement("br"));
			type = 'video';
		}
		else if(id.indexOf('image') != -1){
			div.appendChild(document.createTextNode(" <?php  echo $msgs->getText('logArea.updateImageDimension'); ?> "+person));
			div.appendChild(document.createElement("br"));
			type = 'image';
		}
	} //UPDATE CONTENT
	else if(action == "updateText"){
		if(id.indexOf('box') != -1){
			div.appendChild(document.createTextNode(" <?php  echo $msgs->getText('logArea.updateTextContent'); ?> "+person));
			div.appendChild(document.createElement("br"));
			type = 'box';
		}
		else if(id.indexOf('video') != -1){
			div.appendChild(document.createTextNode(" <?php  echo $msgs->getText('logArea.updateVideoContent'); ?> "+person));
			div.appendChild(document.createElement("br"));
			type = 'video';
		}
		else if(id.indexOf('image') != -1){
			div.appendChild(document.createTextNode(" <?php  echo $msgs->getText('logArea.updateImageContent'); ?> "+person));
			div.appendChild(document.createElement("br"));
			type = 'image';
		}
	} //NEW ELEMENT
	else if(action == "newElement"){
		if(id.indexOf('box') != -1){
			div.appendChild(document.createTextNode(" <?php  echo $msgs->getText('logArea.newText'); ?> "+person));
			div.appendChild(document.createElement("br"));
			type = 'box';
		}
		else if(id.indexOf('video') != -1){
			div.appendChild(document.createTextNode(" <?php  echo $msgs->getText('logArea.newVideo'); ?> "+person));
			div.appendChild(document.createElement("br"));
			type = 'video';
		}
		else if(id.indexOf('image') != -1){
			div.appendChild(document.createTextNode(" <?php  echo $msgs->getText('logArea.newImage'); ?> "+person));
			div.appendChild(document.createElement("br"));
			type = 'image';
		}
	}
	else if(action == "removeElement"){
		if(id.indexOf('box') != -1){
			div.appendChild(document.createTextNode(" <?php  echo $msgs->getText('logArea.rmvText'); ?> "+person));
			div.appendChild(document.createElement("br"));
			type = 'box';
		}
		else if(id.indexOf('video') != -1){
			div.appendChild(document.createTextNode(" <?php  echo $msgs->getText('logArea.rmvVideo'); ?> "+person));
			div.appendChild(document.createElement("br"));
			type = 'video';
		}
		else if(id.indexOf('image') != -1){
			div.appendChild(document.createTextNode(" <?php  echo $msgs->getText('logArea.rmvImage'); ?> "+person));
			div.appendChild(document.createElement("br"));
			type = 'image';
		}
	}
	value = libReplaceAll(value,'"','"');

	if(person == '<?php  echo $msgs->getText('logArea.owner'); ?>'){
	var message = '{"op":"productionHistory",'
				  +'"action":"'+action+'", '
				  +'"idProduction":"'+idProduction+'",'
				  +'"idUser":"'+idUser+'",'
				  +'"type":"'+type+'",'
				  +'"nameUser":"'+users[idUser]+'",'
				  +'"value":"'+value+'"}';
	ws.send(message);
	}

	// Put the content to bottom
	var divLogContent = document.getElementById("logArea");
	divLogContent.scrollTop = divLogContent.scrollHeight;
}

reloadLogArea = function(action, id, value, name){
	var type;

	if(value == undefined)
		value = "";

	var div = document.getElementById("logArea");
	if(name == users[idUser])
		person = '<?php  echo $msgs->getText('logArea.owner'); ?>';
	else
		person = name;

	//POSITION
	if(action == "updatePosition"){
		if(id.indexOf('box') != -1){
			div.appendChild(document.createTextNode(" <?php  echo $msgs->getText('logArea.updateTextPosition'); ?> "+person));
			div.appendChild(document.createElement("br"));
			type = 'box';
		}
		else if(id.indexOf('video') != -1){
			div.appendChild(document.createTextNode(" <?php  echo $msgs->getText('logArea.updateVideoPosition'); ?> "+person));
			div.appendChild(document.createElement("br"));
			type = 'video';
		}
		else if(id.indexOf('image') != -1){
			div.appendChild(document.createTextNode(" <?php  echo $msgs->getText('logArea.updateImagePosition'); ?> "+person));
			div.appendChild(document.createElement("br"));
			type = 'image';
		}
	} //DIMENSION
	else if(action == "updateDimension"){
		if(id.indexOf('box') != -1){
			div.appendChild(document.createTextNode(" <?php  echo $msgs->getText('logArea.updateTextDimension'); ?> "+person));
			div.appendChild(document.createElement("br"));
			type = 'box';
		}
		else if(id.indexOf('video') != -1){
			div.appendChild(document.createTextNode(" <?php  echo $msgs->getText('logArea.updateVideoDimension'); ?> "+person));
			div.appendChild(document.createElement("br"));
			type = 'video';
		}
		else if(id.indexOf('image') != -1){
			div.appendChild(document.createTextNode(" <?php  echo $msgs->getText('logArea.updateImageDimension'); ?> "+person));
			div.appendChild(document.createElement("br"));
			type = 'image';
		}
	} //UPDATE CONTENT
	else if(action == "updateText"){
		if(id.indexOf('box') != -1){
			div.appendChild(document.createTextNode(" <?php  echo $msgs->getText('logArea.updateTextContent'); ?> "+person));
			div.appendChild(document.createElement("br"));
			type = 'box';
		}
		else if(id.indexOf('video') != -1){
			div.appendChild(document.createTextNode(" <?php  echo $msgs->getText('logArea.updateVideoContent'); ?> "+person));
			div.appendChild(document.createElement("br"));
			type = 'video';
		}
		else if(id.indexOf('image') != -1){
			div.appendChild(document.createTextNode(" <?php  echo $msgs->getText('logArea.updateImageContent'); ?> "+person));
			div.appendChild(document.createElement("br"));
			type = 'image';
		}
	} //NEW ELEMENT
	else if(action == "newElement"){
		if(id.indexOf('box') != -1){
			div.appendChild(document.createTextNode(" <?php  echo $msgs->getText('logArea.newText'); ?> "+person));
			div.appendChild(document.createElement("br"));
			type = 'box';
		}
		else if(id.indexOf('video') != -1){
			div.appendChild(document.createTextNode(" <?php  echo $msgs->getText('logArea.newVideo'); ?> "+person));
			div.appendChild(document.createElement("br"));
			type = 'video';
		}
		else if(id.indexOf('image') != -1){
			div.appendChild(document.createTextNode(" <?php  echo $msgs->getText('logArea.newImage'); ?> "+person));
			div.appendChild(document.createElement("br"));
			type = 'image';
		}
	}
	else if(action == "removeElement"){
		if(id.indexOf('box') != -1){
			div.appendChild(document.createTextNode(" <?php  echo $msgs->getText('logArea.rmvText'); ?> "+person));
			div.appendChild(document.createElement("br"));
			type = 'box';
		}
		else if(id.indexOf('video') != -1){
			div.appendChild(document.createTextNode(" <?php  echo $msgs->getText('logArea.rmvVideo'); ?> "+person));
			div.appendChild(document.createElement("br"));
			type = 'video';
		}
		else if(id.indexOf('image') != -1){
			div.appendChild(document.createTextNode(" <?php  echo $msgs->getText('logArea.rmvImage'); ?> "+person));
			div.appendChild(document.createElement("br"));
			type = 'image';
		}
	}

	// Put the content to bottom
	var divLogContent = document.getElementById("logArea");
	divLogContent.scrollTop = divLogContent.scrollHeight;
}

/**
 * Appending the text into the chat content area
 *
 * @param String : A text to be appending
 */
function appendText(user, text){
	var bold = document.createElement("B");
	var br = document.createElement("br");
	bold.appendChild(document.createTextNode(user+" <?php  echo $msgs->getText('chat.Say'); ?>"));
	var txtNode = document.createTextNode(": " +  text);
	var divChatContent = document.getElementById("chatContent");
	divChatContent.appendChild(bold);
	divChatContent.appendChild(txtNode);
	divChatContent.appendChild(br);

	// Put the content to bottom
	var divChatContent = document.getElementById("chatContent");
	divChatContent.scrollTop = divChatContent.scrollHeight;
}

function getLabelDeleteElement() {
	var label = '<?php echo $msgs->getText('delete.label'); ?>';
	return label;
}

function getLabelCancelInsertion() {
	var label = '<?php echo $msgs->getText('cancel.label'); ?>';
	return label;
}
</script>


text:
.class public Landroid/hardware/radio/RadioManager$AmBandConfig;
.super Landroid/hardware/radio/RadioManager$BandConfig;
.source "RadioManager.java"

# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
    value = Landroid/hardware/radio/RadioManager;
.end annotation

.annotation system Ldalvik/annotation/InnerClass;
    accessFlags = 0x9
    name = "AmBandConfig"
.end annotation

.annotation system Ldalvik/annotation/MemberClasses;
    value = {
        Landroid/hardware/radio/RadioManager$AmBandConfig$1;,
        Landroid/hardware/radio/RadioManager$AmBandConfig$Builder;
    }
.end annotation

# static fields
.field public static final CREATOR:Landroid/os/Parcelable$Creator;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Landroid/os/Parcelable$Creator",
            "<",
            "Landroid/hardware/radio/RadioManager$AmBandConfig;",
            ">;"
        }
    .end annotation
.end field

# instance fields
.field private final mStereo:Z

# direct methods
.method static constructor <clinit>()V
    .locals 1

    new-instance v0, Landroid/hardware/radio/RadioManager$AmBandConfig$1;

    invoke-direct {v0}, Landroid/hardware/radio/RadioManager$AmBandConfig$1;-><init>()V

    sput-object v0, Landroid/hardware/radio/RadioManager$AmBandConfig;->CREATOR:Landroid/os/Parcelable$Creator;

    return-void
.end method

.method constructor <init>(IIIIIZ)V
    .locals 0

    invoke-direct/range {p0 .. p5}, Landroid/hardware/radio/RadioManager$BandConfig;-><init>(IIIII)V

    iput-boolean p6, p0, Landroid/hardware/radio/RadioManager$AmBandConfig;->mStereo:Z

    return-void
.end method

.method constructor <init>(Landroid/hardware/radio/RadioManager$AmBandDescriptor;)V
    .locals 1

    invoke-direct {p0, p1}, Landroid/hardware/radio/RadioManager$BandConfig;-><init>(Landroid/hardware/radio/RadioManager$BandDescriptor;)V

    invoke-virtual {p1}, Landroid/hardware/radio/RadioManager$AmBandDescriptor;->isStereoSupported()Z

    move-result v0

    iput-boolean v0, p0, Landroid/hardware/radio/RadioManager$AmBandConfig;->mStereo:Z

    return-void
.end method

.method private constructor <init>(Landroid/os/Parcel;)V
    .locals 2

    const/4 v0, 0x1

    const/4 v1, 0x0

    invoke-direct {p0, p1, v1}, Landroid/hardware/radio/RadioManager$BandConfig;-><init>(Landroid/os/Parcel;Landroid/hardware/radio/RadioManager$BandConfig;)V

    invoke-virtual {p1}, Landroid/os/Parcel;->readByte()B

    move-result v1

    if-ne v1, v0, :cond_0

    :goto_0
    iput-boolean v0, p0, Landroid/hardware/radio/RadioManager$AmBandConfig;->mStereo:Z

    return-void

    :cond_0
    const/4 v0, 0x0

    goto :goto_0
.end method

.method synthetic constructor <init>(Landroid/os/Parcel;Landroid/hardware/radio/RadioManager$AmBandConfig;)V
    .locals 0

    invoke-direct {p0, p1}, Landroid/hardware/radio/RadioManager$AmBandConfig;-><init>(Landroid/os/Parcel;)V

    return-void
.end method

# virtual methods
.method public describeContents()I
    .locals 1

    const/4 v0, 0x0

    return v0
.end method

.method public equals(Ljava/lang/Object;)Z
    .locals 5

    const/4 v4, 0x1

    const/4 v3, 0x0

    if-ne p0, p1, :cond_0

    return v4

    :cond_0
    invoke-super {p0, p1}, Landroid/hardware/radio/RadioManager$BandConfig;->equals(Ljava/lang/Object;)Z

    move-result v1

    if-nez v1, :cond_1

    return v3

    :cond_1
    instance-of v1, p1, Landroid/hardware/radio/RadioManager$AmBandConfig;

    if-nez v1, :cond_2

    return v3

    :cond_2
    move-object v0, p1

    check-cast v0, Landroid/hardware/radio/RadioManager$AmBandConfig;

    iget-boolean v1, p0, Landroid/hardware/radio/RadioManager$AmBandConfig;->mStereo:Z

    invoke-virtual {v0}, Landroid/hardware/radio/RadioManager$AmBandConfig;->getStereo()Z

    move-result v2

    if-eq v1, v2, :cond_3

    return v3

    :cond_3
    return v4
.end method

.method public getStereo()Z
    .locals 1

    iget-boolean v0, p0, Landroid/hardware/radio/RadioManager$AmBandConfig;->mStereo:Z

    return v0
.end method

.method public hashCode()I
    .locals 4

    const/16 v0, 0x1f

    invoke-super {p0}, Landroid/hardware/radio/RadioManager$BandConfig;->hashCode()I

    move-result v1

    mul-int/lit8 v3, v1, 0x1f

    iget-boolean v2, p0, Landroid/hardware/radio/RadioManager$AmBandConfig;->mStereo:Z

    if-eqz v2, :cond_0

    const/4 v2, 0x1

    :goto_0
    add-int v1, v3, v2

    return v1

    :cond_0
    const/4 v2, 0x0

    goto :goto_0
.end method

.method public toString()Ljava/lang/String;
    .locals 2

    new-instance v0, Ljava/lang/StringBuilder;

    invoke-direct {v0}, Ljava/lang/StringBuilder;-><init>()V

    const-string/jumbo v1, "AmBandConfig ["

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v0

    invoke-super {p0}, Landroid/hardware/radio/RadioManager$BandConfig;->toString()Ljava/lang/String;

    move-result-object v1

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v0

    const-string/jumbo v1, ", mStereo="

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v0

    iget-boolean v1, p0, Landroid/hardware/radio/RadioManager$AmBandConfig;->mStereo:Z

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Z)Ljava/lang/StringBuilder;

    move-result-object v0

    const-string/jumbo v1, "]"

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v0

    invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v0

    return-object v0
.end method

.method public writeToParcel(Landroid/os/Parcel;I)V
    .locals 1

    invoke-super {p0, p1, p2}, Landroid/hardware/radio/RadioManager$BandConfig;->writeToParcel(Landroid/os/Parcel;I)V

    iget-boolean v0, p0, Landroid/hardware/radio/RadioManager$AmBandConfig;->mStereo:Z

    if-eqz v0, :cond_0

    const/4 v0, 0x1

    :goto_0
    int-to-byte v0, v0

    invoke-virtual {p1, v0}, Landroid/os/Parcel;->writeByte(B)V

    return-void

    :cond_0
    const/4 v0, 0x0

    goto :goto_0
.end method


text:
module UserDetailsHelper

  #
  # Use this to wrap view elements that the user_detail can't access.
  # !! Note: this is an *interface*, not *security* feature !!
  # You need to do all access control at the controller level.
  #
  # Example:
  # <%= if_authorized?(:index,   user_detail)  do link_to('List all users', users_path) end %> |
  # <%= if_authorized?(:edit,    @user_detail) do link_to('Edit this user_detail', edit_user_detail_path) end %> |
  # <%= if_authorized?(:destroy, @user_detail) do link_to 'Destroy', @user_detail, :confirm => 'Are you sure?', :method => :delete end %>
  #
  #
  def if_authorized?(action, resource, &block)
    if authorized?(action, resource)
      yield action, resource
    end
  end

  #
  # Link to user_detail's page ('users/1')
  #
  # By default, their login is used as link text and link title (tooltip)
  #
  # Takes options
  # * :content_text => 'Content text in place of user_detail.login', escaped with
  #   the standard h() function.
  # * :content_method => :user_detail_instance_method_to_call_for_content_text
  # * :title_method => :user_detail_instance_method_to_call_for_title_attribute
  # * as well as link_to()'s standard options
  #
  # Examples:
  #   link_to_user @user_detail
  #   # => barmy
  #
  #   # if you've added a .name attribute:
  #  content_tag :span, :class => :vcard do
  #    (link_to_user_detail user_detail, :class => 'fn n', :title_method => :login, :content_method => :name) +
  #          ': ' + (content_tag :span, user_detail.email, :class => 'email')
  #   end
  #   # => Cyril Fotheringay-Phipps: barmy@blandings.com
  #
  #   link_to_user @user_detail, :content_text => 'Your user_detail page'
  #   # => Your user_detail page
  #
  def link_to_user_detail(user_detail, options={})
    raise "Invalid user_detail" unless user_detail
    options.reverse_merge! :content_method => :login, :title_method => :login, :class => :nickname
    content_text      = options.delete(:content_text)
    content_text    ||= user_detail.send(options.delete(:content_method))
    options[:title] ||= user_detail.send(options.delete(:title_method))
    link_to h(content_text), user_detail_path(user_detail), options
  end

  #
  # Link to login page using remote ip address as link content
  #
  # The :title (and thus, tooltip) is set to the IP address
  #
  # Examples:
  #   link_to_login_with_IP
  #   # => 169.69.69.69
  #
  #   link_to_login_with_IP :content_text => 'not signed in'
  #   # => not signed in
  #
  def link_to_login_with_IP content_text=nil, options={}
    ip_addr           = request.remote_ip
    content_text    ||= ip_addr
    options.reverse_merge! :title => ip_addr
    if tag = options.delete(:tag)
      content_tag tag, h(content_text), options
    else
      link_to h(content_text), login_path, options
    end
  end

  #
  # Link to the current user_detail's page (using link_to_user) or to the login page
  # (using link_to_login_with_IP).
  #
  def link_to_current_user_detail(options={})
    if current_user
      link_to_user_detail current_user, options
    else
      content_text = options.delete(:content_text) || 'not signed in'
      # kill ignored options from link_to_user
      [:content_method, :title_method].each{|opt| options.delete(opt)}
      link_to_login_with_IP content_text, options
    end
  end

end


text:
package com.thoughtworks.xstream.io.xml;

/**
 * Allows replacement of Strings in xml-friendly drivers to provide compatibility with XStream 1.1 format
 *
 * @author Mauro Talevi
 * @since 1.2
 */
public class XStream11XmlFriendlyReplacer extends XmlFriendlyReplacer {

    private char dollarReplacementInClass = '-';
    private String dollarReplacementInField = "_DOLLAR_";
    private String underscoreReplacementInField = "__";
    private String noPackagePrefix = "default";

    /**
     * Default constructor.
     */
    public XStream11XmlFriendlyReplacer() {
    }

    /**
     * Noop implementation that does not unescape name.  Used for XStream 1.1 compatibility.
     * @param name the name of attribute or node
     * @return The String with unescaped name
     */
    public String unescapeName(String name) {
        return name;
    }

    protected String escapeClassName(String className) {
        // the $ used in inner class names is illegal as an xml element getNodeName
        className = className.replace('$', dollarReplacementInClass);

        // special case for classes named $Blah with no package; <-Blah> is illegal XML
        if (className.charAt(0) == dollarReplacementInClass) {
            className = noPackagePrefix + className;
        }

        return className;
    }

    protected String escapeFieldName(String fieldName) {
        StringBuffer result = new StringBuffer();
        int length = fieldName.length();
        for(int i = 0; i < length; i++) {
            char c = fieldName.charAt(i);
            if (c == '$' ) {
                result.append(dollarReplacementInField);
            } else if (c == '_') {
                result.append(underscoreReplacementInField);
            } else {
                result.append(c);
            }
        }
        return result.toString();
    }

    protected String unescapeClassName(String className) {
        // special case for classes named $Blah with no package; <-Blah> is illegal XML
        if (className.startsWith(noPackagePrefix+dollarReplacementInClass)) {
            className = className.substring(noPackagePrefix.length());
        }

        // the $ used in inner class names is illegal as an xml element getNodeName
        className = className.replace(dollarReplacementInClass, '$');

        return className;
    }

    protected String unescapeFieldName(String xmlName) {
        StringBuffer result = new StringBuffer();
        int length = xmlName.length();
        for(int i = 0; i < length; i++) {
            char c = xmlName.charAt(i);
            if ( stringFoundAt(xmlName, i,underscoreReplacementInField)) {
                i +=underscoreReplacementInField.length() - 1;
                result.append('_');
            } else if ( stringFoundAt(xmlName, i,dollarReplacementInField)) {
                i +=dollarReplacementInField.length() - 1;
                result.append('$');
            } else {
                result.append(c);
            }
        }
        return result.toString();
    }

    private boolean stringFoundAt(String name, int i, String replacement) {
        if ( name.length() >= i + replacement.length()
          && name.substring(i, i + replacement.length()).equals(replacement) ){
            return true;
        }
        return false;
    }

}


text:
namespace System.Net.WebSockets
{
    public enum WebSocketMessageType
    {
        Text = 0,
        Binary = 1,
        Close = 2
    }
}


text:
package org.clevermore.monitor.shared.alert;

public enum AlertGroup {

    SYSTEM(1);

    int id;

    private AlertGroup(int id) {
        this.id = id;
    }

    public int getId() {
        return id;
    }
}


text:
using System;
using System.Xml.Serialization;
using Newtonsoft.Json;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using NUnit.Framework;
using Gx.Rs.Api;
using Gx.Rs.Api.Util;

namespace Gedcomx.Rs.Api.Test
{
    [TestFixture]
    public class PersonSearchTests
    {
        private static readonly String SANDBOX_URI = "https://sandbox.familysearch.org/platform/collections/tree";
        private CollectionState collection;

        [OneTimeSetUp]
        public void Initialize()
        {
            collection = new CollectionState(new Uri(SANDBOX_URI));
            collection.AuthenticateViaOAuth2Password(Resources.TestUserName, Resources.TestPassword, Resources.TestClientId);
            Assert.DoesNotThrow(() => collection.IfSuccessful());
            Assert.IsNotNull(collection.CurrentAccessToken);
			Assert.IsNotEmpty(collection.CurrentAccessToken);
		}

        [Test]
        public void TestReadNextPageOfSearchResults()
        {
            GedcomxPersonSearchQueryBuilder query = new GedcomxPersonSearchQueryBuilder()
                .Name("John Smith")
                .BirthDate("1 January 1900")
                .FatherName("Peter Smith");

            PersonSearchResultsState results = collection.SearchForPersons(query);

            var state = (PersonSearchResultsState)results.ReadNextPage();
            Assert.DoesNotThrow(() => state.IfSuccessful());
            PersonState person = state.ReadPerson(results.Results.Entries.FirstOrDefault());

            Assert.IsNotNull(person);
            Assert.DoesNotThrow(() => person.IfSuccessful());
        }

        [Test]
        public void TestSearchPersons()
        {
            GedcomxPersonSearchQueryBuilder query = new GedcomxPersonSearchQueryBuilder()
                .MotherGivenName("Clarissa")
                .FatherSurname("Heaton")
                .MotherSurname("Hoyt")
                .Surname("Heaton")
                .GivenName("Israel")
                .FatherGivenName("Jonathan");

            var state = collection.SearchForPersons(query);

            Assert.DoesNotThrow(() => state.IfSuccessful());
        }

        [Test]
        public void TestSearchPersonsWithWarningsAndErrors()
        {
            GedcomxPersonSearchQueryBuilder query = new GedcomxPersonSearchQueryBuilder()
                .Param("givenNameMisspelled", "Israel");
            var state = collection.SearchForPersons(query);

            Assert.IsTrue(state.Warnings.Count > 0);
        }
    }
}


text:
using OpenSage.Data.Ini;

namespace OpenSage.Logic.Object
{
    [AddedIn(SageGame.Bfme2)]
    public sealed class DamageFieldUpdateModuleData : UpdateModuleData
    {
        internal static DamageFieldUpdateModuleData Parse(IniParser parser) => parser.ParseBlock(FieldParseTable);

        private static readonly IniParseTable<DamageFieldUpdateModuleData> FieldParseTable = new IniParseTable<DamageFieldUpdateModuleData>
        {
            { "Radius", (parser, x) => x.Radius = parser.ParseInteger() },
            { "ObjectFilter", (parser, x) => x.ObjectFilter = ObjectFilter.Parse(parser) },
            { "RequiredUpgrade", (parser, x) => x.RequiredUpgrade = parser.ParseAssetReference() },
            { "FireWeaponNugget", (parser, x) => x.FireWeaponNugget = WeaponNugget.Parse(parser) }
        };

        public int Radius { get; private set; }
        public ObjectFilter ObjectFilter { get; private set; }
        public string RequiredUpgrade { get; private set; }
        public WeaponNugget FireWeaponNugget { get; private set; }
    }
}


text:
import S3 from 'aws-sdk/clients/s3';
import sharp from 'sharp';
import { PlantImageLogger } from '../logger';

export type sharpMethod = (input?: string | Buffer, options?: sharp.SharpOptions) => sharp.Sharp;

export interface RequestDeps {
  sharp: sharpMethod;
  logger: PlantImageLogger;
  s3: S3;
}


text:
import { Injectable } from '@angular/core';
import { Http, URLSearchParams } from '@angular/http';
import 'rxjs/add/operator/map';
import {Observable} from 'rxjs/Observable';
import {YTChannelBean, YTClipBean} from './../model/YTBean'

/**
 * Servicio que encapsula los fetch a youtube.
 * Cada llamada devuelve nextoken para la paginación, token a partir del cual nos devolverá los siguientes resultados
 * URL absolutas:
 * Playlist
 * https://www.googleapis.com/youtube/v3/playlists?part=id,snippet,contentDetails&maxResults=50&channelId=UCb40SExvsnL0Id3jrDBSI9w&key=AIzaSyBNrD10tg9jdoeY94_phmJgdeHvU0Tikpc
 * PlayListItems
 * https://www.googleapis.com/youtube/v3/playlistItems?part=snippet,contentDetails&maxResults=50&playlistId=PL4mBk1zJMp6zUidvJWgad3w_Ltl8YykUj&key=AIzaSyBNrD10tg9jdoeY94_phmJgdeHvU0Tikpc
 * Subscripciones
 * https://www.googleapis.com/youtube/v3/subscriptions?part=snippet,contentDetails&maxResults=50&channelId=UCb40SExvsnL0Id3jrDBSI9w&key=AIzaSyBNrD10tg9jdoeY94_phmJgdeHvU0Tikpc
 * Videos del ChannelsPage (this.searchQuery-> sería el input a buscar, un like)
 * https://www.googleapis.com/youtube/v3/search?part=id,snippet&channelId=' + this.CONFIG_YT_API.channelID + '&q=' + this.searchQuery + '&type=video&order=viewCount&maxResults=' + this.CONFIG_YT_API.maxResults + '&key=' + this.CONFIG_YT_API.googleToken
 */

@Injectable()
export class YoutubeService{

   public CONFIG_YT_API : any ={
    MAX_RESULTS: '50',
    GOOGLE_TOKEN:'AIzaSyBNrD10tg9jdoeY94_phmJgdeHvU0Tikpc',
    URL_PLAYLIST:'https://www.googleapis.com/youtube/v3/playlists',
    URL_CLIPS_CHANNEL:'https://www.googleapis.com/youtube/v3/playlistItems'
   }

  constructor(public http: Http) {}

  /**
   * Método que obtiene los clips de un channel a partir de un token (si viene informado), paginados según MAX_RESULTS
   *
   * @param {YTChannelBean} channel
   * @returns {Observable<YTChannelBean>}
   *
   * @memberOf YoutubeService
   */
  fetchClipsByChannel(channel:YTChannelBean): Observable<YTChannelBean> {
  return new Observable(observer => {
            let params: URLSearchParams = new URLSearchParams();
             params.set('part', 'id,snippet,contentDetails');
             params.set('maxResults', this.CONFIG_YT_API.MAX_RESULTS);
             params.set('playlistId', channel.id);
             params.set('key', this.CONFIG_YT_API.GOOGLE_TOKEN);
              if(channel.nextPageToken) {
                params.set('pageToken', channel.nextPageToken);
              }

             this.http.get(this.CONFIG_YT_API.URL_CLIPS_CHANNEL, {search: params})
              .map(res => res.json())
              .subscribe(data => {
                console.log('fetchClipsByChannel',data);
                if (data) {
                  channel.clipsList = channel.clipsList.concat(data.items.map((item)=>{
                  return YTClipBean.build(item);
                }));
                channel.nextPageToken = data.nextPageToken;
                observer.next(channel);
                }
            });
     }
  )}

 /**
  * Método que devuelve las playlist públicas de un channel a partir de un token (si viene informado), paginados según MAX_RESULTS
  *
  * @param {YTChannelBean} channel
  * @returns {Observable<YTChannelBean>}
  *
  * @memberOf YoutubeService
  */
 fetchPlayListByChannel(channel:YTChannelBean): Observable<YTChannelBean> {
  return new Observable(observer => {
             let params: URLSearchParams = new URLSearchParams();
             params.set('part', 'id,snippet,contentDetails');
             params.set('maxResults', this.CONFIG_YT_API.MAX_RESULTS);
             params.set('channelId', channel.id);
             params.set('key', this.CONFIG_YT_API.GOOGLE_TOKEN);
            if(channel.nextPageToken) {
               params.set('pageToken', channel.nextPageToken);
            }
            /*let url ='https://www.googleapis.com/youtube/v3/playlists?part=id,snippet,contentDetails&maxResults=' + this.CONFIG_YT_API.maxResults + '&channelId=' + channel.id +'&key=' + this.CONFIG_YT_API.googleToken;
            if(channel.nextPageToken) {
              url += '&pageToken=' + channel.nextPageToken;
            }*/

            this.http.get(this.CONFIG_YT_API.URL_PLAYLIST, {search: params})
              .map(res => res.json())
              .subscribe(data => {
                if (data) {
                channel.subscriptionsList = channel.subscriptionsList.concat(data.items.map((item)=>{
                  return YTChannelBean.build(item);
                }));
                channel.nextPageToken = data.nextPageToken;
                observer.next(channel);
                }
            });
     }
  )}

}


text:
class P
class C extends P

def f(p: C) = {}

println(/* offset: 31, applicable: false */ f(_: P))


text:
set -e
set -u
set -o pipefail

__dir="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"

# check for dependencies
EXIT_ON_ERROR=0
command -v docker >/dev/null 2>&1 || { echo >&2 "Error: docker needs to be installed."; EXIT_ON_ERROR=1; }
command -v docker-compose >/dev/null 2>&1 || { echo >&2 "Error: docker-compose needs to be installed."; EXIT_ON_ERROR=1; }
docker version >/dev/null 2>&1 || { echo >&2 "Error: docker needs to be configured."; EXIT_ON_ERROR=1; }
if [[ $EXIT_ON_ERROR > 0 ]]; then
    exit 1
fi

# docker compose the Snap container
(cd $__dir && docker-compose up -d)

# clean up containers on exit
function finish {
  (cd $__dir && docker-compose down)
}
trap finish EXIT INT TERM


text:
using System;
using System.Collections.Generic;
using System.Text;
using System.Runtime.InteropServices;

namespace IronAHK.Rusty.Linux.X11.Events
{
    [StructLayout(LayoutKind.Sequential)]
    internal struct XMappingEvent
    {
        internal XEventName type;
        internal IntPtr serial;
        internal bool send_event;
        internal IntPtr display;
        internal IntPtr window;
        internal int request;
        internal int first_keycode;
        internal int count;
    }
}


text:
package com.github.dylon.liblevenshtein.collection.dawg;

/**
 * Specifies the necessary methods for functors that return whether nodes of
 * some type represent the final states of an automaton.
 * @param <State> Kind of the state this function accepts.
 * @author Dylon Edwards
 * @since 2.1.0
 */
public interface IFinalFunction<State> {

  /**
   * Whether the state represents the last character of some term.
   * @param current State to check for finality.
   * @return Whether this node represents the last character of some term.
   */
  boolean at(State current);
}


text:
// MESSAGE MISSION_CURRENT PACKING

#define MAVLINK_MSG_ID_MISSION_CURRENT 42

MAVPACKED(
typedef struct __mavlink_mission_current_t {
 uint16_t seq; /*< Sequence*/
}) mavlink_mission_current_t;

#define MAVLINK_MSG_ID_MISSION_CURRENT_LEN 2
#define MAVLINK_MSG_ID_MISSION_CURRENT_MIN_LEN 2
#define MAVLINK_MSG_ID_42_LEN 2
#define MAVLINK_MSG_ID_42_MIN_LEN 2

#define MAVLINK_MSG_ID_MISSION_CURRENT_CRC 28
#define MAVLINK_MSG_ID_42_CRC 28

#if MAVLINK_COMMAND_24BIT
#define MAVLINK_MESSAGE_INFO_MISSION_CURRENT { \
	42, \
	"MISSION_CURRENT", \
	1, \
	{  { "seq", NULL, MAVLINK_TYPE_UINT16_T, 0, 0, offsetof(mavlink_mission_current_t, seq) }, \
         } \
}
#else
#define MAVLINK_MESSAGE_INFO_MISSION_CURRENT { \
	"MISSION_CURRENT", \
	1, \
	{  { "seq", NULL, MAVLINK_TYPE_UINT16_T, 0, 0, offsetof(mavlink_mission_current_t, seq) }, \
         } \
}
#endif

/**
 * @brief Pack a mission_current message
 * @param system_id ID of this system
 * @param component_id ID of this component (e.g. 200 for IMU)
 * @param msg The MAVLink message to compress the data into
 *
 * @param seq Sequence
 * @return length of the message in bytes (excluding serial stream start sign)
 */
static inline uint16_t mavlink_msg_mission_current_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
						       uint16_t seq)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
	char buf[MAVLINK_MSG_ID_MISSION_CURRENT_LEN];
	_mav_put_uint16_t(buf, 0, seq);

        memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_MISSION_CURRENT_LEN);
#else
	mavlink_mission_current_t packet;
	packet.seq = seq;

        memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_MISSION_CURRENT_LEN);
#endif

	msg->msgid = MAVLINK_MSG_ID_MISSION_CURRENT;
    return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_MISSION_CURRENT_MIN_LEN, MAVLINK_MSG_ID_MISSION_CURRENT_LEN, MAVLINK_MSG_ID_MISSION_CURRENT_CRC);
}

/**
 * @brief Pack a mission_current message on a channel
 * @param system_id ID of this system
 * @param component_id ID of this component (e.g. 200 for IMU)
 * @param chan The MAVLink channel this message will be sent over
 * @param msg The MAVLink message to compress the data into
 * @param seq Sequence
 * @return length of the message in bytes (excluding serial stream start sign)
 */
static inline uint16_t mavlink_msg_mission_current_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan,
							   mavlink_message_t* msg,
						           uint16_t seq)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
	char buf[MAVLINK_MSG_ID_MISSION_CURRENT_LEN];
	_mav_put_uint16_t(buf, 0, seq);

        memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_MISSION_CURRENT_LEN);
#else
	mavlink_mission_current_t packet;
	packet.seq = seq;

        memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_MISSION_CURRENT_LEN);
#endif

	msg->msgid = MAVLINK_MSG_ID_MISSION_CURRENT;
    return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_MISSION_CURRENT_MIN_LEN, MAVLINK_MSG_ID_MISSION_CURRENT_LEN, MAVLINK_MSG_ID_MISSION_CURRENT_CRC);
}

/**
 * @brief Encode a mission_current struct
 *
 * @param system_id ID of this system
 * @param component_id ID of this component (e.g. 200 for IMU)
 * @param msg The MAVLink message to compress the data into
 * @param mission_current C-struct to read the message contents from
 */
static inline uint16_t mavlink_msg_mission_current_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_mission_current_t* mission_current)
{
	return mavlink_msg_mission_current_pack(system_id, component_id, msg, mission_current->seq);
}

/**
 * @brief Encode a mission_current struct on a channel
 *
 * @param system_id ID of this system
 * @param component_id ID of this component (e.g. 200 for IMU)
 * @param chan The MAVLink channel this message will be sent over
 * @param msg The MAVLink message to compress the data into
 * @param mission_current C-struct to read the message contents from
 */
static inline uint16_t mavlink_msg_mission_current_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, const mavlink_mission_current_t* mission_current)
{
	return mavlink_msg_mission_current_pack_chan(system_id, component_id, chan, msg, mission_current->seq);
}

/**
 * @brief Send a mission_current message
 * @param chan MAVLink channel to send the message
 *
 * @param seq Sequence
 */
#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS

static inline void mavlink_msg_mission_current_send(mavlink_channel_t chan, uint16_t seq)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
	char buf[MAVLINK_MSG_ID_MISSION_CURRENT_LEN];
	_mav_put_uint16_t(buf, 0, seq);

    _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_MISSION_CURRENT, buf, MAVLINK_MSG_ID_MISSION_CURRENT_MIN_LEN, MAVLINK_MSG_ID_MISSION_CURRENT_LEN, MAVLINK_MSG_ID_MISSION_CURRENT_CRC);
#else
	mavlink_mission_current_t packet;
	packet.seq = seq;

    _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_MISSION_CURRENT, (const char *)&packet, MAVLINK_MSG_ID_MISSION_CURRENT_MIN_LEN, MAVLINK_MSG_ID_MISSION_CURRENT_LEN, MAVLINK_MSG_ID_MISSION_CURRENT_CRC);
#endif
}

/**
 * @brief Send a mission_current message
 * @param chan MAVLink channel to send the message
 * @param struct The MAVLink struct to serialize
 */
static inline void mavlink_msg_mission_current_send_struct(mavlink_channel_t chan, const mavlink_mission_current_t* mission_current)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
    mavlink_msg_mission_current_send(chan, mission_current->seq);
#else
    _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_MISSION_CURRENT, (const char *)mission_current, MAVLINK_MSG_ID_MISSION_CURRENT_MIN_LEN, MAVLINK_MSG_ID_MISSION_CURRENT_LEN, MAVLINK_MSG_ID_MISSION_CURRENT_CRC);
#endif
}

#if MAVLINK_MSG_ID_MISSION_CURRENT_LEN <= MAVLINK_MAX_PAYLOAD_LEN
/*
  This varient of _send() can be used to save stack space by re-using
  memory from the receive buffer.  The caller provides a
  mavlink_message_t which is the size of a full mavlink message. This
  is usually the receive buffer for the channel, and allows a reply to an
  incoming message with minimum stack space usage.
 */
static inline void mavlink_msg_mission_current_send_buf(mavlink_message_t *msgbuf, mavlink_channel_t chan,  uint16_t seq)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
	char *buf = (char *)msgbuf;
	_mav_put_uint16_t(buf, 0, seq);

    _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_MISSION_CURRENT, buf, MAVLINK_MSG_ID_MISSION_CURRENT_MIN_LEN, MAVLINK_MSG_ID_MISSION_CURRENT_LEN, MAVLINK_MSG_ID_MISSION_CURRENT_CRC);
#else
	mavlink_mission_current_t *packet = (mavlink_mission_current_t *)msgbuf;
	packet->seq = seq;

    _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_MISSION_CURRENT, (const char *)packet, MAVLINK_MSG_ID_MISSION_CURRENT_MIN_LEN, MAVLINK_MSG_ID_MISSION_CURRENT_LEN, MAVLINK_MSG_ID_MISSION_CURRENT_CRC);
#endif
}
#endif

#endif

// MESSAGE MISSION_CURRENT UNPACKING

/**
 * @brief Get field seq from mission_current message
 *
 * @return Sequence
 */
static inline uint16_t mavlink_msg_mission_current_get_seq(const mavlink_message_t* msg)
{
	return _MAV_RETURN_uint16_t(msg,  0);
}

/**
 * @brief Decode a mission_current message into a struct
 *
 * @param msg The message to decode
 * @param mission_current C-struct to decode the message contents into
 */
static inline void mavlink_msg_mission_current_decode(const mavlink_message_t* msg, mavlink_mission_current_t* mission_current)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
	mission_current->seq = mavlink_msg_mission_current_get_seq(msg);
#else
        uint8_t len = msg->len < MAVLINK_MSG_ID_MISSION_CURRENT_LEN? msg->len : MAVLINK_MSG_ID_MISSION_CURRENT_LEN;
        memset(mission_current, 0, MAVLINK_MSG_ID_MISSION_CURRENT_LEN);
	memcpy(mission_current, _MAV_PAYLOAD(msg), len);
#endif
}


text:
package com.dz.dsl;

/**
 * @author mamad
 * @since 29/11/14.
 */
public class InvalidRequestException extends Exception {
    public InvalidRequestException(String message) {
        super(message);
    }
}


text:
<?php
/**
 * The template for displaying 404 pages (Not Found).
 *
 * @package EasyDevelopment
 * @subpackage Rainbow_strap
 * @since Rainbow strap 1.0
 */

get_header(); ?>

<?php _e( 'Page not found', 'rainbowstrap' ); ?>

<?php _e( 'This is somewhat embarrassing, isn’t it?', 'rainbowstrap' ); ?>

<?php _e( 'It looks like nothing was found at this location. Maybe try a search?', 'rainbowstrap' ); ?>

					<?php get_search_form(); ?>

<?php get_footer(); ?>


text:
from keystone import catalog
from keystone.common import driver_hints
from keystone.common import kvs

class Catalog(kvs.Base, catalog.Driver):
    # Public interface
    def get_catalog(self, user_id, tenant_id, metadata=None):
        return self.db.get('catalog-%s-%s' % (tenant_id, user_id))

    # region crud

    def _delete_child_regions(self, region_id, root_region_id):
        """Delete all child regions.

        Recursively delete any region that has the supplied region
        as its parent.
        """
        children = [r for r in self.list_regions(driver_hints.Hints())
                    if r['parent_region_id'] == region_id]
        for child in children:
            if child['id'] == root_region_id:
                # Hit a circular region hierarchy
                return
            self._delete_child_regions(child['id'], root_region_id)
            self._delete_region(child['id'])

    def _check_parent_region(self, region_ref):
        """Raise a NotFound if the parent region does not exist.

        If the region_ref has a specified parent_region_id, check that
        the parent exists, otherwise, raise a NotFound.
        """
        parent_region_id = region_ref.get('parent_region_id')
        if parent_region_id is not None:
            # This will raise NotFound if the parent doesn't exist,
            # which is the behavior we want.
            self.get_region(parent_region_id)

    def create_region(self, region):
        region_id = region['id']
        region.setdefault('parent_region_id')
        self._check_parent_region(region)
        self.db.set('region-%s' % region_id, region)
        region_list = set(self.db.get('region_list', []))
        region_list.add(region_id)
        self.db.set('region_list', list(region_list))
        return region

    def list_regions(self, hints):
        return [self.get_region(x) for x in self.db.get('region_list', [])]

    def get_region(self, region_id):
        return self.db.get('region-%s' % region_id)

    def update_region(self, region_id, region):
        self._check_parent_region(region)
        old_region = self.get_region(region_id)
        old_region.update(region)
        self._ensure_no_circle_in_hierarchical_regions(old_region)
        self.db.set('region-%s' % region_id, old_region)
        return old_region

    def _delete_region(self, region_id):
        self.db.delete('region-%s' % region_id)
        region_list = set(self.db.get('region_list', []))
        region_list.remove(region_id)
        self.db.set('region_list', list(region_list))

    def delete_region(self, region_id):
        self._delete_child_regions(region_id, region_id)
        self._delete_region(region_id)

    # service crud

    def create_service(self, service_id, service):
        self.db.set('service-%s' % service_id, service)
        service_list = set(self.db.get('service_list', []))
        service_list.add(service_id)
        self.db.set('service_list', list(service_list))
        return service

    def list_services(self, hints):
        return [self.get_service(x) for x in self.db.get('service_list', [])]

    def get_service(self, service_id):
        return self.db.get('service-%s' % service_id)

    def update_service(self, service_id, service):
        old_service = self.get_service(service_id)
        old_service.update(service)
        self.db.set('service-%s' % service_id, old_service)
        return old_service

    def delete_service(self, service_id):
        # delete referencing endpoints
        for endpoint_id in self.db.get('endpoint_list', []):
            if self.get_endpoint(endpoint_id)['service_id'] == service_id:
                self.delete_endpoint(endpoint_id)

        self.db.delete('service-%s' % service_id)
        service_list = set(self.db.get('service_list', []))
        service_list.remove(service_id)
        self.db.set('service_list', list(service_list))

    # endpoint crud

    def create_endpoint(self, endpoint_id, endpoint):
        self.get_service(endpoint['service_id'])
        self.db.set('endpoint-%s' % endpoint_id, endpoint)
        endpoint_list = set(self.db.get('endpoint_list', []))
        endpoint_list.add(endpoint_id)
        self.db.set('endpoint_list', list(endpoint_list))
        return endpoint

    def list_endpoints(self, hints):
        return [self.get_endpoint(x) for x in self.db.get('endpoint_list', [])]

    def get_endpoint(self, endpoint_id):
        return self.db.get('endpoint-%s' % endpoint_id)

    def update_endpoint(self, endpoint_id, endpoint):
        if endpoint.get('region_id') is not None:
            self.get_region(endpoint['region_id'])

        old_endpoint = self.get_endpoint(endpoint_id)
        old_endpoint.update(endpoint)
        self.db.set('endpoint-%s' % endpoint_id, old_endpoint)
        return old_endpoint

    def delete_endpoint(self, endpoint_id):
        self.db.delete('endpoint-%s' % endpoint_id)
        endpoint_list = set(self.db.get('endpoint_list', []))
        endpoint_list.remove(endpoint_id)
        self.db.set('endpoint_list', list(endpoint_list))

    # Private interface
    def _create_catalog(self, user_id, tenant_id, data):
        self.db.set('catalog-%s-%s' % (tenant_id, user_id), data)
        return data