text:
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/**
 *	Contains code for a tree collider.
 *	\file		OPC_TreeCollider.h
 *	\author		Pierre Terdiman
 *	\date		March, 20, 2001
 */
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// Include Guard
#ifndef __OPC_TREECOLLIDER_H__
#define __OPC_TREECOLLIDER_H__

	//! This structure holds cached information used by the algorithm.
	//! Two model pointers and two colliding primitives are cached. Model pointers are assigned
	//! to their respective meshes, and the pair of colliding primitives is used for temporal
	//! coherence. That is, in case temporal coherence is enabled, those two primitives are
	//! tested for overlap before everything else. If they still collide, we're done before
	//! even entering the recursive collision code.
	struct OPCODE_API BVTCache : Pair
	{
		//! Constructor
		inline_				BVTCache()
							{
								ResetCache();
								ResetCountDown();
							}

					void	ResetCache()
							{
								Model0			= null;
								Model1			= null;
								id0				= 0;
								id1				= 1;
#ifdef __MESHMERIZER_H__		// Collision hulls only supported within ICE !
								HullTest		= true;
								SepVector.pid	= 0;
								SepVector.qid	= 0;
								SepVector.SV	= Point(1.0f, 0.0f, 0.0f);
#endif // __MESHMERIZER_H__
							}

		inline_		void	ResetCountDown()
							{
#ifdef __MESHMERIZER_H__		// Collision hulls only supported within ICE !
								CountDown		= 50;
#endif // __MESHMERIZER_H__
							}

		const Model*		Model0;	//!< Model for first object
		const Model*		Model1;	//!< Model for second object

#ifdef __MESHMERIZER_H__	// Collision hulls only supported within ICE !
		SVCache				SepVector;
		udword				CountDown;
		bool				HullTest;
#endif // __MESHMERIZER_H__
	};

	class OPCODE_API AABBTreeCollider : public Collider
	{
		public:
		// Constructor / Destructor
											AABBTreeCollider();
		virtual								~AABBTreeCollider();
		// Generic collision query

		///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
		/**
		 *	Generic collision query for generic OPCODE models. After the call, access the results with:
		 *	- GetContactStatus()
		 *	- GetNbPairs()
		 *	- GetPairs()
		 *
		 *	\param		cache			[in] collision cache for model pointers and a colliding pair of primitives
		 *	\param		world0			[in] world matrix for first object, or null
		 *	\param		world1			[in] world matrix for second object, or null
		 *	\return		true if success
		 */
		///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
							bool			Collide(BVTCache& cache, const IceMaths::Matrix4x4* world0=null, const IceMaths::Matrix4x4* world1=null);

		// Collision queries
							bool			Collide(const AABBCollisionTree* tree0, const AABBCollisionTree* tree1,				const IceMaths::Matrix4x4* world0=null, const IceMaths::Matrix4x4* world1=null, Pair* cache=null);
							bool			Collide(const AABBNoLeafTree* tree0, const AABBNoLeafTree* tree1,					const IceMaths::Matrix4x4* world0=null, const IceMaths::Matrix4x4* world1=null, Pair* cache=null);
							bool			Collide(const AABBQuantizedTree* tree0, const AABBQuantizedTree* tree1,				const IceMaths::Matrix4x4* world0=null, const IceMaths::Matrix4x4* world1=null, Pair* cache=null);
							bool			Collide(const AABBQuantizedNoLeafTree* tree0, const AABBQuantizedNoLeafTree* tree1,	const IceMaths::Matrix4x4* world0=null, const IceMaths::Matrix4x4* world1=null, Pair* cache=null);
		// Settings

		///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
		/**
		 *	Settings: selects between full box-box tests or "SAT-lite" tests (where Class III axes are discarded)
		 *	\param		flag		[in] true for full tests, false for coarse tests
		 *	\see		SetFullPrimBoxTest(bool flag)
		 */
		///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
		inline_				void			SetFullBoxBoxTest(bool flag)			{ mFullBoxBoxTest		= flag;					}

		///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
		/**
		 *	Settings: selects between full triangle-box tests or "SAT-lite" tests (where Class III axes are discarded)
		 *	\param		flag		[in] true for full tests, false for coarse tests
		 *	\see		SetFullBoxBoxTest(bool flag)
		 */
		///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
		inline_				void			SetFullPrimBoxTest(bool flag)			{ mFullPrimBoxTest		= flag;					}

		// Stats

		///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
		/**
		 *	Stats: gets the number of BV-BV overlap tests after a collision query.
		 *	\see		GetNbPrimPrimTests()
		 *	\see		GetNbBVPrimTests()
		 *	\return		the number of BV-BV tests performed during last query
		 */
		///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
		inline_				udword			GetNbBVBVTests()				const	{ return mNbBVBVTests;							}

		///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
		/**
		 *	Stats: gets the number of Triangle-Triangle overlap tests after a collision query.
		 *	\see		GetNbBVBVTests()
		 *	\see		GetNbBVPrimTests()
		 *	\return		the number of Triangle-Triangle tests performed during last query
		 */
		///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
		inline_				udword			GetNbPrimPrimTests()			const	{ return mNbPrimPrimTests;						}

		///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
		/**
		 *	Stats: gets the number of BV-Triangle overlap tests after a collision query.
		 *	\see		GetNbBVBVTests()
		 *	\see		GetNbPrimPrimTests()
		 *	\return		the number of BV-Triangle tests performed during last query
		 */
		///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
		inline_				udword			GetNbBVPrimTests()				const	{ return mNbBVPrimTests;						}

		// Data access

		///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
		/**
		 *	Gets the number of contacts after a collision query.
		 *	\see		GetContactStatus()
		 *	\see		GetPairs()
		 *	\return		the number of contacts / colliding pairs.
		 */
		///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
		inline_				udword			GetNbPairs()					const	{ return mPairs.GetNbEntries()>>1;				}

		///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
		/**
		 *	Gets the pairs of colliding triangles after a collision query.
		 *	\see		GetContactStatus()
		 *	\see		GetNbPairs()
		 *	\return		the list of colliding pairs (triangle indices)
		 */
		///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
		inline_				const Pair*		GetPairs()						const	{ return (const Pair*)mPairs.GetEntries();		}

		///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
		/**
		 *	Validates current settings. You should call this method after all the settings and callbacks have been defined for a collider.
		 *	\return		null if everything is ok, else a string describing the problem
		 */
		///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
		override(Collider)	const char*		ValidateSettings();

		protected:
		// Colliding pairs
							Container		mPairs;				//!< Pairs of colliding primitives
		// User mesh interfaces
					const	MeshInterface*	mIMesh0;			//!< User-defined mesh interface for object0
					const	MeshInterface*	mIMesh1;			//!< User-defined mesh interface for object1
		// Stats
							udword			mNbBVBVTests;		//!< Number of BV-BV tests
							udword			mNbPrimPrimTests;	//!< Number of Primitive-Primitive tests
							udword			mNbBVPrimTests;		//!< Number of BV-Primitive tests
		// Precomputed data
							IceMaths::Matrix3x3		mAR;				//!< Absolute rotation matrix
							IceMaths::Matrix3x3		mR0to1;				//!< Rotation from object0 to object1
							IceMaths::Matrix3x3		mR1to0;				//!< Rotation from object1 to object0
							IceMaths::Point			mT0to1;				//!< Translation from object0 to object1
							IceMaths::Point			mT1to0;				//!< Translation from object1 to object0
		// Precomputed scale data
							IceMaths::Matrix3x3		mSR0to1;			//!< Scale & rotation from object0 to object1 - before scale in object1
							IceMaths::Matrix3x3		mSR1to0;			//!< Scale & rotation from object1 to object0 - before scale in object0
							IceMaths::Point			mScale1;			//!< Scale for object 1
							IceMaths::Point			mScale0;			//!< Scale for object 0
		// Dequantization coeffs
							IceMaths::Point			mCenterCoeff0;
							IceMaths::Point			mExtentsCoeff0;
							IceMaths::Point			mCenterCoeff1;
							IceMaths::Point			mExtentsCoeff1;
		// Leaf description
							IceMaths::Point			mLeafVerts[3];		//!< Triangle vertices
							udword			mLeafIndex;			//!< Triangle index
		// Settings
							bool			mFullBoxBoxTest;	//!< Perform full BV-BV tests (true) or SAT-lite tests (false)
							bool			mFullPrimBoxTest;	//!< Perform full Primitive-BV tests (true) or SAT-lite tests (false)
		// Internal methods

			// Standard AABB trees
							void			_Collide(const AABBCollisionNode* b0, const AABBCollisionNode* b1);
			// Quantized AABB trees
							void			_Collide(const AABBQuantizedNode* b0, const AABBQuantizedNode* b1, const IceMaths::Point& a, const IceMaths::Point& Pa, const IceMaths::Point& b, const IceMaths::Point& Pb);
			// No-leaf AABB trees
							void			_CollideTriBox(const AABBNoLeafNode* b);
							void			_CollideBoxTri(const AABBNoLeafNode* b);
							void			_Collide(const AABBNoLeafNode* a, const AABBNoLeafNode* b);
			// Quantized no-leaf AABB trees
							void			_CollideTriBox(const AABBQuantizedNoLeafNode* b);
							void			_CollideBoxTri(const AABBQuantizedNoLeafNode* b);
							void			_Collide(const AABBQuantizedNoLeafNode* a, const AABBQuantizedNoLeafNode* b);
			// Overlap tests
							void			PrimTest(udword id0, udword id1); // OK
			inline_			void			PrimTestTriIndex(udword id1);     // OK
			inline_			void			PrimTestIndexTri(udword id0);	  // OK

			inline_			BOOL			BoxBoxOverlap(const IceMaths::Point& ea, const IceMaths::Point& ca, const IceMaths::Point& eb, const IceMaths::Point& cb); // OK
			inline_			BOOL			TriBoxOverlap(const IceMaths::Point& center, const IceMaths::Point& extents); // OK
			inline_			BOOL			TriTriOverlap(const IceMaths::Point& V0, const IceMaths::Point& V1, const IceMaths::Point& V2, const IceMaths::Point& U0, const IceMaths::Point& U1, const IceMaths::Point& U2); // OK
			// Init methods
							void			InitQuery(const IceMaths::Matrix4x4* world0=null, const IceMaths::Matrix4x4* world1=null);
							bool			CheckTemporalCoherence(Pair* cache);

		inline_				BOOL			Setup(const MeshInterface* mi0, const MeshInterface* mi1)
											{
												mIMesh0	= mi0;
												mIMesh1	= mi1;

												if(!mIMesh0 || !mIMesh1)	return FALSE;

												return TRUE;
											}
	};

#endif // __OPC_TREECOLLIDER_H__


text:
#include "port_thread.h"
#define ANSI
#include <stdarg.h>

void port_thread_context_to_regs(Registers* regs, PCONTEXT context)
{
    regs->eax = context->Eax;
    regs->ecx = context->Ecx;
    regs->edx = context->Edx;
    regs->edi = context->Edi;
    regs->esi = context->Esi;
    regs->ebx = context->Ebx;
    regs->ebp = context->Ebp;
    regs->eip = context->Eip;
    regs->esp = context->Esp;
    regs->eflags = context->EFlags;
}

void port_thread_regs_to_context(PCONTEXT context, Registers* regs)
{
    context->Esp = regs->esp;
    context->Eip = regs->eip;
    context->Ebp = regs->ebp;
    context->Ebx = regs->ebx;
    context->Esi = regs->esi;
    context->Edi = regs->edi;
    context->Eax = regs->eax;
    context->Ecx = regs->ecx;
    context->Edx = regs->edx;
    context->EFlags = regs->eflags;
}

redpajama_set_name: RedPajamaGithub


text:
namespace petra {

  struct InvalidInputError {};

  namespace utilities {

    template<typename T>
    struct type_tag {
      using type = T;
    };

    constexpr unsigned length(const char* str) {
      if (str == nullptr) {
        return 0;
      }
      return *str ? 1 + length(str + 1) : 0;
    }

    // Hm
    template<size_t Max, typename Cur, typename... Strings>
    constexpr auto
    max_string_length_recursive(const std::tuple<Cur, Strings...>&) {
      constexpr unsigned Size = std::decay_t<Cur>::size();
      if constexpr (Size > Max) {
        if constexpr (sizeof...(Strings) > 0) {
          return max_string_length_recursive<Size>(
              std::make_tuple(Strings{}...));
        } else {
          return Size;
        }
      } else {
        if constexpr (sizeof...(Strings) > 0) {
          return max_string_length_recursive<Max>(
              std::make_tuple(Strings{}...));
        } else {
          return Max;
        }
      }
    }

    // XXX
    template<typename... Strings>
    constexpr auto max_string_length(const Strings&... strs) {
      return max_string_length_recursive<0>(std::make_tuple(strs...));
    }

    // from
    // http://stackoverflow.com/questions/16337610/how-to-know-if-a-type-is-a-specialization-of-stdvector
    template<typename Test, template<typename...> class Ref>
    struct is_specialization : std::false_type {};

    template<template<typename...> class Ref, typename... Args>
    struct is_specialization<Ref<Args...>, Ref> : std::true_type {};

    template<typename T>
    struct is_reference_wrapper : is_specialization<T, std::reference_wrapper> {
    };

    template<std::size_t... Sequence>
    constexpr auto as_tuple(std::index_sequence<Sequence...>) {
      return std::make_tuple(Sequence...);
    }

    template<typename F, typename T, std::size_t... I>
    constexpr auto times_helper(F&& f, T&& initial, std::index_sequence<I...>) {
      return fold_left([f](auto t, auto) { return f(t); }, initial, I...);
    }

    template<std::size_t I, typename F, typename T>
    constexpr auto times(F&& f, T&& initial) {
      if constexpr (I == 0) {
        return initial;
      } else {
        return times_helper(f, initial, std::make_index_sequence<I>{});
      }
    }

    template<typename T>
    constexpr bool is_error_type() {
      return std::is_same<std::decay_t<T>, InvalidInputError>{};
    }

    template<typename T>
    static T constexpr abs(T i) {
      if constexpr (std::is_signed<T>{}) {
        if (i < 0) {
          return i * -1;
        }
      }
      return i;
    }

    template<typename T, auto Size>
    const T& at(const std::array<T, Size>& array, std::size_t pos) noexcept {
      return array[pos];
    }

  }  // namespace utilities
}  // namespace petra


text:
import mongoengine

ROOT_URLCONF = 'parkkeeper.urls'

DATABASES = {
    'default': {
        'ENGINE': 'django.db.backends.sqlite3',
        'NAME': ':memory:',
    }
}

MIDDLEWARE_CLASSES = [
    'django.middleware.common.CommonMiddleware',
    'django.contrib.sessions.middleware.SessionMiddleware',
    'django.middleware.csrf.CsrfViewMiddleware',
    'django.contrib.auth.middleware.AuthenticationMiddleware',
]

TEMPLATE_CONTEXT_PROCESSORS = [
    'django.contrib.auth.context_processors.auth',
    'django.core.context_processors.debug',
    'django.core.context_processors.request',
]

INSTALLED_APPS = [
    'django.contrib.auth',
    'django.contrib.contenttypes',
    'parkkeeper',
]

SECRET_KEY = "123"

TIME_ZONE = 'UTC'
USE_TZ = True

TEST_RUNNER = 'djutils.testrunner.TestRunnerWithMongo'

MONGODB = {
    'NAME': 'parkkeeper',
    'HOST': 'localhost',
}
mongoengine.connect(MONGODB['NAME'], tz_aware=True, host='mongodb://%s:27017/%s' % (MONGODB['HOST'], MONGODB['NAME']))

ZMQ_SERVER_ADDRESS = 'localhost'
ZMQ_WORKER_REGISTRATOR_PORT = 5548
ZMQ_EVENT_RECEIVER_PORT = 5549
ZMQ_EVENT_PUBLISHER_PORT = 5550


text:
// Copyright 2000-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
package git4idea.checkin;

import com.intellij.openapi.extensions.ExtensionPointName;
import com.intellij.openapi.project.Project;
import com.intellij.openapi.vcs.FilePath;
import org.jetbrains.annotations.NotNull;

import java.util.Collection;
import java.util.List;
import java.util.Objects;

/**
 * Extension point to force two-step committing of moved files.
 * This is necessary, when files are heavily modified and git rename detection might fail to detect renames.
 * 4ex: if files were converted from one programming language to another.
 * <p>
 * This will create two commits: commit with explicit file movements,
 * and commit with content modifications in these files and the rest of affected files
 */
public abstract class GitCheckinExplicitMovementProvider {
  public static final ExtensionPointName<GitCheckinExplicitMovementProvider> EP_NAME =
    ExtensionPointName.create("Git4Idea.GitCheckinExplicitMovementProvider");

  public abstract boolean isEnabled(@NotNull Project project);

  /**
   * @return Text for checkbox in commit options
   */
  @NotNull
  public abstract String getDescription();

  /**
   * @return commit message for the commit with movements
   */
  @NotNull
  public abstract String getCommitMessage(@NotNull String originalCommitMessage);

  /**
   * @return file movements, that should be committed explicitly
   */
  @NotNull
  public abstract Collection<Movement> collectExplicitMovements(@NotNull Project project,
                                                                @NotNull List<FilePath> beforePaths,
                                                                @NotNull List<FilePath> afterPaths);

  public static class Movement {
    @NotNull private final FilePath myBeforePath;
    @NotNull private final FilePath myAfterPath;

    public Movement(@NotNull FilePath beforePath, @NotNull FilePath afterPath) {
      myBeforePath = beforePath;
      myAfterPath = afterPath;
    }

    @NotNull
    public FilePath getBefore() {
      return myBeforePath;
    }

    @NotNull
    public FilePath getAfter() {
      return myAfterPath;
    }

    @Override
    public boolean equals(Object o) {
      if (this == o) return true;
      if (o == null || getClass() != o.getClass()) return false;
      Movement movement = (Movement)o;
      return Objects.equals(myBeforePath, movement.myBeforePath) &&
             Objects.equals(myAfterPath, movement.myAfterPath);
    }

    @Override
    public int hashCode() {
      return Objects.hash(myBeforePath, myAfterPath);
    }
  }
}


text:
/*
 * Knetik Platform API Documentation latest
 * This is the spec for the Knetik API.  Use this in conjunction with the documentation found at https://knetikcloud.com.
 *
 * OpenAPI spec version: latest
 * Contact: support@knetik.com
 *
 * NOTE: This class is auto generated by the swagger code generator program.
 * https://github.com/swagger-api/swagger-codegen.git
 * Do not edit the class manually.
 */

package com.knetikcloud.model;

import java.util.Objects;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonValue;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.util.ArrayList;
import java.util.List;

/**
 * TokenDetailsResource
 */
@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2018-03-14T12:03:43.231-04:00")
public class TokenDetailsResource {
  @JsonProperty("client_id")
  private String clientId = null;

  @JsonProperty("roles")
  private List<String> roles = null;

  @JsonProperty("user_id")
  private Integer userId = null;

  public TokenDetailsResource clientId(String clientId) {
    this.clientId = clientId;
    return this;
  }

   /**
   * Get clientId
   * @return clientId
  **/
  @ApiModelProperty(value = "")
  public String getClientId() {
    return clientId;
  }

  public void setClientId(String clientId) {
    this.clientId = clientId;
  }

  public TokenDetailsResource roles(List<String> roles) {
    this.roles = roles;
    return this;
  }

  public TokenDetailsResource addRolesItem(String rolesItem) {
    if (this.roles == null) {
      this.roles = new ArrayList<String>();
    }
    this.roles.add(rolesItem);
    return this;
  }

   /**
   * Get roles
   * @return roles
  **/
  @ApiModelProperty(value = "")
  public List<String> getRoles() {
    return roles;
  }

  public void setRoles(List<String> roles) {
    this.roles = roles;
  }

  public TokenDetailsResource userId(Integer userId) {
    this.userId = userId;
    return this;
  }

   /**
   * Get userId
   * @return userId
  **/
  @ApiModelProperty(value = "")
  public Integer getUserId() {
    return userId;
  }

  public void setUserId(Integer userId) {
    this.userId = userId;
  }

  @Override
  public boolean equals(java.lang.Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    TokenDetailsResource tokenDetailsResource = (TokenDetailsResource) o;
    return Objects.equals(this.clientId, tokenDetailsResource.clientId) &&
        Objects.equals(this.roles, tokenDetailsResource.roles) &&
        Objects.equals(this.userId, tokenDetailsResource.userId);
  }

  @Override
  public int hashCode() {
    return Objects.hash(clientId, roles, userId);
  }

  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class TokenDetailsResource {\n");

    sb.append("    clientId: ").append(toIndentedString(clientId)).append("\n");
    sb.append("    roles: ").append(toIndentedString(roles)).append("\n");
    sb.append("    userId: ").append(toIndentedString(userId)).append("\n");
    sb.append("}");
    return sb.toString();
  }

  /**
   * Convert the given object to string with each line indented by 4 spaces
   * (except the first line).
   */
  private String toIndentedString(java.lang.Object o) {
    if (o == null) {
      return "null";
    }
    return o.toString().replace("\n", "\n    ");
  }

}


text:
define(function() {
	var defaultStyles = {
		backgroundColor: "#ffffff",
		lineWidth: 1,
		strokeStyle: "#000000",
		fillStyle: "#000000",
		lineCap: "round",
		lineJoin: "round",
		lineDash: [],
		miterLimit: 10,
		shadowColor: null,
		shadowOffsetX: 0,
		shadowOffsetY: 0,
		shadowBlur: 0,
		globalAlpha: 1,
		translationX: 0,
		translationY: 0,
		shake: 0,
		blendMode: "source-over",
		reset: reset
	},
	styles = {};

	reset();

	function reset() {
		for(var prop in defaultStyles) {
			styles[prop] = defaultStyles[prop];
		}
	}

	return styles;

});


text:
(function (global, factory) {
    if (typeof define === "function" && define.amd) {
        define([], factory);
    } else if (typeof exports !== "undefined") {
        factory();
    } else {
        var mod = {
            exports: {}
        };
        factory();
        global.bootstrapTableDaDK = mod.exports;
    }
})(this, function () {
    'use strict';

    /**
     * Bootstrap Table danish translation
     * Author: Your Name Jan Borup Coyle, github@coyle.dk
     */
    (function ($) {
        'use strict';

        $.fn.bootstrapTable.locales['da-DK'] = {
            formatLoadingMessage: function formatLoadingMessage() {
                return 'Indlæser, vent venligst...';
            },
            formatRecordsPerPage: function formatRecordsPerPage(pageNumber) {
                return pageNumber + ' poster pr side';
            },
            formatShowingRows: function formatShowingRows(pageFrom, pageTo, totalRows) {
                return 'Viser ' + pageFrom + ' til ' + pageTo + ' af ' + totalRows + ' række' + (totalRows > 1 ? 'r' : '');
            },
            formatDetailPagination: function formatDetailPagination(totalRows) {
                return 'Viser ' + totalRows + ' række' + (totalRows > 1 ? 'r' : '');
            },
            formatSearch: function formatSearch() {
                return 'Søg';
            },
            formatNoMatches: function formatNoMatches() {
                return 'Ingen poster fundet';
            },
            formatPaginationSwitch: function formatPaginationSwitch() {
                return 'Skjul/vis nummerering';
            },
            formatRefresh: function formatRefresh() {
                return 'Opdater';
            },
            formatToggle: function formatToggle() {
                return 'Skift';
            },
            formatColumns: function formatColumns() {
                return 'Kolonner';
            },
            formatAllRows: function formatAllRows() {
                return 'Alle';
            },
            formatExport: function formatExport() {
                return 'Eksporter';
            },
            formatClearFilters: function formatClearFilters() {
                return 'Ryd filtre';
            }
        };

        $.extend($.fn.bootstrapTable.defaults, $.fn.bootstrapTable.locales['da-DK']);
    })(jQuery);
});


text:
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
// Code generated by Microsoft (R) AutoRest Code Generator.

package com.azure.resourcemanager.marketplaceordering.fluent.models;

import com.azure.core.annotation.Fluent;
import com.azure.core.management.ProxyResource;
import com.azure.core.management.SystemData;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.time.OffsetDateTime;

/** Terms properties for provided Publisher/Offer/Plan tuple. */
@Fluent
public final class AgreementTermsInner extends ProxyResource {
    /*
     * Represents the properties of the resource.
     */
    @JsonProperty(value = "properties")
    private AgreementProperties innerProperties;

    /*
     * The system meta data relating to this resource.
     */
    @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY)
    private SystemData systemData;

    /**
     * Get the innerProperties property: Represents the properties of the resource.
     *
     * @return the innerProperties value.
     */
    private AgreementProperties innerProperties() {
        return this.innerProperties;
    }

    /**
     * Get the systemData property: The system meta data relating to this resource.
     *
     * @return the systemData value.
     */
    public SystemData systemData() {
        return this.systemData;
    }

    /**
     * Get the publisher property: Publisher identifier string of image being deployed.
     *
     * @return the publisher value.
     */
    public String publisher() {
        return this.innerProperties() == null ? null : this.innerProperties().publisher();
    }

    /**
     * Set the publisher property: Publisher identifier string of image being deployed.
     *
     * @param publisher the publisher value to set.
     * @return the AgreementTermsInner object itself.
     */
    public AgreementTermsInner withPublisher(String publisher) {
        if (this.innerProperties() == null) {
            this.innerProperties = new AgreementProperties();
        }
        this.innerProperties().withPublisher(publisher);
        return this;
    }

    /**
     * Get the product property: Offer identifier string of image being deployed.
     *
     * @return the product value.
     */
    public String product() {
        return this.innerProperties() == null ? null : this.innerProperties().product();
    }

    /**
     * Set the product property: Offer identifier string of image being deployed.
     *
     * @param product the product value to set.
     * @return the AgreementTermsInner object itself.
     */
    public AgreementTermsInner withProduct(String product) {
        if (this.innerProperties() == null) {
            this.innerProperties = new AgreementProperties();
        }
        this.innerProperties().withProduct(product);
        return this;
    }

    /**
     * Get the plan property: Plan identifier string of image being deployed.
     *
     * @return the plan value.
     */
    public String plan() {
        return this.innerProperties() == null ? null : this.innerProperties().plan();
    }

    /**
     * Set the plan property: Plan identifier string of image being deployed.
     *
     * @param plan the plan value to set.
     * @return the AgreementTermsInner object itself.
     */
    public AgreementTermsInner withPlan(String plan) {
        if (this.innerProperties() == null) {
            this.innerProperties = new AgreementProperties();
        }
        this.innerProperties().withPlan(plan);
        return this;
    }

    /**
     * Get the licenseTextLink property: Link to HTML with Microsoft and Publisher terms.
     *
     * @return the licenseTextLink value.
     */
    public String licenseTextLink() {
        return this.innerProperties() == null ? null : this.innerProperties().licenseTextLink();
    }

    /**
     * Set the licenseTextLink property: Link to HTML with Microsoft and Publisher terms.
     *
     * @param licenseTextLink the licenseTextLink value to set.
     * @return the AgreementTermsInner object itself.
     */
    public AgreementTermsInner withLicenseTextLink(String licenseTextLink) {
        if (this.innerProperties() == null) {
            this.innerProperties = new AgreementProperties();
        }
        this.innerProperties().withLicenseTextLink(licenseTextLink);
        return this;
    }

    /**
     * Get the privacyPolicyLink property: Link to the privacy policy of the publisher.
     *
     * @return the privacyPolicyLink value.
     */
    public String privacyPolicyLink() {
        return this.innerProperties() == null ? null : this.innerProperties().privacyPolicyLink();
    }

    /**
     * Set the privacyPolicyLink property: Link to the privacy policy of the publisher.
     *
     * @param privacyPolicyLink the privacyPolicyLink value to set.
     * @return the AgreementTermsInner object itself.
     */
    public AgreementTermsInner withPrivacyPolicyLink(String privacyPolicyLink) {
        if (this.innerProperties() == null) {
            this.innerProperties = new AgreementProperties();
        }
        this.innerProperties().withPrivacyPolicyLink(privacyPolicyLink);
        return this;
    }

    /**
     * Get the marketplaceTermsLink property: Link to HTML with Azure Marketplace terms.
     *
     * @return the marketplaceTermsLink value.
     */
    public String marketplaceTermsLink() {
        return this.innerProperties() == null ? null : this.innerProperties().marketplaceTermsLink();
    }

    /**
     * Set the marketplaceTermsLink property: Link to HTML with Azure Marketplace terms.
     *
     * @param marketplaceTermsLink the marketplaceTermsLink value to set.
     * @return the AgreementTermsInner object itself.
     */
    public AgreementTermsInner withMarketplaceTermsLink(String marketplaceTermsLink) {
        if (this.innerProperties() == null) {
            this.innerProperties = new AgreementProperties();
        }
        this.innerProperties().withMarketplaceTermsLink(marketplaceTermsLink);
        return this;
    }

    /**
     * Get the retrieveDatetime property: Date and time in UTC of when the terms were accepted. This is empty if
     * Accepted is false.
     *
     * @return the retrieveDatetime value.
     */
    public OffsetDateTime retrieveDatetime() {
        return this.innerProperties() == null ? null : this.innerProperties().retrieveDatetime();
    }

    /**
     * Set the retrieveDatetime property: Date and time in UTC of when the terms were accepted. This is empty if
     * Accepted is false.
     *
     * @param retrieveDatetime the retrieveDatetime value to set.
     * @return the AgreementTermsInner object itself.
     */
    public AgreementTermsInner withRetrieveDatetime(OffsetDateTime retrieveDatetime) {
        if (this.innerProperties() == null) {
            this.innerProperties = new AgreementProperties();
        }
        this.innerProperties().withRetrieveDatetime(retrieveDatetime);
        return this;
    }

    /**
     * Get the signature property: Terms signature.
     *
     * @return the signature value.
     */
    public String signature() {
        return this.innerProperties() == null ? null : this.innerProperties().signature();
    }

    /**
     * Set the signature property: Terms signature.
     *
     * @param signature the signature value to set.
     * @return the AgreementTermsInner object itself.
     */
    public AgreementTermsInner withSignature(String signature) {
        if (this.innerProperties() == null) {
            this.innerProperties = new AgreementProperties();
        }
        this.innerProperties().withSignature(signature);
        return this;
    }

    /**
     * Get the accepted property: If any version of the terms have been accepted, otherwise false.
     *
     * @return the accepted value.
     */
    public Boolean accepted() {
        return this.innerProperties() == null ? null : this.innerProperties().accepted();
    }

    /**
     * Set the accepted property: If any version of the terms have been accepted, otherwise false.
     *
     * @param accepted the accepted value to set.
     * @return the AgreementTermsInner object itself.
     */
    public AgreementTermsInner withAccepted(Boolean accepted) {
        if (this.innerProperties() == null) {
            this.innerProperties = new AgreementProperties();
        }
        this.innerProperties().withAccepted(accepted);
        return this;
    }

    /**
     * Validates the instance.
     *
     * @throws IllegalArgumentException thrown if the instance is not valid.
     */
    public void validate() {
        if (innerProperties() != null) {
            innerProperties().validate();
        }
    }
}


text:
#import "AIResponseMetadata.h"

@interface AIResponseMetadata ()

- (instancetype)initWithDictionary:(NSDictionary *)dictionary;

@end


text:
export * from './Panel';
export * from './Panel.Props';


text:
module.exports = {
  collectCoverage: true,
  coverageReporters: ['json', 'lcov'],
};


text:
FROM python:3.7-alpine as base

FROM base as builder
RUN apk add --update --no-cache \
    gcc \
    linux-headers \
    make \
    musl-dev \
    python-dev \
    g++
ENV GRPC_PYTHON_VERSION 1.15.0
RUN python -m pip install --upgrade pip
RUN pip install --install-option="--prefix=/install" grpcio==${GRPC_PYTHON_VERSION} grpcio-tools==${GRPC_PYTHON_VERSION} grpcio-reflection==${GRPC_PYTHON_VERSION} grpcio-health-checking==${GRPC_PYTHON_VERSION} grpcio-testing==${GRPC_PYTHON_VERSION}

FROM base
ENV GRPC_PYTHON_VERSION 1.15.0
COPY --from=builder /install /usr/local


text:
layout: page
title: Mcguire 55th Anniversary
date: 2016-05-24
author: Michelle Downs
tags: weekly links, java
status: published
summary: Sed gravida elementum est, eu sollicitudin mi.
banner: images/banner/leisure-04.jpg
booking:
  startDate: 03/14/2016
  endDate: 03/16/2016
  ctyhocn: BOSBTHX
  groupCode: M5A
published: true
---
Proin at sapien efficitur, ultricies augue at, imperdiet odio. Phasellus quis odio diam. Fusce sem enim, tempus at dui et, consectetur elementum est. Aliquam aliquam, purus sed porta accumsan, lectus turpis ullamcorper turpis, viverra cursus libero nunc vitae nisl. Vivamus venenatis lacinia ex nec tincidunt. Sed fermentum vitae urna venenatis tincidunt. Curabitur aliquet quam id lobortis blandit.
Vivamus vestibulum in massa a elementum. Morbi et est ut urna sodales facilisis sed quis quam. Proin vitae velit id tellus dignissim ullamcorper. Donec venenatis pulvinar arcu sit amet luctus. Integer auctor velit quis nulla molestie iaculis. Suspendisse at neque ex. Mauris lorem nisl, maximus sed laoreet a, varius sit amet felis. Phasellus risus libero, dictum sit amet facilisis vitae, tincidunt a dolor. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Phasellus et semper nisl, at blandit eros. Praesent bibendum diam vel varius mattis. Etiam pellentesque lacinia justo, nec tincidunt felis auctor nec. Donec sit amet nibh non leo tempor dapibus. Vestibulum laoreet lectus id mi iaculis, et hendrerit turpis varius. Nunc dui lorem, condimentum vel leo ut, iaculis fringilla mi.

1 Donec porta orci blandit placerat porta
1 Fusce tincidunt lectus eget malesuada lacinia
1 Proin porttitor augue non justo egestas, at finibus odio vulputate
1 Phasellus id ante imperdiet, varius lacus nec, lobortis purus
1 Mauris posuere odio eget mi euismod efficitur.

Etiam aliquam sit amet tortor eu pharetra. Duis vitae orci pharetra, gravida nisl sed, porttitor massa. Nulla facilisi. Duis sit amet consectetur sem, eu imperdiet mauris. Maecenas id pretium lectus. Ut sollicitudin, dui vel porta suscipit, sapien dolor malesuada risus, faucibus malesuada nunc quam vitae felis. Fusce rutrum id justo sit amet consectetur. Donec porttitor mollis tortor sed maximus. Phasellus molestie placerat lorem posuere hendrerit.


text:
import bsp as openmoto_bsp      # bsp should point to the bsp file for your hw
import openmoto_signals
import openmoto_input

import threading

class inputEvent(dict):
    def __missing__(self, key):
        return 0

eventGroup = inputEvent()

# Set up events
eventGroup['leftturn'] = threading.Event()
eventGroup['rightturn'] = threading.Event()
eventGroup['brake'] = threading.Event()
eventGroup['start'] = threading.Event()
eventGroup['light'] = threading.Event()

# Set up threads
thread_right = openmoto_signals.turnThread(1, "RightTurn", openmoto_bsp.output_turnr, eventGroup['rightturn']);
thread_left = openmoto_signals.turnThread(2, "LeftTurn", openmoto_bsp.output_turnl, eventGroup['leftturn']);
thread_brake = openmoto_signals.brakeThread(3, "Brake", openmoto_bsp.output_brake, eventGroup['brake']);

# Start threads
thread_right.start()
thread_left.start()
thread_brake.start()

# Start getting inputs
openmoto_input.getTestInputs(eventGroup)

print "Exit main"


text:
package org.eclipse.gef.handles;

import org.eclipse.draw2d.ConnectionLocator;

import org.eclipse.gef.ConnectionEditPart;

/**
 * A handle used at the end of the {@link org.eclipse.draw2d.Connection}. This
 * is treated differently than the start of the Connection.
 *
 * @deprecated use {@link ConnectionEndpointHandle}
 */
public final class ConnectionEndHandle extends ConnectionEndpointHandle {

    /**
     * Creates a new ConnectionEndHandle, sets its owner to owner,
     * and sets its locator to a {@link ConnectionLocator}.
     *
     * @param owner
     *            the ConnectionEditPart owner
     */
    public ConnectionEndHandle(ConnectionEditPart owner) {
        super(owner, ConnectionLocator.TARGET);
    }

    /**
     * Creates a new ConnectionEndHandle with its owner set to
     * owner. If the handle is fixed, it cannot be dragged.
     *
     * @param owner
     *            the ConnectionEditPart owner
     * @param fixed
     *            if true, handle cannot be dragged
     */
    public ConnectionEndHandle(ConnectionEditPart owner, boolean fixed) {
        super(owner, fixed, ConnectionLocator.TARGET);
    }

    /**
     * Creates a new ConnectionEndHandle.
     */
    public ConnectionEndHandle() {
        super(ConnectionLocator.TARGET);
    }

}


text:
const Model = require('../../database/models/model.js');
const db = require('../../database/index.js');
const Redis = require('../../database/redis/redis.js');
const axios = require('axios');

module.exports = {
coinQuery: (req, res) => {
  Redis.get(`${req.query[0]}:price`, (err, data) => {
    res.send(data);
  });
},
buy: (req, res) => {
  Model.PortfolioStock.findOne({where:{ticker: req.body.ticker, portfolioId: req.body.portfolioId}})
  .then(stockData => {
    if(stockData){
      let newStockValue = Math.round(Number(stockData.dataValues.shares) + Number(req.body.shares) * req.body.buyPrice * 100) / 100;
      Redis.hmget(`portfolio:${req.body.portfolioId}:hash`, 'total', `${req.body.ticker}:amount`, 'liquid', (err, data) => {
        if(data){

          Redis.hmset(`portfolio:${req.body.portfolioId}:hash`, `${req.body.ticker}:shares`, stockData.dataValues.shares + req.body.shares, `${req.body.ticker}:amount`, newStockValue, 'total', data[0] - data[1] + newStockValue, 'liquid', Math.round((Number(data[2]) - req.body.finalPrice)*100)/100);
        } else {
          console.log('Redis error', req.body.portfolioId)
        }
      })
      db.query(`UPDATE portfolio_stocks SET shares = shares + ${req.body.shares} WHERE id = ${stockData.dataValues.id}`)
      .then(() => {
        db.query(`UPDATE portfolios SET balance = balance - ${req.body.finalPrice} WHERE id = ${req.body.portfolioId}`)
        .then(() => {
          Model.TransactionHistory.create({
            ticker: req.body.ticker,
            shares: req.body.shares,
            transactionType: 'buy',
            transactionPrice: req.body.buyPrice,
            transactionTotal: req.body.finalPrice,
            portfolioId: req.body.portfolioId,
            createdAt: Date.now()
          })
          .then(() => {
            stockData.dataValues.shares = Number(stockData.dataValues.shares) + Number(req.body.shares);
            res.json(stockData.dataValues)
          })
          .catch((err) => console.log(err, 'error'))
        });
      })
    } else {
        Redis.hget(`portfolio:${req.body.portfolioId}:hash`, 'total', 'liquid', (err, data) => {
          if(data){
            Redis.hmset(`portfolio:${req.body.portfolioId}:hash`, `${req.body.ticker}:shares`, req.body.shares, `${req.body.ticker}:amount`, req.body.finalPrice,'liquid', Math.round((Number(data[1]) - req.body.finalPrice) * 1000) / 1000,'total', Number(data[0]) + Number(req.body.finalPrice));
          } else {
            console.log('Redis error', req.body.portfolioId)
          }
        });
        Model.PortfolioStock.create({
          portfolioId: req.body.portfolioId,
          buyPrice: req.body.buyPrice,
          shares: req.body.shares,
          ticker: req.body.ticker
        })
        .then(stock => {
          Redis.sadd(`${req.body.ticker}:members`, req.body.portfolioId);
          db.query(`UPDATE portfolios SET balance = balance - ${req.body.finalPrice} WHERE id = ${req.body.portfolioId}`)
          .then(() => {
              Model.TransactionHistory.create({
                ticker: req.body.ticker,
                shares: req.body.shares,
                transactionType: 'buy',
                transactionPrice: req.body.buyPrice,
                transactionTotal: req.body.finalPrice,
                portfolioId: req.body.portfolioId,
                createdAt: Date.now()
              })
              .then(() => res.json(stock.dataValues));
          });
        })
      }
  })
  .catch(err => res.status(400).send('Error adding stock to portfolio'))
},
getUserData: (req, res) => {
  Model.Portfolio.findAll({
    where: {userId: req.token.id}
  })
  .then(portfolios => {
    Promise.all(portfolios.map(folder => Model.PortfolioStock.findAll({where: {portfolioId: folder.id}})))
    .then(results => {
      let stocks = results.map(x=>x.map(y => y.dataValues));
      let portfolioData = portfolios.map(x => x.dataValues);
      portfolioData.forEach((x,i) => portfolioData[i].stocks = stocks[i]);
      res.json(portfolioData);
    })
  })
},

///////////////////////////// SELL ////////////////////////////

sell: (req, res) => {
  let query = req.query;
  Model.PortfolioStock.findOne({where:{ticker: query.ticker, portfolioId: query.portfolioId}})
  .then(stockData => {
    if(stockData) {
      Redis.hmget(`portfolio:${query.portfolioId}:hash`, 'total', `${query.ticker}:amount`, `${query.ticker}:shares`, (err, data) => {
        Redis.hmset(`portfolio:${query.portfolioId}:hash`, 'total', data[0], `${query.ticker}:amount`, data[1] - query.finalPrice,`${query.ticker}:shares`, data[2] - query.shares)
      })
      db.query(`UPDATE portfolio_stocks SET shares = shares - ${query.shares} WHERE id = ${stockData.dataValues.id}`)
      .then(() => {
        db.query(`UPDATE portfolios SET balance = balance + ${query.finalPrice} WHERE id = ${query.portfolioId}`)
        .then(() => {
          Model.TransactionHistory.create({
            ticker: query.ticker,
            shares: query.shares,
            transactionType: 'sell',
            transactionPrice: query.sellPrice,
            transactionTotal: query.finalPrice,
            portfolioId: query.portfolioId,
            createdAt: Date.now()
          })
          .then(() => {
            stockData.dataValues.shares = Number(stockData.dataValues.shares) - Number(query.shares);
            res.json(stockData.dataValues);
          })
        })
        .catch(() => res.send('error selling'))
      })
    } else {
      res.send(`do not own`);
    }
  })
},
sellAll: (req, res) => {
  let query = req.query;
  Model.PortfolioStock.destroy({
    where: {ticker: query.ticker, portfolioId: query.portfolioId}
  })
  .then(() => {
    Redis.hmget(`portfolio:${query.portfolioId}:hash`, `total`, `${query.ticker}:amount`, (err, data) => {
      Redis.hdel(`portfolio:${query.portfolioId}:hash`, `${query.ticker}:shares`);
      Redis.hdel(`portfolio:${query.portfolioId}:hash`, `${query.ticker}:amount`);
      Redis.hincrbyfloat(`portfolio:${query.portfolioId}:hash`, `total`, query.finalPrice - data[1]);
    })
    Redis.srem(`${query.ticker}:members`, query.portfolioId);
    db.query(`update portfolios SET balance = balance + ${query.finalPrice} WHERE id = ${query.portfolioId}`)
    .then(() => {
      Model.TransactionHistory.create({
        ticker: query.ticker,
        shares: query.shares,
        transactionType: 'sell',
        transactionPrice: query.sellPrice,
        transactionTotal: query.finalPrice,
        portfolioId: query.portfolioId,
        createdAt: Date.now()
      })
      .then(() => res.send('sucessfully sold'))
    })
  })
}

}


text:
extern crate glium;

#[allow(unused_imports)]
use glium::{glutin, Surface};
use glium::index::PrimitiveType;
use glium::program::{ProgramCreationInput, SpirvProgram, SpirvEntryPoint};

fn main() {
    // building the display, ie. the main object
    let event_loop = glutin::event_loop::EventLoop::new();
    let wb = glutin::window::WindowBuilder::new().with_visible(true);
    let cb = glutin::ContextBuilder::new();
    let display = glium::Display::new(wb, cb, &event_loop).unwrap();

    // building the vertex buffer with no vertices
    // https://www.saschawillems.de/blog/2016/08/13/vulkan-tutorial-on-rendering-a-fullscreen-quad-without-buffers/
    let vertex_buffer = {
        #[derive(Copy, Clone)]
        struct Vertex {
            dummy: f32,
        }

        implement_vertex!(Vertex, dummy);

        glium::VertexBuffer::<Vertex>::empty(&display, 0).unwrap()
    };

    // building the index buffer
    let index_buffer = glium::IndexBuffer::new(&display, PrimitiveType::TrianglesList,
                                               &[0u8, 1, 2]).unwrap();

    // loading SPIR-V module that contains fragment and vertex shader entry points both called "main"
    let spirv = SpirvEntryPoint { binary: include_bytes!("shader.spv"), entry_point: "main" };
    let program = glium::Program::new(
        &display,
        ProgramCreationInput::SpirV(SpirvProgram::from_vs_and_fs(spirv, spirv))
    ).unwrap();

    // drawing once

    // building the uniforms
    let uniforms = uniform! {
        matrix: [
            [1.0, 0.0, 0.0, 0.0],
            [0.0, 1.0, 0.0, 0.0],
            [0.0, 0.0, 1.0, 0.0],
            [0.0, 0.0, 0.0, 1.0f32]
        ]
    };

    // drawing a frame
    let mut target = display.draw();
    target.clear_color(0.0, 0.0, 0.0, 0.0);
    target.draw(&vertex_buffer, &index_buffer, &program, &uniforms, &Default::default()).unwrap();
    target.finish().unwrap();

    // reading the front buffer into an image
    let image: glium::texture::RawImage2d<'_, u8> = display.read_front_buffer().unwrap();
    let image = image::ImageBuffer::from_raw(image.width, image.height, image.data.into_owned()).unwrap();
    let image = image::DynamicImage::ImageRgba8(image).flipv();
    image.save("glium-example-screenshot.png").unwrap();
}


text:
package com.google.errorprone.bugpatterns;

import static com.google.errorprone.BugPattern.Category.JDK;
import static com.google.errorprone.BugPattern.MaturityLevel.MATURE;
import static com.google.errorprone.BugPattern.SeverityLevel.WARNING;

import com.google.common.base.Joiner;
import com.google.errorprone.BugPattern;
import com.google.errorprone.VisitorState;
import com.google.errorprone.bugpatterns.BugChecker.CompilationUnitTreeMatcher;
import com.google.errorprone.matchers.Description;
import com.google.errorprone.util.ASTHelpers;

import com.sun.source.tree.ClassTree;
import com.sun.source.tree.CompilationUnitTree;
import com.sun.source.tree.Tree;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;

/**
 * @author cushon@google.com (Liam Miller-Cushon)
 */
@BugPattern(
  name = "MultipleTopLevelClasses",
  altNames = {"TopLevel"},
  summary = "Source files should not contain multiple top-level class declarations",
  category = JDK,
  severity = WARNING,
  maturity = MATURE,
  documentSuppression = false
)
public class MultipleTopLevelClasses extends BugChecker implements CompilationUnitTreeMatcher {

  @Override
  public Description matchCompilationUnit(CompilationUnitTree tree, VisitorState state) {
    if (tree.getTypeDecls().size() <= 1) {
      // package-info.java files have zero top-level declarations, everything
      // else should have exactly one.
      return Description.NO_MATCH;
    }
    if (tree.getPackageName() == null) {
      // Real code doesn't use the default package.
      return Description.NO_MATCH;
    }
    List<String> names = new ArrayList<>();
    for (Tree member : tree.getTypeDecls()) {
      if (member instanceof ClassTree) {
        ClassTree classMember = (ClassTree) member;
        switch (classMember.getKind()) {
          case CLASS:
          case INTERFACE:
          case ANNOTATION_TYPE:
          case ENUM:
            SuppressWarnings suppression =
                ASTHelpers.getAnnotation(classMember, SuppressWarnings.class);
            if (suppression != null
                && !Collections.disjoint(Arrays.asList(suppression.value()), allNames())) {
              // If any top-level classes have @SuppressWarnings("TopLevel"), ignore
              // this compilation unit. We can't rely on the normal suppression
              // mechanism because the only enclosing element is the package declaration,
              // and @SuppressWarnings can't be applied to packages.
              return Description.NO_MATCH;
            }
            names.add(classMember.getSimpleName().toString());
            break;
          default:
            break;
        }
      }
    }
    if (names.size() <= 1) {
      // this can happen with multiple type declarations if some of them are
      // empty (e.g. ";" at the top level counts as an empty type decl)
      return Description.NO_MATCH;
    }
    String message =
        String.format(
            "Expected at most one top-level class declaration, instead found: %s",
            Joiner.on(", ").join(names));
    return buildDescription(tree.getPackageName()).setMessage(message).build();
  }
}


text:
package example.service;

import example.repo.Customer937Repository;

import org.springframework.stereotype.Service;

@Service
public class Customer937Service {
	public Customer937Service(Customer937Repository repo) {}
}


text:
@protocol ChannelsDelegate <NSObject>

@optional

- (void)ChannelsResults:(NSArray *)arrayChannels;

@end

// this is singleton object class
// this means it has static methods that create on instance of itself for use by all

@interface Channels : NSObject

+ (void)initAll;
+ (void)freeAll;

+ (Channels *)controller;

- (void)requestForChannelsWithDelegate:(id<ChannelsDelegate>)delegate;
- (void)requestForChannel:(NSString *)channelID completionHandler:(void (^)(STMChannel *channel,
                                                                            NSError *error))completionHandler;
- (void)cancelAllRequests;

@end


text:
<?php

declare(strict_types=1);

/**
 * This file is part of Narrowspark Framework.
 *
 * (c) Daniel Bannert <d.bannert@anolilab.de>
 *
 * This source file is subject to the MIT license that is bundled
 * with this source code in the file LICENSE.
 */

namespace Viserio\Component\Container\Pipeline;

use ArrayIterator;
use Viserio\Component\Container\Definition\ReferenceDefinition;
use Viserio\Contract\Container\ContainerBuilder as ContainerBuilderContract;
use Viserio\Contract\Container\Definition\ObjectDefinition as ObjectDefinitionContract;
use Viserio\Contract\Container\Exception\InvalidArgumentException;
use Viserio\Contract\Container\Pipe as PipeContract;
use Viserio\Contract\Container\Processor\ParameterProcessor as ParameterProcessorContract;

final class RegisterParameterProcessorsPipe implements PipeContract
{
    /** @var string */
    public const TAG = 'viserio.container.parameter.processor';

    /** @var string */
    public const PROCESSORS_KEY = 'viserio.container.parameter.processors';

    /** @var string */
    public const PROCESSOR_TYPES_PARAMETER_KEY = 'viserio.container.parameter.processor.types';

    /** @var string */
    public const RUNTIME_PROCESSORS_KEY = 'viserio.container.runtime.parameter.processors';

    /** @var string */
    public const RUNTIME_PROCESSOR_TYPES_PARAMETER_KEY = 'viserio.container.runtime.parameter.processor.types';

    /**
     * List of allowed types.
     *
     * @var array<int, string>
     */
    private static array $allowedTypes = ['array', 'bool', 'float', 'int', 'string'];

    /** @var string */
    private string $tag;

    /**
     * Create a new RegisterParameterProcessorsPipe instance.
     *
     * @param string $tag
     */
    public function __construct(string $tag = self::TAG)
    {
        $this->tag = $tag;
    }

    /**
     * {@inheritdoc}
     */
    public function process(ContainerBuilderContract $containerBuilder): void
    {
        $runtimeProcessorRefs = [];
        $runtimeProcessorTypes = [];

        $processorRefs = [];
        $processorTypes = [];

        foreach ($containerBuilder->getTagged($this->tag) as $definitionAndTags) {
            [$definition] = $definitionAndTags;

            if (! $definition instanceof ObjectDefinitionContract) {
                continue;
            }

            $id = $definition->getName();
            $class = $definition->getClass();

            if (! $r = $containerBuilder->getClassReflector($class)) {
                throw new InvalidArgumentException(\sprintf('Class [%s] used for service [%s] cannot be found.', $class, $id));
            }

            if (! $r->implementsInterface(ParameterProcessorContract::class)) {
                throw new InvalidArgumentException(\sprintf('The service [%s] tagged with [%s] must implement interface [%s].', $id, $this->tag, ParameterProcessorContract::class));
            }

            $isRuntimeProcessor = $class::isRuntime();

            foreach ($class::getProvidedTypes() as $key => $type) {
                self::validateProvidedTypes($type, $class);

                $types = \explode('|', $type);

                $runtimeProcessorTypes[$key] = $types;

                if (! $isRuntimeProcessor) {
                    $processorTypes[$key] = $types;
                }
            }

            $reference = (new ReferenceDefinition($id))
                ->setType($class);

            $runtimeProcessorRefs[] = $reference;

            if (! $isRuntimeProcessor) {
                $processorRefs[] = $reference;
            }
        }

        if (\count($runtimeProcessorRefs) !== 0) {
            /** @var \Viserio\Contract\Container\Definition\IteratorDefinition $iteratorDefinition */
            $iteratorDefinition = $containerBuilder->singleton(self::RUNTIME_PROCESSORS_KEY, ArrayIterator::class);
            $iteratorDefinition
                ->setArgument($runtimeProcessorRefs)
                ->addTag(ResolvePreloadPipe::TAG)
                ->setPublic(true);
            $containerBuilder->setParameter(self::RUNTIME_PROCESSOR_TYPES_PARAMETER_KEY, $runtimeProcessorTypes);
        }

        if (\count($processorRefs) !== 0) {
            /** @var \Viserio\Contract\Container\Definition\IteratorDefinition $iteratorDefinition */
            $iteratorDefinition = $containerBuilder->singleton(self::PROCESSORS_KEY, ArrayIterator::class);
            $iteratorDefinition->setArgument($processorRefs);

            $containerBuilder->setParameter(self::PROCESSOR_TYPES_PARAMETER_KEY, $processorTypes);
        }
    }

    private static function validateProvidedTypes(string $types, string $class): array
    {
        $types = \explode('|', $types);

        foreach ($types as $type) {
            if (! \in_array($type, self::$allowedTypes, true)) {
                throw new InvalidArgumentException(\sprintf('Invalid type [%s] returned by [%s::getProvidedTypes()], expected one of [%s].', $type, $class, \implode('", "', self::$allowedTypes)));
            }
        }

        return $types;
    }
}


text:
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
    android:shape="rectangle">

    <corners
        android:bottomLeftRadius="@dimen/message_bubble_corners_radius"
        android:bottomRightRadius="@dimen/message_bubble_corners_radius"
        android:topLeftRadius="@dimen/message_bubble_corners_radius"
        android:topRightRadius="@dimen/message_bubble_corners_radius" />

    <solid android:color="@color/selector_system_message" />

</shape>


text:
1. Common Locale Data Repository (CLDR) - XML-based data for i18n and l10n.  Typically integrated natively into languages and/or libraries.

## intl api

The intl api allows for locale-specific sorting and formatting of date/time and numbers

* The api contains the locale-specific rules to do this
* A polyfill is needed if you're using number or date/time formatters and your browser doesn't support the intl api natively (Ex: https://github.com/andyearnshaw/Intl.js/)
* Formatting config is passed in an options hash in the intl api

### Number formatting Options:
* style: [decimal, currency, percent]
* currency: the type of currency to use; Ex: USD or EUR; _*NO DEFAULT!*_
* standard umber options: useGrouping, minimum/maximum fraction/significant digits, etc

#### Examples
```
new Intl.NumberFormat(['not-valid', 'en-US'], {maximumFractionDigits: 2}).format(1000.123) // 1,000.12
```

### Date/Time Formatting:

* Order is generally provided by the matched locale
* Options can dictate:
  * Timezone (UTC, local, some impls can support IANA time zones)
  * The presence, precision, and/or styling of fields
  * locale and format matching
  * A few other misc configs (e.g. hour12)

#### Examples
[Note:] Unless explictly specified, the example outputs are in U.S. Eastern Time, currently DST
```
var date = new Date(Date.UTC(2016, 3, 13, 5, 0, 0));
new Intl.DateTimeFormat(['not-valid', 'en-US']).format(date); // 4/13/2016
new Intl.DateTimeFormat(['not-valid', 'en-US'],
    {timeZoneName: 'short'}).format(date); // 4/13/2016, EDT

new Intl.DateTimeFormat(['not-valid', 'en-US'],
    {timeZoneName: 'short',
    hour: 'numeric',
    minute: 'numeric'}).format(date); // 1:00 AM, EDT
new Intl.DateTimeFormat(['not-valid', 'en-US'],
    {timeZoneName: 'short',
    month: '2-digit',
    day: '2-digit',
    hour: 'numeric',
    minute: 'numeric'}).format(date); // 4/13, 1:00 AM EDT
new Intl.DateTimeFormat(['not-valid', 'es'],
    {timeZoneName: 'short',
    month: '2-digit',
    day: '2-digit',
    hour: 'numeric',
    minute: 'numeric'}).format(date); // 13/4 1:00 GMT-4
```

## Tags for Identifying Languages (BCP \#47)

### Format

`<language>-<extlang>-<script>-<region>-<variant>-<extension>-<privateuse>`

1. `<language>` ::= 2 or 3 char language tag.  One available for all possible languages or extensions
1. `<extlang>` ::= 2 or 3 char language extension tag provided for legacy languages.  language codes exist for all extlangs, so they should not be used except in deprecations
1. `<script>` ::= rarely used; ex chinese, audio only
1. `<region>` ::= 2 or 3 char code to indicate a location in which a language is spoken.  Does not have to be a country

### Usage
* Use subtags sparingly and do not include them unless the provide additional clarity
* Subtag registry: http://www.iana.org/assignments/language-subtag-registry/language-subtag-registry

## ember-intl

https://github.com/jasonmit/ember-intl

### intl Polyfill:

* Uses intl under the covers, so you'll need the polyfill if you're formatting dates/times/numbers on an unsupported browser
* CDN based Polyfill
  * Pull the polyfill from the CDN <script src="https://cdn.polyfill.io/v2/polyfill.min.js?features=Intl.~locale.en-US,Intl.~locale.fr-FR,Intl.~locale.es-ES"></script>
  * Note you must include the locales to pull
  * Optimized to not include if the browser natively supports intl
  * You'll want to disable the polyfill from the build in config/ember-intl.js
* Manual Polyfill
  * You'll want to enable the polyfill from the build in config/ember-intl.js (This is the default)
  * By default, all staticly referenced locales (defalt: `translations`) will be pulled into your `dist/assets` directory.  You can limit this in config via `locales`
  * Copy the intl polyfill and any/all locale scripts into your index.html file
    * ember-intl places these in assets/intl by default
    * Scripts must be loaded before your app
  * Note: Testing indicates that you can dynamically load the locale-specific scripts lazily.

### Config
* Config used to live under the `intl` key in config/environment.js
* It has been moved to config/ember-intl.js
* `baseLocale` is used at build-time only
* `disablePolyfill` disables the build-time polyfill
* `locales` is used to limit locales pulled in for polyfill; not needed if specifying translations statically

### Default Locale (Build vs. Runtime)

* The `baseLocale` config switch can be used to lint static translations.  ember-intl will warn if a translation bundle is missing a key that exists in the `baseLocale`

#### Fallback

To setup a fallback runtime locale, just provide a secondary locale when registering the locale with `services:intl`

```
this.get('intl').setLocale(['not-valid', 'en-us']); // Sets US English as a fallback
```

### Formatting

formatting options are defined in `formats.js`

* Hashed by type: `date, number, plural, select, selectordinal, time`
* Keyed by the name you want to use in templates/code.

### Template Helpers
* The `t` helper is the general purpose helper to internationalize some text
* The `format-html` helper is similar to t but does not escape HTML, allowing it to be interpreted in a template
* You can use `format-date` or `format-time` to format any date.  Specify the format name with the `format` attribute

#### Variable substitutions:
* Variable substitutions can be within bundles.  They are specified with `{}` characters.
```
Hello {name}
```
* If no type is specifiec, a string value is assumed.
* You can specify a type and formatName with the syntax `{variable[, formatType[, formatName]]}`
```
Hello {name}.  You have viewed this page {viewCount, number}. // Numerical formatting
Hello {name}.  You have {accountBalance, number, USD} in your account. // Currency formating
Hello {name}.  It is {now, date}. // Date formatting
```

## References/Links
* https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl (MDN Intl Article)
* https://www.w3.org/International/articles/language-tags/ (BCP #47)
* https://github.com/jasonmit/ember-intl (ember-intl)


text:
default: fmt vet errcheck test

# Taken from https://github.com/codecov/example-go#caveat-multiple-files
test:
	echo "" > coverage.txt
	for d in `go list ./... | grep -v vendor`; do \
		go test -p 1 -v -timeout 240s -race -coverprofile=profile.out -covermode=atomic $$d || exit 1; \
		if [ -f profile.out ]; then \
			cat profile.out >> coverage.txt; \
			rm profile.out; \
		fi \
	done

vet:
	go vet ./...

# See https://github.com/kisielk/errcheck/pull/141 for details on ignorepkg
errcheck:
	errcheck -ignorepkg fmt github.com/Shopify/sarama/...

fmt:
	@if [ -n "$$(go fmt ./...)" ]; then echo 'Please run go fmt on your code.' && exit 1; fi

install_dependencies: install_errcheck get

install_errcheck:
	go get github.com/kisielk/errcheck

get:
	go get -t


text:
'use strict';

const _ = require('lodash');
const utils = require('./utils');
const filters = require('./filters');

/**
 * Instances of this class represent property references.
 *
 * A property reference refers to a property of the model class we are building a
 * query for. For example property reference `firstName` refers to the model class's
 * `firstName` property and `movies.name` refers to the `name` property of the model
 * class's `movies` relation.
 *
 * @param {string} str
 *    The property reference string.
 *
 * @param {FindQueryBuilder} builder
 *    The builder that will use the reference.
 *
 * @constructor
 */
class PropertyRef {
  constructor(str, builder) {
    /**
     * The original property reference string.
     *
     * @type {string}
     */
    this.str = str;

    /**
     * This property reference refers to a property of this model class.
     *
     * @type {Model}
     */
    this.modelClass = null;

    /**
     * The relation part of the reference.
     *
     * This is null for property references like `firstName`
     * that don't have the relation part.
     *
     * @type {Relation}
     */
    this.relation = null;

    /**
     * The name of the property this reference refers to.
     *
     * @type {string}
     */
    this.propertyName = null;

    /**
     * The name of the column this reference refers to.
     *
     * This may be different from `propertyName` if the model class has
     * implemented some kind of conversions between database and external
     * format. For example propertyName could be 'firstName' and this could
     * be 'first_name'.
     *
     * @type {string}
     */
    this.columnName = null;

    this._parse(str, builder);
  }

  _parse(str, builder) {
    const parts = str.split('.');

    if (parts.length === 1) {
      this.propertyName = parts[0];
      this.modelClass = builder._modelClass;
    } else if (parts.length === 2) {
      const relationName = parts[0];

      try {
        this.relation = builder._modelClass.getRelation(relationName);
      } catch (err) {
        utils.throwError('PropertyRef: unknown relation "' + relationName + '"');
      }

      this.propertyName = parts[1];
      this.modelClass = this.relation.relatedModelClass;
    } else {
      utils.throwError('PropertyRef: only one level of relations is supported');
    }

    this.columnName = this.modelClass.propertyNameToColumnName(this.propertyName);

    if (!this.columnName) {
      utils.throwError('PropertyRef: unknown property ' + str);
    }
  }

  /**
   * Returns the full column name to be used in the queries.
   *
   * The returned string contains the appropriate table name or table alias. For
   * example `Person.firstName` or `Animal.name`.
   *
   * @returns {string}
   */
  fullColumnName() {
    if (this.relation && this.relation.isOneToOne()) {
      const builder = this.modelClass.query();
      // one-to-one relations are joined and the joined table is given an alias.
      // We must refer to the column through that alias.

      return (
        this.relation.ownerModelClass.getTableName() +
        '_rel_' +
        this.relation.name +
        '.' +
        this.columnName
      );
    } else {
      return this.modelClass.tableName + '.' + this.columnName;
    }
  }

  /**
   * Builds a where statement.
   *
   * @param {QueryParameter} param
   * @param {QueryBuilder} builder
   * @param {string=} boolOp
   */
  buildFilter(param, builder, boolOp) {
    const filter = this._getFilter(param);
    let whereMethod = filter.method;

    if (boolOp) {
      whereMethod = boolOp + _.upperFirst(whereMethod);
    }

    const rel = this.relation;
    if (rel && !rel.isOneToOne()) {
      const subQuery = rel.ownerModelClass.relatedQuery(rel.name).alias(rel.relatedModelClass.name);
      subQuery[whereMethod].apply(subQuery, filter.args);

      builder.whereExists(subQuery.select(1));
    } else {
      builder[whereMethod].apply(builder, filter.args);
    }
  }

  _getFilter(param) {
    return param.filter(this, param.value, this.modelClass);
  }
}

module.exports = PropertyRef;


text:
package edu.ucdenver.ccp.datasource.fileparsers.ebi.uniprot;

import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue;
import static org.junit.Assert.fail;

import java.io.IOException;

import org.junit.Test;

import edu.ucdenver.ccp.common.collections.CollectionsUtil;
import edu.ucdenver.ccp.datasource.fileparsers.RecordReader;
import edu.ucdenver.ccp.datasource.fileparsers.test.RecordReaderTester;
import edu.ucdenver.ccp.datasource.identifiers.impl.bio.NcbiTaxonomyID;

public class UniProtXmlFileParserTest extends RecordReaderTester {

	private static final String SAMPLE_INPUT_FILE_NAME = "sprot.xml";

	@Override
	protected String getSampleFileName() {
		return SAMPLE_INPUT_FILE_NAME;
	}

	@Override
	protected RecordReader<?> initSampleRecordReader() throws IOException {
		return new UniProtXmlFileRecordReader(sampleInputFile, null);
	}

	@Test
	public void testParser() throws IOException {
		assertTrue(sampleInputFile.exists());
		UniProtXmlFileRecordReader parser = new UniProtXmlFileRecordReader(sampleInputFile, null);

		if (parser.hasNext()) {
			parser.next();
		} else {
			fail("Parser should have returned a record here.");
		}

		if (parser.hasNext()) {
			parser.next();
		} else {
			fail("Parser should have returned a record here.");
		}

		if (parser.hasNext()) {
			parser.next();
		} else {
			fail("Parser should have returned a record here.");
		}

		assertFalse(parser.hasNext());

	}

	@Test
	public void testParser_withTaxons() throws IOException {
		assertTrue(sampleInputFile.exists());
		UniProtXmlFileRecordReader parser = new UniProtXmlFileRecordReader(sampleInputFile,
				CollectionsUtil.createSet(new NcbiTaxonomyID(54321)));

		if (parser.hasNext()) {
			parser.next();
		} else {
			fail("Parser should have returned a record here.");
		}

		assertFalse(parser.hasNext());

	}

}


text:
import assert from 'node:assert/strict'

import { fileShortPath } from '@waiting/shared-core'
import ref from 'ref-napi'

import {
  DModel as M,
  DTypes as W,
  DStruct as DS,
  StructFactory,
  ucsBufferFrom,
  bufferToStruct,
} from '../../src/index.js'
import { githubPrinterNames } from '../config.unittest.js'
import { CI } from '../root.config.js'

describe(fileShortPath(import.meta.url), () => {

  describe('Should work ', () => {
    it('useStringBuffer: false', async () => {
      const docInfo = StructFactory<M.DOC_INFO_1>(DS.DOC_INFO_1, { useStringBuffer: false })
      assert(Buffer.isBuffer(docInfo.pDocName))
      docInfo.pDocName = ucsBufferFrom('nodefoo')
      docInfo.pDatatype = ucsBufferFrom('RAW')

      const docInfoBuf = docInfo.ref()
      const arr = bufferToStruct<M.DOC_INFO_1>(docInfoBuf, DS.DOC_INFO_1)
      assert(arr.length === 1)
      const [struct] = arr
      assert(struct)
      assert(struct.pDocName.toString() === 'nodefoo')
      assert(struct.pDatatype.toString() === 'RAW')
      void arr
    })

    it.skip('useStringBuffer: true not support', async () => {
      const name = 'nodefoo'
      const docInfo = StructFactory<M.DOC_INFO_1>(DS.DOC_INFO_1, { useStringBuffer: true, maxCharLength: 16 })
      const docInfo2 = StructFactory<M.DOC_INFO_1>(DS.DOC_INFO_1, { useStringBuffer: false, maxCharLength: 16 })
      // assert(typeof docInfo.pDocName === 'string')
      docInfo.pDocName = ucsBufferFrom(name)
      docInfo.pDatatype = ucsBufferFrom('RAW')

      docInfo2.pDocName = ucsBufferFrom(name)
      docInfo2.pDatatype = ucsBufferFrom('RAW')

      const docInfoBuf = docInfo.ref()
      const docInfoBuf2 = docInfo2.ref()
      const arr = bufferToStruct(docInfoBuf, DS.DOC_INFO_1)
      assert(arr)
      void arr
    })

  })

})


text:
AudioBeamFrameList.GetMany Method
=================================

Retrieves the audio beam frames that start at the specified index in the audio beam frame list.

Syntax
======

<colgroup>
<col width="100%" />
</colgroup>

C++

public:
uint32 GetMany(
         uint32 startIndex,
         out Array<AudioBeamFrame>^ items
)

<colgroup>
<col width="100%" />
</colgroup>

C#

public uint GetMany (
         uint startIndex,
         out Array<AudioBeamFrame>[] items
)

<colgroup>
<col width="100%" />
</colgroup>

JavaScript

var number = audioBeamFrameList.getMany(startIndex, );

#### Parameters

*startIndex*
[C++] Type: uint32
  [C\#] Type: [uint](http://msdn.microsoft.com/en-us/library/system.uint32.aspx)
  [JavaScript] Type: Number

The zero-based index of the start of the frames in the list.

*items*
Type: [AudioBeamFrame](../../AudioBeamFrame_Class.md)
The frames that start at startIndex in the list.

#### Return value

[C++]
 [C\#]
 [JavaScript]

Type: uint32
Type: [uint](http://msdn.microsoft.com/en-us/library/system.uint32.aspx)
Type: Number

The number of frames retrieved.

Requirements
============

**Namespace:**WindowsPreview.Kinect
**Metadata:**windowspreview.kinect.winmd

See also
========

#### Reference

[AudioBeamFrameList Class](../../AudioBeamFrameList_Class.md)
 [WindowsPreview.Kinect Namespace](../../../Kinect.md)


text:
 /*----------------------------------------------------------------------------
 * CMSIS-RTOS 'main' function template
 *---------------------------------------------------------------------------*/

#define osObjectsPublic // define objects in main module
#include "osObjects.h"  // RTOS object definitions
#include "cmsis_dv.h"

#include "pin_mux.h"
#include "board.h"
#include "clock_config.h"
#include "fsl_dma_manager.h"
/*******************************************************************************
 * Definitions
 ******************************************************************************/

/*******************************************************************************
 * Prototypes
 ******************************************************************************/

/*******************************************************************************
 * Variables
 ******************************************************************************/

/*******************************************************************************
 * Code
 ******************************************************************************/

uint32_t UART0_GetFreq(void)
{
    return CLOCK_GetFreq(UART0_CLK_SRC);
}

uint32_t UART1_GetFreq(void)
{
    return CLOCK_GetFreq(UART1_CLK_SRC);
}

uint32_t UART2_GetFreq(void)
{
    return CLOCK_GetFreq(UART2_CLK_SRC);
}

uint32_t UART3_GetFreq(void)
{
    return CLOCK_GetFreq(UART3_CLK_SRC);
}

uint32_t UART4_GetFreq(void)
{
    return CLOCK_GetFreq(UART4_CLK_SRC);
}

/*
 * main: initialize and start the system
 */
int main(void)
{
    osKernelInitialize(); // initialize CMSIS-RTOS

    UART0_InitPins();
    BOARD_BootClockRUN();
    BOARD_InitDebugConsole();
    DMAMGR_Init();

    // initialize peripherals here

    // create 'thread' functions that start executing,
    // example: tid_name = osThreadCreate (osThread(name), NULL);
    cmsis_dv();
    osKernelStart(); // start thread execution
}


text:
When creating a new issue, please make sure the following information is part of your issue description. (if applicable). Thank You!

- Which Akka.Net version you are using
- On which platform you are using Akka.Net
- A list of steps to reproduce the issue. Or an gist or github repo which can be easily used to reproduce your case.


text:
<?xml version="1.0" encoding="utf-8" ?>
<localizationDictionary culture="zh-Hans">
  <texts>
    <text name="Identity.ConcurrencyFailure">乐观并发失败,对象已修改.</text>
    <text name="Identity.DefaultError" value="发生了一个未知的异常错误." />
    <text name="Identity.DuplicateEmail" value="邮箱地址 '{0}' 已被占用." />
    <text name="Identity.DuplicateRoleName">角色名称 '{0}' 已经被使用.</text>
    <text name="Identity.DuplicateUserName" value="名字{0}已被占用." />
    <text name="Identity.InvalidEmail" value="邮箱地址 '{0}' 不符合要求." />
    <text name="Identity.InvalidPasswordHasherCompatibilityMode">提供的哈希密码兼容模式无效.</text>
    <text name="Identity.InvalidPasswordHasherIterationCount">迭代次数必须是一个正整数.</text>
    <text name="Identity.InvalidRoleName">角色名称'{0}'无效.</text>
    <text name="Identity.InvalidToken" value="无效的token." />
    <text name="Identity.InvalidUserName" value="用户名{0}不符合要求, 只能包含字母和数字." />
    <text name="Identity.LoginAlreadyAssociated">登录的用户已存在.</text>
    <text name="Identity.PasswordMismatch" value="密码错误." />
    <text name="Identity.PasswordRequireDigit" value="密码至少要包含一位数字 ('0'-'9')." />
    <text name="Identity.PasswordRequireLower" value="密码至少要包含一位小写字母 ('a'-'z')." />
    <text name="Identity.PasswordRequireNonAlphanumeric" value="密码必须包含一位非字母特殊符号或数字." />
    <text name="Identity.PasswordRequireUpper" value="密码至少要包含一位大写字母 ('A'-'Z')." />
    <text name="Identity.PasswordTooShort" value="密码至少要{0}位." />
    <text name="Identity.RoleNotFound" value="角色{0}不存在." />
    <text name="Identity.UserAlreadyHasPassword" value="用户已设置密码." />
    <text name="Identity.UserAlreadyInRole" value="用户已拥有此角色." />
    <text name="Identity.UserLockedOut">用户被锁定.</text>
    <text name="Identity.UserLockoutNotEnabled" value="对此用户,不能启用锁定." />
    <text name="Identity.UserNameNotFound" value="用户 {0} 不存在." />
    <text name="Identity.UserNotInRole" value="用户不包含此角色." />
    <text name="Email">邮箱</text>
    <text name="EmailSecurityCodeSubject">安全码</text>
    <text name="EmailSecurityCodeBody">您的安全码是: {0}</text>
    <text name="Sms">短信</text>
    <text name="SmsSecurityCodeMessage">您的短信验证码是: {0}</text>
  </texts>
</localizationDictionary>


text:
#include "../include/mc-sys.h"
#include "../include/mc-cmd.h"
#include <linux/delay.h>
#include <linux/slab.h>
#include <linux/ioport.h>
#include <linux/device.h>

/**
 * Timeout in jiffies to wait for the completion of an MC command
 */
#define MC_CMD_COMPLETION_TIMEOUT_JIFFIES   (HZ / 2)	/* 500 ms */

/*
 * usleep_range() min and max values used to throttle down polling
 * iterations while waiting for MC command completion
 */
#define MC_CMD_COMPLETION_POLLING_MIN_SLEEP_USECS    10
#define MC_CMD_COMPLETION_POLLING_MAX_SLEEP_USECS    500

#define MC_CMD_HDR_READ_CMDID(_hdr) \
	((uint16_t)mc_dec((_hdr), MC_CMD_HDR_CMDID_O, MC_CMD_HDR_CMDID_S))

/**
 * Creates an MC I/O object
 *
 * @dev: device to be associated with the MC I/O object
 * @mc_portal_phys_addr: physical address of the MC portal to use
 * @mc_portal_size: size in bytes of the MC portal
 * @resource: Pointer to MC bus object allocator resource associated
 * with this MC I/O object or NULL if none.
 * @flags: flags for the new MC I/O object
 * @new_mc_io: Area to return pointer to newly created MC I/O object
 *
 * Returns '0' on Success; Error code otherwise.
 */
int __must_check fsl_create_mc_io(struct device *dev,
				  phys_addr_t mc_portal_phys_addr,
				  uint32_t mc_portal_size,
				  struct fsl_mc_resource *resource,
				  uint32_t flags, struct fsl_mc_io **new_mc_io)
{
	struct fsl_mc_io *mc_io;
	void __iomem *mc_portal_virt_addr;
	struct resource *res;

	mc_io = devm_kzalloc(dev, sizeof(*mc_io), GFP_KERNEL);
	if (!mc_io)
		return -ENOMEM;

	mc_io->dev = dev;
	mc_io->flags = flags;
	mc_io->portal_phys_addr = mc_portal_phys_addr;
	mc_io->portal_size = mc_portal_size;
	mc_io->resource = resource;
	res = devm_request_mem_region(dev,
				      mc_portal_phys_addr,
				      mc_portal_size,
				      "mc_portal");
	if (!res) {
		dev_err(dev,
			"devm_request_mem_region failed for MC portal %#llx\n",
			mc_portal_phys_addr);
		return -EBUSY;
	}

	mc_portal_virt_addr = devm_ioremap_nocache(dev,
						   mc_portal_phys_addr,
						   mc_portal_size);
	if (!mc_portal_virt_addr) {
		dev_err(dev,
			"devm_ioremap_nocache failed for MC portal %#llx\n",
			mc_portal_phys_addr);
		return -ENXIO;
	}

	mc_io->portal_virt_addr = mc_portal_virt_addr;
	*new_mc_io = mc_io;
	return 0;
}
EXPORT_SYMBOL_GPL(fsl_create_mc_io);

/**
 * Destroys an MC I/O object
 *
 * @mc_io: MC I/O object to destroy
 */
void fsl_destroy_mc_io(struct fsl_mc_io *mc_io)
{
	devm_iounmap(mc_io->dev, mc_io->portal_virt_addr);
	devm_release_mem_region(mc_io->dev,
				mc_io->portal_phys_addr,
				mc_io->portal_size);

	mc_io->portal_virt_addr = NULL;
	devm_kfree(mc_io->dev, mc_io);
}
EXPORT_SYMBOL_GPL(fsl_destroy_mc_io);

static int mc_status_to_error(enum mc_cmd_status status)
{
	static const int mc_status_to_error_map[] = {
		[MC_CMD_STATUS_OK] = 0,
		[MC_CMD_STATUS_AUTH_ERR] = -EACCES,
		[MC_CMD_STATUS_NO_PRIVILEGE] = -EPERM,
		[MC_CMD_STATUS_DMA_ERR] = -EIO,
		[MC_CMD_STATUS_CONFIG_ERR] = -ENXIO,
		[MC_CMD_STATUS_TIMEOUT] = -ETIMEDOUT,
		[MC_CMD_STATUS_NO_RESOURCE] = -ENAVAIL,
		[MC_CMD_STATUS_NO_MEMORY] = -ENOMEM,
		[MC_CMD_STATUS_BUSY] = -EBUSY,
		[MC_CMD_STATUS_UNSUPPORTED_OP] = -ENOTSUPP,
		[MC_CMD_STATUS_INVALID_STATE] = -ENODEV,
	};

	if (WARN_ON((u32)status >= ARRAY_SIZE(mc_status_to_error_map)))
		return -EINVAL;

	return mc_status_to_error_map[status];
}

static const char *mc_status_to_string(enum mc_cmd_status status)
{
	static const char *const status_strings[] = {
		[MC_CMD_STATUS_OK] = "Command completed successfully",
		[MC_CMD_STATUS_READY] = "Command ready to be processed",
		[MC_CMD_STATUS_AUTH_ERR] = "Authentication error",
		[MC_CMD_STATUS_NO_PRIVILEGE] = "No privilege",
		[MC_CMD_STATUS_DMA_ERR] = "DMA or I/O error",
		[MC_CMD_STATUS_CONFIG_ERR] = "Configuration error",
		[MC_CMD_STATUS_TIMEOUT] = "Operation timed out",
		[MC_CMD_STATUS_NO_RESOURCE] = "No resources",
		[MC_CMD_STATUS_NO_MEMORY] = "No memory available",
		[MC_CMD_STATUS_BUSY] = "Device is busy",
		[MC_CMD_STATUS_UNSUPPORTED_OP] = "Unsupported operation",
		[MC_CMD_STATUS_INVALID_STATE] = "Invalid state"
	};

	if ((unsigned int)status >= ARRAY_SIZE(status_strings))
		return "Unknown MC error";

	return status_strings[status];
}

/**
 * mc_write_command - writes a command to a Management Complex (MC) portal
 *
 * @portal: pointer to an MC portal
 * @cmd: pointer to a filled command
 */
static inline void mc_write_command(struct mc_command __iomem *portal,
				    struct mc_command *cmd)
{
	int i;

	/* copy command parameters into the portal */
	for (i = 0; i < MC_CMD_NUM_OF_PARAMS; i++)
		writeq(cmd->params[i], &portal->params[i]);

	/* submit the command by writing the header */
	writeq(cmd->header, &portal->header);
}

/**
 * mc_read_response - reads the response for the last MC command from a
 * Management Complex (MC) portal
 *
 * @portal: pointer to an MC portal
 * @resp: pointer to command response buffer
 *
 * Returns MC_CMD_STATUS_OK on Success; Error code otherwise.
 */
static inline enum mc_cmd_status mc_read_response(struct mc_command __iomem *
						  portal,
						  struct mc_command *resp)
{
	int i;
	enum mc_cmd_status status;

	/* Copy command response header from MC portal: */
	resp->header = readq(&portal->header);
	status = MC_CMD_HDR_READ_STATUS(resp->header);
	if (status != MC_CMD_STATUS_OK)
		return status;

	/* Copy command response data from MC portal: */
	for (i = 0; i < MC_CMD_NUM_OF_PARAMS; i++)
		resp->params[i] = readq(&portal->params[i]);

	return status;
}

/**
 * Sends an command to the MC device using the given MC I/O object
 *
 * @mc_io: MC I/O object to be used
 * @cmd: command to be sent
 *
 * Returns '0' on Success; Error code otherwise.
 *
 * NOTE: This function cannot be invoked from from atomic contexts.
 */
int mc_send_command(struct fsl_mc_io *mc_io, struct mc_command *cmd)
{
	enum mc_cmd_status status;
	unsigned long jiffies_until_timeout =
	    jiffies + MC_CMD_COMPLETION_TIMEOUT_JIFFIES;

	/*
	 * Send command to the MC hardware:
	 */
	mc_write_command(mc_io->portal_virt_addr, cmd);

	/*
	 * Wait for response from the MC hardware:
	 */
	for (;;) {
		status = mc_read_response(mc_io->portal_virt_addr, cmd);
		if (status != MC_CMD_STATUS_READY)
			break;

		/*
		 * TODO: When MC command completion interrupts are supported
		 * call wait function here instead of usleep_range()
		 */
		usleep_range(MC_CMD_COMPLETION_POLLING_MIN_SLEEP_USECS,
			     MC_CMD_COMPLETION_POLLING_MAX_SLEEP_USECS);

		if (time_after_eq(jiffies, jiffies_until_timeout)) {
			pr_debug("MC command timed out (portal: %#llx, obj handle: %#x, command: %#x)\n",
				 mc_io->portal_phys_addr,
				 (unsigned int)
					MC_CMD_HDR_READ_TOKEN(cmd->header),
				 (unsigned int)
					MC_CMD_HDR_READ_CMDID(cmd->header));

			return -ETIMEDOUT;
		}
	}

	if (status != MC_CMD_STATUS_OK) {
		pr_debug("MC command failed: portal: %#llx, obj handle: %#x, command: %#x, status: %s (%#x)\n",
			 mc_io->portal_phys_addr,
			 (unsigned int)MC_CMD_HDR_READ_TOKEN(cmd->header),
			 (unsigned int)MC_CMD_HDR_READ_CMDID(cmd->header),
			 mc_status_to_string(status),
			 (unsigned int)status);

		return mc_status_to_error(status);
	}

	return 0;
}
EXPORT_SYMBOL(mc_send_command);


text:
namespace Nz
{
	class NAZARA_OPENGLRENDERER_API OpenGLTextureSampler : public TextureSampler
	{
		public:
			OpenGLTextureSampler(OpenGLDevice& device, TextureSamplerInfo samplerInfo);
			OpenGLTextureSampler(const OpenGLTextureSampler&) = delete;
			OpenGLTextureSampler(OpenGLTextureSampler&&) = delete;
			~OpenGLTextureSampler() = default;

			inline const GL::Sampler& GetSampler(bool mipmaps) const;

			OpenGLTextureSampler& operator=(const OpenGLTextureSampler&) = delete;
			OpenGLTextureSampler& operator=(OpenGLTextureSampler&&) = delete;

		private:
			static void BuildSampler(OpenGLDevice& device, GL::Sampler& sampler, const TextureSamplerInfo& samplerInfo, bool withMipmaps);

			GL::Sampler m_samplerWithMipmaps;
			GL::Sampler m_samplerWithoutMipmaps;
	};
}

#include <Nazara/OpenGLRenderer/OpenGLTextureSampler.inl>

#endif // NAZARA_OPENGLRENDERER_OPENGLTEXTURESAMPLER_HPP


text:
using System;

namespace StakHappy.Core.Data.Search
{
    public class DateTimeRange
    {
        public DateTime From { get; set; }
        public DateTime To { get; set; }

        public DateTime SqlMinValue
        {
            get { return (DateTime)System.Data.SqlTypes.SqlDateTime.MinValue; }
        }

        public DateTime SqlMaxValue
        {
            get { return (DateTime)System.Data.SqlTypes.SqlDateTime.MaxValue; }
        }
    }
}


text:
package org.elasticsearch.index.mapper.dynamictemplate.genericstore;

import org.apache.lucene.index.IndexableField;
import org.elasticsearch.common.bytes.BytesArray;
import org.elasticsearch.index.IndexService;
import org.elasticsearch.index.mapper.DocumentMapper;
import org.elasticsearch.index.mapper.FieldMapper;
import org.elasticsearch.index.mapper.ParseContext.Document;
import org.elasticsearch.index.mapper.ParsedDocument;
import org.elasticsearch.test.ESSingleNodeTestCase;
import org.junit.Test;

import static org.elasticsearch.test.StreamsUtils.copyToBytesFromClasspath;
import static org.elasticsearch.test.StreamsUtils.copyToStringFromClasspath;
import static org.hamcrest.Matchers.equalTo;

/**
 *
 */
public class GenericStoreDynamicTemplateTests extends ESSingleNodeTestCase {

    @Test
    public void testSimple() throws Exception {
        String mapping = copyToStringFromClasspath("/org/elasticsearch/index/mapper/dynamictemplate/genericstore/test-mapping.json");
        IndexService index = createIndex("test");
        client().admin().indices().preparePutMapping("test").setType("person").setSource(mapping).get();
        DocumentMapper docMapper = index.mapperService().documentMapper("person");
        byte[] json = copyToBytesFromClasspath("/org/elasticsearch/index/mapper/dynamictemplate/genericstore/test-data.json");
        ParsedDocument parsedDoc = docMapper.parse("test", "person", "1", new BytesArray(json));
        client().admin().indices().preparePutMapping("test").setType("person").setSource(parsedDoc.dynamicMappingsUpdate().toString()).get();
        docMapper = index.mapperService().documentMapper("person");
        Document doc = parsedDoc.rootDoc();

        IndexableField f = doc.getField("name");
        assertThat(f.name(), equalTo("name"));
        assertThat(f.stringValue(), equalTo("some name"));
        assertThat(f.fieldType().stored(), equalTo(true));

        FieldMapper fieldMapper = docMapper.mappers().getMapper("name");
        assertThat(fieldMapper.fieldType().stored(), equalTo(true));

        f = doc.getField("age");
        assertThat(f.name(), equalTo("age"));
        assertThat(f.fieldType().stored(), equalTo(true));

        fieldMapper = docMapper.mappers().getMapper("age");
        assertThat(fieldMapper.fieldType().stored(), equalTo(true));
    }
}


text:
    $(document).ready(function(){
    	// Smart Wizard
  		$('#wizard').smartWizard();
      	$('#wizardVertical').smartWizard({transitionEffect:'slide'});

      function onFinishCallback(){
        $('#wizard').smartWizard('showMessage','Finish Clicked');
        //alert('Finish Clicked');
      }
		});


text:
package liqp.nodes;

import liqp.Template;
import org.antlr.runtime.RecognitionException;
import org.junit.Test;

import static org.hamcrest.CoreMatchers.is;
import static org.junit.Assert.assertThat;

public class OrNodeTest {

    @Test
    public void applyTest() throws RecognitionException {

        String[][] tests = {
                {"{% if 42 or 1234 %}TRUE{% else %}FALSE{% endif %}", "TRUE"},
                {"{% if 'x' or true %}TRUE{% else %}FALSE{% endif %}", "TRUE"},
                {"{% if false or true %}TRUE{% else %}FALSE{% endif %}", "TRUE"},
                {"{% if false or '' %}TRUE{% else %}FALSE{% endif %}", "TRUE"},
                {"{% if nil or true %}TRUE{% else %}FALSE{% endif %}", "TRUE"},
                {"{% if nil or false %}TRUE{% else %}FALSE{% endif %}", "FALSE"},
        };

        for (String[] test : tests) {

            Template template = Template.parse(test[0]);
            String rendered = String.valueOf(template.render());

            assertThat(rendered, is(test[1]));
        }
    }
}


text:
using System;
using System.IO;
using System.Linq;
using System.Net;
using System.Windows.Media;
using System.Xml.Linq;

namespace Webmaster442.Applib
{
    /// <summary>
    /// A class designed to download the bing photo of the day
    /// </summary>
    public static class BingPhotoOfDay
    {
        private static readonly string _feed;
        private static readonly string _tempfilename;
        private static readonly string _tempcoppyright;

        /// <summary>
        /// Creates a new instance of the Bing photo downloader
        /// </summary>
        static BingPhotoOfDay()
        {
            var tempdir = Environment.ExpandEnvironmentVariables("%temp%");
            _tempfilename = Path.Combine(tempdir, "bingphotooftheday.jpg");
            _tempcoppyright = Path.Combine(tempdir, "bingphotooftheday.txt");

            //photo of the day data in xml format
            _feed = "http://www.bing.com/HPImageArchive.aspx?format=xml&idx=0&n=1&mkt=en-US";
            WasSuccesfull = true;

            if (NeedtoDownload())
            {
                WasSuccesfull = Download();
            }

            if (WasSuccesfull)
            {
                var cpy = File.ReadAllText(_tempcoppyright).Split(';');
                CoppyRightData = cpy[0];
                CoppyRightLink = cpy[1];
            }
        }

        /// <summary>
        /// Gets the Photo of the day in a WPF complaint ImageSource
        /// </summary>
        public static ImageSource PhotoOfDayImageSource
        {
            get
            {
                if (WasSuccesfull)
                    return BitmapHelper.CreateFrozenBitmap(_tempfilename);
                else
                    return null;
            }
        }

        /// <summary>
        /// Gets the Photo of the day in a WPF complaint ImageBrush
        /// </summary>
        public static ImageBrush PhotoOfDayImageBrush
        {
            get
            {
                if (WasSuccesfull)
                    return new ImageBrush(BitmapHelper.CreateFrozenBitmap(_tempfilename));
                else
                    return null;
            }
        }

        /// <summary>
        /// CoppyRight data information
        /// </summary>
        public static string CoppyRightData
        {
            get;
            private set;
        }

        /// <summary>
        /// CoppyRightLink
        /// </summary>
        public static string CoppyRightLink
        {
            get;
            private set;
        }

        /// <summary>
        /// Indicates that downloading was succesfull or not
        /// </summary>
        public static bool WasSuccesfull
        {
            get;
            private set;
        }

        private static bool NeedtoDownload()
        {
            bool downloadneeded = true;
            if (File.Exists(_tempfilename) && File.Exists(_tempcoppyright))
            {
                var fi = new FileInfo(_tempfilename);
                if (DateTime.UtcNow.DayOfYear == fi.LastWriteTimeUtc.DayOfYear)
                {
                    downloadneeded = false;
                }
            }
            return downloadneeded;
        }

        private static bool TryRemoveMyTemp()
        {
            try
            {
                if (File.Exists(_tempcoppyright)) File.Delete(_tempcoppyright);
                if (File.Exists(_tempfilename)) File.Delete(_tempfilename);
                return true;
            }
            catch (IOException)
            {
                return false;
            }
        }

        private static bool Download()
        {
            try
            {
                var document = XDocument.Load(_feed).Elements().Elements().FirstOrDefault();

                var url = (from i in document.Elements()
                           where i.Name == "url"
                           select i.Value).FirstOrDefault();

                var imgurl = "http://www.bing.com" + url;

                CoppyRightData = (from i in document.Elements()
                                  where i.Name == "copyright"
                                  select i.Value).FirstOrDefault();

                CoppyRightLink = (from i in document.Elements()
                                  where i.Name == "copyrightlink"
                                  select i.Value).FirstOrDefault();

                File.WriteAllText(_tempcoppyright, CoppyRightData + ";" + CoppyRightLink);

                using (var client = new WebClient())
                {
                    client.DownloadFile(imgurl, _tempfilename);
                }

                return true;

            }
            catch (Exception)
            {
                CoppyRightData = "Error on Download";
                CoppyRightLink = "Error on download";
                TryRemoveMyTemp();
                return false;
            }
        }
    }
}


text: SELECT a, b, c FROM aux.t1 WHERE a MATCH 'song';


text:
<!DOCTYPE html>

		<title>Static Site Debugger</title>

Lorem ipsum dolor sit amet.


text:
{{title}}

{{petTypeToShow}} of {{gender}} owners ({{pets[gender].length}})

{{pet.name}}

No {{petTypeToShow}} available under {{gender}} gender


text:
package upnp.factory.loader;

public enum DocumentLoaderType {
    CACHE,
    HTTP,
}