text:
layout: post
title: 'my vim setttings'
date: 2013-11-27
author: Pengfei.X
version: 0.1
categories: [others, ]
excerpt: my vim settings
---

    set ruler
    set showcmd
    set tabstop=4
    set expandtab
    set softtabstop=4
    set shiftwidth=4
    set nu
    set hlsearch
    set incsearch
    set foldmethod=marker
    set colorcolumn=80
    set statusline=%<\ %n:%F\ %m%r%y%=%-35.(line:\ %l\ of\ %L,\ col:\ %c%V\ (%P)%)
    set laststatus=2
    set nosi
    set noai

    colorscheme blackdust

    "so that when you preview the new file takes up 80% and the file explorer the other 20%.
    let g:netrw_winsize=20

    syntax on

    set cursorline
    hi clear CursorLine
    hi CursorLine gui=underline
    hi CursorLine ctermfg=NONE ctermbg=Blue

    let g:netrw_altv = 1
    let g:netrw_browse_split = 3
    let g:netrw_keepdir = 0

    map <F2> :mksession! ~/.vim_session <cr> " Quick write session with F2
    map <F3> :source ~/.vim_session <cr>     " And load session with F3

    execute pathogen#infect()
    let g:jedi#completions_command = "<C-Space>"
    filetype plugin indent off
    set noautoindent
    set nosmartindent
    set nocindent
    autocmd FileType python setlocal completeopt-=preview

    function! ResCur()
            if line("'\"") <= line("$")
                    normal! g`"
                    return 1
            endif
    endfunction

    augroup resCur
            autocmd!
            autocmd BufWinEnter * call ResCur()
    augroup END

    au BufNewFile,BufRead *.yml set filetype=xml


text:
! { dg-do compile }

! Type-bound procedures
! Check for errors with operator calls.

MODULE m
  IMPLICIT NONE

  TYPE myint
    INTEGER :: value
  CONTAINS
    PROCEDURE, PASS :: add_int
    PROCEDURE, PASS :: assign_int
    GENERIC, PRIVATE :: OPERATOR(.PLUS.) => add_int
    GENERIC, PRIVATE :: OPERATOR(+) => add_int
    GENERIC, PRIVATE :: ASSIGNMENT(=) => assign_int
  END TYPE myint

  TYPE myreal
    REAL :: value
  CONTAINS
    PROCEDURE, PASS :: add_real
    PROCEDURE, PASS :: assign_real
    GENERIC :: OPERATOR(.PLUS.) => add_real
    GENERIC :: OPERATOR(+) => add_real
    GENERIC :: ASSIGNMENT(=) => assign_real
  END TYPE myreal

CONTAINS

  PURE TYPE(myint) FUNCTION add_int (a, b)
    CLASS(myint), INTENT(IN) :: a
    INTEGER, INTENT(IN) :: b
    add_int = myint (a%value + b)
  END FUNCTION add_int

  PURE SUBROUTINE assign_int (dest, from)
    CLASS(myint), INTENT(OUT) :: dest
    INTEGER, INTENT(IN) :: from
    dest%value = from
  END SUBROUTINE assign_int

  TYPE(myreal) FUNCTION add_real (a, b)
    CLASS(myreal), INTENT(IN) :: a
    REAL, INTENT(IN) :: b
    add_real = myreal (a%value + b)
  END FUNCTION add_real

  SUBROUTINE assign_real (dest, from)
    CLASS(myreal), INTENT(OUT) :: dest
    REAL, INTENT(IN) :: from
    dest%value = from
  END SUBROUTINE assign_real

  SUBROUTINE in_module ()
    TYPE(myint) :: x
    x = 0 ! { dg-bogus "Can't convert" }
    x = x + 42 ! { dg-bogus "Operands of" }
    x = x .PLUS. 5 ! { dg-bogus "Unknown operator" }
  END SUBROUTINE in_module

  PURE SUBROUTINE iampure ()
    TYPE(myint) :: x

    x = 0 ! { dg-bogus "is not PURE" }
    x = x + 42 ! { dg-bogus "to a non-PURE procedure" }
    x = x .PLUS. 5 ! { dg-bogus "to a non-PURE procedure" }
  END SUBROUTINE iampure

END MODULE m

PURE SUBROUTINE iampure2 ()
  USE m
  IMPLICIT NONE
  TYPE(myreal) :: x

  x = 0.0 ! { dg-error "is not PURE" }
  x = x + 42.0 ! { dg-error "to a non-PURE procedure" }
  x = x .PLUS. 5.0 ! { dg-error "to a non-PURE procedure" }
END SUBROUTINE iampure2

PROGRAM main
  USE m
  IMPLICIT NONE
  TYPE(myint) :: x

  x = 0 ! { dg-error "Can't convert" }
  x = x + 42 ! { dg-error "Operands of" }
  x = x .PLUS. 5 ! { dg-error "Unknown operator" }
END PROGRAM main

! { dg-final { cleanup-modules "m" } }

redpajama_set_name: RedPajamaGithub


text:
<?php

namespace Imagine\Image\Metadata;

use Imagine\Exception\InvalidArgumentException;

abstract class AbstractMetadataReader implements MetadataReaderInterface
{
    /**
     * {@inheritdoc}
     */
    public function readFile($file)
    {
        if (stream_is_local($file)) {
            if (!is_file($file)) {
                throw new InvalidArgumentException(sprintf('File %s does not exist.', $file));
            }

            return new MetadataBag(array_merge(array('filepath' => realpath($file), 'uri' => $file), $this->extractFromFile($file)));
        }

        return new MetadataBag(array_merge(array('uri' => $file), $this->extractFromFile($file)));
    }

    /**
     * {@inheritdoc}
     */
    public function readData($data)
    {
        return new MetadataBag($this->extractFromData($data));
    }

    /**
     * {@inheritdoc}
     */
    public function readStream($resource)
    {
        if (!is_resource($resource)) {
            throw new InvalidArgumentException('Invalid resource provided.');
        }

        return new MetadataBag(array_merge($this->getStreamMetadata($resource), $this->extractFromStream($resource)));
    }

    /**
     * Gets the URI from a stream resource
     *
     * @param resource $resource
     *
     * @return string|null The URI f ava
     */
    private function getStreamMetadata($resource)
    {
        $metadata = array();

        if (false !== $data = @stream_get_meta_data($resource)) {
            $metadata['uri'] = $data['uri'];
            if (stream_is_local($resource)) {
                $metadata['filepath'] = realpath($data['uri']);
            }
        }

        return $metadata;
    }

    /**
     * Extracts metadata from a file
     *
     * @param $file
     *
     * @return array An associative array of metadata
     */
    abstract protected function extractFromFile($file);

    /**
     * Extracts metadata from raw data
     *
     * @param $data
     *
     * @return array An associative array of metadata
     */
    abstract protected function extractFromData($data);

    /**
     * Extracts metadata from a stream
     *
     * @param $resource
     *
     * @return array An associative array of metadata
     */
    abstract protected function extractFromStream($resource);
}


text:
Function(event, treeId, treeNode, clickFlag)setting.callback.onClick

Overview[ depends on jquery.ztree.core js ]

Used to capture the click event when click node.

If you set 'setting.callback.beforeClick',and return false, zTree will not change selected state, and will not trigger the 'onClick' callback.

Default: null

Function Parameter Descriptions

eventjs event Object

event Object

treeIdString

zTree unique identifier: treeId.

treeNodeJSON

JSON data object of the node which is clicked

clickFlagNumber

Node is selected or deselected state, please see table below for details

clickFlag	selectedMulti	autoCancelSelected
&&
event.ctrlKey / metaKey	isSelected	operate for selected

1	true	false	false	node is selected (single)

1	true	false	true	node is selected (single)

2	true	true	false	node is selected (multi)

0	true	true	true	node is deselected

1	false	false	false	node is selected (single)

1	false	false	true	node is selected (single)

1	false	true	false	node is selected (single)

0	false	true	true	node is deselected

Examples of setting & function

1. When click node, alert info about 'tId' and 'name'.

function myOnClick(event, treeId, treeNode) {
    alert(treeNode.tId + ", " + treeNode.name);
};
var setting = {
	callback: {
		onClick: myOnClick
	}
};
......


text:
<!--
id: 2549746697
link: http://tumblr.atmos.org/post/2549746697/wtfpl-wikipedia-the-free-encyclopedia
slug: wtfpl-wikipedia-the-free-encyclopedia
date: Fri Dec 31 2010 20:10:22 GMT-0800 (PST)
publish: 2010-12-031
tags:
title: WTFPL - Wikipedia, the free encyclopedia
-->

WTFPL - Wikipedia, the free encyclopedia
========================================

[http://en.wikipedia.org/wiki/WTFPL](http://en.wikipedia.org/wiki/WTFPL)


text:
#ifndef __PRINTER_WIN_H
#define __PRINTER_WIN_H

rdpPrinterDriver* printer_win_get_driver(void);

#ifdef WITH_DEBUG_WINPR
#define DEBUG_WINPR(fmt, ...) CLOG_CLASS(WINPR, fmt, ## __VA_ARGS__)
#else
#define DEBUG_WINPR(fmt, ...) CLOG_NULL(fmt, ## __VA_ARGS__)
#endif

#endif

#ifdef WIN32
#define snprintf _snprintf
#endif


text:
namespace Wex
{
	class ProcessInstance
	{
	private:
		ProcessInstance() = default;
		ProcessInstance(const ProcessInstance& rhs) = delete;
		~ProcessInstance() = default;

		ProcessInstance& operator=(const ProcessInstance& rhs) = delete;

	public:
		static void Initialize(HINSTANCE instance);
		static HINSTANCE Get();

	private:
		static ProcessInstance& GetSingleton();
		static void InitializeAllCommonControls();

	private:
		friend class ProcessInstanceTest;
		HINSTANCE handle = nullptr;
	};
}


text:
<?xml version="1.0" ?>
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:sbol="http://sbols.org/v2#" xmlns:dcterms="http://purl.org/dc/terms/" xmlns:prov="http://www.w3.org/ns/prov#">
  <sbol:ComponentDefinition rdf:about="http://sbolstandard.org/build/dna_part_1">
    <sbol:persistentIdentity rdf:resource="http://sbolstandard.org/build/dna_part_1"/>
    <sbol:displayId>dna_part_1</sbol:displayId>
    <dcterms:title>dna_part_1</dcterms:title>
    <sbol:type rdf:resource="http://www.biopax.org/release/biopax-level3.owl#DnaRegion"/>
    <sbol:type rdf:resource="http://identifiers.org/so/SO:0000987"/>
    <sbol:type rdf:resource="http://identifiers.org/so/SO:0000985"/>
  </sbol:ComponentDefinition>
  <sbol:ComponentDefinition rdf:about="http://sbolstandard.org/build/joined_dna_part">
    <sbol:persistentIdentity rdf:resource="http://sbolstandard.org/build/joined_dna_part"/>
    <sbol:displayId>joined_dna_part</sbol:displayId>
    <prov:wasGeneratedBy rdf:resource="http://sbolstandard.org/build/join_dna_part_1_with_dna_part_2"/>
    <dcterms:title>joined_dna_part</dcterms:title>
    <sbol:type rdf:resource="http://www.biopax.org/release/biopax-level3.owl#DnaRegion"/>
    <sbol:type rdf:resource="http://identifiers.org/so/SO:0000987"/>
    <sbol:type rdf:resource="http://identifiers.org/so/SO:0000985"/>
  </sbol:ComponentDefinition>
  <sbol:ComponentDefinition rdf:about="http://sbolstandard.org/build/dna_part_2">
    <sbol:persistentIdentity rdf:resource="http://sbolstandard.org/build/dna_part_2"/>
    <sbol:displayId>dna_part_2</sbol:displayId>
    <dcterms:title>dna_part_2</dcterms:title>
    <sbol:type rdf:resource="http://www.biopax.org/release/biopax-level3.owl#DnaRegion"/>
    <sbol:type rdf:resource="http://identifiers.org/so/SO:0000987"/>
    <sbol:type rdf:resource="http://identifiers.org/so/SO:0000985"/>
  </sbol:ComponentDefinition>
  <prov:Activity rdf:about="http://sbolstandard.org/build/join_dna_part_1_with_dna_part_2">
    <sbol:persistentIdentity rdf:resource="http://sbolstandard.org/build/join_dna_part_1_with_dna_part_2"/>
    <sbol:displayId>join_dna_part_1_with_dna_part_2</sbol:displayId>
    <dcterms:title>join(dna_part_1, dna_part_2)</dcterms:title>
    <prov:qualifiedUsage>
      <prov:Usage rdf:about="http://sbolstandard.org/build/join_dna_part_1_with_dna_part_2/dna_part_1">
        <sbol:persistentIdentity rdf:resource="http://sbolstandard.org/build/join_dna_part_1_with_dna_part_2/dna_part_1"/>
        <sbol:displayId>dna_part_1</sbol:displayId>
        <prov:hadRole rdf:resource="http://identifiers.org/so/SO:0001631"/>
        <prov:entity rdf:resource="http://sbolstandard.org/build/dna_part_1"/>
      </prov:Usage>
    </prov:qualifiedUsage>
    <prov:qualifiedUsage>
      <prov:Usage rdf:about="http://sbolstandard.org/build/join_dna_part_1_with_dna_part_2/dna_part_2">
        <sbol:persistentIdentity rdf:resource="http://sbolstandard.org/build/join_dna_part_1_with_dna_part_2/dna_part_2"/>
        <sbol:displayId>dna_part_2</sbol:displayId>
        <prov:hadRole rdf:resource="http://identifiers.org/so/SO:0001632"/>
        <prov:entity rdf:resource="http://sbolstandard.org/build/dna_part_2"/>
      </prov:Usage>
    </prov:qualifiedUsage>
  </prov:Activity>
</rdf:RDF>


text:
if platform_family?('debian')
  package 'locales'
  execute 'locale-gen en_US.UTF-8'
end
# MongoDB data folder.
directory '/data/db' do
  recursive true
end
# Download and unpack MongoDB binary builds.
package 'tar'
poise_archive 'https://fastdl.mongodb.org/linux/mongodb-linux-x86_64-3.0.6.tgz' do
  destination '/root/mongodb-linux-x86_64-3.0.6'
end
# Make a system service.
poise_service 'mongodb' do
  provider :dummy
  command '/root/mongodb-linux-x86_64-3.0.6/bin/mongod'
end


text:
{extend name="default/template/base_index" /}

{block name="area_header"}
	<link type="text/css" rel="stylesheet" href="__CDN__/comp/wxuploader.css?v=__APP_VERSION__" />
	<link type="text/css" rel="stylesheet" href="__CDN__/jquery-uploadify/3.2.1/uploadify.css" />

{/block}

{block name="area_body"}
	{include file="default/Widget/topbar" /}

		{include file="default/Widget/left" /}

			{include file="default/Widget/breadcrumb" /}

			<form class="form-horizontal well wxaccountForm">
				<input type="hidden" name="id" value="{$wxaccount.id}"  />
				<fieldset>
					<legend>
						公众号资料-编辑</legend>

							 {:L('BTN_SAVE')}
							$wxaccount['id']))}" class="btn btn-default">公众号绑定信息

						公众号昵称

							<input type="text" value="{$wxaccount.wxname}" class="required form-control input-short" name="wxname" placeholder="请输入公众号昵称">

(公众号昵称)

						微信号

							<input type="text" value="{$wxaccount.weixin}"  class="required form-control input-short" name="weixin"placeholder="请输入微信号">

(微信号)

						原始ID

							<input type="text" value="{$wxaccount.wxuid}"  class="required form-control input-short" name="wxuid" placeholder="请输入原始ID">

(原始ID)

						二维码地址

							<input type="hidden" value="" id="qrcode_img" class="required form-control" name="qrcode"  placeholder="请输入二维码地址">

							<div class="wxuploaderimg clearfix <notempty name="wxaccount.qrcode">checked{/notempty}" data-maxitems="1">

									<notempty name="wxaccount.qrcode">

									{/notempty}

(二维码地址)

						头像地址

							<input type="text" value="{$wxaccount.headerpic}"  class="required form-control" name="headerpic"  placeholder="请输入头像地址">

(头像地址)

						公众号APPID

							<input type="text" value="{$wxaccount.appid}"  class="required form-control input-short" name="appid" placeholder="请输入公众号APPID">

(公众号APPID)

						公众号APPSECRET

							<input type="text" value="{$wxaccount.appsecret}"  class="required form-control" name="appsecret" placeholder="请输入公众号APPSECRET">

(公众号APPSECRET)

						EncodingAESKey

							<input type="text" readonly="readonly" value="{$wxaccount.encodingaeskey}"  class="required form-control" name="encodingAESKey" id="encodingAESKey" placeholder="请输入EncodingAESKey">
							 重新生成

(请慎重更改,更改后必须重新配置微信开发者中心中的服务器配置!)

							 {:L('BTN_SAVE')}

				</fieldset>
			</form>

			{include file="default/template/wxpicture" /}

{/block}

{block name="area_footer"}

{/block}


text:
using System.IO;
using System.Threading.Tasks;
using Microsoft.CodeAnalysis;
using NUnit.Framework;
using Testura.Code.Builders;
using Testura.Code.Compilations;

namespace Testura.Code.Tests.Compilation;

[TestFixture]
public class CompilerTests
{
    private Compiler _compiler;

    [OneTimeSetUp]
    public void SetUp()
    {
        _compiler = new Compiler(null);
    }

    [Test]
    public async Task CompileSourceAsync_WhenCompilingSource_ShouldGetADll()
    {
        var result = await _compiler.CompileSourceAsync(Path.Combine(TestContext.CurrentContext.TestDirectory, "test.dll"), new ClassBuilder("TestClass", "Test").Build().NormalizeWhitespace().ToString());
        Assert.IsNotNull(result.PathToDll);
        Assert.AreEqual(0, result.OutputRows.Count);
        Assert.IsTrue(result.Success);
    }

    [Test]
    public async Task CompileSourceAsync_WhenCompilingSourceWithError_ShouldGetListContainingErrors()
    {
        var result = await _compiler.CompileSourceAsync(Path.Combine(TestContext.CurrentContext.TestDirectory, "test.dll"), "gfdgdfgfdg");
        Assert.AreEqual(1, result.OutputRows.Count);
        Assert.IsFalse(result.Success);
    }

    [Test]
    public async Task CompileSourceInMemoryAsync_WhenCompilingSource_ShouldGetEmptyResultList()
    {
        var result = await _compiler.CompileSourceInMemoryAsync(new ClassBuilder("TestClass", "Test").Build().NormalizeWhitespace().ToString());
        Assert.AreEqual(0, result.OutputRows.Count);
        Assert.IsTrue(result.Success);
    }

    [Test]
    public async Task CompileSourceInMemoryAsync_WhenCompilingSourceWithError_ShouldGetListContainingErrors()
    {
        var result = await _compiler.CompileSourceInMemoryAsync("gfdgdfgfdg");
        Assert.AreEqual(1, result.OutputRows.Count);
        Assert.IsFalse(result.Success);
    }
}


text:
require 'rails_helper'

describe 'favicon.ico' do
  it 'is an asset' do
    expect(
      Rails.application.assets.find_asset('favicon.ico')
    )
      .to_not be_nil
  end
end


text:
{-# LANGUAGE PatternSynonyms #-}
--------------------------------------------------------------------------------
-- |
-- Module      :  Graphics.GL.EXT.TextureEnvCombine
-- Copyright   :  (c) Sven Panne 2019
-- License     :  BSD3
--
-- Maintainer  :  Sven Panne <svenpanne@gmail.com>
-- Stability   :  stable
-- Portability :  portable
--
--------------------------------------------------------------------------------

module Graphics.GL.EXT.TextureEnvCombine (
  -- * Extension Support
  glGetEXTTextureEnvCombine,
  gl_EXT_texture_env_combine,
  -- * Enums
  pattern GL_ADD_SIGNED_EXT,
  pattern GL_COMBINE_ALPHA_EXT,
  pattern GL_COMBINE_EXT,
  pattern GL_COMBINE_RGB_EXT,
  pattern GL_CONSTANT_EXT,
  pattern GL_INTERPOLATE_EXT,
  pattern GL_OPERAND0_ALPHA_EXT,
  pattern GL_OPERAND0_RGB_EXT,
  pattern GL_OPERAND1_ALPHA_EXT,
  pattern GL_OPERAND1_RGB_EXT,
  pattern GL_OPERAND2_ALPHA_EXT,
  pattern GL_OPERAND2_RGB_EXT,
  pattern GL_PREVIOUS_EXT,
  pattern GL_PRIMARY_COLOR_EXT,
  pattern GL_RGB_SCALE_EXT,
  pattern GL_SOURCE0_ALPHA_EXT,
  pattern GL_SOURCE0_RGB_EXT,
  pattern GL_SOURCE1_ALPHA_EXT,
  pattern GL_SOURCE1_RGB_EXT,
  pattern GL_SOURCE2_ALPHA_EXT,
  pattern GL_SOURCE2_RGB_EXT
) where

import Graphics.GL.ExtensionPredicates
import Graphics.GL.Tokens


text:
package com.diandi.demo.widget.gitonway.lee.niftynotification;

import com.diandi.demo.widget.gitonway.lee.niftynotification.effects.BaseEffect;
import com.diandi.demo.widget.gitonway.lee.niftynotification.effects.Flip;
import com.diandi.demo.widget.gitonway.lee.niftynotification.effects.Jelly;
import com.diandi.demo.widget.gitonway.lee.niftynotification.effects.Scale;
import com.diandi.demo.widget.gitonway.lee.niftynotification.effects.SlideIn;
import com.diandi.demo.widget.gitonway.lee.niftynotification.effects.SlideOnTop;
import com.diandi.demo.widget.gitonway.lee.niftynotification.effects.Standard;
import com.diandi.demo.widget.gitonway.lee.niftynotification.effects.ThumbSlider;

public enum Effects {
    standard(Standard.class),
    slideOnTop(SlideOnTop.class),
    flip(Flip.class),
    slideIn(SlideIn.class),
    jelly(Jelly.class),
    thumbSlider(ThumbSlider.class),
    scale(Scale.class);

    private Class<? extends BaseEffect> effectsClazz;

    private Effects(Class<? extends BaseEffect> mclass) {
        effectsClazz = mclass;
    }

    public BaseEffect getAnimator() {
        BaseEffect bEffects = null;
        try {
            bEffects = effectsClazz.newInstance();
        } catch (ClassCastException e) {
            throw new Error("Can not init animatorClazz instance");
        } catch (InstantiationException e) {
            // TODO Auto-generated catch block
            throw new Error("Can not init animatorClazz instance");
        } catch (IllegalAccessException e) {
            // TODO Auto-generated catch block
            throw new Error("Can not init animatorClazz instance");
        }
        return bEffects;
    }
}


text:
/* @flow */
import { builders as b } from 'ast-types';
import isEmptyObject from 'is-empty-object';
import resolveShapeRef from './resolveShapeRef';
import translateShapeRef from './translateShapeRef';
import simpleTypeAnnotation from './simpleTypeAnnotation';
import { entries, values } from './utils';
import stringEscape from 'js-string-escape';
import invariant from 'invariant';
import { isPascalCase } from 'casey-js';

export default function translateShape (shapeOrRef: ?(ShapeRef | ShapeDef), shapes: Shapes, scope: string) {
  const next = (nextRef: ?(ShapeRef | ShapeDef)) => translateShape(nextRef, shapes, scope);
  if (shapeOrRef && typeof shapeOrRef.shape === 'string') {
    // $FlowIssue: Flow 0.30 doesn't agree that shapeOrRef is a ShapeRef here
    return translateShapeRef((shapeOrRef: ShapeRef), shapes, scope);
  }
  const shape = resolveShapeRef(shapeOrRef, shapes, scope);
  if (!shape) return b.voidTypeAnnotation();
  if (isEmptyObject(shape)) {
    return b.stringTypeAnnotation();
  }
  /*
  structure
string
boolean
string with enum
string with min/max
list
integer
timestamp
map
blob*/
  switch (shape.type) {
    case 'structure': {
      const { members, required } = shape;
      const asDiscriminatedUnion = tryTranslateDiscriminatedUnion(shape, shapes, scope);
      if (asDiscriminatedUnion) {
        return asDiscriminatedUnion;
      }
      return b.objectTypeAnnotation(
        entries(members)
        .map(([key, member]: [string, ShapeRef | ShapeDef]) => {
          const optional = !required || required.indexOf(key) === -1;
          return b.objectTypeProperty(b.identifier(key), next(member), optional);
        })
      );
    }
    case 'list': {
      const { member } = shape;
      return b.arrayTypeAnnotation(next(member));
    }
    case 'map': {
      const { key, value } = shape;
      return b.objectTypeAnnotation(
        [], /* properties */
        [
          b.objectTypeIndexer(b.identifier('key'),
          next(key),
          next(value))
        ]
      );
    }
    case 'blob':
      return b.unionTypeAnnotation(['Buffer', '$TypedArray', 'Blob'].map(simpleTypeAnnotation).concat(b.stringTypeAnnotation()));
    case 'integer':
    /* falls through */
    case 'long':
    /* falls through */
    case 'double':
    /* falls through */
    case 'float':
      return b.numberTypeAnnotation();
    case 'boolean':
      return b.booleanTypeAnnotation();
    case 'timestamp':
      return simpleTypeAnnotation('Date');
    case 'string': {
      if (shape.enum) {
        return b.unionTypeAnnotation(shape.enum.map(makeStringLiteralType));
      }
      return b.stringTypeAnnotation();
    }
    default:
      throw new Error(shape.type);
  }
}

function makeStringLiteralType (value) {
  return b.stringLiteralTypeAnnotation(value, "'" + stringEscape(value) + "'");
}

function tryTranslateDiscriminatedUnion (shape: ShapeDef, shapes: Shapes, scope: string) {
  const next = (nextRef: ?(ShapeRef | ShapeDef)) => translateShape(nextRef, shapes, scope);
  invariant(shape.type === 'structure', 'Only structures can be discriminated unions');
  if (!shape.required) {
    // the discriminant must be a required member
    return null;
  }
  const { members, required } = shape;
  const enumCandidates = shape.required.map(enumKey => {
    const discriminantShape = resolveShapeRef(members[enumKey], shapes, scope);
    if (!discriminantShape) return null;
    if (isEmptyObject(discriminantShape)) return null;
    if (discriminantShape.type === 'string' && discriminantShape.enum) {
      const { enum: enumValues } = discriminantShape;
      if (!enumValues.every(enumValue => enumValue && isPascalCase(enumValue))) {
        return;
      }
      const payloadCandidates = enumValues.map(enumValue =>
        Object.keys(members).filter(
          candidateKey => candidateKey.startsWith(enumValue[0].toLowerCase() + enumValue.substring(1))
        )
      );
      if (!payloadCandidates.every(candidates => candidates.length === 1)) {
        return null;
      }
      let tailCandidate = '';
      const payloadKeys = payloadCandidates.map(ck => ck[0]);
      const enumMapping = {};
      for (let i = 0; i < enumValues.length; ++i) {
        const enumValue = enumValues[i];
        const candidateKey = payloadKeys[i];
        const tail = candidateKey.substring(enumValue.length);
        if (tailCandidate && tail !== tailCandidate) {
          return null;
        }
        if (required.indexOf(candidateKey) !== -1) {
          return null;
        }
        tailCandidate = tail;
        enumMapping[enumValue] = candidateKey;
      }
      return {key: enumKey, mapping: enumMapping};
    }
    return null;
  }).filter(Boolean);
  if (enumCandidates.length !== 1) {
    return null;
  }
  const [{key: enumKey, mapping: enumMapping}] = enumCandidates;
  const payloadKeys = values(enumMapping);
  const commonPart = b.objectTypeAnnotation(
    entries(members)
      .filter(([key]) => key !== enumKey && payloadKeys.indexOf(key) === -1)
      // $FlowFixMe: why does Flow 0.30 not like this?
      .map(([key, member]: [string, ShapeRef | ShapeDef]) => {
        const optional = !required || required.indexOf(key) === -1;
        return b.objectTypeProperty(b.identifier(key), next(member), optional);
      })
  );
  const discriminatedParts = entries(enumMapping).map(([enumValue, payloadKey]) =>
    b.objectTypeAnnotation([
      b.objectTypeProperty(b.identifier(enumKey), makeStringLiteralType(enumValue), false),
      b.objectTypeProperty(b.identifier(payloadKey), next(members[payloadKey]), false)
    ])
  );
  return flattenIntersection(b.intersectionTypeAnnotation([commonPart, b.unionTypeAnnotation(discriminatedParts)]));
}

function flattenIntersection (intersectionType) {
  invariant(intersectionType.type === 'IntersectionTypeAnnotation', 'Not an intersection type');
  invariant(intersectionType.types.length === 2, 'Expected an intersection of two types');
  invariant(intersectionType.types[0].type === 'ObjectTypeAnnotation', 'First type should be the common part, an object type');
  invariant(intersectionType.types[1].type === 'UnionTypeAnnotation', 'Second type should be a union');
  invariant(intersectionType.types[1].types.every(memberType => memberType.type === 'ObjectTypeAnnotation'), 'Second type must be a union of object types');
  const [commonPart, {types: discriminatedParts}] = intersectionType.types;
  return b.unionTypeAnnotation(discriminatedParts.map(part => ({
    type: 'ObjectTypeAnnotation',
    properties: [...commonPart.properties, ...part.properties],
    indexers: [...commonPart.indexers, ...part.indexers],
    callProperties: [...commonPart.callProperties, ...part.callProperties]
  })));
}


text:
window.beautify = function(func) {
  var code = func.toString();
  code = code.substring(code.indexOf('\n'));
  code = code.substring(0, code.lastIndexOf('return'));
  code = code.replace(/var lorem = \"[^\"]*"/, 'var lorem = "Lorem ipsum dolor sit..."');
  code = js_beautify(code, {
    indent_size : 2
  });
  return code;
};

window.addExample = function(container, func) {
  // remove function wrapper and return statement
  // from the code, then format it
  var code = beautify(func);

  var example = $.el.div(
    $.el.div({className : 'code'},
      $.el.pre({className : 'prettyprint'}, code)),
    $.el.div({className : 'result'},
      func().el),
    $.el.br({style : 'clear:both'}));

    var ref = $('.options', $(container)[0])[0];
    if(ref) {
      $(container)[0].insertBefore(example, ref);
    }
    else {
      $(container)[0].appendChild(example);
    }
};

$(window).load(function() {
  // setup sample data
  setTimeout(prettyPrint, 0);

  var func = function() {
    window.regions = new Backbone.Collection([{
      name : 'Americas',
      notes : 'Bright'
    }, {
      name : 'Africa',
      notes : 'Fruity'
    }]);

    window.coffee = new Backbone.Model({
      roaster: 'Counter Culture',
      name: 'Baroida',
      roastedOn: new Date(2012, 2, 28, 6, 30),
      acidic : true,
      region : regions.at(0)
    });

    return;
  };

  func();

  $.el.pre({className : 'prettyprint'}, beautify(func)).appendTo($('#setup_code')[0]);

  // keep example state display data updated
  var dataEl = $('#example_data')[0];
  $(dataEl).hide();
  var stateEl = $('#example_state')[0];
  var renderState = function() {
    $(stateEl).empty();
    var json = (JSON.stringify(coffee.attributes, null, 2));
    json = json.substring(json.indexOf('\n')).substring(0, json.lastIndexOf('\n'));
    json = json.replace(/(\r\n|\n|\r)/gm, '<br/>');
    var div = $.el.div();
    div.innerHTML = json;
    stateEl.appendChild(div);

    if(!$(dataEl).is(":visible")) {
      $(dataEl).fadeIn();
    }
  };

  var closeLink = $('#close_example')[0];
  $(closeLink).click(function() {
    $(dataEl).fadeOut();
    return false;
  });

  coffee.bind('change', renderState);
  regions.bind('change', renderState);

  // task example
  var taskFunc = function() {
    // create a sorted backbone collection to store our tasks
    var tasks = new Backbone.Collection([], {
      comparator : function(task) {
        return task.get('done') ? 1 : 0;
      }
    });

    // define how each individual task should render
    var TaskView = Backbone.View.extend({
      render : function() {
        $(this.el).empty();

        // add a link to remove this task from the list
        this.el.appendChild(new Backbone.UI.Link({
          content : 'delete',
          onClick : _(tasks.remove).bind(tasks, this.model)
        }).render().el);

        // a checkbox to mark / unmark the done status of this task
        this.el.appendChild(new Backbone.UI.Checkbox({
          model : this.model,
          labelContent : 'title',
          content : 'done'
        }).render().el);
      }
    });

    // create our list view to render our collection
    var list = new Backbone.UI.List({
      itemView : TaskView,
      model : tasks
    }).render();

    // create a text field to add new items
    var newItem = new Backbone.Model;
    var field = new Backbone.UI.TextField({
      model : newItem,
      content : 'title',
      placeholder : 'add a new item',
      onKeyPress : function(e) {
        if(e.keyCode == 13) {
          list.options.model.add(newItem.clone());
          newItem.set({ title : undefined });
        }
      }
    }).render();

    var appEl = $.el.div(field.el, list.el);

    return appEl;
  };

  var code = taskFunc.toString();
  code = code.substring(code.indexOf('\n'));
  code = code.substring(0, code.lastIndexOf('return'));

  code = js_beautify(code, {
    indent_size : 2
  });

  $.el.pre({className : 'prettyprint'}, code).appendTo($('#task_list_code')[0]);

  var result = taskFunc();
  $('#task_list_result')[0].appendChild(result);

  // theming
  Backbone.UI.setSkin('perka');
});


text:
package org.apache.accumulo.core.util;

import java.util.ArrayList;
import java.util.HashSet;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.Map.Entry;
import java.util.SortedMap;
import java.util.SortedSet;
import java.util.TreeMap;

import org.apache.accumulo.core.Constants;
import org.apache.accumulo.core.client.AccumuloException;
import org.apache.accumulo.core.client.AccumuloSecurityException;
import org.apache.accumulo.core.client.Instance;
import org.apache.accumulo.core.client.Scanner;
import org.apache.accumulo.core.client.TableNotFoundException;
import org.apache.accumulo.core.client.impl.Tables;
import org.apache.accumulo.core.data.Key;
import org.apache.accumulo.core.data.KeyExtent;
import org.apache.accumulo.core.data.PartialKey;
import org.apache.accumulo.core.data.Range;
import org.apache.accumulo.core.data.Value;
import org.apache.accumulo.core.security.CredentialHelper;
import org.apache.accumulo.core.security.thrift.TCredentials;
import org.apache.hadoop.io.Text;

public class MetadataTable {
  public static class DataFileValue {
    private long size;
    private long numEntries;
    private long time = -1;

    public DataFileValue(long size, long numEntries, long time) {
      this.size = size;
      this.numEntries = numEntries;
      this.time = time;
    }

    public DataFileValue(long size, long numEntries) {
      this.size = size;
      this.numEntries = numEntries;
      this.time = -1;
    }

    public DataFileValue(byte[] encodedDFV) {
      String[] ba = new String(encodedDFV).split(",");

      size = Long.parseLong(ba[0]);
      numEntries = Long.parseLong(ba[1]);

      if (ba.length == 3)
        time = Long.parseLong(ba[2]);
      else
        time = -1;
    }

    public long getSize() {
      return size;
    }

    public long getNumEntries() {
      return numEntries;
    }

    public boolean isTimeSet() {
      return time >= 0;
    }

    public long getTime() {
      return time;
    }

    public byte[] encode() {
      if (time >= 0)
        return ("" + size + "," + numEntries + "," + time).getBytes();
      return ("" + size + "," + numEntries).getBytes();
    }

    public boolean equals(Object o) {
      if (o instanceof DataFileValue) {
        DataFileValue odfv = (DataFileValue) o;

        return size == odfv.size && numEntries == odfv.numEntries;
      }

      return false;
    }

    public int hashCode() {
      return Long.valueOf(size + numEntries).hashCode();
    }

    public String toString() {
      return size + " " + numEntries;
    }

    public void setTime(long time) {
      if (time < 0)
        throw new IllegalArgumentException();
      this.time = time;
    }
  }

  public static Pair<SortedMap<KeyExtent,Text>,List<KeyExtent>> getMetadataLocationEntries(SortedMap<Key,Value> entries) {
    Key key;
    Value val;
    Text location = null;
    Value prevRow = null;
    KeyExtent ke;

    SortedMap<KeyExtent,Text> results = new TreeMap<KeyExtent,Text>();
    ArrayList<KeyExtent> locationless = new ArrayList<KeyExtent>();

    Text lastRowFromKey = new Text();

    // text obj below is meant to be reused in loop for efficiency
    Text colf = new Text();
    Text colq = new Text();

    for (Entry<Key,Value> entry : entries.entrySet()) {
      key = entry.getKey();
      val = entry.getValue();

      if (key.compareRow(lastRowFromKey) != 0) {
        prevRow = null;
        location = null;
        key.getRow(lastRowFromKey);
      }

      colf = key.getColumnFamily(colf);
      colq = key.getColumnQualifier(colq);

      // interpret the row id as a key extent
      if (colf.equals(Constants.METADATA_CURRENT_LOCATION_COLUMN_FAMILY) || colf.equals(Constants.METADATA_FUTURE_LOCATION_COLUMN_FAMILY)) {
        if (location != null) {
          throw new IllegalStateException("Tablet has multiple locations : " + lastRowFromKey);
        }
        location = new Text(val.toString());
      } else if (Constants.METADATA_PREV_ROW_COLUMN.equals(colf, colq)) {
        prevRow = new Value(val);
      }

      if (prevRow != null) {
        ke = new KeyExtent(key.getRow(), prevRow);
        if (location != null)
          results.put(ke, location);
        else
          locationless.add(ke);

        location = null;
        prevRow = null;
      }
    }

    return new Pair<SortedMap<KeyExtent,Text>,List<KeyExtent>>(results, locationless);
  }

  public static SortedMap<Text,SortedMap<ColumnFQ,Value>> getTabletEntries(SortedMap<Key,Value> tabletKeyValues, List<ColumnFQ> columns) {
    TreeMap<Text,SortedMap<ColumnFQ,Value>> tabletEntries = new TreeMap<Text,SortedMap<ColumnFQ,Value>>();

    HashSet<ColumnFQ> colSet = null;
    if (columns != null) {
      colSet = new HashSet<ColumnFQ>(columns);
    }

    for (Entry<Key,Value> entry : tabletKeyValues.entrySet()) {

      if (columns != null && !colSet.contains(new ColumnFQ(entry.getKey()))) {
        continue;
      }

      Text row = entry.getKey().getRow();

      SortedMap<ColumnFQ,Value> colVals = tabletEntries.get(row);
      if (colVals == null) {
        colVals = new TreeMap<ColumnFQ,Value>();
        tabletEntries.put(row, colVals);
      }

      colVals.put(new ColumnFQ(entry.getKey()), entry.getValue());
    }

    return tabletEntries;
  }

  public static void getEntries(Instance instance, TCredentials credentials, String table, boolean isTid, Map<KeyExtent,String> locations,
      SortedSet<KeyExtent> tablets) throws AccumuloException, AccumuloSecurityException, TableNotFoundException {
    String tableId = isTid ? table : Tables.getNameToIdMap(instance).get(table);

    Scanner scanner = instance.getConnector(credentials.getPrincipal(), CredentialHelper.extractToken(credentials)).createScanner(Constants.METADATA_TABLE_NAME, Constants.NO_AUTHS);

    Constants.METADATA_PREV_ROW_COLUMN.fetch(scanner);
    scanner.fetchColumnFamily(Constants.METADATA_CURRENT_LOCATION_COLUMN_FAMILY);

    // position at first entry in metadata table for given table
    KeyExtent ke = new KeyExtent(new Text(tableId), new Text(), null);
    Key startKey = new Key(ke.getMetadataEntry());
    ke = new KeyExtent(new Text(tableId), null, null);
    Key endKey = new Key(ke.getMetadataEntry()).followingKey(PartialKey.ROW);
    scanner.setRange(new Range(startKey, endKey));

    Text colf = new Text();
    Text colq = new Text();

    KeyExtent currentKeyExtent = null;
    String location = null;
    Text row = null;
    // acquire this tables METADATA table entries
    boolean haveExtent = false;
    boolean haveLocation = false;
    for (Entry<Key,Value> entry : scanner) {
      if (row != null) {
        if (!row.equals(entry.getKey().getRow())) {
          currentKeyExtent = null;
          haveExtent = false;
          haveLocation = false;
          row = entry.getKey().getRow();
        }
      } else
        row = entry.getKey().getRow();

      colf = entry.getKey().getColumnFamily(colf);
      colq = entry.getKey().getColumnQualifier(colq);

      // stop scanning metadata table when another table is reached
      if (!(new KeyExtent(entry.getKey().getRow(), (Text) null)).getTableId().toString().equals(tableId))
        break;

      if (Constants.METADATA_PREV_ROW_COLUMN.equals(colf, colq)) {
        currentKeyExtent = new KeyExtent(entry.getKey().getRow(), entry.getValue());
        tablets.add(currentKeyExtent);
        haveExtent = true;
      } else if (colf.equals(Constants.METADATA_CURRENT_LOCATION_COLUMN_FAMILY)) {
        location = entry.getValue().toString();
        haveLocation = true;
      }

      if (haveExtent && haveLocation) {
        locations.put(currentKeyExtent, location);
        haveExtent = false;
        haveLocation = false;
        currentKeyExtent = null;
      }
    }

    validateEntries(tableId, tablets);
  }

  public static void validateEntries(String tableId, SortedSet<KeyExtent> tablets) throws AccumuloException {
    // sanity check of metadata table entries
    // make sure tablets has no holes, and that it starts and ends w/ null
    if (tablets.size() == 0)
      throw new AccumuloException("No entries found in metadata table for table " + tableId);

    if (tablets.first().getPrevEndRow() != null)
      throw new AccumuloException("Problem with metadata table, first entry for table " + tableId + "- " + tablets.first() + " - has non null prev end row");

    if (tablets.last().getEndRow() != null)
      throw new AccumuloException("Problem with metadata table, last entry for table " + tableId + "- " + tablets.first() + " - has non null end row");

    Iterator<KeyExtent> tabIter = tablets.iterator();
    Text lastEndRow = tabIter.next().getEndRow();
    while (tabIter.hasNext()) {
      KeyExtent tabke = tabIter.next();

      if (tabke.getPrevEndRow() == null)
        throw new AccumuloException("Problem with metadata table, it has null prev end row in middle of table " + tabke);

      if (!tabke.getPrevEndRow().equals(lastEndRow))
        throw new AccumuloException("Problem with metadata table, it has a hole " + tabke.getPrevEndRow() + " != " + lastEndRow);

      lastEndRow = tabke.getEndRow();
    }

    // end METADATA table sanity check
  }

  public static boolean isContiguousRange(KeyExtent ke, SortedSet<KeyExtent> children) {
    if (children.size() == 0)
      return false;

    if (children.size() == 1)
      return children.first().equals(ke);

    Text per = children.first().getPrevEndRow();
    Text er = children.last().getEndRow();

    boolean perEqual = (per == ke.getPrevEndRow() || per != null && ke.getPrevEndRow() != null && ke.getPrevEndRow().compareTo(per) == 0);

    boolean erEqual = (er == ke.getEndRow() || er != null && ke.getEndRow() != null && ke.getEndRow().compareTo(er) == 0);

    if (!perEqual || !erEqual)
      return false;

    Iterator<KeyExtent> iter = children.iterator();

    Text lastEndRow = iter.next().getEndRow();

    while (iter.hasNext()) {
      KeyExtent cke = iter.next();

      per = cke.getPrevEndRow();

      // something in the middle should not be null

      if (per == null || lastEndRow == null)
        return false;

      if (per.compareTo(lastEndRow) != 0)
        return false;

      lastEndRow = cke.getEndRow();
    }

    return true;
  }

}


text:
SRCS=AudioPluginUtil.cpp \
Plugin_ConvolutionReverb.cpp \
Plugin_CorrelationMeter.cpp \
Plugin_Equalizer.cpp \
Plugin_Granulator.cpp \
Plugin_ImpulseGenerator.cpp \
Plugin_ImpactGenerator.cpp \
Plugin_LevelMixer.cpp \
Plugin_Lofinator.cpp \
Plugin_LoudnessMeter.cpp \
Plugin_ModalFilter.cpp \
Plugin_Multiband.cpp \
Plugin_NoiseBox.cpp \
Plugin_Oscilloscope.cpp
Plugin_PitchDetector.cpp \
Plugin_RingModulator.cpp \
Plugin_Routing.cpp \
Plugin_Spatializer.cpp \
Plugin_SpatializerReverb.cpp \
Plugin_StereoWidener.cpp \
Plugin_Synthesizer.cpp \
Plugin_TeeBee.cpp \
Plugin_TeeDee.cpp \
Plugin_Teleport.cpp \
Plugin_TubeResonator.cpp \
Plugin_Vocoder.cpp \
Plugin_WahWah.cpp \
hrtftable.cpp
OBJS=$(SRCS:.cpp=*.o)
OUTPUT=libAudioPluginDemo.so
CXXFLAGS=-I. -O2 -fPIC
LDFLAGS=-shared -rdynamic -fPIC
CXX=g++

all: $(OUTPUT)
clean:
	rm -f $(OUTPUT) $(OBJS)

$(OUTPUT): $(OBJS)
	$(CXX) $(LDFLAGS) -o $(OUTPUT) $(OBJS)

.cpp.o:
	$(CXX) $(CXXFLAGS) -c $<


text:
SYNONYM

#### According to
Index Fungorum

#### Published in
null

#### Original name
Zeora cerina var. chlorina Flot.

### Remarks
null


text:
class A {

    var int n;

    dynamic int getN() {
        return n;
    }
}

class B extends A {

    dynamic void printN(int num)
    {
        n = num;		// las variables de instancia heredadas
			        // no pueden accederse
    }

    static void main() {}
}


text:
export default {
  'locale': 'es',
  'messages': {
    // Login
    'login': {
      'signIn': 'Registrarse',
      'wrong': '¿Equivocado?',
      'phone': 'Número de móvil',
      'email': 'Dirección de email',
      'authCode': 'Código verificación',
      'yourName': 'Su nombre',
      'errors': {
        'numberInvalid': 'Número no válido',
        'nameInvalid': 'Nombre no válido',
        'codeInvalid': 'Código no válido',
        'codeExpired': 'Código experido',
        'codeWait': 'Vulve a solicitar pasado un minuto'
      },
      'welcome': {
        'header': '{appName} Mensajería, gratis, y veloz.',
        'text': '
Siente la libertad de comunicar desde cualquier dispositivo, móvil, pc, mac o tablets desde cualquier lugar del mundo solo con conexión wifi, 3G o 4G.
' +
                '
Olvida para siempre el viejo correo electrónico y mensajes para tu negocio. {appName} plataforma centra todo en una sola aplicación.
'
      }
    },

    // Menus
    'menu': {
      // Sidebar menu
      'editProfile': 'Editar perfil',
      'addToContacts': 'Añadir contacto',
      'createGroup': 'Crear grupo',
      'helpAndFeedback': 'Ayuda',
      'twitter': 'Nuestro Twitter',
      'preferences': 'Preferencias',
      'signOut': 'Salir',
      'homePage': 'Portada del sitio'
    },

    // Buttons
    'button': {
      'ok': 'Ok',
      'cancel': 'Cancelar',
      'done': 'Hecho',
      'requestCode': 'Solicitar código',
      'checkCode': 'Comprobar código',
      'signUp': 'Registrarse',
      'add': 'Añadir',
      'send': 'enviar',
      'sendAll': 'Enviará toda',
      'createGroup': 'Crear grupo',
      'addMembers': 'Añadir miembros',
      'quickSearch': 'Búsqueda rápida',
      'close': 'Cerca',
      'save': 'Guardar',
      'call': 'Llamada',
      'archive': 'Todos'
    },

    // Messages
    'message': {
      'pin': 'Alfiler',
      'reply': 'Responda',
      'forward': 'Reenviar',
      'download': 'Descargar',
      'delete': 'Eliminar',
      'quote': 'Citar',
      'uploading': 'Carga...',
      'welcome': {
        'private': '
Este es el inicio de tu conversación privada con {name}.

Todos los mensajes son encriptados entre los dos usuarios.
',
        'group': {
          'main': '
Este es el principio de {name} grupo de conversación que creado por {creator}.
',
          'you': 'usted',
          'actions': {
            'start': 'Puede invitar ',
            'end': ' a esta conversación.',
            'invite': 'a más usuarios'
          }
        }
      },
      'loading': 'Cargando historial de mensajes'
    },

    // Connection state
    'connectionState': {
      'connecting': '¡Houston, tenemos un problema! Conexión con {appName} servidor se pierde. Intentando reconectar ahora...',
      'online': 'Estás de vuelta en línea!',
      'updating': ''
    },

    // Compose
    'compose': {
      'attach': 'Adjuntar',
      'sendFile': 'Enviar archivo',
      'sendPhoto': 'Enviar foto',
      'send': 'Enviar',
      'markdown': {
        'bold': 'negrita',
        'italic': 'cursiva',
        'preformatted': 'preformateado'
      },
      'dropzone': 'Colocar aquí para enviar.',
      'start': 'Empezar',
      'unblock': 'Desbloquear usuario'
    },

    // Modals
    'modal': {
      'profile': {
        'title': 'Perfil',
        'name': 'Nombre completo',
        'nick': 'Nick usuario',
        'phone': 'Número de móvil',
        'email': 'Email',
        'about': 'Estado',
        'avatarChange': 'Cambiar avatar',
        'avatarRemove': 'Eliminar'
      },
      'group': {
        'title': 'Editar grupo',
        'name': 'Nombre del grupo',
        'about': 'Grupo acerca de',
        'avatarChange': 'Cambiar avatar',
        'avatarRemove': 'Eliminar'
      },
      'crop': {
        'title': 'Recortar la imagen'
      },
      'contacts': {
        'title': 'Personas',
        'search': 'Buscar contactos',
        'notFound': 'Lo sentimos, no hay usuarios encontrados.',
        'loading': 'Cargando'
      },
      'groups': {
        'title': 'Grupos',
        'search': 'Buscar',
        'loading': 'Cargando',
        'notFound': 'No se han encontrado coincidencias {query}.'
      },
      'attachments': {
        'title': 'Envier archivo',
        'name': 'Nombre del archivo',
        'type': 'Tipo',
        'size': 'Tamaño',
        'extra': 'Extra',
        'sendAsPicture': 'Enviar esta imagen'
      },
      'addContact': {
        'title': 'Añadir contacto',
        'query': 'Correo electrónico, teléfono o sobrenombre',
        'phone': 'Número de móvil',
        'notFound': 'El usuario con dichos datos no se encuentra',
        'empty': 'Comience a escribir para buscar personas',
        'searching': 'Buscar "{query}"'
      },
      'createGroup': {
        'title': 'Crear grupo',
        'groupName': 'Nombre de grupo'
      },
      'quickSearch': {
        'title': 'Buscar en todas partes',
        'placeholder': 'Empieza a escribir',
        'toNavigate': 'para navegar',
        'toSelect': 'para seleccionar',
        'toClose': 'para cerrar',
        'openDialog': 'Abrir conversación',
        'startDialog': 'Comenzar una nueva conversación',
        'notFound': 'No se han encontrado coincidencias {query}.
Tiene escrito correctamente?'
      },
      'confirm': {
        'logout': '¿De verdad quieres salir?',
        'user': {
          'clear': '¿Realmente desea borrar esta conversación?',
          'delete': '¿De verdad quiere eliminar esta conversación?',
          'block': '¿Usted realmente desea bloquear {name}?',
          'removeContact': '¿De verdad quiere eliminar {name} de tus contactos?'
        },
        'group': {
          'clear': '¿Realmente desea borrar esta conversación?',
          'delete': '¿De verdad quiere eliminar esta conversación?',
          'leave': '¿De verdad quieres salir de esta conversación?',
          'kick': '¿Seguro que deseas expulsar a {name}'
        },
        'nonContactHide': {
          'title': '¿Está seguro de que desea ocultar esta conversación?',
          'body': 'Usuario {name} no está en su lista de contactos.'
        }
      }
    },

    // Profiles
    'profile': {
      'email': 'correo electrónico',
      'phone': 'móvil',
      'nickname': 'nick usuario',
      'about': 'estado'
    },
    'createdBy': 'сreado por',
    'addPeople': 'Añadir personas',
    'more': 'Más',
    'actions': 'Acciones',
    'addToContacts': 'Añadir contactos',
    'removeFromContacts': 'Eliminar de los contactos',
    'setGroupPhoto': 'Establecer foto de Grupo',
    'addIntegration': 'Añadir Integración de Servicios',
    'editGroup': 'Editar grupo',
    'clearGroup': 'Limpiar grupo',
    'deleteGroup': 'Eliminar grupo',
    'clearConversation': 'Limpiar Conversación',
    'deleteConversation': 'Eliminar Conversación',
    'blockUser': 'Bloquear usuario',
    'unblockUser': 'Desbloquear usuario',
    'leaveGroup': 'Abandonar grupo',
    'sharedMedia': 'Medios compartidos',
    'notifications': 'Notificationes',
    'integrationTokenCopied': 'Enlace Integración copiado.',
    'members': '{numMembers, plural,' +
      '=0 {Sin Miembros}' +
      '=1 {# Miembro}' +
      'other {# Miembros}' +
    '}',
    'kick': 'Expulsar',
    'integrationToken': 'Integration Token',
    'integrationTokenHint': 'If you have programming chops, or know someone who does, this integration token allow the most flexibility and communication with your own systems.',
    'integrationTokenHelp': 'Learn how to integrate',

    // Sidebar
    'sidebar': {
      'recents': {
        'groups': 'Grupos',
        'privates': 'Mensajes directos',
        'history': 'Historial'
      },
      'group': {
        'empty': 'Crea tu primer grupo de conversación'
      },
      'private': {
        'empty': 'No hay nadie en su red'
      }
    },

    'main': {
      'empty': 'Seleccione diálogo o iniciar uno nuevo.',
      'install': '
Versión Web de {appName} Versión solo para navegadores
' +
                 '
Link de aplicaciones móviles {appName}.
',
      'deactivated': {
        'header': 'Pestaña desactivada',
        'text': 'Vaya, ha abierto otra sesión con {appName}, así que tuvimos que desactivar ésta para evitar posibles errores.'
      }
    },

    preferences: {
      title: 'Preferencias',
      general: {
        title: 'General',
        send: {
          title: 'Enviar mensaje',
          sendMessage: 'enviar mensaje',
          newLine: 'nueva línea'
        }
      },
      notifications: {
        title: 'Notificaciones & Sonidos',
        effects: {
          title: 'Efectos',
          enable: 'Habilitar efectos de sonido'
        },
        notification: {
          title: 'Notificaciones',
          enable: 'Habilitar notificaciones de grupo',
          onlyMentionEnable: 'Habilitar notificaciones solo por mención',
          onlyMentionHint: 'Puedes activar las notificaciones sólo para mensajes que contiene lo que mencionas.'
        },
        privacy: {
          title: 'Privacidad',
          messagePreview: 'Mensaje de previsualización',
          messagePreviewHint: 'Retire el texto del mensaje de notificaciones.'
        }
      },
      security: {
        title: 'Seguridad',
        sessions: {
          title: 'Sesiones activas',
          current: 'Sesión actual',
          authTime: 'Fecha de acceso',
          terminate: 'Eliminar',
          terminateAll: 'Terminar todas las sesiones'
        }
      },
      blocked: {
        title: 'Los Usuarios Bloqueados',
        notExists: 'Aún no bloquear a nadie.',
        notFound: 'Lo sentimos, no se encontraron usuarios.',
        search: 'Búsqueda de contactos o nombres de usuario',
        unblock: 'Desbloquear'
      },
      about: {
        title: 'About'
      }
    },

    invite: {
      title: 'Añadir más personas',
      search: 'Búsqueda de contactos o nombres de usuario',
      notFound: 'Lo sentimos, no hay usuarios localizados.',
      inviteByLink: 'Invitar al grupo por enlace',
      byLink: {
        title: 'Invitar por enlace',
        description: 'Cualquier persona en la web será capaz de unirse a "{groupName}" abriendo este enlace:',
        copy: 'Copiar enlace',
        copied: 'Enlace Invitación copiado.',
        revoke: 'Revocar enlace'
      }
    },

    call: {
      outgoing: 'Llamada saliente',
      incoming: 'Llamada entrante',
      mute: 'Silenciar',
      unmute: 'Activado',
      answer: 'Responder',
      decline: 'Disminución',
      end: 'Llamada finalizada',
      addUser: 'Añadir usury',
      fullScreen: 'Pantalla completa',
      video: 'Vídeo',
      state: {
        calling: 'Llamada',
        connecting: 'Conectando',
        in_progress: 'Llamada activa: {time}',
        ended: 'Llamada finalizada'
      }
    },

    context: {
      favorite: {
        add: 'Favorito',
        remove: 'Eliminar de favoritos'
      },
      archive: 'Enviar a archivar',
      delete: 'Eliminar'
    },
    search: {
      'placeholder': 'Buscar',
      'hint': '
Búsqueda rápida

Puede buscar contactos, diálogos, o mensajes de los actuales diálogos aquí.
'
    }
  }
};


text:
package com.oboenikui.othello;

import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;
import java.util.ArrayList;
import java.util.List;

public class SQLiteDb {
    public static final int DB_VERSION = 2;
    public static final String TABLE_DATA =         "data";
    public static final String COLUMN_PATTERN =     "pattern";
    public static final String COLUMN_WIN =         "win";
    public static final String COLUMN_LOSE =        "lose";
    public static final String COLUMN_NEXT_X =      "next_x";
    public static final String COLUMN_NEXT_Y =      "next_y";

    public static final String SQL_CREATE_DATA =
            "CREATE TABLE " + TABLE_DATA + "(" +
                    COLUMN_PATTERN +     " TEXT," +
                    COLUMN_WIN +        " INTEGER," +
                    COLUMN_LOSE +       " INTEGER," +
                    COLUMN_NEXT_X +     " INTEGER," +
                    COLUMN_NEXT_Y +     " INTEGER);";

    public static final String TABLE_VERSION =      "version";
    public static final String COLUMN_VERSION =     "version";
    public static final String SQL_CREATE_VERSION =
            "CREATE TABLE " + TABLE_VERSION + "(" +
                    COLUMN_VERSION +    " INTEGER);";
    private Connection connection;
    private static Statement statement;
    private static SQLiteDb mSQLiteDb = null;
    private static final String SQLITE_CONNECTION = "jdbc:sqlite:data.db";

    public static SQLiteDb getInstance(){
        if(mSQLiteDb==null){
            return mSQLiteDb = new SQLiteDb();
        } else {
            return mSQLiteDb;
        }
    }

    private SQLiteDb(){
        try {
            Class.forName("org.sqlite.JDBC");
            connection = DriverManager.getConnection(SQLITE_CONNECTION);
            statement = connection.createStatement();
            createTables();

        } catch (SQLException e) {
            e.printStackTrace();
        } catch (ClassNotFoundException e) {
            e.printStackTrace();
        }
    }

    public void insertData(String pattern, int x, int y, boolean iswon) throws SQLException{
        String[] patterns = OthelloData.getOthelloPatterns(pattern);
        int[] xs = OthelloData.getXs(x, y);
        int[] ys = OthelloData.getYs(x, y);
        String query = "SELECT * FROM "+TABLE_DATA+" WHERE ";
        for(int i=0;i<8;i++){
            query += "("+COLUMN_PATTERN + "='" + patterns[i] +"' and "+COLUMN_NEXT_X+"="+xs[i]+" and "+COLUMN_NEXT_Y+"="+ys[i]+") or ";
        }
        query = query.substring(0, query.length()-3)+";";
        ResultSet rs = statement.executeQuery(query);

        if(rs.next()){
            String p = rs.getString(COLUMN_PATTERN);
            long win = rs.getLong(COLUMN_WIN);
            long lose = rs.getLong(COLUMN_LOSE);
            int next_x = rs.getInt(COLUMN_NEXT_X);
            int next_y = rs.getInt(COLUMN_NEXT_Y);
            if(iswon){
                query = "UPDATE "+TABLE_DATA+" SET "+COLUMN_WIN+"="+(win+1)+" where "+COLUMN_PATTERN+"='"+p+"' and "+COLUMN_NEXT_X+"="+next_x+" and "+COLUMN_NEXT_Y+"="+next_y+";";
            } else {
                query = "UPDATE "+TABLE_DATA+" SET "+COLUMN_LOSE+"="+(lose+1)+" where "+COLUMN_PATTERN+"='"+p+"' and "+COLUMN_NEXT_X+"="+next_x+" and "+COLUMN_NEXT_Y+"="+next_y+";";
            }
        } else {
            query = insert(TABLE_DATA, pattern, iswon?1:0, iswon?0:1, x, y);
        }
        synchronized (statement) {
            statement.execute(query);
        }
    }

    public void close() throws SQLException{
        connection.close();
        statement.close();
    }

    public List<OthelloData> getData(String pattern) throws SQLException{
        String query = "select * from " + TABLE_DATA + " where ";
        String[] subpatterns = OthelloData.getOthelloPatterns(pattern);
        for(String subpattern:subpatterns){
            query += COLUMN_PATTERN+"='"+subpattern+"' or ";
        }
        ResultSet rs;
        synchronized (statement) {
            rs = statement.executeQuery(query.substring(0, query.length()-3)+";");
        }
        List<OthelloData> data = new ArrayList<OthelloData>();
        while(rs.next()){
            String p = rs.getString(COLUMN_PATTERN);
            int i;
            for(i=0;i<8;i++){
                if(subpatterns[i].equals(p)){
                    break;
                }
            }
            int[] coordinate = OthelloData.restoreCoordinate(rs.getInt(COLUMN_NEXT_X), rs.getInt(COLUMN_NEXT_Y), i);
            data.add(new OthelloData(pattern,
                                   rs.getLong(COLUMN_WIN),
                                   rs.getLong(COLUMN_LOSE),
                                   coordinate[0],
                                   coordinate[1]));
        }
        return data;
    }

    public void onCreate() throws SQLException{
        statement.execute(SQL_CREATE_DATA);
        statement.execute(SQL_CREATE_VERSION);
        statement.execute(insert(TABLE_VERSION, String.valueOf(DB_VERSION)));
    }

    public void onUpgrade(){

    }

    private void createTables() throws SQLException{
        ResultSet resultSet = null;
        connection = DriverManager.getConnection(SQLITE_CONNECTION);
        resultSet = statement.executeQuery("SELECT * FROM sqlite_master WHERE type='table';");
        boolean hasVersionTable = false;
        while(resultSet.next()){
            if(resultSet.getString(2).equals(TABLE_VERSION)){
                hasVersionTable = true;
                break;
            }
        }
        resultSet.close();
        if(hasVersionTable){
            resultSet = statement.executeQuery("SELECT * FROM "+TABLE_VERSION+";");
            if(resultSet.next()&&resultSet.getInt(COLUMN_VERSION)!=DB_VERSION){
                onUpgrade();
            }
        } else {
            onCreate();
        }
    }

    private String insert(String table, Object... params){
        String out = "INSERT INTO "+table+" VALUES(";
        for(Object param:params){
            if(param instanceof String){
                out += " '"+param+"',";
            } else {
                out += " "+String.valueOf(param)+",";
            }
        }
        out = out.substring(0, out.length()-1);
        out += ");";
        return out;
    }
}


text:
shared :file_unlink do |cmd|
  describe "File.#{cmd}" do
    before :each do
      @file1 = 'test.txt'
      @file2 = 'test2.txt'
      File.send(cmd, @file1) if File.exists?(@file1)
      File.send(cmd, @file2) if File.exists?(@file2)

      File.open(@file1, "w") {} # Touch
      File.open(@file2, "w") {} # Touch
    end

    after :each do
      File.send(cmd, @file1) if File.exists?(@file1)
      File.send(cmd, @file2) if File.exists?(@file2)

      @file1 = nil
      @file2 = nil
    end

    it "returns 0 when called without arguments" do
      File.send(cmd).should == 0
    end

    it "deletes a single file" do
      File.send(cmd, @file1).should == 1
      File.exists?(@file1).should == false
    end

    it "deletes multiple files" do
      File.send(cmd, @file1, @file2).should == 2
      File.exists?(@file1).should == false
      File.exists?(@file2).should == false
    end

    it "raises an TypeError if not passed a String type" do
      lambda { File.send(cmd, 1) }.should raise_error(TypeError)
    end

    it "raises an Errno::ENOENT when the given file doesn't exist" do
      lambda { File.send(cmd, 'bogus') }.should raise_error(Errno::ENOENT)
    end

    it "coerces a given parameter into a string if possible" do
      class Coercable
        def to_str
          "test.txt"
        end
      end

      File.send(cmd, Coercable.new).should == 1
    end
  end
end


text:
Cone::Cone(float height, float radius, int numSegments) : Mesh()
{
	// Construct a cone using the given argument
	VertexList generatedVertices;
	TriangleList generatedTriangles;
	int vertexCounter = 0;
	// Generate top and bottom vertices
	float halfHeight  (height / 2.0f);
	Vertex topCentre;
	topCentre.position = Vector3(0.0f, 0.0f, halfHeight);
	topCentre.normal = topCentre.position.normalise();
	topCentre.texCoord = TexCoord(1.0f, 0.5f);
	generatedVertices.push_back(topCentre);
	Vertex bottomCentre;
	bottomCentre.position = Vector3(0.0f, 0.0f, -halfHeight);
	bottomCentre.normal = bottomCentre.position.normalise();
	bottomCentre.texCoord = TexCoord(0.5, 0.5f);
	generatedVertices.push_back(bottomCentre);
	vertexCounter += 2;
	// Generate the 'tower' part of the cone
	for (float i = 0.0f; (i < numSegments); i += 1.0f)
	{
		float angle = (PI * i * 2.0f) / numSegments;
		float nextAngle = (PI * (i + 1.0f) * 2.0f) / numSegments;
		float x1 = radius * sin(angle), y1 = radius * cos(angle);
		float x2 = radius * sin(nextAngle), y2 = radius * cos(nextAngle);
		// We compute these two vertices TWICE. This is because we want
		// different normals at the bottom of the cone
		Vertex v1, v2, bv1, bv2;
		v1.position = Vector3(x1, y1, -halfHeight);
		v2.position = Vector3(x2, y2, -halfHeight);
		v1.texCoord = computeTexCoord(angle, v1.position.z, height);
		v2.texCoord = computeTexCoord(nextAngle, v2.position.z, height);
		bv1 = v1;
		bv2 = v2;
		v1.normal = v1.position.normalise();
		v2.normal = v2.position.normalise();
		bv1.normal = bv2.normal = Vector3(0.0f, 0.0f, -1.0f);
		generatedVertices.push_back(v1);
		generatedVertices.push_back(v2);
		generatedVertices.push_back(bv1);
		generatedVertices.push_back(bv2);

		// Triangle for tower part
		generatedTriangles.push_back( Triangle(0, vertexCounter, vertexCounter + 1) );
		// Triangle for bottom section
		generatedTriangles.push_back( Triangle(1, vertexCounter + 3, vertexCounter + 2) );
		vertexCounter += 4;
	}

	setVertices(generatedVertices);
	setTriangles(generatedTriangles);
}

Cone::~Cone()
{
}

TexCoord Cone::computeTexCoord(float angle, float currentHeight, float totalHeight)
{
	return TexCoord((angle / (2.0f * PI)), // s
		(currentHeight + (totalHeight / 2.0f)) / totalHeight // t
	);
}


text:
package com.bwsw.tstreams.common

import org.scalatest.{FlatSpec, Matchers}

/**
  * Created by Ivan Kudryavtsev on 11.06.17.
  */
class RoundRobinPartitionIterationPolicyTests extends FlatSpec with Matchers {
  val PARTITIONS_COUNT = 3
  it should "operate correctly over partitions" in {
    val partitions = Set(0,1,2)
    val roundRobinPolicy = new RoundRobinPartitionIterationPolicy(PARTITIONS_COUNT, partitions)
    Seq(0, 1, 2, 0, 1, 2)
      .foreach(partitionExpectation => roundRobinPolicy.getNextPartition() shouldBe partitionExpectation)
  }
}


text:
package ru.jts.decompiler.model;

import ru.jts.decompiler.annotation.EventId;

/**
 * Created by dmitrij on 31.05.15.
 */
public class ItemIndexList {

    @EventId(520093696)
    public int GetSize() {
        return 0;
    }

    @EventId(520159233)
    public int GetItemIndex(int item_id) {
        return 0;
    }
}


text:
//
//  PushPullListCell.m
//  OCCommon
//
//  Created by 游峰 on 16/3/17.
//  Copyright © 2016年 yf. All rights reserved.
//

#define w self.contentView.frame.size.width
#define h self.contentView.frame.size.height
#define leftMagin 10
#import "PushPullListCell.h"
/*

 @property (weak, nonatomic) UIView * overlayV;
 @property (weak, nonatomic) UIImageView * backImgV;
 @property (weak, nonatomic) UILabel * priceL;
 @property (weak, nonatomic) UILabel * otherL;
 @property (weak, nonatomic) UILabel * lineL;
 @property (weak, nonatomic) UILabel * smallL;

 */

@implementation PushPullListCell

- (UIView *)overlayV
{
    if (!_overlayV)
    {

        UIView * view = [[UIView alloc] init];
        [self.contentView addSubview:view];
        view.backgroundColor = [UIColor colorWithWhite:1.0 alpha:0.3];

        _overlayV = view;
    }
    return _overlayV;
}

- backImgV
{
    if (!_backImgV)
    {

        UIImageView * imageV = [[UIImageView alloc] init];
        [self.contentView addSubview:imageV];
        imageV.backgroundColor = [UIColor whiteColor];
        [imageV setImage:[UIImage imageNamed:@"Afghanistan.png"]];

        _backImgV = imageV;
    }
    return _backImgV;
}

- (UILabel *)priceL
{
    if (!_priceL)
    {

        UILabel * label = [[UILabel alloc] init];
        [self.contentView addSubview:label];
        label.numberOfLines = 0;
        [label setFont:[UIFont systemFontOfSize:15]];
        [label setTextColor:[UIColor yellowColor]];
        [label setTextAlignment:NSTextAlignmentRight];
        [label setBackgroundColor:[UIColor clearColor]];
        label.text = @"$3888";

        _priceL = label;
    }
    return _priceL;
}

- (UILabel *)otherL
{
    if (!_otherL)
    {
        UILabel * label = [[UILabel alloc] init];
        [self.contentView addSubview:label];
        label.numberOfLines = 0;
        [label setFont:[UIFont systemFontOfSize:15]];
        [label setTextColor:[UIColor yellowColor]];
        [label setTextAlignment:NSTextAlignmentLeft];
        [label setBackgroundColor:[UIColor clearColor]];
        label.text = @"很好吃";

        _otherL = label;
    }
    return _otherL;
}

- (UILabel *)lineL
{
    if (!_lineL)
    {

        UILabel * label = [[UILabel alloc] init];
        [self.contentView addSubview:label];
        label.numberOfLines = 0;
        [label setFont:[UIFont systemFontOfSize:15]];
        [label setTextColor:[UIColor blueColor]];
        [label setTextAlignment:NSTextAlignmentLeft];
        [label setBackgroundColor:[UIColor clearColor]];
        label.text = @"飞北京的航线";

        _lineL = label;
    }
    return _lineL;
}

- (UILabel *)smallL
{
    if (!_smallL)
    {

        UILabel * label = [[UILabel alloc] init];
        [self.contentView addSubview:label];
        label.numberOfLines = 0;
        [label setFont:[UIFont systemFontOfSize:15]];
        [label setTextColor:[UIColor blueColor]];
        [label setTextAlignment:NSTextAlignmentLeft];
        [label setBackgroundColor:[UIColor clearColor]];
        label.text = @"我想飞翔。。。";

        _smallL = label;
    }
    return _smallL;
}

+ (instancetype)pushPullListCellWithCollectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath
{
    static NSString * pushPullListCellId = @"PushPullListCell";

    PushPullListCell * cell = [collectionView dequeueReusableCellWithReuseIdentifier:pushPullListCellId forIndexPath:indexPath];
    return cell;
}

- (instancetype)initWithFrame:(CGRect)frame
{
    if (self  = [super initWithFrame:frame]) {
        [self backImgV];
        [self priceL];
        [self smallL];
        [self lineL];
        [self otherL];
        [self overlayV];
    }
    return self;
}

- (void)layoutSubviews
{
    [super layoutSubviews];

    self.backImgV.frame = CGRectMake(0, 0, w, h);

    CGFloat pw = 100;
    CGFloat ph = 25;
    CGFloat px = w - leftMagin - pw;
    CGFloat py = h - 25 - ph;
    self.priceL.frame = CGRectMake(px, py, pw, ph);

    CGFloat ow = 200;
    CGFloat oh = 25;
    CGFloat ox = leftMagin;
    CGFloat oy = 40;
    self.otherL.frame = CGRectMake(ox, oy, ow, oh);

    CGFloat lw = 200;
    CGFloat lh = 25;
    CGFloat lx = leftMagin;
    CGFloat ly = py;
    self.lineL.frame = CGRectMake(lx, ly, lw, lh);

    CGFloat sw = 200;
    CGFloat sh = 25;
    CGFloat sx = leftMagin;
    CGFloat sy = 20;
    self.smallL.frame = CGRectMake(sx, sy, sw, sh);

    self.overlayV.frame = CGRectMake(0, 0, w, h);

}

//- (void)drawRect:(CGRect)rect
//{
//    [super drawRect:rect];
//
//}

//- (void)resize
//{
//
//}

@end


text:
.title-banner {
	margin: 20vh auto 20vh auto;
	text-align: center;
	color: white;
}
.container--down-arrow {
	height: 100px;
	margin-top: -100px;
	color: rgb(63,81,181);
}
.icon--down-arrow {
	font-size: 100px;
	animation: 	animation--bounce 2s infinite alternate;
}
@keyframes animation--bounce {
	from {
		transform: translateY(0);
	}
	to {
		transform: translateY(50px);
	}
}

.card--main {
	max-width: 600px;
	margin: 8px auto;
	z-index: 1;
	position: relative;
}
.card--skills {
	overflow: hidden;
	padding-left: 40px;
}

.md-2-line {
	flex: 1 1 auto;
	width: 300px;

}
@media(min-width: 960px) and ( max-width: 1280px) {
	.card--fixed-height {
		height: 225px;
		overflow:hidden;
	}
}

/* Bounce In */
.animation--hover--bounce-in {
	display: inline-block;
	vertical-align: middle;
	-webkit-transform: translateZ(0);
	transform: translateZ(0);
	box-shadow: 0 0 1px rgba(0, 0, 0, 0);
	-webkit-backface-visibility: hidden;
	backface-visibility: hidden;
	-moz-osx-font-smoothing: grayscale;
	-webkit-transition-duration: 0.5s;
	transition-duration: 0.5s;
}
.animation--hover--bounce-in:hover, .animation--hover--bounce-in:focus, .animation--hover--bounce-in:active {
	-webkit-transform: scale(1.2);
	transform: scale(1.2);
	-webkit-transition-timing-function: cubic-bezier(0.47, 2.02, 0.31, -0.36);
	transition-timing-function: cubic-bezier(0.47, 2.02, 0.31, -0.36);
}

.container--card {
	background: rgb(47, 175, 150);
	background: rgba(47, 175, 150, 0.5);
	margin-top: -200px;
	padding-top: 200px;
	padding-bottom: 8px;
	z-index: 0;
	position: relative;
}

@media (min-width: 1200px) {
	.card--history {
		max-width: 1200px;
		margin: 8px auto;
	}
}

@media (max-width:500px) {
	.med-only {
		display: none;
		opacity: 0;
	}
}

.container--flex {
    display: flex;
    flex-flow: row wrap;
}

.solid-border {
	border: 1px solid #CCCCCC;
}

/* Ripple Out */
@-webkit-keyframes animation--hover--ripple-out {
  100% {
    top: -12px;
    right: 0px;
    bottom: -12px;
    left: 0px;
    opacity: 0;
  }
}
@keyframes animation--hover--ripple-out {
  100% {
    top: -12px;
    right: -0px;
    bottom: -12px;
    left: 0px;
    opacity: 0;
  }
}
.animation--hover--ripple-out {
  vertical-align: middle;
  -webkit-transform: translateZ(0);
  transform: translateZ(0);
  box-shadow: 0 0 1px rgba(0, 0, 0, 0);
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  -moz-osx-font-smoothing: grayscale;
  position: relative;
}
.animation--hover--ripple-out:before {
  content: '';
  position: absolute;
  border: #e1e1e1 solid 6px;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  -webkit-animation-duration: 1s;
  animation-duration: 1s;
}
.animation--hover--ripple-out:hover:before, .animation--hover--ripple-out:focus:before, .animation--hover--ripple-out:active:before {
  -webkit-animation-name: animation--hover--ripple-out;
  animation-name: animation--hover--ripple-out;
}

/** IE hacks: */
@media all and (-ms-high-contrast:none) {
	.card--main {
		height: 400px;
	}
}


text:
title: Microsoft powerapps plán 2
inshort: nedefinované
translator: Microsoft Cognitive Services
---


text:
$.widget("metro.slider", {

    version: "3.0.0",

    options: {
        position: 0,
        accuracy: 0,
        color: 'default',
        completeColor: 'default',
        markerColor: 'default',
        colors: false,
        showHint: false,
        permanentHint: false,
        hintPosition: 'top',
        vertical: false,
        min: 0,
        max: 100,
        animate: true,
        minValue: 0,
        maxValue: 100,
        currValue: 0,
        returnType: 'value',
        target: false,

        onChange: function(value, slider){},

        _slider : {
            vertical: false,
            offset: 0,
            length: 0,
            marker: 0,
            ppp: 0,
            start: 0,
            stop: 0
        }
    },

    _create: function(){
        var that = this,
            element = this.element;

        var o = this.options,
            s = o._slider;

        $.each(element.data(), function(key, value){
            if (key in o) {
                try {
                    o[key] = $.parseJSON(value);
                } catch (e) {
                    o[key] = value;
                }
            }
        });

        o.accuracy = o.accuracy < 0 ? 0 : o.accuracy;
        o.min = o.min < 0 ? 0 : o.min;
        o.min = o.min > o.max ? o.max : o.min;
        o.max = o.max > 100 ? 100 : o.max;
        o.max = o.max < o.min ? o.min : o.max;
        o.position = this._correctValue(element.data('position') > o.min ? (element.data('position') > o.max ? o.max : element.data('position')) : o.min);
        o.colors = o.colors ? o.colors.split(",") : false;

        s.vertical = o.vertical;
        if (o.vertical && !element.hasClass('vertical')) {
            element.addClass('vertical');
        }
        if (o.permanentHint && !element.hasClass('permanent-hint')) {
            element.addClass('permanent-hint');
        }

        if (!o.vertical && o.hintPosition === 'bottom') {
            element.addClass('hint-bottom');
        }

        if (o.vertical && o.hintPosition === 'left') {
            element.addClass('hint-left');
        }

        this._createSlider();
        this._initPoints();
        this._placeMarker(o.position);

        var event_down = isTouchDevice() ? 'touchstart' : 'mousedown';

        element.children('.marker').on(event_down, function (e) {
            e.preventDefault();
            that._startMoveMarker(e);
        });

        element.on(event_down, function (e) {
            e.preventDefault();
            that._startMoveMarker(e);
        });

        element.data('slider', this);

    },

    _startMoveMarker: function(e){
        var element = this.element, o = this.options, that = this, hint = element.children('.slider-hint');
        var returnedValue;

        var event_move = isTouchDevice() ? 'touchmove' : 'mousemove';
        var event_up = isTouchDevice() ? 'touchend' : 'mouseup mouseleave';

        $(element).on(event_move, function (event) {
            that._movingMarker(event);
            if (!element.hasClass('permanent-hint')) {
                hint.css('display', 'block');
            }
        });
        $(element).on(event_up, function () {
            $(element).off('mousemove');
            $(element).off('mouseup');
            element.data('value', o.position);
            element.trigger('changed', o.position);

            returnedValue = o.returnType === 'value' ? that._valueToRealValue(o.position) : o.position;

            if (!element.hasClass('permanent-hint')) {
                hint.css('display', 'none');
            }
        });

        this._initPoints();

        this._movingMarker(e);
    },

    _movingMarker: function (ev) {
        var element = this.element, o = this.options;
        var cursorPos,
            percents,
            valuePix,

            vertical = o._slider.vertical,
            sliderOffset = o._slider.offset,
            sliderStart = o._slider.start,
            sliderEnd = o._slider.stop,
            sliderLength = o._slider.length,
            markerSize = o._slider.marker;

        var event = !isTouchDevice() ? ev.originalEvent : ev.originalEvent.touches[0];

        //console.log(event);

        if (vertical) {
            cursorPos = event.pageY - sliderOffset;
        } else {
            cursorPos = event.pageX - sliderOffset;
        }

        if (cursorPos < sliderStart) {
            cursorPos = sliderStart;
        } else if (cursorPos > sliderEnd) {
            cursorPos = sliderEnd;
        }

        if (vertical) {
            valuePix = sliderLength - cursorPos - markerSize / 2;
        } else {
            valuePix = cursorPos - markerSize / 2;
        }

        percents = this._pixToPerc(valuePix);

        this._placeMarker(percents);

        o.currValue = this._valueToRealValue(percents);
        o.position = percents;

        var returnedValue = o.returnType === 'value' ? this._valueToRealValue(o.position) : o.position;

        if (o.target) {
            $(o.target).val(returnedValue);
        }

        if (typeof o.onChange === 'function') {
            o.onChange(returnedValue, element);
        } else {
            if (typeof window[o.onChange] === 'function') {
                window[o.onChange](returnedValue, element);
            } else {
                var result = eval("(function(){"+o.onChange+"})");
                result.call(returnedValue, element);
            }
        }
    },

    _placeMarker: function (value) {
        var size, size2, o = this.options, colorParts, colorIndex = 0, colorDelta, element = this.element,
            marker = this.element.children('.marker'),
            complete = this.element.children('.complete'),
            hint = this.element.children('.slider-hint'), hintValue,
            oldPos = this._percToPix(o.position);

        colorParts = o.colors.length;
        colorDelta = o._slider.length / colorParts;

        if (o._slider.vertical) {
            var oldSize = this._percToPix(o.position) + o._slider.marker,
                oldSize2 = o._slider.length - oldSize;
            size = this._percToPix(value) + o._slider.marker;
            size2 = o._slider.length - size;
            this._animate(marker.css('top', oldSize2),{top: size2});
            this._animate(complete.css('height', oldSize),{height: size});

            if (colorParts) {
                colorIndex = Math.round(size / colorDelta)-1;
                complete.css('background-color', o.colors[colorIndex<0?0:colorIndex]);
            }
            if (o.showHint) {
                hintValue = this._valueToRealValue(value);
                hint.html(hintValue).css('top', size2 - hint.height()/2 + (element.hasClass('large') ? 8 : 0));
            }
        } else {
            size = this._percToPix(value);
            this._animate(marker.css('left', oldPos),{left: size});
            this._animate(complete.css('width', oldPos),{width: size});
            if (colorParts) {
                colorIndex = Math.round(size / colorDelta)-1;
                complete.css('background-color', o.colors[colorIndex<0?0:colorIndex]);
            }
            if (o.showHint) {
                hintValue = this._valueToRealValue(value);
                hint.html(hintValue).css({left: size - hint.width() / 2 + (element.hasClass('large') ? 6 : 0)});
            }
        }
    },

    _valueToRealValue: function(value){
        var o = this.options;
        var real_value;

        var percent_value = (o.maxValue - o.minValue) / 100;

        real_value = value * percent_value + o.minValue;

        return Math.round(real_value);
    },

    _animate: function (obj, val) {
        var o = this.options;

        if(o.animate) {
            obj.stop(true).animate(val);
        } else {
            obj.css(val);
        }
    },

    _pixToPerc: function (valuePix) {
        var valuePerc;
        valuePerc = valuePix * this.options._slider.ppp;
        return Math.round(this._correctValue(valuePerc));
    },

    _percToPix: function (value) {
        if (this.options._slider.ppp === 0) {
            return 0;
        }
        return Math.round(value / this.options._slider.ppp);
    },

    _correctValue: function (value) {
        var o = this.options;
        var accuracy = o.accuracy;
        var max = o.max;
        var min = o.min;
        if (accuracy === 0) {
            return value;
        }
        if (value === max) {
            return max;
        }
        if (value === min) {
            return min;
        }
        value = Math.floor(value / accuracy) * accuracy + Math.round(value % accuracy / accuracy) * accuracy;
        if (value > max) {
            return max;
        }
        if (value < min) {
            return min;
        }
        return value;
    },

    _initPoints: function(){
        var o = this.options, s = o._slider, element = this.element;

        if (s.vertical) {
            s.offset = element.offset().top;
            s.length = element.height();
            s.marker = element.children('.marker').height();
        } else {
            s.offset = element.offset().left;
            s.length = element.width();
            s.marker = element.children('.marker').width();
        }

        s.ppp = o.max / (s.length - s.marker);
        s.start = s.marker / 2;
        s.stop = s.length - s.marker / 2;
    },

    _createSlider: function(){
        var element = this.element,
            o = this.options,
            complete, marker, hint;

        element.html('');

        complete = $("<div/>").addClass("complete").appendTo(element);
        marker = $("<a/>").addClass("marker").appendTo(element);

        if (o.showHint) {
            hint = $("<span/>").addClass("slider-hint").appendTo(element);
        }

        if (o.color !== 'default') {
            if (o.color.isColor()) {
                element.css('background-color', o.color);
            } else {
                element.addClass(o.color);
            }
        }
        if (o.completeColor !== 'default') {
            if (o.completeColor.isColor()) {
                complete.css('background-color', o.completeColor);
            } else {
                complete.addClass(o.completeColor);
            }
        }
        if (o.markerColor !== 'default') {
            if (o.markerColor.isColor()) {
                marker.css('background-color', o.markerColor);
            } else {
                marker.addClass(o.markerColor);
            }
        }
    },

    value: function (value) {
        var element = this.element, o = this.options, returnedValue;

        if (typeof value !== 'undefined') {

            value = value > o.max ? o.max : value;
            value = value < o.min ? o.min : value;

            this._placeMarker(parseInt(value));
            o.position = parseInt(value);

            returnedValue = o.returnType === 'value' ? this._valueToRealValue(o.position) : o.position;

            if (o.target) {
                $(o.target).val(returnedValue);
            }

            if (typeof o.onChange === 'function') {
                o.onChange(returnedValue, element);
            } else {
                if (typeof window[o.onChange] === 'function') {
                    window[o.onChange](returnedValue, element);
                } else {
                    var result = eval("(function(){"+o.onChange+"})");
                    result.call(returnedValue, element);
                }
            }

            return this;
        } else {
            returnedValue = o.returnType === 'value' ? this._valueToRealValue(o.position) : o.position;
            return returnedValue;
        }
    },

    _destroy: function(){},

    _setOption: function(key, value){
        this._super('_setOption', key, value);
    }
});