text:
"""
Unit tests for the da.index module.

---
type:
    python_module

validation_level:
    v00_minimum

protection:
    k00_public

copyright:
    "Copyright 2016 High Integrity Artificial Intelligence Systems"

license:
    "Licensed under the Apache License, Version 2.0 (the License);
    you may not use this file except in compliance with the License.
    You may obtain a copy of the License at

        http://www.apache.org/licenses/LICENSE-2.0

    Unless required by applicable law or agreed to in writing, software
    distributed under the License is distributed on an AS IS BASIS,
    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    See the License for the specific language governing permissions and
    limitations under the License."
...
"""

# =============================================================================
class SpecifyIterEmbedData:
    """
    Specify the da.index.iter_embed_data() function.

    """

    # -------------------------------------------------------------------------
    def it_is_callable(self):
        """
        The iter_embed_data() function is callable.

        """
        import da.index
        assert callable(da.index.iter_embed_data)

# =============================================================================
class SpecifyWrite:
    """
    Specify the da.index.write() function.

    """

    # -------------------------------------------------------------------------
    def it_is_callable(self):
        """
        The write() function is callable.

        """
        import da.index
        assert callable(da.index.write)

# =============================================================================
class SpecifyIndexCoro:
    """
    Specify the da.index.index_coro() function.

    """

    # -------------------------------------------------------------------------
    def it_is_callable(self):
        """
        The index_coro() function is callable.

        """
        import da.index
        assert callable(da.index.index_coro)

# -----------------------------------------------------------------------------
def it_exists():
    """
    Placeholder test to provide minimal coverage.

    To be replaced when minimum coverage limits are instituted.

    """
    import da.index
    assert da.index._id_matcher_coro(None) is not None


text:
package com.maestrano.helpers;

import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.util.zip.DataFormatException;
import java.util.zip.Deflater;
import java.util.zip.Inflater;

public class MnoZipHelper {
	public static byte[] deflate(byte[] data) throws IOException {
		Deflater deflater = new Deflater(Deflater.DEFAULT_COMPRESSION,true);
		deflater.setInput(data);

		ByteArrayOutputStream outputStream = new ByteArrayOutputStream(data.length);

		deflater.finish();
		byte[] buffer = new byte[1024];
		while (!deflater.finished()) {
			int count = deflater.deflate(buffer);
			outputStream.write(buffer, 0, count);
		}
		outputStream.close();
		byte[] output = outputStream.toByteArray();

		deflater.end();

		return output;
	}

	public static byte[] inflate(byte[] data) throws IOException, DataFormatException {
		Inflater inflater = new Inflater(true);
		inflater.setInput(data);

		ByteArrayOutputStream outputStream = new ByteArrayOutputStream(data.length);
		byte[] buffer = new byte[1024];
		while (!inflater.finished()) {
			int count = inflater.inflate(buffer);
			outputStream.write(buffer, 0, count);
		}
		outputStream.close();
		byte[] output = outputStream.toByteArray();

		inflater.end();

		return output;
	}
}

redpajama_set_name: RedPajamaGithub


text:
layout: page
title: "Yunqian Zhu"
comments: true
description: "blanks"
keywords: "Yunqian Zhu,CU,Boulder"
---
<head>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script>
<script src="https://dl.dropboxusercontent.com/s/pc42nxpaw1ea4o9/highcharts.js?dl=0"></script>
<!-- <script src="../assets/js/highcharts.js"></script> -->
<style type="text/css">@font-face {
	font-family: "Bebas Neue";
	src: url(https://www.filehosting.org/file/details/544349/BebasNeue Regular.otf) format("opentype");
	}
	h1.Bebas {
		font-family: "Bebas Neue", Verdana, Tahoma;
	}
</style>
</head>

#### TEACHING INFORMATION

**College**: College of Arts and Sciences

**Classes taught**: ATOC 1070

#### ATOC 1070: WEATHER & ATMSPHRE LAB GT-SC1

**Terms taught**: Fall 2008, Fall 2008, Spring 2009, Spring 2009

**Instructor rating**: 4.54

**Standard deviation in instructor rating**: 0.8

**Average grade** (4.0 scale): 3.56

**Standard deviation in grades** (4.0 scale): 0.2

**Average workload** (raw): 1.74

**Standard deviation in workload** (raw): 0.25


text:
package org.keycloak.testsuite.adapter.servlet;

import java.io.IOException;
import java.io.PrintWriter;
import java.util.Hashtable;

import javax.naming.Context;
import javax.naming.NamingException;
import javax.naming.directory.Attributes;
import javax.naming.directory.DirContext;
import javax.naming.directory.InitialDirContext;
import javax.security.sasl.Sasl;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.ietf.jgss.GSSCredential;
import org.keycloak.KeycloakPrincipal;
import org.keycloak.common.constants.KerberosConstants;
import org.keycloak.common.util.KerberosSerializationUtils;

/**
 * @author Marek Posolda
 */
public class KerberosCredDelegServlet extends HttpServlet {

    public static final String CRED_DELEG_TEST_PATH = "/cred-deleg-test";

    @Override
    protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
        String ldapData = null;

        if (req.getRequestURI().endsWith(CRED_DELEG_TEST_PATH)) {

            try {
                // Retrieve kerberos credential from accessToken and deserialize it
                KeycloakPrincipal keycloakPrincipal = (KeycloakPrincipal) req.getUserPrincipal();
                String serializedGssCredential = (String) keycloakPrincipal.getKeycloakSecurityContext().getToken().getOtherClaims().get(KerberosConstants.GSS_DELEGATION_CREDENTIAL);
                GSSCredential gssCredential = KerberosSerializationUtils.deserializeCredential(serializedGssCredential);

                // First try to invoke without gssCredential. It should fail
                try {
                    invokeLdap(null);
                    throw new RuntimeException("Not expected to authenticate to LDAP without credential");
                } catch (NamingException nse) {
                    System.out.println("Expected exception: " + nse.getMessage());
                }

                ldapData = invokeLdap(gssCredential);
            } catch (KerberosSerializationUtils.KerberosSerializationException kse) {
                System.err.println("KerberosSerializationUtils.KerberosSerializationException: " + kse.getMessage());
                ldapData = "ERROR";
            } catch (Exception e) {
                e.printStackTrace();
                resp.sendError(HttpServletResponse.SC_INTERNAL_SERVER_ERROR);
            }
        }

        resp.setContentType("text/html");
        PrintWriter pw = resp.getWriter();
        pw.printf("<title>%s</title>", "Kerberos Test");
        pw.printf("Kerberos servlet secured content
");

        if (ldapData != null) {
            pw.printf("LDAP Data: " + ldapData + "
");
        }

        pw.print("");
        pw.flush();

    }

    private String invokeLdap(GSSCredential gssCredential) throws NamingException {
        Hashtable env = new Hashtable(11);
        env.put(Context.INITIAL_CONTEXT_FACTORY, "com.sun.jndi.ldap.LdapCtxFactory");
        env.put(Context.PROVIDER_URL, "ldap://localhost:10389");

        if (gssCredential != null) {
            env.put(Context.SECURITY_AUTHENTICATION, "GSSAPI");
            env.put(Sasl.CREDENTIALS, gssCredential);
        }

        DirContext ctx = new InitialDirContext(env);
        try {
            Attributes attrs = ctx.getAttributes("uid=hnelson,ou=People,dc=keycloak,dc=org");
            String cn = (String) attrs.get("cn").get();
            String sn = (String) attrs.get("sn").get();
            return cn + " " + sn;
        } finally {
            ctx.close();
        }
    }

}


text:
package main

import (
	"net"
	"fmt"
  "os/signal"
)

func main() {
  newConnections := make(chan *net.TCPConn)

	tcp, tcperr := net.ListenTCP("tcp", &net.TCPAddr{})
	if tcperr != nil {
		fmt.Println("Error opening TCP socket:", tcperr)
		return
	}
	defer tcp.Close()
	fmt.Println("Listening on", tcp.Addr().Network(), tcp.Addr())

	go func() {
	  for {
  		conn, connerr := tcp.AcceptTCP()
  		if connerr != nil {
  			fmt.Println("Error accepting TCP connection:", connerr)
  		} else {
        newConnections <- conn
  		}
	  }
	}() //go func accepting connections

	for {
	  select {
	    case signal := <-signal.Incoming:
			  fmt.Println("got signal:", signal)
			  return
	    case conn := <- newConnections:
  	    fmt.Fprint(conn, "Hello. Goodbye.\n")
        conn.Close()
	  }
	}
}


text:
<?php

namespace Google\AdsApi\Common;

/**
 * Populates a data object from configuration settings.
 *
 * @see Configuration
 */
interface AdsBuilder {

  /**
   * @var string the default filename for the configuration file for this
   *     library
   */
  const DEFAULT_CONFIGURATION_FILENAME = 'adsapi_php.ini';

  /**
   * Reads configuration settings from the specified filepath. The filepath is
   * optional, and if omitted, it will look for the default configuration
   * filename in the home directory of the user running PHP.
   *
   * @see self::DEFAULT_CONFIGURATION_FILENAME
   *
   * @param string $path the filepath
   * @return AdsBuilder this builder populated from the configuration
   * @throws InvalidArgumentException if the configuration file could not be
   *     found
   */
  public function fromFile($path = null);

  /**
   * Populates this builder from the specified configuration object.
   *
   * @param Configuration $configuration the configuration
   * @return AdsBuilder this builder populated from the configuration
   */
  public function from(Configuration $configuration);

  /**
   * Creates a new instance of the data object being populated. This method
   * should call defaultOptionals() and validate().
   * @return mixed the data object
   * @throws InvalidArgumentException if there are any validation errors
   */
  public function build();

  /**
   * Sets all optional fields to their default if they are `null`.
   */
  public function defaultOptionals();

  /**
   * Checks that required fields have been included and all included
   * fields are valid (e.g., URIs are valid).
   * @throws InvalidArgumentException if there are any validation errors
   */
  public function validate();
}


text:
using namespace boost;

namespace epsilon
{
	RigidBody::Ptr RigidBody::Create(float mass, Vector3 inertia, bool kinematic)
	{
		return std::make_shared<RigidBody>(private_struct(), mass, inertia, kinematic);
	}

	RigidBody::RigidBody(const private_struct &, float mass, Vector3 inertia, bool kinematic) : NodeComponent("RigidBody"),
																				mass(mass),
																				inertia(inertia),
																				kinematic(kinematic),
																				hasSetup(false)
	{
	}

	RigidBody::~RigidBody(void)
	{
		OnDestroy();
	}

	void RigidBody::OnDestroy()
	{
		if (hasSetup)
		{
			deletedCallback(GetId());
			hasSetup = false;
		}
	}

	void RigidBody::OnSetParent()
	{
		snTransform = this->componentParent->GetComponent<Transform>();
		Setup();
	}

	void RigidBody::OnCreateRegister(const RigidBodyCreatedCallback& callback)
	{
		createdCallback = callback;
	}

	void RigidBody::OnDeleteRegister(const RigidBodyDeletedCallback& callback)
	{
		deletedCallback = callback;
	}

	void RigidBody::Setup()
	{
		// If the rigid body hasn't yet been setup, and there is a parent transform
		if (!hasSetup && snTransform)
		{
			//create a dynamic rigidbody

			//btCollisionShape* colShape = new btBoxShape(btVector3(1,1,1));
			colShape = new btBoxShape(btVector3(0.5f, 0.5f, 0.5f));

			/// Create Dynamic Objects
			transform.setIdentity();

			//rigidbody is dynamic if and only if mass is non zero, otherwise static
			bool isDynamic = (mass != 0.f);

			btVector3 localInertia(0, 0, 0);
			if (isDynamic)
				colShape->calculateLocalInertia(mass, localInertia);

			Vector3 position = snTransform->GetPosition();
			transform.setOrigin(btVector3(position.x, position.y, position.z));
			Quaternion rot = snTransform->GetOrientation();
			transform.setRotation(btQuaternion(rot.x, rot.y, rot.z, rot.w));

			//using motionstate is recommended, it provides interpolation capabilities, and only synchronizes 'active' objects
			myMotionState = new btDefaultMotionState(transform);
			btRigidBody::btRigidBodyConstructionInfo rbInfo(mass, myMotionState, colShape, localInertia);

			rigidBody = new btRigidBody(rbInfo);

			// Configure the Collision options for the object

			int collisionFlags = rigidBody->getCollisionFlags();

			// Indicate that the rigidbody will fire a callback on collision
			collisionFlags |= btCollisionObject::CF_CUSTOM_MATERIAL_CALLBACK;

			// if kinematic
			if (kinematic)
			{
				collisionFlags |= btCollisionObject::CF_KINEMATIC_OBJECT;
			}

			rigidBody->setCollisionFlags( collisionFlags );

			// Attach a handle to this object to the rigidbody
			rigidBody->setUserPointer(ThisPtr().get());

			createdCallback(GetId(), rigidBody);

			hasSetup = true;
		}
	}

	void RigidBody::UpdateFromBullet()
	{
        if ( hasSetup )
        {
            // Get the position and rotation from bullet
            myMotionState->getWorldTransform(transform);

            btVector3 p = transform.getOrigin();
            btQuaternion r = transform.getRotation();

            // Update our transform with the latest physics info.
            snTransform->SetPosition(p.x(), p.y(), p.z());
            snTransform->SetOrientation(r.x(), r.y(), r.z(), r.w());
        }
	}

    void RigidBody::UpdateToBullet()
	{
        if ( hasSetup )
        {
            Vector3 pos = snTransform->GetPosition();
            Quaternion rot = snTransform->GetOrientation();
            btVector3 p(pos.x, pos.y, pos.z);
            btQuaternion r(rot.x, rot.y, rot.z, rot.w);
            transform.setOrigin(p);
            transform.setRotation(r);

            // Update the rigidbodies' position and rotation
            myMotionState->setWorldTransform(transform);
        }
	}

	void RigidBody::SetMass(float newMass)
	{
		mass = newMass;
		rigidBody->setMassProps(mass, btVector3(inertia.x, inertia.y, inertia.z));
	}

	void RigidBody::SetKinematic(bool isKinematic)
	{
		int collisionFlags = rigidBody->getCollisionFlags();

		// if kinematic
		if (isKinematic)
		{
			collisionFlags |= btCollisionObject::CF_KINEMATIC_OBJECT;
			kinematic = isKinematic;
		}
		else
		{
			if (kinematic)
			{
				collisionFlags &= ~btCollisionObject::CF_KINEMATIC_OBJECT;
			}
		}
	}

	void RigidBody::SetInertia(Vector3 newInertia)
	{
		inertia = newInertia;
		rigidBody->setMassProps(mass, btVector3(inertia.x, inertia.y, inertia.z));
	}

	Vector3	RigidBody::GetLinearVelocity()
	{
		return Vector3::ZERO;
	}

	void RigidBody::SetLinearVelocity(Vector3 iLinearVelocity)
	{

	}

	Vector3	RigidBody::GetLinearDamping()
	{
		return Vector3::ZERO;
	}

	void RigidBody::SetLinearDamping(Vector3 iLinearDamping)
	{

	}

	Vector3	RigidBody::GetAngularVelocity()
	{
		return Vector3::ZERO;
	}

	void RigidBody::SetAngularVelocity(Vector3 iAngularVelocity)
	{

	}

	Vector3	RigidBody::GetAngularDamping()
	{
		return Vector3::ZERO;
	}

	void RigidBody::SetAngularDamping(Vector3 iAngularDamping)
	{

	}

	Vector3	RigidBody::GetTotalTorque()
	{
		return Vector3::ZERO;
	}

	Vector3	RigidBody::GetTotalForce()
	{
		return Vector3::ZERO;
	}
}


text:
typedef enum
{
  UNDIRECTED = 0,
  DIRECTED
} graph_type_e;

// Adjacency list node
typedef struct adjlist_node
{
  int vertex;
  struct adjlist_node *next;
} adjlist_node_t, *adjlist_node_p;

// adjacency list
typedef struct adjlist
{
  int num_members;
  adjlist_node_t *head;
} adjlist_t, *adjlist_p;

// graph
typedef struct graph
{
  graph_type_e type;
  int num_vertices;
  adjlist_p adjListArr;
} graph_t, *graph_p;

__inline void err_exit(char* msg)
{
  printf("[Fatal Error]: %s \nExiting ... \n", msg);
  exit(1);
}

#endif


text:
/*
 * Copyright 2004 Sandia Corporation.
 * Under the terms of Contract DE-AC04-94AL85000, there is a non-exclusive
 * license for use of this work by or on behalf of the
 * U.S. Government. Redistribution and use in source and binary forms, with
 * or without modification, are permitted provided that this Notice and any
 * statement of authorship are reproduced on all copies.
 */

/* #undef VTK_USE_WGL_GET_PROC_ADDRESS */
/* #undef VTK_USE_APPLE_LOADER */
/* #undef VTK_USE_GLX_GET_PROC_ADDRESS */
#define VTK_USE_GLX_GET_PROC_ADDRESS_ARB
/* #undef VTK_USE_VTK_DYNAMIC_LOADER */
/* #undef VTK_NO_EXTENSION_LOADING */
/* #undef VTK_OPENGL_HAS_OSMESA */

/* #undef VTK_DEFINE_GLX_GET_PROC_ADDRESS_PROTOTYPE */

// If using vtkDynamicLoader, we need to know where the libraries are.
#define OPENGL_LIBRARIES "/usr/lib/x86_64-linux-gnu/libGLU.so;/usr/lib/x86_64-linux-gnu/libGL.so;/usr/lib/x86_64-linux-gnu/libSM.so;/usr/lib/x86_64-linux-gnu/libICE.so;/usr/lib/x86_64-linux-gnu/libX11.so;/usr/lib/x86_64-linux-gnu/libXext.so"

// VTK-HeaderTest-Exclude: vtkOpenGLExtensionManagerConfigure.h.in


text:
\hypertarget{interface_able_polecat___unit_test_interface}{}\section{Able\+Polecat\+\_\+\+Unit\+Test\+Interface Interface Reference}
\label{interface_able_polecat___unit_test_interface}\index{Able\+Polecat\+\_\+\+Unit\+Test\+Interface@{Able\+Polecat\+\_\+\+Unit\+Test\+Interface}}
\subsection*{Static Public Member Functions}
\begin{DoxyCompactItemize}
\item
static \hyperlink{interface_able_polecat___unit_test_interface_a35055cbe4de87057d7ee44fa29cc8d90}{run\+Tests} ()
\end{DoxyCompactItemize}

\subsection{Member Function Documentation}
\hypertarget{interface_able_polecat___unit_test_interface_a35055cbe4de87057d7ee44fa29cc8d90}{}\index{Able\+Polecat\+\_\+\+Unit\+Test\+Interface@{Able\+Polecat\+\_\+\+Unit\+Test\+Interface}!run\+Tests@{run\+Tests}}
\index{run\+Tests@{run\+Tests}!Able\+Polecat\+\_\+\+Unit\+Test\+Interface@{Able\+Polecat\+\_\+\+Unit\+Test\+Interface}}
\subsubsection[{run\+Tests}]{\setlength{\rightskip}{0pt plus 5cm}static run\+Tests (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [static]}}\label{interface_able_polecat___unit_test_interface_a35055cbe4de87057d7ee44fa29cc8d90}
Run all the tests in the class.

\begin{DoxyExceptions}{Exceptions}
{\em \hyperlink{class_able_polecat___unit_test___exception}{Able\+Polecat\+\_\+\+Unit\+Test\+\_\+\+Exception}} & if any test fails. \\
\hline
\end{DoxyExceptions}

The documentation for this interface was generated from the following file\+:\begin{DoxyCompactItemize}
\item
C\+:/wamp/www/polecat/public/core/Unit\+Test.\+php\end{DoxyCompactItemize}


text:
import * as arrays from 'vs/base/common/arrays';
import * as collections from 'vs/base/common/collections';
import * as glob from 'vs/base/common/glob';
import { untildify } from 'vs/base/common/labels';
import * as objects from 'vs/base/common/objects';
import * as paths from 'vs/base/common/paths';
import * as resources from 'vs/base/common/resources';
import * as strings from 'vs/base/common/strings';
import { URI as uri } from 'vs/base/common/uri';
import { isMultilineRegexSource } from 'vs/editor/common/model/textModelSearch';
import * as nls from 'vs/nls';
import { IConfigurationService } from 'vs/platform/configuration/common/configuration';
import { IEnvironmentService } from 'vs/platform/environment/common/environment';
import { getExcludes, ICommonQueryProps, IFileQuery, IFolderQuery, IPatternInfo, ISearchConfiguration, ITextQuery, ITextSearchPreviewOptions, pathIncludedInQuery, QueryType } from 'vs/platform/search/common/search';
import { IWorkspaceContextService, WorkbenchState } from 'vs/platform/workspace/common/workspace';

export interface ISearchPathPattern {
	searchPath: uri;
	pattern?: string;
}

export interface ISearchPathsResult {
	searchPaths?: ISearchPathPattern[];
	pattern?: glob.IExpression;
}

export interface ICommonQueryBuilderOptions {
	_reason?: string;
	excludePattern?: string;
	includePattern?: string;
	extraFileResources?: uri[];

	maxResults?: number;
	maxFileSize?: number;
	useRipgrep?: boolean;
	disregardIgnoreFiles?: boolean;
	disregardGlobalIgnoreFiles?: boolean;
	disregardExcludeSettings?: boolean;
	ignoreSymlinks?: boolean;
}

export interface IFileQueryBuilderOptions extends ICommonQueryBuilderOptions {
	filePattern?: string;
	exists?: boolean;
	sortByScore?: boolean;
	cacheKey?: string;
}

export interface ITextQueryBuilderOptions extends ICommonQueryBuilderOptions {
	previewOptions?: ITextSearchPreviewOptions;
	fileEncoding?: string;
	beforeContext?: number;
	afterContext?: number;
}

export class QueryBuilder {

	constructor(
		@IConfigurationService private configurationService: IConfigurationService,
		@IWorkspaceContextService private workspaceContextService: IWorkspaceContextService,
		@IEnvironmentService private environmentService: IEnvironmentService
	) { }

	text(contentPattern: IPatternInfo, folderResources?: uri[], options: ITextQueryBuilderOptions = {}): ITextQuery {
		contentPattern = this.getContentPattern(contentPattern);
		const searchConfig = this.configurationService.getValue<ISearchConfiguration>();

		const fallbackToPCRE = folderResources && folderResources.some(folder => {
			const folderConfig = this.configurationService.getValue<ISearchConfiguration>({ resource: folder });
			return !folderConfig.search.useRipgrep;
		});

		const commonQuery = this.commonQuery(folderResources, options);
		return <ITextQuery>{
			...commonQuery,
			type: QueryType.Text,
			contentPattern,
			previewOptions: options.previewOptions,
			maxFileSize: options.maxFileSize,
			usePCRE2: searchConfig.search.usePCRE2 || fallbackToPCRE || false,
			beforeContext: options.beforeContext,
			afterContext: options.afterContext,
			userDisabledExcludesAndIgnoreFiles: options.disregardExcludeSettings && options.disregardIgnoreFiles
		};
	}

	/**
	 * Adjusts input pattern for config
	 */
	private getContentPattern(inputPattern: IPatternInfo): IPatternInfo {
		const searchConfig = this.configurationService.getValue<ISearchConfiguration>();

		const newPattern = {
			...inputPattern,
			wordSeparators: searchConfig.editor.wordSeparators
		};

		if (this.isCaseSensitive(inputPattern)) {
			newPattern.isCaseSensitive = true;
		}

		if (this.isMultiline(inputPattern)) {
			newPattern.isMultiline = true;
		}

		return newPattern;
	}

	file(folderResources: uri[] | undefined, options: IFileQueryBuilderOptions = {}): IFileQuery {
		const commonQuery = this.commonQuery(folderResources, options);
		return <IFileQuery>{
			...commonQuery,
			type: QueryType.File,
			filePattern: options.filePattern
				? options.filePattern.trim()
				: options.filePattern,
			exists: options.exists,
			sortByScore: options.sortByScore,
			cacheKey: options.cacheKey
		};
	}

	private commonQuery(folderResources?: uri[], options: ICommonQueryBuilderOptions = {}): ICommonQueryProps<uri> {
		let { searchPaths, pattern: includePattern } = this.parseSearchPaths(options.includePattern || '');
		let excludePattern = this.parseExcludePattern(options.excludePattern || '');

		// Build folderQueries from searchPaths, if given, otherwise folderResources
		const folderQueries = searchPaths && searchPaths.length ?
			searchPaths.map(searchPath => this.getFolderQueryForSearchPath(searchPath, options)) :
			folderResources && folderResources.map(uri => this.getFolderQueryForRoot(uri, options));

		const useRipgrep = !folderResources || folderResources.every(folder => {
			const folderConfig = this.configurationService.getValue<ISearchConfiguration>({ resource: folder });
			return !folderConfig.search.useLegacySearch;
		});

		const queryProps: ICommonQueryProps<uri> = {
			_reason: options._reason,
			folderQueries: folderQueries || [],
			usingSearchPaths: !!(searchPaths && searchPaths.length),
			extraFileResources: options.extraFileResources,

			excludePattern,
			includePattern,
			maxResults: options.maxResults,
			useRipgrep
		};

		// Filter extraFileResources against global include/exclude patterns - they are already expected to not belong to a workspace
		let extraFileResources = options.extraFileResources && options.extraFileResources.filter(extraFile => pathIncludedInQuery(queryProps, extraFile.fsPath));
		queryProps.extraFileResources = extraFileResources && extraFileResources.length ? extraFileResources : undefined;

		return queryProps;
	}

	/**
	 * Resolve isCaseSensitive flag based on the query and the isSmartCase flag, for search providers that don't support smart case natively.
	 */
	private isCaseSensitive(contentPattern: IPatternInfo): boolean {
		if (contentPattern.isSmartCase) {
			if (contentPattern.isRegExp) {
				// Consider it case sensitive if it contains an unescaped capital letter
				if (strings.containsUppercaseCharacter(contentPattern.pattern, true)) {
					return true;
				}
			} else if (strings.containsUppercaseCharacter(contentPattern.pattern)) {
				return true;
			}
		}

		return !!contentPattern.isCaseSensitive;
	}

	private isMultiline(contentPattern: IPatternInfo): boolean {
		if (contentPattern.isMultiline) {
			return true;
		}

		if (contentPattern.isRegExp && isMultilineRegexSource(contentPattern.pattern)) {
			return true;
		}

		if (contentPattern.pattern.indexOf('\n') >= 0) {
			return true;
		}

		return !!contentPattern.isMultiline;
	}

	/**
	 * Take the includePattern as seen in the search viewlet, and split into components that look like searchPaths, and
	 * glob patterns. Glob patterns are expanded from 'foo/bar' to '{foo/bar/**, **\/foo/bar}.
	 *
	 * Public for test.
	 */
	public parseSearchPaths(pattern: string, expandSearchPaths = true): ISearchPathsResult {
		const isSearchPath = (segment: string) => {
			// A segment is a search path if it is an absolute path or starts with ./, ../, .\, or ..\
			return paths.isAbsolute(segment) || /^\.\.?[\/\\]/.test(segment);
		};

		const segments = splitGlobPattern(pattern)
			.map(segment => untildify(segment, this.environmentService.userHome));
		const groups = collections.groupBy(segments,
			segment => isSearchPath(segment) ? 'searchPaths' : 'exprSegments');

		const expandedExprSegments = (groups.exprSegments || [])
			.map(p => {
				if (p[0] === '.') {
					p = '*' + p; // convert ".js" to "*.js"
				}

				return expandGlobalGlob(p);
			});
		const exprSegments = arrays.flatten(expandedExprSegments);

		const result: ISearchPathsResult = {};
		if (expandSearchPaths) {
			const searchPaths = this.expandSearchPathPatterns(groups.searchPaths);
			if (searchPaths && searchPaths.length) {
				result.searchPaths = searchPaths;
			}
		} else if (groups.searchPaths) {
			exprSegments.push(...groups.searchPaths
				.map(p => strings.ltrim(p, './'))
				.map(p => strings.ltrim(p, '.\\')));
		}

		const includePattern = patternListToIExpression(exprSegments);
		if (includePattern) {
			result.pattern = includePattern;
		}

		return result;
	}

	/**
	 * Takes the input from the excludePattern as seen in the searchView. Runs the same algorithm as parseSearchPaths,
	 * but the result is a single IExpression that encapsulates all the exclude patterns.
	 */
	public parseExcludePattern(pattern: string): glob.IExpression | undefined {
		const result = this.parseSearchPaths(pattern, false);
		let excludeExpression = glob.getEmptyExpression();
		if (result.pattern) {
			excludeExpression = objects.mixin(excludeExpression, result.pattern);
		}

		if (result.searchPaths) {
			result.searchPaths.forEach(searchPath => {
				const excludeFsPath = searchPath.searchPath.fsPath;
				const excludePath = searchPath.pattern ?
					paths.join(excludeFsPath, searchPath.pattern) :
					excludeFsPath;

				excludeExpression[excludePath] = true;
			});
		}

		return Object.keys(excludeExpression).length ? excludeExpression : undefined;
	}

	private getExcludesForFolder(folderConfig: ISearchConfiguration, options: ICommonQueryBuilderOptions): glob.IExpression | undefined {
		return options.disregardExcludeSettings ?
			undefined :
			getExcludes(folderConfig);
	}

	/**
	 * Split search paths (./ or absolute paths in the includePatterns) into absolute paths and globs applied to those paths
	 */
	private expandSearchPathPatterns(searchPaths: string[]): ISearchPathPattern[] {
		if (this.workspaceContextService.getWorkbenchState() === WorkbenchState.EMPTY || !searchPaths || !searchPaths.length) {
			// No workspace => ignore search paths
			return [];
		}

		const searchPathPatterns = arrays.flatten(searchPaths.map(searchPath => {
			// 1 open folder => just resolve the search paths to absolute paths
			const { pathPortion, globPortion } = splitGlobFromPath(searchPath);
			const pathPortions = this.expandAbsoluteSearchPaths(pathPortion);
			return pathPortions.map(searchPath => {
				return <ISearchPathPattern>{
					searchPath,
					pattern: globPortion
				};
			});
		}));

		return searchPathPatterns.filter(arrays.uniqueFilter(searchPathPattern => searchPathPattern.searchPath.toString()));
	}

	/**
	 * Takes a searchPath like `./a/foo` and expands it to absolute paths for all the workspaces it matches.
	 */
	private expandAbsoluteSearchPaths(searchPath: string): uri[] {
		if (paths.isAbsolute(searchPath)) {
			// Currently only local resources can be searched for with absolute search paths
			return [uri.file(paths.normalize(searchPath))];
		}

		if (this.workspaceContextService.getWorkbenchState() === WorkbenchState.FOLDER) {
			const workspaceUri = this.workspaceContextService.getWorkspace().folders[0].uri;
			return [resources.joinPath(workspaceUri, searchPath)];
		} else if (searchPath === './') {
			return []; // ./ or ./**/foo makes sense for single-folder but not multi-folder workspaces
		} else {
			const relativeSearchPathMatch = searchPath.match(/\.[\/\\]([^\/\\]+)([\/\\].+)?/);
			if (relativeSearchPathMatch) {
				const searchPathRoot = relativeSearchPathMatch[1];
				const matchingRoots = this.workspaceContextService.getWorkspace().folders.filter(folder => folder.name === searchPathRoot);
				if (matchingRoots.length) {
					return matchingRoots.map(root => {
						return relativeSearchPathMatch[2] ?
							resources.joinPath(root.uri, relativeSearchPathMatch[2]) :
							root.uri;
					});
				} else {
					// No root folder with name
					const searchPathNotFoundError = nls.localize('search.noWorkspaceWithName', "No folder in workspace with name: {0}", searchPathRoot);
					throw new Error(searchPathNotFoundError);
				}
			} else {
				// Malformed ./ search path, ignore
			}
		}

		return [];
	}

	private getFolderQueryForSearchPath(searchPath: ISearchPathPattern, options: ICommonQueryBuilderOptions): IFolderQuery {
		const searchPathWorkspaceFolder = this.workspaceContextService.getWorkspaceFolder(searchPath.searchPath);
		const searchPathRelativePath = searchPathWorkspaceFolder && searchPath.searchPath.path.substr(searchPathWorkspaceFolder.uri.path.length + 1);

		const rootConfig = this.getFolderQueryForRoot(searchPath.searchPath, options);
		let resolvedExcludes: glob.IExpression = {};
		if (searchPathWorkspaceFolder && rootConfig.excludePattern) {
			// Resolve excludes relative to the search path
			for (let excludePattern in rootConfig.excludePattern) {
				const { pathPortion, globPortion } = splitSimpleGlob(excludePattern);
				if (!pathPortion) { // **/foo
					if (globPortion) {
						resolvedExcludes[globPortion] = rootConfig.excludePattern[excludePattern];
					}
				} else if (strings.startsWith(pathPortion, searchPathRelativePath)) { // searchPathRelativePath/something/**/foo
					// Strip `searchPathRelativePath/`
					const resolvedPathPortion = pathPortion.substr(searchPathRelativePath.length + 1);
					const resolvedPattern = globPortion ?
						resolvedPathPortion + globPortion :
						resolvedPathPortion;

					resolvedExcludes[resolvedPattern] = rootConfig.excludePattern[excludePattern];
				}
			}
		}

		return {
			...rootConfig,
			...{
				includePattern: searchPath.pattern ? patternListToIExpression([searchPath.pattern]) : undefined,
				excludePattern: Object.keys(resolvedExcludes).length ? resolvedExcludes : undefined
			}
		};
	}

	private getFolderQueryForRoot(folder: uri, options: ICommonQueryBuilderOptions): IFolderQuery {
		const folderConfig = this.configurationService.getValue<ISearchConfiguration>({ resource: folder });
		return <IFolderQuery>{
			folder,
			excludePattern: this.getExcludesForFolder(folderConfig, options),
			fileEncoding: folderConfig.files && folderConfig.files.encoding,
			disregardIgnoreFiles: typeof options.disregardIgnoreFiles === 'boolean' ? options.disregardIgnoreFiles : !folderConfig.search.useIgnoreFiles,
			disregardGlobalIgnoreFiles: typeof options.disregardGlobalIgnoreFiles === 'boolean' ? options.disregardGlobalIgnoreFiles : !folderConfig.search.useGlobalIgnoreFiles,
			ignoreSymlinks: typeof options.ignoreSymlinks === 'boolean' ? options.ignoreSymlinks : !folderConfig.search.followSymlinks,
		};
	}
}

function splitGlobFromPath(searchPath: string): { pathPortion: string, globPortion?: string } {
	const globCharMatch = searchPath.match(/[\*\{\}\(\)\[\]\?]/);
	if (globCharMatch) {
		const globCharIdx = globCharMatch.index;
		const lastSlashMatch = searchPath.substr(0, globCharIdx).match(/[/|\\][^/\\]*$/);
		if (lastSlashMatch) {
			let pathPortion = searchPath.substr(0, lastSlashMatch.index);
			if (!pathPortion.match(/[/\\]/)) {
				// If the last slash was the only slash, then we now have '' or 'C:' or '.'. Append a slash.
				pathPortion += '/';
			}

			return {
				pathPortion,
				globPortion: searchPath.substr((lastSlashMatch.index || 0) + 1)
			};
		}
	}

	// No glob char, or malformed
	return {
		pathPortion: searchPath
	};
}

function splitSimpleGlob(searchPath: string): { pathPortion: string, globPortion?: string } {
	const globCharMatch = searchPath.match(/[\*\{\}\(\)\[\]\?]/);
	if (globCharMatch) {
		const globCharIdx = globCharMatch.index || 0;
		return {
			pathPortion: searchPath.substr(0, globCharIdx),
			globPortion: searchPath.substr(globCharIdx)
		};
	}

	// No glob char
	return {
		pathPortion: searchPath
	};
}

function patternListToIExpression(patterns: string[]): glob.IExpression {
	return patterns.length ?
		patterns.reduce((glob, cur) => { glob[cur] = true; return glob; }, Object.create(null)) :
		undefined;
}

function splitGlobPattern(pattern: string): string[] {
	return glob.splitGlobAware(pattern, ',')
		.map(s => s.trim())
		.filter(s => !!s.length);
}

/**
 * Note - we used {} here previously but ripgrep can't handle nested {} patterns. See https://github.com/Microsoft/vscode/issues/32761
 */
function expandGlobalGlob(pattern: string): string[] {
	const patterns = [
		`**/${pattern}/**`,
		`**/${pattern}`
	];

	return patterns.map(p => p.replace(/\*\*\/\*\*/g, '**'));
}


text:
<?xml version="1.0" encoding="UTF-8"?>
<tei xmlns="http://www.tei-c.org/ns/1.0" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:mml="http://www.w3.org/1998/Math/MathML">
	<teiHeader>
		<fileDesc>
			<sourceDesc>
				<biblStruct>
					<analytic>
						<author>

						<affiliation>
							<orgName type="department">Department of Radiology</orgName>,
							<orgName type="institution">Indiana University</orgName>,
							<address>
								<settlement>Indianapolis</settlement>,
								<region>IN</region>,
								<country>USA</country>
							</address>
						</affiliation>

						</author>
					</analytic>
				</biblStruct>
			</sourceDesc>
		</fileDesc>
	</teiHeader>
</tei>


text:
    <ngb-alert *ngIf="notificationMessage" type="success" (close)="notificationMessage = null">{{ notificationMessage }}</ngb-alert>

        <appc-change-name (notification)="notify($event)"></appc-change-name>

        <appc-change-password (notification)="notify($event)"></appc-change-password>


text:
using System;
using System.Collections.Generic;
using System.Linq;
using Microsoft.Xrm.Client;
using Microsoft.Xrm.Sdk;
using Adxstudio.Xrm.Category;

namespace Site.Areas.Category.ViewModels
{
	public class CategoryViewModel
	{
        public string Number { get; set; }

		public IEnumerable<RelatedArticle> RelatedArticles { get; set; }

		public IEnumerable<ChildCategory> ChildCategories { get; set; }

		public string Title { get; set; }

	}
}


text:
This sample application demonstrates a simple F# MVC application
running in Google App Engine Flexible Environment.

The application uses the [Google Cloud Vision API](https://cloud.google.com/vision/)
to check whether an image contains naughty content.

## Prerequisites

1.  **Follow the set-up instructions in [the documentation](https://cloud.google.com/dotnet/docs/setup).**

2.  Install the [Google Cloud SDK](https://cloud.google.com/sdk/).  The Google Cloud SDK
    is required to deploy .NET applications to App Engine.

3.  Install the [.NET Core SDK, version 1.1](https://github.com/dotnet/core/blob/master/release-notes/download-archives/1.1.4-download.md)
    or newer.

4.  Visit [fsharp.org](http://fsharp.org/) and download F# for your system.

## ![PowerShell](../.resources/powershell.png) Using PowerShell

### Run Locally

```psm1
PS > bower install
PS > dotnet restore
PS > dotnet run
```

### Deploy to App Engine

```psm1
PS > bower install
PS > dotnet restore
PS > dotnet publish
PS > gcloud beta app deploy .\bin\Debug\netcoreapp1.1\publish\app.yaml
```


text:
using System;
using System.Drawing;
using OKHOSTING.UI.Controls;

namespace OKHOSTING.UI.Xamarin.Forms.Controls
{
	/// <summary>
	/// It is a control that represents a HyperLink in a Xamarin.Forms.
	/// <para xml:lang="es">
	/// Es un control que representa un HyperLink en un Xamarin.Forms.
	/// </para>
	/// </summary>
	public class HyperLink : global::Xamarin.Forms.Button, IHyperLink
	{
		/// <summary>
		/// Initializes a new instance of the HyperLink class.
		/// <para xml:lang="es">
		/// Inicializa una nueva instancia de la clase HyperLink.
		/// </para>
		/// </summary>
		public HyperLink()
		{
			base.Clicked += HyperLink_Clicked;
		}

		/// <summary>
		/// Hypers the link clicked.
		/// <para xml:lang="es">
		/// Reaccion al hacer clic en el enlace.
		/// </para>
		/// </summary>
		/// <returns>The link clicked.</returns>
		/// <param name="sender">Sender.</param>
		/// <param name="e">E.</param>
		private void HyperLink_Clicked(object sender, EventArgs e)
		{
			global::Xamarin.Essentials.Launcher.OpenAsync(((IHyperLink) this).Uri);
		}

		/// <summary>
		/// Gets or sets the Hyperlink URI.
		/// <para xml:lang="es">
		/// Obtiene o establece la URL del hiperlink.
		/// </para>
		/// </summary>
		Uri IHyperLink.Uri
		{
			get
			{
				return new Uri(base.Text);
			}
			set
			{
				base.Text = value.ToString();
			}
		}

		/// <summary>
		/// The identifier dispose.
		/// <para xml:lang="es">
		/// El identificador dispose.
		/// </para>
		/// </summary>
		/// <returns>The identifier isposable. dispose.</returns>
		void IDisposable.Dispose()
		{
		}

		#region IControl

		/// <summary>
		/// Unique Id
		/// </summary>
		Guid IControl.Id
		{
			get; set;
		}

		/// <summary>
		/// Gets or sets the name of the control.
		/// <para xml:lang="es">
		/// Obtiene o establece el nombre del control.
		/// </para>
		/// </summary>
		string IControl.Name
		{
			get; set;
		}

		/// <summary>
		/// Gets or sets wether the control is visible or not.
		/// <para xml:lang="es">
		/// Obtiene o establece si el control es visible o no.
		/// </para>
		/// </summary>
		bool IControl.Visible
		{
			get
			{
				return base.IsVisible;
			}
			set
			{
				base.IsVisible = value;
			}
		}

			/// <summary>
			/// Gets or sets wether the control is enabled or not
			/// <para xml:lang="es">
			/// Obtiene o establece si el control es habilitado o no.
			/// </para>
			/// </summary>
		bool IControl.Enabled
		{
			get
			{
				return base.IsEnabled;
			}
			set
			{
				base.IsEnabled = value;
			}
		}

		/// <summary>
		/// Gets or sets the width of the control.
		/// <para xml:lang="es">
		/// Obtiene o establece el ancho del control.
		/// </para>
		/// </summary>
		double? IControl.Width
		{
			get
			{
				return base.WidthRequest;
			}
			set
			{
				if (value.HasValue)
				{
					base.WidthRequest = value.Value;
				}
			}
		}

		/// <summary>
		/// Gets or sets the height of the control.
		/// <para xml:lang="es">
		/// Obtiene o establece la altura del control.
		/// </para>
		/// </summary>
		double? IControl.Height
		{
			get
			{
				return base.HeightRequest;
			}
			set
			{
				if (value.HasValue)
				{
					base.HeightRequest = value.Value;
				}
			}
		}

		/// <summary>
		/// Gets or sets the control margin.
		/// <para xml:lang="es">
		/// Obtiene o establece el margen del control.
		/// </para>
		/// </summary>
		Thickness IControl.Margin
		{
			get
			{
				return Forms.Platform.Parse(base.Margin);
			}
			set
			{
				base.Margin = Forms.Platform.Parse(value);
			}
		}

		/// <summary>
		/// Space that this control will set between its content and its border
		/// <para xml:lang="es">
		/// Espacio que este control se establecerá entre su contenido y su borde
		/// </para>
		/// </summary>
		Thickness IControl.Padding
		{
			get;
			set;
		}

		/// <summary>
		/// Gets or sets the color of the Control background.
		/// <para xml:lang="es">
		/// Obtiene o establece el color de fondo del control.
		/// </para>
		/// </summary>
		Color IControl.BackgroundColor
		{
			get
			{
				return Forms.Platform.Parse(base.BackgroundColor);
			}
			set
			{
				base.BackgroundColor = Forms.Platform.Parse(value);
			}
		}

		/// <summary>
		/// Gets or sets the color of the control border.
		/// <para xml:lang="es">
		/// Obtiene o establece el color del borde del control.
		/// </para>
		/// </summary>
		Color IControl.BorderColor
		{
			get
			{
				return Forms.Platform.Parse(base.BorderColor);
			}
			set
			{
				base.BorderColor = Forms.Platform.Parse(value);
			}
		}

		/// <summary>
		/// Gets or sets the width of the control border.
		/// <para xml:lang="es">
		/// Obtiene o establece el ancho del borde del control.
		/// </para>
		/// </summary>
		Thickness IControl.BorderWidth
		{
			get
			{
				return new Thickness(base.BorderWidth);
			}
			set
			{
				base.BorderWidth = value.Top;
			}
		}

		/// <summary>
		/// Gets or sets the control horizontal alignment.
		/// <para xml:lang="es">
		/// Obtiene o establece la alineacion horizontal del control.
		/// </para>
		/// </summary>
		HorizontalAlignment IControl.HorizontalAlignment
		{
			get
			{
				return Forms.Platform.Parse(base.HorizontalOptions.Alignment);
			}
			set
			{
				base.HorizontalOptions = new global::Xamarin.Forms.LayoutOptions(Forms.Platform.Parse(value), false);
			}
		}

		/// <summary>
		/// Gets or sets the control vertical alignment.
		/// <para xml:lang="es">
		/// Obtiene o establece la alineación vertical del control.
		/// </para>
		/// </summary>
		VerticalAlignment IControl.VerticalAlignment
		{
			get
			{
				return Forms.Platform.ParseVerticalAlignment(base.VerticalOptions.Alignment);
			}
			set
			{
				base.VerticalOptions = new global::Xamarin.Forms.LayoutOptions(Forms.Platform.Parse(value), false);
			}
		}

		/// <summary>
		/// Gets or sets an arbitrary object value that can be used to store custom information about this element.
		/// <para xml:lang="es">
		/// Obtiene o establece un un valor de objeto arbitrario que puede ser usado para almacenar informacion personalizada de este elemento.
		/// </para>
		/// </summary>
		/// <remarks>
		/// Returns the intended value. This property has no default value.
		/// <para xml:lang="es">
		/// Devuelve el valor previsto. Esta propiedad no contiene un valor predeterminado.
		/// </para>
		/// </remarks>
		object IControl.Tag
		{
			get; set;
		}

		/// <summary>
		/// Gets or sets a list of classes that define a control's style.
		/// Exactly the same concept as in CSS.
		/// </summary>
		string IControl.CssClass { get; set; }

		/// <summary>
		/// Control that contains this control, like a grid, or stack
		/// </summary>
		IControl IControl.Parent
		{
			get
			{
				return (IControl) base.Parent;
			}
		}

		object ICloneable.Clone()
		{
			return MemberwiseClone();
		}

		#endregion

		#region ITextControl

		/// <summary>
		/// Gets or sets text control font family.
		/// <para xml:lang="es">
		/// Obtiene o establece la tipografia del texto del control.
		/// </para>
		/// </summary>
		string ITextControl.FontFamily
		{
			get
			{
				return base.FontFamily;
			}
			set
			{
				base.FontFamily = value;
			}
		}

		/// <summary>
		/// Gets or sets the color of the text control font.
		/// <para xml:lang="es">
		/// Obtiene o establece el color del texto del control.
		/// </para>
		/// </summary>
		Color ITextControl.FontColor
		{
			get
			{
				return Forms.Platform.Parse(base.TextColor);
			}
			set
			{
				base.TextColor = Forms.Platform.Parse(value);
			}
		}

		/// <summary>
		/// Gets or sets wether Text control bold or no.
		/// <para xml:lang="es">
		/// Obtiene o establece si el texto del control esta en negritas o no.
		/// </para>
		/// </summary>
		bool ITextControl.Bold
		{
			get
			{
				return base.FontAttributes.HasFlag(global::Xamarin.Forms.FontAttributes.Bold);
			}
			set
			{
				base.FontAttributes = global::Xamarin.Forms.FontAttributes.Bold;
			}
		}

		/// <summary>
		/// Gets or sets wether text control italic or not.
		/// <para xml:lang="es">
		/// Obtiene o establece si el texto del control esta en italica.
		/// </para>
		/// </summary>
		bool ITextControl.Italic
		{
			get
			{
				return base.FontAttributes.HasFlag(global::Xamarin.Forms.FontAttributes.Italic);
			}
			set
			{
				base.FontAttributes = global::Xamarin.Forms.FontAttributes.Italic;
			}
		}

		/// <summary>
		/// Gets or sets wether text control underline or not.
		/// <para xml:lang="es">
		/// Obtiene o establece si el texto del control esta subrayado.
		/// </para>
		/// </summary>
		bool ITextControl.Underline
		{
			get;
			set;
		}

		/// <summary>
		/// Gets or sets text control horizontal alignment.
		/// <para xml:lang="es">
		/// Obtiene o establece la laineacion horizontal del texto del control.
		/// </para>
		/// </summary>
		HorizontalAlignment ITextControl.TextHorizontalAlignment
		{
			get;
			set;
		}

		/// <summary>
		/// Gets or sets the text control vertical alignment.
		/// <para xml:lang="es">
		/// Obtiene o establece la alineacion vertical del texto.
		/// </para>
		/// </summary>
		VerticalAlignment ITextControl.TextVerticalAlignment
		{
			get;
			set;
		}

		/// <summary>
		/// Gets or sets the controls text padding.
		/// <para xml:lang="es">
		/// Obtiene o establece el espacio entre un borde del control y su texto.
		/// </para>
		/// </summary>
		Thickness ITextControl.TextPadding
		{
			get;
			set;
		}

		#endregion
	}
}


text:
using System;
using System.Collections.Generic;
using NDatabase.Northwind.Domain;
using NDatabase.TypeResolution;
using NUnit.Framework;

namespace NDatabase.UnitTests.TypeResolution
{
    public class TypeResolution_TestCase
    {
        [Test]
        public void Test_simple_case_with_northwind_library()
        {
            var resolvedType = TypeResolutionUtils.ResolveType("NDatabase.Northwind.Domain.Category");

            Assert.That(resolvedType, Is.Not.Null);
            Assert.That(resolvedType, Is.EqualTo(typeof (Category)));
        }

        [Test]
        public void Test_case_with_assembly_qualified_name_from_type()
        {
            var resolvedType = TypeResolutionUtils.ResolveType(typeof (Category).AssemblyQualifiedName);

            Assert.That(resolvedType, Is.Not.Null);
            Assert.That(resolvedType, Is.EqualTo(typeof (Category)));
        }

        [Test]
        public void Test_simple_case_with_northwind_library_for_assembly_qualified_name()
        {
            var resolvedType =
                TypeResolutionUtils.ResolveType("NDatabase.Northwind.Domain.Category, NDatabase.Northwind.Domain");

            Assert.That(resolvedType, Is.Not.Null);
            Assert.That(resolvedType, Is.EqualTo(typeof (Category)));
        }

        [Test]
        public void Test_resolution_of_non_existing_type()
        {
            var resolvedType = TypeResolutionUtils.ResolveType("NonExisting.Class");
            Assert.That(resolvedType, Is.Null);
        }

        [Test]
        [ExpectedException(typeof (ArgumentNullException))]
        public void Test_resolution_of_null()
        {
            TypeResolutionUtils.ResolveType(null);
        }

        [Test]
        public void LoadTypeFromSystemAssemblySpecifyingOnlyTheAssemblyDisplayName()
        {
            var stringType = typeof (string).FullName + ", System";
            var t = TypeResolutionUtils.ResolveType(stringType);
            Assert.AreEqual(typeof (string), t);
        }

        [Test]
        public void LoadTypeFromSystemAssemblySpecifyingTheFullAssemblyName()
        {
            var stringType = typeof (string).AssemblyQualifiedName;
            var t = TypeResolutionUtils.ResolveType(stringType);
            Assert.AreEqual(typeof (string), t);
        }

        [Test]
        public void CanTakeQualifiedType()
        {
            var testType = typeof (Category);
            var typeAssemblyHolder = new TypeAssemblyHolder(testType.AssemblyQualifiedName);
            Assert.IsTrue(typeAssemblyHolder.IsAssemblyQualified);
            Assert.AreEqual(testType.FullName, typeAssemblyHolder.GetTypeName());
            Assert.AreEqual(testType.Assembly.FullName, typeAssemblyHolder.GetAssemblyName());
        }

        [Test]
        public void CanTakeUnqualifiedType()
        {
            var testType = typeof (Category);
            var typeAssemblyHolder = new TypeAssemblyHolder(testType.FullName);
            Assert.IsFalse(typeAssemblyHolder.IsAssemblyQualified);
            Assert.AreEqual(testType.FullName, typeAssemblyHolder.GetTypeName());
            Assert.AreEqual(null, typeAssemblyHolder.GetAssemblyName());
        }

        [Test]
        public void CanTakeUnqualifiedGenericType()
        {
            var testType = typeof (TestGenericObject<int, string>);
            var tah = new TypeAssemblyHolder(testType.FullName);
            Assert.IsFalse(tah.IsAssemblyQualified);
            Assert.AreEqual(testType.FullName, tah.GetTypeName());
            Assert.AreEqual(null, tah.GetAssemblyName());
        }

        [Test]
        public void CanTakeQualifiedGenericType()
        {
            var testType = typeof (TestGenericObject<int, string>);
            var tah = new TypeAssemblyHolder(testType.AssemblyQualifiedName);
            Assert.IsTrue(tah.IsAssemblyQualified);
            Assert.AreEqual(testType.FullName, tah.GetTypeName());
            Assert.AreEqual(testType.Assembly.FullName, tah.GetAssemblyName());
        }

        [Test]
        public void ResolveLocalAssemblyGenericType()
        {
            var t = TypeResolutionUtils.ResolveType("NDatabase.UnitTests.TypeResolution.TestGenericObject< int, string>");
            Assert.AreEqual(typeof (TestGenericObject<int, string>), t);
        }

        [Test]
        public void ResolveLocalAssemblyGenericTypeDefinition()
        {
            // CLOVER:ON
            var t = TypeResolutionUtils.ResolveType("NDatabase.UnitTests.TypeResolution.TestGenericObject< ,>");
            // CLOVER:OFF
            Assert.AreEqual(typeof (TestGenericObject<,>), t);
        }

        [Test]
        [ExpectedException(typeof (TypeLoadException))]
        public void ResolveLocalAssemblyGenericTypeOpen()
        {
            TypeResolutionUtils.ResolveType("NDatabase.UnitTests.TypeResolution.TestGenericObject<int >");
        }

        [Test]
        public void ResolveGenericTypeWithAssemblyName()
        {
            var t = TypeResolutionUtils.ResolveType("System.Collections.Generic.Stack<string>, System");
            Assert.AreEqual(typeof (Stack<string>), t);
        }

        [Test]
        public void ResolveGenericArrayType()
        {
            var t = TypeResolutionUtils.ResolveType("System.Nullable<[System.Int32, mscorlib]>[,]");
            Assert.AreEqual(typeof (int?[,]), t);
            t = TypeResolutionUtils.ResolveType("System.Nullable`1[int][,]");
            Assert.AreEqual(typeof (int?[,]), t);
        }

        [Test]
        public void ResolveGenericArrayTypeWithAssemblyName()
        {
            var t = TypeResolutionUtils.ResolveType("System.Nullable<[System.Int32, mscorlib]>[,], mscorlib");
            Assert.AreEqual(typeof (int?[,]), t);
            t = TypeResolutionUtils.ResolveType("System.Nullable<[System.Int32, mscorlib]>[,], mscorlib");
            Assert.AreEqual(typeof (int?[,]), t);
            t = TypeResolutionUtils.ResolveType("System.Nullable`1[[System.Int32, mscorlib]][,], mscorlib");
            Assert.AreEqual(typeof (int?[,]), t);
        }

        [Test]
        [ExpectedException(typeof (TypeLoadException))]
        public void ResolveAmbiguousGenericTypeWithAssemblyName()
        {
            var t =
                TypeResolutionUtils.ResolveType(
                    "NDatabase.UnitTests.TypeResolution.TestGenericObject<System.Collections.Generic.Stack<int>, System, string>");
        }

        [Test]
        [ExpectedException(typeof (TypeLoadException))]
        public void ResolveMalformedGenericType()
        {
            var t =
                TypeResolutionUtils.ResolveType("NDatabase.UnitTests.TypeResolution.TestGenericObject<int, <string>>");
        }

        [Test]
        public void ResolveNestedGenericTypeWithAssemblyName()
        {
            var t =
                TypeResolutionUtils.ResolveType(
                    "System.Collections.Generic.Stack< NDatabase.UnitTests.TypeResolution.TestGenericObject<int, string> >, System");
            Assert.AreEqual(typeof (Stack<TestGenericObject<int, string>>), t);
        }

        [Test]
        public void ResolveClrNotationStyleGenericTypeWithAssemblyName()
        {
            var t =
                TypeResolutionUtils.ResolveType(
                    "System.Collections.Generic.Stack`1[ [NDatabase.UnitTests.TypeResolution.TestGenericObject`2[int, string], NDatabase.UnitTests] ], System");
            Assert.AreEqual(typeof (Stack<TestGenericObject<int, string>>), t);
        }

        [Test]
        public void ResolveNestedQuotedGenericTypeWithAssemblyName()
        {
            var t =
                TypeResolutionUtils.ResolveType(
                    "System.Collections.Generic.Stack< [NDatabase.UnitTests.TypeResolution.TestGenericObject<int, string>, NDatabase.UnitTests] >, System");
            Assert.AreEqual(typeof (Stack<TestGenericObject<int, string>>), t);
        }
    }
}


text:
/*
 * Infobip Client API Libraries OpenAPI Specification
 * OpenAPI specification containing public endpoints supported in client API libraries.
 *
 * Contact: support@infobip.com
 *
 * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
 * https://openapi-generator.tech
 * Do not edit the class manually.
 */

package com.infobip.api;

import com.google.gson.reflect.TypeToken;
import com.infobip.ApiCallback;
import com.infobip.ApiClient;
import com.infobip.ApiException;
import com.infobip.ApiResponse;
import com.infobip.Configuration;
import com.infobip.Pair;
import com.infobip.model.WhatsAppTemplateApiResponse;
import com.infobip.model.WhatsAppTemplatePublicApiRequest;
import com.infobip.model.WhatsAppTemplatesApiResponse;
import com.infobip.model.WhatsAppUrlDeletionRequest;
import java.lang.reflect.Type;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

public class ManageWhatsAppApi {
  private ApiClient localVarApiClient;

  public ManageWhatsAppApi() {
    this(Configuration.getDefaultApiClient());
  }

  public ManageWhatsAppApi(ApiClient apiClient) {
    this.localVarApiClient = apiClient;
  }

  public ApiClient getApiClient() {
    return localVarApiClient;
  }

  public void setApiClient(ApiClient apiClient) {
    this.localVarApiClient = apiClient;
  }

  /**
   * Build call for createWhatsAppTemplate.
   *
   * @param sender Registered WhatsApp sender number. Must be in international format. (required)
   * @param whatsAppTemplatePublicApiRequest (required)
   * @param _callback Callback for upload/download progress
   * @return Call to execute
   * @throws ApiException If fail to serialize the request body object
   * @see Learn more about WhatsApp channel and use
   *     cases
   */
  public okhttp3.Call createWhatsAppTemplateCall(
      String sender,
      WhatsAppTemplatePublicApiRequest whatsAppTemplatePublicApiRequest,
      final ApiCallback _callback)
      throws ApiException {
    Object localVarPostBody = whatsAppTemplatePublicApiRequest;

    // create path and map variables
    String localVarPath =
        "/whatsapp/1/senders/{sender}/templates"
            .replaceAll(
                "\\{" + "sender" + "\\}", localVarApiClient.escapeString(sender.toString()));

    List<Pair> localVarQueryParams = new ArrayList<Pair>();
    List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>();
    Map<String, String> localVarHeaderParams = new HashMap<String, String>();
    Map<String, String> localVarCookieParams = new HashMap<String, String>();
    Map<String, Object> localVarFormParams = new HashMap<String, Object>();
    final String[] localVarAccepts = {"application/json"};
    final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
    if (localVarAccept != null) {
      localVarHeaderParams.put("Accept", localVarAccept);
    }

    final String[] localVarContentTypes = {"application/json"};
    final String localVarContentType =
        localVarApiClient.selectHeaderContentType(localVarContentTypes);
    localVarHeaderParams.put("Content-Type", localVarContentType);

    String[] localVarAuthNames =
        new String[] {"APIKeyHeader", "Basic", "IBSSOTokenHeader", "OAuth2"};
    return localVarApiClient.buildCall(
        localVarPath,
        "POST",
        localVarQueryParams,
        localVarCollectionQueryParams,
        localVarPostBody,
        localVarHeaderParams,
        localVarCookieParams,
        localVarFormParams,
        localVarAuthNames,
        _callback);
  }

  @SuppressWarnings("rawtypes")
  private okhttp3.Call createWhatsAppTemplateValidateBeforeCall(
      String sender,
      WhatsAppTemplatePublicApiRequest whatsAppTemplatePublicApiRequest,
      final ApiCallback _callback)
      throws ApiException {

    // verify the required parameter 'sender' is set
    if (sender == null) {
      throw new ApiException(
          "Missing the required parameter 'sender' when calling createWhatsAppTemplate(Async)");
    }

    // verify the required parameter 'whatsAppTemplatePublicApiRequest' is set
    if (whatsAppTemplatePublicApiRequest == null) {
      throw new ApiException(
          "Missing the required parameter 'whatsAppTemplatePublicApiRequest' when calling"
              + " createWhatsAppTemplate(Async)");
    }

    okhttp3.Call localVarCall =
        createWhatsAppTemplateCall(sender, whatsAppTemplatePublicApiRequest, _callback);
    return localVarCall;
  }

  /**
   * Create WhatsApp Template. Create WhatsApp template. Created template will be submitted for
   * WhatsApp's review and approval. Once approved, template can be sent to end-users. Refer to
   * [template
   * guidelines](https://www.infobip.com/docs/whatsapp/message-types#guidelines-amp-best-practices)
   * for additional info.
   *
   * @param sender Registered WhatsApp sender number. Must be in international format. (required)
   * @param whatsAppTemplatePublicApiRequest (required)
   * @return WhatsAppTemplateApiResponse
   * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the
   *     response body
   * @see Learn more about WhatsApp channel and use
   *     cases
   */
  public WhatsAppTemplateApiResponse createWhatsAppTemplate(
      String sender, WhatsAppTemplatePublicApiRequest whatsAppTemplatePublicApiRequest)
      throws ApiException {
    ApiResponse<WhatsAppTemplateApiResponse> localVarResp =
        createWhatsAppTemplateWithHttpInfo(sender, whatsAppTemplatePublicApiRequest);
    return localVarResp.getData();
  }

  /**
   * Create WhatsApp Template. Create WhatsApp template. Created template will be submitted for
   * WhatsApp's review and approval. Once approved, template can be sent to end-users. Refer to
   * [template
   * guidelines](https://www.infobip.com/docs/whatsapp/message-types#guidelines-amp-best-practices)
   * for additional info.
   *
   * @param sender Registered WhatsApp sender number. Must be in international format. (required)
   * @param whatsAppTemplatePublicApiRequest (required)
   * @return ApiResponse<WhatsAppTemplateApiResponse>
   * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the
   *     response body
   * @see Learn more about WhatsApp channel and use
   *     cases
   */
  public ApiResponse<WhatsAppTemplateApiResponse> createWhatsAppTemplateWithHttpInfo(
      String sender, WhatsAppTemplatePublicApiRequest whatsAppTemplatePublicApiRequest)
      throws ApiException {
    okhttp3.Call localVarCall =
        createWhatsAppTemplateValidateBeforeCall(sender, whatsAppTemplatePublicApiRequest, null);
    Type localVarReturnType = new TypeToken<WhatsAppTemplateApiResponse>() {}.getType();
    return localVarApiClient.execute(localVarCall, localVarReturnType);
  }

  /**
   * Create WhatsApp Template (asynchronously). Create WhatsApp template. Created template will be
   * submitted for WhatsApp's review and approval. Once approved, template can be sent to
   * end-users. Refer to [template
   * guidelines](https://www.infobip.com/docs/whatsapp/message-types#guidelines-amp-best-practices)
   * for additional info.
   *
   * @param sender Registered WhatsApp sender number. Must be in international format. (required)
   * @param whatsAppTemplatePublicApiRequest (required)
   * @param _callback The callback to be executed when the API call finishes
   * @return The request call
   * @throws ApiException If fail to process the API call, e.g. serializing the request body object
   * @see Learn more about WhatsApp channel and use
   *     cases
   */
  public okhttp3.Call createWhatsAppTemplateAsync(
      String sender,
      WhatsAppTemplatePublicApiRequest whatsAppTemplatePublicApiRequest,
      final ApiCallback<WhatsAppTemplateApiResponse> _callback)
      throws ApiException {

    okhttp3.Call localVarCall =
        createWhatsAppTemplateValidateBeforeCall(
            sender, whatsAppTemplatePublicApiRequest, _callback);
    Type localVarReturnType = new TypeToken<WhatsAppTemplateApiResponse>() {}.getType();
    localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
    return localVarCall;
  }
  /**
   * Build call for deleteWhatsAppMedia.
   *
   * @param sender Registered WhatsApp sender number. Must be in international format. (required)
   * @param whatsAppUrlDeletionRequest (required)
   * @param _callback Callback for upload/download progress
   * @return Call to execute
   * @throws ApiException If fail to serialize the request body object
   * @see Learn more about WhatsApp channel and use
   *     cases
   */
  public okhttp3.Call deleteWhatsAppMediaCall(
      String sender,
      WhatsAppUrlDeletionRequest whatsAppUrlDeletionRequest,
      final ApiCallback _callback)
      throws ApiException {
    Object localVarPostBody = whatsAppUrlDeletionRequest;

    // create path and map variables
    String localVarPath =
        "/whatsapp/1/senders/{sender}/media"
            .replaceAll(
                "\\{" + "sender" + "\\}", localVarApiClient.escapeString(sender.toString()));

    List<Pair> localVarQueryParams = new ArrayList<Pair>();
    List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>();
    Map<String, String> localVarHeaderParams = new HashMap<String, String>();
    Map<String, String> localVarCookieParams = new HashMap<String, String>();
    Map<String, Object> localVarFormParams = new HashMap<String, Object>();
    final String[] localVarAccepts = {"*/*"};
    final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
    if (localVarAccept != null) {
      localVarHeaderParams.put("Accept", localVarAccept);
    }

    final String[] localVarContentTypes = {"application/json"};
    final String localVarContentType =
        localVarApiClient.selectHeaderContentType(localVarContentTypes);
    localVarHeaderParams.put("Content-Type", localVarContentType);

    String[] localVarAuthNames =
        new String[] {"APIKeyHeader", "Basic", "IBSSOTokenHeader", "OAuth2"};
    return localVarApiClient.buildCall(
        localVarPath,
        "DELETE",
        localVarQueryParams,
        localVarCollectionQueryParams,
        localVarPostBody,
        localVarHeaderParams,
        localVarCookieParams,
        localVarFormParams,
        localVarAuthNames,
        _callback);
  }

  @SuppressWarnings("rawtypes")
  private okhttp3.Call deleteWhatsAppMediaValidateBeforeCall(
      String sender,
      WhatsAppUrlDeletionRequest whatsAppUrlDeletionRequest,
      final ApiCallback _callback)
      throws ApiException {

    // verify the required parameter 'sender' is set
    if (sender == null) {
      throw new ApiException(
          "Missing the required parameter 'sender' when calling deleteWhatsAppMedia(Async)");
    }

    // verify the required parameter 'whatsAppUrlDeletionRequest' is set
    if (whatsAppUrlDeletionRequest == null) {
      throw new ApiException(
          "Missing the required parameter 'whatsAppUrlDeletionRequest' when calling"
              + " deleteWhatsAppMedia(Async)");
    }

    okhttp3.Call localVarCall =
        deleteWhatsAppMediaCall(sender, whatsAppUrlDeletionRequest, _callback);
    return localVarCall;
  }

  /**
   * Delete media. Delete WhatsApp media. May be outbound or inbound media.
   *
   * @param sender Registered WhatsApp sender number. Must be in international format. (required)
   * @param whatsAppUrlDeletionRequest (required)
   * @return String
   * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the
   *     response body
   * @see Learn more about WhatsApp channel and use
   *     cases
   */
  public String deleteWhatsAppMedia(
      String sender, WhatsAppUrlDeletionRequest whatsAppUrlDeletionRequest) throws ApiException {
    ApiResponse<String> localVarResp =
        deleteWhatsAppMediaWithHttpInfo(sender, whatsAppUrlDeletionRequest);
    return localVarResp.getData();
  }

  /**
   * Delete media. Delete WhatsApp media. May be outbound or inbound media.
   *
   * @param sender Registered WhatsApp sender number. Must be in international format. (required)
   * @param whatsAppUrlDeletionRequest (required)
   * @return ApiResponse<String>
   * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the
   *     response body
   * @see Learn more about WhatsApp channel and use
   *     cases
   */
  public ApiResponse<String> deleteWhatsAppMediaWithHttpInfo(
      String sender, WhatsAppUrlDeletionRequest whatsAppUrlDeletionRequest) throws ApiException {
    okhttp3.Call localVarCall =
        deleteWhatsAppMediaValidateBeforeCall(sender, whatsAppUrlDeletionRequest, null);
    Type localVarReturnType = new TypeToken<String>() {}.getType();
    return localVarApiClient.execute(localVarCall, localVarReturnType);
  }

  /**
   * Delete media (asynchronously). Delete WhatsApp media. May be outbound or inbound media.
   *
   * @param sender Registered WhatsApp sender number. Must be in international format. (required)
   * @param whatsAppUrlDeletionRequest (required)
   * @param _callback The callback to be executed when the API call finishes
   * @return The request call
   * @throws ApiException If fail to process the API call, e.g. serializing the request body object
   * @see Learn more about WhatsApp channel and use
   *     cases
   */
  public okhttp3.Call deleteWhatsAppMediaAsync(
      String sender,
      WhatsAppUrlDeletionRequest whatsAppUrlDeletionRequest,
      final ApiCallback<String> _callback)
      throws ApiException {

    okhttp3.Call localVarCall =
        deleteWhatsAppMediaValidateBeforeCall(sender, whatsAppUrlDeletionRequest, _callback);
    Type localVarReturnType = new TypeToken<String>() {}.getType();
    localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
    return localVarCall;
  }
  /**
   * Build call for getWhatsAppTemplates.
   *
   * @param sender Registered WhatsApp sender number. Must be in international format. (required)
   * @param _callback Callback for upload/download progress
   * @return Call to execute
   * @throws ApiException If fail to serialize the request body object
   * @see Learn more about WhatsApp channel and use
   *     cases
   */
  public okhttp3.Call getWhatsAppTemplatesCall(String sender, final ApiCallback _callback)
      throws ApiException {
    Object localVarPostBody = null;

    // create path and map variables
    String localVarPath =
        "/whatsapp/1/senders/{sender}/templates"
            .replaceAll(
                "\\{" + "sender" + "\\}", localVarApiClient.escapeString(sender.toString()));

    List<Pair> localVarQueryParams = new ArrayList<Pair>();
    List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>();
    Map<String, String> localVarHeaderParams = new HashMap<String, String>();
    Map<String, String> localVarCookieParams = new HashMap<String, String>();
    Map<String, Object> localVarFormParams = new HashMap<String, Object>();
    final String[] localVarAccepts = {"application/json"};
    final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
    if (localVarAccept != null) {
      localVarHeaderParams.put("Accept", localVarAccept);
    }

    final String[] localVarContentTypes = {};

    final String localVarContentType =
        localVarApiClient.selectHeaderContentType(localVarContentTypes);
    localVarHeaderParams.put("Content-Type", localVarContentType);

    String[] localVarAuthNames =
        new String[] {"APIKeyHeader", "Basic", "IBSSOTokenHeader", "OAuth2"};
    return localVarApiClient.buildCall(
        localVarPath,
        "GET",
        localVarQueryParams,
        localVarCollectionQueryParams,
        localVarPostBody,
        localVarHeaderParams,
        localVarCookieParams,
        localVarFormParams,
        localVarAuthNames,
        _callback);
  }

  @SuppressWarnings("rawtypes")
  private okhttp3.Call getWhatsAppTemplatesValidateBeforeCall(
      String sender, final ApiCallback _callback) throws ApiException {

    // verify the required parameter 'sender' is set
    if (sender == null) {
      throw new ApiException(
          "Missing the required parameter 'sender' when calling getWhatsAppTemplates(Async)");
    }

    okhttp3.Call localVarCall = getWhatsAppTemplatesCall(sender, _callback);
    return localVarCall;
  }

  /**
   * Get WhatsApp Templates. Get all the templates and their statuses for a given sender.
   *
   * @param sender Registered WhatsApp sender number. Must be in international format. (required)
   * @return WhatsAppTemplatesApiResponse
   * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the
   *     response body
   * @see Learn more about WhatsApp channel and use
   *     cases
   */
  public WhatsAppTemplatesApiResponse getWhatsAppTemplates(String sender) throws ApiException {
    ApiResponse<WhatsAppTemplatesApiResponse> localVarResp =
        getWhatsAppTemplatesWithHttpInfo(sender);
    return localVarResp.getData();
  }

  /**
   * Get WhatsApp Templates. Get all the templates and their statuses for a given sender.
   *
   * @param sender Registered WhatsApp sender number. Must be in international format. (required)
   * @return ApiResponse<WhatsAppTemplatesApiResponse>
   * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the
   *     response body
   * @see Learn more about WhatsApp channel and use
   *     cases
   */
  public ApiResponse<WhatsAppTemplatesApiResponse> getWhatsAppTemplatesWithHttpInfo(String sender)
      throws ApiException {
    okhttp3.Call localVarCall = getWhatsAppTemplatesValidateBeforeCall(sender, null);
    Type localVarReturnType = new TypeToken<WhatsAppTemplatesApiResponse>() {}.getType();
    return localVarApiClient.execute(localVarCall, localVarReturnType);
  }

  /**
   * Get WhatsApp Templates (asynchronously). Get all the templates and their statuses for a given
   * sender.
   *
   * @param sender Registered WhatsApp sender number. Must be in international format. (required)
   * @param _callback The callback to be executed when the API call finishes
   * @return The request call
   * @throws ApiException If fail to process the API call, e.g. serializing the request body object
   * @see Learn more about WhatsApp channel and use
   *     cases
   */
  public okhttp3.Call getWhatsAppTemplatesAsync(
      String sender, final ApiCallback<WhatsAppTemplatesApiResponse> _callback)
      throws ApiException {

    okhttp3.Call localVarCall = getWhatsAppTemplatesValidateBeforeCall(sender, _callback);
    Type localVarReturnType = new TypeToken<WhatsAppTemplatesApiResponse>() {}.getType();
    localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
    return localVarCall;
  }
}


text:
NearOomReductionInfoBar::NearOomReductionInfoBar(InterventionDelegate* delegate)
    : InfoBarAndroid(std::make_unique<InterventionInfoBarDelegate>(
          infobars::InfoBarDelegate::InfoBarIdentifier::
              NEAR_OOM_REDUCTION_INFOBAR_ANDROID,
          delegate)),
      delegate_(delegate) {
  DCHECK(delegate_);
}

NearOomReductionInfoBar::~NearOomReductionInfoBar() = default;

void NearOomReductionInfoBar::ProcessButton(int action) {
  NOTREACHED();  // No button on this infobar.
}

base::android::ScopedJavaLocalRef<jobject>
NearOomReductionInfoBar::CreateRenderInfoBar(JNIEnv* env) {
  return Java_NearOomReductionInfoBar_create(env);
}

void NearOomReductionInfoBar::OnLinkClicked(
    JNIEnv* env,
    const base::android::JavaParamRef<jobject>& obj) {
  if (!owner())
    return;  // We're closing; don't call anything, it might access the owner.

  delegate_->DeclineInterventionWithReload();
  RemoveSelf();
}

// static
void NearOomReductionInfoBar::Show(content::WebContents* web_contents,
                                   InterventionDelegate* delegate) {
  InfoBarService* service = InfoBarService::FromWebContents(web_contents);
  service->AddInfoBar(base::WrapUnique(new NearOomReductionInfoBar(delegate)));
}


text:
''' Provide a utility class ``CodeRunner`` for use by handlers that execute
Python source code.

'''
from __future__ import absolute_import, print_function

from types import ModuleType
import os
import sys
import traceback

from bokeh.util.serialization import make_id

class CodeRunner(object):
    ''' Compile and run Python source code.

    '''

    def __init__(self, source, path, argv):
        '''

        Args:
            source (str) : python source code

            path (str) : a filename to use in any debugging or error output

            argv (list[str]) : a list of string arguments to make available
                as ``sys.argv`` when the code executes

        '''
        self._failed = False
        self._error = None
        self._error_detail = None

        import ast
        self._code = None

        try:
            nodes = ast.parse(source, path)
            self._code = compile(nodes, filename=path, mode='exec', dont_inherit=True)
        except SyntaxError as e:
            self._failed = True
            self._error = ("Invalid syntax in \"%s\" on line %d:\n%s" % (os.path.basename(e.filename), e.lineno, e.text))
            import traceback
            self._error_detail = traceback.format_exc()

        self._path = path
        self._source = source
        self._argv = argv
        self.ran = False

    @property
    def source(self):
        ''' The configured source code that will be executed when ``run`` is
        called.

        '''
        return self._source

    @property
    def path(self):
        ''' The path that new modules will be configured with.

        '''
        return self._path

    @property
    def failed(self):
        ''' ``True`` if code execution failed

        '''
        return self._failed

    @property
    def error(self):
        ''' If code execution fails, may contain a related error message.

        '''
        return self._error

    @property
    def error_detail(self):
        ''' If code execution fails, may contain a traceback or other details.

        '''
        return self._error_detail

    def new_module(self):
        ''' Make a fresh module to run in.

        Returns:
            Module

        '''
        if self.failed:
            return None

        module_name = 'bk_script_' + make_id().replace('-', '')
        module = ModuleType(module_name)
        module.__dict__['__file__'] = os.path.abspath(self._path)

        return module

    def run(self, module, post_check):
        ''' Execute the configured source code in a module and run any post
        checks.

        Args:
            module (Module) : a module to execute the configured code in.

            post_check(callable) : a function that can raise an exception
                if expected post-conditions are not met after code execution.

        '''
        try:
            # Simulate the sys.path behaviour decribed here:
            #
            # https://docs.python.org/2/library/sys.html#sys.path
            _cwd = os.getcwd()
            _sys_path = list(sys.path)
            _sys_argv = list(sys.argv)
            sys.path.insert(0, os.path.dirname(self._path))
            sys.argv = [os.path.basename(self._path)] + self._argv

            exec(self._code, module.__dict__)
            post_check()

        except Exception as e:
            self._failed = True
            self._error_detail = traceback.format_exc()

            exc_type, exc_value, exc_traceback = sys.exc_info()
            filename, line_number, func, txt = traceback.extract_tb(exc_traceback)[-1]

            self._error = "%s\nFile \"%s\", line %d, in %s:\n%s" % (str(e), os.path.basename(filename), line_number, func, txt)

        finally:
            # undo sys.path, CWD fixups
            os.chdir(_cwd)
            sys.path = _sys_path
            sys.argv = _sys_argv
            self.ran = True


text:
package com.almasb.fxglgames.drop;

import com.almasb.fxgl.app.ApplicationMode;
import com.almasb.fxgl.app.GameApplication;
import com.almasb.fxgl.app.GameSettings;
import com.almasb.fxgl.core.math.FXGLMath;
import com.almasb.fxgl.dsl.components.OffscreenCleanComponent;
import com.almasb.fxgl.entity.Entity;
import javafx.util.Duration;

import static com.almasb.fxgl.dsl.FXGL.*;
// NOTE: this import above is crucial, it pulls in many useful methods

/**
 * This is an FXGL version of the libGDX simple game tutorial, which can be found
 * here - https://github.com/libgdx/libgdx/wiki/A-simple-game
 *
 * The player can move the bucket left and right to catch water droplets.
 * There are no win/lose conditions.
 *
 * Note: for simplicity's sake all of the code is kept in this file.
 * In addition, most of typical FXGL API is not used to avoid overwhelming
 * FXGL beginners with a lot of new concepts to learn.
 *
 * Although the code is self-explanatory, some may find the comments useful
 * for following the code.
 *
 * @author Almas Baimagambetov (AlmasB) (almaslvl@gmail.com)
 */
public class DropApp extends GameApplication {

    /**
     * Types of entities in this game.
     */
    public enum Type {
        DROPLET, BUCKET
    }

    @Override
    protected void initSettings(GameSettings settings) {
        // initialize common game / window settings.
        settings.setTitle("Drop");
        settings.setVersion("1.0");
        settings.setWidth(480);
        settings.setHeight(800);
        settings.setApplicationMode(ApplicationMode.DEVELOPER);
    }

    @Override
    protected void initGame() {
        spawnBucket();

        // creates a timer that runs spawnDroplet() every second
        run(() -> spawnDroplet(), Duration.seconds(1));

        // loop background music located in /resources/assets/music/
        loopBGM("bgm.mp3");
    }

    @Override
    protected void initPhysics() {
        onCollisionBegin(Type.BUCKET, Type.DROPLET, (bucket, droplet) -> {

            // code in this block is called when there is a collision between Type.BUCKET and Type.DROPLET

            // remove the collided droplet from the game
            droplet.removeFromWorld();

            // play a sound effect located in /resources/assets/sounds/
            play("drop.wav");
        });
    }

    @Override
    protected void onUpdate(double tpf) {

        // for each entity of Type.DROPLET translate (move) it down
        getGameWorld().getEntitiesByType(Type.DROPLET).forEach(droplet -> droplet.translateY(150 * tpf));
    }

    private void spawnBucket() {
        // build an entity with Type.BUCKET
        // at the position X = getAppWidth() / 2 and Y = getAppHeight() - 200
        // with a view "bucket.png", which is an image located in /resources/assets/textures/
        // also create a bounding box from that view
        // make the entity collidable
        // finally, complete building and attach to the game world

        Entity bucket = entityBuilder()
                .type(Type.BUCKET)
                .at(getAppWidth() / 2, getAppHeight() - 200)
                .viewWithBBox("bucket.png")
                .collidable()
                .buildAndAttach();

        // bind bucket's X value to mouse X
        bucket.xProperty().bind(getInput().mouseXWorldProperty());
    }

    private void spawnDroplet() {
        entityBuilder()
                .type(Type.DROPLET)
                .at(FXGLMath.random(0, getAppWidth() - 64), 0)
                .viewWithBBox("droplet.png")
                .collidable()
                .with(new OffscreenCleanComponent())
                .buildAndAttach();
    }

    public static void main(String[] args) {
        launch(args);
    }
}


text:
/*jshint laxcomma: true, smarttabs: true, node: true*/
'use strict';
/**
 * Resource Field for dealing with integervalues
 * @module tastypie/fields/integer
 * @author Eric Satterwhite
 * @since 0.5.0
 * @requires tastypie/lib/class
 * @requires tastypie/lib/fields/api
 */

var Class          = require( '../class' )
  , ApiField       = require('./api')
  , IntegerField
  ;

/**
 * @constructor
 * @alias module:tastypie/fields/integer
 * @extends module:tastypie/fields/api
 */
exports.IntegerField = IntegerField = new Class({
  inherits: ApiField
  ,options:{
     help:'Converts values to Numbers with a base of 10'
  }
  ,convert: function convert( value ){
    return parseInt(value, 10) || 0;
  }
  ,type: function( ){
    return 'integer';
  }
});

module.exports = IntegerField;


text:
var month=new Array();
month[0]="January";
month[1]="February";
month[2]="March";
month[3]="April";
month[4]="May";
month[5]="June";
month[6]="July";
month[7]="August";
month[8]="September";
month[9]="October";
month[10]="November";
month[11]="December";

function getMonth(input)
{
	return month[input];
}

/* function to judge if time ented is valid(ie: equal to or later than current time)
 * input: the appointment date and time as a string
 * output: boolean: date is valid/invalid
 *
 */

function isValidDateTime(appointment_date)
{
var appointment = new Date(appointment_date);
var current = new Date();

if(appointment.getFullYear() > current.getFullYear()) { return true; }
else {
	if(appointment.getMonth() > current.getMonth()) { return true; }
	else {
		if(appointment.getDate() > current.getDate()) { return true; }
		else {
			if(appointment.getHours() > current.getHours()) { return true; }
			else {
				if(appointment.getMinutes() > current.getMinutes()) { return true; }
				else
				{
					return false;
				}
			}
		}
	}
 }
}

function isValidDate(apt_date)
{
var date = new Date(apt_date);
var current = new Date();

if(date.getFullYear() >= current.getFullYear()) { return true; }
else {
	if(date.getMonth() >= current.getMonth()) { return true; }
	else {
		if(date.getDate() >= current.getDate()) { return true; }
		else {
				return false;
		}
	}
 }
}

function isStartBeforeEnd(start_date,end_date)
{
	if(end_date == null) { var end = new Date(); }
	else { var end = new Date(end_date); }
	if(start_date == null) { var start = new Date(); }
	else { var start = new Date(start_date); }

if(end.getFullYear() >= start.getFullYear()) { return true; }
else {
	if(end.getMonth() >= start.getMonth()) { return true; }
	else {
		if(end.getDate() >= start.getDate()) { return true; }
		else {
				return false;
		}
	}
 }
}

//function to round the mintues to the nearest 5 so we can use 5 min interval in picker
function roundMinutes(d) {
	var min = d.getMinutes();
		var min1 = min%10;
		if(min1%5 == 0) return d;

		if(min1 < 5) { var min2 = 5-min1; }
		else { var min2 = 10-min1; }
		min = min + min2;
		d.setMinutes(min,0,0);

	return d;
}

//This function formats the time to remove excess text like time zone and hours compared to GMT
//input: date as a Date object
function timeFormatted(date)
{
var final_date = date.toDateString();
var ampm = (date.getHours() >= 12)?'PM':'AM';
var hours = date.getHours() % 12;
	hours = hours?hours:12;   //the hour 0 should be 12
var minutes = date.getMinutes();
	minutes = (minutes < 10)?'0'+minutes:minutes;
var final_time = hours+':'+minutes+' '+ampm;
final_time =  { date: final_date, time: final_time };
return final_time;
}

function calculateAge(birthDate, otherDate) {
    var years = (otherDate.getFullYear() - birthDate.getFullYear());

    if (otherDate.getMonth() < birthDate.getMonth() ||
        otherDate.getMonth() == birthDate.getMonth() && otherDate.getDate() < birthDate.getDate()) {
        years--;
    }

    if(years == 0) {
    	if(otherDate.getMonth() >= birthDate.getMonth()) {
    		var months = otherDate.getMonth() - birthDate.getMonth();
    	}
    	else {
    		var months = (12 - birthDate.getMonth()) + otherDate.getMonth();
    	}

    	if(otherDate.getDate() < birthDate.getDate()) {
    		months--;
    	}
    }

    if(months == 0) {
    	var days = otherDate.getDate() - birthDate.getDate();
    }

    var result = (years > 0)?years+' years':(months > 0)?months+' months':days+' days';

    return result;
}


text:
<?php

namespace frontend\controllers;

use common\models\Category;
use common\models\Post;
use common\models\search\PostSearch;
use common\models\Tag;
use common\models\TextBlock;
use yii\data\ActiveDataProvider;
use yii\web\NotFoundHttpException;
use Yii;

/**
 * Class PostController
 * @package frontend\controllers
 */
class PostController extends BaseController
{
	/**
	 * @return string
	 */
	public function actionIndex()
	{
		$dataProvider = Post::getDataProvider();
        $this->setSeo(Yii::t('app', 'Posts'));

		return $this->render('index', [
			'dataProvider' => $dataProvider,
            'text_block'   => TextBlock::getActiveByID(TextBlock::BLOCK_POSTS, true),
		]);
	}

	/**
	 * @param $alias
	 *
	 * @return string
	 * @throws NotFoundHttpException
	 */
	public function actionView($alias) {
		if (($model = Post::getActiveByAlias($alias)) !== null) {
			$this->setSeoByModel($model);
			$model->updateCnt();

			return $this->render('view', [
				'model' => $model,
				'prev'  => $model->getPrev(),
				'next'  => $model->getNext(),
			]);
		} else {
			throw new NotFoundHttpException('The requested page does not exist.');
		}
	}

	/**
	 * @param $alias
	 *
	 * @return string
	 * @throws NotFoundHttpException
	 */
	public function actionCategory($alias)
	{
		if (($model = Category::getActiveByAlias($alias, true)) !== null) {
			$this->setSeoByModel($model);

            if ($model->countNotes('_post_' . $model->alias)) {
                $searchModel = new PostSearch();
                $searchModel->is_post = Post::IS_POST;
                $searchModel->category_id = $model->getPrimaryKey();
                $dataProvider = $searchModel->search(Yii::$app->request->queryParams);
                $dataProvider->sort->defaultOrder = [
                    'posted_at' => SORT_DESC,
                ];
            } else {
                $dataProvider = null;
            }

			return $this->render('index', [
				'model'        => $model,
				'dataProvider' => $dataProvider,
			]);
		} else {
			throw new NotFoundHttpException('The requested page does not exist.');
		}
	}

	/**
	 * @param $alias
	 *
	 * @return string
	 * @throws NotFoundHttpException
	 */
	public function actionTag($alias)
	{
		if (($model = Tag::getActiveByAlias($alias, true)) !== null) {
			$this->setSeoByModel($model);

            if ($model->countNotes('_post_' . $model->alias)) {
                $searchModel = new PostSearch();
                $searchModel->status = Post::STATUS_ACTIVE;
                $searchModel->is_post = Post::IS_POST;
                $searchModel->tag_id = $model->getPrimaryKey();
                $dataProvider = $searchModel->search(Yii::$app->request->queryParams);
                $dataProvider->sort->defaultOrder = [
                    'posted_at' => SORT_DESC,
                ];
            } else {
                $dataProvider = null;
            }

			return $this->render('index', [
				'model'        => $model,
				'dataProvider' => $dataProvider,
			]);
		} else {
			throw new NotFoundHttpException('The requested page does not exist.');
		}
	}
}


text:
namespace ScriptCs.ObjectDumper.ScriptPack
{
  public interface IFluentConfiguration
  {
    IFluentConfiguration IncludeObjectReferences();
    IFluentConfiguration ExcludeObjectReferences();
    IFluentConfiguration PrettyPrint();
    IFluentConfiguration Compact();
    IFluentConfiguration IncludeNullValues();
    IFluentConfiguration ExcludeNullValues();
    ObjectDumper Build();
  }
}


text:
using System;
using System.Collections.Generic;
using System.Reflection;
using XrmFramework.DeployUtils.Context;
using XrmFramework.DeployUtils.Model;

namespace XrmFramework.DeployUtils.Utils
{
    /// <summary>
    /// Imports Components from <see cref="System"/> or <see cref="Deploy"/> to <see cref="ICrmComponent"/>
    /// </summary>
    interface IAssemblyImporter
    {
        /// <summary>
        /// Creates a <see cref="IAssemblyContext"/> with only the <see cref="AssemblyInfo"/> Property computed from an <see cref="Assembly"/>
        /// </summary>
        /// <param name="assembly"></param>
        /// <returns><see cref="IAssemblyContext"/></returns>
        IAssemblyContext CreateAssemblyFromLocal(Assembly assembly);

        /// <summary>
        /// Creates a <see cref="IAssemblyContext"/> with only the <see cref="AssemblyInfo"/> Property computed from a <see cref="Deploy.PluginAssembly"/>
        /// </summary>
        /// <param name="assembly"></param>
        /// <returns><see cref="IAssemblyContext"/></returns>
        IAssemblyContext CreateAssemblyFromRemote(Deploy.PluginAssembly assembly);

        /// <summary>
        /// Creates a <see cref="Plugin"/> from a local Assembly <see cref="Type"/>
        /// </summary>
        /// <param name="type"></param>
        /// <returns></returns>
        Plugin CreatePluginFromType(Type type);

        /// <summary>
        /// Creates a <see cref="Plugin"/> as a CustomWorkflow from a local Assembly <see cref="Type"/>
        /// </summary>
        /// <param name="type"></param>
        /// <returns></returns>
        Plugin CreateWorkflowFromType(Type type);

        /// <summary>
        /// Creates a <see cref="CustomApi"/> from a local Assembly <see cref="Type"/>
        /// </summary>
        /// <param name="type"></param>
        /// <returns></returns>
        CustomApi CreateCustomApiFromType(Type type);

        /// <summary>
        /// Creates a <see cref="Step"/> from a remote Assembly <see cref="Deploy.SdkMessageProcessingStep"/>
        /// and the <see cref="Deploy.SdkMessageProcessingStepImage"/> registered on the remote Assembly
        /// </summary>
        /// <param name="sdkStep"></param>
        /// <param name="sdkImages"></param>
        /// <returns></returns>
        Step CreateStepFromRemote(Deploy.SdkMessageProcessingStep sdkStep, IEnumerable<Deploy.SdkMessageProcessingStepImage> sdkImages);

        /// <summary>
        /// Creates a <see cref="Plugin"/> from a remote Assembly <see cref="Deploy.PluginType"/>
        /// and the <see cref="Step"/> already parsed
        /// </summary>
        /// <param name="pluginType"></param>
        /// <param name="steps"></param>
        /// <returns></returns>
        Plugin CreatePluginFromRemote(Deploy.PluginType pluginType, IEnumerable<Step> steps);

        /// <summary>
        /// Creates a <see cref="CustomApi"/> from a remote Assembly <see cref="Deploy.CustomApi"/>,
        /// the <see cref="Deploy.CustomApiRequestParameter"/>
        /// and the <see cref="Deploy.CustomApiResponseProperty"/> registered on the remote Assembly
        /// </summary>
        /// <param name="customApi"></param>
        /// <param name="requestParameters"></param>
        /// <param name="responseProperties"></param>
        /// <returns></returns>
        CustomApi CreateCustomApiFromRemote(Deploy.CustomApi customApi,
                                            IEnumerable<Deploy.CustomApiRequestParameter> requestParameters,
                                            IEnumerable<Deploy.CustomApiResponseProperty> responseProperties);
    }
}


text:
A tiny Tetris written in Haskell.

![capture](https://cloud.githubusercontent.com/assets/193805/19278031/87ad0604-8fe4-11e6-9b85-8dbc813254e4.PNG)

# Compilation
The final game should compile with: ghc --make Main.

Install the Gloss library using cabal.

Initial commits (prior to Main.hs) do not produce executables, but can be loaded in ghci for testing.

# Contributions

Contributions are more than welcome, but please try to follow these guidelines:

* Every commit adds a specific piece of functionality and is as localized as possible.
* To the extent that this is practical, every commit must focus on one Haskell language feature.
* Commit messages briefly explain what was done.
* Extensive temporary comments (they exist for a single commit) discuss stuff in more detail near the relevant piece of code.
* All commits compile without errors.

# More info

Here's the [long story] (https://cdry.wordpress.com/2016/10/11/tetris-in-haskell-in-a-weekend/) of how and why this project was made.


text:
<?php defined('SYSPATH') OR die('No direct access allowed.'); ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

	<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
	<title><?php echo html::chars(__($title)) ?></title>

<?php echo html::chars(__($title)) ?>

	<?php echo $content ?>

		<?php echo __('Rendered in {execution_time} seconds, using {memory_usage} of memory')?>

		Copyright ©2007–2008 Kohana Team


text:
Pop PHP Framework
=================

Documentation : Http
--------------------

Home

The Http component provides an easy-to-use API to manage, access and
manipulate HTTP requests and responses. It is used in several
components, but is most tightly integrated with the Mvc component for
managing requests and responses within that component.

    use Pop\Http\Request,
        Pop\Http\Response;

    // Create a request object and access the data and information
    $request = new Request();
    echo $request->getRequestUri();
    if ($request->isPost()) {
        print_r($request->getPost());
    }

    // Create a response object and send
    $response = new Response();
    $response->setHeader('content-type', 'text/html')
             ->setBody('This is some HTML.')
             ->send();

\(c) 2009-2014 [Moc 10 Media, LLC.](http://www.moc10media.com) All
Rights Reserved.