text:
// ------------------------------------------------------------
//  Copyright (c) Microsoft Corporation.  All rights reserved.
//  Licensed under the MIT License (MIT). See License.txt in the repo root for license information.
// ------------------------------------------------------------

namespace Iot.DeviceEmulator
{
    using System;
    using System.Collections.Generic;
    using System.Fabric;
    using System.IO;
    using System.Linq;
    using System.Text;
    using System.Threading.Tasks;
    using Iot.Common;
    using Microsoft.Azure.Devices;
    using Microsoft.Azure.Devices.Client;
    using Newtonsoft.Json;

    internal class Program
    {
        private static string connectionString;
        private static string clusterAddress;
        private static RegistryManager registryManager;
        private static FabricClient fabricClient;
        private static IEnumerable<Device> devices;
        private static IEnumerable<string> tenants;

        private static void Main(string[] args)
        {
            Console.WriteLine("Enter IoT Hub connection string: ");
            connectionString = Console.ReadLine();

            Console.WriteLine("Enter Service Fabric cluster address where your IoT project is deployed (or blank for local): ");
            clusterAddress = Console.ReadLine();

            registryManager = RegistryManager.CreateFromConnectionString(connectionString);
            fabricClient = String.IsNullOrEmpty(clusterAddress)
                ? new FabricClient()
                : new FabricClient(clusterAddress);

            Task.Run(
                async () =>
                {
                    while (true)
                    {
                        try
                        {
                            devices = await registryManager.GetDevicesAsync(Int32.MaxValue);
                            tenants = (await fabricClient.QueryManager.GetApplicationListAsync())
                                .Where(x => x.ApplicationTypeName == Names.TenantApplicationTypeName)
                                .Select(x => x.ApplicationName.ToString().Replace(Names.TenantApplicationNamePrefix + "/", ""));

                            Console.WriteLine();
                            Console.WriteLine("Devices IDs: ");
                            foreach (Device device in devices)
                            {
                                Console.WriteLine(device.Id);
                            }

                            Console.WriteLine();
                            Console.WriteLine("Tenants: ");
                            foreach (string tenant in tenants)
                            {
                                Console.WriteLine(tenant);
                            }

                            Console.WriteLine();
                            Console.WriteLine("Commands:");
                            Console.WriteLine("1: Register a device");
                            Console.WriteLine("2: Register random devices");
                            Console.WriteLine("3: Send data from a device");
                            Console.WriteLine("4: Send data from all devices");
                            Console.WriteLine("5: Exit");

                            string command = Console.ReadLine();

                            switch (command)
                            {
                                case "1":
                                    Console.WriteLine("Make up a device ID: ");
                                    string deviceId = Console.ReadLine();
                                    await AddDeviceAsync(deviceId);
                                    break;
                                case "2":
                                    Console.WriteLine("How many devices? ");
                                    int num = Int32.Parse(Console.ReadLine());
                                    await AddRandomDevicesAsync(num);
                                    break;
                                case "3":
                                    Console.WriteLine("Tenant: ");
                                    string tenant = Console.ReadLine();
                                    Console.WriteLine("Device id: ");
                                    string deviceKey = Console.ReadLine();
                                    await SendDeviceToCloudMessagesAsync(deviceKey, tenant);
                                    break;
                                case "4":
                                    Console.WriteLine("Tenant: ");
                                    string tenantName = Console.ReadLine();
                                    Console.WriteLine("Iterations: ");
                                    int iterations = Int32.Parse(Console.ReadLine());
                                    await SendAllDevices(tenantName, iterations);
                                    break;
                                case "5":
                                    return;
                                default:
                                    break;
                            }
                        }
                        catch (Exception ex)
                        {
                            Console.WriteLine("Oops, {0}", ex.Message);
                        }
                    }
                })
                .GetAwaiter().GetResult();
        }

        private static async Task SendAllDevices(string tenant, int iterations)
        {
            for (int i = 0; i < iterations; ++i)
            {
                try
                {
                    List<Task> tasks = new List<Task>(devices.Count());
                    foreach (Device device in devices)
                    {
                        tasks.Add(SendDeviceToCloudMessagesAsync(device.Id, tenant));
                    }

                    await Task.WhenAll(tasks);
                    await Task.Delay(TimeSpan.FromSeconds(1));
                }
                catch (Exception ex)
                {
                    Console.WriteLine("Send failed. {0}", ex.Message);
                }
            }
        }

        private static async Task SendDeviceToCloudMessagesAsync(string deviceId, string tenant)
        {
            string iotHubUri = connectionString.Split(';')
                .First(x => x.StartsWith("HostName=", StringComparison.InvariantCultureIgnoreCase))
                .Replace("HostName=", "").Trim();

            Device device = devices.FirstOrDefault(x => x.Id == deviceId);
            if (device == null)
            {
                Console.WriteLine("Device '{0}' doesn't exist.", deviceId);
            }

            DeviceClient deviceClient = DeviceClient.Create(
                iotHubUri,
                new DeviceAuthenticationWithRegistrySymmetricKey(deviceId, device.Authentication.SymmetricKey.PrimaryKey));

            List<object> events = new List<object>();
            for (int i = 0; i < 10; ++i)
            {
                var body = new
                {
                    Timestamp = DateTimeOffset.UtcNow.Subtract(TimeSpan.FromMinutes(i))
                };

                events.Add(body);
            }

            Microsoft.Azure.Devices.Client.Message message;
            JsonSerializer serializer = new JsonSerializer();
            using (MemoryStream stream = new MemoryStream())
            {
                using (StreamWriter streamWriter = new StreamWriter(stream))
                {
                    using (JsonTextWriter jsonWriter = new JsonTextWriter(streamWriter))
                    {
                        serializer.Serialize(jsonWriter, events);
                    }
                }

                message = new Microsoft.Azure.Devices.Client.Message(stream.GetBuffer());
                message.Properties.Add("TenantID", tenant);
                message.Properties.Add("DeviceID", deviceId);

                await deviceClient.SendEventAsync(message);

                Console.WriteLine($"Sent message: {Encoding.UTF8.GetString(stream.GetBuffer())}");
            }
        }

        private static async Task AddRandomDevicesAsync(int count)
        {
            int start = devices.Count();

            for (int i = start; i < start + count; ++i)
            {
                await AddDeviceAsync("device" + i);
            }
        }

        private static async Task AddDeviceAsync(string deviceId)
        {
            RegistryManager registryManager = RegistryManager.CreateFromConnectionString(connectionString);

            try
            {
                await registryManager.AddDeviceAsync(new Device(deviceId));
                Console.WriteLine("Added device {0}", deviceId);
            }
            catch (Microsoft.Azure.Devices.Common.Exceptions.DeviceAlreadyExistsException)
            {
            }
        }
    }
}


text:
<!DOCTYPE html>

<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
<meta charset="utf-8" />
<title>Form Elements - Ace Admin</title>

<meta name="description" content="Common form elements and layouts" />
<meta name="viewport"
	content="width=device-width, initial-scale=1.0, maximum-scale=1.0" />

<link rel="stylesheet"
	href="{{{resources}}}/core/assets/css/bootstrap.min.css" />
<link rel="stylesheet"
	href="{{{resources}}}/core/assets/font-awesome/4.5.0/css/font-awesome.min.css" />

<link rel="stylesheet"
	href="{{{resources}}}/core/assets/css/jquery-ui.custom.min.css" />
<link rel="stylesheet"
	href="{{{resources}}}/core/assets/css/chosen.min.css" />
<link rel="stylesheet"
	href="{{{resources}}}/core/assets/css/bootstrap-datepicker3.min.css" />
<link rel="stylesheet"
	href="{{{resources}}}/core/assets/css/bootstrap-timepicker.min.css" />
<link rel="stylesheet"
	href="{{{resources}}}/core/assets/css/daterangepicker.min.css" />
<link rel="stylesheet"
	href="{{{resources}}}/core/assets/css/bootstrap-datetimepicker.min.css" />
<link rel="stylesheet"
	href="{{{resources}}}/core/assets/css/bootstrap-colorpicker.min.css" />

<link rel="stylesheet"
	href="{{{resources}}}/core/assets/css/fonts.googleapis.com.css" />

<link rel="stylesheet"
	href="{{{resources}}}/core/assets/css/ace.min.css"
	class="ace-main-stylesheet" id="main-ace-style" />

<link rel="stylesheet"
	href="{{{resources}}}/core/assets/css/ace-skins.min.css" />
<link rel="stylesheet"
	href="{{{resources}}}/core/assets/css/ace-rtl.min.css" />

				   Panel de Administración

   Bienvenido,
								{{userName}}

  Mi cuenta

  Cerrar Sesión

				<form action="/logout" method="post">

						<button type="button" class="close" data-dismiss="modal">×</button>

Cerrar Sesión

						¿Seguro que desea cerrar
							sesión?

						<button class="btn btn-sm" data-dismiss="modal">
							 Cancelar
						</button>

						<button class="btn btn-sm btn-primary" type="submit"
							value="Submit">
							 Salir
						</button>

					<input type="hidden" name="_csrf" value="{{token}}" />
				</form>

							Tablas

							Galeria

   Añadir Datos

  Añadir Artistas y
								Canciones

  Añadir Post y Eventos

Añadir Artistas y Canciones

								  Añadir Artista

								  Añadir Canción

										<form action="procesarFormulario.html?type=addArtista"
											method="post" enctype="multipart/form-data">

												<button type="button" class="close" data-dismiss="modal">×</button>

Añadir Artista

											<input name="fileUpload" type="file" />

													Nombre

														<input name="nomArtista" type="text"
															id="form-field-username" placeholder="nombre" />

													Nacionalidad

														<input name="nomNacionalidad" type="text"
															id="form-field-username" placeholder="Nacionalidad" />

													Estilo

														<input name="nomEstilo" type="text"
															id="form-field-username" placeholder="Estilo" />

												<button class="btn btn-sm" data-dismiss="modal">
													 Cancel
												</button>

												<button class="btn btn-sm btn-primary" type="submit"
													value="Submit">
													 Save
												</button>

											<input type="hidden" name="_csrf" value="{{token}}"/>
										</form>

										<form action="procesarFormulario.html?type=addSong"
											method="post" enctype="multipart/form-data">

												<button type="button" class="close" data-dismiss="modal">×</button>

Añadir Canción

														<input name="fileUpload" type="file" />

															Artista

																<select name="idSong" class="chosen-select"
																	data-placeholder="Selecciona un artista">
																	<option value=""> </option>
																	{{#artistas}}
																	<option value="{{id}}" >{{nombre}}</option>
																	{{/artistas}}
																</select>

															Url - Código Final

																<input name="url" type="text" id="form-field-username"
																	placeholder="Codigo final URL" />

															Nombre

																<input name="nomSong" type="text" id="form-field-username"
																	placeholder="Nombre" />

															Estilo

																<input name="estiloSong" type="text" id="form-field-username"
																	placeholder="Estilo" />

															Año

																<input name="anioSong" type="number" id="form-field-username"
																	placeholder="Año" />

												<button class="btn btn-sm" data-dismiss="modal">
													 Cancel
												</button>

												<button class="btn btn-sm btn-primary" type="submit"
													value="Submit">
													 Save
												</button>

											<input type="hidden" name="_csrf" value="{{token}}"/>
										</form>

					 Ace
						Application © 2013-2014

redpajama_set_name: RedPajamaGithub


text:
<?php

namespace AppBundle\Controller\ContentManagement;

use AppBundle\Controller\AppController;
use AppBundle;
use AppBundle\Repository\ContentTypeRepository;
use Doctrine\ORM\EntityManager;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
use Symfony\Component\HttpFoundation\Request;
use AppBundle\Form\Form\TemplateType;
use AppBundle\Entity\Template;
use AppBundle\Repository\TemplateRepository;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Method;

class TemplateController extends AppController
{
	/**
	 * @Route("/template/{type}", name="template.index")
	 */
	public function indexAction($type, Request $request)
	{
		/** @var EntityManager $em */
		$em = $this->getDoctrine()->getManager();
		/** @var ContentTypeRepository $contentTypeRepository */
		$contentTypeRepository = $em->getRepository('AppBundle:ContentType');

		$contentTypes = $contentTypeRepository->findBy([
			'deleted' => false,
			'name' => $type,
		]);

		if(!$contentTypes || count($contentTypes) != 1) {
			throw new NotFoundHttpException('Content type not found');
		}

		return $this->render( 'template/index.html.twig', [
				'contentType' => $contentTypes[0]
		]);

	}

	/**
	 * @Route("/template/add/{type}", name="template.add")
	 */
	public function addAction($type, Request $request)
	{
		/** @var EntityManager $em */
		$em = $this->getDoctrine()->getManager();
		/** @var ContentTypeRepository $contentTypeRepository */
		$contentTypeRepository = $em->getRepository('AppBundle:ContentType');

		$contentTypes = $contentTypeRepository->findBy([
			'deleted' => false,
			'name' => $type,
		]);

		if(!$contentTypes || count($contentTypes) != 1) {
			throw new NotFoundHttpException('Content type not found');
		}

		$template = new Template();
		$template->setContentType($contentTypes[0]);

		$form = $this->createForm ( TemplateType::class, $template );

		$form->handleRequest ( $request );

		if ($form->isSubmitted () && $form->isValid ()) {
			$em->persist($template);
			$em->flush();

			$this->addFlash('notice', 'A new template has been created');

			return $this->redirectToRoute('template.index', [
					'type' => $type
			]);
		}

		return $this->render( 'template/add.html.twig', [
				'contentType' => $contentTypes[0],
				'form' => $form->createView()
		]);

	}

	/**
	 * @Route("/template/edit/{id}", name="template.edit")
	 */
	public function editAction($id, Request $request)
	{
		/** @var EntityManager $em */
		$em = $this->getDoctrine()->getManager();
		/** @var TemplateRepository $templateRepository */
		$templateRepository = $em->getRepository('AppBundle:Template');

		/** @var Template $template **/
		$template = $templateRepository->find($id);

		if(!$template) {
			throw new NotFoundHttpException('Template type not found');
		}

		$form = $this->createForm ( TemplateType::class, $template );

		$form->handleRequest ( $request );

		if ($form->isSubmitted () && $form->isValid ()) {
			$em->persist($template);
			$em->flush();

			$this->addFlash('notice', 'A template has been updated');

			return $this->redirectToRoute('template.index', [
					'type' => $template->getContentType()->getName()
			]);
		}

		return $this->render( 'template/edit.html.twig', [
				'form' => $form->createView(),
				'template' => $template
		]);
	}

	/**
	 * @Route("/template/remove/{id}", name="template.remove")
     * @Method({"POST"})
	 */
	public function removeAction($id, Request $request)
	{
		/** @var EntityManager $em */
		$em = $this->getDoctrine()->getManager();
		/** @var TemplateRepository $templateRepository */
		$templateRepository = $em->getRepository('AppBundle:Template');

		/** @var Template $template **/
		$template = $templateRepository->find($id);

		if(!$template) {
			throw new NotFoundHttpException('Template type not found');
		}

		$em->remove($template);
		$em->flush();
		$this->addFlash('notice', 'A template has been removed');

		return $this->redirectToRoute('template.index', [
				'type' => $template->getContentType()->getName()
		]);
	}
}


text:
FROM alpine:3.15 AS TMP

WORKDIR /mattermost-push-proxy

COPY dist/ dist/
COPY docker/entrypoint .

ARG ARCH
COPY bin/mattermost-push-proxy-linux-$ARCH bin/mattermost-push-proxy

FROM alpine:3.15

RUN apk add --no-cache \
  ca-certificates \
  libc6-compat \
  libffi-dev \
  linux-headers \
  netcat-openbsd \
  tzdata \
  && rm -rf /tmp/* \
  && mkdir -p mattermost-push-proxy/bin \
  && chown -R nobody:nogroup /mattermost-push-proxy

COPY --from=TMP /mattermost-push-proxy/dist /
COPY --from=TMP /mattermost-push-proxy/bin/ /mattermost-push-proxy/bin/
COPY --from=TMP /mattermost-push-proxy/entrypoint /usr/local/bin/

USER nobody

WORKDIR /mattermost-push-proxy

ENV PUSH_PROXY=/mattermost-push-proxy/bin/mattermost-push-proxy

EXPOSE 8066

VOLUME ["/mattermost-push-proxy/config", "/mattermost-push-proxy/certs"]

ENTRYPOINT ["/usr/local/bin/entrypoint"]


text:
class CloudsGrabber
{
public:
    CloudsGrabber();

    void operator()();

    pcl::PointCloud<pcl::PointXYZ>::Ptr getCloud0();
    pcl::PointCloud<pcl::PointXYZ>::Ptr getCloud1();

    void stopGrabber() {(*grab_stop_) = true;}

private:
    void cloudCallback0 (const pcl::PointCloud<pcl::PointXYZ>::ConstPtr &cloud);

    void cloudCallback1 (const pcl::PointCloud<pcl::PointXYZ>::ConstPtr &cloud);

    void startAndStop (pcl::Grabber &toStart, pcl::Grabber &toStop);

    void copyCloud (const pcl::PointCloud<pcl::PointXYZ>::ConstPtr &source, pcl::PointCloud<pcl::PointXYZ>::Ptr &dest);

private:
    std::shared_ptr<std::mutex>
        grab_mutex_;

    pcl::PointCloud<pcl::PointXYZ>::Ptr
        cloud_0_,
        cloud_1_;

    pcl::Grabber
        * interface_0_,
        * interface_1_;

    bool
        * grab_stop_;

    bool
        file0_,
        file1_;
};

#endif // CLOUDSGRABBER_H


text:
@class MMTableViewInfo;

@interface SettingAutoDownloadSightViewController : MMUIViewController
{
    MMTableViewInfo *m_tableViewInfo;
    unsigned int curImgSettingValue;
}

- (void).cxx_destruct;
- (void)saveVideoToLibraryChanged:(id)arg1;
- (void)savePhotoToLibraryChanged:(id)arg1;
- (long long)checkMarkOrNoneWithOption:(unsigned int)arg1 toMatch:(unsigned int)arg2;
- (void)viewDidBePoped:(_Bool)arg1;
- (void)viewDidLoad;
- (void)viewDidLayoutSubviews;
- (void)reloadTableData;
- (id)init;

@end


text:
package com.lcw.one.redis.event.hanlder;

import com.lcw.one.util.exception.OneBaseException;
import com.lcw.one.util.utils.SpringContextHolder;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

/**
 * 事件处理器工厂
 */
public class EventHandlerFactory {
    private static final Logger LOGGER = LoggerFactory.getLogger(EventHandlerFactory.class);

    private static Class<EventHandler> getEventHandlerClass(String eventCode) {
        Class clazz = EventHandlerRegistry.getHandlerClass(eventCode);
        if (clazz == null) {
            throw new OneBaseException("获取事件[" + eventCode + "]的处理器失败");
        }
        LOGGER.info("Handler class of [{}] is [{}]", eventCode, clazz);
        return clazz;
    }

    public static EventHandler getEventHandler(String eventCode) {
        EventHandler eventHandler = null;
        Class<EventHandler> clazz = getEventHandlerClass(eventCode);
        if (clazz != null) {
            eventHandler = SpringContextHolder.getApplicationContext().getBean(clazz);
        }
        return eventHandler;
    }
}


text:
using System.Web;
using System.Web.Routing;

namespace MvcDI
{
    /// <summary>
    /// CSSのルートマッピングハンドラー
    /// </summary>
    public class CssRouteHandler : IRouteHandler
    {
        #region IRouteHandler メンバ
        /// <summary>
        /// 要求を処理するオブジェクトを提供します。
        /// </summary>
        /// <param name="requestContext">要求に関する情報をカプセル化しているオブジェクト。</param>
        /// <returns>要求を処理するオブジェクト。</returns>
        IHttpHandler IRouteHandler.GetHttpHandler(RequestContext requestContext)
        {
            string cssName = requestContext.RouteData.GetRequiredString("cssName");
            string cssPath = string.Format("~/Content/Css/{0}", cssName);
            return new CssFilehandler(cssPath);
        }
        #endregion
    }
}


text:
import React from 'react'
import { shallow } from 'enzyme'
import PageNotFound from 'components/page-not-found'

describe('components/page-not-found', () => {
  let _wrapper

  beforeEach(() => {
    _wrapper = shallow(<PageNotFound />)
  })

  it('Renders node for a message', () => {
    const pageNotFound = _wrapper.find('h1')
    expect(pageNotFound).to.exist
    expect(pageNotFound.text()).to.match(/Page Not Found./)
  })
})


text:
using System;
using Xunit;
using LanguageExt;
using static LanguageExt.Prelude;

namespace LanguageExt.Tests
{
    public class EitherUnsafeApply
    {
        Func<int, int, int> add = (a, b) => a + b;

        [Fact]
        public void ApplyRightArgs()
        {
            var either = RightUnsafe<string,Func<int,int,int>>(add)
                .Apply(RightUnsafe<string, int>(3))
                .Apply(RightUnsafe<string, int>(4));

            Assert.Equal(RightUnsafe<string, int>(7), either);
        }

        [Fact]
        public void ApplyRightArgsF()
        {
            var either =
                apply(
                    apply(
                        RightUnsafe<string, Func<int, int, int>>(add),
                        RightUnsafe<string, int>(3)
                    ),
                    RightUnsafe<string, int>(4));
            Assert.Equal(RightUnsafe<string, int>(7), either);
        }

        [Fact]
        public void ApplyRightArgsF2()
        {
            var either = apply(
                    RightUnsafe<string, Func<int, int, int>>(add),
                    RightUnsafe<string, int>(3),
                    RightUnsafe<string, int>(4)
                );
            Assert.Equal(RightUnsafe<string, int>(7), either);
        }

        [Fact]
        public void ApplyLeftArgs()
        {
            var opt = Some(add)
                .Apply(None)
                .Apply(Some(4));

            Assert.Equal(None, opt);

            var either = RightUnsafe<string, Func<int, int, int>>(add)
                .Apply(LeftUnsafe<string, int>("left"))
                .Apply(RightUnsafe<string, int>(4));

            Assert.Equal(LeftUnsafe<string, int>("left"), either);
        }

        [Fact]
        public void ApplyLeftArgsF()
        {
            var either =
                apply(
                    apply(
                        RightUnsafe<string, Func<int, int, int>>(add),
                        LeftUnsafe<string, int>("left")
                    ),
                    RightUnsafe<string, int>(4));

            Assert.Equal(LeftUnsafe<string, int>("left"), either);
        }

        [Fact]
        public void ApplyLeftArgsF2()
        {
            var either = apply(
                    RightUnsafe<string, Func<int, int, int>>(add),
                    LeftUnsafe<string, int>("left"),
                    RightUnsafe<string, int>(4)
                );

            Assert.Equal(LeftUnsafe<string, int>("left"), either);
        }

        [Fact]
        public void ApplicativeLawHolds()
        {
            var first = RightUnsafe<string, Func<int, int, int>>(add)
                .Apply(RightUnsafe<string, int>(3))
                .Apply(RightUnsafe<string, int>(4));

            var second = RightUnsafe<string, int>(3)
                .ParMap(add)
                .Apply(RightUnsafe<string, int>(4));

            Assert.Equal(first, second);
        }

        [Fact]
        public void ApplicativeLawHoldsF()
        {
            var first = apply(
                    apply(
                        RightUnsafe<string, Func<int, int, int>>(add),
                        RightUnsafe<string, int>(3)
                    ),
                    RightUnsafe<string, int>(4));

            var second = apply(parmap(RightUnsafe<string, int>(3), add), RightUnsafe<string, int>(4));

            Assert.Equal(first, second);
        }

        [Fact]
        public void ApplicativeLawHoldsF2()
        {
            var first = apply(
                RightUnsafe<string, Func<int, int, int>>(add),
                RightUnsafe<string, int>(3),
                RightUnsafe<string, int>(4)
            );

            var second = apply(parmap(RightUnsafe<string, int>(3), add), RightUnsafe<string, int>(4));

            Assert.Equal(first, second);
        }
    }
}


text:
define([
        './defined'
    ], function(
        defined) {
    'use strict';

    /**
     * An hierarchy of linear rings which define a polygon and its holes.
     * The holes themselves may also have holes which nest inner polygons.
     * @alias PolygonHierarchy
     * @constructor
     *
     * @param {Cartesian3[]} [positions] A linear ring defining the outer boundary of the polygon or hole.
     * @param {PolygonHierarchy[]} [holes] An array of polygon hierarchies defining holes in the polygon.
     */
    function PolygonHierarchy(positions, holes) {
        /**
         * A linear ring defining the outer boundary of the polygon or hole.
         * @type {Cartesian3[]}
         */
        this.positions = defined(positions) ? positions : [];

        /**
         * An array of polygon hierarchies defining holes in the polygon.
         * @type {PolygonHierarchy[]}
         */
        this.holes = defined(holes) ? holes : [];
    }

    return PolygonHierarchy;
});


text:
<?php

namespace Lists\HandlingBundle\Interfaces;

/**
 * HandlingAccessInterface interface
 */
interface HandlingAccessInterface
{
    /**
     * @return bool
     */
    public function canSee();
    /**
     * @return bool
     */
    public function canSeeReport();
    /**
     * @return bool
     */
    public function canEdit();
    /**
     * @return bool
     */
    public function canAdd();
    /**
     * @return bool
     */
    public function canAddManager();
    /**
     * @return bool
     */
    public function canSeeListMy();
    /**
     * @return bool
     */
    public function canSeeList();
    /**
     * @return bool
     */
    public function canExportToExelAll();
    /**
     * @return bool
     */
    public function canExportReportToExcel();
    /**
     * @return bool
     */
    public function canCreateGosTender();
    /**
     * @return bool
     */
    public function canSeeAllGosTender();
    /**
     * @return bool
     */
    public function canSeeGosTender();
    /**
     * @return bool
     */
    public function canSeeListGosTender();
    /**
     * @return bool
     */
    public function canEditGosTender();
    /**
     * @return bool
     */
    public function canChangeParticipationInGosTander();
}


text:
name: "\U0001F41E Bug Report"
about: Report a reproducible bug
title: ''
labels: 'status:possible bug'
assignees: ''

---

<!-- Click "Preview" for a more readable version --

Please read and follow the instructions before submitting an issue:

- Read all our documentation, especially the [README](https://github.com/axios/axios/blob/master/README.md). It may contain information that helps you solve your issue.
- Ensure your issue isn't already [reported](https://github.com/axios/axios/issues?utf8=%E2%9C%93&q=is%3Aissue).
- If you aren't sure that the issue is caused by Axios or you just need help, please use [Stack Overflow](https://stackoverflow.com/questions/tagged/axios) or [our chat](https://gitter.im/mzabriskie/axios).
- If you're reporting a bug, ensure it isn't already fixed in the latest Axios version.
- Don't remove any title of the issue template, or it will be treated as invalid by the bot.

⚠👆 Feel free to these instructions before submitting the issue 👆⚠
-->

#### Describe the bug
A clear and concise description of what the bug is. **If your problem is not a bug, please file under Support or Usage Question**

#### To Reproduce
Code snippet to reproduce, ideally that will work by pasting into something like https://npm.runkit.com/axios, a hosted solution, or a repository that illustrates the issue. **If your problem is not reproducible, please file under Support or Usage Question**

```js
// Example code here
```

#### Expected behavior
A clear and concise description of what you expected to happen.

#### Environment
 - Axios Version [e.g. 0.18.0]
 - Adapter [e.g. XHR/HTTP]
 - Browser [e.g. Chrome, Safari]
 - Browser Version [e.g. 22]
 - Node.js Version [e.g. 13.0.1]
 - OS: [e.g. iOS 12.1.0, OSX 10.13.4]
 - Additional Library Versions [e.g. React 16.7, React Native 0.58.0]

#### Additional context/Screenshots
Add any other context about the problem here. If applicable, add screenshots to help explain.


text:
<?php

use Symfony\Component\HttpKernel\Kernel;
use Symfony\Component\Config\Loader\LoaderInterface;

class AppKernel extends Kernel
{
    public function registerBundles()
    {
        $bundles = array(
            new Symfony\Bundle\FrameworkBundle\FrameworkBundle(),
            new Symfony\Bundle\SecurityBundle\SecurityBundle(),
            new Symfony\Bundle\TwigBundle\TwigBundle(),
            new Symfony\Bundle\MonologBundle\MonologBundle(),
            new Symfony\Bundle\SwiftmailerBundle\SwiftmailerBundle(),
            new Symfony\Bundle\AsseticBundle\AsseticBundle(),
            new Doctrine\Bundle\DoctrineBundle\DoctrineBundle(),
            new Stof\DoctrineExtensionsBundle\StofDoctrineExtensionsBundle(),
            new Sensio\Bundle\FrameworkExtraBundle\SensioFrameworkExtraBundle(),
            new PFC\WebBundle\WebBundle(),
            new PFC\ModelBundle\ModelBundle(),
            new PFC\AdminBundle\AdminBundle(),
            new Oneup\UploaderBundle\OneupUploaderBundle(),
            new JMS\SerializerBundle\JMSSerializerBundle(),
        );

        if (in_array($this->getEnvironment(), array('dev', 'test'))) {
            $bundles[] = new Symfony\Bundle\WebProfilerBundle\WebProfilerBundle();
            $bundles[] = new Sensio\Bundle\DistributionBundle\SensioDistributionBundle();
            $bundles[] = new Sensio\Bundle\GeneratorBundle\SensioGeneratorBundle();
            $bundles[] = new RaulFraile\Bundle\LadybugBundle\RaulFraileLadybugBundle();
            $bundles[] = new Doctrine\Bundle\FixturesBundle\DoctrineFixturesBundle();
            $bundles[] = new Yavaris\YavarisCommandBundle\YavarisCommandBundle();
        }

        return $bundles;
    }

    public function registerContainerConfiguration(LoaderInterface $loader)
    {
        $loader->load(__DIR__.'/config/config_'.$this->getEnvironment().'.yml');
    }
}


text:
package guru.breakthemonolith.health.cassandra;

import java.net.InetAddress;

import org.junit.After;
import org.junit.AfterClass;
import org.junit.Assert;
import org.junit.Before;
import org.junit.BeforeClass;
import org.junit.Test;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import guru.breakthemonolith.docker.DockerCommandUtils;
import guru.breakthemonolith.docker.DockerRunSpecification;

public class CassandraHealthCheckTestIntegration {

	private static Logger logger = LoggerFactory.getLogger(CassandraHealthCheckTestIntegration.class);
	private static String cassandraContainerName;

	private CassandraHealthCheck healthCheck;

	@BeforeClass
	public static void setUpClass() throws Exception {
		InetAddress address = InetAddress.getByName("localhost");

		DockerCommandUtils.dockerPull("cassandra:3.9");
		DockerRunSpecification runSpec = new DockerRunSpecification("cassandra:3.9");

		runSpec.setDetachedWaitTimeMillis(60000);
		runSpec.getPortMap().put(address.getHostAddress() + ":9042", "9042");
		runSpec.getPortMap().put(address.getHostAddress() + ":9160", "9160");

		logger.info("Sleeping for 60 secs for Cassandra to start up");
		cassandraContainerName = DockerCommandUtils.dockerRun(runSpec);

		DockerCommandUtils.dockerContainerListing();
	}

	@AfterClass
	public static void tearDownClass() throws Exception {
		DockerCommandUtils.dockerKillContainer(cassandraContainerName);
		DockerCommandUtils.dockerContainerListing();
	}

	@Before
	public void setUp() throws Exception {
		healthCheck = new CassandraHealthCheck("localhost");
	}

	@After
	public void tearDown() throws Exception {
	}

	@Test
	public void testHappyPath() throws Exception {
		Assert.assertTrue(healthCheck.check().isHealthy());
	}

	@Test
	public void testFail() throws Exception {
		healthCheck = new CassandraHealthCheck("google.com");
		Assert.assertFalse(healthCheck.check().isHealthy());
	}

}


text:
package unicon.matthews.dataloader.canvas.io.deserialize;

import com.fasterxml.jackson.core.JsonParser;
import com.fasterxml.jackson.databind.DeserializationContext;
import com.fasterxml.jackson.databind.JsonDeserializer;

import java.io.IOException;
import java.util.Optional;

import static unicon.matthews.dataloader.canvas.io.deserialize.CanvasDataFieldValueOptions.NULL;

/**
 * Deserializes a field of field of type Double which may be NULL, which is represented as \N in the Canvas
 * data dumps.
 *
This deserializer returns an Optional to better designate that the field value is optional.

 */
public class NullableDoubleFieldDeserializer extends JsonDeserializer<Optional<Double>> {

    @Override
    public Optional<Double> deserialize(JsonParser jsonParser, DeserializationContext deserializationContext)
            throws IOException {
        String fieldValueText = jsonParser.getText();
        Double fieldValue = null;
        if (!NULL.getFieldValue().equalsIgnoreCase(fieldValueText)) {
          fieldValue = Double.valueOf(fieldValueText);
        }
        return Optional.ofNullable(fieldValue);
    }
}


text:
ACCEPTED

#### According to
Index Fungorum

#### Published in
Mycol. Res. 92(3): 375 (1989)

#### Original name
Stenella alyxiae H.Y. Yip

### Remarks
null


text:
package filodb.query

import com.typesafe.scalalogging.{Logger, StrictLogging}
import kamon.Kamon

/**
  * ExecPlan objects cannot have loggers as vals because they would then not be serializable.
  * All Query Engine constructs should use this logger and provide more details of the construct
  * in the log message.
  */
object Query extends StrictLogging {
  val qLogger: Logger = logger
  // TODO refine with dataset tag
  protected[query] val droppedSamples = Kamon.counter("query-dropped-samples").withoutTags
}


text:
<?xml version="1.0" encoding="utf-8"?>
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
    android:orientation="vertical"
    android:layout_width="match_parent"
    android:layout_height="match_parent">
    <LinearLayout
        android:orientation="vertical"
        android:layout_width="match_parent"
        android:layout_height="wrap_content">
        <ImageView
            android:layout_gravity="center"
            android:layout_width="200dp"
            android:layout_height="200dp"
            android:background="@drawable/handbook_children_ico"
            />
        <TextView
            android:fontFamily="Catamaran_Regular"
            android:id="@+id/about_1"
            android:textColor="#413e3e"
            android:layout_marginLeft="5dp"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:text="@string/developername"
            android:textStyle="bold"
            android:textSize="22dp"
            />

        <TextView
            android:fontFamily="Catamaran_Regular"
            android:layout_width="match_parent"
            android:background="#362d2e"
            android:layout_height="wrap_content"
            android:textColor="#FFFFFF"
            android:id="@+id/developername"
            android:text="@string/developerdetais"
            android:textSize="17dp" />

        <TextView
            android:fontFamily="Catamaran_Regular"
            android:id="@+id/about_2"
            android:textColor="#413e3e"
            android:textStyle="bold"
            android:layout_marginLeft="5dp"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:text="@string/college"
            android:textSize="20dp"
            />
        <TextView
            android:fontFamily="Catamaran_Regular"
            android:id="@+id/about_3"
            android:textColor="#413e3e"
            android:textStyle="bold"
            android:layout_marginLeft="5dp"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:text="@string/place"
            android:textSize="20dp"
            />
        <TextView
            android:fontFamily="Catamaran_Regular"
            android:id="@+id/about_4"
            android:textColor="#413e3e"
            android:textStyle="bold"
            android:layout_marginLeft="5dp"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:text="@string/email"
            android:textSize="20dp"
            />
        <TextView
            android:fontFamily="Catamaran_Regular"
            android:id="@+id/about_5"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:textSize="20dp"
            android:text="@string/Ezhilweb"
            android:textColor="#FFFFFF"
            android:background="#362d2e"/>
        <TextView
            android:fontFamily="Catamaran_Regular"
            android:id="@+id/website"
            android:layout_width="200dp"
            android:layout_height="wrap_content"
            android:text="@string/EzhilSite"
            android:textSize="20dp"
            android:textColor="#0949af"
            />
        <TextView
            android:fontFamily="Catamaran_Regular"
            android:id="@+id/about_6"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:textSize="20dp"
            android:text="@string/Ezhilblog"
            android:textColor="#FFFFFF"
            android:background="#362d2e"/>
        <TextView
            android:fontFamily="Catamaran_Regular"
            android:id="@+id/blog"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:text="@string/Ezhilblogsite"
            android:textSize="20dp"
            android:textColor="#0949af"
            />
        <TextView
            android:fontFamily="Catamaran_Regular"
            android:id="@+id/about_7"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:textSize="20dp"
            android:text="@string/EzhilSource"
            android:textColor="#FFFFFF"
            android:background="#362d2e"/>
        <TextView
            android:fontFamily="Catamaran_Regular"
            android:id="@+id/about_8"
            android:textColor="#413e3e"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:text="@string/EzhilSourcedesc"
            android:textSize="15dp"
            />
        <TextView
            android:fontFamily="Catamaran_Regular"
            android:id="@+id/source"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:text="@string/Ezhilgit"
            android:textSize="18dp"
            android:textColor="#0949af"/>
        <TextView
            android:fontFamily="Catamaran_Regular"
            android:id="@+id/about_9"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:textSize="20dp"
            android:text="@string/license"
            android:textColor="#FFFFFF"
            android:background="#362d2e"/>
        <TextView
            android:fontFamily="Catamaran_Regular"
            android:id="@+id/about_A"
            android:textColor="#413e3e"
            android:layout_marginLeft="5dp"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:text="@string/licensedesc"
            android:textSize="15dp"
            />
        <TextView
            android:fontFamily="Catamaran_Regular"
            android:id="@+id/license"
            android:textColor="#0949af"
            android:layout_marginLeft="5dp"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:text="@string/licensetext"
            android:textSize="15dp"
            />
        <TextView
            android:fontFamily="Catamaran_Regular"
            android:id="@+id/about_B"
            android:textColor="#413e3e"
            android:layout_marginLeft="5dp"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:text="@string/Appsourcedesc"
            android:textSize="15dp"
            />
        <TextView
            android:fontFamily="Catamaran_Regular"
            android:textColor="#0949af"
            android:layout_marginLeft="5dp"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:text="@string/Appsourcegit"
            android:textSize="14dp"
            android:id="@+id/appsource"
            />
    </LinearLayout>
</ScrollView>


text:
package com.gs.fw.common.mithra.test.domain.pure;

import java.sql.Timestamp;

public class PureType2TxnTypesB extends PureType2TxnTypesBAbstract
{

	public PureType2TxnTypesB()
	{
		super();
	}
}


text: Commonly used dependencies between farrosoft wp projects


text:
<title>OGRE: Ogre::GLESFBOManager::FormatProperties::Mode Struct Reference - OGRE Documentation</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link type="text/css" rel="stylesheet" href="doxygen.css">
<link type="text/css" rel="stylesheet" href="tabs.css">

Main Page

Related Pages

Modules

Namespaces

Classes

Files

Directories

Class List

Class Index

Class Hierarchy

Class Members

Ogre::GLESFBOManager::FormatProperties::Mode

Ogre::GLESFBOManager::FormatProperties::Mode Struct Reference

Allowed modes/properties for this pixel format.
More...

#include <OgreGLESFBORenderTexture.h>

List of all members.

Public Attributes

size_t 	depth

size_t 	stencil

Detailed Description

Allowed modes/properties for this pixel format.

Definition at line 116 of file OgreGLESFBORenderTexture.h.

Member Data Documentation

          size_t Ogre::GLESFBOManager::FormatProperties::Mode::depth

Definition at line 118 of file OgreGLESFBORenderTexture.h.

          size_t Ogre::GLESFBOManager::FormatProperties::Mode::stencil

Definition at line 119 of file OgreGLESFBORenderTexture.h.

The documentation for this struct was generated from the following file:

OgreGLESFBORenderTexture.h

Copyright © 2012 Torus Knot Software Ltd

This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.

Last modified Sun Sep 2 08:30:28 2012


text:
var assert = require('assert')
var bufferEqual = require('buffer-equal')
var fa = require('../')

describe('fs-auth', function(){
  var originalStr = 'hello啊 world 你是大傻逼123 ahah'
  var originalBuf = new Buffer(originalStr)
  var pwd = 'n0gx'
  var encryptedBuf

  it('locks with pwd', function(){
    encryptedBuf = fa.lock(originalBuf, pwd)
    assert(!bufferEqual(encryptedBuf, originalBuf))
  })

  it('auths with pwd', function(){
    var _originalBuf = fa.auth(encryptedBuf, pwd)
    assert(bufferEqual(_originalBuf, originalBuf))
  })

  it('auths fail with incorrect pwd', function(){
    assert.throws(function(){
      fa.auth(encryptedBuf, 'bad')
    }, 'auth fail')
  })
})


text:
oTest.fnStart("fnServerData for Ajax sourced data");

$(document).ready(function () {
    var mPass;

    oTest.fnTest(
        "Argument length",
        function () {
            $('#example').dataTable({
                "sAjaxSource": "../../../examples/ajax/sources/arrays.txt",
                "fnServerData": function () {
                    mPass = arguments.length;
                }
            });
        },
        function () {
            return mPass == 4;
        }
    );

    oTest.fnTest(
        "Url",
        function () {
            $('#example').dataTable({
                "bDestroy": true,
                "sAjaxSource": "../../../examples/ajax/sources/arrays.txt",
                "fnServerData": function (sUrl, aoData, fnCallback, oSettings) {
                    mPass = sUrl == "../../../examples/ajax/sources/arrays.txt";
                }
            });
        },
        function () {
            return mPass;
        }
    );

    oTest.fnTest(
        "Data array",
        function () {
            $('#example').dataTable({
                "bDestroy": true,
                "sAjaxSource": "../../../examples/ajax/sources/arrays.txt",
                "fnServerData": function (sUrl, aoData, fnCallback, oSettings) {
                    mPass = aoData.length == 0;
                }
            });
        },
        function () {
            return mPass;
        }
    );

    oTest.fnTest(
        "Callback function",
        function () {
            $('#example').dataTable({
                "bDestroy": true,
                "sAjaxSource": "../../../examples/ajax/sources/arrays.txt",
                "fnServerData": function (sUrl, aoData, fnCallback, oSettings) {
                    mPass = typeof fnCallback == 'function';
                }
            });
        },
        function () {
            return mPass;
        }
    );

    oTest.fnComplete();
});


text:
if [ $EUID != 0 ]; then
  sudo "$0" "$@"
  exit $?
fi

function dockerPrepare {
  UBUNTU_RELEASE=$(lsb_release -rs)
  if [ "$UBUNTU_RELEASE" != "12.04" ] &&
     [ "$UBUNTU_RELEASE" != "14.04" ] &&
     [ "$UBUNTU_RELEASE" != "15.10" ] &&
     [ "$UBUNTU_RELEASE" != "16.04" ]; then
    echo "THIS SCRIPT DOES NOT SUPPORT YOUR OS VERSION."
    echo " - latest supported version is Ubuntu 16.04"
    exit
  fi

  sudo apt-get -y update
  sudo apt-get -y install apt-transport-https ca-certificates

  sudo apt-key adv \
  --keyserver hkp://ha.pool.sks-keyservers.net:80 \
  --recv-keys 58118E89F3A912897C070ADBF76221572C52609D

  DOCKER_REPO="UNSUPPORTED"
  if [ "$UBUNTU_RELEASE" == "16.04" ]; then
    DOCKER_REPO="deb https://apt.dockerproject.org/repo ubuntu-xenial main"
    elif [ "$UBUNTU_RELEASE" == "15.10"  ]; then
    DOCKER_REPO="deb https://apt.dockerproject.org/repo ubuntu-wily main"
    elif [ "$UBUNTU_RELEASE" == "14.04"  ]; then
    DOCKER_REPO="deb https://apt.dockerproject.org/repo ubuntu-trusty main"
    elif [ "$UBUNTU_RELEASE" == "12.04"  ]; then
    DOCKER_REPO="deb https://apt.dockerproject.org/repo ubuntu-precise main"
  else
    echo "UNSUPPORTED."
    exit
  fi
  echo "$DOCKER_REPO" | sudo tee /etc/apt/sources.list.d/docker.list

  sudo apt-get -y update
  apt-cache policy docker-engine

  if [ "$UBUNTU_RELEASE" != "14.04" ] &&
  [ "$UBUNTU_RELEASE" != "15.10" ] &&
  [ "$UBUNTU_RELEASE" != "16.04" ]; then
    sudo apt-get -y update
    sudo apt-get -y install linux-image-extra-"$(uname -r)" linux-image-extra-virtual
    elif [ "$UBUNTU_RELEASE" == "12.04" ]; then
    sudo apt-get -y update
    sudo apt-get -y install linux-image-generic-lts-trusty
    if [ ! -f rebooted_for_precise ]; then
      touch rebooted_for_precise
      sudo reboot
    fi
  fi
}

#======================================================================
# Install latest version of Docker
# Note: for production versions a specific version should be used
#======================================================================
function dockerInstall() {
  sudo apt-get -y update
  sudo apt-get -y install docker-engine
  sudo service docker start
  sudo docker run hello-world
}

#======================================================================
# main
#======================================================================
if [ $EUID != 0 ]; then
  sudo "$0" "$@"
  exit $?
fi
dockerPrepare
dockerInstall


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

<meta http-equiv="Content-Type" content="text/html" charset="UTF-8">
<title>org.apache.hadoop.hbase.regionserver (HBase 0.98.6-hadoop2 API)</title>
<meta name="date" content="2014-09-03">
<link rel="stylesheet" type="text/css" href="../../../../../stylesheet.css" title="Style">

JavaScript is disabled on your browser.

Overview

Package

Class

Use

Tree

Deprecated

Index

Help

Prev Package

Next Package

Frames

No Frames

All Classes

Package org.apache.hadoop.hbase.regionserver

Interface Summary

Interface
Description

ChangedReadersObserver

If set of MapFile.Readers in Store change, implementors are notified.

ColumnTracker

Implementing classes of this interface will be used for the tracking
 and enforcement of columns and numbers of versions and timeToLive during
 the course of a Get or Scan operation.

CompactionRequestor

DeleteTracker

This interface is used for the tracking and enforcement of Deletes
 during the course of a Get or Scan operation.

FlushRequester

Request a flush.

HRegion.BulkLoadListener

Listener class to enable callers of
 bulkLoadHFile() to perform any necessary
 pre/post processing of a given bulkload call

InternalScanner

Internal scanners differ from client-side scanners in that they operate on
 HStoreKeys and byte[] instead of RowResults.

KeyValueScanner

Scanner that returns the next KeyValue.

LastSequenceId

Last flushed sequence Ids for the regions on region server

LeaseListener

LeaseListener is an interface meant to be implemented by users of the Leases
 class.

MetricsRegionAggregateSource

This interface will be implemented by a MetricsSource that will export metrics from
 multiple regions into the hadoop metrics system.

MetricsRegionServerSource

Interface for classes that expose metrics about the regionserver.

MetricsRegionServerSourceFactory

Interface of a factory to create Metrics Sources used inside of regionservers.

MetricsRegionServerWrapper

This is the interface that will expose RegionServer information to hadoop1/hadoop2
 implementations of the MetricsRegionServerSource.

MetricsRegionSource

This interface will be implemented to allow single regions to push metrics into
 MetricsRegionAggregateSource that will in turn push data to the Hadoop metrics system.

MetricsRegionWrapper

Interface of class that will wrap an HRegion and export numbers so they can be
 used in MetricsRegionSource

RegionScanner

RegionScanner describes iterators over rows in an HRegion.

RegionServerServices

Services provided by HRegionServer

ReplicationService

Gateway to Cluster Replication.

ReplicationSinkService

A sink for a replication stream has to expose this service.

ReplicationSourceService

A source for a replication stream has to expose this service.

RowProcessor<S extends com.google.protobuf.Message,T extends com.google.protobuf.Message>

RpcSchedulerFactory

A factory class that constructs an RpcScheduler for
 a region server.

SplitLogWorker.TaskExecutor

Objects implementing this interface actually do the task that has been
 acquired by a SplitLogWorker.

Store

Interface for objects that hold a column family in a Region.

StoreConfigInformation

A more restricted interface for HStore.

StoreFileManager

Manages the store files and basic metadata about that that determines the logical structure
 (e.g.

StripeMultiFileWriter.WriterFactory

Class Summary

Class
Description

BaseRowProcessor<S extends com.google.protobuf.Message,T extends com.google.protobuf.Message>

Base class for RowProcessor with some default implementations.

ColumnCount

Simple wrapper for a byte buffer and a counter.

CompactionTool

CompactSplitThread

Compact region on request and then run split if appropriate

ConstantSizeRegionSplitPolicy

A RegionSplitPolicy implementation which splits a region
 as soon as any of its store files exceeds a maximum configurable
 size.

DefaultStoreEngine

Default StoreEngine creates the default compactor, policy, and store file manager, or
 their derivatives.

DefaultStoreFlusher

Default implementation of StoreFlusher.

DelimitedKeyPrefixRegionSplitPolicy

A custom RegionSplitPolicy implementing a SplitPolicy that groups
 rows by a prefix of the row-key with a delimiter.

DisabledRegionSplitPolicy

A RegionSplitPolicy that disables region splits.

ExplicitColumnTracker

This class is used for the tracking and enforcement of columns and numbers
 of versions during the course of a Get or Scan operation, when explicit
 column qualifiers have been asked for in the query.

HRegion

HRegion stores data for a certain region of a table.

HRegion.FlushResult

Objects from this class are created when flushing to describe all the different states that
 that method ends up in.

HRegion.RowLock

Row lock held by a given thread.

HRegionFileSystem

View to an on-disk Region.

HRegionServer

HRegionServer makes a set of HRegions available to clients.

HRegionServer.MovedRegionsCleaner

Creates a Chore thread to clean the moved region cache.

HRegionServerCommandLine

Class responsible for parsing the command line and starting the
 RegionServer.

HStore

A Store holds a column family in a Region.

IncreasingToUpperBoundRegionSplitPolicy

Split size is the number of regions that are on this server that all are
 of the same table, cubed, times 2x the region flush size OR the maximum
 region split size, whichever is smaller.

KeyPrefixRegionSplitPolicy

A custom RegionSplitPolicy implementing a SplitPolicy that groups
 rows by a prefix of the row-key

 This ensures that a region is not split "inside" a prefix of a row key.

KeyValueHeap

Implements a heap merge across any number of KeyValueScanners.

KeyValueHeap.KVScannerComparator

KeyValueSkipListSet

A Set of KeyValues implemented on top of a
 ConcurrentSkipListMap.

Leases

Leases

 There are several server classes in HBase that need to track external
 clients that occasionally send heartbeats.

LruHashMap<K extends HeapSize,V extends HeapSize>

The LruHashMap is a memory-aware HashMap with a configurable maximum
 memory footprint.

LruHashMap.Entry<K extends HeapSize,V extends HeapSize>

Entry to store key/value mappings.

MemStore

The MemStore holds in-memory modifications to the Store.

MemStoreChunkPool

A pool of MemStoreLAB.Chunk instances.

MemStoreLAB

A memstore-local allocation buffer.

MemStoreLAB.Allocation

The result of a single allocation.

MetricsRegion

This is the glue between the HRegion and whatever hadoop shim layer
 is loaded (hbase-hadoop1-compat or hbase-hadoop2-compat).

MetricsRegionAggregateSourceImpl

MetricsRegionServer

This class is for maintaining the various regionserver statistics
 and publishing them through the metrics interfaces.

MetricsRegionServerSourceFactoryImpl

Factory to create MetricsRegionServerSource when given a  MetricsRegionServerWrapper

MetricsRegionServerSourceImpl

Hadoop2 implementation of MetricsRegionServerSource.

MetricsRegionSourceImpl

MetricsRegionWrapperImpl

MiniBatchOperationInProgress<T>

Wraps together the mutations which are applied as a batch to the region and their operation
 status and WALEdits.

MultiVersionConsistencyControl

Manages the read/write consistency within memstore.

MultiVersionConsistencyControl.WriteEntry

NonLazyKeyValueScanner

A "non-lazy" scanner which always does a real seek operation.

NonReversedNonLazyKeyValueScanner

A "non-reversed & non-lazy" scanner which does not support backward scanning
 and always does a real seek operation.

OperationStatus

This class stores the Operation status code and the exception message
 that occurs in case of failure of operations like put, delete, etc.

RegionCoprocessorHost

Implements the coprocessor environment and runtime support for coprocessors
 loaded within a HRegion.

RegionMergeTransaction

Executes region merge as a "transaction".

RegionServerAccounting

RegionServerAccounting keeps record of some basic real time information about
 the Region Server.

RegionServerCoprocessorHost

RegionSplitPolicy

A split policy determines when a region should be split.

ReversedKeyValueHeap

ReversedKeyValueHeap is used for supporting reversed scanning.

RSDumpServlet

RSStatusServlet

ScanDeleteTracker

This class is responsible for the tracking and enforcement of Deletes
 during the course of a Scan operation.

ScanInfo

Immutable information for scans over a store.

ScanQueryMatcher

A query matcher that is specifically designed for the scan case.

ScanWildcardColumnTracker

Keeps track of the columns for a scan if they are not explicitly specified

ServerNonceManager

Implementation of nonce manager that stores nonces in a hash map and cleans them up after
 some time; if nonce group/client ID is supplied, nonces are stored by client ID.

ShutdownHook

Manage regionserver shutdown hooks.

SimpleRpcSchedulerFactory

Constructs a SimpleRpcScheduler.

SplitLogWorker

This worker is spawned in every regionserver (should we also spawn one in
 the master?).

SplitTransaction

Executes region split as a "transaction".

StoreEngine<SF extends org.apache.hadoop.hbase.regionserver.StoreFlusher,CP extends CompactionPolicy,C extends Compactor,SFM extends StoreFileManager>

StoreEngine is a factory that can create the objects necessary for HStore to operate.

StoreFile

A Store data file.

StoreFile.Comparators

Useful comparators for comparing StoreFiles.

StoreFile.Reader

Reader for a StoreFile.

StoreFile.Writer

A StoreFile writer.

StoreFile.WriterBuilder

StoreFileInfo

Describe a StoreFile (hfile, reference, link)

StoreFileScanner

KeyValueScanner adaptor over the Reader.

StoreScanner

Scanner scans both the memstore and the Store.

StoreUtils

Utility functions for region server storage layer.

StripeMultiFileWriter

Base class for cell sink that separates the provided cells into multiple files.

StripeMultiFileWriter.BoundaryMultiWriter

MultiWriter that separates the cells based on fixed row-key boundaries.

StripeMultiFileWriter.SizeMultiWriter

MultiWriter that separates the cells based on target cell number per file and file count.

StripeStoreConfig

Configuration class for stripe store and compactions.

StripeStoreEngine

The storage engine that implements the stripe-based store/compaction scheme.

StripeStoreFileManager

Stripe implementation of StoreFileManager.

StripeStoreFlusher

Stripe implementation of StoreFlusher.

StripeStoreFlusher.BoundaryStripeFlushRequest

Stripe flush request wrapper based on boundaries.

StripeStoreFlusher.SizeStripeFlushRequest

Stripe flush request wrapper based on size.

StripeStoreFlusher.StripeFlushRequest

Stripe flush request wrapper that writes a non-striped file.

TimeRangeTracker

Stores the minimum and maximum timestamp values (both are inclusive).

Enum Summary

Enum
Description

BloomType

DeleteTracker.DeleteCompare

Return codes for comparison of two Deletes.

DeleteTracker.DeleteResult

Returns codes for delete result.

HRegion.Operation

Operation enum is used in HRegion.startRegionOperation() to provide operation context for
 startRegionOperation to possibly invoke different checks before any region operations.

MetricsRegionServerSourceFactoryImpl.FactoryStorage

RegionOpeningState

ScanQueryMatcher.MatchCode

ScanQueryMatcher.match(org.apache.hadoop.hbase.KeyValue) return codes.

ScanType

Enum to distinguish general scan types.

SplitLogWorker.TaskExecutor.Status

Exception Summary

Exception
Description

LeaseException

Reports a problem with a lease

Leases.LeaseStillHeldException

Thrown if we are asked create a lease but lease on passed name already
 exists.

NoSuchColumnFamilyException

Thrown if request for nonexistent column family.

RegionAlreadyInTransitionException

This exception is thrown when a region server is asked to open or close
 a region but it's already processing it

RegionServerRunningException

Thrown if the region server log directory exists (which indicates another
 region server is running at the same address)

RegionServerStoppedException

Thrown by the region server when it is in shutting down state.

WrongRegionException

Thrown when a request contains a key which is not part of this region

Annotation Types Summary

Annotation Type
Description

HRegionServer.QosPriority

Overview

Package

Class

Use

Tree

Deprecated

Index

Help

Prev Package

Next Package

Frames

No Frames

All Classes

Copyright © 2014 The Apache Software Foundation. All rights reserved.


text:
package net.glowstone.net.rcon;

import lombok.Getter;
import net.glowstone.GlowServer;
import net.md_5.bungee.api.chat.BaseComponent;
import org.bukkit.command.RemoteConsoleCommandSender;
import org.bukkit.permissions.PermissibleBase;
import org.bukkit.permissions.Permission;
import org.bukkit.permissions.PermissionAttachment;
import org.bukkit.permissions.PermissionAttachmentInfo;
import org.bukkit.plugin.Plugin;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;

import java.util.Set;
import java.util.UUID;

public class RconCommandSender implements RemoteConsoleCommandSender {

    @Getter
    private final GlowServer server;
    private final StringBuffer buffer = new StringBuffer();
    private final PermissibleBase perm = new PermissibleBase(this);
    private final Spigot spigot = new Spigot() {
        @Override
        public void sendMessage(BaseComponent component) {
            RconCommandSender.this.sendMessage(component);
        }

        @Override
        public void sendMessage(BaseComponent... components) {
            RconCommandSender.this.sendMessage(components);
        }
    };

    public RconCommandSender(GlowServer server) {
        this.server = server;
    }

    /**
     * Empties the buffer and returns its contents.
     *
     * @return the previous contents of the buffer.
     */
    public String flush() {
        String result;
        synchronized (buffer) {
            result = buffer.toString();
            buffer.setLength(0);
        }
        return result;
    }

    @Override
    public String getName() {
        return "Rcon";
    }

    @Override
    public Spigot spigot() {
        return spigot;
    }

    @Override
    public void sendMessage(String message) {
        buffer.append(message).append("\n");
    }

    @Override
    public void sendMessage(String[] strings) {
        for (String line : strings) {
            sendMessage(line);
        }
    }

    @Override
    public void sendMessage(@Nullable UUID uuid, @NotNull String s) {
        if (uuid == null) {
            sendMessage(s);
        } else {
            sendMessage(String.format("[%s] %s", uuid, s));
        }
    }

    @Override
    public void sendMessage(@Nullable UUID uuid, @NotNull String[] strings) {
        for (String line : strings) {
            sendMessage(uuid, line);
        }
    }

    ////////////////////////////////////////////////////////////////////////
    // Permissible

    @Override
    public boolean isPermissionSet(String name) {
        return perm.isPermissionSet(name);
    }

    @Override
    public boolean isPermissionSet(Permission perm) {
        return this.perm.isPermissionSet(perm);
    }

    @Override
    public boolean hasPermission(String name) {
        return perm.hasPermission(name);
    }

    @Override
    public boolean hasPermission(Permission perm) {
        return this.perm.hasPermission(perm);
    }

    @Override
    public PermissionAttachment addAttachment(Plugin plugin, String name, boolean value) {
        return perm.addAttachment(plugin, name, value);
    }

    @Override
    public PermissionAttachment addAttachment(Plugin plugin) {
        return perm.addAttachment(plugin);
    }

    @Override
    public PermissionAttachment addAttachment(Plugin plugin, String name, boolean value,
                                              int ticks) {
        return perm.addAttachment(plugin, name, value, ticks);
    }

    @Override
    public PermissionAttachment addAttachment(Plugin plugin, int ticks) {
        return perm.addAttachment(plugin, ticks);
    }

    @Override
    public void removeAttachment(PermissionAttachment attachment) {
        perm.removeAttachment(attachment);
    }

    @Override
    public void recalculatePermissions() {
        perm.recalculatePermissions();
    }

    @Override
    public Set<PermissionAttachmentInfo> getEffectivePermissions() {
        return perm.getEffectivePermissions();
    }

    @Override
    public boolean isOp() {
        return true;
    }

    @Override
    public void setOp(boolean value) {
        throw new UnsupportedOperationException(
            "Cannot change operator status of Rcon command sender");
    }
}


text:
pub mod virtio_blk;
pub mod virtio_net;
pub mod virtio_ring;


text:
package graphdb.extractors.parsers.word.document.word;

import graphdb.extractors.parsers.word.document.table.WTTablePartParser;
import graphdb.extractors.parsers.word.entity.table.TableCellInfo;
import graphdb.extractors.parsers.word.entity.table.TableInfo;
import graphdb.extractors.parsers.word.entity.table.TableRowInfo;
import graphdb.extractors.parsers.word.entity.utils.PlainTextInfo;
import org.apache.poi.xwpf.usermodel.XWPFTable;
import org.apache.poi.xwpf.usermodel.XWPFTableCell;
import org.apache.poi.xwpf.usermodel.XWPFTableRow;
import org.openxmlformats.schemas.wordprocessingml.x2006.main.CTDecimalNumber;
import org.openxmlformats.schemas.wordprocessingml.x2006.main.CTTcPr;
import org.openxmlformats.schemas.wordprocessingml.x2006.main.STMerge;

import java.util.List;

/**
 * Created by maxkibble on 2017/5/25.
 */
class WordDocxTableParser {

    public static TableInfo parseWordTable(XWPFTable table, String caption) {
        if (table == null) {
            return null;
        }

        TableInfo tableInfo = new TableInfo();

        tableInfo.setTableCaption(caption);
        tableInfo.setRowSize(table.getNumberOfRows());

        List<XWPFTableRow> rows = table.getRows();
        int rowNum = 0;
        // 遍历所有行
        for (XWPFTableRow row : rows) {
            TableRowInfo rowInfo = new TableRowInfo();
            if (rowInfo != null)
                tableInfo.addSubDocumentElement(rowInfo);// 添加到父节点:table

            rowNum++;
            rowInfo.setRowNum(rowNum);

            List<XWPFTableCell> cells = row.getTableCells();
            int colNum = 0;
            // 遍历所有列(单元格)
            for (XWPFTableCell cell : cells) {
                TableCellInfo cellInfo = null;

                int startColNum = colNum + 1;
                int columnSpan = getGridSpan(cell);
                colNum += columnSpan;

                // 判断是否跨行,以及是否是跨行单元格的第一行
                if (isVMerge(cell) && !isVMergeRestart(cell)) {
                    // 是跨行单元格的非首行位置,获取到这个合并单元格的对象实例
                    TableRowInfo prevRowInfo = rowInfo.getPreviousRow();
                    cellInfo = prevRowInfo.getCellAtColumn(startColNum);
                    cellInfo.setEndRowNum(rowNum);// 更新该单元格的尾行值
                }
                else {
                    // 跨行首格以及其他所有情况。
                    cellInfo = new TableCellInfo();
                    cellInfo.setStartRowNum(rowNum);
                    cellInfo.setEndRowNum(rowNum);
                    cellInfo.setStartColNum(startColNum);
                    cellInfo.setEndColNum(colNum);
                    PlainTextInfo plainTextInfo = new PlainTextInfo(cell.getText().trim());
                    //plainTextInfo.setEnglishText();
                    cellInfo.addSubDocumentElement(plainTextInfo);
                }

                // 添加到父节点:row
                if (cellInfo != null)
                    rowInfo.addSubDocumentElement(cellInfo);
            }

            // table的colsize未初始化时,要根据计算出的colnum,也就是最后一行的编号,来初始化。
            if (tableInfo.getColumnSize() == -1)
                tableInfo.setColumnSize(colNum);
        }

        //第二级数据
        tableInfo.setTableParts(WTTablePartParser.parseTableToParts(tableInfo));
        return tableInfo;
    }

    /*
     * Judge whether a cell is merged vertically or not
     */
    private static boolean isVMerge(XWPFTableCell cell) {
        if (cell == null)
            return false;
        CTTcPr tcPr = cell.getCTTc().getTcPr();
        if (tcPr == null)
            return false;

        return tcPr.isSetVMerge();
    }

    /*
     * judge whether a cell is restart or not
     */
    private static boolean isVMergeRestart(XWPFTableCell cell) {
        if (cell == null)
            return false;
        CTTcPr tcPr = cell.getCTTc().getTcPr();
        if (tcPr == null || !tcPr.isSetVMerge())
            return false;

        // 如果不判断isVMerge,会getVMerge==null? NullException Alert!
        return (tcPr.getVMerge().getVal() == STMerge.RESTART);
    }

    /*
     * @Description GridSpan记录跨列的列数,也就是跨越单元格的数量。
     */
    private static int getGridSpan(XWPFTableCell cell) {
        if (cell == null)
            return -1;
        CTTcPr tcPr = cell.getCTTc().getTcPr();

        if (tcPr == null)
            return 1;

        CTDecimalNumber number = tcPr.getGridSpan();

        if (number == null) {
            return 1;
        }
        else {
            return number.getVal().intValue();
        }
    }

}


text:
#include <iostream>
#include <graphlab/serialization/iarchive.hpp>

namespace graphlab {

  /***************************************************************************
   *                        Basic Deserializers                              *
   ***************************************************************************/

  // generate the serialize call for a whole bunch of integer types
#define GENCASTDESERIALIZE(typesrc, typedest)           \
  iarchive& operator>>(iarchive &a, typesrc &i) {       \
    typedest c;                                         \
    operator>>(a, c);                                   \
    i = static_cast<typesrc>(c);                        \
    return a;                                           \
  }

#define GENINTDESERIALIZE(typesrc)                      \
  iarchive& operator>>(iarchive &a, typesrc &i) {       \
    int64_t c;                                          \
    deserialize_64bit_integer(a, c);                    \
    i = static_cast<typesrc>(c);                        \
    return a;                                           \
  }

  iarchive& operator>>(iarchive& a, char& i) {
    a.i->get(i);
    assert(!a.i->fail());
    return a;
  }

  iarchive& deserialize_64bit_integer(iarchive& a, int64_t& i) {
    a.i->read(reinterpret_cast<char*>(&i), sizeof(int64_t));
    assert(!a.i->fail());
    return a;
  }

  GENCASTDESERIALIZE(bool, char);
  GENCASTDESERIALIZE(unsigned char, char);
  // serializes a bunch of integer types
  GENINTDESERIALIZE(short);
  GENINTDESERIALIZE(unsigned short);
  GENINTDESERIALIZE(int);
  GENINTDESERIALIZE(long);
  GENINTDESERIALIZE(long long);
  GENINTDESERIALIZE(unsigned long);
  GENINTDESERIALIZE(unsigned int);
  GENINTDESERIALIZE(unsigned long long);

  iarchive& operator>>(iarchive& a, float& i) {
    a.i->read(reinterpret_cast<char*>(&i), sizeof(float));
    assert(!a.i->fail());
    return a;
  }

  iarchive& operator>>(iarchive& a, double& i) {
    a.i->read(reinterpret_cast<char*>(&i), sizeof(double));
    assert(!a.i->fail());
    return a;
  }

  iarchive& deserialize(iarchive& a, void* const i,const size_t length) {
    // Save the length and check if lengths match
    size_t length2;
    operator>>(a, length2);
    assert(length == length2);

    //operator>> the rest
    a.i->read(reinterpret_cast<char*>(i), length);
    assert(!a.i->fail());
    return a;
  }

  iarchive& operator>>(iarchive& a, char*& s) {
    // Save the length and check if lengths match
    size_t length;
    operator>>(a, length);
    if (s == NULL) s = new char[length+1];
    //operator>> the rest
    a.i->read(reinterpret_cast<char*>(s), length);
    s[length] = 0;
    assert(!a.i->fail());
    return a;
  }

  iarchive& operator>>(iarchive& a, std::string& s){
    //read the length
    size_t length;
    a >> length;
    //resize the string and read the characters
    s.resize(length);
    a.i->read(const_cast<char*>(s.c_str()), length);
    assert(!a.i->fail());
    return a;
  }

  iarchive& operator>>(iarchive& a, void* &t) {
    size_t tmp;
    a >> tmp;
    t = (void*)tmp;
    return a;
  }
} // namespace prl


text:
<?php

namespace Anavel\Crud\Abstractor\Exceptions;

class FactoryException extends \Exception
{
}


text:
// Copyright 2009 the Sputnik authors.  All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.

/*---
info: >
    When the [[Construct]] property for a Function object F is called:
    A new native ECMAScript object is created.
    Invoke the [[Call]] property of F, providing just created native ECMAScript object as the this value and providing the argument
    list passed into [[Construct]] as the argument values.
    If Type( [[Call]] returned) is an Object then return this just as obtained object
es5id: 13.2.2_A7_T2
description: Declaring a "function as function __func (arg)"
---*/

var __FRST, __SCND, __func, __obj__;

__FRST="one";
__SCND="two";

__func = function(arg1, arg2){
	this.first=arg1;
	var __obj={second:arg2};
    return __obj;

};

__obj__ = new __func(__FRST, __SCND);

//////////////////////////////////////////////////////////////////////////////
//CHECK#1
if (__obj__.first !== undefined) {
	$ERROR('#1: __obj__.first === undefined. Actual: __obj__.first==='+__obj__.first);
}
//
//////////////////////////////////////////////////////////////////////////////

//////////////////////////////////////////////////////////////////////////////
//CHECK#2
if (__obj__.second !== __SCND) {
	$ERROR('#2: __obj__.second === __SCND. Actual: __obj__.second ==='+__obj__.second);
}
//
//////////////////////////////////////////////////////////////////////////////


text:
var Action = {

  'cursorSel' : null,
  'mouseVector' : null,
  'raycaster' : null,
  'oldSel' : null,
  'objHover' : null,
  'mouseUpDownTimer' : null,
  'animPosition' : null,

  'prevScale' : null,

  /**
   * Init Raycaster for events on Systems
   */

  'init' : function() {

    this.mouseVector = new THREE.Vector3();
    this.raycaster = new THREE.Raycaster();

    container.addEventListener('mousedown', this.onMouseDown, false);
    container.addEventListener('mouseup', this.onMouseUp, false);

    container.addEventListener( 'mousewheel', this.stopWinScroll, false );
    container.addEventListener( 'DOMMouseScroll', this.stopWinScroll, false ); // FF
    //container.addEventListener('mousemove', this.onMouseHover, false);
  },

  /**
   * Stop window scroll when mouse on scene
   */

  'stopWinScroll' : function (event) {
    event.preventDefault();
    event.stopPropagation();
  },

  /**
   * Update particle size on zoom in/out
   */

  'sizeOnScroll' : function (scale) {

    if(System.particle == undefined || scale<=0) return;

    var minScale = Ed3d.effectScaleSystem[0];
    var maxScale = Ed3d.effectScaleSystem[1];
    var newScale = scale*20;

    if(this.prevScale == newScale) return;
    this.prevScale = newScale;

    if(newScale>maxScale) newScale = maxScale;
    if(newScale<minScale) newScale = minScale;

    System.particle.material.size = newScale;
    System.scaleSize = newScale;

  },

  /**
   * Mouse Hover
   */

  'onMouseHover' : function (e) {

    e.preventDefault();
    var position = $('#ed3dmap').offset();

    this.mouseVector = new THREE.Vector3(
      ( ( e.clientX - position.left ) / renderer.domElement.width ) * 2 - 1,
      - ( ( e.clientY - position.top ) / renderer.domElement.height ) * 2 + 1,
      1);

    this.mouseVector.unproject(camera);
    this.raycaster = new THREE.Raycaster(camera.position, this.mouseVector.sub(camera.position).normalize());
    this.raycaster.params.Points.threshold = 5;

    // create an array containing all objects in the scene with which the ray intersects
    var intersects = this.raycaster.intersectObjects(scene.children);
    if (intersects.length > 0) {

      for( var i = 0; i < intersects.length; i++ ) {
        var intersection = intersects[ i ];
        if(intersection.object.clickable) {

          var indexPoint = intersection.index;

          Action.hoverOnObj(indexPoint);
        }
      }

    } else {
      Action.outOnObj();
    }

  },

  'hoverOnObj' : function (indexPoint) {

    if(this.objHover == indexPoint) return;
    this.outOnObj();

    System.particleGeo.colors[indexPoint] = new THREE.Color('#00ff00');
    System.particleGeo.colorsNeedUpdate = true;

    this.objHover = indexPoint;

  },

  'outOnObj' : function () {

    if(this.objHover === null || System.particleGeo.vertices[this.objHover] == undefined)
      return;

    obj = System.particleGeo.vertices[this.objHover];

    System.particleGeo.colors[this.objHover] = obj.color;
    System.particleGeo.colorsNeedUpdate = true;

    this.objHover = null;

  },

  /**
   * On system click
   */

  'onMouseDown' : function (e) {

    this.mouseUpDownTimer = Date.now();

  },

  /**
   * On system click
   */

  'onMouseUp' : function (e) {

    e.preventDefault();

    //-- If long clic down, don't do anything
    var difference = (Date.now()-this.mouseUpDownTimer)/1000;
    if (difference > 0.2) {
      this.mouseUpDownTimer = null;
      return;
    }
    this.mouseUpDownTimer = null;

    //-- Raycast object

    var position = $('#ed3dmap').offset();

    this.mouseVector = new THREE.Vector3(
      ( ( e.clientX - position.left ) / renderer.domElement.width ) * 2 - 1,
      - ( ( e.clientY - position.top ) / renderer.domElement.height ) * 2 + 1,
      1);

    this.mouseVector.unproject(camera);
    this.raycaster = new THREE.Raycaster(camera.position, this.mouseVector.sub(camera.position).normalize());
    this.raycaster.params.Points.threshold = 2;

    // create an array containing all objects in the scene with which the ray intersects
    var intersects = this.raycaster.intersectObjects(scene.children);
    if (intersects.length > 0) {

      for( var i = 0; i < intersects.length; i++ ) {
        var intersection = intersects[ i ];
        if(intersection.object.clickable) {

          var indexPoint = intersection.index;
          var selPoint = intersection.object.geometry.vertices[indexPoint];

          if(selPoint.visible) {
            $('#hud #infos').html(
              "<h2>"+selPoint.name+"</h2>"
            );

            var isMove = Action.moveToObj(indexPoint, selPoint);

            if(isMove) return;
          }

        }

        if(intersection.object.showCoord) {

          $('#debug').html(Math.round(intersection.point.x)+' , '+Math.round(-intersection.point.z));

          Route.addPoint(Math.round(intersection.point.x),0,Math.round(-intersection.point.z));

        }
      }

    }

  },

  /**
   * Move to the next visible system
   *
   * @param {int} indexPoint
   */

  'moveNextPrev' : function (indexPoint, increment) {

    var find = false;
    while(!find) {

      //-- If next|previous is undefined, loop to the first|last
      if (indexPoint < 0) indexPoint = System.particleGeo.vertices.length-1;
      else if (System.particleGeo.vertices[indexPoint] == undefined) indexPoint = 0;

      if(System.particleGeo.vertices[indexPoint].visible == true) {
        find = true;
      } else {
        indexPoint += increment
      }
    }

    //-- Move to
    var selPoint = System.particleGeo.vertices[indexPoint];
    Action.moveToObj(indexPoint, selPoint);

  },

  /**
   * Disable current selection
   */

  'disableSelection' : function () {

    if(this.cursorSel == null) return;

    this.oldSel = null;
    this.cursorSel.visible = false;

    $('#hud #infos').html('');

  },

  /**
   * Move to inital position without animation
   */
  'moveInitalPositionNoAnim' : function (timer) {

    var cam = [Ed3d.playerPos[0], Ed3d.playerPos[1]+500, Ed3d.playerPos[2]+500]
    if(Ed3d.cameraPos != null) {
      cam = [Ed3d.cameraPos[0], Ed3d.cameraPos[1], -Ed3d.cameraPos[2]];
    }

    var moveTo = {
      x: cam[0], y: cam[1], z: cam[2],
      mx: Ed3d.playerPos[0], my: Ed3d.playerPos[1] ,   mz: -Ed3d.playerPos[2]
    };
    camera.position.set(moveTo.x, moveTo.y, moveTo.z);
    controls.target.set(moveTo.mx, moveTo.my, moveTo.mz);

  },

  /**
   * Move to inital position
   */
  'moveInitalPosition' : function (timer) {

    if(timer == undefined) timer = 800;

    this.disableSelection();

    //-- Move camera to initial position

    var moveFrom = {
      x: camera.position.x, y: camera.position.y , z: camera.position.z,
      mx: controls.target.x, my: controls.target.y , mz: controls.target.z
    };

    //-- Move to player position if defined, else move to Sol
    var cam = [Ed3d.playerPos[0], Ed3d.playerPos[1]+500, Ed3d.playerPos[2]+500]
    if(Ed3d.cameraPos != null) {
      cam = [Ed3d.cameraPos[0], Ed3d.cameraPos[1], -Ed3d.cameraPos[2]];
    }

    var moveCoords = {
      x:  cam[0], y:  cam[1], z: cam[2],
      mx: Ed3d.playerPos[0], my: Ed3d.playerPos[1] ,   mz: -Ed3d.playerPos[2]
    };

    controls.enabled = false;

    //-- Remove previous anim
    if(Ed3d.tween != null) {
      TWEEN.removeAll();
    }

    //-- Launch anim
    Ed3d.tween = new TWEEN.Tween(moveFrom, {override:true}).to(moveCoords, timer)
      .start()
      .onUpdate(function () {
        camera.position.set(moveFrom.x, moveFrom.y, moveFrom.z);
        controls.target.set(moveFrom.mx, moveFrom.my, moveFrom.mz);
      })
      .onComplete(function () {
        controls.enabled = true;
        controls.update();
      });

  },

  /**
   * Move camera to a system
   *
   * @param {int} index - The system index
   * @param {object} obj - System datas
   */

  'moveToObj' : function (index, obj) {

    if (this.oldSel !== null && this.oldSel == index)  return false;

    controls.enabled = false;

    HUD.setInfoPanel(index, obj);
    HUD.openHudDetails();

    this.oldSel = index;
    var goX = obj.x;
    var goY = obj.y;
    var goZ = obj.z;

    //-- If in far view reset to classic view
    disableFarView(25, false);

    //-- Move grid to object
    this.moveGridTo(goX, goY, goZ);

    //-- Move camera to target (Smooth move using Tween)

    var moveFrom = {
      x: camera.position.x, y: camera.position.y , z: camera.position.z,
      mx: controls.target.x, my: controls.target.y , mz: controls.target.z
    };
    var moveCoords = {
      x: goX, y: goY + 15, z: goZ + 15,
      mx: goX, my: goY , mz: goZ
    };

    Ed3d.tween = new TWEEN.Tween(moveFrom, {override:true}).to(moveCoords, 800)
      .start()
      .onUpdate(function () {
        camera.position.set(moveFrom.x, moveFrom.y, moveFrom.z);
        controls.target.set(moveFrom.mx, moveFrom.my, moveFrom.mz);
      })
      .onComplete(function () {
        controls.update();
      });

    //-- 3D Cursor on selected object

    obj.material = Ed3d.material.selected;

    this.addCusorOnSelect(goX, goY, goZ);

    //-- Add text
    var textAdd = obj.name;
    var textAddC = Math.round(goX) + ', ' + Math.round(goY) + ', ' + Math.round(-goZ);

    HUD.addText('system',  textAdd, 8, 20, 0, 6, this.cursorSel);
    HUD.addText('coords',  textAddC, 8, 15, 0, 3, this.cursorSel);

    controls.enabled = true;

    return true;

  },

  /**
   * Create a cusros on selected system
   *
   * @param {number} x
   * @param {number} y
   * @param {number} z
   */

  'addCusorOnSelect' : function (x, y, z) {

    if(this.cursorSel == null) {
      this.cursorSel = new THREE.Object3D();

      //-- Ring around the system
      var geometryL = new THREE.TorusGeometry( 12, 0.4, 3, 30 );

      var selection = new THREE.Mesh(geometryL, Ed3d.material.selected);
      //selection.position.set(x, y, z);
      selection.rotation.x = Math.PI / 2;

      this.cursorSel.add(selection);

      //-- Create a cone on the selection
      var geometryCone = new THREE.CylinderGeometry(0, 5, 16, 4, 1, false);
      var cone = new THREE.Mesh(geometryCone, Ed3d.material.selected);
      cone.position.set(0, 20, 0);
      cone.rotation.x = Math.PI;
      this.cursorSel.add(cone);

      //-- Inner cone
      var geometryConeInner = new THREE.CylinderGeometry(0, 3.6, 16, 4, 1, false);
      var coneInner = new THREE.Mesh(geometryConeInner, Ed3d.material.black);
      coneInner.position.set(0, 20.2, 0);
      coneInner.rotation.x = Math.PI;
      this.cursorSel.add(coneInner);

      scene.add(this.cursorSel);
    }

    this.cursorSel.visible = true;
    this.cursorSel.position.set(x, y, z);
    this.cursorSel.scale.set(1, 1, 1);

  },

  /**
   * Move grid to selection
   *
   * @param {number} goX
   * @param {number} goY
   * @param {number} goZ
   */

  'moveGridTo' : function (goX, goY, goZ) {
    var posX = Math.floor(goX/1000)*1000;
    var posY = Math.floor(goY);
    var posZ = Math.floor(goZ/1000)*1000;

    if(!Ed3d.grid1H.fixed)  Ed3d.grid1H.obj.position.set(posX, posY, posZ);
    if(!Ed3d.grid1K.fixed)  Ed3d.grid1K.obj.position.set(posX, posY, posZ);
    if(!Ed3d.grid1XL.fixed) Ed3d.grid1XL.obj.position.set(posX, posY, posZ);

  }

}


text:
var fs       = require('fs');
var path     = require('path');
var util     = require('util');
var stream   = require('stream');
var repl     = require('repl');
var argv     = require('optimist').usage('Usage: gohard <file>').argv;
var parser   = require('../lib/parser');

if (argv._[0]) {
    var lines;
    var file = fs.readFile(path.resolve(process.cwd(), argv._[0]), {encoding: 'utf-8'}, function (err, script) {
        if (argv.hitp) {
            lines = script.split(/ {4,}|\r?\n/);
        }
        else {
            lines = script.split(/\r?\n/);
        }

        var output = '';

        for (var i = 0; i < lines.length; i++) {
            output += parser(lines[i]);
        }

        process.stdout.write(output);
    });
} else {
    // streamy inheritance stuff
    // boilerplate from the docs
    var Stream = function() {
        stream.Transform.call(this);
    };
    util.inherits(Stream, stream.Transform);

    // see streams documentation
    Stream.prototype._transform = function (chunk, encoding, callback) {
        var script = parser(chunk.toString());
        var lines  = script.split(/\n+/);
        for (var i = 0; i < lines.length; i++) {
            // ignore empty lines
            if (lines[i] !== '') this.push(lines[i] + '\n');
        }
        callback();
    };

    var ds = new Stream();
    // pipe stdin through the dogescript translator to the repl
    repl.start({
        prompt : "GOHARD> ",
        input  : ds,
        output : process.stdout
    });

    // begin streaming stdin to the dg translator and repl
    process.stdin.pipe(ds);
}


text:
using System.Collections.Generic;
using System.Linq;
using ApiTest.Data;
using ApiTest.Data.Contexts;
using ApiTest.Data.Entities;
using GenericNet.Repository.EfCore;

namespace ApiTest.Repositories.EfCore
{
    public class ProductRepository : Repository<AdventureWorksEfCoreContext, Product>, IProductRepository
    {
        public ProductRepository(AdventureWorksEfCoreContext context) : base(context)
        {
        }

        public IEnumerable<dynamic> GetProductsProjection()
        {
            return Queryable().Select(p => new {p.Name, p.Color});
        }
    }
}


text:
Windowed reading and writing
****************************

Beginning in rasterio 0.3, you can read and write "windows" of raster files.
This feature allows you to work on rasters that are larger than your
computers RAM or process chunks of large rasters in parallel.

Windows
-------

A window is a view onto a rectangular subset of a raster dataset and is
described in rasterio by a pair of range tuples.

.. code-block:: python

    ((row_start, row_stop), (col_start, col_stop))

The first pair contains the indexes of the raster rows at which the window
starts and stops. The second contains the indexes of the raster columns at
which the window starts and stops. For example,

.. code-block:: python

    ((0, 4), (0, 4))

Specifies a 4 x 4 window at the upper left corner of a raster dataset and

.. code-block:: python

    ((10, 20), (10, 20))

specifies a 10 x 10 window with origin at row 10 and column 10. Use of `None`
for a range value indicates either 0 (in the start position) or the full raster
height or width (in the stop position). The window tuple

.. code-block:: python

    ((None, 4), (None, 4))

also specifies a 4 x 4 window at the upper left corner of the raster and

.. code-block:: python

    ((4, None), (4, None))

specifies a rectangular subset with upper left at row 4, column 4 and
extending to the lower right corner of the raster dataset.

Using window tuples should feel like using Python's range() and slice()
functions. Range() selects a range of numbers from the sequence of all integers
and slice() produces a object that can be used in slicing expressions.

.. code-block:: pycon

    >>> range(10, 20)
    [10, 11, 12, 13, 14, 15, 16, 17, 18, 19]
    >>> range(10, 20)[slice(4, None)]
    [14, 15, 16, 17, 18, 19]

Reading
-------

Here is an example of reading a 100 row x 100 column subset of the rasterio
test file.

.. code-block:: pycon

    >>> import rasterio
    >>> with rasterio.open('tests/data/RGB.byte.tif') as src:
    ...     w = src.read(1, window=((0, 100), (0, 100)))
    ...
    >>> print(w.shape)
    (100, 100)

Writing
-------

Writing works similarly. The following creates a blank 500 column x 300 row
GeoTIFF and plops 37500 pixels with value 127 into a window 30 pixels down from
and 50 pixels to the right of the upper left corner of the GeoTIFF.

.. code-block:: python

    image = numpy.ones((150, 250), dtype=rasterio.ubyte) * 127

    with rasterio.open(
            '/tmp/example.tif', 'w',
            driver='GTiff', width=500, height=300, count=1,
            dtype=image.dtype) as dst:
        dst.write(image, window=((30, 180), (50, 300)), indexes=1)

The result:

.. image:: http://farm6.staticflickr.com/5503/11378078386_cbe2fde02e_o_d.png
   :width: 500
   :height: 300

Decimation
----------

If the write window is smaller than the data, the data will be decimated.
Below, the window is scaled to one third of the source image.

.. code-block:: python

    with rasterio.open('tests/data/RGB.byte.tif') as src:
        b, g, r = (src.read(k) for k in (1, 2, 3))

    write_window = (30, 269), (50, 313)

    with rasterio.open(
            '/tmp/example.tif', 'w',
            driver='GTiff', width=500, height=300, count=3,
            dtype=r.dtype) as dst:
        for k, arr in [(1, b), (2, g), (3, r)]:
            dst.write(arr, indexes=k, window=write_window)

And the result:

.. image:: http://farm4.staticflickr.com/3804/11378361126_c034743079_o_d.png
   :width: 500
   :height: 300

Advanced windows
----------------

Since windows are like slices, you can also use negative numbers in rasterio
windows.

.. code-block:: python

    ((-4, None), (-4, None))

specifies a 4 x 4 rectangular subset with upper left at 4 rows to the left of
and 4 columns above the lower right corner of the dataset and extending to the
lower right corner of the dataset.

Below is an example of reading a raster subset and then writing it into a
larger subset that is defined relative to the lower right corner of the
destination dataset.

.. code-block:: python

    read_window = (350, 410), (350, 450)

    with rasterio.open('tests/data/RGB.byte.tif') as src:
        b, g, r = (src.read(k, window=read_window) for k in (1, 2, 3))

    write_window = (-240, None), (-400, None)

    with rasterio.open(
            '/tmp/example2.tif', 'w',
            driver='GTiff', width=500, height=300, count=3,
            dtype=r.dtype) as dst:
        for k, arr in [(1, b), (2, g), (3, r)]:
            dst.write(arr, window=write_window, indexes=k)

This example also demonstrates decimation.

.. image:: http://farm3.staticflickr.com/2827/11378772013_c8ab540f21_o_d.png
   :width: 500
   :height: 300

Data windows
------------

Sometimes it is desirable to crop off an outer boundary of NODATA values around
a dataset:

.. code-block:: python

    from rasterio.windows import get_data_window

    with rasterio.open('tests/data/RGB.byte.tif') as src:
        window = get_data_window(src.read(1, masked=True))
        # window = ((3, 714), (13, 770))

        kwargs = src.meta.copy()
        del kwargs['transform']
        kwargs.update({
            'height': window[0][1] - window[0][0],
            'width': window[1][1] - window[1][0],
            'affine': src.window_transform(window)
        })

        with rasterio.open('/tmp/cropped.tif', 'w', **kwargs) as dst:
            dst.write(src.read(window=window))

Window utilities
----------------

Basic union and intersection operations are available for windows, to streamline
operations across dynamically created windows for a series of bands or datasets
with the same full extent.

.. code-block:: python

    >>> from rasterio import windows
    >>> # Full window is ((0, 1000), (0, 500))
    >>> window1 = ((100, 500), (10, 500))
    >>> window2 = ((10, 150), (50, 250))
    >>> windows.union(window1, window2)
    ((10, 500), (10, 500))
    >>> windows.intersection(window1, window2)
    ((100, 150), (50, 250))

Blocks
------

Raster datasets are generally composed of multiple blocks of data and
windowed reads and writes are most efficient when the windows match the
dataset's own block structure. When a file is opened to read, the shape
of blocks for any band can be had from the block_shapes property.

.. code-block:: pycon

    >>> with rasterio.open('tests/data/RGB.byte.tif') as src:
    ...     for i, shape in enumerate(src.block_shapes, 1):
    ...         print(i, shape)
    ...
    (1, (3, 791))
    (2, (3, 791))
    (3, (3, 791))

The block windows themselves can be had from the block_windows function.

.. code-block:: pycon

    >>> with rasterio.open('tests/data/RGB.byte.tif') as src:
    ...     for ji, window in src.block_windows(1):
    ...         print(ji, window)
    ...
    ((0, 0), ((0, 3), (0, 791)))
    ((1, 0), ((3, 6), (0, 791)))
    ...

This function returns an iterator that yields a pair of values. The second is
a window tuple that can be used in calls to `read` or `write`. The first
is the pair of row and column indexes of this block within all blocks of the
dataset.

You may read windows of data from a file block-by-block like this.

.. code-block:: pycon

    >>> with rasterio.open('tests/data/RGB.byte.tif') as src:
    ...     for ji, window in src.block_windows(1):
    ...         r = src.read(1, window=window)
    ...         print(r.shape)
    ...         break
    ...
    (3, 791)

Well-bred files have identically blocked bands, but GDAL allows otherwise and
it's a good idea to test this assumption in your code.

.. code-block:: pycon

    >>> with rasterio.open('tests/data/RGB.byte.tif') as src:
    ...     assert len(set(src.block_shapes)) == 1
    ...     for ji, window in src.block_windows(1):
    ...         b, g, r = (src.read(k, window=window) for k in (1, 2, 3))
    ...         print(ji, r.shape, g.shape, b.shape)
    ...         break
    ...
    ((0, 0), (3, 791), (3, 791), (3, 791))

The block_shapes property is a band-ordered list of block shapes and
`set(src.block_shapes)` gives you the set of unique shapes. Asserting that
there is only one item in the set is effectively the same as asserting that all
bands have the same block structure. If they do, you can use the same windows
for each.