text:
"""This is the Bokeh charts interface. It gives you a high level API to build
complex plot is a simple way.

This is the BoxPlot class which lets you build your BoxPlot plots just passing
the arguments to the Chart class and calling the proper functions.
It also add a new chained stacked method.
"""
#-----------------------------------------------------------------------------
# Copyright (c) 2012 - 2014, Continuum Analytics, Inc. All rights reserved.
#
# Powered by the Bokeh Development Team.
#
# The full license is in the file LICENSE.txt, distributed with this software.
#-----------------------------------------------------------------------------

#-----------------------------------------------------------------------------
# Imports
#-----------------------------------------------------------------------------

from __future__ import absolute_import

from ..builder import create_and_build, Builder
from ..utils import (build_wedge_source, build_wedge_text_source,
                     add_charts_hover, derive_aggregation)
from ..attributes import ColorAttr, CatAttr
from ...models.sources import ColumnDataSource
from ...models.glyphs import AnnularWedge, Text
from ...models.renderers import GlyphRenderer
from ...models.ranges import Range1d
from ..properties import Dimension
from ...properties import String, Instance, Float, Color, Either, List

#-----------------------------------------------------------------------------
# Classes and functions
#-----------------------------------------------------------------------------

def Donut(data, label='index', values=None, xgrid=False,
          ygrid=False, color=None, agg=None, height=400, width=400,
          hover_tool=True, hover_text=None, **kw):
    """ Create a Donut chart containing one or more layers from table-like data.

    Create a donut chart using :class:`DonutBuilder
    <bokeh.charts.builders.donut_builder.DonutBuilder>` to
    render the glyphs from input data and specification. The primary
    use case for the donut chart is to show relative amount each category, within a
    categorical array or multiple categorical arrays, makes up of the whole for some
    array of values.

    Args:
      data (:ref:`userguide_charts_data_types`): the data source for the chart
      values (str, optional): the values to use for producing the boxplot using
        table-like input data
      label (str or list(str), optional): the categorical variable to use for creating
        separate boxes
      color (str or list(str) or bokeh.charts._attributes.ColorAttr, optional): the
        categorical variable or color attribute specification to use for coloring the
        boxes.
      **kw:

    Returns:
        :class:`Chart`: includes glyph renderers that generate Boxes and Whiskers

    Examples:

    .. bokeh-plot::
        :source-position: above

        from bokeh.sampledata.autompg import autompg as df
        from bokeh.charts import BoxPlot, output_file, show, hplot

        box = BoxPlot(df, values='mpg', label='cyl', title="Auto MPG Box Plot", width=400)
        box2 = BoxPlot(df, values='mpg', label='cyl', color='cyl',
                          title="MPG Box Plot by Cylinder Count", width=400)

        output_file('box.html')
        show(hplot(box, box2))
    """

    kw['label'] = label
    kw['values'] = values
    kw['color'] = color
    kw['xgrid'] = xgrid
    kw['ygrid'] = ygrid
    kw['height'] = height
    kw['width'] = width

    if agg is not None:
        kw['agg'] = agg

    chart = create_and_build(DonutBuilder, data, **kw)

    chart.left[0].visible = False
    chart.below[0].visible = False

    values, agg = derive_aggregation(dim_cols=label, agg_col=values, agg=agg)
    add_charts_hover(chart, use_hover=hover_tool, hover_text=hover_text,
                     values_col=values, agg_text=agg)

    return chart

class DonutBuilder(Builder):
    """Produces layered donut for hierarchical groups of data.

    Handles derivation of chart settings from inputs and assignment of attributes
    to each group of data.

    """

    default_attributes = {'color': ColorAttr(),
                          'label': CatAttr(),
                          'stack': CatAttr()}

    dimensions = ['values']

    values = Dimension('values')

    agg = String(default='sum')

    chart_data = Instance(ColumnDataSource)
    text_data = Instance(ColumnDataSource)

    level_width = Float(default=1.5)
    level_spacing = Either(Float, List(Float), default=0.0)
    text_font_size = String(default='10pt')
    line_color = Color(default='White')

    def setup(self):

        if self.attributes['label'].columns is None:
            self.attributes['label'].setup(data=self._data.source,
                                           columns=self._data.df.columns[0])

        # handle input options where values were provided in simple or pre-aggregated
        # format
        if self.values.selection is None:

            # identify data that was indexed by a groupby operation and setup data/label
            # after this transformation, the rest of the chart is processed as if the
            # inputs were provided as column labels
            if not all([name is None for name in self._data.df.index.names]):
                label_cols = list(self._data.df.index.names)
                self._data._data.reset_index(inplace=True)
                self.attributes['label'].setup(data=self._data.source,
                                               columns=label_cols)

                # find remaining column for pre-aggregated data
                cols = [col for col in self._data.df.columns if col not in
                        label_cols + ['index']]

            # when there is 'index' selection for label, use remaining column as label
            # if the remaining column is an object
            elif self.attributes['label'].columns[0] == 'index':
                cols = [col for col in self._data.df.columns if col not in ['index']]
            else:
                cols = self.attributes['label'].columns

            # setup our selection
            self.values.selection = cols[0]

            if self._data.df[self.values.selection].dtype.name == 'object':
                self.attributes['label'].setup(data=self._data.source,
                                               columns=cols[0])
                self.agg = 'count'

        # infer color specification and stacking
        if self.attributes['color'].columns is None:
            self.attributes['color'].setup(data=self._data.source,
                                           columns=self.attributes['label'].columns[0])

        if self.attributes['stack'].columns is None:
            self.attributes['stack'].setup(data=self._data.source,
                                           columns=self.attributes['label'].columns[0])

    def set_ranges(self):
        rng = (max(self.chart_data.data['level']) + 1.1) * self.level_width
        self.x_range = Range1d(-rng, rng)
        self.y_range = Range1d(-rng, rng)

    def process_data(self):

        # produce polar ranges based on aggregation specification
        polar_data = build_wedge_source(self._data.df,
                                        cat_cols=self.attributes['label'].columns,
                                        agg_col=self.values.selection,
                                        agg=self.agg,
                                        level_width=self.level_width,
                                        level_spacing=self.level_spacing)

        # add placeholder color column that will be assigned colors
        polar_data['color'] = ''

        # set the color based on the assigned color for the group
        for group in self._data.groupby(**self.attributes):
            polar_data.loc[group['stack'], 'color'] = group['color']

        # create the source for the wedges and the text
        self.chart_data = ColumnDataSource(polar_data)
        self.text_data = build_wedge_text_source(polar_data)

    def yield_renderers(self):

        aw = AnnularWedge(x=0, y=0, inner_radius='inners', outer_radius='outers',
                          start_angle='start', end_angle='end', fill_color='color',
                          fill_alpha=0.8, line_color=self.line_color)

        yield GlyphRenderer(data_source=self.chart_data, glyph=aw)

        txt = Text(x="x", y="y", text="text", angle="text_angle",
                   text_align="center", text_baseline="middle",
                   text_font_size=self.text_font_size)

        yield GlyphRenderer(data_source=self.text_data, glyph=txt)


text:
Ingresa a tu cuenta

                    <form action="<?php echo site_url('/application/login_data/'); ?>" method="post">
                        <input type="text" id="usuario" name="usuario" placeholder="Usuario" />
			<input type="password" id="clave" name="clave" placeholder="Clave" />
                        <select name="empresa" id="empresa" required width="200" style="width: 200px">
                            <option value="0">Seleccionar empresa</option>
                            <?php
                            foreach ($empresas as $empresa) {
                                echo '<option value="'.$empresa->id.'">'.$empresa->nombre.'</option>';
                            } ?>
                        </select>

			<button type="submit" class="btn btn-default">Ingresar</button>
                    </form>

redpajama_set_name: RedPajamaGithub


text:
% test the PG solver with a SVM problem

x0 = -10*rand(d,1);
max_its = 500;

opt_settings = sdpsettings('verbose', 0, 'solver', 'gurobi');

[Bstar, its] = PG(svm.B, svm.f, svm.grad_f, svm.cons, 'max_its', max_its, ...
                   'x0', x0, 'alpha', @(k) 1/(k+10), ...
                   'opt_settings', opt_settings);
% assert(all_close(svm.Bstar, Bstar), 'Does not converge');
%% plot iterations
optimal_objective = svm.f(svm.Bstar);
differences = abs([its.f]-optimal_objective);

initfig('SVM PG Objective', 1);
ax = subplot(211);
semilogy(differences);
hold on;
grid on;
title('SVM PG Objective');
ylabel('|f(x_k) - f(x^*)|');

% check constraints and plot constraint violation
residuals = nan(m, 1);
percentage_violated = nan(1, max_its);
p = progress('Checking constraints', max_its*m);
for k = 1:max_its
    for i = 1:m
        residuals(i) = svm.residual(its(k).x, i);
        p.ping();
    end
    percentage_violated(k) = sum(residuals < -1e-6) / m * 100;
end

ax2 = subplot(212);

linkaxes([ax ax2], 'x');
plot(percentage_violated);
hold on;
grid on;
ylabel('% violated');
title('Feasibility');
xlabel('Iterations');


text:
MonitorLogFolders
=================

PowerShell Script used to monitor log folder sizes and send alerts when over a certain size

Please see: http://it-erate.com/powershell-monitoring-size-log-folders for further details on how to
configure this script.

Main Files
==================
MonitorLogFolders.ps1 – This is the main script that does the work.
LogPaths.csv – Place all of the UNC paths of any server you would like to monitor.
Record.csv – Historical record of the script running and path sizes.
Settings.ini – Some other information you can configure such as email addresses and what size a log folder must be before sending out an alert (in MB).

Usage
==================
In order to correctly monitor log folders you will need to either use a scheduled task or some other system that allows you to
run scripts on a scheduled interval.

About Us
=================
Please stop by and see other things we have going on at IT-erate.com. We hope that you found this script helpful and if so please stop by and
let us know!


text:
class SecurityEvent < AuditEvent
end


text:
var task_mgr = angular.module('task_mgr_app', ['ngRoute']);

task_mgr.config(['$routeProvider', function($routeProvider){
	$routeProvider
		.when('/', {
			template:$('#main').html(),
			controller:'mainCtrl'
		})
		;
}]);

function mainCtrl($scope, $routeParams, tasksFactory, $location){

}

task_mgr.factory('tasksFactory', function($http){
	return {
		authenticate: function(method, data) {
			return $http.post(base_url+'auth/authenticate/'+method, data).then(function(response){return response.data});
		}
	}
});


text:
'''Stats module tests

'''

import unittest

from pyrateless import Soliton
from pyrateless.coding.stats import mode_from_delta_c, avg_degree_from_delta_mode

class Tests(unittest.TestCase):
    '''test the encoder and decoder modules.'''

    def test_soliton_1(self):
        num_inputs = 1000
        c = 0.09266
        delta = 0.001993
        mode = mode_from_delta_c(num_inputs=num_inputs, delta=delta, c=c)
        soliton = Soliton(
            failure_prob=delta,
            symbols=num_inputs,
            mode=mode,
        )
        pdf = [soliton.pdf(x) for x in range(1, num_inputs+1)]
        self.assertAlmostEqual(sum(pdf), 1)
        return

    def test_soliton_2(self):
        num_inputs = 100
        delta = 0.001993
        mode = 1
        soliton = Soliton(
            failure_prob=delta,
            symbols=num_inputs,
            mode=mode,
        )
        pdf = [soliton.pdf(x) for x in range(1, num_inputs+1)]
        self.assertAlmostEqual(sum(pdf), 1)
        return

    def test_avg_degree_1(self):
        num_inputs = 200
        delta = 1e-2
        mode = 100
        avg_degree = avg_degree_from_delta_mode(
            num_inputs=num_inputs,
            delta=delta,
            mode=mode
        )
        self.assertGreater(avg_degree, 1)
        self.assertLess(avg_degree, num_inputs)
        return

    def test_avg_degree_2(self):
        num_inputs = 200
        delta = 1e-2
        mode = 1
        avg_degree_1 = avg_degree_from_delta_mode(
            num_inputs=num_inputs,
            delta=delta,
            mode=mode
        )
        mode = 100
        avg_degree_100 = avg_degree_from_delta_mode(
            num_inputs=num_inputs,
            delta=delta,
            mode=mode
        )
        self.assertGreater(avg_degree_100, avg_degree_1)
        return


text:
/**
\brief K20-specific definition of the "board" bsp module.

\author Xavi Vilajosana <xvilajosana@eecs.berkeley.edu>, May 2012.
 */

#include "board.h"
#include "leds.h"
#include "led.h"
#include "bsp_timer.h"
#include "smc.h"
#include "flextimer.h"
//#include "mcg.h"
#include "rcm.h"

//=========================== variables =======================================
extern int mcg_clk_hz;

//=========================== prototypes ======================================

//=========================== public ==========================================

extern int mote_main(vod);

int main(void) {
   return mote_main();
}

void board_init() {
	uint16_t i,j;
	//enable all port clocks.
	SIM_SCGC5 |= (SIM_SCGC5_PORTA_MASK
			| SIM_SCGC5_PORTB_MASK
			| SIM_SCGC5_PORTC_MASK
			| SIM_SCGC5_PORTD_MASK
			| SIM_SCGC5_PORTE_MASK );

	//init all pins for the radio
	//SLPTR
#ifdef TOWER_K20
	PORTB_PCR3 = PORT_PCR_MUX(1);// -- PTB3 used as gpio for slptr
	GPIOB_PDDR |= RADIO_SLPTR_MASK; //set as output

	//RADIO RST -- TODO in the TWR change it to another pin! this is one of the leds.
	PORTC_PCR9 = PORT_PCR_MUX(1);// -- PTC9 used as gpio for radio rst
	GPIOC_PDDR |= RADIO_RST_MASK; //set as output

#elif OPENMOTE_K20
	PORTD_PCR4 = PORT_PCR_MUX(1);// -- PTD4 used as gpio for slptr
	GPIOD_PDDR |= RADIO_SLPTR_MASK; //set as output

	//RADIO RST
	PORTD_PCR5 = PORT_PCR_MUX(1);// -- PTD5 used as gpio for radio rst
	GPIOD_PDDR |= RADIO_RST_MASK; //set as output

#endif

	PORT_PIN_RADIO_RESET_LOW();//activate the radio.

	PORT_PIN_RADIO_SLP_TR_CNTL_LOW();

	//ptc5 .. ptc5 is pin 62, irq A
	enable_irq(RADIO_EXTERNAL_PORT_IRQ_NUM);//enable the irq. The function is mapped to the vector at position 105 (see manual page 69). The vector is in isr.h

	//external port radio_isr.
	PORTC_PCR5 = PORT_PCR_MUX(1);// -- PTC5 used as gpio for radio isr through llwu
	GPIOC_PDDR &= ~1<<RADIO_ISR_PIN; //set as input ==0
	PORTC_PCR5 |= PORT_PCR_IRQC(0x09); //9 interrupt on raising edge. page 249 of the manual.
	PORTC_PCR5 |= PORT_PCR_ISF_MASK; //clear any pending interrupt.

	llwu_init();//low leakage unit init - to recover from deep sleep

	debugpins_init();
	leds_init();
	bsp_timer_init();
	uart_init();
	radiotimer_init();
	spi_init();
	radio_init();
	leds_all_off();
	leds_sync_on();
	leds_radio_on();
	leds_debug_on();
	leds_error_on();
	leds_all_off();
	debugpins_fsm_clr();
}

void board_sleep() {
	uint8_t op_mode;
	//flextimer_save();
	clk_monitor_0(OFF);//turn off clock monitors so the freq can be changed without causing a reset
	PORTA_PCR2 |= PORT_PCR_PE_MASK | PORT_PCR_PS_MASK;//JTAG_TDO -- disconnect jtag before entering deep sleep.
	//enter_lls(); //need to restart bsp_timer maybe..
	enter_wait();
	clk_monitor_0(ON);//enable it again.
	//flextimer_restore();
}

void board_reset() {
   //todo
}

//=========================== private =========================================

//=========================== interrupt handlers ==============================
/*
 * This function is only called when the radio isr is executed and the MCU
 * is either RUNNING or in WAIT state.
 * In case that the MCU is in deep sleep (LLS mode), the LLWU is handling the
 * interrupt and consequently this function is not being call. For some reason,
 * the LLWU interrupt, does not trigger this interrupt function. In contrast the
 * LPTMR ISR is invoked right after the LLWU_isr in case the timer wake's up the MCU.
 *
 * So if you are working in LLS mode, then check LLWU_isr function in llwu.c file.
 *
 */
void radio_external_port_c_isr(void) {
	uint32_t portc;
	debugpins_isr_set();
	portc=PORTC_ISFR;

	if ((PORTC_ISFR) & (RADIO_ISR_MASK)) {

		PORTC_ISFR |= RADIO_ISR_MASK; //clear isr flag
		PORTC_PCR5 |= PORT_PCR_ISF_MASK;    //clear flag
		radio_isr();
		//leds_debug_toggle();
	}else{
		while(1);
		//radio_isr();
	}
	debugpins_isr_clr();
}


text:
package com.nostra13.universalimageloader.sample.activity;

import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentActivity;
import com.nostra13.universalimageloader.sample.Constants;
import com.nostra13.universalimageloader.sample.R;
import com.nostra13.universalimageloader.sample.fragment.ImageGalleryFragment;
import com.nostra13.universalimageloader.sample.fragment.ImageGridFragment;
import com.nostra13.universalimageloader.sample.fragment.ImageListFragment;
import com.nostra13.universalimageloader.sample.fragment.ImagePagerFragment;

/**
 * @author Sergey Tarasevich (nostra13[at]gmail[dot]com)
 */
public class SimpleImageActivity extends FragmentActivity {
	@Override
	public void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);

		int frIndex = getIntent().getIntExtra(Constants.Extra.FRAGMENT_INDEX, 0);
		Fragment fr;
		String tag;
		int titleRes;
		switch (frIndex) {
			default:
			case ImageListFragment.INDEX:
				tag = ImageListFragment.class.getSimpleName();
				fr = getSupportFragmentManager().findFragmentByTag(tag);
				if (fr == null) {
					fr = new ImageListFragment();
				}
				titleRes = R.string.ac_name_image_list;
				break;
			case ImageGridFragment.INDEX:
				tag = ImageGridFragment.class.getSimpleName();
				fr = getSupportFragmentManager().findFragmentByTag(tag);
				if (fr == null) {
					fr = new ImageGridFragment();
				}
				titleRes = R.string.ac_name_image_grid;
				break;
			case ImagePagerFragment.INDEX:
				tag = ImagePagerFragment.class.getSimpleName();
				fr = getSupportFragmentManager().findFragmentByTag(tag);
				if (fr == null) {
					fr = new ImagePagerFragment();
					fr.setArguments(getIntent().getExtras());
				}
				titleRes = R.string.ac_name_image_pager;
				break;
			case ImageGalleryFragment.INDEX:
				tag = ImageGalleryFragment.class.getSimpleName();
				fr = getSupportFragmentManager().findFragmentByTag(tag);
				if (fr == null) {
					fr = new ImageGalleryFragment();
				}
				titleRes = R.string.ac_name_image_gallery;
				break;
		}

		setTitle(titleRes);
		getSupportFragmentManager().beginTransaction().replace(android.R.id.content, fr, tag).commit();
	}
}


text:
<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="utf-8" />

  <title>Precisely</title>

  <script>
    sessionStorage.redirect = location.href;
  </script>

  <meta http-equiv="refresh" content="0;URL='/'"></meta>
</head>

<body>

</body>

</html>


text:
<?php

namespace Om\Pdo\Authenticator;

use \PDO;
use \PDOException;

/**
 * User: ballmann
 * Date: 4/12/16
 */
class PdoAuthenticator
{
    /**
     * @var DatabaseConfiguration
     */
    protected $dbConfiguration;

    /**
     * PdoAuthenticator constructor.
     * @param DatabaseConfiguration $dbConfiguration (required)
     */
    public function __construct(DatabaseConfiguration $dbConfiguration)
    {
        $this->dbConfiguration = $dbConfiguration;
    }

    /**
     * Retrieve a user's salt.
     * @param string $username - required String
     * @return string - null (not found) or a String
     */
    public function getUsersSalt($username)
    {
        $salt = null;
        try {
            $dbConfig = $this->dbConfiguration;
            $stmt = DatabaseQueryBuilder::newBuilder()
                ->table($dbConfig->getTableName())
                ->ifEqual($dbConfig->getUsernameColumnName(), $username)
                ->buildSql()
                ->buildPdoStatement($this->pdoHandle());
            if ($stmt->execute()) {
                while ($row = $stmt->fetch(PDO::FETCH_ASSOC)) {
                    $salt = $this->extractSalt($row[$dbConfig->getPasswordColumnName()]);
                }
            }
            $stmt = null;
        } catch (PDOException $e) {
            error_log("Can't get user's salt ($username) from database: " . $e->getMessage());
        }
        $dbh = null;

        return $salt;
    }

    /**
     * Extracts the database table's charset. The table name is configured in
     * {@see PdoAuthenticator::dbConfiguration}. The implementation uses the MYSQL specific "SHOW CREATE TABLE"
     * statement.
     *
     * @return string
     */
    public function getTableCharset()
    {
        $charset = null;
        $dbConfig = $this->dbConfiguration;
        $tableName = $dbConfig->getTableName();
        try {
            $stmt = $this->pdoHandle()->query('SHOW CREATE TABLE ' . $tableName);
            foreach ($stmt as $row) {
                $createStmt = $row['Create Table'];
                preg_match('/CHARSET=([^ ]+)/', $createStmt, $match);
                $charset = $match[1];
            }
            $stmt = null;
        } catch (PDOException $e) {
            error_log("Can't get table's charset ($tableName) from database: " . $e->getMessage());
        }
        return $charset;
    }

    /**
     * Check a user's login. The given password is directly compared to the stored one.
     * @param string $username required String
     * @param string $password required String
     * @return bool
     */
    public function checkUserLogin($username, $password)
    {
        $result = false;
        try {
            $dbConfig = $this->dbConfiguration;
            $stmt = DatabaseQueryBuilder::newBuilder()
                ->table($dbConfig->getTableName())
                ->returnField($dbConfig->getUsernameColumnName())
                ->ifEqual($dbConfig->getUsernameColumnName(), $username)
                ->ifEqual($dbConfig->getPasswordColumnName(), $password)
                ->buildSql()
                ->buildPdoStatement($this->pdoHandle());
            if ($stmt->execute()) {
                while ($row = $stmt->fetch(PDO::FETCH_ASSOC)) {
                    $result = true;
                }
            }
            $stmt = null;
        } catch (PDOException $e) {
            error_log("Can't check login of user $username in database: " . $e->getMessage());
        }
        return $result;
    }

    /**
     * Create a pdo handle.
     * @return PDO
     */
    public function pdoHandle()
    {
        $dbConfig = $this->dbConfiguration;
        return new PDO($dbConfig->getPdoUrl(), $dbConfig->getDbUser(), $dbConfig->getDbPassword());
    }

    /**
     * Get the salt from the password value.
     * @param string $password - has the format $<Type>$<Salt>$<Hash>
     * @return string
     */
    public function extractSalt($password)
    {
        $salt = null;
        $tok = explode('$', $password);
        if (count($tok) == 4) {
            $salt = '$' . $tok[1] . '$' . $tok[2];
            return $salt;
        }
        return $salt;
    }
}


text:
package de.zib.gndms.model.common.repository;

/**
 * @author try ma ik jo rr a zib
 * @version $Id$
 *          <p/>
 *          Date: 05.01.2011, Time: 15:35:13
 */
public abstract class QueuedTransientDao<K,M,D> extends QueuedDao<K,M,D> {

    private Dao<K,M,D> dao = new TransientDao<K,M,D> () {
        protected M newModel( K key ) {
            return QueuedTransientDao.this.newModel( key );
        }

        public K create() {
            return QueuedTransientDao.this.create();
        }
    };

    /**
     * Delegated to Transient Dao;
     */
    protected abstract M newModel( K key );

    protected M provideGet( K key ) {
        return dao.get( key );
    }

    public void deleteByKey( K key ) {
        dao.deleteByKey( key );
    }

    public void delete( M model ) {
        dao.delete( model );
    }

    public void add( M model, K key ) {
        dao.add( model, key );
    }

    protected void setDao( Dao<K,M,D> dao ) {
        this.dao = dao;
    }
}


text:
var Analyst = Analyst || {};

(function(A, $) {
  A.ledger = {};

  A.ledger.LedgerItemView = Backbone.Marionette.ItemView.extend({
    template: Handlebars.getTemplate('ledger', 'ledger-item'),
    tagName: 'tr',

    events: {
      'click .show-refund': 'showRefund',
      'click .refund': 'refund',
      'click .cancel-refund': 'hideRefund'
    },

    serializeData: function () {
      var ret = this.model.toJSON();
      ret.time = ret.time.replace(/^([0-9]{4}-[0-9]{2}-[0-9]{2})T([0-9]{2}:[0-9]{2}).*$/, '$1 $2');
      ret.showRefund = (ret.reason == 'QUERY_CREATED' || ret.reason == 'SINGLE_POINT') && !ret.refunded;
      return ret;
    },

    onRender: function () {
      if (this.model.get('refunded'))
        this.$el.addClass('ledger-refunded');
    },

    showRefund: function (e) {
      e.preventDefault();
      var instance = this;
      this.$('.refund-button').fadeOut(200, function () {
        instance.$('.refund-dialog').fadeIn();
      });

    },

    hideRefund: function (e) {
      e.preventDefault();
      var instance = this;
      this.$('.refund-dialog').fadeOut(200, function () {
        instance.$('.refund-button').fadeIn();
      });
    },

    /** Issue a full refund for this item */
    refund: function (e) {
      e.preventDefault();

      this.$('.refund-dialog').slideUp();

      $.ajax({
        url: '/api/ledger/refund',
        type: 'POST',
        data: JSON.stringify(this.model.toJSON()),
        contentType: 'json',
        success: function (data) {
          // re render the view
          A.ledger.LedgerView.instance.fetch();
        }
      });
    }
  });

  A.ledger.LedgerView = Backbone.Marionette.CompositeView.extend({
    // this is a full page view
    el: 'body',
    template: Handlebars.getTemplate('ledger', 'ledger'),

    itemView: A.ledger.LedgerItemView,
    itemViewContainer: 'tbody',

    events: {
      'change #group, #year, #month': 'fetch',
      'submit form': 'create'
    },

    initialize: function () {
      this.collection = new A.models.Ledger();

      A.ledger.LedgerView.instance = this;

      _.bindAll(this, 'render', 'fetch');
      this.listenTo(this.collection, 'change sync ', this.render);

      var instance = this;
      this.groups = []

      // find available years
      // range is exclusive at end so add one, and reverse so most recent year is at the top
      // Make them strings so they can be used as hash keys
      this.years = _.map(_.range(2015, new Date().getFullYear() + 1).reverse(), String);

      this.year = new Date().getFullYear();
      this.month = ['january', 'february', 'march', 'april', 'may', 'june', 'july', 'august', 'september', 'october',
        'november', 'december'][new Date().getMonth()];

      $.ajax({
        url: '/api/groups',
        success: function (groups) {
          instance.groups = groups;
          instance.group = groups[0];
          // call to render here is a bit frivolous but needed so that the select list will be updated so that
          // the call to fetch gets the correct data.
          instance.render();
          instance.fetch();
        }
      });
    },

    fetch: function () {
      this.month = this.$('#month').val();
      this.year = this.$('#year').val();
      this.group = this.$('#group').val();

      this.collection.fetch({
        data: {
          month: this.month,
          year: this.year,
          group: this.group
        }
      });
    },

    serializeData: function () {
      var single = 0, query = 0, refund = 0, purchase = 0, total = 0, starting, ending;

      if (this.collection.length > 0) {
        starting = this.collection.at(0).get('balance') - this.collection.at(0).get('delta');
        ending = this.collection.at(this.collection.length - 1).get('balance');
      }

      this.collection.each(function (entry) {
        var reason = entry.get('reason');
        var delta = entry.get('delta');

        total += delta;

        if (reason == 'SINGLE_POINT')
          // nb reversing sign so everything is positive
          single -= delta;

        else if (reason == 'QUERY_CREATED')
          query -= delta;

        else if (reason == 'PURCHASE')
          purchase += delta;

        else
          refund += delta;
      });

      return {
        years: this.years,
        single: single,
        query: query,
        refund: refund,
        purchase: purchase,
        total: total,
        starting: starting,
        ending: ending,
        groups: this.groups
      };
    },

    onRender: function () {
      if (this.group && this.year && this.month) {
        // select the correct select boxes
        this.$('option').prop('selected', false);

        this.$('#year option[value="' + this.year + '"]').prop('selected', true);
        this.$('#month option[value="' + this.month + '"]').prop('selected', true);
        this.$('#group option[value="' + this.group + '"]').prop('selected', true);
      }
    },

    /** Create a new ledger entry */
    create: function (e) {
      e.preventDefault();

      new A.models.LedgerEntry({
        delta: this.$('#credit').val(),
        reason: this.$('#reason').val(),
        note: this.$('#note').val(),
        groupId: this.group
      })
      .save()
      .done(this.fetch);
    }
  });

  // this runs on its own page, so if this script is getting loaded we should be starting up the ledger.
  // so go ahead and spin it up.
  $(document).ready(function () {
    var lv = new A.ledger.LedgerView();
  });
})(Analyst, jQuery);


text:
.. title:: Features

.. _features:

########
Features
########

REST API for user object operations
===================================

At its core, Thunder is a REST API that provides endpoints to manage user accounts and information.
Your frontend application can use Thunder to create, retrieve, update, and delete user accounts.
All of the user information is stored in a database that Thunder interfaces with.

Multiple Database Providers
===========================

Thunder provides implementations for multiple database providers so that you can use the database
of your choice. Currently, Thunder supports Amazon DynamoDB and MongoDB, with support for additional
providers coming in the near future. See :ref:`configuration-database` for more information on
configuring a specific database provider.

Email Verification
==================

Thunder provides functionality to send verification emails and keep email verification state.
``POST`` requests to ``/verify`` will send a verification email with a verification URL. ``GET``
requests to ``/verify`` will mark the email address as verified. Finally, applications can also
reset the verification status of a user's email address for any reason at ``/verify/reset``.

.. note::

    Thunder currently relies on Simple Email Service (SES) to send emails, so an AWS account is
    required if email verification is enabled for your instance of Thunder.

Server-Side Password Hashing
============================

Thunder can perform server-side password hashing of user passwords. By default in version 2.0+,
Thunder will not hash any user passwords. However, you can enable this in your configuration, and
additionally specify the hashing algorithm to be used. See :ref:`configuration-hash` for more
information on the configuration options.

Secrets Fetching
================

Thunder is able to fetch values defined in your configuration file from a secrets provider. This is
particularly useful for configuration such as a MongoDB connection string, or the secret key used
to validate HMAC-SHA signed JWT tokens. See :ref:`configuration-secrets` for more information.

Basic Authentication or OAuth 2.0
=================================

Thunder requires authentication from clients when making requests to the API. This authentication
can be configured to be either basic authentication (with a user-defined list of allowed
username/password combinations), or OAuth 2.0 authentication. When using OAuth 2.0, you must have
a separate service that will supply OAuth JWT tokens, which clients will then send to Thunder in the
Authorization header. Thunder will verify that the JWT tokens it receives are valid and that they
contain the right claims specified by the user in the configuration file. See :ref:`configuration-auth`
for more information.

Additional User Properties
==========================

Thunder always requires that your user objects contain an email address and a password. However,
you can include any additional number of properties in your user objects. By default, additional
user properties are flexible and Thunder will not perform any validation of these properties. For
example, you can create two users like the following:

User 1
------

.. code-block:: json

    {
      "email": "sampleuser@sanctionco.com",
      "password": "hunter2",
      "appId": 1234567890
    }

User 2
------

.. code-block:: json

    {
      "email": "seconduser@sanctionco.com",
      "password": "hunter3",
      "appId": 1234567890,
      "additionalProperty": "So many properties!"
    }

and Thunder will accept both.

You can also configure Thunder to perform validation on these properties to ensure that all users
have the same properties and that they are the correct type (String, Integer, Double, etc). See
:ref:`configuration-properties` for more information on the configuration options.

Customizable Email Contents
===========================

The contents of verification emails can be completely customized. See :ref:`configuration-email`
for more information on the configuration options.

Customizable Verification Success Page
======================================

The success page that is shown to the end-user when their email is successfully verified can be
customized. See :ref:`configuration-email` for more information on the configuration options.

Generated OpenAPI (Swagger) Specifications
==========================================

Thunder offers generated `OpenAPI <https://swagger.io/docs/specification/about/>`_ documentation
that is available at the ``/openapi.yaml`` or ``/openapi.json`` endpoints. This generated
documentation can be used to automatically generate client libraries that are supported by the
`openapi-generator <https://github.com/OpenAPITools/openapi-generator>`_. Additionally, Thunder runs
Swagger UI at the ``/swagger`` endpoint. You can use the UI to view all of the available endpoints
as well as to make requests against the API.

Official Docker Image
=====================

Thunder provides an `official Docker image <https://hub.docker.com/r/rohannagar/thunder/>`_ so that
your instance of Thunder can be easily run in a container environment. There is also documentation
on how to run Thunder in Kubernetes.

Client Libraries
================

Thunder provides client libraries for easy communication between your application and your instance
of Thunder. See :ref:`client-libraries` for more information on the client libraries.


text:
import React from 'react';
import { connect } from 'react-redux';
import { addLocaleData, IntlProvider } from 'react-intl';
import { DEFAULT_LANGUAGE } from 'app/client_config';
import tt from 'counterpart';
import en from 'react-intl/locale-data/en';
import ru from 'react-intl/locale-data/ru';
import uk from 'react-intl/locale-data/uk';
import sr from 'react-intl/locale-data/sr';
import ro from 'react-intl/locale-data/ro';

addLocaleData([...en, ...ru, ...uk, ...sr, ...ro]);

tt.registerTranslations('en', require('app/locales/en.json'));
tt.registerTranslations('ru', require('app/locales/ru-RU.json'));
tt.registerTranslations('uk', require('app/locales/ua.json'));
tt.registerTranslations('sr', require('app/locales/sr.json'));
tt.registerTranslations('ro', require('app/locales/ro-RO.json'));

class Translator extends React.Component {
    render() {
        const localeWithoutRegionCode = this.props.locale
            .toLowerCase()
            .split(/[_-]+/)[0];

        tt.setLocale(localeWithoutRegionCode);
        tt.setFallbackLocale('en');

        return (
            <IntlProvider
                key={localeWithoutRegionCode}
                locale={localeWithoutRegionCode}
                defaultLocale={DEFAULT_LANGUAGE}
            >
                {this.props.children}
            </IntlProvider>
        );
    }
}

export default connect((state, props) => {
    return {
        ...props,
        locale: state.user.get('locale'),
    };
})(Translator);


text:
package amery.memoryleak;

import java.util.Collections;
import java.util.HashMap;
import java.util.Map;
import java.util.Random;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;

public class MapLeaker {
    public ExecutorService exec = Executors.newFixedThreadPool(5);
    public Map<Task, TaskStatus> taskStatus
            = Collections.synchronizedMap(new HashMap<Task, TaskStatus>());
    private Random random = new Random();

    private enum TaskStatus {NOT_STARTED, STARTED, FINISHED}

    private class Task implements Runnable {
        private int[] numbers = new int[random.nextInt(200)];

        public void run() {
            int[] temp = new int[random.nextInt(10000)];
            taskStatus.put(this, TaskStatus.STARTED);
            //doSomeWork();
            taskStatus.put(this, TaskStatus.FINISHED);
        }
    }

    public Task newTask() {
        Task t = new Task();
        taskStatus.put(t, TaskStatus.NOT_STARTED);
        exec.execute(t);
        return t;
    }
}


text:
ACCEPTED

#### According to
Index Fungorum

#### Published in
null

#### Original name
Oidium erumpens Cooke & Massee

### Remarks
null


text:
package org.pentaho.big.data.kettle.plugins.hbase.output;

import org.pentaho.bigdata.api.hbase.ByteConversionUtil;
import org.pentaho.bigdata.api.hbase.mapping.Mapping;
import org.pentaho.bigdata.api.hbase.meta.HBaseValueMetaInterface;
import org.pentaho.bigdata.api.hbase.table.HBasePut;
import org.pentaho.bigdata.api.hbase.table.HBaseTableWriteOperationManager;
import org.pentaho.di.core.Const;
import org.pentaho.di.core.exception.KettleException;
import org.pentaho.di.core.row.RowMetaInterface;
import org.pentaho.di.core.row.ValueMetaInterface;
import org.pentaho.di.i18n.BaseMessages;
import org.pentaho.di.trans.step.BaseStepData;
import org.pentaho.di.trans.step.StepDataInterface;

import java.net.MalformedURLException;
import java.net.URL;
import java.util.Map;

/**
 * Class providing an output step for writing data to an HBase table according to meta data column/type mapping info
 * stored in a separate HBase table called "pentaho_mappings". See org.pentaho.hbase.mapping.Mapping for details on the
 * meta data format.
 *
 * @author Mark Hall (mhall{[at]}pentaho{[dot]}com)
 */
public class HBaseOutputData extends BaseStepData implements StepDataInterface {

  /** The output data format */
  protected RowMetaInterface m_outputRowMeta;

  public RowMetaInterface getOutputRowMeta() {
    return m_outputRowMeta;
  }

  public void setOutputRowMeta( RowMetaInterface rmi ) {
    m_outputRowMeta = rmi;
  }

  /**
   * Sets up a new target table put operation using the connection shim
   *
   * @param inRowMeta
   *          the incoming kettle row meta data
   * @param keyIndex
   *          the index of the key in the incoming row structure
   * @param kettleRow
   *          the current incoming kettle row
   * @param tableMapping
   *          the HBase table mapping to use
   * @param bu
   *          the byte util shim to use for conversion to and from byte arrays
   * @param hbAdmin
   *          the connection shim
   * @param writeToWAL
   *          true if the write ahead log should be written to
   * @return false if the key is null (missing) for the current incoming kettle row
   * @throws Exception
   *           if a problem occurs when initializing the new put operation
   */
  public static HBasePut initializeNewPut( RowMetaInterface inRowMeta, int keyIndex, Object[] kettleRow,
                                           Mapping tableMapping, ByteConversionUtil bu,
                                           HBaseTableWriteOperationManager hBaseTableWriteOperationManager,
                                           boolean writeToWAL ) throws Exception {
    ValueMetaInterface keyvm = inRowMeta.getValueMeta( keyIndex );

    if ( keyvm.isNull( kettleRow[keyIndex] ) ) {
      return null;
    }

    byte[] encodedKey = bu.encodeKeyValue( kettleRow[keyIndex], keyvm, tableMapping.getKeyType() );

    HBasePut hBaseTablePut = hBaseTableWriteOperationManager
      .createPut( bu.encodeKeyValue( kettleRow[ keyIndex ], keyvm, tableMapping.getKeyType() ) );
    hBaseTablePut.setWriteToWAL( writeToWAL );
    return hBaseTablePut;
  }

  /**
   * Adds those incoming kettle field values that are defined in the table mapping for the current row to the target
   * table put operation
   *
   * @param inRowMeta
   *          the incoming kettle row meta data
   * @param kettleRow
   *          the current incoming kettle row
   * @param keyIndex
   *          the index of the key in the incoming row structure
   * @param columnsMappedByAlias
   *          the columns in the table mapping
   * @param hbAdmin
   *          the connection shim
   * @param bu
   *          the byte util shim to use for conversion to and from byte arrays
   * @throws KettleException
   *           if a problem occurs when adding a column to the put operation
   */
  public static void addColumnsToPut( RowMetaInterface inRowMeta, Object[] kettleRow, int keyIndex,
                                      Map<String, HBaseValueMetaInterface> columnsMappedByAlias, HBasePut hBasePut, ByteConversionUtil bu )
    throws KettleException {

    for ( int i = 0; i < inRowMeta.size(); i++ ) {
      ValueMetaInterface current = inRowMeta.getValueMeta( i );
      if ( i != keyIndex && !current.isNull( kettleRow[i] ) ) {
        HBaseValueMetaInterface hbaseColMeta = columnsMappedByAlias.get( current.getName() );
        String columnFamily = hbaseColMeta.getColumnFamily();
        String columnName = hbaseColMeta.getColumnName();

        boolean binaryColName = false;
        if ( columnName.startsWith( "@@@binary@@@" ) ) {
          // assume hex encoded column name
          columnName = columnName.replace( "@@@binary@@@", "" );
          binaryColName = true;
        }
        byte[] encoded = hbaseColMeta.encodeColumnValue( kettleRow[i], current );

        try {
          hBasePut.addColumn( columnFamily, columnName, binaryColName, encoded );
        } catch ( Exception ex ) {
          throw new KettleException( BaseMessages.getString( HBaseOutputMeta.PKG,
              "HBaseOutput.Error.UnableToAddColumnToTargetTablePut" ), ex );
        }
      }
    }
  }

  public static URL stringToURL( String pathOrURL ) throws MalformedURLException {
    URL result = null;

    if ( !Const.isEmpty( pathOrURL ) ) {
      if ( pathOrURL.toLowerCase().startsWith( "http://" ) || pathOrURL.toLowerCase().startsWith( "file://" ) ) {
        result = new URL( pathOrURL );
      } else {
        String c = "file://" + pathOrURL;
        result = new URL( c );
      }
    }

    return result;
  }
}


text:
#ifndef ACTION_DEBUG_DISABLE_H
#define ACTION_DEBUG_DISABLE_H

#include "EventHandler.h"

class ActionDebugDisable : public Action {
public:
	ActionDebugDisable() { /* Do Nothing*/ }
};

#endif


text:
package org.apereo.cas.support.x509.rest.config;

import org.apereo.cas.adaptors.x509.config.X509CertificateExtractorConfiguration;
import org.apereo.cas.audit.spi.config.CasCoreAuditConfiguration;
import org.apereo.cas.config.CasCoreAuthenticationConfiguration;
import org.apereo.cas.config.CasCoreAuthenticationPrincipalConfiguration;
import org.apereo.cas.config.CasCoreAuthenticationServiceSelectionStrategyConfiguration;
import org.apereo.cas.config.CasCoreAuthenticationSupportConfiguration;
import org.apereo.cas.config.CasCoreConfiguration;
import org.apereo.cas.config.CasCoreHttpConfiguration;
import org.apereo.cas.config.CasCoreMultifactorAuthenticationConfiguration;
import org.apereo.cas.config.CasCoreNotificationsConfiguration;
import org.apereo.cas.config.CasCoreServicesConfiguration;
import org.apereo.cas.config.CasCoreTicketCatalogConfiguration;
import org.apereo.cas.config.CasCoreTicketIdGeneratorsConfiguration;
import org.apereo.cas.config.CasCoreTicketsConfiguration;
import org.apereo.cas.config.CasCoreUtilConfiguration;
import org.apereo.cas.config.CasCoreWebConfiguration;
import org.apereo.cas.config.CasRestConfiguration;
import org.apereo.cas.config.CasThrottlingConfiguration;
import org.apereo.cas.config.support.CasWebApplicationServiceFactoryConfiguration;
import org.apereo.cas.logout.config.CasCoreLogoutConfiguration;
import org.apereo.cas.rest.config.CasCoreRestConfiguration;
import org.apereo.cas.rest.factory.RestHttpRequestCredentialFactory;
import org.apereo.cas.web.config.CasCookieConfiguration;
import org.apereo.cas.web.flow.config.CasCoreWebflowConfiguration;
import org.apereo.cas.web.flow.config.CasMultifactorAuthenticationWebflowConfiguration;
import org.apereo.cas.web.flow.config.CasWebflowContextConfiguration;

import org.junit.jupiter.api.Tag;
import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.boot.autoconfigure.web.servlet.WebMvcAutoConfiguration;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.cloud.autoconfigure.RefreshAutoConfiguration;

import static org.junit.jupiter.api.Assertions.*;

/**
 * This is {@link X509RestConfigurationTests}.
 *
 * @author Misagh Moayyed
 * @since 6.2.0
 */
@SpringBootTest(classes = {
    RefreshAutoConfiguration.class,
    WebMvcAutoConfiguration.class,
    X509CertificateExtractorConfiguration.class,
    X509RestConfiguration.class,
    CasCoreNotificationsConfiguration.class,
    CasCoreServicesConfiguration.class,
    CasCoreLogoutConfiguration.class,
    CasCoreUtilConfiguration.class,
    CasCoreHttpConfiguration.class,
    CasCoreWebConfiguration.class,
    CasCoreTicketsConfiguration.class,
    CasCoreTicketIdGeneratorsConfiguration.class,
    CasCoreTicketCatalogConfiguration.class,
    CasCoreAuthenticationPrincipalConfiguration.class,
    CasCoreAuthenticationSupportConfiguration.class,
    CasCoreAuthenticationConfiguration.class,
    CasCoreAuthenticationServiceSelectionStrategyConfiguration.class,
    CasWebApplicationServiceFactoryConfiguration.class,
    CasCoreConfiguration.class,
    CasThrottlingConfiguration.class,
    CasCoreAuditConfiguration.class,
    CasCoreMultifactorAuthenticationConfiguration.class,
    CasMultifactorAuthenticationWebflowConfiguration.class,
    CasWebflowContextConfiguration.class,
    CasCoreWebflowConfiguration.class,
    CasCookieConfiguration.class,
    CasCoreRestConfiguration.class,
    CasRestConfiguration.class
},
    properties = "cas.rest.x509.tls-client-auth=true")
@Tag("X509")
public class X509RestConfigurationTests {
    @Autowired
    @Qualifier("x509RestMultipartBody")
    private RestHttpRequestCredentialFactory x509RestMultipartBody;

    @Autowired
    @Qualifier("x509RestRequestHeader")
    private RestHttpRequestCredentialFactory x509RestRequestHeader;

    @Autowired
    @Qualifier("x509RestTlsClientCert")
    private RestHttpRequestCredentialFactory x509RestTlsClientCert;

    @Test
    public void verifyOperation() {
        assertNotNull(x509RestMultipartBody);
        assertNotNull(x509RestRequestHeader);
        assertNotNull(x509RestTlsClientCert);
    }
}


text:
export default {
  MUTATION_TYPE: 'MUTATION_TYPE'
};


text:
using System;
using System.IO;
using System.Runtime.Serialization.Formatters.Binary;
using System.Text;
using Autofac.Extras.Common.Serialization;

namespace Autofac.Extras.Common.Types
{
    public sealed class ByteUtil
    {
        private static BinaryFormatter binaryFormatter = new BinaryFormatter();

        /// <summary>
        ///
        /// </summary>
        /// <param name="bytes"></param>
        /// <param name="encodingName">Encoding.UTF8 之类</param>
        /// <returns></returns>
        public static string ToString(byte[] bytes, String encodingName = "ASCII")
        {
            Encoding encoding = (Encoding)Enum.Parse(typeof(Encoding), encodingName);

            return encoding.GetString(bytes);
        }

        // [ref](https://stackoverflow.com/a/10502856)
        public static byte[] toBytes(Object obj)
        {
            using (var memoryStream = new MemoryStream())
            {
                binaryFormatter.Serialize(memoryStream, obj);
                return memoryStream.ToArray();
            }
        }
    }
}


text:
namespace FlatBuffers
{
    /// <summary>
    /// All structs in the generated code derive from this class, and add their own accessors.
    /// </summary>
    internal struct Struct
    {
        public int bb_pos;
        public ByteBuffer bb;
    }
}


text:
package me.antonle.telegrambot.itbot.service;

import org.junit.Before;
import org.junit.Test;

import static org.junit.Assert.assertEquals;

public class MessageHandlerServiceTest {

    private MessageHandlerService messageHandlerService;

    @Before
    public void setUp() throws Exception {
        messageHandlerService = new MessageHandlerService();
    }

    @Test
    public void testGenerateReply_ПашиСука() throws Exception {
        String text = "Парни, комп не пашет";
        assertEquals("ПАШИ СУКА", messageHandlerService.generateReply(text));

        text = "Я ГОВОРЮ КОМП НЕ ПАШЕТ";
        assertEquals("ПАШИ СУКА", messageHandlerService.generateReply(text));

        text = "ВЫ ДЕБИЛЫ ЧТОЛИ???";
        assertEquals("Посоны, мы пока в КС играем, сорян!", messageHandlerService.generateReply(text));

    }
}


text:
package dom

// Code generated by chromedp-gen. DO NOT EDIT.

import (
	cdp "github.com/knq/chromedp/cdp"
)

// EventDocumentUpdated fired when Document has been totally updated. Node
// ids are no longer valid.
type EventDocumentUpdated struct{}

// EventSetChildNodes fired when backend wants to provide client with the
// missing DOM structure. This happens upon most of the calls requesting node
// ids.
type EventSetChildNodes struct {
	ParentID cdp.NodeID  `json:"parentId"` // Parent node id to populate with children.
	Nodes    []*cdp.Node `json:"nodes"`    // Child nodes array.
}

// EventAttributeModified fired when Element's attribute is modified.
type EventAttributeModified struct {
	NodeID cdp.NodeID `json:"nodeId"` // Id of the node that has changed.
	Name   string     `json:"name"`   // Attribute name.
	Value  string     `json:"value"`  // Attribute value.
}

// EventAttributeRemoved fired when Element's attribute is removed.
type EventAttributeRemoved struct {
	NodeID cdp.NodeID `json:"nodeId"` // Id of the node that has changed.
	Name   string     `json:"name"`   // A ttribute name.
}

// EventInlineStyleInvalidated fired when Element's inline style is modified
// via a CSS property modification.
type EventInlineStyleInvalidated struct {
	NodeIds []cdp.NodeID `json:"nodeIds"` // Ids of the nodes for which the inline styles have been invalidated.
}

// EventCharacterDataModified mirrors DOMCharacterDataModified event.
type EventCharacterDataModified struct {
	NodeID        cdp.NodeID `json:"nodeId"`        // Id of the node that has changed.
	CharacterData string     `json:"characterData"` // New text value.
}

// EventChildNodeCountUpdated fired when Container's child node count has
// changed.
type EventChildNodeCountUpdated struct {
	NodeID         cdp.NodeID `json:"nodeId"`         // Id of the node that has changed.
	ChildNodeCount int64      `json:"childNodeCount"` // New node count.
}

// EventChildNodeInserted mirrors DOMNodeInserted event.
type EventChildNodeInserted struct {
	ParentNodeID   cdp.NodeID `json:"parentNodeId"`   // Id of the node that has changed.
	PreviousNodeID cdp.NodeID `json:"previousNodeId"` // If of the previous siblint.
	Node           *cdp.Node  `json:"node"`           // Inserted node data.
}

// EventChildNodeRemoved mirrors DOMNodeRemoved event.
type EventChildNodeRemoved struct {
	ParentNodeID cdp.NodeID `json:"parentNodeId"` // Parent id.
	NodeID       cdp.NodeID `json:"nodeId"`       // Id of the node that has been removed.
}

// EventShadowRootPushed called when shadow root is pushed into the element.
type EventShadowRootPushed struct {
	HostID cdp.NodeID `json:"hostId"` // Host element id.
	Root   *cdp.Node  `json:"root"`   // Shadow root.
}

// EventShadowRootPopped called when shadow root is popped from the element.
type EventShadowRootPopped struct {
	HostID cdp.NodeID `json:"hostId"` // Host element id.
	RootID cdp.NodeID `json:"rootId"` // Shadow root id.
}

// EventPseudoElementAdded called when a pseudo element is added to an
// element.
type EventPseudoElementAdded struct {
	ParentID      cdp.NodeID `json:"parentId"`      // Pseudo element's parent element id.
	PseudoElement *cdp.Node  `json:"pseudoElement"` // The added pseudo element.
}

// EventPseudoElementRemoved called when a pseudo element is removed from an
// element.
type EventPseudoElementRemoved struct {
	ParentID        cdp.NodeID `json:"parentId"`        // Pseudo element's parent element id.
	PseudoElementID cdp.NodeID `json:"pseudoElementId"` // The removed pseudo element id.
}

// EventDistributedNodesUpdated called when distribution is changed.
type EventDistributedNodesUpdated struct {
	InsertionPointID cdp.NodeID         `json:"insertionPointId"` // Insertion point where distributed nodes were updated.
	DistributedNodes []*cdp.BackendNode `json:"distributedNodes"` // Distributed nodes for given insertion point.
}

// EventTypes all event types in the domain.
var EventTypes = []cdp.MethodType{
	cdp.EventDOMDocumentUpdated,
	cdp.EventDOMSetChildNodes,
	cdp.EventDOMAttributeModified,
	cdp.EventDOMAttributeRemoved,
	cdp.EventDOMInlineStyleInvalidated,
	cdp.EventDOMCharacterDataModified,
	cdp.EventDOMChildNodeCountUpdated,
	cdp.EventDOMChildNodeInserted,
	cdp.EventDOMChildNodeRemoved,
	cdp.EventDOMShadowRootPushed,
	cdp.EventDOMShadowRootPopped,
	cdp.EventDOMPseudoElementAdded,
	cdp.EventDOMPseudoElementRemoved,
	cdp.EventDOMDistributedNodesUpdated,
}


text:
//
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.0-b52-fcs
// See http://java.sun.com/xml/jaxb
// Any modifications to this file will be lost upon recompilation of the source schema.
// Generated on: 2013.12.20 at 12:48:21 PM GMT
//

package weka.core.pmml.jaxbbindings;

import java.util.ArrayList;
import java.util.List;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlType;

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

 * <element name="KohonenMap">
 *   <complexType>
 *     <complexContent>
 *       <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
 *         <sequence>
 *           <element ref="{http://www.dmg.org/PMML-4_1}Extension" maxOccurs="unbounded" minOccurs="0"/>
 *         </sequence>
 *         <attribute name="coord1" type="{http://www.w3.org/2001/XMLSchema}float" />
 *         <attribute name="coord2" type="{http://www.w3.org/2001/XMLSchema}float" />
 *         <attribute name="coord3" type="{http://www.w3.org/2001/XMLSchema}float" />
 *       </restriction>
 *     </complexContent>
 *   </complexType>
 * </element>
 *

 *
 *
 */
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "", propOrder = {
    "extension"
})
@XmlRootElement(name = "KohonenMap")
public class KohonenMap {

    @XmlElement(name = "Extension", namespace = "http://www.dmg.org/PMML-4_1", required = true)
    protected List<Extension> extension;
    @XmlAttribute
    protected Float coord1;
    @XmlAttribute
    protected Float coord2;
    @XmlAttribute
    protected Float coord3;

    /**
     * Gets the value of the extension property.
     *
     *

     * This accessor method returns a reference to the live list,
     * not a snapshot. Therefore any modification you make to the
     * returned list will be present inside the JAXB object.
     * This is why there is not a set method for the extension property.
     *
     *

     * For example, to add a new item, do as follows:
     *

     *    getExtension().add(newItem);
     *

     *
     *
     *

     * Objects of the following type(s) are allowed in the list
     * {@link Extension }
     *
     *
     */
    public List<Extension> getExtension() {
        if (extension == null) {
            extension = new ArrayList<Extension>();
        }
        return this.extension;
    }

    /**
     * Gets the value of the coord1 property.
     *
     * @return
     *     possible object is
     *     {@link Float }
     *
     */
    public Float getCoord1() {
        return coord1;
    }

    /**
     * Sets the value of the coord1 property.
     *
     * @param value
     *     allowed object is
     *     {@link Float }
     *
     */
    public void setCoord1(Float value) {
        this.coord1 = value;
    }

    /**
     * Gets the value of the coord2 property.
     *
     * @return
     *     possible object is
     *     {@link Float }
     *
     */
    public Float getCoord2() {
        return coord2;
    }

    /**
     * Sets the value of the coord2 property.
     *
     * @param value
     *     allowed object is
     *     {@link Float }
     *
     */
    public void setCoord2(Float value) {
        this.coord2 = value;
    }

    /**
     * Gets the value of the coord3 property.
     *
     * @return
     *     possible object is
     *     {@link Float }
     *
     */
    public Float getCoord3() {
        return coord3;
    }

    /**
     * Sets the value of the coord3 property.
     *
     * @param value
     *     allowed object is
     *     {@link Float }
     *
     */
    public void setCoord3(Float value) {
        this.coord3 = value;
    }

}


text:
// Write a program that reads two arrays from the console and compares them element by element.
// When you finish typing numbers, you should choose enter for the second time.
using System;
using System.Collections.Generic;

class CompareTwoArrays
{
    static void Main()
    {
        List<int> array1 = new List<int>();
        List<int> array2 = new List<int>();
        string n;
        Console.WriteLine("Enter first array's elements (only whole numbers).\nWhen you finish typing numbers, you should choose enter for the second time.");
        while (!string.IsNullOrEmpty(n = Console.ReadLine()))
        {
            array1.Add(int.Parse(n));
        }

        Console.WriteLine(new string('-', 80));
        Console.WriteLine("Enter second array's elements (only whole numbers).\nWhen you finish typing numbers, you should choose enter for the second time.");
        while (!string.IsNullOrEmpty(n = Console.ReadLine()))
        {
            array2.Add(int.Parse(n));
        }

        bool isEqual = true;

        if (array1.Count != array2.Count)
        {
            isEqual = false;
        }
        else
        {
            for (int i = 0; i < array1.Count; i++)
            {
                if (!array1[i].Equals(array2[i]))
                {
                    isEqual = false;
                    break;
                }
            }
        }

        Console.WriteLine(new string('-', 80));
        string not = isEqual ? string.Empty : "NOT ";
        Console.WriteLine("Two arrays are {0}equal", not);
        Console.WriteLine(new string('-', 80));
    }
}


text:
<?php
declare(strict_types=1);

namespace Tests\Plugin\Prophecy\Token;

use Moka\Plugin\Prophecy\Token\MaxPriorityToken;

class MaxPriorityTokenTest extends PriorityTokenTestCase
{
    public function __construct($name = null, array $data = [], $dataName = '')
    {
        parent::__construct($name, $data, $dataName);

        $this->setToken(new MaxPriorityToken());
    }

    public function testScoreArgumentOrder()
    {
        $token = new MaxPriorityToken();

        $this->assertLessThan($this->token->scoreArgument(null), $token->scoreArgument(null));
    }
}


text:
SYNONYM

#### According to
The Catalogue of Life, 3rd January 2011

#### Published in
Pubbl. Cent. Sper. Agric. (1809)

#### Original name
Agaricus pergamenus Sw., 1809

### Remarks
null


text:
<mods xmlns="http://www.loc.gov/mods/v3" xmlns:exslt="http://exslt.org/common" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xlink="http://www.w3.org/1999/xlink" xsi:schemaLocation="http://www.loc.gov/mods/v3 http://www.loc.gov/standards/mods/v3/mods-3-3.xsd" version="3.3" ID="P0b002ee18d612397">
<name type="corporate">
 <namePart>United States Government Publishing Office</namePart>
 <role>
  <roleTerm type="text" authority="marcrelator">publisher</roleTerm>
  <roleTerm type="code" authority="marcrelator">pbl</roleTerm>
</role>
 <role>
  <roleTerm type="text" authority="marcrelator">distributor</roleTerm>
  <roleTerm type="code" authority="marcrelator">dst</roleTerm>
</role>
</name>
<name type="corporate">
 <namePart>United States</namePart>
 <namePart>United States District Court Eastern District of California</namePart>
 <role>
  <roleTerm type="text" authority="marcrelator">author</roleTerm>
  <roleTerm type="code" authority="marcrelator">aut</roleTerm>
</role>
 <description>Government Organization</description>
</name>
<typeOfResource>text</typeOfResource>
<genre authority="marcgt">government publication</genre>
<language>
 <languageTerm authority="iso639-2b" type="code">eng</languageTerm>
</language>
<extension>
 <collectionCode>USCOURTS</collectionCode>
 <category>Judicial Publications</category>
 <branch>judicial</branch>
 <dateIngested>2015-08-26</dateIngested>
</extension>
<originInfo>
 <publisher>Administrative Office of the United States Courts</publisher>
 <dateIssued encoding="w3cdtf">2015-08-25</dateIssued>
 <issuance>monographic</issuance>
</originInfo>
<physicalDescription>
 <note type="source content type">deposited</note>
 <digitalOrigin>born digital</digitalOrigin>
</physicalDescription>
<classification authority="sudocs">JU 4.15</classification>
<identifier type="uri">http://www.gpo.gov/fdsys/pkg/USCOURTS-caed-2_14-cv-02601</identifier>
<identifier type="local">P0b002ee18d612397</identifier>
<recordInfo>
 <recordContentSource authority="marcorg">DGPO</recordContentSource>
 <recordCreationDate encoding="w3cdtf">2015-08-26</recordCreationDate>
 <recordChangeDate encoding="w3cdtf">2015-08-26</recordChangeDate>
 <recordIdentifier source="DGPO">USCOURTS-caed-2_14-cv-02601</recordIdentifier>
 <recordOrigin>machine generated</recordOrigin>
 <languageOfCataloging>
  <languageTerm authority="iso639-2b" type="code">eng</languageTerm>
</languageOfCataloging>
</recordInfo>
<accessCondition type="GPO scope determination">fdlp</accessCondition>
<extension>
 <docClass>USCOURTS</docClass>
 <accessId>USCOURTS-caed-2_14-cv-02601</accessId>
 <courtType>District</courtType>
 <courtCode>caed</courtCode>
 <courtCircuit>9th</courtCircuit>
 <courtState>California</courtState>
 <courtSortOrder>2061</courtSortOrder>
 <caseNumber>2:14-cv-02601</caseNumber>
 <caseOffice>Sacramento</caseOffice>
 <caseType>civil</caseType>
 <natureSuitCode>540</natureSuitCode>
 <natureSuit>Prisoner Petitions - Mandamus and Other</natureSuit>
 <cause>28:1651 Petition for Writ of Habeas Corpus</cause>
 <party firstName="Calvin" fullName="Calvin S. Lynn" lastName="Lynn" middleName="S." role="Petitioner"></party>
 <party fullName="Sacramento Superior Court" lastName="Sacramento Superior Court" role="Respondent"></party>
</extension>
<titleInfo>
 <title>(HC) Lynn v. Sacramento Superior Court</title>
 <partNumber>2:14-cv-02601</partNumber>
</titleInfo>
<location>
 <url access="object in context" displayLabel="Content Detail">http://www.gpo.gov/fdsys/pkg/USCOURTS-caed-2_14-cv-02601/content-detail.html</url>
</location>
<classification authority="sudocs">JU 4.15</classification>
<identifier type="preferred citation">2:14-cv-02601;14-2601</identifier>
<name type="corporate">
 <namePart>United States District Court Eastern District of California</namePart>
 <namePart>9th Circuit</namePart>
 <namePart>Sacramento</namePart>
 <affiliation>U.S. Courts</affiliation>
 <role>
  <roleTerm authority="marcrelator" type="text">author</roleTerm>
  <roleTerm authority="marcrelator" type="code">aut</roleTerm>
</role>
</name>
<name type="personal">
 <displayForm>Calvin S. Lynn</displayForm>
 <namePart type="family">Lynn</namePart>
 <namePart type="given">Calvin</namePart>
 <namePart type="termsOfAddress"></namePart>
 <description>Petitioner</description>
</name>
<name type="personal">
 <displayForm>Sacramento Superior Court</displayForm>
 <namePart type="family">Sacramento Superior Court</namePart>
 <namePart type="given"></namePart>
 <namePart type="termsOfAddress"></namePart>
 <description>Respondent</description>
</name>
<extension>
 <docClass>USCOURTS</docClass>
 <accessId>USCOURTS-caed-2_14-cv-02601</accessId>
 <courtType>District</courtType>
 <courtCode>caed</courtCode>
 <courtCircuit>9th</courtCircuit>
 <courtState>California</courtState>
 <courtSortOrder>2061</courtSortOrder>
 <caseNumber>2:14-cv-02601</caseNumber>
 <caseOffice>Sacramento</caseOffice>
 <caseType>civil</caseType>
 <natureSuitCode>540</natureSuitCode>
 <natureSuit>Prisoner Petitions - Mandamus and Other</natureSuit>
 <cause>28:1651 Petition for Writ of Habeas Corpus</cause>
 <party firstName="Calvin" fullName="Calvin S. Lynn" lastName="Lynn" middleName="S." role="Petitioner"></party>
 <party fullName="Sacramento Superior Court" lastName="Sacramento Superior Court" role="Respondent"></party>
 <state>California</state>
</extension>
<relatedItem type="constituent" ID="id-USCOURTS-caed-2_14-cv-02601-0" xlink:href="http://www.gpo.gov/fdsys/granule/USCOURTS-caed-2_14-cv-02601/USCOURTS-caed-2_14-cv-02601-0/mods.xml">
 <titleInfo>
  <title>(HC) Lynn v. Sacramento Superior Court</title>
  <subTitle>ORDER signed by Magistrate Judge Kendall J. Newman on 11/13/14 ordering petitioner shall submit within 30 days from the date of this order, an affidavit in support of his request to proceed in forma pauperis or the appropriate filing fee. The clerk of the court shall send petitioner a copy of the in forma pauperis form used by this district. (Plummer, M)</subTitle>
  <partNumber>0</partNumber>
</titleInfo>
 <originInfo>
  <dateIssued>2014-11-13</dateIssued>
</originInfo>
 <relatedItem type="otherFormat" xlink:href="http://www.gpo.gov/fdsys/pkg/USCOURTS-caed-2_14-cv-02601/pdf/USCOURTS-caed-2_14-cv-02601-0.pdf">
  <identifier type="FDsys Unique ID">D09002ee18d62efaf</identifier>
</relatedItem>
 <identifier type="uri">http://www.gpo.gov/fdsys/granule/USCOURTS-caed-2_14-cv-02601/USCOURTS-caed-2_14-cv-02601-0</identifier>
 <identifier type="former granule identifier">caed-2_14-cv-02601_0.pdf</identifier>
 <location>
  <url access="object in context" displayLabel="Content Detail">http://www.gpo.gov/fdsys/granule/USCOURTS-caed-2_14-cv-02601/USCOURTS-caed-2_14-cv-02601-0/content-detail.html</url>
  <url access="raw object" displayLabel="PDF rendition">http://www.gpo.gov/fdsys/pkg/USCOURTS-caed-2_14-cv-02601/pdf/USCOURTS-caed-2_14-cv-02601-0.pdf</url>
</location>
 <extension>
  <searchTitle>USCOURTS 2:14-cv-02601; (HC) Lynn v. Sacramento Superior Court; </searchTitle>
  <courtName>United States District Court Eastern District of California</courtName>
  <state>California</state>
  <accessId>USCOURTS-caed-2_14-cv-02601-0</accessId>
  <sequenceNumber>0</sequenceNumber>
  <dateIssued>2014-11-13</dateIssued>
  <docketText>ORDER signed by Magistrate Judge Kendall J. Newman on 11/13/14 ordering petitioner shall submit within 30 days from the date of this order, an affidavit in support of his request to proceed in forma pauperis or the appropriate filing fee. The clerk of the court shall send petitioner a copy of the in forma pauperis form used by this district. (Plummer, M)</docketText>
</extension>
</relatedItem>
<relatedItem type="constituent" ID="id-USCOURTS-caed-2_14-cv-02601-1" xlink:href="http://www.gpo.gov/fdsys/granule/USCOURTS-caed-2_14-cv-02601/USCOURTS-caed-2_14-cv-02601-1/mods.xml">
 <titleInfo>
  <title>(HC) Lynn v. Sacramento Superior Court</title>
  <subTitle>ORDER, FINDINGS and RECOMMENDATIONS signed by Magistrate Judge Kendall J. Newman on 1/6/15 RECOMMENDING that this action be dismissed without prejudice. Referred to Judge William B. Shubb; Objections to F&R due within 14 days. (Dillon, M)</subTitle>
  <partNumber>1</partNumber>
</titleInfo>
 <originInfo>
  <dateIssued>2015-01-06</dateIssued>
</originInfo>
 <relatedItem type="otherFormat" xlink:href="http://www.gpo.gov/fdsys/pkg/USCOURTS-caed-2_14-cv-02601/pdf/USCOURTS-caed-2_14-cv-02601-1.pdf">
  <identifier type="FDsys Unique ID">D09002ee18d62efb1</identifier>
</relatedItem>
 <identifier type="uri">http://www.gpo.gov/fdsys/granule/USCOURTS-caed-2_14-cv-02601/USCOURTS-caed-2_14-cv-02601-1</identifier>
 <identifier type="former granule identifier">caed-2_14-cv-02601_1.pdf</identifier>
 <location>
  <url access="object in context" displayLabel="Content Detail">http://www.gpo.gov/fdsys/granule/USCOURTS-caed-2_14-cv-02601/USCOURTS-caed-2_14-cv-02601-1/content-detail.html</url>
  <url access="raw object" displayLabel="PDF rendition">http://www.gpo.gov/fdsys/pkg/USCOURTS-caed-2_14-cv-02601/pdf/USCOURTS-caed-2_14-cv-02601-1.pdf</url>
</location>
 <extension>
  <searchTitle>USCOURTS 2:14-cv-02601; (HC) Lynn v. Sacramento Superior Court; </searchTitle>
  <courtName>United States District Court Eastern District of California</courtName>
  <state>California</state>
  <accessId>USCOURTS-caed-2_14-cv-02601-1</accessId>
  <sequenceNumber>1</sequenceNumber>
  <dateIssued>2015-01-06</dateIssued>
  <docketText>ORDER, FINDINGS and RECOMMENDATIONS signed by Magistrate Judge Kendall J. Newman on 1/6/15 RECOMMENDING that this action be dismissed without prejudice. Referred to Judge William B. Shubb; Objections to F&R due within 14 days. (Dillon, M)</docketText>
</extension>
</relatedItem>
<relatedItem type="constituent" ID="id-USCOURTS-caed-2_14-cv-02601-2" xlink:href="http://www.gpo.gov/fdsys/granule/USCOURTS-caed-2_14-cv-02601/USCOURTS-caed-2_14-cv-02601-2/mods.xml">
 <titleInfo>
  <title>(HC) Lynn v. Sacramento Superior Court</title>
  <subTitle>FINDINGS and RECOMMENDATIONS signed by Magistrate Judge Kendall J. Newman on 7/21/15 recommending that 1 Petition for Writ of Habeas Corpus filed by Calvin S. Lynn. Referred to Judge William B. Shubb; Objections to F&R due within 14 days. (Dillon, M)</subTitle>
  <partNumber>2</partNumber>
</titleInfo>
 <originInfo>
  <dateIssued>2015-07-22</dateIssued>
</originInfo>
 <relatedItem type="otherFormat" xlink:href="http://www.gpo.gov/fdsys/pkg/USCOURTS-caed-2_14-cv-02601/pdf/USCOURTS-caed-2_14-cv-02601-2.pdf">
  <identifier type="FDsys Unique ID">D09002ee18d62f08d</identifier>
</relatedItem>
 <identifier type="uri">http://www.gpo.gov/fdsys/granule/USCOURTS-caed-2_14-cv-02601/USCOURTS-caed-2_14-cv-02601-2</identifier>
 <identifier type="former granule identifier">caed-2_14-cv-02601_2.pdf</identifier>
 <location>
  <url access="object in context" displayLabel="Content Detail">http://www.gpo.gov/fdsys/granule/USCOURTS-caed-2_14-cv-02601/USCOURTS-caed-2_14-cv-02601-2/content-detail.html</url>
  <url access="raw object" displayLabel="PDF rendition">http://www.gpo.gov/fdsys/pkg/USCOURTS-caed-2_14-cv-02601/pdf/USCOURTS-caed-2_14-cv-02601-2.pdf</url>
</location>
 <extension>
  <searchTitle>USCOURTS 2:14-cv-02601; (HC) Lynn v. Sacramento Superior Court; </searchTitle>
  <courtName>United States District Court Eastern District of California</courtName>
  <state>California</state>
  <accessId>USCOURTS-caed-2_14-cv-02601-2</accessId>
  <sequenceNumber>2</sequenceNumber>
  <dateIssued>2015-07-22</dateIssued>
  <docketText>FINDINGS and RECOMMENDATIONS signed by Magistrate Judge Kendall J. Newman on 7/21/15 recommending that 1 Petition for Writ of Habeas Corpus filed by Calvin S. Lynn. Referred to Judge William B. Shubb; Objections to F&R due within 14 days. (Dillon, M)</docketText>
</extension>
</relatedItem>
<relatedItem type="constituent" ID="id-USCOURTS-caed-2_14-cv-02601-3" xlink:href="http://www.gpo.gov/fdsys/granule/USCOURTS-caed-2_14-cv-02601/USCOURTS-caed-2_14-cv-02601-3/mods.xml">
 <titleInfo>
  <title>(HC) Lynn v. Sacramento Superior Court</title>
  <subTitle>ORDER ADOPTING 9 FINDINGS AND RECOMMENDATIONS in full signed by Senior Judge William B. Shubb on 08/25/15 and ORDERING that the petitioner's 8 Motion to Reopen this Case, construed as a Motion for Relief from Judgment, is DENIED. (Benson, A)</subTitle>
  <partNumber>3</partNumber>
</titleInfo>
 <originInfo>
  <dateIssued>2015-08-25</dateIssued>
</originInfo>
 <relatedItem type="otherFormat" xlink:href="http://www.gpo.gov/fdsys/pkg/USCOURTS-caed-2_14-cv-02601/pdf/USCOURTS-caed-2_14-cv-02601-3.pdf">
  <identifier type="FDsys Unique ID">D09002ee18d62efb0</identifier>
</relatedItem>
 <identifier type="uri">http://www.gpo.gov/fdsys/granule/USCOURTS-caed-2_14-cv-02601/USCOURTS-caed-2_14-cv-02601-3</identifier>
 <identifier type="former granule identifier">caed-2_14-cv-02601_3.pdf</identifier>
 <location>
  <url access="object in context" displayLabel="Content Detail">http://www.gpo.gov/fdsys/granule/USCOURTS-caed-2_14-cv-02601/USCOURTS-caed-2_14-cv-02601-3/content-detail.html</url>
  <url access="raw object" displayLabel="PDF rendition">http://www.gpo.gov/fdsys/pkg/USCOURTS-caed-2_14-cv-02601/pdf/USCOURTS-caed-2_14-cv-02601-3.pdf</url>
</location>
 <extension>
  <searchTitle>USCOURTS 2:14-cv-02601; (HC) Lynn v. Sacramento Superior Court; </searchTitle>
  <courtName>United States District Court Eastern District of California</courtName>
  <state>California</state>
  <accessId>USCOURTS-caed-2_14-cv-02601-3</accessId>
  <sequenceNumber>3</sequenceNumber>
  <dateIssued>2015-08-25</dateIssued>
  <docketText>ORDER ADOPTING 9 FINDINGS AND RECOMMENDATIONS in full signed by Senior Judge William B. Shubb on 08/25/15 and ORDERING that the petitioner's 8 Motion to Reopen this Case, construed as a Motion for Relief from Judgment, is DENIED. (Benson, A)</docketText>
</extension>
</relatedItem>
</mods>


text:
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Net;
using System.Net.Http;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using Newtonsoft.Json.Linq;
using VRIS.API.ViewModels;
using VRIS.Business.Stores.Token;
using VRIS.Domain.ConfigurationModels;

namespace VRIS.API.Controllers
{
    ///
    /// Controller responsible for authorizing the Graph api
    ///
    [Route("api/[controller]"), Produces("application/json")]
    public class AuthorizationController : Controller
    {
        private readonly IHttpContextAccessor _httpContextAccessor;
        private readonly MicrosoftGraphOptions _graphOptions;
        private readonly ITokenStore _tokenStore;

        private string AuthorizeCallback =>
            $"https://{_httpContextAccessor.HttpContext.Request.Host}/api/authorization/token";
        private string LoginUrl =>
            $"{_graphOptions.AuthContextUrl}/authorize" +
            $"?client_id={_graphOptions.ClientId}" +
            $"&response_type=code" +
            $"&redirect_uri={AuthorizeCallback}" +
            $"&response_mode=query" +
            $"&scope=user.readbasic.all calendars.readwrite.shared";

        /// <inheritdoc cref="AuthorizationController"/>
        public AuthorizationController(IHttpContextAccessor httpContextAccessor, MicrosoftGraphOptions graphOptions, ITokenStore tokenStore)
        {
            _httpContextAccessor = httpContextAccessor;
            _graphOptions = graphOptions;
            _tokenStore = tokenStore;
        }

        ///
        /// Get the loginUrl to the azure portal
        ///
        /// <returns>The url to get a token response from Azure from</returns>
        /// <response code="200">The url to get a token response from Azure from</response>
        [HttpGet("loginurl"), Produces("text/html"),
         ProducesResponseType(typeof(string), (int)HttpStatusCode.OK)]
        public IActionResult GetLoginUrl() => new ContentResult
        {
            Content = $"{LoginUrl}",
            ContentType = "text/html"
        };

        ///
        /// Request a token based on a authorization code
        ///
        /// <param name="authorizationCode">Code generated by the /code call</param>
        /// <returns>Authorization token</returns>
        /// <response code="200">Authorization token</response>
        /// <response code="405">The parameter {authorizationCode} cannot be empty!</response>
        /// <response code="417">The graph api returned an empty response</response>
        [HttpPost("token"),
         ProducesResponseType(typeof(string), (int)HttpStatusCode.OK),
         ProducesResponseType(typeof(string), (int)HttpStatusCode.MethodNotAllowed),
         ProducesResponseType(typeof(string), (int)HttpStatusCode.ExpectationFailed)]
        public async Task<IActionResult> Token([Required, FromQuery] string authorizationCode)
        {
            if (string.IsNullOrWhiteSpace(authorizationCode)) return new ContentResult
            {
                Content = $"The parameter {nameof(authorizationCode)} cannot be empty!",
                StatusCode = (int) HttpStatusCode.MethodNotAllowed
            };

            return await AuthorizeGraphToken(authorizationCode);
        }

        private async Task<IActionResult> AuthorizeGraphToken(string authorizationCode)
        {
            using (var client = new HttpClient())
            {
                var url = $"{_graphOptions.AuthContextUrl}/authorize";
                var payload = new Dictionary<string, string>
                {
                    {"client_id", _graphOptions.ClientId},
                    {"client_secret", _graphOptions.ClientSecret},
                    {"grant_type", "authorization_code"},
                    {"code", authorizationCode},
                    {"redirect_uri", AuthorizeCallback}
                };
                var response = await client.PostAsync(url, new FormUrlEncodedContent(payload));
                response.EnsureSuccessStatusCode();

                var responseMessage = await response.Content.ReadAsStringAsync();
                if (String.IsNullOrWhiteSpace(responseMessage))
                    return new ContentResult
                    {
                        Content = "The graph api returned an empty response",
                        StatusCode = (int) HttpStatusCode.ExpectationFailed
                    };
                var responseObject = JObject.Parse(responseMessage);

                var returnString = responseObject?["access_token"] != null
                    ? responseObject["access_token"].Value<string>()
                    : "Unable to parse response";

                _tokenStore.StoredToken = returnString;
                return new ContentResult {Content = $"Stored token: {returnString} using authorizationCode: {authorizationCode}"};
            }
        }
    }
}


text:
package main

import (
	"fmt"
	"time"

	cloudmonitoring "google.golang.org/api/monitoring/v3"

	"v.io/jiri/tool"
	"v.io/v23/context"
	"v.io/x/devtools/internal/monitoring"
	"v.io/x/devtools/internal/test"
	"v.io/x/lib/gcm"
)

const (
	buildTimeStatSuffix = "__debug/stats/system/metadata/build.Time"
)

type metadataData struct {
	location  *monitoring.ServiceLocation
	buildTime time.Time
}

// checkServiceMetadata checks all service metadata and adds the results to GCM.
func checkServiceMetadata(v23ctx *context.T, ctx *tool.Context, s *cloudmonitoring.Service) error {
	serviceNames := []string{
		monitoring.SNMounttable,
		monitoring.SNIdentity,
		monitoring.SNRole,
		monitoring.SNProxy,
		monitoring.SNBenchmark,
		monitoring.SNAllocator,
	}

	hasError := false
	mdMetadata, err := gcm.GetMetric("service-metadata", projectFlag)
	if err != nil {
		return err
	}
	now := time.Now()
	strNow := now.UTC().Format(time.RFC3339)
	for _, serviceName := range serviceNames {
		ms, err := checkSingleServiceMetadata(v23ctx, ctx, serviceName)
		if err != nil {
			test.Fail(ctx, "%s\n", serviceName)
			fmt.Fprintf(ctx.Stderr(), "%v\n", err)
			hasError = true
			continue
		}
		aggBuildTime := newAggregator()
		aggBuildAge := newAggregator()
		for _, m := range ms {
			buildTimeUnix := m.buildTime.Unix()
			buildAgeInHours := now.Sub(m.buildTime).Hours()

			instance := m.location.Instance
			zone := m.location.Zone
			aggBuildTime.add(float64(buildTimeUnix))
			aggBuildAge.add(buildAgeInHours)

			// Send data to GCM
			if err := sendDataToGCM(s, mdMetadata, float64(buildTimeUnix), strNow, instance, zone, serviceName, "build time"); err != nil {
				return err
			}
			if err := sendDataToGCM(s, mdMetadata, buildAgeInHours, strNow, instance, zone, serviceName, "build age"); err != nil {
				return err
			}

			label := fmt.Sprintf("%s (%s, %s)", serviceName, instance, zone)
			test.Pass(ctx, "%s: build time: %d, build age: %v\n", label, buildTimeUnix, buildAgeInHours)
		}

		// Send aggregated data to GCM.
		mdMetadataAgg, err := gcm.GetMetric("service-metadata-agg", projectFlag)
		if err != nil {
			return err
		}
		if err := sendAggregatedDataToGCM(ctx, s, mdMetadataAgg, aggBuildTime, strNow, serviceName, "build time"); err != nil {
			return err
		}
		if err := sendAggregatedDataToGCM(ctx, s, mdMetadataAgg, aggBuildAge, strNow, serviceName, "build age"); err != nil {
			return err
		}
	}
	if hasError {
		return fmt.Errorf("failed to check metadata for some services.")
	}

	return nil
}

func checkSingleServiceMetadata(v23ctx *context.T, ctx *tool.Context, serviceName string) ([]metadataData, error) {
	mountedName, err := monitoring.GetServiceMountedName(namespaceRootFlag, serviceName)
	if err != nil {
		return nil, err
	}

	// Resolve name and group results by routing ids.
	groups, err := monitoring.ResolveAndProcessServiceName(v23ctx, ctx, serviceName, mountedName)
	if err != nil {
		return nil, err
	}

	// Get metadata for each group.
	metadata := []metadataData{}
	errors := []error{}
	for _, group := range groups {
		// Query build time.
		timeResult, err := monitoring.GetStat(v23ctx, ctx, group, buildTimeStatSuffix)
		if err != nil {
			errors = append(errors, err)
			continue
		}
		strTime := timeResult[0].GetStringValue()
		buildTime, err := time.Parse("2006-01-02T15:04:05Z", strTime)
		if err != nil {
			errors = append(errors, fmt.Errorf("Parse(%v) failed: %v", strTime, err))
			continue
		}
		location, err := monitoring.GetServiceLocation(v23ctx, ctx, group)
		if err != nil {
			errors = append(errors, err)
			continue
		}
		metadata = append(metadata, metadataData{
			location:  location,
			buildTime: buildTime,
		})
	}
	if len(errors) == len(groups) {
		return nil, fmt.Errorf("%v", errors)
	}

	return metadata, nil
}


text:
<?php

namespace Core\Form\Factory;

class PageElementFactory
{

    public static function getIdElement()
    {
        return new \Core\Form\Element\Hidden('id');
    }

    public static function getTitleElement()
    {
        $title = new \Core\Form\Element\Text('title');
        $title->setLabel('Title:');
        $title->addValidator(new \Zend_Validate_StringLength(0, 255));

        return $title;
    }

    public static function getDescriptionElement()
    {
        $description = new \Core\Form\Element\Textarea('description');
        $description->setLabel('Description:');
        $description->setAllowEmpty(true);
        $description->addValidator(new \Zend_Validate_StringLength(0, 500));

        return $description;
    }

    public static function getLayoutElement()
    {
        $layoutSelect = new \Core\Form\Element\Radio('layout');
        $layouts = \Zend_Registry::get('doctrine')->getRepository('Core\Model\Layout')->findAll();
        foreach ($layouts AS $layout) {
            $layoutSelect->addMultiOption($layout->getSysname(), $layout->getTitle());
        }
        $layoutSelect->setRequired(true);

        return $layoutSelect;
    }

    public static function getPageRouteElement()
    {
        $pageRoute = new \Core\Form\Element\Text('pageRoute');
        $pageRoute->setLabel('Url:');
        $pageRoute->setAllowEmpty(false);
        $pageRoute->setFilters(array(new \Core\Filter\Url));
        $pageRoute->addValidator(new \Zend_Validate_StringLength(0, 255));
        $pageRoute->addValidator(new \Core\Validator\Route());

        return $pageRoute;
    }
}