text:
namespace Mono.Upnp.GtkClient {

    public partial class ActionInvocationWindow {

        private Gtk.VBox vbox;

        private Gtk.Label name;

        private Gtk.VBox inputsBox;

        private Gtk.Button invoke;

        private Gtk.VBox outputsBox;

        protected virtual void Build() {
            Stetic.Gui.Initialize(this);
            // Widget Mono.Upnp.GtkClient.ActionInvocationWindow
            this.WidthRequest = 0;
            this.HeightRequest = 0;
            this.Name = "Mono.Upnp.GtkClient.ActionInvocationWindow";
            this.Title = "Invoke Action";
            this.WindowPosition = ((Gtk.WindowPosition)(1));
            this.DefaultWidth = 0;
            this.DefaultHeight = 0;
            // Container child Mono.Upnp.GtkClient.ActionInvocationWindow.Gtk.Container+ContainerChild
            this.vbox = new Gtk.VBox();
            this.vbox.Name = "vbox";
            this.vbox.Spacing = 6;
            this.vbox.BorderWidth = ((uint)(6));
            // Container child vbox.Gtk.Box+BoxChild
            this.name = new Gtk.Label();
            this.name.Name = "name";
            this.name.Xalign = 0F;
            this.name.LabelProp = "<big><b>action</b></big>";
            this.name.UseMarkup = true;
            this.vbox.Add(this.name);
            Gtk.Box.BoxChild w1 = ((Gtk.Box.BoxChild)(this.vbox[this.name]));
            w1.Position = 0;
            w1.Expand = false;
            w1.Fill = false;
            // Container child vbox.Gtk.Box+BoxChild
            this.inputsBox = new Gtk.VBox();
            this.inputsBox.Name = "inputsBox";
            this.inputsBox.Spacing = 6;
            this.vbox.Add(this.inputsBox);
            Gtk.Box.BoxChild w2 = ((Gtk.Box.BoxChild)(this.vbox[this.inputsBox]));
            w2.Position = 1;
            // Container child vbox.Gtk.Box+BoxChild
            this.invoke = new Gtk.Button();
            this.invoke.CanFocus = true;
            this.invoke.Name = "invoke";
            this.invoke.UseUnderline = true;
            this.invoke.Relief = ((Gtk.ReliefStyle)(2));
            // Container child invoke.Gtk.Container+ContainerChild
            Gtk.Alignment w3 = new Gtk.Alignment(0.5F, 0.5F, 0F, 0F);
            // Container child GtkAlignment.Gtk.Container+ContainerChild
            Gtk.HBox w4 = new Gtk.HBox();
            w4.Spacing = 2;
            // Container child GtkHBox.Gtk.Container+ContainerChild
            Gtk.Image w5 = new Gtk.Image();
            w5.Pixbuf = Stetic.IconLoader.LoadIcon(this, "gtk-execute", Gtk.IconSize.Menu, 16);
            w4.Add(w5);
            // Container child GtkHBox.Gtk.Container+ContainerChild
            Gtk.Label w7 = new Gtk.Label();
            w7.LabelProp = Mono.Unix.Catalog.GetString("_Invoke");
            w7.UseUnderline = true;
            w4.Add(w7);
            w3.Add(w4);
            this.invoke.Add(w3);
            this.vbox.Add(this.invoke);
            Gtk.Box.BoxChild w11 = ((Gtk.Box.BoxChild)(this.vbox[this.invoke]));
            w11.Position = 2;
            w11.Expand = false;
            w11.Fill = false;
            // Container child vbox.Gtk.Box+BoxChild
            this.outputsBox = new Gtk.VBox();
            this.outputsBox.Name = "outputsBox";
            this.outputsBox.Spacing = 6;
            this.vbox.Add(this.outputsBox);
            Gtk.Box.BoxChild w12 = ((Gtk.Box.BoxChild)(this.vbox[this.outputsBox]));
            w12.Position = 3;
            this.Add(this.vbox);
            if ((this.Child != null)) {
                this.Child.ShowAll();
            }
            this.Show();
            this.invoke.Clicked += new System.EventHandler(this.OnInvokeClicked);
        }
    }
}


text:
layout: doc
title:  "Integrity Checkers"
categories: guides
permalink: /docs/guides/integrity-checkers/
---

In this guide, let's go over the integrity checkers in {{ site.mojito_green }} in detail.  Integrity checkers perform checks on the translations against the source strings and reject the translations with errors.  This prevents translations with errors from being used in localized resource files which can lead to build faiilure or errors in application.

We use `mojito-cli` to configure integrity checkers in a repository.  Integrity checkers can be configured when you create and update repository in {{ site.mojito_green }} with `-it` parameter.  You can set integrity checker for each file extension of resource files.  For example, `-it resw:COMPOSITE_FORMAT,xlf:PRINTF_LIKE`.

```bash
    mojito repo-create -n MyRepo -it "properties:MESSAGE_FORMAT" -l de-DE es-ES

    mojito repo-update -n MyRepo -it "properties:MESSAGE_FORMAT" -l de-DE es-ES
```

### Available Integrity Checkers

| Integrity Checker                      | Recommended File Extensions     | File Format                          |
|:---------------------------------------|:------------------------------- ---------------|:-------------------------------------|
| COMPOSITE_FORMAT                       | resw, resx                                     | RESW, RESX                           |
| MESSAGE_FORMAT                         | properties                                     | Java Properties                      |
| PRINTF_LIKE                            | xml, strings,                                  | Android Strings, iOS/Mac Strings,    |
| SIMPLE_PRINTF_LIKE                     |                                                |                                      |
| WHITESPACE                             |                                                |                                      |
| TRAILING_WHITESPACE     |                                                |                                      |

### Composite Format Integrity Checker

Composite format integrity checker validates that the placeholders of format `{some-identifier}` in the source string exist in the translation.

The translation gets rejected if any placeholder in the source string is missing in the translation.  There can be multiple placeholders in the source string.  The order of the placeholders can change in the translation.

| Source String     | Translation     | Checker                                  |
|:---------------------------------|:-------------------------------|:-----------------------------------------|
| Hello {0}!        | ¡Hola {0}!      | OK                        |
| Hello {0}!        | ¡Hola!          | FAIL missing placeholder  |
| {0.00}% used      | {0.00} used     | OK                        |
| {0.00}% used      | {0} used        | FAIL modified placeholder |
| {0} with {1}      | {1} con {0}     | OK                        |

### Message Format Integrity Checker

Message format integrity checker validates message format in the translation against [icu4j Message Format](http://icu-project.org/apiref/icu4j/com/ibm/icu/text/MessageFormat.html).

The translation gets rejected if any placeholder in the source string is missing in the translation.  There can be multiple placeholders in the source string.  The order of the placeholders can change in the translation.

Missing curly braces or translating elements within the curly braces also cause the translation to be rejected.

| Source String                                                   | Translation                                                          | Checker           |
|:----------------------------------------------------------------|:---------------------------------------------------------------------|:----------------- |
| {numFiles, plural, one{one file} other{# files}} | {numFiles, plural, one{un fichier} other{# fichiers}} | OK |
| {numFiles, plural, one{one file} other{# files}} | {numFiles, plural, one{un fichier} other{# fichiers}  | FAIL missing closing curly braces  |
| {numFiles, plural, one{one file} other{# files}} | {numFiles, plural, un{un fichier} autre{# fichiers}}  | FAIL translating quantity elements |

### Printf-Like Integrity Checker

Printf-like integrity checker validates that the placeholders in the source string exist in the translation.  The placeholders are in the form of printf specifiers.

The translation gets rejected if any placeholder in the source string is missing in the translation or the specifier is modified.  There can be multiple placeholders in the source string.  The order of the placeholders can change in the translation.

| Source String                                          | Translation                                               | Checker           |
|:-------------------------------------------------------|:----------------------------------------------------------|:------------------|
| Hello %@!                               | ¡Hola %@!                                  | OK |
| %1$s of %2$s                            | %2$s의 %1$s                                 | OK |
| %1$d files and %2$d folders             | %1$d fichiers et dossiers                  | FAIL missing placeholder |
| %1$d files and %2$d folders   | %1$d fichiers et %2$s dossiers   | FAIL modified placeholder |

### Simple Printf-Like Integrity Checker

Simple Printf-like integrity checker validates that the placeholders in the source string exist in the translation.  The placeholders are in the form of `%{number}`, for example, %1, %2, %3, etc.

The translation gets rejected if any placeholder in the source string is missing in the translation.  There can be multiple placeholders in the source string.  The order of the placeholders can change in the translation.

| Source String                                      | Translation                                        | Checker           |
|:---------------------------------------------------|:---------------------------------------------------|:------------------|
| Hello %1!                           | ¡Hola %1!                           | OK |
| %1 of %2                            | %2의 %1                              | OK |
| %1 files and %2 folders             | %1 fichiers et dossiers             | FAIL missing placeholder |
| %1 files and %2 folders   | fichiers et %2 dossiers   | FAIL missing placeholder |

### Whitespace Integrity Checker

Whitespace integrity checker validates that the leading and trailing whitespaces in the source string exist in the translation.

The translation gets rejected if any leading or traingling whitespace in the source string is missing in the translation.

| Source String                                          | Translation                                                           | Checker           |
|:-------------------------------------------------------|:----------------------------------------------------------------------|:------------------|
| [space]Hello %@![newline]               | [space]¡Hola %@![newline]                              | OK |
| [space]%1$d files and %2$d folders      | %1$d fichiers et %2$s dossiers                         | FAIL missing leading space                    |
| %1$d files and %2$d folders[newline]    | %1$d fichiers et %2$s dossiers                         | FAIL missing trailing newline                 |
| [space]%1 files and %2 folders[newline] | [newline]%1 fichiers et %2 dossiers[space]   | FAIL modified leading and trailing whitepsace |

### Trailing Whitespace Integrity Checker

Trailing whitespace integrity checker validates that the trailing whitespaces in the source string exist in the translation.

The translation gets rejected if any traingling whitespace in the source string is missing in the translation.

| Source String                                                      | Translation                                                           | Checker           |
|:-------------------------------------------------------------------|:----------------------------------------------------------------------|:------------------|
| Hello %@![space][newline]                           | ¡Hola %@![space][newline]                              | OK |
| %1$d files and %2$d folders[space]                  | %1$d fichiers et %2$s dossiers                         | FAIL missing trailng space         |
| %1$d files and %2$d folders[newline]                | %1$d fichiers et %2$s dossiers                         | FAIL missing trailing newline      |
| %1 files and %2 folders[space][newline]   | %1 fichiers et %2 dossiers[newline][space]   | FAIL modified trailing whitespaces |

### Handling Rejected Translations

While importing offline translations, the integrity checker catches errors and reject translations with errors.  The number of rejected translations show up in the Repository page.

![Repository with Rejected Translation](./images/repository-rejected-translation.png)

Clicking on the number of rejected translations loads the Workbench with rejected translation.  You can correct the translation and change its status to `Needs Review` or `Accepted`.

![Workbench with Rejected Translation](./images/workbench-warning.png)

redpajama_set_name: RedPajamaGithub


text:
<title>CSE 590D Home Page (Autumn 1995)</title>

CSE 590D (Autumn 1995): Transcript-Based Education/WWW

Welcome to the CSE 590D Home Page!

This is the World Wide Web ("the Web" for short) hypermedia document
for CSE 590D and contains information about the
class.  Keep in mind that this document is not static, and that new
information  will be added from time to time.

Copyright Notice:  The material in this course web is subject
to copyright.  While it may be viewed by the public,
it should not be installed at any web site other
than the one at the University of Washington.

Reading for October 10 --  G. McCalla: "The Central Importance
of Student Modelling in Intelligent Tutoring."

Reading for October 17 --
(presented by Sandi Youngquist)

Meeting of October 23 --  Discussion with Paul Barton-Davis about
Internet services.

Reading for October 31 --  C. Laborde and J-M Laborde:
"Problem Solving in Geometry: From Microworlds to
Intelligent Computer Environments"  (presented by Tessa Lau)

Reading for November 7 --  B. Bartels: "Promoting mathematics
connections with concept mapping"
(plus presentation by Gary Anderson)

No meeting November 14 --

Reading for November 21 --

The readings for this meeting are all online (on the WWW).

The first paper combines some degree of "vision" (a little)
with some degree of technology (nothing particularly ambitious,
but a description of the state of the art)

The second paper is a non-technical piece that promotes the
theme of learners taking responsibility for their education --
something that will be increasingly important in the future.

The two choices for the third reading are papers that are more
sophisticated than either of the first two.  The paper "Beyond
Browsing" elaborates on the possibility of group annotation of
WWW materials.  The paper "The DEC Web Toolkit" describes in
technical terms a layer of Internet infrastructure that could
make it possible to have "smart distributed tutorial" applications
that do more than what Mosaic or Netscape can achieve.

Please read both 1 and 2 and either of the options for 3.

1.   Advanced Educational Uses of the World-Wide Web

http://www.igd.fhg.de/www/www95/proceedings/papers/89/paper.html
     (presentor: Jeremy Baer)

2.   Empowering Students in the Information Age

http://www.ncsa.uiuc.edu/SDG/IT94/Proceedings/Educ/ward/ward.html
     (presentor: Marla Baker)

3. Either
     Beyond Browsing: Shared Comments, SOAPs,
     Trails, and On-line Communities

http://www.igd.fhg.de/www/www95/proceedings/papers/88/TR/WWW95.html
     (presentor: John Dietz)

 or

     The DCE Web Toolkit: Enhancing WWW Protocols
     With Lower-Layer Services

http://www.igd.fhg.de/www/www95/proceedings/papers/67/DCEWebKit.html
     (presentor: Adam Carlson)

Presentor for the paper Concept Mapping:  Yan-Hong Zhu

Meeting of November 28 --  Discussion with Michael Jay about
Curriculum Navigator.

<address>
(Last Update: 21 November 1995)
</address>


text:
exports.viewForgotPass = function(req, res){
	res.render('forgotPass');
};


text:
from setuptools import setup

__version__ = '0.0.1'
__author__ = 'Tim Grossmann'

requirements = [
    'selenium==2.53.6',
    'clarifai==2.0.20',
    'pyvirtualdisplay',
    'emoji'
]

description = 'Instagram Like, Comment and Follow Automation Script'

setup(
    name='instagram_py',
    version=__version__,
    author=__author__,
    author_email='contact.timgrossmann@gmail.com',
    url='https://github.com/timgrossmann/InstaPy',
    py_modules='instapy',
    description=description,
    install_requires=requirements
)


text:
title: Salutations!
author: Rebecca Voulgarakis
date: '2017-10-29'
slug: salutations
categories: []
tags: []
---

Hello world,

I'm in my last year living the bunhead life at Mercyhurst University—while this makes me an expert at surviving 12-hour school days on Clif bars and prayers alone, I have a lot to learn before I graduate. The material you encounter in this blog will primarily consist of my efforts to learn by teaching.

To engage with my journey to unleashing the full extent of my data visualization superpowers, you'll need the following:

RStudio, with the Lahman, sqldf, and ggplot2 packages loaded

Some patience

Thanks for visiting. Feel free to check out my social media while you're here. There's exciting content coming soon.


text:
#pragma once

#include "../oomodel_api.h"

#include "ModelBase/src/nodes/composite/CompositeNode.h"
#include "ModelBase/src/nodes/TypedList.h"
#include "ModelBase/src/nodes/nodeMacros.h"

namespace OOModel {
	class Expression;
}
extern template class OOMODEL_API Model::TypedList<OOModel::Expression>;

namespace OOModel {

class Class;
class Type;

class OOMODEL_API Expression : public Super<Model::CompositeNode>
{
	COMPOSITENODE_DECLARE_STANDARD_METHODS(Expression)

	public:
		virtual std::unique_ptr<Type> type();

		/**
		 * Returns the expression node which is the top-most expression ancestor of this expression.
		 *
		 * This might not be the expression node closest to the root in case where 'this' is inside a lambda for example.
		 * This method just walks up the hirarchy while encountering other expression or single list nodes.
		 */
		Expression* topMostExpressionParent() const;
};

}


text:
/**
 * @file globus_thread_rmutex.h
 * @brief Recursive Mutex
 */

#ifndef GLOBUS_THREAD_RMUTEX_H
#define GLOBUS_THREAD_RMUTEX_H

#include "globus_common_include.h"
#include "globus_thread.h"

#ifdef __cplusplus
extern "C" {
#endif

/**
 * @brief Recursive Mutex
 * @ingroup globus_mutex
 *
 * @see globus_rmutex_init(), globus_rmutex_destroy(), globus_rmutex_lock(), globus_rmutex_unlock()
 */
typedef struct
{
    globus_mutex_t			mutex;
    globus_cond_t			cond;
    globus_thread_t			thread_id;
    int					level;
    int                                 waiting;
} globus_rmutex_t;

/**
 * @brief Recursive mutex attribute
 * @ingroup globus_mutex
 */
typedef int                             globus_rmutexattr_t;

int
globus_rmutex_init(
    globus_rmutex_t *                   rmutex,
    globus_rmutexattr_t *               attr);

int
globus_rmutex_lock(
    globus_rmutex_t *                   rmutex);

int
globus_rmutex_unlock(
    globus_rmutex_t *                   rmutex);

int
globus_rmutex_destroy(
    globus_rmutex_t *                   rmutex);

#ifdef __cplusplus
}
#endif
#endif /* GLOBUS_THREAD_RMUTEX_H */


text:
ACCEPTED

#### According to
Index Fungorum

#### Published in
null

#### Original name
Diploschistes praematricus f. praematricus

### Remarks
null


text:
SYNONYM

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

#### Published in
null

#### Original name
Naucoria scorpioides

### Remarks
null


text:
package org.mockserver.collections.hashmap;

import org.junit.Test;
import org.mockserver.collections.CaseInsensitiveRegexHashMap;

import static org.hamcrest.CoreMatchers.is;
import static org.hamcrest.CoreMatchers.nullValue;
import static org.hamcrest.MatcherAssert.assertThat;
import static org.mockserver.collections.CaseInsensitiveRegexHashMap.hashMap;
import static org.mockserver.model.NottableString.string;

/**
 * @author jamesdbloom
 */
public class CaseInsensitiveRegexHashMapTestRemove {

    @Test
    public void shouldRemoveFromMapWithSingleEntry() {
        // given
        CaseInsensitiveRegexHashMap hashMap = hashMap(
            true, new String[]{"keyOne", "keyOneValue"}
        );

        // when
        hashMap.remove("keyOne");

        // then
        assertThat(hashMap.size(), is(0));
        assertThat(hashMap.get("keyOne"), is(nullValue()));
    }

    @Test
    public void shouldRemoveFromMapWithMultipleEntries() {
        // given
        CaseInsensitiveRegexHashMap hashMap = hashMap(
            true, new String[]{"keyOne", "keyOneValue"},
            new String[]{"keyTwo", "keyTwoValue"},
            new String[]{"keyThree", "keyThreeValue"}
        );

        // when
        hashMap.remove("keyOne");

        // then
        assertThat(hashMap.size(), is(2));
        assertThat(hashMap.get("keyOne"), is(nullValue()));
        assertThat(hashMap.get("keyTwo"), is(string("keyTwoValue")));
        assertThat(hashMap.get("keyThree"), is(string("keyThreeValue")));
    }

    @Test
    public void shouldRemoveNoMatchingEntry() {
        // given
        CaseInsensitiveRegexHashMap hashMap = hashMap(
            true, new String[]{"keyOne", "keyOneValue"},
            new String[]{"keyTwo", "keyTwoValue"},
            new String[]{"keyThree", "keyThreeValue"}
        );

        // when
        hashMap.remove("keyFour");

        // then
        assertThat(hashMap.size(), is(3));
        assertThat(hashMap.get("keyOne"), is(string("keyOneValue")));
        assertThat(hashMap.get("keyTwo"), is(string("keyTwoValue")));
        assertThat(hashMap.get("keyThree"), is(string("keyThreeValue")));
    }
}


text:
/*
 *  visualization.h
 *
 *  Created on: May 1, 2017
 *  Author: Bart and Jeroen
 */

 #include <tutorial_utilities/visualization.h>

 namespace tutorial_utilities
 {
	//Function for constructing quaternion starting from Euler rotations XYZ
    /*Eigen::Quaternion<double> eulerToQuat(double rotX, double rotY, double rotZ)
	{
		Eigen::Matrix3d m;
		m = Eigen::AngleAxisd(rotX, Eigen::Vector3d::UnitX())
			* Eigen::AngleAxisd(rotY, Eigen::Vector3d::UnitY())
			* Eigen::AngleAxisd(rotZ, Eigen::Vector3d::UnitZ());

		Eigen::AngleAxis<double> aa;
		aa = Eigen::AngleAxisd(m);

		Eigen::Quaternion<double> quat;
		quat = Eigen::Quaternion<double>(aa);
		return quat;
    }*/

    visualization_msgs::Marker createMarker(double transX, double transY, double transZ, double rotX, double rotY, double rotZ,
                                            descartes_trajectory::AxialSymmetricPt::FreeAxis axis =
																	            descartes_trajectory::AxialSymmetricPt::X_AXIS)
	{
		static int count;
		visualization_msgs::Marker marker;
		marker.header.frame_id = "base_link";
		marker.header.stamp = ros::Time();
		marker.ns = "my_namespace";
		marker.id = count;
		marker.type = visualization_msgs::Marker::ARROW;
		marker.action = visualization_msgs::Marker::ADD;
		marker.lifetime = ros::Duration(0);

		marker.pose.position.x = transX;
		marker.pose.position.y = transY;
		marker.pose.position.z = transZ;

		//To calculate the quaternion values we first define an AngleAxis object using Euler rotations, then convert it
		Eigen::Quaternion<double> quat;
		if(axis == descartes_trajectory::AxialSymmetricPt::X_AXIS)
		{
			quat = tutorial_utilities::eulerToQuat(rotX, rotY, rotZ);
			marker.color.r = 1.0;
			marker.color.g = 0.0;
			marker.color.b = 0.0;
		} else if(axis == descartes_trajectory::AxialSymmetricPt::Y_AXIS)
		{
			quat = tutorial_utilities::eulerToQuat(rotX, rotY, rotZ) * tutorial_utilities::eulerToQuat(0, 0, M_PI / 2);
			marker.color.r = 0.0;
			marker.color.g = 1.0;
			marker.color.b = 0.0;
		} else if(axis == descartes_trajectory::AxialSymmetricPt::Z_AXIS)
		{
			quat = tutorial_utilities::eulerToQuat(rotX, rotY, rotZ) * tutorial_utilities::eulerToQuat(0, 3 * (M_PI / 2), 0);
			marker.color.r = 0.0;
			marker.color.g = 0.0;
			marker.color.b = 1.0;
		}

		marker.pose.orientation.x = quat.x();
		marker.pose.orientation.y = quat.y();
		marker.pose.orientation.z = quat.z();
		marker.pose.orientation.w = quat.w();
		marker.scale.x = 0.02;
		marker.scale.y = 0.002;
		marker.scale.z = 0.002;
		marker.color.a = 1.0;	//Alpha

		count++;
		return marker;
    }

    void createVisualFrame(Eigen::Affine3d pose, std::vector<visualization_msgs::Marker> & markervec)
	{
		Eigen::Vector3d translations;
		translations = pose.translation();
		Eigen::Vector3d rotationsXYZ;
		rotationsXYZ = pose.rotation().eulerAngles(0,1,2);

		markervec.push_back(createMarker(translations[0], translations[1], translations[2],
										 rotationsXYZ[0], rotationsXYZ[1], rotationsXYZ[2], descartes_trajectory::AxialSymmetricPt::X_AXIS));
		markervec.push_back(createMarker(translations[0], translations[1], translations[2],
										 rotationsXYZ[0], rotationsXYZ[1], rotationsXYZ[2], descartes_trajectory::AxialSymmetricPt::Y_AXIS));
		markervec.push_back(createMarker(translations[0], translations[1], translations[2],
										 rotationsXYZ[0], rotationsXYZ[1], rotationsXYZ[2], descartes_trajectory::AxialSymmetricPt::Z_AXIS));
    }

    visualization_msgs::MarkerArray createMarkerArray(std::vector<Eigen::Affine3d> poses)
    {
        std::vector<visualization_msgs::Marker> markerVector;
        int vectorSize;
        vectorSize = poses.size();

		//Generate markers for every pose, put them in markerVector
		for(int i = 0; i < vectorSize; i++)
		{
			createVisualFrame(poses[i], markerVector);
		}

		//Copy vector to array so we can return it as a MarkerArray type.
		int size = markerVector.size();
		visualization_msgs::MarkerArray ma;
		ma.markers.resize(size);
		for(int i = 0;i < size;i++)
		{
			ma.markers[i] = markerVector[i];
		}
		return ma;
    }
 } //namespace tutorial_utilities


text:
"""Brings inception_v1, inception_v2 and inception_v3 under one namespace."""

from __future__ import absolute_import
from __future__ import division
from __future__ import print_function

# pylint: disable=unused-import
from models.google.nets.inception_resnet_v2 import inception_resnet_v2
from models.google.nets.inception_resnet_v2 import inception_resnet_v2_arg_scope
from models.google.nets.inception_v1 import inception_v1
from models.google.nets.inception_v1 import inception_v1_arg_scope
from models.google.nets.inception_v1 import inception_v1_base
from models.google.nets.inception_v2 import inception_v2
from models.google.nets.inception_v2 import inception_v2_arg_scope
from models.google.nets.inception_v2 import inception_v2_base
from models.google.nets.inception_v3 import inception_v3
from models.google.nets.inception_v3 import inception_v3_arg_scope
from models.google.nets.inception_v3 import inception_v3_base
from models.google.nets.inception_v4 import inception_v4
from models.google.nets.inception_v4 import inception_v4_arg_scope
from models.google.nets.inception_v4 import inception_v4_base
# pylint: enable=unused-import


text:
package org.topology.bgp_ls.netty.protocol.update;

import org.jboss.netty.buffer.ChannelBuffer;
import org.jboss.netty.buffer.ChannelBuffers;

/**
 * @author Rainer Bieniek (Rainer.Bieniek@web.de)
 *
 */
public class AttributeNotificationPacket extends UpdateNotificationPacket {

	private byte[] offendingAttribute;

	/**
	 * @param subcode
	 */
	protected AttributeNotificationPacket(int subcode, byte[] offendingAttribute) {
		super(subcode);

		this.offendingAttribute = offendingAttribute;
	}

	/* (non-Javadoc)
	 * @see org.topology.bgp_ls.netty.protocol.NotificationPacket#encodeAdditionalPayload()
	 */
	@Override
	protected final ChannelBuffer encodeAdditionalPayload() {
		ChannelBuffer buffer = null;

		if(offendingAttribute != null)  {
			buffer = ChannelBuffers.buffer(offendingAttribute.length);

			buffer.writeBytes(offendingAttribute);
		}

		return buffer;
	}

	/**
	 * @return the offendingAttribute
	 */
	public byte[] getOffendingAttribute() {
		return offendingAttribute;
	}

	/**
	 * @param offendingAttribute the offendingAttribute to set
	 */
	void setOffendingAttribute(byte[] offendingAttribute) {
		this.offendingAttribute = offendingAttribute;
	}
}


text:
package atg.xbox.PlayFabCommerce;

import android.app.Activity;
import android.support.annotation.Nullable;
import android.util.Log;

import com.android.billingclient.api.BillingClient;
import com.android.billingclient.api.BillingClientStateListener;
import com.android.billingclient.api.BillingFlowParams;
import com.android.billingclient.api.ConsumeResponseListener;
import com.android.billingclient.api.Purchase;
import com.android.billingclient.api.PurchasesUpdatedListener;
import com.android.billingclient.api.SkuDetails;
import com.android.billingclient.api.SkuDetailsParams;
import com.android.billingclient.api.SkuDetailsResponseListener;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Objects;

class BillingManager
{
    private final String TAG = getClass().getSimpleName();

    private final BillingClient mBillingClient;
    private final PlayFabMain.BillingUpdatesListener mBillingUpdatesListener;

    // Real money In-app products defined in Google Play Console (product IDs)
    private final ArrayList<String> mSkuList = new ArrayList<>(Arrays.asList("1000tc", "100tc"));

    private final Map<String, SkuDetails> mSkuDetailsMap = new HashMap<>();

    public Map<String, SkuDetails> getSkuDetailsMap()
    {
        return mSkuDetailsMap;
    }

    public BillingManager(Activity activity, final PlayFabMain.BillingUpdatesListener billingUpdatesListener)
    {
        mBillingUpdatesListener = billingUpdatesListener;

        mBillingClient = BillingClient.newBuilder(activity).setListener(new PurchasesUpdatedListener()
        {
            @Override
            public void onPurchasesUpdated(int responseCode, @Nullable List<Purchase> purchases)
            {
                if (responseCode == BillingClient.BillingResponse.OK)
                {
                    Log.i(TAG, "onPurchasesUpdated - OK");
                    for (Purchase purchase : Objects.requireNonNull(purchases))
                    {
                        ProcessPurchase(purchase);
                    }

                    mBillingUpdatesListener.onPurchasesUpdated(purchases);
                }
                else if (responseCode == BillingClient.BillingResponse.USER_CANCELED)
                {
                    Log.i(TAG, "onPurchasesUpdated - user cancelled the purchase flow - skipping");
                }
                else if (responseCode == BillingClient.BillingResponse.ITEM_ALREADY_OWNED)
                {
                    Log.i(TAG, "onPurchasesUpdated - item already owned");
                }
                else
                {
                    Log.w(TAG, "onPurchasesUpdated got unknown resultCode: " + responseCode);
                }
            }
        }).build();

        mBillingClient.startConnection(new BillingClientStateListener()
        {
            @Override
            public void onBillingSetupFinished(@BillingClient.BillingResponse int billingResponseCode)
            {
                if (billingResponseCode == BillingClient.BillingResponse.OK)
                {
                    // The billing client is ready. You can query purchases here.
                    RetrieveBillingCatalog();
                }

                mBillingUpdatesListener.onBillingClientSetupFinished();
            }
            @Override
            public void onBillingServiceDisconnected()
            {
                // Try to restart the connection on the next request to
                // Google Play by calling the startConnection() method.
            }
        });
    }

    private void ProcessPurchase(Purchase purchase)
    {
        Log.d(TAG, "Process " + purchase);

        final PlayFabOpManager pfman = PlayFabOpManager.getInstance();

        SkuDetails detail = mSkuDetailsMap.get(purchase.getSku());
        boolean isSuccess;

        if (detail != null)
        {
            // Validate purchase with PlayFab, see more info in function definition
            isSuccess = pfman.ValidateGooglePlayPurchase(
                    purchase.getSku(),
                    purchase.getOriginalJson(),
                    purchase.getSignature(),
                    detail.getPriceCurrencyCode(),
                    detail.getPriceAmountMicros() / 10000);

            if (isSuccess)
            {
                // If successful, since the real money items are consumables, consume
                ConsumePurchaseToken(purchase.getSku(), purchase.getPurchaseToken());
            }
        }
        else
        {
            Log.d(TAG, purchase.getSku() + " not found in mSkuDetailsMap?!");
        }
    }

    private void ConsumePurchaseToken(final String sku, String purchaseToken)
    {
        // There is no distinction between durable and consumable in Google Play
        // A consumable is simply a purchase that has been consumed, so it can be purchased again
        // An unconsumed owned product will return ITEM_ALREADY_OWNED by launchBillingFlow
        ConsumeResponseListener listener = new ConsumeResponseListener()
        {
            @Override
            public void onConsumeResponse(@BillingClient.BillingResponse int responseCode, String outToken)
            {
                if (responseCode == BillingClient.BillingResponse.OK)
                {
                    Log.d(TAG, sku + " consumed");
                }

                mBillingUpdatesListener.onConsumeFinished(outToken, responseCode);
            }
        };

        mBillingClient.consumeAsync(purchaseToken, listener);
    }

    private void RetrieveBillingCatalog()
    {
        // Retrieves list of In-app products set up in Google Play Console
        SkuDetailsParams.Builder params = SkuDetailsParams.newBuilder();
        params.setSkusList(mSkuList).setType(BillingClient.SkuType.INAPP);
        mBillingClient.querySkuDetailsAsync(params.build(),
                new SkuDetailsResponseListener()
                {
                    @Override
                    public void onSkuDetailsResponse(int responseCode, List<SkuDetails> skuDetailsList)
                    {
                        for(SkuDetails detail : skuDetailsList)
                        {
                            Log.d(TAG,"Sku: " + detail.getTitle() + " \"" + detail.getDescription() + "\" " + detail.getPrice() + " " + detail.getPriceCurrencyCode());
                            mSkuDetailsMap.put(detail.getSku(), detail);
                        }
                    }
                });
    }

    public void PurchaseSku(Activity activity, SkuDetails detail)
    {
        // This brings up the purchase UI, and the activity is paused,
        // so onResume is called when this flow ends
        BillingFlowParams flowParams = BillingFlowParams.newBuilder()
                .setSkuDetails(detail)
                .build();

        int responseCode = mBillingClient.launchBillingFlow(activity, flowParams);
    }

    void CheckOutstandingPurchases()
    {
        // This is called judiciously to ensure that unconsumed purchases are handled
        // (i.e. sent to PlayFab for validation)
        // Consumed purchases are not returned by queryPurchases
        Purchase.PurchasesResult purchasesResult = mBillingClient.queryPurchases(BillingClient.SkuType.INAPP);

        if(purchasesResult.getResponseCode() == BillingClient.BillingResponse.OK)
        {
            Log.d(TAG, "CheckOutstandingPurchases: " + purchasesResult.getPurchasesList().size() + " found");

            for (Purchase purchase : purchasesResult.getPurchasesList())
            {
                ProcessPurchase(purchase);
            }

            mBillingUpdatesListener.onPurchasesUpdated(purchasesResult.getPurchasesList());
        }
    }
}


text:
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.1.xsd">

	<!-- Hibernate Common Configuraction -->
	<bean class="org.springframework.orm.jpa.support.PersistenceAnnotationBeanPostProcessor" />
	<!--
	<bean  id="dynamicsPersistenceExceptionTranslationPostProcessor" class="com.newtouch.lion.datasource.DynamicsPersistenceExceptionTranslationPostProcessor" />
	-->
	<!-- 指定JPA持久化提供商,此处使用Hibernate实现HibernatePersistence类 -->
	<bean id="persistenceProvider" class="org.hibernate.ejb.HibernatePersistence" />
	<!-- 如果指定jpaVendorAdapter此属性可选,此处为HibernateJpaDialect -->
	<bean id="jpaDialect" class="org.springframework.orm.jpa.vendor.HibernateJpaDialect" />
	<!-- 指定实现厂商专用特性,即generateDdl= false表示不自动生成DDL,database= HSQL表示使用hsqldb数据库 -->
	<bean id="jpaVendorAdapter" class="org.springframework.orm.jpa.vendor.HibernateJpaVendorAdapter">
		<property name="generateDdl" value="false" />
		<property name="database" value="HSQL" />
	</bean>
	<!-- 配置hibernate session工厂 -->
	<bean id="entityManagerFactory" class="org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean">
		<property name="dataSource" ref="dataSource" />
		<property name="persistenceProvider" ref="persistenceProvider" />
		<property name="persistenceUnitName" value="entityUnit" />
		<!-- <property name="persistenceXmlLocation" value="classpath:META-INF/persistence-mysql.xml"></property>-->
		<property name="mappingResources">
			<list>
				<value>model/application/bas_app_properties.${database.prefix}.orm.xml</value>
				<value>model/datagrid/bas_datagrid.${database.prefix}.orm.xml</value>
				<value>model/system/bas_demo.${database.prefix}.orm.xml</value>
				<value>model/system/bas_common.${database.prefix}.orm.xml</value>
				<value>model/system/bas_login_log.${database.prefix}.orm.xml</value>
				<value>model/system/bas_system.${database.prefix}.orm.xml</value>
				<value>model/system/bas_tasks.${database.prefix}.orm.xml</value>
				<value>model/system/bas_reminder.${database.prefix}.orm.xml</value>
			</list>
		</property>
		<property name="jpaProperties">
			<props>
				<!--  <prop key="hibernate.hbm2ddl.auto">${hibernate.hbm2ddl.auto}</prop>-->
				<prop key="hibernate.dialect">${hibernate.dialect}</prop>
				<prop key="hibernate.show_sql">${hibernate.show_sql}</prop>
				<prop key="hibernate.format_sql">${hibernate.format_sql}</prop>
				<prop key="hibernate.use_sql_comments">${hibernate.use_sql_comments}</prop>
				<prop key="hibernate.generate_statistics">${hibernate.generate_statistics}</prop>
				<prop key="hibernate.max_fetch_depth">${hibernate.max_fetch_depth}</prop>
				<prop key="hibernate.jdbc.batch_size">${hibernate.jdbc.batch_size}</prop>
				<prop key="hibernate.jdbc.fetch_size">${hibernate.jdbc.fetch_size}</prop>
				<prop key="hibernate.max_fetch_depth">${hibernate.max_fetch_depth}</prop>
				<prop key="hibernate.cache.use_query_cache">${hibernate.cache.use_query_cache}</prop>
				<prop key="hibernate.cache.use_second_level_cache">${hibernate.cache.use_second_level_cache}</prop>
				<prop key="hibernate.cache.provider_class">${hibernate.cache.provider_class}</prop>
				<prop key="hibernate.cache.region.factory_class">${hibernate.cache.region.factory_class}</prop>
				<prop key="current_session_context_class">thread</prop>
			</props>
		</property>
	</bean>
</beans>


text:
package lithium.community.android.sdk.auth;

import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import android.support.annotation.VisibleForTesting;

import lithium.community.android.sdk.exception.LiRestResponseException;
import lithium.community.android.sdk.rest.LiAuthRestClient;

/**
 * Auth service interface to do token exchange and refresh.
 */
public interface LiAuthService {

    /**
     * Initiates Login Flow
     */
    void startLoginFlow();

    /**
     * Initiates Login Flow
     */
    void startLoginFlow(String ssoToken);

    /**
     * Initiates Authorization request (Non SSO).
     *
     * @param request {@link LiSSOAuthorizationRequest}
     */
    void performAuthorizationRequest(
            @NonNull LiSSOAuthorizationRequest request);

    /**
     * Initiates Authorization request for SSO case.
     *
     * @param request {@link LiSSOAuthorizationRequest}
     * @throws LiRestResponseException
     */
    void performSSOAuthorizationRequest(@NonNull LiSSOAuthorizationRequest request) throws LiRestResponseException;

    /**
     * Handles what to do after authorization response.
     *
     * @param response              {@link LiSSOAuthResponse}
     * @param authRestClient        {@link LiAuthRestClient}
     * @param loginCompleteCallBack {@link LoginCompleteCallBack}
     * @throws LiRestResponseException {@link LiRestResponseException}
     */
    void handleAuthorizationResponse(LiSSOAuthResponse response, LiAuthRestClient authRestClient,
            LoginCompleteCallBack loginCompleteCallBack) throws LiRestResponseException;

    /**
     * Fetching details of User after login is completed.
     *
     * @param loginCompleteCallBack {@link LoginCompleteCallBack}
     */
    @VisibleForTesting
    void getUserAfterTokenResponse(LoginCompleteCallBack loginCompleteCallBack);

    /**
     * Use to fetch Refresh token in an Async call.
     *
     * @param callback {@link LiTokenResponseCallback}
     * @throws LiRestResponseException
     */
    void performRefreshTokenRequest(@NonNull LiTokenResponseCallback callback) throws LiRestResponseException;

    /**
     * Use to fetch Refresh token in an Sync call.
     *
     * @return The Token response {@link LiTokenResponse}
     * @throws LiRestResponseException {@link LiRestResponseException}
     */
    LiTokenResponse performSyncRefreshTokenRequest() throws LiRestResponseException;

    /**
     * Performs post authorization flow.
     *
     * @param isLoginSuccess Says whether login is success and user data has been retrieved.
     * @param responseCode   HTTP error code that gets returned in the intent
     */
    void enablePostAuthorizationFlows(boolean isLoginSuccess, int responseCode);

    /**
     * Disposes the LiAuthServiceImpl after auth flow.
     */
    void dispose();

    /**
     * Callback interface for token endpoint requests.
     */
    interface FreshTokenCallBack {
        void onFreshTokenFetched(boolean isFetched);
    }

    /**
     * Callback interface after login process is done.
     */
    interface LoginCompleteCallBack {
        void onLoginComplete(LiAuthorizationException authException, boolean isSuccess);
    }

    interface LiTokenResponseCallback {
        /**
         * Invoked when the request completes successfully or fails.
         *

         *
Exactly one of {@code response} or {@code ex} will be non-null. If
         * {@code response} is {@code null}, a failure occurred during the request. This can
         * happen if a bad URI was provided, no connection to the server could be established, or
         * the response JSON was incomplete or badly formatted.
         *
         * @param response the retrieved token response, if successful; {@code null} otherwise.
         * @param ex       a description of the failure, if one occurred: {@code null} otherwise.
         * @see LiAuthorizationException.TokenRequestErrors
         */
        void onTokenRequestCompleted(@Nullable LiTokenResponse response,
                @Nullable Exception ex);
    }
}


text:
package com.rickyaut.gallery;

import java.io.UnsupportedEncodingException;
import java.util.Properties;
import java.util.logging.Level;
import java.util.logging.Logger;

import javax.mail.Message;
import javax.mail.MessagingException;
import javax.mail.Session;
import javax.mail.Transport;
import javax.mail.internet.AddressException;
import javax.mail.internet.InternetAddress;
import javax.mail.internet.MimeMessage;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.servlet.ModelAndView;

@Controller
public class ContactusController {
	private static final Logger logger = Logger.getLogger(ContactusController.class.getName());
	@RequestMapping(value="/contact-us", method=RequestMethod.POST)
	public ModelAndView submitContactUs(@RequestParam String name, @RequestParam String email, @RequestParam String phone, @RequestParam String content){
		Properties props = new Properties();
        Session session = Session.getDefaultInstance(props, null);

		ModelAndView modelAndView = new ModelAndView("contactus.result", "success", true);
        try {
            Message msg = new MimeMessage(session);
            msg.setFrom(new InternetAddress("service.allmotorsgallery@gmail.com", "Service"));
            msg.addRecipient(Message.RecipientType.TO,
                             new InternetAddress("service.allmotorsgallery@gmail.com", "Service"));
            msg.setSubject("contact us information");
            StringBuffer buf = new StringBuffer();
            buf.append("Name: ").append(name).append("\n");
            buf.append("eMail: ").append(email).append("\n");
            buf.append("Phone: ").append(phone).append("\n\n");
            buf.append(content);
            msg.setText(buf.toString());
            Transport.send(msg);

        } catch (AddressException e) {
            logger.log(Level.WARNING, e.getMessage(), e);
            modelAndView = new ModelAndView("contactus");
        } catch (MessagingException e) {
            logger.log(Level.WARNING, e.getMessage(), e);
            modelAndView = new ModelAndView("contactus");
        } catch (UnsupportedEncodingException e) {
            logger.log(Level.WARNING, e.getMessage(), e);
            modelAndView = new ModelAndView("contactus");
		}
		return modelAndView;
	}

	@RequestMapping(value="/contact-us", method=RequestMethod.GET)
	public ModelAndView requestContactUs(){
		ModelAndView mv = new ModelAndView("contactus");
		mv.addObject("meta_title", "AllMotorsGallery - "+ "Contact us");
		mv.addObject("meta_description", "Please contact us by filling the form");
		return mv;
	}

}


text:
package org.ebayopensource.fido.uaf.tlv;

import java.io.IOException;

public class TagAssertionInfo {

	private Tag t;
	private boolean isReg = false;
	private int authenticatorVersion = 0;
	private int authenticatorMode = 0;
	private int signatureAlgAndEncoding = 0;
	private int publicKeyAlgAndEncoding = 0;

	public TagAssertionInfo(Tag t) throws InvalidArgumentException, IOException {
		this.t = t;
		if (t.id != TagsEnum.TAG_ASSERTION_INFO.id) {
			throw new InvalidArgumentException("Not TAG_ASSERTION_INFO tag");
		}
		if (t.length != 5 && t.length != 7) {
			throw new InvalidArgumentException(
					"Unrecognized tag structure. Length=" + t.length);
		}
		if (t.length == 7) {
			isReg = true;
		}
		parse();
	}

	private void parse() throws IOException {
		ByteInputStream bytes = new ByteInputStream(t.value);
		authenticatorVersion = UnsignedUtil.read_UAFV1_UINT16(bytes);
		authenticatorMode = bytes.readByte();
		signatureAlgAndEncoding = UnsignedUtil.read_UAFV1_UINT16(bytes);
		if (isReg) {
			publicKeyAlgAndEncoding = UnsignedUtil.read_UAFV1_UINT16(bytes);
		}
	}

	public Tag getT() {
		return t;
	}

	public boolean isReg() {
		return isReg;
	}

	public int getAuthenticatorVersion() {
		return authenticatorVersion;
	}

	public int getAuthenticatorMode() {
		return authenticatorMode;
	}

	public int getSignatureAlgAndEncoding() {
		return signatureAlgAndEncoding;
	}

	public int getPublicKeyAlgAndEncoding() {
		return publicKeyAlgAndEncoding;
	}

	public String toString() {
		return " isReg=" + isReg + " authenticatorVersion="
				+ authenticatorVersion + " authenticatorMode="
				+ authenticatorMode + " signatureAlgAndEncoding="
				+ signatureAlgAndEncoding + " publicKeyAlgAndEncoding="
				+ publicKeyAlgAndEncoding;

	}

}


text:
import ddt
from tempest_lib import exceptions

from manilaclient.tests.functional import base
from manilaclient.tests.functional import utils

@ddt.ddt
class ManilaClientTestQuotasReadOnly(base.BaseTestCase):

    def test_quota_class_show_by_admin(self):
        roles = self.parser.listing(
            self.clients['admin'].manila('quota-class-show', params='abc'))
        self.assertTableStruct(roles, ('Property', 'Value'))

    def test_quota_class_show_by_user(self):
        self.assertRaises(
            exceptions.CommandFailed,
            self.clients['user'].manila,
            'quota-class-show',
            params='abc')

    def _get_quotas(self, role, operation, microversion):
        roles = self.parser.listing(self.clients[role].manila(
            'quota-%s' % operation, microversion=microversion))
        self.assertTableStruct(roles, ('Property', 'Value'))

    @ddt.data('admin', 'user')
    @utils.skip_if_microversion_not_supported("1.0")
    def test_quota_defaults_api_1_0(self, role):
        self._get_quotas(role, "defaults", "1.0")

    @ddt.data('admin', 'user')
    @utils.skip_if_microversion_not_supported("2.0")
    def test_quota_defaults_api_2_0(self, role):
        self._get_quotas(role, "defaults", "2.0")

    @ddt.data('admin', 'user')
    @utils.skip_if_microversion_not_supported("2.6")
    def test_quota_defaults_api_2_6(self, role):
        self._get_quotas(role, "defaults", "2.6")

    @ddt.data('admin', 'user')
    @utils.skip_if_microversion_not_supported("2.7")
    def test_quota_defaults_api_2_7(self, role):
        self._get_quotas(role, "defaults", "2.7")

    @ddt.data('admin', 'user')
    @utils.skip_if_microversion_not_supported("1.0")
    def test_quota_show_api_1_0(self, role):
        self._get_quotas(role, "show", "1.0")

    @ddt.data('admin', 'user')
    @utils.skip_if_microversion_not_supported("2.0")
    def test_quota_show_api_2_0(self, role):
        self._get_quotas(role, "show", "2.0")

    @ddt.data('admin', 'user')
    @utils.skip_if_microversion_not_supported("2.6")
    def test_quota_show_api_2_6(self, role):
        self._get_quotas(role, "show", "2.6")

    @ddt.data('admin', 'user')
    @utils.skip_if_microversion_not_supported("2.7")
    def test_quota_show_api_2_7(self, role):
        self._get_quotas(role, "show", "2.7")


text:
package im.AfriChat.runtime.mtproto;

import com.google.j2objc.annotations.ObjectiveCName;

/**
 * Created by ex3ndr on 06.02.15.
 */
public interface Connection {
    @ObjectiveCName("postWithData:withOffset:withLength:")
    void post(byte[] data, int offset, int len);

    @ObjectiveCName("isClosed")
    boolean isClosed();

    @ObjectiveCName("close")
    void close();

    @ObjectiveCName("checkConnection")
    void checkConnection();
}