text:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

How Much Do You Love Me? (2005)

Combien tu m'aimes ?

        After winning the lottery, François goes to a bar in Pigalle and offers one hundred thousand Euros per month to a prostitute named Daniela to live with him as his wife until his money runs out.

        Genres:
Comedy, Drama, Romance

        <! -- print the director -->
        Director:
Bertrand Blier

        Writer:
Bertrand Blier

        Cast:
Daniela - Monica Bellucci
 François - Bernard Campan
 Charly - Gérard Depardieu
 André Migot - Jean-Pierre Darroussin
 L'homme bouleversé - Edouard Baer
 La voisine - Farida Rahouadj
 Muguet - Sara Forestier
 Le toubib - Michel Vuillermoz
 Michael - François Rollin
 Garde du corps 1 - Jean Barney
 Garde du corps 2 - Baptiste Roussillon
 Homme du cimetière - Jean Dell
 Collègue François - Michaël Abiteboul
 Collègue François - Fabienne Chaudat
 Le voisin - Thomas Badek
 Collègue François - Bruno Abraham-Kremer
 Collègue François - Vincent Nemeth
 Collègue François - Valérie Karsenti
 Anne-Sophie - Cécile Brams
 Collègue François - Seidy Lopez
 Le client de Muguet - Bertrand Blier

    back...


text:
package imm

//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.
//
// Code generated by Alibaba Cloud SDK Code Generator.
// Changes may cause incorrect behavior and will be lost if the code is regenerated.

// CroppingSuggestionInFindImages is a nested struct in imm response
type CroppingSuggestionInFindImages struct {
	CroppingSuggestionItem []CroppingSuggestionItem `json:"CroppingSuggestion" xml:"CroppingSuggestion"`
}

redpajama_set_name: RedPajamaGithub


text:
package brooklyn.enricher;

import static com.google.common.base.Preconditions.checkArgument;
import static com.google.common.base.Preconditions.checkNotNull;

import java.util.Collection;
import java.util.List;
import java.util.Map;
import java.util.Set;

import brooklyn.enricher.basic.Aggregator;
import brooklyn.enricher.basic.Combiner;
import brooklyn.enricher.basic.Propagator;
import brooklyn.enricher.basic.Transformer;
import brooklyn.entity.Entity;
import brooklyn.event.AttributeSensor;
import brooklyn.event.Sensor;
import brooklyn.event.SensorEvent;
import brooklyn.policy.Enricher;
import brooklyn.policy.EnricherSpec;
import brooklyn.util.collections.MutableMap;
import brooklyn.util.flags.TypeCoercions;
import brooklyn.util.text.Strings;

import com.google.common.base.Function;
import com.google.common.base.Objects;
import com.google.common.base.Predicate;
import com.google.common.collect.ImmutableList;
import com.google.common.collect.ImmutableSet;
import com.google.common.collect.Iterables;
import com.google.common.collect.Maps;
import com.google.common.reflect.TypeToken;

public class Enrichers {

    private Enrichers() {}

    public static InitialBuilder<?> builder() {
        return new ConcreteInitialBuilder();
    }

    public abstract static class Builder<B extends Builder<B>> {
        @SuppressWarnings("unchecked")
        protected B self() {
           return (B) this;
        }
    }

    public abstract static class InitialBuilder<B extends InitialBuilder<B>> extends Builder<B> {
        public PropagatorBuilder<?> propagating(Map<? extends Sensor<?>, ? extends Sensor<?>> vals) {
            return new ConcretePropagatorBuilder(vals);
        }
        public PropagatorBuilder<?> propagating(Iterable<? extends Sensor<?>> vals) {
            return new ConcretePropagatorBuilder(vals);
        }
        public PropagatorBuilder<?> propagating(Sensor<?>... vals) {
            return new ConcretePropagatorBuilder(vals);
        }
        public PropagatorBuilder<?> propagatingAll() {
            return new ConcretePropagatorBuilder(true, null);
        }
        public PropagatorBuilder<?> propagatingAllBut(Sensor<?>... vals) {
            return new ConcretePropagatorBuilder(true, ImmutableSet.copyOf(vals));
        }
        public PropagatorBuilder<?> propagatingAllBut(Iterable<? extends Sensor<?>> vals) {
            return new ConcretePropagatorBuilder(true, vals);
        }
        public <S> TransformerBuilder<S, Object, ?> transforming(AttributeSensor<S> val) {
            return new ConcreteTransformerBuilder<S, Object>(val);
        }
        public <S> CombinerBuilder<S, Object, ?> combining(AttributeSensor<? extends S>... vals) {
            return new ConcreteCombinerBuilder<S, Object>(vals);
        }
        public <S> CombinerBuilder<S, Object, ?> combining(Collection<AttributeSensor<? extends S>> vals) {
            return new ConcreteCombinerBuilder<S, Object>(vals);
        }
        public <S> AggregatorBuilder<S, Object, ?> aggregating(AttributeSensor<S> val) {
            return new ConcreteAggregatorBuilder<S,Object>(val);
        }
    }

    public abstract static class AggregatorBuilder<S, T, B extends AggregatorBuilder<S, T, B>> extends Builder<B> {
        protected final AttributeSensor<S> aggregating;
        protected AttributeSensor<T> publishing;
        protected Entity fromEntity;
        protected Function<? super Collection<S>, ? extends T> computing;
        protected Boolean fromMembers;
        protected Boolean fromChildren;
        protected Boolean excludingBlank;
        protected ImmutableSet<Entity> fromHardcodedProducers;
        protected Predicate<? super Entity> entityFilter;
        protected Predicate<Object> valueFilter;
        protected Object defaultValueForUnreportedSensors;
        protected Object valueToReportIfNoSensors;

        public AggregatorBuilder(AttributeSensor<S> aggregating) {
            this.aggregating = aggregating;
        }
        @SuppressWarnings({ "unchecked", "rawtypes" })
        public B publishing(AttributeSensor<? extends T> val) {
            this.publishing = (AttributeSensor) checkNotNull(val);
            return self();
        }
        public B from(Entity val) {
            this.fromEntity = checkNotNull(val);
            return self();
        }
        public B fromMembers() {
            this.fromMembers = true;
            return self();
        }
        public B fromChildren() {
            this.fromChildren = true;
            return self();
        }
        public B fromHardcodedProducers(Iterable<? extends Entity> val) {
            this.fromHardcodedProducers = ImmutableSet.copyOf(val);
            return self();
        }
        public B computing(Function<? super Collection<S>, ? extends T> val) {
            this.computing = checkNotNull(val);
            return self();
        }
        @SuppressWarnings({ "unchecked", "rawtypes" })
        public B computingSum() {
            // relies of TypeCoercion of result from Number to T, and type erasure for us to get away with it!
            Function<Collection<S>, Number> function = new Function<Collection<S>, Number>()  {
                @Override public Number apply(Collection<S> input) {
                    return sum((Collection)input, (Number)defaultValueForUnreportedSensors, (Number)valueToReportIfNoSensors, (TypeToken) publishing.getTypeToken());
                }};
            this.computing((Function)function);
            return self();
        }
        @SuppressWarnings({ "unchecked", "rawtypes" })
        public B computingAverage() {
            // relies of TypeCoercion of result from Number to T, and type erasure for us to get away with it!
            Function<Collection<S>, Number> function = new Function<Collection<S>, Number>() {
                @Override public Number apply(Collection<S> input) {
                    return average((Collection)input, (Number)defaultValueForUnreportedSensors, (Number)valueToReportIfNoSensors, (TypeToken) publishing.getTypeToken());
                }};
            this.computing((Function)function);
            return self();
        }
        public B defaultValueForUnreportedSensors(S val) {
            this.defaultValueForUnreportedSensors = val;
            return self();
        }
        public B valueToReportIfNoSensors(Object val) {
            this.valueToReportIfNoSensors = val;
            return self();
        }
        public B entityFilter(Predicate<? super Entity> val) {
            this.entityFilter = val;
            return self();
        }
        public B excludingBlank() {
            this.excludingBlank = true;
            return self();
        }
        public EnricherSpec<?> build() {
            Predicate<Object> valueFilter;
            if (Boolean.TRUE.equals(excludingBlank)) {
                valueFilter = new Predicate<Object>() {
                    @Override public boolean apply(Object input) {
                        return (input != null) &&
                                ((input instanceof CharSequence) ? Strings.isNonBlank((CharSequence)input) : true);
                    }
                };
            } else {
                valueFilter = null;
            }
            // FIXME excludingBlank; use valueFilter? exclude means ignored entirely or substituted for defaultMemberValue?
            return EnricherSpec.create(Aggregator.class)
                    .configure(MutableMap.builder()
                            .putIfNotNull(Aggregator.PRODUCER, fromEntity)
                            .put(Aggregator.TARGET_SENSOR, publishing)
                            .put(Aggregator.SOURCE_SENSOR, aggregating)
                            .putIfNotNull(Aggregator.FROM_CHILDREN, fromChildren)
                            .putIfNotNull(Aggregator.FROM_MEMBERS, fromMembers)
                            .putIfNotNull(Aggregator.TRANSFORMATION, computing)
                            .putIfNotNull(Aggregator.FROM_HARDCODED_PRODUCERS, fromHardcodedProducers)
                            .putIfNotNull(Aggregator.ENTITY_FILTER, entityFilter)
                            .putIfNotNull(Aggregator.VALUE_FILTER, valueFilter)
                            .putIfNotNull(Aggregator.DEFAULT_MEMBER_VALUE, defaultValueForUnreportedSensors)
                            .build());
        }

        @Override
        public String toString() {
            return Objects.toStringHelper(this)
                    .omitNullValues()
                    .add("aggregating", aggregating)
                    .add("publishing", publishing)
                    .add("fromEntity", fromEntity)
                    .add("computing", computing)
                    .add("fromMembers", fromMembers)
                    .add("fromChildren", fromChildren)
                    .add("excludingBlank", excludingBlank)
                    .add("fromHardcodedProducers", fromHardcodedProducers)
                    .add("entityFilter", entityFilter)
                    .add("valueFilter", valueFilter)
                    .add("defaultValueForUnreportedSensors", defaultValueForUnreportedSensors)
                    .add("valueToReportIfNoSensors", valueToReportIfNoSensors)
                    .toString();
        }
    }

    public abstract static class CombinerBuilder<S, T, B extends CombinerBuilder<S, T, B>> extends Builder<B> {
        protected final List<AttributeSensor<? extends S>> combining;
        protected AttributeSensor<T> publishing;
        protected Entity fromEntity;
        protected Function<? super Collection<S>, ? extends T> computing;
        protected Boolean excludingBlank;
        protected Object valueToReportIfNoSensors;
        protected Predicate<Object> valueFilter;

        // For summing/averaging
        protected Object defaultValueForUnreportedSensors;

        public CombinerBuilder(AttributeSensor<? extends S>... vals) {
            this(ImmutableList.copyOf(vals));
        }
        public CombinerBuilder(Collection<AttributeSensor<? extends S>> vals) {
            checkArgument(checkNotNull(vals).size() > 0, "combining-sensors must be non-empty");
            this.combining = ImmutableList.<AttributeSensor<? extends S>>copyOf(vals);
        }
        @SuppressWarnings({ "unchecked", "rawtypes" })
        public B publishing(AttributeSensor<? extends T> val) {
            this.publishing = (AttributeSensor) checkNotNull(val);
            return self();
        }
        public B from(Entity val) {
            this.fromEntity = checkNotNull(val);
            return self();
        }
        public B computing(Function<? super Collection<S>, ? extends T> val) {
            this.computing = checkNotNull(val);
            return self();
        }
        @SuppressWarnings({ "unchecked", "rawtypes" })
        public B computingSum() {
            Function<Collection<S>, Number> function = new Function<Collection<S>, Number>() {
                @Override public Number apply(Collection<S> input) {
                    return sum((Collection)input, (Number)defaultValueForUnreportedSensors, (Number)valueToReportIfNoSensors, (TypeToken) publishing.getTypeToken());
                }};
            this.computing((Function)function);
            return self();
        }
        @SuppressWarnings({ "unchecked", "rawtypes" })
        public B computingAverage() {
            Function<Collection<S>, Number> function = new Function<Collection<S>, Number>() {
                @Override public Number apply(Collection<S> input) {
                    return average((Collection)input, (Number)defaultValueForUnreportedSensors, (Number)valueToReportIfNoSensors, (TypeToken) publishing.getTypeToken());
                }};
            this.computing((Function)function);
            return self();
        }
        public B defaultValueForUnreportedSensors(Object val) {
            this.defaultValueForUnreportedSensors = val;
            return self();
        }
        public B valueToReportIfNoSensors(Object val) {
            this.valueToReportIfNoSensors = val;
            return self();
        }
        public B excludingBlank() {
            this.excludingBlank = true;
            return self();
        }
        public EnricherSpec<?> build() {
            return EnricherSpec.create(Combiner.class)
                    .configure(MutableMap.builder()
                            .putIfNotNull(Combiner.PRODUCER, fromEntity)
                            .put(Combiner.TARGET_SENSOR, publishing)
                            .put(Combiner.SOURCE_SENSORS, combining)
                            .putIfNotNull(Combiner.TRANSFORMATION, computing)
                            .putIfNotNull(Combiner.VALUE_FILTER, valueFilter)
                            .build());
        }

        @Override
        public String toString() {
            return Objects.toStringHelper(this)
                    .omitNullValues()
                    .add("combining", combining)
                    .add("publishing", publishing)
                    .add("fromEntity", fromEntity)
                    .add("computing", computing)
                    .add("excludingBlank", excludingBlank)
                    .add("valueToReportIfNoSensors", valueToReportIfNoSensors)
                    .add("valueFilter", valueFilter)
                    .toString();
        }
    }

    /** builds an enricher which transforms a given sensor:
     * <li> applying a function ({@link #computing(Function)}, or {@link #computingAverage()}/{@link #computingSum()}, mandatory);
     * <li> and publishing it on the entity where the enricher is attached;
     * <li> optionally taking the sensor from a different source entity ({@link #from(Entity)});
     * <li> and optionally publishing it as a different sensor ({@link #publishing(AttributeSensor)});
     * <p> (You should supply at least one of the optional values, of course, otherwise the enricher may loop endlessly!) */
    public abstract static class TransformerBuilder<S, T, B extends TransformerBuilder<S, T, B>> extends Builder<B> {
        protected final AttributeSensor<S> transforming;
        protected AttributeSensor<T> publishing;
        protected Entity fromEntity;
        protected Function<? super S, ?> computing;
        protected Function<? super SensorEvent<S>, ?> computingFromEvent;

        public TransformerBuilder(AttributeSensor<S> val) {
            this.transforming = checkNotNull(val);
        }
        @SuppressWarnings({ "unchecked", "rawtypes" })
        public B publishing(AttributeSensor<? extends T> val) {
            this.publishing = (AttributeSensor) checkNotNull(val);
            return self();
        }
        public B from(Entity val) {
            this.fromEntity = checkNotNull(val);
            return self();
        }
        public B computing(Function<? super S, ? extends T> val) {
            this.computing = checkNotNull(val);
            return self();
        }
        public B computingFromEvent(Function<? super SensorEvent<S>, ? extends T> val) {
            this.computingFromEvent = checkNotNull(val);
            return self();
        }
        public EnricherSpec<?> build() {
            return EnricherSpec.create(Transformer.class)
                    .configure(MutableMap.builder()
                            .putIfNotNull(Transformer.PRODUCER, fromEntity)
                            .put(Transformer.TARGET_SENSOR, publishing)
                            .put(Transformer.SOURCE_SENSOR, transforming)
                            .putIfNotNull(Transformer.TRANSFORMATION_FROM_VALUE, computing)
                            .putIfNotNull(Transformer.TRANSFORMATION_FROM_EVENT, computingFromEvent)
                            .build());
        }

        @Override
        public String toString() {
            return Objects.toStringHelper(this)
                    .omitNullValues()
                    .add("publishing", publishing)
                    .add("transforming", transforming)
                    .add("fromEntity", fromEntity)
                    .add("computing", computing)
                    .toString();
        }
    }

    public abstract static class PropagatorBuilder<B extends PropagatorBuilder<B>> extends Builder<B> {
        protected final Map<? extends Sensor<?>, ? extends Sensor<?>> propagating;
        protected final Boolean propagatingAll;
        protected final Iterable<? extends Sensor<?>> propagatingAllBut;
        protected Entity fromEntity;

        public PropagatorBuilder(Map<? extends Sensor<?>, ? extends Sensor<?>> vals) {
            checkArgument(checkNotNull(vals).size() > 0, "propagating-sensors must be non-empty");
            this.propagating = vals;
            this.propagatingAll = null;
            this.propagatingAllBut = null;
        }
        public PropagatorBuilder(Iterable<? extends Sensor<?>> vals) {
            this(newIdentityMap(ImmutableSet.copyOf(vals)));
        }
        public PropagatorBuilder(Sensor<?>... vals) {
            this(newIdentityMap(ImmutableSet.copyOf(vals)));
        }
        public PropagatorBuilder(boolean propagatingAll, Iterable<? extends Sensor<?>> butVals) {
            // Ugly constructor! Taking boolean to differentiate it from others; could use a static builder
            // but feels like overkill having a builder for a builder, being called by a builder!
            checkArgument(propagatingAll, "Not propagating all; use PropagatingAll(vals)");
            this.propagating = null;
            this.propagatingAll = true;
            this.propagatingAllBut = (butVals == null || Iterables.isEmpty(butVals)) ? null: butVals;
        }
        public B from(Entity val) {
            this.fromEntity = checkNotNull(val);
            return self();
        }
        public EnricherSpec<? extends Enricher> build() {
            return EnricherSpec.create(Propagator.class)
                    .configure(MutableMap.builder()
                            .putIfNotNull(Propagator.PRODUCER, fromEntity)
                            .putIfNotNull(Propagator.SENSOR_MAPPING, propagating)
                            .putIfNotNull(Propagator.PROPAGATING_ALL, propagatingAll)
                            .putIfNotNull(Propagator.PROPAGATING_ALL_BUT, propagatingAllBut)
                            .build());
        }

        @Override
        public String toString() {
            return Objects.toStringHelper(this)
                    .omitNullValues()
                    .add("fromEntity", fromEntity)
                    .add("propagating", propagating)
                    .add("propagatingAll", propagatingAll)
                    .add("propagatingAllBut", propagatingAllBut)
                    .toString();
        }
    }

    private static class ConcreteInitialBuilder extends InitialBuilder<ConcreteInitialBuilder> {
    }

    private static class ConcreteAggregatorBuilder<S, T> extends AggregatorBuilder<S, T, ConcreteAggregatorBuilder<S, T>> {
        public ConcreteAggregatorBuilder(AttributeSensor<S> aggregating) {
            super(aggregating);
        }
    }

    private static class ConcretePropagatorBuilder extends PropagatorBuilder<ConcretePropagatorBuilder> {
        public ConcretePropagatorBuilder(Map<? extends Sensor<?>, ? extends Sensor<?>> vals) {
            super(vals);
        }
        public ConcretePropagatorBuilder(Iterable<? extends Sensor<?>> vals) {
            super(vals);
        }
        public ConcretePropagatorBuilder(Sensor<?>... vals) {
            super(vals);
        }
        public ConcretePropagatorBuilder(boolean propagatingAll, Iterable<? extends Sensor<?>> butVals) {
            super(propagatingAll, butVals);
        }
    }

    private static class ConcreteCombinerBuilder<S, T> extends CombinerBuilder<S, T, ConcreteCombinerBuilder<S, T>> {
        public ConcreteCombinerBuilder(AttributeSensor<? extends S>... vals) {
            super(vals);
        }
        public ConcreteCombinerBuilder(Collection<AttributeSensor<? extends S>> vals) {
            super(vals);
        }
    }

    private static class ConcreteTransformerBuilder<S, T> extends TransformerBuilder<S, T, ConcreteTransformerBuilder<S, T>> {
        public ConcreteTransformerBuilder(AttributeSensor<S> val) {
            super(val);
        }
    }

    protected static <T extends Number> T average(Collection<T> vals, Number defaultValueForUnreportedSensors, Number valueToReportIfNoSensors, TypeToken<T> type) {
        Double doubleValueToReportIfNoSensors = (valueToReportIfNoSensors == null) ? null : valueToReportIfNoSensors.doubleValue();
        int count = count(vals, defaultValueForUnreportedSensors!=null);
        Double result = (count==0) ? doubleValueToReportIfNoSensors :
            (Double) ((sum(vals, defaultValueForUnreportedSensors, 0, TypeToken.of(Double.class)) / count));

        return cast(result, type);
    }

    @SuppressWarnings("unchecked")
    protected static <N extends Number> N cast(Number n, TypeToken<? extends N> numberType) {
        return (N) TypeCoercions.castPrimitive(n, numberType.getRawType());
    }

    protected static <N extends Number> N sum(Iterable<? extends Number> vals, Number valueIfNull, Number valueIfNone, TypeToken<N> type) {
        double result = 0d;
        int count = 0;
        if (vals!=null) {
            for (Number val : vals) {
                if (val!=null) {
                    result += val.doubleValue();
                    count++;
                } else if (valueIfNull!=null) {
                    result += valueIfNull.doubleValue();
                    count++;
                }
            }
        }
        if (count==0) return cast(valueIfNone, type);
        return cast(result, type);
    }

    protected static int count(Iterable<? extends Object> vals, boolean includeNullValues) {
        int result = 0;
        if (vals != null)
            for (Object val : vals)
                if (val!=null || includeNullValues) result++;
        return result;
    }

    private static <T> Map<T,T> newIdentityMap(Set<T> keys) {
        Map<T,T> result = Maps.newLinkedHashMap();
        for (T key : keys) {
            result.put(key, key);
        }
        return result;
    }
}


text:
define(['src/environment', 'src/player', 'src/score'], function(environment, player, score) {

    return {

        offsetStart: null,
        offsetEnd: null,
        power: 0,
        shotCount: 0,
        clicked: false,
        environment: null,
        player: null,
        panIntervalId: null,
        MAX_SCALE: 30,
        PAN_START_POSITION: {
            x: 55,
            y: 0,
        },
        PAN_END_POSITION: {
            x: -14,
            y: 0,
        },
        PAN_INTERVAL: 1,
        PAN_SPEED: 0.15,
        CAMERA_FOLLOW_PLAYER_INTERVAL: 1,
        cameraFollowPlayerIntervalId:null,
        CAMERA_OFFSET: {
            x: -10,
        },
        $stats: $('#stats'),

        init: function() {

            score.init();

            this.$stats.show();
            this.environment = environment;
            this.environment.init();

            this.player = player;
            this.player.init({
                world: this.environment.world
            });

            this.addListeners();
            this.startPan();
        },

        addListeners: function() {

            $(window).on('mousedown', $.proxy(function(e) {
                this.offsetStart = {
                    x:e.screenX,
                    y:e.screenY
                };
                this.clicked = true;
            }, this));

            $(window).on('mousemove', $.proxy(function(e) {

                if (!this.clicked || !this.player.canMove()) return;

                this.offsetEnd = {
                    x:e.screenX,
                    y:e.screenY,
                };

                this.dragDistance = this.getDragDistance();
                var power = this.player.calculatePowerFromDrag(this.dragDistance);
                this.player.setPower(power);

                var angle = this.player.getAngle(this.offsetEnd, this.offsetStart);
                this.player.setAngle(angle);

                this.updateStats()
            }, this));

            $(window).on('mouseup', $.proxy(function(e) {
                if (!this.player.canMove()) return;
                this.player.fire();
                this.clicked = false;
            }, this));

            $(window).on('player.fired', $.proxy(function() {
                if (this.player.power > 0) {
                    this.shotCount++;
                    this.updateStats()
                    this.makeCameraFollowPlayer();
                }
            }, this));

            $(window).on('characters.destroyed', $.proxy(function() {
                $(window).trigger('game.over', [this.shotCount]);
                this.$stats.hide();
            }, this));
        },

        updateStats: function() {
            this.$stats.find('.angle').html(Math.round(this.player.angle));
            this.$stats.find('.power').html(this.player.power + '/' + this.player.MAX_POWER);
            this.$stats.find('.shot-count').html(this.shotCount);
        },

        startPan: function() {
            this.environment.world.camera(this.PAN_START_POSITION);
            this.panIntervalId = setInterval($.proxy(function() {
                var cameraPosition = this.environment.world.camera();
                cameraPosition.x -= this.PAN_SPEED;
                this.environment.world.camera(cameraPosition);
                if (cameraPosition.x <= this.PAN_END_POSITION.x) {
                    clearInterval(this.panIntervalId);
                    $(window).trigger('world.ready');
                }
            }, this), this.PAN_INTERVAL);
        },

        makeCameraFollowPlayer: function() {
            // Follow make the camera follow the player.
            clearInterval(this.cameraFollowPlayerIntervalId);
            this.cameraFollowPlayerIntervalId = setInterval($.proxy(function() {
                var position = this.player.entity.position();
                position.y = 0;
                position.x += this.CAMERA_OFFSET.x;
                this.environment.world.camera(position);
            }, this), this.CAMERA_FOLLOW_PLAYER_INTERVAL);
        },

        getDragDistance: function() {
            return Math.abs(this.offsetStart.x - this.offsetEnd.x);
        }
    };
});


text:
package org.grobid.core.main.batch;

public class GrobidNERMainArgs extends GrobidMainArgs {
	// english is the default language
	public String lang = "en";

	public String getLang() {
		return lang;
	}

	public void setLang(String lang) {
		this.lang = lang;
	}
}


text:
## Customizable side menu for react-native

### Content
- [Installation](#installation)
- [Usage example](#usage-example)
- [Managing menu state](#managing-menu-state)
- [Component props](#component-props)
- [Special thanks](#special-thanks)
- [Questions?](#questions)

### Installation
```bash
npm install react-native-side-menu
```

### Usage example
```javascript
var SideMenu = require('react-native-side-menu');

var ContentView = React.createClass({
  render: function() {
    return (
      <View style={styles.container}>
        <Text style={styles.welcome}>
          Welcome to React Native!
        </Text>
        <Text style={styles.instructions}>
          To get started, edit index.ios.js
        </Text>
        <Text style={styles.instructions}>
          Press Cmd+R to reload,{'\n'}
          Cmd+Control+Z for dev menu
        </Text>
      </View>
    );
  }
});

var Application = React.createClass({
  render: function() {
    var menu = <Menu navigator={navigator}/>;

    return (
      <SideMenu menu={menu}>
        <ContentView/>
      </SideMenu>
    );
  }
});
```
### Managing menu state
Managing menu state works thru the exposed `menuActions`. To access `menuActions`, you need to use context. (there is an [awesome article](https://www.tildedave.com/2014/11/15/introduction-to-contexts-in-react-js.html) for that).

`menuActions` consists of following method(s):
- `close` (Void) - Close menu
- `toggle` (Void) - Toggle menu (close / open)
- `open` (Void) - Open menu

Usage example:
```javascript
class Button extends Component {
  handlePress(e) {
    this.context.menuActions.toggle();
    if (this.props.onPress) {
      this.props.onPress(e);
    }
  }

  render() {
    return (
      <TouchableOpacity
        onPress={this.handlePress.bind(this)}>
        <Text style={this.props.style}>{this.props.children}</Text>
      </TouchableOpacity>
    );
  }
}

/**
 * This part is very important. Without it you wouldn't be able to access `menuActions`
 * @type {Object}
 */
Button.contextTypes = {
  menuActions: React.PropTypes.object.isRequired
};
```

### Component props
- `menu` (React.Component) - Menu component
- `openMenuOffset` (Number) - Content view left margin if menu is opened, defaults to 2/3 of device screen width.
- `hiddenMenuOffset` (Number) - Content view left margin if menu is hidden
- `edgeHitWidth` (Number) - Edge distance on content view to open side menu
- `toleranceX` (Number) - X axis tolerance
- `toleranceY` (Number) - Y axis tolerance
- `disableGestures` (Bool) - Disable whether the menu can be opened with gestures or not
- `onStartShouldSetResponderCapture` (Function) - Function that accepts event as an argument and specify if side-menu should react on the touch or not. Check https://facebook.github.io/react-native/docs/gesture-responder-system.html for more details.
- `onChange` (Function) - Callback on menu open/close. Is passed `isOpen` as an argument
- `menuPosition` (String) - either 'left' or 'right', defaults to 'left'
- `animationFunction` (Function -> Object) - Function that accept 2 arguments (prop, value) and return an object:
  - `prop` you should use at the place you specify parameter to animate;
  - `value` you should use to specify the final value of `prop`;
- `animationStyle` (Function -> Object) - Function that accept 1 argument (value) and return an object:
  - `value` you should use at the place you need current value of animated parameter (left offset of content view)
- `touchToClose` (Bool) - Allows for touching the partially hidden view to close the menu. Defaults to `false`.
- `defaultOpen` (Bool) - Allows for opening the side menu by default when it's rendered for the first time. Defaults to `false`.

*In progress*

### Special thanks
Creating this component has been inspired by [@khanghoang](https://github.com/khanghoang)'s [RNSideMenu](https://github.com/khanghoang/RNSideMenu) example.

Also, thanks to [@ericvicenti](https://github.com/ericvicenti) for help with figuring out with `setNativeProps`

### Questions?
Feel free to contact me in [twitter](https://twitter.com/kureevalexey) or [create an issue](https://github.com/Kureev/react-native-side-menu/issues/new)


text:
package com.bplow.deep.stock.domain;

import java.util.Date;

import com.bplow.deep.base.jackson.CustomDateSerializer;
import com.bplow.deep.base.pagination.PageInfo;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;

public class SkScheduleTask extends PageInfo{

    /**  */
    private static final long serialVersionUID = 7563047521605682485L;

    private String id;

    private String groupId;

    private String jobId;

    private String triggerName;

    private String cron;

    private String taskParam;

    private Date gmtCreate;

    private Date gmtModify;

    private String status;

    private String userId;

    private String stockId;

    private String jobBean;

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id == null ? null : id.trim();
    }

    public String getGroupId() {
        return groupId;
    }

    public void setGroupId(String groupId) {
        this.groupId = groupId == null ? null : groupId.trim();
    }

    public String getJobId() {
        return jobId;
    }

    public void setJobId(String jobId) {
        this.jobId = jobId == null ? null : jobId.trim();
    }

    public String getTriggerName() {
        return triggerName;
    }

    public void setTriggerName(String triggerName) {
        this.triggerName = triggerName == null ? null : triggerName.trim();
    }

    public String getTaskParam() {
        return taskParam;
    }

    public void setTaskParam(String taskParam) {
        this.taskParam = taskParam == null ? null : taskParam.trim();
    }

    @JsonSerialize(using = CustomDateSerializer.class)
    public Date getGmtCreate() {
        return gmtCreate;
    }

    public void setGmtCreate(Date gmtCreate) {
        this.gmtCreate = gmtCreate;
    }

    @JsonSerialize(using = CustomDateSerializer.class)
    public Date getGmtModify() {
        return gmtModify;
    }

    public void setGmtModify(Date gmtModify) {
        this.gmtModify = gmtModify;
    }

    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status == null ? null : status.trim();
    }

    public String getCron() {
		return cron;
	}

	public void setCron(String cron) {
		this.cron = cron;
	}

	public String getUserId() {
		return userId;
	}

	public void setUserId(String userId) {
		this.userId = userId;
	}

	public String getStockId() {
		return stockId;
	}

	public void setStockId(String stockId) {
		this.stockId = stockId;
	}

	public String getJobBean() {
		return jobBean;
	}

	public void setJobBean(String jobBean) {
		this.jobBean = jobBean;
	}

	/**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table sk_schedule_task
     *
     * @mbggenerated Sat Feb 25 16:50:55 CST 2017
     */
    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        SkScheduleTask other = (SkScheduleTask) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getGroupId() == null ? other.getGroupId() == null : this.getGroupId().equals(other.getGroupId()))
            && (this.getJobId() == null ? other.getJobId() == null : this.getJobId().equals(other.getJobId()))
            && (this.getTriggerName() == null ? other.getTriggerName() == null : this.getTriggerName().equals(other.getTriggerName()))
            && (this.getTaskParam() == null ? other.getTaskParam() == null : this.getTaskParam().equals(other.getTaskParam()))
            && (this.getGmtCreate() == null ? other.getGmtCreate() == null : this.getGmtCreate().equals(other.getGmtCreate()))
            && (this.getGmtModify() == null ? other.getGmtModify() == null : this.getGmtModify().equals(other.getGmtModify()))
            && (this.getStatus() == null ? other.getStatus() == null : this.getStatus().equals(other.getStatus()));
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table sk_schedule_task
     *
     * @mbggenerated Sat Feb 25 16:50:55 CST 2017
     */
    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getGroupId() == null) ? 0 : getGroupId().hashCode());
        result = prime * result + ((getJobId() == null) ? 0 : getJobId().hashCode());
        result = prime * result + ((getTriggerName() == null) ? 0 : getTriggerName().hashCode());
        result = prime * result + ((getTaskParam() == null) ? 0 : getTaskParam().hashCode());
        result = prime * result + ((getGmtCreate() == null) ? 0 : getGmtCreate().hashCode());
        result = prime * result + ((getGmtModify() == null) ? 0 : getGmtModify().hashCode());
        result = prime * result + ((getStatus() == null) ? 0 : getStatus().hashCode());
        return result;
    }
}


text:
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
    android:shape="rectangle">

    <gradient
        android:startColor="@android:color/transparent"
        android:centerColor="@android:color/transparent"
        android:endColor="@android:color/transparent"
        android:angle="270" />
    <corners android:radius="5dp" />
    <stroke android:width="1dp" android:color="@android:color/white" />
</shape>


text:
<?xml version='1.0' encoding='utf-8'?>
<!DOCTYPE hibernate-configuration PUBLIC
    "-//Hibernate/Hibernate Configuration DTD//EN"
    "http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd">
<hibernate-configuration>
  <!-- a SessionFactory instance listed as /jndi/name -->
  <session-factory>

    <!-- properties -->
    <property name="hibernate.connection.driver_class">org.h2.Driver</property>
    <property name="hibernate.dialect">org.hibernate.dialect.H2Dialect</property>
    <property name="hibernate.show_sql">true</property>
    <!--<property name="transaction.factory_class">
        org.hibernate.transaction.JTATransactionFactory
    </property>-->
    <property name="jta.UserTransaction">java:comp/UserTransaction</property>

    <property name="hibernate.hbm2ddl.auto">create</property>

    <!-- Enable Hibernate's automatic session context management -->
    <property name="current_session_context_class">thread</property>

    <!-- Enable the second-level cache  -->
    <property name="hibernate.cache.region.factory_class">org.hibernate.cache.ehcache.EhCacheRegionFactory
    </property>
    <property name="hibernate.cache.region.factory_class">org.hibernate.cache.ehcache.SingletonEhCacheRegionFactory
    </property>
    <property name="hibernate.cache.use_second_level_cache">true</property>

    <property name="c3p0.acquire_increment">1</property>
    <property name="c3p0.idle_test_period">100</property>
    <!-- seconds -->
    <property name="c3p0.max_size">50</property>
    <property name="c3p0.max_statements">0</property>
    <property name="c3p0.min_size">5</property>
    <property name="c3p0.timeout">100</property>
    <!-- seconds -->

    <!-- mapping files -->
    <mapping resource="hibernate/Image.hbm.xml"/>
    <mapping resource="hibernate/ImageHash.hbm.xml"/>

    <!-- cache settings -->
    <!--<class-cache class="org.hibernate.auction.Item" usage="read-write"/>
    <class-cache class="org.hibernate.auction.Bid" usage="read-only"/>
    <collection-cache collection="org.hibernate.auction.Item.bids" usage="read-write"/>-->
  </session-factory>
</hibernate-configuration>


text:
package com.ciandt.techgallery.service.enums;

import com.ciandt.techgallery.Constants;

/**
 * Enum for mapping Date Filters.
 *
 * @author Thulio Ribeiro
 *
 */
public enum FeatureEnum {

  ENDORSE(" indicou ") {

    @Override
    public String createContent(String currentUserMail, String endorsedMail, String technologyName, Boolean score,
        String comment) {
      return "+" + currentUserMail + this.message() + "+" + endorsedMail + " na tecnologia " + technologyName;
    };

  },
  COMMENT(" comentou na tecnologia ") {

    @Override
    public String createContent(String currentUserMail, String endorsedMail, String technologyName, Boolean score,
        String comment) {
      return "+" + currentUserMail + this.message() + technologyName + Constants.NEW_LINE + Constants.NEW_LINE + "\""
          + comment + "\"";
    }

  },
  RECOMMEND(" recomendou ") {

    @Override
    public String createContent(String currentUserMail, String endorsedMail, String technologyName, Boolean score,
        String comment) {
      if (score) {
        return "+" + currentUserMail + this.message() + Constants.POSITIVE_RECOMMENDATION_TEXT
            + technologyName + Constants.NEW_LINE + Constants.NEW_LINE + "\"" + comment + "\"";
      } else {
        return "+" + currentUserMail + this.message() + Constants.NEGATIVE_RECOMMENDATION_TEXT
            + technologyName + Constants.NEW_LINE + Constants.NEW_LINE + "\"" + comment + "\"";
      }
    }
  };

  private String message;

  private FeatureEnum(String message) {
    this.message = message;
  }

  /**
   * Method that create a content for the post on Social network user profile
   *
   * @param feature
   *          the type of feature performed by user.
   * @param currentUserMail
   *          is the email of the user logged in.
   * @param endorsedMail
   *          is the email of the endorsed user in case of endorse feature.
   * @param technologyName
   *          is the name of technology performed by feature.
   * @param score
   *          is the positive or negative recommendation in case of
   *          recommendation feature.
   * @return
   */
  public abstract String createContent(String currentUserMail, String endorsedMail, String technologyName,
      Boolean score, String comment);

  public String message() {
    return message;
  }

}


text:
using OrchardCore.Modules;
using Microsoft.Extensions.DependencyInjection;
using OrchardCore.DisplayManagement.Descriptors;
using OrchardCore.Environment.Navigation;

namespace OrchardCore.Navigation
{
    public class Startup : StartupBase
    {
        public override void ConfigureServices(IServiceCollection services)
        {
            services.AddNavigation();

            services.AddScoped<IShapeTableProvider, NavigationShapes>();
            services.AddScoped<IShapeTableProvider, PagerShapesTableProvider>();
            services.AddShapeAttributes<PagerShapes>();
        }
    }
}


text:
=========================================
pyrate - the Python AIS Tools Environment
=========================================

Pyrate is a software architecture and suite of algorithms for the analysis of
`AIS <http://en.wikipedia.org/wiki/Automatic_Identification_System>`_
data originating from ship-borne transceivers and collected by satellites
and shore-based receivers.
The different tools engage in an efficient and modular way,
hence they are substitutable and extendable in a dynamic fashion.
The primary goal is to validate and clean the dataset,
extract information on shipping patterns and shipping routes.
To make information easily discoverable, the data is stored in a variety of
database types and formats.

Contents
========

.. toctree::
   :maxdepth: 2

   License <license>
   Authors <authors>
   Module Reference <api/modules>

Indices and tables
==================

* :ref:`genindex`
* :ref:`modindex`
* :ref:`search`


text:
'use strict';

let urils = require('../utils');
let getConfig = require('./utils').getConfig;
let getTestRoot = require('./utils').getTestRoot;
let Codecept = require('../codecept');
let container = require('../container');
let getParamsToString = require('../utils').getParamsToString;
let methodsOfObject = require('../utils').methodsOfObject;
let output = require('../output');

module.exports = function (path) {
  let testsPath = getTestRoot(path);
  let config = getConfig(testsPath);
  let codecept = new Codecept(config, {});
  codecept.init(testsPath, function (err) {
    if (err) {
      output.error('Error while running bootstrap file :' + err);
      return;
    }

    output.print('List of test actions: -- ');
    let helpers = container.helpers();
    let suppportI = container.support('I');
    let actions = [];
    for (let name in helpers) {
      let helper = helpers[name];
      methodsOfObject(helper).forEach((action) => {
        let params = getParamsToString(helper[action]);
        actions[action] = 1;
        output.print(` ${output.colors.grey(name)} I.${output.colors.bold(action)}(${params})`);
      });
    }
    for (let name in suppportI) {
      if (actions[name]) {
        continue;
      }
      let actor = suppportI[name];
      let params = getParamsToString(actor);
      output.print(` I.${output.colors.bold(name)}(${params})`);
    }
    output.print('PS: Actions are retrieved from enabled helpers. ');
    output.print('Implement custom actions in your helper classes.');

    codecept.teardown();
  });
};


text:
import {signUp, logOut, login, isAdmin, isLoggedIn} from './authentication';
import Page from '../models/page';

import {
  redirectUser,
  getUsers,
  getOneUser,
  updateUser,
  createUser,
  deleteUser,
  updateManyUsers} from './admin/users';
import {
  redirectPage,
  getPages,
  getOnePage,
  updatePage,
  createPage,
  deletePage,
  updateManyPages} from './admin/pages';
const debug = require('debug')('Routes');

// Abstract of sending data from the server to client,
// whether its the first request or an in-app XHR.
export function sendData({data, req, res, next}) {
  debug('Sending data:');
  const {success, error} = data;
  if (req.xhr) {
    debug('Via XHR');
    if (error || !success) {
      debug('Error sending data:', error);
      res.status(400).json(data);
    } else {
      res.status(200).json(data);
    }

  } else {
    // TODO handle bad requests on the pass-a-long
    debug('Passing data along to server render.');
    req.preRender = data;
    next();
  }
}

export default function(server) {

  // Middleware check for token logins
  server.use((req, res, next) => {
    if (req.query.token && req.query.un) {
      req.body.email = req.query.un;
      req.body.password = req.query.token;
      debug('Attempting token login.');
      req.tokenAttempt = true;
      login(req, res, next);
    } else {
      next();
    }
  });

  // ----------------------------------------------------------------------------
  // Authorization endpoints
  // ----------------------------------------------------------------------------

  server.post('/signup', signUp);
  server.post('/login', login);
  server.post('/logout', logOut);

  // ----------------------------------------------------------------------------
  // Admin Users CRUD (/admin/users)
  // ----------------------------------------------------------------------------

  server.get('/admin/users/', isLoggedIn, isAdmin, redirectUser);
  server.get(
    '/admin/users/page/:perpage/:currentPageNumber',
    isLoggedIn,
    isAdmin,
    getUsers
  );
  server.post('/admin/users/', isLoggedIn, isAdmin, createUser);
  server.put('/admin/users/', isLoggedIn, isAdmin, updateManyUsers);
  server.get('/admin/users/:id', isLoggedIn, isAdmin, getOneUser);
  server.put('/admin/users/:id', isLoggedIn, isAdmin, updateUser);
  server.delete('/admin/users/:id', isLoggedIn, isAdmin, deleteUser);

  // ----------------------------------------------------------------------------
  // Admin Pages CRUD (/admin/pages)
  // ----------------------------------------------------------------------------

  server.get('/admin/pages/', isLoggedIn, isAdmin, redirectPage);
  server.get(
    '/admin/pages/page/:perpage/:currentPageNumber',
    isLoggedIn,
    isAdmin,
    getPages
  );
  server.post('/admin/pages/', isLoggedIn, isAdmin, createPage);
  server.put('/admin/pages/', isLoggedIn, isAdmin, updateManyPages);
  server.get('/admin/pages/:id', isLoggedIn, isAdmin, getOnePage);
  server.put('/admin/pages/:id', isLoggedIn, isAdmin, updatePage);
  server.delete('/admin/pages/:id', isLoggedIn, isAdmin, deletePage);

  // ----------------------------------------------------------------------------
  // Page resolution
  // ----------------------------------------------------------------------------

  server.get('*', (req, res, next) => {
    debug('Looking for', req.path);
    if (req.preRender) {

      next();
    } else {
      if (req.path.split('/')[1] === 'dist') {
        next();
      } else {
        Page.findOne({slug: req.path.substring(1)}, (err, page) => {
          if (err) {
            next();
          }
          if (page) {
            req.preRender = page;
            next();
          } else {
            next();
          }
        });
      }
    }
  });

  // Blacklist undefined http verbs routes
  function fourHundred(req, res) {
    res.status(400).json({
      success: false,
      error: 'Not allowed.'
    });
  }
  server.delete('*', fourHundred);
  server.put('*', fourHundred);
  server.post('*', fourHundred);
}


text:
#ifndef FMT_MOCK_ALLOCATOR_H_
#define FMT_MOCK_ALLOCATOR_H_

#include "gmock/gmock.h"

template <typename T>
class MockAllocator {
 public:
  MockAllocator() {}
  MockAllocator(const MockAllocator &) {}
  typedef T value_type;
  MOCK_METHOD2_T(allocate, T *(std::size_t n, const void *h));
  MOCK_METHOD2_T(deallocate, void (T *p, std::size_t n));
};

template <typename Allocator>
class AllocatorRef {
 private:
  Allocator *alloc_;

 public:
  typedef typename Allocator::value_type value_type;

  explicit AllocatorRef(Allocator *alloc = 0) : alloc_(alloc) {}

  AllocatorRef(const AllocatorRef &other) : alloc_(other.alloc_) {}

  AllocatorRef& operator=(const AllocatorRef &other) {
    alloc_ = other.alloc_;
    return *this;
  }

#if FMT_USE_RVALUE_REFERENCES
 private:
  void move(AllocatorRef &other) {
    alloc_ = other.alloc_;
    other.alloc_ = 0;
  }

 public:
  AllocatorRef(AllocatorRef &&other) {
    move(other);
  }

  AllocatorRef& operator=(AllocatorRef &&other) {
    assert(this != &other);
    move(other);
    return *this;
  }
#endif

  Allocator *get() const { return alloc_; }

  value_type *allocate(std::size_t n,  const void *h) {
#if FMT_USE_ALLOCATOR_TRAITS
    return std::allocator_traits<Allocator>::allocate(*alloc_, n, h);
#else
    return alloc_->allocate(n, h);
#endif
  }
  void deallocate(value_type *p, std::size_t n) { alloc_->deallocate(p, n); }
};

#endif  // FMT_MOCK_ALLOCATOR_H_


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

<TITLE>
net.sf.smc.parser (SMC v. 6_1_0 API Specification)
</TITLE>

<META NAME="date" CONTENT="2011-11-20">

<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../stylesheet.css" TITLE="Style">

net.sf.smc.parser

Classes

SmcMessage

SmcParser

Enums

SmcParser.TargetLanguage


text:
package vterrors

/* This file is copied from https://github.com/pkg/errors/blob/v0.8.0/stack.go */

import (
	"fmt"
	"io"
	"path"
	"runtime"
	"strings"
)

// Frame represents a program counter inside a stack frame.
type Frame uintptr

// pc returns the program counter for this frame;
// multiple frames may have the same PC value.
func (f Frame) pc() uintptr { return uintptr(f) - 1 }

// file returns the full path to the file that contains the
// function for this Frame's pc.
func (f Frame) file() string {
	fn := runtime.FuncForPC(f.pc())
	if fn == nil {
		return "unknown"
	}
	file, _ := fn.FileLine(f.pc())
	return file
}

// line returns the line number of source code of the
// function for this Frame's pc.
func (f Frame) line() int {
	fn := runtime.FuncForPC(f.pc())
	if fn == nil {
		return 0
	}
	_, line := fn.FileLine(f.pc())
	return line
}

// Format formats the frame according to the fmt.Formatter interface.
//
//    %s    source file
//    %d    source line
//    %n    function name
//    %v    equivalent to %s:%d
//
// Format accepts flags that alter the printing of some verbs, as follows:
//
//    %+s   path of source file relative to the compile time GOPATH
//    %+v   equivalent to %+s:%d
func (f Frame) Format(s fmt.State, verb rune) {
	switch verb {
	case 's':
		switch {
		case s.Flag('+'):
			pc := f.pc()
			fn := runtime.FuncForPC(pc)
			if fn == nil {
				io.WriteString(s, "unknown")
			} else {
				file, _ := fn.FileLine(pc)
				fmt.Fprintf(s, "%s\n\t%s", fn.Name(), file)
			}
		default:
			io.WriteString(s, path.Base(f.file()))
		}
	case 'd':
		fmt.Fprintf(s, "%d", f.line())
	case 'n':
		name := runtime.FuncForPC(f.pc()).Name()
		io.WriteString(s, funcname(name))
	case 'v':
		f.Format(s, 's')
		io.WriteString(s, ":")
		f.Format(s, 'd')
	}
}

// StackTrace is stack of Frames from innermost (newest) to outermost (oldest).
type StackTrace []Frame

// Format format the stacktrace according to the fmt.Formatter interface.
//
//    %s    source file
//    %d    source line
//    %n    function name
//    %v    equivalent to %s:%d
//
// Format accepts flags that alter the printing of some verbs, as follows:
//
//    %+s   path of source file relative to the compile time GOPATH
//    %+v   equivalent to %+s:%d
func (st StackTrace) Format(s fmt.State, verb rune) {
	switch verb {
	case 'v':

		if s.Flag('#') {
			fmt.Fprintf(s, "%#v", []Frame(st))
		} else {
			for _, f := range st {
				fmt.Fprintf(s, "\n%v", f)
			}
		}

	case 's':
		fmt.Fprintf(s, "%s", []Frame(st))
	}
}

// stack represents a stack of program counters.
type stack []uintptr

func (s *stack) Format(st fmt.State, verb rune) {
	switch verb {
	case 'v':
		for _, pc := range *s {
			f := Frame(pc)
			fmt.Fprintf(st, "\n%+v", f)
		}
	}
}

func (s *stack) StackTrace() StackTrace {
	f := make([]Frame, len(*s))
	for i := 0; i < len(f); i++ {
		f[i] = Frame((*s)[i])
	}
	return f
}

func callers() *stack {
	const depth = 32
	var pcs [depth]uintptr
	n := runtime.Callers(3, pcs[:])
	var st stack = pcs[0:n]
	return &st
}

// funcname removes the path prefix component of a function's name reported by func.Name().
func funcname(name string) string {
	i := strings.LastIndex(name, "/")
	name = name[i+1:]
	i = strings.Index(name, ".")
	return name[i+1:]
}


text:
public class Topping_Generated_JsonEncoderDecoder_ {
    public final Topping_Generated_JsonEncoderDecoder_ INSTANCE = new Topping_Generated_JsonEncoderDecoder_();

    public com.google.gwt.json.client.JSONValue encode(org.fusesource.restygwt.examples.client.Topping value) {
        if (value == null) {
            return null;
        }
        com.google.gwt.json.client.JSONObject rc = new com.google.gwt.json.client.JSONObject();
        org.fusesource.restygwt.examples.client.Topping parseValue = (org.fusesource.restygwt.examples.client.Topping) value;
        {
            com.google.gwt.json.client.JSONValue v = org.fusesource.restygwt.client.AbstractJsonEncoderDecoder.STRING.encode(parseValue.name);
            if (v != null) {
                rc.put("name", v);
            }
        }
        {
            com.google.gwt.json.client.JSONValue v = org.fusesource.restygwt.client.AbstractJsonEncoderDecoder.DOUBLE.encode(parseValue.price);
            if (v != null) {
                rc.put("price", v);
            }
        }
        return rc;
    }

    public Topping decode(com.google.gwt.json.client.JSONValue value) {
        if (value == null || value.isNull() != null) {
            return null;
        }
        com.google.gwt.json.client.JSONObject object = toObject(value);
        org.fusesource.restygwt.examples.client.Topping rc = new org.fusesource.restygwt.examples.client.Topping();
        if (object.get("name") != null) {
            if (object.get("name") instanceof com.google.gwt.json.client.JSONNull) {
                rc.name = null;
            } else {
                rc.name = org.fusesource.restygwt.client.AbstractJsonEncoderDecoder.STRING.decode(object.get("name"));
            }
        }
        if (object.get("price") != null) {
            if (object.get("price") instanceof com.google.gwt.json.client.JSONNull) {
                rc.price = null;
            } else {
                rc.price = org.fusesource.restygwt.client.AbstractJsonEncoderDecoder.DOUBLE.decode(object.get("price"));
            }
        }
        return rc;
    }

    return org.fusesource.restygwt.client.AbstractJsonEncoderDecoder.toList(com.google.gwt.json.client.JSONParser.parse(__method.getResponse().

    getText()

    ),org.fusesource.restygwt.examples.client.Topping_Generated_JsonEncoderDecoder_.INSTANCE);
}catch(Throwable __e){
        throw new org.fusesource.restygwt.client.ResponseFormatException("Response was NOT a valid JSON document",__e);
        }
        }
        });
        }catch(com.google.gwt.http.client.RequestException __e){
        callback.onFailure(__method,__e);
        }
        }
public void order(org.fusesource.restygwt.examples.client.PizzaOrder request,org.fusesource.restygwt.client.MethodCallback<org.fusesource.restygwt.examples.client.OrderConfirmation>callback){
final org.fusesource.restygwt.examples.client.PizzaOrder final_request=request;
final org.fusesource.restygwt.client.Method __method=
        getResource()
        .post();
        __method.setDispatcher(this.dispatcher);
        __method.header(org.fusesource.restygwt.client.Resource.HEADER_ACCEPT,org.fusesource.restygwt.client.Resource.CONTENT_TYPE_JSON);

        }


text:
using Tridion.ContentManager;

namespace Sdl.Tridion.Community.Regions
{
    public class RegionConstraints
    {
        public TcmUri SchemaId;
        public TcmUri ComponentTemplateId;
    }
}


text:
#include "builtin.h"
#include "cache.h"
#include "commit.h"
#include "refs.h"
#include "diff.h"
#include "revision.h"
#include "parse-options.h"

static int show_merge_base(struct commit **rev, int rev_nr, int show_all)
{
	struct commit_list *result;

	result = get_merge_bases_many_dirty(rev[0], rev_nr - 1, rev + 1);

	if (!result)
		return 1;

	while (result) {
		printf("%s\n", oid_to_hex(&result->item->object.oid));
		if (!show_all)
			return 0;
		result = result->next;
	}

	return 0;
}

static const char * const merge_base_usage[] = {
	N_("git merge-base [-a | --all] <commit> <commit>..."),
	N_("git merge-base [-a | --all] --octopus <commit>..."),
	N_("git merge-base --independent <commit>..."),
	N_("git merge-base --is-ancestor <commit> <commit>"),
	N_("git merge-base --fork-point <ref> [<commit>]"),
	NULL
};

static struct commit *get_commit_reference(const char *arg)
{
	unsigned char revkey[20];
	struct commit *r;

	if (get_sha1(arg, revkey))
		die("Not a valid object name %s", arg);
	r = lookup_commit_reference(revkey);
	if (!r)
		die("Not a valid commit name %s", arg);

	return r;
}

static int handle_independent(int count, const char **args)
{
	struct commit_list *revs = NULL;
	struct commit_list *result;
	int i;

	for (i = count - 1; i >= 0; i--)
		commit_list_insert(get_commit_reference(args[i]), &revs);

	result = reduce_heads(revs);
	if (!result)
		return 1;

	while (result) {
		printf("%s\n", oid_to_hex(&result->item->object.oid));
		result = result->next;
	}
	return 0;
}

static int handle_octopus(int count, const char **args, int show_all)
{
	struct commit_list *revs = NULL;
	struct commit_list *result;
	int i;

	for (i = count - 1; i >= 0; i--)
		commit_list_insert(get_commit_reference(args[i]), &revs);

	result = reduce_heads(get_octopus_merge_bases(revs));

	if (!result)
		return 1;

	while (result) {
		printf("%s\n", oid_to_hex(&result->item->object.oid));
		if (!show_all)
			return 0;
		result = result->next;
	}

	return 0;
}

static int handle_is_ancestor(int argc, const char **argv)
{
	struct commit *one, *two;

	if (argc != 2)
		die("--is-ancestor takes exactly two commits");
	one = get_commit_reference(argv[0]);
	two = get_commit_reference(argv[1]);
	if (in_merge_bases(one, two))
		return 0;
	else
		return 1;
}

struct rev_collect {
	struct commit **commit;
	int nr;
	int alloc;
	unsigned int initial : 1;
};

static void add_one_commit(unsigned char *sha1, struct rev_collect *revs)
{
	struct commit *commit;

	if (is_null_sha1(sha1))
		return;

	commit = lookup_commit(sha1);
	if (!commit ||
	    (commit->object.flags & TMP_MARK) ||
	    parse_commit(commit))
		return;

	ALLOC_GROW(revs->commit, revs->nr + 1, revs->alloc);
	revs->commit[revs->nr++] = commit;
	commit->object.flags |= TMP_MARK;
}

static int collect_one_reflog_ent(unsigned char *osha1, unsigned char *nsha1,
				  const char *ident, unsigned long timestamp,
				  int tz, const char *message, void *cbdata)
{
	struct rev_collect *revs = cbdata;

	if (revs->initial) {
		revs->initial = 0;
		add_one_commit(osha1, revs);
	}
	add_one_commit(nsha1, revs);
	return 0;
}

static int handle_fork_point(int argc, const char **argv)
{
	unsigned char sha1[20];
	char *refname;
	const char *commitname;
	struct rev_collect revs;
	struct commit *derived;
	struct commit_list *bases;
	int i, ret = 0;

	switch (dwim_ref(argv[0], strlen(argv[0]), sha1, &refname)) {
	case 0:
		die("No such ref: '%s'", argv[0]);
	case 1:
		break; /* good */
	default:
		die("Ambiguous refname: '%s'", argv[0]);
	}

	commitname = (argc == 2) ? argv[1] : "HEAD";
	if (get_sha1(commitname, sha1))
		die("Not a valid object name: '%s'", commitname);

	derived = lookup_commit_reference(sha1);
	memset(&revs, 0, sizeof(revs));
	revs.initial = 1;
	for_each_reflog_ent(refname, collect_one_reflog_ent, &revs);

	for (i = 0; i < revs.nr; i++)
		revs.commit[i]->object.flags &= ~TMP_MARK;

	bases = get_merge_bases_many_dirty(derived, revs.nr, revs.commit);

	/*
	 * There should be one and only one merge base, when we found
	 * a common ancestor among reflog entries.
	 */
	if (!bases || bases->next) {
		ret = 1;
		goto cleanup_return;
	}

	/* And the found one must be one of the reflog entries */
	for (i = 0; i < revs.nr; i++)
		if (&bases->item->object == &revs.commit[i]->object)
			break; /* found */
	if (revs.nr <= i) {
		ret = 1; /* not found */
		goto cleanup_return;
	}

	printf("%s\n", oid_to_hex(&bases->item->object.oid));

cleanup_return:
	free_commit_list(bases);
	return ret;
}

int cmd_merge_base(int argc, const char **argv, const char *prefix)
{
	struct commit **rev;
	int rev_nr = 0;
	int show_all = 0;
	int cmdmode = 0;

	struct option options[] = {
		OPT_BOOL('a', "all", &show_all, N_("output all common ancestors")),
		OPT_CMDMODE(0, "octopus", &cmdmode,
			    N_("find ancestors for a single n-way merge"), 'o'),
		OPT_CMDMODE(0, "independent", &cmdmode,
			    N_("list revs not reachable from others"), 'r'),
		OPT_CMDMODE(0, "is-ancestor", &cmdmode,
			    N_("is the first one ancestor of the other?"), 'a'),
		OPT_CMDMODE(0, "fork-point", &cmdmode,
			    N_("find where <commit> forked from reflog of <ref>"), 'f'),
		OPT_END()
	};

	git_config(git_default_config, NULL);
	argc = parse_options(argc, argv, prefix, options, merge_base_usage, 0);

	if (cmdmode == 'a') {
		if (argc < 2)
			usage_with_options(merge_base_usage, options);
		if (show_all)
			die("--is-ancestor cannot be used with --all");
		return handle_is_ancestor(argc, argv);
	}

	if (cmdmode == 'r' && show_all)
		die("--independent cannot be used with --all");

	if (cmdmode == 'o')
		return handle_octopus(argc, argv, show_all);

	if (cmdmode == 'r')
		return handle_independent(argc, argv);

	if (cmdmode == 'f') {
		if (argc < 1 || 2 < argc)
			usage_with_options(merge_base_usage, options);
		return handle_fork_point(argc, argv);
	}

	if (argc < 2)
		usage_with_options(merge_base_usage, options);

	rev = xmalloc(argc * sizeof(*rev));
	while (argc-- > 0)
		rev[rev_nr++] = get_commit_reference(*argv++);
	return show_merge_base(rev, rev_nr, show_all);
}


text: assert(!(delete Number.MAX_VALUE));


text:
//
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4
// See http://java.sun.com/xml/jaxb
// Any modifications to this file will be lost upon recompilation of the source schema.
// Generated on: 2014.11.22 at 01:45:09 PM EST
//

package eu.datex2.schema._2_0rc1._2_0;

import javax.xml.bind.annotation.XmlEnum;
import javax.xml.bind.annotation.XmlEnumValue;
import javax.xml.bind.annotation.XmlType;

/**
 *
Java class for CarParkStatusEnum.
 *
 *
The following schema fragment specifies the expected content contained within this class.
 *

 *

 * <simpleType name="CarParkStatusEnum">
 *   <restriction base="{http://www.w3.org/2001/XMLSchema}string">
 *     <enumeration value="carParkClosed"/>
 *     <enumeration value="allCarParksFull"/>
 *     <enumeration value="carParkFacilityFaulty"/>
 *     <enumeration value="carParkFull"/>
 *     <enumeration value="carParkStatusUnknown"/>
 *     <enumeration value="enoughSpacesAvailable"/>
 *     <enumeration value="multiStoryCarParksFull"/>
 *     <enumeration value="noMoreParkingSpacesAvailable"/>
 *     <enumeration value="noParkAndRideInformation"/>
 *     <enumeration value="noParkingAllowed"/>
 *     <enumeration value="noParkingInformationAvailable"/>
 *     <enumeration value="normalParkingRestrictionsLifted"/>
 *     <enumeration value="onlyAFewSpacesAvailable"/>
 *     <enumeration value="parkAndRideServiceNotOperating"/>
 *     <enumeration value="parkAndRideServiceOperating"/>
 *     <enumeration value="specialParkingRestrictionsInForce"/>
 *   </restriction>
 * </simpleType>
 *

 *
 */
@XmlType(name = "CarParkStatusEnum")
@XmlEnum
public enum CarParkStatusEnum {

    @XmlEnumValue("carParkClosed")
    CAR_PARK_CLOSED("carParkClosed"),
    @XmlEnumValue("allCarParksFull")
    ALL_CAR_PARKS_FULL("allCarParksFull"),
    @XmlEnumValue("carParkFacilityFaulty")
    CAR_PARK_FACILITY_FAULTY("carParkFacilityFaulty"),
    @XmlEnumValue("carParkFull")
    CAR_PARK_FULL("carParkFull"),
    @XmlEnumValue("carParkStatusUnknown")
    CAR_PARK_STATUS_UNKNOWN("carParkStatusUnknown"),
    @XmlEnumValue("enoughSpacesAvailable")
    ENOUGH_SPACES_AVAILABLE("enoughSpacesAvailable"),
    @XmlEnumValue("multiStoryCarParksFull")
    MULTI_STORY_CAR_PARKS_FULL("multiStoryCarParksFull"),
    @XmlEnumValue("noMoreParkingSpacesAvailable")
    NO_MORE_PARKING_SPACES_AVAILABLE("noMoreParkingSpacesAvailable"),
    @XmlEnumValue("noParkAndRideInformation")
    NO_PARK_AND_RIDE_INFORMATION("noParkAndRideInformation"),
    @XmlEnumValue("noParkingAllowed")
    NO_PARKING_ALLOWED("noParkingAllowed"),
    @XmlEnumValue("noParkingInformationAvailable")
    NO_PARKING_INFORMATION_AVAILABLE("noParkingInformationAvailable"),
    @XmlEnumValue("normalParkingRestrictionsLifted")
    NORMAL_PARKING_RESTRICTIONS_LIFTED("normalParkingRestrictionsLifted"),
    @XmlEnumValue("onlyAFewSpacesAvailable")
    ONLY_A_FEW_SPACES_AVAILABLE("onlyAFewSpacesAvailable"),
    @XmlEnumValue("parkAndRideServiceNotOperating")
    PARK_AND_RIDE_SERVICE_NOT_OPERATING("parkAndRideServiceNotOperating"),
    @XmlEnumValue("parkAndRideServiceOperating")
    PARK_AND_RIDE_SERVICE_OPERATING("parkAndRideServiceOperating"),
    @XmlEnumValue("specialParkingRestrictionsInForce")
    SPECIAL_PARKING_RESTRICTIONS_IN_FORCE("specialParkingRestrictionsInForce");
    private final String value;

    CarParkStatusEnum(String v) {
        value = v;
    }

    public String value() {
        return value;
    }

    public static CarParkStatusEnum fromValue(String v) {
        for (CarParkStatusEnum c: CarParkStatusEnum.values()) {
            if (c.value.equals(v)) {
                return c;
            }
        }
        throw new IllegalArgumentException(v);
    }

}


text:
layout: page
title: Resume
permalink: /resume/
---

## Expérience professionelle
__Depuis Sept 2016 : Ingénieur en développement logiciel au sein de Thales Services__

* Depuis novembre  2017  :  Mission  en  clientèle  chez  EDF
  * Développement de fonctionnalités pour l'estimation des coûts de production d'électricité en fonction des hypothèses sur l'utilisation du parc et sa disponibilité.
    * Tech  :  Java,  TM1  Cognos,  Jboss,  SVN,  VueJS.

* De mai  2017  à novembre  2017  :  Développement au forfait pour Commutitres
  * Commutitres : SNCF – RATP – OPTILE (contexte du projet Grand Paris)
    Développement du nouvel outil de gestion des titres de transport (par exemple : Pass Navigo) en vue de l'évolution du transport en Ile de France
    * Tech  :  Scrum (agile), Java,  Docker,  RabbitMQ,  Postgres,  GIT

* De mars  2017  à  mai  2017  :  Modernisation  et  dockerisation  de SmartDisplay
  * SmartDisplay est un logiciel facilitant la création d'objets d'information, un objet étant soit du texte, soit une vidéo, soit un flux audio ou une combinaison de ces trois éléments. SmartDisplay est utilisé sur divers projets clients (Gare routière de l'aéroport de Marseille par exemple). Modernisation : mise à niveau des COTS. Dockerisation pour faciliter le déploiement.
    * Tech  :  Angular  (V4),  WebComponent  (Polymer),  TypeScript,  SpringBoot, Kafka,  Java,  Docker,  Postgres,  GIT

* Au cours de l'année 2017 : à titre personnel, après une étape de sélection, formation Android par des enseignants Google (Google Developer Challenge Scholarship) sur la plateforme Udacity

* De septembre  2016  à  mars  2017:  Développement au forfait pour Asendia
  * Asendia : Joint Venture entre Swiss Post et La Poste.
  Développement de fonctions de suivi de  colis  et  de  reporting en prenant en compte la multiplicité des transporteurs / vendeurs (Amazon,  Alibaba  ...)
    * Tech  :  Scrum (agile), Java,  Pentaho  ETL,  Angular  (2+),  GIT

__Septembre 2013 - Août 2016 :  Formation en apprentissage chez Thales Services (école d'ingénieur : ESIGELEC Rouen)__

* Pendant l'année scolaire 2015-2016 : Développement au forfait pour la RATP
  * Projet IMAGE : Développement de fonctionnalités de diffusion des informations traffics et des incidents sur les afficheurs présents dans les différentes gares de métro.
    * Tech  :  Java  JEE,  HTML,  CSS,  JavaScript,  Apache,  Tomcat,  Jenkins,  Sonar, SVN,  Linux  CentOS

* De mai 2015 à septembre 2015 : stage chez Thales Alenia Space en Belgique
  * Automatisation des tests, exécutés sur banc, de cartes électroniques (embarquées à terme sur un satellite) et interprétation automatique des résultats obtenus.
    * Tech  :  XML,  C++,  Python

* Pendant les années scolaires 2013 à 2015 :
  * Développement d'un outil de marketing interne : représentation sous forme 3D des différents projets de Thales Services.
    * Tech  :  JavaScript,  NoSQL,  HTML,  CSS,  Apache,  SVN,  Linux  CentOS

## Formation
__2011 - 2016 : Ecole d'ingénieur ESIGELEC Rouen__

* Dominante  :  Génie  des  Systèmes  d'informations
* TOEIC  :  815

* Projets  Informatiques Ecole :
  * Jeu  d'échec  écrit  en  C  utilisant  la  librairie  GTK
  * Jeu  PONG  écrit  en  C#  utilisant  la  technologie  Bluetooth  (2  écrans  différents)
  * Jeu  SpaceInvader  écrit  en  C++  avec  un  bracelet  MYO  pour  le  déplacement et  la  destruction  des  ennemis
  * Association « Elles Bougent » : développement bénévole d'une application Android permettant l'accompagnement de lycéennes lors d'une course d'orientation.

__2011 : Bac scientifique spécialité mathématiques : Lycée Mansart (St Cyr l'école)__

* Finale académique Quintesciences Expérimentales avec le sujet : "Les nanotechnologies et la médecine".


text:
<?php

    $serveur="localhost";
    $login="root";
    $pass="facesimplon2016";
    $database = "hackathon";

    // tableau qui contient le nombre max de place dispo par metier
    $tabmax= array(
        'Developpeur.euse' => 32,
        'Designer.euse'=> 6,
        'Chef.fe de projet'=> 6,
        'Marketing / Communication'=>6
    );
?>


text:
<?php namespace Experience\Validation\Validators;

use Experience\Validation\Exceptions\ValidationException;
use Experience\Validation\Interfaces\ValidatorInterface;
use Experience\Validation\Interfaces\ValidationProviderFactoryInterface as Factory;

abstract class Validator implements ValidatorInterface
{
    protected $createRules = [];
    protected $updateRules = [];
    protected $createMessages = [];
    protected $updateMessages = [];

    protected $factory;
    protected $validator;

    public function __construct(Factory $factory)
    {
        $this->factory = $factory;
    }

    public function validateForCreate(Array $data)
    {
        return $this->validate(
            $data, $this->getCreateRules(), $this->getCreateMessages());
    }

    public function validateForUpdate(Array $data, $key = null)
    {
        return $this->validate(
            $data, $this->getUpdateRules($key), $this->getUpdateMessages());
    }

    protected function validate(Array $data, Array $rules, Array $messages)
    {
        $validator = $this->factory->make($data, $rules, $messages);

        if ($validator->fails()) {
            throw new ValidationException(
                'Validation failed', $validator->errors());
        } else {
            return true;
        }
    }

    public function getCreateRules()
    {
        return $this->createRules;
    }

    public function getCreateMessages()
    {
        return $this->createMessages;
    }

    public function getUpdateRules($key)
    {
        return $this->parseRules($this->updateRules, $key);
    }

    protected function parseRules($rules, $key)
    {
        array_walk($rules, function (&$fieldRules, $field) use ($key) {
            $fieldRules = str_replace('{key}', $key, $fieldRules);
        });

        return $rules;
    }

    public function getUpdateMessages()
    {
        return $this->updateMessages;
    }
}


text:
> Nous utiliserons [ES2015](https://github.com/lukehoban/es6features) dans les exemples de code dans ce guide.

Créer une application monopage avec Vue.js + vue-router est vraiment simple. Avec Vue.js, nous concevons déjà notre application avec des composants. En ajoutant vue-router dans notre application, tout ce qu'il nous reste à faire est de relier nos composants aux routes, et de laisser vue-router faire le rendu. Voici un exemple de base :

> Tous les exemples utiliseront la version complète de Vue pour rendre l'analyse de template possible. Plus de détails [ici](https://fr.vuejs.org/guide/installation.html#Runtime-Compiler-vs-Runtime-seul).

### HTML

``` html
<script src="https://unpkg.com/vue/dist/vue.js"></script>
<script src="https://unpkg.com/vue-router/dist/vue-router.js"></script>

<div id="app">
  <h1>Bonjour l'application !</h1>
  <p>
    <!-- utilisez le composant router-link pour la navigation. -->
    <!-- spécifiez le lien en le passant à la prop `to` -->
    <!-- `<router-link>` sera rendu en tag `<a>` par défaut -->
    <router-link to="/foo">Aller à Foo</router-link>
    <router-link to="/bar">Aller à Bar</router-link>
  </p>
  <!-- balise pour le composant router-view -->
  <!-- le composant correspondant à la route sera rendu ici -->
  <router-view></router-view>
</div>
```

### JavaScript

``` js
// 0. Si vous utilisez un système de module (ex : via vue-cli), il faut importer Vue et VueRouter et ensuite appeler `Vue.use(VueRouter)`.

// 1. Définissez les composants de route.
// Ces derniers peuvent être importés depuis d'autre fichier
const Foo = { template: '<div>foo</div>' }
const Bar = { template: '<div>bar</div>' }

// 2. Définissez des routes.
// Chaque route doit correspondre à un composant. Le « composant » peut
// soit être un véritable composant créé via `Vue.extend()`, ou juste un
// objet d'options.
// Nous parlerons plus tard des routes imbriquées.
const routes = [
  { path: '/foo', component: Foo },
  { path: '/bar', component: Bar }
]

// 3. Créez l'instance du routeur et passez l'option `routes`.
// Vous pouvez également passer des options supplémentaires,
// mais nous allons faire simple pour l'instant.
const router = new VueRouter({
  routes // raccourci pour `routes: routes`
})

// 5. Créez et montez l'instance de Vue.
// Soyez sûr d'injecter le routeur avec l'option `router` pour
// permettre à l'application tout entière d'être à l'écoute du routeur.
const app = new Vue({
  router
}).$mount('#app')

// L'application est maintenant en marche !
```

Vous pouvez aussi regarder cet [exemple](http://jsfiddle.net/yyx990803/xgrjzsup/).

Notez qu'un `<router-link>` obtiendra automatiquement la classe `.router-link-active` lorsque sa route cible correspond à la route actuelle. Vous pouvez en apprendre plus à propos de cela dans sa [documentation d'API](../api/router-link.md).


text:
var _curry = require('./internal/_curry');
var _curryN = require('./internal/_curryN');
var _always = require('./internal/_always');
var Ordering = require('./Ordering');

Unit = require('./internal/_primitives').Unit;

Unit.eq = _curryN(2, _always(true));

Unit.compare = _curryN(2, _always(Ordering.EQ));

Unit.empty = _always(null);
Unit.concat = _curryN(2, _always(null));
Unit.map = _curryN(2, _always(null));

Unit.show = _curry(function(unit){
    return String(unit);
});

module.exports = Unit;


text:
package org.deeplearning4j.nn.conf.graph;

import lombok.val;
import org.deeplearning4j.nn.conf.inputs.InputType;
import org.deeplearning4j.nn.conf.inputs.InvalidInputTypeException;
import org.deeplearning4j.nn.conf.memory.LayerMemoryReport;
import org.deeplearning4j.nn.conf.memory.MemoryReport;
import org.deeplearning4j.nn.graph.ComputationGraph;
import org.nd4j.linalg.api.buffer.DataType;
import org.nd4j.linalg.api.ndarray.INDArray;

public class L2Vertex extends GraphVertex {
    protected double eps;

    /**
     * Constructor with default epsilon value of 1e-8
     */
    public L2Vertex() {
        this.eps = 1e-8;
    }

    /**
     * @param eps Epsilon value to add to inputs (to avoid all zeros input and hence undefined gradients)
     */
    public L2Vertex(double eps) {
        this.eps = eps;
    }

    @Override
    public L2Vertex clone() {
        return new L2Vertex();
    }

    @Override
    public boolean equals(Object o) {
        return o instanceof L2Vertex;
    }

    @Override
    public long numParams(boolean backprop) {
        return 0;
    }

    @Override
    public int minVertexInputs() {
        return 2;
    }

    @Override
    public int maxVertexInputs() {
        return 2;
    }

    @Override
    public int hashCode() {
        return 433682566;
    }

    @Override
    public org.deeplearning4j.nn.graph.vertex.GraphVertex instantiate(ComputationGraph graph, String name, int idx,
                                                                      INDArray paramsView, boolean initializeParams, DataType networkDatatype) {
        return new org.deeplearning4j.nn.graph.vertex.impl.L2Vertex(graph, name, idx, null, null, eps, networkDatatype);
    }

    @Override
    public InputType getOutputType(int layerIndex, InputType... vertexInputs) throws InvalidInputTypeException {
        return InputType.feedForward(1);
    }

    @Override
    public MemoryReport getMemoryReport(InputType... inputTypes) {
        InputType outputType = getOutputType(-1, inputTypes);

        //Inference: only calculation is for output activations; no working memory
        //Working memory for training:
        //1 for each example (fwd pass) + output size (1 per ex) + input size + output size... in addition to the returned eps arrays
        //output size == input size here
        val trainWorkingSizePerEx = 3 + 2 * inputTypes[0].arrayElementsPerExample();

        return new LayerMemoryReport.Builder(null, L2Vertex.class, inputTypes[0], outputType).standardMemory(0, 0) //No params
                        .workingMemory(0, 0, 0, trainWorkingSizePerEx).cacheMemory(0, 0) //No caching
                        .build();
    }
}


text:
require "erb"

# build data class
class Listings
  PRODUCT = { :name => "Chicken Fried Steak",
              :desc => "A well messages pattie, breaded and fried.",
              :cost => 9.95 }

  attr_reader :product, :price

  def initialize( product = "", price = "" )
    @product = product
    @price = price
  end

  def build
    b = binding
    # create and run templates, filling member data variables
    ERB.new("      <%= PRODUCT[:name] %>
      <%= PRODUCT[:desc] %>
".gsub(/^\s+/, ""), 0, "", "@product").result b
    ERB.new("      <%= PRODUCT[:name] %> -- <%= PRODUCT[:cost] %>
      <%= PRODUCT[:desc] %>
".gsub(/^\s+/, ""), 0, "", "@price").result b
  end
end

# setup template data
listings = Listings.new
listings.build

puts listings.product + "\n" + listings.price


text:
package network.bitmesh.Units;

import org.bitcoinj.core.Coin;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import java.util.LinkedList;

public class TimeUnit extends PurchaseUnit
{
    private static final Logger log = LoggerFactory.getLogger(DataUnit.class);

    @Override
    public void newInstance()
    {
        measurementUnits = new LinkedList<Unit>();
        measurementUnits.add(new Unit("SECONDS",1L));
        measurementUnits.add(new Unit("MINUTES",60L));
        measurementUnits.add(new Unit("HOURS",3600L));
        measurementUnits.add(new Unit("DAYS",6400L));
        sortMeasurements();
    }

    public TimeUnit()
    {
        this.size = minimumUnit().getValue();
        this.price = Coin.valueOf(DEFAULT_PRICE_PER_UNIT);
        newInstance();
    }

    public TimeUnit(Long size, Coin value)
    {
        super(size,value);
        newInstance();
    }

    @Override
    public Unit baseUnit()
    {
        return measurementUnits.getFirst();
    }

    public Unit minimumUnit()
    {
        final Unit min = new Unit("SECONDS", 3L);
        return min;
    }

    @Override
    public PurchaseUnit makeCopy()
    {
        return new TimeUnit(this.size, this.price);
    }
}


text:
package br.com.trisoft.eventos.dao.hibernate;

import java.io.Serializable;

import br.com.trisoft.eventos.dao.InstituicaoDAO;
import br.com.trisoft.eventos.model.Instituicao;

public class hibernateInstituicaoDAO extends HibernateGenericDAO<Instituicao, Long>
		implements InstituicaoDAO, Serializable {

	private static final long serialVersionUID = 1L;

	@Override
	public boolean isExisteCNPJ(String cnpj) {

		try {

			Instituicao instituicao = getEntityManager().createNamedQuery("Instituicao.buscarCNPJ", Instituicao.class)
					.setParameter("cnpj", cnpj).getSingleResult();

			if (instituicao == null) {

				return false;

			} else {

				return true;
			}

		} catch (Exception e) {
			return false;
		}
	}

}


text:
package au.com.atebyte.bamboo.plugins.model;

/**
 * Github Download Request One Representation
 * User: tom romano
 * Date: 28/11/12
 * Time: 8:41 PM
 */
public class GithubDownloadRequestOne {

    private String name;
    private int size;
    private String description;
    private String content_type;

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getSize() {
        return size;
    }

    public void setSize(int size) {
        this.size = size;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    public String getContent_type() {
        return content_type;
    }

    public void setContent_type(String content_type) {
        this.content_type = content_type;
    }

    public String toJSON() {
        return "{" +
                "\"name\":'" + name + '\'' +
                ", \"size\":" + size +
                ", \"description\":'" + description + '\'' +
                ", \"content_type\":'" + content_type + '\'' +
                '}';
    }

    @Override
    public String toString() {
        return "GithubDownloadRequestOne{" +
                "name='" + name + '\'' +
                ", size=" + size +
                ", description='" + description + '\'' +
                ", content_type='" + content_type + '\'' +
                '}';
    }
}


text:
<?php

namespace App;

use Cache;
use Illuminate\Foundation\Auth\User as Authenticatable;

class User extends Authenticatable
{
    public function questions()
    {
        return $this->hasMany('App\Models\Question');
    }

    public function comments()
    {
        return $this->belongsTo('App\Models\Comment');
    }

    public function isOnline()
    {
        return Cache::has('user-is-online-'.$this->id);
    }

    /**
     * Convert date fields to Carbon.
     *
     * @var array
     */
    protected $dateFormat = 'd.m.Y H:i:s.000';
    protected $dates = ['created_at', 'updated_at'];

    /**
     * The attributes that are mass assignable.
     *
     * @var array
     */
    protected $fillable = [
        'name', 'email', 'password', 'avatar',
    ];

    /**
     * The attributes that should be hidden for arrays.
     *
     * @var array
     */
    protected $hidden = [
        'password', 'remember_token',
    ];
}


text:
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEditor;

[CustomEditor(typeof(CameraFollow))]
public class CameraFollowEditor : Editor {

    public override void OnInspectorGUI()
    {
        DrawDefaultInspector();

        CameraFollow cameraFollow = (CameraFollow) target;

        if (GUILayout.Button("Set Min Camera pos"))
        {
            cameraFollow.SetMinCameraPosition();
        }

        if (GUILayout.Button("Set Max Camera pos"))
        {
            cameraFollow.SetMaxCameraPosition();
        }
    }

}


text:
TEST_CMD="xcodebuild -scheme 'SUPSemVer (iOS)' -project SUPSemVer.xcodeproj -sdk iphonesimulator -destination 'platform=iOS Simulator,name=iPhone 7,OS=10.0' build test"

which -s xcpretty
XCPRETTY_INSTALLED=$?

if [[ $TRAVIS || $XCPRETTY_INSTALLED == 0 ]]; then
  eval "${TEST_CMD} | xcpretty"
else
  eval "$TEST_CMD"
fi


text:
<?xml version="1.0" encoding="utf-8"?>
<!--
  Copyright 2013 Matthew Precious

  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.
-->
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:id="@+id/content_wrapper"
    android:layout_width="match_parent"
    android:layout_height="match_parent" >

    <android.support.v4.view.ViewPager
        android:id="@+id/pager"
        android:layout_width="match_parent"
        android:layout_height="match_parent" />

    <LinearLayout
        android:id="@+id/undobar"
        style="@style/UndoBar" >

        <TextView
            android:id="@+id/undobar_message"
            style="@style/UndoBarMessage"
            android:textIsSelectable="false" />

        <Button
            android:id="@+id/undobar_button"
            style="@style/UndoBarButton" />
    </LinearLayout>

</FrameLayout>


text:
#include "org_apache_mnemonic_service_memory_internal_PMDKVMemServiceImpl.h"

static VMPool *g_vmpool_arr = NULL;
static size_t g_vmpool_count = 0;

static pthread_rwlock_t g_vmem_rwlock = PTHREAD_RWLOCK_INITIALIZER;

/******************************************************************************
 ** JNI implementations
 *****************************************************************************/

JNIEXPORT
jlong JNICALL Java_org_apache_mnemonic_service_memory_internal_PMDKVMemServiceImpl_nallocate(JNIEnv* env,
    jobject this, jlong id, jlong size, jboolean initzero) {
  VMPool *pool;
  pthread_rwlock_rdlock(&g_vmem_rwlock);
  pool = g_vmpool_arr + id;
  pthread_mutex_lock(&pool->mutex);
  void* nativebuf = vrealloc(pool, NULL, size, initzero);
  pthread_mutex_unlock(&pool->mutex);
  pthread_rwlock_unlock(&g_vmem_rwlock);
  return addr_to_java(nativebuf);
}

JNIEXPORT
jlong JNICALL Java_org_apache_mnemonic_service_memory_internal_PMDKVMemServiceImpl_nreallocate(JNIEnv* env,
    jobject this, jlong id, jlong addr, jlong size, jboolean initzero) {
  VMPool *pool;
  pthread_rwlock_rdlock(&g_vmem_rwlock);
  pool = g_vmpool_arr + id;
  pthread_mutex_lock(&pool->mutex);
  void* p = addr_from_java(addr);
  void* nativebuf = vrealloc(pool, p, size, initzero);
  pthread_mutex_unlock(&pool->mutex);
  pthread_rwlock_unlock(&g_vmem_rwlock);
  return addr_to_java(nativebuf);
}

JNIEXPORT
void JNICALL Java_org_apache_mnemonic_service_memory_internal_PMDKVMemServiceImpl_nfree(
    JNIEnv* env,
    jobject this, jlong id,
    jlong addr) {
  VMPool *pool;
  pthread_rwlock_rdlock(&g_vmem_rwlock);
  pool = g_vmpool_arr + id;
  pthread_mutex_lock(&pool->mutex);
  void* nativebuf = addr_from_java(addr);
  vfree(pool, nativebuf);
  pthread_mutex_unlock(&pool->mutex);
  pthread_rwlock_unlock(&g_vmem_rwlock);
}

JNIEXPORT
void JNICALL Java_org_apache_mnemonic_service_memory_internal_PMDKVMemServiceImpl_nsync(
    JNIEnv* env,
    jobject this, jlong id, jlong addr, jlong len, jboolean autodetect)
{
}

JNIEXPORT
jlong JNICALL Java_org_apache_mnemonic_service_memory_internal_PMDKVMemServiceImpl_ncapacity(
    JNIEnv* env,
    jobject this, jlong id)
{
  VMPool *pool;
  pool = g_vmpool_arr + id;
  return pool->capacity;
}

JNIEXPORT
jobject JNICALL Java_org_apache_mnemonic_service_memory_internal_PMDKVMemServiceImpl_ncreateByteBuffer(
    JNIEnv *env, jobject this, jlong id, jlong size) {
  VMPool *pool;
  jobject ret = NULL;
  pthread_rwlock_rdlock(&g_vmem_rwlock);
  pool = g_vmpool_arr + id;
  pthread_mutex_lock(&pool->mutex);
  void* nativebuf = vrealloc(pool, NULL, size, 0);
  ret = NULL != nativebuf ? (*env)->NewDirectByteBuffer(env, nativebuf, size) : NULL;
  pthread_mutex_unlock(&pool->mutex);
  pthread_rwlock_unlock(&g_vmem_rwlock);
  return ret;
}

JNIEXPORT
jobject JNICALL Java_org_apache_mnemonic_service_memory_internal_PMDKVMemServiceImpl_nretrieveByteBuffer(
    JNIEnv *env, jobject this, jlong id, jlong addr) {
  jobject ret = NULL;
  void* p = addr_from_java(addr);
  if (NULL != p) {
    void* nativebuf = p - PMBHSZ;
    ret = (*env)->NewDirectByteBuffer(env, p, ((PMBHeader *) nativebuf)->size - PMBHSZ);
  }
  return ret;
}

JNIEXPORT
jlong JNICALL Java_org_apache_mnemonic_service_memory_internal_PMDKVMemServiceImpl_nretrieveSize(JNIEnv *env,
    jobject this, jlong id, jlong addr) {
  VMPool *pool;
  pthread_rwlock_rdlock(&g_vmem_rwlock);
  pool = g_vmpool_arr + id;
  void* p = addr_from_java(addr);
  jlong ret = vsize(pool, p);
  pthread_rwlock_unlock(&g_vmem_rwlock);
  return ret;
}

JNIEXPORT
jlong JNICALL Java_org_apache_mnemonic_service_memory_internal_PMDKVMemServiceImpl_ngetByteBufferHandler(
    JNIEnv *env, jobject this, jlong id, jobject bytebuf) {
//  fprintf(stderr, "ngetByteBufferAddress Get Called %X, %X\n", env, bytebuf);
  jlong ret = 0L;
  if (NULL != bytebuf) {
    void* nativebuf = (*env)->GetDirectBufferAddress(env, bytebuf);
//      fprintf(stderr, "ngetByteBufferAddress Get Native addr %X\n", nativebuf);
    ret = addr_to_java(nativebuf);
  }
//    fprintf(stderr, "ngetByteBufferAddress returned addr %016lx\n", ret);
  return ret;
}

JNIEXPORT
jobject JNICALL Java_org_apache_mnemonic_service_memory_internal_PMDKVMemServiceImpl_nresizeByteBuffer(
    JNIEnv *env, jobject this, jlong id, jobject bytebuf, jlong size) {
  VMPool *pool;
  jobject ret = NULL;
  pthread_rwlock_rdlock(&g_vmem_rwlock);
  pool = g_vmpool_arr + id;
  pthread_mutex_lock(&pool->mutex);
  if (NULL != bytebuf) {
    void* nativebuf = (void*) (*env)->GetDirectBufferAddress(env, bytebuf);
    if (nativebuf != NULL) {
      nativebuf = vrealloc(pool, nativebuf, size, 0);
      if (NULL != nativebuf) {
        ret = (*env)->NewDirectByteBuffer(env, nativebuf, size);
      }
    }
  }
  pthread_mutex_unlock(&pool->mutex);
  pthread_rwlock_unlock(&g_vmem_rwlock);
  return ret;
}

JNIEXPORT
void JNICALL Java_org_apache_mnemonic_service_memory_internal_PMDKVMemServiceImpl_ndestroyByteBuffer(
    JNIEnv *env, jobject this, jlong id, jobject bytebuf) {
  VMPool *pool;
  pthread_rwlock_rdlock(&g_vmem_rwlock);
  pool = g_vmpool_arr + id;
  pthread_mutex_lock(&pool->mutex);
  if (NULL != bytebuf) {
    void* nativebuf = (*env)->GetDirectBufferAddress(env, bytebuf);
    if (nativebuf != NULL) {
      vfree(pool, nativebuf);
    }
  }
  pthread_mutex_unlock(&pool->mutex);
  pthread_rwlock_unlock(&g_vmem_rwlock);
}

JNIEXPORT
void JNICALL Java_org_apache_mnemonic_service_memory_internal_PMDKVMemServiceImpl_nsetHandler(
    JNIEnv *env, jobject this, jlong id, jlong key, jlong value)
{
  throw(env, "setkey()/getkey() temporarily not supported");
}

JNIEXPORT
jlong JNICALL Java_org_apache_mnemonic_service_memory_internal_PMDKVMemServiceImpl_ngetHandler(JNIEnv *env,
    jobject this, jlong id, jlong key) {
  throw(env, "setkey()/getkey() temporarily not supported");
  return 0;
}

JNIEXPORT
jlong JNICALL Java_org_apache_mnemonic_service_memory_internal_PMDKVMemServiceImpl_nhandlerCapacity(
    JNIEnv *env, jobject this) {
  throw(env, "setkey()/getkey() temporarily not supported");
  return 0;
}

JNIEXPORT
jlong JNICALL Java_org_apache_mnemonic_service_memory_internal_PMDKVMemServiceImpl_ngetBaseAddress(JNIEnv *env,
    jobject this, jlong id) {
  return 0L;
}

JNIEXPORT
jlong JNICALL Java_org_apache_mnemonic_service_memory_internal_PMDKVMemServiceImpl_ninit(JNIEnv *env, jclass this,
    jlong capacity, jstring pathname, jboolean isnew) {
  pthread_rwlock_wrlock(&g_vmem_rwlock);
  VMPool *pool;
  size_t ret = -1;
  VMEM *vmp = NULL;
  const char* mpathname = (*env)->GetStringUTFChars(env, pathname, NULL);
  if (NULL == mpathname) {
    pthread_rwlock_unlock(&g_vmem_rwlock);
    throw(env, "Big memory path not specified!");
  }
  if ((vmp = vmem_create(mpathname,
       VMEM_MIN_POOL > capacity ? VMEM_MIN_POOL : capacity)) == NULL) {
    pthread_rwlock_unlock(&g_vmem_rwlock);
    throw(env, "Big memory init failure!");
  }
  g_vmpool_arr = realloc(g_vmpool_arr, (g_vmpool_count + 1) * sizeof(VMPool));
  if (NULL != g_vmpool_arr) {
    pool = g_vmpool_arr + g_vmpool_count;
    pool->vmp = vmp;
    pool->capacity = capacity;
    pthread_mutex_init(&pool->mutex, NULL);
    ret = g_vmpool_count;
    g_vmpool_count++;
  } else {
    pthread_rwlock_unlock(&g_vmem_rwlock);
    throw(env, "Big memory init Out of memory!");
  }
  pthread_rwlock_unlock(&g_vmem_rwlock);
  return ret;
}

JNIEXPORT
void JNICALL Java_org_apache_mnemonic_service_memory_internal_PMDKVMemServiceImpl_nclose
(JNIEnv *env, jobject this, jlong id)
{
  VMPool *pool;
  pthread_rwlock_wrlock(&g_vmem_rwlock);
  pool = g_vmpool_arr + id;
  pthread_mutex_lock(&pool->mutex);
  if (NULL != pool->vmp) {
    pool->vmp = NULL;
    pool->capacity = 0;
  }
  pthread_mutex_unlock(&pool->mutex);
  pthread_mutex_destroy(&pool->mutex);
  pthread_rwlock_unlock(&g_vmem_rwlock);
}

__attribute__((destructor)) void fini(void) {
  int i;
  VMPool *pool;
  pthread_rwlock_wrlock(&g_vmem_rwlock);
  if (NULL != g_vmpool_arr) {
    for (i = 0; i < g_vmpool_count; ++i) {
      pool = g_vmpool_arr + i;
      if (NULL != pool->vmp) {
        pool->vmp = NULL;
        pool->capacity = 0;
        pthread_mutex_destroy(&pool->mutex);
      }
    }
    free(g_vmpool_arr);
    g_vmpool_arr = NULL;
    g_vmpool_count = 0;
  }
  pthread_rwlock_unlock(&g_vmem_rwlock);
  pthread_rwlock_destroy(&g_vmem_rwlock);
}


text:
release:
	python setup.py register sdist bdist_wheel upload

test-coverage:
	@python -Wmodule -m coverage run -m unittest

coverage-report:
	@coverage report --fail-under 100

doctest:
	@python -m doctest README.md

test:
	@$(MAKE) --no-print-directory test-coverage
	@$(MAKE) --no-print-directory coverage-report
	@flake8 .
	@$(MAKE) --no-print-directory doctest


text:
module VagrantPlugins
  module Cachier
    module Cap
      module RedHat
        module DnfCacheDir
          def self.dnf_cache_dir(machine)
            dnf_cache_dir = nil
            machine.communicate.tap do |comm|
              return unless comm.test('which dnf')
              dnf_cache_dir = '/var/cache/dnf'
            end
            return dnf_cache_dir
          end
        end
      end
    end
  end
end


text:
<?php
function generateRandomString($length) {
    $characters = '0123456789abcdefghijklmnopqrstuvwxyz';
    $charactersLength = strlen($characters);
    $randomString = '';
    for ($i = 0; $i < $length; $i++) {
        $randomString .= $characters[rand(0, $charactersLength - 1)];
    }
    return $randomString;
}

?>


text:
import json

myAltDict = {"phone":"05559666333" , "address":"ISTANBUL"}
myDict = {"name":"Mike" , "surname":"Hammer" , "contact": myAltDict}
print(myDict["name"])

json1 = json.dumps(myDict , ensure_ascii=False)
print(json1)


text: INSERT INTO t3 VALUES((SELECT max(a) FROM t3)+1)