text:
/*
  Keep here examples which still work without type parameters specified,
  even if the current Flow verion still reports misleading errors.
  This helps keep the usage of Flow amazing type inferent on the good level.
*/
// @flow
import React from "react";
import { connect } from "react-redux";

function testPassingPropsToConnectedComponent() {
  type OwnProps = {|
    passthrough: number,
    passthroughWithDefaultProp?: number,
    forMapStateToProps: string
  |}
  type Props = {
    ...OwnProps,
    fromStateToProps: string,
    ...
  };
  class Com extends React.Component<Props> {
    static defaultProps = { passthroughWithDefaultProp: 123 };
    render() {
      return
{this.props.passthrough} {this.props.fromStateToProps}
;
    }
  }

  type State = { a: number, ... };
  type InputProps = { forMapStateToProps: string, ... };
  const mapStateToProps = (state: State, props: InputProps) => {
    return {
      fromStateToProps: 'str' + state.a
    }
  };

  const Connected = connect(mapStateToProps)(Com);
  Connected.WrappedComponent;
  <Connected passthrough={123} forMapStateToProps={'data'} passthroughWithDefaultProp={123}/>;
  // OK without passthroughWithDefaultProp
  <Connected passthrough={123} forMapStateToProps={'data'}/>;
  // Flow erroneously complains about `fromStateToProps`
  // fixing the original issue fixes the wrongly titled error.
  //$FlowExpectedError[incompatible-use] wrong type for passthrough
  <Connected passthrough={''} forMapStateToProps={'data'} passthroughWithDefaultProp={123}/>;
  //$FlowExpectedError[incompatible-use] wrong type for forMapStateToProps
  <Connected passthrough={123} forMapStateToProps={321} passthroughWithDefaultProp={123}/>;
  // Flow erroneously complains about `fromStateToProps`
  // fixing the original issue fixes the wrongly titled error.
  //$FlowExpectedError[incompatible-use] wrong type for  passthroughWithDefaultProp
  <Connected passthrough={123} forMapStateToProps={'data'} passthroughWithDefaultProp={''}/>;
  // Flow also erroneously complains about fromStateToProps
  //$FlowExpectedError[incompatible-use] passthrough missing
  <Connected forMapStateToProps={'data'} />;
  //$FlowExpectedError[incompatible-use] forMapStateToProps missing
  <Connected passthrough={123}/>;
  //$FlowExpectedError[incompatible-call] takes in only React components
  connect(mapStateToProps)('');
}

function doesNotRequireDefinedComponentToTypeCheck5case() {
  type Props = { stringProp: string, ... };

  const Component = ({ stringProp }: Props) => {
    return {stringProp};
  };

  const mapStateToProps = () => ({});
  const mapDispatchToProps = () => ({});

  const mergeProps = () => ({
    stringProp: true
  });

  //$FlowExpectedError[incompatible-call] wrong type for stringProp
  connect(mapStateToProps, mapDispatchToProps, mergeProps)(Component);
}

function testWithStatelessFunctionalComponent() {
  type Props = {
    passthrough: number,
    fromStateToProps: string,
    ...
  };
  const Com = (props: Props) =>
{props.passthrough} {props.fromStateToProps}

  type State = { a: number, ... };
  type InputProps = { forMapStateToProps: string, ... };
  const mapStateToProps = (state: State, props: InputProps) => {
    return {
      fromStateToProps: 'str' + state.a
    }
  };

  const Connected = connect(mapStateToProps)(Com);
  <Connected passthrough={123} forMapStateToProps={'data'}/>;
  // Here Flow reports that `fromStateToProps` is missing from props,
  // while the real error is still the wrong type for passthroug,
  // giving passthrough a number fixes the wrongly titled error.
  //$FlowExpectedError[incompatible-use] wrong type for passthrough
  <Connected passthrough={''} forMapStateToProps={'data'}/>;
  //$FlowExpectedError[incompatible-use] wrong type for forMapStateToProps
  <Connected passthrough={123} forMapStateToProps={321} />;
  // Here Flow reports that `fromStateToProps` is missing from props,
  // while the real error is still the missing passthroug property,
  // giving the passthrough property fixes the wrongly titled error.
  //$FlowExpectedError[incompatible-use] passthrough missing
  <Connected forMapStateToProps={'data'} />;
  //$FlowExpectedError[incompatible-use] forMapStateToProps missing
  <Connected passthrough={123}/>;
  //$FlowExpectedError[incompatible-call] takes in only React components
  connect(mapStateToProps)('');
}

function testMapStateToPropsDoesNotNeedProps() {
  type Props = {
    passthrough: number,
    fromStateToProps: string,
    ...
  };
  class Com extends React.Component<Props> {
    render() {
      return
{this.props.passthrough}
;
    }
  }

  type State = { a: string, ... }
  const mapStateToProps = (state: State) => {
    return {
      fromStateToProps: state.a
    }
  }

  const Connected = connect(mapStateToProps)(Com);
  <Connected passthrough={123}/>;
  // Here Flow reports that `fromStateToProps` is missing from props,
  // while the real error is still the missing passthroug property,
  // giving the passthrough property fixes the wrongly titled error.
  //$FlowExpectedError[incompatible-use] component property passthrough not found
  <Connected />;
}

function testMapDispatchToProps() {
  type Props = {
    passthrough: number,
    fromMapDispatchToProps: string,
    fromMapStateToProps: string,
    ...
  };
  class Com extends React.Component<Props> {
    render() {
      return

        {this.props.passthrough}
        {this.props.fromMapDispatchToProps}
        {this.props.fromMapStateToProps}

;
    }
  }

  type State = { a: number, ... }
  type MapStateToPropsProps = { forMapStateToProps: string, ... }
  const mapStateToProps = (state: State, props: MapStateToPropsProps) => {
    return {
      fromMapStateToProps: 'str' + state.a
    }
  }
  type MapDispatchToPropsProps = { forMapDispatchToProps: string, ... }
  const mapDispatchToProps = (dispatch: *, ownProps: MapDispatchToPropsProps) => {
    return {fromMapDispatchToProps: ownProps.forMapDispatchToProps}
  }
  const Connected = connect(mapStateToProps, mapDispatchToProps)(Com);
  <Connected passthrough={123} forMapStateToProps={'data'} forMapDispatchToProps={'more data'} />;
  // Here Flow reports that `fromStateToProps` is missing from props,
  // while the real error is still the missing passthroug property,
  // giving the passthrough property fixes the wrongly titled error.
  //$FlowExpectedError[incompatible-use] passthrough missing
  <Connected forMapStateToProps={'data'} forMapDispatchToProps={'more data'} />;
  //$FlowExpectedError[incompatible-use] forMapStateToProps missing
  <Connected passthrough={123} forMapDispatchToProps={'more data'} />;
  //$FlowExpectedError[incompatible-use] forMapDispatchToProps missing
  <Connected passthrough={123} forMapStateToProps={'data'} />;
}

function testMapDispatchToPropsWithoutMapStateToProps() {
  type Props = {
    passthrough: number,
    fromMapDispatchToProps: string,
    ...
  };
  class Com extends React.Component<Props> {
    render() {
      return

        {this.props.passthrough}
        {this.props.fromMapDispatchToProps}

;
    }
  }

  type MapDispatchToPropsProps = { forMapDispatchToProps: string, ... };
  const mapDispatchToProps = (dispatch: *, ownProps: MapDispatchToPropsProps) => {
    return {fromMapDispatchToProps: ownProps.forMapDispatchToProps}
  }
  const Connected = connect(null, mapDispatchToProps)(Com);
  <Connected passthrough={123} forMapStateToProps={'data'} forMapDispatchToProps={'more data'} />;
  // Here Flow reports that `fromStateToProps` is missing from props,
  // while the real error is still the missing passthroug property,
  // giving the passthrough property fixes the wrongly titled error.
  //$FlowExpectedError[incompatible-use] passthrough missing
  <Connected forMapStateToProps={'data'} forMapDispatchToProps={'more data'} />;
  //$FlowExpectedError[incompatible-use] forMapDispatchToProps missing
  <Connected passthrough={123} forMapStateToProps={'data'} />;
}

function testMapDispatchToPropsPassesActionCreators() {
  type Props = {
    passthrough: number,
    dispatch1: (num: number) => void,
    dispatch2: () => void,
    ...
  };
  class Com extends React.Component<Props> {
    render() {
      return
{this.props.passthrough}
;
    }
  }

  const mapDispatchToProps = {
    dispatch1: (num: number) => {},
    dispatch2: () => {}
  };
  const Connected = connect(null, mapDispatchToProps)(Com);
  <Connected passthrough={123}/>;
  // Here Flow reports that `dispatch1` is missing from props,
  // while the real error is still the missing passthroug property,
  // giving the passthrough property fixes the wrongly titled error.
  //$FlowExpectedError[incompatible-use] no passthrough
  <Connected />;

  const mapDispatchToPropsWithoutDispatch2 = {
    dispatch1: (num: number) => {}
  };
  const Connected2 = connect(null, mapDispatchToPropsWithoutDispatch2)(Com);
  // Here Flow reports that `dispatch1` is missing from props,
  // while the real error is still the missing `dispatch2`,
  // giving the `mapDispatchToProps` to connect above
  // fixes the wrongly titled error.
  //$FlowExpectedError[incompatible-use] no dispatch2
  <Connected2 passthrough={123}/>;

  const mapDispatchToPropsWithWrongDispatch1 = {
    dispatch1: (num: string) => {},
    dispatch2: () => {}
  };
  const Connected3 = connect(null, mapDispatchToPropsWithWrongDispatch1)(Com);
  // Here Flow reports that `dispatch1` is missing from props,
  // while the real error is still the wrong type of `dispatch1`,
  // giving `num` the correct type fixes the wrongly titled error.
  //$FlowExpectedError[incompatible-use] dispatch1 should be number
  <Connected3 passthrough={123}/>;
}

function testMapDispatchToPropsPassesActionCreatorsWithMapStateToProps() {
  type Props = {
    passthrough: number,
    dispatch1: () => void,
    dispatch2: () => void,
    fromMapStateToProps: number,
    ...
  };
  class Com extends React.Component<Props> {
    render() {
      return
{this.props.passthrough}
;
    }
  }
  type State = { a: number, ... }
  type MapStateToPropsProps = { forMapStateToProps: string, ... }
  const mapStateToProps = (state: State, props: MapStateToPropsProps) => {
    return {
      fromMapStateToProps: state.a
    }
  }
  const mapDispatchToProps = {
    dispatch1: () => {},
    dispatch2: () => {}
  };
  const Connected = connect(mapStateToProps, mapDispatchToProps)(Com);
  <Connected passthrough={123} forMapStateToProps="str"/>;
  // Here Flow reports that `fromStateToProps` is missing from props,
  // while the real error is still the missing passthroug property,
  // giving the passthrough property fixes the wrongly titled error.
  //$FlowExpectedError[incompatible-use] no passthrough
  <Connected/>;

  const mapDispatchToProps2 = {
    dispatch1: () => {}
  };
  const Connected2 = connect(mapStateToProps, mapDispatchToProps2)(Com);
  // Here Flow reports that `dispatch1` is missing from props,
  // while the real error is still the missing `dispatch2`,
  // fixing the original issue fixes the wrongly titled error.
  //$FlowExpectedError[incompatible-use] no dispatch2
  <Connected2 passthrough={123} forMapStateToProps="str"/>;
}

function testMapDispatchToPropsPassesActionCreatorsWithMapStateToPropsAndMergeProps() {
  type Props = {
    passthrough: number,
    dispatch1: () => void,
    dispatch2: () => void,
    fromMapStateToProps: number,
    fromMergeProps: number,
    ...
  };
  class Com extends React.Component<Props> {
    render() {
      return
{this.props.passthrough}
;
    }
  }
  type State = { a: number, ... }
  type MapStateToPropsProps = { forMapStateToProps: string, ... }
  const mapStateToProps = (state: State, props: MapStateToPropsProps) => {
    return {
      fromMapStateToProps: state.a
    }
  }
  const mapDispatchToProps = {
    dispatch1: () => {},
    dispatch2: () => {}
  };
  const mergeProps = (stateProps, dispatchProps, ownProps: { forMergeProps: number, ... }) => {
    return Object.assign({}, stateProps, dispatchProps, { fromMergeProps: 123 });
  }
  const Connected = connect(mapStateToProps, mapDispatchToProps, mergeProps)(Com);
  <Connected passthrough={123} forMapStateToProps="str" forMergeProps={1234}/>;
  // Here Flow reports that `forMapStateToProps` is missing from props,
  // while the real error is still the missing `passthrough`,
  // fixing the original issue fixes the wrongly titled error.
  //$FlowExpectedError[incompatible-use] no passthrough
  <Connected/>;
  //$FlowExpectedError[incompatible-use] forMapStateToProps missing
  <Connected forMapDispatchToProps={'more data'} forMergeProps={1234} />;
  //$FlowExpectedError[incompatible-use] forMergeProps is missing
  <Connected forMapStateToProps={'data'} />;
  //$FlowExpectedError[incompatible-use] forMergeProps is wrong type
  <Connected forMapStateToProps={'data'} forMapDispatchToProps={'more data'} forMergeProps={'not number'} />;

  const mapDispatchToProps2 = {
    dispatch1: () => {}
  };
  const Connected2 = connect(mapStateToProps, mapDispatchToProps2)(Com);
  // Here Flow reports that `dispatch1` is missing from props,
  // while the real error is still the missing `dispatch2`,
  // fixing the original issue fixes the wrongly titled error.
  //$FlowExpectedError[incompatible-use] no dispatch2
  <Connected2 passthrough={123} forMapStateToProps="str"/>;
}

function testMergeProps() {
  type Props = { fromMergeProps: number, ... };
  class Com extends React.Component<Props> {
    render() {
      return

        {this.props.fromMergeProps}

;
    }
  }

  type State = { a: number, ... }
  type MapStateToPropsProps = { forMapStateToProps: string, ... }
  const mapStateToProps = (state: State, props: MapStateToPropsProps) => {
    return {
      fromMapStateToProps: state.a
    }
  }
  type MapDispatchToPropsProps = { forMapDispatchToProps: string, ... }
  const mapDispatchToProps = (dispatch: *, ownProps: MapDispatchToPropsProps) => {
    return {fromMapDispatchToProps: ownProps.forMapDispatchToProps}
  }
  const mergeProps = (stateProps, dispatchProps, ownProps: { forMergeProps: number, ... }) => {
    return {fromMergeProps: 123};
  }
  const Connected = connect(mapStateToProps, mapDispatchToProps, mergeProps)(Com);
  <Connected forMapStateToProps={'data'} forMapDispatchToProps={'more data'} forMergeProps={1234} />;
  //$FlowExpectedError[incompatible-use] forMapStateToProps missing
  <Connected forMapDispatchToProps={'more data'} forMergeProps={1234} />;
  //$FlowExpectedError[incompatible-use] forMergeProps is missing
  <Connected forMapStateToProps={'data'} forMapDispatchToProps={'more data'} />;
  //$FlowExpectedError[incompatible-use] forMapDispatchToProps is missing
  <Connected forMapStateToProps={'data'} forMergeProps={1234} />;
  //$FlowExpectedError[incompatible-use] forMapDispatchToProps is wrong type
  <Connected forMapStateToProps={'data'} forMapDispatchToProps={'more data'} forMergeProps={'not number'} />;
}

function testOptions() {
  class Com extends React.Component<{...}> {
    render() {
      return

;
    }
  }
  connect(null, null, null, {pure: true})(Com);
  connect(null, null, null, {withRef: true})(Com);
  connect(null, null, null, {pure: false, withRef: false})(Com);
  // $FlowExpectedError[incompatible-call] wrong type
  connect(null, null, null, {pure: 123})(Com);
  // $FlowExpectedError[incompatible-call] wrong type
  connect(null, null, null, {ref: 123})(Com);
  // $FlowExpectedError[incompatible-call] wrong key
  connect(null, null, null, {wrongKey: true})(Com);
}

function testHoistConnectedComponent() {
  type Props = {
    passthrough: number,
    passthroughWithDefaultProp: number,
    fromStateToProps: string,
    ...
  };
  class Com extends React.Component<Props> {
    static defaultProps = { passthroughWithDefaultProp: 123 };
    static myStatic = 1;

    render() {
      return
{this.props.passthrough} {this.props.fromStateToProps}
;
    }
  }

  type State = { a: number, ... };
  type InputProps = { forMapStateToProps: string, ... };
  const mapStateToProps = (state: State, props: InputProps) => {
    return {
      fromStateToProps: 'str' + state.a
    }
  };

  const Connected = connect(mapStateToProps)(Com);
  // OK without passthroughWithDefaultProp
  <Connected passthrough={123} forMapStateToProps={'data'}/>;
  // OK with passthroughWithDefaultProp
  <Connected passthrough={123} passthroughWithDefaultProp={456} forMapStateToProps={'data'}/>;
  // OK with declared static property
  Connected.myStatic;
  //$FlowExpectedError[incompatible-use] property `notStatic` is missing in statics
  Connected.notStatic;
}

function checkIfStateTypeIsRespectedAgain() {
  type State = {
    num: number,
    str: string,
    ...
  };

  const mapStateToProps = (state: State) => {
    return { // no error
      str: state.num
    }
  };

  type Props = { str: string, ... };

  class Com extends React.Component<Props> {
    render() {
      return
{this.props.str}
;
    }
  }

  const Connected = connect(mapStateToProps)(Com);
  // Here Flow reports that `str` is missing from props,
  // while the real error is still the type mismatch,
  // fixing the original issue fixes the wrongly titled error.
  //$FlowExpectedError[incompatible-use]
  <Connected />;
}

function testAllowsKnownPropInMapStateToProps() {
  type Props = { str: string, ... };

  class Com extends React.Component<Props> {
    render() {
      return
{this.props.str}
;
    }
  }

  type State = {
    num: number,
    str: string,
    ...
  };

  const mapStateToProps = (state: State) => {
    return {
      str: state.str
    }
  };

  const Connected = connect(mapStateToProps)(Com);
  <Connected />;
}

function testForbidsLiteralOfInvalidTypeInMapStateToProps() {
  type Props = {
  str: string, ... };

  class Com extends React.Component<Props> {
    render() {
      return
{this.props.str}
;
    }
  }

  type State = {
    num: number,
    str: string,
    ...
  };

  const mapStateToPropsWithLiteralOfInvalidType = (state: State) => {
    return {
      str: 123
    }
  };

  const Connected = connect(mapStateToPropsWithLiteralOfInvalidType)(Com);
  //$FlowExpectedError[incompatible-use] string is incompatible with number
  <Connected />
}

function testForbidsStateProperyOfInvalidTypeInMapStateToProps() {
  type Props = { str: string, ... };

  class Com extends React.Component<Props> {
    render() {
      return
{this.props.str}
;
    }
  }

  type State = {
    num: number,
    str: string,
    ...
  };

  const mapStateToPropsWithStatePropertyOfInvalidType = (state: State) => {
    return {
      str: state.num
    }
  };

  const Connected = connect(mapStateToPropsWithStatePropertyOfInvalidType)(Com);
  // Here Flow reports that `str` is missing from props,
  // while the real error is still the type mismatch,
  // fixing the original issue fixes the wrongly titled error.
  //$FlowExpectedError[incompatible-use]
  <Connected />;
}

function testForbidsSelectorWithInvalidReturnTypeInMapStateToProps() {
  type Props = { str: string, ... };

  class Com extends React.Component<Props> {
    render() {
      return
{this.props.str}
;
    }
  }

  type State = {
    num: number,
    str: string,
    ...
  };

  function selectorReturningNumber(state: State) {
    return state.num
  }

  const mapStateToPropsWithSelectorWithInvalidTypeReturnValue = (state: State) => {
    return {
      str: selectorReturningNumber(state)
    }
  };

  const Connected = connect(mapStateToPropsWithSelectorWithInvalidTypeReturnValue)(Com);
  // Here Flow reports that `str` is missing from props,
  // while the real error is still the type mismatch,
  // fixing the original issue fixes the wrongly titled error.
  //$FlowExpectedError[incompatible-use]
  <Connected />
}


text:
#ifndef TENSORFLOW_STREAM_EXECUTOR_CUDA_CUDA_GPU_EXECUTOR_H_
#define TENSORFLOW_STREAM_EXECUTOR_CUDA_CUDA_GPU_EXECUTOR_H_

#include "tensorflow/compiler/xla/stream_executor/cuda/cuda_gpu_executor.h"

#endif  // TENSORFLOW_STREAM_EXECUTOR_CUDA_CUDA_GPU_EXECUTOR_H_

redpajama_set_name: RedPajamaGithub


text:
package org.kie.workbench.common.screens.datamodeller.client.widgets.advanceddomain;

import javax.enterprise.context.Dependent;
import javax.inject.Inject;

import org.kie.workbench.common.screens.datamodeller.client.widgets.common.domain.ContextAwareBaseDomainEditor;

@Dependent
public class AdvancedDomainEditor extends ContextAwareBaseDomainEditor {

    public static final String ADVANCED_DOMAIN = "ADVANCED";

    public AdvancedDomainEditor() {
    }

    @Inject
    public AdvancedDomainEditor( AdvancedDataObjectEditor objectEditor, AdvancedDataObjectFieldEditor fieldEditor ) {
        super( objectEditor, fieldEditor );
    }
}


text:
title: "cartelera"
bg: white
color: black
style: center
---

## Conjunto Residencial
{: .text-blue}

# Puerta del Sur Etapa 6
{: .text-blue}

![Comunidad]({{ site.url }}/img/Comunidad.jpg)

# Planilla de Liquidación de Septiembre:

####**Para visualizar o descargar la planilla de liquidación de Septiembre puede usar el siguiente enlace:**

[**Planilla de Liquidación Septiembre**](https://drive.google.com/file/d/0B5Zy3wAHaeizVTNwOHVIWUkzR3M/view?usp=sharing)
{: .text-blue}

####**Para acceder a TODAS las planillas del año 2015 usted puede usar el siguiente enlace:**

[**Planillas de Liquidación 2015**](https://drive.google.com/open?id=0B5Zy3wAHaeizVTNwOHVIWUkzR3M)
{: .text-blue}

-----------------------

# CONVOCATORIA A ASAMBLEA DE PROPIETARIOS:
{: .text-red}

Se invita cordialmente a todos los propietarios del Conjunto Residencial Puerta del Sur Etapa 6 a una Asamblea de Propietarios a realizarse el próximo **jueves 15 de Octubre** en el Parque Principal.
El primer llamado será a las 6:30pm, el segundo a las 7pm y el tercero a las 7:30pm.

***A partir de las 7:30pm quedará oficialmente instalada la Asamblea con los Propietarios presentes.***
{: .text-red}

Los puntos a tratar serán:

1.- Validación de las Consultas Escritas (comenzará a las 6:30pm con los presentes).

2.- Presentación de gestión y finanzas al corte de Septiembre.

3.- **Elección de Nueva Junta de Condominio.**

###**CONTAMOS CON SU PRESENCIA**

**Las decisiones que se tomen serán de obligatorio cumplimiento para toda la comunidad**
{: .text-red}

![Comunidad]({{ site.url }}/img/Convocatoria2.png)

![Comunidad]({{ site.url }}/img/Convocatoria.png)


text:
<?php

namespace CollabCorp\ProjectJSON\Tests\Models;

use Illuminate\Database\Eloquent\Model;
use CollabCorp\ProjectJSON\Api\Traits\SerializeModel;

class Post extends Model
{
    use SerializeModel;

    public function op()
    {
        return $this->belongsTo(User::class, 'user_id');
    }
}


text:
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function

from absl import app as absl_app
from absl import flags
import numpy as np
import os
import pandas
import pickle
import tempfile
import tensorflow as tf
import urllib
import zipfile

FLAGS = flags.FLAGS

flags.DEFINE_string(
    name='base_url',
    default='http://files.grouplens.org/datasets/movielens/',
    help='Specify a base url of movielens dataset.')
flags.DEFINE_enum(
    name='filename', default='ml-latest-small.zip',
    enum_values=['ml-latest.zip', 'ml-latest-small.zip', 'ml-20m.zip'],
    help='Specify movielens dataset to download from MovieLens site.')
flags.DEFINE_string(
    name='export_dir', default='.',
    help='Specify directory where preprocessed data is saved.')
flags.DEFINE_float(
    name='rating_threshold', default=4.0,
    help='Ignore movies which rating is lower than the threshold.')

tf.logging.set_verbosity(tf.logging.INFO)

def load_movielens_data():
  # Download MovieLens dataset
  urllib.request.urlretrieve(
      url=os.path.join(FLAGS.base_url, FLAGS.filename),
      filename=FLAGS.filename)

  # Extract MovieLens dataset from zipfile
  zipfile.ZipFile(FLAGS.filename, 'r').extractall()

  # Load MovieLens dataset
  tmp_dir = FLAGS.filename.split('.')[0]
  movies = pandas.read_csv(
      filepath_or_buffer=os.path.join(tmp_dir, 'movies.csv'),
      names=['movie_id', 'title', 'genres'], header=0)
  ratings = pandas.read_csv(
      filepath_or_buffer=os.path.join(tmp_dir, 'ratings.csv'),
      names=['user_id', 'movie_id', 'rating', 'unix_timestamp'],
      header=0)

  # Remove unnecessary files.
  tf.gfile.DeleteRecursively(tmp_dir)
  tf.gfile.Remove(FLAGS.filename)
  return movies, ratings

def split_dataframe(dataframe, holdout_fraction=0.1):
  """Splits a DataFrame into training and test sets.
  Args:
    dataframe: a dataframe.
    holdout_fraction: fraction of dataframe rows to use in the test set.
  Returns:
    train: dataframe for training
    test: dataframe for testing
  """
  test = dataframe.sample(frac=holdout_fraction, replace=False)
  train = dataframe[~dataframe.index.isin(test.index)]
  return train, test

def make_sequence_example(user_id, movie_ids):
  """Returns a SequenceExample for the given user_id and movie_ids.
  Args:
    user_id: An user_id.
    movie_ids: A list of strings.
  Returns:
    A tf.train.SequenceExample containing user_id and movie_ids.
  """
  def _int64_feature(value):
    return tf.train.Feature(int64_list=tf.train.Int64List(value=[value]))

  feature = {'user_id': _int64_feature(user_id)}
  movie_id_features = [
      tf.train.Feature(int64_list=tf.train.Int64List(value=[id_]))
      for id_ in movie_ids]
  feature_list = {'movie_ids': tf.train.FeatureList(feature=movie_id_features)}
  features = tf.train.Features(feature=feature)
  feature_lists = tf.train.FeatureLists(feature_list=feature_list)
  return tf.train.SequenceExample(context=features, feature_lists=feature_lists)

def split_range(num_records, num_buckets):
  interval = num_records // num_buckets
  head_ids = [interval*i for i in range(num_buckets)]
  tail_ids = head_ids[1:] + [num_records]
  return list(zip(head_ids, tail_ids))

def make_tfrecord_files(dataframe, file_type, num_files):
  """Writes training and test data in TFRecord format."""
  user_id = dataframe['user_id'].values
  movie_ids = dataframe['movie_id2'].values

  N = dataframe.shape[0]
  for file_id, head_tail in enumerate(split_range(N, num_files)):
    export_file = "{}-{:05d}.tfrecord".format(file_type, file_id)
    export_path = os.path.join(FLAGS.export_dir, export_file)
    with tf.python_io.TFRecordWriter(export_path) as record_writer:
      for i in range(head_tail[0], head_tail[1]):
        sequence_example = make_sequence_example(user_id[i], movie_ids[i])
        record_writer.write(sequence_example.SerializeToString())

def main(_):
  tf.logging.info('Download {} ...'.format(FLAGS.filename))
  movies, ratings = load_movielens_data()
  movieid_to_index = dict(zip(movies['movie_id'].values, np.arange(len(movies))))
  movies['movie_id2'] = movies['movie_id'].apply(lambda x: movieid_to_index[x])
  ratings['movie_id2'] = ratings['movie_id'].apply(lambda x: movieid_to_index[x])

  tf.logging.info('Converting dataset ...')
  ratings = ratings[ratings['rating'] > FLAGS.rating_threshold]
  rawdata = (
      ratings[['user_id', 'movie_id2']]
      .groupby('user_id', as_index=False).aggregate(lambda x: list(x)))

  if tf.gfile.Exists(FLAGS.export_dir):
    tf.logging.info('Remove {} ...'.format(FLAGS.export_dir))
    tf.gfile.DeleteRecursively(FLAGS.export_dir)
  tf.gfile.MakeDirs(FLAGS.export_dir)

  tf.logging.info('Exporting TFRecord to {}'.format(FLAGS.export_dir))
  train_inputs, eval_inputs = split_dataframe(rawdata)
  make_tfrecord_files(dataframe=train_inputs, file_type='train', num_files=8)
  make_tfrecord_files(dataframe=eval_inputs, file_type='eval', num_files=1)

  tf.logging.info('Exporting metadata to {}'.format(FLAGS.export_dir))
  with tempfile.TemporaryDirectory() as tmp_dir:
    filename = 'metadata.pickle'
    metadata = {'N': len(movies), 'movies': movies, 'rawdata': rawdata}
    old_path = os.path.join(tmp_dir, filename)
    new_path = os.path.join(FLAGS.export_dir, filename)
    with open(old_path, 'wb') as f:
      pickle.dump(metadata, f)
    tf.gfile.Copy(old_path, new_path, overwrite=True)

  tf.logging.info('Exporting an index file for TensorBoard projector')
  with tempfile.TemporaryDirectory() as tmp_dir:
    filename = 'projector_index.tsv'
    old_path = os.path.join(tmp_dir, filename)
    new_path = os.path.join(FLAGS.export_dir, filename)
    movies[['movie_id2', 'title']].to_csv(
        old_path, header=True, index=False, sep='\t')
    tf.gfile.Copy(old_path, new_path, overwrite=True)

if __name__ == '__main__':
  absl_app.run(main)


text:
/////////////////////////////////////////////////////////////////////////////
// Name:        canvas.cpp
// Purpose:     Forty Thieves patience game
// Author:      Chris Breeze
// Modified by:
// Created:     21/07/97
// Copyright:   (c) 1993-1998 Chris Breeze
// Licence:     wxWindows licence
//---------------------------------------------------------------------------
// Last modified: 22nd July 1998 - ported to wxWidgets 2.0
/////////////////////////////////////////////////////////////////////////////

// For compilers that support precompilation, includes "wx/wx.h".
#include "wx/wxprec.h"

#ifndef WX_PRECOMP
#include "wx/wx.h"
#endif

#include "forty.h"
#include "card.h"
#include "game.h"
#include "scorefil.h"
#include "playerdg.h"
#include "canvas.h"

wxBEGIN_EVENT_TABLE(FortyCanvas, wxScrolledWindow)
    EVT_MOUSE_EVENTS(FortyCanvas::OnMouseEvent)
wxEND_EVENT_TABLE()

FortyCanvas::FortyCanvas(wxWindow* parent, const wxPoint& pos, const wxSize& size) :
             wxScrolledWindow(parent, wxID_ANY, pos, size, 0),
             m_helpingHand(true),
             m_rightBtnUndo(true),
             m_playerDialog(0),
             m_leftBtnDown(false)
{
    SetScrollbars(0, 0, 0, 0);

#ifdef __WXGTK__
    m_font = wxTheFontList->FindOrCreateFont(wxFontInfo(12).Family(wxFONTFAMILY_ROMAN));
#else
    m_font = wxTheFontList->FindOrCreateFont(wxFontInfo(10).Family(wxFONTFAMILY_SWISS));
#endif
    SetBackgroundColour(FortyApp::BackgroundColour());

    m_handCursor = new wxCursor(wxCURSOR_HAND);
    m_arrowCursor = new wxCursor(wxCURSOR_ARROW);

    wxString name = wxTheApp->GetAppName();
    if ( name.empty() ) name = wxT("forty");
    m_scoreFile = new ScoreFile(name);
    m_game = new Game(0, 0, 0);
    m_game->Deal();
}

FortyCanvas::~FortyCanvas()
{
    UpdateScores();
    delete m_game;
    delete m_scoreFile;
    delete m_handCursor;
    delete m_arrowCursor;
}

/*
Write the current player's score back to the score file
*/
void FortyCanvas::UpdateScores()
{
    if (!m_player.empty() && m_scoreFile && m_game)
    {
        m_scoreFile->WritePlayersScore(
            m_player,
            m_game->GetNumWins(),
            m_game->GetNumGames(),
            m_game->GetScore()
        );
    }
}

void FortyCanvas::OnDraw(wxDC& dc)
{
    dc.SetFont(* m_font);
    m_game->Redraw(dc);
#if 0
    // if player name not set (and selection dialog is not displayed)
    // then ask the player for their name
    if (m_player.empty() && !m_playerDialog)
    {
        m_playerDialog = new PlayerSelectionDialog(this, m_scoreFile);
        m_playerDialog->ShowModal();
        m_player = m_playerDialog->GetPlayersName();
        if ( !m_player.empty() )
        {
            // user entered a name - lookup their score
            int wins, games, score;
            m_scoreFile->ReadPlayersScore(m_player, wins, games, score);
            m_game->NewPlayer(wins, games, score);
            m_game->DisplayScore(dc);
            m_playerDialog->Destroy();
            m_playerDialog = 0;
            Refresh(false);
        }
        else
        {
            // user cancelled the dialog - exit the app
            ((wxFrame*)GetParent())->Close(true);
        }
    }
#endif
}

void FortyCanvas::ShowPlayerDialog()
{
    // if player name not set (and selection dialog is not displayed)
    // then ask the player for their name
    if (m_player.empty() && !m_playerDialog)
    {
        m_playerDialog = new PlayerSelectionDialog(this, m_scoreFile);
        m_playerDialog->ShowModal();
        m_player = m_playerDialog->GetPlayersName();
        if ( !m_player.empty() )
        {
            // user entered a name - lookup their score
            int wins, games, score;
            m_scoreFile->ReadPlayersScore(m_player, wins, games, score);
            m_game->NewPlayer(wins, games, score);

            wxClientDC dc(this);
            dc.SetFont(* m_font);
            m_game->DisplayScore(dc);
            m_playerDialog->Destroy();
            m_playerDialog = 0;
            Refresh(false);
        }
        else
        {
            // user cancelled the dialog - exit the app
            ((wxFrame*)GetParent())->Close(true);
        }
    }
}

/*
Called when the main frame is closed
*/
bool FortyCanvas::OnCloseCanvas()
{
    if (m_game->InPlay() &&
        wxMessageBox(wxT("Are you sure you want to\nabandon the current game?"),
            wxT("Warning"), wxYES_NO | wxICON_QUESTION) == wxNO)
    {
        return false;
    }
    return true;
}

void FortyCanvas::OnMouseEvent(wxMouseEvent& event)
{
    int mouseX = (int)event.GetX();
    int mouseY = (int)event.GetY();

    wxClientDC dc(this);
    PrepareDC(dc);
    dc.SetFont(* m_font);

    if (event.LeftDClick())
    {
        if (m_leftBtnDown)
        {
            m_leftBtnDown = false;
            ReleaseMouse();
            m_game->LButtonUp(dc, mouseX, mouseY);
        }
        m_game->LButtonDblClk(dc, mouseX, mouseY);
    }
    else if (event.LeftDown())
    {
        if (!m_leftBtnDown)
        {
            m_leftBtnDown = true;
            CaptureMouse();
            m_game->LButtonDown(dc, mouseX, mouseY);
        }
    }
    else if (event.LeftUp())
    {
        if (m_leftBtnDown)
        {
            m_leftBtnDown = false;
            ReleaseMouse();
            m_game->LButtonUp(dc, mouseX, mouseY);
        }
    }
    else if (event.RightDown() && !event.LeftIsDown())
    {
        // only allow right button undo if m_rightBtnUndo is true
        if (m_rightBtnUndo)
        {
            if (event.ControlDown() || event.ShiftDown())
            {
                m_game->Redo(dc);
            }
            else
            {
                m_game->Undo(dc);
            }
        }
    }
    else if (event.Dragging())
    {
        m_game->MouseMove(dc, mouseX, mouseY);
    }

    if (!event.LeftIsDown())
    {
        SetCursorStyle(mouseX, mouseY);
    }
}

void FortyCanvas::SetCursorStyle(int x, int y)
{
    // Only set cursor to a hand if 'helping hand' is enabled and
    // the card under the cursor can go somewhere
    if (m_game->CanYouGo(x, y) && m_helpingHand)
    {
        SetCursor(* m_handCursor);
    }
    else
    {
        SetCursor(* m_arrowCursor);
    }

}

void FortyCanvas::NewGame()
{
    m_game->Deal();
    Refresh();
}

void FortyCanvas::Undo()
{
    wxClientDC dc(this);
    PrepareDC(dc);
    dc.SetFont(* m_font);
    m_game->Undo(dc);
}

void FortyCanvas::Redo()
{
    wxClientDC dc(this);
    PrepareDC(dc);
    dc.SetFont(* m_font);
    m_game->Redo(dc);
}

void FortyCanvas::LayoutGame()
{
       m_game->Layout();
}


text:
@interface UserInfoViewController : UIViewController

@property (nonatomic,strong) UILabel *nameLabel;
@end


text:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;

namespace Pathfinding_Demo.Engine.Graphics
{
    /// <summary>
    /// This class is responsible for cropping a texture from a specific position to specific position.
    /// </summary>
    static class CropTexture
    {
        /// <summary>
        /// Crops a texture and then returns the cropped texture.
        /// </summary>
        /// <param name="Graphics">MonoGame GraphicsDeviceManager.</param>
        /// <param name="Texture">Texture you want to crop.</param>
        /// <param name="Area">The area you want to be cropped.</param>
        /// <returns>The cropped texture.</returns>
        public static Texture2D Crop(GraphicsDeviceManager Graphics, Texture2D Texture, Rectangle Area)
        {
            try
            {
                Texture2D cropped = new Texture2D(Graphics.GraphicsDevice, Area.Width, Area.Height);
                Color[] data = new Color[Texture.Width * Texture.Height];
                Color[] cropData = new Color[cropped.Width * cropped.Height];

                Texture.GetData<Color>(data);

                int index = 0;

                for (int y = Area.Y; y < Area.Y + Area.Height; y++)
                {
                    for (int x = Area.X; x < Area.X + Area.Width; x++)
                    {
                        cropData[index] = data[x + (y * Texture.Width)];
                        index++;
                    }
                }

                cropped.SetData<Color>(cropData);

                return cropped;
            }
            catch (Exception ex)
            {
                if (Graphics == null)
                    throw new Exception("Graphics argument is null", ex);
                else if (Texture == null)
                    throw new Exception("Texture argument is null", ex);
                else
                    throw ex;
            }
        }
    }
}


text:
<sky-modal>
  <sky-modal-header>{{ title }}</sky-modal-header>
  <sky-modal-content>
    <div class="sky-contrib-list-filters-modal-bar">
      <div *ngFor="let filter of modalFilters" class="filter">
        <sky-contrib-list-filter-renderer [template]="filter.template" [filter]="filter.filterModel"></sky-contrib-list-filter-renderer>
      </div>
    </div>
  </sky-modal-content>
  <sky-modal-footer>
    <button cmp-id="apply-filters" class="sky-btn sky-btn-primary" (click)="applyFilters()" [class.sky-btn-disabled]="!isValid()" [disabled]="!isValid()">Apply filters</button>
    <button cmp-id="clear-filters" class="sky-btn sky-btn-link" (click)="clearFilters()">Clear all filters</button>
    <button cmp-id="cancel" class="sky-btn sky-btn-link" (click)="modal.closeButtonClick()">Cancel</button>
  </sky-modal-footer>
</sky-modal>


text:
"""
Execution module for Cisco Network Services Orchestrator Proxy minions

.. versionadded:: 2016.11.0

For documentation on setting up the cisconso proxy minion look in the documentation
for :mod:`salt.proxy.cisconso<salt.proxy.cisconso>`.
"""

import salt.utils.platform

__proxyenabled__ = ["cisconso"]
__virtualname__ = "cisconso"

def __virtual__():
    if salt.utils.platform.is_proxy():
        return __virtualname__
    return (
        False,
        "The cisconso execution module failed to load: "
        "only available on proxy minions.",
    )

def info():
    """
    Return system information for grains of the NSO proxy minion

    .. code-block:: bash

        salt '*' cisconso.info
    """
    return _proxy_cmd("info")

def get_data(datastore, path):
    """
    Get the configuration of the device tree at the given path

    :param datastore: The datastore, e.g. running, operational.
        One of the NETCONF store IETF types
    :type  datastore: :class:`DatastoreType` (``str`` enum).

    :param path: The device path to set the value at,
        a list of element names in order, / separated
    :type  path: ``list``, ``str`` OR ``tuple``

    :return: The network configuration at that tree
    :rtype: ``dict``

    .. code-block:: bash

        salt cisco-nso cisconso.get_data running 'devices/ex0'
    """
    if isinstance(path, str):
        path = "/".split(path)
    return _proxy_cmd("get_data", datastore, path)

def set_data_value(datastore, path, data):
    """
    Set a data entry in a datastore

    :param datastore: The datastore, e.g. running, operational.
        One of the NETCONF store IETF types
    :type  datastore: :class:`DatastoreType` (``str`` enum).

    :param path: The device path to set the value at,
        a list of element names in order, / separated
    :type  path: ``list``, ``str`` OR ``tuple``

    :param data: The new value at the given path
    :type  data: ``dict``

    :rtype: ``bool``
    :return: ``True`` if successful, otherwise error.

    .. code-block:: bash

        salt cisco-nso cisconso.set_data_value running 'devices/ex0/routes' 10.0.0.20/24
    """
    if isinstance(path, str):
        path = "/".split(path)
    return _proxy_cmd("set_data_value", datastore, path, data)

def get_rollbacks():
    """
    Get a list of stored configuration rollbacks

    .. code-block:: bash

        salt cisco-nso cisconso.get_rollbacks
    """
    return _proxy_cmd("get_rollbacks")

def get_rollback(name):
    """
    Get the backup of stored a configuration rollback

    :param name: Typically an ID of the backup
    :type  name: ``str``

    :rtype: ``str``
    :return: the contents of the rollback snapshot

    .. code-block:: bash

        salt cisco-nso cisconso.get_rollback 52
    """
    return _proxy_cmd("get_rollback", name)

def apply_rollback(datastore, name):
    """
    Apply a system rollback

    :param datastore: The datastore, e.g. running, operational.
        One of the NETCONF store IETF types
    :type  datastore: :class:`DatastoreType` (``str`` enum).

    :param name: an ID of the rollback to restore
    :type  name: ``str``

    .. code-block:: bash

        salt cisco-nso cisconso.apply_rollback 52
    """
    return _proxy_cmd("apply_rollback", datastore, name)

def _proxy_cmd(command, *args, **kwargs):
    """
    run commands from __proxy__
    :mod:`salt.proxy.cisconso<salt.proxy.cisconso>`

    command
        function from `salt.proxy.cisconso` to run

    args
        positional args to pass to `command` function

    kwargs
        key word arguments to pass to `command` function
    """
    proxy_prefix = __opts__["proxy"]["proxytype"]
    proxy_cmd = ".".join([proxy_prefix, command])
    if proxy_cmd not in __proxy__:
        return False
    for k in kwargs:
        if k.startswith("__pub_"):
            kwargs.pop(k)
    return __proxy__[proxy_cmd](*args, **kwargs)


text:
var testvar;

$(function (){
// EVENT DISPATCHER

window.dispatch = d3.dispatch("load", "generated", "highlight", "unhighlight", "toggleFocus", "sentenceTooltip");

// DONUT CHART

var presidents = {
  "99": {"name": "Obama's pre-SOTU Tour"},
  "01": {"name": "George Washington"},
  "03": {"name": "Thomas Jefferson"},
  "40": {"name": "Ronald Reagan"},
  "41": {"name": "George H. W. Bush"},
  "42": {"name": "William J. Clinton"},
  "43": {"name": "George W. Bush"},
  "44": {"name": "Barack Obama"},
  "16": {"name": "Abraham Lincoln"},
  "26": {"name": "Theodore Roosevelt"}
};

var tooltip = d3.select("body").append("div")
    .attr("class", "tooltip")
    .style("opacity", 0);

var pieChartLabel = $('.sotu-chart-label');

var focusedPrezID = null;

var parseIdWeightString = function(idWeightString){
    var parsedIdWeights = [];
    _.each( _.range(0, idWeightString.length, 3), function(e,i,ls){
                                                    parsedIdWeights.push({
                                                        'id': idWeightString.substring(e,e+2),
                                                        'weight': idWeightString.substring(e+2,e+3)
                                                    });});
    parsedIdWeights.forEach(function(d) {
              d.id = d.id;
              d.weight = +d.weight;
              d.name = presidents[d.id]['name'];
              // for reference in annotations, tooltips, etc
              presidents[d.id]['weight'] = +d.weight;
            });
    return parsedIdWeights;
};

var testIWS = '412433441264164423012403031';

var chartDiv = d3.select('#sotu-chart');

var width = parseInt(chartDiv.style("width")),
    height = parseInt(chartDiv.style("height")),
    radius = Math.min(width, height) / 2,
    pieInnerRadius = radius - 30,
    pieOuterRadius = radius - 20,
    pictureRadius = radius - 40;

var arc = d3.svg.arc()
        .outerRadius(pieInnerRadius)
            .innerRadius(pieOuterRadius);

var pie = d3.layout.pie()
        //.sort(function(a, b){ return b.weight - a.weight;})
        .sort(function(a,b){ return d3.ascending(a.id, b.id);})
            .value(function(d) { return d.weight; });

var svg = d3.select("#sotu-chart").append("svg")
            .attr("width", width)
            .attr("height", height);

var defs = svg.append("defs");

var clipPath = svg.append("clipPath")
       .attr("id", "clipCircle")
       .append("circle")
       .attr("r", pictureRadius)
       .attr("cx", 60)
       .attr("cy", 60);

var prezPicture = svg.append("g")
            .attr("transform", "translate(" + ((width / 2) - pictureRadius) + "," + ((height / 2) - pictureRadius) + ")")
            .append("image")
            .attr("width", function(){ return pictureRadius * 2;})
            .attr("height", function(){ return pictureRadius * 2;})
            .attr("clip-path", "url(#clipCircle)");

var updatePicture = function(id) {
  var ext = (id == null) ? "png" : "jpg";
  if (focusedPrezID == null || id == focusedPrezID) {
      prezPicture.attr("xlink:href", "/static/"+id+"." + ext);
  }
};

var updateLabel = function(id) {
  if (focusedPrezID == null || id == focusedPrezID) {
    if (id) {
      var name = presidents[id]['name'];
      var percentage = d3.round((presidents[id]['weight']/weight_total) * 100) + "%";
      pieChartLabel.html(name + " — " + percentage);
    } else {
      pieChartLabel.text('CONTRIBUTOR BREAKDOWN');
    }
  }
}

function key(d) {
  return d.data.id;
}

function type(d) {
  d.weight = +d.weight;
  return d;
}

function findNeighborArc(i, data0, data1, key) {
  var d;
  return (d = findPreceding(i, data0, data1, key)) ? {startAngle: d.endAngle, endAngle: d.endAngle}
      : (d = findFollowing(i, data0, data1, key)) ? {startAngle: d.startAngle, endAngle: d.startAngle}
      : null;
}

// Find the element in data0 that joins the highest preceding element in data1.
function findPreceding(i, data0, data1, key) {
  var m = data0.length;
  while (--i >= 0) {
    var k = key(data1[i]);
    for (var j = 0; j < m; ++j) {
      if (key(data0[j]) === k) return data0[j];
    }
  }
}

// Find the element in data0 that joins the lowest following element in data1.
function findFollowing(i, data0, data1, key) {
  var n = data1.length, m = data0.length;
  while (++i < n) {
    var k = key(data1[i]);
    for (var j = 0; j < m; ++j) {
      if (key(data0[j]) === k) return data0[j];
    }
  }
}

function arcTween(d) {
  var i = d3.interpolate(this._current, d);
  this._current = i(0);
  return function(t) { return arc(i(t)); };
}

var donutChart = svg.append("g")
            .classed("prezColors", true)
            .attr("transform", "translate(" + width / 2 + "," + height / 2 + ")");

var path = donutChart.selectAll("path");

var firstPrezID;

var sentenceHighlighting = function() {
    d3.selectAll('.sentence')
            .classed('unfocused', true)
            .on('mouseover', function(d) {
                var prez_id = String(d3.select(this).attr('data-prez-id'));
                dispatch.highlight(prez_id);
                dispatch.sentenceTooltip(prez_id, d3.select(this));
            })
            .on('mouseout', function(d) {
                var prez_id = String(d3.select(this).attr('data-prez-id'));
                dispatch.unhighlight(prez_id);
            })
            .on('click', function(d) {
                var prez_id = String(d3.select(this).attr('data-prez-id'));
                dispatch.highlight(prez_id);
                dispatch.toggleFocus(prez_id);
                updateLabel(prez_id);
            })
            ;
};

dispatch.on("generated", function (id_weight_string) {
    console.log('called dispatch.generated')
    new_data = parseIdWeightString(id_weight_string);

    sentenceHighlighting();

    firstPrezID = d3.select('.the-speech p:first-of-type span:first-of-type').attr('data-prez-id');

    weight_total = d3.sum(new_data, function(d){ return d.weight; });

    updatePicture(firstPrezID);
    updateLabel();

    var data0 = path.data(),
        data1 = pie(new_data);

    path = path.data(data1, key);

    path.enter().append("path")
        .each(function(d, i) { this._current = findNeighborArc(i, data0, data1, key) || d; })
        .attr("class", function(d){
            var c = "prezColors p"+d.data.id+" unfocused";
            console.log(c);
            return c;
        })
        .attr("id", function(d){ return "slice-"+d.data.id; })
      //.append("title")
        //.text(function(d) { return d.data.id; })
        .on("mouseover", function(d) {
            dispatch.highlight(d.data.id);
        })
        .on("mouseout", function(d) {
            dispatch.unhighlight(d.data.id);
        })
        .on('click', function(d) {
            dispatch.toggleFocus(d.data.id);
        });

    path.exit()
        .datum(function(d, i) { return findNeighborArc(i, data1, data0, key) || d; })
      .transition()
        .duration(750)
        .attrTween("d", arcTween)
        .remove();

    // TODO: Try to implement the weird unfurl thing on the first load
    path.transition()
        .duration(750)
        .attrTween("d", arcTween);

});

dispatch.on("sentenceTooltip", function(prez_id, sentence) {

    sentenceNode = $(sentence)[0]

    var firstSpan = $('.the-speech p:first-of-type span:first-of-type');

    tooltip.transition()
           .duration(200)
           .style("opacity", .9);

    var tooltipWidth = $($(tooltip)[0]).outerWidth(true);

    var sentenceOffset = $(sentenceNode).offset()
    var firstSpanOffset = $(firstSpan).offset()

    var sentenceLeft = firstSpanOffset.left - (tooltipWidth + 10)
    var sentenceTop = sentenceOffset.top

    tooltip.html(  ''+ presidents[prez_id]['name']+'' +
                   '
' +
                   d3.round((presidents[prez_id]['weight']/weight_total) * 100) + "%")
                .style("left", (sentenceLeft + "px"))
                .style("top", (sentenceTop + "px"));

});

dispatch.on("highlight", function(prez_id) {

    // TODO: Change center picture to one of that prez

    updatePicture(prez_id);
    updateLabel(prez_id);

    // TODO: Color-highlight spans with text from that prez

    d3.selectAll('.sentence')
            .classed('p'+prez_id, function() {
                pid = String(d3.select(this).attr("data-prez-id"));
                if (pid == prez_id) {
                    return true;
                } else {
                    return false;
                }});

    // TODO: Grow pie slice

    donutChart.append('use')
        .style('pointer-events', 'none')
        .classed('unfocused', true)
        .attr('data-prez-id', prez_id)
        .attr('xlink:href','#slice-'+prez_id)
        .transition()
        .attr('transform', 'scale(0.95)');

    donutChart.append('use')
        .style('pointer-events', 'none')
        .classed('unfocused', true)
        .attr('data-prez-id', prez_id)
        .attr('xlink:href','#slice-'+prez_id)
        .transition()
        .attr('transform', 'scale(1.05)');

});

dispatch.on("unhighlight", function(prez_id) {
    // Make tooltip invisible
    tooltip.transition()
        .duration(500)
        .style("opacity", 0);

    // TODO: Change center picture back to firstPrez

    updatePicture(firstPrezID);
    updateLabel();

    // TODO: Remove color-highlight from spans with text from that prez

    d3.selectAll('.sentence.unfocused')
            .classed('p'+prez_id, false);

    // TODO: Grow pie slice

    donutChart.selectAll('use[data-prez-id="'+prez_id+'"].unfocused').transition().attr('transform', 'scale(1)').remove();
    //d3.selectAll('path[data-slice="'+prez_id+'"]')
    //    .attr('transform', 'scale(1)');

});

dispatch.on("toggleFocus", function(prez_id) {

    // if user clicked on element for current locked id
    if (focusedPrezID == prez_id) {
        // unfocus
        d3.selectAll('[data-prez-id="'+prez_id+'"]')
          .classed('unfocused', true)
          .classed('focused', false);
        focusedPrezID = null;
    } else {
        // focus
        if (focusedPrezID != null) {
            d3.selectAll('[data-prez-id="'+focusedPrezID+'"]')
              .classed('unfocused', true)
              .classed('focused', false);
            dispatch.unhighlight(focusedPrezID);
        };
        d3.selectAll('[data-prez-id="'+prez_id+'"]')
          .classed('focused', true)
          .classed('unfocused', false);
        focusedPrezID = prez_id;
        updatePicture(prez_id);
        updateLabel(prez_id);
    }
});

dispatch.generated(testIWS);

});


text:
<?xml version="1.0" encoding="utf-8"?>
<!--
**
** Copyright 2008, The Android Open Source Project
**
** Licensed under the Apache License, Version 2.0 (the "License")
** you may not use this file except in compliance with the License.
** You may obtain a copy of the License at
**
**     http://www.apache.org/licenses/LICENSE-2.0
**
** Unless required by applicable law or agreed to in writing, software
** distributed under the License is distributed on an "AS IS" BASIS,
** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
** See the License for the specific language governing permissions and
** limitations under the License.
*/
-->
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:orientation="vertical"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:background="@android:color/background_dark"
        >

    <LinearLayout android:id="@+id/topDisplayGroup"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:orientation="vertical">

        <!-- header text ('Enter Puk Code') -->
        <TextView android:id="@+id/headerText"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:gravity="center"
            android:singleLine="true"
            android:textAppearance="?android:attr/textAppearanceLarge"/>

        <!-- Carrier info -->
        <TextView android:id="@+id/carrier"
            android:layout_width="fill_parent"
            android:layout_height="wrap_content"
            android:layout_marginTop="9dip"
            android:gravity="center"
            android:singleLine="true"
            android:ellipsize="marquee"
            android:textAppearance="?android:attr/textAppearanceMedium"/>

        <LinearLayout
            android:orientation="horizontal"
            android:layout_width="match_parent"
            android:layout_height="wrap_content">

            <LinearLayout
                android:orientation="vertical"
                android:layout_width="wrap_content"
                android:layout_height="match_parent"
                android:layout_marginEnd="10dip"
                android:layout_marginStart="10dip">
                <TextView android:id="@+id/enter_puk"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:gravity="center_vertical"
                    android:text="@android:string/keyguard_password_enter_puk_prompt"
                    android:textSize="30sp"
                    android:layout_marginBottom="10dip"/>
                <TextView android:id="@+id/enter_pin"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:gravity="center_vertical"
                    android:text="@android:string/keyguard_password_enter_pin_prompt"
                    android:textSize="30sp"
                    android:layout_marginTop="10dip"/>
            </LinearLayout>

            <LinearLayout
                  android:orientation="vertical"
                  android:layout_width="wrap_content"
                  android:layout_weight="1"
                  android:layout_height="match_parent"
                  android:paddingEnd="0dip"
                  android:layout_marginEnd="10dip"
                  android:layout_marginStart="10dip">

                  <LinearLayout
                      android:layout_width="match_parent"
                      android:layout_height="wrap_content"
                      android:orientation="horizontal"
                      android:layout_marginEnd="6dip"
                      android:layout_marginStart="6dip"
                      android:gravity="center_vertical"
                      android:background="@android:drawable/edit_text">

                      <!-- displays dots as user enters puk -->
                      <TextView android:id="@+id/pukDisplay"
                          android:layout_width="0dip"
                          android:layout_height="wrap_content"
                          android:layout_weight="1"
                          android:maxLines="1"
                          android:textAppearance="?android:attr/textAppearanceLargeInverse"
                          android:textStyle="bold"
                          android:inputType="textPassword"
                      />

                      <ImageButton android:id="@+id/pukDel"
                          android:src="@android:drawable/ic_input_delete"
                          android:layout_width="wrap_content"
                          android:layout_height="wrap_content"
                          android:layout_marginEnd="-3dip"
                          android:layout_marginBottom="-3dip"
                      />
                  </LinearLayout>

                  <LinearLayout
                      android:layout_width="match_parent"
                      android:layout_height="wrap_content"
                      android:orientation="horizontal"
                      android:layout_marginEnd="6dip"
                      android:layout_marginStart="6dip"
                      android:gravity="center_vertical"
                      android:background="@android:drawable/edit_text">

                      <!-- displays dots as user enters new pin -->
                      <EditText android:id="@+id/pinDisplay"
                          android:layout_width="0dip"
                          android:layout_height="wrap_content"
                          android:layout_weight="1"
                          android:maxLines="1"
                          android:textAppearance="?android:attr/textAppearanceLargeInverse"
                          android:textColor="@android:color/primary_text_holo_light"
                          android:textStyle="bold"
                          android:inputType="textPassword"
                          android:hint="@android:string/keyguard_password_enter_pin_prompt"
                      />

                      <ImageButton android:id="@+id/pinDel"
                          android:src="@android:drawable/ic_input_delete"
                          android:layout_width="wrap_content"
                          android:layout_height="wrap_content"
                          android:layout_marginEnd="-3dip"
                          android:layout_marginBottom="-3dip"
                      />
                  </LinearLayout>
              </LinearLayout>
        </LinearLayout>
    </LinearLayout>

    <LinearLayout
        android:orientation="horizontal"
        android:layout_alignParentBottom="true"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_marginBottom="8dip"
        android:layout_marginStart="8dip"
        android:layout_marginEnd="8dip">

        <Button android:id="@+id/emergencyCallButton"
            android:text="@android:string/lockscreen_emergency_call"
            android:layout_alignParentBottom="true"
            android:layout_centerHorizontal="true"
            android:layout_width="0dip"
            android:layout_height="wrap_content"
            android:layout_weight="1.0"
            android:layout_marginBottom="8dip"
            android:layout_marginEnd="8dip"
            android:textSize="18sp"
            android:drawableLeft="@drawable/ic_emergency"
            android:drawablePadding="4dip"
        />

        <Button android:id="@+id/ok"
            android:text="@android:string/ok"
            android:layout_alignParentBottom="true"
            android:layout_width="0dip"
            android:layout_height="wrap_content"
            android:layout_weight="1.0"
            android:layout_marginBottom="8dip"
            android:layout_marginStart="8dip"
            android:textSize="18sp"
        />
    </LinearLayout>

</RelativeLayout>


text:
<title>hword - Using as</title>
<meta http-equiv="Content-Type" content="text/html">
<meta name="description" content="Using as">
<meta name="generator" content="makeinfo 4.8">
<link title="Top" rel="start" href="index.html#Top">
<link rel="up" href="Pseudo-Ops.html#Pseudo-Ops" title="Pseudo Ops">
<link rel="prev" href="Hidden.html#Hidden" title="Hidden">
<link rel="next" href="Ident.html#Ident" title="Ident">
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">

<meta http-equiv="Content-Style-Type" content="text/css">

Next: Ident,
Previous: Hidden,
Up: Pseudo Ops

7.60 .hword <var>expressions</var>

This expects zero or more <var>expressions</var>, and emits
a 16 bit number for each.

This directive is a synonym for `<samp>.short</samp>'; depending on the target
architecture, it may also be a synonym for `<samp>.word</samp>'.


text:
package gt.transparente.app.presentation.presenter;

import android.support.annotation.NonNull;

import gt.transparente.app.data.exception.NoMoreDataAvailableException;
import gt.transparente.app.domain.PoliticalParty;
import gt.transparente.app.domain.exception.DefaultErrorBundle;
import gt.transparente.app.domain.exception.ErrorBundle;
import gt.transparente.app.domain.interactor.DefaultSubscriber;
import gt.transparente.app.domain.interactor.GetPoliticalPartyList;
import gt.transparente.app.domain.interactor.UseCase;
import gt.transparente.app.presentation.di.modules.TransparentModule_ProvideGetPoliticalPartyListUseCaseFactory;
import gt.transparente.app.presentation.exception.ErrorMessageFactory;
import gt.transparente.app.presentation.di.PerActivity;
import gt.transparente.app.presentation.mapper.PoliticalPartyModelDataMapper;
import gt.transparente.app.presentation.model.PoliticalPartyModel;
import gt.transparente.app.presentation.view.PoliticalPartyListView;

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

import javax.inject.Inject;
import javax.inject.Named;

/**
 * {@link Presenter} that controls communication between views and models of the presentation
 * layer.
 */
@PerActivity
public class PoliticalPartyListPresenter implements Presenter {

    private PoliticalPartyListView mViewListView;

    private final GetPoliticalPartyList mGetPoliticalPartyListUseCase;
    private final PoliticalPartyModelDataMapper mPoliticalPartyModelDataMapper;

    @Inject
    public PoliticalPartyListPresenter(@Named("politicalPartyList") UseCase getPoliticalPartyListUseCase, PoliticalPartyModelDataMapper politicalPartyModelDataMapper) {
        this.mGetPoliticalPartyListUseCase = (GetPoliticalPartyList) getPoliticalPartyListUseCase;
        this.mPoliticalPartyModelDataMapper = politicalPartyModelDataMapper;
    }

    public void setView(@NonNull PoliticalPartyListView view) {
        this.mViewListView = view;
    }

    @Override
    public void resume() {
    }

    @Override
    public void pause() {
    }

    @Override
    public void destroy() {
        this.mGetPoliticalPartyListUseCase.unsubscribe();
    }

    /**
     * Initializes the presenter by start retrieving the political party list.
     */
    public void initialize(int pageNumber) {
        this.loadPoliticalPartyList(pageNumber);
    }

    /**
     * Loads all political parties.
     */
    private void loadPoliticalPartyList(int pageNumber) {
        this.hideViewRetry();
        this.showViewLoading();
        this.getPoliticalPartyList(pageNumber);
    }

    public void onPoliticalPartyClicked(PoliticalPartyModel politicalPartyModel) {
        this.mViewListView.viewPoliticalParty(politicalPartyModel);
    }

    private void showViewLoading() {
        this.mViewListView.showLoading();
    }

    private void hideViewLoading() {
        this.mViewListView.hideLoading();
    }

    private void showViewRetry() {
        this.mViewListView.showRetry();
    }

    private void hideViewRetry() {
        this.mViewListView.hideRetry();
    }

    private void showErrorMessage(ErrorBundle errorBundle) {
        String errorMessage = ErrorMessageFactory.create(this.mViewListView.getContext(),
                errorBundle.getException());
        this.mViewListView.showError(errorMessage);
    }

    private void showPoliticalPartiesCollectionInView(Collection<PoliticalParty> politicalPartyCollection) {
        final Collection<PoliticalPartyModel> PoliticalPartyModel =
                this.mPoliticalPartyModelDataMapper.transform(politicalPartyCollection);
        this.mViewListView.renderPoliticalPartyList(PoliticalPartyModel);
    }

    private void getPoliticalPartyList(int pageNumber) {
        this.mGetPoliticalPartyListUseCase.setPageNumber(pageNumber);
        this.mGetPoliticalPartyListUseCase.execute(new PoliticalPartyListSubscriber());
    }

    private final class PoliticalPartyListSubscriber extends DefaultSubscriber<List<PoliticalParty>> {

        @Override
        public void onCompleted() {
            PoliticalPartyListPresenter.this.hideViewLoading();
        }

        @Override
        public void onError(Throwable e) {
            PoliticalPartyListPresenter.this.hideViewLoading();
            PoliticalPartyListPresenter.this.showErrorMessage(new DefaultErrorBundle((Exception) e));
            if (!(e instanceof NoMoreDataAvailableException)) {
                PoliticalPartyListPresenter.this.showViewRetry();
            }
        }

        @Override
        public void onNext(List<PoliticalParty> politicalParties) {
            PoliticalPartyListPresenter.this.showPoliticalPartiesCollectionInView(politicalParties);
        }
    }
}


text:
module Main(
  main,
  emptyRepl
) where

import SLISP.Core
import SLISP.Data
import SLISP.Repl
import SLISP.Util.System(time)

import System.Environment(getArgs)
import System.Exit(exitFailure)
import qualified Control.Exception as E(catch, SomeException)

main :: IO ()
main = do
  getArgs >>= \args -> case args of
    [] -> return ()
    "-h":_ -> putStrLn "slisp [-rhib] <files>"
    "-r":files -> repl True files
    "-i":_ -> repl False []
    "-b":files -> time (runFiles files)
    files -> runFiles files

emptyRepl :: IO ()
emptyRepl = repl True []

runFiles :: [String] -> IO ()
runFiles files = E.catch (justRun files) handler

justRun :: [String] -> IO ()
justRun files = loadLibs files (emptyTable, Fixnum 1) >>= putStrLn . show . snd

handler :: E.SomeException -> IO ()
handler e = (putStrLn $ "Exception: " ++ show e) >> exitFailure


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

<title>graphics.nim.volterra.util</title>
<meta name="date" content="2016-07-16">
<link rel="stylesheet" type="text/css" href="../../../../stylesheet.css" title="Style">

JavaScript is disabled on your browser.

Skip navigation links

Overview

Package

Class

Use

Tree

Deprecated

Index

Help

Prev Package

Next Package

Frames

No Frames

All Classes

Package graphics.nim.volterra.util

Class Summary

Class
Description

Log

MathUtil

Matrix4f

Probability

Timer

Vector2f

Vector3f

Vector3i

Skip navigation links

Overview

Package

Class

Use

Tree

Deprecated

Index

Help

Prev Package

Next Package

Frames

No Frames

All Classes


text:
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
  <component name="ProjectModuleManager">
    <modules>
      <module fileurl="file://$PROJECT_DIR$/context-integration.iml" filepath="$PROJECT_DIR$/context-integration.iml" />
      <module fileurl="file://$PROJECT_DIR$/cwd_integration_distribution/cwd_integration_distribution.iml" filepath="$PROJECT_DIR$/cwd_integration_distribution/cwd_integration_distribution.iml" />
      <module fileurl="file://$PROJECT_DIR$/cwd_integration_documentation/cwd_integration_documentation.iml" filepath="$PROJECT_DIR$/cwd_integration_documentation/cwd_integration_documentation.iml" />
      <module fileurl="file://$PROJECT_DIR$/cwd_integration_dotnet/cwd_integration_dotnet.iml" filepath="$PROJECT_DIR$/cwd_integration_dotnet/cwd_integration_dotnet.iml" />
      <module fileurl="file://$PROJECT_DIR$/cwd_optimize_js/cwd_optimize_js.iml" filepath="$PROJECT_DIR$/cwd_optimize_js/cwd_optimize_js.iml" />
    </modules>
  </component>
</project>


text:
<?php

namespace app\models\search;

use Yii;
use yii\base\Model;
use yii\data\ActiveDataProvider;
use app\models\Ordenes;

/**
 * OrdenesSearch represents the model behind the search form about `app\models\Ordenes`.
 */
class OrdenesSearch extends Ordenes
{
    /**
     * @inheritdoc
     */
    public function rules()
    {
        return [
            [['OrdenID', 'ClienteID', 'FormaPagoID'], 'integer'],
            [['OrdenFecha', 'OrdenEstado', 'Observaciones', 'Ordencol'], 'safe'],
        ];
    }

    /**
     * @inheritdoc
     */
    public function scenarios()
    {
        // bypass scenarios() implementation in the parent class
        return Model::scenarios();
    }

    /**
     * Creates data provider instance with search query applied
     *
     * @param array $params
     *
     * @return ActiveDataProvider
     */
    public function search($params)
    {
        $query = Ordenes::find();

        $dataProvider = new ActiveDataProvider([
            'query' => $query,
        ]);

        $this->load($params);

        if (!$this->validate()) {
            // uncomment the following line if you do not want to return any records when validation fails
            // $query->where('0=1');
            return $dataProvider;
        }

        $query->andFilterWhere([
            'OrdenID' => $this->OrdenID,
            'OrdenFecha' => $this->OrdenFecha,
            'ClienteID' => $this->ClienteID,
            'FormaPagoID' => $this->FormaPagoID,
        ]);

        $query->andFilterWhere(['like', 'OrdenEstado', $this->OrdenEstado])
            ->andFilterWhere(['like', 'Observaciones', $this->Observaciones])
            ->andFilterWhere(['like', 'Ordencol', $this->Ordencol]);

        return $dataProvider;
    }
}


text:
from django.conf.urls import patterns, url

from . import views

urlpatterns = patterns('',
    url(r'^manage/$', views.ManageChannel.as_view(), name='manage_channel'),
    url(r'^delete/$', views.DeleteChannel.as_view(), name='delete_channel'),
)


text:
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<catalog xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog" prefer="system">
    <system systemId="file:/C:/dev_NEW/hieos/src/xutil/healthcare-security-audit.xsd" uri="xml-resources/jaxb/ATNA_JAXB/healthcare-security-audit.xsd"/>
</catalog>


text:
<!doctype html>

  <meta charset="utf-8" />
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
  <base href="{{ .Site.BaseUrl }}">
  <title>{{.Site.Title}} </title>

  <meta name="locale" content="{{ .Site.Params.locale}} ">
  <meta name="themes" content="{{ .Site.Params.themes}} ">
  <meta name="site" content="{{ .Site.Params.site}} ">
  <meta name="keywords" content="{{ range  .Site.Params.keywords }}{{.}},{{ end }}">
  <meta name="description" content="{{ range  .Site.Params.description }}{{.}} {{ end }}">
  <link rel="alternate" type="application/atom+xml" title="{{.Site.Title}}" href="{{ .Site.BaseUrl }}/index.xml" />

    <link href="dist/css/vendor/bootstrap.min.css" rel="stylesheet">

    <link href="dist/css/flat-ui.css" rel="stylesheet">

<

Ilmainen rekisteröinti

                    <form role="form">

    Sähköpostiosoite
    <input type="email" class="form-control" id="exampleInputEmail1" placeholder="Enter email">

    Salasana
    <input type="password" class="form-control" id="exampleInputPassword1" placeholder="Password">

     <button type="submit" class="btn btn-default">Esittää</button>

        <button type="button" class="btn btn-primary">Tallenna muutokset</button>

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

            {{ range .Site.Menus.main }}

            	{{ .Name }}
            {{ end }}


text:
package rx.oanda.accounts

import akka.actor.ActorSystem
import akka.http.scaladsl.Http
import akka.http.scaladsl.Http.{HostConnectionPool, ServerBinding}
import akka.http.scaladsl.coding.Gzip
import akka.http.scaladsl.model._
import akka.http.scaladsl.server.Directives._
import akka.stream.scaladsl.Flow
import akka.stream.{ActorMaterializer, Materializer}
import org.scalatest.{BeforeAndAfterAll, FlatSpec}
import rx.oanda.OandaEnvironment.ConnectionPool

import scala.concurrent.Future
import scala.util.Try

trait FakeAccountEndpoints extends FlatSpec with BeforeAndAfterAll {

  implicit val system = ActorSystem("fake-account-endpoints")
  implicit val mat = ActorMaterializer()

  import system.dispatcher

  val route =
    path("v1" / "accounts") {
      encodeResponseWith(Gzip) {
        get {
          complete {
            HttpEntity("{\"accounts\":[{\"accountId\":8954947,\"accountName\":\"Primary\",\"accountCurrency\":\"USD\",\"marginRate\":0.05},{\"accountId\":8954946,\"accountName\":\"Demo\",\"accountCurrency\":\"EUR\",\"marginRate\":0.05}]}").withContentType(ContentTypes.`application/json`)
          }
        } ~
          post {
            complete {
              HttpEntity("""{"username":"keith","password":"Rocir~olf4","accountId":8954947}""").withContentType(ContentTypes.`application/json`)
            }
          }
      }
    } ~
    path("v1" / "accounts" / LongNumber) { accountId ⇒
      encodeResponseWith(Gzip) {
        complete {
          HttpEntity(s"""{"accountId":$accountId,"accountName":"Primary","balance":100000,"unrealizedPl":1.1,"realizedPl":-2.2,"marginUsed":3.3,"marginAvail":100000,"openTrades":1,"openOrders":2,"marginRate":0.05,"accountCurrency":"USD"}""").withContentType(ContentTypes.`application/json`)
        }
      }
    }

  var bindingFuture: Future[ServerBinding] = _

  implicit val WithAuthTestConnectionPool: ConnectionPool = new ConnectionPool {
    def apply[T](endpoint: String)(implicit mat: Materializer, system: ActorSystem): Flow[(HttpRequest, T), (Try[HttpResponse], T), HostConnectionPool] =
      Http().cachedHostConnectionPool[T]("localhost", 8001).log("connection")
  }

  override protected def beforeAll(): Unit = {
    bindingFuture = Http().bindAndHandle(route, "localhost", 8001)
  }

  override protected def afterAll(): Unit = bindingFuture
    .flatMap(_.unbind())
    .onComplete(_ ⇒ system.terminate())

}


text:
<?php

namespace Pronit\GestionBienesYServiciosBundle\Entity;

use Doctrine\ORM\Mapping as ORM;

/**
 *
 *
 * @author ldelia
 * @ORM\Entity
 * @ORM\Table(name="gestionbienesyservicios_tipobienesservicios")
 * @ORM\InheritanceType("SINGLE_TABLE")
 * @ORM\DiscriminatorColumn(name="discr", type="string")
 * @ORM\DiscriminatorMap({"TipoMaterialValue" = "Pronit\GestionBienesYServiciosBundle\Entity\TipoMaterial", "TipoServicioValue" = "Pronit\GestionBienesYServiciosBundle\Entity\TipoServicio"})
 */
abstract class TipoBienServicio
{
    /**
     * @ORM\Column(type="integer")
     * @ORM\Id
     * @ORM\GeneratedValue(strategy="AUTO")
     */
    protected $id;

    /**
     * @ORM\Column(type="string", length=30)
     */
    protected $nombre;

    public function __construct()
    {
    }

    public function getId()
    {
        return $this->id;
    }

    public function setNombre($valor)
    {
        $this->nombre = $valor;
    }

    public function getNombre()
    {
        return $this->nombre;
    }

    public function __toString()
    {
        return $this->getNombre();
    }
}


text: - Added **multipart/alternative** to the supported formats.


text:
from __future__ import absolute_import
from __future__ import print_function
from pyth.plugins.rtf15.writer import Rtf15Writer
import pythonDoc

doc = pythonDoc.buildDoc()

print(Rtf15Writer.write(doc).getvalue())


text:
package org.meruvian.yama.core.commons;

import javax.persistence.Column;
import javax.persistence.Embeddable;

/**
 * @author Imam Badrudin
 *
 */

@Embeddable
public class Alamat {
	private String jln;
	private String kel;
	private String kec;
	private String kota;
	private String kodepos;
	private String prop;

	@Column(name = "jalan")
	public String getJln() {
		return jln;
	}

	public void setJln(String jln) {
		this.jln = jln;
	}

	@Column(name = "kelurahan")
	public String getKel() {
		return kel;
	}

	public void setKel(String kel) {
		this.kel = kel;
	}

	@Column(name = "kecamatan")
	public String getKec() {
		return kec;
	}

	public void setKec(String kec) {
		this.kec = kec;
	}

	@Column(name = "kota")
	public String getKota() {
		return kota;
	}

	public void setKota(String kota) {
		this.kota = kota;
	}

	@Column(name = "kodepos")
	public String getKodepos() {
		return kodepos;
	}

	public void setKodepos(String kodepos) {
		this.kodepos = kodepos;
	}

	@Column(name = "propinsi")
	public String getProp() {
		return prop;
	}

	public void setProp(String prop) {
		this.prop = prop;
	}
}


text:
It is possible to format a date according to the active `locale` which is set via the `config.yml` or direct to the user-locale.

To use the `localizeddate` filter, the [`intl` extension for PHP][1] is required.

Also the Twif intl-extension must be activated in the Symfony project.

    services:
        twig.extension.intl:
            class: Twig_Extensions_Extension_Intl
            tags:
                - { name: twig.extension }

After that, the filter can be used in all `.twig` templates as seen in this snippet:

    {{ post.published_at|localizeddate('medium', 'none', locale) }}

[1]: http://php.net/manual/en/book.intl.php


text:
The only thing we'll need for this guide is a working Phoenix application. For those of us who need a simple application to deploy, please follow the [Up and Running guide](up_and_running.html).

## Goals

Our main goal for this guide is to package your Phoenix application into a self-contained directory that includes the Erlang VM, Elixir, all of your code and dependencies. This package can then be dropped into a production machine.

## Releases, assemble!

To assemble a release, you will need at least Elixir v1.9, however this guide assumes you are using Elixir v1.11 or later to take advantage of latest releases improvements:

```console
$ elixir -v
1.11.0
```

If you are not familiar with Elixir releases yet, we recommend you to read [Elixir's excellent docs](https://hexdocs.pm/mix/Mix.Tasks.Release.html) before continuing.

Once that is done, you can assemble a release by going through all of the steps in our general [deployment guide](deployment.html) with `mix release` at the end. Let's recap.

First set the environment variables:

```console
$ mix phx.gen.secret
REALLY_LONG_SECRET
$ export SECRET_KEY_BASE=REALLY_LONG_SECRET
$ export DATABASE_URL=ecto://USER:PASS@HOST/database
```

Then load dependencies to compile code and assets:

```console
# Initial setup
$ mix deps.get --only prod
$ MIX_ENV=prod mix compile

# Install / update JavaScript dependencies
$ npm install --prefix assets

# Compile assets
$ npm run deploy --prefix assets
$ MIX_ENV=prod mix phx.digest
```

*Note:* the `--prefix` flag on `npm` may not work on Windows. If so, replace the first command by `cd assets && npm run deploy && cd ..`.

And now run `mix release`:

```console
$ MIX_ENV=prod mix release
Generated my_app app
* assembling my_app-0.1.0 on MIX_ENV=prod
* using config/runtime.exs to configure the release at runtime

Release created at _build/prod/rel/my_app!

    # To start your system
    _build/prod/rel/my_app/bin/my_app start

...
```

You can start the release by calling `_build/prod/rel/my_app/bin/my_app start`, where you have to replace `my_app` by your current application name. If you do so, your application should start but you will notice your web server does not actually run! That's because we need to tell Phoenix to start the web servers. When using `mix phx.server`, the `phx.server` command does that for us, but in a release we don't have Mix (which is a *build* tool), so we have to do it ourselves.

Open up `config/runtime.exs` (formerly `config/prod.secret.exs` or `config/releases.exs`) and you should find a section about "Using releases" with a configuration to set. Go ahead and uncomment that line or manually add the line below, adapted to your application names:

```elixir
config :my_app, MyAppWeb.Endpoint, server: true
```

Now assemble the release once again:

```console
$ MIX_ENV=prod mix release
Generated my_app app
* assembling my_app-0.1.0 on MIX_ENV=prod
* using config/runtime.exs to configure the release at runtime

Release created at _build/prod/rel/my_app!

    # To start your system
    _build/prod/rel/my_app/bin/my_app start
```

And starting the release now should also successfully start the web server! Now you can get all of the files under the `_build/prod/rel/my_app` directory, package it, and run it in any production machine with the same OS and architecture as the one that assembled the release. For more details, check the [docs for `mix release`](https://hexdocs.pm/mix/Mix.Tasks.Release.html).

But before we finish this guide, there is one more feature from releases that most Phoenix application will use, so let's talk about that.

## Ecto migrations and custom commands

A common need in production systems is to execute custom commands required to set up the production environment. One of such commands is precisely migrating the database. Since we don't have `Mix`, a *build* tool, inside releases, which are a production artifact, we need to bring said commands directly into the release.

Our recommendation is to create a new file in your application, such as `lib/my_app/release.ex`, with the following:

```elixir
defmodule MyApp.Release do
  @app :my_app

  def migrate do
    load_app()

    for repo <- repos() do
      {:ok, _, _} = Ecto.Migrator.with_repo(repo, &Ecto.Migrator.run(&1, :up, all: true))
    end
  end

  def rollback(repo, version) do
    load_app()
    {:ok, _, _} = Ecto.Migrator.with_repo(repo, &Ecto.Migrator.run(&1, :down, to: version))
  end

  defp repos do
    Application.fetch_env!(@app, :ecto_repos)
  end

  defp load_app do
    Application.load(@app)
  end
end
```

Where you replace the first two lines by your application names.

Now you can assemble a new release with `MIX_ENV=prod mix release` and you can invoke any code, including the functions in the module above, by calling the `eval` command:

```console
$ _build/prod/rel/my_app/bin/my_app eval "MyApp.Release.migrate"
```

And that's it!

You can use this approach to create any custom command to run in production. In this case, we used `load_app`, which calls `Application.load/1` to load the current application without starting it. However, you may want to write a custom command that starts the whole application. In such cases, `Application.ensure_all_started/1` must be used. Keep in mind starting the application will start all processes for the current application, including the Phoenix endpoint. This can be circumvented by changing your supervision tree to not start certain children under certain conditions. For example, in the release commands file you could do:

```elixir
defp start_app do
  load_app()
  Application.put_env(@app, :minimal, true)
  Application.ensure_all_started(@app)
end
```

And then in your application you check `Application.get_env(@app, :minimal)` and start only part of the children when it is set.

## Containers

Elixir releases work well with container technologies, such as Docker. The idea is that you assemble the release inside the Docker container and then build an image based on the release artifacts.

Here is an example Docker file to run at the root of your application covering all of the steps above:

```Dockerfile
ARG MIX_ENV="prod"

FROM hexpm/elixir:1.11.2-erlang-23.1.2-alpine-3.12.1 as build

# install build dependencies
RUN apk add --no-cache build-base npm git python3 curl

# prepare build dir
WORKDIR /app

# install hex + rebar
RUN mix local.hex --force && \
    mix local.rebar --force

# set build ENV
ARG MIX_ENV
ENV MIX_ENV="${MIX_ENV}"

# install mix dependencies
COPY mix.exs mix.lock .
RUN mix deps.get --only $MIX_ENV
RUN mkdir config
# Dependencies sometimes use compile-time configuration. Copying
# these compile-time config files before we compile dependencies
# ensures that any relevant config changes will trigger the dependencies
# to be re-compiled.
COPY config/config.exs config/$MIX_ENV.exs config/
RUN mix deps.compile

# build assets
COPY assets/package.json assets/package-lock.json ./assets/
# install all npm dependencies from scratch
RUN npm --prefix ./assets ci --progress=false --no-audit --loglevel=error

COPY priv priv

# Note: if your project uses a tool like https://purgecss.com/,
# which customizes asset compilation based on what it finds in
# your Elixir templates, you will need to move the asset compilation step
# down so that `lib` is available.
COPY assets assets
# use webpack to compile npm dependencies - https://www.npmjs.com/package/webpack-deploy
RUN npm run --prefix ./assets deploy
RUN mix phx.digest

# compile and build the release
COPY lib lib
RUN mix compile
# changes to config/runtime.exs don't require recompiling the code
COPY config/runtime.exs config/
# uncomment COPY if rel/ exists
# COPY rel rel
RUN mix release

# Start a new build stage so that the final image will only contain
# the compiled release and other runtime necessities
FROM alpine:3.12.1 AS app
RUN apk add --no-cache libstdc++ openssl ncurses-libs

ARG MIX_ENV
ENV USER="elixir"

WORKDIR "/home/${USER}/app"
# Creates an unprivileged user to be used exclusively to run the Phoenix app
RUN \
  addgroup \
   -g 1000 \
   -S "${USER}" \
  && adduser \
   -s /bin/sh \
   -u 1000 \
   -G "${USER}" \
   -h /home/elixir \
   -D "${USER}" \
  && su "${USER}"

# Everything from this line onwards will run in the context of the unprivileged user.
USER "${USER}"

COPY --from=build --chown="${USER}":"${USER}" /app/_build/"${MIX_ENV}"/rel/my_app ./

ENTRYPOINT ["bin/my_app"]

# Usage:
#  * build: sudo docker image build -t elixir/my_app .
#  * shell: sudo docker container run --rm -it --entrypoint "" -p 127.0.0.1:4000:4000 elixir/my_app sh
#  * run:   sudo docker container run --rm -it -p 127.0.0.1:4000:4000 --name my_app elixir/my_app
#  * exec:  sudo docker container exec -it my_app sh
#  * logs:  sudo docker container logs --follow --tail 100 my_app
CMD ["start"]
```

At the end, you will have an application in `/app` ready to run as `bin/my_app start`.

A few points about configuring a containerized application:

- If you run your app in a container, the `Endpoint` needs to be configured to listen on a "public" `:ip` address (like `0.0.0.0.0.0.0.0`) so that the app can be reached from outside the container. Whether the host should publish the container's ports to its own public IP or to localhost depends on your needs.
- The more configuration you can provide at runtime (using `config/runtime.exs`), the more reusable your images will be across environments. In particular, secrets like database credentials and API keys should not be compiled into the image, but rather should be provided when creating containers based on that image. This is why the `Endpoint`'s `:secret_key_base` is configured in `config/runtime.exs` by default.
- If possible, any environment variables that are needed at runtime should be read in `config/runtime.exs`, not scattered throughout your code. Having them all visible in one place will make it easier to ensure the containers get what they need, especially if the person doing the infrastructure work does not work on the Elixir code. Libraries in particular should never directly read environment variables; all their configuration should be handed to them by the top-level application, preferably [without using the application environment](https://hexdocs.pm/elixir/library-guidelines.html#avoid-application-configuration).


text:
module Pagerduty
  module CLT
    class User

      include PathHelper
      extend PathHelper

      def initialize(raw)
        @raw = raw
      end

      def self.find(id, fields: false)
        path = user_path(id)
        options = {}
        options[:fields] = fields.join(',') if fields
        response = $connection.get(path, options)
        new(response)
      end

      def self.search(pattern, fields: false)
        path = users_path
        options = {}
        options[:fields] = fields.join(',') if fields
        response = $connection.get(path, options)
        response['users'].map { |raw_user| self.new(raw_user) }.select { |user| user.match?(pattern) }
      end

      def id
        @id ||= raw.id
      end

      def name
        @name ||= raw.name
      end

      def email
        @email ||= raw.email
      end

      def preferred_time_zone
        @preferred_time_zone ||= TZInfo::Timezone.get(time_zone)
      end

      def match?(pattern)
        !!(id.match(pattern) || name.match(pattern) || (email.match(pattern)))
      end

      private

        attr_reader :raw

        def raw_time_zone
          @raw_time_zone ||= begin
            tz = if ENV['PAGERDUTY_PREFERRED_TIME_ZONE']
              ENV['PAGERDUTY_PREFERRED_TIME_ZONE']
            else
              raw.time_zone
            end
            tz == 'Pacific Time (US & Canada)' ?  'US/Pacific' : raw.time_zone
          end
        end

        def time_zone
          match = TZInfo::Timezone.all_identifiers.detect { |x| x.match(/#{raw_time_zone}/) }
          fail "Unable to accurately determine time zone based off '%s'" % raw_time_zone unless match
          match
        end
    end

    NullUser = Naught.build do |config|
      config.mimic User

      def name
        ''
      end
    end
  end
end


text:
/*
   Mathieu Stefani, 14 mai 2016

   Swagger serializer for RapidJSON
*/

#pragma once

#include <rapidjson/prettywriter.h>

#include <pistache/description.h>
#include <pistache/http_defs.h>
#include <pistache/mime.h>

namespace Pistache::Rest::Serializer
{

    template <typename Writer>
    void serializeInfo(Writer& writer, const Schema::Info& info)
    {
        writer.String("swagger");
        writer.String("2.0");
        writer.String("info");
        writer.StartObject();
        {
            writer.String("title");
            writer.String(info.title.c_str());
            writer.String("version");
            writer.String(info.version.c_str());
            if (!info.description.empty())
            {
                writer.String("description");
                writer.String(info.description.c_str());
            }
            if (!info.termsOfService.empty())
            {
                writer.String("termsOfService");
                writer.String(info.termsOfService.c_str());
            }
        }
        writer.EndObject();
    }

    template <typename Writer>
    void serializePC(Writer& writer, const Schema::ProduceConsume& pc)
    {
        auto serializeMimes = [&](const char* name,
                                  const std::vector<Http::Mime::MediaType>& mimes) {
            if (!mimes.empty())
            {
                writer.String(name);
                writer.StartArray();
                {
                    for (const auto& mime : mimes)
                    {
                        auto str = mime.toString();
                        writer.String(str.c_str());
                    }
                }
                writer.EndArray();
            }
        };

        serializeMimes("consumes", pc.consume);
        serializeMimes("produces", pc.produce);
    }

    template <typename Writer>
    void serializeParameter(Writer& writer, const Schema::Parameter& parameter)
    {
        writer.StartObject();
        {
            writer.String("name");
            writer.String(parameter.name.c_str());
            writer.String("in");
            // @Feature: support other types of parameters
            writer.String("path");
            writer.String("description");
            writer.String(parameter.description.c_str());
            writer.String("required");
            writer.Bool(parameter.required);
            writer.String("type");
            writer.String(parameter.type->typeName());
        }
        writer.EndObject();
    }

    template <typename Writer>
    void serializeResponse(Writer& writer, const Schema::Response& response)
    {
        auto code = std::to_string(static_cast<uint32_t>(response.statusCode));
        writer.String(code.c_str());
        writer.StartObject();
        {
            writer.String("description");
            writer.String(response.description.c_str());
        }
        writer.EndObject();
    }

    template <typename Writer>
    void serializePath(Writer& writer, const Schema::Path& path)
    {
        std::string methodStr(methodString(path.method));
        // So it looks like Swagger requires method to be in lowercase
        std::transform(std::begin(methodStr), std::end(methodStr),
                       std::begin(methodStr), ::tolower);

        writer.String(methodStr.c_str());
        writer.StartObject();
        {
            writer.String("description");
            writer.String(path.description.c_str());
            serializePC(writer, path.pc);

            const auto& parameters = path.parameters;
            if (!parameters.empty())
            {
                writer.String("parameters");
                writer.StartArray();
                {
                    for (const auto& parameter : parameters)
                    {
                        serializeParameter(writer, parameter);
                    }
                }
                writer.EndArray();
            }

            const auto& responses = path.responses;
            if (!responses.empty())
            {
                writer.String("responses");
                writer.StartObject();
                {
                    for (const auto& response : responses)
                    {
                        serializeResponse(writer, response);
                    }
                }
                writer.EndObject();
            }
        }
        writer.EndObject();
    }

    template <typename Writer>
    void serializePathGroups(Writer& writer, const std::string& prefix,
                             const Schema::PathGroup& paths,
                             Schema::PathGroup::Format format)
    {
        writer.String("paths");
        writer.StartObject();
        {
            auto groups = paths.groups();
            for (const auto& group : groups)
            {
                if (group.second.isHidden())
                    continue;

                std::string name(group.first);
                if (!prefix.empty())
                {
                    if (!name.compare(0, prefix.size(), prefix))
                    {
                        name = name.substr(prefix.size());
                    }
                }

                if (format == Schema::PathGroup::Format::Default)
                {
                    writer.String(name.c_str());
                }
                else
                {
                    auto swaggerPath = Schema::Path::swaggerFormat(name);
                    writer.String(swaggerPath.c_str());
                }
                writer.StartObject();
                {
                    for (const auto& path : group.second)
                    {
                        if (!path.hidden)
                            serializePath(writer, path);
                    }
                }
                writer.EndObject();
            }
        }
        writer.EndObject();
    }

    template <typename Writer>
    void serializeDescription(Writer& writer, const Description& desc)
    {
        writer.StartObject();
        {
            serializeInfo(writer, desc.rawInfo());
            auto host         = desc.rawHost();
            auto basePath     = desc.rawBasePath();
            auto schemes      = desc.rawSchemes();
            auto pc           = desc.rawPC();
            const auto& paths = desc.rawPaths();

            if (!host.empty())
            {
                writer.String("host");
                writer.String(host.c_str());
            }
            if (!basePath.empty())
            {
                writer.String("basePath");
                writer.String(basePath.c_str());
            }
            if (!schemes.empty())
            {
                writer.String("schemes");
                writer.StartArray();
                {
                    for (const auto& scheme : schemes)
                    {
                        writer.String(schemeString(scheme));
                    }
                }
                writer.EndArray();
            }
            serializePC(writer, pc);
            serializePathGroups(writer, basePath, paths,
                                Schema::PathGroup::Format::Swagger);
        }
        writer.EndObject();
    }

    inline std::string rapidJson(const Description& desc)
    {
        rapidjson::StringBuffer sb;
        rapidjson::PrettyWriter<rapidjson::StringBuffer> writer(sb);
        serializeDescription(writer, desc);

        return sb.GetString();
    }

} // namespace Pistache::Rest::Serializer


text:
//
// Copyright (C) 2016 Tobias Lensing
//
// Permission is hereby granted, free of charge, to any person obtaining a copy of
// this software and associated documentation files (the "Software"), to deal in
// the Software without restriction, including without limitation the rights to
// use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
// of the Software, and to permit persons to whom the Software is furnished to do
// so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in all
// copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
// SOFTWARE.
//

#import "../../icMacros.h"

#ifdef __IC_PLATFORM_IOS

#import "../../ICHostViewController.h"
#import "ICGLView.h"

@class ICTouchEventDispatcher;

/**
 @brief Implements an iOS host view controller
 */
@interface ICHostViewControllerIOS : ICHostViewController
{
@protected
    CADisplayLink *_displayLink;
    ICTouchEventDispatcher *_touchEventDispatcher;
    BOOL _openGLReady;
    NSLock *_glContextLock;
}

@property (nonatomic, readonly) NSLock *glContextLock;

@end

#endif // __IC_PLATFORM_IOS