text:
<?xml version="1.0" encoding="UTF-8"?>
<omexManifest xmlns="http://identifiers.org/combine.specifications/omex-manifest">
  <content location="." format="http://identifiers.org/combine.specifications/omex" master="false"/>
  <content location="manifest.xml" format="application/xml" master="false"/>
  <content location="plot_numl_with_model.xml" format="http://identifiers.org/combine.specifications/sed-ml" master="true"/>
  <content location="oscli.xml" format="http://identifiers.org/combine.specifications/sbml" master="true"/>
  <content location="oscli.numl" master="false"/>
</omexManifest>

redpajama_set_name: RedPajamaGithub


text:
PYTHON=python
PIP="python -m pip"
./resolve.sh
$PYTHON setup.py test_java
$PIP install gcovr pytest-cov jedi
$PYTHON setup.py --enable-coverage --enable-build-jar build_ext --inplace
$PYTHON -m pytest -rsx -v test/jpypetest \
	--cov-report=xml:coverage_py.xml \
	--cov-report=html:build/coverage/python \
	--cov=jpype \
	--classpath="build/classes" --jacoco --checkjni
java -jar lib/org.jacoco.cli-0.8.5-nodeps.jar report build/coverage/jacoco.exec \
	--classfiles build/classes/ \
	--html build/coverage/java \
	--sourcefiles native/java
mkdir build/coverage/cpp
gcovr -r . --html-details -o build/coverage/cpp/jpype.html --exclude-unreachable-branches --exclude-throw-branches


text:
package cmd

import (
	"fmt"
	"os"

	"github.com/spf13/cobra"
	"github.com/spf13/viper"
)

var cfgFile string

var outputRaw bool
var outputJSON bool
var showFullCA bool
var apiToken string
var noDecodeCA bool
var caEscaped bool
var recipewatch bool
var recipewait bool

// RootCmd represents the base command when called without any subcommands
var RootCmd = &cobra.Command{
	Use:   "bach",
	Short: "Basic API Compose Handler",
	Long:  `Bach is designed as simple route to accessing the Compose API`,
}

// Execute adds all child commands to the root command sets flags appropriately.
// This is called by main.main(). It only needs to happen once to the rootCmd.
func Execute() {
	if err := RootCmd.Execute(); err != nil {
		fmt.Println(err)
		os.Exit(-1)
	}
}

func init() {
	cobra.OnInitialize(initConfig)

	RootCmd.PersistentFlags().BoolVar(&outputRaw, "raw", false, "Output raw JSON responses (disables --watch)")
	RootCmd.PersistentFlags().BoolVar(&outputJSON, "json", false, "Output post-processed JSON results")
	RootCmd.PersistentFlags().BoolVar(&showFullCA, "fullca", false, "Show all of CA Certificates")
	RootCmd.PersistentFlags().StringVar(&apiToken, "token", "Your API Token", "Your API Token")
	RootCmd.PersistentFlags().BoolVar(&noDecodeCA, "nodecodeca", false, "Do not Decode base64 CA Certificates")
	RootCmd.PersistentFlags().BoolVar(&caEscaped, "caescaped", false, "Display full CAs as escaped strings")
	RootCmd.PersistentFlags().BoolVar(&recipewatch, "watch", false, "Automatically watch a resulting recipe")
	RootCmd.PersistentFlags().BoolVar(&recipewait, "wait", false, "Automatically silently wait for a resulting recipe to finish")

}

// initConfig reads in config file and ENV variables if set.
func initConfig() {
	if cfgFile != "" { // enable ability to specify config file via flag
		viper.SetConfigFile(cfgFile)
	}

	viper.SetConfigName(".bach")           // name of config file (without extension)
	viper.AddConfigPath(os.Getenv("HOME")) // adding home directory as first search path
	viper.AutomaticEnv()                   // read in environment variables that match

	// If a config file is found, read it in.
	if err := viper.ReadInConfig(); err == nil {
		fmt.Println("Using config file:", viper.ConfigFileUsed())
	}
}


text:
using System;

using OSharp.Filter;

using OSharp.Hosting.Infos;

namespace OSharp.Hosting.Apis.Areas.Admin.Controllers
{
    /// <summary>
    /// 管理控制器: 站内信回复信息
    /// </summary>
    public class MessageReplyController : MessageReplyControllerBase
    {
        /// <summary>
        /// 初始化一个<see cref="MessageReplyController"/>类型的新实例
        /// </summary>
        public MessageReplyController(IServiceProvider provider)
            : base(provider)
        { }
    }
}


text:
<<<<<<< HEAD
# AAdmin

TODO: Write a gem description

## Installation

Add this line to your application's Gemfile:

    gem 'a_admin'

And then execute:

    $ bundle

Or install it yourself as:

    $ gem install a_admin

## Usage

TODO: Write usage instructions here

## Contributing

1. Fork it
2. Create your feature branch (`git checkout -b my-new-feature`)
3. Commit your changes (`git commit -am 'Add some feature'`)
4. Push to the branch (`git push origin my-new-feature`)
5. Create new Pull Request
=======
a_admin
=======
>>>>>>> 1eb931269d99bd4a25f8c4be06c8f374bf7e3257


text:
CREATE DATABASE inventory;

CREATE TABLE users (
user_Id int AUTO_INCREMENT,
username varchar(25) UNIQUE NOT NULL,
password varchar(255) NOT NULL,
enabled bit NOT NULL DEFAULT 1,
date_Created datetime DEFAULT CURRENT_TIMESTAMP NOT NULL,
date_Modified datetime DEFAULT CURRENT_TIMESTAMP NOT NULL,
PRIMARY KEY (user_Id)
);

CREATE TABLE role (
role_Id int AUTO_INCREMENT,
role_Name varchar(50) unique NOT NULL,
role_Description varchar(150),
PRIMARY KEY (role_Id)
);

CREATE TABLE instance (
instance_Id int AUTO_INCREMENT,
instance_Name varchar(75) NOT NULL,
instance_Description varchar(150),
creation_User_Id int,
date_Created datetime DEFAULT CURRENT_TIMESTAMP NOT NULL,
date_Modified datetime DEFAULT CURRENT_TIMESTAMP NOT NULL,
PRIMARY KEY (instance_Id)
);

CREATE TABLE userrole (
userrole_Id int AUTO_INCREMENT,
user_Id int NOT NULL,
role_Id int NOT NULL,
instance_Id int NOT NULL,
date_Created datetime DEFAULT CURRENT_TIMESTAMP NOT NULL,
date_Modified datetime DEFAULT CURRENT_TIMESTAMP NOT NULL,
PRIMARY KEY (userrole_Id),
FOREIGN KEY (user_Id) REFERENCES users(user_Id),
FOREIGN KEY (role_Id) REFERENCES role(role_Id),
FOREIGN KEY (instance_Id) REFERENCES instance(instance_Id)
);

CREATE TABLE category (
category_Id int AUTO_INCREMENT,
category_Name varchar(75) NOT NULL,
instance_Id int NOT NULL,
creation_User_Id int,
date_Created datetime DEFAULT CURRENT_TIMESTAMP NOT NULL,
date_Modified datetime DEFAULT CURRENT_TIMESTAMP NOT NULL,
PRIMARY KEY (category_Id)
);

CREATE TABLE item (
item_Id int AUTO_INCREMENT,
item_Name varchar(75) NOT NULL,
category_Id int NOT NULL,
instance_Id int NOT NULL,
creation_User_Id int,
date_Created datetime DEFAULT CURRENT_TIMESTAMP NOT NULL,
date_Modified datetime DEFAULT CURRENT_TIMESTAMP NOT NULL,
PRIMARY KEY (item_Id),
FOREIGN KEY (category_Id) REFERENCES category(category_Id)
);

CREATE TABLE quantity (
quantity_Id int AUTO_INCREMENT,
item_Id int UNIQUE NOT NULL,
quantity int DEFAULT 0 NOT NULL,
quantity_Type varchar(50) NOT NULL,
date_Modified datetime DEFAULT CURRENT_TIMESTAMP NOT NULL,
PRIMARY KEY (quantity_Id),
FOREIGN KEY (item_Id) REFERENCES item(item_Id)
);


text:
    <form class="form-horizontal">
        <fieldset>
            <legend>Water</legend>

                    Mashing Water

                        <input id="mashing_water" class="span1" type="text" value="<%= mashing_water %>">
                        l

                    Sparging Water

                        <input id="sparging_water" class="span1" type="text" value="<%= sparging_water %>">
                        l

                    Wort Volume

                        <input id="wort_size" class="span1" type="text" value="<%= wort_size %>">
                        l

        </fieldset>
    </form>


text:
package com.google.security.zynamics.zylib.gui.sliders;

import java.awt.BorderLayout;

import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.JSlider;
import javax.swing.border.Border;

public class DoubleLabeledSlider extends JPanel {
  private static final long serialVersionUID = 3181291967149555468L;

  private final JSlider m_slider;

  public DoubleLabeledSlider(final String leftText, final String rightText, final int min,
      final int max) {
    setLayout(new BorderLayout());

    final JLabel leftLabel = new JLabel(leftText);

    m_slider = new JSlider(min, max);
    m_slider.setMinorTickSpacing(1);
    m_slider.setPaintTicks(true);
    m_slider.setPaintLabels(true);

    final JLabel rightLabel = new JLabel(rightText);

    add(leftLabel, BorderLayout.WEST);
    add(m_slider);
    add(rightLabel, BorderLayout.EAST);
  }

  public DoubleLabeledSlider(final String leftText, final String rightText, final int min,
      final int max, final boolean trackbar, final Border border) {
    this(leftText, rightText, min, max);

    m_slider.setPaintTrack(trackbar);

    setBorder(border);
  }

  public static void main(final String[] args) {
    final JFrame frame = new JFrame();

    final DoubleLabeledSlider slider = new DoubleLabeledSlider("Low", "High", 0, 5);

    frame.add(slider);

    frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);

    frame.setSize(400, 400);
    frame.setVisible(true);
  }

  public int getValue() {
    return m_slider.getValue();
  }

  public void setInverted(final boolean inverted) {
    m_slider.setInverted(inverted);
  }

  public void setValue(final int value) {
    m_slider.setValue(value);
  }
}


text:
package com.vsked.util;

import java.util.Iterator;
import java.util.Map;
import java.util.Map.Entry;

public class LogUtil {

	public static void  getLog(Class<?> c,Exception e){
		System.out.println("----------Exception start--------------");

		System.out.println(c.getName());

		e.printStackTrace();

		System.out.println("----------Exception end--------------");

	}

	public static void outPutBasicMap(Map<String, Object> m){
		Iterator<Entry<String, Object>> it=m.entrySet().iterator();
		while(it.hasNext()){
			Map.Entry<String, Object> ent=it.next();
			if (ent.getValue() instanceof String[]) {
				String[] values = (String[]) ent.getValue();
				for(String s:values){
					System.out.println(s);
				}

			}
			System.out.println("|"+ent.getKey()+"|"+ent.getValue()+"|");
		}
	}

	public static void outPutObject(Object o){
		System.out.println("----------object start--------------");
		System.out.println(o);
		System.out.println("----------object end--------------");
	}

	public static void main(String[] args) {
	}

}


text:
```zenscript
import mods.magneticraft.HydraulicPress;
```

## Adding Recipes
```zenscript
//mods.magneticraft.HydraulicPress.addRecipe(IItemStack input, IItemStack output, float ticks, int mode, bool oredictFlag);
mods.magneticraft.HydraulicPress.addRecipe(<minecraft:snow>, <minecraft:snowball> * 4, 10, 0, true);
```

## Removing Recipes
```zenscript
//mods.magneticraft.HydraulicPress.removeRecipe(IItemStack input, int mode);
mods.magneticraft.HydraulicPress.removeRecipe(<minecraft:iron_ingot>, 0);
```


text:
package br.com.helderfarias.pushandroid;

import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;

import br.com.helderfarias.pushandroid.helpers.NotificationHelper;

public class LocalMessagingReceiver extends BroadcastReceiver {

    @Override
    public void onReceive(Context context, Intent intent) {
        new NotificationHelper(context).sendNotification(intent.getExtras());
    }

}


text:
[![Gem Version](https://badge.fury.io/rb/seat_geek.svg)](https://badge.fury.io/rb/seat_geek) [![Build Status](https://travis-ci.org/jmoon90/seat_geek.svg)](https://travis-ci.org/jmoon90/seat_geek) [![Code Climate](https://codeclimate.com/github/jmoon90/seat_geek.svg)](https://codeclimate.com/github/jmoon90/seat_geek)

Uses the SeatGeek Platform API to data around tickets in the USA.

## Installation

Add this line to your application's Gemfile:

```ruby
gem 'seat_geek'
```

Or install it yourself as:

    $ gem install seat_geek

## Usage

Events
```ruby
SeatGeek.get_events()
# => GET http://api.seatgeek.com/2/events

Accepts 1 options parameter

params = { travel_dates: {arrive: '2016-03-15', depart: '2016-03-19', datetime_type: 'utc'},
           state: 'ny', #either state or city
           city: 'new-york-city', #either state or city
           attendee_count: num,
           event_type: 'taxonomie',
           seat_geek_partner_id: 1234,
           pagination: {per_page: 25, page: 2}
         }
SeatGeek.get_events(params)

------

SeatGeek.get_event(id:)
# => GET http://api.seatgeek.com/2/events/:id

Accepts 1 integer
```

Taxonomy

```ruby
taxonomy = SeatGeek.get_taxonomies

taxonomy.sports
# Events that contains parent_id of 1000000
#=> <SeatGeek::Taxonomies::Sports: @parent_object={ ... },
                                   @sub_taxonomies= [{"parent_id"=>1000000, "id"=>1010100, "name"=>"mlb"} ..]

callable methods
taxonomy.sports.
  - all
  - baseball
  - basketball
  - hockey
  - football
  - auto_racing
  - golf
  - fighting
  - tennis
  - animal_sports
  - extreme_sports
  - olympic_sports

taxonomy.concert
# Events that contains parent_id of 2000000
#=> <SeatGeek::Taxonomies::Concert: @parent_object={ ... },
                                   @sub_taxonomies= [{"parent_id"=>2000000, "id"=>2010000, "name"=>"music_festival"} ..]

callable methods
taxonomy.concert.
  - all
  - music_festival

taxonomy.theater
# Events that contains parent_id of 3000000
#=> <SeatGeek::Taxonomies::Theater: @parent_object={ ... },
                                   @sub_taxonomies= [{"parent_id"=>3000000, "id"=>3020000, "name"=>"cirque_du_soleil"} ..]

taxonomy.theater.
  - all
  - classical

taxonomy
# => GET http://api.seatgeek.com/2/taxonomies
#=> contains all of the above
```

## Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/jmoon/seat_geek.

please write tests with each pull request

If you're lookig for features to work on, please check out https://github.com/jmoon90/seat_geek/issues

## License

The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).


text:
"""
The payu interface for the CICE model
-------------------------------------------------------------------------------
Contact: Marshall Ward <marshall.ward@anu.edu.au>
-------------------------------------------------------------------------------
Distributed as part of Payu, Copyright 2011 Marshall Ward
Licensed under the Apache License, Version 2.0
http://www.apache.org/licenses/LICENSE-2.0
"""

# Python 3 preparation
from __future__ import print_function

# Standard Library
import errno
import os
import stat
import sys
import shlex
import shutil
import subprocess as sp
import datetime

# Extensions
import f90nml

# Local
import payu.calendar as cal
from payu.fsops import make_symlink
from payu.models.model import Model
from payu.namcouple import Namcouple

class Cice(Model):

    def __init__(self, expt, name, config):
        super(Cice, self).__init__(expt, name, config)

        self.model_type = 'cice'
        self.default_exec = 'cice'

        # Default repo details
        self.repo_url = 'https://github.com/CWSL/cice4.git'
        self.repo_tag = 'access'

        self.config_files = ['ice_in']

        self.ice_nml_fname = 'ice_in'

        self.set_timestep = self.set_local_timestep

    def set_model_pathnames(self):
        super(Cice, self).set_model_pathnames()

        self.build_exec_path = os.path.join(self.codebase_path,
                                            'build_access-om_360x300_6p')

        ice_nml_path = os.path.join(self.control_path, self.ice_nml_fname)
        self.ice_in = f90nml.read(ice_nml_path)

        # Assume local paths are relative to the work path
        setup_nml = self.ice_in['setup_nml']

        res_path = os.path.normpath(setup_nml['restart_dir'])
        if not os.path.isabs(res_path):
            res_path = os.path.join(self.work_path, res_path)
        self.work_init_path = res_path
        self.work_restart_path = res_path

        work_out_path = os.path.normpath(setup_nml['history_dir'])
        if not os.path.isabs(work_out_path):
            work_out_path = os.path.join(self.work_path, work_out_path)
        self.work_output_path = work_out_path

        # Determine if there is a work input path
        grid_nml = self.ice_in['grid_nml']
        input_path, _ = os.path.split(grid_nml['grid_file'])
        if input_path and not input_path == '.':
            assert not os.path.isabs(input_path)
            self.work_input_path = os.path.join(self.work_path, input_path)

        # Assert that kmt uses the same directory
        kmt_input_path, _ = os.path.split(grid_nml['kmt_file'])
        assert input_path == kmt_input_path

    def set_model_output_paths(self):
        super(Cice, self).set_model_output_paths()

        res_dir = self.ice_in['setup_nml']['restart_dir']

        # Use the local initialization restarts if present
        # TODO: Check for multiple res_paths across input paths?
        if self.expt.counter == 0:
            for input_path in self.input_paths:
                if os.path.isabs(res_dir):
                    init_res_path = res_dir
                else:
                    init_res_path = os.path.join(input_path, res_dir)
                if os.path.isdir(init_res_path):
                    self.prior_restart_path = init_res_path

    def get_prior_restart_files(self):
        restart_files = [f for f in os.listdir(self.prior_restart_path)
                         if f.startswith('iced.')]
        return [sorted(restart_files)[-1]]

    def get_ptr_restart_dir(self):
        return self.ice_in['setup_nml']['restart_dir']

    def get_access_ptr_restart_dir(self):
        # The ACCESS build of CICE assumes that restart_dir is 'RESTART'
        # TODO: Move to ACCESS driver
        return '.'

    def setup(self):
        super(Cice, self).setup()

        # Change perms of restart files, these get overwritten so much be
        # writable.
        for fname in ['o2i.nc', 'i2o.nc', 'u_star.nc', 'grid.nc', 'kmt.nc',
                      'monthly_sstsss.nc', 'mice.nc']:
            path = os.path.join(self.work_input_path, fname)
            if os.path.exists(path):
                perm = (stat.S_IRUSR | stat.S_IRGRP | stat.S_IROTH
                        | stat.S_IWUSR)
                os.chmod(path, perm)

        setup_nml = self.ice_in['setup_nml']
        init_date = datetime.date(year=setup_nml['year_init'], month=1, day=1)

        if setup_nml['days_per_year'] == 365:
            caltype = cal.NOLEAP
        else:
            caltype = cal.GREGORIAN

        if self.prior_restart_path and not self.expt.repeat_run:

            # Generate ice.restart_file
            # TODO: better check of restart filename
            iced_restart_file = None
            for f in self.get_prior_restart_files():
                if 'iced.' in f:
                    iced_restart_file = f

            if iced_restart_file is None:
                print('payu: error: No restart file available.')
                sys.exit(errno.ENOENT)

            res_ptr_path = os.path.join(self.work_init_path,
                                        'ice.restart_file')
            with open(res_ptr_path, 'w') as res_ptr:
                res_dir = self.get_ptr_restart_dir()
                print(os.path.join(res_dir, iced_restart_file), file=res_ptr)

            # Update input namelist
            setup_nml['runtype'] = 'continue'
            setup_nml['restart'] = True

            prior_nml_path = os.path.join(self.prior_restart_path,
                                          self.ice_nml_fname)

            # With later versions this file exists in the prior restart path,
            # but this was not always the case, so check, and if not there use
            # prior output path
            if not os.path.exists(prior_nml_path):
                prior_nml_path = os.path.join(self.prior_output_path,
                                              self.ice_nml_fname)

            prior_setup_nml = f90nml.read(prior_nml_path)['setup_nml']

            # The total time in seconds since the beginning of the experiment
            total_runtime = prior_setup_nml['istep0'] + prior_setup_nml['npt']
            total_runtime = total_runtime * prior_setup_nml['dt']
            run_start_date = cal.date_plus_seconds(init_date, total_runtime,
                                                   caltype)
        else:
            # Locate and link any restart files (if required)
            if not setup_nml['ice_ic'] in ('none', 'default'):
                self.link_restart(setup_nml['ice_ic'])

            if setup_nml['restart']:
                self.link_restart(setup_nml['pointer_file'])

            # Initialise runtime
            total_runtime = 0
            run_start_date = init_date

        # Set runtime for this run.
        if self.expt.runtime:
            run_runtime = cal.runtime_from_date(
                run_start_date,
                self.expt.runtime['years'],
                self.expt.runtime['months'],
                self.expt.runtime['days'],
                self.expt.runtime.get('seconds', 0),
                caltype
            )
        else:
            run_runtime = setup_nml['npt']*setup_nml['dt']

        # Now write out new run start date and total runtime.
        setup_nml['npt'] = run_runtime / setup_nml['dt']
        assert(total_runtime % setup_nml['dt'] == 0)
        setup_nml['istep0'] = int(total_runtime / setup_nml['dt'])

        # Force creation of a dump (restart) file at end of run
        setup_nml['dump_last'] = True

        nml_path = os.path.join(self.work_path, self.ice_nml_fname)
        self.ice_in.write(nml_path, force=True)

    def set_local_timestep(self, t_step):
        dt = self.ice_in['setup_nml']['dt']
        npt = self.ice_in['setup_nml']['npt']

        self.ice_in['setup_nml']['dt'] = t_step
        self.ice_in['setup_nml']['npt'] = (int(dt) * int(npt)) // int(t_step)

        ice_in_path = os.path.join(self.work_path, self.ice_nml_fname)
        self.ice_in.write(ice_in_path, force=True)

    def set_access_timestep(self, t_step):
        # TODO: Figure out some way to move this to the ACCESS driver
        # Re-read ice timestep and move this over there
        self.set_local_timestep(t_step)

        input_ice_path = os.path.join(self.work_path, 'input_ice.nml')
        input_ice = f90nml.read(input_ice_path)

        input_ice['coupling_nml']['dt_cice'] = t_step

        input_ice.write(input_ice_path, force=True)

    def set_oasis_timestep(self, t_step):
        # TODO: Move over to access driver
        for model in self.expt.models:
            if model.model_type == 'oasis':
                namcpl_path = os.path.join(model.work_path, 'namcouple')
                namcpl = Namcouple(namcpl_path, 'access')
                namcpl.set_ice_timestep(str(t_step))
                namcpl.write()

    def archive(self, **kwargs):

        for f in os.listdir(self.work_input_path):
            f_path = os.path.join(self.work_input_path, f)
            if os.path.islink(f_path):
                os.remove(f_path)

        os.rename(self.work_restart_path, self.restart_path)

    def collate(self):
        pass

    def link_restart(self, fpath):

        input_work_path = os.path.join(self.work_path, fpath)

        # Exit if the restart file already exists
        if os.path.isfile(input_work_path):
            return

        input_path = None
        for i_path in self.input_paths:
            test_path = os.path.join(i_path, fpath)
            if os.path.isfile(test_path):
                input_path = test_path
                break
        assert input_path

        make_symlink(input_path, input_work_path)


text:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
              xmlns:tools="http://schemas.android.com/tools"
              android:id="@+id/drawer_linearLayout"
              android:layout_width="@dimen/drawer_width"
              android:layout_height="match_parent"
              android:orientation="vertical"
              android:background="?attr/colorPrimary"
              tools:contents=".MainActivity">
    <FrameLayout
        android:layout_width="match_parent"
        android:layout_height="@dimen/drawer_image_height">
        <com.android.volley.toolbox.NetworkImageView
            android:id="@+id/drawer_coverimage"
            android:layout_width="@dimen/drawer_image_width"
            android:layout_height="@dimen/drawer_image_height"
            android:layout_gravity="center"
            android:scaleType="centerCrop"/>
        <RelativeLayout
            android:layout_width="match_parent"
            android:layout_height="match_parent">
            <de.hdodenhof.circleimageview.CircleImageView
                android:id="@+id/profile_image"
                android:layout_width="@dimen/nav_profile_image_size"
                android:layout_height="@dimen/nav_profile_image_size"
                android:layout_gravity="center_vertical"
                android:layout_above="@+id/profile_idstr"
                android:layout_marginBottom="@dimen/item_pacing"
                android:layout_marginLeft="@dimen/list_margin_left"
                android:src="@drawable/ic_action_account_circle_write"/>
            <TextView
                android:id="@+id/profile_idstr"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:textColor="@color/white"
                android:text="@string/drawer_profile_id_anonymous"
                android:textSize="@dimen/nav_profile_text_size"
                android:typeface="sans"
                android:textStyle="bold"
                android:layout_alignParentBottom="true"
                android:layout_marginLeft="@dimen/list_margin_left"
                android:layout_marginBottom="@dimen/item_pacing"
                tools:text="@string/author_Weibo_summary"/>

        </RelativeLayout>
    </FrameLayout>
    <ListView
        android:id="@+id/drawer_listView"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:divider="@android:color/transparent"
        android:dividerHeight="0dp">
    </ListView>
</LinearLayout>


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

<plugin xmlns="http://cordova.apache.org/ns/plugins/1.0"
           id="org.apache.cordova.core.media-capture"
      version="0.1.0">
    <name>Capture</name>
    <dependency id="org.apache.cordova.core.file" url="https://git-wip-us.apache.org/repos/asf/cordova-plugin-file" commit="master" subdir="/*" />

    <js-module src="www/CaptureAudioOptions.js" name="CaptureAudioOptions">
        <clobbers target="CaptureAudioOptions" />
    </js-module>

    <js-module src="www/CaptureImageOptions.js" name="CaptureImageOptions">
        <clobbers target="CaptureImageOptions" />
    </js-module>

    <js-module src="www/CaptureVideoOptions.js" name="CaptureVideoOptions">
        <clobbers target="CaptureVideoOptions" />
    </js-module>

    <js-module src="www/CaptureError.js" name="CaptureError">
        <clobbers target="CaptureError" />
    </js-module>

    <js-module src="www/MediaFileData.js" name="MediaFileData">
        <clobbers target="MediaFileData" />
    </js-module>

    <js-module src="www/MediaFile.js" name="MediaFile">
        <clobbers target="MediaFile" />
    </js-module>

    <js-module src="www/capture.js" name="capture">
        <clobbers target="navigator.device.capture" />
    </js-module>

    <!-- android -->
    <platform name="android">
        <config-file target="res/xml/config.xml" parent="/*">
            <feature name="Capture" >
                <param name="android-package" value="org.apache.cordova.core.Capture"/>
            </feature>
        </config-file>

        <config-file target="AndroidManifest.xml" parent="/*">
            <uses-permission android:name="android.permission.RECORD_AUDIO" />
            <uses-permission android:name="android.permission.RECORD_VIDEO"/>
            <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
        </config-file>

        <source-file src="src/android/Capture.java" target-dir="src/org/apache/cordova/core" />
    </platform>

    <!-- ios -->
    <platform name="ios">
        <config-file target="config.xml" parent="/*">
            <feature name="Capture">
                <param name="ios-package" value="CDVCapture" />
            </feature>
        </config-file>
        <header-file src="src/ios/CDVCapture.h" />
        <source-file src="src/ios/CDVCapture.m" />
        <resource-file src="src/ios/CDVCapture.bundle" />

        <framework src="CoreGraphics.framework" />
        <framework src="MobileCoreServices.framework" />
    </platform>

    <!-- blackberry10 -->
    <platform name="blackberry10">
        <source-file src="src/blackberry10/index.js" target-dir="Capture" />
        <config-file target="www/config.xml" parent="/widget">
            <feature name="media-capture" value="Capture"/>
        </config-file>
      </platform>

    <!-- wp7 -->
    <platform name="wp7">
        <config-file target="config.xml" parent="/*">
            <feature name="Notification">
                <param name="wp-package" value="Notification"/>
            </feature>
        </config-file>

        <config-file target="Properties/WMAppManifest.xml" parent="/Deployment/App/Capabilities">
            <Capability Name="ID_CAP_MEDIALIB"/>
            <Capability Name="ID_CAP_MICROPHONE"/>
            <Capability Name="ID_CAP_ISV_CAMERA" />
        </config-file>

        <source-file src="src/wp/Capture.cs" />
        <source-file src="src/wp/UI/AudioCaptureTask.cs" />
        <source-file src="src/wp/UI/AudioRecorder.xaml" />
        <source-file src="src/wp/UI/AudioRecorder.xaml.cs" />
        <source-file src="src/wp/UI/VideoCaptureTask.cs" />
        <source-file src="src/wp/UI/VideoRecorder.xaml" />
        <source-file src="src/wp/UI/VideoRecorder.xaml.cs" />
    </platform>

    <!-- wp8 -->
    <platform name="wp8">
        <config-file target="config.xml" parent="/*">
            <feature name="Notification">
                <param name="wp-package" value="Notification"/>
            </feature>
        </config-file>

        <config-file target="Properties/WMAppManifest.xml" parent="/Deployment/App/Capabilities">
            <Capability Name="ID_CAP_MEDIALIB_AUDIO"/>
            <Capability Name="ID_CAP_MEDIALIB_PHOTO"/>
            <Capability Name="ID_CAP_MEDIALIB_PLAYBACK"/>
            <Capability Name="ID_CAP_MICROPHONE"/>
            <Capability Name="ID_CAP_ISV_CAMERA" />
        </config-file>

        <source-file src="src/wp/Capture.cs" />
        <source-file src="src/wp/UI/AudioCaptureTask.cs" />
        <source-file src="src/wp/UI/AudioRecorder.xaml" />
        <source-file src="src/wp/UI/AudioRecorder.xaml.cs" />
        <source-file src="src/wp/UI/VideoCaptureTask.cs" />
        <source-file src="src/wp/UI/VideoRecorder.xaml" />
        <source-file src="src/wp/UI/VideoRecorder.xaml.cs" />
    </platform>

</plugin>


text:
<?php

namespace Edge\QA\Tools\Analyzer;

class Phpcpd extends \Edge\QA\Tools\Tool
{
    public static $SETTINGS = array(
        'optionSeparator' => ' ',
        'xml' => ['phpcpd.xml'],
        'errorsXPath' => '//pmd-cpd/duplication',
        'composer' => 'sebastian/phpcpd',
    );

    public function __invoke()
    {
        $args = array(
            $this->options->ignore->bergmann(),
            $this->options->getAnalyzedDirs(' '),
            'min-lines' => $this->config->value('phpcpd.minLines'),
            'min-tokens' => $this->config->value('phpcpd.minTokens'),
        );
        $isOlderVersion = $this->toolVersionIs('<', '6');
        $phpcpdNames = array_map(
            function ($extension) use ($isOlderVersion) {
                return $isOlderVersion ? "*.{$extension}" : ".{$extension}";
            },
            array_filter(explode(',', $this->config->csv('phpqa.extensions')))
        );
        if ($isOlderVersion) {
            $args['progress'] = '';
        }
        if ($phpcpdNames) {
            $namesOptions = $isOlderVersion ? 'names' : 'suffix';
            $args[$namesOptions] = \Edge\QA\escapePath(implode(',', $phpcpdNames));
        }
        if ($this->options->isSavedToFiles) {
            $args['log-pmd'] = $this->tool->getEscapedXmlFile();
        }
        return $args;
    }
}


text:
// 3. Write a program that reads from the console a sequence of N integer numbers and returns the minimal and maximal of them.

using System;

class MinAndMaxNumber
{
    //Method to parse the input data to integer
    static int ValidateInputInteger(string textToDisplay)
    {
        int inputNumber;

        Console.WriteLine(textToDisplay);

        //Loop to parse the input data from the user to integer number
        while (!int.TryParse(Console.ReadLine(), out inputNumber))
        {
            Console.WriteLine("Please enter a correct integer number!");
        }

        return inputNumber; //The method returns "inputNumber"
    }

    static void Main()
    {
        int sequenceLength;
        int[] numbersToCheck; //Using array to store the input numbers
        int minimal;
        int maximal;

        //Using method "ValidateInputInteger(string textToDisplay)" to assign values to sequenceLength
        sequenceLength = ValidateInputInteger("Please enter the sequence length");
        numbersToCheck = new int[sequenceLength]; //Assigning length to the array

        for (int i = 0; i < sequenceLength; i++) //Loop to assign values to the array
        {
            Console.Write("Please enter number {0}", i);
            numbersToCheck[i] = ValidateInputInteger(""); //Using method "ValidateInputInteger(string textToDisplay)"
        }

        minimal = numbersToCheck[0];
        maximal = numbersToCheck[0];

        for (int i = 0; i < sequenceLength - 1; i++) //Loop to check for maximal and minimal numbers
        {
            if (numbersToCheck[i + 1] < minimal)
            {
                minimal = numbersToCheck[i + 1];
            }

            if (numbersToCheck[i + 1] > maximal)
            {
                maximal = numbersToCheck[i + 1];
            }
        }

        Console.WriteLine(new string('=', 30));
        Console.WriteLine("minimal: {0}\nmaximal: {1}", minimal, maximal);
    }
}


text:
A tiny (1.24 KB gzipped), stand-alone JavaScript utility for managing cookies in the browser.

## Usage

Add [Cookie.min.js](https://raw.githubusercontent.com/jonlabelle/cookie-js/master/Cookie.min.js) to your HTML document.

```html
<script src="Cookie.min.js"></script>
```

## API

### Cookie.set()

**Create a cookie with no options specified**:

```javascript
Cookie.set('name', 'jon');
```

> **NOTE:** If the `option.expires` value is not set, the cookie `Expires / Max-Age` is set to *Session*.

**Create a cookie with an expiration date:**

```javascript
Cookie.set('name', 'jon', {
  expires: new Date('March 18, 2040')
});
```

**Create a cookie that expires in 3 days:**

```javascript
Cookie.set('name', 'jon', {
  expires: 3
});
```

**Create a cookie that can only be accessed by a specific** `path` **and** `domain`**:**

```javascript
Cookie.set('name', 'jon', {
  path: '/', // all pages
  domain: 'jonlabelle.com' // any subdomain of jonlabelle.com (including www)
});
```

**Create a secure cookie:**

```javascript
Cookie.set('name', 'jon', {
  secure: true
});
```

> **NOTE:** Setting the `secure` option to `true` ensures the cookie will not be sent over non-https connections.

**Create a cookie and set the** [SameSite](https://developer.mozilla.org/docs/Web/HTTP/Headers/Set-Cookie/SameSite) **attribute:**

```javascript
Cookie.set('name', 'jon', {
  sameSite: 'Strict'
});
```

The `SameSite` attribute accepts three values:

|       Value       |                                                                            Description                                                                            |
|-------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `Lax` (*default*) | Cookies can sent in top-level navigations and will be sent along with GET request initiated by third party website. This is the default value in modern browsers. |
| `Strict`          | Cookies will only be sent in a first-party context and not be sent along with requests initiated by third party websites.                                         |
| `None`            | Cookies will be sent in all contexts, i.e sending cross-origin is allowed.                                                                                |

> **IMPORTANT:** If `SameSite` is not specified in cookie options, the default value will be set to `Lax` for a reasonably robust defense against some classes of cross-site request forgery. Learn more at [SameSite cookies explained](https://web.dev/samesite-cookies-explained).

### Cookie.get()

**Get a cookie accessible by the current page:**

```javascript
Cookie.get('name');
```

> **NOTE:** Returns `null` if the cookie does NOT exist.

### Cookie.exists()

**Check if a cookie exists:**

```javascript
if (Cookie.exists('name')) {
  // do cool stuff here
}
```

> **NOTE:** Returns `bool`, `true` if the cookie exists, and `false` if it does not.

### Cookie Value Types

**Retrieve a cookie and convert the value to** `Number`**:**

```javascript
Cookie.set('age', 34);

var val = Cookie.get('age', Number);

if (typeof val === 'number') {
  console.log(val); // 34
}
```

Other native functions that convert values are `Boolean` and `Date`, or you can define your own conversion `Function`.

For example, to create a number from a hexadecimal code:

```javascript
var value = Cookie.get('code', function (stringValue) {
  return parseInt(stringValue, 16);
});
```

### Cookie.remove()

**Delete a cookie:**

```javascript
Cookie.remove('name');
```

**Delete a cookie specifying the** `domain`**:**

```javascript
Cookie.remove('info', {
  domain: 'jonlabelle.com'
});
```

### Cookie.setSub()

Sub-cookies allow multiple values to be stored in a single cookie. A sub-cookie looks similar to a URL and takes the following form:

```text
cookiename=name1=value1&name2=value2&name3=value3
```

**Create a sub-cookie named** `person`**:**

```javascript
Cookie.setSub('person', 'name', 'jon');
Cookie.setSub('person', 'email', 'contact@jonlabelle.com');
Cookie.setSub('person', 'today', (new Date()).toString());
```

**Create a sub-cookie with options:**

```javascript
Cookie.setSub('person', 'age', 75, { domain: 'jonlabelle.com', secure: true });
```

**Create a sub-cookie from an** `Object`**:**

```javascript
var obj = {
  name: 'jon',
  email: 'labelle'
};

Cookie.setSubs('person', obj);
```

> **NOTE:** Calls to `Cookie.setSubs()` will completely overwrite the cookie.

### Cookie.getSub()

**Get a sub-cookie:**

```javascript
Cookie.getSub('person', 'name');
```

**Get a sub-cookie and convert the value to a** `Number`**:**

```javascript
Cookie.getSub('person', 'age', Number);
```

### Cookie.getSubs()

**Get a sub-cookie as a hash** `Object`**:**

```javascript
var obj = Cookie.getSubs('person');

if (typeof obj === 'object') {
  console.log(obj); // => Object { name: 'jon', email: '...'}
}
```

### Cookie.removeSub()

**Remove a sub-cookie:**

```javascript
Cookie.removeSub('person', 'name');
```

### Cookie.enabled()

**Check if cookies are enabled by the browser:**

```javascript
Cookie.enabled();
```

> **NOTE:** Returns `bool`, `true` if cookies are enabled, and `false` if they are not.

### Cookie.clear()

**Clear all cookies from the browser:**

```javascript
Cookie.clear();
```

## Author

[Jon LaBelle](mailto:contact@jonlabelle.com)

## License

[MIT License](LICENSE.txt)


text:
<link rel="import" href="../../components/iron-input/iron-input.html">
<link rel="import" href="../style-form/style-form.html">
<dom-module id="form-settings-email">
  <template>

    <form id="form" class="form" on-submit="on_submit">

        new email
        <input is="iron-input" class="input" type="email" bind-value="{{data.email}}">

        confirm email
        <input is="iron-input" class="input" type="email" bind-value="{{data.confirm}}">

        password
        <input is="iron-input" class="input" type="password" bind-value="{{data.password}}">

        <input type="submit" class="button" value="change" />

    </form>

  </template>
</dom-module>


text:
SimpleForm.setup do |config|
  config.wrappers :default, tag: 'div',
                            class: 'form-group',
                            error_class: :warning do |b|
    b.use :html5
    b.use :placeholder
    b.use :maxlength
    b.optional :pattern
    b.optional :min_max
    b.optional :readonly

    b.use :label_input
    b.use :hint,  wrap_with: { tag: :div, class: 'info-field' }
    b.use :error, wrap_with: { tag: :div, class: 'info-field' }
  end

  config.wrappers :inline_radio_and_checkbox, tag: 'div',
                                              class: 'form-group',
                                              error_class: 'warning' do |b|
    b.use :html5
    b.optional :readonly

    b.use :label
    b.use :input
  end

  config.default_wrapper = :default
  config.wrapper_mappings = {
    check_boxes: :inline_radio_and_checkbox,
    radio_buttons: :inline_radio_and_checkbox
  }

  config.item_wrapper_tag = false
  config.boolean_style = :inline
  config.button_class = 'btn'
  config.error_notification_tag = :div
  config.error_notification_class = 'error_notification'
  config.label_text = lambda { |label, _required, _explicit_label| label }
  config.browser_validations = false
  config.boolean_label_class = 'checkbox'
end


text:
@interface CCellPlayer : UICollectionViewCell
@property (strong, nonatomic)  UIImageView *ivPlayer;
@end


text:
namespace Eagle
{
    partial class FormProgressBar
    {
        /// <summary>
        /// Required designer variable.
        /// </summary>
        private System.ComponentModel.IContainer components = null;

        /// <summary>
        /// Clean up any resources being used.
        /// </summary>
        /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
        protected override void Dispose(bool disposing)
        {
            if (disposing && (components != null))
            {
                components.Dispose();
            }
            base.Dispose(disposing);
        }

        #region Windows Form Designer generated code

        /// <summary>
        /// Required method for Designer support - do not modify
        /// the contents of this method with the code editor.
        /// </summary>
        private void InitializeComponent()
        {
            System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(FormProgressBar));
            this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel();
            this.label1 = new System.Windows.Forms.Label();
            this.progressBar1 = new System.Windows.Forms.ProgressBar();
            this.button1 = new System.Windows.Forms.Button();
            this.tableLayoutPanel1.SuspendLayout();
            this.SuspendLayout();
            //
            // tableLayoutPanel1
            //
            this.tableLayoutPanel1.ColumnCount = 1;
            this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F));
            this.tableLayoutPanel1.Controls.Add(this.label1, 0, 0);
            this.tableLayoutPanel1.Controls.Add(this.progressBar1, 0, 1);
            this.tableLayoutPanel1.Controls.Add(this.button1, 0, 2);
            this.tableLayoutPanel1.Location = new System.Drawing.Point(0, 0);
            this.tableLayoutPanel1.Name = "tableLayoutPanel1";
            this.tableLayoutPanel1.RowCount = 3;
            this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20F));
            this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 28F));
            this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle());
            this.tableLayoutPanel1.Size = new System.Drawing.Size(390, 90);
            this.tableLayoutPanel1.TabIndex = 0;
            //
            // label1
            //
            this.label1.AutoSize = true;
            this.label1.Location = new System.Drawing.Point(3, 3);
            this.label1.Margin = new System.Windows.Forms.Padding(3);
            this.label1.Name = "label1";
            this.label1.Size = new System.Drawing.Size(51, 13);
            this.label1.TabIndex = 0;
            this.label1.Text = "Progress:";
            //
            // progressBar1
            //
            this.progressBar1.Location = new System.Drawing.Point(3, 23);
            this.progressBar1.Name = "progressBar1";
            this.progressBar1.Size = new System.Drawing.Size(384, 22);
            this.progressBar1.TabIndex = 1;
            //
            // button1
            //
            this.button1.Anchor = System.Windows.Forms.AnchorStyles.None;
            this.button1.Location = new System.Drawing.Point(157, 57);
            this.button1.Name = "button1";
            this.button1.Size = new System.Drawing.Size(75, 23);
            this.button1.TabIndex = 2;
            this.button1.Text = "Cancel";
            this.button1.UseVisualStyleBackColor = true;
            this.button1.Click += new System.EventHandler(this.button1_Click);
            //
            // FormProgressBar
            //
            this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
            this.ClientSize = new System.Drawing.Size(390, 90);
            this.Controls.Add(this.tableLayoutPanel1);
            this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
            this.Name = "FormProgressBar";
            this.Text = "Eagle - Running";
            this.tableLayoutPanel1.ResumeLayout(false);
            this.tableLayoutPanel1.PerformLayout();
            this.ResumeLayout(false);

        }

        #endregion

        private System.Windows.Forms.TableLayoutPanel tableLayoutPanel1;
        private System.Windows.Forms.Label label1;
        private System.Windows.Forms.ProgressBar progressBar1;
        private System.Windows.Forms.Button button1;
    }
}


text:
/*
 * This code is copied from the original library from the `cern.jet.random` package.
 * Changes:
 * - package name
 * - missing Javadoc param tags
 * - reformat
 */
/*
Copyright � 1999 CERN - European Organization for Nuclear Research.
Permission to use, copy, modify, distribute and sell this software and its documentation for any purpose
is hereby granted without fee, provided that the above copyright notice appear in all copies and
that both that copyright notice and this permission notice appear in supporting documentation.
CERN makes no representations about the suitability of this software for any purpose.
It is provided "as is" without expressed or implied warranty.
*/
package com.opengamma.strata.math.impl.cern;

//CSOFF: ALL
/**
 * StudentT distribution (aka T-distribution); See the  math definition
 * and  animated definition.
 *

 * <tt>p(x) = k  *  (1+x^2/f) ^ -(f+1)/2</tt> where <tt>k = g((f+1)/2) / (sqrt(pi*f) * g(f/2))</tt> and <tt>g(a)</tt> being the gamma function and <tt>f</tt> being the degrees of freedom.
 *

 * Valid parameter ranges: <tt>freedom > 0</tt>.
 *

 * Instance methods operate on a user supplied uniform random number generator; they are unsynchronized.
 *

 * Static methods operate on a default uniform random number generator; they are synchronized.
 *

 * Implementation:
 *

 * Method: Adapted Polar Box-Muller transformation.
 *

 * This is a port of RandStudentT used in CLHEP 1.4.0 (C++).
 * CLHEP's implementation, in turn, is based on <tt>tpol.c</tt> from the C-RAND / WIN-RAND library.
 * C-RAND's implementation, in turn, is based upon
 *
R.W. Bailey (1994): Polar generation of random variates with the t-distribution, Mathematics of Computation 62, 779-781.
 *
 * @author wolfgang.hoschek@cern.ch
 * @version 1.0, 09/24/99
 */
public class StudentT extends AbstractContinousDistribution {

  private static final long serialVersionUID = 1L;

  protected double freedom;

  protected double TERM; // performance cache for pdf()
  // The uniform random number generated shared by all static methods.
  protected static StudentT shared = new StudentT(1.0, makeDefaultGenerator());

  /**
   * Constructs a StudentT distribution.
   * Example: freedom=1.0.
   * @param freedom degrees of freedom.
   * @param randomGenerator input
   * @throws IllegalArgumentException if <tt>freedom <= 0.0</tt>.
   */
  public StudentT(double freedom, RandomEngine randomGenerator) {
    setRandomGenerator(randomGenerator);
    setState(freedom);
  }

  /**
   * Returns the cumulative distribution function.
   * @param x input
   * @return result
   */
  public double cdf(double x) {
    return Probability.studentT(freedom, x);
  }

  /**
   * Returns a random number from the distribution.
   */
  @Override
  public double nextDouble() {
    return nextDouble(this.freedom);
  }

  /**
   * Returns a random number from the distribution; bypasses the internal state.
   * @param degreesOfFreedom degrees of freedom.
   * @return result
   * @throws IllegalArgumentException if <tt>a <= 0.0</tt>.
   */
  public double nextDouble(double degreesOfFreedom) {
    /*
     * The polar method of Box/Muller for generating Normal variates
     * is adapted to the Student-t distribution. The two generated
     * variates are not independent and the expected no. of uniforms
     * per variate is 2.5464.
     *
     * REFERENCE :  - R.W. Bailey (1994): Polar generation of random
     *                variates with the t-distribution, Mathematics
     *                of Computation 62, 779-781.
     */
    if (degreesOfFreedom <= 0.0)
      throw new IllegalArgumentException();
    double u, v, w;

    do {
      u = 2.0 * randomGenerator.raw() - 1.0;
      v = 2.0 * randomGenerator.raw() - 1.0;
    } while ((w = u * u + v * v) > 1.0);

    return (u * Math.sqrt(degreesOfFreedom * (Math.exp(-2.0 / degreesOfFreedom * Math.log(w)) - 1.0) / w));
  }

  /**
   * Returns the probability distribution function.
   * @param x input
   * @return result
   */
  public double pdf(double x) {
    return this.TERM * Math.pow((1 + x * x / freedom), -(freedom + 1) * 0.5);
  }

  /**
   * Sets the distribution parameter.
   * @param freedom degrees of freedom.
   * @throws IllegalArgumentException if <tt>freedom <= 0.0</tt>.
   */
  public void setState(double freedom) {
    if (freedom <= 0.0)
      throw new IllegalArgumentException();
    this.freedom = freedom;

    double val = Fun.logGamma((freedom + 1) / 2) - Fun.logGamma(freedom / 2);
    this.TERM = Math.exp(val) / Math.sqrt(Math.PI * freedom);
  }

  /**
   * Returns a random number from the distribution.
   * @param freedom degrees of freedom.
   * @return result
   * @throws IllegalArgumentException if <tt>freedom <= 0.0</tt>.
   */
  public static double staticNextDouble(double freedom) {
    synchronized (shared) {
      return shared.nextDouble(freedom);
    }
  }

  /**
   * Returns a String representation of the receiver.
   */
  @Override
  public String toString() {
    return this.getClass().getName() + "(" + freedom + ")";
  }

}


text:
package org.waveprotocol.wave.client.widget.popup;

import com.google.gwt.core.client.GWT;
import com.google.gwt.dom.client.StyleInjector;
import com.google.gwt.resources.client.CssResource;
import com.google.gwt.resources.client.ClientBundle;
import com.google.gwt.user.client.ui.FlowPanel;
import com.google.gwt.user.client.ui.Label;
import com.google.gwt.user.client.ui.Widget;

/**
 * TitleBar implementation for the desktop client.
 *
 *
 * This class is package private.
 */
class DesktopTitleBar extends FlowPanel implements TitleBar {
  /** Resources used by DesktopTitleBar. */
  interface Resources extends ClientBundle {
    /** CSS class names used by DesktopTitleBar */
    interface Css extends CssResource {
      String titleBar();
      String buttons();
      String title();
    }

    @Source("DesktopTitleBar.css")
    Css css();
  }

  /** The singleton instance of our CSS resources. */
  private static final Resources RESOURCES = GWT.create(Resources.class);

  /**
   * Inject the stylesheet only once, and only when the class is used.
   */
  static {
    StyleInjector.inject(RESOURCES.css().getText());
  }

  /** Label containing the title */
  private Label title = new Label();

  /** Panel to hold the buttons */
  private FlowPanel buttons = new FlowPanel();

  /** Create a new DesktopTitleBar */
  public DesktopTitleBar() {
    add(title);
    add(buttons);
    setStyleName(RESOURCES.css().titleBar());
    buttons.setStyleName(RESOURCES.css().buttons());
    title.setStyleName(RESOURCES.css().title());
  }

  /**
   * {@inheritDoc}
   */
  public void addButton(Widget button) {
    buttons.add(button);
  }

  /**
   * {@inheritDoc}
   */
  public boolean removeButton(Widget button) {
    return buttons.remove(button);
  }

  /**
   * {@inheritDoc}
   */
  public void clearButtons() {
    buttons.clear();
  }

  /**
   * {@inheritDoc}
   */
  public void setTitleText(String text) {
    title.setText(text);
  }
}


text:
from msrest.serialization import Model

class Domain(Model):
    """Active Directory Domain information.

    Variables are only populated by the server, and will be ignored when
    sending a request.

    All required parameters must be populated in order to send to Azure.

    :param additional_properties: Unmatched properties from the message are
     deserialized this collection
    :type additional_properties: dict[str, object]
    :ivar authentication_type: the type of the authentication into the domain.
    :vartype authentication_type: str
    :ivar is_default: if this is the default domain in the tenant.
    :vartype is_default: bool
    :ivar is_verified: if this domain's ownership is verified.
    :vartype is_verified: bool
    :param name: Required. the domain name.
    :type name: str
    """

    _validation = {
        'authentication_type': {'readonly': True},
        'is_default': {'readonly': True},
        'is_verified': {'readonly': True},
        'name': {'required': True},
    }

    _attribute_map = {
        'additional_properties': {'key': '', 'type': '{object}'},
        'authentication_type': {'key': 'authenticationType', 'type': 'str'},
        'is_default': {'key': 'isDefault', 'type': 'bool'},
        'is_verified': {'key': 'isVerified', 'type': 'bool'},
        'name': {'key': 'name', 'type': 'str'},
    }

    def __init__(self, *, name: str, additional_properties=None, **kwargs) -> None:
        super(Domain, self).__init__(**kwargs)
        self.additional_properties = additional_properties
        self.authentication_type = None
        self.is_default = None
        self.is_verified = None
        self.name = name


text:
package io.fabric8.openshift.commands;

import io.fabric8.boot.commands.support.AbstractCommandComponent;
import org.apache.felix.gogo.commands.Action;
import org.apache.felix.gogo.commands.basic.AbstractCommand;
import org.apache.felix.scr.annotations.Activate;
import org.apache.felix.scr.annotations.Component;
import org.apache.felix.scr.annotations.Deactivate;
import org.apache.felix.scr.annotations.Property;
import org.apache.felix.scr.annotations.Service;
import org.apache.felix.service.command.Function;

@Component(immediate = true)
@Service({Function.class, AbstractCommand.class})
@org.apache.felix.scr.annotations.Properties({
        @Property(name = "osgi.command.scope", value = ApplicationRestart.SCOPE_VALUE),
        @Property(name = "osgi.command.function", value = ApplicationRestart.FUNCTION_VALUE)
})
public class ApplicationRestart extends AbstractCommandComponent {

    public static final String SCOPE_VALUE = "openshift";
    public static final String FUNCTION_VALUE = "application-restart";
    public static final String DESCRIPTION = "Restarts the target application";

    @Activate
    void activate() {
        activateComponent();
    }

    @Deactivate
    void deactivate() {
        deactivateComponent();
    }

    @Override
    public Action createNewAction() {
        assertValid();
        return new ApplicationRestartAction();
    }

}


text:
"""Support to emulate keyboard presses on host machine."""
import voluptuous as vol

from homeassistant.const import (
    SERVICE_MEDIA_NEXT_TRACK,
    SERVICE_MEDIA_PLAY_PAUSE,
    SERVICE_MEDIA_PREVIOUS_TRACK,
    SERVICE_VOLUME_DOWN,
    SERVICE_VOLUME_MUTE,
    SERVICE_VOLUME_UP,
)

DOMAIN = "keyboard"

TAP_KEY_SCHEMA = vol.Schema({})

def setup(hass, config):
    """Listen for keyboard events."""
    import pykeyboard  # pylint: disable=import-error

    keyboard = pykeyboard.PyKeyboard()
    keyboard.special_key_assignment()

    hass.services.register(
        DOMAIN,
        SERVICE_VOLUME_UP,
        lambda service: keyboard.tap_key(keyboard.volume_up_key),
        schema=TAP_KEY_SCHEMA,
    )

    hass.services.register(
        DOMAIN,
        SERVICE_VOLUME_DOWN,
        lambda service: keyboard.tap_key(keyboard.volume_down_key),
        schema=TAP_KEY_SCHEMA,
    )

    hass.services.register(
        DOMAIN,
        SERVICE_VOLUME_MUTE,
        lambda service: keyboard.tap_key(keyboard.volume_mute_key),
        schema=TAP_KEY_SCHEMA,
    )

    hass.services.register(
        DOMAIN,
        SERVICE_MEDIA_PLAY_PAUSE,
        lambda service: keyboard.tap_key(keyboard.media_play_pause_key),
        schema=TAP_KEY_SCHEMA,
    )

    hass.services.register(
        DOMAIN,
        SERVICE_MEDIA_NEXT_TRACK,
        lambda service: keyboard.tap_key(keyboard.media_next_track_key),
        schema=TAP_KEY_SCHEMA,
    )

    hass.services.register(
        DOMAIN,
        SERVICE_MEDIA_PREVIOUS_TRACK,
        lambda service: keyboard.tap_key(keyboard.media_prev_track_key),
        schema=TAP_KEY_SCHEMA,
    )
    return True


text:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:orientation="horizontal" android:background="@color/common_white"
    android:layout_width="match_parent"
    android:layout_height="match_parent">

    <ImageView
        android:id="@+id/app_icon_iv"
        android:layout_width="50dp"
        android:gravity="center_vertical"
        android:layout_height="50dp" />

    <TextView
        android:id="@+id/app_name_tv"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:gravity="center_vertical"  />
</LinearLayout>


text:
SRC_FILES="./src/Extractor.vala ./src/Frame.vala ./src/Printer.vala ./src/Stacktrace.vala"
OPTIONS="-g -X -rdynamic -X -w --pkg linux --pkg gee-0.8"

clear
# Null reference
rm ./samples/sample_sigsegv
valac ${OPTIONS} -o ./samples/sample_sigsegv ./samples/vala_file.vala ./samples/error_sigsegv.vala ./samples/module/OtherModule.vala ${SRC_FILES}
./samples/sample_sigsegv

# Uncaught error
rm ./samples/sample_sigtrap
valac ${OPTIONS} -o ./samples/sample_sigtrap ./samples/error_sigtrap.vala ${SRC_FILES}
./samples/sample_sigtrap

# Critical assert
rm ./samples/sample_sigabrt
valac ${OPTIONS} -o ./samples/sample_sigabrt ./samples/error_sigabrt.vala ${SRC_FILES}
./samples/sample_sigabrt

# Configure colors
rm ./samples/sample_colors
valac ${OPTIONS} -o ./samples/sample_colors ./samples/error_colors.vala ${SRC_FILES}
./samples/sample_colors


text: [assembly: FlitBit.Wireup.Meta.WireupDependency(typeof(FlitBit.Wireup.AssemblyWireup))]


text:
package weibo4j.examples.timeline;

import java.util.List;

import weibo4j.Comment;
import weibo4j.Weibo;

 public class GetCommentsTimeline {

 	/**
 	 * 获取当前用户发出和收到的评论列表
 	 * @param args
 	 */
 	public static void main(String[] args) {
 	    System.setProperty("weibo4j.oauth.consumerKey", Weibo.CONSUMER_KEY);
     	    System.setProperty("weibo4j.oauth.consumerSecret", Weibo.CONSUMER_SECRET);
            try {
         	Weibo weibo = getWeibo(true,args);
         	List<Comment> comments = weibo.getCommentsTimeline();
		for (Comment comment: comments){
		    System.out.println(comment.getId()+":"+comment.getText()+" by "+comment.getUser().getScreenName());
		}
 	    } catch (Exception e) {
 			e.printStackTrace();
            }
 	}

 	private static Weibo getWeibo(boolean isOauth,String ... args) {
 		Weibo weibo = new Weibo();
 		if(isOauth) {//oauth验证方式 args[0]:访问的token;args[1]:访问的密匙
 			weibo.setToken(args[0], args[1]);
 		}else {//用户登录方式
     		weibo.setUserId(args[0]);//用户名/ID
    		weibo.setPassword(args[1]);//密码
 		}
 		return weibo;
 	}
 }


text:
require 'virtualfs/dir'
require 'virtualfs/file'

module VirtualFS
  class NullCache
    def cache(key)
      yield
    end
  end

  class Backend
    def initialize(opts={})
      @cache = opts[:cache] || NullCache.new
    end

    def cache(&proc)
      local_variable_values = eval('local_variables.map { |var| eval(var.to_s) }', proc.binding)
      key = caller[0] << local_variable_values.inspect
      @cache.cache(key, &proc)
    end

    def map_entries(paths, method=:to_s, &dir_criteria)
      paths.map do |path|
        if dir_criteria.call(path)
          VirtualFS::Dir.new(path.send(method), self)
        else
          VirtualFS::File.new(path.send(method), self)
        end
      end
    end

    def dotfolders_for(path)
      [VirtualFS::Dir.new(::File.join(path, '.'), self), VirtualFS::Dir.new(::File.join(path, '..'), self)]
    end

    def entries(path=nil)
      # override this
      raise NotImplementedError
    end

    def glob(pattern, path=nil)
      # override this
      raise NotImplementedError
    end

    def stream_for(path)
      # override this
      raise NotImplementedError
    end

    alias_method :[], :glob
  end
end


text:
package resources

import (
	"code.cloudfoundry.org/jsonry"
)

type ServiceInstanceUsageSummaryList struct {
	UsageSummary []ServiceInstanceUsageSummary `jsonry:"usage_summary"`
}

func (s *ServiceInstanceUsageSummaryList) UnmarshalJSON(data []byte) error {
	return jsonry.Unmarshal(data, s)
}

type ServiceInstanceUsageSummary struct {
	SpaceGUID     string `jsonry:"space.guid"`
	BoundAppCount int    `jsonry:"bound_app_count"`
}

func (s *ServiceInstanceUsageSummary) UnmarshalJSON(data []byte) error {
	return jsonry.Unmarshal(data, s)
}


text:
class EricWeixin::Xiaodian::Category < ActiveRecord::Base
  self.table_name = 'weixin_xiaodian_categories'
  belongs_to :parent, class_name: EricWeixin::Xiaodian::Category, foreign_key: :parent_id
  has_and_belongs_to_many :products, :class_name => 'EricWeixin::Xiaodian::Product', :join_table => "weixin_xiaodian_category_products", :foreign_key => :weixin_xiaodian_category_id

  validates_uniqueness_of :wx_category_id
  require "rest-client"

  # 把所有的产品类型导入数据库。
  # public_account_name: 公众账号名称
  # parent_id: 分类腾讯id#

  # EricWeixin::Xiaodian::Category.import_all_categories 'rszx', ['538088633','538071212']   # 玩具、模型等, 食品/茶叶/特产/滋补品
  def self.import_all_categories public_account_name, first_level_weixin_id = [], parent_id = 1
    EricWeixin::Xiaodian::Category.transaction do
      account = EricWeixin::PublicAccount.get_public_account_by_name public_account_name
      token = ::EricWeixin::AccessToken.get_valid_access_token public_account_id: account.id
      param = {:cate_id => parent_id}
      response = RestClient.post "https://api.weixin.qq.com/merchant/category/getsub?access_token=#{token}", param.to_json
      response = JSON.parse response.body
      pp response
      return if response['errcode'].to_i != 0
      response['cate_list'].each do |category_info|
        pid = if parent_id == 1
                0
              else
                c = EricWeixin::Xiaodian::Category.where(wx_category_id: parent_id).first
                c.id
              end
        if pid == 0
          next unless first_level_weixin_id.include? category_info["id"]
        end
        EricWeixin::Xiaodian::Category.create_new_category name: category_info["name"],
                                                           wx_category_id: category_info["id"],
                                                           parent_id: pid
        EricWeixin::Xiaodian::Category.import_all_categories public_account_name,[], category_info["id"]
      end
    end
  end

  # EricWeixin::Xiaodian::Category.update_sku_info 'rszx'
  def self.update_sku_info public_account_name
    EricWeixin::Xiaodian::Category.transaction do
      account = EricWeixin::PublicAccount.get_public_account_by_name public_account_name
      token = ::EricWeixin::AccessToken.get_valid_access_token public_account_id: account.id
      EricWeixin::Xiaodian::Category.all.each do |category|
        next if category.level < 4
        pp '.....................'
        param = {:cate_id => category.wx_category_id.to_i}
        pp param.to_json
        response = RestClient.post "https://api.weixin.qq.com/merchant/category/getsku?access_token=#{token}", param.to_json
        pp 'xxxxxxxx 请求回来了'
        response = JSON.parse response.body
        pp response
        next if response['errcode'] != 0
        response['sku_table'].each do |sku_info|
          name = EricWeixin::Xiaodian::SkuName.create_skuname wx_name_id: sku_info["id"],
                                                              name: sku_info["name"],
                                                              weixin_xiaodian_category_id: category.id
          sku_info["value_list"].each do |value|
            EricWeixin::Xiaodian::SkuValue.create_sku_value wx_value_id: value["id"],
                                                            name: value["name"],
                                                            weixin_xiaodian_sku_name_id: name.id
          end
        end
      end
    end
  end

  def level
    first_p = self.parent
    return 1 if first_p.blank?
    second_p  = first_p.parent
    return 2 if second_p.blank?
    third_p = second_p.parent
    return 3 if third_p.blank?
    return 4
  end

  # 创建商品分类,参数为:名称,微信id, 父类id
  # 父类id,如果不存在则为0
  def self.create_new_category options
    EricWeixin::Xiaodian::Category.transaction do
      category = EricWeixin::Xiaodian::Category.where(wx_category_id: options[:wx_category_id]).first
      if category.blank?
        category = EricWeixin::Xiaodian::Category.new name: options[:name],
                                                      parent_id: options[:parent_id],
                                                      wx_category_id: options[:wx_category_id]
      else
        category.name = options[:name]
      end
      category.save!
      return category
    end
  end
end


text:
```
bin/setup
```

### Gemini reports
##### Gemini bootstrapping
- To setup environments please run `bin/gemini setup` from project root directory
- Generate cannonical images `bin/gemini gather <path_to_tests>`
- Run report generating command `bin/gemini test <path_to_tests>`

##### Gemini reports uploading
- Use Firebase. You need to create account and simple application in it.
- Upload report with a command `bin/gemini upload <app_name>` . If `<app_name>` is not specified -
 your report will be uploaded to default app.


text:
_Please provide issue details here_.

### Steps to reproduce/test case

_Please provide necessary steps and relevant parts of your Dockkerfile
below for reproduction of this issue_

### Affected version(s)

_Please write down the affected version(s), or `master` when using a Git clone_


text:
import { UxInputInfoTheme } from './ux-input-info-theme';
import { StyleEngine, UxComponent } from '@aurelia-ux/core';
export declare class UxInputInfo implements UxComponent {
    private element;
    styleEngine: StyleEngine;
    target: {
        element: Element;
        value: string;
        maxlength: number;
    };
    uxInputCounter: null;
    theme: UxInputInfoTheme;
    inputElementModel: any;
    constructor(element: HTMLElement, styleEngine: StyleEngine);
    bind(): void;
    themeChanged(newValue: UxInputInfoTheme): void;
    private findAndSetTarget;
    get maxLength(): number;
    get length(): number;
}


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

		<title>FLib</title>

		<meta name="description" content="A library for Processing by Ken Frederick" />
		<meta name="keywords" content="processing.org, library, utilities, tools" />
		<meta http-equiv="Content-type" content="text/html; charset=utf-8" />
		<meta http-equiv="Content-Language" content="en-us" />
		<meta name="ROBOTS" content="index,follow,archive" />
		<meta http-equiv="imagetoolbar" content="false" />
		<meta name="MSSmartTagsPreventParsing" content="true" />
		<meta name="author" content="Ken Frederick" />
		<meta name="Rating" content="General" />
		<meta name="revisit-after" content="7 Days" />
		<meta name="doc-class" content="Living Document" />

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

FLib

				A library for Processing by Ken Frederick

				Last update, 11 June 2014.

				utilities, tools

				A collection of functions for handling data, colors, timing, and more.

Download

				Download FLib version 0.1.0 (010) in .zip format.

Source

				The source code of FLib is available at GitHub, and its repository can be browsed here.

Installation

				Unzip and put the extracted FLib folder into the libraries folder of your Processing sketches. Reference and examples are included in the FLib folder.

Tested

				Platform osx

				Processing Version 2.1.1

				Dependencies none

Examples

				Find a list of examples in the current distribution of FLib, or have a look at them by following the links below.

FASEExample

FArrayExample

FImageLoaderExample

FPaletteExample

FPaletteTransExample

FShapeExample

FStopwatch

FTimeExample

FTimerExample

Reference

				Have a look at the javadoc reference here. A copy of the reference is included in the .zip as well.


text:
body {
  margin: 0;
  padding: 0;
}

#qunit {
  background-color: white;
  color: #34495e;
  font: 16px/1.5 serif;
  position: relative;
}

/* Header */

#qunit-header {
  display: inline-block;
  font-size: 24px;
  line-height: 2.5;
  margin: 0;
  padding-left: 16px;
}

#qunit-header > a {
  color: #34495e;
  font-weight: normal;
  text-decoration:none;
}

/* Toolbar */

#qunit-testrunner-toolbar {
  display: inline-block;
  line-height: 60px;
  vertical-align: top;
}

#qunit-testrunner-toolbar input,
#qunit-testrunner-toolbar select {
  display: inline-block;
  margin-left: 12px;
}

#qunit-testrunner-toolbar select,
#qunit-testrunner-toolbar input[type=text] {
  width: 15em;
}

#qunit-testrunner-toolbar input[type=text] {
  border: 1px solid #ccc;
  border-radius: 3px;
  padding: 0.5em;
}

#qunit-modulefilter-container label {
  display:none;
}

/* Test Results Summary */

#qunit-testresult {
  color: white;
  height: 48px;
  left: 0;
  line-height: 48px;
  margin: 0;
  padding: 0 1em;
  position: absolute;
  right: 0;
  top: 60px;
}

#qunit-testresult .module-name {
  font-weight:bold;
}

#qunit-testresult br { content:' '; }
#qunit-testresult span:before { content:' '; }

/* Banner */

#qunit-banner {
  background-color: #f39c12;
  height: 48px;
  left: 0;
  margin: 0;
  position: absolute;
  right: 0;
  top: 60px;
}

#qunit-banner.qunit-fail { background-color: #e74c3c; }
#qunit-banner.qunit-pass { background-color: #16a085; }

/* Tests list */

#qunit-tests {
  border-top: 1px solid white;
  counter-reset: tests;
  list-style-type: none;
  padding: 0;
  margin-top: 48px;
}

#qunit-tests > li {
  background-color: #eee;
  border-bottom: 1px solid #eee;
  line-height: 2;
  position: relative;
}

#qunit-tests > li:before {
  content: counter(tests);
  counter-increment: tests;
  display: inline-block;
  text-align: center;
  width: 3em;
}

#qunit-tests > li.fail,
#qunit-tests > li.pass { background-color: white; }
#qunit-tests > li.fail:before { background-color: #e74c3c; color: #ecf0f1; }
#qunit-tests > li.pass:before { background-color: #16a085; color: #ecf0f1; }

#qunit-tests.hidepass li.pass,
#qunit-tests.hidepass li.running { display:none; }

#qunit-tests li a {
  border-left: 1px solid #eee;
  border-right: 1px solid #eee;
  box-sizing: content-box;
  color: #3498db;
  cursor: default;
  text-decoration:none;
  position: absolute;
  left: 3em;
  padding: 0 0.5em;
  text-align: center;
  width: 2.5em;
}

#qunit-tests li a:hover {
  background-color: #f2f7fa;;
}

#qunit-tests li strong {
  cursor: pointer;
  font-weight:normal;
  margin-left: 3.5em;
  padding-left: 0.5em;
}

#qunit-tests li strong .module-name{
  font-weight: bold;
}

#qunit-tests li strong:after {
  content: ' '
}

#qunit-tests li b.counts,
#qunit-tests li b.counts b {
  font-weight:normal;
}
#qunit-tests li b.counts {
  background-color: #f7f7f7;
  border-radius: 2px;
  border: 1px solid #eee;
  color: #7f8c8d;
  padding: 2px 4px;
}

#qunit-tests li b.counts b.passed { color: #16a085; }
#qunit-tests li b.counts b.failed { color: #c0392b; }

#qunit-tests li .runtime {
  color: #7f8c8d;
  position: absolute;
  right: 0.5em;
}

/* Assertions */

#qunit-tests .qunit-assert-list {
  border-left: 1px solid #eee;
  border-top: 1px solid #eee;
  box-shadow: inset 2px 2px 6px rgba(128,128,128,0.1);
  list-style-type: none;
  margin-left: 3em;
  padding-left: 0.5em;
}

#qunit-tests .qunit-assert-list .fail {
  padding-bottom: 0.5em;
}

#qunit-tests .qunit-assert-list .fail:before {
  color: #e74c3c;
  content: '✖';
  display: inline-block;
  width: 18px;
}

#qunit-tests .qunit-assert-list .pass:before {
  color: #16a085;
  content: '✔ ';
  display: inline-block;
  width: 18px;
}

#qunit-tests ol li table {
  background-color: #ecf0f1;
  border-collapse: collapse;
  border-radius: 3px;
  margin-left: 1em;
}
#qunit-tests ol li table th,
#qunit-tests ol li table td {
  font-size: 12px;
  line-height: 1.5;
  padding: 0 0.5em;
  vertical-align: middle;
}
#qunit-tests ol li table td pre {
  font-family: monospace;
  margin: 0;
  white-space:pre-wrap;
  word-wrap:break-word;
}
#qunit-tests ol li table th {
  font-weight: normal;
  text-align: right;
  vertical-align: middle;
}

#qunit-tests ol li table tr.test-actual {
  font-weight: bold;
}
#qunit-tests ol li table tr.test-expected {
  font-weight: bold;
}
#qunit-tests ol li table tr.test-diff del,
#qunit-tests ol li table tr.test-diff ins {
  color: #ecf0f1;
  text-decoration: none;
}
#qunit-tests ol li table tr.test-diff del { background-color: #e74c3c; }
#qunit-tests ol li table tr.test-diff ins { background-color: #16a085; }

#qunit-userAgent {
  display: none;
}
#qunit-fixture {
	position: absolute;
	top: -10000px;
	left: -10000px;
	width: 1000px;
	height: 1000px;
}
.qunit-collapsed, .qunit-hidden {
  display: none;
}


text:
"""File for checking typing issues.

This file is not executed, it is only checked by mypy to ensure that
none of the code triggers any mypy errors.
"""
import pytest

# Issue #7488.
@pytest.mark.xfail(raises=RuntimeError)
def check_mark_xfail_raises() -> None:
    pass

# Issue #7494.
@pytest.fixture(params=[(0, 0), (1, 1)], ids=lambda x: str(x[0]))
def check_fixture_ids_callable() -> None:
    pass

# Issue #7494.
@pytest.mark.parametrize("func", [str, int], ids=lambda x: str(x.__name__))
def check_parametrize_ids_callable(func) -> None:
    pass


text:
package org.apereo.cas.oidc.web.controllers;

import org.apereo.cas.authentication.Authentication;
import org.apereo.cas.authentication.principal.Principal;
import org.apereo.cas.authentication.principal.PrincipalFactory;
import org.apereo.cas.authentication.principal.ServiceFactory;
import org.apereo.cas.authentication.principal.WebApplicationService;
import org.apereo.cas.configuration.CasConfigurationProperties;
import org.apereo.cas.oidc.OidcConstants;
import org.apereo.cas.services.ServicesManager;
import org.apereo.cas.support.oauth.OAuthConstants;
import org.apereo.cas.support.oauth.validator.OAuth20Validator;
import org.apereo.cas.support.oauth.web.endpoints.OAuth20UserProfileControllerController;
import org.apereo.cas.ticket.accesstoken.AccessTokenFactory;
import org.apereo.cas.ticket.registry.TicketRegistry;
import org.springframework.http.MediaType;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.GetMapping;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.util.HashMap;
import java.util.Map;

/**
 * This is {@link OidcProfileEndpointController}.
 *
 * @author Misagh Moayyed
 * @since 5.0.0
 */
public class OidcProfileEndpointController extends OAuth20UserProfileControllerController {

    public OidcProfileEndpointController(final ServicesManager servicesManager,
                                         final TicketRegistry ticketRegistry,
                                         final OAuth20Validator validator,
                                         final AccessTokenFactory accessTokenFactory,
                                         final PrincipalFactory principalFactory,
                                         final ServiceFactory<WebApplicationService> webApplicationServiceServiceFactory,
                                         final CasConfigurationProperties casProperties) {
        super(servicesManager, ticketRegistry, validator, accessTokenFactory,
                principalFactory, webApplicationServiceServiceFactory, casProperties);
    }

    @GetMapping(value = '/' + OidcConstants.BASE_OIDC_URL + '/' + OAuthConstants.PROFILE_URL, produces = MediaType.APPLICATION_JSON_VALUE)
    @Override
    public ResponseEntity<String> handleRequestInternal(final HttpServletRequest request, final HttpServletResponse response) throws Exception {
        return super.handleRequestInternal(request, response);
    }

    @Override
    protected Map<String, Object> writeOutProfileResponse(final Authentication authentication, final Principal principal) throws IOException {
        final Map<String, Object> map = new HashMap<>(principal.getAttributes());
        if (!map.containsKey(OidcConstants.CLAIM_SUB)) {
            map.put(OidcConstants.CLAIM_SUB, principal.getId());
        }
        map.put(OidcConstants.CLAIM_AUTH_TIME, authentication.getAuthenticationDate().toEpochSecond());
        return map;
    }
}


text:
#pragma once
#include <aws/route53/Route53_EXPORTS.h>
#include <aws/route53/Route53Request.h>
#include <aws/core/utils/memory/stl/AWSString.h>
#include <utility>

namespace Aws
{
namespace Route53
{
namespace Model
{

  /**
   *
A request to update the comment for a hosted zone.

See Also:

   * AWS
   * API Reference

   */
  class AWS_ROUTE53_API UpdateHostedZoneCommentRequest : public Route53Request
  {
  public:
    UpdateHostedZoneCommentRequest();

    // Service request name is the Operation name which will send this request out,
    // each operation should has unique request name, so that we can get operation's name from this request.
    // Note: this is not true for response, multiple operations may have the same response name,
    // so we can not get operation's name from response.
    inline virtual const char* GetServiceRequestName() const override { return "UpdateHostedZoneComment"; }

    Aws::String SerializePayload() const override;

    /**
     *
The ID for the hosted zone that you want to update the comment for.

     */
    inline const Aws::String& GetId() const{ return m_id; }

    /**
     *
The ID for the hosted zone that you want to update the comment for.

     */
    inline bool IdHasBeenSet() const { return m_idHasBeenSet; }

    /**
     *
The ID for the hosted zone that you want to update the comment for.

     */
    inline void SetId(const Aws::String& value) { m_idHasBeenSet = true; m_id = value; }

    /**
     *
The ID for the hosted zone that you want to update the comment for.

     */
    inline void SetId(Aws::String&& value) { m_idHasBeenSet = true; m_id = std::move(value); }

    /**
     *
The ID for the hosted zone that you want to update the comment for.

     */
    inline void SetId(const char* value) { m_idHasBeenSet = true; m_id.assign(value); }

    /**
     *
The ID for the hosted zone that you want to update the comment for.

     */
    inline UpdateHostedZoneCommentRequest& WithId(const Aws::String& value) { SetId(value); return *this;}

    /**
     *
The ID for the hosted zone that you want to update the comment for.

     */
    inline UpdateHostedZoneCommentRequest& WithId(Aws::String&& value) { SetId(std::move(value)); return *this;}

    /**
     *
The ID for the hosted zone that you want to update the comment for.

     */
    inline UpdateHostedZoneCommentRequest& WithId(const char* value) { SetId(value); return *this;}

    /**
     *
The new comment for the hosted zone. If you don't specify a value for
     * Comment, Amazon Route 53 deletes the existing value of the
     * Comment element, if any.

     */
    inline const Aws::String& GetComment() const{ return m_comment; }

    /**
     *
The new comment for the hosted zone. If you don't specify a value for
     * Comment, Amazon Route 53 deletes the existing value of the
     * Comment element, if any.

     */
    inline bool CommentHasBeenSet() const { return m_commentHasBeenSet; }

    /**
     *
The new comment for the hosted zone. If you don't specify a value for
     * Comment, Amazon Route 53 deletes the existing value of the
     * Comment element, if any.

     */
    inline void SetComment(const Aws::String& value) { m_commentHasBeenSet = true; m_comment = value; }

    /**
     *
The new comment for the hosted zone. If you don't specify a value for
     * Comment, Amazon Route 53 deletes the existing value of the
     * Comment element, if any.

     */
    inline void SetComment(Aws::String&& value) { m_commentHasBeenSet = true; m_comment = std::move(value); }

    /**
     *
The new comment for the hosted zone. If you don't specify a value for
     * Comment, Amazon Route 53 deletes the existing value of the
     * Comment element, if any.

     */
    inline void SetComment(const char* value) { m_commentHasBeenSet = true; m_comment.assign(value); }

    /**
     *
The new comment for the hosted zone. If you don't specify a value for
     * Comment, Amazon Route 53 deletes the existing value of the
     * Comment element, if any.

     */
    inline UpdateHostedZoneCommentRequest& WithComment(const Aws::String& value) { SetComment(value); return *this;}

    /**
     *
The new comment for the hosted zone. If you don't specify a value for
     * Comment, Amazon Route 53 deletes the existing value of the
     * Comment element, if any.

     */
    inline UpdateHostedZoneCommentRequest& WithComment(Aws::String&& value) { SetComment(std::move(value)); return *this;}

    /**
     *
The new comment for the hosted zone. If you don't specify a value for
     * Comment, Amazon Route 53 deletes the existing value of the
     * Comment element, if any.

     */
    inline UpdateHostedZoneCommentRequest& WithComment(const char* value) { SetComment(value); return *this;}

  private:

    Aws::String m_id;
    bool m_idHasBeenSet = false;

    Aws::String m_comment;
    bool m_commentHasBeenSet = false;
  };

} // namespace Model
} // namespace Route53
} // namespace Aws


text:
import { IMessage } from 'modepress';
import * as express from 'express';
import { Controller } from './controller';
import * as bodyParser from 'body-parser';
import { UserManager } from '../core/users'
import { errJson } from '../utils/serializers';
import { IBaseControler } from 'modepress';
import * as mongodb from 'mongodb';

export class EmailsController extends Controller {
    private _options: IBaseControler;

	/**
	 * Creates a new instance of the email controller
	 */
    constructor( options: IBaseControler ) {
        super( null );
        this._options = options;
    }

    /**
	 * Called to initialize this controller and its related database objects
	 */
    async initialize( e: express.Express, db: mongodb.Db ): Promise<Controller> {

        const router = express.Router();
        router.use( bodyParser.urlencoded( { 'extended': true } ) );
        router.use( bodyParser.json() );
        router.use( bodyParser.json( { type: 'application/vnd.api+json' } ) );

        // Filter the post requests
        router.post( '/', this.onPost.bind( this ) );

        // Register the path
        e.use(( this._options.rootPath || '' ) + '/message-admin', router );

        await super.initialize( e, db );
        return this;
    }

	/**
	 * Called whenever a post request is caught by this controller
	 */
    protected onPost( req: express.Request, res: express.Response ): any {
        // Set the content type
        res.setHeader( 'Content-Type', 'application/json' );

        const message: string = [ `Hello admin,`,
            `We have received a message from ${( <IMessage>req.body ).name}:`,
            `${( <IMessage>req.body ).message}`,
            ``,
            `Email: ${( <IMessage>req.body ).email}`,
            `Phone: ${( <IMessage>req.body ).phone}`,
            `Website: ${( <IMessage>req.body ).website}` ].join( '\r\n' );

        UserManager.get.sendAdminEmail( message ).then( function( body ) {
            res.end( body );

        } ).catch( function( err ) {
            errJson( err, res );
        } );
    }
}


text:
// .NAME vtkJPEGWriter - Writes JPEG files.
// .SECTION Description
// vtkJPEGWriter writes JPEG files. It supports 1 and 3 component data of
// unsigned char. It relies on the IJG's libjpeg.  Thanks to IJG for
// supplying a public jpeg IO library.

// .SECTION See Also
// vtkJPEGReader

#ifndef __vtkJPEGWriter_h
#define __vtkJPEGWriter_h

#include "vtkIOImageExport.h" // For export macro
#include "vtkImageWriter.h"

class vtkUnsignedCharArray;
class vtkImageData;

class VTKIOIMAGE_EXPORT vtkJPEGWriter : public vtkImageWriter
{
public:
  static vtkJPEGWriter *New();
  vtkTypeMacro(vtkJPEGWriter,vtkImageWriter);
  void PrintSelf(ostream& os, vtkIndent indent);

  // Description:
  // The main interface which triggers the writer to start.
  virtual void Write();

  // Description:
  // Compression quality. 0 = Low quality, 100 = High quality
  vtkSetClampMacro(Quality, int, 0, 100);
  vtkGetMacro(Quality, int);

  // Description:
  // Progressive JPEG generation.
  vtkSetMacro(Progressive, unsigned int);
  vtkGetMacro(Progressive, unsigned int);
  vtkBooleanMacro(Progressive, unsigned int);

  // Description:
  // Write the image to memory (a vtkUnsignedCharArray)
  vtkSetMacro(WriteToMemory, unsigned int);
  vtkGetMacro(WriteToMemory, unsigned int);
  vtkBooleanMacro(WriteToMemory, unsigned int);

  // Description:
  // When writing to memory this is the result, it will be NULL until the
  // data is written the first time
  virtual void SetResult(vtkUnsignedCharArray*);
  vtkGetObjectMacro(Result, vtkUnsignedCharArray);

protected:
  vtkJPEGWriter();
  ~vtkJPEGWriter();

  void WriteSlice(vtkImageData *data, int* uExtent);

private:
  int Quality;
  unsigned int Progressive;
  unsigned int WriteToMemory;
  vtkUnsignedCharArray *Result;
  FILE *TempFP;

private:
  vtkJPEGWriter(const vtkJPEGWriter&);  // Not implemented.
  void operator=(const vtkJPEGWriter&);  // Not implemented.
};

#endif


text:
<?php
namespace inklabs\kommerce\ActionHandler\CatalogPromotion;

use DateTime;
use inklabs\kommerce\Action\Product\CreateProductQuantityDiscountCommand;
use inklabs\kommerce\Entity\Product;
use inklabs\kommerce\Entity\ProductQuantityDiscount;
use inklabs\kommerce\Entity\PromotionType;
use inklabs\kommerce\tests\Helper\TestCase\ActionTestCase;

class CreateProductQuantityDiscountHandlerTest extends ActionTestCase
{
    protected $metaDataClassNames = [
        Product::class,
        ProductQuantityDiscount::class,
    ];

    public function testHandle()
    {
        $product = $this->dummyData->getProduct();
        $this->persistEntityAndFlushClear($product);
        $promotionTypeId = PromotionType::PERCENT;
        $value = 50;
        $reducesTaxSubtotal = true;
        $startDate = new DateTime();
        $endDate = new DateTime();
        $maxRedemptions = 100;
        $quantity = 10;
        $flagApplyCatalogPromotions = false;
        $command = new CreateProductQuantityDiscountCommand(
            $promotionTypeId,
            $value,
            $reducesTaxSubtotal,
            $maxRedemptions,
            $startDate,
            $endDate,
            $product->getId()->getHex(),
            $quantity,
            $flagApplyCatalogPromotions
        );

        $this->dispatchCommand($command);

        $this->entityManager->clear();
        $productQuantityDiscount = $this->getRepositoryFactory()->getProductQuantityDiscountRepository()->findOneById(
            $command->getProductQuantityDiscountId()
        );
        $this->assertSame($promotionTypeId, $productQuantityDiscount->getType()->getId());
        $this->assertSame($value, $productQuantityDiscount->getValue());
        $this->assertSame($reducesTaxSubtotal, $productQuantityDiscount->getReducesTaxSubtotal());
        $this->assertSame($quantity, $productQuantityDiscount->getQuantity());
        $this->assertSame($flagApplyCatalogPromotions, $productQuantityDiscount->getFlagApplyCatalogPromotions());
        // TODO: Fix these:
        //$this->assertSame($maxRedemptions, $productQuantityDiscount->getMaxRedemptions());
        //$this->assertSame($startDate->getTimestamp(), $productQuantityDiscount->getStart()->getTimestamp());
        //$this->assertSame($endDate->getTimestamp(), $productQuantityDiscount->getEnd()->getTimestamp());
    }
}


text:
package org.springframework.boot.autoconfigure.logging;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;

import org.springframework.boot.autoconfigure.condition.ConditionEvaluationReport;
import org.springframework.boot.context.event.ApplicationFailedEvent;
import org.springframework.boot.logging.LogLevel;
import org.springframework.context.ApplicationContextInitializer;
import org.springframework.context.ApplicationEvent;
import org.springframework.context.ConfigurableApplicationContext;
import org.springframework.context.event.ApplicationContextEvent;
import org.springframework.context.event.ContextRefreshedEvent;
import org.springframework.context.event.GenericApplicationListener;
import org.springframework.context.support.GenericApplicationContext;
import org.springframework.core.Ordered;
import org.springframework.core.ResolvableType;
import org.springframework.util.Assert;

/**
 * {@link ApplicationContextInitializer} that writes the {@link ConditionEvaluationReport}
 * to the log. Reports are logged at the {@link LogLevel#DEBUG DEBUG} level. A crash
 * report triggers an info output suggesting the user runs again with debug enabled to
 * display the report.
 * <p>
 * This initializer is not intended to be shared across multiple application context
 * instances.
 *
 * @author Greg Turnquist
 * @author Dave Syer
 * @author Phillip Webb
 * @author Andy Wilkinson
 * @author Madhura Bhave
 */
public class ConditionEvaluationReportLoggingListener
		implements ApplicationContextInitializer<ConfigurableApplicationContext> {

	private final Log logger = LogFactory.getLog(getClass());

	private ConfigurableApplicationContext applicationContext;

	private ConditionEvaluationReport report;

	private final LogLevel logLevelForReport;

	public ConditionEvaluationReportLoggingListener() {
		this(LogLevel.DEBUG);
	}

	public ConditionEvaluationReportLoggingListener(LogLevel logLevelForReport) {
		Assert.isTrue(isInfoOrDebug(logLevelForReport), "LogLevel must be INFO or DEBUG");
		this.logLevelForReport = logLevelForReport;
	}

	private boolean isInfoOrDebug(LogLevel logLevelForReport) {
		return LogLevel.INFO.equals(logLevelForReport)
				|| LogLevel.DEBUG.equals(logLevelForReport);
	}

	public LogLevel getLogLevelForReport() {
		return this.logLevelForReport;
	}

	@Override
	public void initialize(ConfigurableApplicationContext applicationContext) {
		this.applicationContext = applicationContext;
		applicationContext
				.addApplicationListener(new ConditionEvaluationReportListener());
		if (applicationContext instanceof GenericApplicationContext) {
			// Get the report early in case the context fails to load
			this.report = ConditionEvaluationReport
					.get(this.applicationContext.getBeanFactory());
		}
	}

	protected void onApplicationEvent(ApplicationEvent event) {
		ConfigurableApplicationContext initializerApplicationContext = this.applicationContext;
		if (event instanceof ContextRefreshedEvent) {
			if (((ApplicationContextEvent) event)
					.getApplicationContext() == initializerApplicationContext) {
				logAutoConfigurationReport();
			}
		}
		else if (event instanceof ApplicationFailedEvent
				&& ((ApplicationFailedEvent) event)
						.getApplicationContext() == initializerApplicationContext) {
			logAutoConfigurationReport(true);
		}
	}

	private void logAutoConfigurationReport() {
		logAutoConfigurationReport(!this.applicationContext.isActive());
	}

	public void logAutoConfigurationReport(boolean isCrashReport) {
		if (this.report == null) {
			if (this.applicationContext == null) {
				this.logger.info("Unable to provide the conditions report "
						+ "due to missing ApplicationContext");
				return;
			}
			this.report = ConditionEvaluationReport
					.get(this.applicationContext.getBeanFactory());
		}
		if (!this.report.getConditionAndOutcomesBySource().isEmpty()) {
			if (this.getLogLevelForReport().equals(LogLevel.INFO)) {
				if (this.logger.isInfoEnabled()) {
					this.logger.info(new ConditionEvaluationReportMessage(this.report));
				}
				else if (isCrashReport) {
					logMessage("info");
				}
			}
			else {
				if (this.logger.isDebugEnabled()) {
					this.logger.debug(new ConditionEvaluationReportMessage(this.report));
				}
				else if (isCrashReport) {
					logMessage("debug");
				}
			}
		}
	}

	private void logMessage(String logLevel) {
		this.logger.info(
				String.format("%n%nError starting ApplicationContext. To display the "
						+ "conditions report re-run your application with '" + logLevel
						+ "' enabled."));
	}

	private class ConditionEvaluationReportListener
			implements GenericApplicationListener {

		@Override
		public int getOrder() {
			return Ordered.LOWEST_PRECEDENCE;
		}

		@Override
		public boolean supportsEventType(ResolvableType resolvableType) {
			Class<?> type = resolvableType.getRawClass();
			if (type == null) {
				return false;
			}
			return ContextRefreshedEvent.class.isAssignableFrom(type)
					|| ApplicationFailedEvent.class.isAssignableFrom(type);
		}

		@Override
		public boolean supportsSourceType(Class<?> sourceType) {
			return true;
		}

		@Override
		public void onApplicationEvent(ApplicationEvent event) {
			ConditionEvaluationReportLoggingListener.this.onApplicationEvent(event);
		}

	}

}


text:
<?xml version="1.0" encoding="UTF-8"?>
<ehcache xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:noNamespaceSchemaLocation="ehcache.xsd" updateCheck="true"
         monitoring="autodetect" dynamicConfig="true">

    <diskStore path="java.io.tmpdir" />
    <cacheManagerPeerProviderFactory
            class="net.sf.ehcache.distribution.RMICacheManagerPeerProviderFactory"
            properties="peerDiscovery=automatic,
                        multicastGroupAddress=230.0.0.1,
                        multicastGroupPort=4446, timeToLive=1"
            propertySeparator="," />

    <cacheManagerPeerListenerFactory
            class="net.sf.ehcache.distribution.RMICacheManagerPeerListenerFactory" />
    <cache name="shiro-activeSessionCache" maxElementsInMemory="600"
           eternal="true" overflowToDisk="true" memoryStoreEvictionPolicy="LFU">
        <cacheEventListenerFactory
                class="net.sf.ehcache.distribution.RMICacheReplicatorFactory" />
    </cache>

    <defaultCache maxElementsInMemory="100" eternal="true"
                  overflowToDisk="true" memoryStoreEvictionPolicy="LFU">
    </defaultCache>
</ehcache>


text:
using System;
using System.Text;

class ReverseNumber
{
    static string ReverseGivenNumber(string strNum)
    {
        char[] arrOfChars = new char[strNum.Length];
        for (int i = 0; i < strNum.Length; i++)
        {
            arrOfChars[i] = strNum[i];
        }
        Array.Reverse(arrOfChars);
        StringBuilder reversed = new StringBuilder();
        reversed.Append(arrOfChars);
        string revNum = reversed.ToString();
        return revNum;
    }
    static void Main()
    {
        Console.Write("Enter a number: ");
        string inputNum = Console.ReadLine();
        string reversed = ReverseGivenNumber(inputNum);
        Console.WriteLine(reversed);
    }
}