text:
Queue Manager Example YAML Files
================================

The primary way to set up a :term:`Manager` is to setup a YAML config file.
This page provides helpful config files which mostly can be just copied
and used in place (filling in things like :ref:`**username** and **password** <managers_server>`
as needed.)

The full documentation of every option and how it can be used can be found in
:doc:`the Queue Manager's API <managers_config_api>`.

For these examples, the ``username`` will always be "Foo" and the ``password`` will always be "b4R"
(which are just placeholders and not valid). The ``manager_name`` variable can be any string and these examples provide
some descriptive samples. The more distinct the name, the better it is to see its status on the :term:`Server`.

SLURM Cluster, Dask Adapter with additional options
---------------------------------------------------

This example is similar to the :ref:`example on the start page for Managers<manager_starter_example>`, but with some
additional options such as connecting back to a central Fractal instance and setting more cluster-specific options.
Again, this starts a manager with a dask :term:`Adapter`, on a SLURM cluster, consuming 1 CPU and 8 GB of ram, targeting
a Fractal Server running on that cluster, and using the SLURM partition ``default``, save the following YAML config
file:

.. code-block:: yaml

    common:
     adapter: dask
     tasks_per_worker: 1
     cores_per_worker: 1
     memory_per_worker: 8

    server:
     fractal_uri: "localhost:7777"
     username: Foo
     password: b4R

    manager:
     manager_name: "SlurmCluster_OneDaskTask"

    cluster:
     scheduler: slurm
     walltime: "72:00:00"

    dask:
     queue: default

Multiple Tasks, 1 Cluster Job
-----------------------------

This example starts a max of 1 cluster :term:`Job`, but multiple :term:`tasks<Task>`. The hardware will be
consumed uniformly by the :term:`Worker`. With 8 cores, 20 GB of memory, and 4 tasks; the :term:`Worker` will provide
2 cores and 5 GB of memory to compute each :term:`Task`. We set ``common.max_workers`` to 1 to limit the number
of :term:`Workers<Worker>` and :term:`Jobs <Job>` which can be started. Since this is SLURM, the ``squeue`` information
will show this user has run 1 ``sbatch`` jobs which requested 4 cores and 20 GB of memory.

.. code-block:: yaml

    common:
     adapter: dask
     tasks_per_worker: 4
     cores_per_worker: 8
     memory_per_worker: 20
     max_workers: 1

    server:
     fractal_uri: "localhost:7777"
     username: Foo
     password: b4R

    manager:
     manager_name: "SlurmCluster_MultiDask"

    cluster:
     scheduler: slurm
     walltime: "72:00:00"

    dask:
     queue: default

Testing the Manager Setup
-------------------------

This will test the :term:`Manager` to make sure it's setup correctly, and does not need to
connect to the :term:`Server`, and therefore does not need a ``server`` block. It will still however submit
:term:`jobs <Job>`.

.. code-block:: yaml

    common:
     adapter: dask
     tasks_per_worker: 2
     cores_per_worker: 4
     memory_per_worker: 10

    manager:
     manager_name: "TestBox_NeverSeen_OnServer"
     test: True
     ntests: 5

    cluster:
     scheduler: slurm
     walltime: "01:00:00"

    dask:
     queue: default

Running commands before work
----------------------------

Suppose there are some commands you want to run *before* starting the :term:`Worker`, such as starting a Conda
environment, or setting some environment variables. This lets you specify that. For this, we will run on a
Sun Grid Engine (SGE) cluster, start a conda environment, and load a module.

An important note about this one, we have now set ``max_workers`` to something larger than 1.
Each :term:`Job` will still request 16 cores and 256 GB of memory to be evenly distributed between the
4 :term:`tasks<Task>`, however, the :term:`Adapter` will **attempt to start 5 independent** :term:`jobs<Job>`, for a
total of 80 cores, 1.280 TB of memory, distributed over 5 :term:`Workers<Worker>` collectively running 20 concurrent
:term:`tasks<Task>`. If the :term:`Scheduler` does not
allow all of those :term:`jobs<Job>` to start, whether due to lack of resources or user limits, the
:term:`Adapter` can still start fewer :term:`jobs<Job>`, each with 16 cores and 256 GB of memory, but :term:`Task`
concurrency will change by blocks of 4 since the :term:`Worker` in each :term:`Job` is configured to handle 4
:term:`tasks<Task>` each.

.. code-block:: yaml

    common:
     adapter: dask
     tasks_per_worker: 4
     cores_per_worker: 16
     memory_per_worker: 256
     max_workers: 5

    server:
     fractal_uri: localhost:7777
     username: Foo
     password: b4R

    manager:
     manager_name: "GridEngine_OpenMPI_DaskWorker"
     test: False

    cluster:
     scheduler: sge
     task_startup_commands:
         - module load mpi/gcc/openmpi-1.6.4
         - conda activate qcfmanager
     walltime: "71:00:00"

    dask:
     queue: free64

Additional Scheduler Flags
--------------------------

A :term:`Scheduler` may ask you to set additional flags (or you might want to) when submitting a :term:`Job`.
Maybe it's a Sys. Admin enforced rule, maybe you want to pull from a specific account, or set something not
interpreted for you in the :term:`Manager` or :term:`Adapter` (do tell us though if this is the case). This
example sets additional flags on a PBS cluster such that the final :term:`Job` launch file will have
``#PBS {my headers}``.

This example also uses Parsl and sets a scratch directory.

.. code-block:: yaml

    common:
     adapter: parsl
     tasks_per_worker: 1
     cores_per_worker: 6
     memory_per_worker: 64
     max_workers: 5
     scratch_directory: "$TMPDIR"

    server:
     fractal_uri: localhost:7777
     username: Foo
     password: b4R
     verify: False

    manager:
     manager_name: "PBS_Parsl_MyPIGroupAccount_Manger"

    cluster:
     node_exclusivity: True
     scheduler: pbs
     scheduler_options:
         - "-A MyPIsGroupAccount"
     task_startup_commands:
         - conda activate qca
         - cd $WORK
     walltime: "06:00:00"

    parsl:
     provider:
      partition: normal_q
      cmd_timeout: 30

Single Job with Multiple Nodes and Single-Node Tasks with Parsl Adapter
-----------------------------------------------------------------------

Leadership platforms prefer or require more than one node per Job request.
The following configuration will request a Job with 256 nodes and place one Worker on each node.

.. code-block:: yaml

    common:
        adapter: parsl
        tasks_per_worker: 1
        cores_per_worker: 64  # Number of cores per compute node
        max_workers: 256  # Maximum number of workers deployed to compute nodes
        nodes_per_job: 256

    cluster:
        node_exclusivity: true
        task_startup_commands:
            - module load miniconda-3/latest  # You will need to load the Python environment on startup
            - source activate qcfractal
            - export KMP_AFFINITY=disable  # KNL-related issue. Needed for multithreaded apps
            - export PATH=~/software/psi4/bin:$PATH  # Points to psi4 compiled for compute nodes
        scheduler: cobalt  # Varies depending on supercomputing center

    parsl:
        provider:
            queue: default
            launcher:  # Defines the MPI launching function
                launcher_class: AprunLauncher
                overrides: -d 64  # Option for XC40 machines, allows workers to access 64 threads
            init_blocks: 0
            min_blocks: 0
            account: CSC249ADCD08
            cmd_timeout: 60
            walltime: "3:00:00"

Consult the `Parsl configuration docs <https://parsl.readthedocs.io/en/stable/userguide/configuring.html>`_
for information on how to configure the Launcher and Provider classes for your cluster.

Single Job with Multiple, Node-Parallel Tasks with Parsl Adapter
----------------------------------------------------------------

Running MPI-parallel tasks requires a similar configuration to the multiple nodes per job
for the manager and also some extra work in defining the qcengine environment.
The key difference that sets apart managers for node-parallel applications is that
that ``nodes_per_job`` is set to more than one and
Parsl uses ``SimpleLauncher`` to deploy a Parsl executor onto
the batch/login node once a job is allocated.

.. code-block:: yaml

    common:
        adapter: parsl
        tasks_per_worker: 1
        cores_per_worker: 16  # Number of cores used on each compute node
        max_workers: 128
        memory_per_worker: 180  # Summary for the amount per compute node
        nodes_per_job: 128
        nodes_per_task: 2  # Number of nodes to use for each task
        cores_per_rank: 1  # Number of cores to each of each MPI rank

    cluster:
        node_exclusivity: true
        task_startup_commands:
            - module load miniconda-3/latest
            - source activate qcfractal
            - export PATH="/soft/applications/nwchem/6.8/bin/:$PATH"
            - which nwchem
        scheduler: cobalt

    parsl:
        provider:
            queue: default
            launcher:
                launcher_class: SimpleLauncher
            init_blocks: 0
            min_blocks: 0
            account: CSC249ADCD08
            cmd_timeout: 60
            walltime: "0:30:00"

The configuration that describes how to launch the tasks must be written at a ``qcengine.yaml``
file. See `QCEngine docs <https://qcengine.readthedocs.io/en/stable/environment.html>`_
for possible locations to place the ``qcengine.yaml`` file and full descriptions of the
configuration option.
One key option for the ``qcengine.yaml`` file is the description of how to launch MPI
tasks, ``mpiexec_command``. For example, many systems use ``mpirun``
(e.g., `OpenMPI <https://www.open-mpi.org/doc/v4.0/man1/mpirun.1.php>`_).
An example configuration a Cray supercomputer is:

.. code-block:: yaml

    all:
      hostname_pattern: "*"
      scratch_directory: ./scratch  # Must be on the global filesystem
      is_batch_node: True  # Indicates that `aprun` must be used for all QC code invocations
      mpiexec_command: "aprun -n {total_ranks} -N {ranks_per_node} -C -cc depth --env CRAY_OMP_CHECK_AFFINITY=TRUE --env OMP_NUM_THREADS={cores_per_rank} --env MKL_NUM_THREADS={cores_per_rank}
      -d {cores_per_rank} -j 1"
      jobs_per_node: 1
      ncores: 64

Note that there are several variables in the ``mpiexec_command`` that describe how to insert parallel configurations into the
command: ``total_ranks``, ``ranks_per_node``, and ``cores_per_rank``.
Each of these values are computed based on the number of cores per node, the number of nodes per application
and the number of cores per MPI rank, which are all defined in the Manager settings file.


text:
<?php

if ( ! defined( 'ABSPATH' ) ) {

	exit;

}

/**
 * Class GD_System_Plugin_CName
 *
 * Urge the user not to stay on the temporary cname and to switch to
 * a permanent domain.
 *
 * @version 1.1.0
 *
 * @author Frankie Jarrett <fjarrett@godaddy.com>
 * @author Jonathan Bardo <jbardo@godaddy.com>
 */
final class GD_System_Plugin_CName {

	/**
	 * Transient key for domain changed
	 *
	 * @var string
	 */
	const TRANSIENT_KEY = 'gd_system_domain_changed';

	/**
	 * Class constructor
	 */
	public function __construct() {

		add_action( 'admin_init', array( $this, 'init' ) );

	}

	/**
	 * Initialize the script
	 *
	 * @action admin_init
	 */
	public function init() {

		if ( ! current_user_can( 'activate_plugins' ) ) {

			return;

		}

		// Show a notice to the user if we're on a temporary domain
		if ( gd_is_temp_domain() || ! $this->user_changed_domain() ) {

			add_action( 'admin_notices', array( $this, 'show_notice'), -PHP_INT_MAX );

		}

	}

	/**
	 * Check the API
	 *
	 * See if the user has changed their domain,
	 * but it isn't reflected here yet because we're
	 * waiting on the DNS TTL to take effect.
	 *
	 * @return bool
	 */
	private function user_changed_domain() {

		if ( false !== ( $transient = get_site_transient( static::TRANSIENT_KEY ) ) ) {

			return ( 'Y' === $transient );

		}

		// Check if the domain has been changed in the DB but DNS hasn't propagated yet
		global $gd_api, $gd_system_logger;

		$response = $gd_api->domain_changed( $_SERVER['HTTP_HOST'] );

		if ( is_wp_error( $response ) ) {

			$gd_system_logger->log( GD_SYSTEM_LOG_ERROR, 'Could not fetch response from API to check if domain was changed. Error [' . $response->get_error_code() . ']: ' . $response->get_error_message() );

		} else {

			$json = json_decode( $response['body'], true );

			if ( null === $json ) {

				$gd_system_logger->log( GD_SYSTEM_LOG_ERROR, 'Could not decode domain changed API response.' );

			}

		}

		$domain_changed = ! empty( $json['domainChanged'] ) ? 'Y' : 'N';

		$cname_timeout = isset( $conf['cname_timeout'] ) ? absint( $conf['cname_timeout'] ) : 300;

		set_site_transient( static::TRANSIENT_KEY, $domain_changed, $cname_timeout );

		return ( 'Y' === $domain_changed );

	}

	/**
	 * Show a message prompting the customer to update change domain
	 * to not use a temporary CNAME.
	 *
	 * @action admin_notices
	 */
	public function show_notice() {

		global $gd_system_config;

		if ( empty( $gd_system_config ) || $gd_system_config->missing_gd_config ) {

			return;

		}

		$config = $gd_system_config->get_config();

		if ( empty( $config['cname_link'] ) ) {

			return;

		}

		$url = str_replace( '%domain%', $_SERVER['HTTP_HOST'], $config['cname_link'] );

		$url = str_replace( '%pl_id%', defined( 'GD_RESELLER' ) ? GD_RESELLER : '', $url );

		$message = sprintf(
			__( 'Note: You\'re using the temporary domain %s. Change domain', 'gd_system' ),
			$_SERVER['HTTP_HOST'],
			esc_attr( $url )
		);

		?>

<?php echo wp_kses_post( $message ) ?>

		<?php

	}

}

redpajama_set_name: RedPajamaGithub


text:
#ifndef BOOST_MPL_AUX_CONFIG_ADL_HPP_INCLUDED
#define BOOST_MPL_AUX_CONFIG_ADL_HPP_INCLUDED

// Copyright Aleksey Gurtovoy 2002-2004
//
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
//
// See http://www.boost.org/libs/mpl for documentation.

// $Id$
// $Date$
// $Revision$

#include <boost/mpl/aux_/config/msvc.hpp>
#include <boost/mpl/aux_/config/intel.hpp>
#include <boost/mpl/aux_/config/gcc.hpp>
#include <boost/mpl/aux_/config/workaround.hpp>

// agurt, 25/apr/04: technically, the ADL workaround is only needed for GCC,
// but putting everything expect public, user-specializable metafunctions into
// a separate global namespace has a nice side effect of reducing the length
// of template instantiation symbols, so we apply the workaround on all
// platforms that can handle it

#if !defined(BOOST_MPL_CFG_NO_ADL_BARRIER_NAMESPACE) \
    && (   BOOST_WORKAROUND(BOOST_MSVC, BOOST_TESTED_AT(1400)) \
        || BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x610)) \
        || BOOST_WORKAROUND(__DMC__, BOOST_TESTED_AT(0x840)) \
        || BOOST_WORKAROUND(__MWERKS__, BOOST_TESTED_AT(0x3202)) \
        || BOOST_WORKAROUND(BOOST_INTEL_CXX_VERSION, BOOST_TESTED_AT(810)) \
        )

#   define BOOST_MPL_CFG_NO_ADL_BARRIER_NAMESPACE

#endif

#endif // BOOST_MPL_AUX_CONFIG_ADL_HPP_INCLUDED


text:
class ClosedHelpsController < ApplicationController
  def create
    ClosedHelp.create(:helpable_id => params[:object_id].to_i, :helpable_type => params[:object_type],
                                       :url => params[:url])
    respond_to do |format|
      format.js {
        render :update do |page|
          page.remove HELP_SETTING[params[:url]]
        end
      }
    end
  end
end


text:
%MESHND: creation and nested dissection of regular 2D and 3D meshes.
%
%   meshnd         - creation and nested dissection of a regular 2D or 3D mesh.
%   meshnd_quality - test the ordering quality computed by meshnd.
%   meshsparse     - convert a 2D or 3D mesh into a sparse matrix matrix.
%   meshnd_example - example usage of meshnd and meshsparse.
%
% The outputs of the meshnd example and meshnd_quality are in meshd.png,
% meshnd_quality_out.txt, and meshnd_quality.png.
%
% Example:
%   % with no inputs or outputs, meshnd runs a demo:
%   meshnd
%
%   % create the sparse matrix for a 7-by-5-by-2 mesh:
%   A = meshsparse (meshnd (7,5,2)) ;
%
%   % create a 7-by-5-by-2 mesh and find the nested dissection ordering:
%   [G p] = meshnd (7,5,2) ;
%   A = meshsparse (G) ;
%   subplot (1,2,1) ; spy (A) ;
%   subplot (1,2,2) ; spy (A (p,p)) ;
%

% Copyright 2009, Timothy A. Davis, http://www.suitesparse.com


text:
import StringIO
from apikit import obj_or_404
from flask import request
from urlparse import urlparse, urljoin
from werkzeug.exceptions import NotFound, ImATeapot
import xlsxwriter

from aleph.authz import Authz
from aleph.model import Document
from aleph.logic import fetch_entity

def get_entity(id, action):
    entity, obj = fetch_entity(id)
    if obj is None:
        entity = obj_or_404(entity)
        # Apply roles-based security to dataset-sourced entities.
        request.authz.require(request.authz.check_roles(entity.get('roles')))
        # Cannot edit them:
        if action == request.authz.WRITE:
            raise ImATeapot("Cannot write this entity.")
    else:
        collections = request.authz.collections.get(action)
        request.authz.require(obj.collection_id in collections)
    return entity, obj

def get_document(document_id, action=Authz.READ):
    document = Document.by_id(document_id)
    if document is None:
        raise NotFound()
    collections = request.authz.collections.get(action)
    request.authz.require(document.collection_id in collections)
    return document

def is_safe_url(target):
    ref_url = urlparse(request.host_url)
    test_url = urlparse(urljoin(request.host_url, target))
    return test_url.scheme in ('http', 'https') and \
        ref_url.netloc == test_url.netloc

def make_excel(result_iter, fields):
    output = StringIO.StringIO()
    workbook = xlsxwriter.Workbook(output)
    worksheet = workbook.add_worksheet('Documents')

    header = workbook.add_format({
        'bold': True,
        'border': 1,
        'fg_color': '#D7E4BC'
    })
    col = 0
    for field in fields:
        field = field.replace('_', ' ').capitalize()
        worksheet.write(0, col, field, header)
        col += 1
    row = 1
    for data in result_iter:
        col = 0
        for field in fields:
            val = data.get(field) or ''
            if isinstance(val, (list, tuple, set)):
                val = ', '.join(val)
            worksheet.write_string(row, col, val)
            col += 1
        row += 1

    worksheet.freeze_panes(1, 0)
    workbook.close()
    output.seek(0)
    return output

def extract_next_url(req):
    """Extracts the URL/path to follow when redirects/unauthorization occurs.

    :param object req: Flask request object to extract from.
    :return: Path of the next target URL.
    :rtype: str
    """
    next_url = '/'

    for target in req.args.get('next'), req.referrer:
        if not target:
            continue
        if is_safe_url(target):
            next_url = target

    return next_url


text:
namespace SpotLight
{
    partial class FormMain
    {
        /// <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()
        {
            this.components = new System.ComponentModel.Container();
            this.winGLCanvas1 = new CSharpGL.WinGLCanvas();
            this.timer1 = new System.Windows.Forms.Timer(this.components);
            this.chkRotate = new System.Windows.Forms.CheckBox();
            this.colorDialog1 = new System.Windows.Forms.ColorDialog();
            this.lblColorDisply = new System.Windows.Forms.Label();
            this.lblColor = new System.Windows.Forms.Label();
            this.chkRotateLight = new System.Windows.Forms.CheckBox();
            ((System.ComponentModel.ISupportInitialize)(this.winGLCanvas1)).BeginInit();
            this.SuspendLayout();
            //
            // winGLCanvas1
            //
            this.winGLCanvas1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
            | System.Windows.Forms.AnchorStyles.Left)
            | System.Windows.Forms.AnchorStyles.Right)));
            this.winGLCanvas1.Location = new System.Drawing.Point(12, 38);
            this.winGLCanvas1.Name = "winGLCanvas1";
            this.winGLCanvas1.RenderTrigger = CSharpGL.RenderTrigger.TimerBased;
            this.winGLCanvas1.Size = new System.Drawing.Size(961, 527);
            this.winGLCanvas1.TabIndex = 0;
            //
            // timer1
            //
            this.timer1.Enabled = true;
            this.timer1.Interval = 40;
            this.timer1.Tick += new System.EventHandler(this.timer1_Tick);
            //
            // chkRotate
            //
            this.chkRotate.AutoSize = true;
            this.chkRotate.Checked = true;
            this.chkRotate.CheckState = System.Windows.Forms.CheckState.Checked;
            this.chkRotate.Font = new System.Drawing.Font("宋体", 12F);
            this.chkRotate.Location = new System.Drawing.Point(12, 12);
            this.chkRotate.Name = "chkRotate";
            this.chkRotate.Size = new System.Drawing.Size(123, 20);
            this.chkRotate.TabIndex = 1;
            this.chkRotate.Text = "Rotate Model";
            this.chkRotate.UseVisualStyleBackColor = true;
            this.chkRotate.CheckedChanged += new System.EventHandler(this.chkRotate_CheckedChanged);
            //
            // lblColorDisply
            //
            this.lblColorDisply.AutoSize = true;
            this.lblColorDisply.BackColor = System.Drawing.Color.Gold;
            this.lblColorDisply.Font = new System.Drawing.Font("宋体", 12F);
            this.lblColorDisply.Location = new System.Drawing.Point(292, 13);
            this.lblColorDisply.Name = "lblColorDisply";
            this.lblColorDisply.Size = new System.Drawing.Size(48, 16);
            this.lblColorDisply.TabIndex = 2;
            this.lblColorDisply.Text = "     ";
            this.lblColorDisply.Click += new System.EventHandler(this.lblColorDisply_Click);
            //
            // lblColor
            //
            this.lblColor.AutoSize = true;
            this.lblColor.Font = new System.Drawing.Font("宋体", 12F);
            this.lblColor.Location = new System.Drawing.Point(346, 13);
            this.lblColor.Name = "lblColor";
            this.lblColor.Size = new System.Drawing.Size(40, 16);
            this.lblColor.TabIndex = 2;
            this.lblColor.Text = "Gold";
            //
            // chkRotateLight
            //
            this.chkRotateLight.AutoSize = true;
            this.chkRotateLight.Checked = true;
            this.chkRotateLight.CheckState = System.Windows.Forms.CheckState.Checked;
            this.chkRotateLight.Font = new System.Drawing.Font("宋体", 12F);
            this.chkRotateLight.Location = new System.Drawing.Point(141, 12);
            this.chkRotateLight.Name = "chkRotateLight";
            this.chkRotateLight.Size = new System.Drawing.Size(123, 20);
            this.chkRotateLight.TabIndex = 1;
            this.chkRotateLight.Text = "Rotate Light";
            this.chkRotateLight.UseVisualStyleBackColor = true;
            this.chkRotateLight.CheckedChanged += new System.EventHandler(this.chkRotateLight_CheckedChanged);
            //
            // FormMain
            //
            this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
            this.ClientSize = new System.Drawing.Size(985, 577);
            this.Controls.Add(this.lblColor);
            this.Controls.Add(this.lblColorDisply);
            this.Controls.Add(this.chkRotateLight);
            this.Controls.Add(this.chkRotate);
            this.Controls.Add(this.winGLCanvas1);
            this.Name = "FormMain";
            this.Text = "Spot Light - CSharpGL";
            ((System.ComponentModel.ISupportInitialize)(this.winGLCanvas1)).EndInit();
            this.ResumeLayout(false);
            this.PerformLayout();

        }

        #endregion

        private CSharpGL.WinGLCanvas winGLCanvas1;
        private System.Windows.Forms.Timer timer1;
        private System.Windows.Forms.CheckBox chkRotate;
        private System.Windows.Forms.ColorDialog colorDialog1;
        private System.Windows.Forms.Label lblColorDisply;
        private System.Windows.Forms.Label lblColor;
        private System.Windows.Forms.CheckBox chkRotateLight;
    }
}


text:
package org.apache.ignite.internal;

import java.security.AccessControlException;
import java.util.UUID;
import org.apache.ignite.internal.processors.security.AbstractSecurityAwareExternalizable;
import org.apache.ignite.internal.processors.security.IgniteSecurity;
import org.apache.ignite.internal.processors.security.OperationSecurityContext;
import org.apache.ignite.internal.processors.security.sandbox.IgniteSandbox;
import org.apache.ignite.lang.IgniteBiPredicate;

/**
 * Security aware IgniteBiPredicate.
 */
public class SecurityAwareBiPredicate<E1, E2> extends AbstractSecurityAwareExternalizable<IgniteBiPredicate<E1, E2>>
    implements IgniteBiPredicate<E1, E2> {
    /** */
    private static final long serialVersionUID = 0L;

    /**
     * Default constructor.
     */
    public SecurityAwareBiPredicate() {
        // No-op.
    }

    /**
     * @param subjectId Security subject id.
     * @param original Original predicate.
     */
    public SecurityAwareBiPredicate(UUID subjectId, IgniteBiPredicate<E1, E2> original) {
        super(subjectId, original);
    }

    /** {@inheritDoc} */
    @Override public boolean apply(E1 e1, E2 e2) {
        IgniteSecurity security = ignite.context().security();

        try (OperationSecurityContext c = security.withContext(subjectId)) {
            IgniteSandbox sandbox = security.sandbox();

            return sandbox.enabled() ? sandbox.execute(() -> original.apply(e1, e2)) : original.apply(e1, e2);
        }
        catch (AccessControlException e) {
            logAccessDeniedMessage(e);

            throw e;
        }
    }
}


text:
namespace aura {
namespace client {
class CaptureDelegate;
}
}

namespace wm {

// Internal CaptureClient implementation. See ScopedCaptureClient for details.
class WM_EXPORT CaptureController : public aura::client::CaptureClient {
 public:
  // Adds |root| to the list of root windows notified when capture changes.
  void Attach(aura::Window* root);

  // Removes |root| from the list of root windows notified when capture changes.
  void Detach(aura::Window* root);

  // Returns true if this CaptureController is installed on at least one
  // root window.
  bool is_active() const { return !delegates_.empty(); }

  // Overridden from aura::client::CaptureClient:
  void SetCapture(aura::Window* window) override;
  void ReleaseCapture(aura::Window* window) override;
  aura::Window* GetCaptureWindow() override;
  aura::Window* GetGlobalCaptureWindow() override;
  void AddObserver(aura::client::CaptureClientObserver* observer) override;
  void RemoveObserver(aura::client::CaptureClientObserver* observer) override;

 private:
  friend class ScopedCaptureClient;

  CaptureController();
  ~CaptureController() override;

  // The current capture window. NULL if there is no capture window.
  aura::Window* capture_window_;

  // The capture delegate for the root window with native capture. The root
  // window with native capture may not contain |capture_window_|. This occurs
  // if |capture_window_| is reparented to a different root window while it has
  // capture.
  aura::client::CaptureDelegate* capture_delegate_;

  // The delegates notified when capture changes.
  std::map<aura::Window*, aura::client::CaptureDelegate*> delegates_;

  base::ObserverList<aura::client::CaptureClientObserver> observers_;

  DISALLOW_COPY_AND_ASSIGN(CaptureController);
};

// ScopedCaptureClient is responsible for creating a CaptureClient for a
// RootWindow. Specifically it creates a single CaptureController that is shared
// among all ScopedCaptureClients and adds the RootWindow to it.
class WM_EXPORT ScopedCaptureClient : public aura::WindowObserver {
 public:
  class WM_EXPORT TestApi {
   public:
    explicit TestApi(ScopedCaptureClient* client) : client_(client) {}
    ~TestApi() {}

    // Sets the delegate.
    void SetDelegate(aura::client::CaptureDelegate* delegate);

   private:
    // Not owned.
    ScopedCaptureClient* client_;

    DISALLOW_COPY_AND_ASSIGN(TestApi);
  };

  explicit ScopedCaptureClient(aura::Window* root);
  ~ScopedCaptureClient() override;

  // Returns true if there is a CaptureController with at least one RootWindow.
  static bool IsActive();

  aura::client::CaptureClient* capture_client() {
    return capture_controller_;
  }

  // Overridden from aura::WindowObserver:
  void OnWindowDestroyed(aura::Window* window) override;

 private:
  // Invoked from destructor and OnWindowDestroyed() to cleanup.
  void Shutdown();

  // The single CaptureController instance.
  static CaptureController* capture_controller_;

  // RootWindow this ScopedCaptureClient was create for.
  aura::Window* root_window_;

  DISALLOW_COPY_AND_ASSIGN(ScopedCaptureClient);
};

}  // namespace wm

#endif  // UI_WM_CORE_CAPTURE_CONTROLLER_H_


text:
<TITLE>Review for Alien³ (1992)</TITLE>
<LINK REL="STYLESHEET" TYPE="text/css" HREF="/ramr.css">

Alien³ (1992)

reviewed by
Boyd Petrie

Alien 3 (1992)
Rated R for strong violence and language, and for sex
----------  Out of 4 stars: ***1/2 (3 1/2 Stars)

Starring: Sigourney Weaver, Charles S. Dutton, Charles Dance, Pete Postlethwaite, Lance Henriksen

ALIEN 3 is the only Alien film I have seen in theaters.  I saw it when I was 13 years old, and I must admit
that I didn't like it.  Of course, I was expecting ALIENS again, and I believe this was my fault.  In order to
appreciate ALIEN 3, you need to see ALIENS, but you also have to wipe away all the expectations from its
predecessor.  James Cameron's ALIENS was an action film, and many people consider it the best in the series.
I am among that group, but ALIEN 3 is an extremely entertaining film, which critics have bashed for its
originality. Many thought the final chase scene went on for too long, and many others thought that the film
was too much dialogue and not enough action.  Both are untrue, because the film has quite a bit of action, and
the dialogue was essential and well-written.  As for the chase sequence, it was long, but not overly long,
creating quite a bit of suspense from confusion.

Perhaps watching ALIEN 3 on video helped.  On the big screen, I was
overwhelmed by something I normally didn't see.  It was a very dark
film, and the language was extremely harsh.  I had always figured the
Alien series to rely on smart dialogue instead of moronic profanities.
Don't get me wrong--I'm not saying films should eliminate swearing,
but when a film substitutes dialogue with these profane remarks, it
gets rather distracting.  However, since seeing it again, I realize
that the swearing is mainly just an aspect of the restrained hatred in
the characters.  As a result, ALIEN 3's only flaw (albeit a major one)
is the underdeveloped characters.  We never really care about any of
them, and I get the feeling that many scenes were cut in order to
shorten the length of the movie.  There were only two characters I
liked, and of course one was Lt. Ripley (Sigourney Weaver), although
we have gotten to know her through two other films.  The other
character was Dr. Clemens (Charles Dance), but because we like him,
the inevitable occurs.

ALIEN 3 begins exactly where ALIENS left off.  The prologue of ALIEN 3
is a pure cinematic achievement by director David Fincher, who had
only directed music videos before his chance with this Alien entry.
Without using a single line of dialogue (unless you count computer
warnings), Fincher sets up the entire film.  An impressive aspect of
this is that Fincher only shows a few seconds of film before cutting
to a title card.  We see Lt. Ripley and the little girl in their
cryogenic compartments... (title)... a shot of an alien egg...
(title)... alien legs stretch up into the air... (title)... and so on
and so on.  During these first ten minutes, I learned everything I had
to in order for ALIEN 3 to proceed.  It's quite a remarkable opening,
and one which will remain in my mind for a long time.

Because of this face-hugger which has been hatched aboard the vessel
from ALIENS, the hypersleep containers are sent into an escape pod,
and sent down to the nearest planet: Fiorina Fury-161, an ore refinery
which has been turned into a maximum security prison.  However, the
face-hugger managed to attach itself to one of the cryo-tubes, and is
sent down with the escape pod.  Unfortunately, during the landing, all
but one of the survivors from ALIENS is killed.  Ripley is discovered
by some of the inmates and taken back to the refinery.  Of course, you
need a carrier for this face-hugger, and it attachs itself to the dog
which came with the team of inmates.  Ripley is revived and asks to
see the ship.  After seeing a mysterious acid-eaten section, Ripley
asks to see the dead bodies, and then have them cremated.  This
cremation scene is one of the most powerful and impressive of all the
Alien films.  Featuring a monologue from Dillon (Charles S. Dutton), a
prisoner who has found God, the movie cuts back and forth from the
ceremony to the dog's demise.  It's one of the most memorable moments,
as the speech reflects exactly what is going on with the dog.

And this is where ALIEN 3 succeeds.  Fincher normally injects a lot of
symbolism into his films, and I can easily see him becoming the next
Stanley Kubrick or Alfred Hitchcock (in fact, he is the mixture of
both).  Fincher knows exactly what to film and how to film it, and I
figure that he will be one of the few directors with complete control
over his films.  ALIEN 3 is riddled with symbolic speeches and
metaphorical images.  By doing so, Fincher creates some of the best
scenes in the entire Alien franchise.  Many people have criticized
Fincher's filming of the death scene of Ripley (I reveal nothing by
saying this) as looking too fake, but I enjoy and relish in the
portrayal.  Showing Ripley fall in slow motion is a nice touch, but by
actually not showing her hit the vat of iron, a great deal of
symbolism is derived.  I feel that it would have spoiled the mood of
the entire film if they had actually shown her splash into the molten
iron.  However, most people seem to want to witness Ripley die (which
creates a paradox, as she is the character I didn't want to see die).
Why she is killed is one of the surprises of the film, and I don't
plan on spoiling that in this review.

>From every ALIEN film comes several memorable moments which seem to
stick with you forever.  In Alien, it was, of course, the moment the
alien burst out of Kane's stomach.  In ALIENS, it was the showdown
between alien and Ripley in a machine.  ALIEN 3 has several, but most
memorable is the terrific shot involving the alien and Ripley.  Ripley
is pushed up against a wall, and the alien stands inches away from
her.  Why it doesn't kill her is a shocker, which later leads to a
surprise ending.  Fincher apparently loves to use close-ups of actors'
faces (Michael Douglas and the clown face-off in THE GAME in the same
style), and by shaving off the actors' hair, the only thing we have to
look at is their faces.  Many critics didn't like all the actors being
bald, but it makes complete sense when taken in context of the plot.
Most of ALIEN 3 works when you take it in context of the story, but
when you try to compare it to its predecessors, Fincher's turn seems a
bit gloomy and dark, though that's not always a bad thing.

The plot is pretty much a rehash of the first two films, with some
major twists.  Again, we are setup with several different characters,
and one by one, they are picked off.  However, while the first two had
tons of arsenal (especially Cameron's film), ALIEN 3 takes place on a
planet devoid of human life except for this run-down prison.  As a
result, no weapons are to be found.  This creates a lot of tension,
although I must admit that Fincher could have added a lot more
suspense.  As an Alien film, ALIEN 3 is the worst of the series, but
by itself, it is an extremely well-made motion picture, with a lot
more merits than not.  The unfortunate thing surrounding this second
sequel is the one-dimensional characters.  I never was really
emotionally involved on screen because most of the characters are
hardcore criminals whom I really could care less about.  Despite this,
Ripley was the central figure, and that's what is important.  We care
for her, even though she began to act just like one of the guys.

Again, the technical side of this film is remarkable, and better than
the two previous versions.  While Cameron's version was a pumped up
action film with massive artillary, Fincher uses brilliant camera
angles, terrific lighting, and moody sets.  The cinematography, by
Alex Thomson, is very well done, with a terrific chase sequence
towards the end of the movie.  The confusion of the ending draws the
viewer in, as we are just as confused as the actors who are being
chased around.  The yellows, reds, and oranges of the lights create a
dark mood, and by themselves create a lot of suspense.  Shadows dance
on the walls, and yet those shadows could easily be the alien.  The
alien is different from its predecessors this time around, and the
swiftness of this alien is quite intense.  The camera likes to take up
the perspective of the alien, racing after the characters.  The sets
are quite incredible, which are reminiscient of the Nostromo from
ALIEN.  The narrow corridors and labrynthine hallways is well
constructed.  The sets appear to be in the future, but not too far in
the future.  One of the set pieces even aids in the destruction of the
alien (nothing surprising there).

Sigourney Weaver turns out yet another good performance, equaling her
portrayal of Ripley in ALIENS.  She was snubbed at the Oscars for this
one, mainly because the film was a critical bomb.  Her reactions are
far more realistic in this film, with her crying over the loss of the
little child she risked her life saving in her previous encounter.
It's quite touching really.  Charles S. Dutton is very strong in his
performance as one of the inmates, and I was on the brink of actually
caring for him.  Charles Dance turns in a nice low-key performance,
and as a result, I cared for him immediately.  Lance Henriksen makes a
brief appearance as Bishop II, but he was more entertaining in ALIENS.
The rest of the cast is pretty stale, though Pete Postlethwaite sticks
out due to his recent turns in THE USUAL SUSPECTS and THE LOST WORLD.

ALIEN 3 is rated R for strong violence and language, and sex.
Although it has its flaws, ALIEN 3 is highly entertaining with rich
symbolism.  This film reminds you how much fun it is to spot
metaphorical images throughout a movie.  While Kubrick may have a
moral message throughout his films, Fincher relies on cinematic
devices to bring his meanings out.  It's a film like Fincher's which
reminds us that it is okay for a film to sacrifice quality for
quantity (the final scene).  In fact, it tells us that we, as a
society, have become too critical of things which may happen to look a
little "fake."  Whenever something looks fake on screen, we
immediately point it out as a mistake.  But perhaps it isn't a
mistake.

Reviewed by Respect (respect@aros.net)
http://www.aros.net/~respect/movies.html

The review above was posted to the
rec.arts.movies.reviews newsgroup (de.rec.film.kritiken for German reviews).

The Internet Movie Database accepts no responsibility for the contents of the
review and has no editorial control. Unless stated otherwise, the copyright
belongs to the author.

Please direct comments/criticisms of the review to relevant newsgroups.

Broken URLs inthe reviews are the responsibility of the author.

The formatting of the review is likely to differ from the original due
to ASCII to HTML conversion.

Related links: index of all rec.arts.movies.reviews reviews


text:
package org.testmonkeys.jentitytest.test.unit.model.util;

import org.testmonkeys.jentitytest.framework.DateTimeComparison;
import org.testmonkeys.jentitytest.framework.StringComparison;

public class ModelWithMultipleAnnotationsOnMethod {

    @StringComparison
    @DateTimeComparison
    private String name;

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }
}


text:
if isinpath gls; then
    alias ls='gls --color=auto --quoting-style=literal'
elif isinpath colorls; then
    alias ls='colorls -FG'
fi

alias mutt='mutt -y'

if isinpath dtpstree; then
    alias pstree='dtpstree'
fi


text:
/*global desc, task, jake, fail, complete */
(function() {
  "use strict";

  desc("Build");
  task("default", ["lint", "docs", "test"], function() {});

  desc("Lint");
  task("lint", [], function() {
    var lint = require("./build/lint/lint_runner.js");
    var files = new jake.FileList();
    files.include("*.js");
    files.include("**/*.js");
    files.exclude("node_modules");
    files.exclude("public/bootstrap/*");
    var options = nodeLintOptions();
    var passed = lint.validateFileList(files.toArray(), options, {});
    if (!passed) fail("Lint failed.");
  });

  desc("Documentation");
  task("docs", [], function() {
    var files = [
      'app.js',
      'routes/campaign.js',
      'routes/index.js',
      'routes/login.js',
      'routes/representatives.js',
      'routes/twiml.js',
      'routes/user.js'
    ];
    var spawn = require('child_process').spawn,
        doc = spawn('docco', files);

    doc.stdout.on('data', function (data) {
      process.stdout.write(data);
    });
    doc.stderr.on('data', function (data) {
      process.stderr.write(data);
    });
  });

  desc("Test");
  task("test", [], function() {
    var ex = jake.createExec(['./node_modules/.bin/mocha --reporter list test/*.js'], {printStdout: true});
    ex.addListener('error', function (msg, code) {
      fail('Fatal error: ' + msg, code);
    });
    ex.run();
  });

  function nodeLintOptions() {
    return {
      bitwise: true,
      curly: false,
      eqeqeq: true,
      forin: true,
      immed: true,
      latedef: true,
      newcap: true,
      noarg: true,
      noempty: true,
      nonew: true,
      regexp: true,
      undef: true,
      strict: false,
      trailing: true,
      node: true,
      es5: true,
      jquery: true,
      browser: true,
      laxcomma: true,
      predef: [
        "Twilio",       // Used by Twilio
        "TwilioConfig", // Used by Twilio
        "describe",     // Used by mocha
        "it",           // Used by mocha
        "before",       // Used by mocha
        "beforeEach",   // Used by mocha
        "after",        // Used by mocha
        "afterEach"     // Used by mocha
      ]
    };
  }
}());


text:
<?php
/**
 * Sendega MMS/SSM Wrapper library -- Client Examples
 *
 * @author Anders Evenrud <andersevenrud@gmail.com>
 */

define("SENDEGA_USERNAME", "your_username");
define("SENDEGA_PASSWORD", "your_password");
define("SENDEGA_SENDER",   "your_number");

require realpath(__DIR__ . "/../src/Sendega.php");

$recipient = "0012345678"; // Country code + number

// Get recipient network information
var_dump(Sendega::SubscriberEnquiry($recipient));

// Get recipient location information
var_dump(Sendega::HomeLocationEnquiry($recipient));

// Send SMS
var_dump(Sendega::SendSMS($recipient, "This is an SMS message"));

// Send MMS (blob/string file attachments)
var_dump(Sendega::SendMMS($recipient, "MMS Message title", Array(
  "test.jpg" => file_get_contents("/tmp/test.jpg")
)));

// Send MMS (file attachments)
var_dump(Sendega::SendMMS($recipient, "MMS Message title", Array(
  "/tmp/test.jpg"
)));

?>


text:
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
// Code generated by Microsoft (R) AutoRest Code Generator.

package com.azure.resourcemanager.videoanalyzer.generated;

import com.azure.core.util.Context;

/** Samples for VideoAnalyzerOperationStatuses Get. */
public final class VideoAnalyzerOperationStatusesGetSamples {
    /*
     * x-ms-original-file: specification/videoanalyzer/resource-manager/Microsoft.Media/preview/2021-11-01-preview/examples/video-analyzer-operation-status-by-id-non-terminal-state-failed.json
     */
    /**
     * Sample code: Get status of asynchronous operation when it is completed with error.
     *
     * @param manager Entry point to VideoAnalyzerManager.
     */
    public static void getStatusOfAsynchronousOperationWhenItIsCompletedWithError(
        com.azure.resourcemanager.videoanalyzer.VideoAnalyzerManager manager) {
        manager
            .videoAnalyzerOperationStatuses()
            .getWithResponse("westus", "D612C429-2526-49D5-961B-885AE11406FD", Context.NONE);
    }

    /*
     * x-ms-original-file: specification/videoanalyzer/resource-manager/Microsoft.Media/preview/2021-11-01-preview/examples/video-analyzer-operation-status-by-id-terminal-state.json
     */
    /**
     * Sample code: Get status of asynchronous operation when it is completed.
     *
     * @param manager Entry point to VideoAnalyzerManager.
     */
    public static void getStatusOfAsynchronousOperationWhenItIsCompleted(
        com.azure.resourcemanager.videoanalyzer.VideoAnalyzerManager manager) {
        manager
            .videoAnalyzerOperationStatuses()
            .getWithResponse("westus", "D612C429-2526-49D5-961B-885AE11406FD", Context.NONE);
    }

    /*
     * x-ms-original-file: specification/videoanalyzer/resource-manager/Microsoft.Media/preview/2021-11-01-preview/examples/video-analyzer-operation-status-by-id-non-terminal-state.json
     */
    /**
     * Sample code: Get status of asynchronous operation when it is ongoing.
     *
     * @param manager Entry point to VideoAnalyzerManager.
     */
    public static void getStatusOfAsynchronousOperationWhenItIsOngoing(
        com.azure.resourcemanager.videoanalyzer.VideoAnalyzerManager manager) {
        manager
            .videoAnalyzerOperationStatuses()
            .getWithResponse("westus", "D612C429-2526-49D5-961B-885AE11406FD", Context.NONE);
    }
}


text:
package org.jpasecurity.persistence;

import javax.persistence.EntityManager;
import javax.persistence.EntityManagerFactory;
import javax.persistence.Persistence;

import org.jpasecurity.security.authentication.TestSecurityContext;
import org.junit.After;
import org.junit.Test;

/**
 * @author Arne Limburg
 * @author Johannes Siemer
 */
public class JpqlQueryParserTest {

    public static final String USER1 = "user1";

    @Test
    public void count() {
        executeQuery("SELECT COUNT(tb) FROM FieldAccessAnnotationTestBean tb");
    }

    @Test
    public void distinct() {
        executeQuery("SELECT DISTINCT tb1, tb2 "
            + "FROM FieldAccessAnnotationTestBean tb1, FieldAccessAnnotationTestBean tb2");
    }

    @Test
    public void exists() {
        executeQuery("SELECT tb FROM FieldAccessAnnotationTestBean tb "
            + "WHERE EXISTS(SELECT tb2 FROM FieldAccessAnnotationTestBean tb2)");
    }

    @Test
    public void dto() {
        executeQuery("SELECT new org.jpasecurity.dto.IdAndNameDto(tb.id, tb.name) "
            + "FROM FieldAccessAnnotationTestBean tb "
            + "WHERE EXISTS(SELECT tb2 FROM FieldAccessAnnotationTestBean tb2)");
    }

    @Test
    public void dtoConcat() {
        executeQuery("SELECT new org.jpasecurity.dto.IdAndNameDto(tb.id, concat(tb.id, tb.name)) "
            + "FROM FieldAccessAnnotationTestBean tb "
            + "WHERE EXISTS(SELECT tb2 FROM FieldAccessAnnotationTestBean tb2)");
    }

    @Test
    public void dtoConcatMultiParam() {
        executeQuery("SELECT new org.jpasecurity.dto.IdAndNameDto(tb.id, "
            + "concat(tb.id, tb.name, tb.name, tb.name, tb.name, tb.name, tb.name, tb.name, tb.name)) "
            + "FROM FieldAccessAnnotationTestBean tb "
            + "WHERE EXISTS(SELECT tb2 FROM FieldAccessAnnotationTestBean tb2)");
    }

    private void executeQuery(String query) {
        TestSecurityContext.authenticate(USER1);
        EntityManagerFactory factory = Persistence.createEntityManagerFactory("annotation-based-field-access");
        EntityManager entityManager = factory.createEntityManager();
        entityManager.getTransaction().begin();
        entityManager.createQuery(query).getResultList();
        entityManager.getTransaction().rollback();
        entityManager.close();
    }

    @After
    public void logout() {
        TestSecurityContext.authenticate(null);
    }
}


text:
title: 4-7-16
layout: post
author: george.dawson
permalink: /4-7-16/
source-id: 1VfmxjeDA8c3hCWLBw7c4_KGX0sPj-bkIzSYMboMRdMs
published: true
---
In class last lesson we learnt about internet safety and about our news articles, about sexting and revenge porn. This was interesting to find out what other people found out. The main thing we learnt was that not just that sexting is illegal if you are under age, it can also ruin any sort of social life. If you get caught sexting you get a criminal record, this means that if you try to get a job in the future, your chances are smaller.

We also got our Microbits, this was good because now we can test our code out for real rather than on a simulator. I just need to do a little bit more coding on my game and then it will be finished.


text:
<?xml version="1.0" encoding="UTF-8"?><res:ErrorResponse xmlns:res='http://www.dhl.com' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xsi:schemaLocation= 'http://www.dhl.com err-res.xsd'>
    <Response>
        <ServiceHeader>
            <MessageTime>2015-11-11T12:29:56+01:00</MessageTime>
            <MessageReference>1234567890123456789012345678901</MessageReference>
            <SiteID>xmlpidev</SiteID>
            <Password>xmlpidev</Password>
        </ServiceHeader>
        <Status>
            <ActionStatus>Error</ActionStatus>
            <Condition>
                <ConditionCode>108</ConditionCode>
                <ConditionData>System Unavailable:System UnavailableHTTP
                    transport error: java.net.ConnectException: Tried
                    all: '1' addresses, but could not connect
                    over HTTP to server:
                    'esb-eu-uat-ws.dhl.com', port: '80'</ConditionData>
            </Condition>
        </Status>
    </Response></res:ErrorResponse>


text:
"""Retrieves and displays available creative fields for a given string.

Results are limited to the first 10.

The LoadFromStorage method is pulling credentials and properties from a
"googleads.yaml" file. By default, it looks for this file in your home
directory. For more information, see the "Caching authentication information"
section of our README.

"""

# Import appropriate modules from the client library.
from googleads import dfa

ADVERTISER_ID = 'INSERT_ADVERTISER_ID_HERE'

def main(client, advertiser_id):
  # Initialize appropriate service.
  creative_field_service = client.GetService(
      'creativefield', 'v1.20', 'https://advertisersapitest.doubleclick.net')

  # Set up creative field search criteria structure.
  creative_field_search_criteria = {
      'advertiserIds': [advertiser_id],
      'pageSize': '10'
  }

  # Get creative fields for the selected criteria.
  results = creative_field_service.getCreativeFields(
      creative_field_search_criteria)

  # Display creative field names, IDs, advertiser IDs, and number of values.
  if results['records']:
    for creative_field in results['records']:
      print ('Creative field with name \'%s\', ID \'%s\', advertiser ID \'%s\','
             ' and containing \'%s\' values was found.'
             % (creative_field['name'], creative_field['id'],
                creative_field['advertiserId'],
                creative_field['totalNumberOfValues']))
  else:
    print 'No creative fields found for your criteria.'

if __name__ == '__main__':
  # Initialize client object.
  dfa_client = dfa.DfaClient.LoadFromStorage()
  main(dfa_client, ADVERTISER_ID)


text:
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="48dp"
    android:background="?selectableItemBackground">

    <View
        android:id="@+id/color"
        android:layout_width="32dp"
        android:layout_height="32dp"
        android:layout_centerVertical="true"
        android:layout_marginLeft="16dp"/>

    <TextView
        android:id="@+id/name"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_centerVertical="true"
        android:layout_marginLeft="72dp"
        android:layout_toLeftOf="@+id/count"
        android:ellipsize="end"
        android:maxLines="2"
        android:textSize="20sp" />

    <TextView
        android:id="@+id/count"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_centerVertical="true"
        android:layout_alignParentRight="true"
        android:layout_marginRight="16dp" />

</RelativeLayout>


text:
pymatgen.analysis.magnetism.heisenberg module
=============================================

.. automodule:: pymatgen.analysis.magnetism.heisenberg
   :members:
   :undoc-members:
   :show-inheritance:


text:
EONIL_PLATFORM_APPLE_CORE_GRAPHICS_NAMESPACE_BEGIN

class
DataProvider final : protected CoreFoundation::Type
{
public:
	using	Type::Type;

	DataProvider(CGDataProviderRef);

	operator CGDataProviderRef() const;

public:
	DataProvider(CoreFoundation::Data);

public:
	auto	copyData() const -> CoreFoundation::Data;
};

EONIL_PLATFORM_APPLE_CORE_GRAPHICS_NAMESPACE_END


text:
using System;
using System.Collections.Generic;
using System.Text;

namespace Rawr.DPSWarr {
    public class CharacterCalculationsDPSWarr : CharacterCalculationsBase {
        #region Variables
        public Stats AverageStats { get; set; }
        public Stats MaximumStats { get; set; }
        public Stats UnbuffedStats { get; set; }
        public Stats BuffedStats { get; set; }
        public Stats BuffsStats { get; set; } // The actual stats that come from Buffs
        public CombatFactors combatFactors { get; set; }
        public Rotation Rot { get; set; }
        #endregion

        #region Points
        private float _overallPoints = 0f;
        public override float OverallPoints { get { return _overallPoints; } set { _overallPoints = value; } }
        private float[] _subPoints = new float[] { 0f, 0f };
        public override float[] SubPoints { get { return _subPoints; } set { _subPoints = value; } }
        public float TotalDPS { get { return _subPoints[0]; } set { _subPoints[0] = value; } }
        public float TotalHPS;
        public float Survivability { get { return _subPoints[1]; } set { _subPoints[1] = value; } }
        #endregion

        #region Display Values
        public int TargetLevel { get; set; }
        public float Duration { get; set; }
        public string floorstring { get; set; }
#if (!RAWR3 && DEBUG)
        public long calculationTime { get; set; }
#endif
        #region Attack Table
        public float Miss { get; set; }
        public float HitRating { get; set; }
        public float ExpertiseRating { get; set; }
        public float Expertise { get; set; }
        public float MhExpertise { get; set; }
        public float OhExpertise { get; set; }
        public float WeapMastPerc { get; set; }
        public float AgilityCritBonus { get; set; }
        public float CritRating { get; set; }
        public float CritPercent { get; set; }
        public float MhCrit { get; set; }
        public float OhCrit { get; set; }
        #endregion
        #region Offensive
        public float BonusCritPercPoleAxeSpec { get; set; }
        public float ArmorPenetrationMaceSpec { get; set; }
        public float ArmorPenetrationStance { get; set; }
        public float ArmorPenetrationRating { get; set; }
        public float ArmorPenetrationRating2Perc { get; set; }
        public float ArmorPenetration { get; set; }
        public float MaxArmorPenetration { get; set; }
        public float buffedArmorPenetration { get; set; }
        public float HasteRating { get; set; }
        public float HastePercent { get; set; }
        public float WeaponSpeed { get; set; }
        public float TeethBonus { get; set; }
        #endregion
        #region DPS
        // White
        public Skills.WhiteAttacks Whites { get; set; }
        public float WhiteDPS { get; set; }
        public float WhiteDmg { get; set; }
        public float WhiteDPSMH { get; set; }
        public float WhiteDPSOH { get; set; }
        public float SpecProcDPS { get; set; }
        public float TotalDamagePerSecond { get; set; }
        #endregion
        #region Abilities
        // Markov Work
        public Skills.FakeWhite FW { get; set; }
        #endregion
        #region Neutral
        public float BaseHealth { get; set; }
        public float WhiteRage { get; set; }
        public float OtherRage { get; set; }
        public float NeedyRage { get; set; }
        public float FreeRage { get; set; }
        public float Stamina { get; set; }
        public float Health { get; set; }
        #endregion
        #region Defensive
        public float Armor { get; set; }
        public float CritReduction { get; set; }
        public float ArmorReduction { get; set; }
        public float GuaranteedReduction { get; set; }
        public float damageReduc { get; set; }
        public float MissedAttacks { get; set; }
        public float AvoidedAttacks { get; set; }
        public float DodgedAttacks { get; set; }
        public float ParriedAttacks { get; set; }
        public float BlockedAttacks { get; set; }
        #endregion
        #endregion

        private string GenFormattedString(string[] passiveContrs) { return GenFormattedString(passiveContrs, false, false, false); }
        private string GenFormattedString(string[] passiveContrs, bool hasCap, bool unprocisOverCap, bool procisOverCap)
        {
            int formIter = 2;
            string theFormat = "";

            theFormat += "{0:00.00%} : {1}*"; // Averaged % and Averaged Rating
            theFormat += "The Pane shows Averaged Values";
            theFormat += "\r\n";
            if (passiveContrs.Length > 0) {
                theFormat += "\r\n= Your Passive Contributions =";
                foreach (string passiveContr in passiveContrs) {
                    theFormat += "\r\n{" + formIter.ToString() + ":00.00%} : " + passiveContr;
                    formIter++;
                }
                theFormat += "\r\n";
            }
            theFormat += "\r\n= UnProc'd =";
            theFormat += "\r\n{" + formIter.ToString() + ":0.#} : Rating"; formIter++;
            theFormat += "\r\n{" + formIter.ToString() + ":00.00%} : Percent"; formIter++;
            if (hasCap) { theFormat += "\r\n" + (unprocisOverCap ? "{" + formIter.ToString() + ":0.#} Rating Over Cap"
                                                                 : "{" + formIter.ToString() + ":0.#} Rating Under Cap"); formIter++; }
            theFormat += "\r\n";
            theFormat += "\r\n= Proc'd =";
            theFormat += "\r\n{" + formIter.ToString() + ":0.#} : Rating"; formIter++;
            theFormat += "\r\n{" + formIter.ToString() + ":00.00%} : Percent"; formIter++;
            if (hasCap) { theFormat += "\r\n" + (procisOverCap ? "{" + formIter.ToString() + ":0.#} Rating Over Cap"
                                                               : "{" + formIter.ToString() + ":0.#} Rating Under Cap"); formIter++; }

            return theFormat;
        }
        private string GenFormattedString(string[] passiveContrs, bool hasCap,
            bool whunprocisOverCap, bool whprocisOverCap,
            bool ywunprocisOverCap, bool ywprocisOverCap)
        {
            int formIter = 2;
            string theFormat = "";

            theFormat += "{0:00.00%} : {1}*"; // Averaged % and Averaged Rating
            theFormat += "The Pane shows Averaged Values";
            theFormat += "\r\n";
            if (passiveContrs.Length > 0) {
                theFormat += "\r\n= Your Passive Contributions =";
                foreach (string passiveContr in passiveContrs) {
                    theFormat += "\r\n{" + formIter.ToString() + ":00.00%} : " + passiveContr;
                    formIter++;
                }
                theFormat += "\r\n";
            }
            theFormat += "\r\n= UnProc'd =";
            theFormat += "\r\n{" + formIter.ToString() + ":0.#} : Rating"; formIter++;
            theFormat += "\r\n{" + formIter.ToString() + ":00.00%} : Percent"; formIter++;
            if (hasCap) {
                theFormat += "\r\n{" + formIter.ToString() + ":0.#} Rating "
                                     + (whunprocisOverCap ? "Over White Cap" : "Under White Cap");
                formIter++;
            }
            theFormat += "\r\n{" + formIter.ToString() + ":00.00%} : Percent"; formIter++;
            if (hasCap) {
                theFormat += "\r\n{" + formIter.ToString() + ":0.#} Rating "
                                     + (ywunprocisOverCap ? "Over Yellow Cap" : "Under Yellow Cap");
                formIter++;
            }
            theFormat += "\r\n";
            theFormat += "\r\n= Proc'd =";
            theFormat += "\r\n{" + formIter.ToString() + ":0.#} : Rating"; formIter++;
            theFormat += "\r\n{" + formIter.ToString() + ":00.00%} : Percent"; formIter++;
            if (hasCap) {
                theFormat += "\r\n{" + formIter.ToString() + ":0.#} Rating "
                + (whprocisOverCap ? "Over White Cap" : "Under White Cap");
                formIter++;
            }
            theFormat += "\r\n{" + formIter.ToString() + ":00.00%} : Percent"; formIter++;
            if (hasCap) {
                theFormat += "\r\n{" + formIter.ToString() + ":0.#} Rating "
                    + (ywprocisOverCap ? "Over Yellow Cap" : "Under Yellow Cap");
                formIter++;
            }

            return theFormat;
        }

        public override Dictionary<string, string> GetCharacterDisplayCalculationValues() {
            Dictionary<string, string> dictValues = new Dictionary<string, string>();
            string format = "";
            int LevelDif = combatFactors.levelDif;

            // Base Stats
            dictValues.Add("Health and Stamina", string.Format("{0:##,##0} : {1:##,##0}*" +
                                "{2:00,000} : Base Health" +
                                "\r\n{3:00,000} : Stam Bonus",
                                AverageStats.Health, AverageStats.Stamina,
                                BaseHealth,
                                StatConversion.GetHealthFromStamina(AverageStats.Stamina)));
            dictValues.Add("Armor", string.Format("{0}*Increases Attack Power by {1}", Armor, TeethBonus));
            #region Strength
            {
                int formIter = 1;
                string theFormat = "";

                float[] passiveContrsVals = new float[] {
                    combatFactors.Char.WarriorTalents.StrengthOfArms * 0.02f,
                    (combatFactors.FuryStance ? combatFactors.Char.WarriorTalents.ImprovedBerserkerStance * 0.04f : 0f),
                    BuffsStats.Strength,
                    BuffsStats.BonusStrengthMultiplier,
                };

                string[] passiveContrs = new string[] {
                    "Strength of Arms",
                    "Improved Berserker Stance",
                    "Buffs : Simple",
                    "Buffs : Multi",
                };

                theFormat += "{0:0.#}*"; // Averaged % and Averaged Rating
                theFormat += "The Pane shows Averaged Values";
                theFormat += "\r\n";
                theFormat += "\r\n= Your Passive Contributions =";
                theFormat += "\r\n{" + formIter.ToString() + ":00.#%} : " + passiveContrs[0]; formIter++;
                theFormat += "\r\n{" + formIter.ToString() + ":00.#%} : " + passiveContrs[1]; formIter++;
                theFormat += "\r\n{" + formIter.ToString() + ":0.#} : "   + passiveContrs[2]; formIter++;
                theFormat += "\r\n{" + formIter.ToString() + ":00.#%} : " + passiveContrs[3]; formIter++;
                theFormat += "\r\n";
                theFormat += "\r\n= UnProc'd =";
                theFormat += "\r\nValue: {" + formIter.ToString() + ":0.#}"; formIter++;
                theFormat += "\r\nIncreases Attack Power by {" + formIter.ToString() + ":0.#}"; formIter++;
                theFormat += "\r\n";
                theFormat += "\r\n= Proc'd =";
                theFormat += "\r\nValue: {" + formIter.ToString() + ":0.#}"; formIter++;
                theFormat += "\r\nIncreases Attack Power by {" + formIter.ToString() + ":0.#}"; formIter++;

                dictValues.Add("Strength", string.Format(theFormat,
                    // Averaged Stats
                    AverageStats.Strength,
                    // Passive Contributions
                    passiveContrsVals[0], passiveContrsVals[1], passiveContrsVals[2], passiveContrsVals[3],
                    // UnProc'd Stats
                    BuffedStats.Strength,
                    BuffedStats.Strength * 2f,
                    // Proc'd Stats
                    MaximumStats.Strength,
                    MaximumStats.Strength * 2f
                    ));
            }
            #endregion
            dictValues.Add("Attack Power", string.Format("{0}*"+
                                "Increases White DPS by {1:0.0}\r\n"+
                                "\r\n"+
                                "Buffed: {2:0}\r\n"+
                                "Proc'd: {3:0}\r\n", (int)AverageStats.AttackPower, AverageStats.AttackPower / 14f,
                                BuffedStats.AttackPower, MaximumStats.AttackPower));
            #region Agility
            {
                int formIter = 1;
                string theFormat = "";

                float[] passiveContrsVals = new float[] {
                    BuffsStats.Agility,
                    BuffsStats.BonusAgilityMultiplier,
                };

                string[] passiveContrs = new string[] { "Buffs : Simple", "Buffs : Multi" };

                theFormat += "{0:0.#}*"; // Averaged % and Averaged Rating
                theFormat += "The Pane shows Averaged Values";
                theFormat += "\r\n";
                theFormat += "\r\n= Your Passive Contributions =";
                theFormat += "\r\n{" + formIter.ToString() + ":0.#} : " + passiveContrs[0]; formIter++;
                theFormat += "\r\n{" + formIter.ToString() + ":00.#%} : " + passiveContrs[1]; formIter++;
                theFormat += "\r\n";
                theFormat += "\r\n= UnProc'd =";
                theFormat += "\r\nIncreases Crit by {" + formIter.ToString() + ":0.#%}"; formIter++;
                theFormat += "\r\nIncreases Armor by {" + formIter.ToString() + ":0.#}"; formIter++;
                theFormat += "\r\n";
                theFormat += "\r\n= Proc'd =";
                theFormat += "\r\nIncreases Crit by {" + formIter.ToString() + ":0.#%}"; formIter++;
                theFormat += "\r\nIncreases Armor by {" + formIter.ToString() + ":0.#}"; formIter++;

                dictValues.Add("Agility", string.Format(theFormat,
                    // Averaged Stats
                    AverageStats.Agility,
                    // Passive Contributions
                    passiveContrsVals[0], passiveContrsVals[1],
                    // UnProc'd Stats
                    StatConversion.GetCritFromAgility(BuffedStats.Agility, CharacterClass.Warrior),
                    StatConversion.GetArmorFromAgility(BuffedStats.Agility),
                    // Proc'd Stats
                    StatConversion.GetCritFromAgility(MaximumStats.Agility, CharacterClass.Warrior),
                    StatConversion.GetArmorFromAgility(MaximumStats.Agility)
                    ));
            }
            #endregion
            #region Crit
            {
                // sub to add neg number as pos, for overcapping to compensate
                // for boss level on yellows (or whites, I dont remember which)
                // Whites clip crit cap with glances, dodges, parries, misses
                float WhCritCap = 1f;// +StatConversion.NPC_LEVEL_CRIT_MOD[LevelDif];
                //float YwCritCap = 1f + StatConversion.NPC_LEVEL_CRIT_MOD[LevelDif];
                if (combatFactors.useOH)
                {
                    WhCritCap -= (Whites.OHAtkTable.Glance + Whites.OHAtkTable.AnyNotLand);
                //    YwCritCap -= (new AttackTable(combatFactors.Char, BuffedStats, combatFactors, combatFactors.CalcOpts, FW, false, false, false)).AnyNotLand;
                }
                else
                {
                    WhCritCap -= (Whites.MHAtkTable.Glance + Whites.MHAtkTable.AnyNotLand);
                    // Yellows clip crit cap with dodges, parries, misses
                //    YwCritCap -= (new AttackTable(combatFactors.Char, BuffedStats, combatFactors, combatFactors.CalcOpts, FW, true, false, false)).AnyNotLand;
                }
                float useRamp = 0f;
                if (combatFactors.Char.WarriorTalents.Rampage > 0f) useRamp = 0.05f;
                float[] passiveContrsVals = new float[] {
                    0.03192f,
                    AgilityCritBonus,
                    StatConversion.GetCritFromRating(BuffedStats.CritRating + BuffedStats.DeathbringerProc),
                    combatFactors.Char.WarriorTalents.Cruelty * 0.01f,
                    (combatFactors.FuryStance ? 0.03f : 0f),
                    (combatFactors.FuryStance ? AverageStats.BonusWarrior_T9_2P_Crit : 0f),
                    BonusCritPercPoleAxeSpec,
                    BuffsStats.PhysicalCrit + useRamp,
                };
                float passiveContrsTtlVal = passiveContrsVals[0] + passiveContrsVals[1] + passiveContrsVals[2]
                                          + passiveContrsVals[3] + passiveContrsVals[4] + passiveContrsVals[5]
                                          + passiveContrsVals[6] + passiveContrsVals[7];
                string[] passiveContrs = new string[] { "Base Crit", "From Agility", "From Crit Rating", "Cruelty",
                                                        "Berserker Stance", "T9 2P Set Bonus", "Poleaxe Specialization",
                                                        "Buffs" };

                //float WhUnProcdCrit = StatConversion.GetCritFromRating(BuffedStats.CritRating + BuffedStats.DeathbringerProc);
                float WhProcdCrit = StatConversion.GetCritFromRating(MaximumStats.CritRating + MaximumStats.DeathbringerProc - BuffedStats.CritRating - BuffedStats.DeathbringerProc);
                bool isWhUnProcdOverCap = passiveContrsTtlVal > WhCritCap;
                bool isWhProcdOverCap = passiveContrsTtlVal + WhProcdCrit > WhCritCap;
                float amountWhUnProcdOverCap = Math.Abs(StatConversion.GetRatingFromCrit(WhCritCap - passiveContrsTtlVal));
                float amountWhProcdOverCap = Math.Abs(StatConversion.GetRatingFromCrit(WhCritCap - (passiveContrsTtlVal + WhProcdCrit)));

                float YwUnProcdCrit = StatConversion.GetCritFromRating(BuffedStats.CritRating + BuffedStats.DeathbringerProc);
                float YwProcdCrit = StatConversion.GetCritFromRating(MaximumStats.CritRating + MaximumStats.DeathbringerProc);
                //bool isYwUnProcdOverCap = passiveContrsTtlVal + YwUnProcdCrit > YwCritCap;
                //bool isYwProcdOverCap = passiveContrsTtlVal + YwProcdCrit > YwCritCap;
                //float amountYwUnProcdOverCap = Math.Abs(StatConversion.GetRatingFromCrit(YwCritCap - (passiveContrsTtlVal + YwUnProcdCrit)));
                //float amountYwProcdOverCap = Math.Abs(StatConversion.GetRatingFromCrit(YwCritCap - (passiveContrsTtlVal + YwProcdCrit)));

                string theFormat = GenFormattedString(passiveContrs, true,
                    isWhUnProcdOverCap, isWhProcdOverCap
                    //isYwUnProcdOverCap, isYwProcdOverCap
                    );

                dictValues.Add("Crit", string.Format(theFormat,
                    // Averaged Stats
                    CritPercent, AverageStats.CritRating,
                    // Passive Contributions
                    passiveContrsVals[0], passiveContrsVals[1], passiveContrsVals[2],
                    passiveContrsVals[3], passiveContrsVals[4], passiveContrsVals[5],
                    passiveContrsVals[6], passiveContrsVals[7],
                    // UnProc'd Stats
                    BuffedStats.CritRating + BuffedStats.DeathbringerProc,
                    Math.Min(WhCritCap, passiveContrsTtlVal), amountWhUnProcdOverCap,
                    //Math.Min(YwCritCap, passiveContrsTtlVal + YwUnProcdCrit), amountYwUnProcdOverCap,
                    // Proc'd Stats
                    MaximumStats.CritRating + MaximumStats.DeathbringerProc,
                    Math.Min(WhCritCap, passiveContrsTtlVal + WhProcdCrit), amountWhProcdOverCap
                    //Math.Min(YwCritCap, passiveContrsTtlVal + YwProcdCrit), amountYwProcdOverCap
                    ));
            }
            #endregion
            #region Armor Penetration
            {
                float ArPCap = 1.00f;
                float[] passiveContrsVals = new float[] {
                    (!combatFactors.FuryStance ? 0.10f : 0f),
                    (!combatFactors.FuryStance ? AverageStats.BonusWarrior_T9_2P_ArP : 0f),
                    ArmorPenetrationMaceSpec
                };
                float passiveContrsTtlVal = passiveContrsVals[0] + passiveContrsVals[1] + passiveContrsVals[2];
                string[] passiveContrs = new string[] { "Battle Stance", "T9 2P Set Bonus", "Mace Specialization" };
                float UnProcdArP = StatConversion.GetArmorPenetrationFromRating(BuffedStats.ArmorPenetrationRating);
                float ProcdArP = StatConversion.GetArmorPenetrationFromRating(MaximumStats.ArmorPenetrationRating);
                bool isUnProcdOverCap = passiveContrsTtlVal + UnProcdArP > ArPCap;
                bool isProcdOverCap = passiveContrsTtlVal + ProcdArP > ArPCap;
                float amountUnProcdOverCap = Math.Abs(StatConversion.GetRatingFromArmorPenetration(ArPCap - (passiveContrsTtlVal + UnProcdArP)));
                float amountProcdOverCap = Math.Abs(StatConversion.GetRatingFromArmorPenetration(ArPCap - (passiveContrsTtlVal + ProcdArP)));
                string theFormat = GenFormattedString(passiveContrs, true, isUnProcdOverCap, isProcdOverCap);
                dictValues.Add("Armor Penetration", string.Format(theFormat,
                    // Averaged Stats
                    ArmorPenetration, AverageStats.ArmorPenetrationRating,
                    // Passive Contributions
                    passiveContrsVals[0], passiveContrsVals[1], passiveContrsVals[2],
                    // UnProc'd Stats
                    BuffedStats.ArmorPenetrationRating,
                    Math.Min(ArPCap, passiveContrsTtlVal + UnProcdArP),
                    amountUnProcdOverCap,
                    // Proc'd Stats
                    MaximumStats.ArmorPenetrationRating,
                    Math.Min(ArPCap, passiveContrsTtlVal + ProcdArP),
                    amountProcdOverCap
                    ));
            }
            #endregion
            #region Haste
            {
                // Haste has no cap? Shouldn't there be a 100% cap or something?
                // We should also state the before/after effects of haste on white swings
                // Maybe a good point to show how much swing time is lost to Slams too?
                float heroism = 0f;
                if (BuffsStats._rawSpecialEffectData != null)
                {
                    foreach (SpecialEffect effect in BuffsStats._rawSpecialEffectData)
                    {
                        if (effect != null && effect.Stats.PhysicalHaste > 0) {
                            heroism = effect.GetAverageStats().PhysicalHaste;
                        }
                    }
                }
                float[] passiveContrsVals = new float[] {
                    combatFactors.Char.WarriorTalents.BloodFrenzy * 0.05f,
                    BuffsStats.PhysicalHaste,
                    heroism,
                };
                float passiveContrsTtlVal = (1f + passiveContrsVals[0])
                                          * (1f + passiveContrsVals[1])
                                          * (1f + passiveContrsVals[2])
                                          - 1f;
                string[] passiveContrs = new string[] { "Blood Frenzy", "Buffs", "Heroism (Averaged)" };
                float UnProcdHaste = StatConversion.GetHasteFromRating(BuffedStats.HasteRating, CharacterClass.Warrior);
                float ProcdHaste = StatConversion.GetHasteFromRating(MaximumStats.HasteRating, CharacterClass.Warrior);
                string theFormat = GenFormattedString(passiveContrs);

                dictValues.Add("Haste", string.Format(theFormat,
                    // Averaged Stats
                    HastePercent, AverageStats.HasteRating,
                    // Passive Contributions
                    passiveContrsVals[0], passiveContrsVals[1], passiveContrsVals[2],
                    // UnProc'd Stats
                    BuffedStats.HasteRating,
                    (1f + passiveContrsTtlVal) * (1f + UnProcdHaste) - 1f,
                    // Proc'd Stats
                    MaximumStats.HasteRating,
                    (1f + passiveContrsTtlVal) * (1f + ProcdHaste) - 1f
                    ));
            }
            #endregion
            #region Hit
            {
                // old
                float HitPercent = StatConversion.GetHitFromRating(HitRating);
                float HitPercBonus = AverageStats.PhysicalHit;
                // Hit Soft Cap ratings check, how far from it
                float capA1         = StatConversion.WHITE_MISS_CHANCE_CAP[LevelDif];
                float convcapA1     = (float)Math.Ceiling(StatConversion.GetRatingFromHit(capA1));
                float sec2lastNumA1 = (convcapA1 - StatConversion.GetRatingFromHit(HitPercent) - StatConversion.GetRatingFromHit(HitPercBonus)) * -1;
                //float lastNumA1    = StatConversion.GetRatingFromExpertise((convcapA1 - Math.Min(MhExpertise, (OhExpertise != 0 ? OhExpertise : MhExpertise))) * -1);
                // Hit Hard Cap ratings check, how far from it
                float capA2         = StatConversion.WHITE_MISS_CHANCE_CAP_DW[LevelDif];
                float convcapA2     = (float)Math.Ceiling(StatConversion.GetRatingFromHit(capA2));
                float sec2lastNumA2 = (convcapA2 - StatConversion.GetRatingFromHit(HitPercent) - StatConversion.GetRatingFromHit(HitPercBonus)) * -1;
                //float lastNumA2   = StatConversion.GetRatingFromExpertise((sec2lastNumA2 - Math.Min(MhExpertise, (OhExpertise != 0 ? OhExpertise : MhExpertise))) * -1);
                dictValues.Add("Hit",
                    string.Format("{0:00.00%} : {1}*" + "{2:0.00%} : From Other Bonuses" +
                                    "\r\n{3:0.00%} : Total Hit % Bonus" +
                                    "\r\n\r\nWhite Two-Hander Cap: " +
                                    (sec2lastNumA1 > 0 ? "You can free {4:0} Rating"
                                                       : "You need {4:0} more Rating") +
                                    "\r\nWhite Dual Wield Cap: " +
                                    (sec2lastNumA2 > 0 ? "You can free {5:0} Rating"
                                                       : "You need {5:0} more Rating"),
                                    StatConversion.GetHitFromRating(AverageStats.HitRating),
                                    AverageStats.HitRating,
                                    HitPercBonus,
                                    HitPercent + HitPercBonus,
                                    (sec2lastNumA1 > 0 ? sec2lastNumA1 : sec2lastNumA1 * -1),
                                    (sec2lastNumA2 > 0 ? sec2lastNumA2 : sec2lastNumA2 * -1)
                                ));
            }
            #endregion
            #region Expertise
            {
                // Dodge Cap ratings check, how far from it, uses lesser of MH and OH
                // Also factors in Weapon Mastery
                float capB1         = StatConversion.YELLOW_DODGE_CHANCE_CAP[LevelDif] - WeapMastPerc;
                float convcapB1     = (float)Math.Ceiling(StatConversion.GetExpertiseFromDodgeParryReduc(capB1));
                float sec2lastNumB1 = (convcapB1 - Math.Min(MhExpertise, (OhExpertise != 0 ? OhExpertise : MhExpertise))) * -1;
                float lastNumB1     = StatConversion.GetRatingFromExpertise((convcapB1 - WeapMastPerc - Math.Min(MhExpertise, (OhExpertise != 0 ? OhExpertise : MhExpertise))) * -1);
                // Parry Cap ratings check, how far from it, uses lesser of MH and OH
                float capB2         = StatConversion.YELLOW_PARRY_CHANCE_CAP[LevelDif];
                float convcapB2     = (float)Math.Ceiling(StatConversion.GetExpertiseFromDodgeParryReduc(capB2));
                float sec2lastNumB2 = (convcapB2 - Math.Min(MhExpertise, (OhExpertise != 0 ? OhExpertise : MhExpertise))) * -1;
                float lastNumB2     = StatConversion.GetRatingFromExpertise((convcapB2 - Math.Min(MhExpertise, (OhExpertise != 0 ? OhExpertise : MhExpertise))) * -1);
                dictValues.Add("Expertise",
                    string.Format("{0:00.00%} : {1:00.00} : {2}*" +
                    "Following includes Racial bonus and Strength of Arms" +
                    "\r\n{3:00.00%} Weapon Mastery (Dodge Only)" +
                    "\r\n{4:00.00%} : {5:00.00} : MH" +
                    "\r\n{6:00.00%} : {7:00.00} : OH" +
                    "\r\n\r\n" + "Dodge Cap: " +
                    (lastNumB1 > 0 ? "You can free {8:0} Expertise ({9:0} Rating)"
                                 : "You need {8:0} more Expertise ({9:0} Rating)") +
                    "\r\n" + "Parry Cap: " +
                    (lastNumB2 > 0 ? "You can free {10:0} Expertise ({11:0} Rating)"
                                 : "You need {10:0} more Expertise ({11:0} Rating)"),
                    StatConversion.GetDodgeParryReducFromExpertise(Expertise),
                    Expertise,
                    AverageStats.ExpertiseRating,
                    WeapMastPerc,
                    StatConversion.GetDodgeParryReducFromExpertise(MhExpertise), MhExpertise,
                    StatConversion.GetDodgeParryReducFromExpertise(OhExpertise), OhExpertise,
                    (sec2lastNumB1 > 0 ? sec2lastNumB1 : sec2lastNumB1 * -1), (lastNumB1 > 0 ? lastNumB1 : lastNumB1 * -1),
                    (sec2lastNumB2 > 0 ? sec2lastNumB2 : sec2lastNumB2 * -1), (lastNumB2 > 0 ? lastNumB2 : lastNumB2 * -1)
                ));
            }
            #endregion

            dictValues.Add("Description", string.Format("DPS : PerHit : #ActsD"));
            // DPS Abilities
            format = "{0:0000} : {1:00000} : {2:000.00}";
            if (TotalDPS < 0f) { TotalDPS = 0f; }
            foreach (Rawr.DPSWarr.Rotation.AbilWrapper aw in Rot.GetAbilityList()) {
                if (!aw.ability.Name.Equals("Invalid")) {
                    dictValues.Add(aw.ability.Name, string.Format(format, aw.allDPS, aw.ability.DamageOnUse, aw.allNumActivates)
                                                    + aw.ability.GenTooltip(aw.allNumActivates, aw.allDPS / TotalDPS));
                }
            }
            // DPS General
            dictValues.Add("White DPS",             string.Format("{0:0000} : {1:00000}", WhiteDPS, WhiteDmg) + Whites.GenTooltip(WhiteDPSMH, WhiteDPSOH, TotalDPS));
            dictValues.Add("Deep Wounds",           string.Format("{0:0000}*{1:00.0%} of DPS", Rot.DW.TickSize,Rot.DW.TickSize/TotalDPS));
            dictValues.Add("Special DMG Procs",     string.Format("{0:0000}*{1:00.0%} of DPS", SpecProcDPS, SpecProcDPS / TotalDPS));
            dictValues.Add("Total DPS",             string.Format("{0:#,##0} : {1:#,###,##0}*"+Rot.GCDUsage,TotalDPS,TotalDPS*Duration));
            // Rage
            format = "{0:0000}";
            dictValues.Add("Total Generated Rage",      string.Format("{0:00} = {1:0} + {2:0}", WhiteRage + OtherRage, WhiteRage, OtherRage));
            dictValues.Add("Needed Rage for Abilities", string.Format(format,NeedyRage));
            dictValues.Add("Available Free Rage",       string.Format(format,FreeRage ));
#if (!RAWR3 && DEBUG)
            dictValues.Add("Calculation Time", string.Format("{0}", calculationTime));
#endif
            return dictValues;
        }

        public override float GetOptimizableCalculationValue(string calculation) {
            switch (calculation) {
                case "Health": return AverageStats.Health;
                case "Armor": return AverageStats.Armor + AverageStats.BonusArmor;
                case "Strength": return AverageStats.Strength;
                case "Attack Power": return AverageStats.AttackPower;
                case "Agility": return AverageStats.Agility;
                case "Crit %": return combatFactors._c_mhycrit * 100f;
                case "Haste %": return combatFactors.TotalHaste * 100f;
                case "ArP %": return AverageStats.ArmorPenetration * 100f;
                case "% Chance to Miss (White)": return combatFactors._c_wmiss * 100f;
                case "% Chance to Miss (Yellow)": return combatFactors._c_ymiss * 100f;
                case "% Chance to be Dodged": return combatFactors._c_mhdodge * 100f;
                case "% Chance to be Parried": return combatFactors._c_mhparry * 100f;
                case "% Chance to be Avoided (Yellow/Dodge)":
                    return combatFactors._c_ymiss * 100f + combatFactors._c_mhdodge * 100f;
            }
            return 0.0f;
        }
    }
}


text:
{% load static %}
<!DOCTYPE html>

        <meta charset="utf-8">
        <meta http-equiv="X-UA-Compatible" content="IE=edge">
        <meta name="viewport" content="width=device-width, initial-scale=1">
        <title>{% block title %}{% endblock %}</title>
        <link rel="stylesheet" type="text/css" href="{% static 'blog/bootstrap.min.css' %}">

                    <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1" aria-expanded="false">
                        Toggle navigation

                    </button>
                    {% block blogname %}{% endblock %}

Link 1

Link 2

        {% block content %}
        {% endblock %}


text:
.class interface abstract synthetic Lcom/google/common/collect/package-info;
.super Ljava/lang/Object;
.source "package-info.java"

# annotations
.annotation runtime Ljavax/annotation/ParametersAreNonnullByDefault;
.end annotation


text:
<?xml version="1.0"?>
<psalm
    errorLevel="1"
    resolveFromConfigFile="true"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns="https://getpsalm.org/schema/config"
    xsi:schemaLocation="https://getpsalm.org/schema/config vendor/vimeo/psalm/config.xsd"
>
    <projectFiles>
        <directory name="php"/>
        <directory name="app/api"/>
        <directory name="test/php"/>
        <ignoreFiles>
            <directory name="vendor"/>
        </ignoreFiles>
    </projectFiles>
    <plugins>
        <pluginClass class="Psalm\PhpUnitPlugin\Plugin"/>
    </plugins>
</psalm>


text:
package com.hazelcast.map.impl.journal;

import com.hazelcast.internal.nio.IOUtil;
import com.hazelcast.map.impl.MapDataSerializerHook;
import com.hazelcast.nio.ObjectDataInput;
import com.hazelcast.nio.ObjectDataOutput;
import com.hazelcast.internal.serialization.Data;
import com.hazelcast.nio.serialization.IdentifiedDataSerializable;

import java.io.IOException;

/**
 * The event journal item for map events. It contains serialized
 * values for key and all values included in map mutations as well as
 * the event type.
 */
public class InternalEventJournalMapEvent implements IdentifiedDataSerializable {
    protected Data dataKey;
    protected Data dataNewValue;
    protected Data dataOldValue;
    protected int eventType;

    public InternalEventJournalMapEvent() {
    }

    public InternalEventJournalMapEvent(Data dataKey, Data dataNewValue, Data dataOldValue, int eventType) {
        this.eventType = eventType;
        this.dataKey = dataKey;
        this.dataNewValue = dataNewValue;
        this.dataOldValue = dataOldValue;
    }

    public Data getDataKey() {
        return dataKey;
    }

    public Data getDataNewValue() {
        return dataNewValue;
    }

    public Data getDataOldValue() {
        return dataOldValue;
    }

    /**
     * Return the integer defining the event type. It can be turned into an
     * enum value by calling {@link com.hazelcast.core.EntryEventType#getByType(int)}.
     *
     * @return the integer defining the event type
     */
    public int getEventType() {
        return eventType;
    }

    @Override
    public int getFactoryId() {
        return MapDataSerializerHook.F_ID;
    }

    @Override
    public int getClassId() {
        return MapDataSerializerHook.EVENT_JOURNAL_INTERNAL_MAP_EVENT;
    }

    @Override
    public void writeData(ObjectDataOutput out) throws IOException {
        out.writeInt(eventType);
        IOUtil.writeData(out, dataKey);
        IOUtil.writeData(out, dataNewValue);
        IOUtil.writeData(out, dataOldValue);
    }

    @Override
    public void readData(ObjectDataInput in) throws IOException {
        eventType = in.readInt();
        dataKey = IOUtil.readData(in);
        dataNewValue = IOUtil.readData(in);
        dataOldValue = IOUtil.readData(in);
    }

    @Override
    @SuppressWarnings("checkstyle:npathcomplexity")
    public boolean equals(Object o) {
        if (this == o) {
            return true;
        }
        if (o == null || getClass() != o.getClass()) {
            return false;
        }

        InternalEventJournalMapEvent that = (InternalEventJournalMapEvent) o;

        if (eventType != that.eventType) {
            return false;
        }
        if (dataKey != null ? !dataKey.equals(that.dataKey) : that.dataKey != null) {
            return false;
        }
        if (dataNewValue != null ? !dataNewValue.equals(that.dataNewValue) : that.dataNewValue != null) {
            return false;
        }
        return dataOldValue != null ? dataOldValue.equals(that.dataOldValue) : that.dataOldValue == null;
    }

    @Override
    public int hashCode() {
        int result = dataKey != null ? dataKey.hashCode() : 0;
        result = 31 * result + (dataNewValue != null ? dataNewValue.hashCode() : 0);
        result = 31 * result + (dataOldValue != null ? dataOldValue.hashCode() : 0);
        result = 31 * result + eventType;
        return result;
    }

    @Override
    public String toString() {
        return getClass().getSimpleName() + "{eventType=" + eventType + '}';
    }
}


text:
namespace metaforce {
class CElementGen;
class CGenDescription;

class CScriptEMPulse : public CActor {
  float xe8_duration;
  float xec_finalRadius;
  float xf0_currentRadius;
  float xf4_initialRadius;
  float xf8_interferenceDur;
  float xfc_;
  float x100_interferenceMag;
  float x104_;
  TCachedToken<CGenDescription> x108_particleDesc;
  std::unique_ptr<CElementGen> x114_particleGen;
  zeus::CAABox CalculateBoundingBox() const;

public:
  CScriptEMPulse(TUniqueId, std::string_view, const CEntityInfo&, const zeus::CTransform&, bool, float, float, float,
                 float, float, float, float, CAssetId);

  void Accept(IVisitor&) override;
  void Think(float, CStateManager&) override;
  void AcceptScriptMsg(EScriptObjectMessage, TUniqueId, CStateManager&) override;
  void AddToRenderer(const zeus::CFrustum&, CStateManager&) override;
  void CalculateRenderBounds() override;
  std::optional<zeus::CAABox> GetTouchBounds() const override;
  void Touch(CActor&, CStateManager&) override;
};
} // namespace metaforce


text:
/**
  * Car.java program
  * @author Matthew Soulanille
  * @version 2014-09-24
*/

public class Car
{
    public double efficiency; // distance per fuel
    public double gas;

    public Car(double newEfficiency)
    {
	assert efficiency > 0 : "Must have positive efficiency";
	efficiency = newEfficiency;
	gas = 0.0;
    }

    public void addGas(double gasToAdd)
    {
	assert gas >= 0 : "Can't add negative gas.";
	gas += gasToAdd;
    }

    public void drive(double km)
    {
	assert gas >= gas - km * 1/efficiency : "Can't drive that far!";
	gas = gas - km * 1/efficiency;
    }

    public double getGasInTank()
    {
	return gas;
    }

}


text:
<?xml version="1.0" encoding="utf-8" ?>
<resources>
  <dimen name="example_list_item_margin">0dp</dimen>

  <dimen name="toolbar_title_size">18sp</dimen>

  <dimen name="horizontal_margin">8dp</dimen>
  <dimen name="vertical_margin">8dp</dimen>

  <dimen name="main_screen_example_category_margin">30dp</dimen>
  <dimen name="main_screen_heading_font_size">16sp</dimen>
  <dimen name="main_screen_description_font_size">12sp</dimen>
</resources>


text:
var models = require('../model');

exports.view = function(req, res) {
  models.Program
    .find()
    .exec(function(err, programs){
      res.render('category', {'programs':programs,
                              'search': false,
                              'result': false});
    });
}

exports.search = function(req, res){

  var searchString = req.query.searchString;

  console.log(searchString);

  models.Program.
    find({ $text: { $search: searchString } }, function(err, searchResult) {
      console.log(searchResult);

      if(searchResult.length == 0){
        console.log("result is null");
        res.render('category', {'search': true,
                                'result': false});
        // res.redirect('/category');
      }
      else{
        console.log("result is not null");
        res.render('category', {'programs':searchResult,
                                'search': true,
                                'result': true});

      }

    });

  // }

  // var category = req.query.category;
  // var programs = req.db.get('programs');
  // programs.find({"category": category}, {}, function(e, docs){
  //   console.log(docs);
  //   if(docs != null){
  //     console.log("now != null");
  //     var wrapper = {'programs':docs};
  //     wrapper['search'] = true;
  //     res.render('category', wrapper);
  //   }
  //   else{
  //     console.log("now == null");
  //     res.redirect('/category');
  //   }
  // });
}


text:
package org.spongycastle.pqc.crypto.gmss;

import org.spongycastle.crypto.params.AsymmetricKeyParameter;

public class GMSSKeyParameters
    extends AsymmetricKeyParameter
{
    private GMSSParameters params;

    public GMSSKeyParameters(
        boolean isPrivate,
        GMSSParameters params)
    {
        super(isPrivate);
        this.params = params;
    }

    public GMSSParameters getParameters()
    {
        return params;
    }
}


text:
@interface NewsAppHomeController : UIViewController

@end