text:
package org.elasticsearch.xpack.core.ml.job.persistence;

import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.apache.logging.log4j.message.ParameterizedMessage;
import org.elasticsearch.ElasticsearchException;
import org.elasticsearch.Version;
import org.elasticsearch.action.ActionListener;
import org.elasticsearch.action.admin.indices.mapping.put.PutMappingAction;
import org.elasticsearch.action.admin.indices.mapping.put.PutMappingRequest;
import org.elasticsearch.client.Client;
import org.elasticsearch.cluster.ClusterState;
import org.elasticsearch.cluster.metadata.IndexAbstraction;
import org.elasticsearch.cluster.metadata.IndexMetadata;
import org.elasticsearch.cluster.metadata.MappingMetadata;
import org.elasticsearch.cluster.metadata.Metadata;
import org.elasticsearch.common.CheckedSupplier;
import org.elasticsearch.common.collect.ImmutableOpenMap;
import org.elasticsearch.common.unit.TimeValue;
import org.elasticsearch.common.xcontent.XContentType;
import org.elasticsearch.index.Index;
import org.elasticsearch.plugins.MapperPlugin;

import java.io.IOException;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.Map;

import static org.elasticsearch.xpack.core.ClientHelper.ML_ORIGIN;
import static org.elasticsearch.xpack.core.ClientHelper.executeAsyncWithOrigin;

/**
 * Static methods to create Elasticsearch index mappings for the autodetect
 * persisted objects/documents and configurations
 *

 * ElasticSearch automatically recognises array types so they are
 * not explicitly mapped as such. For arrays of objects the type
 * must be set to nested so the arrays are searched properly
 * see https://www.elastic.co/guide/en/elasticsearch/guide/current/nested-objects.html
 *

 * It is expected that indexes to which these mappings are applied have their
 * default analyzer set to "keyword", which does not tokenise fields.  The
 * index-wide default analyzer cannot be set via these mappings, so needs to be
 * set in the index settings during index creation. For the results mapping the
 * _all field is disabled and a custom all field is used in its place. The index
 * settings must have {@code "index.query.default_field": "all_field_values" } set
 * for the queries to use the custom all field. The custom all field has its
 * analyzer set to "whitespace" by these mappings, so that it gets tokenised
 * using whitespace.
 */
public class ElasticsearchMappings {

    /**
     * String constants used in mappings
     */
    public static final String ENABLED = "enabled";
    public static final String ANALYZER = "analyzer";
    public static final String WHITESPACE = "whitespace";
    public static final String NESTED = "nested";
    public static final String COPY_TO = "copy_to";
    public static final String PROPERTIES = "properties";
    public static final String TYPE = "type";
    public static final String DYNAMIC = "dynamic";

    /**
     * Name of the custom 'all' field for results
     */
    public static final String ALL_FIELD_VALUES = "all_field_values";

    /**
     * Name of the Elasticsearch field by which documents are sorted by default
     */
    public static final String ES_DOC = "_doc";

    /**
     * The configuration document type
     */
    public static final String CONFIG_TYPE = "config_type";

    /**
     * Elasticsearch data types
     */
    public static final String BOOLEAN = "boolean";
    public static final String DATE = "date";
    public static final String DOUBLE = "double";
    public static final String INTEGER = "integer";
    public static final String KEYWORD = "keyword";
    public static final String LONG = "long";
    public static final String TEXT = "text";

    private static final Logger logger = LogManager.getLogger(ElasticsearchMappings.class);

    private ElasticsearchMappings() {
    }

    static String[] mappingRequiresUpdate(ClusterState state, String[] concreteIndices, Version minVersion) {
        List<String> indicesToUpdate = new ArrayList<>();

        ImmutableOpenMap<String, MappingMetadata> currentMapping = state.metadata().findMappings(concreteIndices,
                MapperPlugin.NOOP_FIELD_FILTER,
                Metadata.ON_NEXT_INDEX_FIND_MAPPINGS_NOOP
        );

        for (String index : concreteIndices) {
            MappingMetadata metadata = currentMapping.get(index);
            if (metadata != null) {
                try {
                    @SuppressWarnings("unchecked")
                    Map<String, Object> meta = (Map<String, Object>) metadata.sourceAsMap().get("_meta");
                    if (meta != null) {
                        String versionString = (String) meta.get("version");
                        if (versionString == null) {
                            logger.info("Version of mappings for [{}] not found, recreating", index);
                            indicesToUpdate.add(index);
                            continue;
                        }

                        Version mappingVersion = Version.fromString(versionString);

                        if (mappingVersion.onOrAfter(minVersion)) {
                            continue;
                        } else {
                            logger.info("Mappings for [{}] are outdated [{}], updating it[{}].", index, mappingVersion, Version.CURRENT);
                            indicesToUpdate.add(index);
                            continue;
                        }
                    } else {
                        logger.info("Version of mappings for [{}] not found, recreating", index);
                        indicesToUpdate.add(index);
                        continue;
                    }
                } catch (Exception e) {
                    logger.error(new ParameterizedMessage("Failed to retrieve mapping version for [{}], recreating", index), e);
                    indicesToUpdate.add(index);
                    continue;
                }
            } else {
                logger.info("No mappings found for [{}], recreating", index);
                indicesToUpdate.add(index);
            }
        }
        return indicesToUpdate.toArray(new String[indicesToUpdate.size()]);
    }

    public static void addDocMappingIfMissing(String alias,
                                              CheckedSupplier<String, IOException> mappingSupplier,
                                              Client client, ClusterState state, TimeValue masterNodeTimeout,
                                              ActionListener<Boolean> listener) {
        IndexAbstraction indexAbstraction = state.metadata().getIndicesLookup().get(alias);
        if (indexAbstraction == null) {
            // The index has never been created yet
            listener.onResponse(true);
            return;
        }
        String[] concreteIndices = indexAbstraction.getIndices().stream().map(IndexMetadata::getIndex).map(Index::getName)
            .toArray(String[]::new);

        final String[] indicesThatRequireAnUpdate = mappingRequiresUpdate(state, concreteIndices, Version.CURRENT);
        if (indicesThatRequireAnUpdate.length > 0) {
            try {
                String mapping = mappingSupplier.get();
                PutMappingRequest putMappingRequest = new PutMappingRequest(indicesThatRequireAnUpdate);
                putMappingRequest.source(mapping, XContentType.JSON);
                putMappingRequest.origin(ML_ORIGIN);
                putMappingRequest.masterNodeTimeout(masterNodeTimeout);
                executeAsyncWithOrigin(client, ML_ORIGIN, PutMappingAction.INSTANCE, putMappingRequest,
                    ActionListener.wrap(response -> {
                        if (response.isAcknowledged()) {
                            listener.onResponse(true);
                        } else {
                            listener.onFailure(new ElasticsearchException("Attempt to put missing mapping in indices "
                                + Arrays.toString(indicesThatRequireAnUpdate) + " was not acknowledged"));
                        }
                    }, listener::onFailure));
            } catch (IOException e) {
                listener.onFailure(e);
            }
        } else {
            logger.trace("Mappings are up to date.");
            listener.onResponse(true);
        }
    }
}


text:
import { Component, Inject } from '@angular/core';
import { Router, ActivatedRoute} from '@angular/router';

import { UsersDetailsService } from '../../../@core/data/usersDetails.service';
import { ReviewService } from '../../../@core/data/review.service';
import { StyleService } from '../../services/style.service';

import { User } from '../../models/user';
import { Review } from '../../models/review';

@Component({
    selector: 'ngx-userDetails',
    templateUrl: './userDetails.component.html',
})

export class UserDetailComponent {
    private id: String;
    private sub: any;
    private userDetailText: any;
    private user: User;
    private reviewText: String='';
    private reviewError: boolean;
    private reviews: Review[];
    private isLoggedIn: boolean;
    private isMyProfile: boolean;

    constructor(private route: ActivatedRoute, private reviewService: ReviewService, private userDetail: UsersDetailsService, private styleService: StyleService) {
        this.user = new User;
        this.reviewError = false;
        this.isLoggedIn = false;
        this.isMyProfile = false;
        styleService.setStyle('no_background');
    }

    getUserEmail(): String {
        return JSON.parse(localStorage.getItem('currentUser')).Email;
      }

      getUserId(): String {
        return JSON.parse(localStorage.getItem('currentUser')).Id;
      }

    ngOnInit() {
        this.sub = this.route.params.subscribe(params => {
           this.id = params['id'];
           this.userDetail.getUsersDetails(this.id).subscribe (
                userDet => {

                    this.user = userDet;
                    if (this.getUserId() === undefined) {
                        this.isLoggedIn = false;
                        this.isMyProfile = false;
                    }
                    else if (this.getUserId() === userDet.Id) {
                        this.isMyProfile = true;
                        this.isLoggedIn = true;
                    }
                    else {
                        this.isMyProfile = false;
                        this.isLoggedIn = true;
                    }
                }
            );
            this.reviewService.getUsersReview(this.id.toString()).subscribe (
                rev => this.reviews = rev
            );
        });
    }

    onReviewSubmit() {
        var userFrom = this.getUserId();
        this.reviewService.postReview(userFrom.toString(), this.id.toString(), this.reviewText.toString()).subscribe(
            response => {
              if (response === true) {
                this.reviewError = false;
                window.location.reload();
              } else {
                this.reviewError = true;
              }
            });
    }

    ngOnDestroy() {
        this.sub.unsubscribe();
    }
}

redpajama_set_name: RedPajamaGithub


text:
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');

class Login extends CI_Controller {

	var $email_from="leiw414@gmail.com";

	function index(){
		//If user has logged in, redirect to task controller.
		if($this->session->userdata('login_state')) {
            redirect('task');
        }
		//Otherwise, direct to login page.
		else {
			$data['main_content'] = 'login';
			$this->load->view('includes/template',$data);
		}
	}

	function validate_credentials(){

		$this->load->library('form_validation');

		//Field name, error message, validation rules.
		$this->form_validation->set_rules('email', 'Email Address', 'trim|required|valid_email');
		$this->form_validation->set_rules('password', 'Password', 'trim|required|min_length[6]|max_length[32]|xss_clean');

		if($this->form_validation->run() == FALSE)
		{
			$this->index();//Direct to signup page with error message.
		}

		else{

			$user_id = $this->input->post('email');
			$password = sha1($this->input->post('password'));
			//Check if the account exists...
			if($this->membership_model->email_exists($user_id) ==  False)
			{
				//If not, return error message, direct to login page.
				$data['not_exist'] = 'The account does not exist!';
				$data['login_state'] = False;
				$data['main_content'] = 'login';
				$this->load->view('includes/template',$data);

			}
			//Check if the account has been activated.
			else if($this->membership_model->check_activation($user_id)==False)
			{
				//If not, return error message, direct to login page.
				$data['activation'] = 'The account has not been activated';
				$data['login_state'] = False;
				$data['main_content'] = 'login';
				$this->load->view('includes/template',$data);
			}
			//If activated & exists...
			else{

				$query = $this->membership_model->validate($user_id, $password);
				if($query) //If the user's credentials validated... redirect to task controller.
				{

					$this->session->set_userdata('login_state', TRUE);
					$this->session->set_userdata('id', $this->input->post('email'));
					redirect('task');
				}

				else //If incorrect username or password, return error message, direct to login page.
				{
					$data['incorrect'] = 'incorrect Username or Password';
					$data['login_state'] = False;
					$data['main_content'] = 'login';
					$this->load->view('includes/template',$data);
				}
			}
		}
	}

	function signup()//Display the signup page.
	{
		$data['main_content'] = 'signup';
		$this->load->view('includes/template', $data);
	}

	function create_member()//Create account.
	{

		$this->load->library('form_validation');

		//Field name, error message, validation rules.
		$this->form_validation->set_rules('email', 'Email Address', 'trim|required|valid_email');
		$this->form_validation->set_rules('password', 'Password', 'trim|required|min_length[6]|max_length[32]|xss_clean');
		$this->form_validation->set_rules('password2', 'Password Confirmation', 'trim|required|matches[password]');

		if($this->form_validation->run() == FALSE)
		{
			$this->signup();//Direct to signup page with error message.
		}

		else
		{
			$user_id = $this->input->post('email');
			$passwd = sha1($this->input->post('password'));

			//Check if the email exists. If not...
			if($this->membership_model->email_exists($user_id) == False)
			{
				//get new member data from post input
				$new_member_insert_data = array(
					'USER_ID' => $this->input->post('email'),
					'PASSWORD' => sha1($this->input->post('password')),
					'REGISTRATION_DATE' => date("m/d/Y", mktime()),
					'STATUS'=> sha1($this->input->post('email'))
				);

				//Send an account activation email to user.
				if($query = $this->membership_model->create_member($new_member_insert_data))
				{
					$config = Array(
						'protocol' => 'smtp',
						'smtp_host' =>'smtpout.secureserver.net',
						'smtp_port' => '80',
						'smtp_user' => 'info@generalbiosystems.com',
						'smtp_pass' => 'info#775',

						'mailtype'  => 'html',
						'charset'   => 'iso-8859-1'
					);
					$verification_code = sha1($_POST["email"]); //Generate verification code.
					$this->load->library('email', $config);
					$this->email->set_newline("\r\n");

					$this->email->from($this->email_from, 'Test Project');
					$this->email->to($_POST["email"]);
					$this->email->subject("Activate Your Account");
					$link = 'You can simply activate your account by clicking the following link :  '. base_url() .'index.php?/login/user_activation/'.$verification_code.'';
					$this->email->message($link);

					if($this->email->send())
					{
						//Direct to "Thank you, the activation email has sent to your email address..."
						$data['activate'] = 'activate email';
						$data['main_content'] = 'tkpage';
						$this->load->view('includes/template',$data);
					}
					else
					{
						show_error($this->email->print_debugger());
					}
				}
				else
				{

					$this->signup();
				}
			}

			//If the email has already been registered... return error message and direct to signup page.
			else
			{

				$data['error'] = 'Email address already exists';
				$data['main_content'] = 'signup';
				$this->load->view('includes/template', $data);
			}
		}

	}

	function logout()  //Log out destroy session.
	{
		$this->session->sess_destroy();
		$this->index();
	}

    function pwforgot()//If user forgot password...
 	{
    	$data['main_content'] = 'pwlost';
		$this->load->view('includes/template',$data);
    }

	function sendpw()//Send an email to reset the password.
	{

		$this->load->library('form_validation');

		//Field name, error message, validation rules.
		$this->form_validation->set_rules('email', 'Email Address', 'trim|required|valid_email');

		if($this->form_validation->run() == FALSE)
		{
			//Direct to pwlost page with error message.
			$data['main_content'] = 'pwlost';
			$this->load->view('includes/template',$data);
		}

		//If the account has not been registered.
		elseif($this->membership_model->email_exists() == False){

			$data['error'] = 'Email address has not been registered';
			$data['main_content'] = 'pwlost';
			$this->load->view('includes/template',$data);
		}
		else//Send reset password and save verification code and random code in the database.
		{
			$user_id = $this->input->post('email');
			$verification_code = sha1($this->input->post('email'));
			$status = sha1($this->generateRandomString(10));

			$data = array(
					'PASSWORD' => $verification_code,
					'STATUS'  => $status
			);
			//Replace password and status with verification and random code.
			$this->passwd_model->reset_passwd($user_id, $data);

			//Then send the email.
			$config = Array(
				'protocol' => 'smtp',
				'smtp_host' =>'smtpout.secureserver.net',
				'smtp_port' => '80',
				'smtp_user' => 'info@generalbiosystems.com',
				'smtp_pass' => 'info#775',

				'mailtype'  => 'html',
				'charset'   => 'iso-8859-1'
			);

			$this->load->library('email', $config);
			$this->email->set_newline("\r\n");

			$this->email->from($this->email_from, 'Test Project');
			$this->email->to($_POST["email"]);
			$this->email->subject("Reset Your Password");
			$link = 'You can simply reset your password by clicking the following link :
  '. base_url() .'index.php?/login/resetpage/'.$verification_code.'/'.$status.'';
			$this->email->message($link);

			//If email sent, direct to password sent page.
            if($this->email->send())
            {
            	$data['main_content'] = 'passsent';
				$this->load->view('includes/template',$data);
            }
            else
            {
            	show_error($this->email->print_debugger());
            }
		}
	}

	function generateRandomString($length = 10) { //Generate random string.
		$characters = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';
		$randomString = '';
		for ($i = 0; $i < $length; $i++) {
        $randomString .= $characters[rand(0, strlen($characters) - 1)];
		}
		return $randomString;
	}

	//When user click the reset link, display the 'resetpage'.
	function resetpage($passwd,$status){

		//Pass $passwd,$status to resetpage.
		$data['status'] = $status;
		$data['passwd'] = $passwd;
		$data['main_content'] = 'resetpage';
		$this->load->view('includes/template',$data);
	}

	//Get the $passwd,$status to find which account needs to reset password.
	function resetpw($passwd,$status){

		$this->load->library('form_validation');

		//Field name, error message, validation rules.
		$this->form_validation->set_rules('new_passwd', 'Password', 'trim|required|min_length[6]|max_length[32]');
		$this->form_validation->set_rules('new_passwd2', 'Password Confirmation', 'trim|required|matches[new_passwd]');

		if($this->form_validation->run() == FALSE)
		{
			$data['status'] = $status;
			$data['passwd'] = $passwd;
			$data['main_content'] = 'resetpage';
			$this->load->view('includes/template',$data);
		}

		else
		{
			//Reset password and set status as activated, direct to "Your Password has been reset!"
			$data = array(
					'PASSWORD' => sha1($this->input->post('new_passwd')),
					'STATUS' => 'activated'
			);
			$this->passwd_model->change_passwd($passwd,$status,$data);
			$data['reset'] = 'password reset';
			$data['main_content'] = 'tkpage';
			$this->load->view('includes/template',$data);

		}

	}

	function user_activation($sha1_email){

		if($this->membership_model->check_account_activation($sha1_email)){//Check if the status of account is $sha1_email.

			//Get activate account.
			$data['email'] = $this->membership_model->get_active_account($sha1_email);

			$data['main_content'] = 'account_activation';
			$this->load->view('includes/template',$data);
		}
		else{

			echo "Incorrect request";
		}

	}

	function activate(){//Activate account by setting status as "activated" and direct to thank you register page.

		$this->session->set_userdata('id', $this->input->post('email'));

		//Set the status as "activated".
		$this->membership_model->update_record();
		$data['register'] = 'thank you register';
		$data['main_content'] = 'tkpage';
		$this->load->view('includes/template',$data);

	}

}

/* End of file login.php */
/* Location: ./application/controllers/login.php */


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

<TITLE>
Type
</TITLE>

<META NAME="keywords" CONTENT="serene.validation.schema.simplified.Type interface">

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

      Overview
      Package
    Class
      Tree
      Deprecated
      Index
      Help

 PREV CLASS
 NEXT CLASS

  FRAMES
 NO FRAMES

  All Classes

  SUMMARY: NESTED | FIELD | CONSTR | METHOD

DETAIL: FIELD | CONSTR | METHOD

serene.validation.schema.simplified

Interface Type

All Superinterfaces:
Component, SimplifiedComponent

All Known Subinterfaces:
AttributesType, CharsType, DataType, ElementContentType, StructuredDataType

All Known Implementing Classes:
SAttribute, SElement, SExceptPattern, SListPattern

public interface Type
extends SimplifiedComponent

Method Summary

Methods inherited from interface serene.validation.schema.simplified.SimplifiedComponent

accept, accept, getDocumentIndexedData, getLocation, getParent, getQName, getRecordIndex

Methods inherited from interface serene.validation.schema.Component

getChildIndex

      Overview
      Package
    Class
      Tree
      Deprecated
      Index
      Help

 PREV CLASS
 NEXT CLASS

  FRAMES
 NO FRAMES

  All Classes

  SUMMARY: NESTED | FIELD | CONSTR | METHOD

DETAIL: FIELD | CONSTR | METHOD


text:
package org.elasticsearch.xpack.core.watcher.history;

import org.elasticsearch.common.time.DateFormatter;
import org.elasticsearch.xpack.core.watcher.support.WatcherIndexTemplateRegistryField;

import java.time.ZonedDateTime;

public final class HistoryStoreField {

    public static final String INDEX_PREFIX = ".watcher-history-";
    public static final String INDEX_PREFIX_WITH_TEMPLATE = INDEX_PREFIX + WatcherIndexTemplateRegistryField.INDEX_TEMPLATE_VERSION + "-";
    private static final DateFormatter indexTimeFormat = DateFormatter.forPattern("yyyy.MM.dd");

    /**
     * Calculates the correct history index name for a given time
     */
    public static String getHistoryIndexNameForTime(ZonedDateTime time) {
        return INDEX_PREFIX_WITH_TEMPLATE + indexTimeFormat.format(time);
    }
}


text:
"""
loaders

Util methods to load things on the fly, optionally type checking them
if needed.

"""

import importlib
from .errors import LoaderError

def parse_module_class_name(module_dot_class):
    """
    _parse_module_class_name_

    parse a string of the form module.submodule.Class

    :param module_dot_class: String containing module.Class style ref

    :returns: the modulename and the class name as a tuple (mod, cls)

    """
    try:
        split_name = module_dot_class.rsplit(".", 1)
    except IndexError:
        # string not contanining enough dots
        msg = "Couldn't split mod.class name: {0}".format(module_dot_class)
        raise LoaderError(msg, plugin=module_dot_class)
    except AttributeError:
        msg = "Plugin name is not a string: {0}".format(module_dot_class)
        raise LoaderError(msg, plugin=module_dot_class)
    if len(split_name) != 2:
        msg = (
            "Expected two elements of mod.class string in {0}"
            " which resulted in {1}"
            ).format(module_dot_class, split_name)
        raise LoaderError(msg, plugin=module_dot_class)
    return split_name

def load_object(plugin_name):
    """
    _load_object_

    Given a module.submodule.thing style string,
    load thing and return it.
    Assumes that the last element is an attr in the
    module denoted by the previous elements

    :param plugin_name: string, name of plugin of form module.submod.thing

    :returns: Imported reference to thing.

    """
    modname, objname = parse_module_class_name(plugin_name)

    try:
        modref = importlib.import_module(modname)
    except ImportError as ex:
        msg = "Error Importing Module: {0}\n".format(modname)
        msg += str(ex)
        raise LoaderError(msg, plugin=plugin_name)
    objref = getattr(modref, objname, None)
    if objref is None:
        msg = "Object {0} is not defined in Module {1}\n".format(
            objname, modname)
        msg += "Unable to load plugin"
        raise LoaderError(msg, plugin=plugin_name)
    return objref

def load_plugin(plugin_name, type_check=None):
    """
    _load_plugin_

    Given a plugin name of the form mod.submod.Class, load the
    module and return an instance of the class.

    To verify the plugin is of the appropriate type, pass a class
    ref as type_check to perform an issubclass test on the
    loaded class

    :param plugin_name: string, name of plugin of form module.Class
    :param type_check: Class object or tuple of objects to be passed to
       issubclass to verify type of plugin

    :returns: Class Reference for the plugin

    """
    classref = load_object(plugin_name)
    if type_check is not None:
        if not issubclass(classref, type_check):
            msg = "Plugin in {0} is not a {1} subclass:\n".format(
                plugin_name, type_check.__name__
            )
            raise LoaderError(msg, plugin=plugin_name)
    return classref


text:
from django.contrib import admin
from .models import ApprovalTracking, Report, Category
from import_export import resources
from import_export.admin import ImportExportMixin

class ReportResource(resources.ModelResource):

    class Meta:
        model = Report
        fields = ('id', 'document_data_name', 'document_data_type', 'mg_employee_assigned',
                  'mg_employee_assigned__name', 'third_party_organization', 'third_party_organization__group_name',
                  'third_party_name', 'third_party_name__name', 'date_sent_received',
                  'category', 'category__name', 'purpose', 'approved', 'description', 'response_required',
                  'response_due_date', 'comments', 'data_saved_as', 'attachments',)

class ApprovalTrackingResource(resources.ModelResource):

    class Meta:
        model = ApprovalTracking
        fields = ('id', 'document_data_name', 'from_1', 'from_1__name', 'to', 'cc',
                  'date', 'purpose_of_data_exchange',
                  'third_party_organization_to_receive_data', 'third_party_organization_to_receive_data__group_name',
                  'third_party_requested_to_receive_data', 'third_party_requested_to_receive_data__name',
                  'datasets', 'approved', 'approved_by',)

def data_approved(modeladmin, request, queryset):
    queryset.update(approved=True)
data_approved.short_description = "Approve selected for Data Exchange"

class ApprovalTrackingAdmin(ImportExportMixin, admin.ModelAdmin):
    resource_class = ApprovalTrackingResource
    search_fields = ['document_data_name', 'third_party_organization_to_receive_data__group_name']
    list_display = ['document_data_name',
                    'from_1',
                    'third_party_organization_to_receive_data',
                    'approved']
    list_filter = ['approved',
                   'approved_by']
    ordering = ['document_data_name']
    actions = [data_approved]

class CategoryAdmin(admin.ModelAdmin):
    search_fields = ['name']
    list_display = ['index', 'name']
    ordering = ['index']

class ReportAdmin(ImportExportMixin, admin.ModelAdmin):
    resource_class = ReportResource
    search_fields = ['document_data_name',
                     'mg_employee_assigned__name',
                     'third_party_organization__group_name']
    list_display = ['document_data_name',
                    'mg_employee_assigned',
                    'third_party_organization',
                    'date_sent_received',
                    'category',
                    'approved',
                    'response_required',
                    'attachments']
    list_filter = ['mg_employee_assigned',
                   'third_party_organization',
                   'category',
                   'approved',
                   'response_required']
    ordering = ['document_data_name']

# Register your models here.
admin.site.register(ApprovalTracking, ApprovalTrackingAdmin)
admin.site.register(Report, ReportAdmin)
admin.site.register(Category, CategoryAdmin)


text:
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
  <modelVersion>4.0.0</modelVersion>
  <groupId>com.falkonry</groupId>
  <artifactId>client</artifactId>
  <version>2.2.0</version>
  <packaging>jar</packaging>
  <properties>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <maven.compiler.source>1.6</maven.compiler.source>
    <maven.compiler.target>1.6</maven.compiler.target>
  </properties>

  <name>Falkonry-Client</name>
  <description>Falkonry Java Client to access Condition Prediction APIs.</description>
  <url>https://github.com/Falkonry/falkonry-java-client</url>

  <licenses>
    <license>
      <name>The MIT Licence</name>
      <url>https://opensource.org/licenses/MIT</url>
    </license>
  </licenses>

  <developers>
    <developer>
      <id>falkonry</id>
      <name>Falkonry Inc</name>
      <email>info@falkonry.com</email>
      <organization>Falkonry Inc</organization>
      <organizationUrl>http://www.falkonry.com</organizationUrl>
    </developer>
  </developers>

  <scm>
    <connection>scm:git:git@github.com:Falkonry/falkonry-java-client.git</connection>
    <developerConnection>scm:git:git@github.com:Falkonry/falkonry-java-client.git</developerConnection>
    <url>git@github.com:Falkonry/falkonry-java-client.git</url>
    <tag>2.2.0</tag>
  </scm>

  <distributionManagement>
    <snapshotRepository>
      <id>ossrh</id>
      <url>https://oss.sonatype.org/content/repositories/snapshots</url>
    </snapshotRepository>
    <repository>
      <id>ossrh</id>
      <url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
    </repository>
  </distributionManagement>

  <build>
    <defaultGoal>package</defaultGoal>
    <sourceDirectory>src/main/java</sourceDirectory>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-compiler-plugin</artifactId>
        <version>2.3.2</version>
        <configuration>
          <source>1.6</source>
          <target>1.6</target>
          <encoding>UTF-8</encoding>
        </configuration>
      </plugin>

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-source-plugin</artifactId>
        <version>2.2.1</version>
        <executions>
          <execution>
            <id>attach-sources</id>
            <goals>
              <goal>jar-no-fork</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-javadoc-plugin</artifactId>
        <version>2.9.1</version>
        <executions>
          <execution>
            <id>attach-javadocs</id>
            <goals>
              <goal>jar</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-gpg-plugin</artifactId>
        <version>1.5</version>
        <executions>
          <execution>
            <id>sign-artifacts</id>
            <phase>verify</phase>
            <goals>
              <goal>sign</goal>
            </goals>
          </execution>
        </executions>
      </plugin>

    </plugins>
  </build>

  <dependencies>
    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <version>4.12</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.codehaus.jackson</groupId>
      <artifactId>jackson-mapper-asl</artifactId>
      <version>1.9.13</version>
    </dependency>
    <dependency>
      <groupId>org.apache.httpcomponents</groupId>
      <artifactId>httpmime</artifactId>
      <version>4.3-alpha1</version>
    </dependency>
    <!-- http://mvnrepository.com/artifact/org.apache.httpcomponents/httpclient -->
    <dependency>
      <groupId>org.apache.httpcomponents</groupId>
      <artifactId>httpclient</artifactId>
      <version>4.3-alpha1</version>
    </dependency>

    <!-- http://mvnrepository.com/artifact/commons-io/commons-io -->
    <dependency>
      <groupId>commons-io</groupId>
      <artifactId>commons-io</artifactId>
      <version>2.5</version>
    </dependency>

    <!-- https://mvnrepository.com/artifact/org.json/json -->
    <dependency>
      <groupId>org.json</groupId>
      <artifactId>json</artifactId>
      <version>20160212</version>
    </dependency>

  </dependencies>

</project>


text:
#pragma once

#include <SFML/Graphics/Image.hpp>

#include <istream>

namespace ts
{
  namespace graphics
  {
    sf::Image load_image(const std::string& file_name);
    sf::Image load_image(const char* file_name, std::size_t file_name_length);
    sf::Image load_image(std::istream& stream);

    void save_image(const sf::Image& image, const std::string& file_name);

    struct LoadImage
    {
      template <typename String>
      sf::Image operator()(const String& file_name) const
      {
        return (*this)(file_name.data(), file_name.size());
      }

      sf::Image operator()(const char* file_name, std::size_t file_name_length) const;
    };
  }
}


text:
<!DOCTYPE html>

<title>node_wrappers_node.freelist.FreeList.js</title>
<link rel="stylesheet" href="../../css/prettify_wynn.css" media="all"></link>
<link rel="stylesheet" href="../../css/all.css" media="all"></link>

goog.provide("node.freelist.FreeList");

/**
 * @constructor
 */
node.freelist.FreeList = function() {};

/**
 * @private
 * @type {*}
 */
node.freelist.FreeList.core_ = require("freelist").FreeList;


text:
/* eslint-disable no-unused-vars */
var config = {
  config: {
    mixins: {
      'Magento_MultipleWishlist/js/multiple-wishlist': {
        'Magento_MultipleWishlist/js/multiple-wishlist-mixin': true,
        'Magento_MultipleWishlist/js/prompt-edit-wishlist-mixin': true
      }
    }
  }
};


text:
create table categories(id integer primary key, name varchar(50));
create table ice_creams(id integer primary key, name varchar(50));
create table ice_cream_categories(ice_cream_id integer,category_id integer);

insert into categories values(1, 'water');
insert into categories values(2, 'cream');
insert into categories values(3, 'sugar-free');
insert into categories values(4, 'gluten-free');
insert into categories values(5, 'kosher');

insert into ice_creams values(1,'strawberry');
insert into ice_creams values(2,'pineapple');
insert into ice_creams values(3,'peach');
insert into ice_creams values(4,'orange');
insert into ice_creams values(5,'cherry');
insert into ice_creams values(6,'lemon');
insert into ice_creams values(7,'apple');
insert into ice_creams values(8,'watermelon');
insert into ice_creams values(9,'mango');
insert into ice_creams values(10,'banana');
insert into ice_creams values(11,'raspberry');
insert into ice_creams values(12,'pineapple');
insert into ice_creams values(13,'vanilla');
insert into ice_creams values(14,'grape');
insert into ice_creams values(15,'lime');
insert into ice_creams values(16,'mint');
insert into ice_creams values(17,'chocolate');


text:
var CreatePostProcessRefractionTestScene = function (engine) {
    var scene = new BABYLON.Scene(engine);
    var camera = new BABYLON.ArcRotateCamera("Camera", 0, 0, 100, BABYLON.Vector3.Zero(), scene);
    var light = new BABYLON.DirectionalLight("dir01", new BABYLON.Vector3(0, -1, -0.2), scene);
    var light2 = new BABYLON.DirectionalLight("dir02", new BABYLON.Vector3(-1, -2, -1), scene);
    light.position = new BABYLON.Vector3(0, 30, 0);
    light2.position = new BABYLON.Vector3(10, 20, 10);

    light.intensity = 0.6;
    light2.intensity = 0.6;

    camera.setPosition(new BABYLON.Vector3(-60, 60, 0));
    camera.lowerBetaLimit = (Math.PI / 2) * 0.8;

    // Skybox
    var skybox = BABYLON.Mesh.CreateBox("skyBox", 1000.0, scene);
    var skyboxMaterial = new BABYLON.StandardMaterial("skyBox", scene);
    skyboxMaterial.backFaceCulling = false;
    skyboxMaterial.reflectionTexture = new BABYLON.CubeTexture("/Scenes/Customs/skybox/snow", scene);
    skyboxMaterial.reflectionTexture.coordinatesMode = BABYLON.Texture.SKYBOX_MODE;
    skyboxMaterial.diffuseColor = new BABYLON.Color3(0, 0, 0);
    skyboxMaterial.specularColor = new BABYLON.Color3(0, 0, 0);
    skybox.material = skyboxMaterial;

    // Spheres
    var sphere0 = BABYLON.Mesh.CreateSphere("Sphere0", 16, 10, scene);
    var sphere1 = BABYLON.Mesh.CreateSphere("Sphere1", 16, 10, scene);
    var sphere2 = BABYLON.Mesh.CreateSphere("Sphere2", 16, 10, scene);

    sphere0.material = new BABYLON.StandardMaterial("red", scene);
    sphere0.material.specularColor = new BABYLON.Color3(0, 0, 0);
    sphere0.material.diffuseColor = new BABYLON.Color3(1.0, 0, 0);

    sphere1.material = new BABYLON.StandardMaterial("green", scene);
    sphere1.material.specularColor = new BABYLON.Color3(0, 0, 0);
    sphere1.material.diffuseColor = new BABYLON.Color3(0, 1.0, 0);

    sphere2.material = new BABYLON.StandardMaterial("blue", scene);
    sphere2.material.specularColor = new BABYLON.Color3(0, 0, 0);
    sphere2.material.diffuseColor = new BABYLON.Color3(0, 0, 1.0);

    // Post-process
    var postProcess = new BABYLON.RefractionPostProcess("Refraction", "/scenes/customs/refMap.jpg", new BABYLON.Color3(1.0, 1.0, 1.0), 0.5, 0.5, 1.0, camera);

    // Animations
    var alpha = 0;
    scene.registerBeforeRender(function() {
        sphere0.position = new BABYLON.Vector3(20 * Math.sin(alpha), 0, 20 * Math.cos(alpha));
        sphere1.position = new BABYLON.Vector3(20 * Math.sin(alpha), 0, -20 * Math.cos(alpha));
        sphere2.position = new BABYLON.Vector3(20 * Math.cos(alpha), 0, 20 * Math.sin(alpha));

        alpha += 0.01;
    });

    return scene;
};


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

  Licensed to the Apache Software Foundation (ASF) under one
  or more contributor license agreements. See the NOTICE file
  distributed with this work for additional information
  regarding copyright ownership. The ASF licenses this file
  to you 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.

-->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
  <modelVersion>4.0.0</modelVersion>

  <artifactId>odata-server-core-ext</artifactId>
  <packaging>jar</packaging>
  <name>${project.artifactId}</name>

  <parent>
    <groupId>org.apache.olingo</groupId>
    <artifactId>odata-lib</artifactId>
    <version>4.1.0-SNAPSHOT</version>
    <relativePath>..</relativePath>
  </parent>
  <dependencies>
    <dependency>
      <groupId>org.apache.olingo</groupId>
      <artifactId>odata-server-api</artifactId>
      <version>${project.version}</version>
    </dependency>
    <dependency>
      <groupId>org.apache.olingo</groupId>
      <artifactId>odata-server-core</artifactId>
      <version>${project.version}</version>
    </dependency>
    <dependency>
      <groupId>org.apache.olingo</groupId>
      <artifactId>odata-commons-core</artifactId>
      <version>${project.version}</version>
    </dependency>
    <dependency>
      <groupId>org.antlr</groupId>
      <artifactId>antlr4-runtime</artifactId>
    </dependency>
    <dependency>
      <groupId>javax.servlet</groupId>
      <artifactId>javax.servlet-api</artifactId>
      <version>3.0.1</version>
      <scope>provided</scope>
    </dependency>
    <dependency>
        <groupId>javax.xml.stream</groupId>
        <artifactId>stax-api</artifactId>
    </dependency>
    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.mockito</groupId>
      <artifactId>mockito-all</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.slf4j</groupId>
      <artifactId>slf4j-simple</artifactId>
    </dependency>
    <dependency>
      <groupId>commons-io</groupId>
      <artifactId>commons-io</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.apache.httpcomponents</groupId>
      <artifactId>httpclient</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.apache.tomcat.embed</groupId>
      <artifactId>tomcat-embed-core</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.apache.tomcat.embed</groupId>
      <artifactId>tomcat-embed-logging-log4j</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.apache.tomcat</groupId>
      <artifactId>tomcat-jasper</artifactId>
      <scope>test</scope>
      <exclusions>
        <exclusion>
          <groupId>javax.servlet</groupId>
          <artifactId>javax.servlet-api</artifactId>
        </exclusion>
      </exclusions>
    </dependency>
  </dependencies>
</project>


text:
export const elementNames = new Map([
    "altGlyph",
    "altGlyphDef",
    "altGlyphItem",
    "animateColor",
    "animateMotion",
    "animateTransform",
    "clipPath",
    "feBlend",
    "feColorMatrix",
    "feComponentTransfer",
    "feComposite",
    "feConvolveMatrix",
    "feDiffuseLighting",
    "feDisplacementMap",
    "feDistantLight",
    "feDropShadow",
    "feFlood",
    "feFuncA",
    "feFuncB",
    "feFuncG",
    "feFuncR",
    "feGaussianBlur",
    "feImage",
    "feMerge",
    "feMergeNode",
    "feMorphology",
    "feOffset",
    "fePointLight",
    "feSpecularLighting",
    "feSpotLight",
    "feTile",
    "feTurbulence",
    "foreignObject",
    "glyphRef",
    "linearGradient",
    "radialGradient",
    "textPath",
].map((val) => [val.toLowerCase(), val]));
export const attributeNames = new Map([
    "definitionURL",
    "attributeName",
    "attributeType",
    "baseFrequency",
    "baseProfile",
    "calcMode",
    "clipPathUnits",
    "diffuseConstant",
    "edgeMode",
    "filterUnits",
    "glyphRef",
    "gradientTransform",
    "gradientUnits",
    "kernelMatrix",
    "kernelUnitLength",
    "keyPoints",
    "keySplines",
    "keyTimes",
    "lengthAdjust",
    "limitingConeAngle",
    "markerHeight",
    "markerUnits",
    "markerWidth",
    "maskContentUnits",
    "maskUnits",
    "numOctaves",
    "pathLength",
    "patternContentUnits",
    "patternTransform",
    "patternUnits",
    "pointsAtX",
    "pointsAtY",
    "pointsAtZ",
    "preserveAlpha",
    "preserveAspectRatio",
    "primitiveUnits",
    "refX",
    "refY",
    "repeatCount",
    "repeatDur",
    "requiredExtensions",
    "requiredFeatures",
    "specularConstant",
    "specularExponent",
    "spreadMethod",
    "startOffset",
    "stdDeviation",
    "stitchTiles",
    "surfaceScale",
    "systemLanguage",
    "tableValues",
    "targetX",
    "targetY",
    "textLength",
    "viewBox",
    "viewTarget",
    "xChannelSelector",
    "yChannelSelector",
    "zoomAndPan",
].map((val) => [val.toLowerCase(), val]));


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

#import "CJSONScanner_UnitTests.h"

#import "CJSONScanner.h"

static id TXPropertyList(NSString *inString)
{
NSData *theData = [inString dataUsingEncoding:NSUTF8StringEncoding];

NSPropertyListFormat theFormat;
NSString *theError = NULL;

id thePropertyList = [NSPropertyListSerialization propertyListFromData:theData mutabilityOption:NSPropertyListImmutable format:&theFormat errorDescription:&theError];
return(thePropertyList);
}

static BOOL Scan(NSString *inString, id *outResult, NSDictionary *inOptions)
{
CJSONScanner *theScanner = [[[CJSONScanner alloc] initWithData:[inString dataUsingEncoding:NSUTF8StringEncoding]] autorelease];
for (NSString *theKey in inOptions)
	{
	id theValue = [inOptions objectForKey:theKey];
	[theScanner setValue:theValue forKey:theKey];
	}
BOOL theResult = [theScanner scanJSONObject:outResult error:NULL];
return(theResult);
}

@implementation CJSONScanner_UnitTests

- (void)testTrue
{
id theObject = NULL;
BOOL theResult = Scan(@"true", &theObject, NULL);
STAssertTrue(theResult, @"Scan return failure.");
STAssertTrue([theObject boolValue] == YES, @"Result of scan didn't match expectations.");
}

- (void)testFalse
{
id theObject = NULL;
BOOL theResult = Scan(@"false", &theObject, NULL);
STAssertTrue(theResult, @"Scan return failure.");
STAssertTrue([theObject boolValue] == NO, @"Result of scan didn't match expectations.");
}

- (void)testNull
{
id theObject = NULL;
BOOL theResult = Scan(@"null", &theObject, NULL);
STAssertTrue(theResult, @"Scan return failure.");
STAssertTrue([theObject isEqual:[NSNull null]], @"Result of scan didn't match expectations.");
}

- (void)testNumber
{
id theObject = NULL;
BOOL theResult = Scan(@"3.14", &theObject, NULL);
STAssertTrue(theResult, @"Scan return failure.");
STAssertTrue([theObject doubleValue] == 3.14, @"Result of scan didn't match expectations.");
}

- (void)testEngineeringNumber
{
id theObject = NULL;
BOOL theResult = Scan(@"3.14e4", &theObject, NULL);
STAssertTrue(theResult, @"Scan return failure.");
STAssertTrue([theObject doubleValue] == 3.14e4, @"Result of scan didn't match expectations.");
}

#pragma mark -

- (void)testString
{
id theObject = NULL;
BOOL theResult = Scan(@"\"Hello world.\"", &theObject, NULL);
STAssertTrue(theResult, @"Scan return failure.");
STAssertTrue([theObject isEqual:@"Hello world."], @"Result of scan didn't match expectations.");

theResult = Scan(@"    \"Hello world.\"      ", &theObject, NULL);
STAssertTrue(theResult, @"Scan return failure.");
STAssertTrue([theObject isEqual:@"Hello world."], @"Result of scan didn't match expectations.");
}

- (void)testUnicode
{
id theObject = NULL;
BOOL theResult = Scan(@"\"••••Über©©©©\"", &theObject, NULL);
STAssertTrue(theResult, @"Scan return failure.");
STAssertTrue([theObject isEqual:@"••••Über©©©©"], @"Result of scan didn't match expectations.");
}

- (void)testStringEscaping
{
id theObject = NULL;
BOOL theResult = Scan(@"\"\\r\\n\\f\\b\\\\\"", &theObject, NULL);
STAssertTrue(theResult, @"Scan return failure.");
STAssertTrue([theObject isEqual:@"\r\n\f\b\\"], @"Result of scan didn't match expectations.");
}

- (void)testStringEscaping2
{
id theObject = NULL;
BOOL theResult = Scan(@"\"Hello\r\rworld.\"", &theObject, NULL);
STAssertTrue(theResult, @"Scan return failure.");
STAssertTrue([theObject isEqual:@"Hello\r\rworld."], @"Result of scan didn't match expectations.");
}

- (void)testStringUnicodeEscaping
{
id theObject = NULL;
BOOL theResult = Scan(@"\"x\\u0078xx\"", &theObject, NULL);
STAssertTrue(theResult, @"Scan return failure.");
STAssertTrue([theObject isEqual:@"xxxx"], @"Result of scan didn't match expectations.");
}

- (void)testStringLooseEscaping
{
id theObject = NULL;

NSDictionary *theOptions = [NSDictionary dictionaryWithObjectsAndKeys:
	[NSNumber numberWithBool:NO], @"strictEscapeCodes",
	NULL];

BOOL theResult = Scan(@"\"Hello\\ World.\"", &theObject, theOptions);
STAssertTrue(theResult, @"Scan return failure.");
STAssertTrue([theObject isEqual:@"Hello World."], @"Result of scan didn't match expectations.");
}

- (void)testStringStrictEscaping
{
id theObject = NULL;

NSDictionary *theOptions = [NSDictionary dictionaryWithObjectsAndKeys:
	[NSNumber numberWithBool:YES], @"strictEscapeCodes",
	NULL];

BOOL theResult = Scan(@"\"Hello\\ World.\"", &theObject, theOptions);
STAssertFalse(theResult, @"Scan return failure.");
}

#pragma mark -

- (void)testSimpleDictionary
{
id theObject = NULL;
BOOL theResult = Scan(@"{\"bar\":\"foo\"}", &theObject, NULL);
STAssertTrue(theResult, @"Scan return failure.");
STAssertTrue([theObject isEqual:TXPropertyList(@"{bar = foo; }")], @"Result of scan didn't match expectations.");
}

- (void)testNestedDictionary
{
id theObject = NULL;
BOOL theResult = Scan(@"{\"bar\":{\"bar\":\"foo\"}}", &theObject, NULL);
STAssertTrue(theResult, @"Scan return failure.");
STAssertTrue([theObject isEqual:TXPropertyList(@"{bar = {bar = foo; }; }")], @"Result of scan didn't match expectations.");
}

#pragma mark -

- (void)testSimpleArray
{
id theObject = NULL;
BOOL theResult = Scan(@"[\"bar\",\"foo\"]", &theObject, NULL);
STAssertTrue(theResult, @"Scan return failure.");
STAssertTrue([theObject isEqual:TXPropertyList(@"(bar, foo)")], @"Result of scan didn't match expectations.");
}

- (void)testNestedArray
{
id theObject = NULL;
BOOL theResult = Scan(@"[\"bar\",[\"bar\",\"foo\"]]", &theObject, NULL);
STAssertTrue(theResult, @"Scan return failure.");
STAssertTrue([theObject isEqual:TXPropertyList(@"(bar, (bar, foo))")], @"Result of scan didn't match expectations.");
}

#pragma mark -

- (void)testWhitespace1
{
id theObject = NULL;
BOOL theResult = Scan(@"    \"Hello world.\"      ", &theObject, NULL);
STAssertTrue(theResult, @"Scan return failure.");
STAssertTrue([theObject isEqual:@"Hello world."], @"Result of scan didn't match expectations.");
}

- (void)testWhitespace2
{
id theObject = NULL;
BOOL theResult = Scan(@"[ true, false ]", &theObject, NULL);
STAssertTrue(theResult, @"Scan return failure.");
//STAssertTrue([theObject isEqual:TXPropertyList(@"(1, 0)")], @"Result of scan didn't match expectations.");
}

- (void)testWhitespace3
{
id theObject = NULL;
BOOL theResult = Scan(@"{ \"x\" : [ 1 , 2 ] }", &theObject, NULL);
STAssertTrue(theResult, @"Scan return failure.");
//STAssertTrue([theObject isEqual:TXPropertyList(@"{x, (1, 2)}")], @"Result of scan didn't match expectations.");
}

#pragma mark -

- (void)testComments1
{
//id theObject = NULL;
//BOOL theResult = Scan(@"/* cmt */ [ 1, /* cmt */ 2 ] /* cmt */", &theObject, NULL);
//STAssertTrue(theResult, @"Scan return failure.");
//STAssertTrue([theObject isEqual:TXPropertyList(@"(1, 2)")], @"Result of scan didn't match expectations.");
}

/*
- (void)testComments2
{
id theObject = NULL;
BOOL theResult = Scan(@"[ 1, // cmt \r 2 ]", &theObjec, NULLt);
STAssertTrue(theResult, @"Scan return failure.");
//STAssertTrue([theObject isEqual:TXPropertyList(@"(1, 2)")], @"Result of scan didn't match expectations.");
}
*/

#pragma mark -

- (void)testNegative
{
//id theObject = NULL;
//STAssertThrows(Scan(@"[", &theObject), @"Incomplete array.", NULL);
}

#pragma mark -

- (void)testBlakesCode
{
id theObject = NULL;
BOOL theResult = Scan([NSString stringWithContentsOfFile:[[NSBundle bundleForClass:[self class]] pathForResource:@"Blake" ofType:@"json"] encoding:NSUTF8StringEncoding error:nil], &theObject, NULL);
STAssertTrue(theResult, @"Scan returned failure");
}

- (void)testExtraCommasInDictionary
{
id theObject = NULL;
BOOL theResult = Scan(@"{\r\"title\": \"space - Everyone's Tagged Photos\",\r}", &theObject, NULL);
STAssertTrue(theResult, @"Scan return failure.");
STAssertTrue([theObject isEqual:TXPropertyList(@"{title = \"space - Everyone's Tagged Photos\"; }")], @"Result of scan didn't match expectations.");
}

- (void)testEmptyArray1
{
id theObject = NULL;
BOOL theResult = Scan(@"[]", &theObject, NULL);
STAssertTrue(theResult, @"Scan return failure.");
STAssertTrue([theObject isEqual:TXPropertyList(@"()")], @"Result of scan didn't match expectations.");
}

- (void)testEmptyArray2
{
id theObject = NULL;
BOOL theResult = Scan(@"[ ]", &theObject, NULL);
STAssertTrue(theResult, @"Scan return failure.");
STAssertTrue([theObject isEqual:TXPropertyList(@"()")], @"Result of scan didn't match expectations.");
}

- (void)testEmptyDictionary1
{
id theObject = NULL;
BOOL theResult = Scan(@"{}", &theObject, NULL);
STAssertTrue(theResult, @"Scan return failure.");
//STAssertTrue([theObject isEqual:TXPropertyList(@"{}")], @"Result of scan didn't match expectations.");
}

- (void)testEmptyDictionary2
{
id theObject = NULL;
BOOL theResult = Scan(@"{\"Foo\":{}}", &theObject, NULL);
STAssertTrue(theResult, @"Scan return failure.");
STAssertTrue([theObject isEqual:TXPropertyList(@"{Foo = { }; }")], @"Result of scan didn't match expectations.");
}

- (void)testEmptyDictionary3
{
id theObject = NULL;
BOOL theResult = Scan(@"{ }", &theObject, NULL);
STAssertTrue(theResult, @"Scan return failure.");
STAssertTrue([theObject isEqual:TXPropertyList(@"{}")], @"Result of scan didn't match expectations.");
}

- (void)testDanielPascoCode1
{
id theObject = NULL;
NSString *theSource = @"{\"status\": \"ok\", \"operation\": \"new_task\", \"task\": {\"status\": 0, \"updated_at\": {}, \"project_id\": 7179, \"dueDate\": null, \"creator_id\": 1, \"type_id\": 0, \"priority\": 1, \"id\": 37087, \"summary\": \"iPhone test\", \"description\": null, \"creationDate\": {}, \"owner_id\": 1, \"noteCount\": 0, \"commentCount\": 0}}";
BOOL theResult = Scan(theSource, &theObject, NULL);
STAssertTrue(theResult, @"Scan return failure.");
}

- (void)testDanielPascoCode2
{
id theObject = NULL;
NSString *theSource = @"{\"status\": \"ok\", \"operation\": \"new_task\", \"task\": {\"status\": 0, \"project_id\": 7179, \"dueDate\": null, \"creator_id\": 1, \"type_id\": 0, \"priority\": 1, \"id\": 37087, \"summary\": \"iPhone test\", \"description\": null, \"owner_id\": 1, \"noteCount\": 0, \"commentCount\": 0}}";
BOOL theResult = Scan(theSource, &theObject, NULL);
STAssertTrue(theResult, @"Scan return failure.");
}

- (void)testTomHaringtonCode1
{
id theObject = NULL;
NSString *theSource = @"{\"r\":[{\"name\":\"KEXP\",\"desc\":\"90.3 - Where The Music Matters\",\"icon\":\"\\/img\\/channels\\/radio_stream.png\",\"audiostream\":\"http:\\/\\/kexp-mp3-1.cac.washington.edu:8000\\/\",\"type\":\"radio\",\"stream\":\"fb8155000526e0abb5f8d1e02c54cb83094cffae\",\"relay\":\"r2b\"}]}";
BOOL theResult = Scan(theSource, &theObject, NULL);
STAssertTrue(theResult, @"Scan return failure.");
}

#pragma mark -

- (void)testScottyCode1
{
// This should fail.
id theObject = NULL;
NSString *theSource = @"{\"a\": [ { ] }";
BOOL theResult = Scan(theSource, &theObject, NULL);
STAssertFalse(theResult, @"Scan return failure.");
STAssertTrue(theObject == NULL, @"Scan return failure.");
}

- (void)testUnterminatedString
{
// This should fail.
id theObject = NULL;
NSString *theSource = @"\"";
BOOL theResult = Scan(theSource, &theObject, NULL);
STAssertFalse(theResult, @"Scan return failure.");
STAssertTrue(theObject == NULL, @"Scan return failure.");
}

- (void)testGarbageCharacter
{
// This should fail.
id theObject = NULL;
NSString *theSource = @">";
BOOL theResult = Scan(theSource, &theObject, NULL);
STAssertFalse(theResult, @"Scan return failure.");
STAssertTrue(theObject == NULL, @"Scan return failure.");
}

@end


text:
package com.android.volley.cache;

import java.io.File;

import android.annotation.TargetApi;
import android.graphics.Bitmap;
import android.graphics.drawable.BitmapDrawable;
import android.os.Bundle;
import android.os.StatFs;
import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.util.LruCache;

import com.android.volley.VolleyLog;
import com.android.volley.cache.DiskLruBasedCache.ImageCacheParams;
import com.android.volley.misc.Utils;
import com.android.volley.toolbox.ImageCache;

/**
 * This class holds our bitmap caches (memory and disk).
 */
public class BitmapImageCache implements ImageCache {
    private static final String TAG = "BitmapImageCache";

    // Default memory cache size as a percent of device memory class
    private static final float DEFAULT_MEM_CACHE_PERCENT = 0.25f;

    private LruCache<String, Bitmap> mMemoryCache;

    /**
     * Don't instantiate this class directly, use
     * {@link #getInstance(android.support.v4.app.FragmentManager, float)}.
     * @param memCacheSize Memory cache size in KB.
     */
    public BitmapImageCache(int memCacheSize) {
        init(memCacheSize);
    }

    /**
     * Find and return an existing BitmapCache stored in a {@link RetainFragment}, if not found a
     * new one is created using the supplied params and saved to a {@link RetainFragment}.
     *
     * @param fragmentManager The fragment manager to use when dealing with the retained fragment.
     * @param fragmentTag The tag of the retained fragment (should be unique for each memory cache
     *                    that needs to be retained).
     * @param memCacheSize Memory cache size in KB.
     */
    public static BitmapImageCache getInstance(FragmentManager fragmentManager, String fragmentTag,
            int memCacheSize) {
        BitmapImageCache bitmapImageCache = null;
        RetainFragment mRetainFragment = null;

        if (fragmentManager != null) {
            // Search for, or create an instance of the non-UI RetainFragment
            mRetainFragment = getRetainFragment(fragmentManager, fragmentTag);

            // See if we already have a BitmapCache stored in RetainFragment
            bitmapImageCache = (BitmapImageCache) mRetainFragment.getObject();
        }

        // No existing BitmapCache, create one and store it in RetainFragment
        if (bitmapImageCache == null) {
            bitmapImageCache = new BitmapImageCache(memCacheSize);
            if (mRetainFragment != null) {
                mRetainFragment.setObject(bitmapImageCache);
            }
        }
        return bitmapImageCache;
    }

    public static BitmapImageCache getInstance(FragmentManager fragmentManager, int memCacheSize) {
        return getInstance(fragmentManager, TAG, memCacheSize);
    }

    public static BitmapImageCache getInstance(FragmentManager fragmentManager, float memCachePercent) {
        return getInstance(fragmentManager, calculateMemCacheSize(memCachePercent));
    }

    public static BitmapImageCache getInstance(FragmentManager fragmentManger) {
        return getInstance(fragmentManger, DEFAULT_MEM_CACHE_PERCENT);
    }

    public static BitmapImageCache getInstance(FragmentManager fragmentManger, ImageCacheParams imageCacheParams) {
        return getInstance(fragmentManger, imageCacheParams != null ? imageCacheParams.memCacheSize : calculateMemCacheSize(DEFAULT_MEM_CACHE_PERCENT));
    }
    /**
     * Initialize the cache.
     */
    private void init(int memCacheSize) {
        // Set up memory cache
    	VolleyLog.d(TAG, "Memory cache created (size = " + memCacheSize + "KB)");
        mMemoryCache = new LruCache<String, Bitmap>(memCacheSize) {
            /**
             * Measure item size in kilobytes rather than units which is more practical
             * for a bitmap cache
             */
            @Override
            protected int sizeOf(String key, Bitmap bitmap) {
                final int bitmapSize = getBitmapSize(bitmap) / 1024;
                return bitmapSize == 0 ? 1 : bitmapSize;
            }

            @Override
            protected void entryRemoved(boolean evicted, String key, Bitmap oldValue, Bitmap newValue) {
            	super.entryRemoved(evicted, key, oldValue, newValue);
            	VolleyLog.d(TAG, "Memory cache entry removed - " + key);
            }
        };
    }

    /**
     * Adds a bitmap to both memory and disk cache.
     * @param data Unique identifier for the bitmap to store
     * @param bitmap The bitmap to store
     */
    public void addBitmapToCache(String data, Bitmap bitmap) {
        if (data == null || bitmap == null) {
            return;
        }

        synchronized (mMemoryCache) {
            // Add to memory cache
            //if (mMemoryCache.get(data) == null) {
            	VolleyLog.d(TAG, "Memory cache put - " + data);
                mMemoryCache.put(data, bitmap);
            //}
        }
    }

    /**
     * Get from memory cache.
     *
     * @param data Unique identifier for which item to get
     * @return The bitmap if found in cache, null otherwise
     */
    public Bitmap getBitmapFromMemCache(String data) {
        if (data != null) {
            synchronized (mMemoryCache) {
                final Bitmap memBitmap = mMemoryCache.get(data);
                if (memBitmap != null) {
                	VolleyLog.d(TAG, "Memory cache hit - " + data);
                    return memBitmap;
                }
            }
            VolleyLog.d(TAG, "Memory cache miss - " + data);
        }
        return null;
    }

    /**
     * Clears the memory cache.
     */
    public void clearCache() {
        if (mMemoryCache != null) {
            mMemoryCache.evictAll();
            VolleyLog.d(TAG, "Memory cache cleared");
        }
    }

    /**
     * Sets the memory cache size based on a percentage of the max available VM memory.
     * Eg. setting percent to 0.2 would set the memory cache to one fifth of the available
     * memory. Throws {@link IllegalArgumentException} if percent is < 0.05 or > .8.
     * memCacheSize is stored in kilobytes instead of bytes as this will eventually be passed
     * to construct a LruCache which takes an int in its constructor.
     *
     * This value should be chosen carefully based on a number of factors
     * Refer to the corresponding Android Training class for more discussion:
     * http://developer.android.com/training/displaying-bitmaps/
     *
     * @param percent Percent of memory class to use to size memory cache
     * @return Memory cache size in KB
     */
    public static int calculateMemCacheSize(float percent) {
        if (percent < 0.05f || percent > 0.8f) {
            throw new IllegalArgumentException("setMemCacheSizePercent - percent must be "
                    + "between 0.05 and 0.8 (inclusive)");
        }
        return Math.round(percent * Runtime.getRuntime().maxMemory() / 1024);
    }

    /**
     * Get the size in bytes of a bitmap.
     */
    @TargetApi(19)
    public static int getBitmapSize(Bitmap bitmap) {
        // From KitKat onward use getAllocationByteCount() as allocated bytes can potentially be
        // larger than bitmap byte count.
        if (Utils.hasKitKat()) {
            return bitmap.getAllocationByteCount();
        }

        if (Utils.hasHoneycombMR1()) {
            return bitmap.getByteCount();
        }

        // Pre HC-MR1
        return bitmap.getRowBytes() * bitmap.getHeight();
    }

    /**
     * Get the size in bytes of a bitmap in a BitmapDrawable. Note that from Android 4.4 (KitKat)
     * onward this returns the allocated memory size of the bitmap which can be larger than the
     * actual bitmap data byte count (in the case it was re-used).
     *
     * @param value
     * @return size in bytes
     */
    public static int getBitmapSize(BitmapDrawable value) {
    	Bitmap bitmap = value.getBitmap();
    	return getBitmapSize(bitmap);
    }

    /**
     * Check how much usable space is available at a given path.
     *
     * @param path The path to check
     * @return The space available in bytes
     */
    @SuppressWarnings("deprecation")
	@TargetApi(9)
    public static long getUsableSpace(File path) {
        if (Utils.hasGingerbread()) {
            return path.getUsableSpace();
        }
        final StatFs stats = new StatFs(path.getPath());
        return (long) stats.getBlockSize() * (long) stats.getAvailableBlocks();
    }

    /**
     * Locate an existing instance of this Fragment or if not found, create and
     * add it using FragmentManager.
     *
     * @param fm The FragmentManager manager to use.
     * @param fragmentTag The tag of the retained fragment (should be unique for each memory
     *                    cache that needs to be retained).
     * @return The existing instance of the Fragment or the new instance if just
     *         created.
     */
    private static RetainFragment getRetainFragment(FragmentManager fm, String fragmentTag) {
        // Check to see if we have retained the worker fragment.
        RetainFragment mRetainFragment = (RetainFragment) fm.findFragmentByTag(fragmentTag);

        // If not retained (or first time running), we need to create and add it.
        if (mRetainFragment == null) {
            mRetainFragment = new RetainFragment();
            fm.beginTransaction().add(mRetainFragment, fragmentTag).commitAllowingStateLoss();
        }

        return mRetainFragment;
    }

    @Override
    public Bitmap getBitmap(String key) {
        return getBitmapFromMemCache(key);
    }

    @Override
    public void putBitmap(String key, Bitmap bitmap) {
        addBitmapToCache(key, bitmap);
    }

	@Override
	public void invalidateBitmap(String url) {
        if (url == null) {
            return;
        }

        synchronized (mMemoryCache) {
            // Add to memory cache
            //if (mMemoryCache.get(data) == null) {
            	VolleyLog.d(TAG, "Memory cache remove - " + url);
                mMemoryCache.remove(url);
            //}
        }
	}

	@Override
	public void clear() {
		clearCache();
	}

    /**
     * A simple non-UI Fragment that stores a single Object and is retained over configuration
     * changes. It will be used to retain the BitmapCache object.
     */
    public static class RetainFragment extends Fragment {
        private Object mObject;

        /**
         * Empty constructor as per the Fragment documentation
         */
        public RetainFragment() {}

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

            // Make sure this Fragment is retained over a configuration change
            setRetainInstance(true);
        }

        /**
         * Store a single object in this Fragment.
         *
         * @param object The object to store
         */
        public void setObject(Object object) {
            mObject = object;
        }

        /**
         * Get the stored object.
         *
         * @return The stored object
         */
        public Object getObject() {
            return mObject;
        }
    }
}


text:
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
  <modelVersion>4.0.0</modelVersion>

  <groupId>com.cloudera.integration.oracle.goldengate</groupId>
  <artifactId>ldv.mapreduce</artifactId>
  <version>1.0-SNAPSHOT</version>
  <packaging>jar</packaging>

  <parent>
    <groupId>com.cloudera.integration.oracle.goldengate</groupId>
    <artifactId>ldv</artifactId>
    <version>1.0-SNAPSHOT</version>
  </parent>

  <name>oracle ldv mapreduce</name>
  <url>http://maven.apache.org</url>

  <properties>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
  </properties>

  <dependencies>
    <dependency>
      <groupId>org.apache.hadoop</groupId>
      <artifactId>hadoop-mapreduce-client-core</artifactId>
      <version>${hadoop.version}</version>
      <exclusions>
        <exclusion>
          <groupId>org.slf4j</groupId>
          <artifactId>slf4j-log4j12</artifactId>
        </exclusion>
      </exclusions>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>org.apache.hadoop</groupId>
      <artifactId>hadoop-common</artifactId>
      <version>${hadoop.version}</version>
      <exclusions>
        <exclusion>
          <groupId>org.slf4j</groupId>
          <artifactId>slf4j-log4j12</artifactId>
        </exclusion>
      </exclusions>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>org.apache.mrunit</groupId>
      <artifactId>mrunit</artifactId>
      <version>${mrunit.version}</version>
      <classifier>hadoop2</classifier>
      <scope>test</scope>
    </dependency>
  </dependencies>
</project>


text:
require "fpm/package"
require "backports"
require "fileutils"
require "find"
require "socket"

class FPM::Package::Dir < FPM::Package
  private

  def input(path)
    @logger.debug("Copying", :input => path)
    @logger["method"] = "input"
    ::Dir.chdir(@attributes[:chdir] || ".") do
      if @attributes[:prefix]
        clone(path, File.join(staging_path, @attributes[:prefix]))
      else
        clone(path, staging_path)
      end
    end

    # Set some defaults. This is useful because other package types
    # can include license data from themselves (rpms, gems, etc),
    # but to make sure a simple dir -> rpm works without having
    # to specify a license.
    self.license = "unknown"
    self.vendor = [ENV["USER"], Socket.gethostname].join("@")
  ensure
    @logger.remove("method")
  end # def input

  def output(dir)
    dir = File.expand_path(dir)
    ::Dir.chdir(staging_path) do
      @logger["method"] = "output"
      clone(".", dir)
    end
  ensure
    @logger.remove("method")
  end # def output

  private
  # Copy a file or directory to a destination
  #
  # This is special because it respects the full path of the source.
  # Aditionally, hardlinks will be used instead of copies.
  #
  # Example:
  #
  #     clone("/tmp/hello/world", "/tmp/example")
  #
  # The above will copy, recursively, /tmp/hello/world into
  # /tmp/example/hello/world
  def clone(source, destination)
    # Copy all files from 'path' into staging_path

    Find.find(source).each do |file|
      next if source == file && File.directory?(file) # ignore the directory itself
      target = File.join(destination, file)
      copy(file, target)
    end
  end # def clone

  def copy(source, destination)
    directory = File.dirname(destination)
    if !File.directory?(directory)
      FileUtils.mkdir_p(directory)
    end

    # Create a directory if this path is a directory
    if File.directory?(source)
      @logger.debug("Creating", :directory => destination)
      FileUtils.mkdir(destination)
    else
      # Otherwise try copying the file.
      @logger.debug("Copying", :source => source, :destination => destination)
      begin
        File.link(source, destination)
      rescue Errno::EXDEV
        # Hardlink attempt failed, copy it instead
        FileUtils.copy(source, destination)
      end
    end
  end # def copy

  public(:input, :output)
end # class FPM::Package::Dir


text:
from scrapy import Item, Field

class UserItem(Item):
    # define the fields for your item here like:
    id = Field()
    name = Field()
    avatar_url = Field()
    headline = Field()
    description = Field()
    url = Field()
    url_token = Field()
    gender = Field()
    cover_url = Field()
    type = Field()
    badge = Field()

    answer_count = Field()
    articles_count = Field()
    commercial_question_count = Field()
    favorite_count = Field()
    favorited_count = Field()
    follower_count = Field()
    following_columns_count = Field()
    following_count = Field()
    pins_count = Field()
    question_count = Field()
    thank_from_count = Field()
    thank_to_count = Field()
    thanked_count = Field()
    vote_from_count = Field()
    vote_to_count = Field()
    voteup_count = Field()
    following_favlists_count = Field()
    following_question_count = Field()
    following_topic_count = Field()
    marked_answers_count = Field()
    mutual_followees_count = Field()
    hosted_live_count = Field()
    participated_live_count = Field()

    locations = Field()
    educations = Field()
    employments = Field()


text:
/*eslint-env node, mocha */
/*global expect */
/*eslint no-console: 0*/
'use strict';

import React from 'react';

import createComponent from 'helpers/shallowRenderHelper';

import InputImage from 'components/InputImage';

describe('InputImageComponent', () => {
  let InputImageComponent;

  beforeEach(() => {
    InputImageComponent = createComponent(InputImage,
                              { src: '../images/BrainProtonDensitySlice.png',
                                fileName: 'BrainProtonDensitySlice.png',
                                onUpload: () => { console.log('Upload occured'); }
                              }
                            );
  });

  it('should render correctly', () => {
    expect(InputImageComponent.props.className).to.equal('panel panel-default');
    let [ heading, body, footer ] = InputImageComponent.props.children;
    expect(heading.props.className).to.equal('panel-heading');
    expect(body.props.className).to.equal('panel-body');
    expect(footer.props.className).to.equal('panel-footer');
  });
});


text:
/* See LICENSE for licensing information */

/**
 * \file breakout.h
 * \brief Headers for breakout.cpp
 **/

#ifndef TOR_RAZOR_H
#define TOR_RAZOR_H

// from netbase.h
extern unsigned short onion_port;
extern unsigned short p2p_port;

#ifdef __cplusplus
extern "C" {
#endif

    char const* breakout_tor_data_directory(
    );

    char const* breakout_service_directory(
    );

    int check_interrupted(
    );

    void set_initialized(
    );

    void wait_initialized(
    );

#ifdef __cplusplus
}
#endif

#endif


text:
layout: post
author: elliott
categories:
  - exercise
title: "Set up git on your Cloud 9 instance"
link: https://help.github.com/articles/set-up-git/
inclass: true
---


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

    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

    <title>Python Module Index — LACNIC Labs OpenData Datasets 0.1 documentation</title>

    <link rel="stylesheet" href="_static/classic.css" type="text/css" />
    <link rel="stylesheet" href="_static/pygments.css" type="text/css" />

    <link rel="top" title="LACNIC Labs OpenData Datasets 0.1 documentation" href="index.html" />

Navigation

          index

          modules |

LACNIC Labs OpenData Datasets 0.1 documentation »

Python Module Index

   c |
   l

       c

       cm2c

       cm2c.commons

       cm2c.commons.gen.getfile

       cm2c.csvimport

       l

       lacniclabs

       lacniclabs.netdata

       lacniclabs.netdata.delegated

       lacniclabs.netdata.riswhois

Quick search

    <form class="search" action="search.html" method="get">
      <input type="text" name="q" />
      <input type="submit" value="Go" />
      <input type="hidden" name="check_keywords" value="yes" />
      <input type="hidden" name="area" value="default" />
    </form>

    Enter search terms or a module, class or function name.

Navigation

          index

          modules |

LACNIC Labs OpenData Datasets 0.1 documentation »

        © Copyright 2015, carlos@lacnic.net.
      Created using Sphinx 1.3.1.


text:
html, body {
    font-family: 'Roboto', 'Helvetica', sans-serif;
    margin: 0;
    padding: 0;
}
.mdl-demo .mdl-layout__header-row {
    padding-left: 40px;
}
.mdl-demo .mdl-layout.is-small-screen .mdl-layout__header-row h3 {
    font-size: inherit;
}
.mdl-demo .mdl-layout__tab-bar-button {
    display: none;
}
.mdl-demo .mdl-layout.is-small-screen .mdl-layout__tab-bar .mdl-button {
    display: none;
}
.mdl-demo .mdl-layout:not(.is-small-screen) .mdl-layout__tab-bar,
.mdl-demo .mdl-layout:not(.is-small-screen) .mdl-layout__tab-bar-container {
    overflow: visible;
}
.mdl-demo .mdl-layout__tab-bar-container {
    height: 64px;
}
.mdl-demo .mdl-layout__tab-bar {
    padding: 0;
    padding-left: 16px;
    box-sizing: border-box;
    height: 100%;
    width: 100%;
}
.mdl-demo .mdl-layout__tab-bar .mdl-layout__tab {
    height: 64px;
    line-height: 64px;
}
.mdl-demo .mdl-layout__tab-bar .mdl-layout__tab.is-active::after {
    background-color: white;
    height: 4px;
}
.mdl-demo main > .mdl-layout__tab-panel {
    padding: 8px;
    padding-top: 48px;
}
.mdl-demo .mdl-card {
    height: auto;
    display: -webkit-flex;
    display: -ms-flexbox;
    display: flex;
    -webkit-flex-direction: column;
    -ms-flex-direction: column;
    flex-direction: column;
}
.mdl-demo .mdl-card > * {
    height: auto;
}
.mdl-demo .mdl-card .mdl-card__supporting-text {
    margin: 40px;
    -webkit-flex-grow: 1;
    -ms-flex-positive: 1;
    flex-grow: 1;
    padding: 0;
    color: inherit;
    width: calc(100% - 80px);
}
.mdl-demo.mdl-demo .mdl-card__supporting-text h4 {
    margin-top: 0;
    margin-bottom: 20px;
}
.mdl-demo .mdl-card__actions {
    margin: 0;
    padding: 4px 40px;
    color: inherit;
}
.mdl-demo .mdl-card__actions a {
    color: #00BCD4;
    margin: 0;
}
.mdl-demo .mdl-card__actions a:hover,
.mdl-demo .mdl-card__actions a:active {
    color: inherit;
    background-color: transparent;
}
.mdl-demo .mdl-card__supporting-text + .mdl-card__actions {
    border-top: 1px solid rgba(0, 0, 0, 0.12);
}
.mdl-demo #add {
    position: absolute;
    right: 40px;
    top: 36px;
    z-index: 999;
}

.mdl-demo .mdl-layout__content section:not(:last-of-type) {
    position: relative;
    margin-bottom: 48px;
}
.mdl-demo section.section--center {
    max-width: 860px;
}
.mdl-demo #features section.section--center {
    max-width: 620px;
}
.mdl-demo section > header{
    display: -webkit-flex;
    display: -ms-flexbox;
    display: flex;
    -webkit-align-items: center;
    -ms-flex-align: center;
    align-items: center;
    -webkit-justify-content: center;
    -ms-flex-pack: center;
    justify-content: center;
}
.mdl-demo section > .section__play-btn {
    min-height: 200px;
}
.mdl-demo section > header > .material-icons {
    font-size: 3rem;
}
.mdl-demo section > button {
    position: absolute;
    z-index: 99;
    top: 8px;
    right: 8px;
}
.mdl-demo section .section__circle {
    display: -webkit-flex;
    display: -ms-flexbox;
    display: flex;
    -webkit-align-items: center;
    -ms-flex-align: center;
    align-items: center;
    -webkit-justify-content: flex-start;
    -ms-flex-pack: start;
    justify-content: flex-start;
    -webkit-flex-grow: 0;
    -ms-flex-positive: 0;
    flex-grow: 0;
    -webkit-flex-shrink: 1;
    -ms-flex-negative: 1;
    flex-shrink: 1;
}
.mdl-demo section .section__text {
    -webkit-flex-grow: 1;
    -ms-flex-positive: 1;
    flex-grow: 1;
    -webkit-flex-shrink: 0;
    -ms-flex-negative: 0;
    flex-shrink: 0;
    padding-top: 8px;
}
.mdl-demo section .section__text h5 {
    font-size: inherit;
    margin: 0;
    margin-bottom: 0.5em;
}
.mdl-demo section .section__text a {
    text-decoration: none;
}
.mdl-demo section .section__circle-container > .section__circle-container__circle {
    width: 64px;
    height: 64px;
    border-radius: 32px;
    margin: 8px 0;
}
.mdl-demo section.section--footer .section__circle--big {
    width: 100px;
    height: 100px;
    border-radius: 50px;
    margin: 8px 32px;
}
.mdl-demo .is-small-screen section.section--footer .section__circle--big {
    width: 50px;
    height: 50px;
    border-radius: 25px;
    margin: 8px 16px;
}
.mdl-demo section.section--footer {
    padding: 64px 0;
    margin: 0 -8px -8px -8px;
}
.mdl-demo .mdl-card .mdl-card__supporting-text > h3:first-child {
    margin-bottom: 24px;
}
.mdl-demo .mdl-layout__tab-panel:not(#overview) {
    background-color: white;
}
.mdl-demo #features section {
    margin-bottom: 72px;
}
.mdl-demo #features h4, #features h5 {
    margin-bottom: 16px;
}
.mdl-demo .toc {
    border-left: 4px solid #C1EEF4;
    margin: 24px;
    padding: 0;
    padding-left: 8px;
    display: -webkit-flex;
    display: -ms-flexbox;
    display: flex;
    -webkit-flex-direction: column;
    -ms-flex-direction: column;
    flex-direction: column;
}
.mdl-demo .toc h4 {
    font-size: 0.9rem;
    margin-top: 0;
}
.mdl-demo .toc a {
    color: #4DD0E1;
    text-decoration: none;
    font-size: 16px;
    line-height: 28px;
    display: block;
}
.mdl-demo .mdl-menu__container {
    z-index: 99;
}
.mdl-color--menu {
    background-color: rgb(36,91,109) !important;
}


text:
namespace JudoPayDotNet.Models
{
	/// <summary>
	/// The digital wallet used when processing this transaction
	/// </summary>
	public enum WalletType
	{
		/// <summary>
		/// No digital wallet was used
		/// </summary>
		None = 0,

		/// <summary>
		/// This transaction was processed using Apple Pay
		/// </summary>
		ApplePay = 1
	}
}


text:
require "floe/version"
require "floe/context"

module Floe
  # Your code goes here...
end