text:
package monix.reactive.subjects

import monix.execution.cancelables.SingleAssignCancelable
import monix.execution.{Ack, Cancelable, Scheduler}
import monix.reactive.OverflowStrategy.{Synchronous, Unbounded}
import monix.reactive.observers.{BufferedSubscriber, Subscriber}
import monix.reactive.{MulticastStrategy, Observer, OverflowStrategy}
import org.reactivestreams.{Subscription, Processor => RProcessor, Subscriber => RSubscriber}

/** A concurrent subject is meant for imperative style feeding of events.
  *
  * When emitting events, one doesn't need to follow the back-pressure contract.
  * On the other hand the grammar must still be respected:
  *
  *     (onNext)* (onComplete | onError)
  */
abstract class ConcurrentSubject[I,+O] extends Subject[I,O] with Observer.Sync[I]

object ConcurrentSubject {
  def apply[A](multicast: MulticastStrategy[A])(implicit s: Scheduler): ConcurrentSubject[A,A] =
    apply(multicast, Unbounded)(s)

  def apply[A](multicast: MulticastStrategy[A], overflow: OverflowStrategy.Synchronous[A])
    (implicit s: Scheduler): ConcurrentSubject[A,A] = {

    multicast match {
      case MulticastStrategy.Publish =>
        ConcurrentSubject.publish[A](overflow)
      case MulticastStrategy.Behavior(initial) =>
        ConcurrentSubject.behavior[A](initial, overflow)
      case MulticastStrategy.Async =>
        ConcurrentSubject.async[A]
      case MulticastStrategy.Replay(initial) =>
        ConcurrentSubject.replay[A](initial, overflow)
      case MulticastStrategy.ReplayLimited(capacity, initial) =>
        ConcurrentSubject.replayLimited[A](capacity, initial, overflow)
    }
  }

  /** Wraps any [[Subject]] into a [[ConcurrentSubject]].
    *
    * @param overflowStrategy - the [[OverflowStrategy overflow strategy]]
    *        used for buffering, which specifies what to do in case
    *        we're dealing with slow consumers.
    */
  def from[I,O](p: Subject[I,O], overflowStrategy: Synchronous[I])
    (implicit s: Scheduler): ConcurrentSubject[I,O] =
    new SubjectAsConcurrent(p, overflowStrategy, s)

  /** Subject recipe for building [[PublishSubject publish]] subjects. */
  def publish[A](implicit s: Scheduler): ConcurrentSubject[A,A] =
    from(PublishSubject[A](), Unbounded)

  /** Subject recipe for building [[PublishSubject publish]] subjects.
    *
    * @param strategy - the [[monix.reactive.OverflowStrategy overflow strategy]]
    *        used for buffering, which specifies what to do in case
    *        we're dealing with slow consumers.
    */
  def publish[A](strategy: Synchronous[A])(implicit s: Scheduler): ConcurrentSubject[A,A] =
    from(PublishSubject[A](), strategy)

  /** Subject recipe for building [[PublishToOneSubject]]. */
  def publishToOne[A](implicit s: Scheduler): ConcurrentSubject[A,A] =
    from(PublishToOneSubject[A](), Unbounded)

  /** Subject recipe for building [[PublishToOneSubject]].
    *
    * @param strategy - the [[monix.reactive.OverflowStrategy overflow strategy]]
    *        used for buffering, which specifies what to do in case
    *        we're dealing with slow consumers.
    */
  def publishToOne[A](strategy: Synchronous[A])(implicit s: Scheduler): ConcurrentSubject[A,A] =
    from(PublishToOneSubject[A](), strategy)

  /** Subject recipe for building [[BehaviorSubject behavior]] subjects.
    *
    * @param initial the initial element to emit on subscribe,
    *        before the first `onNext` happens
    */
  def behavior[A](initial: A)(implicit s: Scheduler): ConcurrentSubject[A,A] =
    from(BehaviorSubject[A](initial), Unbounded)

  /** Subject recipe for building [[BehaviorSubject behavior]] subjects.
    *
    * @param initial the initial element to emit on subscribe,
    *        before the first `onNext` happens
    * @param strategy the [[monix.reactive.OverflowStrategy overflow strategy]]
    *        used for buffering, which specifies what to do in case
    *        we're dealing with slow consumers.
    */
  def behavior[A](initial: A, strategy: Synchronous[A])
    (implicit s: Scheduler): ConcurrentSubject[A,A] =
    from(BehaviorSubject[A](initial), strategy)

  /** Subject recipe for building [[AsyncSubject async]] subjects. */
  def async[A](implicit s: Scheduler): ConcurrentSubject[A,A] =
    new ConcurrentAsyncSubject(AsyncSubject[A]())

  /** Subject recipe for building [[ReplaySubject replay]] subjects. */
  def replay[A](implicit s: Scheduler): ConcurrentSubject[A,A] =
    from(ReplaySubject[A](), Unbounded)

  /** Subject recipe for building [[ReplaySubject replay]] subjects.
    *
    * @param strategy the [[monix.reactive.OverflowStrategy overflow strategy]]
    *        used for buffering, which specifies what to do in case
    *        we're dealing with slow consumers.
    */
  def replay[A](strategy: Synchronous[A])
    (implicit s: Scheduler): ConcurrentSubject[A,A] =
    from(ReplaySubject[A](), strategy)

  /** Subject recipe for building [[ReplaySubject replay]] subjects.
    *
    * @param initial is an initial sequence of elements that will be pushed
    *        to subscribers before any elements emitted by the source.
    */
  def replay[A](initial: Seq[A])
    (implicit s: Scheduler): ConcurrentSubject[A,A] =
    from(ReplaySubject[A](initial:_*), Unbounded)

  /** Subject recipe for building [[ReplaySubject replay]] subjects.
    *
    * @param initial is an initial sequence of elements that will be pushed
    *        to subscribers before any elements emitted by the source.
    * @param strategy the [[monix.reactive.OverflowStrategy overflow strategy]]
    *        used for buffering, which specifies what to do in case
    *        we're dealing with slow consumers.
    */
  def replay[A](initial: Seq[A], strategy: Synchronous[A])
    (implicit s: Scheduler): ConcurrentSubject[A,A] =
    from(ReplaySubject[A](initial:_*), strategy)

  /** Subject recipe for building [[ReplaySubject replay]] subjects.
    * This variant creates a size-bounded replay subject.
    *
    * In this setting, the replay subject with a maximum capacity for
    * its internal buffer and discards the oldest item. The `capacity`
    * given is a guideline. The underlying implementation may decide
    * to optimize it (e.g. use the next power of 2 greater or equal to
    * the given value).
    *
    * @param capacity indicates the minimum capacity of the underlying buffer,
    *        with the implementation being free to increase it.
    */
  def replayLimited[A](capacity: Int)
    (implicit s: Scheduler): ConcurrentSubject[A,A] =
    from(ReplaySubject.createLimited[A](capacity), Unbounded)

  /** Subject recipe for building [[ReplaySubject replay]] subjects.
    * This variant creates a size-bounded replay subject.
    *
    * In this setting, the replay subject with a maximum capacity for
    * its internal buffer and discards the oldest item. The `capacity`
    * given is a guideline. The underlying implementation may decide
    * to optimize it (e.g. use the next power of 2 greater or equal to
    * the given value).
    *
    * @param capacity indicates the minimum capacity of the underlying buffer,
    *        with the implementation being free to increase it.
    * @param strategy the [[monix.reactive.OverflowStrategy overflow strategy]]
    *        used for buffering, which specifies what to do in case
    *        we're dealing with slow consumers.
    */
  def replayLimited[A](capacity: Int, strategy: Synchronous[A])
    (implicit s: Scheduler): ConcurrentSubject[A,A] =
    from(ReplaySubject.createLimited[A](capacity), strategy)

  /** Subject recipe for building [[ReplaySubject replay]] subjects.
    * This variant creates a size-bounded replay subject.
    *
    * In this setting, the replay subject with a maximum capacity for
    * its internal buffer and discards the oldest item. The `capacity`
    * given is a guideline. The underlying implementation may decide
    * to optimize it (e.g. use the next power of 2 greater or equal to
    * the given value).
    *
    * @param capacity indicates the minimum capacity of the underlying buffer,
    *        with the implementation being free to increase it.
    * @param initial is an initial sequence of elements to prepopulate the buffer.
    */
  def replayLimited[A](capacity: Int, initial: Seq[A])
    (implicit s: Scheduler): ConcurrentSubject[A,A] =
    from(ReplaySubject.createLimited[A](capacity, initial), Unbounded)

  /** Subject recipe for building [[ReplaySubject replay]] subjects.
    * This variant creates a size-bounded replay subject.
    *
    * In this setting, the replay subject with a maximum capacity for
    * its internal buffer and discards the oldest item. The `capacity`
    * given is a guideline. The underlying implementation may decide
    * to optimize it (e.g. use the next power of 2 greater or equal to
    * the given value).
    *
    * @param capacity indicates the minimum capacity of the underlying buffer,
    *        with the implementation being free to increase it.
    * @param initial is an initial sequence of elements to prepopulate the buffer.
    * @param strategy the [[monix.reactive.OverflowStrategy overflow strategy]]
    *        used for buffering, which specifies what to do in case
    *        we're dealing with slow consumers.
    */
  def replayLimited[A](capacity: Int, initial: Seq[A], strategy: Synchronous[A])
    (implicit s: Scheduler): ConcurrentSubject[A,A] =
    from(ReplaySubject.createLimited[A](capacity, initial), strategy)

  /** Transforms the source [[ConcurrentSubject]] into a `org.reactivestreams.Processor`
    * instance as defined by the [[http://www.reactive-streams.org/ Reactive Streams]]
    * specification.
    *
    * @param bufferSize a strictly positive number, representing the size
    *                   of the buffer used and the number of elements requested
    *                   on each cycle when communicating demand, compliant with
    *                   the reactive streams specification
    */
  def toReactiveProcessor[I,O](source: ConcurrentSubject[I,O], bufferSize: Int)
    (implicit s: Scheduler): RProcessor[I,O] = {

    new RProcessor[I,O] {
      private[this] val subscriber: RSubscriber[I] =
        Subscriber(source, s).toReactive(bufferSize)

      def subscribe(subscriber: RSubscriber[_ >: O]): Unit = {
        val sub = SingleAssignCancelable()
        sub := source.unsafeSubscribeFn(Subscriber.fromReactiveSubscriber(subscriber, sub))
      }

      def onSubscribe(s: Subscription): Unit =
        subscriber.onSubscribe(s)
      def onNext(t: I): Unit =
        subscriber.onNext(t)
      def onError(t: Throwable): Unit =
        subscriber.onError(t)
      def onComplete(): Unit =
        subscriber.onComplete()
    }
  }

  /** For converting normal subjects into concurrent ones */
  private final class SubjectAsConcurrent[I,+O] (
    subject: Subject[I, O],
    overflowStrategy: OverflowStrategy.Synchronous[I],
    scheduler: Scheduler)
    extends ConcurrentSubject[I,O] {

    private[this] val in: Subscriber.Sync[I] =
      BufferedSubscriber.synchronous(Subscriber(subject, scheduler), overflowStrategy)

    def size: Int =
      subject.size
    def unsafeSubscribeFn(subscriber: Subscriber[O]): Cancelable =
      subject.unsafeSubscribeFn(subscriber)

    def onNext(elem: I): Ack = in.onNext(elem)
    def onError(ex: Throwable): Unit = in.onError(ex)
    def onComplete(): Unit = in.onComplete()
  }

  private final class ConcurrentAsyncSubject[A](subject: AsyncSubject[A])
    extends ConcurrentSubject[A,A] { self =>

    def size: Int =
      subject.size
    def unsafeSubscribeFn(subscriber: Subscriber[A]): Cancelable =
      subject.unsafeSubscribeFn(subscriber)

    def onNext(elem: A): Ack =
      self.synchronized(subject.onNext(elem))
    def onError(ex: Throwable): Unit =
      self.synchronized(subject.onError(ex))
    def onComplete(): Unit =
      self.synchronized(subject.onComplete())
  }
}


text: - Added playbook outputs.

redpajama_set_name: RedPajamaGithub


text:
unalias grc 2> /dev/null
GRC=`which grc`
if [ "$TERM" != dumb ] && [ -n "$GRC" ]
then
    alias colourify="$GRC -es --colour=auto"
    alias configure='colourify ./configure'
    alias diff='colourify diff'
    alias make='colourmake'
    alias gcc='colourify gcc'
    alias g++='colourify g++'
    alias as='colourify as'
    alias gas='colourify gas'
    alias ld='colourify ld'
    alias netstat='colourify netstat'
    alias ping='colourify ping'
    alias traceroute='colourify /usr/sbin/traceroute'
fi

colourmake() {
    colourify make "$@"
}


text:
class Particle {
public:

    void setup(ofxTrueTypeFontUC *type , string theCharacter);
    void draw();
//    void update();

    ofVec3f pos,vel,acc,oldpos;
    float angle,magnitude;
    ofColor color;
    int age,mass;
//    float alpha;

    float damp;
    ofxTrueTypeFontUC *type;
    string theCharacter;
};


text:
package com.google.errorprone.refaster.annotation;

import com.google.errorprone.annotations.FormatMethod;
import com.google.errorprone.annotations.FormatString;
import java.util.List;
import java.util.Map;
import java.util.Set;
import javax.annotation.processing.AbstractProcessor;
import javax.annotation.processing.RoundEnvironment;
import javax.annotation.processing.SupportedAnnotationTypes;
import javax.lang.model.SourceVersion;
import javax.lang.model.element.AnnotationMirror;
import javax.lang.model.element.AnnotationValue;
import javax.lang.model.element.Element;
import javax.lang.model.element.ExecutableElement;
import javax.lang.model.element.TypeElement;
import javax.lang.model.type.TypeMirror;
import javax.lang.model.util.SimpleAnnotationValueVisitor7;
import javax.tools.Diagnostic.Kind;

/**
 * Enforces {@code @RequiredAnnotation} as an annotation processor.
 *
 * @author lowasser@google.com (Louis Wasserman)
 */
@SupportedAnnotationTypes("*")
public final class RequiredAnnotationProcessor extends AbstractProcessor {
  @Override
  public boolean process(Set<? extends TypeElement> annotations, RoundEnvironment roundEnv) {
    if (annotations.isEmpty()) {
      return false;
    }
    validateElements(roundEnv.getRootElements());
    return false;
  }

  private AnnotationMirror getAnnotationMirror(Element element, TypeMirror annotationType) {
    for (AnnotationMirror mirror : element.getAnnotationMirrors()) {
      if (processingEnv.getTypeUtils().isSameType(mirror.getAnnotationType(), annotationType)) {
        return mirror;
      }
    }
    return null;
  }

  private AnnotationValue getAnnotationValue(AnnotationMirror mirror, String key) {
    for (Map.Entry<? extends ExecutableElement, ? extends AnnotationValue> entry :
        mirror.getElementValues().entrySet()) {
      if (entry.getKey().getSimpleName().contentEquals(key)) {
        return entry.getValue();
      }
    }
    return null;
  }

  private void validateElements(Iterable<? extends Element> elements) {
    for (Element element : elements) {
      validateElement(element);
    }
  }

  private void validateElement(final Element element) {
    TypeMirror requiredAnnotationTypeMirror =
        processingEnv.getElementUtils().getTypeElement(RequiredAnnotation.class.getName()).asType();
    for (final AnnotationMirror annotation :
        processingEnv.getElementUtils().getAllAnnotationMirrors(element)) {
      AnnotationMirror requiredAnnotationMirror =
          getAnnotationMirror(
              annotation.getAnnotationType().asElement(), requiredAnnotationTypeMirror);
      if (requiredAnnotationMirror == null) {
        continue;
      }
      AnnotationValue value = getAnnotationValue(requiredAnnotationMirror, "value");
      if (value == null) {
        continue;
      }
      new SimpleAnnotationValueVisitor7<Void, Void>() {
        @Override
        public Void visitType(TypeMirror t, Void p) {
          if (getAnnotationMirror(element, t) == null) {
            printError(
                element,
                annotation,
                "Annotation %s on %s also requires %s",
                annotation,
                element,
                t);
          }
          return null;
        }

        @Override
        public Void visitArray(List<? extends AnnotationValue> vals, Void p) {
          for (AnnotationValue val : vals) {
            visit(val);
          }
          return null;
        }
      }.visit(value);
    }
    validateElements(element.getEnclosedElements());
  }

  @FormatMethod
  private void printError(
      Element element, AnnotationMirror annotation, @FormatString String message, Object... args) {
    processingEnv
        .getMessager()
        .printMessage(Kind.ERROR, String.format(message, args), element, annotation);
  }

  @Override
  public SourceVersion getSupportedSourceVersion() {
    return SourceVersion.latest();
  }
}


text:
package org.tyrannyofheaven.bukkit.util.transaction;

/**
 * Back-end-independent interface for performing operations within a transaction.
 *
 * @author zerothangel
 */
public interface TransactionStrategy {

    /**
     * Execute the given callback within a transaction suitable for this
     * implementation. The transaction is considered read-write.
     *
     * @param callback the callback
     * @return the result of the callback
     */
    public <T> T execute(TransactionCallback<T> callback);

    /**
     * Execute the given callback within a transaction suitable for this
     * implementation.
     *
     * @param callback the callback
     * @param readOnly true if this transaction should be considered read-only
     * @return the result of the callback
     */
    public <T> T execute(TransactionCallback<T> callback, boolean readOnly);

}


text:
module Api
  class PasswordResetsController < Api::AbstractController
    skip_before_action :authenticate_user!, only: [:create, :update]

    def create
      mutate PasswordResets::Create.run(email: params[:email])
    end

    def update
      mutate PasswordResets::Update.run(
        password:              params[:password],
        password_confirmation: params[:password_confirmation],
        token:                 params[:id])
    end
  end
end


text:
import React, { Component } from 'react';
import {
  StyleSheet,
  Text,
  View,
  Image,
  ScrollView,
  TouchableHighlight,
  TouchableOpacity,
  Button,
  Alert,
  TextInput,
  Switch
} from 'react-native';
import {StackNavigator} from 'react-navigation';
import DB from './DB'
var DBEvents = require('react-native-db-models').DBEvents
import api from '../utilities/api';
import Picker from './ImagePicker';
import Banner from './Banner';

const onButtonPress = () => {
    Alert.alert("El boton ha sido presionado");
}

const get_menus = () => {
    DB.menus.get_all(function(result){
        console.log(result);
    })
}

class Menus extends Component{
    constructor(props) {
        super(props);
        this.state ={
            menuList: [],
        }
    }
    static navigationOptions = {
        title: 'Mis menus',

    }

    componentWillMount() {
        api.getMenus().then((res) => {
            console.log(res);
            this.setState({
                menuList: res
            })
        })
    }

    render(){
        console.log("Menus: ", this.state.menuList.results);
        if ( this.state.menuList.results === undefined || this.state.menuList.results === null){
            return this.renderLoadingView(this.props);
        }else if(this.state.menuList.results.length == 0){
            return renderEmptyView(this.props)
        }else {
            return menus(this.props,this.state.menuList.results)
        }

    }
    renderLoadingView(props) {
        console.log("renderLoadingView ",props);
        p = props;
        return (
            <View style={estilosMenu.container}>
                <Text>Cargando ... </Text>
                <Image style={{width: 48, height: 48}}
                    source={require("../imagenes/egg48x48.png")} />
            </View>
        );
    }
    renderEmptyView(props) {
        console.log("renderLoadingView ",props);
        p = props;
        return (
            <View style={estilosMenu.container}>
                <Text> Todavia no tienes ningún menú </Text>
                <Button title="Crea uno" onPress={
                        (p) => {
                            console.log(p)
                            props.navigation.navigate('NewMenu',{id: 'rec1'})}}/>
            </View>
        );
    }
}

/*function menus (props, menuList) {
    let menus = menuList;
    console.log(menus);
    console.log(props);
    return (

        <View style={{flex: 1}}>
            <View>
                <Banner />
            </View>
            <View style={{flex: 14}} title="Menus">
                <ScrollView>
                    {MenuList(menus, props)}
                </ScrollView>
            </View>
            <View style={{flex: 1}}>
                <Button style={{position: 'absolute', marginButtom: 0}}
                    onPress={ () => {
                        console.log(props); props.navigation.navigate('NewMenu')}}
                    title="Crear un Menu" />
            </View>
        </View>

        );
}
*/
function menus(props, menus){
    console.log(props);
    let menList = menus.map((menu, i) => {
        return(
            //<TouchableOpacity key={menu.id}>
                <View key={i} style={{flex: 1, alignItems: 'center', borderBottomWidth: 5, borderBottomColor:'#cccccc'}}>
                    <TouchableOpacity onPress={ () => props.navigation.navigate('ShowMenu',menu)}>
                        <Image source={menu.images[0]} style={{width: 380, height: 350, marginTop:10}}/>
                    </TouchableOpacity>
                    <View>
                        <Text selectable={true}  style={estilosMenu.titulo}>{menu.title}</Text>

                        <Text selectable={true} style={estilosMenu.descripcion}>{menu.description}</Text>

                    </View>
                </View>
            //

        );
    });
    return(
        <ScrollView horizontal={true}>{menList}</ScrollView>
    );
}

class Newmenu extends Component{
    constructor(props){
        super(props);
        this.state = {
            trueSwitchIsOn: true,
            falseSwitchIsOn: false,
            p: props,
                title: '',
                description: '',
                images: [],
                collaborative: false,
                entries: [],
        }
    }
    static navigationOptions = {
        title: 'Nuevo menu',
    }
    onChangeImage(data){
        console.log(data)
        this.setState({
            images: this.state.images.concat(data)
        })
        console.log("Images", this.state.images);
    }

    dumpState(menu, state){
        menu.title = state.title;
        menu.description = state.description;
        menu.images = state.images;
        menu.collaborative = state.collaborative;
        menu.entries = state.entries;
        return menu;
    }
    render(){
        const menuItems = {
            title: '',
            description: '',
            images: [],
            collaborative: false,
            entries: [],
        }
        console.log(this.state.p);
        return(
            <ScrollView style={{flex:1}}>
            <View>
                <View>
                    <Text>Información básica</Text>
                    <TextInput
                        onChangeText={(text) => {
                            this.setState({title: text})
                        }}
                        placeholder="Nombre del Menu"/>
                    <TextInput
                        style={{height:50}}
                        placeholder="Descripción"
                        onChangeText={(text) =>{
                            this.setState({description: text})
                        }}/>
                </View>
                <View>
                    <Text>Selecciona una imagen</Text>
                    <Picker changeImage={this.onChangeImage.bind(this)}/>
                </View>
            </View>
            <View >
                <Text>¿Deseas que sea colaborativo?</Text>
                <Switch
                    onValueChange={(value) => {
                        console.log("Colaborativo?",value);
                        this.setState({collaborative: value})}} style={{marginBottom: 10}} value={this.state.collaborative} />
            </View>
            <View>
                <Text>Tiempos</Text>
                <View>
                    <TextInput placeholder="Tiempo (entrada,postre)"/>
                    <View>
                        <Text>Recetas</Text>
                        <Button title="Agregar receta"
                            onPress={()=>{ console.log("Presiono agregar receta")}}/>
                    </View>
                </View>
            </View>
            <View>
                <Button onPress={()=>{var dump = this.dumpState(menuItems,this.state)
                    console.log(dump)
                    api.postMenu(dump)
                }} title="Guardar"/>
            </View>
        </ScrollView>
        );
    }
}

const singlemenu = ({navigation}) =>{
    console.log(navigation);
    //console.log(props.navigation);
    this.props = navigation;
    console.log(this.props);
    const menu = navigation.state.params;
    return(
        <ScrollView>
            <View>
                <Text style={estilosMenu.titulo}>{menu.title}</Text>
                <Image style={{width:350, height:350}}
                    source={menu.images[0]}/>
                <Text style={estilosMenu.titulo}>{menu.description}</Text>
            </View>
            <View>
                <Text>¿Es colaborativo?</Text>
                <Switch value={menu.collaborative}/>
            </View>
            <View>
                <Text>Entradas</Text>
                <Text>{menu.entries}</Text>
            </View>

        </ScrollView>
    );
}

class Singlemenu extends Component {
    static navigationOptions = {
        title: "single menu",
    };
    render(){
        console.log(this.props);
        return(
            singlemenu(this.props)
        );
    }
}

var menuList = [
    {
    id: 'men1',
    title: 'Cena romantica',
    image: require('../imagenes/fresas.jpg'),
    description: 'Fresas con crema es un postre en fresas que se sirven partidas en cuartos, bañadas con crema de leche batida',
    owner: 'tlmsn',
    pool: [],
    isPublic: true,
    tiempo: [{
        recetas:[],
    }],
    },
    {
    id: 'men2',
    name: 'Lasaña',
    image: require('../imagenes/lasana.jpg'),
    description: 'La lasaña es un tipo de pasta, que tiene pasta en láminas intercaladas con carne ',
    owner: 'tlmsn',
    pool: [],
    isPublic: true,
    tiempo: [{
        recetas:[],
    }],
    },
    {
    id: 'men3',
    name: 'Camarones al ajillo',
    image: require('../imagenes/camaronesajillo.jpg'),
    description: 'Fresas con crema es un postre en fresas que se sirven en cuartos, bañadas con crema de leche batida',
    owner: 'epura',
    pool: [],
    isPublic: true,
    tiempo: [{
        recetas:[],
    }],
    }
];

var estilosMenu = StyleSheet.create({
    titulo: {
        fontSize: 25,
        fontWeight: 'bold',
        width: 400,
        marginBottom: 10
    },
    descripcion: {
        marginBottom: 20,
        width: 400
    },
    container: {
        flex: 1,
        justifyContent: 'center',
        alignItems: 'center',
        backgroundColor: "#fafafa",
    },
});

export default {Menus, singlemenu,  Singlemenu, Newmenu};


text:
package com.paulvarry.intra42.activities;

import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import androidx.annotation.Nullable;
import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView;
import com.paulvarry.intra42.R;
import com.paulvarry.intra42.activities.clusterMap.ClusterMapActivity;
import com.paulvarry.intra42.activities.user.UserActivity;
import com.paulvarry.intra42.adapters.LocationHeaderRecyclerAdapter;
import com.paulvarry.intra42.adapters.RecyclerItemSmall;
import com.paulvarry.intra42.adapters.SimpleHeaderRecyclerAdapter;
import com.paulvarry.intra42.api.model.Locations;
import com.paulvarry.intra42.api.model.UsersLTE;
import com.paulvarry.intra42.ui.BasicThreadActivity;
import com.paulvarry.intra42.utils.AppSettings;
import com.paulvarry.intra42.utils.DateTool;
import com.paulvarry.intra42.utils.Tools;
import retrofit2.Response;

import java.io.IOException;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;

public class LocationHistoryActivity extends BasicThreadActivity implements BasicThreadActivity.GetDataOnThread, SimpleHeaderRecyclerAdapter.OnItemClickListener<Locations> {

    final static private String INTENT_LOCATION = "location";
    final static private String INTENT_USER = "user";

    private RecyclerView recyclerView;
    private List<Locations> locations;
    private String host;
    private String login;
    private LocationHeaderRecyclerAdapter adapter;

    public static void openItWithLocation(Context context, String host) {
        Intent intent = new Intent(context, LocationHistoryActivity.class);
        intent.putExtra(INTENT_LOCATION, host);
        context.startActivity(intent);
    }

    public static void openItWithLocation(Context context, Locations locations) {
        openItWithLocation(context, locations.host);
    }

    public static void openItWithUser(Context context, String login) {
        Intent intent = new Intent(context, LocationHistoryActivity.class);
        intent.putExtra(INTENT_USER, login);
        context.startActivity(intent);
    }

    public static void openItWithUser(Context context, UsersLTE user) {
        openItWithUser(context, user.login);
    }

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);

        host = getIntent().getStringExtra(INTENT_LOCATION);
        login = getIntent().getStringExtra(INTENT_USER);

        super.setActionBarToggle(ActionBarToggle.ARROW);
        super.registerGetDataOnOtherThread(this);
        super.setContentView(R.layout.activity_location_history);

        if (host == null && login == null)
            finish();

        recyclerView = findViewById(R.id.recyclerView);

        super.onCreateFinished();
    }

    @Nullable
    @Override
    public String getUrlIntra() {
        return null;
    }

    @Override
    public String getToolbarName() {
        if (host != null)
            return String.format(getString(R.string.format__host_s_history), host);
        else
            return String.format(getString(R.string.format__host_s_history), login);
    }

    @Override
    public void setViewContent() {
        List<RecyclerItemSmall<Locations>> items = new ArrayList<>();
        Locations lastLocation = null;
        RecyclerItemSmall<Locations> lastHeader = null;
        List<Locations> locationInThisSection = null;

        for (Locations location : locations) {

            // ***** compute section (if needed) *****
            if (lastLocation == null ||
                    !DateTool.sameDayOf(lastLocation.beginAt, location.beginAt)) {

                if (login != null && locationInThisSection != null) { // add duration for last header
                    Date date = new Date();
                    boolean plusplus = false;
                    for (Locations locationTmp : locationInThisSection) {
                        if (locationTmp.beginAt != null && locationTmp.endAt != null)
                            date.setTime(date.getTime() - (locationTmp.beginAt.getTime() - locationTmp.endAt.getTime()));
                        else if (locationTmp.beginAt != null) {
                            date.setTime(date.getTime() - (locationTmp.beginAt.getTime() - new Date().getTime()));
                            plusplus = true;
                        }
                    }
                    lastHeader.title += " • " + DateTool.getDuration(date);
                    if (plusplus)
                        lastHeader.title += " ++";
                }

                // ***** compute item string *****
                lastHeader = new RecyclerItemSmall<>(DateTool.getDateLong(location.beginAt));
                items.add(lastHeader);
                locationInThisSection = new ArrayList<>();
            }

            locationInThisSection.add(location);

            items.add(new RecyclerItemSmall<>(location));
            lastLocation = location;
        }
        lastLocation = null;

//        title = (host != null ? location.user.login : location.host);
//        if (login != null) { // add duration ?
//            if (location.beginAt != null && location.endAt != null)
//                title += " • " + DateTool.getDuration(location.beginAt, location.endAt);
//            else if (location.beginAt != null)
//                title += " • " + DateTool.getDuration(location.beginAt, new Date()) + " ++";
//        }

        if (login != null && locationInThisSection != null) { // add duration for last element
            Date date = new Date();
            boolean plusplus = false;
            for (Locations locationTmp : locationInThisSection) {
                if (locationTmp.beginAt != null && locationTmp.endAt != null)
                    date.setTime(date.getTime() - (locationTmp.beginAt.getTime() - locationTmp.endAt.getTime()));
                else if (locationTmp.beginAt != null) {
                    date.setTime(date.getTime() - (locationTmp.beginAt.getTime() - new Date().getTime()));
                    plusplus = true;
                }
            }
            lastHeader.title += " • " + DateTool.getDuration(date);
            if (plusplus)
                lastHeader.title += " ++";
        }

        adapter = new LocationHeaderRecyclerAdapter(this, items);
        if (login != null)
            adapter.setUserHistory(true);
        adapter.setOnItemClickListener(this);
        recyclerView.setAdapter(adapter);
        recyclerView.setLayoutManager(new LinearLayoutManager(this, LinearLayoutManager.VERTICAL, false));
    }

    @Override
    public String getEmptyText() {
        return null;
    }

    @Override
    public void getDataOnOtherThread() throws IOException, UnauthorizedException, ErrorServerException {

        Response<List<Locations>> response;
        if (host != null)
            response = app.getApiService().getLocationsHost(AppSettings.getAppCampus(app), host).execute();
        else
            response = app.getApiService().getLastLocations(login).execute();

        if (locations == null)
            locations = new ArrayList<>();
        if (Tools.apiIsSuccessful(response))
            locations.addAll(response.body());

    }

    @Override
    public void onItemClick(RecyclerItemSmall<Locations> item) {
        Locations location = item.item;
        if (location == null)
            return;

        if (host != null)
            UserActivity.openIt(this, location.user, app);
        else
            ClusterMapActivity.openIt(this, location.host);
    }
}


text:
<?php
declare(strict_types=1);

namespace Xcore\Generator\Doctrine\ORM\Entity\Property;

use Xcore\Generator\Doctrine\ORM\Entity\Assert\Assert;

final class Property
{
    use VisibilityTrait;
    use GetterTypeTrait;
    use SetterTrait;
    use NullableTrait;

    /**
     * @var string
     */
    private $name;

    /**
     * @var null|string
     */
    private $columnName;

    /**
     * @var null|integer
     */
    private $length;

    /**
     * @var null|Type
     */
    private $type;

    /**
     * @var bool
     */
    private $id = false;

    /**
     * @var null|GeneratedValueType
     */
    private $generatedValue;

    /**
     * @var null|SequenceGenerator
     */
    private $sequenceGenerator;

    /**
     * @var Assert[]
     */
    private $asserts = [];

    public function __construct(
        string $name,
        bool $nullable,
        Visibility $visibility,
        ?GetterType $getter,
        bool $setter
    )
    {
        $this->name = $name;
        $this->nullable = $nullable;
        $this->visibility = $visibility;
        $this->getter = $getter;
        $this->setter = $setter;
    }

    public function getName(): string
    {
        return $this->name;
    }

    public function getColumnName(): ?string
    {
        return $this->columnName;
    }

    public function setColumnName(?string $columnName): void
    {
        $this->columnName = $columnName;
    }

    public function getLength(): ?int
    {
        return $this->length;
    }

    public function setLength(?int $length): void
    {
        $this->length = $length;
    }

    public function getType(): ?Type
    {
        return $this->type;
    }

    public function setType(?Type $type): void
    {
        $this->type = $type;
    }

    public function isNullable(): bool
    {
        return $this->nullable;
    }

    public function setNullable(bool $nullable): void
    {
        $this->nullable = $nullable;
    }

    public function isId(): bool
    {
        return $this->id;
    }

    public function setId(bool $id): void
    {
        if ($id === true && $id !== $this->id) {
            $this->generatedValue = GeneratedValueType::get(GeneratedValueType::AUTO);
        }

        $this->id = $id;
    }

    public function getGeneratedValue(): ?GeneratedValueType
    {
        return $this->generatedValue;
    }

    public function setGeneratedValue(?GeneratedValueType $generatedValue): void
    {
        $this->generatedValue = $generatedValue;
    }

    public function getSequenceGenerator(): ?SequenceGenerator
    {
        return $this->sequenceGenerator;
    }

    public function setSequenceGenerator(?SequenceGenerator $sequenceGenerator): void
    {
        $this->sequenceGenerator = $sequenceGenerator;
    }

    /**
     * @return Assert[]
     */
    public function getAsserts(): array
    {
        return $this->asserts;
    }

    /**
     * @param Assert[] $asserts
     */
    public function setAsserts(array $asserts): void
    {
        $this->asserts = $asserts;
    }

    public function addAssert(Assert $assert): void
    {
        $this->asserts[] = $assert;
    }

    public function getMetadataMapping(): array
    {
        $mapping = [
            'fieldName' => $this->name,
            'nullable' => $this->nullable,
            'getter' => $this->getter,
            'setter' => $this->setter,
            'id' => $this->id,
            'asserts' => $this->asserts,
        ];

        if ($this->type !== null) {
            $mapping['type'] = $this->type->getValue();
        }

        if ($this->columnName !== null) {
            $mapping['columnName'] = $this->columnName;
        }

        if ($this->length !== null) {
            $mapping['length'] = $this->length;
        }

        return $mapping;
    }
}


text:
@interface IFContentTableViewController ()

- (void)configureCell:(IFContentTableViewCell *)cell forIndexPath:(NSIndexPath *)indexPath;
- (NSString *)reuseIdentifier;

@end

@interface IFContentTableViewCell : UITableViewCell

@property (nonatomic, strong) NSString *title;
@property (nonatomic, strong) NSString *content;
@property (nonatomic, readonly) CGFloat height;

@end

@implementation IFContentTableViewController

#pragma mark - IFIOCConfigurationInitable

- (id)initWithConfiguration:(IFConfiguration *)configuration {
    self = [super initWithConfiguration:configuration];
    if (self) {
        [self.tableView registerClass:[IFContentTableViewCell class] forCellReuseIdentifier:@"content"];
        [self.tableView registerClass:[IFContentTableViewCell class] forCellReuseIdentifier:@"title"];
        _showRowContent = NO;
    }
    return self;
}

#pragma mark - Overridden methods

- (void)setContent:(id)content {
    if (_dataFormatter) {
        content = [_dataFormatter formatData:content];
    }
    super.content = content;
}

- (void)setDataFormatter:(id<IFDataFormatter>)dataFormatter {
    _dataFormatter = dataFormatter;
    if (self.content) {
        id content = [_dataFormatter formatData:self.content];
        super.content = content;
    }
}

#pragma mark - private methods

- (void)configureCell:(IFContentTableViewCell *)cell forIndexPath:(NSIndexPath *)indexPath {
    NSDictionary *data = [self.tableData rowDataForIndexPath:indexPath];
    cell.title = data[@"title"];
    if (_showRowContent) {
        cell.content = data[@"content"];
    }

    CGFloat imageHeight = [[data getValueAsNumber:@"imageHeight" defaultValue:_rowImageHeight] floatValue];
    if (!imageHeight) {
        imageHeight = 40.0f;
    }
    CGFloat imageWidth = imageHeight;
    if ([data hasValue:@"imageWidth"]) {
        imageWidth = [[data getValueAsNumber:@"imageWidth" defaultValue:_rowImageWidth] floatValue];
    }
    UIImage *image = [self loadImageWithRowData:data dataName:@"image" width:imageWidth height:imageHeight defaultImage:_rowImage];
    if (image) {
        cell.imageView.image = image;
        // Add rounded corners to image.
        cell.imageView.layer.masksToBounds = YES;
        cell.imageView.layer.cornerRadius = 3.0;
    }
    else {
        cell.imageView.image = nil;
    }

    if (_action || [data hasValue:@"action"]) {
        cell.accessoryType = UITableViewCellAccessoryDisclosureIndicator;
    }
    else {
        cell.accessoryType = UITableViewCellAccessoryNone;
    }
}

- (NSString *)reuseIdentifier {
    return _showRowContent ? @"content" : @"title";
}

#pragma mark - Table view delegate

- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath {
    if (!_layoutCell) {
        NSString *reuseIdentifier = [self reuseIdentifier];
        _layoutCell = (IFContentTableViewCell *)[tableView dequeueReusableCellWithIdentifier:reuseIdentifier];
    }
    [self configureCell:_layoutCell forIndexPath:indexPath];
    return _layoutCell.height;
}

- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
    NSDictionary *data = [self.tableData rowDataForIndexPath:indexPath];
    // Check for action on cell data.
    NSString *action = [data getValueAsString:@"action"];
    // If no action on cell data, but action defined on table then eval as a template on the cell data.
    if (!action && _action) {
        action = [IFStringTemplate render:_action context:data uriEncode:YES];
    }
    // If we have an action then dispatch it.
    if (action) {
        [self postMessage:action];
    }
}

#pragma mark - Table view data source

- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
    NSString *reuseIdentifier = [self reuseIdentifier];
    IFContentTableViewCell *cell = (IFContentTableViewCell *)[tableView dequeueReusableCellWithIdentifier:reuseIdentifier];
    [self configureCell:cell forIndexPath:indexPath];
    return cell;
}

@end

@implementation IFContentTableViewCell

- (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier {
    BOOL contentMode = [@"content" isEqualToString:reuseIdentifier];
    style = contentMode ? UITableViewCellStyleSubtitle : UITableViewCellStyleDefault;
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    self.detailTextLabel.numberOfLines = 0;
    return self;
}

- (NSString *)title {
    return self.textLabel.text;
}

- (void)setTitle:(NSString *)title {
    self.textLabel.text = title;
}

- (NSString *)content {
    return self.detailTextLabel.attributedText.description;
}

- (void)setContent:(NSString *)content {
    IFHTMLString *html = [[IFHTMLString alloc] initWithString:content];
    html.inlineParagraphs = YES;
    [html parse];
    self.detailTextLabel.attributedText = [html asAttributedString];
}

- (CGFloat)height {
    [self layoutIfNeeded];
    CGFloat height;
    if (self.detailTextLabel) {
        CGRect textFrame = self.textLabel.frame;
        CGFloat layoutWidth = self.contentView.bounds.size.width;
        CGSize contentSize = [self.detailTextLabel sizeThatFits:CGSizeMake(layoutWidth, CGFLOAT_MAX)];
        // sizeThatFits: doesn't seem to make allowance for line spacing, so the additional following
        // calculation estimates the number of lines and uses the text label's font's leading value to
        // calculate a line spacing amount.
        CGFloat numberOfLines = floorf(contentSize.height / self.detailTextLabel.font.lineHeight);
        CGFloat lineSpacing = (numberOfLines + 1) * self.detailTextLabel.font.leading;
        height = 5.0f + textFrame.size.height + 5.0f + contentSize.height + lineSpacing + 5.0f;
    }
    else {
        height = self.textLabel.bounds.size.height;
    }
    return height;
}

#pragma mark - overloads

- (void)layoutSubviews {
    CGFloat layoutWidth = self.contentView.bounds.size.width;
    CGSize contentSize = [self.detailTextLabel sizeThatFits:CGSizeMake(layoutWidth, CGFLOAT_MAX)];
    self.detailTextLabel.bounds = CGRectMake(0.0f, 0.0f, contentSize.width, contentSize.height);
    [super layoutSubviews];
}

@end


text:
class MeTemperature:public MePort{
	public:
		MeTemperature();
		MeTemperature(MEPORT port);
		MeTemperature(uint8_t pin);
		MeTemperature(MEPORT port,uint8_t slot);
		void reset(uint8_t port, uint8_t slot);
		///@brief get the celsius of temperature
		float temperature();
	private:
		Me1Wire _ts;
};
#endif


text:
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:web="http://xmlns.jcp.org/xml/ns/javaee" xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
  <display-name>Light Community</display-name>
  <context-param>
    <param-name>contextConfigLocation</param-name>
    <param-value>/WEB-INF/spring/root-context.xml</param-value>
  </context-param>
  <filter>
    <filter-name>encodingFilter</filter-name>
    <filter-class>org.springframework.web.filter.CharacterEncodingFilter</filter-class>
    <init-param>
      <description>encoding</description>
      <param-name>encoding</param-name>
      <param-value>UTF-8</param-value>
    </init-param>
  </filter>
  <filter-mapping>
    <filter-name>encodingFilter</filter-name>
    <url-pattern>/*</url-pattern>
  </filter-mapping>
  <listener>
    <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
  </listener>
  <listener>
    <listener-class>org.springframework.web.util.IntrospectorCleanupListener</listener-class>
  </listener>
  <listener>
    <listener-class>org.springframework.web.context.request.RequestContextListener</listener-class>
  </listener>
  <context-param>
    <param-name>log4jConfigLocation</param-name>
    <param-value>classpath:log4j.xml</param-value>
  </context-param>
  <context-param>
    <param-name>rootLevel</param-name>
    <param-value>INFO</param-value>
  </context-param>
  <context-param>
    <param-name>loggingLevel</param-name>
    <param-value>INFO</param-value>
  </context-param>
  <session-config>
    <session-timeout>15</session-timeout>
  </session-config>
  <listener>
    <listener-class>org.springframework.web.util.Log4jConfigListener</listener-class>
  </listener>
  <filter>
    <filter-name>shiroFilter</filter-name>
    <filter-class>org.springframework.web.filter.DelegatingFilterProxy</filter-class>
    <async-supported>true</async-supported>
    <init-param>
      <param-name>targetFilterLifecycle</param-name>
      <param-value>true</param-value>
    </init-param>
  </filter>
  <filter-mapping>
    <filter-name>shiroFilter</filter-name>
    <url-pattern>/*</url-pattern>
  </filter-mapping>
  <servlet>
    <servlet-name>appServlet</servlet-name>
    <servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
    <init-param>
      <param-name>contextConfigLocation</param-name>
      <param-value>/WEB-INF/spring/appServlet/servlet-context.xml</param-value>
    </init-param>
    <load-on-startup>1</load-on-startup>
  </servlet>
  <servlet-mapping>
    <servlet-name>appServlet</servlet-name>
    <url-pattern>/</url-pattern>
  </servlet-mapping>
</web-app>


text:
using Microsoft.Owin;
using Microsoft.Owin.Security;
using Microsoft.Owin.Security.Provider;

namespace Owin.Security.Providers.ArcGISOnline
{
    /// <summary>
    /// Provides context information to middleware providers.
    /// </summary>
    public class ArcGISOnlineReturnEndpointContext : ReturnEndpointContext
    {
        /// <summary>
        ///
        /// </summary>
        /// <param name="context">OWIN environment</param>
        /// <param name="ticket">The authentication ticket</param>
        public ArcGISOnlineReturnEndpointContext(
            IOwinContext context,
            AuthenticationTicket ticket)
            : base(context, ticket)
        {
        }
    }
}


text:
import React from 'react';
import Document, { Head, Main, NextScript } from 'next/document';
import { ServerStyleSheet } from 'styled-components';
import styledNormalize from 'styled-normalize';

export default class MyDocument extends Document {
  render() {
    const sheet = new ServerStyleSheet();
    const main = sheet.collectStyles(<Main />);
    const styleTags = sheet.getStyleElement();
    return (
      <html lang="en-US">
        <Head>
          {styleTags}
          <style type="text/css">
            {styledNormalize}
          </style>
          <meta
            name="viewport"
            content="width=device-width, initial-scale=1.0"
          />
          <link rel="manifest" href="./static/manifest.json" />
          <meta name="theme-color" content="#56a5b7" />
          <link
            rel="shortcut icon"
            type="image/png"
            href="/static/tg-logo.png"
          />
        </Head>
        <body>
          <div className="root">
            {main}
          </div>
          <NextScript />
          <link
            rel="stylesheet"
            href="//cdnjs.cloudflare.com/ajax/libs/prism/1.6.0/themes/prism-coy.min.css"
          />
          <link
            rel="stylesheet"
            href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.6.3/css/font-awesome.min.css"
          />
          <link
            rel="stylesheet"
            href="https://fonts.googleapis.com/css?family=Lato"
          />
          <link
          rel="stylesheet"
          href="http://secure.acuityscheduling.com/embed/button/13089768.css" id="acuity-button-styles" />
          <script src="http://secure.acuityscheduling.com/embed/button/13089768.js" async></script>
          <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.2.1/jquery.min.js" />
        </body>
      </html>
    );
  }
}


text:
"""
The picamera package consists of several modules which provide a pure Python
interface to the Raspberry Pi's camera module. The package is only intended to
run on a Raspberry Pi, and expects to be able to load the MMAL library
(libmmal.so) upon import.

The classes defined by most modules in this package are available directly from
the :mod:`picamera` namespace. In other words, the following code is typically
all that is required to access classes in the package::

    import picamera

The :mod:`picamera.array` module is an exception to this as it depends on the
third-party `numpy`_ package (this avoids making numpy a mandatory dependency
for picamera).

.. _numpy: http://www.numpy.org/

The following sections document the various modules available within the
package:

* :mod:`picamera.camera`
* :mod:`picamera.encoders`
* :mod:`picamera.frames`
* :mod:`picamera.streams`
* :mod:`picamera.renderers`
* :mod:`picamera.color`
* :mod:`picamera.exc`
* :mod:`picamera.array`
"""

from __future__ import (
    unicode_literals,
    print_function,
    division,
    absolute_import,
    )

# Make Py2's str equivalent to Py3's
str = type('')

from picamera.exc import (
    PiCameraWarning,
    PiCameraDeprecated,
    PiCameraFallback,
    PiCameraAlphaStripping,
    PiCameraResizerEncoding,
    PiCameraError,
    PiCameraRuntimeError,
    PiCameraClosed,
    PiCameraNotRecording,
    PiCameraAlreadyRecording,
    PiCameraValueError,
    PiCameraMMALError,
    PiCameraPortDisabled,
    mmal_check,
    )
from picamera.mmalobj import PiResolution, PiFramerateRange
from picamera.camera import PiCamera
from picamera.display import PiDisplay
from picamera.frames import PiVideoFrame, PiVideoFrameType
from picamera.encoders import (
    PiEncoder,
    PiVideoEncoder,
    PiImageEncoder,
    PiRawMixin,
    PiCookedVideoEncoder,
    PiRawVideoEncoder,
    PiOneImageEncoder,
    PiMultiImageEncoder,
    PiRawImageMixin,
    PiCookedOneImageEncoder,
    PiRawOneImageEncoder,
    PiCookedMultiImageEncoder,
    PiRawMultiImageEncoder,
    )
from picamera.renderers import (
    PiRenderer,
    PiOverlayRenderer,
    PiPreviewRenderer,
    PiNullSink,
    )
from picamera.streams import PiCameraCircularIO, CircularIO, BufferIO
from picamera.color import Color, Red, Green, Blue, Hue, Lightness, Saturation


text:
\renewcommand*{\chaptermarkformat}{}
\chaptermark{Literaturverzeichnis}


text:
package com.ppcxy.manage.maintain.notification.exception;

/**
 *
Date: 13-7-8 下午5:34
 *
Version: 1.0
 */
public class TemplateNotFoundException extends TemplateException {
    public TemplateNotFoundException(String templateName) {
        super("notification.template.not.found", new Object[]{templateName});
    }
}


text:
class NodeFactory(object):
    """
    Static methods for creating / finding nodes, and adding them to the
    graph manager.
    """
    @staticmethod
    def get_node(graph_manager, gc_type, node_type, *args, **kwargs):
        """
        """
        from .graph_node import GraphNode

        # We find the ID of the node. This is made up of the node's type (as a string)
        # plus it's identity parameters...
        node_type_name = node_type.get_type()
        if not node_type_name:
            node_type_name = node_type.__name__
        node_id = node_type_name + "." + node_type.make_node_id(*args)

        # We check if the node is already in the graph and create it
        ## if it is not...
        node = graph_manager.find_node(node_id)
        if node is None:
            # We create the new node...
            args = args + (node_id, graph_manager, graph_manager.environment,)
            node = node_type(*args, **kwargs)

            # We add the node to the graph...
            graph_manager.add_node(node)

        # We add a ref-count for non-collectable nodes (regardless of whether
        # it is hooked up to other nodes)...
        if gc_type == GraphNode.GCType.NON_COLLECTABLE:
            node.add_gc_ref_count()
            node.set_gc_type(GraphNode.GCType.NON_COLLECTABLE)

        return node


text:
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

  <title>Package Documentation for org.apache.struts.taglib.bean Package</title>

 The "struts-bean" tag library contains JSP custom tags useful in defining
new beans (in any desired scope) from a variety of possible sources, as well
as a tag to render a particular bean (or bean property) to the output response.

 [Introduction]
 [Bean Properties]
 [Bean Creation]
 [Bean Output]

Introduction

Much of the power of JavaServer Pages (JSP) technology comes from the
simple and powerful mechanisms by which the servlet that is generated automatically
from your JSP source page can interact with JavaBeans that represent the computational
state of your application.  In standard JSP pages, the <jsp:useBean>
 tag is used create a bean (if necessary), as well as a "scripting variable"
that can be used within scriptlets to refer to these beans.

The "struts-bean" tag library provides substantial enhancements to the
basic capability provided by <jsp:useBean>, as discussed
in the following sections:

Bean Properties
 - Extended syntax to refer to     JavaBean properties with simple names
(same as the standard JSP tags     <jsp:getProperty> and
    <jsp:setProperty>), nested names (a property named
    address.city returns the value retrieved by the Java
 expression getAddress().getCity()), and indexed names     (a
property named address[3] retrieves the fourth address     from
the indexed "address" property of a bean).

Bean Creation
 - New JSP beans, in any scope,     can be created from a variety of objects
and APIs associated with the     current request, or with the servlet container
in which this page is     running.

Bean Output
 - Supports the rendering of textual     output from a bean (or bean property),
which will be included in the     response being created by your JSP page.

See the Bean Tags Reference
 for detailed information about the available tags in this tag library, and
the valid attributes for each tag.

Bean Properties

Common Tag Attributes

The tags in the "struts-bean" tag library (and, generally, in all tag libraries
included with the Struts framework) share a common set of tag attributes
that have the same meaning, no matter what tag they are used on. These common
attributes include:

id - Names the scripting variable that will be     created
by this custom tag, as well as the key value used to locate this     bean
in the scope defined by the scope attribute.

name - Defines the key value by which an existing bean will
be     looked up in the scope defined by the scope attribute
    (if any), or by searching through the various scopes in the standard
   order (page, request, session, application).

property - Defines the name of a JavaBeans property, of the
JSP     bean identified by the name and (optional) scope
     attributes, whose value is to be used by this custom tag.  If not
  specified, the bean identified by name is itself used
as the value of interest.  See below for more discussion about how a
property can be referenced.

scope - Identifies the JSP scope ("page", "request", "session",
    or "application" within which a particular bean will be searched for
   (under the key specified by the name attribute) or created
    (under the key specified by the id attribute).  If not
   specified, beans will generally be searched for in the order listed above,
    or created in page scope.

Property References

Struts tags that support the property tag generally also recognize
a rich syntax for getting and setting properties.  There are three types
of references supported:  simple, nested, and indexed.

Simple References - These are equivalent to the syntax you use
with the standard <jsp:getProperty> and <jsp:setProperty>
 tags.  A reference to a property named "foo" is converted into a method
call to getFoo() or setFoo(value) (as appropriate),
using the standard JavaBeans Specification naming conventions for bean properties.
 Struts uses the standard Java introspection APIs to identify the names of
the actual property getter and setter methods, so your beans can provided
customized method names through the use of a BeanInfo class.
 See the JavaBeans Specification, available at
 http://java.sun.com/products/javabeans/
, for more information.

Nested References - Nested references are used to access a property
through a hierarchy of property names separated by periods ("."), similar
to the way that nested properties are accessed in JavaScript.  For example,
the following property reference in a getter (such as the <bean:define>
 tag discussed below):

    property="foo.bar.baz"

is translated into the equivalent the Java expression:

    getFoo().getBar().getBaz()

If a nested reference is used in a setter (such as when an input form
is processed), the property setter is called on the last
 property in the chain.  For the above property reference, the equivalent
Java expression would be:

    getFoo().getBar().setBaz(value)

Indexed References - Subscripts can be used to access individual
elements of properties whose value is actually an array, or whose underlying
JavaBean offers indexed getter and setter methods.  For example, the following
property reference in a getter (such as the <bean:define>
 tag discussed below):

    property="foo[2]"

is translated into the equivalent of the Java expression:

    getFoo(2);

while the same property reference in a setter would call the equivalent
of:

    setFoo(2, value)

As you can see from the above translations, the subscripts used in indexed
references are zero relative (that is, the first element
in an array is foo[0]), just as is true in the Java language.

Combined References - Nesting and indexing can be combined in
arbitrary ways, so that expressions like foo.bar[0].baz[2] are
legal.  You must be careful, of course, to ensure that the actual beans being
accessed by these references have properties of the appropriate names and
types.  Otherwise, JSP runtime exceptions will be thrown.

See the JavaDocs for PropertyUtils
 for more detailed information about the mechanisms that Struts uses to access
properties in a general way, through Java reflection APIs.

Bean Creation

Introduction

New beans can be created, and introduced into one of the four standard
JSP scopes (page, request, session, and application) through a variety of
techniques.  The following subsections describe the use of the following approaches:

Java Code in Action Classes

Java Code in Scriptlets

The Standard <jsp:useBean> Tag

The Struts <bean:define> Tag

Other Struts Copying Tags

Java Code in Action Classes

Because the JSP pages are compiled into Servlets, your Action
 classes that are invoked by the Struts controller servlet have convenient
access to three of the four standard JSP scopes (request, session, and application).
 It is very common practice for the business logic contained in your
Action class to create results that are stored in request or session
scope, which will be used by a JSP page you forward control to in rendering
the next page of the user interface.

Request Scope - To store a bean in request scope under name "cust",
your Action class would execute code similar to this:

    Customer customer = ... create or acquire a customer reference ...;
    request.setAttribute("cust", customer);

Session Scope - To store a bean in session scope under name "user"
(perhaps in a logon action), your Action class would execute
code similar to this:

    User user = ... look up valid user in the database ...;
    HttpSession session = request.getSession();
    session.setAttribute("user", user);

Application Scope - Generally, application scope beans are initialized
in the init() method of a startup servlet.  However, it is legal
for an Action class to create such beans, if this is appropriate,
like this:

    Foo foo = ... create a Foo ...;
    servlet.getServletContext().setAttribute("foo", foo);

Java Code in Scriptlets

While it is not a recommended practice in Struts-based applications (because
developers will be tempted to mix business logic and presentation logic in
their JSP pages), it is legal for scriptlet code in a JSP page to create
new JavaBeans dynamically, and add them to any of the four possible scopes,
as demonstrated in the code examples below:

Page Scope - To store a bean in page scope under name "foo", your
scriptlet must execute code like this:

<%
    Foo foo = ... create a foo ...;
    pageContext.setAttribute("foo", foo, PageContext.PAGE_SCOPE);
%>

Request Scope - To store a bean in request scope under name "cust",
your scriplet must execute code like this:

<%
    Customer customer = ... create or acquire a customer reference ...;
    pageContext.setAttribute("cust", customer, PageContext.REQUEST_SCOPE);
%>

Session Scope - To store a bean in session scope under name "user",
(perhaps as a result of a validated login), your scriplet must execute code
like this:

<%
    User user = ... look up valid user in the database ...;
    pageContext.setAttribute("user", user, PageContext.SESSION_SCOPE);
%>

Application Scope - Generally, application scope beans are initialized
in the init() method of a startup servlet.  However, a scriptlet
can create such beans, if appropriate, like this:

<%
    Foo foo = ... create a Foo ...;
    pageContext.setAttribute("foo", foo, PageContext.APPLICATION_SCOPE);
%>

NOTE - As mentioned above, using scriptlets in your JSP
pages is strongly discouraged in a Struts based application, unless you are
executing code that is only related to presentation of existing
data.  In general, your application's processing logic should be encapsulated
in Action classes (or in beans or EJBs called by those classes),
rather than being intermixed in your JSP pages.

The Standard <jsp:useBean> Tag

JavaServer Pages (JSP) offers a standard tag, <jsp:useBean>
 that can be used to create a new bean, or introduce a reference to an existing
bean, into a JSP page.  Beans (or bean references) introduced through this
mechanism are completely interoperable with beans created by any of the Struts
creation techniques described in this section.

You must use <jsp:useBean> to introduce
a reference to an existing bean, if you wish to reference that bean with
other standard JSP tags (such as <jsp:getProperty> or
<jsp:setProperty>).  If you only wish to reference such beans
with other Struts tags, use of <jsp:useBean> is not required.

For more information about the <jsp:useBean> tag, see
the JavaServer Pages Specification, available at
 http://java.sun.com/products/jsp/download.html
.

The Struts <bean:define> Tag

Struts provides a powerful, general purpose, tag (<bean:define>
) that can be used to create a new bean, in any scope, by copying another
bean (or the value of the property of another bean).  This tag supports the
"property" attribute, and therefore all the power of property references,
as discused above
.  It can be used in a variety of different ways, described further below.
 Unless you specify the "toScope" attribute, all defined beans will be created
in page scope.

Introduce A String Constant - You can create a new bean that
has a constant String value (or the result of calculating a runtime expression):

    <bean:define id="foo" value="This is a new String"/>
    <bean:define id="bar" value='<%= "Hello, " + user.getName() %>'/>
    <bean:define id="last" scope="session"
                 value='<%= request.getRequestURI() %>'/>

Copy An Existing Bean - You can create a new reference to an existing
bean object.  You can specify the Java class or interface the new bean is
expected to conform to with the "type" attribute, or accept the default type
of java.lang.Object (this only affects the scripting variable
that is exposed to scriptlets, so it is not generally meaningful in Struts-based
applications).

    <bean:define id="foo" name="bar"/>
    <bean:define id="baz" name="bop" type="com.mycompany.MyBopClass"/>

Copy An Existing Bean Property - You can create a new bean that
is initialized to the value returned by a property getter.  The value of
the "property" attribute can be any simple, nested, or indexed property reference
that follows the rules described earlier.  In the first example below, we
also illustrate accessing the property of a request scope bean, and creating
the new bean in session scope (rather than the default page scope).

    <bean:define id="foo" name="bar" property="baz" scope="request"
     toScope="session"/>
    <bean:define id="bop" name="user" property="role[3].name"/>

Other Struts Copying Tags

Struts offers a variety of bean creation tags that copy existing beans
(or bean properties) from the environment within which this page is running,
and the request that is currently being processed.  Not all of the attributes
for each tag are illustrated in the examples below - see the
Bean Tags Reference
 for more information.  Any bean created by these tags exists only in page
scope, for the remainder of the current page.

Copy A Cookie - You can create a new bean containing a
javax.servlet.http.Cookie that was included in the current request.
 If no cookie of the specified name was included, a request time expression
will be thrown - therefore, it is common to nest the use of this tag inside
a <logic:present cookie="xxx"> tag to ensure that the
cookie was really included.  If there is the possibility that more than one
cookie of the same name was included, specify the "multiple" attribute (and
the resulting bean will be an array of Cookies, instead of a single Cookie).

    <bean:cookie id="foo" name="cookiename"/>
    <bean:cookie id="all" name="JSESSIONID" multiple="true"/>

Copy A Request Header - You can create a new bean containing
the value of an HTTP header included in this request.  If no header of the
specified name was included, a request time exception will be thrown - therefore,
it is common to nest the use of this tag inside a <logic:present
header="xxx"> tag to ensure that the header was really included.
 If there is the possibility that more than one header of the same name was
included, specify the "multiple" attribute (and the resulting value bean
will be an array of String values, instead of a single String).

    <bean:header id="agent" name="User-Agent"/>
    <bean:header id="languages" name="Accept-Language" multiple="true"/>

Copy A Dynamically Created Response - You can generate an internal
request to the application you are running, and turn the response data that
is returned from that request into a bean (of type String).  One possible
use for this technique is to acquire dynamically created XML formatted data
that will be stored in a bean and later manipulated (such as by applying
an XSLT stylesheet).  If the current request is part of a session, the generated
request for the include will also include the session identifier (and thus
be considered part of the same session).

    <bean:include id="text" name="/generateXml?param1=a&param2=b"/>

Copy A JSP Implicitly Defined Object - You can create a bean
that is one of the JSP implicitly defined objects (see the JSP spec for more
details).  This is useful if you wish to perform property getter actions against
the implicit object with a custom tag instead of a scriptlet.

    <bean:page id="app" property="application"/>
    <bean:page id="sess" property="session"/>

Copy A Request Parameter - You can create a new bean containing
the value of a parameter included in this request.  If no parameter of the
specified name was included, a request time exception will be thrown - therefore,
it is common to nest the use of this tag inside a <logic:present
parameter="xxx"> tag to ensure that the parameter was really included.
 If there is the possibility that more than one parameter of the same name
was included, specify the "multiple" attribute (and the resulting value bean
will be an array of String values, instead of a single String).

    <bean:parameter id="name" name="name"/>
    <bean:header id="options" name="option" multiple="true"/>

Copy a Web Application Resource - You can create a new bean containing
either the value of a web application resource as a String, or a java.io.InputStream
 for reading the content of that resource. The resource is accessed with
a context-relative path (beginning with "/"), using the ServletContext.getResource()
 or ServletContext.getResourceAsStream() methods on the underlying
application object.

    <bean:resource id="deployment" name="/WEB-INF/web.xml"/>
    <bean:resource id="stream" name="/WEB-INF/web.xml"
                   input="true"/>

Copy A Struts Configuration Object - You can create a new bean
containing one of the standard Struts framework configuration objects.  Doing
this gives you access to the properties of the configuration object, if needed.

    <bean:struts id="form" formBean="CustomerForm"/>
    <bean:struts id="fwd" forward="success"/>
    <bean:struts id="map" mapping="/saveCustomer"/>

Bean Output

None of the Struts Bean tags discussed so far render any output to the
response page that is being generated from this JSP page.  They are executed
in order to make relevant Java objects visible as beans for further manipulation.
 The following tags cause output to be written to the response, and therefore
made visible to the ultimate requester.

Render An Internationalized Message - You can specify a message
key (with optional parameter replacement objects) that are passed to a
MessageResources
 object that returns the corresponding message text.  The message text will
be copied to the response currently being created.  By default, messages
are looked up in the application resources bundle that is initialized for
you (as an application scope bean) by the Struts controller servlet, using
the Locale must recently stored in the user's session.  These defaults can
be overridden by setting values for the "bundle" and "locale" attributes,
as described in the
Bean Tags Reference
.

    <bean:message key="label.Cancel"/>
    <bean:message key="message.hello" arg0='<%= user.getFullName() %>'/>

Render A Bean or Bean Property - The contents of a bean, or bean
property, are converted to a String and then copied to the response currently
being created.  This tag understands the syntax for simple, nested, and indexed
property references described  above
.  Beans from any scope can be requested - by default, the scopes are searched
in expanding visibility order (page, request, session, and application) to
locate the requested bean.

    <bean:write name="username"/>
    <bean:write name="user" property="fullName"/>
    <bean:write name="customer" property="orders[2].partNumber"
                scope="session"/>


text:
#ifndef EDITORMANAGER_H
#define EDITORMANAGER_H

#include <qwidget.h>
#include <kparts/partmanager.h>
#include <klibloader.h>
#include <ktexteditor/document.h>

/**
 * Creates text editor parts, used to open source files.
 * The EditorManager is responsible for creating parts, and managing their
 * GUI integration.
 * @author Elad Lahav
 */

class EditorManager : public KParts::PartManager
{
   Q_OBJECT

public:
	EditorManager(QWidget* pParent = 0, const char* szName = 0);
	~EditorManager();

	KTextEditor::Document* add();
	void remove(KTextEditor::Document*);
	void applyPrefs();
};

#endif


text:
require 'mail'

mail = Mail.new do
  to 'matwb@ug.edu.pl'
  from 'wbzyl@inf.ug.edu.pl'
  subject 'Tę wiadomość wysłano z localhost'
  body File.read('body.txt')
  add_file :filename => 'butterfly.jpg', :content => File.read('images/butterfly.jpg')
end

mail.deliver!


text:
using System.ServiceModel.Channels;
using System.ServiceModel.Description;
using System.Xml;

namespace System.ServiceModel.Security
{
    internal abstract class ReceiveSecurityHeader : SecurityHeader
    {
        protected ReceiveSecurityHeader(Message message, string actor, bool mustUnderstand, bool relay,
            SecurityStandardsManager standardsManager,
            SecurityAlgorithmSuite algorithmSuite,
            int headerIndex,
            MessageDirection direction)
            : base(message, actor, mustUnderstand, relay, standardsManager, algorithmSuite, direction)
        {
            throw ExceptionHelper.PlatformNotSupported();
        }

        public override string Name
        {
            get { return this.StandardsManager.SecurityVersion.HeaderName.Value; }
        }

        public override string Namespace
        {
            get { return this.StandardsManager.SecurityVersion.HeaderNamespace.Value; }
        }

        protected override void OnWriteHeaderContents(XmlDictionaryWriter writer, MessageVersion messageVersion)
        {
            throw ExceptionHelper.PlatformNotSupported();
        }
    }
}


text:
scheme.name=Juicy
view.fgColor=\#e3e2e0
view.bgColor=\#222222
view.caretColor=\#ffffff
view.selectionColor=\#444444
view.eolMarkerColor=\#3b3a32
view.lineHighlightColor=\#282828
view.style.comment1=color\:\#777777 style\:
view.style.literal1=color\:\#3bc7b8 style\:
view.style.label=color\:\#f9d423 style\:
view.style.digit=color\:\#ce1836 style\:
view.style.keyword1=color\:\#edb92e style\:
view.style.keyword2=color\:\#f85931 style\:
view.style.keyword3=color\:\#f9d423 style\:
view.style.keyword4=color\:\#e3e2e0 style\:
view.style.operator=color\:\#edb92e style\:
view.style.function=color\:\#f85931 style\:
view.style.literal3=color\:\#3bc7b8 style\:
view.style.markup=color\:\#ff4e50 style\: