text:
package org.apache.sling.scripting.sightly.render;

import java.lang.reflect.Field;
import java.lang.reflect.Method;
import java.lang.reflect.Modifier;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;
import java.util.Collections;
import java.util.Enumeration;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.Set;

import org.apache.commons.lang.StringUtils;
import org.apache.sling.scripting.sightly.Record;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

/**
 * Default abstract implementation of {@link RuntimeObjectModel}.
 */
public abstract class AbstractRuntimeObjectModel implements RuntimeObjectModel {

    private static final Logger LOGGER = LoggerFactory.getLogger(AbstractRuntimeObjectModel.class);

    /**
     * A {@link Set} that stores all the supported primitive classes.
     */
    public static final Set<Class<?>> PRIMITIVE_CLASSES = Collections.unmodifiableSet(new HashSet<Class<?>>() {{
        add(Boolean.class);
        add(Boolean.class);
        add(Character.class);
        add(Byte.class);
        add(Short.class);
        add(Integer.class);
        add(Long.class);
        add(Float.class);
        add(Double.class);
        add(Void.class);
    }});

    public static final String TO_STRING_METHOD = "toString";

    @Override
    public boolean isPrimitive(Object obj) {
        return PRIMITIVE_CLASSES.contains(obj.getClass());
    }

    @Override
    public boolean isCollection(Object target) {
        return (target instanceof Collection) || (target instanceof Object[]) || (target instanceof Iterable) ||
                (target instanceof Iterator);
    }

    @Override
    public Object resolveProperty(Object target, Object property) {
        Object resolved;
        if (property instanceof Number) {
            resolved = getIndex(target, ((Number) property).intValue());
        } else {
            resolved = getProperty(target, property);
        }
        return resolved;
    }

    @Override
    public boolean toBoolean(Object object) {
        return toBooleanInternal(object);
    }

    @Override
    public Number toNumber(Object object) {
        if (object instanceof Number) {
            return (Number) object;
        }
        return 0;
    }

    @Override
    public String toString(Object target) {
        return objectToString(target);
    }

    @Override
    public Collection<Object> toCollection(Object object) {
        return obtainCollection(object);
    }

    @Override
    public Map toMap(Object object) {
        if (object instanceof Map) {
            return (Map) object;
        } else if (object instanceof Record) {
            Map<String, Object> map = new HashMap<>();
            Record record = (Record) object;
            @SuppressWarnings("unchecked")
            Set<String> properties = record.getPropertyNames();
            for (String property : properties) {
                map.put(property, record.getProperty(property));
            }
            return map;
        }
        return Collections.emptyMap();
    }

    protected String objectToString(Object obj) {
        String output = "";
        if (obj != null) {
            if (obj instanceof String) {
                output = (String) obj;
            } else if (isPrimitive(obj)) {
                output = obj.toString();
            } else if (obj instanceof Enum) {
                return ((Enum) obj).name();
            } else {
                Collection<?> col = obtainCollection(obj);
                if (col != null) {
                    output = collectionToString(col);
                }
            }
        }
        return output;
    }

    protected Object getProperty(Object target, Object propertyObj) {
        String property = toString(propertyObj);
        if (StringUtils.isEmpty(property)) {
            throw new IllegalArgumentException("Invalid property name");
        }
        if (target == null) {
            return null;
        }
        Object result = null;
        if (target instanceof Map) {
            result = getMapProperty((Map) target, property);
        }
        if (result == null && target instanceof Record) {
            result = ((Record) target).getProperty(property);
        }
        if (result == null) {
            result = getObjectProperty(target, property);
        }
        return result;
    }

    @SuppressWarnings("unchecked")
    protected Collection<Object> obtainCollection(Object obj) {
        if (obj == null) {
            return Collections.emptyList();
        }
        if (obj instanceof Object[]) {
            return Arrays.asList((Object[]) obj);
        }
        if (obj instanceof Collection) {
            return (Collection<Object>) obj;
        }
        if (obj instanceof Map) {
            return ((Map) obj).keySet();
        }
        if (obj instanceof Record) {
            return ((Record) obj).getPropertyNames();
        }
        if (obj instanceof Enumeration) {
            return Collections.list((Enumeration<Object>) obj);
        }
        if (obj instanceof Iterator) {
            return fromIterator((Iterator<Object>) obj);
        }
        if (obj instanceof Iterable) {
            Iterable iterable = (Iterable) obj;
            return fromIterator(iterable.iterator());
        }
        if (obj instanceof String || obj instanceof Number) {
            Collection list = new ArrayList();
            list.add(obj);
            return list;
        }
        return Collections.emptyList();
    }

    protected String collectionToString(Collection<?> col) {
        StringBuilder builder = new StringBuilder();
        String prefix = "";
        for (Object o : col) {
            builder.append(prefix).append(objectToString(o));
            prefix = ",";
        }
        return builder.toString();
    }

    protected Collection<Object> fromIterator(Iterator<Object> iterator) {
        ArrayList<Object> result = new ArrayList<>();
        while (iterator.hasNext()) {
            result.add(iterator.next());
        }
        return result;
    }

    protected boolean toBooleanInternal(Object obj) {
        if (obj == null) {
            return false;
        }

        if (obj instanceof Number) {
            Number number = (Number) obj;
            return !(number.doubleValue() == 0.0);
        }

        String s = obj.toString().trim();
        if ("".equals(s)) {
            return false;
        } else if ("true".equalsIgnoreCase(s) || "false".equalsIgnoreCase(s)) {
            return Boolean.parseBoolean(s);
        }

        if (obj instanceof Collection) {
            return ((Collection) obj).size() > 0;
        }

        if (obj instanceof Map) {
            return ((Map) obj).size() > 0;
        }

        if (obj instanceof Iterable<?>) {
            return ((Iterable<?>) obj).iterator().hasNext();
        }

        if (obj instanceof Iterator<?>) {
            return ((Iterator<?>) obj).hasNext();
        }

        return !(obj instanceof Object[]) || ((Object[]) obj).length > 0;
    }

    protected Object getIndex(Object obj, int index) {
        if (obj instanceof Map) {
            Map map = (Map) obj;
            if (map.containsKey(index)) {
                return map.get(index);
            }
        }
        Collection collection = toCollection(obj);
        if (collection instanceof List) {
            return getIndexSafe((List) collection, index);
        }
        return null;
    }

    protected Object getIndexSafe(List list, int index) {
        if (index < 0 || index >= list.size()) {
            return null;
        }
        return list.get(index);
    }

    protected Object getMapProperty(Map map, String property) {
        return map.get(property);
    }

    protected Object getObjectProperty(Object obj, String property) {
        Object result = getObjectNoArgMethod(obj, property);
        if (result == null) {
            result = getField(obj, property);
        }
        return result;
    }

    protected static Object getField(Object obj, String property) {
        if (obj instanceof Object[] && "length".equals(property)) {
            // Working around this limitation: http://docs.oracle.com/javase/7/docs/api/java/lang/Class.html#getFields%28%29
            return ((Object[]) obj).length;
        }
        Class<?> cls = obj.getClass();
        try {
            Field field = cls.getDeclaredField(property);
            return field.get(obj);
        } catch (Exception e) {
            return null;
        }
    }

    protected Object getObjectNoArgMethod(Object obj, String property) {
        Class<?> cls = obj.getClass();
        Method method = findMethod(cls, property);
        if (method != null) {
            method = extractMethodInheritanceChain(cls, method);
            try {
                return method.invoke(obj);
            } catch (Exception e) {
                LOGGER.error("Cannot access method " + property + " on object " + obj.toString(), e);
            }
        }
        return null;
    }

    protected static Method findMethod(Class<?> cls, String baseName) {
        Method[] publicMethods = cls.getMethods();
        String capitalized = StringUtils.capitalize(baseName);
        for (Method m : publicMethods) {
            if (m.getParameterTypes().length == 0) {
                String methodName = m.getName();
                if (baseName.equals(methodName) || ("get" + capitalized).equals(methodName) || ("is" + capitalized).equals(methodName)) {
                    // this method is good, check whether allowed
                    if (isMethodAllowed(m)) {
                        return m;
                    }
                    // method would match but is not allowed, abort
                    break;
                }
            }
        }
        return null;
    }

    protected static boolean isMethodAllowed(Method method) {
        Class<?> declaringClass = method.getDeclaringClass();
        //methods of the Object.class are forbidden (except toString, which is allowed)
        return declaringClass != Object.class || TO_STRING_METHOD.equals(method.getName());
    }

    protected Method extractMethodInheritanceChain(Class type, Method m) {
        if (m == null || Modifier.isPublic(type.getModifiers())) {
            return m;
        }
        Class[] iFaces = type.getInterfaces();
        Method mp;
        for (Class<?> iFace : iFaces) {
            mp = getClassMethod(iFace, m);
            if (mp != null) {
                return mp;
            }
        }
        return getClassMethod(type.getSuperclass(), m);
    }

    protected Method getClassMethod(Class<?> clazz, Method m) {
        Method mp;
        try {
            mp = clazz.getMethod(m.getName(), m.getParameterTypes());
            mp = extractMethodInheritanceChain(mp.getDeclaringClass(), mp);
            if (mp != null) {
                return mp;
            }
        } catch (NoSuchMethodException e) {
            // do nothing
        }
        return null;
    }

}


text:
<?xml version="1.0" encoding="utf-8" ?>
<LanguageData>
    <!-- use 4 spaces indentation, NOT tabs -->
    <!-- Overall prefix for the mod is "PL" for PrepareLanding -->

    <!--=========================================== Main Game Options [GOPT] ========================================-->
    <!-- visible in "Options > Mod Settings" menu only -->
    <PLGOPT_DisableWorldDataTitle>Disable World Data</PLGOPT_DisableWorldDataTitle>
    <PLGOPT_DisableWorldDataDescription>Allow disabling World Data:
World Data are various data used by PrepareLanding to display information about the world.If set, this removes the information, saves some memory and some CPU cycles.
In return less information is available.</PLGOPT_DisableWorldDataDescription>

    <!--======================================== Main Window Options Tab [OPT] ======================================-->
        <!-- Tab Name in main window -->
    <PLOPT_Options>Options</PLOPT_Options>

    <!-- Note: for each option: the 1st entry is the text visible on the on Options tab, the second entry is the tool-tip shown when hovering above the option text -->

    <!--======================================== Filter Options ======================================-->
    <PLOPT_FilterOptions>Filter Options</PLOPT_FilterOptions>

    <PLOPT_AllowLiveFiltering>Allow Live Filtering</PLOPT_AllowLiveFiltering>
    <PLOPT_AllowLiveFilteringToolTip>[Warning: CPU heavy] Allow filtering without pressing the "Filter" button.</PLOPT_AllowLiveFilteringToolTip>

    <PLOPT_AllowImpassableTiles>Allow Impassable Tiles</PLOPT_AllowImpassableTiles>
    <PLOPT_AllowImpassableTilesToolTip>Allow selection and filtering of impassable tiles.</PLOPT_AllowImpassableTilesToolTip>

    <PLOPT_DisablePreFilterCheck>Disable PreFilter Check</PLOPT_DisablePreFilterCheck>
    <PLOPT_DisablePreFilterCheckToolTip>Disable the check where Biomes and Terrains must be selected with a world coverage >= 50%.</PLOPT_DisablePreFilterCheckToolTip>

        <!-- note: if you have a hard time translating "PartialOffNoSelect", it's a shorthand for "Partial and Off gives No Selection-->
        <!-- simply put: if a filter is set to partial or off, then it does not select anything -->
        <!-- This option allows to invert this behavior by showing a new button, so partial or off might select things on the world map (the default is to not select anything) -->
        <!-- This is a rather 'hidden' option, and I doubt anyone is using it; it is a bit documented in the official doc though... -->
    <PLOPT_ViewPartialOffNoSelect>View PartialOffNoSelect</PLOPT_ViewPartialOffNoSelect>
    <PLOPT_ViewPartialOffNoSelectToolTip>Allow to view the PartialOffNoSelect button on the GUI for grouped three state items.</PLOPT_ViewPartialOffNoSelectToolTip>

    <PLOPT_ResetAllFiltersOnNewWorld>Reset all filters on new world</PLOPT_ResetAllFiltersOnNewWorld>
    <PLOPT_ResetAllFiltersOnNewWorldToolTip>If ON, all filters are reset to their default state on a new generated world, otherwise the filters are kept in their previous state.</PLOPT_ResetAllFiltersOnNewWorldToolTip>

    <!-- note: "heaviness" in terms of CPU calculation -->
    <PLOPT_ShowFilterHeaviness>Show Filter Heaviness</PLOPT_ShowFilterHeaviness>
    <PLOPT_ShowFilterHeavinessToolTip>Show filter heaviness (possible filter CPU calculation heaviness) on filter header in the GUI.</PLOPT_ShowFilterHeavinessToolTip>

    <PLOPT_AllowInvalidTilesForNewSettlement>Allow Invalid Tiles for New Settlement</PLOPT_AllowInvalidTilesForNewSettlement>
    <PLOPT_AllowInvalidTilesForNewSettlementToolTip>If ON, this prevents a last pass that would have removed tiles deemed as not valid for a new settlement.</PLOPT_AllowInvalidTilesForNewSettlementToolTip>

    <!--======================================== Tile Highlighter Options ======================================-->

    <PLOPT_TileHighlighterOptions>Tile Highlighter Options</PLOPT_TileHighlighterOptions>

    <PLOPT_DisableTileHighlighting>Disable Tile Highlighting</PLOPT_DisableTileHighlighting>
    <PLOPT_DisableTileHighlightingToolTip>Disable tile highlighting altogether.</PLOPT_DisableTileHighlightingToolTip>

    <PLOPT_DisableTileBlinking>Disable Tile Blinking</PLOPT_DisableTileBlinking>
    <PLOPT_DisableTileBlinkingToolTip>Disable tile blinking ("breathing") for filtered tiles on the world map.</PLOPT_DisableTileBlinkingToolTip>

    <PLOPT_ShowDebugTileId>Show Debug Tile ID</PLOPT_ShowDebugTileId>
    <PLOPT_ShowDebugTileIdToolTip>Show the Debug Tile ID for the highlighted tiles.</PLOPT_ShowDebugTileIdToolTip>

        <!-- {0} is a strictly positive number -->
    <PLOPT_BypassTileHighlighterMaximum>Bypass Tile Highlighter Maximum</PLOPT_BypassTileHighlighterMaximum>
    <PLOPT_BypassTileHighlighterMaximumToolTip>Allow highlighting more than {0} tiles.</PLOPT_BypassTileHighlighterMaximumToolTip>

</LanguageData>

redpajama_set_name: RedPajamaGithub


text:
#import <Foundation/Foundation.h>

#import <FBSimulatorControl/FBInteraction.h>
#import <FBSimulatorControl/FBSimulator.h>

@class FBSimulator;
@class FBSimulatorApplication;
@class FBSimulatorConfiguration;

/**
 Pre-session interactions used pre-launch of a Simulator
 */
@interface FBSimulatorInteraction : FBInteraction

/**
 Returns a new Interaction for the provided Simulator.

 @param simulator the Simulator to interact with, must not be nil.
 */
+ (instancetype)withSimulator:(FBSimulator *)simulator;

/**
 Sets the locale for the simulator.

 @param locale the locale to set, must not be nil.
 */
- (instancetype)setLocale:(NSLocale *)locale;

/**
 Authorizes the Location Settings for the provided application.

 @param application the Application to authorize settings for.
 */
- (instancetype)authorizeLocationSettingsForApplication:(FBSimulatorApplication *)application;

/**
 Setups keyboard for simulator
 1) Disables Caps Lock
 2) Disables Auto Capitalize
 3) Disables Auto Correction / QuickType
 */
- (instancetype)setupKeyboard;

@end

/**
 Some conveniences for making the interactions associated with a Simulator Configuration.
 */
@interface FBSimulatorInteraction (Convenience)

/**
 Makes an interaction by:
 1) Setting the Locale (if the configuration contains one)
 2) Sets up the keyboard

 @param configuration the configuration to apply.
 */
- (instancetype)configureWith:(FBSimulatorConfiguration *)configuration;

@end

/**
 Helps make a more fluent API for interacting with Simulators.
 */
@interface FBSimulator (FBSimulatorInteraction)

/**
 Creates an `FBSimulatorInteraction` for the reciever.
 */
- (FBSimulatorInteraction *)interact;

@end


text:
import * as flatbuffers from 'flatbuffers';

export class Stat {
  bb: flatbuffers.ByteBuffer|null = null;
  bb_pos = 0;
__init(i:number, bb:flatbuffers.ByteBuffer):Stat {
  this.bb_pos = i;
  this.bb = bb;
  return this;
}

static getRootAsStat(bb:flatbuffers.ByteBuffer, obj?:Stat):Stat {
  return (obj || new Stat()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
}

static getSizePrefixedRootAsStat(bb:flatbuffers.ByteBuffer, obj?:Stat):Stat {
  bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH);
  return (obj || new Stat()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
}

id():string|null
id(optionalEncoding:flatbuffers.Encoding):string|Uint8Array|null
id(optionalEncoding?:any):string|Uint8Array|null {
  const offset = this.bb!.__offset(this.bb_pos, 4);
  return offset ? this.bb!.__string(this.bb_pos + offset, optionalEncoding) : null;
}

val():flatbuffers.Long {
  const offset = this.bb!.__offset(this.bb_pos, 6);
  return offset ? this.bb!.readInt64(this.bb_pos + offset) : this.bb!.createLong(0, 0);
}

mutate_val(value:flatbuffers.Long):boolean {
  const offset = this.bb!.__offset(this.bb_pos, 6);

  if (offset === 0) {
    return false;
  }

  this.bb!.writeInt64(this.bb_pos + offset, value);
  return true;
}

count():number {
  const offset = this.bb!.__offset(this.bb_pos, 8);
  return offset ? this.bb!.readUint16(this.bb_pos + offset) : 0;
}

mutate_count(value:number):boolean {
  const offset = this.bb!.__offset(this.bb_pos, 8);

  if (offset === 0) {
    return false;
  }

  this.bb!.writeUint16(this.bb_pos + offset, value);
  return true;
}

static getFullyQualifiedName():string {
  return 'MyGame.Example.Stat';
}

static startStat(builder:flatbuffers.Builder) {
  builder.startObject(3);
}

static addId(builder:flatbuffers.Builder, idOffset:flatbuffers.Offset) {
  builder.addFieldOffset(0, idOffset, 0);
}

static addVal(builder:flatbuffers.Builder, val:flatbuffers.Long) {
  builder.addFieldInt64(1, val, builder.createLong(0, 0));
}

static addCount(builder:flatbuffers.Builder, count:number) {
  builder.addFieldInt16(2, count, 0);
}

static endStat(builder:flatbuffers.Builder):flatbuffers.Offset {
  const offset = builder.endObject();
  return offset;
}

static createStat(builder:flatbuffers.Builder, idOffset:flatbuffers.Offset, val:flatbuffers.Long, count:number):flatbuffers.Offset {
  Stat.startStat(builder);
  Stat.addId(builder, idOffset);
  Stat.addVal(builder, val);
  Stat.addCount(builder, count);
  return Stat.endStat(builder);
}

serialize():Uint8Array {
  return this.bb!.bytes();
}

static deserialize(buffer: Uint8Array):Stat {
  return Stat.getRootAsStat(new flatbuffers.ByteBuffer(buffer))
}

unpack(): StatT {
  return new StatT(
    this.id(),
    this.val(),
    this.count()
  );
}

unpackTo(_o: StatT): void {
  _o.id = this.id();
  _o.val = this.val();
  _o.count = this.count();
}
}

export class StatT {
constructor(
  public id: string|Uint8Array|null = null,
  public val: flatbuffers.Long = flatbuffers.createLong(0, 0),
  public count: number = 0
){}

pack(builder:flatbuffers.Builder): flatbuffers.Offset {
  const id = (this.id !== null ? builder.createString(this.id!) : 0);

  return Stat.createStat(builder,
    id,
    this.val,
    this.count
  );
}
}


text:
/*
    ********** Juicer **********
    ${A Fast template engine}
    Project Home: http://juicer.name

    Author: Guokai
    Gtalk: badkaikai@gmail.com
    Blog: http://benben.cc
    Licence: MIT License
    Version: 0.6.5-lite-stable
*/

(function() {

    // This is the main function for not only compiling but also rendering.
    // there's at least two parameters need to be provided, one is the tpl,
    // another is the data, the tpl can either be a string, or an id like #id.
    // if only tpl was given, it'll return the compiled reusable function.
    // if tpl and data were given at the same time, it'll return the rendered
    // result immediately.

    var juicer = function() {
        var args = [].slice.call(arguments);

        args.push(juicer.options);

        if(args[0].match(/^\s*#([\w:\-\.]+)\s*$/igm)) {
            args[0].replace(/^\s*#([\w:\-\.]+)\s*$/igm, function($, $id) {
                var _document = document;
                var elem = _document && _document.getElementById($id);
                args[0] = elem ? (elem.value || elem.innerHTML) : $;
            });
        }

        if(arguments.length == 1) {
            return juicer.compile.apply(juicer, args);
        }

        if(arguments.length >= 2) {
            return juicer.to_html.apply(juicer, args);
        }
    };

    var __escapehtml = {
        escapehash: {
            '<': '<',
            '>': '>',
            '&': '&',
            '"': '"',
            "'": ''',
            '/': '/'
        },
        escapereplace: function(k) {
            return __escapehtml.escapehash[k];
        },
        escaping: function(str) {
            return typeof(str) !== 'string' ? str : str.replace(/[&<>"]/igm, this.escapereplace);
        },
        detection: function(data) {
            return typeof(data) === 'undefined' ? '' : data;
        }
    };

    var __throw = function(error) {
        if(typeof(console) !== 'undefined') {
            if(console.warn) {
                console.warn(error);
                return;
            }

            if(console.log) {
                console.log(error);
                return;
            }
        }

        throw(error);
    };

    var __creator = function(o, proto) {
        o = o !== Object(o) ? {} : o;

        if(o.__proto__) {
            o.__proto__ = proto;
            return o;
        }

        var empty = function() {};
        var n = Object.create ?
            Object.create(proto) :
            new(empty.prototype = proto, empty);

        for(var i in o) {
            if(o.hasOwnProperty(i)) {
                n[i] = o[i];
            }
        }

        return n;
    };

    juicer.__cache = {};
    juicer.version = '0.6.5-lite-stable';
    juicer.settings = {};

    juicer.tags = {
        operationOpen: '{@',
        operationClose: '}',
        interpolateOpen: '\\${',
        interpolateClose: '}',
        noneencodeOpen: '\\$\\${',
        noneencodeClose: '}',
        commentOpen: '\\{#',
        commentClose: '\\}'
    };

    juicer.options = {
        cache: true,
        strip: true,
        errorhandling: true,
        detection: true,
        _method: __creator({
            __escapehtml: __escapehtml,
            __throw: __throw,
            __juicer: juicer
        }, {})
    };

    juicer.tagInit = function() {
        var forstart = juicer.tags.operationOpen + 'each\\s*([^}]*?)\\s*as\\s*(\\w*?)\\s*(,\\s*\\w*?)?' + juicer.tags.operationClose;
        var forend = juicer.tags.operationOpen + '\\/each' + juicer.tags.operationClose;
        var ifstart = juicer.tags.operationOpen + 'if\\s*([^}]*?)' + juicer.tags.operationClose;
        var ifend = juicer.tags.operationOpen + '\\/if' + juicer.tags.operationClose;
        var elsestart = juicer.tags.operationOpen + 'else' + juicer.tags.operationClose;
        var elseifstart = juicer.tags.operationOpen + 'else if\\s*([^}]*?)' + juicer.tags.operationClose;
        var interpolate = juicer.tags.interpolateOpen + '([\\s\\S]+?)' + juicer.tags.interpolateClose;
        var noneencode = juicer.tags.noneencodeOpen + '([\\s\\S]+?)' + juicer.tags.noneencodeClose;
        var inlinecomment = juicer.tags.commentOpen + '[^}]*?' + juicer.tags.commentClose;

        juicer.settings.forstart = new RegExp(forstart, 'igm');
        juicer.settings.forend = new RegExp(forend, 'igm');
        juicer.settings.ifstart = new RegExp(ifstart, 'igm');
        juicer.settings.ifend = new RegExp(ifend, 'igm');
        juicer.settings.elsestart = new RegExp(elsestart, 'igm');
        juicer.settings.elseifstart = new RegExp(elseifstart, 'igm');
        juicer.settings.interpolate = new RegExp(interpolate, 'igm');
        juicer.settings.noneencode = new RegExp(noneencode, 'igm');
        juicer.settings.inlinecomment = new RegExp(inlinecomment, 'igm');
    };

    juicer.tagInit();

    juicer.template = function(options) {
        var that = this;

        this.options = options;

        this.__interpolate = function(_name, _escape, options) {
            var _define = _name.split('|'), _fn = _define[0] || '', _cluster;

            if(_define.length > 1) {
                _name = _define.shift();
                _cluster = _define.shift().split(',');
                _fn = '_method.' + _cluster.shift() + '.call({}, ' + [_name].concat(_cluster) + ')';
            }

            return '<%= ' + (_escape ? '_method.__escapehtml.escaping' : '') + '(' +
                        (!options || options.detection !== false ? '_method.__escapehtml.detection' : '') + '(' +
                            _fn +
                        ')' +
                    ')' +
                ' %>';
        };

        this.__removeShell = function(tpl, options) {
            var _counter = 0;

            tpl = tpl
                // for expression
                .replace(juicer.settings.forstart, function($, _name, alias, key) {
                    var alias = alias || 'value', key = key && key.substr(1);
                    var _iterate = 'i' + _counter++;
                    return '<% ~function() {' +
                                'for(var ' + _iterate + ' in ' + _name + ') {' +
                                    'if(' + _name + '.hasOwnProperty(' + _iterate + ')) {' +
                                        'var ' + alias + '=' + _name + '[' + _iterate + '];' +
                                        (key ? ('var ' + key + '=' + _iterate + ';') : '') +
                            ' %>';
                })
                .replace(juicer.settings.forend, '<% }}}(); %>')

                // if expression
                .replace(juicer.settings.ifstart, function($, condition) {
                    return '<% if(' + condition + ') { %>';
                })
                .replace(juicer.settings.ifend, '<% } %>')

                // else expression
                .replace(juicer.settings.elsestart, function($) {
                    return '<% } else { %>';
                })

                // else if expression
                .replace(juicer.settings.elseifstart, function($, condition) {
                    return '<% } else if(' + condition + ') { %>';
                })

                // interpolate without escape
                .replace(juicer.settings.noneencode, function($, _name) {
                    return that.__interpolate(_name, false, options);
                })

                // interpolate with escape
                .replace(juicer.settings.interpolate, function($, _name) {
                    return that.__interpolate(_name, true, options);
                })

                // clean up comments
                .replace(juicer.settings.inlinecomment, '');

            // exception handling
            if(!options || options.errorhandling !== false) {
                tpl = '<% try { %>' + tpl;
                tpl += '<% } catch(e) {_method.__throw("Juicer Render Exception: "+e.message);} %>';
            }

            return tpl;
        };

        this.__toNative = function(tpl, options) {
            return this.__convert(tpl, !options || options.strip);
        };

        this.__lexicalAnalyze = function(tpl) {
            var buffer = [];
            var method = [];
            var prefix = '';
            var reserved = [
                'if', 'each', '_', '_method', 'console',
                'break', 'case', 'catch', 'continue', 'debugger', 'default', 'delete', 'do',
                'finally', 'for', 'function', 'in', 'instanceof', 'new', 'return', 'switch',
                'this', 'throw', 'try', 'typeof', 'var', 'void', 'while', 'with', 'null', 'typeof',
                'class', 'enum', 'export', 'extends', 'import', 'super', 'implements', 'interface',
                'let', 'package', 'private', 'protected', 'public', 'static', 'yield', 'const', 'arguments',
                'true', 'false', 'undefined', 'NaN'
            ];

            var indexOf = function(array, item) {
                if (Array.prototype.indexOf && array.indexOf === Array.prototype.indexOf) {
                    return array.indexOf(item);
                }

                for(var i=0; i < array.length; i++) {
                    if(array[i] === item) return i;
                }

                return -1;
            };

            var variableAnalyze = function($, statement) {
                statement = statement.match(/\w+/igm)[0];

                if(indexOf(buffer, statement) === -1 && indexOf(reserved, statement) === -1 && indexOf(method, statement) === -1) {
                    buffer.push(statement); // fuck ie
                }

                return $;
            };

            tpl.replace(juicer.settings.forstart, variableAnalyze).
                replace(juicer.settings.interpolate, variableAnalyze).
                replace(juicer.settings.ifstart, variableAnalyze).
                replace(juicer.settings.elseifstart, variableAnalyze).
                replace(juicer.settings.include, variableAnalyze).
                replace(/[\+\-\*\/%!\?\|\^&~<>=,\(\)\[\]]\s*([A-Za-z_]+)/igm, variableAnalyze);

            for(var i = 0;i < buffer.length; i++) {
                prefix += 'var ' + buffer[i] + '=_.' + buffer[i] + ';';
            }

            return '<% ' + prefix + ' %>';
        };

        this.__convert=function(tpl, strip) {
            var buffer = [].join('');

            buffer += "'use strict';"; // use strict mode
            buffer += "var _=_||{};";
            buffer += "var _out='';_out+='";

            if(strip !== false) {
                buffer += tpl
                    .replace(/\\/g, "\\\\")
                    .replace(/[\r\t\n]/g, " ")
                    .replace(/'(?=[^%]*%>)/g, "\t")
                    .split("'").join("\\'")
                    .split("\t").join("'")
                    .replace(/<%=(.+?)%>/g, "';_out+=$1;_out+='")
                    .split("<%").join("';")
                    .split("%>").join("_out+='")+
                    "';return _out;";

                return buffer;
            }

            buffer += tpl
                    .replace(/\\/g, "\\\\")
                    .replace(/[\r]/g, "\\r")
                    .replace(/[\t]/g, "\\t")
                    .replace(/[\n]/g, "\\n")
                    .replace(/'(?=[^%]*%>)/g, "\t")
                    .split("'").join("\\'")
                    .split("\t").join("'")
                    .replace(/<%=(.+?)%>/g, "';_out+=$1;_out+='")
                    .split("<%").join("';")
                    .split("%>").join("_out+='")+
                    "';return _out.replace(/[\\r\\n]\\s+[\\r\\n]/g, '\\r\\n');";

            return buffer;
        };

        this.parse = function(tpl, options) {
            var _that = this;

            if(!options || options.loose !== false) {
                tpl = this.__lexicalAnalyze(tpl) + tpl;
            }

            tpl = this.__removeShell(tpl, options);
            tpl = this.__toNative(tpl, options);

            this._render = new Function('_, _method', tpl);

            this.render = function(_, _method) {
                if(!_method || _method !== that.options._method) {
                    _method = __creator(_method, that.options._method);
                }

                return _that._render.call(this, _, _method);
            };

            return this;
        };
    };

    juicer.compile = function(tpl, options) {
        if(!options || options !== this.options) {
            options = __creator(options, this.options);
        }

        try {
            var engine = this.__cache[tpl] ?
                this.__cache[tpl] :
                new this.template(this.options).parse(tpl, options);

            if(!options || options.cache !== false) {
                this.__cache[tpl] = engine;
            }

            return engine;

        } catch(e) {
            __throw('Juicer Compile Exception: ' + e.message);

            return {
                render: function() {} // noop
            };
        }
    };

    juicer.to_html = function(tpl, data, options) {
        if(!options || options !== this.options) {
            options = __creator(options, this.options);
        }

        return this.compile(tpl, options).render(data, options._method);
    };

    typeof(module) !== 'undefined' && module.exports ? module.exports = juicer : this.juicer = juicer;

})();


text:
#ifndef NANAKA_RENDERER_ATTRIBUTE_H
#define NANAKA_RENDERER_ATTRIBUTE_H

#include <functional>
#include <string>
#include <unordered_map>

#include "renderer/GL.h"
#include "renderer/RenderResourceHandle.h"

enum AttributeIdentifier
{
	PositionAttributeIdentifier,
	TexcoordAttributeIdentifier,
};

struct AttributeDescription
{
	AttributeIdentifier m_identifier;
	GLuint m_num;
};

struct Attribute
{
	AttributeDescription m_desc;
	RenderResourceHandle m_handle;
};

#if defined(__clang__)
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wmismatched-tags"
#endif // defined(__clang__)

namespace std {
template<>
struct hash<AttributeIdentifier> {
public:
	size_t operator()(const AttributeIdentifier& identifier) const
	{
		return std::hash<int>()(identifier);
	}
};
} // namespace std

#if defined(__clang__)
#pragma clang diagnostic pop
#endif // defined(__clang__)

static const std::unordered_map<std::string, AttributeIdentifier>
s_attributeNameIdentifierLookup =
	{
		{"position", PositionAttributeIdentifier},
		{"texcoord", TexcoordAttributeIdentifier},
	};

#endif // NANAKA_RENDERER_ATTRIBUTE_H


text:
using Infusion.LegacyApi;
using InjectionScript.Runtime;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Objects = InjectionScript.Runtime.State.Objects;

namespace Infusion.Injection.Avalonia.InjectionObjects
{
    public sealed class InjectionObjectServices : IInjectionObjectServices
    {
        private readonly Objects injectionObjects;
        private readonly InjectionApiUO injectionApi;
        private readonly Legacy legacy;

        public event Action<string> KeyAdded
        {
            add => injectionObjects.KeyAdded += value;
            remove => injectionObjects.KeyAdded -= value;
        }

        public event Action<string> KeyRemoved
        {
            add => injectionObjects.KeyRemoved += value;
            remove => injectionObjects.KeyRemoved -= value;
        }

        public InjectionObjectServices(Objects injectionObjects, InjectionApiUO injectionApi, Legacy legacy)
        {
            this.injectionObjects = injectionObjects;
            this.injectionApi = injectionApi;
            this.legacy = legacy;
        }

        public void Set(string name, int value) => injectionObjects.Set(name, value);
        public int Get(string name) => injectionObjects.Get(name);
        public IEnumerable<string> GetObjects()
            => injectionObjects.Select(x => x.Key);
        public void Remove(string name) => injectionObjects.Remove(name);

        public void Use(string name) => injectionApi.UseObject(name);
        public void Target(string name) => legacy.Target((ObjectId)Get(name));
        public void Click(string name) => injectionApi.Click(new InjectionValue(name));
        public void WaitTarget(string name) => injectionApi.WaitTargetObject(name);
        public bool TryGet(string name, out int value) => injectionObjects.TryGet(name, out value);
        public Task<int> AskForTarget() => Task.Run(() =>
        {
            var info = legacy.Info();
            if (!info.HasValue || !info.Value.TargetsObject)
                return 0;

            return (int)info.Value.Id.Value;
        });
    }
}


text:
package com.alibaba.otter.node.common.config;

import org.jtester.annotations.SpringBeanByName;
import org.testng.annotations.BeforeClass;
import org.testng.annotations.Test;

import com.alibaba.otter.node.common.BaseOtterTest;
import com.alibaba.otter.shared.common.model.config.channel.Channel;
import com.alibaba.otter.shared.common.model.config.node.Node;

public class ConfigClientServiceIntegration extends BaseOtterTest {

    @SpringBeanByName
    private ConfigClientService configClientService;

    @BeforeClass
    public void initial() {
        System.setProperty("nid", "1");
    }

    @Test
    public void test_node() {
        Node cnode = configClientService.currentNode();
        System.out.println(cnode);
        want.bool(cnode.getId() == 1L).is(true);
        Node fnode = configClientService.findNode(2L);
        System.out.println(fnode);
        want.bool(fnode.getId() == 2L);

        fnode = configClientService.findNode(2L);
        System.out.println(fnode);
        want.bool(fnode.getId() == 2L);
    }

    @Test
    public void test_pipeline() {
        Long channelId = 11L;
        Channel channel = configClientService.findChannel(channelId);
        System.out.println(channel);
        want.number(channel.getId()).isEqualTo(channelId);
    }

}


text:
<assembly xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0 http://maven.apache.org/xsd/assembly-1.1.0.xsd">

  <id>jsdoc</id>
  <includeBaseDirectory>false</includeBaseDirectory>
  <formats>
    <format>zip</format>
  </formats>
  <fileSets>
    <fileSet>
      <directory>${project.build.directory}/api</directory>
      <outputDirectory></outputDirectory>
      <filtered>false</filtered>
    </fileSet>
  </fileSets>
</assembly>


text:
#ifndef LONGRUNNER_H
#define	LONGRUNNER_H

#include <stdint.h>

/* Linked list of longrunner methods */
typedef struct l_method {
    void* function;             /* The longrunner function to execute */
    uint32_t timeout_ms;        /* Timeout to wait befor re-execution */
    struct l_method* next;    /* The next longrunner function */
} longrunner_method;

/**
 * Initialize the longrunners
 */
void longrunner_init();

/**
 * Add a longrunner entrypoint to the longrunner engine.
 * @param function the function to execute.
 * @param timeout the timeout for repetition after it's done.
 */
void longrunner_add(void* function, uint32_t timeout);

/**
 * Start the longrunner threads
 */
void longrunner_start();

/**
 * A longrunner thread entry point
 * @param args the longrunner_method
 */
void* longrunner_thread(void* args);

#endif


text:
'use strict'

var deepEqual = require('deep-equal')
var filter = require('../../common/array/filter')
var find = require('../../common/array/find')

var arrayBuffer = require('array-buffer')
var toBuffer = arrayBuffer.toBuffer

var errors = require('../../common/errors')
var BadRequestError = errors.BadRequestError

var keys = require('../../common/keys')
var primaryKey = keys.primary
var typeKey = keys.type
var isArrayKey = keys.isArray

// For complex types.
var matchCheck = [
  [ Date, function (a, b) { return a.getTime() === b.getTime() } ],
  [ Buffer, function (a, b) { return a.equals(toBuffer(b)) } ],
  [ Object, function (a, b) { return deepEqual(a, b, { strict: true }) } ]
]

// For comparing sort order.
var comparisons = [
  [ Number, function (a, b) { return a - b } ],
  [ String, function (a, b) { return a < b ? -1 : a > b ? 1 : 0 } ],
  [ Boolean, function (a, b) { return a === b ? 0 : a ? 1 : -1 } ],
  [ Date, function (a, b) { return a.getTime() - b.getTime() } ],
  [ Buffer, Buffer.compare ],

  // There is no comparison here that makes sense.
  [ Object, function (a, b) {
    return Object.keys(a).length - Object.keys(b).length
  } ]
]

// Browser-safe ID generation.
exports.generateId = function () {
  return ('00000000' + Math.floor(Math.random() * Math.pow(2, 32))
    .toString(16)).slice(-8)
}

exports.applyOptions = function (count, fields, records, options) {
  var i, j, record, field, recordFields, isInclude, isExclude

  if (!options) options = {}

  if ('match' in options) {
    records = filter(records, matchByField(fields, options.match))
    count = records.length
  }

  if ('fields' in options) {
    isInclude = !find(Object.keys(options.fields),
      function (field) { return !options.fields[field] })
    isExclude = !find(Object.keys(options.fields),
      function (field) { return options.fields[field] })

    if (!isInclude && !isExclude)
      throw new BadRequestError('Fields format is invalid.')

    for (i = records.length; i--;) {
      record = records[i]
      recordFields = Object.keys(record)
      for (j = recordFields.length; j--;) {
        field = recordFields[j]
        if (field === primaryKey) continue
        if ((isInclude && !(field in options.fields)) ||
          (isExclude && field in options.fields))
          delete record[field]
      }
    }
  }

  if ('sort' in options)
    records = records.sort(compare(fields, options.sort))

  if ('limit' in options || 'offset' in options)
    records = records.slice(options.offset,
      options.offset && options.limit ?
      options.offset + options.limit : options.limit)

  records.count = count

  return records
}

function check (type, a, b) {
  var matcher
  if (b === null) return a === null
  matcher = find(matchCheck, function (pair) {
    return pair[0] === type
  })
  return matcher ? matcher[1](a, b) : a === b
}

function checkValue (fieldDefinition, a) {
  return function (b) {
    return fieldDefinition[isArrayKey] ?
      find(a, function (a) {
        return check(fieldDefinition[typeKey], b, a)
      }) : check(fieldDefinition[typeKey], b, a)
  }
}

function matchByField (fields, match) {
  var keys = Object.keys(match)
  var i, field, matches

  return function (record) {
    for (i = keys.length; i--;) {
      field = keys[i]
      matches = match[field]
      if (!Array.isArray(match[field])) matches = [ matches ]
      if (undefined === find(matches, checkValue(fields[field], record[field])))
        return false
    }

    return true
  }
}

function findKey (key) {
  return function (pair) {
    return pair[0] === key
  }
}

function compare (fields, sort) {
  var keys = Object.keys(sort)
  var i, j, field, a, b, isAscending,
    fieldDefinition, fieldIsArray, fieldType, result

  return function (x, y) {
    for (i = 0, j = keys.length; i < j; i++) {
      field = keys[i]
      a = x[field]
      b = y[field]
      isAscending = sort[field]
      fieldDefinition = fields[field]
      fieldIsArray = fieldDefinition[isArrayKey]
      fieldType = fieldDefinition[typeKey]

      if (a === null) return isAscending ? -1 : 1
      if (b === null) return isAscending ? 1 : -1

      result = 0

      if (fieldIsArray) result = a.length - b.length
      else if (fieldType)
        result = find(comparisons, findKey(fieldType))[1](a, b)

      if (result === 0) continue

      return isAscending ? result : -result
    }

    return 0
  }
}


text:
// Generated by the protocol buffer compiler.  DO NOT EDIT!
// source: google/ads/googleads/v10/resources/media_file.proto

package com.google.ads.googleads.v10.resources;

public interface MediaFileOrBuilder extends
    // @@protoc_insertion_point(interface_extends:google.ads.googleads.v10.resources.MediaFile)
    com.google.protobuf.MessageOrBuilder {

  /**
   *

   * Immutable. The resource name of the media file.
   * Media file resource names have the form:
   * `customers/{customer_id}/mediaFiles/{media_file_id}`
   *

   *
   * string resource_name = 1 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... }
   * @return The resourceName.
   */
  java.lang.String getResourceName();
  /**
   *

   * Immutable. The resource name of the media file.
   * Media file resource names have the form:
   * `customers/{customer_id}/mediaFiles/{media_file_id}`
   *

   *
   * string resource_name = 1 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... }
   * @return The bytes for resourceName.
   */
  com.google.protobuf.ByteString
      getResourceNameBytes();

  /**
   *

   * Output only. The ID of the media file.
   *

   *
   * optional int64 id = 12 [(.google.api.field_behavior) = OUTPUT_ONLY];
   * @return Whether the id field is set.
   */
  boolean hasId();
  /**
   *

   * Output only. The ID of the media file.
   *

   *
   * optional int64 id = 12 [(.google.api.field_behavior) = OUTPUT_ONLY];
   * @return The id.
   */
  long getId();

  /**
   *

   * Immutable. Type of the media file.
   *

   *
   * .google.ads.googleads.v10.enums.MediaTypeEnum.MediaType type = 5 [(.google.api.field_behavior) = IMMUTABLE];
   * @return The enum numeric value on the wire for type.
   */
  int getTypeValue();
  /**
   *

   * Immutable. Type of the media file.
   *

   *
   * .google.ads.googleads.v10.enums.MediaTypeEnum.MediaType type = 5 [(.google.api.field_behavior) = IMMUTABLE];
   * @return The type.
   */
  com.google.ads.googleads.v10.enums.MediaTypeEnum.MediaType getType();

  /**
   *

   * Output only. The mime type of the media file.
   *

   *
   * .google.ads.googleads.v10.enums.MimeTypeEnum.MimeType mime_type = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
   * @return The enum numeric value on the wire for mimeType.
   */
  int getMimeTypeValue();
  /**
   *

   * Output only. The mime type of the media file.
   *

   *
   * .google.ads.googleads.v10.enums.MimeTypeEnum.MimeType mime_type = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
   * @return The mimeType.
   */
  com.google.ads.googleads.v10.enums.MimeTypeEnum.MimeType getMimeType();

  /**
   *

   * Immutable. The URL of where the original media file was downloaded from (or a file
   * name). Only used for media of type AUDIO and IMAGE.
   *

   *
   * optional string source_url = 13 [(.google.api.field_behavior) = IMMUTABLE];
   * @return Whether the sourceUrl field is set.
   */
  boolean hasSourceUrl();
  /**
   *

   * Immutable. The URL of where the original media file was downloaded from (or a file
   * name). Only used for media of type AUDIO and IMAGE.
   *

   *
   * optional string source_url = 13 [(.google.api.field_behavior) = IMMUTABLE];
   * @return The sourceUrl.
   */
  java.lang.String getSourceUrl();
  /**
   *

   * Immutable. The URL of where the original media file was downloaded from (or a file
   * name). Only used for media of type AUDIO and IMAGE.
   *

   *
   * optional string source_url = 13 [(.google.api.field_behavior) = IMMUTABLE];
   * @return The bytes for sourceUrl.
   */
  com.google.protobuf.ByteString
      getSourceUrlBytes();

  /**
   *

   * Immutable. The name of the media file. The name can be used by clients to help
   * identify previously uploaded media.
   *

   *
   * optional string name = 14 [(.google.api.field_behavior) = IMMUTABLE];
   * @return Whether the name field is set.
   */
  boolean hasName();
  /**
   *

   * Immutable. The name of the media file. The name can be used by clients to help
   * identify previously uploaded media.
   *

   *
   * optional string name = 14 [(.google.api.field_behavior) = IMMUTABLE];
   * @return The name.
   */
  java.lang.String getName();
  /**
   *

   * Immutable. The name of the media file. The name can be used by clients to help
   * identify previously uploaded media.
   *

   *
   * optional string name = 14 [(.google.api.field_behavior) = IMMUTABLE];
   * @return The bytes for name.
   */
  com.google.protobuf.ByteString
      getNameBytes();

  /**
   *

   * Output only. The size of the media file in bytes.
   *

   *
   * optional int64 file_size = 15 [(.google.api.field_behavior) = OUTPUT_ONLY];
   * @return Whether the fileSize field is set.
   */
  boolean hasFileSize();
  /**
   *

   * Output only. The size of the media file in bytes.
   *

   *
   * optional int64 file_size = 15 [(.google.api.field_behavior) = OUTPUT_ONLY];
   * @return The fileSize.
   */
  long getFileSize();

  /**
   *

   * Immutable. Encapsulates an Image.
   *

   *
   * .google.ads.googleads.v10.resources.MediaImage image = 3 [(.google.api.field_behavior) = IMMUTABLE];
   * @return Whether the image field is set.
   */
  boolean hasImage();
  /**
   *

   * Immutable. Encapsulates an Image.
   *

   *
   * .google.ads.googleads.v10.resources.MediaImage image = 3 [(.google.api.field_behavior) = IMMUTABLE];
   * @return The image.
   */
  com.google.ads.googleads.v10.resources.MediaImage getImage();
  /**
   *

   * Immutable. Encapsulates an Image.
   *

   *
   * .google.ads.googleads.v10.resources.MediaImage image = 3 [(.google.api.field_behavior) = IMMUTABLE];
   */
  com.google.ads.googleads.v10.resources.MediaImageOrBuilder getImageOrBuilder();

  /**
   *

   * Immutable. A ZIP archive media the content of which contains HTML5 assets.
   *

   *
   * .google.ads.googleads.v10.resources.MediaBundle media_bundle = 4 [(.google.api.field_behavior) = IMMUTABLE];
   * @return Whether the mediaBundle field is set.
   */
  boolean hasMediaBundle();
  /**
   *

   * Immutable. A ZIP archive media the content of which contains HTML5 assets.
   *

   *
   * .google.ads.googleads.v10.resources.MediaBundle media_bundle = 4 [(.google.api.field_behavior) = IMMUTABLE];
   * @return The mediaBundle.
   */
  com.google.ads.googleads.v10.resources.MediaBundle getMediaBundle();
  /**
   *

   * Immutable. A ZIP archive media the content of which contains HTML5 assets.
   *

   *
   * .google.ads.googleads.v10.resources.MediaBundle media_bundle = 4 [(.google.api.field_behavior) = IMMUTABLE];
   */
  com.google.ads.googleads.v10.resources.MediaBundleOrBuilder getMediaBundleOrBuilder();

  /**
   *

   * Output only. Encapsulates an Audio.
   *

   *
   * .google.ads.googleads.v10.resources.MediaAudio audio = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];
   * @return Whether the audio field is set.
   */
  boolean hasAudio();
  /**
   *

   * Output only. Encapsulates an Audio.
   *

   *
   * .google.ads.googleads.v10.resources.MediaAudio audio = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];
   * @return The audio.
   */
  com.google.ads.googleads.v10.resources.MediaAudio getAudio();
  /**
   *

   * Output only. Encapsulates an Audio.
   *

   *
   * .google.ads.googleads.v10.resources.MediaAudio audio = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];
   */
  com.google.ads.googleads.v10.resources.MediaAudioOrBuilder getAudioOrBuilder();

  /**
   *

   * Immutable. Encapsulates a Video.
   *

   *
   * .google.ads.googleads.v10.resources.MediaVideo video = 11 [(.google.api.field_behavior) = IMMUTABLE];
   * @return Whether the video field is set.
   */
  boolean hasVideo();
  /**
   *

   * Immutable. Encapsulates a Video.
   *

   *
   * .google.ads.googleads.v10.resources.MediaVideo video = 11 [(.google.api.field_behavior) = IMMUTABLE];
   * @return The video.
   */
  com.google.ads.googleads.v10.resources.MediaVideo getVideo();
  /**
   *

   * Immutable. Encapsulates a Video.
   *

   *
   * .google.ads.googleads.v10.resources.MediaVideo video = 11 [(.google.api.field_behavior) = IMMUTABLE];
   */
  com.google.ads.googleads.v10.resources.MediaVideoOrBuilder getVideoOrBuilder();

  public com.google.ads.googleads.v10.resources.MediaFile.MediatypeCase getMediatypeCase();
}


text:
'use strict';

Object.defineProperty(exports, "__esModule", {
  value: true
});

var _extends2 = require('babel-runtime/helpers/extends');

var _extends3 = _interopRequireDefault(_extends2);

var _easing = require('./easing');

var _easing2 = _interopRequireDefault(_easing);

var _plugins = require('./plugins');

var _plugins2 = _interopRequireDefault(_plugins);

var _StylePlugin = require('./plugin/StylePlugin');

var _StylePlugin2 = _interopRequireDefault(_StylePlugin);

var _styleUtils = require('style-utils');

var _util = require('./util.js');

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }

var DEFAULT_EASING = 'easeInOutQuad'; /* eslint-disable func-names */
/**
 * Created by jljsj on 16/1/27.
 */

var DEFAULT_DURATION = 450;
var DEFAULT_DELAY = 0;
function noop() {}
_plugins2["default"].push(_StylePlugin2["default"]);
// 设置默认数据
function defaultData(vars, now) {
  return {
    duration: vars.duration || vars.duration === 0 ? vars.duration : DEFAULT_DURATION,
    delay: vars.delay || DEFAULT_DELAY,
    ease: typeof vars.ease === 'function' ? vars.ease : _easing2["default"][vars.ease || DEFAULT_EASING],
    onUpdate: vars.onUpdate || noop,
    onComplete: vars.onComplete || noop,
    onStart: vars.onStart || noop,
    onRepeat: vars.onRepeat || noop,
    repeat: vars.repeat || 0,
    repeatDelay: vars.repeatDelay || 0,
    yoyo: vars.yoyo || false,
    type: vars.type || 'to',
    initTime: now,
    appearTo: typeof vars.appearTo === 'number' ? vars.appearTo : null
  };
}

var timeLine = function timeLine(target, toData, props) {
  this.target = target;
  this.attr = props.attr || 'style';
  this.willChange = props.willChange;
  // 记录总时间;
  this.totalTime = 0;
  // 记录当前时间;
  this.progressTime = 0;
  // 记录时间轴数据;
  this.defaultData = [];
  // 每个的开始数据;
  this.start = {};
  // 记录动画开始;
  this.onStart = {};
  // 开始默认的数据;
  this.startDefaultData = {};
  // 动画过程
  this.tween = {};
  // toData;
  this.data = toData;
  // 每帧的时间;
  this.perFrame = Math.round(1000 / 60);
  // 注册,第一次进入执行注册
  this.register = false;
  // 设置 style
  var data = this.setAttrIsStyle();
  // 设置默认动画数据;
  this.setDefaultData(data);
};
var p = timeLine.prototype;
p.setAttrIsStyle = function () {
  var _this = this;

  var data = [];
  this.data.forEach(function (d, i) {
    var _d = (0, _extends3["default"])({}, d);
    if (_this.attr === 'style') {
      data[i] = {};
      Object.keys(_d).forEach(function (key) {
        if (key in defaultData({}, 0)) {
          data[i][key] = _d[key];
          delete _d[key];
        }
      });
      data[i].style = _d;
      _this.startDefaultData.style = _this.target.getAttribute('style');
    } else if (_this.attr === 'attr') {
      Object.keys(_d).forEach(function (key) {
        if (key === 'style' && Array.isArray(d[key])) {
          throw new Error('Style should be the object.');
        }
        if (key === 'bezier') {
          _d.style = (0, _extends3["default"])({}, _d.style, { bezier: _d[key] });
          delete _d[key];
          _this.startDefaultData.style = _this.target.getAttribute('style');
        } else {
          _this.startDefaultData[key] = _this.target.getAttribute(key);
        }
      });
      data[i] = _d;
    }
  });
  return data;
};
p.setDefaultData = function (_vars) {
  var _this2 = this;

  var now = 0;
  var repeatMax = false;
  var data = _vars.map(function (item) {
    var appearToBool = typeof item.appearTo === 'number';
    // 加上延时,在没有播放过时;
    if (!appearToBool) {
      now += item.delay || 0;
    }
    var appearToTime = (item.appearTo || 0) + (item.delay || 0);
    // 获取默认数据
    var tweenData = defaultData(item, appearToBool ? appearToTime : now);
    tweenData.vars = {};
    Object.keys(item).forEach(function (_key) {
      if (!(_key in tweenData)) {
        var _data = item[_key];
        if (_key in _plugins2["default"]) {
          tweenData.vars[_key] = new _plugins2["default"][_key](_this2.target, _data, tweenData.type);
        } else if (_key.match(/color/i) || _key === 'stroke' || _key === 'fill') {
          tweenData.vars[_key] = { type: 'color', vars: (0, _styleUtils.parseColor)(_data) };
        } else if (typeof _data === 'number' || _data.split(/[,|\s]/g).length <= 1) {
          var vars = parseFloat(_data);
          var unit = _data.toString().replace(/[^a-z|%]/g, '');
          var count = _data.toString().replace(/[^+|=|-]/g, '');
          tweenData.vars[_key] = { unit: unit, vars: vars, count: count };
        } else if ((_key === 'd' || _key === 'points') && 'SVGMorph' in _plugins2["default"]) {
          tweenData.vars[_key] = new _plugins2["default"].SVGMorph(_this2.target, _data, _key);
        }
      }
    });
    if (tweenData.yoyo && !tweenData.repeat) {
      console.warn('Warning: yoyo must be used together with repeat;'); // eslint-disable-line
    }
    if (tweenData.repeat === -1) {
      repeatMax = true;
    }
    var repeat = tweenData.repeat === -1 ? 0 : tweenData.repeat;
    if (appearToBool) {
      // 如果有 appearTo 且这条时间比 now 大时,,总时间用这条;
      var appearNow = item.appearTo + (item.delay || 0) + tweenData.duration * (repeat + 1) + tweenData.repeatDelay * repeat;
      now = appearNow >= now ? appearNow : now;
    } else {
      if (tweenData.delay < -tweenData.duration) {
        // 如果延时小于 负时间时,,不加,再减回延时;
        now -= tweenData.delay;
      } else {
        // repeat 为 -1 只记录一次。不能跟 reverse 同时使用;
        now += tweenData.duration * (repeat + 1) + tweenData.repeatDelay * repeat;
      }
    }
    tweenData.mode = '';
    return tweenData;
  });
  this.totalTime = repeatMax ? Number.MAX_VALUE : now;
  this.defaultData = data;
};
p.getComputedStyle = function () {
  return document.defaultView ? document.defaultView.getComputedStyle(this.target) : {};
};
p.getAnimStartData = function (item) {
  var _this3 = this;

  var start = {};
  this.computedStyle = this.computedStyle || this.getComputedStyle();
  Object.keys(item).forEach(function (_key) {
    if (_key in _plugins2["default"] || _this3.attr === 'attr' && (_key === 'd' || _key === 'points')) {
      start[_key] = item[_key].getAnimStart(_this3.computedStyle, _this3.willChange);
      return;
    }
    if (_this3.attr === 'attr') {
      // 除了d和这points外的标签动画;
      var attribute = _this3.target.getAttribute(_key);
      var data = attribute === 'null' || !attribute ? 0 : attribute;
      if (_key.match(/color/i) || _key === 'stroke' || _key === 'fill') {
        data = !data && _key === 'stroke' ? 'rgba(255, 255, 255, 0)' : data;
        data = (0, _styleUtils.parseColor)(data);
        start[_key] = data;
      } else if (parseFloat(data) || parseFloat(data) === 0 || data === 0) {
        var unit = data.toString().replace(/[^a-z|%]/g, '');
        start[_key] = unit !== item[_key].unit ? (0, _util.startConvertToEndUnit)(_this3.target, _key, parseFloat(data), unit, item[_key].unit) : parseFloat(data);
      }
      return;
    }
    start[_key] = _this3.target[_key] || 0;
  });
  return start;
};
p.setAnimData = function (data) {
  var _this4 = this;

  Object.keys(data).forEach(function (key) {
    if (key in _plugins2["default"] || _this4.attr === 'attr' && (key === 'd' || key === 'points')) {
      return;
    }
    _this4.target[key] = data[key];
  });
};
p.setRatio = function (ratio, endData, i) {
  var _this5 = this;

  Object.keys(endData.vars).forEach(function (_key) {
    if (_key in _plugins2["default"] || _this5.attr === 'attr' && (_key === 'd' || _key === 'points')) {
      endData.vars[_key].setRatio(ratio, _this5.tween);
      return;
    }
    var endVars = endData.vars[_key];
    var startVars = _this5.start[i][_key];
    var data = void 0;
    if (_this5.attr === 'attr') {
      // 除了d和这points外的标签动画;
      if (!endVars.type) {
        data = endVars.unit.charAt(1) === '=' ? startVars + endVars.vars * ratio + endVars.unit : (endVars.vars - startVars) * ratio + startVars + endVars.unit;
        _this5.target.setAttribute(_key, data);
      } else if (endVars.type === 'color') {
        if (endVars.vars.length === 3 && startVars.length === 4) {
          endVars.vars[3] = 1;
        }
        data = endVars.vars.map(function (_endData, _i) {
          var startData = startVars[_i] || 0;
          return (_endData - startData) * ratio + startData;
        });
        _this5.target.setAttribute(_key, (0, _styleUtils.getColor)(data));
      }
    }
  });
  this.setAnimData(this.tween);
};
p.render = function () {
  var _this6 = this;

  this.defaultData.forEach(function (item, i) {
    var initTime = item.initTime;
    var duration = (0, _styleUtils.toFixed)(item.duration);
    // 处理 yoyo 和 repeat; yoyo 是在时间轴上的, 并不是倒放
    var repeatNum = Math.ceil((_this6.progressTime - initTime) / (duration + item.repeatDelay)) - 1;
    repeatNum = repeatNum < 0 ? 0 : repeatNum;
    if (item.repeat) {
      if (item.repeat < repeatNum && item.repeat !== -1) {
        return;
      }
      if (item.repeat || item.repeat <= repeatNum) {
        initTime = initTime + repeatNum * (duration + item.repeatDelay);
      }
    }
    var startData = item.yoyo && repeatNum % 2 || item.type === 'from' ? 1 : 0;
    var endData = item.yoyo && repeatNum % 2 || item.type === 'from' ? 0 : 1;
    //  精度损失,只取小数点后10位。
    var progressTime = (0, _styleUtils.toFixed)(_this6.progressTime - initTime);

    var ratio = void 0;

    // 开始注册;
    // from 时需先执行参数位置;
    var fromDelay = item.type === 'from' ? item.delay : 0;
    if (progressTime + fromDelay >= 0) {
      if (!_this6.start[i]) {
        // 设置 start
        _this6.start[i] = _this6.getAnimStartData(item.vars);
        if (progressTime < _this6.perFrame) {
          ratio = !item.duration && !item.delay ? item.ease(1, startData, endData, 1) : item.ease(0, startData, endData, 1);
          _this6.setRatio(ratio, item, i);
        } else if (progressTime > duration) {
          ratio = item.ease(1, startData, endData, 1);
          _this6.setRatio(ratio, item, i);
        }
        if (!_this6.register) {
          _this6.register = true;
          if (progressTime === 0) {
            return;
          }
        }
      }
    }

    var e = {
      index: i,
      target: _this6.target
    };

    if (progressTime >= 0 && !(progressTime > duration && item.mode === 'onComplete')) {
      var updateAnim = _this6.updateAnim === 'update';
      if (progressTime >= duration) {
        ratio = item.ease(1, startData, endData, 1);
        _this6.setRatio(ratio, item, i);
        if (item.mode !== 'reset' && !updateAnim) {
          item.onComplete(e);
        }
        item.mode = 'onComplete';
      } else if (progressTime < _this6.perFrame) {
        ratio = item.ease(0, startData, endData, 1);
        _this6.setRatio(ratio, item, i);
        // 将第一帧作动画开始 start;
        if (!updateAnim) {
          if (item.repeat && repeatNum > 0) {
            item.mode = 'onRepeat';
            item.onRepeat((0, _extends3["default"])({}, e, { repeatNum: repeatNum }));
          } else {
            item.mode = 'onStart';
            item.onStart(e);
          }
        }
      } else if (progressTime > 0 && progressTime < duration) {
        item.mode = 'onUpdate';
        ratio = item.ease(progressTime, startData, endData, duration);
        _this6.setRatio(ratio, item, i);
        if (!updateAnim) {
          item.onUpdate((0, _extends3["default"])({ ratio: ratio }, e));
        }
      }
      if (!updateAnim) {
        _this6.onChange((0, _extends3["default"])({
          moment: _this6.progressTime,
          mode: item.mode
        }, e));
      }
    }
  });
};
// 播放帧
p.frame = function (moment) {
  this.progressTime = moment;
  this.render();
};
p.resetAnimData = function () {
  this.tween = {};
  this.start = {};
  this.onStart = {};
};

p.resetDefaultStyle = function () {
  var _this7 = this;

  this.tween = {};
  this.defaultData = this.defaultData.map(function (item) {
    item.mode = 'reset';
    return item;
  });
  Object.keys(this.startDefaultData).forEach(function (key) {
    if (!(key in defaultData({}, 0))) {
      _this7.target.setAttribute(key, _this7.startDefaultData[key]);
    }
  });
};

p.reStart = function (style) {
  var _this8 = this;

  this.start = {};
  Object.keys(style).forEach(function (key) {
    _this8.target.style[key] = (0, _styleUtils.stylesToCss)(key, style[key]);
  });
  this.setAttrIsStyle();
  this.resetDefaultStyle();
};

p.onChange = noop;
exports["default"] = timeLine;
module.exports = exports['default'];


text:
if ENV["COVERAGE"] == "true"
  require 'simplecov'
  require 'coveralls'

  SimpleCov.formatter = SimpleCov::Formatter::MultiFormatter.new([
    SimpleCov::Formatter::HTMLFormatter,
    Coveralls::SimpleCov::Formatter
  ])

  SimpleCov.start do
    command_name 'spec'
    add_filter 'spec'
  end
end

require 'tty-platform'

RSpec.configure do |config|
  config.expect_with :rspec do |expectations|
    expectations.include_chain_clauses_in_custom_matcher_descriptions = true
  end

  config.mock_with :rspec do |mocks|
    mocks.verify_partial_doubles = true
  end

  config.filter_run :focus
  config.run_all_when_everything_filtered = true

  config.disable_monkey_patching!

  config.warnings = true

  if config.files_to_run.one?
    config.default_formatter = 'doc'
  end

  config.profile_examples = 2

  config.order = :random

  Kernel.srand config.seed
end


text:
class LandingsController < ApplicationController
  layout 'landing'
  def index
  	if member_signed_in?
			# redirect_to member_dashboard_path(current_member)
			  redirect_to  member_dashboard_path
	end
  end

  def contactus
  	info = ContactUs.new(contact_params)
  	if info.save
  		render text: "true"
  	else
  		render text: "false"
  	end
  end

 protected
  def contact_params
  	params.permit(:name, :email, :subject, :message)
  end
end


text:
Statistics

                             Area Wise Statics

                             Ticket Status Statics

                             Asset Wise Statics

                         Month wise ticket analysis

                                        {{chartType}}

                            <input type="checkbox"
                                   ng-click="gridCheckBoxPE()">
                                Show
                                Grid


text:
package org.apache.cassandra.db.commitlog;

import java.io.IOException;
import java.nio.ByteBuffer;
import java.util.Map;
import javax.crypto.Cipher;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import org.apache.cassandra.config.DatabaseDescriptor;
import org.apache.cassandra.io.FSWriteError;
import org.apache.cassandra.io.compress.BufferType;
import org.apache.cassandra.io.compress.ICompressor;
import org.apache.cassandra.security.EncryptionUtils;
import org.apache.cassandra.security.EncryptionContext;
import org.apache.cassandra.utils.Hex;

import static org.apache.cassandra.security.EncryptionUtils.ENCRYPTED_BLOCK_HEADER_SIZE;

/**
 * Writes encrypted segments to disk. Data is compressed before encrypting to (hopefully) reduce the size of the data into
 * the encryption algorithms.
 *
 * The format of the encrypted commit log is as follows:
 * - standard commit log header (as written by {@link CommitLogDescriptor#writeHeader(ByteBuffer, CommitLogDescriptor)})
 * - a series of 'sync segments' that are written every time the commit log is sync()'ed
 * -- a sync section header, see {@link CommitLogSegment#writeSyncMarker(long, ByteBuffer, int, int, int)}
 * -- total plain text length for this section
 * -- a series of encrypted data blocks, each of which contains:
 * --- the length of the encrypted block (cipher text)
 * --- the length of the unencrypted data (compressed text)
 * --- the encrypted block, which contains:
 * ---- the length of the plain text (raw) data
 * ---- block of compressed data
 *
 * Notes:
 * - "length of the unencrypted data" is different from the length of resulting decrypted buffer as encryption adds padding
 * to the output buffer, and we need to ignore that padding when processing.
 */
public class EncryptedSegment extends FileDirectSegment
{
    private static final Logger logger = LoggerFactory.getLogger(EncryptedSegment.class);

    private static final int ENCRYPTED_SECTION_HEADER_SIZE = SYNC_MARKER_SIZE + 4;

    private final EncryptionContext encryptionContext;
    private final Cipher cipher;

    public EncryptedSegment(CommitLog commitLog, AbstractCommitLogSegmentManager manager)
    {
        super(commitLog, manager);
        this.encryptionContext = commitLog.configuration.getEncryptionContext();

        try
        {
            cipher = encryptionContext.getEncryptor();
        }
        catch (IOException e)
        {
            throw new FSWriteError(e, logFile);
        }
        logger.debug("created a new encrypted commit log segment: {}", logFile);
        // Keep reusable buffers on-heap regardless of compression preference so we avoid copy off/on repeatedly during decryption
        manager.getBufferPool().setPreferredReusableBufferType(BufferType.ON_HEAP);
    }

    protected Map<String, String> additionalHeaderParameters()
    {
        Map<String, String> map = encryptionContext.toHeaderParameters();
        map.put(EncryptionContext.ENCRYPTION_IV, Hex.bytesToHex(cipher.getIV()));
        return map;
    }

    ByteBuffer createBuffer(CommitLog commitLog)
    {
        // Note: we want to keep the compression buffers on-heap as we need those bytes for encryption,
        // and we want to avoid copying from off-heap (compression buffer) to on-heap encryption APIs
        return manager.getBufferPool().createBuffer(BufferType.ON_HEAP);
    }

    void write(int startMarker, int nextMarker)
    {
        int contentStart = startMarker + SYNC_MARKER_SIZE;
        final int length = nextMarker - contentStart;
        // The length may be 0 when the segment is being closed.
        assert length > 0 || length == 0 && !isStillAllocating();

        final ICompressor compressor = encryptionContext.getCompressor();
        final int blockSize = encryptionContext.getChunkLength();
        try
        {
            ByteBuffer inputBuffer = buffer.duplicate();
            inputBuffer.limit(contentStart + length).position(contentStart);
            ByteBuffer buffer = manager.getBufferPool().getThreadLocalReusableBuffer(DatabaseDescriptor.getCommitLogSegmentSize());

            // save space for the sync marker at the beginning of this section
            final long syncMarkerPosition = lastWrittenPos;
            channel.position(syncMarkerPosition + ENCRYPTED_SECTION_HEADER_SIZE);

            // loop over the segment data in encryption buffer sized chunks
            while (contentStart < nextMarker)
            {
                int nextBlockSize = nextMarker - blockSize > contentStart ? blockSize : nextMarker - contentStart;
                ByteBuffer slice = inputBuffer.duplicate();
                slice.limit(contentStart + nextBlockSize).position(contentStart);

                buffer = EncryptionUtils.compress(slice, buffer, true, compressor);

                // reuse the same buffer for the input and output of the encryption operation
                buffer = EncryptionUtils.encryptAndWrite(buffer, channel, true, cipher);

                contentStart += nextBlockSize;
                manager.addSize(buffer.limit() + ENCRYPTED_BLOCK_HEADER_SIZE);
            }

            lastWrittenPos = channel.position();

            // rewind to the beginning of the section and write out the sync marker
            buffer.position(0).limit(ENCRYPTED_SECTION_HEADER_SIZE);
            writeSyncMarker(id, buffer, 0, (int) syncMarkerPosition, (int) lastWrittenPos);
            buffer.putInt(SYNC_MARKER_SIZE, length);
            buffer.rewind();
            manager.addSize(buffer.limit());

            channel.position(syncMarkerPosition);
            channel.write(buffer);
        }
        catch (Exception e)
        {
            throw new FSWriteError(e, getPath());
        }
    }

    public long onDiskSize()
    {
        return lastWrittenPos;
    }
}


text:
package rlVizLib.messaging.environment;

import rlVizLib.messaging.AbstractMessage;
import rlVizLib.messaging.AbstractResponse;
import rlVizLib.messaging.GenericMessage;
import rlVizLib.messaging.MessageUser;
import rlVizLib.messaging.MessageValueType;
import rlVizLib.messaging.NotAnRLVizMessageException;

public class EnvVisualizerNameResponse extends AbstractResponse{
	String theVisualizerClassName=null;

	private void setVisualizerName(String theVisualizerClassName){
		this.theVisualizerClassName=theVisualizerClassName;
	}

	public EnvVisualizerNameResponse(String theVisualizerClassName){
		this.theVisualizerClassName=theVisualizerClassName;
	}

	static public EnvVisualizerNameResponse EnvVisualizerNameResponseFromResponseString(String responseMessage) throws NotAnRLVizMessageException {
		GenericMessage theGenericResponse = new GenericMessage(responseMessage);
		String theVisualizerClassName=theGenericResponse.getPayload();

		EnvVisualizerNameResponse theResponse=new EnvVisualizerNameResponse(theVisualizerClassName);
		return theResponse;
	}

	@Override
	public String makeStringResponse() {
		StringBuffer thePayLoadBuffer= new StringBuffer();

		thePayLoadBuffer.append(theVisualizerClassName);

		String theResponse=AbstractMessage.makeMessage(
				MessageUser.kBenchmark.id(),
				MessageUser.kEnv.id(),
				EnvMessageType.kEnvResponse.id(),
				MessageValueType.kStringList.id(),
				thePayLoadBuffer.toString());

		return theResponse;

}

	public String getTheVisualizerClassName() {
		return theVisualizerClassName;
	}

};


text:
<!DOCTYPE html>

    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta name="description" content="">
    <meta name="author" content="">

    <title>Three.js UVs</title>


text:
describe('EditFileView', function() {
  var f = support.factories;

  it('renders configurationEditorInputs of file type', function() {
    var fileType = f.fileType({
      configurationEditorInputs: [
        {name: 'custom', inputView: pageflow.TextInputView}
      ]
    });
    var view = new pageflow.EditFileView({
      model: f.file({}, {
        fileType: fileType
      }),
      entry: new Backbone.Model()
    });

    view.render();
    var configurationEditor = support.dom.ConfigurationEditor.find(view);

    expect(configurationEditor.inputPropertyNames()).to.contain('custom');
  });

  it('supports function for configurationEditorInputs option of file type', function() {
    var inputsFunction = sinon.spy(function(model) {
      return [
        {name: 'custom', inputView: pageflow.TextInputView}
      ];
    });
    var fileType = f.fileType({
      configurationEditorInputs: inputsFunction
    });
    var model = f.file({}, {
      fileType: fileType
    });
    var view = new pageflow.EditFileView({
      model: model,
      entry: new Backbone.Model()
    });

    view.render();
    var configurationEditor = support.dom.ConfigurationEditor.find(view);

    expect(configurationEditor.inputPropertyNames()).to.contain('custom');
    expect(inputsFunction).to.have.been.calledWith(model);
  });
});


text: This is a work-in-progress package for our new PFS API.


text:
namespace content {
class BrowserContext;
}  // namespace content

using ContentId = offline_items_collection::ContentId;

// Class for managing all the OfflineModels for a profile.
class OfflineItemModelManager : public KeyedService {
 public:
  // Constructs a OfflineItemModelManager.
  explicit OfflineItemModelManager(content::BrowserContext* browser_context);
  ~OfflineItemModelManager() override;

  // Returns the OfflineItemModel for the ContentId, if not found, an empty
  // OfflineItemModel will be created and returned.
  OfflineItemModelData* GetOrCreateOfflineItemModelData(const ContentId& id);

  void RemoveOfflineItemModelData(const ContentId& id);

  content::BrowserContext* browser_context() { return browser_context_; }

 private:
  content::BrowserContext* browser_context_;
  std::map<ContentId, std::unique_ptr<OfflineItemModelData>>
      offline_item_model_data_;

  DISALLOW_COPY_AND_ASSIGN(OfflineItemModelManager);
};

#endif  // CHROME_BROWSER_DOWNLOAD_OFFLINE_ITEM_MODEL_MANAGER_H_


text:
function(atom_to_literal_assignments f atom_assignments)
  map_import_properties(${f} atom_index_map atom_literal_identity_map atom_literal_negated_map)

  map_keys(${atom_assignments})
  ans(atoms)
  map_new()
  ans(result)
  foreach(atom ${atoms})
    map_tryget(${atom_index_map} ${atom})
    ans(ai)
    map_tryget(${atom_literal_identity_map} ${ai})
    ans(li)
    map_tryget(${atom_literal_negated_map} ${ai})
    ans(li_negated)
    map_tryget(${atom_assignments} ${atom})
    ans(value)
    eval_truth(NOT value)
    ans(value_negated)
    map_set(${result} ${li} ${value})
    map_set(${result} ${li_negated} ${value_negated})
  endforeach()
  return_ref(result)
endfunction()


text:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using MyStik.TimeTable.Data;

namespace MyStik.TimeTable.Web.Services
{
    public class ActivityDateService
    {

        private TimeTableDbContext _db = null;

        /// <summary>
        ///
        /// </summary>
        public ActivityDateService()
        {
        }

        /// <summary>
        ///
        /// </summary>
        /// <param name="db"></param>
        public ActivityDateService(TimeTableDbContext db)
        {
            _db = db;
        }

        private TimeTableDbContext Db
        {
            get { return _db ?? (_db = new TimeTableDbContext()); }
        }

        public ICollection<ActivityDate> GetDates(DateTime atDateTime, ActivityOrganiser forOrganiser)
        {
            var nowPlaying = Db.ActivityDates.Where(d =>
                    (d.Begin <= atDateTime && atDateTime <= d.End) &&                             // alles an diesem Tag
                    (d.Activity.SemesterGroups.Any(g =>                                         // alles was Zugehörigkeit zu einer Semestergruppe hat
                         g.CapacityGroup != null &&
                         g.CapacityGroup.CurriculumGroup.Curriculum.Organiser.Id == forOrganiser.Id) ||
                     (d.Activity.Organiser.Id == forOrganiser.Id)                                     // alle Raumreservierungen, Sprechstunden
                    ))
                .OrderBy(d => d.Begin).ThenBy(d => d.End).ToList();

            return nowPlaying;
        }
    }
}


text:
// Fig. 2.16: fig02_16.cpp
// Counter-controlled repetition.
#include <iostream>

using std::cout;
using std::endl;

// function main begins program execution
int main()
{
   int counter = 1;             // initialization

   while ( counter <= 10 ) {    // repetition condition
      cout << counter << endl;  // display counter
      ++counter;                // increment

   } // end while

   return 0;                    // successful termination

} // end function main


text:
<?xml version="1.0" encoding="utf-8"?>

<prefs>

  <osx>
    <!-- defaults are for initial values and restoration of defaults -->
    <!-- do not edit the default element unless you know what
         you're doing; edit the user element -->
    <default>
      <dot>
        <dotpath>/usr/local/bin/dot</dotpath>
        <dotflag>ps</dotflag>
        <viewer>/usr/bin/open -a /Applications/Preview.app/Contents/MacOS/Preview</viewer>
      </dot>
    </default>
    <user>
      <dot>
        <dotpath></dotpath>
        <dotflag></dotflag>
        <viewer></viewer>
      </dot>
    </user>
  </osx>

  <linux>
    <!-- defaults are for initial values and restoration of defaults -->
    <!-- do not edit the default element unless you know what
         you're doing; edit the user element -->
    <default>
      <dot>
        <dotpath>/usr/bin/dot</dotpath>
        <dotflag>ps</dotflag>
        <viewer>/usr/bin/evince</viewer> <!-- for Gnome -->
      </dot>
    </default>
    <user>
      <dot>
        <dotpath></dotpath>
        <dotflag></dotflag>
        <viewer></viewer>  <!-- for KDE, put /usr/bin/kghostview here -->
      </dot>
    </user>
  </linux>

  <windows>
    <!-- defaults are for initial values and restoration of defaults -->
    <!-- do not edit the default element unless you know what
         you're doing; edit the user element -->
    <default>
      <dot>
        <dotpath>%ProgramFiles(x86)%\Graphviz2.26.3\bin\dot.exe</dotpath>
        <dotflag>pdf</dotflag>
        <viewer>%ProgramFiles(x86)%\Adobe\Reader 9.0\Reader\AcroRd32.exe</viewer>
      </dot>
    </default>
    <user>
      <dot>
        <dotpath></dotpath>
        <dotflag></dotflag>
        <viewer></viewer>
      </dot>
    </user>
  </windows>

</prefs>


text:
module CssCompare
  module Util
    class << self
      # Returns a file's path relative to the Less2Sass root directory.
      #
      # @param file [String] The filename relative to the Less2Sass root
      # @return [String] The filename relative to the the working directory
      def scope(file)
        File.join(CssCompare::ROOT_DIR, file)
      end
    end
  end
end


text:
- Sieger z.B. als Nachricht anzeigen
- Kein Neueinstieg, keine Wiederbelebung (Geist ...)
- Spielfigur muss beim Verlassen/Verbindungsabbruch im Spiel bleiben

### Kleine Welt
- Spielgeschehen irgendwie mit zunehmender Zeit weiter ins Zentrum verlagern

### Zentraler Spawn:
- Wartezeit vor Beginn, Bewegung möglich oder mit Tod bestraft
 - auf kreisförmig verteilten Plattformen um die Mitte
- Lager mit hilfreichen/wichtigen Gegenständen
  - regelmäßig Nachschub
- Rucksäcke mit Startgegenständen (mehr oder weniger nützlich) um den Start herum

### Sehr kurze Jahreszeiten
### Endgegner und Hunde einsetzen, um gewünschten Ablauf zu fördern (z.B. Morde bestrafen)
### Keine Pfeile/Markierungen auf Spieler
### Versteckmöglichkeiten, z.B. in Büschen oder auf Bäumen, die bei Benutzung aber Vernunft senken oder Hunger stärken
### Feuerschein stark erweitern, um auf große Entfernungen nachts Spieler wegen dem Feuer finden zu können
### Absolute Dunkelheit sollte nicht tödlich sein, aber Vernunft stark senken
- Nähe von anderen Spielern erhöht Vernunft (ja/nein?)
### Alle Forschungen freischalten, sobald das entsprechende Forschungsgebäude gebaut wurde (ja/nein?)
### Inventar/Stapelplätze verkleinern (ja/nein?)

## Andere Mods
- http://steamcommunity.com/sharedfiles/filedetails/?id=662394344 Eigener Spielmodus und Verbot der Wiederbelebung
- http://steamcommunity.com/sharedfiles/filedetails/?id=731166487 Statistik über Tode, vlt. dann auch über Spieleranzahl
- http://steamcommunity.com/sharedfiles/filedetails/?id=492173795 Serververwaltung: Bans etc., vlt. nachträglicher Einstieg verhinderbar
- http://steamcommunity.com/sharedfiles/filedetails/?id=378160973 Spielersymbole verstecken
- http://steamcommunity.com/sharedfiles/filedetails/?id=398570591 Variable Stapelgröße
- http://steamcommunity.com/sharedfiles/filedetails/?id=404161345
- http://steamcommunity.com/sharedfiles/filedetails/?id=385650867 Spieler lösen Fallen aus
- http://steamcommunity.com/sharedfiles/filedetails/?id=474285910 Neuer Spielmodus, der vieles verändert, aber kaum Gemeinsamkeiten hat


text:
Facter.add('windows_systemtype') do
  confine :kernel => :windows

  systemtype = "unknown"
  begin

    if RUBY_PLATFORM.downcase.include?('mswin') or RUBY_PLATFORM.downcase.include?('mingw32')
      systemtype = Facter::Util::Resolution.exec('wmic ComputerSystem get SystemType | FindStr /i x')
      systemtype.gsub!(/-based PC/,'')
      systemtype.gsub!(/\s/,'')
      systemtype.downcase!
    end
  rescue

  end

  setcode do
    systemtype
  end
end


text:
{% extends 'base.html' %}

{% load static %}
{% load i18n %}

{% block title %}
  {% trans 'Main page' %}
{% endblock %}

{% block extra_css %}
<link rel="stylesheet" href="{% static 'css/sss.css' %}" />
{% endblock %}

{% block content %}

{% if category %}{{ category.name }}{% else %}Товари{% endif %}

    {% for product in products %}

          {{ product.name }}
{{ product.model_name }}

{{ product.price }} грн.

    {% if forloop.counter|divisibleby:"4" %}

    {% endif %}
    {% endfor %}

{% endblock %}


text:
/* Dependencies. */
const all = require('rebber/dist/all')

/* Expose. */
module.exports = notes

const defaultMacro = (identifier, text, protect) => {
  const footnote = `${protect ? '\\protect' : ''}\\footnote[${identifier}]{${text}}`

  return footnote
}

function autoId (node) {
  const {line, column, offset} = node.position.start
  return `l${line}c${column}o${offset}`
}

/* Stringify a footnote `node`. */
function notes (ctx, node) {
  const macro = ctx.footnote || defaultMacro
  const protect = Boolean(node.inHeading)

  const identifier = autoId(node)

  return macro(identifier, all(ctx, node).trim(), protect)
}


text:
package org.apache.drill.exec.vector;

import org.apache.drill.common.types.Types;
import org.apache.drill.exec.expr.ClassGenerator;
import org.apache.drill.exec.record.TypedFieldId;
import org.apache.drill.exec.record.VectorAccessible;
import org.apache.drill.exec.record.VectorWrapper;

import com.sun.codemodel.JExpr;
import com.sun.codemodel.JExpression;
import com.sun.codemodel.JVar;

public class CopyUtil {
  public static void generateCopies(ClassGenerator<?> g, VectorAccessible batch, boolean hyper){
    // we have parallel ids for each value vector so we don't actually have to deal with managing the ids at all.
    int fieldId = 0;

    JExpression inIndex = JExpr.direct("inIndex");
    JExpression outIndex = JExpr.direct("outIndex");
    for(VectorWrapper<?> vv : batch) {
      String copyMethod;
      if (!Types.isFixedWidthType(vv.getField().getType()) || Types.isRepeated(vv.getField().getType()) || Types.isComplex(vv.getField().getType())) {
        copyMethod = "copyFromSafe";
      } else {
        copyMethod = "copyFrom";
      }
      g.rotateBlock();
      JVar inVV = g.declareVectorValueSetupAndMember("incoming", new TypedFieldId(vv.getField().getType(), vv.isHyper(), fieldId));
      JVar outVV = g.declareVectorValueSetupAndMember("outgoing", new TypedFieldId(vv.getField().getType(), false, fieldId));

      if(hyper){

        g.getEvalBlock().add(
                outVV
                        .invoke(copyMethod)
                        .arg(
                                inIndex.band(JExpr.lit((int) Character.MAX_VALUE)))
                        .arg(outIndex)
                        .arg(
                                inVV.component(inIndex.shrz(JExpr.lit(16)))
                        )
        );
      }else{
        g.getEvalBlock().add(outVV.invoke(copyMethod).arg(inIndex).arg(outIndex).arg(inVV));
      }

      g.rotateBlock();
      fieldId++;
    }
  }

}


text:
using UnityEngine;
using System.Collections;
using DG.Tweening;

public class LandControl : MonoBehaviour {

    private Sequence landSequence;
	// Use this for initialization
	void Start () {
        // land continue moving
        landSequence = DOTween.Sequence();

        landSequence.Append(transform.DOMoveX(transform.position.x - 0.48f, 0.5f).SetEase(Ease.Linear))
            .Append(transform.DOMoveX(transform.position.x, 0f).SetEase(Ease.Linear))
            .SetLoops(-1);
    }

	// Update is called once per frame
	void Update () {

	}

    public void GameOver()
    {
        landSequence.Kill();
    }
}


text:
/****************************************************************************
 * Included Files
 ****************************************************************************/

#include <nuttx/config.h>

#include <stdint.h>

#include <nuttx/arch.h>
#include <nuttx/board.h>
#include <arch/board/board.h>

#include "hymini_stm32v-internal.h"

#ifdef CONFIG_ARCH_BUTTONS

/****************************************************************************
 * Pre-processor Definitions
 ****************************************************************************/

/****************************************************************************
 * Public Functions
 ****************************************************************************/

/****************************************************************************
 * Name: board_button_initialize
 *
 * Description:
 *   board_button_initialize() must be called to initialize button resources.
 *   After that, board_buttons() may be called to collect the current state of
 *   all buttons or board_button_irq() may be called to register button interrupt
 *   handlers.
 *
 ****************************************************************************/

void board_button_initialize(void)
  {
    stm32_configgpio(GPIO_BTN_KEYA);
    stm32_configgpio(GPIO_BTN_KEYB);
  }

/****************************************************************************
 * Name: board_buttons
 ****************************************************************************/

uint8_t board_buttons(void)
  {
    uint8_t ret = 0;
    bool pinValue;

    /* Check that state of each key */

    /* Pin is pulled up */
    pinValue = stm32_gpioread(GPIO_BTN_KEYA);
    if (!pinValue)
      {
        // Button pressed
        ret = 1 << BUTTON_KEYA;
      }

    /* Pin is pulled down */
    pinValue = stm32_gpioread(GPIO_BTN_KEYB);
    if (pinValue)
      {
        // Button pressed
        ret |= 1 << BUTTON_KEYB;
      }
    return ret;
  }

/****************************************************************************
 * Button support.
 *
 * Description:
 *   board_button_initialize() must be called to initialize button resources.
 *   After that, board_buttons() may be called to collect the current state of
 *   all buttons or board_button_irq() may be called to register button interrupt
 *   handlers.
 *
 *   After board_button_initialize() has been called, board_buttons() may be
 *   called to collect the state of all buttons.  board_buttons() returns an
 *   8-bit bit set with each bit associated with a button.  See the
 *   BUTTON_*_BIT and JOYSTICK_*_BIT definitions in board.h for the meaning
 *  of each bit.
 *
 *   board_button_irq() may be called to register an interrupt handler that will
 *   be called when a button is depressed or released.  The ID value is a
 *   button enumeration value that uniquely identifies a button resource. See
 *   the BUTTON_* definitions in board.h for the meaning of enumeration
 *   value.  The previous interrupt handler address is returned (so that it
 *    may be restored, if so desired).
 *
 ****************************************************************************/

#ifdef CONFIG_ARCH_IRQBUTTONS
xcpt_t board_button_irq(int id, xcpt_t irqhandler)
  {
    xcpt_t oldhandler = NULL;
    uint32_t pinset = GPIO_BTN_KEYA;

    if (id == 1)
      {
        pinset = GPIO_BTN_KEYB;
      }
    if (id < 2)
      {
        oldhandler = stm32_gpiosetevent(pinset, true, true, true, irqhandler);
      }
    return oldhandler;
  }
#endif
#endif /* CONFIG_ARCH_BUTTONS */


text:
namespace BooCompiler.Tests.SupportingClasses
{
	public class ExtendsOverridenBoolOperator : OverrideBoolOperator
	{
		[Boo.Lang.DuckTyped]
		public ExtendsOverridenBoolOperator GetFoo()
		{
			return new ExtendsOverridenBoolOperator();
		}
	}
}


text:
package org.siyuyan.module.web.common;

/**
 * @author whiteme
 * @date 2013年7月23日
 * @desc 系统常量
 */
public class Constant {

	public static int defaultPageSize = 20;
	public static int defaultPageGroup = 10;

	public static final String movieIndex = "movie";
	public static final String type = "0";
	public static final String userIndex = "user";

}


text:
exports.up = function(models) {
    // write your migrate
    return models.users.find({
        adminLevel:-1
    }).then(function(users) {
        var promises = []
        users.forEach(function(user) {
            user.adminFlag.userMng = true
            promises.push(user.save())
        })
        return Promise.all(promises)
    })
}


text:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:id="@+id/app_layout"
    android:orientation="vertical"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:gravity="center"
    android:layout_margin="5dp"
    android:background="@drawable/border_appitem_not_select">

    <ImageView
        android:id="@+id/imv_delete_icon"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_gravity="right|top"
        android:visibility="invisible"
        android:background="@mipmap/app_delete_icon"/>

    <ImageView
        android:id="@+id/imv_item"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:background="@mipmap/ic_launcher"
        android:adjustViewBounds="true"
        android:scaleType="fitXY"/>

    <TextView
        android:id="@+id/tv_item"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginTop="5dp"
        android:ellipsize="end"
        android:maxLines="1"
        android:maxLength="15"/>

</LinearLayout>


text:
package com.ryong21.encode;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import com.ryong21.io.Consumer;

public class Encoder implements Runnable {

	private Logger log = LoggerFactory.getLogger(Encoder.class);
	private volatile int leftSize = 0;
	private final Object mutex = new Object();
	private Speex speex = new Speex();
	private int frameSize;
	private Consumer consumer;
	private byte[] processedData = new byte[1024];
	private short[] rawdata = new short[1024];
	private volatile boolean isRunning;

	public Encoder(Consumer consumer) {
		super();
		this.consumer = consumer;
		speex.init();
		frameSize = speex.getFrameSize();
		log.debug("frameSize {}", frameSize);
	}

	public void run() {

		android.os.Process
				.setThreadPriority(android.os.Process.THREAD_PRIORITY_URGENT_AUDIO);

		int getSize = 0;
		while (this.isRunning()) {
			synchronized (mutex) {
				while (isIdle()) {
					try {
						mutex.wait();
					} catch (InterruptedException e) {
						e.printStackTrace();
					}
				}
			}
			synchronized (mutex) {
				short[] temp = new short[frameSize];
				for (int i = 0; i < temp.length; i++) {
					System.arraycopy(rawdata, i * frameSize, temp, 0, frameSize);
					getSize = speex.encode(temp, 0, processedData, frameSize);
//					log.error("encoded size {}", getSize);
					if (getSize > 0) {
						consumer.putData(System.currentTimeMillis(), processedData, getSize);
					}
				}
			}
			setIdle();
		}
	}

	public void putData(short[] data, int size) {
		synchronized (mutex) {
			System.arraycopy(data, 0, rawdata, 0, size);
			this.leftSize = size;
			mutex.notify();
		}
	}

	public boolean isIdle() {
		return leftSize == 0 ? true : false;
	}

	public void setIdle() {
		leftSize = 0;
	}

	public void setRunning(boolean isRunning) {
		synchronized (mutex) {
			this.isRunning = isRunning;
			if (this.isRunning) {
				mutex.notify();
			}
		}
	}

	public boolean isRunning() {
		synchronized (mutex) {
			return isRunning;
		}
	}
}


text:
import Component from '@glimmer/component';
import getScrollParent from '../utils/get-scroll-parent';
import {action} from '@ember/object';
import {inject as service} from '@ember/service';
export default class GhScrollTrigger extends Component {
    @service inViewport;

    @action
    setupInViewport(element) {
        this.loaderElement = element;

        let viewportTolerance = this.args.triggerOffset || {};

        // if triggerOffset is a number we use it for all dimensions
        if (typeof viewportTolerance === 'number') {
            viewportTolerance = {
                top: viewportTolerance,
                bottom: viewportTolerance,
                left: viewportTolerance,
                right: viewportTolerance
            };
        }

        let options = {
            viewportSpy: true,
            viewportTolerance,
            scrollableArea: this.args.scrollable || getScrollParent(element)
        };

        let {onEnter, onExit} = this.inViewport.watchElement(element, options);

        onEnter(this.didEnterViewport.bind(this));
        onExit(this.didExitViewport.bind(this));

        this.args.registerElement?.(element);
    }

    didEnterViewport() {
        this.args.enter?.();
    }

    didExitViewport() {
        this.args.exit?.();
    }

    @action
    teardownInViewport(element) {
        this.inViewport.stopWatching(element);
    }
}


text:
env response header
--SKIPIF--
<?php include "skipif.inc"; ?>
--FILE--
<?php

http\Env::setResponseCode(201);

http\Env::setResponseHeader("No", "way");
http\Env::setResponseHeader("Foo", "bar");
http\Env::setResponseHeader("No", null);
http\Env::setResponseHeader("More", array("than", "what's", "good"));

print_r(http\Env::getResponseCode()); echo "\n";
print_r(http\Env::getResponseHeader("Foo")); echo "\n";
print_r(http\Env::getResponseHeader());
print_r(http\Env::getResponseStatusForCode(201));

--EXPECTHEADERS--
Foo: bar
--EXPECTF--
201
bar
Array
(
    [X-Powered-By] => %s
    [Foo] => bar
    [More] => Array
        (
            [0] => than
            [1] => what's
            [2] => good
        )

    [Content-Type] => %s
)
Created