text:
package com.pzybrick.iote2e.stream.persist;

import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Timestamp;

import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.openmhealth.schema.domain.omh.DataPointHeader;
import org.openmhealth.schema.domain.omh.PhysicalActivity;

/**
 * The Class HkWorkoutVo.
 */
public class HkWorkoutVo extends OmhVo  {

	/** The Constant logger. */
	private static final Logger logger = LogManager.getLogger(HkWorkoutVo.class);

	/** The hk workout uuid. */
	private String hkWorkoutUuid;

	/** The effective time frame. */
	private Timestamp effectiveTimeFrame;

	/** The user notes. */
	private String userNotes;

	/** The activity name. */
	private String activityName;

	/** The distance unit. */
	private String distanceUnit;

	/** The distance value. */
	private int distanceValue;

	/** The kcal burned unit. */
	private String kcalBurnedUnit;

	/** The kcal burned value. */
	private int kcalBurnedValue;

	/** The insert ts. */
	private Timestamp insertTs;

	/**
	 * Instantiates a new hk workout vo.
	 */
	public HkWorkoutVo() {
	}

	/**
	 * Instantiates a new hk workout vo.
	 *
	 * @param header the header
	 * @param hkWorkout the hk workout
	 * @throws SQLException the SQL exception
	 */
	public HkWorkoutVo( DataPointHeader header, PhysicalActivity hkWorkout ) throws SQLException {
		this.hkWorkoutUuid = header.getId();
		setHeaderCommon(header);
		this.effectiveTimeFrame = new Timestamp( offsetDateTimeToMillis( hkWorkout.getEffectiveTimeFrame().getDateTime() ));
		this.userNotes = hkWorkout.getUserNotes();
		this.activityName = hkWorkout.getActivityName();
		this.distanceUnit = hkWorkout.getDistance().getUnit();
		this.distanceValue = hkWorkout.getDistance().getValue().intValue();
		this.kcalBurnedUnit = hkWorkout.getCaloriesBurned().getUnit();
		this.kcalBurnedValue = hkWorkout.getCaloriesBurned().getValue().intValue();
	}

	/**
	 * Instantiates a new hk workout vo.
	 *
	 * @param rs the rs
	 * @throws SQLException the SQL exception
	 */
	public HkWorkoutVo(ResultSet rs) throws SQLException {
		this.hkWorkoutUuid = rs.getString("hk_workout_uuid");
		this.hdrSourceName = rs.getString("hdr_source_name");
		this.hdrSourceCreationDateTime = rs.getTimestamp("hdr_source_creation_date_time");
		this.hdrUserId = rs.getString("hdr_user_id");
		this.hdrModality = rs.getString("hdr_modality");
		this.hdrSchemaNamespace = rs.getString("hdr_schema_namespace");
		this.hdrSchemaVersion = rs.getString("hdr_schema_version");
		this.effectiveTimeFrame = rs.getTimestamp("effective_time_frame");
		this.userNotes = rs.getString("user_notes");
		this.activityName = rs.getString("activity_name");
		this.distanceUnit = rs.getString("distance_unit");
		this.distanceValue = rs.getInt("distance_value");
		this.kcalBurnedUnit = rs.getString("kcal_burned_unit");
		this.kcalBurnedValue = rs.getInt("kcal_burned_value");
		this.insertTs = rs.getTimestamp("insert_ts");
	}

	/**
	 * Gets the hk workout uuid.
	 *
	 * @return the hk workout uuid
	 */
	public String getHkWorkoutUuid() {
		return this.hkWorkoutUuid;
	}

	/**
	 * Gets the effective time frame.
	 *
	 * @return the effective time frame
	 */
	public Timestamp getEffectiveTimeFrame() {
		return this.effectiveTimeFrame;
	}

	/**
	 * Gets the user notes.
	 *
	 * @return the user notes
	 */
	public String getUserNotes() {
		return this.userNotes;
	}

	/**
	 * Gets the activity name.
	 *
	 * @return the activity name
	 */
	public String getActivityName() {
		return this.activityName;
	}

	/**
	 * Gets the distance unit.
	 *
	 * @return the distance unit
	 */
	public String getDistanceUnit() {
		return this.distanceUnit;
	}

	/**
	 * Gets the distance value.
	 *
	 * @return the distance value
	 */
	public int getDistanceValue() {
		return this.distanceValue;
	}

	/**
	 * Gets the kcal burned unit.
	 *
	 * @return the kcal burned unit
	 */
	public String getKcalBurnedUnit() {
		return this.kcalBurnedUnit;
	}

	/**
	 * Gets the kcal burned value.
	 *
	 * @return the kcal burned value
	 */
	public int getKcalBurnedValue() {
		return this.kcalBurnedValue;
	}

	/**
	 * Gets the insert ts.
	 *
	 * @return the insert ts
	 */
	public Timestamp getInsertTs() {
		return this.insertTs;
	}

	/**
	 * Sets the hk workout uuid.
	 *
	 * @param hkWorkoutUuid the hk workout uuid
	 * @return the hk workout vo
	 */
	public HkWorkoutVo setHkWorkoutUuid( String hkWorkoutUuid ) {
		this.hkWorkoutUuid = hkWorkoutUuid;
		return this;
	}

	/**
	 * Sets the effective time frame.
	 *
	 * @param effectiveTimeFrame the effective time frame
	 * @return the hk workout vo
	 */
	public HkWorkoutVo setEffectiveTimeFrame( Timestamp effectiveTimeFrame ) {
		this.effectiveTimeFrame = effectiveTimeFrame;
		return this;
	}

	/**
	 * Sets the user notes.
	 *
	 * @param userNotes the user notes
	 * @return the hk workout vo
	 */
	public HkWorkoutVo setUserNotes( String userNotes ) {
		this.userNotes = userNotes;
		return this;
	}

	/**
	 * Sets the activity name.
	 *
	 * @param activityName the activity name
	 * @return the hk workout vo
	 */
	public HkWorkoutVo setActivityName( String activityName ) {
		this.activityName = activityName;
		return this;
	}

	/**
	 * Sets the distance unit.
	 *
	 * @param distanceUnit the distance unit
	 * @return the hk workout vo
	 */
	public HkWorkoutVo setDistanceUnit( String distanceUnit ) {
		this.distanceUnit = distanceUnit;
		return this;
	}

	/**
	 * Sets the distance value.
	 *
	 * @param distanceValue the distance value
	 * @return the hk workout vo
	 */
	public HkWorkoutVo setDistanceValue( int distanceValue ) {
		this.distanceValue = distanceValue;
		return this;
	}

	/**
	 * Sets the kcal burned unit.
	 *
	 * @param kcalBurnedUnit the kcal burned unit
	 * @return the hk workout vo
	 */
	public HkWorkoutVo setKcalBurnedUnit( String kcalBurnedUnit ) {
		this.kcalBurnedUnit = kcalBurnedUnit;
		return this;
	}

	/**
	 * Sets the kcal burned value.
	 *
	 * @param kcalBurnedValue the kcal burned value
	 * @return the hk workout vo
	 */
	public HkWorkoutVo setKcalBurnedValue( int kcalBurnedValue ) {
		this.kcalBurnedValue = kcalBurnedValue;
		return this;
	}

	/**
	 * Sets the insert ts.
	 *
	 * @param insertTs the insert ts
	 * @return the hk workout vo
	 */
	public HkWorkoutVo setInsertTs( Timestamp insertTs ) {
		this.insertTs = insertTs;
		return this;
	}

	/**
	 * Sets the hdr source name.
	 *
	 * @param hdrSourceName the hdr source name
	 * @return the hk workout vo
	 */
	public HkWorkoutVo setHdrSourceName(String hdrSourceName) {
		this.hdrSourceName = hdrSourceName;
		return this;
	}

	/**
	 * Sets the hdr source creation date time.
	 *
	 * @param hdrSourceCreationDateTime the hdr source creation date time
	 * @return the hk workout vo
	 */
	public HkWorkoutVo setHdrSourceCreationDateTime(Timestamp hdrSourceCreationDateTime) {
		this.hdrSourceCreationDateTime = hdrSourceCreationDateTime;
		return this;
	}

	/**
	 * Sets the hdr user id.
	 *
	 * @param hdrUserId the hdr user id
	 * @return the hk workout vo
	 */
	public HkWorkoutVo setHdrUserId(String hdrUserId) {
		this.hdrUserId = hdrUserId;
		return this;
	}

	/**
	 * Sets the hdr modality.
	 *
	 * @param hdrModality the hdr modality
	 * @return the hk workout vo
	 */
	public HkWorkoutVo setHdrModality(String hdrModality) {
		this.hdrModality = hdrModality;
		return this;
	}

	/**
	 * Sets the hdr schema namespace.
	 *
	 * @param hdrSchemaNamespace the hdr schema namespace
	 * @return the hk workout vo
	 */
	public HkWorkoutVo setHdrSchemaNamespace(String hdrSchemaNamespace) {
		this.hdrSchemaNamespace = hdrSchemaNamespace;
		return this;
	}

	/**
	 * Sets the hdr schema version.
	 *
	 * @param hdrSchemaVersion the hdr schema version
	 * @return the hk workout vo
	 */
	public HkWorkoutVo setHdrSchemaVersion(String hdrSchemaVersion) {
		this.hdrSchemaVersion = hdrSchemaVersion;
		return this;
	}
}

// HkWorkoutVo hkWorkoutVo = new HkWorkoutVo()
//	 .setHkWorkoutUuid("xxx")
//	 .setHdrSourceName("xxx")
//	 .setHdrSourceCreationDateTime("xxx")
//	 .setHdrUserId("xxx")
//	 .setHdrModality("xxx")
//	 .setHdrSchemaNamespace("xxx")
//	 .setHdrSchemaVersion("xxx")
//	 .setEffectiveTimeFrame("xxx")
//	 .setUserNotes("xxx")
//	 .setActivityName("xxx")
//	 .setDistanceUnit("xxx")
//	 .setDistanceValue("xxx")
//	 .setKcalBurnedUnit("xxx")
//	 .setKcalBurnedValue("xxx")
//	 .setInsertTs("xxx")
//	 ;


text:
from abc import abstractmethod

from mycroft.plugin.base_plugin import BasePlugin
from mycroft.package_cls import Package

class TransformerPlugin(BasePlugin):
    """
    Class used to modify package states.
    For example, to replace a .dialog file with actual translated lines
    Add new attributes in the *constructor* with: self.rt.package.add_struct({'myattr': int})
    """
    @abstractmethod
    def process(self, p: Package):
        """Modify attributes in package"""
        pass

redpajama_set_name: RedPajamaGithub


text:
module Jekyll
  module Label
    class Main < Liquid::Tag
      Syntax = /^\s*([^\s]+)(?:\s+(\d+)\s+(\d+)\s*)?/
      def initialize(tag_name, input, tokens)
        super
        if input =~ Syntax then
          @input = input
        else
          raise "[label.rb] Warning! Parameter for content not incorporated or incorrect."
        end
      end
      def render(context)
        # Split the input variable (omitting error checking)
        input_split = split_params(@input)
        skill = input_split[0].strip
        fsize = input_split[1].strip
        # Write the output HTML string
        %(#{skill})
      end
      def split_params(params)
        params.split("|")
      end
    end
  end
end
Liquid::Template.register_tag('label', Jekyll::Label::Main)


text:
// Copyright 2000-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
package org.jetbrains.plugins.groovy.util;

import com.intellij.openapi.components.PersistentStateComponentWithModificationTracker;
import com.intellij.openapi.project.Project;
import com.intellij.openapi.util.text.StringUtil;
import com.intellij.openapi.vfs.JarFileSystem;
import com.intellij.openapi.vfs.StandardFileSystems;
import com.intellij.openapi.vfs.VirtualFile;
import com.intellij.psi.PsiManager;
import com.intellij.psi.impl.PsiModificationTrackerImpl;
import com.intellij.util.containers.ContainerUtil;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;

import java.util.ArrayList;
import java.util.Collections;
import java.util.List;

/**
 * @author peter
 */
public abstract class SdkHomeSettings implements PersistentStateComponentWithModificationTracker<SdkHomeBean> {
  private final PsiModificationTrackerImpl myTracker;
  private SdkHomeBean mySdkHome = null;

  protected SdkHomeSettings(@NotNull Project project) {
    myTracker = (PsiModificationTrackerImpl)PsiManager.getInstance(project).getModificationTracker();
  }

  @Override
  public long getStateModificationCount() {
    SdkHomeBean sdkHome = mySdkHome;
    return sdkHome == null ? 0 : sdkHome.getModificationCount();
  }

  @Override
  public SdkHomeBean getState() {
    return mySdkHome;
  }

  @Override
  public void loadState(@NotNull SdkHomeBean state) {
    SdkHomeBean oldState = mySdkHome;
    mySdkHome = state;
    // do not increment on a first load
    if (oldState != null && !StringUtil.equals(oldState.getSdkHome(), state.getSdkHome())) {
      myTracker.incCounter();
    }
  }

  @Nullable
  private static VirtualFile calcHome(@Nullable SdkHomeBean state) {
    if (state == null) {
      return null;
    }

    final String sdk_home = state.getSdkHome();
    if (StringUtil.isEmpty(sdk_home)) {
      return null;
    }

    return StandardFileSystems.local().findFileByPath(sdk_home);
  }

  @Nullable
  public VirtualFile getSdkHome() {
    return calcHome(mySdkHome);
  }

  public List<VirtualFile> getClassRoots() {
    return calcRoots(getSdkHome());
  }

  private static List<VirtualFile> calcRoots(@Nullable VirtualFile home) {
    if (home == null) return Collections.emptyList();

    VirtualFile lib = home.findChild("lib");
    if (lib == null) return Collections.emptyList();

    List<VirtualFile> result = new ArrayList<>();
    for (VirtualFile file : lib.getChildren()) {
      if ("jar".equals(file.getExtension())) {
        ContainerUtil.addIfNotNull(result, JarFileSystem.getInstance().getRootByLocal(file));
      }
    }
    return result;
  }
}


text:
import { purify } from './purify';

export class PurifyPlugin {
  constructor() { }

  public apply(compiler: any): void {
    compiler.plugin('compilation', (compilation: any) => {
      compilation.plugin('optimize-chunk-assets', (chunks: any, callback: any) => {
        chunks.forEach((chunk: any) => {
          chunk.files.filter((fileName: string) => fileName.endsWith('.bundle.js')).forEach((fileName: string) => {
            const purifiedSource = purify(compilation.assets[fileName].source());
            compilation.assets[fileName]._cachedSource = purifiedSource;
            compilation.assets[fileName]._source.source = () => purifiedSource;
          });
        });
        callback();
      });
    });
  }
}


text:
#ifndef NGHTTP2_PQ_H
#define NGHTTP2_PQ_H

#ifdef HAVE_CONFIG_H
#include <config.h>
#endif /* HAVE_CONFIG_H */

#include <nghttp2/nghttp2.h>
#include "nghttp2_int.h"
#include "nghttp2_mem.h"

/* Implementation of priority queue */

typedef struct {
  size_t index;
} nghttp2_pq_entry;

typedef struct {
  /* The pointer to the pointer to the item stored */
  nghttp2_pq_entry **q;
  /* Memory allocator */
  nghttp2_mem *mem;
  /* The number of items stored */
  size_t length;
  /* The maximum number of items this pq can store. This is
     automatically extended when length is reached to this value. */
  size_t capacity;
  /* The less function between items */
  nghttp2_less less;
} nghttp2_pq;

/*
 * Initializes priority queue |pq| with compare function |cmp|.
 *
 * This function returns 0 if it succeeds, or one of the following
 * negative error codes:
 *
 * NGHTTP2_ERR_NOMEM
 *     Out of memory.
 */
int nghttp2_pq_init(nghttp2_pq *pq, nghttp2_less less, nghttp2_mem *mem);

/*
 * Deallocates any resources allocated for |pq|.  The stored items are
 * not freed by this function.
 */
void nghttp2_pq_free(nghttp2_pq *pq);

/*
 * Adds |item| to the priority queue |pq|.
 *
 * This function returns 0 if it succeeds, or one of the following
 * negative error codes:
 *
 * NGHTTP2_ERR_NOMEM
 *     Out of memory.
 */
int nghttp2_pq_push(nghttp2_pq *pq, nghttp2_pq_entry *item);

/*
 * Returns item at the top of the queue |pq|. If the queue is empty,
 * this function returns NULL.
 */
nghttp2_pq_entry *nghttp2_pq_top(nghttp2_pq *pq);

/*
 * Pops item at the top of the queue |pq|. The popped item is not
 * freed by this function.
 */
void nghttp2_pq_pop(nghttp2_pq *pq);

/*
 * Returns nonzero if the queue |pq| is empty.
 */
int nghttp2_pq_empty(nghttp2_pq *pq);

/*
 * Returns the number of items in the queue |pq|.
 */
size_t nghttp2_pq_size(nghttp2_pq *pq);

typedef int (*nghttp2_pq_item_cb)(nghttp2_pq_entry *item, void *arg);

/*
 * Updates each item in |pq| using function |fun| and re-construct
 * priority queue. The |fun| must return non-zero if it modifies the
 * item in a way that it affects ordering in the priority queue. The
 * |arg| is passed to the 2nd parameter of |fun|.
 */
void nghttp2_pq_update(nghttp2_pq *pq, nghttp2_pq_item_cb fun, void *arg);

/*
 * Applys |fun| to each item in |pq|.  The |arg| is passed as arg
 * parameter to callback function.  This function must not change the
 * ordering key.  If the return value from callback is nonzero, this
 * function returns 1 immediately without iterating remaining items.
 * Otherwise this function returns 0.
 */
int nghttp2_pq_each(nghttp2_pq *pq, nghttp2_pq_item_cb fun, void *arg);

/*
 * Removes |item| from priority queue.
 */
void nghttp2_pq_remove(nghttp2_pq *pq, nghttp2_pq_entry *item);

#endif /* NGHTTP2_PQ_H */


text:
#ifndef CONTEXT_H_
#define CONTEXT_H_

/**
 * \ingroup CABAC
 * \file
 * Context derivation for CABAC.
 */

#include "cabac.h"
#include "encoderstate.h"
#include "global.h" // IWYU pragma: keep

// Functions
void kvz_ctx_init(cabac_ctx_t* ctx, uint32_t qp, uint32_t init_value);
void kvz_init_contexts(encoder_state_t *state, int8_t QP, int8_t slice);

void kvz_context_copy(encoder_state_t * target_state, const encoder_state_t * source_state);
int32_t kvz_context_calc_pattern_sig_ctx( const uint32_t *sig_coeff_group_flag, uint32_t pos_x, uint32_t pos_y, int32_t width);

uint32_t kvz_context_get_sig_coeff_group( uint32_t *sig_coeff_group_flag,uint32_t pos_x, uint32_t pos_y,int32_t width);

int32_t kvz_context_get_sig_ctx_inc(int32_t pattern_sig_ctx,uint32_t scan_idx,int32_t pos_x,
                                int32_t pos_y,int32_t block_type, int8_t texture_type);

#define CNU 154

#endif


text:
package org.tylproject.vaadin.addon.datanav.events;

import com.vaadin.util.ReflectTools;
import org.tylproject.vaadin.addon.datanav.DataNavigation;

import java.io.Serializable;
import java.lang.reflect.Method;

/**
 * Created by evacchi on 19/11/14.
 */
public class BeforeCommit {
    public static class Event extends CrudEvent implements Serializable {
        public Event(DataNavigation source) {
            super(source);
        }
    }

    public static interface Listener extends java.io.Serializable {
        public static final Method METHOD =
                ReflectTools.findMethod(Listener.class,
                        "beforeCommit", Event.class);
        public void beforeCommit(Event event);
    }

    public static interface Notifier extends Serializable {
        void addBeforeCommitListener(Listener listener);
        void removeBeforeCommitListener(Listener listener);
    }
}


text:
<?xml version='1.0' encoding='utf-8'?>
<widget id="io.intercom.cordova.sample" version="0.0.1" xmlns="http://www.w3.org/ns/widgets" xmlns:android="schemas.android.com/apk/res/android" xmlns:cdv="http://cordova.apache.org/ns/1.0">
    <name>Intercom Cordova</name>
    <description>
        An Intercom sample application for Cordova.
    </description>
    <author email="team@intercom.com" href="http://intercom.com">
        Brian Boyle
    </author>
    <content src="index.html" />
    <access origin="*" />
    <allow-intent href="http://*/*" />
    <allow-intent href="https://*/*" />
    <allow-intent href="tel:*" />
    <allow-intent href="sms:*" />
    <allow-intent href="mailto:*" />
    <allow-intent href="geo:*" />
    <platform name="android">
        <allow-intent href="market:*" />
        <preference name="android-minSdkVersion" value="22" />
        <preference name="android-targetSdkVersion" value="31" />
        <preference name="android-compileSdkVersion" value="31" />
        <edit-config file="app/src/main/AndroidManifest.xml" mode="merge" target="/manifest/application/activity[@android:name='MainActivity']">
            <activity android:exported="true" />
        </edit-config>
        <preference name="AndroidXEnabled" value="true" />
        <icon density="hdpi" src="www/img/android/hdpi.png" />
        <icon density="mdpi" src="www/img/android/mdpi.png" />
        <icon density="xhdpi" src="www/img/android/xhdpi.png" />
        <icon density="xxhdpi" src="www/img/android/xxhdpi.png" />
        <icon density="xxxhdpi" src="www/img/android/xxxhdpi.png" />
    </platform>
    <platform name="ios">
        <allow-intent href="itms:*" />
        <allow-intent href="itms-apps:*" />
        <preference name="deployment-target" value="13.0" />
        <preference name="BackupWebStorage" value="local" />
        <icon height="29" src="www/img/icon-29.png" width="29" />
        <icon height="58" src="www/img/icon-29@2x.png" width="58" />
        <icon height="87" src="www/img/icon-29@3x.png" width="87" />
        <icon height="180" src="www/img/icon-60@3x.png" width="180" />
        <icon height="60" src="www/img/icon-60.png" width="60" />
        <icon height="120" src="www/img/icon-60@2x.png" width="120" />
        <icon height="76" src="www/img/icon-76.png" width="76" />
        <icon height="152" src="www/img/icon-76@2x.png" width="152" />
        <icon height="40" src="www/img/icon-40.png" width="40" />
        <icon height="80" src="www/img/icon-40@2x.png" width="80" />
        <icon height="167" src="www/img/icon-83.5@2x.png" width="167" />
    </platform>
    <preference name="intercom-app-id" value="YOUR_APP_ID" />
    <preference name="intercom-ios-api-key" value="YOUR_IOS_API_KEY" />
    <preference name="intercom-android-api-key" value="YOUR_ANDROID_API_KEY" />

    <!-- Uncomment to change region -->

    <!-- <config-file target="AndroidManifest.xml" parent="/manifest/application">
        <meta-data android:name="io.intercom.android.sdk.server.region" android:value="@integer/intercom_server_region_aus" />
    </config-file> -->
    <!-- <config-file target="*-Info.plist" parent="IntercomRegion">
        <string>AU</string>
    </config-file> -->
</widget>


text:
"""
Set up Flask stuff
"""
from flask import Blueprint, render_template
from flask import send_from_directory
from flask import request, redirect

from quiz.webapp import questions

from quiz.gcp import spanner

"""
configure blueprint
"""
webapp_blueprint = Blueprint(
    'webapp',
    __name__,
    template_folder='templates',
)

"""
Renders home page
"""
@webapp_blueprint.route('/')
def serve_home():
    return render_template('home.html')

"""
Serves static file with angular client app
"""
@webapp_blueprint.route('/client/')
def serve_client():
    return send_from_directory('webapp/static/client', 'index.html')

"""
Serves static files used by angular client app
"""
@webapp_blueprint.route('/client/<path:path>')
def serve_client_files(path):
    return send_from_directory('webapp/static/client', path)

"""
Handles definition and storage of new questions
- GET method shows question entry form
- POST method save question
"""
@webapp_blueprint.route('/questions/add', methods=['GET', 'POST'])
def add_question():
    if request.method == 'GET':
        return render_template('add.html', question={}, action='Add')
    elif request.method == 'POST':
        data = request.form.to_dict(flat=True)
        image_file = request.files.get('image')
        questions.save_question(data, image_file)
        return redirect('/', code=302)
    else:
        return "Method not supported for /questions/add"

"""
Handles leaderboard
- GET method displays the leaderboard
"""
@webapp_blueprint.route('/leaderboard', methods=['GET'])
def get_leaderboard():
    if request.method == 'GET':
        scores = spanner.get_leaderboard()

        return render_template('leaderboard.html', scores=scores)
    else:
        return "Method not supported for /leaderboard"


text:
Canvas - A QUnit Addon For Testing Canvas Rendering
================================

This addon for QUnit adds a pixelEqual method that allows you to assert
individual pixel values in a given canvas.

Usage:

    pixelEqual(canvas, x, y, r, g, b, a, message)

Where:

  * canvas: Reference to a canvas element
  * x, y: Coordinates of the pixel to test
  * r, g, b, a: The color and opacity value of the pixel that you except
  * message: Optional message, same as for other assertions


text:
var pretty = require("./pretty");
/**
 * New node file
 */
//bii:#entry_point()
pretty.pretty();


text:
/* Slider */
.slick-slider
{
    position: relative;

    display: block;
    box-sizing: border-box;

    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;

    -webkit-touch-callout: none;
    -khtml-user-select: none;
    -ms-touch-action: pan-y;
    touch-action: pan-y;
    -webkit-tap-highlight-color: transparent;
}

.slick-list
{
    position: relative;

    display: block;
    overflow: hidden;

    margin: 0;
    padding: 0;
}
.slick-list:focus
{
    outline: none;
}
.slick-list.dragging
{
    cursor: pointer;
    cursor: hand;
}

.slick-slider .slick-track,
.slick-slider .slick-list
{
    -webkit-transform: translate3d(0, 0, 0);
    -moz-transform: translate3d(0, 0, 0);
    -ms-transform: translate3d(0, 0, 0);
    -o-transform: translate3d(0, 0, 0);
    transform: translate3d(0, 0, 0);
}

.slick-track
{
    position: relative;
    top: 0;
    left: 0;

    display: block;
}
.slick-track:before,
.slick-track:after
{
    display: table;

    content: '';
}
.slick-track:after
{
    clear: both;
}
.slick-loading .slick-track
{
    visibility: hidden;
}

.slick-slide
{
    display: none;
    float: left;

    height: 100%;
    min-height: 1px;
}
[dir='rtl'] .slick-slide
{
    float: right;
}
.slick-slide img
{
    display: block;
}
.slick-slide.slick-loading img
{
    display: none;
}
.slick-slide.dragging img
{
    pointer-events: none;
}
.slick-initialized .slick-slide
{
    display: block;
}
.slick-loading .slick-slide
{
    visibility: hidden;
}
.slick-vertical .slick-slide
{
    display: block;

    height: auto;

    border: 1px solid transparent;
}
.slick-arrow.slick-hidden {
    display: none;
}

.slick-dots li {
    display: inline-block;
    position: relative;
    cursor: pointer;
    height: 8px;
    width: 8px;
    margin: 24px 4px;
    background-color: rgba(33, 150, 243, 0.23);
    transition: background-color .3s;
    border-radius: 50%;
}

.slick-dots li button {
    display: none;
}

.slick-dots li.slick-active {
    background: #2196f3;
}

.material-carousel {
    position: relative;
    width: calc(100% - 80px);
    margin: auto;
}

.material-carousel .carousel-next-arrow, .material-carousel .carousel-prev-arrow {
    position: absolute;
    top: 50%;
    margin-top: -32px;
    width: 28px;
    height: 28px;
    line-height: 28px;
}

.material-carousel .carousel-next-arrow i, .material-carousel .carousel-prev-arrow i {
    line-height: 28px;
}

.material-carousel .carousel-next-arrow {
    right: -44px;
}

.material-carousel .carousel-prev-arrow {
    left: -44px;
}

.material-carousel ul.slick-dots {
    text-align: center;
}


text:
package com.vaadin.tests.widgetset.client;

import com.google.gwt.dom.client.DivElement;
import com.google.gwt.dom.client.Document;
import com.google.gwt.dom.client.Element;
import com.google.gwt.dom.client.Style;
import com.google.gwt.dom.client.Style.BorderStyle;
import com.google.gwt.dom.client.Style.Unit;
import com.google.gwt.event.dom.client.ClickEvent;
import com.google.gwt.event.dom.client.ClickHandler;
import com.google.gwt.user.client.ui.Widget;
import com.vaadin.client.WidgetUtil;

public class WidgetUtilTestWidget extends Widget {

    private Element noBorderPadding;
    private Element border;
    private Element padding;
    private Element borderPadding;
    private DivElement result;
    private boolean inline;
    private DivElement root;

    public WidgetUtilTestWidget() {
        Document doc = Document.get();

        root = doc.createDivElement();
        root.addClassName("v-widget-util-test");
        setElement(root);

        addDomHandler(new ClickHandler() {
            @Override
            public void onClick(ClickEvent event) {
                showSizes();
            }
        }, ClickEvent.getType());
    }

    public void construct(boolean inline) {
        this.inline = inline;

        noBorderPadding = createElement();

        border = createElement();
        setBorder(border);

        padding = createElement();
        setPadding(padding);

        borderPadding = createElement();
        setBorder(borderPadding);
        setPadding(borderPadding);

        root.appendChild(noBorderPadding);
        root.appendChild(border);
        root.appendChild(padding);
        root.appendChild(borderPadding);

        result = Document.get().createDivElement();
        result.addClassName("result");
        result.getStyle().setWidth(500, Unit.PX);
        root.appendChild(result);
    }

    private void setBorder(Element e) {
        Style borderStyle = e.getStyle();
        borderStyle.setBorderStyle(BorderStyle.SOLID);
        borderStyle.setBorderWidth(1.8, Unit.PX);
    }

    private void setPadding(Element e) {
        Style borderStyle = e.getStyle();
        borderStyle.setPaddingLeft(2.4, Unit.PX);
        borderStyle.setPaddingRight(3.5, Unit.PX);
        borderStyle.setPaddingTop(2.4, Unit.PX);
        borderStyle.setPaddingBottom(3.5, Unit.PX);
    }

    private Element createElement() {
        Element e;
        if (inline) {
            e = Document.get().createSpanElement();
            e.getStyle().setBackgroundColor("green");
        } else {
            e = Document.get().createDivElement();
            e.getStyle().setWidth(300, Unit.PX);
            e.getStyle().setHeight(50, Unit.PX);
            e.getStyle().setBackgroundColor("blue");
        }
        e.getStyle().setMargin(3.7, Unit.PX);
        return e;
    }

    public void showSizes() {
        String sizes = "Measured required width x height
";

        sizes += "
noBorderPadding: "
                + WidgetUtil.getRequiredWidthComputedStyle(noBorderPadding);
        sizes += "x"
                + WidgetUtil.getRequiredHeightComputedStyle(noBorderPadding)
                + "
";
        sizes += "
border: "
                + WidgetUtil.getRequiredWidthComputedStyle(border);
        sizes += "x" + WidgetUtil.getRequiredHeightComputedStyle(border);
        sizes += "
";

        sizes += "
padding: "
                + WidgetUtil.getRequiredWidthComputedStyle(padding);
        sizes += "x" + WidgetUtil.getRequiredHeightComputedStyle(padding);
        sizes += "
";

        sizes += "
borderPadding: "
                + WidgetUtil.getRequiredWidthComputedStyle(borderPadding);
        sizes += "x" + WidgetUtil.getRequiredHeightComputedStyle(borderPadding)
                + "
";

        result.setInnerHTML(sizes);

        if (inline) {
            result.getStyle().setPaddingTop(200, Unit.PX);
        }

    }

}


text:
You can list all rkt pods.

```
$ rkt list
UUID        APP     IMAGE NAME               STATE      CREATED        STARTED         NETWORKS
5bc080ca    redis   redis                    running    2 minutes ago  41 seconds ago  default:ip4=172.16.28.7
            etcd    coreos.com/etcd:v2.0.9
3089337c    nginx   nginx                    exited     9 minutes ago  2 minutes ago
```

You can view the full UUID as well as the image's ID by using the `--full` flag.

```
$ rkt list --full
UUID                                   APP     IMAGE NAME              IMAGE ID              STATE      CREATED                             STARTED                             NETWORKS
5bc080cav-9e03-480d-b705-5928af396cc5  redis   redis                   sha512-91e98d7f1679   running    2016-01-25 17:42:32.563 +0100 CET   2016-01-25 17:44:05.294 +0100 CET   default:ip4=172.16.28.7
                                       etcd    coreos.com/etcd:v2.0.9  sha512-a03f6bad952b
3089337c4-8021-119b-5ea0-879a7c694de4  nginx   nginx                   sha512-32ad6892f21a   exited     2016-01-25 17:36:40.203 +0100 CET   2016-01-25 17:42:15.1 +0100 CET
```

## Options

| Flag | Default | Options | Description |
| --- | --- | --- | --- |
| `--full` |  `false` | `true` or `false` | Use long output format |
| `--no-legend` |  `false` | `true` or `false` | Supress a legend with the list |

## Global options

| Flag | Default | Options | Description |
| --- | --- | --- | --- |
| `--debug` |  `false` | `true` or `false` | Prints out more debug information to `stderr` |
| `--dir` | `/var/lib/rkt` | A directory path | Path to the `rkt` data directory |
| `--insecure-options` |  none |

**none**: All security features are enabled

**http**: Allow HTTP connections. Be warned that this will send any credentials as clear text.

**image**: Disables verifying image signatures

**tls**: Accept any certificate from the server and any host name in that certificate

**ondisk**: Disables verifying the integrity of the on-disk, rendered image before running. This significantly speeds up start time.

**all**: Disables all security checks

  | Comma-separated list of security features to disable |
| `--local-config` |  `/etc/rkt` | A directory path | Path to the local configuration directory |
| `--system-config` |  `/usr/lib/rkt` | A directory path | Path to the system configuration directory |
| `--trust-keys-from-https` |  `true` | `true` or `false` | Automatically trust gpg keys fetched from https |
| `--user-config` |  `` | A directory path | Path to the user configuration directory |


text:
<?php
class Languages extends MY_Controller
{
	public function __construct()
	{
		parent::__construct();
		$this->load->model('language_model');
		$this->load->helper("url");
		$this->view_data['nav'] = 'languages';
	}

	public function autocomplete()
	{
		$query = $this->input->get('query', TRUE);

		$this->output->set_content_type('application/json')->set_output(json_encode(array('query' => $query, 'suggestions' => $this->language_model->autocomplete($query))));
	}

	public function flexbox()
	{
		$query = $this->input->get('q', TRUE);
		$page = $this->input->get('p', TRUE);
		$result = $this->language_model->get($query, FALSE, 10, ($page - 1) * 10);

		$this->output->set_content_type('application/json')->set_output(json_encode(array('more' => count($result) == 10, 'results' => $result)));
	}

	public function magicsuggest()
	{
		$query = $this->input->get('query', TRUE);

		$this->output->set_content_type('text/plain')->set_output(json_encode($this->language_model->get($query)));
	}

	public function show($id)
	{
		$this->load->model('ride_model');

		$this->view_data['language'] = $this->language_model->get_language($id);
		$this->view_data['offering'] = $this->language_model->get_language_users($id, 1);
		$this->view_data['seeking'] = $this->language_model->get_language_users($id, 2);
		$this->view_data['paths'] = $this->language_model->get_paths($id);
		$this->view_data['rides'] = $this->language_model->get_rides($id, $this->view_data['userid']);

		$this->show_view('language/show');
	}
}


text:
"""
Copyright 2014 Magnus Briden

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
"""
from events import NoticeEvent, ModeEvent, RequestPongEvent, OutputEvent, ReginfoEvent, OperEvent, PerformEvent, PrivmsgEvent, RequestSendCommandEvent, ConnectionClosedEvent, NoexistEvent, HosthiddenEvent, JoinedEvent, PartedEvent
from networkmessage import NetworkMessage
from weakboundmethod import WeakBoundMethod as Wbm

class NetworkController():
	"""
	This class is used too parse the input we get from the network at the lowest level, it only handles basic IRC protocol.
	It splits the input at line breaks since that means end of packet in the IRC protocol.
	It then parses these packets into the standard IRC packet form of [source, command, data] and posts the parameters with the right event.

	Note: In case of the packet being a ping or error, the first parameter is the command.
	"""
	def __init__(self, ed):
		self.ed = ed
		self.accumulator = ""
		self.parsers = {
			"NOTICE"	: Wbm(self.parse_notice),
			"AUTH"		: Wbm(self.parse_notice),
			"001"		: Wbm(self.parse_reginfo),
			"002"		: Wbm(self.parse_reginfo),
			"003"		: Wbm(self.parse_reginfo),
			"004"		: Wbm(self.parse_reginfo),
			"005"		: Wbm(self.parse_reginfo),
			"396"		: Wbm(self.parse_hosthidden),
			"401"		: Wbm(self.parse_noexist),
			"PRIVMSG"	: Wbm(self.parse_privmsg),
			"MODE"		: Wbm(self.parse_mode),
			"JOIN"		: Wbm(self.parse_joined),
			"PART"		: Wbm(self.parse_parted)
		}

	def on_recv_message(self, msg):
		msg.buffer = self.accumulator + msg.buffer
		lines = msg.prepare_message()
		self.accumulator = "" if msg.buffer.endswith("\r\n") else lines.pop()
		for line in lines:
			self.parse_message(line.lstrip(":"))

	def parse_message(self, buffer):
		if buffer.count(" ") < 2:
			command, data = buffer.split(" ", 1)
			if command == "PING":
				return RequestPongEvent(data.lstrip(":")).post(self.ed)
			elif command == "ERROR":
				OutputEvent("Internal", buffer.strip()).post(self.ed)
				ConnectionClosedEvent("server").post(self.ed)
				return
			else:
				try:
					error = "Error: [NetworkController::parse_packet] command = %s data = %s" % (command, data)
				except TypeError:
					error = "Error: [NetworkController::parse_packet] TypeError when formatting parameters string"
				OutputEvent("Internal", error).post(self.ed)

		OutputEvent("Server", buffer.strip()).post(self.ed) # Print message

		if buffer.count(" ") < 3:
			source, type, dest = buffer.split(" ", 2)
			data = ""
		else:
			source, type, dest, data = buffer.split(" ", 3) # source, type, dest, data

		if type in self.parsers.keys():
			self.parsers[type](source, type, dest, data)

	def parse_notice(self, source, type, dest, data):
		NoticeEvent(source, type, dest, data).post(self.ed)

	def parse_reginfo(self, source, type, dest, data):
		ReginfoEvent(source, type, dest, data).post(self.ed)

	def parse_mode(self, source, type, dest, data):
		ModeEvent(source, type, dest, data).post(self.ed)

	def parse_privmsg(self, source, type, dest, data):
		PrivmsgEvent(source, dest, data).post(self.ed)

	def parse_noexist(self, source, type, dest, data):
		NoexistEvent(source, dest, data).post(self.ed)

	def parse_hosthidden(self, source, type, dest, data):
		HosthiddenEvent(source, dest, data).post(self.ed)

	def parse_joined(self, source, type, dest, data):
		JoinedEvent(source, type, dest, data).post(self.ed)

	def parse_parted(self, source, type, dest, data):
		PartedEvent(source, type, dest, data).post(self.ed)


text:
package com.intellij.codeInsight.template.macro;

import com.intellij.codeInsight.lookup.LookupElement;
import com.intellij.codeInsight.template.*;
import com.intellij.codeInsight.template.impl.JavaTemplateUtil;
import com.intellij.psi.PsiElement;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;

import java.util.LinkedHashSet;
import java.util.Set;

/**
 * @author ven
 */
public abstract class VariableTypeMacroBase implements Macro {
  @Nullable
  protected abstract PsiElement[] getVariables(Expression[] params, final ExpressionContext context);

  public LookupElement[] calculateLookupItems(@NotNull Expression[] params, final ExpressionContext context) {
    final PsiElement[] vars = getVariables(params, context);
    if (vars == null || vars.length < 2) return null;
    Set<LookupElement> set = new LinkedHashSet<LookupElement>();
    for (PsiElement element : vars) {
      JavaTemplateUtil.addElementLookupItem(set, element);
    }
    return set.toArray(new LookupElement[set.size()]);
  }

  public Result calculateResult(@NotNull Expression[] params, ExpressionContext context) {
    final PsiElement[] vars = getVariables(params, context);
    if (vars == null || vars.length == 0) return null;
    return new JavaPsiElementResult(vars[0]);
  }

  public Result calculateQuickResult(@NotNull Expression[] params, ExpressionContext context) {
    return null;
  }

  public String getDefaultValue() {
    return "a";
  }

}


text:
style"gtkviews"
{
xthickness=0
ythickness=0
GtkButton::inner-border={4,4,2,2}
fg[NORMAL]=@inactivewindowtext
fg[PRELIGHT]=@inactivewindowtext
fg[SELECTED]=@inactivewindowtext
fg[ACTIVE]=@inactivewindowtext
fg[INSENSITIVE]=@inactivewindowtext
engine"pixmap"
{
image
{
function=BOX
shadow=OUT
file="../theme/images/treeview_header.svg"
border={0,1,0,1}
stretch=TRUE
}
image
{
function=BOX
shadow=IN
file="../theme/images/treeview_header.svg"
border={0,1,0,1}
stretch=TRUE
}
}
}
widget_class"*.<GtkTreeView>.<GtkButton>*"style"gtkviews"
widget_class"*.<GtkCTree>.<GtkButton>"style"gtkviews"
widget_class"*.<GtkList>.<GtkButton>"style"gtkviews"
widget_class"*.<GtkCList>.<GtkButton>"style"gtkviews"


text:
<?php

declare(strict_types=1);

/*
 * This file is part of the RollerworksDatagrid package.
 *
 * (c) Sebastiaan Stok <s.stok@rollerscapes.net>
 *
 * This source file is subject to the MIT license that is bundled
 * with this source code in the file LICENSE.
 */

namespace Rollerworks\Component\Datagrid\Extension\Core\Type;

use Rollerworks\Component\Datagrid\Column\AbstractType;
use Rollerworks\Component\Datagrid\Column\CellView;
use Rollerworks\Component\Datagrid\Column\ColumnInterface;
use Rollerworks\Component\Datagrid\Exception\InvalidConfigurationException;
use Symfony\Component\OptionsResolver\Options;
use Symfony\Component\OptionsResolver\OptionsResolver;

/**
 * @author Sebastiaan Stok <s.stok@rollerscapes.net>
 */
class ActionType extends AbstractType
{
    /**
     * {@inheritdoc}
     */
    public function buildCellView(CellView $view, ColumnInterface $column, array $options)
    {
        $mappingValues = $view->value;

        if (is_object($options['content'])) {
            $options['content'] = $options['content']($mappingValues);
        }

        $view->vars['url'] = $this->createUrl($options, $mappingValues);
        $view->vars['content'] = $options['content'];
        $view->vars['attr'] = $options['attr'];
        $view->vars['url_attr'] = $options['url_attr'];
    }

    /**
     * {@inheritdoc}
     */
    public function configureOptions(OptionsResolver $resolver)
    {
        $resolver->setDefaults(
            [
                'redirect_uri' => null,
                'content' => null,
                'attr' => [],
                'url_attr' => [],
                'url' => null,
                'uri_scheme' => null,

                // Remove requirement for label
                'label' => function (Options $options) {
                    return $options['content'];
                },
            ]
        );

        $resolver->setAllowedTypes('redirect_uri', ['string', 'null', 'callable']);
        $resolver->setAllowedTypes('url', ['string', 'null']);
        $resolver->setAllowedTypes('uri_scheme', ['string', 'callable', 'null']);
        $resolver->setAllowedTypes('content', ['null', 'string', 'callable']);
        $resolver->setAllowedTypes('attr', ['array']);
        $resolver->setAllowedTypes('url_attr', ['array']);
    }

    private static function wrapValues(array $values)
    {
        $return = [];

        foreach ($values as $key => $value) {
            $return['{'.$key.'}'] = $value;
        }

        return $return;
    }

    private function createUrl(array $options, $mappingValues): string
    {
        if (null !== $options['url']) {
            return $options['url'];
        }

        if (null === $options['uri_scheme']) {
            throw new InvalidConfigurationException('Action needs an "url" or "uri_scheme" but none is provided.');
        }

        if (is_object($options['uri_scheme'])) {
            $url = $options['uri_scheme']($mappingValues);
        } else {
            $url = strtr($options['uri_scheme'], $this->wrapValues($mappingValues));
        }

        return $url.$this->getRedirectUrl($options, $url, $mappingValues);
    }

    private function getRedirectUrl(array $options, $url, $mappingValues): string
    {
        if (null === $options['redirect_uri']) {
            return '';
        }

        if (is_object($options['redirect_uri'])) {
            $options['redirect_uri'] = $options['redirect_uri']($mappingValues);
        }

        return (false !== strpos($url, '?') ? '&' : '?').'redirect_uri='.urlencode($options['redirect_uri']);
    }
}


text:
using System;

#if WINDOWS && DIRECTX
using SharpDX.DXGI;
using SharpDX.Direct3D11;
#endif

namespace Microsoft.Xna.Framework.Graphics
{
#if WINDOWS && DIRECTX

    /// <summary>
    /// A swap chain used for rendering to a secondary GameWindow.
    /// </summary>
    /// <remarks>
    /// This is an extension and not part of stock XNA.
    /// It is currently implemented for Windows and DirectX only.
    /// </remarks>
    public class SwapChainRenderTarget : RenderTarget2D
    {
        private readonly SwapChain _swapChain;

        // TODO: We need to add vsync control to this class.

        public SwapChainRenderTarget(   GraphicsDevice graphicsDevice,
                                        IntPtr windowHandle,
                                        int width,
                                        int height)
            : this(
                graphicsDevice,
                windowHandle,
                width,
                height,
                false,
                SurfaceFormat.Color,
                DepthFormat.Depth24,
                0,
                RenderTargetUsage.DiscardContents,
                PresentInterval.Default)
        {
        }

        public SwapChainRenderTarget(   GraphicsDevice graphicsDevice,
                                        IntPtr windowHandle,
                                        int width,
                                        int height,
                                        bool mipMap,
                                        SurfaceFormat surfaceFormat,
                                        DepthFormat depthFormat,
                                        int preferredMultiSampleCount,
                                        RenderTargetUsage usage,
                                        PresentInterval presentInterval)
            : base(
                graphicsDevice,
                width,
                height,
                mipMap,
                surfaceFormat,
                depthFormat,
                preferredMultiSampleCount,
                usage,
                SurfaceType.SwapChainRenderTarget)
        {
            var dxgiFormat = surfaceFormat == SurfaceFormat.Color
                             ? SharpDX.DXGI.Format.B8G8R8A8_UNorm
                             : SharpDXHelper.ToFormat(surfaceFormat);

            var multisampleDesc = new SampleDescription(1, 0);
            if (preferredMultiSampleCount > 1)
            {
                multisampleDesc.Count = preferredMultiSampleCount;
                multisampleDesc.Quality = (int)StandardMultisampleQualityLevels.StandardMultisamplePattern;
            }

            var desc = new SwapChainDescription()
            {
                ModeDescription =
                {
                    Format = dxgiFormat,
                    Scaling = DisplayModeScaling.Stretched,
                    Width = width,
                    Height = height,
                },

                OutputHandle = windowHandle,
                SampleDescription = multisampleDesc,
                Usage = Usage.RenderTargetOutput,
                BufferCount = 2,
                SwapEffect = SharpDXHelper.ToSwapEffect(presentInterval),
                IsWindowed = true,
            };

            // Once the desired swap chain description is configured, it must
            // be created on the same adapter as our D3D Device
            var d3dDevice = graphicsDevice._d3dDevice;

            // First, retrieve the underlying DXGI Device from the D3D Device.
            // Creates the swap chain
            using (var dxgiDevice = d3dDevice.QueryInterface<Device1>())
            using (var dxgiAdapter = dxgiDevice.Adapter)
            using (var dxgiFactory = dxgiAdapter.GetParent<Factory1>())
            {
                _swapChain = new SwapChain(dxgiFactory, dxgiDevice, desc);

                // Ensure that DXGI does not queue more than one frame at a time. This
                // both reduces latency and ensures that the application will only render
                // after each VSync, minimizing power consumption.
                dxgiDevice.MaximumFrameLatency = 1;
            }

            // Obtain the backbuffer for this window which will be the final 3D rendertarget.
            var backBuffer = SharpDX.Direct3D11.Resource.FromSwapChain<SharpDX.Direct3D11.Texture2D>(_swapChain, 0);

            // Create a view interface on the rendertarget to use on bind.
            _renderTargetView = new RenderTargetView(d3dDevice, backBuffer);

            // Get the rendertarget dimensions for later.
            var backBufferDesc = backBuffer.Description;
            var targetSize = new Point(backBufferDesc.Width, backBufferDesc.Height);

            _texture = backBuffer;

            // Create the depth buffer if we need it.
            if (depthFormat != DepthFormat.None)
            {
                dxgiFormat = SharpDXHelper.ToFormat(depthFormat);

                // Allocate a 2-D surface as the depth/stencil buffer.
                using (
                    var depthBuffer = new SharpDX.Direct3D11.Texture2D(d3dDevice,
                                                                       new Texture2DDescription()
                                                                           {
                                                                               Format = dxgiFormat,
                                                                               ArraySize = 1,
                                                                               MipLevels = 1,
                                                                               Width = targetSize.X,
                                                                               Height = targetSize.Y,
                                                                               SampleDescription = multisampleDesc,
                                                                               Usage = ResourceUsage.Default,
                                                                               BindFlags = BindFlags.DepthStencil,
                                                                           }))

                    // Create a DepthStencil view on this surface to use on bind.
                    _depthStencilView = new DepthStencilView(d3dDevice, depthBuffer);
            }
        }

        // TODO: We need to expose the other Present() overloads
        // for passing source/dest rectangles.

        /// <summary>
        /// Displays the contents of the active back buffer to the screen.
        /// </summary>
        public void Present()
        {
            lock (GraphicsDevice._d3dContext)
            {
                try
                {
                    _swapChain.Present(1, PresentFlags.None);
                }
                catch (SharpDX.SharpDXException)
                {
                }
            }
        }
    }

#endif // WINDOWS && DIRECTX
}


text:
package com.sap.core.odata.fit.basic;

import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertNull;
import static org.mockito.Matchers.any;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.when;

import java.io.IOException;
import java.net.URI;
import java.util.List;
import java.util.Map;

import javax.ws.rs.core.Response.Status;

import org.apache.http.HttpResponse;
import org.apache.http.client.ClientProtocolException;
import org.apache.http.client.methods.HttpGet;
import org.junit.Test;

import com.sap.core.odata.api.ODataService;
import com.sap.core.odata.api.commons.HttpHeaders;
import com.sap.core.odata.api.commons.HttpStatusCodes;
import com.sap.core.odata.api.exception.ODataException;
import com.sap.core.odata.api.processor.ODataContext;
import com.sap.core.odata.api.processor.ODataResponse;
import com.sap.core.odata.api.processor.ODataSingleProcessor;
import com.sap.core.odata.api.processor.part.MetadataProcessor;
import com.sap.core.odata.api.processor.part.ServiceDocumentProcessor;
import com.sap.core.odata.api.uri.info.GetMetadataUriInfo;
import com.sap.core.odata.api.uri.info.GetServiceDocumentUriInfo;

/**
 * @author SAP AG
 */
public class ContextTest extends AbstractBasicTest {

  @Override
  protected ODataSingleProcessor createProcessor() throws ODataException {
    final ODataSingleProcessor processor = mock(ODataSingleProcessor.class);
    when(((MetadataProcessor) processor).readMetadata(any(GetMetadataUriInfo.class), any(String.class))).thenReturn(ODataResponse.entity("metadata").status(HttpStatusCodes.OK).build());
    when(((ServiceDocumentProcessor) processor).readServiceDocument(any(GetServiceDocumentUriInfo.class), any(String.class))).thenReturn(ODataResponse.entity("service document").status(HttpStatusCodes.OK).build());
    return processor;
  }

  @Test
  public void checkContextExists() throws ClientProtocolException, IOException, ODataException {
    assertNull(getService().getProcessor().getContext());
    final HttpResponse response = executeGetRequest("$metadata");

    final ODataContext context = getService().getProcessor().getContext();
    assertNotNull(context);

    final ODataService service = context.getService();
    assertNotNull(service);

    assertEquals(Status.OK.getStatusCode(), response.getStatusLine().getStatusCode());

    assertEquals("$metadata", context.getPathInfo().getODataSegments().get(0).getPath());
  }

  @Test
  public void checkBaseUriForServiceDocument() throws ClientProtocolException, IOException, ODataException {
    executeGetRequest("");

    final ODataContext ctx = getService().getProcessor().getContext();
    assertNotNull(ctx);
    assertEquals(getEndpoint().toString(), ctx.getPathInfo().getServiceRoot().toASCIIString());
  }

  @Test
  public void checkServiceFactoryIsSet() throws ClientProtocolException, IOException, ODataException {
    executeGetRequest("");

    final ODataContext ctx = getService().getProcessor().getContext();
    assertNotNull(ctx);
    assertNotNull(ctx.getServiceFactory());
  }

  @Test
  public void checkServiceIsSet() throws ClientProtocolException, IOException, ODataException {
    executeGetRequest("");

    final ODataContext ctx = getService().getProcessor().getContext();
    assertNotNull(ctx);
    assertNotNull(ctx.getService());
  }

  @Test
  public void checkBaseUriForMetadata() throws ClientProtocolException, IOException, ODataException {
    executeGetRequest("$metadata");

    final ODataContext ctx = getService().getProcessor().getContext();
    assertNotNull(ctx);
    assertEquals(getEndpoint().toString(), ctx.getPathInfo().getServiceRoot().toASCIIString());
  }

  @Test
  public void checkAcceptuablesLanguage() throws ODataException, ClientProtocolException, IOException {
    final HttpGet get = new HttpGet(URI.create(getEndpoint().toString() + "/$metadata"));
    get.setHeader("Accept-Language", "de, en");

    getHttpClient().execute(get);

    final ODataContext ctx = getService().getProcessor().getContext();
    assertNotNull(ctx);

    assertEquals("[de, en]", ctx.getAcceptableLanguages().toString());
  }

  @Test
  public void checkAcceptuablesLanguagesNoHeader() throws ODataException, ClientProtocolException, IOException {
    final HttpGet get = new HttpGet(URI.create(getEndpoint().toString() + "/$metadata"));
    getHttpClient().execute(get);

    final ODataContext ctx = getService().getProcessor().getContext();
    assertNotNull(ctx);

    assertEquals("[*]", ctx.getAcceptableLanguages().toString());
  }

  @Test
  public void checkRequestHeader() throws ClientProtocolException, IOException, ODataException {
    final HttpGet get = new HttpGet(URI.create(getEndpoint().toString() + "/$metadata"));
    get.setHeader("ConTenT-laNguaGe", "de, en");
    getHttpClient().execute(get);

    final ODataContext ctx = getService().getProcessor().getContext();
    assertNotNull(ctx);

    assertEquals("de, en", ctx.getRequestHeader(HttpHeaders.CONTENT_LANGUAGE));
    assertNull(ctx.getRequestHeader("nonsens"));
  }

  @Test
  public void checkRequestHeaders() throws ClientProtocolException, IOException, ODataException {
    final HttpGet get = new HttpGet(URI.create(getEndpoint().toString() + "/$metadata"));
    get.setHeader("ConTenT-laNguaGe", "de, en");
    getHttpClient().execute(get);

    final ODataContext ctx = getService().getProcessor().getContext();
    assertNotNull(ctx);

    final Map<String, List<String>> header = ctx.getRequestHeaders();
    assertEquals("de, en", header.get(HttpHeaders.CONTENT_LANGUAGE).get(0));
  }

  @Test
  public void checkNewRequestHeader() throws ClientProtocolException, IOException, ODataException {
    final HttpGet get = new HttpGet(URI.create(getEndpoint().toString() + "/$metadata"));
    get.setHeader("ConTenT-laNguaGe", "de, en");
    getHttpClient().execute(get);

    final ODataContext ctx = getService().getProcessor().getContext();
    assertNotNull(ctx);

    assertEquals("de, en", ctx.getRequestHeader(HttpHeaders.CONTENT_LANGUAGE));
    assertNull(ctx.getRequestHeader("nonsens"));
  }

  @Test
  public void checkNewRequestHeaders() throws ClientProtocolException, IOException, ODataException {
    final HttpGet get = new HttpGet(URI.create(getEndpoint().toString() + "/$metadata"));
    get.setHeader("ConTenT-laNguaGe", "de, en");
    getHttpClient().execute(get);

    final ODataContext ctx = getService().getProcessor().getContext();
    assertNotNull(ctx);

    final Map<String, List<String>> header = ctx.getRequestHeaders();
    assertNotNull(header);
    assertNotNull(header.get(HttpHeaders.CONTENT_LANGUAGE));
    assertEquals(1, header.get(HttpHeaders.CONTENT_LANGUAGE).size());
    assertEquals("de, en", header.get(HttpHeaders.CONTENT_LANGUAGE).get(0));
  }

  @Test
  public void checkHttpMethod() throws ClientProtocolException, IOException, ODataException {
    final HttpGet get = new HttpGet(URI.create(getEndpoint().toString() + "/$metadata"));
    getHttpClient().execute(get);

    final ODataContext ctx = getService().getProcessor().getContext();
    assertNotNull(ctx);

    final String httpMethod = ctx.getHttpMethod();
    assertEquals("GET", httpMethod);
  }
}


text:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace DevStandardSControl
{
    public partial class FrmImageButton : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            this.imgWrite.ImageUrl = "/images/btn_post.gif";
            this.imgList.ImageUrl = "/./images/btn_list.gif";
        }

        protected void imgWrite_Click(object sender, ImageClickEventArgs e)
        {
            Response.Write("글쓰기 버튼 클릭됨.
");
        }

        protected void imgList_Click(object sender, ImageClickEventArgs e)
        {
            Response.Write("리스트 버튼 클릭됨.
");
        }
    }
}


text:
export const environment = {
  production: true,
  preview: true,
  baseUrl: '/Helium/preview/'
};


text:
include_recipe "homebrew"

package "go"

directory node.default.go_lang.src_path do
  recursive true
  mode 00755
end

directory "#{ENV['HOME']}/.rc.d" do
  mode 00755
end

template "#{ENV['HOME']}/.rc.d/go-lang.sh" do
  source "go-lang.sh.erb"
  mode 00755
end


text:
class Comment < ActiveRecord::Base
  belongs_to :perspective
end


text: import "./experience-scope";


text:
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Runtime.InteropServices.WindowsRuntime;
using Windows.Foundation;
using Windows.Foundation.Collections;
using Windows.UI.Xaml;
using Windows.UI.Xaml.Controls;
using Windows.UI.Xaml.Controls.Primitives;
using Windows.UI.Xaml.Data;
using Windows.UI.Xaml.Input;
using Windows.UI.Xaml.Media;
using Windows.UI.Xaml.Navigation;
using Windows.Storage.Pickers;
using Windows.Storage.FileProperties;
using Windows.Storage;
using Windows.UI.Xaml.Media.Imaging;
using Windows.Storage.Streams;
using System.Text;
using Windows.Devices.Geolocation;
using Windows.Services.Maps;
//using Bing.Maps;
//using Windows.Devices.Geolocation;
using System.Net.Http;
using Newtonsoft.Json;
using Windows.World;

// The Blank Page item template is documented at http://go.microsoft.com/fwlink/?LinkId=402352&clcid=0x409

namespace ImageData
{
    /// <summary>
    /// An empty page that can be used on its own or navigated to within a Frame.
    /// </summary>
    public sealed partial class MainPage : Page
    {
        public MainPage()
        {
            this.InitializeComponent();
        }

        ImageProperties[] imgProp = new ImageProperties[100000];
        BitmapImage[] bitImg = new BitmapImage[100000];
        static int count = -1;
        IReadOnlyList<StorageFile> sfiles;
        async private void Button_Click(object sender, RoutedEventArgs e)
        {

            //FileOpenPicker fop = new FileOpenPicker();
            //fop.ViewMode = PickerViewMode.Thumbnail;
            //fop.SuggestedStartLocation = PickerLocationId.PicturesLibrary;
            //fop.FileTypeFilter.Add(".jpeg");
            //fop.FileTypeFilter.Add(".jpg");
            //fop.FileTypeFilter.Add(".png");
            //StorageFile sf =await fop.PickSingleFileAsync();
            FolderPicker fp = new FolderPicker();

            fp.ViewMode = PickerViewMode.List;
            fp.SuggestedStartLocation = PickerLocationId.PicturesLibrary;
            fp.FileTypeFilter.Add(".jpeg");
            fp.FileTypeFilter.Add(".jpg");
            fp.FileTypeFilter.Add(".png");
            var sfs = await fp.PickSingleFolderAsync();
            //FlipView fv = new FlipView();
            try
            {
                if (sfs != null)
                {
                    sfiles = await sfs.GetFilesAsync();

                    foreach (StorageFile f in sfiles)
                    {
                        count++;
                        using (IRandomAccessStream ir = await f.OpenAsync(FileAccessMode.Read))
                        {
                            BitmapImage bi = new BitmapImage();
                            BitmapImage lbi = bi;

                            bi.SetSource(ir);
                            fv.Items.Add(bi);
                            lv.Items.Add(bi);
                            imgProp[count] = await f.Properties.GetImagePropertiesAsync();
                            //sp.Children.Add(img);

                        }

                    }
                    // sp.Children.Add(fv);
                }
            }
            catch (Exception exc)
            {

            }

        }

        async private void lv_SelectionChanged(object sender, SelectionChangedEventArgs e)
        {
            try
            {

                if (lv.SelectedItem != null)
                {

                    int i = lv.SelectedIndex;
                    lv.ScrollIntoView(lv.SelectedItem);
                    fv.SelectedItem = fv.Items[i];
                    StringBuilder outputText = new StringBuilder();

                    Properties.Text = "     Properties of Image     ";
                    DateTaken.Text = "Date Taken             : ";
                    vDate.Text = imgProp[i].DateTaken.ToString();

                    Rating.Text = "Rating                     : ";
                    vRating.Text = imgProp[i].Rating.ToString();

                    CameraManufacturer.Text = "Camera Manufacturer        : ";
                    vCameraManufacturer.Text = imgProp[i].CameraManufacturer;

                    CameraModel.Text = "Camera Model      : ";
                    vCameraModel.Text = imgProp[i].CameraModel.ToString();

                    Place.Text = "Place                       : ";

                    //Location location = new Location(Convert.ToDouble(imgProp[i].Latitude), Convert.ToDouble(imgProp[i].Longitude));
                    // myMap.Center = new Location(Convert.ToDouble(imgProp[i].Latitude), Convert.ToDouble(imgProp[i].Longitude));

                    myMap.ZoomLevel = 15.0;
                    //var pp = myMap.Children.First(p => (p.GetType() == typeof(Pushpin)));
                    //myMap.Children.Remove(pp);
                 //   Pushpin pushpin = new Pushpin();

                  //  MapLayer.SetPosition(pushpin, location);
                   // myMap.Children.Add(pushpin);
                    //myMap.Center = new Location(Convert.ToDouble(imgProp[i].Latitude), Convert.ToDouble(imgProp[i].Longitude));

                    Uri u = new Uri("http://dev.virtualearth.net/REST/v1/Locations/" + imgProp[i].Latitude + "," + imgProp[i].Longitude + "?o=json&key=	Asoh6QzcSn15uP_cEYhkFDJmAiyurB3qdmIPzJYHtTCN_ZElhSC0Y89xjcT7GlO3");
                    HttpClient client = new HttpClient();

                    string jsondata = await client.GetStringAsync(u);
                    ImageData.jsonParse.RootObject myobj = JsonConvert.DeserializeObject<ImageData.jsonParse.RootObject>(jsondata);
                    vPlace.Text = myobj.resourceSets[0].resources[0].name.ToString();

                }

            }
            catch (Exception e1)
            {

            }

        }

        private void fv_SelectionChanged(object sender, SelectionChangedEventArgs e)
        {

            try
            {
                StringBuilder sb = new StringBuilder();
                int i = ((FlipView)sender).SelectedIndex;
                lv.SelectedItem = lv.Items[i];

                //sb.AppendLine("*****Properties of Image***** ");
                //sb.AppendLine("");
                //sb.AppendLine("Date taken                              : " + imgProp[i].DateTaken);

                //sb.AppendLine("");
                //sb.AppendLine("Rating                                    : " + imgProp[i].Rating);

                //sb.AppendLine("");
                //sb.AppendLine("Camera Model                       :  " + imgProp[i].CameraModel);

                //sb.AppendLine("");

                //sb.AppendLine("Latitude of Place taken          : " + imgProp[i].Latitude);

                //sb.AppendLine("");

                //sb.AppendLine("Longitude of the Place taken : " + imgProp[i].Longitude);
                //sb.AppendLine("");

                //tb.Text = sb.ToString();
            }
            catch (Exception ex)
            {

            }
        }

}
}


text:
Nobot.email
===========

Share your email without worrying about bots.


text:
package uk.ac.ox.oucs.vle.xcri.daisy;

import org.xcri.Extension;

public class Bookable extends DaisyElement implements Extension {

	/**
	 * @return the element name
	 */
	@Override
	public String getName() {
		return "bookable";
	}

}


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

    <string name="pick_me">Ik zou graag op een screenshot staan weet je...</string>

</resources>


text:
name 'artifactory_do'
issues_url 'https://github.com/JackChance/artifactory_do/issues'
source_url 'https://github.com/JackChance/artifactory_do'
license 'MIT'
maintainer 'Cameron Straka'
maintainer_email 'strakacameron@hotmail.com'
version '0.1.0'


text:
' Licensed to the .NET Foundation under one or more agreements.
' The .NET Foundation licenses this file to you under the MIT license.
' See the LICENSE file in the project root for more information.

Imports System.Threading.Tasks
Imports Microsoft.CodeAnalysis.Remote.Testing

Namespace Microsoft.CodeAnalysis.Editor.UnitTests.FindReferences
    <Trait(Traits.Feature, Traits.Features.FindReferences)>
    Partial Public Class FindReferencesTests
        <WpfTheory, CombinatorialData>
        Public Async Function TestPrivateMethodNotSeenInDownstreamProjectWithoutIVT(kind As TestKind, host As TestHost) As Task
            Dim input =
<Workspace>
    <Project Language="C#" CommonReferences="true" Name="P1">
        <Document>
        public class C
        {
            private static void $${|Definition:Goo|}()
            {
            }
        }
        </Document>
    </Project>
    <Project Language="C#" CommonReferences="true">
        <ProjectReference>P1</ProjectReference>
        <Document>
        class X
        {
            void Bar()
            {
                C.Goo();
            }
        }
        </Document>
    </Project>
</Workspace>
            Await TestAPIAndFeature(input, kind, host)
        End Function

        <WpfTheory, CombinatorialData>
        Public Async Function TestInternalMethodNotSeenInDownstreamProjectWithoutIVT(kind As TestKind, host As TestHost) As Task
            Dim input =
<Workspace>
    <Project Language="C#" CommonReferences="true" Name="P1">
        <Document>
        public class C
        {
            internal static void $${|Definition:Goo|}()
            {
            }
        }
        </Document>
    </Project>
    <Project Language="C#" CommonReferences="true">
        <ProjectReference>P1</ProjectReference>
        <Document>
        class X
        {
            void Bar()
            {
                C.Goo();
            }
        }
        </Document>
    </Project>
</Workspace>
            Await TestAPIAndFeature(input, kind, host)
        End Function

        <WpfTheory, CombinatorialData>
        Public Async Function TestPrivateMethodNotSeenInDownstreamProjectWithIVT(kind As TestKind, host As TestHost) As Task
            Dim input =
<Workspace>
    <Project Language="C#" CommonReferences="true" Name="P1">
        <Document>
        using System.Runtime.CompilerServices;

        [assembly: InternalsVisibleTo("P2")]

        public class C
        {
            private static void $${|Definition:Goo|}()
            {
            }
        }
        </Document>
    </Project>
    <Project Language="C#" CommonReferences="true" AssemblyName="P2">
        <ProjectReference>P1</ProjectReference>
        <Document>
        class X
        {
            void Bar()
            {
                C.Goo();
            }
        }
        </Document>
    </Project>
</Workspace>
            Await TestAPIAndFeature(input, kind, host)
        End Function

        <WpfTheory, CombinatorialData>
        Public Async Function TestInternalMethodSeenInDownstreamProjectWithIVT_SimpleString(kind As TestKind, host As TestHost) As Task
            Dim input =
<Workspace>
    <Project Language="C#" CommonReferences="true" Name="P1">
        <Document>
        using System.Runtime.CompilerServices;

        [assembly: InternalsVisibleTo("P2")]

        public class C
        {
            internal static void $${|Definition:Goo|}()
            {
            }
        }
        </Document>
    </Project>
    <Project Language="C#" CommonReferences="true" AssemblyName="P2">
        <ProjectReference>P1</ProjectReference>
        <Document>
        class X
        {
            void Bar()
            {
                C.[|Goo|]();
            }
        }
        </Document>
    </Project>
</Workspace>
            Await TestAPIAndFeature(input, kind, host)
        End Function

        <WpfTheory, CombinatorialData>
        Public Async Function TestInternalMethodSeenInDownstreamProjectWithIVT_WithAttributeSuffix(kind As TestKind, host As TestHost) As Task
            Dim input =
<Workspace>
    <Project Language="C#" CommonReferences="true" Name="P1">
        <Document>
        using System.Runtime.CompilerServices;

        [assembly: InternalsVisibleToAttribute("P2")]

        public class C
        {
            internal static void $${|Definition:Goo|}()
            {
            }
        }
        </Document>
    </Project>
    <Project Language="C#" CommonReferences="true" AssemblyName="P2">
        <ProjectReference>P1</ProjectReference>
        <Document>
        class X
        {
            void Bar()
            {
                C.[|Goo|]();
            }
        }
        </Document>
    </Project>
</Workspace>
            Await TestAPIAndFeature(input, kind, host)
        End Function

        <WpfTheory, CombinatorialData>
        Public Async Function TestInternalMethodSeenInDownstreamProjectWithIVT_QualifiedAttributeName(kind As TestKind, host As TestHost) As Task
            Dim input =
<Workspace>
    <Project Language="C#" CommonReferences="true" Name="P1">
        <Document>
        [assembly: System.Runtime.CompilerServices.InternalsVisibleTo("P2")]

        public class C
        {
            internal static void $${|Definition:Goo|}()
            {
            }
        }
        </Document>
    </Project>
    <Project Language="C#" CommonReferences="true" AssemblyName="P2">
        <ProjectReference>P1</ProjectReference>
        <Document>
        class X
        {
            void Bar()
            {
                C.[|Goo|]();
            }
        }
        </Document>
    </Project>
</Workspace>
            Await TestAPIAndFeature(input, kind, host)
        End Function

        <WpfTheory, CombinatorialData>
        Public Async Function TestInternalMethodSeenInDownstreamProjectWithIVT_VerbatimString(kind As TestKind, host As TestHost) As Task
            Dim input =
<Workspace>
    <Project Language="C#" CommonReferences="true" Name="P1">
        <Document>
        using System.Runtime.CompilerServices;

        [assembly: InternalsVisibleTo(@"P2")]

        public class C
        {
            internal static void $${|Definition:Goo|}()
            {
            }
        }
        </Document>
    </Project>
    <Project Language="C#" CommonReferences="true" AssemblyName="P2">
        <ProjectReference>P1</ProjectReference>
        <Document>
        class X
        {
            void Bar()
            {
                C.[|Goo|]();
            }
        }
        </Document>
    </Project>
</Workspace>
            Await TestAPIAndFeature(input, kind, host)
        End Function

        <WpfTheory, CombinatorialData>
        Public Async Function TestInternalMethodSeenInDownstreamProjectWithIVT_UsingAlias(kind As TestKind, host As TestHost) As Task
            Dim input =
<Workspace>
    <Project Language="C#" CommonReferences="true" Name="P1">
        <Document>
        using X = System.Runtime.CompilerServices.InternalsVisibleToAttribute;

        [assembly: X(@"P2")]

        public class C
        {
            internal static void $${|Definition:Goo|}()
            {
            }
        }
        </Document>
    </Project>
    <Project Language="C#" CommonReferences="true" AssemblyName="P2">
        <ProjectReference>P1</ProjectReference>
        <Document>
        class X
        {
            void Bar()
            {
                C.[|Goo|]();
            }
        }
        </Document>
    </Project>
</Workspace>
            Await TestAPIAndFeature(input, kind, host)
        End Function

        <WpfTheory, CombinatorialData>
        Public Async Function TestInternalMethodSeenInDownstreamProjectWithIVT_NonLiteralString(kind As TestKind, host As TestHost) As Task
            Dim input =
<Workspace>
    <Project Language="C#" CommonReferences="true" Name="P1">
        <Document>
        [assembly: System.Runtime.CompilerServices.InternalsVisibleTo("P" + "2")]

        public class C
        {
            internal static void $${|Definition:Goo|}()
            {
            }
        }
        </Document>
    </Project>
    <Project Language="C#" CommonReferences="true" AssemblyName="P2">
        <ProjectReference>P1</ProjectReference>
        <Document>
        class X
        {
            void Bar()
            {
                C.[|Goo|]();
            }
        }
        </Document>
    </Project>
</Workspace>
            Await TestAPIAndFeature(input, kind, host)
        End Function
    End Class
End Namespace


text:
/*
 * See puff.c for purpose and usage.
 */
#include <boost/cstdint.hpp>

int puff(unsigned char *dest,           /* pointer to destination pointer */
         boost::uint32_t *destlen,        /* amount of output space */
         unsigned char *source,         /* pointer to source data pointer */
         boost::uint32_t *sourcelen);     /* amount of input available */


text:
import {
  interactor,
  Interactor,
  property,
} from '@bigtest/interactor';

import ButtonInteractor from '@folio/stripes-components/lib/Button/tests/interactor'; // eslint-disable-line

@interactor class DialogInteractor {
  openRequestsNumber = new Interactor('[class*=modalContent---] a');
  additionalInfoTextArea = new Interactor('[data-test-additional-info-textarea]');
  confirmButton = new ButtonInteractor('[data-test-dialog-confirm-button]');
  cancelButton = new ButtonInteractor('[data-test-dialog-cancel-button]');
  isConfirmButtonDisabled = property('[data-test-dialog-confirm-button]', 'disabled');
}

export default DialogInteractor;


text:
FROM alpine:3.4
RUN apk update && apk add openjdk8-jre wget bash
RUN cd /usr/bin && wget https://raw.githubusercontent.com/technomancy/leiningen/stable/bin/lein
RUN [ "$(md5sum /usr/bin/lein)" = "53da6f077ad139525a24f641f539266f  /usr/bin/lein" ]
RUN chmod 755 /usr/bin/lein
RUN adduser -S grimmly
RUN mkdir /grimmly
RUN chown -R grimmly /grimmly
USER grimmly
WORKDIR /grimmly
RUN lein
ADD src /grimmly/src
ADD project.clj /grimmly/project.clj
RUN lein uberjar
CMD java -Ddebug=true -Dip=0.0.0.0 -jar /grimmly/target/uberjar/grimmly-0.1.1-standalone.jar


text:
/*
 * @author max
 */
package com.intellij.psi.stubs;

import com.intellij.openapi.util.UserDataHolder;
import com.intellij.psi.PsiFile;
import com.intellij.psi.tree.IStubFileElementType;

public interface PsiFileStub<T extends PsiFile> extends StubElement<T>, UserDataHolder {
  IStubFileElementType getType();
}


text:
package jdblender.cayenne.model.auto;

import java.util.List;

import org.apache.cayenne.CayenneDataObject;
import org.apache.cayenne.exp.Property;

import jdblender.cayenne.model.Brands;
import jdblender.cayenne.model.Models;

/**
 * Class _Series was generated by Cayenne.
 * It is probably a good idea to avoid changing this class manually,
 * since it may be overwritten next time code is regenerated.
 * If you need to make any customizations, please use subclass.
 */
public abstract class _Series extends CayenneDataObject {

    private static final long serialVersionUID = 1L;

    public static final String ID_PK_COLUMN = "ID";

    public static final Property<Long> BRAND_ID = new Property<Long>("brandId");
    public static final Property<Long> ID = new Property<Long>("id");
    public static final Property<String> NAME = new Property<String>("name");
    public static final Property<Brands> BRAND = new Property<Brands>("brand");
    public static final Property<List<Models>> MODELSS = new Property<List<Models>>("modelss");

    public void setBrandId(long brandId) {
        writeProperty("brandId", brandId);
    }
    public long getBrandId() {
        Object value = readProperty("brandId");
        return (value != null) ? (Long) value : 0;
    }

    public void setId(long id) {
        writeProperty("id", id);
    }
    public long getId() {
        Object value = readProperty("id");
        return (value != null) ? (Long) value : 0;
    }

    public void setName(String name) {
        writeProperty("name", name);
    }
    public String getName() {
        return (String)readProperty("name");
    }

    public void setBrand(Brands brand) {
        setToOneTarget("brand", brand, true);
    }

    public Brands getBrand() {
        return (Brands)readProperty("brand");
    }

    public void addToModelss(Models obj) {
        addToManyTarget("modelss", obj, true);
    }
    public void removeFromModelss(Models obj) {
        removeToManyTarget("modelss", obj, true);
    }
    @SuppressWarnings("unchecked")
    public List<Models> getModelss() {
        return (List<Models>)readProperty("modelss");
    }

}


text:
package com.microsoftopentechnologies.intellij.wizards.createvm;

import com.intellij.openapi.application.ApplicationManager;
import com.intellij.openapi.progress.ProgressIndicator;
import com.intellij.openapi.progress.ProgressManager;
import com.intellij.openapi.progress.Task;
import com.intellij.openapi.project.Project;
import com.microsoftopentechnologies.intellij.helpers.UIHelper;
import com.microsoftopentechnologies.intellij.helpers.azure.AzureCmdException;
import com.microsoftopentechnologies.intellij.helpers.azure.sdk.AzureSDKManagerImpl;
import com.microsoftopentechnologies.intellij.model.Subscription;
import com.microsoftopentechnologies.intellij.model.vm.AffinityGroup;
import com.microsoftopentechnologies.intellij.model.vm.Location;
import com.microsoftopentechnologies.intellij.model.vm.StorageAccount;

import javax.swing.*;
import javax.swing.event.DocumentEvent;
import javax.swing.event.DocumentListener;
import java.awt.*;
import java.awt.event.*;
import java.util.Vector;

public class CreateStorageAccountForm extends JDialog {
    private JPanel contentPane;
    private JButton buttonOK;
    private JButton buttonCancel;
    private JComboBox subscriptionComboBox;
    private JTextField nameTextField;
    private JComboBox regionOrAffinityGroupComboBox;
    private JComboBox replicationComboBox;
    private JProgressBar createProgressBar;

    private Runnable onCreate;
    private Subscription subscription;
    private StorageAccount storageAccount;

    private enum ReplicationTypes {
        Standard_LRS,
        Standard_GRS,
        Standard_RAGRS;

        public String getDescription() {
            switch (this) {
                case Standard_GRS:
                    return "Geo-Redundant";
                case Standard_LRS:
                    return "Locally Redundant";
                case Standard_RAGRS:
                    return "Read Access Geo-Redundant";
            }

            return super.toString();
        }
    }

    public CreateStorageAccountForm() {
        setContentPane(contentPane);
        setModal(true);
        getRootPane().setDefaultButton(buttonOK);

        setTitle("Create Storage Account");

        buttonOK.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                onOK();
            }
        });

        buttonCancel.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                onCancel();
            }
        });
        setDefaultCloseOperation(DISPOSE_ON_CLOSE);
        addWindowListener(new WindowAdapter() {
            public void windowClosing(WindowEvent e) {
                onCancel();
            }
        });

        contentPane.registerKeyboardAction(new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                onCancel();
            }
        }, KeyStroke.getKeyStroke(KeyEvent.VK_ESCAPE, 0), JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT);

        regionOrAffinityGroupComboBox.setRenderer(new DefaultListCellRenderer() {
            @Override
            public Component getListCellRendererComponent(JList jList, Object o, int i, boolean b, boolean b1) {

                return (o instanceof String) ?
                        super.getListCellRendererComponent(jList, o, i, b, b1)
                        : super.getListCellRendererComponent(jList, "  " + o.toString(), i, b, b1);
            }
        });

        nameTextField.getDocument().addDocumentListener(new DocumentListener() {
            @Override
            public void insertUpdate(DocumentEvent documentEvent) {
                validateEmptyFields();
            }

            @Override
            public void removeUpdate(DocumentEvent documentEvent) {
                validateEmptyFields();
            }

            @Override
            public void changedUpdate(DocumentEvent documentEvent) {
                validateEmptyFields();
            }
        });

        regionOrAffinityGroupComboBox.addItemListener(new ItemListener() {
            @Override
            public void itemStateChanged(ItemEvent itemEvent) {
                validateEmptyFields();
            }
        });

        replicationComboBox.setModel(new DefaultComboBoxModel(ReplicationTypes.values()));
        replicationComboBox.setRenderer(new DefaultListCellRenderer() {
            @Override
            public Component getListCellRendererComponent(JList jList, Object o, int i, boolean b, boolean b1) {
                return super.getListCellRendererComponent(jList, ((ReplicationTypes) o).getDescription(), i, b, b1);
            }
        });
    }

    private void validateEmptyFields() {
        boolean allFieldsCompleted = !(
                nameTextField.getText().isEmpty() || regionOrAffinityGroupComboBox.getSelectedObjects().length == 0);

        buttonOK.setEnabled(allFieldsCompleted);
    }

    private void onOK() {

        if (nameTextField.getText().length() < 3
                || nameTextField.getText().length() > 24
                || !nameTextField.getText().matches("[a-z0-9]+")) {
            JOptionPane.showMessageDialog(this, "Invalid storage account name. The name should be between 3 and 24 characters long and \n" +
                    "can contain only lowercase letters and numbers.", "Error creating the storage account", JOptionPane.ERROR_MESSAGE);
            return;
        }

        setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR));
        createProgressBar.setVisible(true);

        try {
            String name = nameTextField.getText();
            String region = (regionOrAffinityGroupComboBox.getSelectedItem() instanceof Location) ? regionOrAffinityGroupComboBox.getSelectedItem().toString() : "";
            String affinityGroup = (regionOrAffinityGroupComboBox.getSelectedItem() instanceof AffinityGroup) ? regionOrAffinityGroupComboBox.getSelectedItem().toString() : "";
            String replication = replicationComboBox.getSelectedItem().toString();

            storageAccount = new StorageAccount(name, replication, region, affinityGroup, "", subscription.getId().toString());
            AzureSDKManagerImpl.getManager().createStorageAccount(storageAccount);
            AzureSDKManagerImpl.getManager().refreshStorageAccountInformation(storageAccount);

            onCreate.run();
        } catch (AzureCmdException e) {
            storageAccount = null;
            UIHelper.showException("An error occurred while trying to create the specified storage account.", e, "Error Creating Storage Account", false, true);
        }

        setCursor(Cursor.getDefaultCursor());

        this.setVisible(false);
        dispose();
    }

    private void onCancel() {
        dispose();
    }

    public void fillFields(final Subscription subscription, Project project) {
        this.subscription = subscription;

        subscriptionComboBox.addItem(subscription.getName());

        regionOrAffinityGroupComboBox.addItem("<Loading...>");

        ProgressManager.getInstance().run(new Task.Backgroundable(project, "Loading regions...", false) {
            @Override
            public void run(ProgressIndicator progressIndicator) {

                progressIndicator.setIndeterminate(true);

                try {
                    final java.util.List<AffinityGroup> affinityGroups = AzureSDKManagerImpl.getManager().getAffinityGroups(subscription.getId().toString());
                    final java.util.List<Location> locations = AzureSDKManagerImpl.getManager().getLocations(subscription.getId().toString());

                    ApplicationManager.getApplication().invokeLater(new Runnable() {
                        @Override
                        public void run() {
                            final Vector<Object> vector = new Vector<Object>();
                            vector.add("Regions");
                            vector.addAll(locations);
                            if (affinityGroups.size() > 0) {
                                vector.add("Affinity Groups");
                                vector.addAll(affinityGroups);
                            }

                            regionOrAffinityGroupComboBox.removeAllItems();
                            regionOrAffinityGroupComboBox.setModel(new DefaultComboBoxModel(vector) {
                                public void setSelectedItem(Object o) {
                                    if (!(o instanceof String)) {
                                        super.setSelectedItem(o);
                                    }
                                }
                            });

                            regionOrAffinityGroupComboBox.setSelectedIndex(1);
                        }
                    });

                } catch (AzureCmdException e) {
                    UIHelper.showException("Error getting regions", e);
                }
            }
        });

    }

    public void setOnCreate(Runnable onCreate) {
        this.onCreate = onCreate;
    }

    public StorageAccount getStorageAccount() {
        return storageAccount;
    }
}


text:
Command::Command(RunnerClub * runner_club){
	runner_club_ = runner_club;
}

Command::~Command(){

}

void Command::ExcuteCommand(){

}


text:
{- |
 - Module      : Types.Internal.IRCUser
 - Description : Representation of an IRC username.
 - Copyright   : (c) Magnus Stavngaard, 2017
 - License     : BSD-3
 - Maintainer  : magnus@stavngaard.dk
 - Stability   : experimental
 - Portability : POSIX
 -
 - An IRCUser is a nickname, together with maybe a username and hostname. The
 - IRCUser is mainly used to specify who sends messages to channels.
 -}
{-# LANGUAGE OverloadedStrings #-}
module Types.Internal.IRCUser where

import Test.QuickCheck.Arbitrary (Arbitrary, arbitrary, shrink)
import Types.Internal.Nickname (Nickname(..))
import Types.Internal.Hostname (Hostname(..))
import Types.Internal.Username (Username(..))
import Data.Aeson (ToJSON(..), FromJSON(..), withObject, (.=), (.:), (.:?), object)
import Utils (shrink3)

{- | Represents an IRC user which consist of a nickname, an optional username
 - and an optional hostname. In messages from IRC servers the message has a user
 - iff it starts with a ':' character. The user is then parsed as
 - "nickname [ [ "!" user ] "@" host ]". -}
data IRCUser = IRCUser Nickname (Maybe Username) (Maybe Hostname)
  deriving (Show, Read, Eq)

{- | Convert an IRCUser to JSON. -}
instance ToJSON IRCUser where
    toJSON (IRCUser nick Nothing Nothing) = object
        [ "nickname" .= nick
        ]

    toJSON (IRCUser nick Nothing (Just host)) = object
        [ "nickname" .= nick
        , "hostname" .= host
        ]

    toJSON (IRCUser nick (Just user) Nothing) = object
        [ "nickname" .= nick
        , "username" .= user
        ]

    toJSON (IRCUser nick (Just user) (Just host)) = object
        [ "nickname" .= nick
        , "username" .= user
        , "hostname" .= host
        ]

{- | Read an IRCUser from JSON. -}
instance FromJSON IRCUser where
    parseJSON = withObject "IRCUser" $ \o ->
        IRCUser <$> o .: "nickname" <*> o .:? "username" <*> o .:? "hostname"

{- | Construct arbitrary IRC users for testing. -}
instance Arbitrary IRCUser where
    arbitrary = IRCUser <$> arbitrary <*> arbitrary <*> arbitrary

    shrink (IRCUser nick user host) = shrink3 IRCUser nick user host


text:
package org.chedream.android.database;

import com.google.gson.annotations.SerializedName;

import org.chedream.android.model.User;

import io.realm.RealmObject;

/**
 * Created by Dante Allteran on 3/28/2015.
 * Class were created only for correct work of Realm Database
 */
public class RealmUser extends RealmObject {
    private int id;

    private String username;

    @SerializedName("first_name")
    private String firstName;

    @SerializedName("last_name")
    private String lastName;

    private String avatar;

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public String getFirstName() {
        return firstName;
    }

    public void setFirstName(String firstName) {
        this.firstName = firstName;
    }

    public String getLastName() {
        return lastName;
    }

    public void setLastName(String lastName) {
        this.lastName = lastName;
    }

    public String getAvatar() {
        return avatar;
    }

    public void setAvatar(String avatar) {
        this.avatar = avatar;
    }

    public RealmUser() {
    }

    public RealmUser(User user) {
        this.id = user.getId();
        this.username = user.getUsername();
        this.firstName = user.getFirstName();
        this.lastName = user.getLastName();
        if (user.getAvatar().getProviderReference() != null) {
            this.avatar = user.getAvatar().getProviderReference();
        }
    }
}


text:
package no.vegvesen.nvdb.sosi.utils;

/**
 * Constructs to simplify argument assertions
 *
 * @author Tore Eide Andersen (Kantega AS)
 */
public abstract class Argument {

    /**
     * Test the requirement and throws an exception if not fulfilled.
     * @param requirement the requirement
     * @param msg the exception message
     * @param args arguments to merge into the exception message
     */
    public static void require(Requirement requirement, String msg, Object... args) {
        if (!requirement.test()) {
            throw new IllegalArgumentException(String.format(msg, args));
        }
    }

    /**
     * Defines a requirement.
     */
    @FunctionalInterface
    public interface Requirement {
        boolean test();
    }
}