text:
using System.Collections.Generic;
using System.Collections.ObjectModel;

namespace VkNet.Model
{
	using System;
    using System.Diagnostics;

    using Enums.SafetyEnums;
    using Categories;
	using Enums;
	using Utils;

    /// <summary>
    /// Информация о сообществе (группе).
    /// См. описание <see href="http://vk.com/dev/fields_groups"/>.
    /// </summary>
    [DebuggerDisplay("[{Id}] {Name}")]
    [Serializable]
    public class Group : IVkModel
	{
		#region Стандартные поля

		/// <summary>
		/// Идентификатор сообщества.
		/// </summary>
		public long Id { get; set; }

		/// <summary>
		/// Название сообщества.
		/// </summary>
		public string Name { get; set; }

		/// <summary>
		/// Короткий адрес страницы сообщества, например, apiclub. Если он не назначен, то 'club'+gid, например, club35828305.
		/// </summary>
		public string ScreenName { get; set; }

		/// <summary>
		/// Публичность группы.
		/// </summary>
		public GroupPublicity? IsClosed { get; set; }

		/// <summary>
		/// Признак яляется ли текущий пользователь руководителем сообщества.
		/// </summary>
		public bool IsAdmin { get; set; }

		/// <summary>
		/// Уровень административных полномочий текущего пользователя в сообществе (действительно, если IsAdmin = true).
		/// </summary>
		public AdminLevel? AdminLevel { get; set; }

		/// <summary>
		/// Признак является ли текущий пользователь участником сообщества.
		/// </summary>
		public bool? IsMember { get; set; }

		/// <summary>
		/// Тип сообщества.
		/// </summary>
		public GroupType Type { get; set; }

		/// <summary>
		/// Информация о ссылках на предпросмотр фотографий сообщества.
		/// </summary>
		public Previews PhotoPreviews { get; set; }

		/// <summary>
		/// Возвращается в случае, если сообщество удалено или заблокировано
		/// </summary>
		public Deactivated Deactivated { get; set; }

		/// <summary>
		/// Содержит фото.
		/// </summary>
		public bool HasPhoto { get; set; }

		/// <summary>
		/// url фотографии сообщества с размером 50x50px
		/// </summary>
		public Uri Photo50 { get; set; }

		/// <summary>
		/// url фотографии сообщества с размером 100x100px
		/// </summary>
		public Uri Photo100 { get; set; }

		/// <summary>
		/// url фотографии сообщества с размером 200x200px
		/// </summary>
		public Uri Photo200 { get; set; }
		#endregion

		#region Опциональные поля

		/// <summary>
		/// Город.
		/// </summary>
		public City City { get; set; }

		/// <summary>
		/// Идентификатор страны, указанной в информации о сообществе. Возвращается идентификатор страны, который можно использовать для
		/// получения ее названия с помощью метода <see cref="DatabaseCategory.GetCountriesById"/>. Если страна не указана, возвращается 0.
		/// </summary>
		public Country Country { get; set; }

		/// <summary>
		/// Место, указанное в информации о сообществе.
		/// </summary>
		public Place Place { get; set; }

		/// <summary>
		/// Текст описания сообщества.
		/// </summary>
		public string Description { get; set; }

		/// <summary>
		/// Название главной вики-страницы сообщества.
		/// </summary>
		public string WikiPage { get; set; }

		/// <summary>
		/// Количество участников сообщества.
		/// </summary>
		public int? MembersCount { get; set; }

		/// <summary>
		/// Счетчики сообщества.
		/// </summary>
		public Counters Counters {  get; set; }

		/// <summary>
		/// Время начала встречи (возвращаются только для встреч).
		/// </summary>
		public DateTime? StartDate { get; set; }

		/// <summary>
		/// Время окончания встречи (возвращаются только для встреч).
		/// </summary>
		public DateTime? EndDate { get; set; }

		/// <summary>
		/// Информация о том, может ли текущий пользователь оставлять записи на стене сообщества (<c>true</c> - может, <c>false</c> - не может).
		/// </summary>
		public bool CanPost { get; set; }

		/// <summary>
		/// Информация о том, разрешено видеть чужие записи на стене группы (<c>true</c> - разрешено, <c>false</c> - не разрешено).
		/// </summary>
		public bool CanSeelAllPosts { get; set; }

		/// <summary>
		/// Информация о том, может ли текущий пользователь загружать документы в группу (<c>true</c>, если пользователь может
		/// загружать документы, <c>false</c> – если не может).
		/// </summary>
		public bool CanUploadDocuments  { get; set; }
		/// <summary>
		/// Информация о том, может ли текущий пользователь создать тему обсуждения в группе.
		/// (<c>true</c>, если пользователь может создать обсуждение, <c>false</c> – если не может).
		/// </summary>
		public bool CanCreateTopic { get; set; }

		/// <summary>
		/// Строка состояния публичной страницы. У групп возвращается строковое значение, открыта ли группа или нет,
		/// а у событий дата начала.
		/// </summary>
		public string Activity { get; set; }

		/// <summary>
		/// Статус сообщества. Возвращается строка, содержащая текст статуса, расположенного на странице сообщества под его названием.
		/// </summary>
		public string Status { get; set; }

		/// <summary>
		/// Информация из блока контактов публичной страницы.
		/// </summary>
		public Collection<Contact> Contacts { get; set; }

		/// <summary>
		/// Информация из блока ссылок сообщества.
		/// </summary>
		public Collection<ExternalLink> Links { get; set; }
		/// <summary>
		/// Идентификатор закрепленного поста сообщества. Сам пост можно получить, используя <see cref="WallCategory.GetById(IEnumerable{KeyValuePair{long, long}})"/>,
		/// передав идентификатор в виде – {group_id}_{post_id}.
		/// </summary>
		public long? FixedPostId { get; set; }

		/// <summary>
		/// Возвращает информацию о том, является ли сообщество верифицированным.
		/// </summary>
		public bool IsVerified { get; set; }

		/// <summary>
		/// Адрес сайта из поля «веб-сайт» в описании сообщества.
		/// </summary>
		public string Site { get; set; }

		/// <summary>
		/// Идентификатор пользователя пригласившего в группу
		/// </summary>
		public long? InvitedBy { get; set; }

		/// <summary>
		/// Возвращается 1, если сообщество находится в закладках у текущего пользователя.
		/// </summary>
		public bool IsFavorite { get; set; }

		/// <summary>
		/// Информация о забанненом (добавленном в черный список) пользователе сообщества.
		/// </summary>
		public BanInfo BanInfo { get; set; }

		/// <summary>
		/// Информация о том, может ли текущий пользователь загружать видеозаписи в группу.
		/// </summary>
		public bool CanUploadVideo { get; set; }

		/// <summary>
		/// Идентификатор основного альбома сообщества.
		/// </summary>
		public uint? MainAlbumId { get; set; }

		/// <summary>
		/// Возвращается 1, если сообщество скрыто в новостях у текущего пользователя.
		/// </summary>
		public bool IsHiddenFromFeed { get; set; }

		/// <summary>
		/// Информация о главной секции в сообществе
		/// </summary>
		public MainSection? MainSection { get; set; }
		#endregion

		#region Методы

		/// <summary>
		/// Разобрать из json.
		/// </summary>
		/// <param name="response">Ответ сервера.</param>
		/// <returns></returns>
		internal static Group FromJson(VkResponse response)
		{
			var group = new Group
			{
				Id = response["group_id"] ?? response["gid"] ?? response["id"],
				Name = response["name"],
				ScreenName = response["screen_name"],
				IsClosed = response["is_closed"],
				IsAdmin = response["is_admin"],
				AdminLevel = response["admin_level"],
				IsMember = response["is_member"],
				Type = response["type"],
				PhotoPreviews = response,
				Deactivated = response["deactivated"],
				HasPhoto = response["has_photo"],
				Photo50 = response["photo_50"],
				Photo100 = response["photo_100"],
				Photo200 = response["photo_200"],

				// опциональные поля
				City = response["city"],
				Country = response["country"],
				Place = response["place"],
				Description = response["description"],
				WikiPage = response["wiki_page"],
				MembersCount = response["members_count"],
				Counters = response["counters"],
				StartDate = response["start_date"],
				EndDate = response["finish_date"] ?? response["end_date"],
				CanPost = response["can_post"],
				CanSeelAllPosts = response["can_see_all_posts"],
				CanUploadDocuments = response["can_upload_doc"],
				CanCreateTopic = response["can_create_topic"],
				Activity = response["activity"],
				Status = response["status"],
				Contacts = response["contacts"],
				Links = response["links"],
				FixedPostId = response["fixed_post"],
				IsVerified = response["verified"],
				Site = response["site"],
				InvitedBy = response["invited_by"],
				IsFavorite = response["is_favorite"],
				BanInfo = response["ban_info"],
				CanUploadVideo = response["can_upload_video"],
				MainAlbumId = response["main_album_id"],
				IsHiddenFromFeed = response["is_hidden_from_feed"],
				MainSection = response["main_section"]
			};

			return group;
		}

		#endregion

	    /// <summary>
	    /// Преобразовать из JSON
	    /// </summary>
	    /// <param name="response">Ответ от сервера.</param>
	    /// <returns></returns>
	    IVkModel IVkModel.FromJson(VkResponse response)
	    {
		    return FromJson(response);
	    }
	}
}


text:
export ALGORITHM_SVM_INSTALL_DIR = $(HOME)/opt/algorithm-svm

# Path to FreeLing install tree
export FREELING_INSTALL_DIR = $(HOME)/opt/freeling

# Path to FOMA install tree
# (a copy is helpfully included in FreeLing)
export FOMA_INSTALL_DIR = $(FREELING_INSTALL_DIR)

# Path to KenLM source/build trees (usually the same)
export KENLM_SRC_DIR = $(HOME)/src/kenlm
export KENLM_BUILD_DIR = $(KENLM_SRC_DIR)/build

# Path to LibXML2 install tree
# (usually available as a distro package under /usr)
export LIBXML2_INSTALL_DIR = /usr

# Path to Apertium lttoolbox install tree
# (may be available as a distro package under /usr)
export LTTOOLBOX_INSTALL_DIR = /usr

# Path to MaltParser JAR file
export MALTPARSER_JAR = $(HOME)/src/maltparser-1.9.0/maltparser-1.9.0.jar

# Path to Wapiti install tree
export WAPITI_INSTALL_DIR = $(HOME)/opt/wapiti

# TCP port numbers for the SQUOIA and MaltParser servers
# (note: if you change these, also edit MT_systems/translate_demo.cfg)
SQUOIA_PORT = 9001
MALTPARSER_PORT = 9002

# C++ compilation
CXX = g++
CXXFLAGS = -std=gnu++11 -Wall -O0 -g3

export LD_LIBRARY_PATH := $(LD_LIBRARY_PATH):$(FREELING_INSTALL_DIR)/lib

JAVA = java

all clean:
	cd FreeLingModules && $(MAKE) $@
	cd MT_systems && $(MAKE) $@
	cd MT_systems/maltparser_tools && $(MAKE) $@
	cd MT_systems/matxin-lex && $(MAKE) $@
	cd MT_systems/squoia/esqu && $(MAKE) $@

run-squoia:
	export FREELINGSHARE=$(FREELING_INSTALL_DIR)/share/freeling; \
	cd FreeLingModules && ./server_squoia -f es_demo.cfg --server --port=$(SQUOIA_PORT)

test-squoia:
	cd FreeLingModules && cat ../input-demo.txt | ./analyzer_client $(SQUOIA_PORT)

run-malt:
	$(JAVA) -cp $(MALTPARSER_JAR):MT_systems/maltparser_tools/bin MaltParserServer $(MALTPARSER_PORT) MT_systems/models/splitDatesModel.mco

run-translate: $(MALTPARSER_JAR)
	mkdir -p MT_systems/tmp
	export PATH=$(PWD)/FreeLingModules:$(PATH); \
	export PERL5LIB=$(ALGORITHM_SVM_INSTALL_DIR)/lib/perl5; \
	cd MT_systems && ./translate.pm \
		--config translate_demo.cfg \
		--file ../input-demo.txt

help-translate:
	export PERL5LIB=$(ALGORITHM_SVM_INSTALL_DIR)/lib/perl5; \
	cd MT_systems && ./translate.pm -h

.PHONY: all clean help-translate run-malt run-squoia run-translate test-squoia

# end squoia/Makefile

redpajama_set_name: RedPajamaGithub


text:
FROM ubuntu:14.04

# Install apt-getable dependencies
RUN apt-get update && apt-get install -y \
    build-essential \
    cmake \
    git wget \
    python-dev python-pip libboost-python-dev \
    python-numpy python-scipy python-yaml python-pyexiv2 \
    libopencv-dev python-opencv \
    libgoogle-glog-dev libatlas-base-dev libeigen3-dev libsuitesparse-dev && \
    apt-get clean && \
    rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*

# Install Ceres from source
RUN \
    mkdir -p /source && cd /source && \
    wget http://ceres-solver.org/ceres-solver-1.10.0.tar.gz && \
    tar xvzf ceres-solver-1.10.0.tar.gz && \
    cd /source/ceres-solver-1.10.0 && \
    mkdir -p build && cd build && \
    cmake .. -DCMAKE_C_FLAGS=-fPIC -DCMAKE_CXX_FLAGS=-fPIC -DBUILD_EXAMPLES=OFF -DBUILD_TESTING=OFF -DOPENMP=OFF && \
    make install && \
    cd / && \
    rm -rf /source/ceres-solver-1.10.0 && \
    rm -f /source/ceres-solver-1.10.0.tar.gz

# Install opengv from source
RUN \
    mkdir -p /source && cd /source && \
    git clone https://github.com/paulinus/opengv.git && \
    cd /source/opengv && \
    mkdir -p build && cd build && \
    cmake .. -DBUILD_TESTS=OFF -DBUILD_PYTHON=ON && \
    make install && \
    cd / && \
    rm -rf /source/opengv

# OpenSfM
RUN \
    mkdir -p /source && cd /source && \
    git clone https://github.com/mapillary/OpenSfM.git && \
    cd /source/OpenSfM && \
    pip install -r requirements.txt && \
    python setup.py build

# GENERIC
WORKDIR /


text:
package uk.co.blackpepper.bowman.test.server.repository;

import java.util.List;

import org.springframework.data.repository.CrudRepository;
import org.springframework.data.repository.query.Param;
import org.springframework.data.rest.core.annotation.RepositoryRestResource;

import uk.co.blackpepper.bowman.test.server.model.SimpleEntity;

@RepositoryRestResource(path = "simple-entities")
public interface SimpleEntityRepository extends CrudRepository<SimpleEntity, Integer> {

	SimpleEntity findByName(@Param("name") String name);

	List<SimpleEntity> findByNameContaining(@Param("query") String query);
}


text:
if (typeof mapbox === 'undefined') mapbox = {};

mapbox.MAPBOX_URL = 'http://a.tiles.mapbox.com/v3/';

// a `mapbox.map` is a modestmaps object with the
// easey handlers as defaults
mapbox.map = function(el, layer, dimensions, eventhandlers) {
    var m = new MM.Map(el, layer, dimensions,
            eventhandlers || [
            easey_handlers.TouchHandler(),
            easey_handlers.DragHandler(),
            easey_handlers.DoubleClickHandler(),
            easey_handlers.MouseWheelHandler()
        ]);

    // Set maxzoom to 17, highest zoom level supported by MapBox streets
    m.setZoomRange(0, 17);

    // Attach easey, ui, and interaction
    m.ease = easey().map(m);
    m.ui = mapbox.ui(m);
    m.interaction = mapbox.interaction().map(m);

    // Autoconfigure map with sensible defaults
    m.auto = function() {
        this.ui.zoomer.add();
        this.ui.zoombox.add();
        this.ui.legend.add();
        this.ui.attribution.add();
        this.ui.refresh();
        this.interaction.auto();

        for (var i = 0; i < this.layers.length; i++) {
            if (this.layers[i].tilejson) {
                var tj = this.layers[i].tilejson(),
                    center = tj.center || new MM.Location(0, 0),
                    zoom = tj.zoom || 0;
                this.setCenterZoom(center, zoom);
                break;
            }
        }
        return this;
    };

    m.refresh = function() {
        this.ui.refresh();
        this.interaction.refresh();
        return this;
    };

    var smooth_handlers = [
        easey_handlers.TouchHandler,
        easey_handlers.DragHandler,
        easey_handlers.DoubleClickHandler,
        easey_handlers.MouseWheelHandler
    ];

    var default_handlers = [
        MM.TouchHandler,
        MM.DragHandler,
        MM.DoubleClickHandler,
        MM.MouseWheelHandler
    ];

    MM.Map.prototype.smooth = function(_) {
        while (this.eventHandlers.length) {
            this.eventHandlers.pop().remove();
        }

        var handlers = _ ? smooth_handlers : default_handlers;
        for (var j = 0; j < handlers.length; j++) {
            var h = handlers[j]();
            this.eventHandlers.push(h);
            h.init(this);
        }
        return m;
    };

    m.setPanLimits = function(locations) {
        if (!(locations instanceof MM.Extent)) {
            locations = new MM.Extent(
                new MM.Location(
                    locations[0].lat,
                    locations[0].lon),
                new MM.Location(
                    locations[1].lat,
                    locations[1].lon));
        }
        locations = locations.toArray();
        this.coordLimits = [
            this.locationCoordinate(locations[0]).zoomTo(this.coordLimits[0].zoom),
            this.locationCoordinate(locations[1]).zoomTo(this.coordLimits[1].zoom)
        ];
        return m;
    };

    m.center = function(location, animate) {
        if (location && animate) {
            this.ease.location(location).zoom(this.zoom())
                .optimal(null, null, animate.callback);
        } else {
            return MM.Map.prototype.center.call(this, location);
        }
    };

    m.zoom = function(zoom, animate) {
        if (zoom !== undefined && animate) {
            this.ease.to(this.coordinate).zoom(zoom).run(600);
        } else {
            return MM.Map.prototype.zoom.call(this, zoom);
        }
    };

    m.centerzoom = function(location, zoom, animate) {
        if (location && zoom !== undefined && animate) {
            this.ease.location(location).zoom(zoom).optimal(null, null, animate.callback);
        } else if (location && zoom !== undefined) {
            return this.setCenterZoom(location, zoom);
        }
    };

    // Insert a tile layer below marker layers
    m.addTileLayer = function(layer) {
        for (var i = m.layers.length; i > 0; i--) {
            if (!m.layers[i - 1].features) {
                return this.insertLayerAt(i, layer);
            }
        }
        return this.insertLayerAt(0, layer);
    };

    // We need to redraw after removing due to compositing
    m.removeLayerAt = function(index) {
        MM.Map.prototype.removeLayerAt.call(this, index);
        MM.getFrame(this.getRedraw());
        return this;
    };

    // We need to redraw after removing due to compositing
    m.swapLayersAt = function(a, b) {
        MM.Map.prototype.swapLayersAt.call(this, a, b);
        MM.getFrame(this.getRedraw());
        return this;
    };

    return m;
};

this.mapbox = mapbox;


text:
// Generated, do not edit by hand.

/**
 ** \file ast/binding.hh
 ** \brief Declaration of ast::Binding.
 */

#ifndef AST_BINDING_HH
# define AST_BINDING_HH

# include <ast/lvalue.hh>

namespace ast
{

  /// Binding.
  class Binding : public LValue
  {
    /** \name Ctor & dtor.
     ** \{ */
  public:
    /// Construct a Binding node.
    Binding (const loc& location, const rLValue& what);
    /// Destroy a Binding node.
    virtual ~Binding ();
    /** \} */

    /// \name Visitors entry point.
    /// \{ */
  public:
    /// Accept a const visitor \a v.
    virtual void accept (ConstVisitor& v) const;
    /// Accept a non-const visitor \a v.
    virtual void accept (Visitor& v);
    /// Evaluate the node in AST interpreter \a r.
    virtual urbi::object::rObject
    eval (runner::Job& r) const;
    /// Return the node type
    virtual std::string node_type() const;
    /// \}

#if defined ENABLE_SERIALIZATION
    /// \name Serialization.
    /// \{ */
  public:
    template <typename T>
    Binding(libport::serialize::ISerializer<T>& ser);
    template <typename T>
    void
    serialize(libport::serialize::OSerializer<T>& ser) const;
    /// \}
#endif

    /** \name Accessors.
     ** \{ */
  public:
    /// Return what.
    const rLValue& what_get () const;
    /// Return what.
    rLValue& what_get ();
    /// Return whether this slot should be constant.
    const bool& constant_get () const;
    /// Set whether this slot should be constant.
    void constant_set (bool);
    /** \} */

  protected:
    /// what.
    rLValue what_;
    /// Whether this slot should be constant.
    bool constant_;
  };

} // namespace ast

# include <ast/binding.hxx>

#endif // !AST_BINDING_HH


text:
package org.kuali.rice.krad.uif.lifecycle.finalize;

import java.util.Map;

import org.kuali.rice.core.api.CoreApiServiceLocator;
import org.kuali.rice.krad.uif.UifConstants;
import org.kuali.rice.krad.uif.lifecycle.FinalizeComponentPhase;
import org.kuali.rice.krad.uif.lifecycle.ViewLifecycle;
import org.kuali.rice.krad.uif.lifecycle.ViewLifecycleTaskBase;
import org.kuali.rice.krad.uif.util.ScriptUtils;
import org.kuali.rice.krad.uif.view.View;
import org.kuali.rice.krad.uif.view.ViewModel;
import org.kuali.rice.krad.util.KRADConstants;

/**
 * Perform custom finalize behavior for the component defined by the helper.
 *
 * @author Kuali Rice Team (rice.collab@kuali.org)
 */
public class FinalizeViewTask extends ViewLifecycleTaskBase<View> {

    /**
     * Default constructor.
     */
    public FinalizeViewTask() {
        super(View.class);
    }

    /**
     * {@inheritDoc}
     */
    @Override
    public FinalizeComponentPhase getElementState() {
        return (FinalizeComponentPhase) super.getElementState();
    }

    /**
     * {@inheritDoc}
     */
    @Override
    protected void performLifecycleTask() {
        View view = (View) getElementState().getElement();
        assert view == ViewLifecycle.getView();
        Object model = ViewLifecycle.getModel();

        view.setPreLoadScript(ScriptUtils.appendScript(
                view.getPreLoadScript(), buildClientSideStateScript(model)));
    }

    /**
     * Builds script that will initialize configuration parameters and component state on the client
     *
     * <p>
     * Here client side state is initialized along with configuration variables that need exposed to
     * script
     * </p>
     *
     * @param model model containing the client side state map.
     * @return The client side state script associated with this model.
     */
    protected String buildClientSideStateScript(Object model) {
        Map<String, Object> clientSideState = ((ViewModel) model).getClientStateForSyncing();

        // script for initializing client side state on load
        String clientStateScript = "";
        if (!clientSideState.isEmpty()) {
            clientStateScript = ScriptUtils.buildFunctionCall(UifConstants.JsFunctions.INITIALIZE_VIEW_STATE,
                    clientSideState);
        }

        // add necessary configuration parameters
        String kradImageLocation = CoreApiServiceLocator.getKualiConfigurationService().getPropertyValueAsString(
                UifConstants.ConfigProperties.KRAD_IMAGES_URL);
        clientStateScript += ScriptUtils.buildFunctionCall(UifConstants.JsFunctions.SET_CONFIG_PARM,
                UifConstants.ClientSideVariables.KRAD_IMAGE_LOCATION, kradImageLocation);

        String kradURL = CoreApiServiceLocator.getKualiConfigurationService().getPropertyValueAsString(
                UifConstants.ConfigProperties.KRAD_URL);
        clientStateScript += ScriptUtils.buildFunctionCall(UifConstants.JsFunctions.SET_CONFIG_PARM,
                UifConstants.ClientSideVariables.KRAD_URL, kradURL);

        String applicationURL = CoreApiServiceLocator.getKualiConfigurationService().getPropertyValueAsString(
                KRADConstants.ConfigParameters.APPLICATION_URL);
        clientStateScript += ScriptUtils.buildFunctionCall(UifConstants.JsFunctions.SET_CONFIG_PARM,
                UifConstants.ClientSideVariables.APPLICATION_URL, applicationURL);

        String scriptCleanup = CoreApiServiceLocator.getKualiConfigurationService().getPropertyValueAsString(
                KRADConstants.ConfigParameters.KRAD_SCRIPT_CLEANUP);
        clientStateScript += ScriptUtils.buildFunctionCall(UifConstants.JsFunctions.SET_CONFIG_PARM,
                UifConstants.ClientSideVariables.KRAD_SCRIPT_CLEANUP, scriptCleanup);

        return clientStateScript;
    }

}


text:
import React, { Component } from 'react';

export default class extends Component {
  render() {
    const value = this.props.value || 'Please include Config';
    return (

          {value}

    );
  }
}


text:
/**
 * ¿À´ÃÀÇ ³¯Â¥, ½Ã°£µî¿¡ ´ëÇؼ Á¦°øÇÏ´Â  Class
 *
 * @author Kim, Sung-Hoon.
 */

package com.antsoft.ant.tools.javadoc;

import java.util.Vector;

import com.antsoft.ant.property.*;
import com.antsoft.ant.main.Main;
import com.antsoft.ant.manager.projectmanager.*;

public class DocInfo {
  // jdk

  private String javadocEXEpath;
  private boolean javaVersion1_1; // true -> 1.1, false -> 1.2

  // option
  IdeProperty property = null;
  Project project = null;
  JdkInfo info = null;

  public DocInfo () {}

  public DocInfo (Project prj) {
    this.project = prj;
    property = Main.property;
    info = project.getPathModel().getCurrentJdkInfo();

  }

  public String getJdkClassPath() {
    return project.getPathModel().getClassPath();
  }

  public String getDocumentRoot() {
    return project.getPathModel().getDocumentRoot();
  }

  public String getSourceRoot() {
    return project.getPathModel().getSourceRoot();
  }

  public String getJavadocEXEPath() {
    return info.getJavadocEXEPath();
  }

  public String getJdkVersion() {
    return info.getVersion();
  }

  public boolean getJavadocVersion() {
    return Main.property.getJavadocVersion();
  }
  public int getScope() {
    return Main.property.getScopeDoc();
  }
  public boolean getVerbose() {
    return Main.property.getVerboseDoc();
  }
  public boolean getAuthor() {
    return Main.property.getAuthorDoc();
  }
  public boolean getVersion() {
    return Main.property.getVersionDoc();
  }
  public boolean getNoindex() {
    return Main.property.getNoindexDoc();
  }
  public boolean getNotree() {
    return Main.property.getNotreeDoc();
  }
  public boolean getNodeprecate() {
    return Main.property.getNodeprecateDoc();
  }
  public boolean getNewclasspath() {
    return Main.property.getNewclasspathDoc();
  }
  public boolean getNewsourcepath() {
    return Main.property.getNewsourcepathDoc();
  }
  public String getClasspath() {
    return Main.property.getClasspathDoc();
  }
  public String getSourcepath() {
    return Main.property.getSourcepathDoc();
  }
  public String getEncoding() {
    return Main.property.getEncodingDoc();
  }
  public String getDocencoding() {
    return Main.property.getDocencodingDoc();
  }
  public String getJ() {
    return Main.property.getJDoc();
  }
  public boolean getUse() {
    return Main.property.getUseDoc();
  }
  public boolean getNohelp() {
    return Main.property.getNohelpDoc();
  }
  public boolean getNonavbar() {
    return Main.property.getNonavbarDoc();
  }
  public boolean getNodeprecatedlist() {
    return Main.property.getNodeprecatedlistDoc();
  }
  public boolean getSplitindex() {
    return Main.property.getSplitindexDoc();
  }
  public String getDoclet() {
    return Main.property.getDocletDoc();
  }
  public String getDocletpath() {
    return Main.property.getDocletpathDoc();
  }
  public String getBootclasspath() {
    return Main.property.getBootclasspathDoc();
  }
  public String getExtdirs() {
    return Main.property.getExtdirsDoc();
  }
  public String getLocale() {
    return Main.property.getLocaleDoc();
  }
  public String getLink() {
    return Main.property.getLinkDoc();
  }
  public String getLinkoffline() {
    return Main.property.getLinkofflineDoc();
  }
  public String getGroup() {
    return Main.property.getGroupDoc();
  }
  public String getHelpfile() {
    return Main.property.getHelpfileDoc();
  }
  public String getStylesheetfile() {
    return Main.property.getStylesheetfileDoc();
  }
  public String getWindowtitle() {
    return Main.property.getWindowtitleDoc();
  }
  public String getDoctitle() {
    return convertString(Main.property.getDoctitleDoc());
  }
  public String getHeader() {
    return convertString(Main.property.getHeaderDoc());
  }
  public String getFooter() {
    return convertString(Main.property.getFooterDoc());
  }
  public String getBottom() {
    return convertString(Main.property.getBottomDoc());
  }

  private String convertString(String str) {
    StringBuffer buf = new StringBuffer();
    for(int i=0; i<str.length(); i++) {
      if (str.charAt(i) == '*') {
        i++;
        if (str.charAt(i) == '*') {
          i++;
          if(str.charAt(i) == '*') {
            buf.append('\n');
          }
          else {
            buf.append("**" + str.charAt(i));
          }
        }
        else {
          buf.append('*');
          buf.append(str.charAt(i));
        }
      }
      else {
         buf.append(str.charAt(i));
      }
    }

    return buf.toString();
  }

}


text:
package de.nierbeck.cassandra.embedded.impl;

import java.util.Dictionary;
import java.util.Hashtable;

import org.osgi.framework.BundleActivator;
import org.osgi.framework.BundleContext;
import org.osgi.framework.ServiceRegistration;
import org.osgi.service.cm.ManagedService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import de.nierbeck.cassandra.embedded.CassandraService;

public class Activator implements BundleActivator{

	static Logger log = LoggerFactory.getLogger(Activator.class);

	private OsgiEmbeddedCassandra cassandra;

	private ServiceRegistration<?> cassandraService;

	@SuppressWarnings("unchecked")
	@Override
	public void start(BundleContext context) throws Exception {
		cassandra = new OsgiEmbeddedCassandra();

		@SuppressWarnings("rawtypes")
		Dictionary props = new Hashtable();
		props.put("service.pid", "de.nierbeck.cassandra.embedded");
		cassandraService = context.registerService(new String[] {
						ManagedService.class.getName(),
						CassandraService.class.getName() },
				cassandra, props);

	}

	@Override
	public void stop(BundleContext context) throws Exception {
		if (cassandraService != null) {
			cassandraService.unregister();
			cassandraService = null;
			if (cassandra.isRunning())
				cassandra.stop();
		}
	}
}


text:
package treebidimap

import (
	"fmt"
	"github.com/emirpasic/gods/maps"
	"github.com/emirpasic/gods/trees/redblacktree"
	"github.com/emirpasic/gods/utils"
	"strings"
)

func assertMapImplementation() {
	var _ maps.BidiMap = (*Map)(nil)
}

// Map holds the elements in two red-black trees.
type Map struct {
	forwardMap      redblacktree.Tree
	inverseMap      redblacktree.Tree
	keyComparator   utils.Comparator
	valueComparator utils.Comparator
}

type data struct {
	key   interface{}
	value interface{}
}

// NewWith instantiates a bidirectional map.
func NewWith(keyComparator utils.Comparator, valueComparator utils.Comparator) *Map {
	return &Map{
		forwardMap:      *redblacktree.NewWith(keyComparator),
		inverseMap:      *redblacktree.NewWith(valueComparator),
		keyComparator:   keyComparator,
		valueComparator: valueComparator,
	}
}

// NewWithIntComparators instantiates a bidirectional map with the IntComparator for key and value, i.e. keys and values are of type int.
func NewWithIntComparators() *Map {
	return NewWith(utils.IntComparator, utils.IntComparator)
}

// NewWithStringComparators instantiates a bidirectional map with the StringComparator for key and value, i.e. keys and values are of type string.
func NewWithStringComparators() *Map {
	return NewWith(utils.StringComparator, utils.StringComparator)
}

// Put inserts element into the map.
func (m *Map) Put(key interface{}, value interface{}) {
	if d, ok := m.forwardMap.Get(key); ok {
		m.inverseMap.Remove(d.(*data).value)
	}
	if d, ok := m.inverseMap.Get(value); ok {
		m.forwardMap.Remove(d.(*data).key)
	}
	d := &data{key: key, value: value}
	m.forwardMap.Put(key, d)
	m.inverseMap.Put(value, d)
}

// Get searches the element in the map by key and returns its value or nil if key is not found in map.
// Second return parameter is true if key was found, otherwise false.
func (m *Map) Get(key interface{}) (value interface{}, found bool) {
	if d, ok := m.forwardMap.Get(key); ok {
		return d.(*data).value, true
	}
	return nil, false
}

// GetKey searches the element in the map by value and returns its key or nil if value is not found in map.
// Second return parameter is true if value was found, otherwise false.
func (m *Map) GetKey(value interface{}) (key interface{}, found bool) {
	if d, ok := m.inverseMap.Get(value); ok {
		return d.(*data).key, true
	}
	return nil, false
}

// Remove removes the element from the map by key.
func (m *Map) Remove(key interface{}) {
	if d, found := m.forwardMap.Get(key); found {
		m.forwardMap.Remove(key)
		m.inverseMap.Remove(d.(*data).value)
	}
}

// Empty returns true if map does not contain any elements
func (m *Map) Empty() bool {
	return m.Size() == 0
}

// Size returns number of elements in the map.
func (m *Map) Size() int {
	return m.forwardMap.Size()
}

// Keys returns all keys (ordered).
func (m *Map) Keys() []interface{} {
	return m.forwardMap.Keys()
}

// Values returns all values (ordered).
func (m *Map) Values() []interface{} {
	return m.inverseMap.Keys()
}

// Clear removes all elements from the map.
func (m *Map) Clear() {
	m.forwardMap.Clear()
	m.inverseMap.Clear()
}

// String returns a string representation of container
func (m *Map) String() string {
	str := "TreeBidiMap\nmap["
	it := m.Iterator()
	for it.Next() {
		str += fmt.Sprintf("%v:%v ", it.Key(), it.Value())
	}
	return strings.TrimRight(str, " ") + "]"
}


text:
(function () {
    'use strict';

    angular.module('app.home')
        .run(homeRoute);

    homeRoute.$inject = ['routerHelper'];

    function homeRoute(routerHelper) {
        routerHelper.configureStates(getStates());
    }

    function getStates() {
        return [
            {
                state: 'home',
                config: {
                    url: '/home',
                    parent: 'private',
                    title: 'Home',
                    views: {
                        'main-content': {
                            templateUrl: 'demoApp/home/home.template.html',
                            controller: 'HomeController',
                            controllerAs: 'vm'
                        }
                    }
                }
            }
        ];
    };

})();


text:
> Strip the final [newline character](https://en.wikipedia.org/wiki/Newline) from a string/buffer

Can be useful when parsing the output of, for example, `ChildProcess#execFile`, as [binaries usually output a newline at the end](https://stackoverflow.com/questions/729692/why-should-text-files-end-with-a-newline). Normally, you would use `stdout.trim()`, but that would also remove newlines at the start and whitespace.

## Install

```
$ npm install strip-final-newline
```

## Usage

```js
const stripFinalNewline = require('strip-final-newline');

stripFinalNewline('foo\nbar\n\n');
//=> 'foo\nbar\n'

stripFinalNewline(Buffer.from('foo\nbar\n\n')).toString();
//=> 'foo\nbar\n'
```

## License

MIT © [Sindre Sorhus](https://sindresorhus.com)


text:
/*
 Copyright (c) 2013, 2014 Intel Corporation

 Redistribution and use in source and binary forms, with or without modification,
 are permitted provided that the following conditions are met:

     * Redistributions of source code must retain the above copyright notice,
       this list of conditions and the following disclaimer.
     * Redistributions in binary form must reproduce the above copyright notice,
       this list of conditions and the following disclaimer in the documentation
       and/or other materials provided with the distribution.
     * Neither the name of Intel Corporation nor the names of its contributors
       may be used to endorse or promote products derived from this software
       without specific prior written permission.

 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
 ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
 WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
 IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
 INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
 BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
 DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
 LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
 OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
 THE POSSIBILITY OF SUCH DAMAGE.

 David Navarro <david.navarro@intel.com>

*/

/*
Contains code snippets which are:

 * Copyright (c) 2013, Institute for Pervasive Computing, ETH Zurich
 * All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions
 * are met:
 * 1. Redistributions of source code must retain the above copyright
 *    notice, this list of conditions and the following disclaimer.
 * 2. Redistributions in binary form must reproduce the above copyright
 *    notice, this list of conditions and the following disclaimer in the
 *    documentation and/or other materials provided with the distribution.
 * 3. Neither the name of the Institute nor the names of its contributors
 *    may be used to endorse or promote products derived from this software
 *    without specific prior written permission.
 *
 * THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND
 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
 * ARE DISCLAIMED.  IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE
 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 * SUCH DAMAGE.

*/

#include "internals.h"

/*
 * Modulo mask (+1 and +0.5 for rounding) for a random number to get the tick number for the random
 * retransmission time between COAP_RESPONSE_TIMEOUT and COAP_RESPONSE_TIMEOUT*COAP_RESPONSE_RANDOM_FACTOR.
 */
#define COAP_RESPONSE_TIMEOUT_TICKS         (CLOCK_SECOND * COAP_RESPONSE_TIMEOUT)
#define COAP_RESPONSE_TIMEOUT_BACKOFF_MASK  ((CLOCK_SECOND * COAP_RESPONSE_TIMEOUT * (COAP_RESPONSE_RANDOM_FACTOR - 1)) + 1.5)

static int prv_check_addr(void * leftSessionH,
                          void * rightSessionH)
{
    if ((leftSessionH == NULL)
     || (rightSessionH == NULL)
     || (leftSessionH != rightSessionH))
    {
        return 0;
    }

    return 1;
}

lwm2m_transaction_t * transaction_new(coap_method_t method,
                                      lwm2m_uri_t * uriP,
                                      uint16_t mID,
                                      lwm2m_endpoint_type_t peerType,
                                      void * peerP)
{
    lwm2m_transaction_t * transacP;
    int result;

    transacP = (lwm2m_transaction_t *)lwm2m_malloc(sizeof(lwm2m_transaction_t));

    if (transacP == NULL) return NULL;
    memset(transacP, 0, sizeof(lwm2m_transaction_t));

    transacP->message = lwm2m_malloc(sizeof(coap_packet_t));
    if (transacP->message == NULL) goto error;

    coap_init_message(transacP->message, COAP_TYPE_CON, method, mID);

    transacP->mID = mID;
    transacP->peerType = peerType;
    transacP->peerP = peerP;

    if (uriP != NULL)
    {
        result = snprintf(transacP->objStringID, LWM2M_STRING_ID_MAX_LEN, "%hu", uriP->objectId);
        if (result < 0 || result > LWM2M_STRING_ID_MAX_LEN) goto error;

        coap_set_header_uri_path_segment(transacP->message, transacP->objStringID);

        if (LWM2M_URI_IS_SET_INSTANCE(uriP))
        {
            result = snprintf(transacP->instanceStringID, LWM2M_STRING_ID_MAX_LEN, "%hu", uriP->instanceId);
            if (result < 0 || result > LWM2M_STRING_ID_MAX_LEN) goto error;
            coap_set_header_uri_path_segment(transacP->message, transacP->instanceStringID);
        }
        else
        {
            if (LWM2M_URI_IS_SET_RESOURCE(uriP))
            {
                coap_set_header_uri_path_segment(transacP->message, NULL);
            }
        }
        if (LWM2M_URI_IS_SET_RESOURCE(uriP))
        {
            result = snprintf(transacP->resourceStringID, LWM2M_STRING_ID_MAX_LEN, "%hu", uriP->resourceId);
            if (result < 0 || result > LWM2M_STRING_ID_MAX_LEN) goto error;
            coap_set_header_uri_path_segment(transacP->message, transacP->resourceStringID);
        }
    }

    return transacP;

error:
    lwm2m_free(transacP);
    return NULL;
}

void transaction_free(lwm2m_transaction_t * transacP)
{
    if (transacP->message) lwm2m_free(transacP->message);
    if (transacP->buffer) lwm2m_free(transacP->buffer);
    lwm2m_free(transacP);
}

void transaction_remove(lwm2m_context_t * contextP,
                        lwm2m_transaction_t * transacP)
{
    if (NULL != contextP->transactionList)
    {
        if (transacP == contextP->transactionList)
        {
            contextP->transactionList = contextP->transactionList->next;
        }
        else
        {
            lwm2m_transaction_t *previous = contextP->transactionList;
            while (previous->next && previous->next != transacP)
            {
                previous = previous->next;
            }
            if (NULL != previous->next)
            {
                previous->next = previous->next->next;
            }
        }
    }
    transaction_free(transacP);
}

void transaction_handle_response(lwm2m_context_t * contextP,
                                 void * fromSessionH,
                                 coap_packet_t * message)
{
    lwm2m_transaction_t * transacP;

    transacP = contextP->transactionList;

    while (transacP != NULL)
    {
        void * targetSessionH;

        targetSessionH = NULL;
        switch (transacP->peerType)
        {
    #ifdef LWM2M_SERVER_MODE
        case ENDPOINT_CLIENT:
            targetSessionH = ((lwm2m_client_t *)transacP->peerP)->sessionH;
            break;
    #endif

    #ifdef LWM2M_CLIENT_MODE
        case ENDPOINT_SERVER:
            targetSessionH = ((lwm2m_server_t *)transacP->peerP)->sessionH;
            break;
    #endif

        default:
            break;
        }

        if (prv_check_addr(fromSessionH, targetSessionH))
        {
            if (transacP->mID == message->mid)
            {
                // HACK: If a message is sent from the monitor callback,
                // it will arrive before the registration ACK.
                // So we resend transaction that were denied for authentication reason.
                if (message->code != COAP_401_UNAUTHORIZED || transacP->retrans_counter >= COAP_MAX_RETRANSMIT)
                {
                    if (transacP->callback != NULL)
                    {
                        transacP->callback(transacP, message);
                    }
                    transaction_remove(contextP, transacP);
                }
                // we found our guy, exit
                return;
            }
        }

        transacP = transacP->next;
    }
}

int transaction_send(lwm2m_context_t * contextP,
                     lwm2m_transaction_t * transacP)
{
    if (transacP->buffer == NULL)
    {
        uint8_t tempBuffer[LWM2M_MAX_PACKET_SIZE];
        int length;

        length = coap_serialize_message(transacP->message, tempBuffer);
        if (length <= 0) return COAP_500_INTERNAL_SERVER_ERROR;

        transacP->buffer = (uint8_t*)lwm2m_malloc(length);
        if (transacP->buffer == NULL) return COAP_500_INTERNAL_SERVER_ERROR;

        memcpy(transacP->buffer, tempBuffer, length);
        transacP->buffer_len = length;
    }

    switch(transacP->peerType)
    {
    case ENDPOINT_CLIENT:
        LOG("Sending %d bytes\r\n", transacP->buffer_len);
        contextP->bufferSendCallback(((lwm2m_client_t*)transacP->peerP)->sessionH,
                                     transacP->buffer, transacP->buffer_len, contextP->bufferSendUserData);

        break;

    case ENDPOINT_SERVER:
        LOG("Sending %d bytes\r\n", transacP->buffer_len);
        contextP->bufferSendCallback(((lwm2m_server_t*)transacP->peerP)->sessionH,
                                     transacP->buffer, transacP->buffer_len, contextP->bufferSendUserData);
        break;

    case ENDPOINT_BOOTSTRAP:
        // not implemented yet
        break;

    default:
        return 0;
    }

    if (transacP->retrans_counter == 0)
    {
        struct timeval tv;

        if (0 == lwm2m_gettimeofday(&tv, NULL))
        {
            transacP->retrans_time = tv.tv_sec;
            transacP->retrans_counter = 1;
        }
        else
        {
            // crude error handling
            transacP->retrans_counter = COAP_MAX_RETRANSMIT;
        }
    }

    if (transacP->retrans_counter < COAP_MAX_RETRANSMIT)
    {
        transacP->retrans_time += COAP_RESPONSE_TIMEOUT * transacP->retrans_counter;
        transacP->retrans_counter++;
    }
    else
    {
        if (transacP->callback)
        {
            transacP->callback(transacP, NULL);
        }
        transaction_remove(contextP, transacP);
        return -1;
    }

    return 0;
}


text:
from copy import copy
from xierpa3.toolbox.parsers.c_json import cjson
from basenode import BaseNode
from xierpa3.toolbox.transformer import TX

class State(BaseNode):
    u"""
    A ``State`` instance holds the current state of style parameters while rendering a set of styles
    in a canvas or CSS. If the state refers to a style, then this is used to get cascading values from, in case
    the current set of attributes does not contain the requested name. Setting values, however, only takes
    place on the state attribute set, so the styles set will never be written.

    The ``State`` as final <quote>leaf</quote> underneath a cascading ``Style`` tree, can be
    seen as a sketch pad that hold the rendered values and stores any changed value, so it  will not damage the
    fixed styles.

    ``State`` instances are used in various places where several sides need to share the save values
    and where the set of values is undefined or expanding in the future. Examples are the state sharing between
    ``ImageBuilder`` and ``Canvas`` or the sharing between the main ``SiteBuilder``
    application and window instances.
    """

    def __init__(self, attributes=None, form=None, **args):
        u"""
        The ``__init__`` constructor takes the optional ``style`` attribute and stores is. If
        it is defined, then this reference to the style node is used a default source if the name of an
        attribute request does not exist in the current attribute set.

        If the ``form`` is defined, then copy all form attribute in/over the
        ``self._attributes`` values. This is convenient if a state needs to be populated with values
        from ``self.e.form``.
        """
        self._attributes = self.getNewAttributes(attributes, (args, form))

    def __getattr__(self, name):
        u"""
        The ``state.name`` (``__getattr__``) interprets the ``name`` attribute. If
        it does not exist, then the content of ``self._style`` is tested. If it does not exist, then
        ``None`` is answered, so it does not have to be initialized.
        """
        if name.startswith('_'):
            return self.__dict__.get(name)
        return self[name]

    def __setattr__(self, name, value):
        if name.startswith('_'):
            self.__dict__[name] = value
        self[name] = value

    def __setitem__(self, name, value):
        u"""
        The ``set`` (or ``state[name] = value``) method sets the attribute ``name`` to
        ``value``. This value is stored locally in the attributes dictionary of the state instance. It will not
        alter the style it may reference. Also it will block any further searching in the cascading set of style values,
        since the locally stored value is found on any next request for that name.
        """
        self._attributes[name] = value

    set = __setitem__

    def __getitem__(self, name):
        u"""
        The ``get`` (or ``state[name]``) method answers the state attribute named ``name
        ``.
        """
        value = self._attributes.get(name)
        return value

    get = __getitem__

    def getState(self):
        u"""
        The ``getState`` method is allowed for compatibility reasons with ``Style`` instances.
        The behavior is to answers a copy of ``self``.
        """
        return self.__class__(attributes=copy(self.getAttributes()))

    _copy = getState

    def _getUniqueAttrsId(self):
        u"""
        The ``_getUniqueAttrsId`` method answers the semi-unique id of the ``self`` attributes
        dictionary. This can be used to get a kind-of unique parameter for a given set of attribute values.
        """
        return hash(`self._attributes`)

    @classmethod
    def _fromDict(cls, d):
        return cls(d)

    @classmethod
    def _fromObject(cls, o):
        if isinstance(o, (list, tuple)):
            result = [] # Answer a list of states
            for d in o:
                result.append(cls._fromObject(d))
        elif isinstance(o, dict):
            result = cls() # Answer a single state
            for key, value in o.items():
                result[key] = cls._fromObject(value)
        else:
            result = o
        return result

    @classmethod
    def _asObject(cls, o):
        if isinstance(o, basestring):
            result = o
        elif isinstance(o, (long, int, float)):
            result = o
        elif o is None:
            result = 'None'
        elif isinstance(o, cls):
            result = {}
            for name, attr in o.getAttributes().items():
                result[name] = cls._asObject(attr)
        elif isinstance(o, (list, tuple)):
            result = []
            for oo in o:
                result.append(cls._asObject(oo))
        elif isinstance(o, dict):
            result = {}
            for key, item in o.items():
                result[TX.asString(key)] = cls._asObject(item)
        else:
            result = `o`
        return result

    @classmethod
    def _fromJson(cls, s):
        u"""
        If s evaluates to a list, then assume that the contents are dictionaries, which all convert to a single
        state. If s evaluates to a dict, then create a single state.
        """
        assert isinstance(s, basestring)
        return cls._fromObject(cjson.encode(s))

    def _asJson(self):
        u"""
        Convert self to an object of standard Python instances, so it can be dumped by JSON.
        """
        return cjson.decode(self._asObject(self))


text:
<bill session="111" type="h" number="1499" updated="2009-03-13T12:08:56-04:00">
	<status><introduced date="1236830400" datetime="2009-03-12"/></status>

	<introduced date="1236830400" datetime="2009-03-12"/>
	<titles>
		<title type="official" as="introduced">To direct the Secretary of Homeland Security to conduct a survey to determine the level of compliance with national voluntary consensus standards and any barriers to achieving compliance with such standards, and for other purposes.</title>
	</titles>
	<sponsor id="412192"/>
	<cosponsors>

	</cosponsors>
	<actions>
		<action date="1236830400" datetime="2009-03-12"><text>Referred to the House Committee on Science and Technology.</text></action>
	</actions>
	<committees>
		<committee name="House Science and Technology" subcommittee="" activity="Referral, In Committee" />
	</committees>
	<relatedbills>

	</relatedbills>
	<subjects>

	</subjects>
	<amendments>

	</amendments>
	<summary>

	</summary>
</bill>


text:
Version 2.1.8 by Volodymyr Volynets

	<time class="change_log_date_commit" datetime="2019-12-17">2019-12-17</time>

Framework

	Bug #1307 (File permission fix.)

Repository / Git:
	Name: Numbers\Framework
	Title: Numbers Framework
	Version: 2.1.7
	Last Tag: 2.1.7
	User Name: Volodymyr Volynets
	User Email: volodymyr.volynets@gmail.com
Statistics:
	Addition: 0
	Deletion: 0
Modules:
	Numbers Framework (Numbers\Framework, 2.1.7)                                              |     0    0
		    0    0	 | Helper/Model/Date/Intervals.php


text:
<!DOCTYPE html>

  <?php include '../include/_head.php' ?>

  <?php include '../include/_header.php' ?>

Download Aria Templates

            <?php
              $versions = array();
              foreach (glob("/srv/www/ariatemplates.com/builds/*.zip") as $filename) {
                $archive = basename($filename, ".zip");
                preg_match('/^ariatemplates-(?:(?P<dev>dev)-)?(?P<version>.*)$/', $archive, $matches);
                //echo "
".print_r($matches, true)."
";

                if (!isset($versions[$matches['version']])) {
                  $versions[$matches['version']] = array( 'dev' => false, 'prod' => false );
                }
                $build = &$versions[$matches['version']];

                if ($matches['dev'] == 'dev') {
                  $build['dev'] = true;
                } else {
                  $build['prod'] = true;
                }
                if (!isset($build['date'])) {
                  $build['date'] = date("Y-m-d", filemtime($filename));
                }
              }

              uksort($versions, function($a, $b) {
                return -1 * version_compare($a, $b);
              });
            ?>

                <?php include '_current_version.php' ?>

Previous versions

                  Version
                  Production build
                  Development build
                  Build date

                <?php
                  $i = 0;
                  foreach ($versions as $version => &$options) {
                    $cssClass = "";
                    if ($i % 2 !== 0) {
                      $cssClass = "odd";
                    }
                ?>
                <tr class="<?php echo $cssClass; ?>
                  ">

                    <?php echo $version; ?>

                    <?php if ($options["prod"]) { ?>
                    <a href="/builds/ariatemplates-<?php echo $version; ?>.zip"
                      class="download" onClick="javascript: _gaq.push(['_trackEvent', 'Downloads', 'Production Version', '
                      <?php echo $version; ?>']);">get it

                  <?php } else { ?>
                  -
                  <?php } ?>

                    <?php if ($options["dev"]) { ?>
                    <a href="/builds/ariatemplates-dev-<?php echo $version; ?>.zip" class="download" onClick="javascript: _gaq.push(['_trackEvent', 'Downloads', 'Development Version', '
                      <?php echo $version; ?>']);">get it

                  <?php } else { ?>
                  -
                  <?php } ?>

                    <?php echo $options["date"]; ?>

                <?php
                    $i++;
                  } //endfor
                ?>

It's not enough? You want more ?

              Just go to our Github repository and
              browse the tags
              section to get more old and dusty Aria Templates versions.

Nightly Builds

We currently do not provide nightly builds of the framework

Getting the source

              If you'd like the full source code, you can check it out on our Github
              repository
              , or simply clone it using this command

git clone git://github.com/ariatemplates/ariatemplates.git

Contributors

              If your wish is to be part of it, check out our
              contribute
              section.

              For a list of Aria Templates forks on Github, check out our
              network
              page.

  <?php include '../include/_footer.html' ?>


text:
<?php
namespace Database;

use Utils\DefaultDB;
use Domain\Hotel;
use Domain\Service;
use Domain\Coordinate;
/**
 * @author - Diefferson Santos
*/
class HotelDB extends DefaultDB{

	public function getHotels($sort, $sense){

		$this->getConnection();

		$selectStatement = 	$this->pdo->select()
		                       		  ->from("list_hotels_view")
		                       		  ->orderBy($sort , $sense);

		$stmt = $selectStatement->execute();

		$data = $stmt->fetchAll();

        $this->closeConection();

        $hotels = array();

        foreach ($data as $key => $value) {
        	$hotels[] = Hotel::doHotel($value);
        }

		return $hotels;
	}

	public function searchHotel($code){

		$this->getConnection();

		$selectStatement = 	$this->pdo->select()
		                       		  ->from("tb_hotel")
		                       		  ->where("code_hotel", "=", $code);

		$stmt = $selectStatement->execute();
		$data = $stmt->fetch();

        $this->closeConection();

        $hotel = null;
        if($data){
        	$hotel = Hotel::doHotel($data);
        }

		return $hotel;
	}

	public function getHotelResume(Hotel $hotel){

		$this->getConnection();

		$selectStatement = 	$this->pdo->select(array("rating", "ratings", "comments"))
		                       		  ->from("list_hotels_view")
		                       		  ->where("code_hotel", "=", $hotel->getCode());

		$stmt = $selectStatement->execute();
		$data = $stmt->fetch();

        $this->closeConection();

        if($data['rating']){
			$hotel->setRating($data['rating']);
		}

		if($data['ratings']){
			$hotel->setRatingsNumber($data['ratings']);
		}

		if($data['comments']){
			$hotel->setCommentsNumber($data['comments']);
		}

		return $hotel;
	}

	public function getHotelImages(Hotel $hotel){

		$this->getConnection();

		$selectStatement = 	$this->pdo->select(array("url"))
		                       		  ->from("tb_image_hotel")
		                       		  ->where("code_hotel", "=", $hotel->getCode());

		$stmt = $selectStatement->execute();
		$data = $stmt->fetchAll();

        $this->closeConection();

        $images = array();
        foreach($data as $value){
        	$images[] = $value['url'];
        }

        $hotel->setImages($images);

		return $hotel;
	}

	public function getHotelServices($hotel){

		$this->getConnection();

		$selectStatement = 	$this->pdo->select(array('tb_service.code_service', 'tb_service.name'))
		                       		  ->from("tb_service_hotel")
		                       		  ->join('tb_service', 'tb_service_hotel.code_service', '=', 'tb_service.code_service')
		                       		  ->where("tb_service_hotel.code_hotel", "=", $hotel->getCode());

		$stmt = $selectStatement->execute();
		$date = $stmt->fetchAll();

        $this->closeConection();

        $services = array();

        foreach ($date as $key => $value) {
        	$services[] = Service::doService($value);
        }

        $hotel->setServices($services);

		return $hotel;
	}

	public function getCoordinates($codeHotel){

		$this->getConnection();

		$selectStatement = 	$this->pdo->select(array("latitude", "longitude"))
		                       		  ->from("tb_hotel")
		                       		  ->where("code_hotel", "=", $codeHotel);

		$stmt = $selectStatement->execute();
		$data = $stmt->fetch();

        $this->closeConection();

        $coordinate = new Coordinate($data["latitude"], $data["longitude"]);

		return $coordinate;
	}
}


text:
package com.googlecode.easiest.cache.ever;

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

/**
 * Holds information about the intercepted method.
 * This way we don't need to propagate AOP specific classes
 * throughout the codebase.
 *
 * @author Brad Cupit
 */
public class MethodCall {
    private final String className;
    private final String methodName;
    private final List<Class<?>> parameterTypes;
    private final List<Object> parameters;
    private final String fullMethodNameWithParameters;

    public MethodCall(String className, String methodName, Class<?>[] parameterTypes, Object[] parameters) {
        this.className = className;
        this.methodName = methodName;
        this.parameterTypes = Collections.unmodifiableList(Arrays.asList(parameterTypes));
        this.parameters = Collections.unmodifiableList(Arrays.asList(parameters));
        this.fullMethodNameWithParameters = buildFullMethodNameWithParameters(className, methodName, this.parameterTypes);
    }

    public String getMethodName() {
        return methodName;
    }

    public String getClassName() {
        return className;
    }

    public List<Class<?>> getParameterTypes() {
        return parameterTypes;
    }

    public List<Object> getParameters() {
        return parameters;
    }

    public String getFullMethodNameWithParameters() {
        return fullMethodNameWithParameters;
    }

    private String buildFullMethodNameWithParameters(String className, String methodName, List<Class<?>> parameterTypes) {
        String fullyQualifiedMethodName = className + "." + methodName;

        if (parameterTypes.size() == 0) {
            return fullyQualifiedMethodName;
        } else {
            List<String> paramClassNames = new ArrayList<String>();

            for (Class<?> clazz : parameterTypes) {
                paramClassNames.add(clazz.getName());
            }

            return fullyQualifiedMethodName + "(" + toCommaSeparatedString(paramClassNames) + ")";
        }
    }

    private String toCommaSeparatedString(List<String> classNamesOfParameters) {
        StringBuilder stringBuilder = new StringBuilder();

        boolean first = true;

        for (String parameterClassName : classNamesOfParameters) {
            if (first) {
                first = false;
            } else {
                stringBuilder.append(",");
            }

            stringBuilder.append(parameterClassName);
        }

        return stringBuilder.toString();
    }
}


text:
package org.hbird.business.groundstation.device.response;

import java.util.List;

import org.hbird.business.groundstation.base.DriverContext;
import org.hbird.business.groundstation.configuration.GroundStationDriverConfiguration;
import org.hbird.exchange.interfaces.IEntityInstance;

/**
 *
 */
public interface ResponseHandler<C extends GroundStationDriverConfiguration, K, R> {

    public K getKey();

    public List<IEntityInstance> handle(DriverContext<C, K, R> driverContext, R response);
}


text:
Returns TRUE if there are registered event listeners for the name specified, FALSE otherwise.

```php
public bool hasEventListeners ( string $name )
```

## Parameters

##### name

      The name of the event.

## Returns

      Returns TRUE if there are registered event listeners for the name specified, FALSE otherwise.

## Details

Class: [BearFramework\App](bearframework.app.class.md)

Location: ~/src/App.php

---

[back to index](index.md)


text:
<!DOCTYPE html>

		<title>Togareya Corporate</title>
		<meta charset="utf-8">
		<meta name="viewport" content="width=device-width, initial-scale=1">
        <link href="//cdn-images.mailchimp.com/embedcode/classic-10_7.css" rel="stylesheet" type="text/css">
        <link rel="stylesheet" href="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css">
        <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.5.0/css/font-awesome.min.css">
        <link rel="stylesheet" href="assets/css/style.css">

                    <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#collapse">
                      Toggle navigation

                    </button>

Home

Services

Features

Pricing

Testimonials

Contact Us

Ready Quotes for using!

 Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vestibulum nibh neque,     convallis ut interdum a, consequat sit amet mauris.

Togareya is your best choice

 Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vestibulum nibh neque,     convallis ut interdum a, consequat sit amet mauris.

Business Landing Page

 Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vestibulum nibh neque,     convallis ut interdum a, consequat sit amet mauris.

Planning

Fast Delivering

Live Support

Support

Services you will love & enjoy.

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vestibulum nibh neque, convallis ut interdum a, consequat sit amet mauris. Vivamus sed tincidunt enim. per inceptos himenaeos. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos.

 Feature 1

 Feature 2

 Feature 3

 Feature 4

 Feature 5

							BUY NOW
							LEARN MORE

Our Featured Main Service

					Everything that matters to your success

Voluptas sit, aspernatur sequi nesciunt, neque porro quisquam consequnte magni dolores eos, qui ratione voluptatem sequi nesciunt

CREATIVE DESIGN

							Voluptas sit, aspernatur sequi nesciunt, neque porro quisquam consequnte magni dolores eos, qui ratione voluptatem sequi nesciunt

FULLY RESPONSIVE

							Voluptas sit, aspernatur sequi nesciunt, neque porro quisquam consequnte magni dolores eos, qui ratione voluptatem sequi nesciunt

CUSTOM SHORTCODES

							Voluptas sit, aspernatur sequi nesciunt, neque porro quisquam consequnte magni dolores eos, qui ratione voluptatem sequi nesciunt

SEO OPTIMIZED

							Voluptas sit, aspernatur sequi nesciunt, neque porro quisquam consequnte magni dolores eos, qui ratione voluptatem sequi nesciunt

CREATIVE DESIGN

							Voluptas sit, aspernatur sequi nesciunt, neque porro quisquam consequnte magni dolores eos, qui ratione voluptatem sequi nesciunt

FULLY RESPONSIVE

							Voluptas sit, aspernatur sequi nesciunt, neque porro quisquam consequnte magni dolores eos, qui ratione voluptatem sequi nesciunt

CUSTOM SHORTCODES

							Voluptas sit, aspernatur sequi nesciunt, neque porro quisquam consequnte magni dolores eos, qui ratione voluptatem sequi nesciunt

SEO OPTIMIZED

							Voluptas sit, aspernatur sequi nesciunt, neque porro quisquam consequnte magni dolores eos, qui ratione voluptatem sequi nesciunt

We believe in the power of simple, effective design, and believe that power should be wielded by all

						DOWNLOAD PDF

Our Featured Projects

					We do your projects on schedule

Voluptas sit, aspernatur sequi nesciunt, neque porro quisquam consequnte magni dolores eos, qui ratione voluptatem sequi nesciunt

Project 1

Project 2

Project 3

Project 4

Project 5

Project 6

Project 7

Project 8

Lorem ipsum dolor sit amet, consectetur adipiscing elit.

SOME FACTS ABOUT US

WE ARE PROUD OF THESE NUMBERS

						70

ONLINE PROJECTS

						5000

SATISFIED CLIENTS

						150

LIVE AGENTS

						43170

Support

Our Pricing

					Select the pricing plan that suits you

BASIC

$9999

UNLIMITED PROJECTS

150 GB OF STORAGE

UNLIMITED

500 GB BANDWIDTH

SECURITY SUITE

BUY NOW

STANDARD

$9999

UNLIMITED PROJECTS

150 GB OF STORAGE

UNLIMITED

500 GB BANDWIDTH

SECURITY SUITE

BUY NOW

ADVANCED

$9999

UNLIMITED PROJECTS

150 GB OF STORAGE

UNLIMITED

500 GB BANDWIDTH

SECURITY SUITE

BUY NOW

ULTIMATE

$9999

UNLIMITED PROJECTS

150 GB OF STORAGE

UNLIMITED

500 GB BANDWIDTH

SECURITY SUITE

BUY NOW

OUR CLIENTS

OUR PRESPECTIVE CUSTOMERS

AHMED FATHY

CEO & Founder

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vestibulum nibh neque, convallis ut interdum a, consequat sit amet mauris.

AHMED FATHY

CEO & Founder

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vestibulum nibh neque, convallis ut interdum a, consequat sit amet mauris.

AHMED FATHY

CEO & Founder

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vestibulum nibh neque, convallis ut interdum a, consequat sit amet mauris.

AHMED FATHY

CEO & Founder

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vestibulum nibh neque, convallis ut interdum a, consequat sit amet mauris. Vivamus sed tincidunt enim. per inceptos himenaeos.

Easy adding Call To Action

Contact Us now !

						Contact Us
						BUY NOW

GET IN TOUCH!

SEND US A MESSAGE

                        <form role="form">

                                <input type="text" class="form-control input-lg" placeholder="Name">

                                <input type="email" class="form-control input-lg" placeholder="Email">

                                <input type="text" class="form-control input-lg" placeholder="Subject">

                                <textarea class="form-control input-lg" placeholder="Your Message"></textarea>

                            <input type="submit" value="Send Message" name="messg">
                        </form>

CONTACT INFO

 info@ownsource.org

 +20239754190

 +201119927754

 6 Mahmoud Aref,Giza,Egypt.

SUBSCRIBE US

						Register in our newsletter and get updated offers and news.

					<form class="form-inline" role="form">

				        <input type="email" class="form-control" id="email" placeholder="Email address" />
						<button type="submit" class="btn btn-primary">REGISTER</button>

					</form>

					All Copyrights reserved by Togaria Corporate.


text:
<?php

$app = 'frontend';
if (!include(dirname(__FILE__).'/../bootstrap/functional.php'))
{
  return;
}

$b = new sfTestBrowser();

$b->
  get('/format_test.js')->
  with('request')->begin()->
    isParameter('module', 'format')->
    isParameter('action', 'index')->
    isFormat('js')->
  end()->
  with('response')->begin()->
    isStatusCode(200)->
    isHeader('content-type', 'application/javascript')->
    matches('!/<body>/')->
    matches('/Some js headers/')->
    matches('/This is a js file/')->
  end()
;

$b->
  get('/format_test.css')->
  with('request')->begin()->
    isParameter('module', 'format')->
    isParameter('action', 'index')->
    isFormat('css')->
  end()->
  with('response')->begin()->
    isStatusCode(200)->
    isHeader('content-type', 'text/css; charset=utf-8')->
    matches('/This is a css file/')->
  end()
;

$b->
  get('/format_test')->
  with('request')->begin()->
    isParameter('module', 'format')->
    isParameter('action', 'index')->
    isFormat('html')->
  end()->
  with('response')->begin()->
    isStatusCode(200)->
    isHeader('content-type', 'text/html; charset=utf-8')->
    checkElement('body #content', 'This is an HTML file')->
  end()
;

$b->
  get('/format_test.xml')->
  with('request')->begin()->
    isParameter('module', 'format')->
    isParameter('action', 'index')->
    isFormat('xml')->
  end()->
  with('response')->begin()->
    isStatusCode(200)->
    isHeader('content-type', 'text/xml; charset=utf-8')->
    checkElement('sentences sentence:first', 'This is a XML file')->
  end()
;

$b->
  get('/format_test.foo')->
  with('request')->begin()->
    isParameter('module', 'format')->
    isParameter('action', 'index')->
    isFormat('foo')->
  end()->
  with('response')->begin()->
    isStatusCode(200)->
    isHeader('content-type', 'text/html; charset=utf-8')->
    isHeader('x-foo', 'true')->
    checkElement('body #content', 'This is an HTML file')->
  end()
;

$b->
  get('/format/js')->
  with('request')->begin()->
    isParameter('module', 'format')->
    isParameter('action', 'js')->
    isFormat('js')->
  end()->
  with('response')->begin()->
    isStatusCode(200)->
    isHeader('content-type', 'application/javascript')->
    matches('/A js file/')->
  end()
;

$b->
  setHttpHeader('User-Agent', 'Mozilla/5.0 (iPhone; U; CPU like Mac OS X; en) AppleWebKit/420+ (KHTML, like Gecko) Version/3.0 Mobile/1A543a Safari/419.3')->
  get('/format/forTheIPhone')->
  with('request')->begin()->
    isParameter('module', 'format')->
    isParameter('action', 'forTheIPhone')->
    isFormat('iphone')->
  end()->
  with('response')->begin()->
    isStatusCode(200)->
    isHeader('content-type', 'text/html; charset=utf-8')->
    checkElement('#content', 'This is an HTML file for the iPhone')->
    checkElement('link[href*="iphone.css"]')->
  end()
;

$b->
  getAndCheck('format', 'throwsException', null, 500)->
  throwsException('Exception', '/message/')
;


text:
exports.getCircumference = function(radius) {
  //Function to test multiple math mutations in a single function.
  return 2 * Math.PI * radius;
};

exports.untestedFunction = function() {
  var i = 5 / 2 * 3;
};


text:
import numpy as np

from .epochs import Epochs
from .utils import check_fname, logger, verbose, _check_option, _check_fname
from .io.constants import FIFF
from .io.open import fiff_open
from .io.pick import pick_types, pick_types_forward
from .io.proj import (Projection, _has_eeg_average_ref_proj, _read_proj,
                      make_projector, make_eeg_average_ref_proj, _write_proj)
from .io.write import start_and_end_file
from .event import make_fixed_length_events
from .parallel import parallel_func
from .cov import _check_n_samples
from .forward import (is_fixed_orient, _subject_from_forward,
                      convert_forward_solution)
from .source_estimate import _make_stc

@verbose
def read_proj(fname, verbose=None):
    """Read projections from a FIF file.

    Parameters
    ----------
    fname : str
        The name of file containing the projections vectors. It should end with
        -proj.fif or -proj.fif.gz.
    %(verbose)s

    Returns
    -------
    projs : list
        The list of projection vectors.

    See Also
    --------
    write_proj
    """
    check_fname(fname, 'projection', ('-proj.fif', '-proj.fif.gz',
                                      '_proj.fif', '_proj.fif.gz'))

    ff, tree, _ = fiff_open(fname)
    with ff as fid:
        projs = _read_proj(fid, tree)
    return projs

@verbose
def write_proj(fname, projs, *, overwrite=False, verbose=None):
    """Write projections to a FIF file.

    Parameters
    ----------
    fname : str
        The name of file containing the projections vectors. It should end with
        -proj.fif or -proj.fif.gz.
    projs : list
        The list of projection vectors.
    %(overwrite)s

        .. versionadded:: 1.0
    %(verbose)s

        .. versionadded:: 1.0

    See Also
    --------
    read_proj
    """
    fname = _check_fname(fname, overwrite=overwrite)
    check_fname(fname, 'projection', ('-proj.fif', '-proj.fif.gz',
                                      '_proj.fif', '_proj.fif.gz'))
    with start_and_end_file(fname) as fid:
        _write_proj(fid, projs)

@verbose
def _compute_proj(data, info, n_grad, n_mag, n_eeg, desc_prefix,
                  meg='separate', verbose=None):
    from scipy import linalg
    grad_ind = pick_types(info, meg='grad', ref_meg=False, exclude='bads')
    mag_ind = pick_types(info, meg='mag', ref_meg=False, exclude='bads')
    eeg_ind = pick_types(info, meg=False, eeg=True, ref_meg=False,
                         exclude='bads')

    _check_option('meg', meg, ['separate', 'combined'])
    if meg == 'combined':
        if n_grad != n_mag:
            raise ValueError('n_grad (%d) must be equal to n_mag (%d) when '
                             'using meg="combined"')
        kinds = ['meg', '', 'eeg']
        n_mag = 0
        grad_ind = pick_types(info, meg=True, ref_meg=False, exclude='bads')
        if (n_grad > 0) and len(grad_ind) == 0:
            logger.info("No MEG channels found for joint estimation. "
                        "Forcing n_grad=n_mag=0")
            n_grad = 0
    else:
        kinds = ['planar', 'axial', 'eeg']

    if (n_grad > 0) and len(grad_ind) == 0:
        logger.info("No gradiometers found. Forcing n_grad to 0")
        n_grad = 0
    if (n_mag > 0) and len(mag_ind) == 0:
        logger.info("No magnetometers found. Forcing n_mag to 0")
        n_mag = 0
    if (n_eeg > 0) and len(eeg_ind) == 0:
        logger.info("No EEG channels found. Forcing n_eeg to 0")
        n_eeg = 0

    ch_names = info['ch_names']
    grad_names, mag_names, eeg_names = ([ch_names[k] for k in ind]
                                        for ind in [grad_ind, mag_ind,
                                                    eeg_ind])

    projs = []
    for n, ind, names, desc in zip([n_grad, n_mag, n_eeg],
                                   [grad_ind, mag_ind, eeg_ind],
                                   [grad_names, mag_names, eeg_names],
                                   kinds):
        if n == 0:
            continue
        data_ind = data[ind][:, ind]
        # data is the covariance matrix: U * S**2 * Ut
        U, Sexp2, _ = linalg.svd(data_ind, full_matrices=False)
        U = U[:, :n]
        exp_var = Sexp2 / Sexp2.sum()
        exp_var = exp_var[:n]
        for k, (u, var) in enumerate(zip(U.T, exp_var)):
            proj_data = dict(col_names=names, row_names=None,
                             data=u[np.newaxis, :], nrow=1, ncol=u.size)
            this_desc = "%s-%s-PCA-%02d" % (desc, desc_prefix, k + 1)
            logger.info("Adding projection: %s" % this_desc)
            proj = Projection(
                active=False, data=proj_data, desc=this_desc,
                kind=FIFF.FIFFV_PROJ_ITEM_FIELD, explained_var=var)
            projs.append(proj)

    return projs

@verbose
def compute_proj_epochs(epochs, n_grad=2, n_mag=2, n_eeg=2, n_jobs=None,
                        desc_prefix=None, meg='separate', verbose=None):
    """Compute SSP (signal-space projection) vectors on epoched data.

    %(compute_ssp)s

    Parameters
    ----------
    epochs : instance of Epochs
        The epochs containing the artifact.
    n_grad : int
        Number of vectors for gradiometers.
    n_mag : int
        Number of vectors for magnetometers.
    n_eeg : int
        Number of vectors for EEG channels.
    %(n_jobs)s
        Number of jobs to use to compute covariance.
    desc_prefix : str | None
        The description prefix to use. If None, one will be created based on
        the event_id, tmin, and tmax.
    meg : str
        Can be 'separate' (default) or 'combined' to compute projectors
        for magnetometers and gradiometers separately or jointly.
        If 'combined', ``n_mag == n_grad`` is required and the number of
        projectors computed for MEG will be ``n_mag``.

        .. versionadded:: 0.18
    %(verbose)s

    Returns
    -------
    projs: list
        List of projection vectors.

    See Also
    --------
    compute_proj_raw, compute_proj_evoked
    """
    # compute data covariance
    data = _compute_cov_epochs(epochs, n_jobs)
    event_id = epochs.event_id
    if event_id is None or len(list(event_id.keys())) == 0:
        event_id = '0'
    elif len(event_id.keys()) == 1:
        event_id = str(list(event_id.values())[0])
    else:
        event_id = 'Multiple-events'
    if desc_prefix is None:
        desc_prefix = "%s-%-.3f-%-.3f" % (event_id, epochs.tmin, epochs.tmax)
    return _compute_proj(data, epochs.info, n_grad, n_mag, n_eeg, desc_prefix,
                         meg=meg)

def _compute_cov_epochs(epochs, n_jobs):
    """Compute epochs covariance."""
    parallel, p_fun, n_jobs = parallel_func(np.dot, n_jobs)
    data = parallel(p_fun(e, e.T) for e in epochs)
    n_epochs = len(data)
    if n_epochs == 0:
        raise RuntimeError('No good epochs found')

    n_chan, n_samples = epochs.info['nchan'], len(epochs.times)
    _check_n_samples(n_samples * n_epochs, n_chan)
    data = sum(data)
    return data

@verbose
def compute_proj_evoked(evoked, n_grad=2, n_mag=2, n_eeg=2, desc_prefix=None,
                        meg='separate', verbose=None):
    """Compute SSP (signal-space projection) vectors on evoked data.

    %(compute_ssp)s

    Parameters
    ----------
    evoked : instance of Evoked
        The Evoked obtained by averaging the artifact.
    n_grad : int
        Number of vectors for gradiometers.
    n_mag : int
        Number of vectors for magnetometers.
    n_eeg : int
        Number of vectors for EEG channels.
    desc_prefix : str | None
        The description prefix to use. If None, one will be created based on
        tmin and tmax.

        .. versionadded:: 0.17
    meg : str
        Can be 'separate' (default) or 'combined' to compute projectors
        for magnetometers and gradiometers separately or jointly.
        If 'combined', ``n_mag == n_grad`` is required and the number of
        projectors computed for MEG will be ``n_mag``.

        .. versionadded:: 0.18
    %(verbose)s

    Returns
    -------
    projs : list
        List of projection vectors.

    See Also
    --------
    compute_proj_raw, compute_proj_epochs
    """
    data = np.dot(evoked.data, evoked.data.T)  # compute data covariance
    if desc_prefix is None:
        desc_prefix = "%-.3f-%-.3f" % (evoked.times[0], evoked.times[-1])
    return _compute_proj(data, evoked.info, n_grad, n_mag, n_eeg, desc_prefix,
                         meg=meg)

@verbose
def compute_proj_raw(raw, start=0, stop=None, duration=1, n_grad=2, n_mag=2,
                     n_eeg=0, reject=None, flat=None, n_jobs=None,
                     meg='separate', verbose=None):
    """Compute SSP (signal-space projection) vectors on continuous data.

    %(compute_ssp)s

    Parameters
    ----------
    raw : instance of Raw
        A raw object to use the data from.
    start : float
        Time (in sec) to start computing SSP.
    stop : float
        Time (in sec) to stop computing SSP.
        None will go to the end of the file.
    duration : float
        Duration (in sec) to chunk data into for SSP
        If duration is None, data will not be chunked.
    n_grad : int
        Number of vectors for gradiometers.
    n_mag : int
        Number of vectors for magnetometers.
    n_eeg : int
        Number of vectors for EEG channels.
    reject : dict | None
        Epoch rejection configuration (see Epochs).
    flat : dict | None
        Epoch flat configuration (see Epochs).
    %(n_jobs)s
        Number of jobs to use to compute covariance.
    meg : str
        Can be 'separate' (default) or 'combined' to compute projectors
        for magnetometers and gradiometers separately or jointly.
        If 'combined', ``n_mag == n_grad`` is required and the number of
        projectors computed for MEG will be ``n_mag``.

        .. versionadded:: 0.18
    %(verbose)s

    Returns
    -------
    projs: list
        List of projection vectors.

    See Also
    --------
    compute_proj_epochs, compute_proj_evoked
    """
    if duration is not None:
        duration = np.round(duration * raw.info['sfreq']) / raw.info['sfreq']
        events = make_fixed_length_events(raw, 999, start, stop, duration)
        picks = pick_types(raw.info, meg=True, eeg=True, eog=True, ecg=True,
                           emg=True, exclude='bads')
        epochs = Epochs(raw, events, None, tmin=0.,
                        tmax=duration - 1. / raw.info['sfreq'],
                        picks=picks, reject=reject, flat=flat,
                        baseline=None, proj=False)
        data = _compute_cov_epochs(epochs, n_jobs)
        info = epochs.info
        if not stop:
            stop = raw.n_times / raw.info['sfreq']
    else:
        # convert to sample indices
        start = max(raw.time_as_index(start)[0], 0)
        stop = raw.time_as_index(stop)[0] if stop else raw.n_times
        stop = min(stop, raw.n_times)
        data, times = raw[:, start:stop]
        _check_n_samples(stop - start, data.shape[0])
        data = np.dot(data, data.T)  # compute data covariance
        info = raw.info
        # convert back to times
        start = start / raw.info['sfreq']
        stop = stop / raw.info['sfreq']

    desc_prefix = "Raw-%-.3f-%-.3f" % (start, stop)
    projs = _compute_proj(data, info, n_grad, n_mag, n_eeg, desc_prefix,
                          meg=meg)
    return projs

@verbose
def sensitivity_map(fwd, projs=None, ch_type='grad', mode='fixed', exclude=[],
                    verbose=None):
    """Compute sensitivity map.

    Such maps are used to know how much sources are visible by a type
    of sensor, and how much projections shadow some sources.

    Parameters
    ----------
    fwd : Forward
        The forward operator.
    projs : list
        List of projection vectors.
    ch_type : 'grad' | 'mag' | 'eeg'
        The type of sensors to use.
    mode : str
        The type of sensitivity map computed. See manual. Should be 'free',
        'fixed', 'ratio', 'radiality', 'angle', 'remaining', or 'dampening'
        corresponding to the argument --map 1, 2, 3, 4, 5, 6 and 7 of the
        command mne_sensitivity_map.
    exclude : list of str | str
        List of channels to exclude. If empty do not exclude any (default).
        If 'bads', exclude channels in fwd['info']['bads'].
    %(verbose)s

    Returns
    -------
    stc : SourceEstimate | VolSourceEstimate
        The sensitivity map as a SourceEstimate or VolSourceEstimate instance
        for visualization.
    """
    from scipy import linalg
    # check strings
    _check_option('ch_type', ch_type, ['eeg', 'grad', 'mag'])
    _check_option('mode', mode, ['free', 'fixed', 'ratio', 'radiality',
                                 'angle', 'remaining', 'dampening'])

    # check forward
    if is_fixed_orient(fwd, orig=True):
        raise ValueError('fwd should must be computed with free orientation')

    # limit forward (this will make a copy of the data for us)
    if ch_type == 'eeg':
        fwd = pick_types_forward(fwd, meg=False, eeg=True, exclude=exclude)
    else:
        fwd = pick_types_forward(fwd, meg=ch_type, eeg=False, exclude=exclude)

    convert_forward_solution(fwd, surf_ori=True, force_fixed=False,
                             copy=False, verbose=False)
    if not fwd['surf_ori'] or is_fixed_orient(fwd):
        raise RuntimeError('Error converting solution, please notify '
                           'mne-python developers')

    gain = fwd['sol']['data']

    # Make sure EEG has average
    if ch_type == 'eeg':
        if projs is None or not _has_eeg_average_ref_proj(
                fwd['info'], projs=projs):
            eeg_ave = [make_eeg_average_ref_proj(fwd['info'])]
        else:
            eeg_ave = []
        projs = eeg_ave if projs is None else projs + eeg_ave

    # Construct the projector
    residual_types = ['angle', 'remaining', 'dampening']
    if projs is not None:
        proj, ncomp, U = make_projector(projs, fwd['sol']['row_names'],
                                        include_active=True)
        # do projection for most types
        if mode not in residual_types:
            gain = np.dot(proj, gain)
        elif ncomp == 0:
            raise RuntimeError('No valid projectors found for channel type '
                               '%s, cannot compute %s' % (ch_type, mode))
    # can only run the last couple methods if there are projectors
    elif mode in residual_types:
        raise ValueError('No projectors used, cannot compute %s' % mode)

    n_sensors, n_dipoles = gain.shape
    n_locations = n_dipoles // 3
    sensitivity_map = np.empty(n_locations)

    for k in range(n_locations):
        gg = gain[:, 3 * k:3 * (k + 1)]
        if mode != 'fixed':
            s = linalg.svd(gg, full_matrices=False, compute_uv=False)
        if mode == 'free':
            sensitivity_map[k] = s[0]
        else:
            gz = linalg.norm(gg[:, 2])  # the normal component
            if mode == 'fixed':
                sensitivity_map[k] = gz
            elif mode == 'ratio':
                sensitivity_map[k] = gz / s[0]
            elif mode == 'radiality':
                sensitivity_map[k] = 1. - (gz / s[0])
            else:
                if mode == 'angle':
                    co = linalg.norm(np.dot(gg[:, 2], U))
                    sensitivity_map[k] = co / gz
                else:
                    p = linalg.norm(np.dot(proj, gg[:, 2]))
                    if mode == 'remaining':
                        sensitivity_map[k] = p / gz
                    elif mode == 'dampening':
                        sensitivity_map[k] = 1. - p / gz
                    else:
                        raise ValueError('Unknown mode type (got %s)' % mode)

    # only normalize fixed and free methods
    if mode in ['fixed', 'free']:
        sensitivity_map /= np.max(sensitivity_map)

    subject = _subject_from_forward(fwd)
    vertices = [s['vertno'] for s in fwd['src']]
    return _make_stc(sensitivity_map[:, np.newaxis], vertices, fwd['src'].kind,
                     tmin=0., tstep=1., subject=subject)


text:
/*************************
 * Cookie Storage Service
 *************************/
(function () {
    'use strict';

    angular.module('app.services')
        .factory('cookieStorage', cookieStorage);

    cookieStorage.$inject = ['$cookieStore'];

    function cookieStorage($cookieStore) {

        var services = {
            getCookie: getCookie,
            setCookie: setCookie,
            removeCookie: removeCookie
        };

        return services;

        function getCookie(key) {
            return $cookieStore.get(key);
        }

        function setCookie(key, value) {
            $cookieStore.put(key, value);
        }

        function removeCookie(key) {
            $cookieStore.remove(key);
        }
    }

}());


text:
/*
 * Accounting API
 * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
 *
 * The version of the OpenAPI document: 2.0.0
 * Contact: api@xero.com
 *
 * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
 * https://openapi-generator.tech
 * Do not edit the class manually.
 */

package com.xero.api;

import com.fasterxml.jackson.databind.util.ISO8601DateFormat;
import com.fasterxml.jackson.databind.util.ISO8601Utils;

import java.text.FieldPosition;
import java.util.Date;

public class RFC3339DateFormat extends ISO8601DateFormat {

  // Same as ISO8601DateFormat but serializing milliseconds.
  @Override
  public StringBuffer format(Date date, StringBuffer toAppendTo, FieldPosition fieldPosition) {
    String value = ISO8601Utils.format(date, true);
    toAppendTo.append(value);
    return toAppendTo;
  }
}